1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-18 07:52:23 +01:00

(bug) fix invoice reference

This commit is contained in:
Du Peng 2022-09-09 10:43:44 +02:00
parent 50276f5b41
commit 2840c93823
2 changed files with 6 additions and 2 deletions

View File

@ -21,6 +21,10 @@ class Order < PaymentDocument
delegate :user, to: :statistic_profile
def generate_reference(_date = DateTime.current)
self.reference = PaymentDocumentService.generate_order_number(self)
end
def footprint_children
order_items
end

View File

@ -4,8 +4,8 @@
class PaymentDocument < Footprintable
self.abstract_class = true
def generate_reference
self.reference = PaymentDocumentService.generate_order_number(self)
def generate_reference(date = DateTime.current)
self.reference = PaymentDocumentService.generate_reference(self, date: date)
end
def update_reference