ERPNext Foundation ERPNext Cloud Chat Blog Discuss Frappé* Donate

Allocate credit note / debit note to another sales invoice / purchase invoice


#1

Hello,
In my company there is a policy that credit note will be allocated to another invoice. This is the full scenario.

  1. Customer buy and receive sales invoice
  2. Customer wants to return some goods so credit note is released
  3. Previously credit note issued will be allocated to another sales invoice (same with advance payment allocation)

This scenario also aplied in debit note.

How can I do this in ERPNext ?

Thank you


#2

When you make return to related invoices…then debit/credit note is issued for those invoices…
Via payment entry, on receive/pay from/to parties then these credit/debit notes will appear to deduct payable/receivable


#3

Found this in older thread :


#4

Yap, the credit note surely will deduct receivable and ERPNext could to this flawlessly. But in my case the issued credit become the basis for the company to make new invoice. In other words the amount of credit note will become the “advance payment amount” and we can allocate it for another invoice.
Is it possible to do this in ERPNext ?


#5

Given the possibilities, I will share these scenarios, and how we are resolving them.

Scenario 1 - Payment to customer in full for total return

  1. Customer buys and receives a sales invoice.
    2.Customer pays and leaves.
  2. A day later customer comes back to return full items
  3. Credit note is issued for invoice.
  4. Payment back to customer is registered against the party Customer

Scenario 1.a - Payment to customer in full for partial return

  1. Customer buys and receives a sales invoice.
  2. Customer pays and leaves.
  3. A day later customer comes back for a partial return of items
  4. Credit note is issued for invoice, for amount of items returned
  5. Payment to customer is registered against the party Customer, for partial amount returned

Scenario 1.b.full - Store credit for total return, credit used in full

  1. Customer buys and receives a sales invoice
  2. Customer pays and leaves
  3. A day later customer comes back to return full items
  4. Credit note is issued for invoice
  5. Customer is issued store credit only, thus no payment to customer is registered
  6. Customer returns to use his credit
  7. New sales invoice is issued for full credit amount. No payment is required against new sales invoice.
  8. No credit remains

Scenario 1.b.partial - Store credit for total return, credit used partially

  1. Customer buys and receives a sales invoice
  2. Customer pays and leaves
  3. A day later customer comes back to return full items
  4. Credit note is issued for invoice.
  5. Customer is issued store credit only, thus no payment to customer is registered.
  6. Customer returns to use his credit, partially
  7. New sales invoice is issued for items, the amount being a partial portion of the available credit amount. No payment is required against new sales invoice
  8. Remaining Credit is pending use by customer.

Scenario 1.c.full - Store credit for partial return, credit used in full

  1. Customer buys and receives a sales invoice
  2. Customer pays and leaves
  3. A day later customer comes back for a partial return of items
  4. Credit note is issued for invoice, for return amount
  5. Customer is issued store credit only, thus no payment to customer is registered
  6. Customer returns to use his credit in full
  7. New sales invoice is issued for full credit amount. No payment is required against new sales invoice.
  8. No credit remains

Scenario 1.c.partial - Store credit for partial return, credit used partially

  1. Customer buys and receives a sales invoice
  2. Customer pays and leaves
  3. A day later customer comes back for a partial return of items
  4. Credit note is issued for invoice, for return amount
  5. Customer is issued store credit only, thus no payment to customer is registered
  6. Customer returns to use his credit, partially
  7. New sales invoice is issued for items, the amount being a partial portion of the available credit amount. No payment is required against new sales invoice
  8. Remaining Credit is pending use by customer.

The problem arises when Scenario 1.b.partial and scenario 1.c.partial occur.

At some point, you must cancel this debt in favor of your customer.

  1. Customer can come to use his remaining credit after one instance of using store credit

  2. Customer never returns

A scenario of the customer never returning can be dealt with in two ways, depending on your company policy:
A. Money is returned to your customer, for which you issue a payment for him in return.
B. A company policy dictates that credit in customer’s favor must be used by end of fiscal year

Thus we are left with scenario B, where customer never returned, repayment is not possible, and you must issue an invoice, in our case, legally required to be linked to a previously generated invoice, and thus we use Debit note to cancel the remaining credit without items sold or services rendered.

All scenarios before “B” can be dealt simply with Sales Invoice, Payment Entry and Credit Note or Sales Invoice Return.

Debit note is also used by us in scenarios where the Sales Invoice was issued with lesser amounts than what were supposed to be charged. Given that this invoice has been electronically signed in our case, it is legally inmutable, and thus a Debit note is issued, linked to the original invoice, for the items or amounts necessary to correct the error. This Debit note ensures accounting is precise.

For any valid invoice, we have added a Debit Note button, so that when pressed, the Sales Invoice is left as valid, and a new “Amended” Sales invoice is created, which changes the numbering series to the pre-configured Debit Note series. A link to the original Sales Invoice is kept, similar to when you use ERPNext’s Cancel>Amend>Save>Validate workflow. The Cancel button has been disabled, so that the only possible routes are to create a Credit Note or Debit Note

I will post the github code later.


#6

@danu @Tropicalrambler

Have same query:

  • Sales invoice raised, items taken
  • Customer returns few days later to swap partial item on invoice
  • Return against delivery note completed
  • Credit note created against original invoice - credit of $79 for item returned
  • new invoice created for replacement item totaling $89 - no advanced payment option to allocate the $79 credit from prior?
  • Payment entry made against new invoice of $10 - states unpaid amount of $79, which I cannot allocate from the credit note…

I was able to create a journal entry per below, with party being the customer with credit, which allows the figure to be used in Advanced Payment - however not certain if this is the correct thing to do. Only thing I can see which might be an issue is the cost center is used against the credit entry…

Anyone able to advise?

Seems there was a Github issue created to sort this credit note > advanced payment issue out by @umair https://github.com/frappe/erpnext/issues/12846





#7

Hello,

I have a similar problem: my clients purchase stock and we issue sales invoice, the invoice is then paid and closed (with the payment entry it appears with status Paid in green), then some part of the stock is returned to us and we issue credit note to the invoice related to this purchase. It is essential that the credit note is linked to its related invoice in the system because it is required by the local legislation.The customer then buys stock again and we issue the next sales invoice. However the payment that we receive is for the amount of the second invoice and the credit note related to the first invoice NET.

How is it possible to link the second payment to the second invoice and the credit note?
My objective is to show that all balances are closed and that the credit note is linked to the first invoice and that the second payment closes the second invoice together with the credit note in order to have a reliable trade receivables report (for aging analysis).

I tried to do use JE but I am not able to change the status of the invoices to Paid with it.

Thank you all for the help