metasfresh / metasfresh

We do Open Source ERP - Fast, Flexible & Free Software to scale your Business.
http://metasfresh.com/en
GNU General Public License v2.0
1.74k stars 592 forks source link

Don't allow narcotics in Trade (Sales & Purchase) #5071

Closed TheBestPessimist closed 5 years ago

TheBestPessimist commented 5 years ago

Is this a bug or feature request?

FR

What is the current behavior?

Currently the narcotics permissions are not handled.

Which are the steps to reproduce?

-

What is the expected or desired behavior?

Raw concept:
Abstract

Atm, BPartner has ShipmentPermissionPharma and ReceiptPermissionPharma dropdowns which can take values like A (Type A), B (Type B). ShipmentPermissionPharma is for when we are selling to that customer. ReceiptPermissionPharma is for when we are buying from that vendor.

Type A means that BPartner is allowed to sell/buy RX(prescription) products. Type B means that BPartner is NOT allowed to sell/buy RX products.

In M_Product we have a flag for "RX/prescription product" and also we have a flag for "is narcotic product" (Betäubungsmittel).

TODO: Introduce Type C: Introduce Type C which allows BPartner to buy/sell narcotic products. Type C includes Type A, i.e. RX products.

IMPORTANT: Make sure

if a product is flagged as RX product and also as Narcotic BPartner ShipmentPermissionPharma/ReceiptPermissionPharma is Type A then that partner is not allowed to buy/sell that product. Only with Type C it would be allowed. TODO: Make sure importing the Product's Narcotic flag (Betäubungsmittel) works TODO: Make sure nobody can set the Type C To dev test it, just update it in database.

metas-dh commented 5 years ago

IT documented in https://github.com/metasfresh/me03/issues/1270