Skip to content

Commit

Permalink
Use TaxStatus active flag in UI
Browse files Browse the repository at this point in the history
  • Loading branch information
steveblamey committed Nov 13, 2020
1 parent 924e72a commit 993ed20
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
{input type='hidden' attribute='id' }
{include file='elements/auditfields.tpl' }
{input type='text' attribute='description' class="compulsory" }
{input type='checkbox' attribute='active' class="compulsory" }
{input type='checkbox' attribute='apply_tax' class="compulsory" }
{input type='checkbox' label='EU Tax' attribute='eu_tax' class="compulsory" }
{input type='checkbox' label='PVA' attribute='postponed_vat_accounting' class="compulsory" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ public function _new()
$supplier->cb_account_id = $cbaccount->{$cbaccount->idField};
}

$taxstatus = new TaxStatus();
$taxstatuses = $taxstatus->get_active_tax_statuses();

$this->view->set('f_taxstatuses', $taxstatuses);

$this->view->set('bank_account', $supplier->cb_account_id);
$this->view->set('bank_accounts', $this->getbankAccounts($supplier->id));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@
{select attribute='payment_term_id' }
{select attribute='payment_type_id' }
{if $action=='new' }
{select attribute='tax_status_id' }
{select attribute='tax_status_id' options=$f_taxstatuses}
{else}
{if $transaction_count == 0}
{select attribute='tax_status_id' }
{select attribute='tax_status_id' options=$f_taxstatuses}
{else}
{view_data attribute='tax_status_id'}
{/if}
{/if}
{select attribute='delivery_term_id' }
Expand Down

0 comments on commit 993ed20

Please sign in to comment.