From 4b5f64ca9bfa36c72fd7a7c9367b2b257ecdc14c Mon Sep 17 00:00:00 2001 From: ahmedsophyudden Date: Sun, 5 Sep 2021 12:18:08 +0800 Subject: [PATCH] add booking quotation calculation for partial refund request --- .../Services/CalculateTransactionRefundAmount.php | 14 ++++++++++++++ .../CalculateTransactionRefundOriginalAmount.php | 14 ++++++++++++++ .../CalculateTransactionRefundServiceCharge.php | 14 ++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 app/Classes/Modules/Transactions/Services/CalculateTransactionRefundAmount.php create mode 100644 app/Classes/Modules/Transactions/Services/CalculateTransactionRefundOriginalAmount.php create mode 100644 app/Classes/Modules/Transactions/Services/CalculateTransactionRefundServiceCharge.php diff --git a/app/Classes/Modules/Transactions/Services/CalculateTransactionRefundAmount.php b/app/Classes/Modules/Transactions/Services/CalculateTransactionRefundAmount.php new file mode 100644 index 00000000..55a9d80b --- /dev/null +++ b/app/Classes/Modules/Transactions/Services/CalculateTransactionRefundAmount.php @@ -0,0 +1,14 @@ +amount == $amount ? $transaction->amount : $transaction->amount - $amount; + } + +} \ No newline at end of file diff --git a/app/Classes/Modules/Transactions/Services/CalculateTransactionRefundOriginalAmount.php b/app/Classes/Modules/Transactions/Services/CalculateTransactionRefundOriginalAmount.php new file mode 100644 index 00000000..15e5cb6d --- /dev/null +++ b/app/Classes/Modules/Transactions/Services/CalculateTransactionRefundOriginalAmount.php @@ -0,0 +1,14 @@ +original_amount == $amount ? $transaction->original_amount : $transaction->original_amount - $amount; + } + +} \ No newline at end of file diff --git a/app/Classes/Modules/Transactions/Services/CalculateTransactionRefundServiceCharge.php b/app/Classes/Modules/Transactions/Services/CalculateTransactionRefundServiceCharge.php new file mode 100644 index 00000000..38e48d8b --- /dev/null +++ b/app/Classes/Modules/Transactions/Services/CalculateTransactionRefundServiceCharge.php @@ -0,0 +1,14 @@ +service_charge == $service_charge ? $transaction->service_charge : $transaction->service_charge - $service_charge; + } + +} \ No newline at end of file