fixes for token gateways

This commit is contained in:
David Bomba 2021-12-28 21:34:53 +11:00
parent b4f375d877
commit cd592f7080
3 changed files with 7 additions and 6 deletions

View File

@ -24,7 +24,7 @@ class AddGatewayFee extends AbstractService
{
private $company_gateway;
private $invoice;
public $invoice;
private $amount;
@ -61,7 +61,7 @@ class AddGatewayFee extends AbstractService
private function cleanPendingGatewayFees()
{
$invoice_items = $this->invoice->line_items;
$invoice_items = (array)$this->invoice->line_items;
$invoice_items = collect($invoice_items)->filter(function ($item) {
return $item->type_id != '3';
@ -92,7 +92,7 @@ class AddGatewayFee extends AbstractService
$invoice_item->tax_rate3 = $fees_and_limits->fee_tax_rate3;
}
$invoice_items = $this->invoice->line_items;
$invoice_items = (array)$this->invoice->line_items;
$invoice_items[] = $invoice_item;
$this->invoice->line_items = $invoice_items;
@ -122,7 +122,7 @@ class AddGatewayFee extends AbstractService
$invoice_item->tax_rate3 = $fees_and_limits->fee_tax_rate3;
}
$invoice_items = $this->invoice->line_items;
$invoice_items = (array)$this->invoice->line_items;
$invoice_items[] = $invoice_item;
$this->invoice->line_items = $invoice_items;

View File

@ -403,7 +403,7 @@ class HtmlEngine
$data['$product.tax_name2'] = ['value' => '', 'label' => ctrans('texts.tax')];
$data['$product.tax_name3'] = ['value' => '', 'label' => ctrans('texts.tax')];
$data['$product.line_total'] = ['value' => '', 'label' => ctrans('texts.line_total')];
$data['$product.gross_line_total'] = ['value' => '', 'label' => ctrans('texts.line_total')];
$data['$product.gross_line_total'] = ['value' => '', 'label' => ctrans('texts.gross_line_total')];
$data['$product.description'] = ['value' => '', 'label' => ctrans('texts.description')];
$data['$product.unit_cost'] = ['value' => '', 'label' => ctrans('texts.unit_cost')];
$data['$product.product1'] = ['value' => '', 'label' => $this->helpers->makeCustomField($this->company->custom_fields, 'product1')];
@ -423,7 +423,7 @@ class HtmlEngine
$data['$task.tax_name2'] = ['value' => '', 'label' => ctrans('texts.tax')];
$data['$task.tax_name3'] = ['value' => '', 'label' => ctrans('texts.tax')];
$data['$task.line_total'] = ['value' => '', 'label' => ctrans('texts.line_total')];
$data['$task.gross_line_total'] = ['value' => '', 'label' => ctrans('texts.line_total')];
$data['$task.gross_line_total'] = ['value' => '', 'label' => ctrans('texts.gross_line_total')];
$data['$task.service'] = ['value' => '', 'label' => ctrans('texts.service')];
$data['$task.task1'] = ['value' => '', 'label' => $this->helpers->makeCustomField($this->company->custom_fields, 'task1')];
$data['$task.task2'] = ['value' => '', 'label' => $this->helpers->makeCustomField($this->company->custom_fields, 'task2')];

View File

@ -4352,6 +4352,7 @@ $LANG = array(
'payment_type_Bancontact' => 'Bancontact',
'payment_type_BECS' => 'BECS',
'payment_type_ACSS' => 'ACSS',
'gross_line_total' => 'Gross line total',
);
return $LANG;