1
0
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:
Hillel Coren 2017-01-16 14:06:22 +02:00
parent 7263e87db2
commit 62ae88df87
2 changed files with 14 additions and 0 deletions

View File

@ -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) {

View File

@ -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') !!}