mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 18:34:30 -04:00
Minor fixers
This commit is contained in:
parent
ea00446906
commit
c2037bbfec
@ -122,7 +122,7 @@ class InvoiceSum
|
|||||||
|
|
||||||
private function calculateInvoiceTaxes(): self
|
private function calculateInvoiceTaxes(): self
|
||||||
{
|
{
|
||||||
if (is_string($this->invoice->tax_name1) && strlen($this->invoice->tax_name1) > 1) {
|
if (is_string($this->invoice->tax_name1) && strlen($this->invoice->tax_name1) > 2) {
|
||||||
$tax = $this->taxer($this->total, $this->invoice->tax_rate1);
|
$tax = $this->taxer($this->total, $this->invoice->tax_rate1);
|
||||||
$tax += $this->getSurchargeTaxTotalForKey($this->invoice->tax_name1, $this->invoice->tax_rate1);
|
$tax += $this->getSurchargeTaxTotalForKey($this->invoice->tax_name1, $this->invoice->tax_rate1);
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ class InvoiceSum
|
|||||||
$this->total_tax_map[] = ['name' => $this->invoice->tax_name1.' '.floatval($this->invoice->tax_rate1).'%', 'total' => $tax];
|
$this->total_tax_map[] = ['name' => $this->invoice->tax_name1.' '.floatval($this->invoice->tax_rate1).'%', 'total' => $tax];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_string($this->invoice->tax_name2) && strlen($this->invoice->tax_name2) > 1) {
|
if (is_string($this->invoice->tax_name2) && strlen($this->invoice->tax_name2) > 2) {
|
||||||
$tax = $this->taxer($this->total, $this->invoice->tax_rate2);
|
$tax = $this->taxer($this->total, $this->invoice->tax_rate2);
|
||||||
$tax += $this->getSurchargeTaxTotalForKey($this->invoice->tax_name2, $this->invoice->tax_rate2);
|
$tax += $this->getSurchargeTaxTotalForKey($this->invoice->tax_name2, $this->invoice->tax_rate2);
|
||||||
|
|
||||||
@ -138,7 +138,7 @@ class InvoiceSum
|
|||||||
$this->total_tax_map[] = ['name' => $this->invoice->tax_name2.' '.floatval($this->invoice->tax_rate2).'%', 'total' => $tax];
|
$this->total_tax_map[] = ['name' => $this->invoice->tax_name2.' '.floatval($this->invoice->tax_rate2).'%', 'total' => $tax];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_string($this->invoice->tax_name3) && strlen($this->invoice->tax_name3) > 1) {
|
if (is_string($this->invoice->tax_name3) && strlen($this->invoice->tax_name3) > 2) {
|
||||||
$tax = $this->taxer($this->total, $this->invoice->tax_rate3);
|
$tax = $this->taxer($this->total, $this->invoice->tax_rate3);
|
||||||
$tax += $this->getSurchargeTaxTotalForKey($this->invoice->tax_name3, $this->invoice->tax_rate3);
|
$tax += $this->getSurchargeTaxTotalForKey($this->invoice->tax_name3, $this->invoice->tax_rate3);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user