CoreBOSBB
Inactive Products - Printable Version

+- CoreBOSBB (https://discussions.corebos.org)
+-- Forum: Support (https://discussions.corebos.org/forumdisplay.php?fid=17)
+--- Forum: Administrator Support (https://discussions.corebos.org/forumdisplay.php?fid=8)
+--- Thread: Inactive Products (/showthread.php?tid=2064)



Inactive Products - radu - 01-05-2021

Is there way to ignore product active validation on a module(invoices for example)? we'd like to use salesorder to control the stock and when the stock is 0 we deactivate the product to prevent further selling of it. But then when you want to generate the invoice from that SO that validation kicks in and prevents invoice generation. I did not see any GV for this, but maybe i'm looking in the wrong place Wink.

Thanks


RE: Inactive Products - Svemar - 01-06-2021

Hi,
Maybe it is better to mark product Inactive from Invoice side by workflow, after the last one has been sold?


RE: Inactive Products - radu - 01-06-2021

(01-06-2021, 11:22 AM)Svemar Wrote: Hi,
Maybe it is better to mark product Inactive from Invoice side by workflow, after the last one has been sold?

Well for us the sale ends with approved SO. Invoices are just the legal end of the transaction, the products really leaves the warehouse before any invoice is issued and we want to avoid overselling before restock right away. So if the SO is approved and the stock hits 0 we want to disable the product in order to avoid it's selection on a quote. But the invoicing of that sales order happens later in the day so by the time the person responsible with the invoice wants to generate the invoice from the salesorder, the validations will complain about the deactivated product and will not save.
It is not a problem, we can avoid that by issuing the invoice before the SO gets accepted(while stock is still positive) but I was examining the option of doing it a more 'proper' way. I wondered if maybe someone else already did that(tinkered with validations against the active state of a product). It is a switch that seems to be buried deep into the application Wink. It's good that you can rely on it making the product not available in most of the places but it would be nicer if i could disable it 'on demand' on some modules like invoices and purchase orders Wink.


RE: Inactive Products - joebordes - 01-13-2021

I had a look at the code. That restriction is hardcode in various parts of the application, so we would have to add a global variable to permit deactivating is when you need to. Don't think that would cost much to do. Send me a message if you need it.

Hint: if you eliminate the `discontinued <> 0` in Popup.php and edit the invoice you may be able to get it working.