details: /erp/stable/2.50/rev/253b27c5a8e0
changeset: 9223:253b27c5a8e0
user: Adrián Romero <adrianromero <at> openbravo.com>
date: Fri Feb 18 16:06:33 2011 +0100
summary: Fixes issue Create Lines From Goods Receipt should load quantities
(main and secondary) directly from the order
It has been reviewed the SQL sentenced that retrieves the order lines to
calculate the pending quantity to receipt in the secondary uom to calculate it
based on the same quantity of the secondary uom in the order
diffstat:
src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Shipment_data.xsql | 5
+----
1 files changed, 1 insertions(+), 4 deletions(-)
diffs (15 lines):
diff -r efd9369d413c -r 253b27c5a8e0
src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Shipment_data.xsql
--- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Shipment_data.xsql
Fri Feb 18 12:27:57 2011 +0100
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Shipment_data.xsql
Fri Feb 18 16:06:33 2011 +0100
@@ -32,10 +32,7 @@
l.C_OrderLine_ID,l.Line, l.ad_org_id, '' as C_InvoiceLine_ID, '' as
M_InOutLine_ID, '' AS BREAKDOWN, '' AS STDPRECISION,
'' AS C_UOM_ID_Conversion, '' AS QUANTITYORDER, '' AS
M_Product_UOM_ID, l.M_ATTRIBUTESETINSTANCE_ID AS M_ATTRIBUTESETINSTANCE_ID,
l.C_OrderLine_ID AS ID, '' AS C_Invoice_ID, l.DESCRIPTION AS
DESCRIPTION,
- ((l.QtyOrdered-SUM(COALESCE(m.Qty,0)))/COALESCE(
- (SELECT MULTIPLYRATE FROM C_UOM_CONVERSION WHERE
C_UOM_CONVERSION.C_UOM_ID =
- (SELECT C_UOM.C_UOM_ID FROM M_PRODUCT_UOM, C_UOM WHERE
M_PRODUCT_UOM_ID = l.M_PRODUCT_UOM_ID AND M_PRODUCT_UOM.C_UOM_ID =
C_UOM.C_UOM_ID)
- AND C_UOM_CONVERSION.C_UOM_TO_ID = l.C_UOM_ID),1))
+ (l.quantityorder - C_UOM_CONVERT(SUM(COALESCE(m.Qty,0)), l.C_UOM_ID,
l.M_PRODUCT_UOM_ID, 'Y'))
as SECQTY, l.M_PRODUCT_UOM_ID as SEC_PRODUCT_UOM_ID,
(SELECT M_ATTRIBUTESETINSTANCE.DESCRIPTION FROM M_ATTRIBUTESETINSTANCE
WHERE
l.M_ATTRIBUTESETINSTANCE_ID =
M_ATTRIBUTESETINSTANCE.M_ATTRIBUTESETINSTANCE_ID) as ATTRIBUTESETINSTANCENAME,
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits