jueves, 7 de junio de 2012
Crear Diario de inv
static void TestCrearDiarioInventario(Args _args)
{
GsInventJournalTService GsInventJournalTService;
GsInventJournalT GsInventJournalT;
GsInventJournalT_InventJournalTable_1 GsInventJournalT_InventJournalTable_1;
GsInventJournalT_InventJournalTrans_1 GsInventJournalT_InventJournalTrans_1;
GsInventJournalT_InventDim_1 GsInventJournalT_InventDim_1;
AifMultiTypeAccount AifMultiTypeAccount;
AifDimensionAttributeValueSet AifDimensionAttributeValueSet= new AifDimensionAttributeValueSet();
AifDimensionAttributeValue dimensionAttributeValue;
AfStronglyTypedDataContainerList dimensionAttributeValues;
#AifDimensionDataContainerTypes
AifLedgerAccount AifLedgerAccount;
;
GsInventJournalTService=GsInventJournalTService::construct();
GsInventJournalT=new GsInventJournalT();
GsInventJournalT.createInventJournalTable_1().addNew();
GsInventJournalT_InventJournalTable_1=GsInventJournalT.parmInventJournalTable_1().addNew();
GsInventJournalT_InventJournalTable_1.parmJournalNameId("Mov");
GsInventJournalT_InventJournalTable_1.createInventJournalTrans_1();
GsInventJournalT_InventJournalTrans_1=GsInventJournalT_InventJournalTable_1.parmInventJournalTrans_1().addNew();
GsInventJournalT_InventJournalTrans_1.parmItemId("CIC00731400A36");
GsInventJournalT_InventJournalTrans_1.parmQty(1);
GsInventJournalT_InventJournalTrans_1.parmCostPrice(100);
GsInventJournalT_InventJournalTrans_1.parmCostAmount(100);
AifLedgerAccount=new AifLedgerAccount();
AifLedgerAccount.parmDisplayValue("51100001");
AifLedgerAccount.parmMainAccount("51100001");
GsInventJournalT_InventJournalTrans_1.parmLedgerDimension(AifLedgerAccount);
dimensionAttributeValues = new AfStronglyTypedDataContainerList(#AifDimensionAttributeValue);
dimensionAttributeValue = dimensionAttributeValues.addNew();
dimensionAttributeValue.parmName("Sucursal");
dimensionAttributeValue.parmValue("QRO");
dimensionAttributeValue = dimensionAttributeValues.addNew();
dimensionAttributeValue.parmName("División");
dimensionAttributeValue.parmValue("ABINSA");
AifDimensionAttributeValueSet.parmValues(dimensionAttributeValues);
GsInventJournalT_InventJournalTrans_1.parmDefaultDimension(AifDimensionAttributeValueSet);
GsInventJournalT_InventJournalTrans_1.createInventDim_1();
GsInventJournalT_InventDim_1=GsInventJournalT_InventJournalTrans_1.parmInventDim_1().addNew();
GsInventJournalT_InventDim_1.parmInventSizeId("GM");
GsInventJournalT_InventDim_1.parmInventColorId("110");
GsInventJournalT_InventDim_1.parmInventSiteId("130");
GsInventJournalT_InventDim_1.parmInventLocationId("MP 130");
GsInventJournalT_InventDim_1.parmInventBatchId("1");
GsInventJournalT_InventDim_1.parmWMSLocationId("E1");
GsInventJournalTService.create(GsInventJournalT);
}
Suscribirse a:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario