How to using code post packingSlip on Quality Orders Form[AX2009]
For simple user operation posting packing slip with purchase order. we added a function button on Quality Orders Form.
// VAR Changed by Xie Yu Fan.Fandy 谢宇帆
void YIP_PostPurchPackingSlip()
{
PurchFormLetter_PackingSlip purchFormLetter;
SysQueryRun chooseLinesQuery; PurchParmUpdate purchParmUpdate;
PurchLine purchLine;
PurchParmTable purchParmTable;
PurchParmLine purchParmLine;
InventDim inventDim;
;
ttsbegin;
chooseLinesQuery = new SysQueryRun(querystr(PurchUpdate)); chooseLinesQuery.query().dataSourceTable(tablenum(PurchTable)).addRange(fieldnum(PurchTable, PurchId)).value(queryValue(this.InventRefId));
chooseLinesQuery.query().dataSourceTable(tablenum(PurchLine)).addRange(fieldnum(PurchLine, InventTransId)).value(queryValue(this.InventRefTransId)); chooseLinesQuery.query().interactive(false);
chooseLinesQuery.saveUserSetup (false); purchFormLetter = PurchFormLetter::construct(DocumentStatus::PackingSlip); purchFormLetter.chooseLinesQuery (chooseLinesQuery);
purchFormLetter.purchTable (PurchTable::find(this.InventRefId));
purchFormLetter.transDate (systemdateget());
purchFormLetter.specQty (PurchUpdate::All);
purchFormLetter.printFormLetter (NoYes::No);
purchFormLetter.splitDeliveryInformation(NoYes::No);
purchFormLetter.sumBy (AccountOrder::None); purchFormLetter.createParmUpdate(false);
purchFormLetter.chooseLines();
purchFormLetter.setForUpdatePurchParmTable(); purchParmTable = purchFormLetter.currentPurchParmTable();
if (!purchParmTable)
throw Exception::Break; purchParmLine = purchParmLine::findInventTransId(purchParmTable.ParmId,this.InventRefTransId,true);
if (!purchParmLine)
throw Exception::Break; inventDim = this.inventDim();
purchParmLine.InventDimId = InventDim::findOrCreate(inventDim).inventDimId;
purchLine = PurchLine::findInventTransId(this.InventRefTransId);
[purchParmLine.ReceiveNow, purchParmLine.RemainBefore , purchParmLine.RemainAfter ] = purchFormLetter.qtyPurch (purchLine, purchLine.YIP_calcPurchQty(this.Qty));
[purchParmLine.InventNow, purchParmLine.RemainBeforeInvent, purchParmLine.RemainAfterInvent] = purchFormLetter.qtyInvent(purchLine, this.Qty);
purchParmLine.setLineAmount(purchParmLine.ReceiveNow,purchLine);
purchParmLine.update(); purchFormLetter.reArrangeNow(true);
purchFormLetter.YIP_parmFromExternalRun(true);
purchFormLetter.saveLast();
ttscommit;
if (purchFormLetter.prompt())
{
try
{
ttsbegin;
purchFormLetter.run();
this.YIP_QCStatus = YIP_QCStatus::PackingSlip;
this.doUpdate();
ttscommit;
}
catch(exception::Error)
{
ttsabort;
throw error("Catch an error exception.");
}
catch(exception::CLRError)
{
ttsabort;
throw error(AifUtil::getClrErrorMessage());
}
}
}
How to using code post packingSlip on Quality Orders Form[AX2009]的更多相关文章
- 什么是Code Review(转)
Code Review是一种通过复查代码提高代码质量的过程,在XP方法中占有极为重要的地位,也已经成为软件工程中一个不可缺少的环节.本文通过对Code Review的一些概念和经验的探讨,就如何进行C ...
- Code Understanding Step by Step - We Need a Task
Code understanding is a task we are always doing, though we are not even aware that we're doing it ...
- Code Review(转)
Code Review是一种通过复查代码提高代码质量的过程,在XP方法中占有极为重要的地位,也已经成为软件工程中一个不可缺少的环节.本文通过对Code Review的一些概念和经验的探讨,就如何进行C ...
- Code is not literature
http://www.gigamonkeys.com/code-reading/ I have started code reading groups at the last two companie ...
- asp.net权限认证:OWIN实现OAuth 2.0 之授权码模式(Authorization Code)
asp.net权限认证系列 asp.net权限认证:Forms认证 asp.net权限认证:HTTP基本认证(http basic) asp.net权限认证:Windows认证 asp.net权限认证 ...
- spotify engineering culture part 1
原文 ,因为原视频说的太快太长, 又没有字幕,于是借助youtube,把原文听&打出来了. 中文版日后有时间再翻译. one of the big succeess factors here ...
- C# Note37: Writing unit tests with use of mocking
前言 What's mocking and its benefits Mocking is an integral part of unit testing. Although you can run ...
- mongodb与mysql区别(超详细)
MySQL是关系型数据库. 优势: 在不同的引擎上有不同 的存储方式. 查询语句是使用传统的sql语句,拥有较为成熟的体系,成熟度很高. 开源数据库的份额在不断增加,mysql的份额页在持续增长. 缺 ...
- API返回错误信息的最佳实践
使用HTTP Status区分不同消息返回 最基础的三个状态200 OK, 400 Client Error, 500 Server Error 这些应该是够的, 如果客户端可以处理更细的划分, 可以 ...
随机推荐
- CF600E Lomsat gelral 树上启发式合并
题目描述 有一棵 \(n\) 个结点的以 \(1\) 号结点为根的有根树. 每个结点都有一个颜色,颜色是以编号表示的, \(i\) 号结点的颜色编号为 \(c_i\). 如果一种颜色在以 \(x\) ...
- 栈和队列数据结构的基本概念及其相关的Python实现
先来回顾一下栈和队列的基本概念: 相同点:从"数据结构"的角度看,它们都是线性结构,即数据元素之间的关系相同. 不同点:栈(Stack)是限定只能在表的一端进行插入和删除操作的线性 ...
- Jmeter JDBC Request 使用详解
本篇博文讲解以MySQL为例,搞懂JDBC Request中MySQL的使用方法,换成其它数据库, 如Oracle.PSQL也会很容易上手. 一.基本配置 1.首先我们先了解一下,不同数据库的驱动类和 ...
- ubuntu 19.10 中防火墙iptables配置
$sudo which iptables /usr/sbin/iptables说明有安装 如果没有安装,那么使用sudo apt-get install iptables 安装. 刚装机,是这个样 ...
- 3.字符设备led驱动
1.硬件原理图 由图可知,led1,led2,led3,led4,分别对应GPB5,GPB6,GPB7,GPB8,由s3c2440芯片手册可得到如下图所示,分别配置GPBCON和GPBDAT即可 2. ...
- .net core中的那些常用的日志框架(Serilog篇)
前言 上文说到Nlog日志框架,感觉它功能已经很强大,今天给大家介绍一个很不错的日志框架Serilog,根据我的了解,感觉它最大的优势是,结构化日志,它输出的日志是Json的格式,如果你使用的是Mon ...
- Mysql架构与内部模块-第一章
Mysql作为大多数中小型企业的首选数据库,也可能是众多同僚接触的第一个数据库,其热门程度不言而喻,一些相对基础的知识本系列不做赘述,主要简述Mysql相关的进阶知识. 本章将由浅入深的讲解从连接My ...
- Martyr2项目实现——Number部分的问题求解 (1) Find Pi to Nth Digit
Martyr2项目实现--Number部分的问题求解 (1) Find Pi to Nth Digit Find Pi to Nth Digit 问题描述: Find PI to the Nth Di ...
- Windows快捷键与Dos命令学习
部分Windows常用快捷键 复制:Ctrl + C 粘贴:Ctrl + V 全选:Ctrl + A 剪切:Ctrl + X 撤销:Ctrl + Z 保存:Ctrl + S 关闭窗口:Alt + F4 ...
- ServletContext使用介绍
ServletContext是一个容器(域对象)可以存储键值对数据(String key,Object value),保存在ServletContext中的数据不仅可以提供给所有的servlet使用, ...