Lot links

Geert Janssens geert.gnucash at kobaltwit.be
Sat Nov 14 05:44:35 EST 2015


On Thursday 12 November 2015 18:26:55 Chris Harris wrote:
> Thank you.  I have spent some time trying to understand how I will
> correct these issues.  I have not made any changes yet.  I selected
> the first prepayment that I see.  09-04-2014 for 1200.  When I look in
> the AR account the only payment on that day is for 1000.  There is an
> invoice on 09-01-2014 for 1200.  I opened the .xml file and searched
> for the date.  I only see a single payment of 1000 on that day.  Same
> as I see in the AR account.
> 
> Could you explain how it calculates the prepayment of 1200?  Is there
> anyway I can delete this pre-payment?
> 
> Thank you
> 
Hi Chris,

To figure out where the 1200 pre-payment comes from, you can examine the lots found in your 
AR account. To do so, you can open the Lot Viewer on your AR account.

Each lot ties together an invoice with one or more payments (or a link to another lot in case the 
lot link transactions are still in use). A lot with a zero balance is considered closed. This means 
the invoice amount is balanced by the payments in the lot. Each lot which is not balanced (the 
invoice or part thereof is still unpaid) is called "open". The remaining balance of the lot defines 
the amount of the pre-payment you see in the payment window.

So in your example you should look for an open lot with a net balance of 1200. It's very well 
possible that your 1000 payment is tied into a lot with (part of) another payment for 200.

To get your pre-payments fixed, I'd suggest these additional things:

0. Make a backup of your data file before you start ! So you can always revert to the original 
state if something goes badly wrong (it shouldn't).

1. As already suggested in the previous mail, if you never used credit notes to offset an invoice, 
remove all lot links in your AR account. They will only make the job more complicated. 
Removing these lot links may seem to make matters worse by adding more pre-payments 
and/or unpaid invoices. That's a good thing however, as these would be more difficult to spot 
otherwise.

2. In case you have this option enabled, disable it while correcting payments:
Edit->Preferences->Business->Process Payment on posting for Invoices and/or Bills

3. Unless you made mistakes while entering your data (that is the transactions you have 
entered don't match your paper trail of invoices and payments), you should not have to alter 
any of the real transactions directly. It should suffice to fix up the lot associations only, be it 
directly or indirectly.
With directly I mean by manipulating the lots via the lot viewer. This is an advanced method 
and I would recommend to use it only if no indirect method can help.
Indirectly means by using the "Assign as payment" menu option, or by opening the payment 
dialog and select one or more invoices and payments that belong together.

4. Follow the instructions in the link [1]. Topic 7 on this page explicitly deals with correcting 
payments that got assigned to the wrong invoices.

To return to your example:
You say you find a payment transaction for 1000 on 09-04-2014. For which invoice was this ? 
Find this invoice, unpost and repost it. This should ensure that no more (other) payments are 
associated with this invoice.
Next in the AR register, select the payment transaction for 1000 on 09-04-2014 and choose 
"Assign as payment" from the menu (or context menu by right-clicking). Enter the customer, 
select the right invoice and click Ok. That should fix the payment for this particular invoice and 
most likely will also alter the list of pre-payments/unpaid invoices that will show for this 
customer. From there, re-evaluate the state of the pre-payments and re-iterate as often as 
necessary.

Note that the "Assign as payment" method can only be used when the invoice is paid with one 
single payment. If you have invoices that have been paid in part, you will probably have to:
1. make sure the correct payments or partial payments are not assigned to another invoice 
(unpost and repost that particular invoice if they are)
2. Open the Process Payment dialog for your customers
3. Select the customer
4. Select the correct invoice with it's payments or partial payments, adjust the amount to match 
the total payment and click ok.

Will this get you going ?

Regards,

Geert

[1] http://wiki.gnucash.org/wiki/Correcting_Business_Transaction_Mistakes
> On Tue, Nov 10, 2015 at 11:00 AM, Geert Janssens
> 
> <geert.gnucash at kobaltwit.be> wrote:
> > On Sunday 08 November 2015 17:05:35 Chris Harris wrote:
> >> I am currently using the latest version 2.6.9  I have used the
> >> business functions for many years.  Many of my invoices show
> >> prepayments, although no customer has ever made a prepayment.  They
> >> have made partial payments.  I have run the check and repair
> >> several
> >> times.  If I view the lots in my a/r account, there are many
> >> entries.
> > 
> > "Pre-payment" is used as a general term meaning a payment that is
> > not
> > associated with any invoice (yet).
> > Having many lots is not a sign of trouble in itself. It is normal to
> > have many lots in your a/r account. Even without lot link
> > transactions, each payment gets put into a lot together with the
> > invoice it pays.
> > 
> > Unfortunately check & repair has only limited capabilities to
> > correct
> > superfluous use of lot link transactions. So it may be necessary to
> > manually correct some invoice/payment relations.
> > 
> >> While researching this I read a comment that these are not needed
> >> unless you offset an invoice with a credit note.
> > 
> > That's true in the strictest sense. However if they *were* used to
> > record a given payment, removing the lot link transaction will also
> > break the only link gnucash has between the invoice and the payment.
> > 
> >> So my question is,
> >> Is it OK for me to manually delete all of the lot links?  Will this
> >> mark my old invoices as unpaid?
> > 
> > It will mark your old invoices as unpaid and will create a lot of
> > pre- payments as well.
> > 
> > That may be the first step to clean up though as from there on you
> > can re-assign the "pre-payments" properly to your invoices again.
> > 
> > For more info on how to deal with lot link transactions post 2.6.6,
> > look at this wiki page:
> > 
> > Regards,
> > 
> > Geert



More information about the gnucash-user mailing list