diff --git a/db/ddlutils/postgresql/aliasfunction.sql b/db/ddlutils/postgresql/aliasfunction.sql
new file mode 100644
index 0000000000..9c6d384e28
--- /dev/null
+++ b/db/ddlutils/postgresql/aliasfunction.sql
@@ -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;
\ No newline at end of file
diff --git a/db/ddlutils/postgresql/build.xml b/db/ddlutils/postgresql/build.xml
index e5b266df59..1807998d07 100644
--- a/db/ddlutils/postgresql/build.xml
+++ b/db/ddlutils/postgresql/build.xml
@@ -75,6 +75,9 @@
+
+
+
diff --git a/sqlj/postgresql/sqlj.ddr b/sqlj/postgresql/sqlj.ddr
index 0f83ad1894..81087d4580 100755
--- a/sqlj/postgresql/sqlj.ddr
+++ b/sqlj/postgresql/sqlj.ddr
@@ -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)'