[#4177] Changed payment terms to a select.
This commit is contained in:
1 parent
c09d70b9cf
commit
0911ab08d3
3 files changed
+18
-1
No files matched your search
@@ -29,6 +29,19 @@ class Contract < ActiveRecord::Base
|
||||
attr_accessible :po_number
|
||||
attr_accessible :details
|
||||
|
||||
PaymentTerms = {
|
||||
:net_0 => :text_payment_terms_net_0,
|
||||
:net_15 => :text_payment_terms_net_15,
|
||||
:net_30 => :text_payment_terms_net_30,
|
||||
:net_45 => :text_payment_terms_net_45
|
||||
}
|
||||
|
||||
def payment_terms_for_select
|
||||
PaymentTerms.collect {|value, label|
|
||||
[l(label), value]
|
||||
}
|
||||
end
|
||||
|
||||
def after_initialize
|
||||
self.executed = false unless self.executed.present?
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user