From fa514ef26cd6e9e9aa22a2311a3886cff67072e1 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Mon, 5 Jun 2023 21:51:19 -0400 Subject: [PATCH] Remove debug messages. Add TODO task for front-end. #744 --- src/Service/InvoiceManager.php | 8 -------- templates/job-order/form.html.twig | 4 ++++ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/Service/InvoiceManager.php b/src/Service/InvoiceManager.php index 291048c7..a9d1f8a8 100644 --- a/src/Service/InvoiceManager.php +++ b/src/Service/InvoiceManager.php @@ -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; diff --git a/templates/job-order/form.html.twig b/templates/job-order/form.html.twig index 9a8387b5..95c548b5 100644 --- a/templates/job-order/form.html.twig +++ b/templates/job-order/form.html.twig @@ -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",