Merge pull request #4361 from turbo124/v5-develop

Fix for custom_values breaking invoicesum
This commit is contained in:
David Bomba 2020-11-25 20:54:12 +11:00 committed by GitHub
commit 7f2f9d6faa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 9 deletions

View File

@ -160,16 +160,16 @@ class InvoiceSum
{
$this->total += $this->total_taxes;
if($this->invoice->custom_value1 > 0)
if(is_numeric($this->invoice->custom_value1) && $this->invoice->custom_value1 > 0)
$this->total += $this->invoice->custom_value1;
if($this->invoice->custom_value2 > 0)
if(is_numeric($this->invoice->custom_value2) && $this->invoice->custom_value2 > 0)
$this->total += $this->invoice->custom_value2;
if($this->invoice->custom_value3 > 0)
if(is_numeric($this->invoice->custom_value3) && $this->invoice->custom_value3 > 0)
$this->total += $this->invoice->custom_value3;
if($this->invoice->custom_value4 > 0)
if(is_numeric($this->invoice->custom_value4) && $this->invoice->custom_value4 > 0)
$this->total += $this->invoice->custom_value4;
return $this;

View File

@ -172,16 +172,16 @@ class InvoiceSumInclusive
{
//$this->total += $this->total_taxes;
if($this->invoice->custom_value1 > 0)
if(is_numeric($this->invoice->custom_value1) && $this->invoice->custom_value1 > 0)
$this->total += $this->invoice->custom_value1;
if($this->invoice->custom_value2 > 0)
if(is_numeric($this->invoice->custom_value2) && $this->invoice->custom_value2 > 0)
$this->total += $this->invoice->custom_value2;
if($this->invoice->custom_value3 > 0)
if(is_numeric($this->invoice->custom_value3) && $this->invoice->custom_value3 > 0)
$this->total += $this->invoice->custom_value3;
if($this->invoice->custom_value4 > 0)
if(is_numeric($this->invoice->custom_value4) && $this->invoice->custom_value4 > 0)
$this->total += $this->invoice->custom_value4;
return $this;

View File

@ -128,7 +128,7 @@ class Import implements ShouldQueue
'task_statuses',
'expenses',
'tasks',
'documents',
// 'documents',
];
/**