mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Recurring invoice balance fix
This commit is contained in:
parent
e129419644
commit
c1e080acd5
@ -187,6 +187,18 @@ class InvoiceSum
|
||||
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
|
||||
* calculations have been performed.
|
||||
|
@ -174,6 +174,18 @@ class InvoiceSumInclusive
|
||||
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()
|
||||
{
|
||||
//Build invoice values here and return Invoice
|
||||
|
@ -38,7 +38,7 @@ class RecurringInvoiceRepository extends BaseRepository
|
||||
->createInvitations()
|
||||
->save();
|
||||
|
||||
$invoice = $invoice_calc->build()->getInvoice();
|
||||
$invoice = $invoice_calc->build()->getRecurringInvoice();
|
||||
|
||||
return $invoice;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user