src-db/database/model/functions/C_INVOICE_POST.xml
changeset 24946 857829af6d0e
parent 24851 5473c11efc32
child 25006 2352f43d4f0f
child 25612 bf2438241744
equal deleted inserted replaced
24945:c02abc5cbbc1 24946:857829af6d0e
  1437         FOR Cur_ILines_Receipt IN
  1437         FOR Cur_ILines_Receipt IN
  1438           (SELECT il.AD_Client_ID, il.AD_Org_ID, il.C_InvoiceLine_ID, ml.M_InOutLine_ID,
  1438           (SELECT il.AD_Client_ID, il.AD_Org_ID, il.C_InvoiceLine_ID, ml.M_InOutLine_ID,
  1439                ml.M_Product_ID, ml.MovementQty, il.QtyInvoiced, i.DateAcct
  1439                ml.M_Product_ID, ml.MovementQty, il.QtyInvoiced, i.DateAcct
  1440            FROM C_INVOICELINE il
  1440            FROM C_INVOICELINE il
  1441                 INNER JOIN M_INOUTLINE ml ON (il.M_InOutLine_ID=ml.M_InOutLine_ID)
  1441                 INNER JOIN M_INOUTLINE ml ON (il.M_InOutLine_ID=ml.M_InOutLine_ID)
       
  1442                 INNER JOIN M_INOUT m ON (ml.M_InOut_ID=m.M_InOut_ID)
  1442                 INNER JOIN C_INVOICE i ON(il.C_Invoice_ID=i.C_Invoice_ID)
  1443                 INNER JOIN C_INVOICE i ON(il.C_Invoice_ID=i.C_Invoice_ID)
  1443            WHERE il.M_Product_ID=ml.M_Product_ID
  1444            WHERE il.M_Product_ID=ml.M_Product_ID
       
  1445              AND M.Processed = 'Y'
  1444              AND il.C_Invoice_ID=v_Record_ID
  1446              AND il.C_Invoice_ID=v_Record_ID
  1445            )
  1447            )
  1446         LOOP
  1448         LOOP
  1447           IF (Cur_ILines_Receipt.M_INOUTLINE_ID IS NOT NULL) THEN
  1449           IF (Cur_ILines_Receipt.M_INOUTLINE_ID IS NOT NULL) THEN
  1448             SELECT COUNT(1) INTO v_Count
  1450             SELECT COUNT(1) INTO v_Count