mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Working on payment terms
This commit is contained in:
parent
7636595f7e
commit
5e6fdef935
@ -45,7 +45,7 @@ class FreeCompanySettings extends BaseSettings
|
||||
public $military_time = false;
|
||||
public $payment_number_pattern = '';
|
||||
public $payment_number_counter = 1;
|
||||
public $payment_terms = -1;
|
||||
public $payment_terms = "";
|
||||
public $payment_type_id = '0';
|
||||
public $portal_design_id = '1';
|
||||
public $quote_design_id = 'VolejRejNm';
|
||||
@ -112,7 +112,7 @@ class FreeCompanySettings extends BaseSettings
|
||||
'custom_value4' => 'string',
|
||||
'inclusive_taxes' => 'bool',
|
||||
'name' => 'string',
|
||||
'payment_terms' => 'integer',
|
||||
'payment_terms' => 'string',
|
||||
'payment_type_id' => 'string',
|
||||
'phone' => 'string',
|
||||
'postal_code' => 'string',
|
||||
|
@ -161,11 +161,9 @@ class InvoiceService
|
||||
/* One liners */
|
||||
public function setDueDate()
|
||||
{
|
||||
if($this->invoice->due_date != '')
|
||||
if($this->invoice->due_date != '' || $this->invoice->client->getSetting('payment_terms') == '')
|
||||
return $this;
|
||||
|
||||
//$this->invoice->due_date = Carbon::now()->addDays($this->invoice->client->getSetting('payment_terms'));
|
||||
|
||||
$this->invoice->due_date = Carbon::parse($this->invoice->date)->addDays($this->invoice->client->getSetting('payment_terms'));
|
||||
|
||||
return $this;
|
||||
|
@ -56,7 +56,7 @@ return [
|
||||
'datetime_format_id' => env('DEFAULT_DATETIME_FORMAT_ID', '1'),
|
||||
'locale' => env('DEFAULT_LOCALE', 'en'),
|
||||
'map_zoom' => env('DEFAULT_MAP_ZOOM', 10),
|
||||
'payment_terms' => env('DEFAULT_PAYMENT_TERMS', "-1"),
|
||||
'payment_terms' => env('DEFAULT_PAYMENT_TERMS', ""),
|
||||
'military_time' => env('MILITARY_TIME', 0),
|
||||
'first_day_of_week' => env('FIRST_DATE_OF_WEEK', 0),
|
||||
'first_month_of_year' => env('FIRST_MONTH_OF_YEAR', '2000-01-01')
|
||||
|
Loading…
x
Reference in New Issue
Block a user