print format updating

This commit is contained in:
Yan
2017-06-14 10:15:35 +06:30
parent b133129389
commit b7f1a0a029
6 changed files with 123 additions and 91 deletions

View File

@@ -251,7 +251,7 @@ class Sale < ApplicationRecord
if self.receipt_no.nil?
prefix = DateTime.now().utc
#self.receipt_no = prefix.to_s + "/" + self.shit_id.to_s + "/" + SeedGenerator.new_receipt_no().to_s
self.receipt_no = prefix.strftime("%Y%m%d") + "/" + SeedGenerator.new_receipt_no().to_s
self.receipt_no = prefix.strftime("%Y%m%d") + "-" + SeedGenerator.new_receipt_no().to_s
self.receipt_date = prefix
Rails.logger.debug "Receipt No #{self.receipt_no} | Date #{ self.receipt_date.to_s}"