LedgerPurchaseInvoiceService LedgerPurchaseInvoiceService;
LedgerPurchaseInvoice LedgerPurchaseInvoice;
LedgerPurchaseInvoice_LedgerJournalTable LedgerPurchaseInvoice_LedgerJournalTable;
LedgerPurchaseInvoice_LedgerJournalTrans LedgerPurchaseInvoice_LedgerJournalTrans;
AifMultiTypeAccount AifMultiTypeAccount;
AifDimensionAttributeValueSet AifDimensionAttributeValueSet= new AifDimensionAttributeValueSet();
AifDimensionAttributeValue dimensionAttributeValue;
AfStronglyTypedDataContainerList dimensionAttributeValues;
#AifDimensionDataContainerTypes
;
LedgerPurchaseInvoiceService=LedgerPurchaseInvoiceService::construct();
LedgerPurchaseInvoice=new LedgerPurchaseInvoice();
LedgerPurchaseInvoice_LedgerJournalTable=new LedgerPurchaseInvoice_LedgerJournalTable();
LedgerPurchaseInvoice_LedgerJournalTrans=new LedgerPurchaseInvoice_LedgerJournalTrans();
LedgerPurchaseInvoice_LedgerJournalTable.parmJournalName("DIA_FAC");
LedgerPurchaseInvoice_LedgerJournalTrans=LedgerPurchaseInvoice_LedgerJournalTable.createLedgerJournalTrans().addNew();
///cuenta
AifMultiTypeAccount= new AifMultiTypeAccount();
AifMultiTypeAccount.parmAccount("ABI-000001");
AifMultiTypeAccount.parmDisplayValue("ABI-000001");
LedgerPurchaseInvoice_LedgerJournalTrans.parmLedgerDimension(AifMultiTypeAccount);
LedgerPurchaseInvoice_LedgerJournalTrans.parmAccountType(LedgerJournalACType::Vend);
//////////////////////////////////////////////////////////////////////
///cuenta contrapatida
///
dimensionAttributeValues = new AfStronglyTypedDataContainerList(#AifDimensionAttributeValue);
dimensionAttributeValue = dimensionAttributeValues.addNew();
dimensionAttributeValue.parmName("MainAccount");
dimensionAttributeValue.parmValue("61100022");
dimensionAttributeValue = dimensionAttributeValues.addNew();
dimensionAttributeValue.parmName("Sucursal");
dimensionAttributeValue.parmValue("QRO");
dimensionAttributeValue = dimensionAttributeValues.addNew();
dimensionAttributeValue.parmName("División");
dimensionAttributeValue.parmValue("ABINSA");
dimensionAttributeValue = dimensionAttributeValues.addNew();
dimensionAttributeValue.parmName("CentroCosto");
dimensionAttributeValue.parmValue("GTOB");
AifMultiTypeAccount=new AifMultiTypeAccount();
AifMultiTypeAccount.parmValues(dimensionAttributeValues);
AifMultiTypeAccount.parmDisplayValue("61100022-ABINSA-MEX-GTOT");
AifMultiTypeAccount.parmAccount("61100022");
LedgerPurchaseInvoice_LedgerJournalTrans.parmOffsetAccountType(LedgerJournalACType::Ledger);
LedgerPurchaseInvoice_LedgerJournalTrans.parmOffsetLedgerDimension(AifMultiTypeAccount);
LedgerPurchaseInvoice_LedgerJournalTrans.parmOffsetCompany(curext());
//////////////////////////////////////////////////////////////7
LedgerPurchaseInvoice_LedgerJournalTrans.parmAmountCurCredit(234.34);
LedgerPurchaseInvoice_LedgerJournalTrans.parmDocumentDate(today());
dimensionAttributeValues = new AfStronglyTypedDataContainerList(#AifDimensionAttributeValue);
dimensionAttributeValue = dimensionAttributeValues.addNew();
dimensionAttributeValue.parmName("Sucursal");
dimensionAttributeValue.parmValue("QRO");
dimensionAttributeValue = dimensionAttributeValues.addNew();
dimensionAttributeValue.parmName("División");
dimensionAttributeValue.parmValue("ABINSA");
dimensionAttributeValue = dimensionAttributeValues.addNew();
dimensionAttributeValue.parmName("CentroCosto");
dimensionAttributeValue.parmValue("GTOB");
AifDimensionAttributeValueSet.parmValues(dimensionAttributeValues);
LedgerPurchaseInvoice_LedgerJournalTrans.parmDefaultDimension(AifDimensionAttributeValueSet);
// LedgerInAccountStatementFI_BASIC::createDefaultDimension(["QRO","ABINSA","GTOB"])
LedgerPurchaseInvoice_LedgerJournalTrans.parmCompany(curext());
LedgerPurchaseInvoice_LedgerJournalTrans.parmInvoice("0001");
LedgerPurchaseInvoice.createLedgerJournalTable().add(LedgerPurchaseInvoice_LedgerJournalTable);
LedgerPurchaseInvoiceService.create(LedgerPurchaseInvoice);
No hay comentarios:
Publicar un comentario