mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 01:54:35 -04:00
Recurring invoice balance fix
This commit is contained in:
parent
e129419644
commit
c1e080acd5
@ -187,6 +187,18 @@ class InvoiceSum
|
|||||||
return $this->invoice;
|
return $this->invoice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getRecurringInvoice()
|
||||||
|
{
|
||||||
|
|
||||||
|
$this->invoice->amount = $this->formatValue($this->getTotal(), $this->invoice->client->currency()->precision);
|
||||||
|
$this->invoice->total_taxes = $this->getTotalTaxes();
|
||||||
|
$this->invoice->balance = $this->formatValue($this->getTotal(), $this->invoice->client->currency()->precision);
|
||||||
|
|
||||||
|
$this->invoice->save();
|
||||||
|
|
||||||
|
return $this->invoice;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build $this->invoice variables after
|
* Build $this->invoice variables after
|
||||||
* calculations have been performed.
|
* calculations have been performed.
|
||||||
|
@ -174,6 +174,18 @@ class InvoiceSumInclusive
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getRecurringInvoice()
|
||||||
|
{
|
||||||
|
|
||||||
|
$this->invoice->amount = $this->formatValue($this->getTotal(), $this->invoice->client->currency()->precision);
|
||||||
|
$this->invoice->total_taxes = $this->getTotalTaxes();
|
||||||
|
$this->invoice->balance = $this->formatValue($this->getTotal(), $this->invoice->client->currency()->precision);
|
||||||
|
|
||||||
|
$this->invoice->save();
|
||||||
|
|
||||||
|
return $this->invoice;
|
||||||
|
}
|
||||||
|
|
||||||
public function getInvoice()
|
public function getInvoice()
|
||||||
{
|
{
|
||||||
//Build invoice values here and return Invoice
|
//Build invoice values here and return Invoice
|
||||||
|
@ -38,7 +38,7 @@ class RecurringInvoiceRepository extends BaseRepository
|
|||||||
->createInvitations()
|
->createInvitations()
|
||||||
->save();
|
->save();
|
||||||
|
|
||||||
$invoice = $invoice_calc->build()->getInvoice();
|
$invoice = $invoice_calc->build()->getRecurringInvoice();
|
||||||
|
|
||||||
return $invoice;
|
return $invoice;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user