commit
79cfb63de8
|
|
@ -1 +1 @@
|
||||||
5.11.19
|
5.11.20
|
||||||
|
|
@ -108,7 +108,7 @@ class InvoiceItemSumInclusive
|
||||||
private $sub_total;
|
private $sub_total;
|
||||||
|
|
||||||
private $tax_collection;
|
private $tax_collection;
|
||||||
|
7
|
||||||
private bool $calc_tax = false;
|
private bool $calc_tax = false;
|
||||||
|
|
||||||
private Client | Vendor $client;
|
private Client | Vendor $client;
|
||||||
|
|
@ -272,7 +272,11 @@ class InvoiceItemSumInclusive
|
||||||
|
|
||||||
$this->item->tax_amount = $this->formatValue($item_tax, $this->currency->precision);
|
$this->item->tax_amount = $this->formatValue($item_tax, $this->currency->precision);
|
||||||
|
|
||||||
$this->item->net_cost = round(($amount - $this->item->tax_amount)/$this->item->quantity, $this->currency->precision);
|
try{
|
||||||
|
$this->item->net_cost = round(($amount - $this->item->tax_amount)/$this->item->quantity, $this->currency->precision);
|
||||||
|
} catch (\DivisionByZeroError $e) {
|
||||||
|
$this->item->net_cost = $this->item->cost;
|
||||||
|
}
|
||||||
|
|
||||||
$this->setTotalTaxes($this->formatValue($item_tax, $this->currency->precision));
|
$this->setTotalTaxes($this->formatValue($item_tax, $this->currency->precision));
|
||||||
|
|
||||||
|
|
@ -407,8 +411,12 @@ class InvoiceItemSumInclusive
|
||||||
|
|
||||||
$this->item->tax_amount = $item_tax;
|
$this->item->tax_amount = $item_tax;
|
||||||
|
|
||||||
$this->item->net_cost = round($amount * (100 / (100 + ($this->item->tax_rate1+$this->item->tax_rate2+$this->item->tax_rate3))) / $this->item->quantity, $this->currency->precision+1);
|
try{
|
||||||
$this->item->net_cost = round($this->item->net_cost, $this->currency->precision);
|
$this->item->net_cost = round($amount * (100 / (100 + ($this->item->tax_rate1+$this->item->tax_rate2+$this->item->tax_rate3))) / $this->item->quantity, $this->currency->precision+1);
|
||||||
|
$this->item->net_cost = round($this->item->net_cost, $this->currency->precision);
|
||||||
|
} catch (\DivisionByZeroError $e) {
|
||||||
|
$this->item->net_cost = $this->item->cost;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@ return [
|
||||||
'require_https' => env('REQUIRE_HTTPS', true),
|
'require_https' => env('REQUIRE_HTTPS', true),
|
||||||
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
||||||
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
||||||
'app_version' => env('APP_VERSION', '5.11.19'),
|
'app_version' => env('APP_VERSION', '5.11.20'),
|
||||||
'app_tag' => env('APP_TAG', '5.11.19'),
|
'app_tag' => env('APP_TAG', '5.11.20'),
|
||||||
'minimum_client_version' => '5.0.16',
|
'minimum_client_version' => '5.0.16',
|
||||||
'terms_version' => '1.0.1',
|
'terms_version' => '1.0.1',
|
||||||
'api_secret' => env('API_SECRET', false),
|
'api_secret' => env('API_SECRET', false),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue