Fecha |Año/Prd. |Número de Documento |Tipo |Unidad |Cantidad |Costo Std Monto 09/12/2006 |2006 - 12 |SG-10085 |Envío |BARR. |-1.0000 |8,257.89 -8,257.894 13/12/2006 |2006 - 12 |REC0000006080 |Recibo |535 |0.0000 |0.00 362.109 13/12/2006 |2006 - 12 |REC0000006080 |Recibo |535 |0.0000 |0.00 1.192 13/12/2006 |2006 - 12 |REC0000006080 |Recibo |BARR. |1.0000 |8,070.00 8,070.000 13/12/2006 |2006 - 12 |SG-10110 |Envío |BARR. |-1.0000 |8,257.89 -8,257.894 18/12/2006 |2006 - 12 |SALDO20061218 |Recibo |BARR. |11.0000 |8,241.95 90,661.430 18/12/2006 |2006 - 12 |MA-3046 |Envío |BARR. |-3.0000 |8,257.89 -24,773.683 23/12/2006 |2006 - 12 |REC0000006173 |Recibo |159 |0.0000 |0.00 130.955 23/12/2006 |2006 - 12 |REC0000006173 |Recibo |159 |0.0000 |0.00 1.376 23/12/2006 |2006 - 12 |REC0000006173 |Recibo |BARR. |1.0000 |8,070.00 8,070.000Now here's the trik I need to perform, 'Envio' means when the item goes aout of whse. 'Recibo' when goes in by a purchase.
13/12/2006 |2006 - 12 |REC0000006080 |Recibo |535 |0.0000 |0.00 362.109 13/12/2006 |2006 - 12 |REC0000006080 |Recibo |535 |0.0000 |0.00 1.192 13/12/2006 |2006 - 12 |REC0000006080 |Recibo |BARR. |1.0000 |8,202.331 8,070.00 //This is the important oneThe column Costo Std should display the sum of the three values divided by the qty recieved
DO WHILE .T. ME.Work() ENDDO