采购贸易协议价查询

//采购贸易协议价查询
static void  Purch_SL_SearchPriceDisc(Args _args)
{
    PriceDisc   priceDisc;
    PurchLine   purchLine;
    container   con;
    Price       price;

    //purchLine = PurchLine::findRecId(35637485236);
    select firstOnly purchline
        where purchline.PurchId == "Test-000019111";

    priceDisc = PriceDisc::newFromSalesPurchLine(purchLine, InventDim::find(purchLine.InventDimId,true));
    priceDisc.findPrice(purchLine.priceGroupId());

    info(strFmt("第一种获取采购订单行贸易协议价是:%1", priceDisc.price()));

    con = PriceDisc::findItemPriceAgreement(ModuleInventPurchSales::Purch, '000000001-1',InventDim::findOrCreateBlank(),
                                            InventTableModule::find("000000001-1",ModuleInventPurchSales::Purch).UnitId,
                                            systemDateGet(),1,"CNMF-000000002","CNY","");
    price = conPeek(con, 1);
    info(strFmt("第二种获取物料价格协议价是:%1",price));
}

  

原文地址:https://www.cnblogs.com/sunny-technology/p/11763984.html