this is necessary to support the change in PostgreSQL from use Integer in _ID to use Numeric(10,0) AS Oracle
This commit is contained in:
parent
c75006fd69
commit
d9a841cff3
|
@ -0,0 +1,79 @@
|
|||
/************* bomPriceLimit Alias *******************/
|
||||
CREATE OR REPLACE FUNCTION bomPriceLimit (M_Product_ID NUMERIC, M_PriceList_Version_ID INTEGER)
|
||||
RETURNS NUMERIC AS $$
|
||||
BEGIN
|
||||
RETURN bomPriceLimit(ID(M_Product_ID),M_PriceList_Version_ID);
|
||||
END;
|
||||
$$ LANGUAGE plpgsql VOLATILE;
|
||||
|
||||
CREATE OR REPLACE FUNCTION bomPriceLimit (M_Product_ID NUMERIC, M_PriceList_Version_ID NUMERIC)
|
||||
RETURNS NUMERIC AS $$
|
||||
BEGIN
|
||||
RETURN bomPriceLimit(ID(M_Product_ID),ID(M_PriceList_Version_ID));
|
||||
END;
|
||||
$$ LANGUAGE plpgsql VOLATILE;
|
||||
|
||||
/************* bomPriceList *******************/
|
||||
CREATE OR REPLACE FUNCTION bomPriceList (M_Product_ID NUMERIC, M_PriceList_Version_ID INTEGER)
|
||||
RETURNS NUMERIC AS $$
|
||||
BEGIN
|
||||
RETURN bomPriceList(ID(M_Product_ID),M_PriceList_Version_ID);
|
||||
END;
|
||||
$$ LANGUAGE plpgsql VOLATILE;
|
||||
|
||||
CREATE OR REPLACE FUNCTION bomPriceList (M_Product_ID NUMERIC, M_PriceList_Version_ID NUMERIC)
|
||||
RETURNS NUMERIC AS $$
|
||||
BEGIN
|
||||
RETURN bomPriceList(ID(M_Product_ID),ID(M_PriceList_Version_ID));
|
||||
END;
|
||||
$$ LANGUAGE plpgsql VOLATILE;
|
||||
|
||||
/************* bomPriceStd *******************/
|
||||
CREATE OR REPLACE FUNCTION bomPriceStd (M_Product_ID NUMERIC, M_PriceList_Version_ID INTEGER)
|
||||
RETURNS NUMERIC AS $$
|
||||
BEGIN
|
||||
RETURN bomPriceStd(ID(M_Product_ID),M_PriceList_Version_ID);
|
||||
END;
|
||||
$$ LANGUAGE plpgsql VOLATILE;
|
||||
|
||||
CREATE OR REPLACE FUNCTION bomPriceStd (M_Product_ID NUMERIC, M_PriceList_Version_ID NUMERIC)
|
||||
RETURNS NUMERIC AS $$
|
||||
BEGIN
|
||||
RETURN bomPriceStd(ID(M_Product_ID),ID(M_PriceList_Version_ID));
|
||||
END;
|
||||
$$ LANGUAGE plpgsql VOLATILE;
|
||||
|
||||
/************* bomQtyAvailable *******************/
|
||||
CREATE OR REPLACE FUNCTION bomQtyAvailable (M_Product_ID NUMERIC, M_Warehouse_ID INTEGER, M_Locator_ID INTEGER)
|
||||
RETURNS NUMERIC AS $$
|
||||
BEGIN
|
||||
RETURN bomQtyAvailable(ID(M_Product_ID),M_Warehouse_ID,M_Locator_ID);
|
||||
END;
|
||||
$$ LANGUAGE plpgsql VOLATILE;
|
||||
|
||||
|
||||
/************* bomQtyOnHand *******************/
|
||||
CREATE OR REPLACE FUNCTION bomQtyOnHand (M_Product_ID NUMERIC, M_Warehouse_ID INTEGER, M_Locator_ID INTEGER)
|
||||
RETURNS NUMERIC AS $$
|
||||
BEGIN
|
||||
RETURN bomQtyOnHand(ID(M_Product_ID),M_Warehouse_ID,M_Locator_ID);
|
||||
END;
|
||||
$$ LANGUAGE plpgsql VOLATILE;
|
||||
|
||||
|
||||
/************* bomQtyOrdered *******************/
|
||||
CREATE OR REPLACE FUNCTION bomQtyOrdered (M_Product_ID NUMERIC, M_Warehouse_ID INTEGER, M_Locator_ID INTEGER)
|
||||
RETURNS NUMERIC AS $$
|
||||
BEGIN
|
||||
RETURN bomQtyOrdered(ID(M_Product_ID),M_Warehouse_ID,M_Locator_ID);
|
||||
END;
|
||||
$$ LANGUAGE plpgsql VOLATILE;
|
||||
|
||||
|
||||
/************* bomQtyReserved *******************/
|
||||
CREATE OR REPLACE FUNCTION bomQtyReserved (M_Product_ID NUMERIC, M_Warehouse_ID INTEGER, M_Locator_ID INTEGER)
|
||||
RETURNS NUMERIC AS $$
|
||||
BEGIN
|
||||
RETURN bomQtyReserved(ID(M_Product_ID),M_Warehouse_ID,M_Locator_ID);
|
||||
END;
|
||||
$$ LANGUAGE plpgsql VOLATILE;
|
|
@ -76,6 +76,9 @@
|
|||
<antcall target="load">
|
||||
<param name="file.name" value="${basedir}/init.sql" />
|
||||
</antcall>
|
||||
<antcall target="load">
|
||||
<param name="file.name" value="${basedir}/aliasfunction.sql" />
|
||||
</antcall>
|
||||
</target>
|
||||
|
||||
<target name="load-others">
|
||||
|
|
|
@ -31,82 +31,95 @@ SQLActions[ ] = {
|
|||
CREATE OR REPLACE FUNCTION daysBetween(datetime1 TIMESTAMP WITH TIME ZONE , datetime2 TIMESTAMP WITH TIME ZONE)
|
||||
RETURNS INTEGER
|
||||
AS 'org.compiere.sqlj.Adempiere.getDaysBetween(java.sql.Timestamp,java.sql.Timestamp)'
|
||||
LANGUAGE java VOLATILE;;
|
||||
LANGUAGE java VOLATILE;
|
||||
|
||||
CREATE OR REPLACE FUNCTION addDays(day TIMESTAMP WITH TIME ZONE, days INTEGER)
|
||||
RETURNS TIMESTAMP WITH TIME ZONE
|
||||
AS 'org.compiere.sqlj.Adempiere.addDays(java.sql.Timestamp,int)'
|
||||
LANGUAGE java VOLATILE;;
|
||||
LANGUAGE java VOLATILE;
|
||||
|
||||
|
||||
CREATE OR REPLACE FUNCTION charAt(source VARCHAR, pos INTEGER)
|
||||
RETURNS VARCHAR
|
||||
AS 'org.compiere.sqlj.Adempiere.charAt (java.lang.String,int)'
|
||||
LANGUAGE java VOLATILE;;
|
||||
LANGUAGE java VOLATILE;
|
||||
|
||||
CREATE OR REPLACE FUNCTION nextID(AD_Sequence_ID INTEGER, System VARCHAR)
|
||||
RETURNS INTEGER
|
||||
AS 'org.compiere.sqlj.Adempiere.nextID(int,java.lang.String)'
|
||||
LANGUAGE java VOLATILE;;
|
||||
LANGUAGE java VOLATILE;
|
||||
|
||||
|
||||
/** Product **/
|
||||
CREATE OR REPLACE FUNCTION productAttribute (M_AttributeSetInstance_ID NUMERIC)
|
||||
RETURNS VARCHAR
|
||||
AS 'org.compiere.sqlj.Product.attributeName(int)'
|
||||
LANGUAGE java VOLATILE;;
|
||||
LANGUAGE java VOLATILE;
|
||||
|
||||
CREATE OR REPLACE FUNCTION bomPriceLimit (M_Product_ID NUMERIC, M_PriceList_Version_ID NUMERIC)
|
||||
/************* bomPriceLimit *******************/
|
||||
CREATE OR REPLACE FUNCTION bomPriceLimit (M_Product_ID INTEGER, M_PriceList_Version_ID INTEGER)
|
||||
RETURNS NUMERIC
|
||||
AS 'org.compiere.sqlj.Product.bomPriceLimit(int,int)'
|
||||
LANGUAGE java VOLATILE;;
|
||||
LANGUAGE java VOLATILE;
|
||||
|
||||
CREATE OR REPLACE FUNCTION bomPriceList (M_Product_ID NUMERIC, M_PriceList_Version_ID NUMERIC)
|
||||
/************* bomPriceList *******************/
|
||||
CREATE OR REPLACE FUNCTION bomPriceList (M_Product_ID INTEGER, M_PriceList_Version_ID INTEGER)
|
||||
RETURNS NUMERIC
|
||||
AS 'org.compiere.sqlj.Product.bomPriceList(int,int)'
|
||||
LANGUAGE java VOLATILE;;
|
||||
LANGUAGE java VOLATILE;
|
||||
|
||||
CREATE OR REPLACE FUNCTION bomPriceStd (M_Product_ID NUMERIC, M_PriceList_Version_ID NUMERIC)
|
||||
|
||||
/************* bomPriceStd *******************/
|
||||
CREATE OR REPLACE FUNCTION bomPriceStd (M_Product_ID INTEGER, M_PriceList_Version_ID INTEGER)
|
||||
RETURNS NUMERIC
|
||||
AS 'org.compiere.sqlj.Product.bomPriceStd(int,int)'
|
||||
LANGUAGE java VOLATILE;
|
||||
|
||||
CREATE OR REPLACE FUNCTION bomQtyAvailable (M_Product_ID NUMERIC, M_Warehouse_ID NUMERIC, M_Locator_ID NUMERIC)
|
||||
/************* bomQtyAvailable *******************/
|
||||
CREATE OR REPLACE FUNCTION bomQtyAvailable (M_Product_ID INTEGER, M_Warehouse_ID INTEGER, M_Locator_ID INTEGER)
|
||||
RETURNS NUMERIC
|
||||
AS 'org.compiere.sqlj.Product.bomQtyAvailable(int,int,int)'
|
||||
LANGUAGE java VOLATILE;
|
||||
|
||||
/************* bomQtyAvailable with M_AttributeSetInstance_ID *******************/
|
||||
CREATE OR REPLACE FUNCTION bomQtyAvailable (M_Product_ID NUMERIC , M_AttributeSetInstance_ID NUMERIC, M_Warehouse_ID NUMERIC, M_Locator_ID NUMERIC)
|
||||
RETURNS NUMERIC
|
||||
AS 'org.compiere.sqlj.Product.bomQtyAvailable(int,int,int,int)'
|
||||
LANGUAGE java VOLATILE;
|
||||
|
||||
CREATE OR REPLACE FUNCTION bomQtyOnHand (M_Product_ID NUMERIC, M_Warehouse_ID NUMERIC, M_Locator_ID NUMERIC)
|
||||
/************* bomQtyOnHand *******************/
|
||||
|
||||
CREATE OR REPLACE FUNCTION bomQtyOnHand (M_Product_ID INTEGER, M_Warehouse_ID INTEGER, M_Locator_ID INTEGER)
|
||||
RETURNS NUMERIC
|
||||
AS 'org.compiere.sqlj.Product.bomQtyOnHand(int,int,int)'
|
||||
LANGUAGE java VOLATILE;
|
||||
|
||||
/************* bomQtyOnHand with M_AttributeSetInstance_ID *******************/
|
||||
CREATE OR REPLACE FUNCTION bomQtyOnHand (M_Product_ID NUMERIC, M_AttributeSetInstance_ID NUMERIC, M_Warehouse_ID NUMERIC, M_Locator_ID NUMERIC)
|
||||
RETURNS NUMERIC
|
||||
AS 'org.compiere.sqlj.Product.bomQtyOnHand(int,int,int,int)'
|
||||
LANGUAGE java VOLATILE;
|
||||
|
||||
CREATE OR REPLACE FUNCTION bomQtyOrdered (M_Product_ID NUMERIC, M_Warehouse_ID NUMERIC, M_Locator_ID NUMERIC)
|
||||
/************* bomQtyOrdered *******************/
|
||||
CREATE OR REPLACE FUNCTION bomQtyOrdered (M_Product_ID INTEGER, M_Warehouse_ID INTEGER, M_Locator_ID INTEGER)
|
||||
RETURNS NUMERIC
|
||||
AS 'org.compiere.sqlj.Product.bomQtyOrdered(int,int,int)'
|
||||
LANGUAGE java VOLATILE;
|
||||
|
||||
/************* bomQtyOrdered with M_AttributeSetInstance_ID *******************/
|
||||
CREATE OR REPLACE FUNCTION bomQtyOrdered (M_Product_ID NUMERIC, M_AttributeSetInstance_ID NUMERIC, M_Warehouse_ID NUMERIC, M_Locator_ID NUMERIC)
|
||||
RETURNS NUMERIC
|
||||
AS 'org.compiere.sqlj.Product.bomQtyOrdered(int,int,int,int)'
|
||||
LANGUAGE java VOLATILE;
|
||||
|
||||
|
||||
CREATE OR REPLACE FUNCTION bomQtyReserved (M_Product_ID NUMERIC, M_Warehouse_ID NUMERIC, M_Locator_ID NUMERIC)
|
||||
/************* bomQtyReserved *******************/
|
||||
CREATE OR REPLACE FUNCTION bomQtyReserved (M_Product_ID INTEGER, M_Warehouse_ID INTEGER, M_Locator_ID INTEGER)
|
||||
RETURNS NUMERIC
|
||||
AS 'org.compiere.sqlj.Product.bomQtyReserved(int,int,int)'
|
||||
LANGUAGE java VOLATILE;
|
||||
|
||||
|
||||
/************* bomQtyOrdered with M_AttributeSetInstance_ID *******************/
|
||||
CREATE OR REPLACE FUNCTION bomQtyReserved (M_Product_ID NUMERIC, M_AttributeSetInstance_ID NUMERIC, M_Warehouse_ID NUMERIC, M_Locator_ID NUMERIC)
|
||||
RETURNS NUMERIC
|
||||
AS 'org.compiere.sqlj.Product.bomQtyReserved(int,int,int,int)'
|
||||
|
|
Loading…
Reference in New Issue