问题现象: | 高于最高进价的采购订单是不允许保存的,希望能在订单保存时给与提醒,订单审核时给予控制 |
问题原因: | |
解决方案: | 您好, 您的问题经提交需求/开发人员讨论,现需求/开发最终答复如下: 增加如下触发器,在订单新增修改保存时将"超最高进价"写入表体自定义项12。 if exists (select * from sysobjects where id = object_id('Insert_MpcostCtrl_po_podetails') and xtype='tr') drop trigger Insert_MpcostCtrl_po_podetails go create trigger [Insert_MpcostCtrl_po_podetails] on [dbo].[po_podetails] for insert,update as SET NOCOUNT ON update po_podetails set cdefine33=(case when isnull(po_podetails.inatunitprice,0)>isnull(inventory.iinvmpcost,0) then '超最高进价' else'' end) from po_podetails inner join inserted on inserted.id=po_podetails.id left join inventory on inventory.cinvcode=po_podetails.cinvcode where po_podetails.id=inserted.id SET NOCOUNT OFF GO 如有问题,请及时与我沟通联系。 |
相关补丁: | |
版本: | U8 V10.0 |
模块: | 采购管理 |
产品: | 供应链 |
问题名称: | 最高进价控制 |
最后更新: | 2012-01-06 23:56:27 |