Class: Caboose::StoreConfig
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Caboose::StoreConfig
- Defined in:
- app/models/caboose/store_config.rb
Constant Summary collapse
- WEIGHT_UNIT_METRIC =
'g'
- WEIGHT_UNIT_IMPERIAL =
'oz'
- LENGTH_UNIT_METRIC =
'cm'
- LENGTH_UNIT_IMPERIAL =
'in'
- PAYMENT_PROCESSOR_AUTHNET =
'authnet'
- PAYMENT_PROCESSOR_STRIPE =
'stripe'
Instance Method Summary collapse
Instance Method Details
#next_invoice_number ⇒ Object
61 62 63 64 65 |
# File 'app/models/caboose/store_config.rb', line 61 def next_invoice_number x = Invoice.where("invoice_number is not null").reorder("invoice_number desc").limit(1).first return x.invoice_number + 1 if x return self.starting_invoice_number end |