Fix error for sales and purchase order validation