lib/invoice_bar/engine.rb in invoice_bar-0.0.8 vs lib/invoice_bar/engine.rb in invoice_bar-0.0.9
- old
+ new
@@ -58,11 +58,10 @@
def self.expense_receipt_number(n)
@@expense_receipt_number.call(n)
end
def self.default_number(n)
- t = Time.now
- number = "#{t.year}#{t.month}#{self.with_zeros(n)}"
+ number = "#{Time.now.strftime("%Y%m")}#{self.with_zeros(n)}"
number
end
def self.with_zeros(n)
length = n.to_s.length