Beautify source code.
This commit is contained in:
parent
b1b273aed1
commit
d50f0ba6f5
|
@ -9,9 +9,9 @@ CREATE OR REPLACE VIEW RV_STORAGE
|
|||
AS
|
||||
SELECT s.AD_Client_ID, s.AD_Org_ID,
|
||||
-- Product
|
||||
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.GuaranteeDays,p.GuaranteeDaysMin,
|
||||
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.GuaranteeDays, p.GuaranteeDaysMin,
|
||||
-- Locator
|
||||
s.M_Locator_ID, l.M_Warehouse_ID, l.X, l.Y, l.Z,
|
||||
-- Storage
|
||||
|
@ -22,7 +22,10 @@ SELECT s.AD_Client_ID, s.AD_Org_ID,
|
|||
asi.GuaranteeDate, -- see PAttributeInstance.java
|
||||
daysBetween(asi.GuaranteeDate,getdate()) AS ShelfLifeDays,
|
||||
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
|
||||
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)
|
||||
|
|
|
@ -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_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_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);
|
||||
|
||||
|
||||
|
|
|
@ -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.UPC) LIKE ? AND UPPER(p.SKU) LIKE ?
|
||||
--ORDER BY QtyAvailable DESC, Margin DESC;
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue