From 408baab0c6956ae2351f32fe9f417d3cd033b117 Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Tue, 23 Dec 2025 15:24:05 +0800 Subject: [PATCH 1/6] E-Invoice - EXC3000: Exchange Rules of RM10K single INV --- .../CheckEInvoiceAmountLimitLogic.php | 67 ++++++++++++++ .../CheckEInvoiceAmountLimitRuleDTO.php | 36 ++++++++ .../CanPassMustEInvoiceAmountLimitRule.php | 87 +++++++++++++++++++ .../Controllers/Rules/CheckRuleController.php | 10 +++ .../BookingPaymentQuotationV2Component.vue | 72 ++++++++++----- .../forms/PurchaseOrderFormComponent.vue | 19 ++++ routes/rule.php | 1 + 7 files changed, 268 insertions(+), 24 deletions(-) create mode 100644 app/Classes/Modules/Rules/ControllersLogic/CheckEInvoiceAmountLimitLogic.php create mode 100644 app/Classes/Modules/Rules/DataTransferObjects/CheckEInvoiceAmountLimitRuleDTO.php create mode 100644 app/Classes/Modules/Rules/Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php diff --git a/app/Classes/Modules/Rules/ControllersLogic/CheckEInvoiceAmountLimitLogic.php b/app/Classes/Modules/Rules/ControllersLogic/CheckEInvoiceAmountLimitLogic.php new file mode 100644 index 00000000..bc9f18ae --- /dev/null +++ b/app/Classes/Modules/Rules/ControllersLogic/CheckEInvoiceAmountLimitLogic.php @@ -0,0 +1,67 @@ + 'Rule Check E-Invoice Amount Limit', + 'message' => 'You have successfully passed all rules evaluated' + ]; + } + + /** @var RuleEvaluator */ + private $ruleEvaluator; + + + /** @var CanPassMustEInvoiceAmountLimitRule */ + private $canPassMustEInvoiceAmountLimitRule; + + /** + * CheckEInvoiceAmountLimitLogic constructor. + * @param RuleEvaluator $ruleEvaluator + * @param CanPassMustEInvoiceAmountLimitRule $canPassMustEInvoiceAmountLimitRule + */ + public function __construct(RuleEvaluator $ruleEvaluator, CanPassMustEInvoiceAmountLimitRule $canPassMustEInvoiceAmountLimitRule) + { + $this->ruleEvaluator = $ruleEvaluator; + $this->canPassMustEInvoiceAmountLimitRule = $canPassMustEInvoiceAmountLimitRule; + } + + /** + * @param Request $request + * @return JsonResponse + * @throws \App\Classes\Exceptions\AccessForbiddenException + * @throws \App\Classes\Exceptions\MalformedRequestException + * @throws \App\Classes\Exceptions\RequestValidationException + * @throws \App\Classes\Exceptions\CriteriaNotFulfilledException + */ + public function logic(Request $request) : JsonResponse + { + $dto = new CheckEInvoiceAmountLimitRuleDTO($request->all()); + + $result = $this->ruleEvaluator->evaluate([ + $this->canPassMustEInvoiceAmountLimitRule + ], $dto); + + if ($result->failed()) { + throw new CriteriaNotFulfilledException("- " . implode("
- ", $result->messages())); + } + + return $this->resourceResponse(new RuleResource((object)$result)); + } +} diff --git a/app/Classes/Modules/Rules/DataTransferObjects/CheckEInvoiceAmountLimitRuleDTO.php b/app/Classes/Modules/Rules/DataTransferObjects/CheckEInvoiceAmountLimitRuleDTO.php new file mode 100644 index 00000000..b28e78f1 --- /dev/null +++ b/app/Classes/Modules/Rules/DataTransferObjects/CheckEInvoiceAmountLimitRuleDTO.php @@ -0,0 +1,36 @@ +bookingId = $data['booking_id']; + $this->companyId = $data['company_id']; + + $this->amount = $data['amount'] ?? null; + $this->paymentMethod = $data['payment_method'] ?? null; + $this->voucherCode = $data['voucherCode'] ?? null; + } + + public function toArray(): array + { + return [ + 'booking_id' => $this->bookingId, + 'company_id' => $this->companyId, + 'amount' => $this->amount, + 'payment_method' => $this->paymentMethod, + 'voucher_code' => $this->voucherCode, + ]; + } +} diff --git a/app/Classes/Modules/Rules/Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php b/app/Classes/Modules/Rules/Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php new file mode 100644 index 00000000..201bad8b --- /dev/null +++ b/app/Classes/Modules/Rules/Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php @@ -0,0 +1,87 @@ +fetchesBooking = $fetchesBooking; + $this->fetchesBookingQuotation = $fetchesBookingQuotation; + $this->calculatesBookingOutstanding = $calculatesBookingOutstanding; + } + + /** + * @return bool + */ + protected function authorized($object): bool + { + return true; + + } + + /** + * @return bool + */ + protected function validators($object): bool + { + return true; + + } + + + /** + * @return bool + */ + protected function criteria($object): bool + { + //Check if booking amount is RM10,000 or more, than must opt-in E-Invoice + $booking = $this->fetchesBooking->execute(['id' => $object->bookingId]); + $company = $booking->company; + + if(isset($object->amount)){ + $conversionObject = new CurrencyConversionObject(floatval(str_replace(',', '', floatval(str_replace(',', '', $object->amount)))), $booking->convertible_currency_id, $booking->service_id, $booking->fix_currency_id === 1 ? 0:1, PaymentMethodType::PAYMENT_METHODS[$object->paymentMethod]); + $voucherCode = $object->voucherCode ?? null; + $configurations = $this->fetchesBookingQuotation->execute($booking->company, $conversionObject, $voucherCode, null, $booking); + } + else{ + $outstanding = $this->calculatesBookingOutstanding->execute($booking); + $conversionObject = new CurrencyConversionObject(floatval(str_replace(',', '', $outstanding)), $booking->convertible_currency_id, $booking->service_id, $booking->fix_currency_id === 1 ? 0 : 1, PaymentMethodType::CASH); + $configurations = $this->fetchesBookingQuotation->execute($booking->company, $conversionObject); + } + + $bookingAmountInMYR = $configurations->getTotal(); + + if($bookingAmountInMYR >= 10000 && (!$company->e_invoice || !$company->tin) ){ + throw new CriteriaNotFulfilledException("RM10,000 and above must opt-in for E-Invoice."); + } + return true; + } +} diff --git a/app/Http/Controllers/Rules/CheckRuleController.php b/app/Http/Controllers/Rules/CheckRuleController.php index 59b24cd0..b0a175c1 100644 --- a/app/Http/Controllers/Rules/CheckRuleController.php +++ b/app/Http/Controllers/Rules/CheckRuleController.php @@ -5,6 +5,7 @@ namespace App\Http\Controllers\Rules; use App\Classes\Modules\Rules\ControllersLogic\CheckEInvoiceRuleLogic; use App\Classes\Modules\Rules\ControllersLogic\CheckPurchaseOrderRuleLogic; use App\Classes\Modules\Rules\ControllersLogic\CheckTransferRuleLogic; +use App\Classes\Modules\Rules\ControllersLogic\CheckEInvoiceAmountLimitLogic; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; @@ -36,4 +37,13 @@ class CheckRuleController public function checkTransferRule(Request $request, CheckTransferRuleLogic $logic): JsonResponse { return $logic->execute($request); } + + /** + * @param Request $request + * @param CheckEInvoiceAmountLimitLogic $logic + * @return JsonResponse + */ + public function checkEInvoiceAmountLimitRule(Request $request, CheckEInvoiceAmountLimitLogic $logic): JsonResponse { + return $logic->execute($request); + } } diff --git a/resources/assets/vue/components/bookings/forms/BookingPaymentQuotationV2Component.vue b/resources/assets/vue/components/bookings/forms/BookingPaymentQuotationV2Component.vue index 7dd9adc0..363a6d1f 100644 --- a/resources/assets/vue/components/bookings/forms/BookingPaymentQuotationV2Component.vue +++ b/resources/assets/vue/components/bookings/forms/BookingPaymentQuotationV2Component.vue @@ -162,29 +162,6 @@ - - - - - - - @@ -622,7 +599,7 @@ + @click.prevent="checkEInvoiceAmountLimitRule">Lock Booking @@ -630,6 +607,31 @@ + + + + + + + + + @@ -740,6 +742,9 @@ $('#confirm-booking-modal').modal('show'); } } + else if(section === this.section + 'CheckEInvoiceAmountLimitRule'){ + this.checkPurchaseOrderRule(); + } else if(section === this.section + 'ChangeOfMind'){ this.$store.dispatch('reloadList', {'name': "bookingDetailSection"}); } @@ -767,6 +772,14 @@ if(section === this.section + 'CheckEInvoiceRule' && statusCode === 422){ $('#modal-einvoice-info').modal('show'); } + else if(section === this.section + 'CheckEInvoiceAmountLimitRule' && statusCode === 422){ + if(!this.data.company.e_invoice){ + $('#modal-einvoice-request').modal('show'); + } + else if(!this.data.company.tin){ + $('#modal-einvoice-info').modal('show'); + } + } this.error = error.message; }, makePayment(){ //E-Invoice @@ -837,6 +850,17 @@ }; this.submit(route('api.rule.check.einvoice'), 'post', this.section + 'CheckEInvoiceRule', false, true); }, + checkEInvoiceAmountLimitRule(){ + this.error = ''; + this.parameters = { + booking_id: this.data.id, + company_id: this.data.company.id, + payment_method: this.paymentMethod.id, + voucherCode: this.voucherCode, + amount: this.amount + }; + this.submit(route('api.rule.check.einvoice.amount-limit'), 'post', this.section + 'CheckEInvoiceAmountLimitRule', false, true); + }, checkPurchaseOrderRule(){ this.error = ''; this.parameters = { diff --git a/resources/assets/vue/components/bookings/forms/PurchaseOrderFormComponent.vue b/resources/assets/vue/components/bookings/forms/PurchaseOrderFormComponent.vue index a96af8fc..2f546bd4 100644 --- a/resources/assets/vue/components/bookings/forms/PurchaseOrderFormComponent.vue +++ b/resources/assets/vue/components/bookings/forms/PurchaseOrderFormComponent.vue @@ -432,6 +432,9 @@ this.checkEInvoiceRule(); } else if(section === this.section + 'CheckEInvoiceRule'){ + this.checkEInvoiceAmountLimitRule(); + } + else if(section === this.section + 'CheckEInvoiceAmountLimitRule'){ if(response.payload.data.isPassed){ if(this.data.service.id === 14 || this.data.service.id === 15 || this.data.service.id === 16 || this.data.service.id === 17 || this.data.service.id === 18 || this.data.service.id === 19){ this.submit(route('api.booking.banking.create', this.data.id), 'post', this.section, true, true); @@ -452,6 +455,14 @@ if(section === this.section + 'CheckEInvoiceRule' && statusCode === 422){ $('#modal-einvoice-info').modal('show'); } + else if(section === this.section + 'CheckEInvoiceAmountLimitRule' && statusCode === 422){ + if(!this.data.company.e_invoice){ + $('#modal-einvoice-request').modal('show'); + } + else if(!this.data.company.tin){ + $('#modal-einvoice-info').modal('show'); + } + } }, addProduct(){ this.products.push({ @@ -518,6 +529,14 @@ }; this.submit(route('api.rule.check.einvoice'), 'post', this.section + 'CheckEInvoiceRule', false, true); }, + checkEInvoiceAmountLimitRule(){ + this.error = ''; + this.parameters = { + booking_id: this.data.id, + company_id: this.data.company.id, + }; + this.submit(route('api.rule.check.einvoice.amount-limit'), 'post', this.section + 'CheckEInvoiceAmountLimitRule', false, true); + }, updatedEInvoiceInfo(info){ this.$store.dispatch('reloadList', {'name': "bookingDetailSection"}); }, diff --git a/routes/rule.php b/routes/rule.php index d5330176..4918b4d0 100644 --- a/routes/rule.php +++ b/routes/rule.php @@ -9,4 +9,5 @@ Route::prefix('rule') Route::post('/check/eInvoice', [CheckRuleController::class, 'checkEInvoiceRule'])->name('check.einvoice'); Route::post('/check/purchase-order', [CheckRuleController::class, 'checkPurchaseOrderRule'])->name('check.purchase.order'); Route::post('/check/tranfer', [CheckRuleController::class, 'checkTransferRule'])->name('check.transfer'); + Route::post('/check/e-invoice/amount-limit', [CheckRuleController::class, 'checkEInvoiceAmountLimitRule'])->name('check.einvoice.amount-limit'); }); From 4b910e4df7de6502d504f74bd15853efd775ad12 Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Wed, 24 Dec 2025 11:53:15 +0800 Subject: [PATCH 2/6] E-Invoice - EXC3000: Exchange Rules of RM10K single INV --- .../Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Classes/Modules/Rules/Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php b/app/Classes/Modules/Rules/Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php index 201bad8b..fa3d66be 100644 --- a/app/Classes/Modules/Rules/Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php +++ b/app/Classes/Modules/Rules/Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php @@ -8,6 +8,7 @@ use App\Classes\Modules\Bookings\Services\FetchesBooking; use App\Classes\Modules\Bookings\Services\CalculatesBookingOutstanding; use App\Classes\Modules\Bookings\Services\FetchesBookingQuotation; use App\Classes\Modules\Currencies\DataTransferObjects\CurrencyConversionObject; +use App\Classes\ValueObjects\Constants\ApprovalStatus; use App\Classes\ValueObjects\Constants\PaymentMethodType; use Carbon\Carbon; use Illuminate\Support\Facades\Log; @@ -65,8 +66,11 @@ class CanPassMustEInvoiceAmountLimitRule extends AbstractRule //Check if booking amount is RM10,000 or more, than must opt-in E-Invoice $booking = $this->fetchesBooking->execute(['id' => $object->bookingId]); $company = $booking->company; + $totalPayments = 0; if(isset($object->amount)){ + $totalPayments = $booking->transactions()->payments()->whereIn('transactions.status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED])->sum('amount'); + $conversionObject = new CurrencyConversionObject(floatval(str_replace(',', '', floatval(str_replace(',', '', $object->amount)))), $booking->convertible_currency_id, $booking->service_id, $booking->fix_currency_id === 1 ? 0:1, PaymentMethodType::PAYMENT_METHODS[$object->paymentMethod]); $voucherCode = $object->voucherCode ?? null; $configurations = $this->fetchesBookingQuotation->execute($booking->company, $conversionObject, $voucherCode, null, $booking); @@ -78,6 +82,7 @@ class CanPassMustEInvoiceAmountLimitRule extends AbstractRule } $bookingAmountInMYR = $configurations->getTotal(); + $bookingAmountInMYR = $bookingAmountInMYR + $totalPayments; if($bookingAmountInMYR >= 10000 && (!$company->e_invoice || !$company->tin) ){ throw new CriteriaNotFulfilledException("RM10,000 and above must opt-in for E-Invoice."); From 6eb5ca7ba3ddc62881c6e4c367e978a9b0d6b486 Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Mon, 29 Dec 2025 14:28:05 +0800 Subject: [PATCH 3/6] E-Invoice - EXC3000: Exchange Rules of RM10K single INV, update new business logic --- .../CanPassMustEInvoiceAmountLimitRule.php | 42 +++++++++++-------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/app/Classes/Modules/Rules/Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php b/app/Classes/Modules/Rules/Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php index fa3d66be..0e925f6c 100644 --- a/app/Classes/Modules/Rules/Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php +++ b/app/Classes/Modules/Rules/Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php @@ -66,27 +66,35 @@ class CanPassMustEInvoiceAmountLimitRule extends AbstractRule //Check if booking amount is RM10,000 or more, than must opt-in E-Invoice $booking = $this->fetchesBooking->execute(['id' => $object->bookingId]); $company = $booking->company; - $totalPayments = 0; - if(isset($object->amount)){ - $totalPayments = $booking->transactions()->payments()->whereIn('transactions.status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED])->sum('amount'); + // $totalPayments = 0; - $conversionObject = new CurrencyConversionObject(floatval(str_replace(',', '', floatval(str_replace(',', '', $object->amount)))), $booking->convertible_currency_id, $booking->service_id, $booking->fix_currency_id === 1 ? 0:1, PaymentMethodType::PAYMENT_METHODS[$object->paymentMethod]); - $voucherCode = $object->voucherCode ?? null; - $configurations = $this->fetchesBookingQuotation->execute($booking->company, $conversionObject, $voucherCode, null, $booking); - } - else{ - $outstanding = $this->calculatesBookingOutstanding->execute($booking); - $conversionObject = new CurrencyConversionObject(floatval(str_replace(',', '', $outstanding)), $booking->convertible_currency_id, $booking->service_id, $booking->fix_currency_id === 1 ? 0 : 1, PaymentMethodType::CASH); - $configurations = $this->fetchesBookingQuotation->execute($booking->company, $conversionObject); + // if(isset($object->amount)){ + // $totalPayments = $booking->transactions()->payments()->whereIn('transactions.status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED])->sum('amount'); + + // $conversionObject = new CurrencyConversionObject(floatval(str_replace(',', '', floatval(str_replace(',', '', $object->amount)))), $booking->convertible_currency_id, $booking->service_id, $booking->fix_currency_id === 1 ? 0:1, PaymentMethodType::PAYMENT_METHODS[$object->paymentMethod]); + // $voucherCode = $object->voucherCode ?? null; + // $configurations = $this->fetchesBookingQuotation->execute($booking->company, $conversionObject, $voucherCode, null, $booking); + // } + // else{ + // $outstanding = $this->calculatesBookingOutstanding->execute($booking); + // $conversionObject = new CurrencyConversionObject(floatval(str_replace(',', '', $outstanding)), $booking->convertible_currency_id, $booking->service_id, $booking->fix_currency_id === 1 ? 0 : 1, PaymentMethodType::CASH); + // $configurations = $this->fetchesBookingQuotation->execute($booking->company, $conversionObject); + // } + + // $bookingAmountInMYR = $configurations->getTotal(); + // $bookingAmountInMYR = $bookingAmountInMYR + $totalPayments; + + // if($bookingAmountInMYR >= 10000 && (!$company->e_invoice || !$company->tin) ){ + // throw new CriteriaNotFulfilledException("RM10,000 and above must opt-in for E-Invoice."); + // } + + if((($booking->fix_amount >= 17000 && $booking->fix_currency_id === 2) || + ($booking->fix_amount >= 4000 && $booking->fix_currency_id === 3)) + && (!$company->e_invoice || !$company->tin) ){ + throw new CriteriaNotFulfilledException("Booking amount above limit, must opt-in for E-Invoice."); } - $bookingAmountInMYR = $configurations->getTotal(); - $bookingAmountInMYR = $bookingAmountInMYR + $totalPayments; - - if($bookingAmountInMYR >= 10000 && (!$company->e_invoice || !$company->tin) ){ - throw new CriteriaNotFulfilledException("RM10,000 and above must opt-in for E-Invoice."); - } return true; } } From 4d26017fd5c7db3e6674bfd09c5ced7869511450 Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Mon, 29 Dec 2025 22:59:49 +0800 Subject: [PATCH 4/6] E-Invoice - EXC3000: Exchange Rules of RM10K single INV, update new business logic --- .../Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Classes/Modules/Rules/Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php b/app/Classes/Modules/Rules/Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php index 0e925f6c..b0ecfafc 100644 --- a/app/Classes/Modules/Rules/Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php +++ b/app/Classes/Modules/Rules/Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php @@ -90,7 +90,7 @@ class CanPassMustEInvoiceAmountLimitRule extends AbstractRule // } if((($booking->fix_amount >= 17000 && $booking->fix_currency_id === 2) || - ($booking->fix_amount >= 4000 && $booking->fix_currency_id === 3)) + ($booking->fix_amount >= 2400 && $booking->fix_currency_id === 3)) && (!$company->e_invoice || !$company->tin) ){ throw new CriteriaNotFulfilledException("Booking amount above limit, must opt-in for E-Invoice."); } From 630fe1f74b4c21e674d4d6ce79fbf37f6365161f Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Wed, 31 Dec 2025 22:12:49 +0800 Subject: [PATCH 5/6] E-Invoice - EXC3000: Exchange Rules of RM10K single INV, update new business logic --- .../Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Classes/Modules/Rules/Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php b/app/Classes/Modules/Rules/Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php index b0ecfafc..48b7e3ab 100644 --- a/app/Classes/Modules/Rules/Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php +++ b/app/Classes/Modules/Rules/Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php @@ -89,8 +89,10 @@ class CanPassMustEInvoiceAmountLimitRule extends AbstractRule // throw new CriteriaNotFulfilledException("RM10,000 and above must opt-in for E-Invoice."); // } - if((($booking->fix_amount >= 17000 && $booking->fix_currency_id === 2) || - ($booking->fix_amount >= 2400 && $booking->fix_currency_id === 3)) + //1 MYR, 2 CNY, 3USD + if((($booking->fix_amount >= 9000 && $booking->fix_currency_id === 1) || + ($booking->fix_amount >= 12600 && $booking->fix_currency_id === 2) || + ($booking->fix_amount >= 1920 && $booking->fix_currency_id === 3)) && (!$company->e_invoice || !$company->tin) ){ throw new CriteriaNotFulfilledException("Booking amount above limit, must opt-in for E-Invoice."); } From 1ed92f5ddf5002a7365905367293bbf21fa73b28 Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Wed, 31 Dec 2025 22:13:55 +0800 Subject: [PATCH 6/6] E-Invoice - EXC3000: Exchange Rules of RM10K single INV, update new business logic --- .../Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Classes/Modules/Rules/Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php b/app/Classes/Modules/Rules/Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php index 48b7e3ab..d077aab7 100644 --- a/app/Classes/Modules/Rules/Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php +++ b/app/Classes/Modules/Rules/Standards/Rules/CanPassMustEInvoiceAmountLimitRule.php @@ -89,7 +89,7 @@ class CanPassMustEInvoiceAmountLimitRule extends AbstractRule // throw new CriteriaNotFulfilledException("RM10,000 and above must opt-in for E-Invoice."); // } - //1 MYR, 2 CNY, 3USD + //1 MYR, 2 CNY, 3 USD if((($booking->fix_amount >= 9000 && $booking->fix_currency_id === 1) || ($booking->fix_amount >= 12600 && $booking->fix_currency_id === 2) || ($booking->fix_amount >= 1920 && $booking->fix_currency_id === 3)) @@ -99,4 +99,4 @@ class CanPassMustEInvoiceAmountLimitRule extends AbstractRule return true; } -} +} \ No newline at end of file