Class: RussianInvoices::CertificateOfCompletion
- Defined in:
- app/models/russian_invoices/certificate_of_completion.rb
Instance Attribute Summary collapse
-
#customer_address ⇒ Object
Returns the value of attribute customer_address.
-
#customer_inn ⇒ Object
Returns the value of attribute customer_inn.
-
#customer_kpp ⇒ Object
Returns the value of attribute customer_kpp.
-
#customer_name ⇒ Object
Returns the value of attribute customer_name.
-
#from_date ⇒ Object
Returns the value of attribute from_date.
-
#goods ⇒ Object
Returns the value of attribute goods.
-
#nds ⇒ Object
Returns the value of attribute nds.
-
#number ⇒ Object
Returns the value of attribute number.
-
#performer_address ⇒ Object
Returns the value of attribute performer_address.
-
#performer_inn ⇒ Object
Returns the value of attribute performer_inn.
-
#performer_kpp ⇒ Object
Returns the value of attribute performer_kpp.
-
#performer_name ⇒ Object
Returns the value of attribute performer_name.
-
#performer_signature ⇒ Object
Returns the value of attribute performer_signature.
-
#performer_stamp ⇒ Object
Returns the value of attribute performer_stamp.
-
#summ ⇒ Object
Returns the value of attribute summ.
Instance Method Summary collapse
Methods inherited from BaseModel
create, #initialize, #landscape?, #persisted?, #save, #save!
Constructor Details
This class inherits a constructor from RussianInvoices::BaseModel
Instance Attribute Details
#customer_address ⇒ Object
Returns the value of attribute customer_address.
3 4 5 |
# File 'app/models/russian_invoices/certificate_of_completion.rb', line 3 def customer_address @customer_address end |
#customer_inn ⇒ Object
Returns the value of attribute customer_inn.
3 4 5 |
# File 'app/models/russian_invoices/certificate_of_completion.rb', line 3 def customer_inn @customer_inn end |
#customer_kpp ⇒ Object
Returns the value of attribute customer_kpp.
3 4 5 |
# File 'app/models/russian_invoices/certificate_of_completion.rb', line 3 def customer_kpp @customer_kpp end |
#customer_name ⇒ Object
Returns the value of attribute customer_name.
3 4 5 |
# File 'app/models/russian_invoices/certificate_of_completion.rb', line 3 def customer_name @customer_name end |
#from_date ⇒ Object
Returns the value of attribute from_date.
3 4 5 |
# File 'app/models/russian_invoices/certificate_of_completion.rb', line 3 def from_date @from_date end |
#goods ⇒ Object
Returns the value of attribute goods.
3 4 5 |
# File 'app/models/russian_invoices/certificate_of_completion.rb', line 3 def goods @goods end |
#nds ⇒ Object
Returns the value of attribute nds.
3 4 5 |
# File 'app/models/russian_invoices/certificate_of_completion.rb', line 3 def nds @nds end |
#number ⇒ Object
Returns the value of attribute number.
3 4 5 |
# File 'app/models/russian_invoices/certificate_of_completion.rb', line 3 def number @number end |
#performer_address ⇒ Object
Returns the value of attribute performer_address.
3 4 5 |
# File 'app/models/russian_invoices/certificate_of_completion.rb', line 3 def performer_address @performer_address end |
#performer_inn ⇒ Object
Returns the value of attribute performer_inn.
3 4 5 |
# File 'app/models/russian_invoices/certificate_of_completion.rb', line 3 def performer_inn @performer_inn end |
#performer_kpp ⇒ Object
Returns the value of attribute performer_kpp.
3 4 5 |
# File 'app/models/russian_invoices/certificate_of_completion.rb', line 3 def performer_kpp @performer_kpp end |
#performer_name ⇒ Object
Returns the value of attribute performer_name.
3 4 5 |
# File 'app/models/russian_invoices/certificate_of_completion.rb', line 3 def performer_name @performer_name end |
#performer_signature ⇒ Object
Returns the value of attribute performer_signature.
3 4 5 |
# File 'app/models/russian_invoices/certificate_of_completion.rb', line 3 def performer_signature @performer_signature end |
#performer_stamp ⇒ Object
Returns the value of attribute performer_stamp.
3 4 5 |
# File 'app/models/russian_invoices/certificate_of_completion.rb', line 3 def performer_stamp @performer_stamp end |
#summ ⇒ Object
Returns the value of attribute summ.
3 4 5 |
# File 'app/models/russian_invoices/certificate_of_completion.rb', line 3 def summ @summ end |
Instance Method Details
#nds_summ ⇒ Object
17 18 19 |
# File 'app/models/russian_invoices/certificate_of_completion.rb', line 17 def nds_summ (total_summ * nds / 100).round(2) end |
#total_summ ⇒ Object
13 14 15 |
# File 'app/models/russian_invoices/certificate_of_completion.rb', line 13 def total_summ goods.sum{ |good| good[:quantity]*good[:price] }.round(2) end |