[ 2031000 ] Detail Order Distribution Report

http://sourceforge.net/tracker/index.php?func=detail&aid=2031000&group_id=176962&atid=879335
This commit is contained in:
vpj-cd 2008-07-29 05:27:44 +00:00
parent b2d47f1f71
commit 6aa7c87454
5 changed files with 2344 additions and 2 deletions

View File

@ -564,7 +564,7 @@ public class DistributionRun extends SvrProcess
+"SELECT rl.M_DistributionRun_ID, rl.M_DistributionRunLine_ID,ll.M_DistributionList_ID, ll.M_DistributionListLine_ID, " +"SELECT rl.M_DistributionRun_ID, rl.M_DistributionRunLine_ID,ll.M_DistributionList_ID, ll.M_DistributionListLine_ID, "
+"rl.AD_Client_ID,rl.AD_Org_ID, rl.IsActive, rl.Created,rl.CreatedBy, rl.Updated,rl.UpdatedBy, " +"rl.AD_Client_ID,rl.AD_Org_ID, rl.IsActive, rl.Created,rl.CreatedBy, rl.Updated,rl.UpdatedBy, "
+"ll.C_BPartner_ID, ll.C_BPartner_Location_ID, rl.M_Product_ID, ll.Ratio, " +"ll.C_BPartner_ID, ll.C_BPartner_Location_ID, rl.M_Product_ID, ll.Ratio, "
+"ol.PickedQty AS MinQty , 0 FROM M_DistributionRunLine rl " +"ol.TargetQty AS MinQty , 0 FROM M_DistributionRunLine rl "
+"INNER JOIN M_DistributionList l ON (rl.M_DistributionList_ID=l.M_DistributionList_ID) " +"INNER JOIN M_DistributionList l ON (rl.M_DistributionList_ID=l.M_DistributionList_ID) "
+"INNER JOIN M_DistributionListLine ll ON (rl.M_DistributionList_ID=ll.M_DistributionList_ID) " +"INNER JOIN M_DistributionListLine ll ON (rl.M_DistributionList_ID=ll.M_DistributionList_ID) "
+"INNER JOIN DD_Order o ON (o.C_BPartner_ID=ll.C_BPartner_ID) " +"INNER JOIN DD_Order o ON (o.C_BPartner_ID=ll.C_BPartner_ID) "
@ -833,7 +833,7 @@ public class DistributionRun extends SvrProcess
line.setIsInvoiced(false); line.setIsInvoiced(false);
line.setProduct(product); line.setProduct(product);
line.setQty(detail.getActualAllocation()); line.setQty(detail.getActualAllocation());
line.setPickedQty(detail.getActualAllocation()); line.setTargetQty(detail.getActualAllocation());
line.setQtyEntered(detail.getActualAllocation()); line.setQtyEntered(detail.getActualAllocation());
line.setConfirmedQty(detail.getActualAllocation()); line.setConfirmedQty(detail.getActualAllocation());
//line.setQty(detail.getActualAllocation()); //line.setQty(detail.getActualAllocation());

View File

@ -0,0 +1,25 @@
--DROP VIEW RV_DD_ORDERDETAIL;
CREATE OR REPLACE VIEW RV_DD_ORDERDETAIL AS
SELECT l.AD_Client_ID, l.AD_Org_ID,
l.IsActive, l.Created, l.CreatedBy, l.Updated, l.UpdatedBy,
o.C_Order_ID, o.DocStatus, o.DocAction, o.C_DocType_ID, o.IsApproved, --o.IsCreditApproved,
o.SalesRep_ID,
o.IsDropShip,
o.AD_User_ID,
o.POReference,
o.IsSOTrx,
l.C_Campaign_ID, l.C_Project_ID, l.C_Activity_ID,
--l.C_ProjectPhase_ID, l.C_ProjectTask_ID,
l.DD_OrderLine_ID, l.DateOrdered, l.DatePromised, l.M_Product_ID, l.M_Locator_ID,l.M_LocatorTo_ID,
l.M_AttributeSetInstance_ID, productAttribute(l.M_AttributeSetInstance_ID) AS ProductAttribute,
l.M_AttributeSetInstanceTo_ID, productAttribute(l.M_AttributeSetInstanceTo_ID) AS ProductAttributeTo,
pasi.M_AttributeSet_ID, pasi.M_Lot_ID, pasi.GuaranteeDate, pasi.Lot, pasi.SerNo,
l.C_UOM_ID, l.QtyEntered, l.QtyOrdered, l.QtyReserved, l.QtyDelivered, l.Confirmedqty, l.Qtyintransit, l.TargetQty,
l.QtyOrdered-l.QtyDelivered AS QtyToDeliver
FROM DD_Order o
INNER JOIN DD_OrderLine l ON (o.DD_Order_ID=l.DD_Order_ID)
LEFT OUTER JOIN M_AttributeSetInstance pasi ON (l.M_AttributeSetInstance_ID=pasi.M_AttributeSetInstance_ID)
LEFT OUTER JOIN M_AttributeSetInstance pasito ON (l.M_AttributeSetInstanceTo_ID=pasito.M_AttributeSetInstance_ID);

View File

@ -0,0 +1,25 @@
--DROP VIEW RV_DD_ORDERDETAIL;
CREATE OR REPLACE VIEW RV_DD_ORDERDETAIL AS
SELECT l.AD_Client_ID, l.AD_Org_ID,
l.IsActive, l.Created, l.CreatedBy, l.Updated, l.UpdatedBy,
o.C_Order_ID, o.DocStatus, o.DocAction, o.C_DocType_ID, o.IsApproved, --o.IsCreditApproved,
o.SalesRep_ID,
o.IsDropShip,
o.AD_User_ID,
o.POReference,
o.IsSOTrx,
l.C_Campaign_ID, l.C_Project_ID, l.C_Activity_ID,
--l.C_ProjectPhase_ID, l.C_ProjectTask_ID,
l.DD_OrderLine_ID, l.DateOrdered, l.DatePromised, l.M_Product_ID, l.M_Locator_ID,l.M_LocatorTo_ID,
l.M_AttributeSetInstance_ID, productAttribute(l.M_AttributeSetInstance_ID) AS ProductAttribute,
l.M_AttributeSetInstanceTo_ID, productAttribute(l.M_AttributeSetInstanceTo_ID) AS ProductAttributeTo,
pasi.M_AttributeSet_ID, pasi.M_Lot_ID, pasi.GuaranteeDate, pasi.Lot, pasi.SerNo,
l.C_UOM_ID, l.QtyEntered, l.QtyOrdered, l.QtyReserved, l.QtyDelivered, l.Confirmedqty, l.Qtyintransit, l.TargetQty,
l.QtyOrdered-l.QtyDelivered AS QtyToDeliver
FROM DD_Order o
INNER JOIN DD_OrderLine l ON (o.DD_Order_ID=l.DD_Order_ID)
LEFT OUTER JOIN M_AttributeSetInstance pasi ON (l.M_AttributeSetInstance_ID=pasi.M_AttributeSetInstance_ID)
LEFT OUTER JOIN M_AttributeSetInstance pasito ON (l.M_AttributeSetInstanceTo_ID=pasito.M_AttributeSetInstance_ID);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff