mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 797188 - Default invoice prints credit note as invoice
Error in guile code. Using (case var (datum ...)) means that datum are symbols, so if datum is (GNC-INVOICE-VEND-INVOICE) it would try (eqv? type 'GNC-INVOICE-VEND-INVOICE) which would never be true. We need (eqv? type GNC-INVOICE-VEND-INVOICE). Using (cond) is more appropriate here.
This commit is contained in:
parent
19bbeaa67a
commit
6e7a4ccc77
@ -787,12 +787,14 @@ for styling the invoice. Please see the exported report for the CSS class names.
|
||||
(orders (if references? (delete-duplicates (map gncEntryGetOrder (gncInvoiceGetEntries invoice))) '()))
|
||||
(cust-doc? (memv type (list GNC-INVOICE-CUST-INVOICE GNC-INVOICE-CUST-CREDIT-NOTE)))
|
||||
(credit-note? (memv type (list GNC-INVOICE-CUST-CREDIT-NOTE GNC-INVOICE-VEND-CREDIT-NOTE GNC-INVOICE-EMPL-CREDIT-NOTE)))
|
||||
(default-title (case type
|
||||
((GNC-INVOICE-VEND-INVOICE)
|
||||
(default-title (cond
|
||||
((eqv? type GNC-INVOICE-VEND-INVOICE)
|
||||
(_ "Bill"))
|
||||
((GNC-INVOICE-EMPL-INVOICE)
|
||||
((eqv? type GNC-INVOICE-EMPL-INVOICE)
|
||||
(_ "Expense Voucher"))
|
||||
((GNC-INVOICE-CUST-CREDIT-NOTE GNC-INVOICE-VEND-CREDIT-NOTE GNC-INVOICE-EMPL-CREDIT-NOTE)
|
||||
((memv type (list GNC-INVOICE-CUST-CREDIT-NOTE
|
||||
GNC-INVOICE-VEND-CREDIT-NOTE
|
||||
GNC-INVOICE-EMPL-CREDIT-NOTE))
|
||||
(_ "Credit Note"))
|
||||
(else
|
||||
(_ "Invoice"))))
|
||||
|
Loading…
Reference in New Issue
Block a user