--升级销售单据的收货/结算/付款客户信息，为空时升级为订货客户
--销售订单变更单
UPDATE T_SM_XSALORDER SET FRECCUSTOMERID = FCUSTOMERID WHERE FRECCUSTOMERID = 0;
UPDATE T_SM_XSALORDER SET FSETTLECUSTOMERID = FCUSTOMERID WHERE FSETTLECUSTOMERID = 0;
UPDATE T_SM_XSALORDER SET FPAYINGCUSTOMERID = FCUSTOMERID WHERE FPAYINGCUSTOMERID = 0;
--发货通知单
UPDATE T_SM_DELIVERNOTICE SET FRECCUSTOMERID = FCUSTOMERID WHERE FRECCUSTOMERID = 0;
UPDATE T_SM_DELIVERNOTICE SET FSETTLECUSTOMERID = FCUSTOMERID WHERE FSETTLECUSTOMERID = 0;
UPDATE T_SM_DELIVERNOTICE SET FPAYINGCUSTOMERID = FCUSTOMERID WHERE FPAYINGCUSTOMERID = 0;
--退货申请单
UPDATE T_SM_RETURNAPPLY SET FRECCUSTOMERID = FCUSTOMERID WHERE FRECCUSTOMERID = 0;
UPDATE T_SM_RETURNAPPLY SET FSETTLECUSTOMERID = FCUSTOMERID WHERE FSETTLECUSTOMERID = 0;
UPDATE T_SM_RETURNAPPLY SET FPAYINGCUSTOMERID = FCUSTOMERID WHERE FPAYINGCUSTOMERID = 0;
--委托代销清单
UPDATE T_SM_SALSAGENCY SET FRECCUSTOMERID = FCUSTOMERID WHERE FRECCUSTOMERID = 0;
UPDATE T_SM_SALSAGENCY SET FSETTLECUSTOMERID = FCUSTOMERID WHERE FSETTLECUSTOMERID = 0;
UPDATE T_SM_SALSAGENCY SET FPAYINGCUSTOMERID = FCUSTOMERID WHERE FPAYINGCUSTOMERID = 0;