[GNC-dev] gnucash maint: [new-owner-report] invoice->payments displays lot links
Christopher Lam
christopher.lck at gmail.com
Tue Dec 24 03:22:15 EST 2019
I'd forgotten to fix the commit message before push. I've added proper
commit message on the github web interface.
I think I've managed to make a decent new-owner-report now.
invoice->lot->splits whereby split->parent is TXN-TYPE-LINK are now queried
differently to TXN-TYPE-PAYMENT. These LINK splits will find their peer
splits whereby the number sign is opposite, and peer->posting-split is then
rendered in the right-hand-side. The result is Invoices offset with a
Credit Note will show the actual Credit-Note, and vice versa. Multiple
invoices offset with multiple credit notes will show all opposing documents.
See the sample complex invoice<->credit-note report. In this sample book:
* 2 invoices of $100 were offset with 2 credit notes of $100, in 1 lot-link
spanning 4 APAR splits.
* 1 invoice $100 with 1 credit note $100 via lot-link spanning 2 APAR
splits.
* 1 invoice $80 is unpaid/outstanding.
* 1 credit-note of $80 is refunded from bank via a regular txn-type-payment
transfer.
Partial payments/offsets are also rendered appropriately.
On Tue, 24 Dec 2019 at 08:06, Geert Janssens <geert.gnucash at kobaltwit.be>
wrote:
> Op dinsdag 24 december 2019 04:57:43 CET schreef Christopher Lam:
> > - TXN-TYPE-LINK lot-splits are rendered as a generic 'Offset
> > Documents' link to lot-link splits. This helps link invoice to the
> > link transaction to locate the corresponding credit-note. It is not
> > possible to link to the corresponding credit-note because a
> > link-transaction can group many invoices to many credit-notes.
>
> Each lot link transaction split will be in a lot if it's offsetting
> another
> invoice or credit note. Can't you query that lot for the invoice or credit
> note if you want to add links to these in your report ?
>
> Geert
>
>
>
-------------- next part --------------
Customer Report: [1]Cust-Links
myname
myaddress
24/12/19
Cust-Links
c
c
Date Range: 01/01/19 - 24/12/19
Date Due Date Reference Type Description Credits Debits Balance Date
Type Details Amount
22/12/19 22/12/19 000014 [2]Credit Note cn-1 $100.00 -$100.00 22/12/19
Invoice inv-2 [3]$100.00
22/12/19 Invoice inv-1 [4]$100.00
22/12/19 22/12/19 000015 [5]Credit Note cn-2 $100.00 -$200.00 22/12/19
Invoice inv-2 [6]$100.00
22/12/19 Invoice inv-1 [7]$100.00
22/12/19 22/12/19 000012 [8]Invoice inv-1 $100.00 -$100.00 22/12/19
Credit Note cn-2 [9]-$100.00
22/12/19 Credit Note cn-1 [10]-$100.00
22/12/19 22/12/19 000013 [11]Invoice inv-2 $100.00 $0.00 22/12/19
Credit Note cn-2 [12]-$100.00
22/12/19 Credit Note cn-1 [13]-$100.00
23/12/19 23/12/19 000018 [14]Credit Note CN$80 $80.00 -$80.00 24/12/19
Invoice inv$80 [15]$80.00
23/12/19 23/12/19 000017 [16]Invoice INV100 $100.00 $20.00 24/12/19
Credit Note CN$100 [17]-$100.00
24/12/19 24/12/19 000019 [18]Invoice inv$80 $80.00 $100.00 23/12/19
Credit Note CN$80 [19]-$80.00
24/12/19 24/12/19 000020 [20]Credit Note CN$100 $100.00 $0.00 23/12/19
Invoice INV100 [21]$100.00
Period Totals $380.00 $380.00 $0.00
Total Due $0.00
Prepayments Current 0-30 days 31-60 days 61-90 days 91+ days Total
$0.00 $0.00 $0.00 $0.00 $0.00 $0.00 $0.00
References
1. gnccustomer:customer=817374f473b442e884ad833e504c99b7
2. gncinvoice:invoice=9e681e687df9402c997af2557a12fd9b
3. gnc-register:split-guid=021ed91fc7654a719fe60f1a7276c548
4. gnc-register:split-guid=d8070e9358144929943df243616e73d6
5. gncinvoice:invoice=a394ec51c0a94bdc897e7fd827c707da
6. gnc-register:split-guid=021ed91fc7654a719fe60f1a7276c548
7. gnc-register:split-guid=d8070e9358144929943df243616e73d6
8. gncinvoice:invoice=4c6da4e9b24f45dab7cdb0d3a8c025dd
9. gnc-register:split-guid=09fb28937df447b2a356b3cb379517ea
10. gnc-register:split-guid=badd6d5d5243406fab4a5f7ab728c30f
11. gncinvoice:invoice=129f8503d8064bf1b5340a6081929b03
12. gnc-register:split-guid=09fb28937df447b2a356b3cb379517ea
13. gnc-register:split-guid=badd6d5d5243406fab4a5f7ab728c30f
14. gncinvoice:invoice=045ee1db22b34050a540b40b26b8adc8
15. gnc-register:split-guid=84ee10b9037d48c884f7906bf8b404a6
16. gncinvoice:invoice=accf45442e954483a302c296ad86bfa7
17. gnc-register:split-guid=1389d96b9b09482f9d1de6c897e9d5ed
18. gncinvoice:invoice=2085a53892204c7da0f9b46786b97bf2
19. gnc-register:split-guid=55707ac7644a4a9d874e8e236452c5c9
20. gncinvoice:invoice=c49480d747a74c29953fbd4f535738f4
21. gnc-register:split-guid=6f36d6cc25d94a53b15704fac6dea984
More information about the gnucash-devel
mailing list