Skip to content

Commit 8846ff4

Browse files
[test-engine-extras] add invoice IDs to test invoices
1 parent 5f70178 commit 8846ff4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

bindings/guile/test/test-engine-extras.scm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,7 @@
524524

525525
;; inv-1 is generated for a customer
526526
(inv-1 (let ((inv-1 (gncInvoiceCreate (gnc-get-current-book))))
527+
(gncInvoiceSetID inv-1 "0001")
527528
(gncInvoiceSetOwner inv-1 owner-1)
528529
(gncInvoiceSetNotes inv-1 "inv-1-notes")
529530
(gncInvoiceSetBillingID inv-1 "inv-1-billing-id")
@@ -542,6 +543,7 @@
542543

543544
;; inv-2 is generated from a customer's job
544545
(inv-2 (let ((inv-2 (gncInvoiceCreate (gnc-get-current-book))))
546+
(gncInvoiceSetID inv-2 "0002")
545547
(gncInvoiceSetOwner inv-2 owner-2)
546548
(gncInvoiceSetNotes inv-2 "inv-2-notes")
547549
(gncInvoiceSetCurrency inv-2 USD)
@@ -561,6 +563,7 @@
561563

562564
;; inv-3 is generated from a vendor
563565
(inv-3 (let ((inv-3 (gncInvoiceCreate (gnc-get-current-book))))
566+
(gncInvoiceSetID inv-3 "0003")
564567
(gncInvoiceSetOwner inv-3 owner-3)
565568
(gncInvoiceSetNotes inv-3 "inv-3-notes")
566569
(gncInvoiceSetCurrency inv-3 USD)
@@ -578,30 +581,35 @@
578581

579582
;; inv-4 is generated for an employee
580583
(inv-4 (let ((inv-4 (gncInvoiceCreate (gnc-get-current-book))))
584+
(gncInvoiceSetID inv-4 "0004")
581585
(gncInvoiceSetOwner inv-4 owner-4)
582586
(gncInvoiceSetNotes inv-4 "inv-4-notes")
583587
(gncInvoiceSetCurrency inv-4 USD)
584588
inv-4))
585589

586590
;; inv-5 cust-credit-note
587591
(inv-5 (let ((inv-5 (gncInvoiceCopy inv-1)))
592+
(gncInvoiceSetID inv-5 "0005")
588593
(gncInvoiceSetIsCreditNote inv-5 #t)
589594
(gncInvoiceSetCurrency inv-5 USD)
590595
inv-5))
591596

592597
;; inv-6 vend-credit-note
593598
(inv-6 (let ((inv-6 (gncInvoiceCopy inv-3)))
599+
(gncInvoiceSetID inv-6 "0006")
594600
(gncInvoiceSetIsCreditNote inv-6 #t)
595601
(gncInvoiceSetCurrency inv-6 USD)
596602
inv-6))
597603

598604
;; inv-7 emp-credit-note
599605
(inv-7 (let ((inv-7 (gncInvoiceCopy inv-4)))
606+
(gncInvoiceSetID inv-7 "0007")
600607
(gncInvoiceSetIsCreditNote inv-7 #t)
601608
(gncInvoiceSetCurrency inv-7 USD)
602609
inv-7))
603610

604611
(inv-8 (let ((inv-8 (gncInvoiceCreate (gnc-get-current-book))))
612+
(gncInvoiceSetID inv-8 "0008")
605613
(gncInvoiceSetOwner inv-8 owner-1)
606614
(gncInvoiceSetCurrency inv-8 USD)
607615
inv-8))

0 commit comments

Comments
 (0)