mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-05 18:52:44 +01:00
recurring
This commit is contained in:
parent
07701779ff
commit
4a4c61f1cf
@ -78,6 +78,9 @@ class CompanySettings extends BaseSettings
|
||||
public $invoice_number_pattern = '';
|
||||
public $invoice_number_counter = 1;
|
||||
|
||||
public $recurring_invoice_number_pattern = '';
|
||||
public $recurring_invoice_number_counter = 1;
|
||||
|
||||
public $quote_number_pattern = '';
|
||||
public $quote_number_counter = 1;
|
||||
|
||||
|
@ -30,23 +30,28 @@ class ApplyNumber extends AbstractService
|
||||
$this->recurring_entity = $recurring_entity;
|
||||
}
|
||||
|
||||
/* Recurring numbers are set when saved */
|
||||
public function run()
|
||||
{
|
||||
if ($this->recurring_entity->number != '') {
|
||||
return $this->recurring_entity;
|
||||
}
|
||||
|
||||
switch ($this->client->getSetting('counter_number_applied')) {
|
||||
case 'when_saved':
|
||||
$this->recurring_entity->number = $this->getNextRecurringInvoiceNumber($this->client);
|
||||
break;
|
||||
case 'when_sent':
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->recurring_entity->number = $this->getNextRecurringInvoiceNumber($this->client);
|
||||
break;
|
||||
}
|
||||
$this->recurring_entity->number = $this->getNextRecurringInvoiceNumber($this->client);
|
||||
|
||||
|
||||
// switch ($this->client->getSetting('counter_number_applied')) {
|
||||
// case 'when_saved':
|
||||
// $this->recurring_entity->number = $this->getNextRecurringInvoiceNumber($this->client);
|
||||
// break;
|
||||
// case 'when_sent':
|
||||
// break;
|
||||
|
||||
// default:
|
||||
// $this->recurring_entity->number = $this->getNextRecurringInvoiceNumber($this->client);
|
||||
// break;
|
||||
// }
|
||||
|
||||
return $this->recurring_entity;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user