mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for invoice item calcs
This commit is contained in:
parent
8d9d0f2eed
commit
a4c3ab58fc
@ -399,8 +399,11 @@ class InvoiceItemSum
|
||||
|
||||
$item_tax = 0;
|
||||
|
||||
//$amount = $this->item->line_total - ($this->item->line_total * ($this->invoice->discount / $this->sub_total));
|
||||
$amount = ($this->sub_total > 0) ? $this->item->line_total - ($this->invoice->discount * ($this->item->line_total / $this->sub_total)) : 0;
|
||||
// $amount = $this->item->line_total - ($this->item->line_total * ($this->invoice->discount / $this->sub_total));
|
||||
if($this->invoice->discount > 0)
|
||||
$amount = ($this->sub_total > 0) ? $this->item->line_total - ($this->invoice->discount * ($this->item->line_total / $this->sub_total)) : 0;
|
||||
else
|
||||
$amount = $this->item->line_total - ($this->item->line_total * ($this->invoice->discount / $this->sub_total));
|
||||
|
||||
$item_tax_rate1_total = $this->calcAmountLineTax($this->item->tax_rate1, $amount);
|
||||
|
||||
|
@ -108,7 +108,8 @@ class DirectDebit implements MethodInterface
|
||||
$response = $this->go_cardless->gateway->billingRequests()->create([
|
||||
"params" => [
|
||||
"mandate_request" => [
|
||||
"currency" => auth()->guard('contact')->user()->client->currency()->code
|
||||
"currency" => auth()->guard('contact')->user()->client->currency()->code,
|
||||
"verify" => "recommended"
|
||||
]
|
||||
]
|
||||
]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user