通过菜单ACTION来控制单身栏位内容的编辑修改;

范例axmt500:

   DEFINE l_xmdcua012_bk  DYNAMIC ARRAY OF RECORD # ljr
xmdcua012 LIKE xmdc_t.xmdcua012
END RECORD
DEFINE l_i_2 INT # ljr
         #應用 a43 樣板自動產生(Version:)
ON ACTION action_modify_xmdcua012
LET g_action_choice="action_modify_xmdcua012"
IF cl_auth_chk_act("action_modify_xmdcua012") THEN #add-point:ON ACTION action_modify_xmdcua012 name="menu.action_modify_xmdcua012"
DIALOG ATTRIBUTES(UNBUFFERED,FIELD ORDER FORM)
INPUT ARRAY g_xmdc_d FROM s_detail1.*
ATTRIBUTE(COUNT = g_rec_b,WITHOUT DEFAULTS, #MAXCOUNT = g_max_rec,
INSERT ROW = FALSE,
DELETE ROW = FALSE,
APPEND ROW = FALSE)
END INPUT BEFORE DIALOG
#在修改结算单价前,先把旧的结算单价备份,后面作对比判断哪行被更改了
CALL cl_set_comp_entry("xmdcua012",TRUE)
CALL cl_set_comp_entry("xmdc027,xmdcua007,xmdc001,xmdcud011,xmdc019,xmdc002,xmdc006",FALSE)
CALL cl_set_comp_entry("xmdcua009,xmdc007,xmdcud012,xmdcud013,xmdcud014,xmdcua010,xmdc008",FALSE)
CALL cl_set_comp_entry("xmdc009,xmdc024,xmdc012,xmdc013,xmdc045,xmdc016,xmdc017,xmdc010,xmdc011",FALSE)
CALL cl_set_comp_entry("xmdc015,xmdc046,xmdc047,xmdc048,xmdc023,xmdc020,xmdc021,xmdc022",FALSE)
CALL cl_set_comp_entry("xmdcunit,xmdcorga,xmdc052,xmdc049,xmdc053,xmdc050,xmdcsite,xmdc058",FALSE)
CALL cl_set_comp_entry("xmdc059,xmdc060,xmdc061,xmdcua001,xmdcua002,xmdcua003,xmdcua004,xmdcua005",FALSE)
CALL cl_set_comp_entry("xmdcua006,xmdcua011,l_pmao009,l_pmao010",FALSE) FOR l_i_2= TO g_xmdc_d.getLength()
LET l_xmdcua012_bk[l_i_2].xmdcua012 = g_xmdc_d[l_i_2].xmdcua012
END FOR ON ACTION accept
#判断结算单价是否已被修改,只处理已经被修改的行
FOR l_i_2= TO g_xmdc_d.getLength()
IF NOT cl_null(g_xmdc_d[l_i_2].xmdcseq) THEN
IF g_xmdc_d[l_i_2].xmdcua012 = l_xmdcua012_bk[l_i_2].xmdcua012 OR g_xmdc_d[l_i_2].xmdcua012 IS NULL THEN
CONTINUE FOR
ELSE
CALL axmt500_setPrice2_2(g_xmdc_d[l_i_2].xmdcseq,
g_xmdc_d[l_i_2].xmdc007,
g_xmdc_d[l_i_2].xmdcua012)
RETURNING g_xmdc_d[l_i_2].xmdcua013,g_xmdc_d[l_i_2].xmdcua014,
g_xmdc_d[l_i_2].xmdcua015,g_xmdc_d[l_i_2].xmdcua016
DISPLAY BY NAME g_xmdc_d[l_i_2].xmdcua013,g_xmdc_d[l_i_2].xmdcua014,
g_xmdc_d[l_i_2].xmdcua015,g_xmdc_d[l_i_2].xmdcua016
#更新结算单价修改者、修改时间
LET g_xmdc_d[l_i_2].xmdcua017 = g_user
LET g_xmdc_d[l_i_2].xmdcua018 = cl_get_current()
UPDATE xmdc_t SET xmdcua017=g_xmdc_d[l_i_2].xmdcua017,xmdcua018=g_xmdc_d[l_i_2].xmdcua018
WHERE xmdcent=g_enterprise AND xmdcsite=g_site AND xmdcdocno=g_xmda_m.xmdadocno AND xmdcseq=g_xmdc_d[l_i_2].xmdcseq
SELECT ooag011 INTO g_xmdc_d[l_i_2].xmdcua017_desc FROM ooag_t
WHERE ooagent=g_enterprise AND ooag001=g_xmdc_d[l_i_2].xmdcua017
DISPLAY BY NAME g_xmdc_d[l_i_2].xmdcua017,g_xmdc_d[l_i_2].xmdcua018,g_xmdc_d[l_i_2].xmdcua017_desc
END IF
END IF
END FOR ACCEPT DIALOG ON ACTION cancel #在dialog button (放棄) EXIT DIALOG ON ACTION close #在dialog 右上角 (X) EXIT DIALOG ON ACTION exit #toolbar 離開 EXIT DIALOG #交談指令共用ACTION
&include "common_action.4gl"
CONTINUE DIALOG END DIALOG
#END add-point END IF
PRIVATE FUNCTION axmt500_setPrice2_2(l_xmdcseq,l_xmdc007,l_xmdcua012)
#修改结算单价,根据新的结算单价计算结算金额等,更新、回传并显示 DEFINE l_xmdcseq LIKE xmdc_t.xmdcseq #单身项次
DEFINE l_xmdc001 LIKE xmdc_t.xmdc001 #单身料号
DEFINE l_xmdc007 LIKE xmdc_t.xmdc007 #单身数量
DEFINE l_xmdcua012 LIKE xmdc_t.xmdcua012 #单身结算单价 DEFINE l_xmdcua013 LIKE xmdc_t.xmdcua013 #回传参数,结算金额
DEFINE l_xmdcua014 LIKE xmdc_t.xmdcua014 #回传参数,结算未税单价
DEFINE l_xmdcua015 LIKE xmdc_t.xmdcua015 #回传参数,结算未税金额
DEFINE l_xmdcua016 LIKE xmdc_t.xmdcua016 #回传参数,结算税额 #判断订单的单价是否含税
#单价含税
IF g_xmda_m.xmda013 THEN
LET l_xmdcua013 = l_xmdcua012 * l_xmdc007
LET l_xmdcua014 = l_xmdcua012 / ( + g_xmda_m.xmda012 / )
LET l_xmdcua015 = l_xmdcua014 * l_xmdc007
LET l_xmdcua016 = l_xmdcua013 - l_xmdcua015
#单价不含税
ELSE
LET l_xmdcua013 = l_xmdcua012 * l_xmdc007
LET l_xmdcua014 = 0.00
LET l_xmdcua015 = 0.00
LET l_xmdcua016 = 0.00
END IF
#更新
UPDATE xmdc_t SET xmdcua012=l_xmdcua012,
xmdcua013=l_xmdcua013,
xmdcua014=l_xmdcua014,
xmdcua015=l_xmdcua015,
xmdcua016=l_xmdcua016
WHERE xmdcent=g_enterprise AND xmdcsite=g_site AND xmdcdocno=g_xmda_m.xmdadocno AND xmdcseq=l_xmdcseq
#返回值
RETURN l_xmdcua013,l_xmdcua014,l_xmdcua015,l_xmdcua016
END FUNCTION

T100——菜单action控制单身栏位的修改的更多相关文章

  1. 菜单ACTION控制栏位字段编辑,点击菜单ACTION才能编辑指定的栏位

    范例(axmt500): 目的,控制新增的栏位(价格清单2),需点击菜单栏“修改价格清单2”才能对相应的栏位进行编辑修改,并记录修改人.日期: 1)在规格上增加新ACTION——action_modi ...

  2. T100——修改单身栏位,开窗,当前行

    PRIVATE FUNCTION axmt500_update_xmdc028() ###更改出货库位 DEFINE l_i INT DEFINE l_index INT DIALOG ATTRIBU ...

  3. T100——作业action执行其他P作业,后台背景执行完后才能继续操作改作业

    范例:如axmt500订单,查询开单占用量: 客制作业cxmp500,通过参数-订单号,查询该订单下的料件,目前有库存量.开单占用量.库存可用量,查询后更新到该订单下的单身对应栏位: 现在axmt50 ...

  4. input 栏位光标末尾闪烁

    var input1 =window.document.getElementById("input1").createTextRange(); input1.collapse(fa ...

  5. 6 关于 Oracle NULL栏位和PL./SQL执行实验

    今日有针对NULL值有了相关实验. 对NULL 值插入的讨论. 1, PL/SQL 中可以执行插入''或者NULL 的操作, 前提是栏位允许为空. 2, 可以对NULL进行一系列数据库运算. 如:   ...

  6. ZZ_INEERNAL每个栏位的含义

    ZZ_INEERNAL包含10列,每列之间用,隔开 第一列:exception class,有KE/NE/JE/EE等 第二列:pid 第三列:tid 第四列:固定是99 第五列:固定是/data/c ...

  7. Linux显示各栏位的标题信息列

    Linux显示各栏位的标题信息列 youhaidong@youhaidong-ThinkPad-Edge-E545:~$ who -H 名称 线路 时间 备注 youhaidong :0 2015-0 ...

  8. Rails Migration Data Model栏位修改及数据类型介绍

    测试版本Ruby:2.3.1   Rails:5.0.1 一.增加栏位       给devise默认的用户新增增加username字段 $ rails generate migration add_ ...

  9. SAP 销售条件表增强栏位

    有时遇到一个比较特殊的业务,比如公司间免费订单,既要让价格为0,不读取VK11里创建的价格, 又要让公司间的价格读取VK11,这实际上是有矛盾的,也就是说一个订单里面的两行,物料一样,客户一样,就会出 ...

随机推荐

  1. iOS (APP)进程间8中常用通信方式总结

    1 URL Scheme 2 Keychain 3 UIPasteboard 4 UIDocumentInteractionController 5 local socket 6 AirDrop 7 ...

  2. 微信小程序之状态管理B

    书接上文哈 咱们定义了个状态管理对象 逻辑应该是这样的 if (json.product.activity.type == "Coin1") { this.activity.coi ...

  3. @Transactional(事务讲解)和springboot 整合事务

    概述 事务在编程中分为两种:声明式事务处理和编程式事务处理 编程式事务处理:编码方式实现事务管理,常与模版类TransactionTemplate(推荐使用) 在业务代码中实现事务. 可知编程式事务每 ...

  4. SR论文代码汇总

    1.SRCNN 页面  里面有论文,matlab和caffe代码. Tensorflow https://github.com/tegg89/SRCNN-Tensorflow 2.ESPCN 论文链接 ...

  5. WebServer_参考

    参考:http://blog.csdn.net/cjsafty/article/details/9323425 这里顺便记录下几个页面      lajphttps://code.google.com ...

  6. Neither BindingResult nor plain target object for bean name 'command' available as request attribute

    最近用JSR303在表单提交时使用Java Bean Validation验证数据.报错堆栈如下: java.lang.IllegalStateException: Neither BindingRe ...

  7. DELPHI ClientData使用详解

    在三层结构中,TClientDataSet的地位是不可估量的,她的使用正确与否,是十分关键的,本文从以下几个方面阐述她的使用,希望对你有所帮助. 1.动态索引procedure TForm1.DBGr ...

  8. Realm学习总结

    参考博客: http://www.jianshu.com/p/096bec929f2a http://www.cnblogs.com/ilyy/p/5648051.html 参考的博客介绍很详细,我就 ...

  9. localhost解释

    .localhost解释 localhost意思是只能从本地访问 比如说 kibana的配置文件里面写的是localhost,那就无法从浏览器访问到服务,必须写ip地址才可以从浏览器访问到

  10. Markov logic network

    A Markov logic network (or MLN) is a probabilistic logic which applies the ideas of a Markov network ...