最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

Code for display method to find/stimulate the purchase price for an item and vendor

网络文摘 William 2475浏览 0评论
Code for display method to find/stimulate the purchase price for an item and vendor
 
PurchLine               purchLine;
InventDim               lInventDim;
UnitOfMeasureSymbol     unitId = 'PCS'; //Or get default purchase unit
ReqItemTable            reqItemTable; //To get approved vendor for item
;
//Create instance of Inventory dimension table
lInventDim.InventLocationId  = InventDim::find(_this.InventDimIdDefault).InventLocationId;
lInventDim.InventSiteId      = InventDim::find(_this.InventDimIdDefault).InventSiteId;
lInventDim = InventDim::findDim(lInventDim);
reqItemTable = ReqItemTable::find(_this.ItemId,lInventDim.InventDimId);
//Create an instance of purchLine table and set it to tmp
purchLine.setTmp();
purchLine.VendAccount   = reqItemTable.VendId;
purchLine.InventDimId   = lInventDim.inventDimId;
purchLine.PurchQty      = 1;
purchLine.PurchUnit     = unitId;
purchLine.ItemId        = _this.itemId;
purchLine.itemIdChanged();
return purchLine.PurchPrice;
Can be modified to display the sales price as well. Cheers!
发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址