Invoices: Update as a "Purchase"?

How exactly does in the Invoice module relate to purchases?

I would assume that when an Invoice is marked as “Paid” it would create a “Purchase”

On my install, it doesn’t seem to do that…

What exactly do “Purchases” do in this whole system?

I don’t see that module in my system. Could it be a custom module, or some module you’ve renamed?

It’s not custom, no. It’s not actually a module. as I understand it. It’s a sub-panel that shows up when you create a product. Once you create a product, it shows up under that specific product.

From what I gather, it’s there to track the number of that specific product that has been sold. From what I have read it should update the number sold for that product when an Invoice is marked “Paid” that contains that product.

Ah ok, I know what you mean now, thanks.

The data for that subpanel comes from this SQL query:

I think the part most relevant to you is this: aos_quotes.stage = 'Closed Accepted'

This is related to the values coming from this dropdown (see Admin / Dropdown Editor):


Note that if you don’t like the string Closed Accepted you can change its display label, but you should leave the Item name as it was, so that the value is stored in the database in the way that the above query expects it to.

Once you fix that, you will need to re-save records to make sure they have “close accepted” in the database.

It would be nice if that “close accepted” wasn’t hard-coded into the query, but hey :man_shrugging: maybe somebody will fix that one day…