# How to tie a corrective credit note (or invoice) to its corresponding purchase?

**URL:** https://discuss.tryton.org/t/how-to-tie-a-corrective-credit-note-or-invoice-to-its-corresponding-purchase/5563
**Category:** User
**Created:** [September 26, 2022, 3:17pm UTC](https://discuss.tryton.org/t/how-to-tie-a-corrective-credit-note-or-invoice-to-its-corresponding-purchase/5563 "2022-09-26T15:17:32Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![hobbes](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/h/a698b9/32.png) [@hobbes](https://discuss.tryton.org/u/hobbes)
#### Post date: [September 26, 2022, 3:17pm UTC](https://discuss.tryton.org/t/how-to-tie-a-corrective-credit-note-or-invoice-to-its-corresponding-purchase/5563/1 "2022-09-26T15:17:32Z")

</div>

Hello,

on one of my purchases, the supplier invoiced twice the delivery fee (on separate invoices). Both original invoices are encoded and linked to the purchase, I just manually added the offending delivery fee on the second invoice.

Now I received a corrective credit note, with only a negative delivery fee, but when I encode it in tryton it’s not tied to the purchase.

How can I link it to the purchase so that the history is better documented ?

Thanks

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [September 26, 2022, 3:23pm UTC](https://discuss.tryton.org/t/how-to-tie-a-corrective-credit-note-or-invoice-to-its-corresponding-purchase/5563/2 "2022-09-26T15:23:00Z")

</div>

The links are done by the origin field on the invoice line but it must point to a purchase line. So you do not have such line to point to (just like you did not link the extra delivery fee).  
I think the best you can do is to reconcile this credit note with the supplier invoice and its payment.

---

<div class="post-metadata">

### Author: ![udono](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/udono/32/2114_2.png) [@udono](https://discuss.tryton.org/u/udono)
#### Post date: [September 26, 2022, 6:25pm UTC](https://discuss.tryton.org/t/how-to-tie-a-corrective-credit-note-or-invoice-to-its-corresponding-purchase/5563/3 "2022-09-26T18:25:43Z")

</div>

IMHO we are missing additional links for credit notes. Because a user would expect to see the credit note also on sales/purchases invoices and also having a link on the invoice to the credit note and having a link on the credit note to the invoice.  
As the credit functionality is invoice line based, the link to the invoice could be a one2many to the invoices of the credited lines. What do you think?

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [September 26, 2022, 8:48pm UTC](https://discuss.tryton.org/t/how-to-tie-a-corrective-credit-note-or-invoice-to-its-corresponding-purchase/5563/4 "2022-09-26T20:48:10Z")

</div>

I do not agree. The initial wrong invoice is not linked to any purchase so there is actually not point to link the correction to the purchase anyway. Users can if he wants link the correction with the wrong invoice line like if he had created a credit note from it.

---

<div class="post-metadata">

### Author: ![hobbes](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/h/a698b9/32.png) [@hobbes](https://discuss.tryton.org/u/hobbes)
#### Post date: [September 27, 2022, 9:35am UTC](https://discuss.tryton.org/t/how-to-tie-a-corrective-credit-note-or-invoice-to-its-corresponding-purchase/5563/5 "2022-09-27T09:35:36Z")

</div>

> [@ced](#):
>
> The initial wrong invoice is not linked to any purchase

the initial invoice **is** linked to the purchase through its other lines, only one invoice line is wrong.

I’ll link the correction line to the original faulty line, so history is somehow conserved. I can live with that, but it would be best if that made the credit note appear in the invoices for that purchase. After all, it **is** linked, in reality and in the program.

---

<div class="post-metadata">

### Author: ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)
#### Post date: [October 27, 2022, 9:35am UTC](https://discuss.tryton.org/t/how-to-tie-a-corrective-credit-note-or-invoice-to-its-corresponding-purchase/5563/6 "2022-10-27T09:35:41Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
