mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Fix for import
This commit is contained in:
parent
7e908ef776
commit
af86d1e69f
@ -60,7 +60,7 @@ class BaseTransformer
|
||||
if ($code) {
|
||||
$currency = $this->maps['currencies']->where('code', $code)->first();
|
||||
|
||||
if ($currency_id) {
|
||||
if ($currency) {
|
||||
return $currency->id;
|
||||
}
|
||||
}
|
||||
|
@ -43,16 +43,17 @@ class AddGatewayFee extends AbstractService
|
||||
{
|
||||
$gateway_fee = round($this->company_gateway->calcGatewayFee($this->amount, $this->gateway_type_id, $this->invoice->uses_inclusive_taxes), $this->invoice->client->currency()->precision);
|
||||
|
||||
if ((int)$gateway_fee == 0) {
|
||||
if ((int)$gateway_fee == 0)
|
||||
return $this->invoice;
|
||||
}
|
||||
|
||||
// Removes existing stale gateway fees
|
||||
$this->cleanPendingGatewayFees();
|
||||
|
||||
if ($gateway_fee > 0) {
|
||||
// If a gateway fee is > 0 insert the line item
|
||||
if ($gateway_fee > 0)
|
||||
return $this->processGatewayFee($gateway_fee);
|
||||
}
|
||||
|
||||
// If we have reached this far, then we are apply a gateway discount
|
||||
return $this->processGatewayDiscount($gateway_fee);
|
||||
}
|
||||
|
||||
|
@ -376,6 +376,10 @@ class InvoiceService
|
||||
$this->invoice->terms = $settings->invoice_terms;
|
||||
}
|
||||
|
||||
if(!isset($this->invoice->public_notes)) {
|
||||
$this->invoice->public_notes = $settings->public_notes;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user