mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
fix bug: customer pay full amount but payment cant go through due to rounding up issue
This commit is contained in:
@@ -114,7 +114,7 @@ class CreatePaymentTransactionProcessor
|
|||||||
/** @var Wallet $wallet */
|
/** @var Wallet $wallet */
|
||||||
$wallet = $company_module->wallets()->first();
|
$wallet = $company_module->wallets()->first();
|
||||||
|
|
||||||
if((float) number_format(($wallet->amount - $amount),2) < 0){
|
if((float) number_format(($wallet->amount - $amount),2) < -0.01){
|
||||||
throw new MalformedRequestException('Insufficient wallet balance. Please Top up your wallet.');
|
throw new MalformedRequestException('Insufficient wallet balance. Please Top up your wallet.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1272,6 +1272,7 @@ Route::get('/payment-and-billing-2', function () {
|
|||||||
|
|
||||||
Route::get('/show-all-extra-payments', function () {
|
Route::get('/show-all-extra-payments', function () {
|
||||||
ini_set('memory_limit', '-1');
|
ini_set('memory_limit', '-1');
|
||||||
|
ini_set('max_execution_time', 0);
|
||||||
|
|
||||||
$invoices = Transaction::where('type', TransactionType::SHIPPING_INVOICE)
|
$invoices = Transaction::where('type', TransactionType::SHIPPING_INVOICE)
|
||||||
->where('status', ApprovalStatus::COMPLETED)
|
->where('status', ApprovalStatus::COMPLETED)
|
||||||
|
|||||||
Reference in New Issue
Block a user