Attached Files | copylines.diff [^] (8,002 bytes) 2013-12-12 20:13 [Show Content] [Hide Content]diff -u Openbravo-3.0MP29.1/src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder_data.xsql flopec/src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder_data.xsql
--- Openbravo-3.0MP29.1/src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder_data.xsql 2013-11-20 08:29:04.000000000 -0500
+++ flopec/src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder_data.xsql 2013-12-12 12:48:53.668553340 -0500
@@ -27,9 +27,9 @@
<SqlMethodComment></SqlMethodComment>
<Sql>
<![CDATA[
- SELECT DISTINCT M_PRODUCT_ID, PRODUCTNAME, M_ATTRIBUTESETINSTANCE_ID, DESCRIPTION, CLASS_OFFER,
+ SELECT DISTINCT C_ORDERLINE_ID AS REFORDERLINE_ID, M_PRODUCT_ID, PRODUCTNAME, M_ATTRIBUTESETINSTANCE_ID, DESCRIPTION, CLASS_OFFER,
OFFER_NAME, PRICESTD, LASTPRICESO, C_TAX_ID, NAMETAX, C_UOM_ID, UOMSYMBOL, '0' AS QTY, '' AS PRICELIMIT, '' AS PRICELIST, '' AS STDPRECISION, '' AS PRICEPRECISION FROM (
- SELECT CL.M_PRODUCT_ID AS M_PRODUCT_ID, M.NAME AS PRODUCTNAME,
+ SELECT CL.C_ORDERLINE_ID, CL.M_PRODUCT_ID AS M_PRODUCT_ID, M.NAME AS PRODUCTNAME,
MA.M_ATTRIBUTESETINSTANCE_ID AS M_ATTRIBUTESETINSTANCE_ID, MA.DESCRIPTION AS DESCRIPTION,
(CASE coalesce(M_GET_OFFER(TO_DATE(NOW()), ?, CL.M_PRODUCT_ID),'-1') WHEN '-1' THEN '' ELSE '' END) AS CLASS_OFFER,
(CASE coalesce(M_GET_OFFER(TO_DATE(NOW()), ?, CL.M_PRODUCT_ID),'-1') WHEN '-1' THEN '' ELSE TO_CHAR(
@@ -71,7 +71,7 @@
AND C.ISSOTRX = ?
AND C.DATEORDERED >= NOW()-TO_NUMBER(?)
AND C.DATEORDERED <NOW()+1
- GROUP BY CL.M_PRODUCT_ID, M.NAME, MA.M_ATTRIBUTESETINSTANCE_ID,
+ GROUP BY CL.C_ORDERLINE_ID, CL.M_PRODUCT_ID, M.NAME, MA.M_ATTRIBUTESETINSTANCE_ID,
MA.DESCRIPTION,M.M_PRODUCT_ID, C_TAX.C_TAX_ID, C_TAX.NAME, C_UOM.C_UOM_ID, C_UOM.UOMSYMBOL, C.M_PRICELIST_ID
)A
ORDER BY PRODUCTNAME
@@ -147,12 +147,12 @@
<SqlMethodComment></SqlMethodComment>
<Sql>
<![CDATA[
- INSERT INTO C_ORDERLINE (C_ORDERLINE_ID, AD_CLIENT_ID, AD_ORG_ID, CREATED, CREATEDBY, UPDATED, UPDATEDBY,
+ INSERT INTO C_ORDERLINE (C_ORDERLINE_ID, AD_CLIENT_ID, AD_ORG_ID, CREATED, CREATEDBY, UPDATED, UPDATEDBY, REF_ORDERLINE_ID,
C_ORDER_ID, LINE, C_BPARTNER_ID, C_BPARTNER_LOCATION_ID, DATEORDERED, DATEPROMISED, M_PRODUCT_ID, M_WAREHOUSE_ID, C_UOM_ID,
QTYORDERED, C_CURRENCY_ID, PRICELIST, PRICEACTUAL, PRICELIMIT, PRICESTD, DISCOUNT, C_TAX_ID, M_ATTRIBUTESETINSTANCE_ID,
grosspricelist, gross_unit_price, line_gross_amount, grosspricestd
) VALUES (?,?,?,NOW(),?,NOW(),?,
- ?,(SELECT (coalesce(Max(Line),0))+10 FROM C_OrderLine WHERE C_Order_id = ?),?,?,TO_DATE(?),TO_DATE(?),?,?,?,
+ ?, ?, (SELECT (coalesce(Max(Line),0))+10 FROM C_OrderLine WHERE C_Order_id = ?),?,?,TO_DATE(?),TO_DATE(?),?,?,?,
TO_NUMBER(?),?,TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?), ?, ?,
TO_NUMBER(?), TO_NUMBER(?), TO_NUMBER(?), TO_NUMBER(?)
)
@@ -163,6 +163,7 @@
<Parameter name="adOrgId"/>
<Parameter name="user"/>
<Parameter name="user"/>
+ <Parameter name="RefOrderlineId"/>
<Parameter name="cOrderId"/>
<Parameter name="cOrderId"/>
<Parameter name="cBpartnerId"/>
diff -u Openbravo-3.0MP29.1/src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.html flopec/src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.html
--- Openbravo-3.0MP29.1/src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.html 2013-11-20 08:29:04.000000000 -0500
+++ flopec/src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.html 2013-12-12 12:33:04.468517244 -0500
@@ -461,7 +461,10 @@
<div id="sectionDetail">
<tr class="DataGrid_Body_Row DataGrid_Body_Row_yy" onclick="selectActual(this); return true;" ondblclick="checkActual(this); return true;" id="funcEvenOddRowxx">
<td width="2%" class="DataGrid_Body_LineNoCell DataGrid_Body_Cell_CheckBox">
- <span class="Checkbox_container_NOT_Focused"><input type="checkbox" name="inpRownumId" onclick="loadData(this.value, this.checked);return true;" id="CheckNumxx" value="xx"/></span>
+ <span class="Checkbox_container_NOT_Focused">
+ <input type="checkbox" name="inpRownumId" onclick="loadData(this.value, this.checked);return true;" id="CheckNumxx" value="xx"/>
+ <input type="hidden" name="inprefOrderlineIdxx" id="fieldrefOrderlineId" value=""/>
+ </span>
</td>
<td width="20%" class="DataGrid_Body_Cell" onmouseover="HoverCell(this);" onmouseout="unHoverCell(this);" id=""><input type="hidden" name="inpmProductIdxx" id="fieldProductid" value=""/><span id="fieldProductname">xxPimientos de vinagre</span></td>
<td width="9%" class="DataGrid_Body_Cell" onmouseover="HoverCell(this);" onmouseout="unHoverCell(this);"><input type="hidden" name="inpmAttributesetinstanceIdxx" id="fieldmAttributesetinstanceId" value=""/><span id="fieldDescription">xxExtraLarge</span></td>
diff -u Openbravo-3.0MP29.1/src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.java flopec/src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.java
--- Openbravo-3.0MP29.1/src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.java 2013-11-20 08:29:04.000000000 -0500
+++ flopec/src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.java 2013-12-12 12:42:32.868538859 -0500
@@ -115,6 +115,7 @@
BigDecimal discount, priceActual, priceList, netPriceList, grossPriceList, priceStd, priceLimit, priceGross, amtGross, pricestdgross;
while (st.hasMoreTokens()) {
String strRownum = st.nextToken().trim();
+ String strRefOrderlineId = vars.getStringParameter("inprefOrderlineId" + strRownum);
String strmProductId = vars.getStringParameter("inpmProductId" + strRownum);
String strmAttributesetinstanceId = vars.getStringParameter("inpmAttributesetinstanceId"
+ strRownum);
@@ -188,9 +189,10 @@
try {
CopyFromOrderData.insertCOrderline(conn, this, strCOrderlineID, orderData[0].adClientId,
- orderData[0].adOrgId, vars.getUser(), strKey, orderData[0].cBpartnerId,
- orderData[0].cBpartnerLocationId, orderData[0].dateordered, orderData[0].dateordered,
- strmProductId, orderData[0].mWarehouseId.equals("") ? vars.getWarehouse()
+ orderData[0].adOrgId, vars.getUser(), strRefOrderlineId, strKey,
+ orderData[0].cBpartnerId, orderData[0].cBpartnerLocationId, orderData[0].dateordered,
+ orderData[0].dateordered, strmProductId,
+ orderData[0].mWarehouseId.equals("") ? vars.getWarehouse()
: orderData[0].mWarehouseId, strcUOMId, strQty, orderData[0].cCurrencyId,
netPriceList.toString(), priceActual.toString(), priceLimit.toString(), priceStd
.toString(), discount.toString(), strcTaxId, strmAttributesetinstanceId,
diff -u Openbravo-3.0MP29.1/src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.xml flopec/src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.xml
--- Openbravo-3.0MP29.1/src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.xml 2013-11-20 08:29:04.000000000 -0500
+++ flopec/src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.xml 2013-12-12 12:34:19.560520101 -0500
@@ -62,6 +62,8 @@
<FIELD id="CheckNumxx" attribute="value">rownum</FIELD>
+<FIELD id="fieldrefOrderlineId" attribute="value">reforderlineId</FIELD>
+<FIELD id="fieldrefOrderlineId" attribute="name" replace="xx">rownum</FIELD>
<FIELD id="fieldProductid" attribute="value">mProductId</FIELD>
<FIELD id="fieldProductid" attribute="name" replace="xx">rownum</FIELD>
<FIELD id="fieldProductname">productname</FIELD>
|