Add source to invoice criteria. Modify invoice rules to get service fees from... #1701

Merged
arcticzero merged 217 commits from 746-resq-2-0-final into master 2023-11-22 08:54:48 +00:00
2 changed files with 4 additions and 8 deletions
Showing only changes of commit fa514ef26c - Show all commits

View file

@ -268,8 +268,6 @@ class InvoiceManager
}
$promo = null;
error_log('mogol compute items ' . count($items));
foreach ($items as $item)
{
$title = $item['title'];
@ -293,8 +291,6 @@ class InvoiceManager
];
}
error_log('mogol compute invoice items ' . count($invoice_items));
// also need to return the total and the promo
$data[] = [
'promo' => $promo,
@ -393,8 +389,6 @@ class InvoiceManager
if (isset($data['promo']))
$promo = $data['promo'];
error_log('mogol ' . count($invoice_items));
foreach ($invoice_items as $item)
{
$invoice_item = new InvoiceItem();
@ -416,8 +410,6 @@ class InvoiceManager
->setDiscount($total['discount'])
->setTradeIn($total['ti_rate'])
->setStatus(InvoiceStatus::DRAFT);
error_log('mogol total ' . $invoice->getTotalPrice());
}
return $invoice;

View file

@ -1714,6 +1714,8 @@ $(function() {
}
// add to invoice array
// TODO: need to figure out how to push battery and tradein separately
// right now, battery and trade in is one entry. Need to separate that into two entries
invoiceItems.push({
battery: battery,
quantity: qty,
@ -1752,6 +1754,8 @@ $(function() {
var stype = $("#service_type").val();
var cvid = $("#customer-vehicle").val();
console.log(JSON.stringify(invoiceItems));
// generate invoice values
$.ajax({
method: "POST",