From 5d98216d21c2c94f9bcf005e076257f7b20f8250 Mon Sep 17 00:00:00 2001 From: Kendrick Chan Date: Wed, 31 Mar 2021 00:57:31 +0800 Subject: [PATCH] Make customer info update on a warranty update #540 --- src/Controller/CAPI/CustomerWarrantyController.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Controller/CAPI/CustomerWarrantyController.php b/src/Controller/CAPI/CustomerWarrantyController.php index 954116cf..59c30f62 100644 --- a/src/Controller/CAPI/CustomerWarrantyController.php +++ b/src/Controller/CAPI/CustomerWarrantyController.php @@ -422,6 +422,12 @@ class CustomerWarrantyController extends APIController } else { + // NOTE: behaviour has been changed. we now save customer details too + $cust->setFirstName($req->request->get('first_name')) + ->setLastName($req->request->get('last_name')) + ->setEmail($req->request->get('email')) + ->setPrivacyPromo($priv_promo) + ->setPhoneMobile($req->request->get('contact_num')); // only update privacy promo $cust->setPrivacyPromo($priv_promo); }