diff --git a/app/Export/CSV/InvoiceItemExport.php b/app/Export/CSV/InvoiceItemExport.php index fdaceae88c..31c144d2f2 100644 --- a/app/Export/CSV/InvoiceItemExport.php +++ b/app/Export/CSV/InvoiceItemExport.php @@ -147,7 +147,12 @@ class InvoiceItemExport extends BaseExport if(str_contains($key, "item.")){ $key = str_replace("item.", "", $key); - $item_array[$key] = $item->{$key}; + + if(property_exists($item, $key)) + $item_array[$key] = $item->{$key}; + else + $item_array[$key] = ''; + } } diff --git a/app/Models/CompanyGateway.php b/app/Models/CompanyGateway.php index 5fc15f2a6d..68c5ef318d 100644 --- a/app/Models/CompanyGateway.php +++ b/app/Models/CompanyGateway.php @@ -301,11 +301,6 @@ class CompanyGateway extends BaseModel $fee = $this->calcGatewayFee($amount, $gateway_type_id); - // if ($fee > 0) { - // $fee = Number::formatMoney(round($fee, 2), $client); - // $label = ' - '.$fee.' '.ctrans('texts.fee'); - // } - if($fee > 0) { $fees_and_limits = $this->fees_and_limits->{$gateway_type_id};