AX_InventCounting
static void Job649(Args _args)
{
ItemId ItemId = "000XA00612R1";
InventDimId InventDimId = "K00811600";
InventQty qty = ;
InventQty physicalQty;
NumberSeq numberSeq;
InventJournalVoucherId voucherId;
InventTransId InventTransId;
InventUpd_Financial financial;
InventMov_Vir_Counting movement;
TransactionTxt transactionTxt;
LedgerVoucher ledgerVoucher;
LedgerVoucherObject ledgerVoucherObject;
THK_2ndInventQty THK_2ndqty;
CostAmount calcCostAmount()
{
InventPriceMap inventPriceMap = InventTable::find(ItemId).inventCostPriceMap(InventDimId);
;
return PriceDisc::price2Amount(inventPriceMap.price(),
inventPriceMap.priceUnit(),
,
qty,
qty,
inventPriceMap.markup(),
,
'',
);
}
;
physicalQty = InventSum::find(ItemId,InventDimId).PhysicalInvent;
qty = qty - physicalQty;
if (qty != )
{
if (!InventTransId)
{
InventTransId = NumberSeq::newGetNum(InventParameters::numRefInventTransId()).num();
}
numberSeq = NumberSeq::newGetNum(InventParameters::numRefInventJournalVoucherId());
voucherId = numberSeq.num();
transactionTxt = new TransactionTxt();
transactionTxt.setType(LedgerTransTxt::InventJournalCount);
transactionTxt.setDate(systemdateget());
transactionTxt.setVoucher(voucherId);
ledgerVoucher = LedgerVoucher::newLedgerPost(DetailSummary::Summary,
SysModule::Invent,
numberSeq.parmVoucherSequenceCode());
ledgerVoucherObject = LedgerVoucherObject::newVoucher(voucherId,
systemdateget(),
SysModule::Invent,
LedgerTransType::Invent);
ledgerVoucherObject.lastTransTxt(transactionTxt.txt());
ledgerVoucher.addVoucher(ledgerVoucherObject);
movement = InventMov_Vir_Counting::newParameters(
InventTransId,
ItemId,
InventDimId,
systemdateget(),
qty,
THK_2ndqty);
financial = InventUpd_Financial::newVirtuelCounting(movement, ledgerVoucher, abs(calcCostAmount()) * movement.transSign());
financial.updateNow();
}
}
AX_InventCounting的更多相关文章
随机推荐
- solr6.4.1搜索引擎(3)增量同步mysql数据库
尚未实现首次同步mysql数据库的,请参考我的另一篇文章http://www.cnblogs.com/zhuwenjoyce/p/6512378.html(solr6.4.1搜索引擎同步mysql数据 ...
- js中slice方法(转)
1.String.slice(start,end)returns a string containing a slice, or substring, of string. It does not m ...
- sqlserver 带输出参数的存储过程的创建与执行
创建 use StudentManager go if exists(select * from sysobjects where name='usp_ScoreQuery4') drop proce ...
- (转)cenntos 安装mongodb
转自 https://www.cnblogs.com/layezi/p/7290082.html 安装前注意: 此教程是通过yum安装的.仅限64位centos系统 安装步骤: 1.创建仓库文件: 1 ...
- [UnityShader基础]04.ColorMask
语法如下: ColorMask RGB | A | 0 | 其他R,G,B,A的组合 ColorMask R,意思是输出颜色中只有R通道会被写入 ColorMask 0,意思是不会输出任何颜色 默认值 ...
- PHP安装Commposer
一先把php加到环境变量里面测试 看一下版本号: 二,composer得安装注意安装的时候 php必须在5.59以上版本,openssl的扩展开启,pdo的扩展开启,mbstring的扩展开启 1,下 ...
- WEB请求过程(http解析,浏览器缓存机制,域名解析,cdn分发)
概述 发起一个http请求的过程就是建立一个socket通信的过程. 我们可以模仿浏览器发起http请求,譬如用httpclient工具包,curl命令等方式. curl "http://w ...
- IDEA常用快捷键,收藏以备后用
IntelliJ Idea 常用快捷键列表 Ctrl+Shift + Enter,语句完成“!”,否定完成,输入表达式时按 “!”键Ctrl+E,最近的文件Ctrl+Shift+E,最近更改的文件Sh ...
- import_module 导入变量的包
遇到你想导入的包是变量的时候,可以用这个实现 from importlib import import_module settings_path = self.pathm2 = import_modu ...
- docker 网络配置
先随便写几行命令 随后一点点的补充 端口映射实现访问容器. run -d -P training/webapp python app.py run -d -p 5000:5000 training/w ...