zoukankan
html css js c++ java
创建采购订单
经常要用代码创建采购和销售订单,需要弄清楚哪些字段是必输的,这段代码经常需要拷贝,放在这里做个备份。
static
void
CreatePurchDirectly(Args _args)
{
PurchTable purchTable;
PurchLine purchLine;
InventDim inventDim;
;
ttsbegin;
//
PurchTable
//
PurchId
purchTable.PurchId
=
NumberSeq::newGetNum(PurchParameters::numRefPurchId()).num();
purchTble.PurchaseType =
PurchaseType::Purch;
purchTable.initValue();
//
Vend Account
purchTable.initFromVendTable(VendTable::find(
'
3000
'
));
purchTable.insert();
//
PurchLine
purchLine.initFromPurchTable(purchTable);
//
ItemId
purchLine.ItemId
=
'
B-pack1
'
;
purchLine.initFromInventTable(InventTable::find(
'
B-pack1
'
));
//
Qty
purchLine.PurchQty
=
100
;
purchLine.QtyOrdered
=
100
;
purchLine.RemainInventPhysical
=
100
;
purchLine.RemainPurchPhysical
=
100
;
//
InventDim Maybe should add some other dimensions.
inventDim.InventLocationId
=
'
GW
'
;
purchLine.InventDimId
=
InventDim::findOrCreate(inventDim).inventDimId;
purchLine.insert();
ttscommit;
}
static
void
CreatePurchTableThroughAxPurch(Args _args)
{
AxPurchTable axPurchTable
=
new
AxPurchTable();
AxPurchLine axPurchLine
=
new
AxPurchLine();
AxInventDim_PurchLine axInventDim
=
new
AxInventDim_PurchLine();
;
//
PurchTable
//
Order Account
axPurchTable.parmOrderAccount(
"
3000
"
);
axPurchTable.save();
//
PurchLine
//
PurchId
axPurchLine.axPurchTable(axPurchTable);
//
ItemId
axPurchLine.parmItemId(
"
B-pack1
"
);
//
Qty
axPurchLine.parmPurchQty(
100
);
//
InventDim Maybe should add some other dimensions
axInventDim.axPurchLine(axPurchLine);
axInventDim.parmInventLocationId(
'
MW
'
);
axPurchLine.axInventDim(axInventDim);
axPurchLine.save();
}
查看全文
相关阅读:
Objective-C基础3
C语言回顾-结构体、枚举和文件
C语言回顾-内存管理和指针函数
C语言回顾-字符串指针
C语言回顾-指针
C语言回顾-二维数组
Objective-C基础2
C语言回顾-整型变量修饰符和一维数组
sql server 判断是否存在数据库,表,列,视图
大文件数据库脚本导入解决方案
原文地址:https://www.cnblogs.com/Farseer1215/p/1141923.html
最新文章
电量的测试方法(adb shell dumpsys batterystats)
获取帧率
批处理循环安装APK
软件测试人员如何经营自己的职业生命
最近面试总结
应用服务器与WEB SERVER的区别
junit4 中用例执行顺序
robotium获取android页面元素的逻辑
php做接口自动化的核心代码
robotium测试妈妈圈的简单代码
热门文章
自动更新svn代码到运行环境的shell脚本
php发送提醒邮件的代码
robotium 中的组件Class By获取web元素的方法
Swift
CocoaPods和git
3.多线程NSOperation
2.多线程-GCD
1.多线程-NSThread
Foundation框架
Objective-C基础4
Copyright © 2011-2022 走看看