Customer sales order line with quantity in certain increments

bpm

(Thomas Dejager) #1

Could anyone provide some assistance on a BPM that addresses the final scenario.
I have one specific customer who is required to place orders for part(s) that must be in increments of 25 piece quantity. So I think it’s a BPM which needs to kick out a stop message when they’re inputting a quantity of 16 for a qualified part number, telling them it must be a quantity of 25 for this part.
Thanks.


(Daryl Hewison) #2

We had a BPM running which checked for order increment and brought up a form with buttons to raise or lower to the required nearest increment. It worked well, though the need for it has now gone away.

But it sounds like something simpler will do the job for you unless you need to bear in mind scaling this later (will there be other customers with similar requirements, and will the increments be the same?).

A pre-processing BPM, with a conditional that checks the customer, the part and the quantity, and raises an exception if the increment is wrong, would do it. Cleanest would be on SalesOrder.ChangeSellingQuantity, but it can be easier to make such checks reliable on SalesOrder.Update, though the downside is that the user only knows of the problem when they save in that case.


(James McKinnon) #3

We do something similar, our customer pricing is based on an estimated quantity that reflects setup etc but customer frequently orders less which should cost more. How we manage it is that we put the minimum order quantity on a price list as a price break for the customer for that part. Price list is applied to the customer. We have a bpm on sales order .update pre-processing that looks for the existence of a price break on an active price list for that customer for that part. If it finds it and the order quantity is below moq it stops.

Person placing the order has the option to check the override pricelist check box on the sale order entry screen - they should put a higher price in but can place the order at the same price as the lowest price break - I had logic that prevented this but was asked to turn it off.

Key point this only works for the parts/customers that we apply a price break to. If no moq is specified it processes as per standard functionality.


(Thomas Dejager) #4

Thank you for the responses.
James, we wouldn’t be able to tie this into our existing customer price list but I get what you’re doing. Daryl’s would likely work. I’m curious how you would write out the criteria - I understand how to add the criteria for customer # and part #, but wasn’t sure how to type in the 3rd criteria: “order qty” / 50 = has to equal a whole number.


(Daryl Hewison) #5

There may be a cleaner way of doing it, but we opted for a little bit of custom code:

var thisOrderDtl = (from row in ttOrderDtl where row.RowMod == "U" || row.RowMod == "A" select row).FirstOrDefault();

if (thisOrderDtl != null)
{
		var partRow = (from row in Db.Part where row.Company == Session.CompanyID && row.PartNum == thisOrderDtl.PartNum select row).FirstOrDefault();
		if (partRow != null && partRow.OrderIncr_c > 0)
		{
				if ((thisOrderDtl.SellingQuantity % partRow.OrderIncr_c) > 0)
				{
						callContextBpmData.Number01 = partRow.OrderIncr_c;
						callContextBpmData.ShortChar02 = thisOrderDtl.LineDesc;
				}
		}
}

from there it’s a simple conditional to check whether callContextBpmData.Number01 > 0. You can miss out some of this if it’s only one customer and always the same amount, but you can see the principle, I think.