zoaoo

博客园 首页 新随笔 联系 订阅 管理
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();
}

 

posted on 2017-09-14 15:05  zoaoo  阅读(145)  评论(0编辑  收藏  举报