mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge pull request #6791 from turbo124/v5-develop
Fixes for recurring schedules and default terms
This commit is contained in:
commit
2efc463653
@ -449,6 +449,10 @@ class RecurringInvoice extends BaseModel
|
|||||||
|
|
||||||
public function calculateDueDate($date)
|
public function calculateDueDate($date)
|
||||||
{
|
{
|
||||||
|
//if nothing is set, assume we are using terms.
|
||||||
|
if(!$this->due_date_days)
|
||||||
|
return $this->calculateDateFromTerms($date);
|
||||||
|
|
||||||
switch ($this->due_date_days) {
|
switch ($this->due_date_days) {
|
||||||
case 'terms':
|
case 'terms':
|
||||||
return $this->calculateDateFromTerms($date);
|
return $this->calculateDateFromTerms($date);
|
||||||
|
@ -452,13 +452,13 @@ class InvoiceService
|
|||||||
if (! $this->invoice->design_id)
|
if (! $this->invoice->design_id)
|
||||||
$this->invoice->design_id = $this->decodePrimaryKey($settings->invoice_design_id);
|
$this->invoice->design_id = $this->decodePrimaryKey($settings->invoice_design_id);
|
||||||
|
|
||||||
if (!isset($this->invoice->footer))
|
if (!isset($this->invoice->footer) || empty($this->invoice->footer))
|
||||||
$this->invoice->footer = $settings->invoice_footer;
|
$this->invoice->footer = $settings->invoice_footer;
|
||||||
|
|
||||||
if (!isset($this->invoice->terms))
|
if (!isset($this->invoice->terms) || empty($this->invoice->terms))
|
||||||
$this->invoice->terms = $settings->invoice_terms;
|
$this->invoice->terms = $settings->invoice_terms;
|
||||||
|
|
||||||
if (!isset($this->invoice->public_notes))
|
if (!isset($this->invoice->public_notes) || empty($this->invoice->public_notes))
|
||||||
$this->invoice->public_notes = $this->invoice->client->public_notes;
|
$this->invoice->public_notes = $this->invoice->client->public_notes;
|
||||||
|
|
||||||
/* If client currency differs from the company default currency, then insert the client exchange rate on the model.*/
|
/* If client currency differs from the company default currency, then insert the client exchange rate on the model.*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user