Working on gateway fees
This commit is contained in:
parent
fa2e50f15c
commit
0791e6fbc5
1 changed files with 5 additions and 5 deletions
|
|
@ -1019,15 +1019,15 @@ class InvoiceRepository extends BaseRepository
|
|||
return false;
|
||||
}
|
||||
|
||||
if (! $invoice->relationLoaded('invoice_items')) {
|
||||
$invoice->load('invoice_items');
|
||||
}
|
||||
|
||||
// once an invoice with fee surcharge has been paid don't clear it
|
||||
if (($location == FEE_LOCATION_CHARGE1 || $location == FEE_LOCATION_CHARGE2) && $invoice->amount != $invoice->balance) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (! $invoice->relationLoaded('invoice_items')) {
|
||||
$invoice->load('invoice_items');
|
||||
}
|
||||
|
||||
if ($location == FEE_LOCATION_ITEM) {
|
||||
$data = $invoice->toArray();
|
||||
foreach ($data['invoice_items'] as $key => $item) {
|
||||
|
|
@ -1066,7 +1066,7 @@ class InvoiceRepository extends BaseRepository
|
|||
$data = $invoice->toArray();
|
||||
|
||||
if ($location == FEE_LOCATION_ITEM) {
|
||||
$fee = $invoice->calcGatewayFee($gatewayTypeId, false);
|
||||
$fee = $invoice->calcGatewayFee($gatewayTypeId);
|
||||
|
||||
$item = [];
|
||||
$item['product_key'] = trans('texts.surcharge');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue