Beautify source code.

This commit is contained in:
trifonnt 2009-08-24 16:25:23 +00:00
parent b1b273aed1
commit d50f0ba6f5
3 changed files with 8 additions and 8 deletions

View File

@ -9,9 +9,9 @@ CREATE OR REPLACE VIEW RV_STORAGE
AS AS
SELECT s.AD_Client_ID, s.AD_Org_ID, SELECT s.AD_Client_ID, s.AD_Org_ID,
-- Product -- Product
s.M_Product_ID,p.Value,p.Name,p.Description,p.UPC,p.SKU, s.M_Product_ID, p.Value,p.Name, p.Description, p.UPC, p.SKU,
p.C_UOM_ID,p.M_Product_Category_ID,p.Classification, p.Weight,p.Volume,p.VersionNo, p.C_UOM_ID, p.M_Product_Category_ID, p.Classification, p.Weight, p.Volume, p.VersionNo,
p.GuaranteeDays,p.GuaranteeDaysMin, p.GuaranteeDays, p.GuaranteeDaysMin,
-- Locator -- Locator
s.M_Locator_ID, l.M_Warehouse_ID, l.X, l.Y, l.Z, s.M_Locator_ID, l.M_Warehouse_ID, l.X, l.Y, l.Z,
-- Storage -- Storage
@ -22,7 +22,10 @@ SELECT s.AD_Client_ID, s.AD_Org_ID,
asi.GuaranteeDate, -- see PAttributeInstance.java asi.GuaranteeDate, -- see PAttributeInstance.java
daysBetween(asi.GuaranteeDate,getdate()) AS ShelfLifeDays, daysBetween(asi.GuaranteeDate,getdate()) AS ShelfLifeDays,
daysBetween(asi.GuaranteeDate,getdate())-p.GuaranteeDaysMin AS GoodForDays, daysBetween(asi.GuaranteeDate,getdate())-p.GuaranteeDaysMin AS GoodForDays,
CASE WHEN COALESCE(p.GuaranteeDays,0)>0 THEN ROUND((daysBetween(asi.GuaranteeDate,getdate())/p.GuaranteeDays)*100,0) ELSE NULL END AS ShelfLifeRemainingPct CASE WHEN COALESCE(p.GuaranteeDays,0)>0
THEN ROUND((daysBetween(asi.GuaranteeDate,getdate())/p.GuaranteeDays)*100,0)
ELSE NULL
END AS ShelfLifeRemainingPct
FROM M_Storage s FROM M_Storage s
INNER JOIN M_Locator l ON (s.M_Locator_ID=l.M_Locator_ID) INNER JOIN M_Locator l ON (s.M_Locator_ID=l.M_Locator_ID)
INNER JOIN M_Product p ON (s.M_Product_ID=p.M_Product_ID) INNER JOIN M_Product p ON (s.M_Product_ID=p.M_Product_ID)

View File

@ -37,7 +37,7 @@ FROM M_Transaction t
LEFT OUTER JOIN M_MovementLine ml ON (t.M_MovementLine_ID=ml.M_MovementLine_ID) LEFT OUTER JOIN M_MovementLine ml ON (t.M_MovementLine_ID=ml.M_MovementLine_ID)
LEFT OUTER JOIN M_InOutLine iol ON (t.M_InOutLine_ID=iol.M_InOutLine_ID) LEFT OUTER JOIN M_InOutLine iol ON (t.M_InOutLine_ID=iol.M_InOutLine_ID)
LEFT OUTER JOIN M_ProductionLine prdl ON (t.M_ProductionLine_ID=prdl.M_ProductionLine_ID) LEFT OUTER JOIN M_ProductionLine prdl ON (t.M_ProductionLine_ID=prdl.M_ProductionLine_ID)
LEFT OUTER JOIN M_ProductionPlan prdp ON (prdl.M_ProductionPlan_ID=prdp.M_ProductionPlan_ID) LEFT OUTER JOIN M_ProductionPlan prdp ON (prdl.M_ProductionPlan_ID=prdp.M_ProductionPlan_ID)
LEFT OUTER JOIN C_ProjectIssue pjl ON (t.C_ProjectIssue_ID=pjl.C_ProjectIssue_ID); LEFT OUTER JOIN C_ProjectIssue pjl ON (t.C_ProjectIssue_ID=pjl.C_ProjectIssue_ID);

View File

@ -34,6 +34,3 @@ WHERE p.IsSummary='N' AND p.IsActive='Y' AND pr.IsActive='Y' AND w.IsActive='Y';
--AND UPPER(p.Value) LIKE ? AND UPPER(p.Name) LIKE ? --AND UPPER(p.Value) LIKE ? AND UPPER(p.Name) LIKE ?
--AND UPPER(p.UPC) LIKE ? AND UPPER(p.SKU) LIKE ? --AND UPPER(p.UPC) LIKE ? AND UPPER(p.SKU) LIKE ?
--ORDER BY QtyAvailable DESC, Margin DESC; --ORDER BY QtyAvailable DESC, Margin DESC;