Admin can set enterprises to charge or not charge sales tax

This commit is contained in:
Rohan Mitchell
2015-04-08 10:40:38 +10:00
parent 08fef890ec
commit 9bbc151cae
6 changed files with 26 additions and 2 deletions

View File

@@ -77,7 +77,7 @@ class Enterprise < ActiveRecord::Base
after_rollback :restore_permalink
scope :by_name, order('name')
scope :visible, where(:visible => true)
scope :visible, where(visible: true)
scope :confirmed, where('confirmed_at IS NOT NULL')
scope :unconfirmed, where('confirmed_at IS NULL')
scope :activated, where("confirmed_at IS NOT NULL AND sells != 'unspecified'")

View File

@@ -3,8 +3,21 @@
= f.label :abn, 'ABN'
.omega.eight.columns
= f.text_field :abn, { placeholder: "eg. 99 123 456 789"}
.row
.alpha.three.columns
= f.label :acn, 'ACN'
.omega.eight.columns
= f.text_field :acn, { placeholder: "eg. 123 456 789"}
= f.text_field :acn, { placeholder: "eg. 123 456 789"}
.row
.three.columns.alpha
%label= t('charges_sales_tax')
.two.columns
= f.radio_button :charges_sales_tax, true
&nbsp;
= f.label :charges_sales_tax, "Yes", :value => "true"
.five.columns.omega
= f.radio_button :charges_sales_tax, false
&nbsp;
= f.label :charges_sales_tax, "No", :value => "false"