ready to release Adempiere331b
This commit is contained in:
parent
d3c61f55ae
commit
4545c71085
|
@ -1,4 +1,4 @@
|
|||
CREATE OR REPLACE VIEW M_PRODUCT_SUBSTITUTERELATE_V AS
|
||||
CREATE OR REPLACE VIEW M_PRODUCT_SUBSTITUTERELATED_V AS
|
||||
SELECT s.AD_Client_ID, s.AD_Org_ID, s.IsActive, s.Created, s.CreatedBy, s.Updated, s.UpdatedBy, s.m_product_id, s.substitute_id, s.description, 'S' AS ROWTYPE, (ms.qtyonhand - ms.qtyreserved) AS qtyavailable, ms.qtyonhand, ms.qtyreserved, mpr.pricestd, mpr.m_pricelist_version_id, mw.m_warehouse_id
|
||||
FROM M_SUBSTITUTE s
|
||||
JOIN M_STORAGE ms ON ms.m_product_id = s.substitute_id
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
CREATE OR REPLACE VIEW M_PRODUCT_SUBSTITUTERELATE_V AS
|
||||
CREATE OR REPLACE VIEW M_PRODUCT_SUBSTITUTERELATED_V AS
|
||||
SELECT s.AD_Client_ID, s.AD_Org_ID, s.IsActive, s.Created, s.CreatedBy, s.Updated, s.UpdatedBy, s.m_product_id, s.substitute_id, s.description, 'S' AS ROWTYPE, (ms.qtyonhand - ms.qtyreserved) AS qtyavailable, ms.qtyonhand, ms.qtyreserved, mpr.pricestd, mpr.m_pricelist_version_id, mw.m_warehouse_id
|
||||
FROM M_SUBSTITUTE s
|
||||
JOIN M_STORAGE ms ON ms.m_product_id = s.substitute_id
|
||||
|
|
|
@ -65,7 +65,7 @@ JOIN M_WAREHOUSE mw ON ml.m_warehouse_id = mw.m_warehouse_id
|
|||
ORDER BY mw.NAME;
|
||||
|
||||
|
||||
CREATE OR REPLACE VIEW M_PRODUCT_SUBSTITUTERELATE_V AS
|
||||
CREATE OR REPLACE VIEW M_PRODUCT_SUBSTITUTERELATED_V AS
|
||||
SELECT s.AD_Client_ID, s.AD_Org_ID, s.IsActive, s.Created, s.CreatedBy, s.Updated, s.UpdatedBy, s.m_product_id, s.substitute_id, s.description, 'S' AS ROWTYPE, (ms.qtyonhand - ms.qtyreserved) AS qtyavailable, ms.qtyonhand, ms.qtyreserved, mpr.pricestd, mpr.m_pricelist_version_id, mw.m_warehouse_id
|
||||
FROM M_SUBSTITUTE s
|
||||
JOIN M_STORAGE ms ON ms.m_product_id = s.substitute_id
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
CREATE OR REPLACE FUNCTION "adempiere"."subtractdays" (in inter interval, in days numeric) RETURNS integer AS
|
||||
$BODY$
|
||||
BEGIN
|
||||
RETURN ( EXTRACT( EPOCH FROM ( inter ) ) / 86400 ) - days;
|
||||
END;
|
||||
$BODY$
|
||||
LANGUAGE 'plpgsql';
|
||||
|
||||
CREATE OPERATOR - (
|
||||
PROCEDURE = subtractdays,
|
||||
LEFTARG = interval,
|
||||
RIGHTARG = numeric,
|
||||
COMMUTATOR = -
|
||||
);
|
||||
|
||||
|
||||
CREATE OR REPLACE FUNCTION "adempiere"."adddays" (in inter interval, in days numeric) RETURNS integer AS
|
||||
$BODY$
|
||||
BEGIN
|
||||
RETURN ( EXTRACT( EPOCH FROM ( inter ) ) / 86400 ) + days;
|
||||
END;
|
||||
$BODY$
|
||||
LANGUAGE 'plpgsql';
|
||||
|
||||
CREATE OPERATOR + (
|
||||
PROCEDURE = adddays,
|
||||
LEFTARG = interval,
|
||||
RIGHTARG = numeric,
|
||||
COMMUTATOR = -
|
||||
);
|
||||
|
||||
ALTER OPERATOR adempiere.+ (interval, numeric) OWNER TO adempiere;
|
Loading…
Reference in New Issue