销售订单先应收后发货时信用重复占用如何解决?

栏目:云星空知识作者:金蝶来源:金蝶云社区发布:2024-09-23浏览:1

销售订单先应收后发货时信用重复占用如何解决?

【背景】销售订单下推了财务应收单后,销售订单再下推发货通知单和销售出库单,此时应收单和出库单都会重复占用信用额度。

【解决方案】对于销售订单有两条支线的业务,需要处理销售订单下推了财务应收后,发货通知单和销售出库单不再更新信用。

【操作方法】:

 

1、打开BOS,在发货通知单和销售出库单中新增一个自定义字段:

复选框 F_TMP_NOCRE 默认不勾选

 

 

2、在发货通知单和销售出库单中所有有配有“更新信用额度”的操作(提交,审核,反审核,撤销,终止,反终止,关闭,反关闭等),修改服务中的更新条件,增加条件 F_TMP_NOCRE = 0

 


在每个操作的前提条件中增加  F_TMP_NOCRE= F_TMP_NOCRE  目的是执行操作时要加载这个字段


 

3、所有不需要更新信用的单据(比如发货通知单、销售出库单),手工勾上不更新信用这个自定义字段;或者设置根据满足一定条件自动勾选上;

 

如有历史单据需要处理,可参考以下SQL 执行(注意具体哪些单据要更新,条件需要自己做调整)


UPDATE T_SAL_DELIVERYNOTICE SET F_TMP_NOCRE = '0' WHERE ISNULL(F_TMP_NOCRE,' ') <> '1';

UPDATE T_SAL_OUTSTOCK SET F_TMP_NOCRE = '0' WHERE ISNULL(F_TMP_NOCRE,' ') <> '1';


UPDATE T_SAL_DELIVERYNOTICE  SET F_TMP_NOCRE = '1'

WHERE FID IN (

SELECT TE.FID  FROM T_SAL_DELIVERYNOTICEENTRY_LK TLK

JOIN T_SAL_DELIVERYNOTICEENTRY TE ON TLK.FENTRYID = TE.FENTRYID

WHERE TLK.FSID IN (

SELECT FSID FROM T_AR_RECEIVABLEENTRY_LK WHERE FSTABLENAME = 'T_SAL_ORDERENTRY'

) AND TLK.FSTABLENAME = 'T_SAL_ORDERENTRY'

);


UPDATE T_SAL_OUTSTOCK SET F_TMP_NOCRE = '1'

WHERE FID IN (

SELECT TE.FID  FROM T_SAL_OUTSTOCKENTRY_LK TLK

JOIN T_SAL_OUTSTOCKENTRY TE ON TLK.FENTRYID = TE.FENTRYID

WHERE TLK.FSID IN (

SELECT FSID FROM T_AR_RECEIVABLEENTRY_LK WHERE FSTABLENAME = 'T_SAL_ORDERENTRY'

)  AND TLK.FSTABLENAME = 'T_SAL_ORDERENTRY'

);



UPDATE T_SAL_OUTSTOCK SET F_TMP_NOCRE = '1'

WHERE FID IN (

SELECT TE.FID  FROM T_SAL_OUTSTOCKENTRY_LK TLK

JOIN T_SAL_OUTSTOCKENTRY TE ON TLK.FENTRYID = TE.FENTRYID

WHERE TLK.FSID IN (

SELECT TLK1.FENTRYID  FROM T_SAL_DELIVERYNOTICEENTRY_LK TLK1

WHERE TLK1.FSID IN (

SELECT FSID FROM T_AR_RECEIVABLEENTRY_LK WHERE FSTABLENAME = 'T_SAL_ORDERENTRY'

) AND TLK1.FSTABLENAME = 'T_SAL_ORDERENTRY'

)  AND TLK.FSTABLENAME = 'T_SAL_DELIVERYNOTICEENTRY'

);


4、进行信用重算  全部重算,勾上是否重算关联关系表选项

 

 


销售订单先应收后发货时信用重复占用如何解决?

【背景】销售订单下推了财务应收单后,销售订单再下推发货通知单和销售出库单,此时应收单和出库单都会重复占用信用额度。【解决方案】对于...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息