AX_CreateAndPostInventJournal

static void CreateAndPostInventJournal(Args _args)
{
    InventJournalTable              inventJournalTableLocal;
    InventJournalTrans              inventJournalTransLocal;
    InventJournalCheckPost          inventJournalCheckPost;
    ;

    inventJournalTableLocal.clear();
    inventJournalTableLocal.initValue();
    inventJournalTableLocal.initFromInventJournalName(InventJournalName::find("ADJ"));
    inventJournalTableLocal.insert();

    inventJournalTransLocal.clear();
    inventJournalTransLocal.initValue();
    inventJournalTransLocal.initFromInventJournalTable(inventJournalTableLocal);
    inventJournalTransLocal.initFromInventTable(InventTable::find("KSOV0604XE"),false,false,false);
    inventJournalTransLocal.InventDimId              = "T00001731";
    inventJournalTransLocal.Qty         = 1;
    inventJournalTransLocal.THK_2ndQty  = 0;
    inventJournalTransLocal.CostPrice   = 1;
    inventJournalTransLocal.TransDate = systemDateGet();
    inventJournalTransLocal.insert();

    info(strfmt("Journal %1 is created", inventJournalTableLocal.JournalId),‘‘, SysInfoAction_TableField::newBuffer(inventJournalTableLocal));

    inventJournalCheckPost  = InventJournalCheckPost::newPostJournal(inventJournalTableLocal);
    inventJournalCheckPost.run();
}
时间: 2024-10-09 20:10:52

AX_CreateAndPostInventJournal的相关文章