clean up invoice calculations - exclusive taxes (#3000)
This commit is contained in:
parent
e2284132ec
commit
03eb26a6db
2 changed files with 5 additions and 4 deletions
|
|
@ -256,7 +256,7 @@ class InvoiceItemSum
|
|||
if($item_tax_rate3_total > 0)
|
||||
$this->groupTax($this->item->tax_name3, $this->item->tax_rate3, $item_tax_rate3_total);
|
||||
|
||||
\Log::error($this->item->tax_name1. " ". $this->item->line_total." ". $this->invoice->discount." ". $this->sub_total. " ".$amount. " ". $item_tax);
|
||||
//\Log::error($this->item->tax_name1. " ". $this->item->line_total." ". $this->invoice->discount." ". $this->sub_total. " ".$amount. " ". $item_tax);
|
||||
}
|
||||
|
||||
$this->setTotalTaxes($item_tax);
|
||||
|
|
|
|||
|
|
@ -173,7 +173,8 @@ class InvoiceSum
|
|||
{
|
||||
//Build invoice values here and return Invoice
|
||||
$this->setCalculatedAttributes();
|
||||
|
||||
$this->invoice->save();
|
||||
|
||||
return $this->invoice;
|
||||
}
|
||||
|
||||
|
|
@ -233,8 +234,8 @@ class InvoiceSum
|
|||
|
||||
public function setTaxMap()
|
||||
{
|
||||
// if($this->invoice->is_amount_discount == true)
|
||||
// $this->invoice_items->calcTaxesWithAmountDiscount();
|
||||
if($this->invoice->is_amount_discount == true)
|
||||
$this->invoice_items->calcTaxesWithAmountDiscount();
|
||||
|
||||
$this->tax_map = collect();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue