fixed conflictsale item order order item

This commit is contained in:
Aung Myo
2017-06-04 16:51:38 +06:30
61 changed files with 455 additions and 137 deletions

View File

@@ -1,4 +1,6 @@
class Sale < ApplicationRecord
#primary key - need to be unique generated for multiple shops
#before_create :generate_receipt_no
belongs_to :cashier, :optional => true
belongs_to :customer, :optional => true
@@ -245,4 +247,8 @@ class Sale < ApplicationRecord
end
end
private
def generate_custom_id
self.sale_id = SeedGenerator.generate_id(self.class.name, "SAL")
end
end