Class: MOCO::VatCodePurchase
- Inherits:
-
BaseEntity
- Object
- BaseEntity
- MOCO::VatCodePurchase
- Defined in:
- lib/moco/entities/vat_code_purchase.rb
Overview
Represents a MOCO purchase VAT code (Steuerschlüssel Einkauf) Read-only VAT rates for purchases/receipts
Read-only attributes:
id, code, tax, reverse_charge, intra_eu, active
Filtering:
moco.vat_code_purchases.where(active: true)
moco.vat_code_purchases.where(reverse_charge: true)
moco.vat_code_purchases.where(intra_eu: true)
moco.vat_code_purchases.where(ids: "123,456")
Note:
VAT codes are configured in MOCO's admin interface.
Use vat_code_id when creating purchases/receipts.
Instance Attribute Summary
Attributes inherited from BaseEntity
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from BaseEntity
#==, #association, #destroy, #eql?, #has_many, #hash, #id, #initialize, #inspect, #reload, #save, #to_h, #to_json, #update
Constructor Details
This class inherits a constructor from MOCO::BaseEntity
Class Method Details
.entity_path ⇒ Object
21 22 23 |
# File 'lib/moco/entities/vat_code_purchase.rb', line 21 def self.entity_path "vat_code_purchases" end |
Instance Method Details
#to_s ⇒ Object
25 26 27 |
# File 'lib/moco/entities/vat_code_purchase.rb', line 25 def to_s "#{code} - #{name}" end |