mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-30 19:52:20 +01:00
(bug) fix invoice reference
This commit is contained in:
parent
50276f5b41
commit
2840c93823
@ -21,6 +21,10 @@ class Order < PaymentDocument
|
|||||||
|
|
||||||
delegate :user, to: :statistic_profile
|
delegate :user, to: :statistic_profile
|
||||||
|
|
||||||
|
def generate_reference(_date = DateTime.current)
|
||||||
|
self.reference = PaymentDocumentService.generate_order_number(self)
|
||||||
|
end
|
||||||
|
|
||||||
def footprint_children
|
def footprint_children
|
||||||
order_items
|
order_items
|
||||||
end
|
end
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
class PaymentDocument < Footprintable
|
class PaymentDocument < Footprintable
|
||||||
self.abstract_class = true
|
self.abstract_class = true
|
||||||
|
|
||||||
def generate_reference
|
def generate_reference(date = DateTime.current)
|
||||||
self.reference = PaymentDocumentService.generate_order_number(self)
|
self.reference = PaymentDocumentService.generate_reference(self, date: date)
|
||||||
end
|
end
|
||||||
|
|
||||||
def update_reference
|
def update_reference
|
||||||
|
Loading…
x
Reference in New Issue
Block a user