As we all know, while creating any transaction in Sage X3, we can enter quantity and price manually in detail line as per the requirement. But one of our client wanted to restrict the creation of the Sales/Purchase Invoice Transactions if the user is trying to enter ‘0’ in Gross/Net Price and Quantity fields. Even after creation of the transaction if user is trying to update the price and quantity fields in the detail line, it should not allow user to enter ‘0’ in those fields.
For this purpose, we have added validation on price and quantity fields for those particular transactions.
Now, we will check the working of this validation with an example of the Purchase Invoice transaction. Refer below screenshot.
As you can see, we are trying to create purchase invoice entry with ‘0’ quantity. When we enter ‘0’ in quantity field, pop-up message is getting generated – “Invoiced qty. should not be 0”. It will not allow user to proceed further until he/she enters quantity other than zero.
Now, we will check the same functionality for Net Price field in Purchase Invoice screen.
As you can see, similarly we are trying to create purchase invoice entry with ‘0’ net price. When we enter ‘0’ in net price field, pop-up message is getting generated – “Net Price should not be 0”. It will not allow user to proceed further until he/she enters net price other than zero.
After creating invoice entry, it will not even allow user to modify/save the entry with ‘0’ quantity and ‘0’ Net Price. User has to enter some value in those fields other than zero.
Same validation will be applied on quantity and Gross Price fields in Sales Invoice screen.
In this way, validation will be applied on Gross/Net Price and Qty fields in Sales/Purchase Invoice transactions and transactions will be restricted until user enters value other than ‘0’ in Price and Qty fields.