From 64f3248b59d5443b2180929413cb34f8dadfbba5 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Thu, 27 May 2021 07:14:18 +0000 Subject: [PATCH] Fix issues found during merging and testing. #570 --- .../CustomerHandler/ResqCustomerHandler.php | 1 + .../InvoiceGenerator/ResqInvoiceGenerator.php | 5 +--- templates/customer/form.html.twig | 28 +++++++++---------- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/src/Service/CustomerHandler/ResqCustomerHandler.php b/src/Service/CustomerHandler/ResqCustomerHandler.php index bbabdbed..1554a288 100644 --- a/src/Service/CustomerHandler/ResqCustomerHandler.php +++ b/src/Service/CustomerHandler/ResqCustomerHandler.php @@ -548,6 +548,7 @@ class ResqCustomerHandler implements CustomerHandlerInterface 'flag_promo_email' => $customer->isPromoEmail(), 'flag_research_sms' => $customer->isResearchSms(), 'flag_research_email' => $customer->isResearchEmail(), + 'customer_tags' => $customer->getCustomerTags(), ], 'vehicle' => [ 'id' => $vehicle->getID(), diff --git a/src/Service/InvoiceGenerator/ResqInvoiceGenerator.php b/src/Service/InvoiceGenerator/ResqInvoiceGenerator.php index e5d6f314..f1be78f1 100644 --- a/src/Service/InvoiceGenerator/ResqInvoiceGenerator.php +++ b/src/Service/InvoiceGenerator/ResqInvoiceGenerator.php @@ -416,12 +416,9 @@ class ResqInvoiceGenerator implements InvoiceGeneratorInterface protected function processDiscount(&$total, InvoiceCriteria $criteria, Invoice $invoice, $cust_tag_info) { - $promos = $criteria->getPromos(); - if (count($promos) < 1) - return; if (empty($cust_tag_info)) { - error_log('empty cust tag'); + //error_log('empty cust tag'); $promos = $criteria->getPromos(); if (count($promos) < 1) return; diff --git a/templates/customer/form.html.twig b/templates/customer/form.html.twig index 69596346..a68640df 100644 --- a/templates/customer/form.html.twig +++ b/templates/customer/form.html.twig @@ -101,20 +101,7 @@ -
- -
-
-
- {% for customer_tag in customer_tags %} - - {% endfor %} -
-
+
@@ -173,6 +160,19 @@
+
+
+
+ {% for customer_tag in customer_tags %} + + {% endfor %} +
+
+