Fixed billplz payment not same as payment stored in arrahn db. Automatically roundup payments at the source
This commit is contained in:
@@ -38,7 +38,7 @@ class BayaranController extends Controller
|
||||
'nokp' => $customerIcno,
|
||||
'kodcaw' => $request->txtkodcawhidden[$x],
|
||||
'norujukan' => $request->txtnorujukanhidden[$x],
|
||||
'bayaran' => $request->txtbayaranhidden[$x],
|
||||
'bayaran' => round($request->txtbayaranhidden[$x], 1),
|
||||
'txtjbghidden' => $request->txtjbghidden[$x],
|
||||
'txtupahhidden' => $request->txtupahhidden[$x],
|
||||
];
|
||||
@@ -50,7 +50,7 @@ class BayaranController extends Controller
|
||||
'nokp' => $customerIcno,
|
||||
'kodcaw' => $request->txtkodcawhidden[$x],
|
||||
'norujukan' => $request->txtnorujukanhidden[$x],
|
||||
'bayaran' => $request->txtbayaranhidden[$x],
|
||||
'bayaran' => round($request->txtbayaranhidden[$x], 1),
|
||||
];
|
||||
}, array_keys($bayaranOthers));
|
||||
|
||||
@@ -58,7 +58,7 @@ class BayaranController extends Controller
|
||||
|
||||
$getPaymentSum = function () use ($paymentArray) {
|
||||
$billPlzTransactionFee = Money::MYR(100);
|
||||
$sum = fn() => array_reduce($paymentArray, fn($accumulator, $currentItem) => $accumulator + round($currentItem['bayaran'], 1), 0) * 100;
|
||||
$sum = fn() => array_reduce($paymentArray, fn($accumulator, $currentItem) => $accumulator + $currentItem['bayaran'], 0) * 100;
|
||||
return Money::MYR($sum())->add($billPlzTransactionFee);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user