diff --git a/public/static/faq.html b/public/static/faq.html
index 2e0cdea3..42b4110d 100644
--- a/public/static/faq.html
+++ b/public/static/faq.html
@@ -58,7 +58,7 @@ Yes, we accept Visa and Mastercard issued in the Philippines.
How can I pay for your services/ products?
-We accept COD, local Credit Cards, Debit Cards, and ATM Cards only.
+We accept COD, local credit cards, debit cards, and ATM cards for battery replacement transactions. We only accept cash payment for flat tire, refuel and overheat transactions.
@@ -93,7 +93,7 @@ Delivery for battery purchase is free of charge.
Can you deliver anywhere in the Philippines?
-Not yet. Res-Q is offered initially in Metro Manila only.
+Not yet. Res-Q is offered Metro Manila, Baguio City and Binan, Laguna only.
diff --git a/src/Controller/BatterySizeController.php b/src/Controller/BatterySizeController.php
index 5dc2906a..177780e8 100644
--- a/src/Controller/BatterySizeController.php
+++ b/src/Controller/BatterySizeController.php
@@ -129,7 +129,8 @@ class BatterySizeController extends Controller
$obj->setName($req->request->get('name'))
->setTIPriceMotolite($req->request->get('tip_motolite'))
->setTIPricePremium($req->request->get('tip_premium'))
- ->setTIPriceOther($req->request->get('tip_other'));
+ ->setTIPriceOther($req->request->get('tip_other'))
+ ->setTIPriceLazada($req->request->get('tip_lazada'));
}
public function addSubmit(Request $req, ValidatorInterface $validator)
diff --git a/src/Controller/SAPBatteryController.php b/src/Controller/SAPBatteryController.php
index 099c1998..a06f4ef9 100644
--- a/src/Controller/SAPBatteryController.php
+++ b/src/Controller/SAPBatteryController.php
@@ -171,9 +171,12 @@ class SAPBatteryController extends Controller
$error_array['id'] = 'SAP code is required.';
$flag_new = $req->request->get('flag_new', false);
+ $flag_inventory = $req->request->get('flag_inventory', false);
+
// set and save values
$row->setID($id)
- ->setNew($flag_new);
+ ->setNew($flag_new)
+ ->setInventory($flag_inventory);
// custom validation for battery brand
$brand = $em->getRepository(SAPBatteryBrand::class)
@@ -277,9 +280,12 @@ class SAPBatteryController extends Controller
$error_array['id'] = 'SAP code is required.';
$flag_new = $req->request->get('flag_new', false);
+ $flag_inventory = $req->request->get('flag_inventory', false);
+
// set and save values
$row->setID($id)
- ->setNew($flag_new);
+ ->setNew($flag_new)
+ ->setInventory($flag_inventory);
// custom validation for battery brand
$brand = $em->getRepository(SAPBatteryBrand::class)
diff --git a/src/Entity/BatterySize.php b/src/Entity/BatterySize.php
index 9fff4d44..8b47d6af 100644
--- a/src/Entity/BatterySize.php
+++ b/src/Entity/BatterySize.php
@@ -51,12 +51,19 @@ class BatterySize
*/
protected $tip_other;
+ // lazada trade-in price
+ /**
+ * @ORM\Column(type="decimal", precision=7, scale=2)
+ */
+ protected $tip_lazada;
+
public function __construct()
{
$this->batteries = new ArrayCollection();
$this->tip_motolite = 0;
$this->tip_premium = 0;
$this->tip_other = 0;
+ $this->tip_lazada = 0;
}
public function getID()
@@ -130,4 +137,16 @@ class BatterySize
{
return $this->tip_other;
}
+
+ public function setTIPriceLazada($price)
+ {
+ $this->tip_lazada = $price;
+ return $this;
+ }
+
+ public function getTIPriceLazada()
+ {
+ return $this->tip_lazada;
+ }
+
}
diff --git a/src/Entity/Customer.php b/src/Entity/Customer.php
index 281c9fa9..f99df0d5 100644
--- a/src/Entity/Customer.php
+++ b/src/Entity/Customer.php
@@ -192,6 +192,11 @@ class Customer
*/
protected $date_create;
+ /**
+ * @ORM\Column(type="boolean", options={"default":false})
+ */
+ protected $flag_promo_marketing_research;
+
public function __construct()
{
$this->numbers = new ArrayCollection();
@@ -222,6 +227,7 @@ class Customer
$this->flag_promo_email = false;
$this->flag_promo_sms = false;
$this->flag_dpa_consent = false;
+ $this->flag_promo_marketing_research = false;
$this->date_create = new DateTime();
}
@@ -555,4 +561,15 @@ class Customer
{
return $this->flag_dpa_consent;
}
+
+ public function setPromoMarketingResearch($flag_promo_marketing_research = true)
+ {
+ $this->flag_promo_marketing_research = $flag_promo_marketing_research;
+ return $this;
+ }
+
+ public function isPromoMarketingResearch()
+ {
+ return $this->flag_promo_marketing_research;
+ }
}
diff --git a/src/Entity/SAPBattery.php b/src/Entity/SAPBattery.php
index 284e2e32..df4303d4 100644
--- a/src/Entity/SAPBattery.php
+++ b/src/Entity/SAPBattery.php
@@ -58,10 +58,17 @@ class SAPBattery
*/
protected $container_size;
+ // flag to indicate if this SAP battery is inventory or non-inventory
+ /**
+ * @ORM\Column(type="boolean")
+ */
+ protected $flag_inventory;
+
public function __construct()
{
$this->date_create = new DateTime();
$this->flag_new = false;
+ $this->flag_inventory = false;
}
public function setID($id)
@@ -129,4 +136,14 @@ class SAPBattery
return $this->container_size;
}
+ public function setInventory($inventory = false)
+ {
+ $this->flag_inventory = $inventory;
+ return $this;
+ }
+
+ public function isInventory()
+ {
+ return $this->flag_inventory;
+ }
}
diff --git a/src/Service/CustomerHandler/ResqCustomerHandler.php b/src/Service/CustomerHandler/ResqCustomerHandler.php
index 5f3653dd..cf2a71d7 100644
--- a/src/Service/CustomerHandler/ResqCustomerHandler.php
+++ b/src/Service/CustomerHandler/ResqCustomerHandler.php
@@ -539,6 +539,7 @@ class ResqCustomerHandler implements CustomerHandlerInterface
'flag_dpa_consent' => $customer->isDpaConsent(),
'flag_promo_sms' => $customer->isPromoSms(),
'flag_promo_email' => $customer->isPromoEmail(),
+ 'flag_promo_marketing_research' => $customer->isPromoMarketingResearch(),
],
'vehicle' => [
'id' => $vehicle->getID(),
@@ -599,7 +600,8 @@ class ResqCustomerHandler implements CustomerHandlerInterface
->setActive($req->request->get('flag_active') ? true : false)
->setPromoSms($req->request->get('flag_promo_sms', false))
->setPromoEmail($req->request->get('flag_promo_email', false))
- ->setDpaConsent($is_dpa_checked);
+ ->setDpaConsent($is_dpa_checked)
+ ->setPromoMarketingResearch($req->request->get('flag_promo_marketing_research', false));
// phone numbers
$obj->setPhoneMobile($req->request->get('phone_mobile'))
diff --git a/templates/battery-size/form.html.twig b/templates/battery-size/form.html.twig
index 1af1f342..06d3fadd 100644
--- a/templates/battery-size/form.html.twig
+++ b/templates/battery-size/form.html.twig
@@ -70,7 +70,16 @@
-
+
+