从SO创建PO时禁止自动Marking | 我心依旧
当前位置: 首页 > 开发 > 正文

从SO创建PO时禁止自动Marking

修改位置:
PurchAutoCreate_Sales.createLine()

代码示例:
 if(PurchParameters::find().SAG_DisableAutoMarking && (tradeLineDlvType != TradeLineDlvType::DropShip))
    {
        //del marking
        inventTransOrig = InventTransOrigin::findByInventTransId(localPurchLine.InventTransId).RecId;
        if(inventTransOrig)
        {
            update_recordSet inventTrans
                              setting MarkingRefInventTransOrigin = 0
                              where inventTrans.MarkingRefInventTransOrigin == inventTransOrig;

            update_recordSet inventTrans
                                setting MarkingRefInventTransOrigin = 0
                                where inventTrans.InventTransOrigin == inventTransOrig;
        }
        //set to default purch location
        inventDimPurch.clear();
        inventDimPurch.initFromInventTable(inventTable, InventItemOrderSetupType::Purch);

        inventDim.InventSiteId = inventDimPurch.InventSiteId;
        inventDim.InventLocationId = inventDimPurch.InventLocationId;

        localPurchLine.setInventDimIdFromInventDim(inventDim);
        localPurchLine.update();

        //update inventtrans;
        inventTrans = InventTrans::findTransId(localPurchLine.InventTransId, true);
        if(inventTrans)
        {
            inventTrans.inventDimId = localPurchLine.InventDimId;
            inventTrans.update();
        }
    }

本文固定链接: http://www.erpgolive.com/archives/215 | 我心依旧

该日志由 虎哥 于2015年12月21日发表在 开发 分类下,
原创文章转载请注明: 从SO创建PO时禁止自动Marking | 我心依旧

报歉!评论已关闭.