add specs
This commit is contained in:
parent
e902aa0d5a
commit
45db0575b1
46 changed files with 714 additions and 238 deletions
|
|
@ -1,4 +1,12 @@
|
|||
module InvoiceHelper
|
||||
|
||||
SEPA_SEQUENCE_TYPES = {
|
||||
FRST: "Erst-Lastschrift",
|
||||
RCUR: "Folge-Lastschrift",
|
||||
OOFF: "Einmalige Lastschrift",
|
||||
FNAL: "Letztmalige Lastschrift"
|
||||
}.freeze
|
||||
|
||||
def generate_invoice_number(instance, count)
|
||||
trailing_number = count.to_s.rjust(4, '0')
|
||||
if GroupOrderInvoice.find_by(invoice_number: instance.invoice_date.strftime("%Y%m%d") + trailing_number) || OrdergroupInvoice.find_by(invoice_number: instance.invoice_date.strftime("%Y%m%d") + trailing_number)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue