mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
update to bill refund for 1688 supplier
This commit is contained in:
@@ -150,7 +150,9 @@ class CreateSupplierBillGroupLogic extends AbstractControllerLogic
|
||||
}
|
||||
|
||||
//create bill refund
|
||||
foreach ($supplierRefunds as $supplierRefund) {
|
||||
$amount += $service_charges;
|
||||
|
||||
foreach ($supplierRefunds as $supplierRefund) {
|
||||
$refund = Transaction::find($supplierRefund['id']);
|
||||
$deductedRefunds = $refund->transactions()->where('type', TransactionType::BILL_REFUND)->where('status', ApprovalStatus::APPROVED)->get();
|
||||
$refundDeductableAmount = $refund->amount - $deductedRefunds->sum('amount');
|
||||
|
||||
Reference in New Issue
Block a user