# Set sales to paid manually?

**URL:** https://discuss.tryton.org/t/set-sales-to-paid-manually/6878
**Category:** User
**Created:** [January 16, 2024, 7:42am UTC](https://discuss.tryton.org/t/set-sales-to-paid-manually/6878 "2024-01-16T07:42:42Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![herrdeh](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/herrdeh/32/821_2.png) [@herrdeh](https://discuss.tryton.org/u/herrdeh)
#### Post date: [January 16, 2024, 7:42am UTC](https://discuss.tryton.org/t/set-sales-to-paid-manually/6878/1 "2024-01-16T07:42:42Z")

</div>

From recent year, a little more than 50 sales remained with the status “payment open” or “partially paid”, although they in fact are paid; invoice status is “paid” in these cases. These sales have been covered by grouped invoices, for some reason payment may only partially have been forwarded from the invoice to the sale.

Can I set payment status of these sales to “paid” manually in the GUI - or is it to be done in the database. And how would I do that?

Thanks a lot in advance, Wolf

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [January 16, 2024, 9:55am UTC](https://discuss.tryton.org/t/set-sales-to-paid-manually/6878/2 "2024-01-16T09:55:40Z")

</div>

Probably there is a draft invoice or something pending of such sales.  
You must cancell such pending invoices and [manage the invoice exception](https://docs.tryton.org/projects/modules-sale/en/latest/usage/process.html#handling-shipment-and-invoice-exceptions) by ignoring the cancelled invoices and the sale will be marked as paid as tryton will understand there is nothing else to be paid.

---

<div class="post-metadata">

### Author: ![herrdeh](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/herrdeh/32/821_2.png) [@herrdeh](https://discuss.tryton.org/u/herrdeh)
#### Post date: [January 16, 2024, 2:43pm UTC](https://discuss.tryton.org/t/set-sales-to-paid-manually/6878/3 "2024-01-16T14:43:58Z")

</div>

> [@pokoli](#):
>
> Probably there is a draft invoice or something pending of such sales.

Unluckily, this is not the case. There sales are _de facto_ completed, meaning paid and delivered. But sales did not learn about all completion steps - for whatever reason.

Cheers,  
Wolf

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [January 16, 2024, 3:06pm UTC](https://discuss.tryton.org/t/set-sales-to-paid-manually/6878/4 "2024-01-16T15:06:37Z")

</div>

Could you describe which is the state of the related invoices and shipments of your sale?

Is there any cancelled sale? There was an issue regarding cancelled sales with had been fixed recently:

> **[Sale and purchase stays in processing state when all lines are cancelled...](https://foss.heptapod.net/tryton/tryton/-/issues/12698)**
>
> When the stock moves and the invoices have been cancelled, the order state stays in processing.

---

<div class="post-metadata">

### Author: ![acaubet](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/acaubet/32/1493_2.png) [@acaubet](https://discuss.tryton.org/u/acaubet)
#### Post date: [January 16, 2024, 3:08pm UTC](https://discuss.tryton.org/t/set-sales-to-paid-manually/6878/5 "2024-01-16T15:08:51Z")

</div>

Apart from Sergi’s suggestion. There are multiple issues open recently about a sale not going to done. Maybe you are affected by one of them.

> **[Set 'cancelled' state on processed sale/purchase in case of every moves or...](https://foss.heptapod.net/tryton/tryton/-/issues/12347)**
>
> When all shipment linked to a sale or purchase are cancelled, sale/purchase state is 'Done' and shipment state is 'Sent'. In such case, state should be...

> **[Shipment state is sent or received when all moves are cancelled (#12697) ·...](https://foss.heptapod.net/tryton/tryton/-/issues/12697)**
>
> This is misleading users to display such state when all the stock moves of an order has been cancelled (and ignored). Instead we should have the state "None"...

> **[Sale and purchase stays in processing state when all lines are cancelled...](https://foss.heptapod.net/tryton/tryton/-/issues/12719)**
>
> When the stock moves and the invoices have been cancelled, the order state stays in processing.

> **[Sale is never finished when product has supply on sale and is not purchasable...](https://foss.heptapod.net/tryton/tryton/-/issues/12721)**
>
> We found a sale, that was never marked as done because it has a product that has the supply on sale value set to 'always' but is not...

> **[Sale is never finished with supply\_on\_sale and shipment cancelled (#12913) ·...](https://foss.heptapod.net/tryton/tryton/-/issues/12913)**
>
> Create a product salable and producible. Set supply\_on\_sale to always. Create a sale, add the product, and process the sale. A production request is...

---

<div class="post-metadata">

### Author: ![herrdeh](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/herrdeh/32/821_2.png) [@herrdeh](https://discuss.tryton.org/u/herrdeh)
#### Post date: [January 18, 2024, 6:53am UTC](https://discuss.tryton.org/t/set-sales-to-paid-manually/6878/6 "2024-01-18T06:53:06Z")

</div>

Hello fellow friends,  
thanks for your care.

here are some examples of my cases:

```auto
331	Awaiting Payment
Shipment state: none 
products: service
collective invoice	paid

353 Awaiting Payment
Shipment state: Sent
product: goods
collective invoice	paid

382	Partially Paid
Shipment state: Sent
product: goods
collective invoice	paid

```

HTH.

There are sales with cancellations as well, but not within the above ones. Well, this actually looks like one ore more bugs.

As it looks many people are afflicted - could we provide a script which goes through sales, checks if deliveries and payments are correct and then corrects the sales status? - Apart from bug fix of course…?

Cheers,  
Wolf
