FORCE DELIVERY Rule Bug - 251e

Whenever bugs are encountered they are quashed and reported. Here you can see their quashings up close.

Moderators: sureshquest, arulmani, trifon

FORCE DELIVERY Rule Bug - 251e

Postby red1 » Thu Aug 26, 2004 6:22 pm

InOutGenerate.java of package org.compiere.process again here...
This time when you choose a FORCE DELIVERY rule in your Sales Order, where the stock may not be there, it should still ship according to that rule. However the code logic doesn't do it - but it is corrected as shown:

// Force
else if (MOrder.DELIVERYRULE_Force.equals(order.getDeliveryRule()))
{
BigDecimal deliver = toDeliver;
//red1 if (deliver.compareTo(onHand) > 0) -- shouldn't compare when Force
//red1 deliver = onHand;
log.debug("generate - Force - OnHand=" + onHand
+ ", ToDeliver=" + toDeliver + ", Deliver=" + deliver + " - " + line);
//
createLine (order, line, deliver, storages);
}
= = = = = = = = = = = = = =
// Inventory Lines
BigDecimal toDeliver = qty;
for (int i = 0; i < storages.length; i++)
{
MStorage storage = storages[i];
// TODO Selection of ASI

BigDecimal deliver = toDeliver;
//red1 if (deliver.compareTo(storage.getQtyOnHand()) > 0)
//red1 deliver = storage.getQtyOnHand(); -- redundant as todeliver was vetted above

====================
the second part is commented out because it is redundant as the TODELIVER variable has been checked previously!
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Return to BUGS Galore!

Who is online

Users browsing this forum: No registered users and 1 guest

cron