mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 20:52:56 +01:00
Enable setting default payment terms
This commit is contained in:
parent
7263e87db2
commit
62ae88df87
@ -52,6 +52,19 @@ class AccountPresenter extends Presenter
|
||||
return $this->entity->size ? $this->entity->size->name : '';
|
||||
}
|
||||
|
||||
public function paymentTerms()
|
||||
{
|
||||
$terms = $this->entity->payment_terms;
|
||||
|
||||
if ($terms == 0) {
|
||||
return '';
|
||||
} elseif ($terms == -1) {
|
||||
$terms = 0;
|
||||
}
|
||||
|
||||
return trans('texts.payment_terms_net') . ' ' . $terms;
|
||||
}
|
||||
|
||||
public function dueDatePlaceholder()
|
||||
{
|
||||
if ($this->entity->payment_terms == 0) {
|
||||
|
@ -127,6 +127,7 @@
|
||||
->fromQuery($languages, 'name', 'id') !!}
|
||||
{!! Former::select('payment_terms')->addOption('','')
|
||||
->fromQuery($paymentTerms, 'name', 'num_days')
|
||||
->placeholder($account->present()->paymentTerms)
|
||||
->help(trans('texts.payment_terms_help')) !!}
|
||||
{!! Former::select('size_id')->addOption('','')
|
||||
->fromQuery($sizes, 'name', 'id') !!}
|
||||
|
Loading…
Reference in New Issue
Block a user