From 2fe3448e8fc97a7a3bedebc1643074a01deac445 Mon Sep 17 00:00:00 2001 From: Kendrick Chan Date: Fri, 27 Jul 2018 00:43:02 +0800 Subject: [PATCH] Change pricing for tire repair service #161 --- src/Service/InvoiceCreator.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/Service/InvoiceCreator.php b/src/Service/InvoiceCreator.php index 837f2db8..589141bb 100644 --- a/src/Service/InvoiceCreator.php +++ b/src/Service/InvoiceCreator.php @@ -290,6 +290,20 @@ class InvoiceCreator $total['vat'] = 216; } + public function processTireRepair(&$total, $invoice) + { + $item = new InvoiceItem(); + $item->setInvoice($invoice) + ->setTitle('Service - Flat Tire') + ->setQuantity(1) + ->setPrice(200.00); + $invoice->addItem($item); + + $total['total_price'] = 200; + $total['vat_ex_price'] = 176; + $total['vat'] = 24; + } + public function processRefuel(&$total, $invoice, $ftype) { $item = new InvoiceItem(); @@ -381,7 +395,8 @@ class InvoiceCreator $this->processReplacement($total, $invoice); break; case ServiceType::TIRE_REPAIR: - $this->processOtherServices($total, $invoice, $stype); + $this->processTireRepair($total, $invoice); + // $this->processOtherServices($total, $invoice, $stype); break; case ServiceType::OVERHEAT_ASSISTANCE: $this->processOverheat($total, $invoice);