So, my database has a table for products, where the product amount is also recorded. There is also a transactions table, that looks like this:
In a SALE, it wouldn't make sense for ProductQuantity in the Transactions table to be more then the amount of product in the inventory. To prevent that I have this Before Change macro in place:
The problem is, I want this to aply only when the Purchase/Sale field in the Transactions table is "Sale", not when it is "Purchase". I don't know how to implement that into this macro. Thanks in advance!
In a SALE, it wouldn't make sense for ProductQuantity in the Transactions table to be more then the amount of product in the inventory. To prevent that I have this Before Change macro in place:
The problem is, I want this to aply only when the Purchase/Sale field in the Transactions table is "Sale", not when it is "Purchase". I don't know how to implement that into this macro. Thanks in advance!