$$$$$$f_get_descry.sql^^^^dne

00001/))4,61(lamiced sa tluser_sl@(tsac nruter

)tluser_sl@(esrever = tluser_sl@ tceles

dne

1+i@=i@ tceles

)))2 - i@ - nel_ll@( * 2( - ))1,i@,txet_sl@(gnirtsbus(iicsa(rahc+tluser_sl@=tluser_sl@ tceles

nigeb

nel_ll@=<i@ elihw

1=i@ tceles

''=tluser_sl@ tceles

)txet_sl@(nel=nel_ll@ tceles

))ecruos_sa@(mirtr(mirtl=txet_sl@ tceles

)05(rahcrav tluser_sl@,)05(rahcrav txet_sl@ eralced

tni nel_ll@,tni i@ eralced

0 nruter ''=ecruos_sa@ ro llun si ecruos_sa@ fi

 nigeb

sa

)4,61(lamiced  snruter

))05(rahcrav ecruos_sa@(yrcsed_teg_f noitcnuf   etaerc


数函卡值储密解--


og

yrcsed_teg_f noitcnuf pord  

)'yrcsed_teg_f'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$f_get_encrypt.sql^^^^

dne

tluser_sl@ nruter	


dne	

1+i@=i@ tceles		

)))2 - i@ - nel_ll@( * 2( + ))1,i@,txet_sl@(gnirtsbus(iicsa(rahc+tluser_sl@=tluser_sl@ tceles		

nigeb	

nel_ll@=<i@ elihw	

1=i@ tes	

''=tluser_sl@ tceles	

)txet_sl@(esrever = txet_sl@ tceles	

)txet_sl@(nel=nel_ll@ tceles	

	))ecruos_sa@(mirtr(mirtl=txet_sl@ tceles	


)05(rahcrav tluser_sl@,)05(rahcrav txet_sl@ eralced	

tni nel_ll@,tni i@ eralced	


LLUN nruter ''=ecruos_sa@ ro llun si ecruos_sa@ fi	

 nigeb

sa

)05(rahcrav  snruter

))05(rahcrav ecruos_sa@(]tpyrcne_teg_f[.]obd[ noitcnuf    etaerc


og

tpyrcne_teg_f noitcnuf pord  

)'tpyrcne_teg_f'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$p_cashier_daysum_day_report(MS).sql^^^^

dne

musyad_reihsac# morf * tceles  

        

 on_hcnarb.a = on_hcnarb.musyad_reihsac#        

dna di_repo.a = di_repo.musyad_reihsac#        

dna etad_repo.a = etad_repo.musyad_reihsac# erehw  

a vig_reihsac_pmet# morf  

)0,tma_vig.a(llunsi + )0,BMR_hsac_evig(llunsi = BMR_hsac_evig tes musyad_reihsac# etadpu  

  

on_hcnarb,di_repo,etad_repo yb puorg  

))ONhcnarb_sa@ ekil on_hcnarb dna '%' >< ONhcnarb_sa@( ro )'%'= ONhcnarb_sa@((  

dna )) direpo_sa@ ekil di_repo dna '%' >< direpo_sa@( ro )'%'= direpo_sa@((  

dna ot_tda@ DNA morf_tda@ NEEWTEB etad_repo erehw

vig_musyad_rehsac_mr_t morf  

vig_reihsac_pmet# otni  

tma_vig sa )tma_vig(mus,on_hcnarb,di_repo,etad_repo tceles  

  

etar_nioc,)121,etad_repo.a,)01(rahcrav(trevnoc,di_repo.a  

,eman_hcnarb.b  

,on_hcnarb.a  

 yb puorg  

))'1','0'( ni galf_yap.c( dna )yaw_yap.c =* yaw_yap.a( dna		

)         

)            

)             

onslc_hcnarb@ ekil )'',onslc_hcnarb(llunsi erehw ofni_hcnarb_db_t morf on_hcnarb tceles(ni )3,on_hcnarb.a(tfel dna              

 )on_hcnarb.a=on_hcnarb.ofni_hcnarb_db_t dna '5'=epyt_edart erehw ofni_hcnarb_db_t morf 1 tceles( stsixe dna              

''=)on_hcnarb.a=on_hcnarb.ofni_hcnarb_db_t erehw ofni_hcnarb_db_t morf )'',))onslc_hcnarb(mirtr(mirtl(llunsi tceles(( ro         

)onslc_hcnarb@ ekil )'',onslc_hcnarb(llunsi erehw ofni_hcnarb_db_t morf on_hcnarb tceles(ni on_hcnarb.a(      

dna )))llun si omem.a ro omem@ ekil omem.a ro '值储转分积'>< omem.a( dna '%'>< omem@( ro )'%'= omem@((      

dna ) on_hcnarb.b = on_hcnarb.a (      

dna ))ONhcnarb_sa@ ekil on_hcnarb.a dna '%' >< ONhcnarb_sa@( ro )'%'= ONhcnarb_sa@((      

dna )) direpo_sa@ ekil di_repo.a dna '%' >< direpo_sa@( ro )'%'= direpo_sa@((  	

dna  ) ot_tda@ DNA morf_tda@ NEEWTEB etad_repo.a ( EREHW

c ofni_tnemyap_db_t,b ofni_hcnarb_db_t,a wolfyap_mr_t MORF

musyad_reihsac# otni

etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht '款回帐挂' >< )'',omem(llunsi dna '金订' >< )'',omem(llunsi dna )'D'=yaw_lles ro 'B'=yaw_lles( dna 'FXW'=yaw_yap.a nehw             

)0,tnuoma_yap(llunsi neht '款回帐挂' >< )'',omem(llunsi dna '金订' >< )'',omem(llunsi dna 'A'=yaw_lles dna 'FXW'=yaw_yap.a nehw             

 esac(mus =  fxw_drac_elas 	

,etar_nioc * ) dne  0 esle )0,tnuoma_yap(llunsi neht '款回帐挂' = )'',omem(llunsi  nehw esac(mus =  hzg_elas		

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht 'B'=yaw_lles dna 'GHC'=yaw_yap.a nehw 				

)0,tnuoma_yap(llunsi neht 'A'=yaw_lles dna 'GHC'=yaw_yap.a nehw             

 esac(mus=GHC_ELAS         

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap.a(llunsi neht )'B'=yaw_lles.a ro 'A'=yaw_lles.a( dna 'YAP_DRO' >< )'',omem.a(llunsi dna )'金订退' = )'',omem.a(llunsi ro '金订' = )'',omem.a(llunsi ro 'DRO'=yaw_yap.a( nehw             

 esac(mus =  dro_hsac_edart         

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht )'D'=yaw_lles ro 'B'=yaw_lles( dna )'FXW','CHS' ,'FJD','FIG' ,'HZG' ,'PHS' ,'VAS' ,'PIV' ,'DRC' ,'QHC' ,'DSU' ,'DKH' ,'BMR','GHC','DRO'(ni ton yaw_yap.a nehw             

)0,tnuoma_yap(llunsi neht 'A'=yaw_lles dna )'FXW','CHS' ,'FJD','FIG' ,'HZG' ,'PHS' ,'VAS' ,'PIV' ,'DRC' ,'QHC' ,'DSU' ,'DKH' ,'BMR','GHC','DRO'(ni ton yaw_yap.a nehw             

 esac(mus =  yawyap_rehto         

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht 'A'=yaw_lles dna 'FJD'=yaw_yap.a nehw             

 esac(mus =  fjd_hsac_edart			

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht 'A'=yaw_lles dna 'HZG'=yaw_yap.a nehw             

 esac(mus =  zg_hsac_edart         

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht 'B'=yaw_lles dna 'SFIG'=yaw_yap.a nehw             

)0,tnuoma_yap(llunsi neht 'A'=yaw_lles dna 'SFIG'=yaw_yap.a nehw             

 esac(mus =  BMR_hsac_evig         

型类段字成生确正时表时临成生为只，式方款付的在存不个一定指处此--          

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht 'B'=yaw_lles dna 'PIV'=yaw_yap.a nehw             

)0,tnuoma_yap(llunsi neht 'A'=yaw_lles dna 'PIV'=yaw_yap.a nehw             

 esac(mus =  PIV_drac_elas         

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht )'D'=yaw_lles ro 'B'=yaw_lles( dna 'CHS'=yaw_yap.a nehw             

)0,tnuoma_yap(llunsi neht 'A'=yaw_lles dna 'CHS'=yaw_yap.a nehw             

 esac(mus =  CHS_drac_elas			

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht )'D'=yaw_lles ro 'B'=yaw_lles( dna 'PHS'=yaw_yap.a nehw             

)0,tnuoma_yap(llunsi neht 'A'=yaw_lles dna 'PHS'=yaw_yap.a nehw             

 esac(mus =  PHS_drac_elas         

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht )'D'=yaw_lles ro 'B'=yaw_lles( dna 'VAS'=yaw_yap.a nehw             

)0,tnuoma_yap(llunsi neht 'A'=yaw_lles dna 'VAS'=yaw_yap.a nehw             

 esac(mus =  VAS_drac_elas         

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht '款回帐挂' >< )'',omem(llunsi dna '金订' >< )'',omem(llunsi dna )'D'=yaw_lles ro 'B'=yaw_lles( dna 'DRC'=yaw_yap.a nehw             

)0,tnuoma_yap(llunsi neht '款回帐挂' >< )'',omem(llunsi dna '金订' >< )'',omem(llunsi dna 'A'=yaw_lles dna 'DRC'=yaw_yap.a nehw             

 esac(mus =  KNAB_drac_elas         

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht )'D'=yaw_lles ro 'B'=yaw_lles( dna 'QHC'=yaw_yap.a nehw             

)0,tnuoma_yap(llunsi neht 'A'=yaw_lles dna 'QHC'=yaw_yap.a nehw             

 esac(mus =  BMR_llib_elas         

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht )'D'=yaw_lles ro 'B'=yaw_lles( dna 'DSU'=yaw_yap.a nehw             

)0,tnuoma_yap(llunsi neht 'A'=yaw_lles dna 'DSU'=yaw_yap.a nehw             

 esac(mus =  DSU_hsac_elas         

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht )'D'=yaw_lles ro 'B'=yaw_lles( dna 'DKH'=yaw_yap.a nehw             

)0,tnuoma_yap(llunsi neht 'A'=yaw_lles dna 'DKH'=yaw_yap.a nehw             

 esac(mus =  DKH_hsac_elas         

,etar_nioc * ) dne  0 esle             

)0,tnuoma_yap(llunsi neht )'D'=yaw_lles.a ro )'金订退' >< )'',omem(llunsi dna  'B'=yaw_lles.a(( dna 'BMR'=yaw_yap.a nehw             

)0,tnuoma_yap(llunsi neht '款回帐挂' >< )'',omem(llunsi dna '金订' >< )'',omem(llunsi dna 'A'=yaw_lles.a dna 'BMR'=yaw_yap.a nehw             

 esac(mus =  BMR_hsac_elas         

,)121,etad_repo,)01(rahcrav(trevnoc = etad_repo         

,) di_repo.a = di_repo erehw rotarepo_sys_t morf eman_repo tceles( = eman_reihsac         

   ,di_repo.a ,eman_hcnarb.b,on_hcnarb.a TCELES   

nigeb

sa

))03(rahcrav omem@,)6(rahcrav onslc_hcnarb@,)6(rahcrav ONhcnarb_sa@,)6(rahcrav direpo_sa@  

,emitetad ot_tda@,emitetad morf_tda@(troper_yad_musyad_reihsac_p erudecorp etaerc



og

troper_yad_musyad_reihsac_p erudecorp pord  

)'troper_yad_musyad_reihsac_p'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$p_cashier_daysum_report(MS).sql^^^^

dne

musyad_reihsac# morf * tceles  

        

 on_hcnarb.a = on_hcnarb.musyad_reihsac#        

dna di_repo.a = di_repo.musyad_reihsac# erehw  

a vig_reihsac_pmet# morf  

)4,)0,tma_vig.a(llunsi(dnuor + )0,BMR_hsac_evig(llunsi = BMR_hsac_evig tes musyad_reihsac# etadpu  

  

on_hcnarb,di_repo yb puorg  

))ONhcnarb_sa@ ekil on_hcnarb dna '%' >< ONhcnarb_sa@( ro )'%'= ONhcnarb_sa@((  

dna )) direpo_sa@ ekil di_repo dna '%' >< direpo_sa@( ro )'%'= direpo_sa@((  

dna ot_tda@ DNA morf_tda@ NEEWTEB etad_repo erehw

vig_musyad_rehsac_mr_t morf  

vig_reihsac_pmet# otni  

tma_vig sa )tma_vig(mus,on_hcnarb,di_repo tceles  

  

etar_nioc,di_repo.a  

,eman_hcnarb.b  

,on_hcnarb.a  

 yb puorg  

))'1','0'( ni galf_yap.c( dna )yaw_yap.c =* yaw_yap.a( dna		

)         

)            

)             

onslc_hcnarb@ ekil )'',onslc_hcnarb(llunsi erehw ofni_hcnarb_db_t morf on_hcnarb tceles(ni )3,on_hcnarb.a(tfel dna              

 )on_hcnarb.a=on_hcnarb.ofni_hcnarb_db_t dna '5'=epyt_edart erehw ofni_hcnarb_db_t morf 1 tceles( stsixe dna              

''=)on_hcnarb.a=on_hcnarb.ofni_hcnarb_db_t erehw ofni_hcnarb_db_t morf )'',))onslc_hcnarb(mirtr(mirtl(llunsi tceles(( ro         

)onslc_hcnarb@ ekil )'',onslc_hcnarb(llunsi erehw ofni_hcnarb_db_t morf on_hcnarb tceles(ni on_hcnarb.a(      

dna )))llun si omem.a ro omem@ ekil omem.a ro '值储转分积'>< omem.a( dna '%'>< omem@( ro )'%'= omem@((      

dna ) on_hcnarb.b = on_hcnarb.a (      

dna ))ONhcnarb_sa@ ekil on_hcnarb.a dna '%' >< ONhcnarb_sa@( ro )'%'= ONhcnarb_sa@((      

dna )) direpo_sa@ ekil di_repo.a dna '%' >< direpo_sa@( ro )'%'= direpo_sa@((  	

dna  ) ot_tda@ DNA morf_tda@ NEEWTEB etad_repo.a ( EREHW

c ofni_tnemyap_db_t,b ofni_hcnarb_db_t,a wolfyap_mr_t MORF

musyad_reihsac# otni

etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht '款回帐挂' >< )'',omem(llunsi dna '金订' >< )'',omem(llunsi dna )'D'=yaw_lles ro 'B'=yaw_lles( dna 'FXW'=yaw_yap.a nehw             

)0,tnuoma_yap(llunsi neht '款回帐挂' >< )'',omem(llunsi dna '金订' >< )'',omem(llunsi dna 'A'=yaw_lles dna 'FXW'=yaw_yap.a nehw             

 esac(mus =  FXW_drac_elas	

,etar_nioc * ) dne  0 esle )0,tnuoma_yap(llunsi neht '款回帐挂' = )'',omem(llunsi  nehw esac(mus =  hzg_elas		

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht 'B'=yaw_lles dna 'GHC'=yaw_yap.a nehw 				

)0,tnuoma_yap(llunsi neht 'A'=yaw_lles dna 'GHC'=yaw_yap.a nehw             

 esac(mus=GHC_ELAS         

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap.a(llunsi neht )'B'=yaw_lles.a ro 'A'=yaw_lles.a( dna 'YAP_DRO' >< )'',omem.a(llunsi dna )'金订退' = )'',omem.a(llunsi ro '金订' = )'',omem.a(llunsi ro 'DRO'=yaw_yap.a( nehw             

 esac(mus =  dro_hsac_edart         

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht )'D'=yaw_lles ro 'B'=yaw_lles( dna )'FXW','CHS' ,'FJD','FIG' ,'HZG' ,'PHS' ,'VAS' ,'PIV' ,'DRC' ,'QHC' ,'DSU' ,'DKH' ,'BMR','GHC','DRO'(ni ton yaw_yap.a nehw             

)0,tnuoma_yap(llunsi neht 'A'=yaw_lles dna )'FXW','CHS' ,'FJD','FIG' ,'HZG' ,'PHS' ,'VAS' ,'PIV' ,'DRC' ,'QHC' ,'DSU' ,'DKH' ,'BMR','GHC','DRO'(ni ton yaw_yap.a nehw             

 esac(mus =  yawyap_rehto         

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht 'A'=yaw_lles dna 'FJD'=yaw_yap.a nehw             

 esac(mus =  fjd_hsac_edart			

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht 'A'=yaw_lles dna 'HZG'=yaw_yap.a nehw             

 esac(mus =  zg_hsac_edart         

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht 'B'=yaw_lles dna 'SFIG'=yaw_yap.a nehw             

)0,tnuoma_yap(llunsi neht 'A'=yaw_lles dna 'SFIG'=yaw_yap.a nehw             

 esac(mus =  BMR_hsac_evig         

型类段字成生确正时表时临成生为只，式方款付的在存不个一定指处此--         

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht 'B'=yaw_lles dna 'PIV'=yaw_yap.a nehw             

)0,tnuoma_yap(llunsi neht 'A'=yaw_lles dna 'PIV'=yaw_yap.a nehw             

 esac(mus =  PIV_drac_elas         

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht )'D'=yaw_lles ro 'B'=yaw_lles( dna 'CHS'=yaw_yap.a nehw             

)0,tnuoma_yap(llunsi neht 'A'=yaw_lles dna 'CHS'=yaw_yap.a nehw             

 esac(mus =  CHS_drac_elas			

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht )'D'=yaw_lles ro 'B'=yaw_lles( dna 'PHS'=yaw_yap.a nehw             

)0,tnuoma_yap(llunsi neht 'A'=yaw_lles dna 'PHS'=yaw_yap.a nehw             

 esac(mus =  PHS_drac_elas         

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht )'D'=yaw_lles ro 'B'=yaw_lles( dna 'VAS'=yaw_yap.a nehw             

)0,tnuoma_yap(llunsi neht 'A'=yaw_lles dna 'VAS'=yaw_yap.a nehw             

 esac(mus =  VAS_drac_elas         

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht '款回帐挂' >< )'',omem(llunsi dna '金订' >< )'',omem(llunsi dna )'D'=yaw_lles ro 'B'=yaw_lles( dna 'DRC'=yaw_yap.a nehw             

)0,tnuoma_yap(llunsi neht '款回帐挂' >< )'',omem(llunsi dna '金订' >< )'',omem(llunsi dna 'A'=yaw_lles dna 'DRC'=yaw_yap.a nehw             

 esac(mus =  KNAB_drac_elas         

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht )'D'=yaw_lles ro 'B'=yaw_lles( dna 'QHC'=yaw_yap.a nehw             

)0,tnuoma_yap(llunsi neht 'A'=yaw_lles dna 'QHC'=yaw_yap.a nehw             

 esac(mus =  BMR_llib_elas         

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht )'D'=yaw_lles ro 'B'=yaw_lles( dna 'DSU'=yaw_yap.a nehw             

)0,tnuoma_yap(llunsi neht 'A'=yaw_lles dna 'DSU'=yaw_yap.a nehw             

 esac(mus =  DSU_hsac_elas         

,etar_nioc *) dne 0 esle             

)0,tnuoma_yap(llunsi neht )'D'=yaw_lles ro 'B'=yaw_lles( dna 'DKH'=yaw_yap.a nehw             

)0,tnuoma_yap(llunsi neht 'A'=yaw_lles dna 'DKH'=yaw_yap.a nehw             

 esac(mus =  DKH_hsac_elas         

,etar_nioc * ) dne  0 esle             

)0,tnuoma_yap(llunsi neht )'D'=yaw_lles.a ro )'金订退' >< )'',omem(llunsi dna  'B'=yaw_lles.a(( dna 'BMR'=yaw_yap.a nehw             

)0,tnuoma_yap(llunsi neht '款回帐挂' >< )'',omem(llunsi dna '金订' >< )'',omem(llunsi dna 'A'=yaw_lles.a dna 'BMR'=yaw_yap.a nehw             

 esac(mus =  BMR_hsac_elas         

,) di_repo.a = di_repo erehw rotarepo_sys_t morf eman_repo tceles( = eman_reihsac         

   ,di_repo.a ,eman_hcnarb.b,on_hcnarb.a TCELES   

nigeb

sa

))03(rahcrav omem@,)6(rahcrav onslc_hcnarb@,)6(rahcrav ONhcnarb_sa@,)6(rahcrav direpo_sa@  

,emitetad ot_tda@,emitetad morf_tda@(troper_musyad_reihsac_p erudecorp etaerc


og

troper_musyad_reihsac_p erudecorp pord  

)'troper_musyad_reihsac_p'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$p_get_oper_data_grant(MS).sql^^^^


dne

ruc etacollaed

ruc esolc


dne   

dne	


tnarg_atad_sl@,epyt_tnarg_sl@,onslc_sl@ otni ruc hctef            


限权牌品 -- '%' + ))onslc_sl@(mirtl(mirtr ekil dnarb_meti erehw ofni_meti_db_t morf '1',on_meti,direpo_sl@ tceles    	

)epyt_tnarg,on_meti,di_repo(tnarg_atad_repo_sys_t otni tresni    	

esle  	

限权别类 -- '%' + ))onslc_sl@(mirtl(mirtr ekil onslc_meti erehw ofni_meti_db_t morf '0',on_meti,direpo_sl@ tceles    	

)epyt_tnarg,on_meti,di_repo(tnarg_atad_repo_sys_t otni tresni    	

别类 -- '0'=epyt_tnarg_sl@ fi  	


nigeb	

esle	

tnarg_atad_sl@,epyt_tnarg_sl@,onslc_sl@ otni ruc hctef   	

限权无 -- '0'=tnarg_atad_sl@ fi        

nigeb    

 0=sutats_hctef@@ elihw


tnarg_atad_sl@,epyt_tnarg_sl@,onslc_sl@ otni ruc hctef

ruc  nepo

direpo_sl@=di_repo erehw tnarg_atad_sys_t morf tnarg_atad,epyt_tnarg,onslc_meti tceles

rof rosruc ruc eralced


direpo_sl@=di_repo erehw tnarg_atad_repo_sys_t morf eteled


nruter 0 = tnuoc@ fi


direpo_sl@=di_repo erehw rotarepo_sys_t morf )*(tnuoc = tnuoc@ tceles



tni         tnuoc@ eralced

)1(rahcrav tnarg_atad_sl@ eralced

)1(rahcrav epyt_tnarg_sl@ eralced

)01(rahcrav      onslc_sl@ eralced

nigeb


sa

))01(rahcrav direpo_sl@(tnarg_atad_repo_teg_p erudecorp  etaerc



og

tnarg_atad_repo_teg_p erudecorp pord  

)'tnarg_atad_repo_teg_p'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$p_report_kd_day(MS).sql^^^^

dne

	)121 ,etad_repo.a ,)01(rahc(trevnoc ,on_hcnarb.a yb redro

)121 ,etad_repo.a ,)01(rahc(trevnoc	

						,eman_hcnarb.b	

,on_hcnarb.a yb puorg 

)))'B' = yaw_lles dna on_hcnarb_sa@ ekil on_hcnarb dna morf_tda@ => etad_repo erehw wolfyap_mr_t morf on_rehcuov tcnitsid tceles( ni ton on_wolf.a dna '1' = teehsybter_ezylana_elas@( ro '1' >< teehsybter_ezylana_elas@ (		

dna on_hcnarb.b = on_hcnarb.a erehw	

b )	

  ofni_hcnarb_db_t morf eman_hcnarb ,on_hcnarb tceles		

(	

,a )	

))'B' = yaw_lles dna '1' >< teehsybter_ezylana_elas@( ro ) 'C' ,'A' (ni yaw_lles( dna		

 on_hcnarb_sa@ ekil on_hcnarb dna		

 ot_tda@ dna morf_tda@ neewteb etad_repo erehw		

 wolfelas_mr_t morf		

 yenom_elas ,on_wolf ,etad_repo ,on_hcnarb tceles		

 (	

 morf	

		)yenom_elas.a(mus = tma_lot		

,)on_wolf.a tcnitsid(tnuoc = tnuoc		

 ,)121 ,etad_repo.a ,)01(rahc(trevnoc = etad_repo		

,eman_hcnarb.b		

,on_hcnarb.a tceles 	

式方货退计统除排要需否是制控关开过通-- 	

	

'0' = teehsybter_ezylana_elas@ tes		

llun si teehsybter_ezylana_elas@ fi	

'000' = on_hcnarb dna 'teehsybter_ezylana_elas' = di_rav_sys erehw metsys_sys_t morf eulav_rav_sys = teehsybter_ezylana_elas@ tceles--	

	

)1(rahcrav	teehsybter_ezylana_elas@		

eralced	

析分单客日》析分单客--	

nigeb

sa

))4(rahc direpo_sa@ ,)6(rahcrav on_hcnarb_sa@ ,emitetad ot_tda@ ,emitetad morf_tda@(yad_dk_troper_p erudecorp etaerc


og

yad_dk_troper_p erudecorp pord  

)'yad_dk_troper_p'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_generate_di_sheet(MS).sql^^^^

dne


dne	

)1 ,61 ,'错出单库入调直的成生核审，败失出调止终'(rorresiar		

 1- = ter@ tes		

nigeb	

 0 >< rorre@@ fi	

on_teehs_id@ = on_teehs erehw '1' = galf_evorppa tes retsam_teehs_mi_t etadpu	


dne	

)1 ,61 ,'错出表主入调成生，败失出调止终'(rorresiar		

1- = ter@ tes		

nigeb	

 0 >< rorre@@ fi	


)	

etad@ ,on_teehs_od@ + '：号单原，成生动自时单出调止终统系' ,tma_teehs@ ,llun		

 ,on_teehs_od@ ,'0' ,on_hcnarb@ ,on_hcnarb_id@ ,'+'		

 ,'ID' ,etad@ ,'1001' ,'1001' ,on_teehs_id@		

 (	

 seulav	

 )	

etad_krow ,omem ,tma_teehs ,etad_yap		

 ,on_rehcuov ,galf_evorppa ,on_hcnarb_d ,on_hcnarb ,on_bd		

 ,on_snart ,etad_repo ,di_repo ,nam_redro ,on_teehs		

 (	

 retsam_teehs_mi_t otni tresni	

)(etadteg = etad@ tes	


dne	

		)1 ,61 ,'错出细明入调成生，败失出调止终'(rorresiar		

1- = ter@ tes		

nigeb	

 0 >< rorre@@ fi	


on_teehs_od@ = on_teehs erehw	

liated_teehs_mi_t morf	

 omem ,ecirp_elas ,ytq_egral ,xat ,tma_bus		

 ,ecirp_dilav ,ecirp_igro ,ytq_laer ,on_meti ,on_teehs_id@ tceles	

 )	

 omem ,ecirp_elas ,ytq_egral ,xat ,tma_bus		

 ,ecirp_dilav ,ecirp_igro ,ytq_laer ,on_meti ,on_teehs		

 (	

 liated_teehs_mi_t otni tresni	


tuptuo on_teehs_id@ ,on_hcnarb@ ,'ID' on_teehs_teg_rp cexe	


;on_teehs_od@ = on_teehs erehw	

 retsam_teehs_mi_t morf	

 tma_teehs = tma_teehs@ ,on_hcnarb_d = on_hcnarb_id@ ,on_hcnarb = on_hcnarb@ tceles	


1 = ter@ tes	


emitetad etad@,		

ecirp_u	tma_teehs@,		

库仓出调单库出调直--			)6(rahcrav on_hcnarb@,		

库仓入调单库出调直--	)6(rahcrav on_hcnarb_id@ eralced	

单库入调直的成生新核审并--	

理处单库入调直成生时出调止终在单库出调直--	

nigeb

sa

)

号单单库入调直的成生--	tuptuo )81(rahcrav on_teehs_id@,	

志标功成行执程过储存--			tuptuo tib ter@,	

号单出调的出调止终被--			)81(rahcrav on_teehs_od@    

    	(

teehs_id_etareneg_rp erudecorp etaerc



og

teehs_id_etareneg_rp erudecorp pord  

)'teehs_id_etareneg_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_get_promote(MS).sql^^^^


DNE    

 )                                                 

di_wor.C = di_wor.elbaTym DNA                                                   

on_nalp.C = on_nalp.elbaTym ( NO C liated_nalp_mr_t NIOJ RENNI                

on_nalp.elbaTym = on_nalp.retsam_nalp_mr_t NO elbaTym )                           

raVelbaTyM@   MORF                             

di_wor                                    

, on_nalp                                    

TCNITSID TCELES ( NIOJ RENNI                

retsam_nalp_mr_t    MORF        

lav_elur.C                

, arap_elur.C                

, di_wor.C                

, ebircsed_elur SA )                

galf_egnar.retsam_nalp_mr_t = galf_egnar.pmet DNA                            

on_elur.retsam_nalp_mr_t = on_elur.pmet     EREHW                  

pmet elur_nalp_mr_t      MORF                  

ebircsed_elur    TCELES (                

, epyt_piv.retsam_nalp_mr_t                

, galf_egnar.retsam_nalp_mr_t                

, on_elur.retsam_nalp_mr_t                

, tma_xe.retsam_nalp_mr_t                

, tma.retsam_nalp_mr_t                

, galf_elpitlum SA )'0' ,galf_elpitlum.retsam_nalp_mr_t(LLUNSI                

, eman_nalp.retsam_nalp_mr_t                

, etad_mrifnoc.retsam_nalp_mr_t                

,galf_ecirp sa )'0',galf_ecirp.retsam_nalp_mr_t(LLUNSI				

,wen_piv SA )'0',wen_piv.retsam_nalp_mr_t(LLUNSI                

, on_nalp.retsam_nalp_mr_t  TCELES        

/*据数部全载加*/	

DNE            

) galf_egnar@ = galf_egnar  EREHW                                             

nalPelbaTyM@   MORF                                             

on_nalp TCELES ( NI on_nalp   EREHW                        

liated_nalp_mr_t    MORF                        

di_wor                                

, on_nalp                                

TCNITSID TCELES                        

raVelbaTyM@ OTNI  TRESNI                

'A' = galf_egnar@ TES                

NIGEB            

) 1 = galf_tceles@ ( FI        

/*载加场全*/    


) galf_egnar@ = galf_egnar  EREHW                                         

nalPelbaTyM@   MORF                                         

on_nalp TCELES ( NI on_nalp DNA                        

))lav_elur(NEL ,1 ,eulav_elur@(GNIRTSBUS = lav_elur DNA                        

arap_elur@ EKIL arap_elur   EREHW                

liated_nalp_mr_t    MORF                

di_wor                        

, on_nalp                        

TCNITSID TCELES                

raVelbaTyM@ OTNI  TRESNI        

)1 + xednItrats@ - )on_dnarb@(NEL                                    

,xednItrats@ ,on_dnarb@(GNIRTSBUS = eulav_elur@ TES        

DNE            

KAERB                    

ESLE                

DNE                 

   

1 + xednItniop@ = xednItrats@ TES                        

) galf_egnar@ = galf_egnar   EREHW                                        

nalPelbaTyM@    MORF                                        

on_nalp  TCELES                                        

( NI on_nalp DNA                                        

))lav_elur(NEL ,1                                                              

,eulav_elur@(GNIRTSBUS = lav_elur DNA                                        

arap_elur@ EKIL arap_elur   EREHW                                

liated_nalp_mr_t    MORF                                

di_wor                                        

, on_nalp                                        

TCNITSID TCELES                                

raVelbaTyM@ OTNI  TRESNI                        

)xednItrats@ - xednItniop@                                                    

,xednItrats@ ,on_dnarb@(GNIRTSBUS = eulav_elur@ TES                        

NIGEB                    

) 0 > xednItniop@ ( FI                

 )xednItrats@ ,on_dnarb@ ,'|'(XEDNIRAHC = xednItniop@ TES                

 NIGEB            

) 0 > xednItrats@ ( ELIHW        

 1 = xednItrats@ TES        

'B' = galf_egnar@ TES        

'%DNARB' = arap_elur@ TES        

/*载加牌品*/	

	

) galf_egnar@ = galf_egnar  EREHW                                         

nalPelbaTyM@   MORF                                         

on_nalp TCELES ( NI on_nalp DNA                        

))lav_elur(NEL ,1 ,eulav_elur@(GNIRTSBUS = lav_elur DNA                        

arap_elur@ EKIL arap_elur   EREHW                

liated_nalp_mr_t    MORF                

di_wor                        

, on_nalp                        

TCNITSID TCELES                

raVelbaTyM@ OTNI  TRESNI        

)1 + xednItrats@ - )on_slc@(NEL                                    

,xednItrats@ ,on_slc@(GNIRTSBUS = eulav_elur@ TES        

DNE            

KAERB                    

ESLE                

DNE                    

1 + xednItniop@ = xednItrats@ TES                        

) galf_egnar@ = galf_egnar   EREHW                                        

nalPelbaTyM@    MORF                                        

on_nalp  TCELES                                        

( NI on_nalp DNA                                        

))lav_elur(NEL ,1                                                              

,eulav_elur@(GNIRTSBUS = lav_elur DNA                                        

arap_elur@ EKIL arap_elur   EREHW                                

liated_nalp_mr_t    MORF                                

di_wor                                        

, on_nalp                                        

TCNITSID TCELES                                

raVelbaTyM@ OTNI  TRESNI                        

)xednItrats@ - xednItniop@                                                    

,xednItrats@ ,on_slc@(GNIRTSBUS = eulav_elur@ TES                        

NIGEB                    

) 0 > xednItniop@ ( FI                

 )xednItrats@ ,on_slc@ ,'|'(XEDNIRAHC = xednItniop@ TES                

 NIGEB            

) 0 > xednItrats@ ( ELIHW        

 1 = xednItrats@ TES        

'C' = galf_egnar@ TES        

'%SLC' = arap_elur@ TES        

/*载加别类*/	


) galf_egnar@ = galf_egnar  EREHW                                         

nalPelbaTyM@   MORF                                         

on_nalp TCELES ( NI on_nalp DNA                        

eulav_elur@ = lav_elur DNA                        

arap_elur@ = arap_elur   EREHW                

liated_nalp_mr_t    MORF                

di_wor                        

, on_nalp                        

TCNITSID TCELES                

raVelbaTyM@ OTNI  TRESNI        

)1 + xednItrats@ - )on_meti@(NEL                                    

,xednItrats@ ,on_meti@(GNIRTSBUS = eulav_elur@ TES        

DNE            

KAERB                    

ESLE                

DNE                    

1 + xednItniop@ = xednItrats@ TES                        

) galf_egnar@ = galf_egnar   EREHW                                        

nalPelbaTyM@    MORF                                        

on_nalp  TCELES                                        

( NI on_nalp DNA                                        

eulav_elur@ = lav_elur DNA                                        

arap_elur@ = arap_elur   EREHW                                

liated_nalp_mr_t    MORF                                

di_wor                                        

, on_nalp                                        

TCNITSID TCELES                                

raVelbaTyM@ OTNI  TRESNI                        

)xednItrats@ - xednItniop@                                                    

,xednItrats@ ,on_meti@(GNIRTSBUS = eulav_elur@ TES                        

NIGEB                    

) 0 > xednItniop@ ( FI                

 )xednItrats@ ,on_meti@ ,'|'(XEDNIRAHC = xednItniop@ TES                

 NIGEB            

) 0 > xednItrats@ ( ELIHW        

 1 = xednItrats@ TES        

'I' = galf_egnar@ TES        

'1METI' = arap_elur@ TES        

/*载加品商*/	


)1(RAHCRAV galf_egnar@ ERALCED        

)02(RAHCRAV arap_elur@ ERALCED        

 TNI xednItrats@ ERALCED        

 TNI xednItniop@ ERALCED        

)02(RAHCRAV eulav_elur@ ERALCED        

                          	

)            

LLUN TON )0 ,81(LAMICED di_wor              

, LLUN TON                                  

SA_IC_CRP_esenihC ETALLOC )02(RAHCRAV on_nalp              

(            

ELBAT raVelbaTyM@ ERALCED        

等牌品，类，品商的索检将计设--    

      /*息信细明的牌品，别类，号货的同相找查*/	

	

) galf_gulp@ = galf_ulp  EREHW                                         

elur_nalp_mr_t   MORF                                         

on_elur TCELES ( NI on_elur DNA                        

) on_hcnarb@ = on_hcnarb  EREHW                                         

hcnarb_nalp_mr_t   MORF                                         

on_nalp TCELES ( NI on_nalp DNA                        

)                            

1epyt_piv@ = epyt_piv RO                              

epyt_piv@ = )'' ,epyt_piv(LLUNSI RO                              

'无' = epyt_piv RO                              

'LLA' = epyt_piv ( DNA                        

) etad_dne DNA etad_nigeb NEEWTEB )121 ,)(ETADTEG ,)01(RAHC(TREVNOC ( DNA                        

)                            

)'1' = )1 ,7 ,keew(GNIRTSBUS DNA 1 = ))(ETADTEG ,wd(TRAPETAD ( RO                              

)'1' = )1 ,1 - ))(ETADTEG ,wd(TRAPETAD,keew(GNIRTSBUS DNA 1 > ))(ETADTEG ,wd(TRAPETAD ( ( DNA                        

'MD' =! on_elur DNA                        

'GP' =! on_elur DNA                        

'1' = galf_evorppa   EREHW                

retsam_nalp_mr_t    MORF                

galf_egnar                        

, on_nalp  TCELES                

nalPelbaTyM@ OTNI  TRESNI        

)            

LLUN TON SA_IC_CRP_esenihC ETALLOC )1(RAHCRAV galf_egnar              

, LLUN TON SA_IC_CRP_esenihC ETALLOC )02(RAHCRAV on_nalp              

(            

ELBAT nalPelbaTyM@ ERALCED        

/*号单销促的件条合符找查*/    


'Y' = 1epyt_piv@ TES            

ESLE        

'N' = 1epyt_piv@ TES            

) '' = epyt_piv@ ( FI        

)1(RAHCRAV 1epyt_piv@ ERALCED        

NIGEB    

SA

)    

)品商个一第非单每示表：2；换切员会，算结，品商个一第单每括包是:1(表全索检否是--        TNI galf_tceles@      

索检入录为否是--  , )1(RAHCRAV galf_gulp@      

码编店门--  , )6(RAHCRAV on_hcnarb@      

型类员会--   , )6(RAHCRAV epyt_piv@      

码编牌品--, )0006(RAHCRAV on_dnarb@      

码编别类--  , )0006(RAHCRAV on_slc@      

码编品商-- , )0006(RAHCRAV on_meti@      

(    

]etomorp_teg_rp[.]obd[ ERUDECORP etaerc


og

etomorp_teg_rp erudecorp pord  

)'etomorp_teg_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_get_senditem_vip_nosale(MS).sql^^^^

dne

) 					

) ondnarb_meti@ ekil dnarb_meti.c (							

dna ) onslc_meti@ ekil onslc_meti.c (							

dna ) on_meti@ ekil on_meti.c (							

dna ) on_meti.c = on_meti.d (							

dna ) on_wolf.d = on_wolf.b (							

dna ) di_drac.a = di_drac.b (							

dna ) fxn_hcnarb@ ekil on_hcnarb.b (							

dna ) fxn_etade@ dna fxn_etadb@ neewteb etad_epo.b ( erehw  					

 c ofni_meti_db_t ,d wolfelas_mr_t ,b tsilcca_piv_mr_t morf   					

 1 tceles(stsixe ton erehw	

a )	

)			

)  			

)  									

)) yad_e@ =< )5 ,6 ,)121 ,yadhtrib ,)01(rahc(trevnoc (gnirtsbus ro yad_b@ => )5 ,6 ,)121 ,yadhtrib ,)01(rahc(trevnoc (gnirtsbus( dna '0' = galf_yad@ (										

ro ) yad_e@ dna yad_b@ neewteb )5 ,6 ,)121 ,yadhtrib ,)01(rahc(trevnoc (gnirtsbus dna '1' = galf_yad@ ( ( dna '1' = galf_htrib@ (  			

 ro '0' = galf_htrib@ (			

dna ) ) muncca_b@ => mun_cca dna '1' = galf_muncca_b@ ( ro '0' = galf_muncca_b@ (			

dna ) ) munlav_e@ =< mun_ced - mun_cca dna '1' = galf_munlav_e@ ( ro '0' = galf_munlav_e@ (			

dna ) ) munlav_b@ => mun_ced - mun_cca dna '1' = galf_munlav_b@ ( ro '0' = galf_munlav_b@ (			

dna ) di_epyt.epyt_piv_mr_t = epyt_drac.ofni_piv_mr_t (			

dna ) didrac_e@ =< di_drac ro '' = didrac_e@ (			

dna ) didrac_b@ => di_drac ro '' = didrac_b@ (			

dna )'0' = sutats_drac.ofni_piv_mr_t (			

dna ) epyt_drac@ ekil epyt_drac.ofni_piv_mr_t (			

dna ) di_drac@ ekil di_drac( erehw		

epyt_piv_mr_t ,ofni_piv_mr_t morf		

sutats_drac ,eman_piv ,di_drac ,eman_epyt.epyt_piv_mr_t = epyt_drac tceles		

(	

 morf sutats_drac.a ,eman_piv.a ,di_drac.a ,epyt_drac.a ,'0' = tceles_si tceles	



'0' = galf_yad@ tes		

esle	

'1' = galf_yad@ tes		

yad_e@ =< yad_b@ fi	

)5 ,6 ,)121 ,))(etadteg ,syadhtrib_e@ ,dd(ddaetad ,)01(rahc(trevnoc (gnirtsbus = yad_e@ tceles	

)5 ,6 ,)121 ,))(etadteg ,syadhtrib_b@ ,dd(ddaetad ,)01(rahc(trevnoc (gnirtsbus = yad_b@ tceles	


dne	

1 + pmt_il@ = pmt_il@ tes		


pmt_sl@ = fxn_hcnarb@ tceles			

 3 = pmt_il@ fi esle		

) pmt_sl@ ,emitetad(trevnoc = fxn_etade@ tceles			

2 = pmt_il@ fi esle		

) pmt_sl@ ,emitetad(trevnoc = fxn_etadb@ tceles			

1 = pmt_il@ fi		


dne		

) sop_il@ - )tsilnoitdnoc_sl@(nel ,1 + sop_il@ ,tsilnoitdnoc_sl@(gnirtsbus = tsilnoitdnoc_sl@ tes			

)1 - sop_il@ ,1 ,tsilnoitdnoc_sl@(gnirtsbus = pmt_sl@ tes			

nigeb		

esle		

dne		

'' = tsilnoitdnoc_sl@ tes			

tsilnoitdnoc_sl@ = pmt_sl@ tes			

nigeb		

0 = sop_il@ fi		

)tsilnoitdnoc_sl@ ,'|'(XEDNIRAHC = sop_il@ tes		

nigeb	

3 =< pmt_il@ elihw	

fxn_tsil_noitdnoc@ = tsilnoitdnoc_sl@ tes	

1 = pmt_il@ tes	

析解件条费消未--	


dne	

1 + pmt_il@ = pmt_il@ tes		


) pmt_sl@ ,)0,61(ciremun(trevnoc = syadhtrib_e@ tceles			

3 = pmt_il@ fi esle		

) pmt_sl@ ,)0,61(ciremun(trevnoc = syadhtrib_b@ tceles			

 2 = pmt_il@ fi esle		

 pmt_sl@ = galf_htrib@ tceles			

1 = pmt_il@ fi		


dne		

) sop_il@ - )tsilnoitdnoc_sl@(nel ,1 + sop_il@ ,tsilnoitdnoc_sl@(gnirtsbus = tsilnoitdnoc_sl@ tes			

)1 - sop_il@ ,1 ,tsilnoitdnoc_sl@(gnirtsbus = pmt_sl@ tes			

nigeb		

esle		

dne		

'' = tsilnoitdnoc_sl@ tes			

tsilnoitdnoc_sl@ = pmt_sl@ tes			

nigeb		

0 = sop_il@ fi		

)tsilnoitdnoc_sl@ ,'|'(XEDNIRAHC = sop_il@ tes		

nigeb	

4 =< pmt_il@ elihw	

yadhtrib_moc_tsil_noitdnoc@ = tsilnoitdnoc_sl@ tes	

1 = pmt_il@ tes	

关相日生员会--	


dne	

1 + pmt_il@ = pmt_il@ tes		


) pmt_sl@ ,)4,61(ciremun(trevnoc = muncca_b@ tceles			

2 = pmt_il@ fi esle		

 pmt_sl@ = galf_muncca_b@ tceles			

1 = pmt_il@ fi		


dne		

) sop_il@ - )tsilnoitdnoc_sl@(nel ,1 + sop_il@ ,tsilnoitdnoc_sl@(gnirtsbus = tsilnoitdnoc_sl@ tes			

)1 - sop_il@ ,1 ,tsilnoitdnoc_sl@(gnirtsbus = pmt_sl@ tes			

nigeb		

esle		

dne		

'' = tsilnoitdnoc_sl@ tes			

tsilnoitdnoc_sl@ = pmt_sl@ tes			

nigeb		

0 = sop_il@ fi		

)tsilnoitdnoc_sl@ ,'|'(XEDNIRAHC = sop_il@ tes		

nigeb	

2 =< pmt_il@ elihw	

muncca_moc_tsil_noitdnoc@ = tsilnoitdnoc_sl@ tes	

1 = pmt_il@ tes	

关相分积计累--	


dne	

1 + pmt_il@ = pmt_il@ tes		


) pmt_sl@ ,)4,61(ciremun(trevnoc = munlav_e@ tceles			

4 = pmt_il@ fi esle		

) pmt_sl@ ,)4,61(ciremun(trevnoc = munlav_b@ tceles			

 3 = pmt_il@ fi esle		

 pmt_sl@ = galf_munlav_e@ tceles			

2 = pmt_il@ fi esle		

 pmt_sl@ = galf_munlav_b@ tceles			

1 = pmt_il@ fi		


dne		

) sop_il@ - )tsilnoitdnoc_sl@(nel ,1 + sop_il@ ,tsilnoitdnoc_sl@(gnirtsbus = tsilnoitdnoc_sl@ tes			

)1 - sop_il@ ,1 ,tsilnoitdnoc_sl@(gnirtsbus = pmt_sl@ tes			

nigeb		

esle		

dne		

'' = tsilnoitdnoc_sl@ tes			

tsilnoitdnoc_sl@ = pmt_sl@ tes			

nigeb		

0 = sop_il@ fi		

)tsilnoitdnoc_sl@ ,'|'(XEDNIRAHC = sop_il@ tes		

nigeb	

4 =< pmt_il@ elihw	

munlav_moc_tsil_noitdnoc@ = tsilnoitdnoc_sl@ tes	

1 = pmt_il@ tes	

关相分积余剩--	



)6(rahcrav	fxn_hcnarb@		

,emitetad	fxn_etade@		

,emitetad	fxn_etadb@		

eralced	

置设件条的询查费消未按--	


)0,61(ciremun syadhtrib_e@		

,)0,61(ciremun syadhtrib_b@		

,)1(rahc	galf_htrib@		

	,)4,61(ciremun muncca_b@		

,)1(rahc galf_muncca_b@		

 ,)4,61(ciremun munlav_e@		

 ,)4,61(ciremun munlav_b@		

 ,)1(rahc galf_munlav_e@		

,)1(rahc galf_munlav_b@		

eralced	


)5(rahc	yad_e@		

,)5(rahc	yad_b@		

,)1(rahc galf_yad@		

,tni sop_il@		

,tni	pmt_il@		

,)552(rahcrav tsilnoitdnoc_sl@		

,)552(rahcrav	pmt_sl@		

eralced	

nigeb

sa

)

店门费消未|期日束结费消未|期日始开费消未：件条询查费消未按--	)552(rahcrav fxn_tsil_noitdnoc@	

数天束结日生|数天始开日生|件条的日生内天N到M从员会用采：日生员会件条询查用公--	,)552(rahcrav yadhtrib_moc_tsil_noitdnoc@	

值于等于大分积计累|件条于等于大分积计累用采：分积计累件条询查用公--		,)552(rahcrav muncca_moc_tsil_noitdnoc@	

值于等于小分积余剩|值于等于大分积余剩|件条于等于小分积余剩用采|件条于等于大分积余剩用采：分积余剩件条询查用公--		,)552(rahcrav munlav_moc_tsil_noitdnoc@	

号卡束结--		,)02(rahcrav didrac_e@	

号卡始开--		,)02(rahcrav didrac_b@	

	牌品--	,)02(rahcrav ondnarb_meti@	

别类--	,)02(rahcrav onslc_meti@	

	号货--		,)02(rahcrav on_meti@	

别类卡--		,)2(rahcrav epyt_drac@	

DI卡--		,)02(rahcrav di_drac@	

(elason_piv_metidnes_teg_rp erudecorp etaerc


og

elason_piv_metidnes_teg_rp erudecorp pord  

)'elason_piv_metidnes_teg_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_get_sheet_no(MS).sql^^^^

dne

'' = on_teehs@ tes	

:rre


nruter	

	rahcxedni@ + etad@ + hcnarb_sl@ + on_snart@ = on_teehs@ tes	

)4 ,)xedni_on_teehs@ ,)4(rahcrav(trevnoc + '0000'(thgir = rahcxedni@ tes	

号水流位4 + )DDMMYY(期日 + 店分/构机 + 型类务业2：号单--	

	

dne	

dne		

 1 = xedni_on_teehs@ tes				

0 = xedni_on_teehs@ ro 00001 => xedni_on_teehs@ fi			

1 + ))4,on_teehs@(thgir ,tni(trevnoc = xedni_on_teehs@ tes			

nigeb		

esle		

1 = xedni_on_teehs@ tes			

'' = on_teehs@ ro llun si on_teehs@ fi		

'%' + on_teehs_pmet@ ekil on_teehs erehw retsam_teehs_mi_t morf )on_teehs(xam = on_teehs@  tceles		

etad@ + on_hcnarb@ + on_snart@ = on_teehs_pmet@ tes		

on_hcnarb@ = hcnarb_sl@ tes		

nigeb	

esle	

dne	

rre otog 0 >< rorre@@ fi		

	on_snart@ = di_teehs erehw xedni_on_teehs@ = eulav_teehs tes on_teehs_sys_t etadpu		

1 = xedni_on_teehs@ tes			

0 =< xedni_on_teehs@ ro 00001 => xedni_on_teehs@ fi		

on_snart@ = di_teehs erehw on_teehs_sys_t morf 1 + eulav_teehs = xedni_on_teehs@ tceles		

'000' = hcnarb_sl@ tes		

nigeb	

))'5','0'(ni epyt_edart dna on_hcnarb@ = on_hcnarb erehw ofni_hcnarb_db_t morf 1 tceles(stsixe fi	

)号水流序顺是则店分而，号取表统系据单从号单部总(生产店分是还生产部总由是号单虑考须必--	

	

   	

)6 ,)211 ,)(etadteg ,)01(rahcrav(trevnoc(thgir =etad@ tceles	

'' = on_teehs@ tes	

	

)6(rahcrav				hcnarb_sl@ 					

,)4(rahcrav			 rahcxedni@ 					

,tni	 xedni_on_teehs@ 					

,)6(rahcrav						 etad@ 					

,)81(rahcrav	 on_teehs_pmet@  eralced	

nigeb

sa

)

tuptuo )81(rahcrav	on_teehs@    

,)6(rahcrav on_hcnarb@    

	,)2(rahcrav on_snart@    

	(

on_teehs_teg_rp erudecorp etaerC


og

on_teehs_teg_rp erudecorp pord  

)'on_teehs_teg_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_get_worklist(MS).sql^^^^

dne

0 > mun.b dna on_snart.b = on_snart.a erehw    

b mun_tsilkrow_lbt#           

 ,a unem_tsilkrow_lbt# morf      

 mun.b,eman_unem.a,di_unem.a           

31 pot tceles    

   

on_snart yb puorg    

b sa )    

'0'=)'0',galf_evorppa(llunsi erehw ofni_metippa_db_t morf mun sa )1(tnuoc,'' tceles    

lla noinu    

on_snart yb puorg '0' =  galf_evorppa dna on_kcots@ ekil on_hcnarb dna 'OO' = on_snart erehw  retsam_teehs_mi_t morf mun sa )1(tnuoc,on_snart tceles    

lla noinu    

on_snart yb puorg '0' =  galf_evorppa dna on_kcots@ ekil on_hcnarb_d dna 'IM' = on_snart erehw   retsam_teehs_mi_t morf mun sa )1(tnuoc,on_snart tceles    

lla noinu    

on_snart yb puorg'0' =  galf_evorppa dna on_kcots@ ekil on_hcnarb dna 'OM' = on_snart erehw   retsam_teehs_mi_t morf mun sa )1(tnuoc,on_snart tceles    

lla noinu    

on_snart yb puorg '0' =  galf_evorppa dna on_kcots@ ekil on_hcnarb dna 'PB' = on_snart erehw  retsam_yapcer_mf_t morf mun sa )1(tnuoc,on_snart tceles    

lla noinu    

on_snart yb puorg '0' =  galf_evorppa dna on_kcots@ ekil on_hcnarb dna 'BF' = on_snart erehw  retsam_egrahc_mf_t morf mun sa )1(tnuoc,on_snart tceles    

lla noinu    

on_snart yb puorg '0' =  galf_evorppa dna on_kcots@ ekil on_hcnarb dna 'PR' = on_snart erehw  retsam_yapcer_mf_t morf mun sa )1(tnuoc,on_snart tceles    

lla noinu    

on_snart yb puorg '0' =  galf_evorppa dna on_kcots@ ekil on_hcnarb dna 'PC' = on_snart erehw  retsam_yapcer_mf_t morf mun sa )1(tnuoc,on_snart tceles    

lla noinu    

on_snart yb puorg '0' =  galf_evorppa dna on_kcots@ ekil on_hcnarb dna 'GF' = on_snart erehw  retsam_egrahc_mf_t morf mun sa )1(tnuoc,on_snart tceles    

lla noinu    

on_snart yb puorg '0' =  galf_evorppa dna ))3,on_kcots@(tfel=on_hcnarb ro       

 on_kcots@ ekil on_hcnarb ro 'LLA'=on_hcnarb( dna 'UP' = on_snart erehw retsam_wolf_ecirp_cp_t morf mun sa )1(tnuoc,on_snart tceles    

lla noinu    

on_snart yb puorg '0' =  galf_evorppa dna ))3,on_kcots@(tfel=on_hcnarb ro       

 on_kcots@ ekil on_hcnarb ro 'LLA'=on_hcnarb( dna 'HP' = on_snart erehw retsam_wolf_ecirp_cp_t morf mun sa )1(tnuoc,on_snart tceles    

lla noinu    

on_snart yb puorg '0' =  galf_evorppa dna ))3,on_kcots@(tfel=on_hcnarb ro       

 on_kcots@ ekil on_hcnarb ro 'LLA'=on_hcnarb( dna 'NP' = on_snart erehw retsam_wolf_ecirp_cp_t morf mun sa )1(tnuoc,on_snart tceles    

lla noinu    

on_snart yb puorg '0' =  galf_evorppa dna ))3,on_kcots@(tfel=on_hcnarb ro       

 on_kcots@ ekil on_hcnarb ro 'LLA'=on_hcnarb( dna 'SP' = on_snart erehw retsam_wolf_ecirp_cp_t morf mun sa )1(tnuoc,on_snart tceles    

lla noinu    

on_snart yb puorg '0' =  galf_evorppa dna ))3,on_kcots@(tfel=on_hcnarb ro       

 on_kcots@ ekil on_hcnarb ro 'LLA'=on_hcnarb( dna 'XP' = on_snart erehw retsam_wolf_ecirp_cp_t morf mun sa )1(tnuoc,on_snart tceles    

lla noinu    

) '3' >< epyt_edart dna on_kcots@ ekil on_hcnarb erehw ofni_hcnarb_db_t morf on_hcnarb tceles( ni  on_hcnarb DNA    

 '0' =  galf_evorppa dna on_kcots@ ekil on_hcnarb erehw tini_kcehc_mi_t morf mun sa )1(tnuoc,'DP'= on_snart tceles    

lla noinu    

on_snart yb puorg '0' =  galf_evorppa dna on_kcots@ ekil on_hcnarb dna 'IR' = on_snart erehw     retsam_teehs_mw_t morf mun sa )1(tnuoc,on_snart tceles    

lla noinu    

on_snart yb puorg '0' =  galf_evorppa dna on_kcots@ ekil on_hcnarb dna 'OS' = on_snart erehw     retsam_teehs_mw_t morf mun sa )1(tnuoc,on_snart tceles    

lla noinu    

on_snart yb puorg '0' =  galf_evorppa dna on_kcots@ ekil on_hcnarb dna 'SS' = on_snart erehw     retsam_teehs_mw_t morf mun sa )1(tnuoc,on_snart tceles    

lla noinu    

on_snart yb puorg '0' =  galf_evorppa dna on_kcots@ ekil on_hcnarb dna 'OR' = on_snart erehw     retsam_teehs_mp_t morf mun sa )1(tnuoc,on_snart tceles    

lla noinu    

on_snart yb puorg '0' = galf_evorppa dna on_kcots@ ekil on_hcnarb dna 'TR' = on_snart erehw	retsam_teehs_mp_t morf mun sa )1(tnuoc,on_snart tceles    

lla noinu    

on_snart yb puorg '0' =  galf_evorppa dna on_kcots@ ekil on_hcnarb dna 'IP' = on_snart erehw     retsam_teehs_mp_t morf mun sa )1(tnuoc,on_snart tceles    

lla noinu    

on_snart yb puorg '0' =  galf_evorppa dna on_kcots@ ekil on_hcnarb dna 'OP' = on_snart erehw     retsam_teehs_mp_t morf mun sa )1(tnuoc,on_snart tceles    

lla noinu 

   

on_snart yb puorg '0' =  galf_evorppa dna on_kcots@ ekil on_hcnarb dna 'OI' = on_snart erehw   retsam_teehs_mi_t morf mun sa )1(tnuoc,on_snart tceles    

lla noinu    

on_snart yb puorg '0' =  galf_evorppa dna on_kcots@ ekil on_hcnarb dna 'PA' = on_snart erehw   retsam_teehs_mi_t morf mun sa )1(tnuoc,on_snart tceles    

lla noinu    

))'0'=ecno_tropmi@  ro '' = )'',galf_ni.retsam_teehs_mi_t(llunsi dna '1'= ecno_tropmi@( dna ytq_laer.liated_teehs_mi_t < ytq_redro.liated_teehs_mi_t dna		 

 on_teehs.liated_teehs_mi_t = on_teehs.retsam_teehs_mi_t erehw liated_teehs_mi_t morf 1 tceles( stsixe dna	       

6 = )on_hcnarb_d(nel dna)m_on_kcots@ = on_hcnarb_d ro on_kcots@ = on_hcnarb_d ( dna 'OD' = on_snart dna '1' =  galf_evorppa erehw retsam_teehs_mi_t morf mun sa )1(tnuoc, 'ID' = on_snart tceles    

lla noinu    

)211 ,)(etadteg ,)01(rahc(trevnoc>)211 ,etad_dilav ,)01(rahc(trevnoc dna ))'2','3' (ni ton sutats_redro ( dna                             

6 = )on_hcnarb_d(nel dna on_kcots@ = on_hcnarb_d                              

 dna 'YD' = on_snart erehw retsam_teehs_mp_t morf mun sa )1(tnuoc, 'OD' = on_snart tceles    

lla noinu    

)211 ,)(etadteg ,)01(rahc(trevnoc>)211 ,etad_dilav ,)01(rahc(trevnoc dna ))'2','3' (ni ton sutats_redro ( dna                             

3 = )on_hcnarb_d(nel dna on_kcots@ ekil on_hcnarb_d                              

 dna 'YD' = on_snart erehw retsam_teehs_mp_t morf mun sa )1(tnuoc, 'OD' = on_snart tceles    

lla noinu    

on_snart yb puorg '0' =  galf_evorppa dna )on_kcots@ ekil on_hcnarb_d ro on_kcots@ ekil on_hcnarb( dna 'ID' = on_snart erehw   retsam_teehs_mi_t morf mun sa )1(tnuoc,on_snart tceles    

lla noinu    

on_snart yb puorg '0' =  galf_evorppa dna on_kcots@ ekil on_hcnarb dna 'OD' = on_snart erehw   retsam_teehs_mi_t morf mun sa )1(tnuoc,on_snart tceles    

lla noinu    

on_snart yb puorg '0' =  galf_evorppa dna on_kcots@ ekil on_hcnarb dna 'YD' = on_snart erehw   retsam_teehs_mp_t morf mun sa )1(tnuoc,on_snart tceles    

(     

 morf    

mun_tsilkrow_lbt# otni      

mun sa )mun(mus ,on_snart tceles    


'%' + on_kcots@ = on_kcots@ tceles	

     

)'3012','6015','7047','1047','2027','0113','9039','7126','5126','2047','3018','8018'( ni ton di_unem.a dna--     

) '1047','1031','1041'                            

,'1037','5039','3039','2039','1039','3029','2029','6018','5018','4018','2018','1018'                    	

,'3027','6015','2015','1015','5013','3013','2013','1013','4012','2012','1012','1061'( ni di_unem.a dna  	

dIrepo@ = di_repo.b dna  	

di_cnuf.b = di_unem.a dna  	

galf_hcnarb@ ekil galf_hcnarb.a dna  	

)'1041'=di_unem.a ro 'EEHS' = epyt_unem.a( erehw	

b tnarg_repo_sys_t       	

,a unem_sys_t morf  	

unem_tsilkrow_lbt# otni      

on_snart sa )'',)2,2,retemarap_nepo.a(gnirtsbus(llunsi ,eman_unem.a ,di_unem.a tceles	

    

	

'%1___' = galf_hcnarb@ tceles   	

店盟加-- '8' = epyt_edart@  fi esle	

'%_1__' = galf_hcnarb@ tceles   	

店营自-- '3' = epyt_edart@ ro '7' = epyt_edart@  fi esle	

'%__1_' = galf_hcnarb@ tceles   	

心中送配,处事办-- '2' = epyt_edart@ ro '1' = epyt_edart@  fi esle	

'%___1' = galf_hcnarb@ tceles   	

部总-- '0' = epyt_edart@ fi	


dne	

on_kcots@ = on_hcnarb erehw ofni_hcnarb_db_t morf epyt_edart = epyt_edart@ tceles   	

)3,1,on_kcots@(gnirtsbus = on_kcots@ tceles   	     

nigeb	    

性属级一上取要需库仓-- )'5' = epyt_edart@( fi	

on_kcots@ = on_hcnarb erehw ofni_hcnarb_db_t morf epyt_edart = epyt_edart@ tceles	

  on_kcots@ = m_on_kcots@ tceles	

'on_kcots_g' = di_rav_sys erehw metsys_sys_t morf eulav_rav_sys = on_kcots@ tceles--	

'0'= ecno_tropmi@  tceles		

llun si ecno_tropmi@ fi	

'ecno_tropmi_md'= di_rav_sys erehw metsys_sys_t morf eulav_rav_sys = ecno_tropmi@ TCELES	

)1(rahcrav ecno_tropmi@,)1(rahcrav galf_ni@,)8(rahcrav galf_hcnarb@ ,)1(rahc epyt_edart@, )6(rahcrav m_on_kcots@ eralced	

店盟加本版式布分示表级四第--	

店分能功全营自本版式布分示表级三第--	

心中送配/处事办本版式布分示表级二第--	

部总本版式布分示表级一第--	

nigeb

sa

))6(rahcrav on_kcots@,)4(rahcrav dIrepo@( tsilkrow_teg_rp erudecorp etaerc



og

tsilkrow_teg_rp erudecorp pord  

)'tsilkrow_teg_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_getsheetno(MS).sql^^^^

 dne

 nruter	

on_v@ + )6,etad_s@(thgir + on_hcnarb@ + )di_teehs@(reppu = on_v@ tceles	

)211,)(etadteg,)8(rahc(trevnoc=etad_s@ tceles	

	

on_v+)'ddmmyyyy',)(yadot(gnirts+)di_teehs@(reppu = on_teehs@--	

)4,)on_v@(mirtr(thgir = on_v@ tceles	

)on_teehs@,rahc(trevnoc+'0000' = on_v@ tceles	

)di_teehs@(rewoL = )di_teehs(rewoL 	

erehw on_teehs@ =eulav_teehs tes on_teehs_sys_t etadpu	

	

 	0= on_teehs@   tes   	

  9999>on_teehs@ fi	

)di_teehs@(rewoL = )di_teehs(rewoL erehw	on_teehs_sys_t morf    	

	 )1 + )0,eulav_teehs(llunsi(=on_teehs@ tceles	

)3,'00'+on_hcnarb@(tfel=on_hcnarb@ tceles	

emitetad etad_d@,)8(rahcrav etad_s@,tni on_teehs@ eralced	

nigeb

 sa

)tuptuo )02(rahcrav on_v@, )6(rahcrav on_hcnarb@, )01(rahcrav di_teehs@ (onteehsteg_rp erudecorp   etaerc


og

onteehsteg_rp erudecorp pord  

)'onteehsteg_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_onlin_sale_pay(MS).sql^^^^


dne

		 nruter	

on_wolf@=nruter@ tceles	

:revo_lebal	

物事交提-- noitcasnart timmoc	


on_wolf@ piv_mr_rp cexe	

分积算计--	


''=)'',on_wolf(llunsi dna on_redro@ = on_redro erehw	

)(etadteg=emit_laed		

,'1'=galf_laed		

,on_wolf@= on_wolf tes	

 elas_enilno_mr_t etadpu	

号票小记登--	

				

dne		

revo_lebal otog			

noitcasnart kcabllor			

'常异单订该，败失水流售销品商入插'=on_wolf@ tceles			

nigeb		

esle	

dne		

)on_redro@,'单订上网',di_elas@,di_repo@,)(etadteg,latot@,1,'BMR',di_drac@,di_drac@,di_drac@,'A','PLO',on_hcnarb@,tnuoma@,on_wolf@,1(seulav						

)on_rehcuov,omem,nam_elas,di_repo,etad_repo,tnuoma_yap,etar_nioc,on_nioc,on_piv,di_drac,on_drac,yaw_lles,yaw_yap,on_hcnarb,tnuoma_elas,on_wolf,di_wolf(wolfyap_mr_t otni tresni			

nigeb		

0>di_wolf@ fi	

水流品商入插经已否是断判--	

  

liated_rucl etacollaed	  

liated_rucl esolc	  


dne	

liated_di_elas@,ecirp_elas@,ytq_elas@,on_meti@ otni liated_rucl hctef		

环循个一下续继--		

		

)di_drac@,di_drac@,0,0,etar_dnarb@,etar_nruter@,0,mun_cca@,1,'0',0.0,etad_repo@,liated_di_elas@,di_repo@,'A',ytq_elas@ * ecirp_elas@,ytq_elas@,ecirp_tsoc@,ecirp_elas@,ecirp_elas@,on_meti@,on_hcnarb@,on_wolf@,di_wolf@(seulav		

)di_drac,on_drac,etar_ytud_elas,etar_elas,etar_dnarb,etar_sslc,etar_ced,mun_cca,di_orp,galf_moc,on_tfihs,etad_repo,nam_elas,di_repo,yaw_lles,yenom_elas,ytnq_elas,ecirp_tsoc,ecirp_elas,ecirp_ecruos,on_meti,on_hcnarb,on_wolf,di_wolf(wolfelas_mr_t otni tresni		

		

'0'= epyt_mfpd dna on_meti@= on_meti erehw )kcolon(htiw ofni_meti_db_t morF  )0,etar_nruter(llunsi=mun_cca@ tceles		

成提品商--		

dne		

)2,ondnarb_meti@(tfel=ondnarb_meti erehw  dnarb_meti_db_t morf  )0,etar_nruter(llunsi=etar_dnarb@ tceles			

nigeb		

2=))2,etar_dnarb@(tfel(nel dna 0=)0,etar_dnarb@(llunsi fi		

dne		

)4,ondnarb_meti@(tfel=ondnarb_meti erehw  dnarb_meti_db_t morf  )0,etar_nruter(llunsi=etar_dnarb@ tceles			

nigeb		

4=))4,etar_dnarb@(tfel(nel dna 0=)0,etar_dnarb@(llunsi fi		

		

ondnarb_meti@= ondnarb_meti erehw dnarb_meti_db_t morf etar_nruter=etar_dnarb@ tceles		


on_meti@=on_meti erehw )kcolon(htiw ofni_meti_db_t morf dnarb_meti=ondnarb_meti@ tceles		

率成提牌品--		

		

		dne		

)2,onslc_meti@(tfel=onslc_meti erehw  slc_meti_db_t morf  )0,etar_nruter(llunsi=etar_nruter@ tceles			

nigeb		

2=))2,onslc_meti@(tfel(nel dna 0=)0,etar_nruter@(llunsi fi		

dne		

)4,onslc_meti@(tfel=onslc_meti erehw  slc_meti_db_t morf  )0,etar_nruter(llunsi=etar_nruter@ tceles			

nigeb		

4=))4,onslc_meti@(tfel(nel dna 0=)0,etar_nruter@(llunsi fi		


onslc_meti@=onslc_meti erehw  slc_meti_db_t morf  )0,etar_nruter(llunsi=etar_nruter@ tceles		

on_meti@=on_meti erehw )kcolon(htiw ofni_meti_db_t morf onslc_meti=onslc_meti@ tceles		

成提取--		

on_meti@=on_meti dna on_hcnarb@=on_hcnarb erehw )kcolon(htiw ecirp_hcnarb_cp_t morf ecirp_elas=ecirp_ecruos@ tceles		


on_meti@=on_meti erehw )kcolon(htiw ofni_meti_db_t morf ecirp_tsoc@ tceles			

0=)0,ecirp_tsoc@(llunsi fi		

on_meti@=on_meti dna on_hcnarb@=on_hcnarb erehw )kcolon(htiw kcots_hcnarb_mi_t morf tsoc_gva=ecirp_tsoc@ tceles		

价本成取--		


 /*dne		

revo_lebal otog			

noitcasnart kcabllor			

'单订该取提以可不，足不存库,]'+on_meti@+'[：号货品商'=on_wolf@ tceles			

nigeb		

)ytq_elas@=>ytq_kcots dna on_meti@=on_meti dna on_hcnarb@=on_hcnarb erehw )kcolon(htiw kcots_hcnarb_mi_t morf on_meti tceles(stsixe ton fi*/		

断判存库消取,有存库否是断判--		

di_elas@=liated_di_elas@ tceles			

''=)'',liated_di_elas@(llunsi fi		

1+ di_wolf@=di_wolf@ tceles		


'1'=yapsi_rts@ tceles		

志标据数有置设--		

nigeb	  

0=sutats_hctef@@ elihw	  

liated_di_elas@,ecirp_elas@,ytq_elas@,on_meti@ otni liated_rucl hctef	

liated_rucl nepo	

 on_redro@ = on_redro  erehw )kcolon(htiw liated_elas_enilno_mr_t morf di_elas@,ecirp,ytitnauq,edocrab_tcudorp tceles	 rof rosruc liated_rucl eralced	


物事启开-- noitcasnart nigeb	

水流售销品商成生--	


onwolf_lebal otog		

 1=>wor_ll@ fi	

on_wolf@ = on_wolf erehw )kcolon(htiw wolfyap_mr_t morf)1(tnuoc=wor_ll@ tceles	

在存否是号票小断判--	


dne		

)4,)pmet@+00001,)5(rahcrav(trevnoc(thgir +)211,)(etadteg,)8(rahcrav(trevnoc+di_sop@=on_wolf@ tceles			

1+))4,on_wolf@(thgir,)0,61(lamiced(trevnoc=pmet@  tceles			

nigeb		

esle	

dne		

'1000'+)211,)(etadteg,)8(rahcrav(trevnoc+di_sop@=on_wolf@ tceles			

nigeb		

 ''=))'',on_wolf@(llunsi(mirtl fi	

:onwolf_lebal	

号票小找查环循--	

	

  on_hcnarb@=on_hcnarb dna --  on_wolf@=)11,on_wolf(tfel erehw  )kcolon(htiw wolfyap_mr_t morf )on_wolf(xam =on_wolf@   tceles	

复重票小成造会则否，库仓个一哪个一定指能不店门有所应对该应--	

 )211,)(etadteg,)8(rahcrav(trevnoc+ di_sop@=on_wolf@ tceles	

'999'=di_sop@ tceles	

号单前当到得先首--	

	

 on_redro@ = on_redro erehw	

 )kcolon(htiw elas_enilno_mr_t morf	

)(etadteg=etad_repo@,latot=latot@,tnuoma=tnuoma@,)'',edoc_rediug(llunsi=di_elas@,'1001'=di_repo@,edoc_pohs=on_hcnarb@,'999'=di_sop@,on_rebmem=di_drac@ tceles	


dne		

revo_lebal otog			

'号单此无者或，货提经已号单该'=on_wolf@ tceles			

nigeb		

0=wor_ll@ fi	

''=)'',on_wolf(llunsi dna on_redro@ = on_redro erehw )kcolon(htiw elas_enilno_mr_t morf)1(tnuoc=wor_ll@ tceles	

算结要需子单有否是断判--	

 

dne		

revo_lebal otog			

on_wolf@ tceles			

nigeb		

 0>)on_wolf@(nel fi	

 on_redro@ = on_redro erehw )kcolon(htiw elas_enilno_mr_t morf on_wolf=on_wolf@ tceles	

单账结回返接直话的有算结经已否是--	


dne		

revo_lebal otog			

			'效无号券提应对号单该'=on_wolf@ tceles			

nigeb		

0=wor_ll@ fi	

edoc_rehcuov@=edoc_rehcuov dna on_redro@ = on_redro erehw )kcolon(htiw elas_enilno_mr_t morf)1(tnuoc=wor_ll@ tceles	

确正否是号券提断判--	

	

''=ofni_sl@ tceles	

	

''=on_wolf@ tceles	

0=wor_ll@ tceles	

'0'=yapsi_rts@ tceles	

0=yap_di_wolf@ tceles	

0=di_wolf@ tceles	

0=yap_deen@ tceles	

值化始初--	

				

额余值储别类、值储目项、卡值储回返--			)002(rahcrav	ofni_sl@			

,tni		tnuoc_ll@			

,tni			wor_ll@			

理处不则否理处才据数有，据数有否是--		,)1(rahc		yapsi_rts@			

额金的款付卡值储要需--	,)4,61(ciremun		yap_deen@			

额金款付--			,)4,61(ciremun latot@			

额金据单--			,)4,61(ciremun tnuoma@			

di师技应对细明--		,)4(rahc	liated_di_elas@			

,emitetad	etad_repo@			

率比成提牌品--		,)4,61(ciremun	 mun_cca@			

率比成提牌品--		,)4,61(ciremun   etar_dnarb@			

率比成提别类--		,)4,61(ciremun  etar_nruter@			

价原--		,)4,61(ciremun  ecirp_ecruos@			

价本成--		,)4,61(ciremun ecirp_tsoc@			

价售--		,)4,61(ciremun ecirp_elas@			

量数售销--		,)4,61(ciremun	ytq_elas@			

牌品--			,)02(rahc ondnarb_meti@			

,)02(rahc	onslc_meti@			

,)02(rahc	on_meti@			

di师技--			,)4(rahc	di_elas@			

di员作操--			,)4(rahc	di_repo@			

款付号序顺水流--			,tni		yap_di_wolf@			

品商号序顺水流--			,tni		di_wolf@			

,tni		pmet@			

,)02(rahcrav	 on_wolf@			


,)02(rahcrav	epyt_drac@			

,)02(rahcrav	on_drac@			

,)02(rahcrav	 di_drac@			

,)01(rahcrav	 on_hcnarb@			

,)01(rahcrav	 di_sop@ eralced	

62017102本版--	

 nigeb

取提单订上线--

sa

)

值回返--		tuptuo )001(rahcrav nruter@	

号券提--		,)46(rahcrav	edoc_rehcuov@	

额金款付--			,)4,61(ciremun tma_yap@	

号单--		,)02(rahcrav on_redro@	

(yap_elas_nilno_rp erudecorp etaerc


og

yap_elas_nilno_rp erudecorp pord  

)'yap_elas_nilno_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_pc_change_costprice(MS).sql^^^^

dne

nruter    

    

dne    

dne       

dne                       

etad_repo@=etad_repo dna on_hcnarb@ = on_hcnarb dna on_meti@=on_meti erehw                          

2mun@ + tma_egnahc_tsoc=tma_egnahc_tsoc ,tma_elttes@=tma_elttes ,ecirptsoc_da@=ecirp_tsoc tes musyad_cxj_ad_t etadpu              			

nigeb                       

esle                   

dne                       

)'0',2mun@,ecirp_elas@*ytq_kcots@,ecirptsoc_da@*ytq_kcots@,ytq_kcots@,ecirp_elas@*ytq_kcots@,2mun@ - ecirptsoc_da@*ytq_kcots@,ytq_kcots@,ecirptsoc_da@,)121 ,)(etadteg ,)01(rahc(trevnoc,onhcnarb_sa@,onmeti_sa@(seulav                           

)galf_moc,tma_egnahc_tsoc,2tma_elttes,tma_elttes,ytq_elttes,2tma_tini,tma_tini,ytq_tini,ecirp_tsoc,etad_repo,on_hcnarb,on_meti(musyad_cxj_ad_t otni tresni                           

onmeti_sa@=on_meti erehw ofni_meti_db_t morf ecirp_elas=ecirp_elas@ tceles                               

0=ecirp_elas@  fi                           

0=ytq_kcots@ tes                               

llun si ytq_kcots@ fi                           

0=ecirp_elas@ tes                               

llun si ecirp_elas@ fi                            

onhcnarb_sa@=on_hcnarb dna onmeti_sa@=on_meti erehw ecirp_hcnarb_cp_t morf ecirp_elas=ecirp_elas@ tceles                           

onhcnarb_sa@=on_hcnarb dna onmeti_sa@=on_meti erehw kcots_hcnarb_mi_t morf ytq_kcots=ytq_kcots@ tceles                           

nigeb                       

)121 ,)(etadteg ,)01(rahc(trevnoc<)'10-10-0091',etad_repo@(llunsi fi                  

ytq_elttes@*ecirptsoc_da@=tma_elttes@ tceles                   

tma_elttes@ - ytq_elttes@*ecirptsoc_da@=2mun@ tceles       			

       			

)onhcnarb_sa@=on_hcnarb dna onmeti_sa@=on_meti erehw musyad_cxj_ad_t morf )etad_repo(xam tceles(=etad_repo       			

 dna onhcnarb_sa@ = on_hcnarb dna onmeti_sa@=on_meti erehw         		

 musyad_cxj_ad_t morf         		

ytq_elttes=ytq_elttes@ ,tma_elttes=tma_elttes@                		

,ecirp_tsoc=ecirp_tsoc@ ,etad_repo=etad_repo@ ,on_hcnarb=on_hcnarb@ ,on_meti=on_meti@ tceles       			

nigeb   		

))))onhcnarb_sa@=on_hcnarb dna onmeti_sa@=on_meti( erehw musyad_cxj_ad_t morf )etad_repo(xam tceles(=etad_repo dna onhcnarb_sa@=on_hcnarb dna onmeti_sa@=on_meti( erehw musyad_cxj_ad_t morf * tceles(stsixe fi	    

nigeb    

esle    

dne    

ruc_hcnarb etacollaed    	

ruc_hcnarb esolc      

dne      

onhcnarb_sa@ otni ruc_hcnarb hctef	      

dne         

dne                       

etad_repo@=etad_repo dna on_hcnarb@ = on_hcnarb dna on_meti@=on_meti erehw                          

2mun@ + tma_egnahc_tsoc=tma_egnahc_tsoc ,tma_elttes@=tma_elttes ,ecirptsoc_da@=ecirp_tsoc tes musyad_cxj_ad_t etadpu           				

nigeb                       

esle                   

dne                       

)'0',2mun@,ecirp_elas@*ytq_kcots@,ecirptsoc_da@*ytq_kcots@,ytq_kcots@,ecirp_elas@*ytq_kcots@,2mun@ - ecirptsoc_da@*ytq_kcots@,ytq_kcots@,ecirptsoc_da@,)121 ,)(etadteg ,)01(rahc(trevnoc,onhcnarb_sa@,onmeti_sa@(seulav                           

)galf_moc,tma_egnahc_tsoc,2tma_elttes,tma_elttes,ytq_elttes,2tma_tini,tma_tini,ytq_tini,ecirp_tsoc,etad_repo,on_hcnarb,on_meti(musyad_cxj_ad_t otni tresni                           

onmeti_sa@=on_meti erehw ofni_meti_db_t morf ecirp_elas=ecirp_elas@ tceles                               

0=ecirp_elas@  fi                           

0=ytq_kcots@ tes                               

llun si ytq_kcots@ fi                           

0=ecirp_elas@ tes                               

llun si ecirp_elas@ fi                            

onhcnarb_sa@=on_hcnarb dna onmeti_sa@=on_meti erehw ecirp_hcnarb_cp_t morf ecirp_elas=ecirp_elas@ tceles                           

onhcnarb_sa@=on_hcnarb dna onmeti_sa@=on_meti erehw kcots_hcnarb_mi_t morf ytq_kcots=ytq_kcots@ tceles                           

nigeb                       

)121 ,)(etadteg ,)01(rahc(trevnoc<)'10-10-0091',etad_repo@(llunsi fi                    

ytq_elttes@*ecirptsoc_da@=tma_elttes@ tceles                       

tma_elttes@ - ytq_elttes@*ecirptsoc_da@=2mun@ tceles       				

       				

                    

)onhcnarb_sa@=on_hcnarb dna onmeti_sa@=on_meti erehw musyad_cxj_ad_t morf )etad_repo(xam tceles(=etad_repo       				

 dna onhcnarb_sa@ = on_hcnarb dna onmeti_sa@=on_meti erehw         			

 musyad_cxj_ad_t morf         			

ytq_elttes=ytq_elttes@ ,tma_elttes=tma_elttes@                			

,ecirp_tsoc=ecirp_tsoc@ ,etad_repo=etad_repo@ ,on_hcnarb=on_hcnarb@ ,on_meti=on_meti@ tceles       				

nigeb   			

))))onhcnarb_sa@=on_hcnarb dna onmeti_sa@=on_meti( erehw musyad_cxj_ad_t morf )etad_repo(xam tceles(=etad_repo dna onhcnarb_sa@=on_hcnarb dna onmeti_sa@=on_meti( erehw musyad_cxj_ad_t morf * tceles(stsixe fi 	      

nigeb      

0=sutats_hctef@@ elihw    	

onhcnarb_sa@ otni ruc_hcnarb hctef    	

ruc_hcnarb nepo    	

'5' = epyt_edart dna '2' = ytreporp erehw ofni_hcnarb_db_t morf on_hcnarb tceles       	

 rof rosruc ruc_hcnarb eralced    	

nigeb    

)3 = )on_hcnarb_rhc@(nel( fi    

/*    

onmeti_sa@ = on_meti erehw etad_etadpu@ = 3rehto tes ofni_meti_db_t etadpu    

)121 ,)(etadteg ,)01(rahc(trevnoc=etad_etadpu@ tceles    

82-90-5002 sjuw yb detnemmoc */    

    	

on_hcnarb_rhc@ = on_hcnarb dna onmeti_sa@=on_meti erehw       	

 ytq_kcots * ecirptsoc_da@= tma_tsoc,ecirptsoc_da@ = tsoc_gva tes kcots_hcnarb_mi_t etadpu    	

esle    

)'5' = epyt_edart dna '2' = ytreporp erehw ofni_hcnarb_db_t morf on_hcnarb tceles( ni on_hcnarb dna onmeti_sa@=on_meti erehw       	

 ytq_kcots * ecirptsoc_da@= tma_tsoc,ecirptsoc_da@ = tsoc_gva tes kcots_hcnarb_mi_t etadpu       

 'on_hcnarb_g'=di_rav_sys erehw metsys_sys_t morf eulav_rav_sys=onhcnarb_sa@ tceles--       

)店分SOP、管托(价本成调店门的地本有所 -- )3 = )on_hcnarb_rhc@(nel( fi    

onhcnarb_sa@ = on_hcnarb_rhc@ tceles    


'ip_tsoc'=di_rav_sys erehw metsys_sys_t morf )'ip' ,eulav_rav_sys(llunsi=epyt_tsoc@ tceles --    


	nruter ))'ip_tsoc'=di_rav_sys (erehw metsys_sys_t morf * tceles(stsixe ton fi--    


    

口接飞龙 --           )01(rahc etad_etadpu@ --    

)01(rahcrav  on_hcnarb_rhc@    

,)4,61(ciremun ecirp_elas@    

,)4,61(ciremun  ytq_kcots@    

,)4,61(ciremun tma_elttes@    

,)4,61(ciremun ytq_elttes@    

,)4,61(ciremun ecirp_tsoc@    

,)4,61(ciremun    2mun@    

,)01(rahc etad_repo@    

,)6(rahc on_hcnarb@    

,)02(rahc on_meti@    

 eralced

nigeb

sa

))4,61(ciremun ecirptsoc_da@	

,)6(rahcrav onhcnarb_sa@	

,)02(rahcrav onmeti_sa@        

(ecirptsoc_egnahc_cp_rp erudecorp ETAERC


og

ecirptsoc_egnahc_cp_rp erudecorp pord  

)'ecirptsoc_egnahc_cp_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_pc_price_flow_effect(MS).sql^^^^

 dne


))121,etad_dne,)01(rahc(trevnoc > )121,)(etadteg,)01(rahc(trevnoc( 				

 dna )'LLA' = on_hcnarb rO '000'=on_hcnarb( dna '9'=epyt_laiceps erehw   		

 ecirp_ceps_mr_t morf eteled   

/*********61-70-4002***品商1+001的效失除删***********/   

   

'ecirp_egnahc'=)di_rav_sys(rewol erehw metsys_sys_t eteled  


 rosruc_wolfecirp  etacollaed  

rosruc_wolfecirp esolc	


 dne  

2tsil_hcnarb@,tsil_hcnarb@,5piv_dlo@,5piv_wen@,4piv_dlo@,4piv_wen@,3piv_dlo@,3piv_wen@,2piv_dlo@,2piv_wen@,1piv_dlo@,1piv_wen@ 	

,4ecirp_dlo@,4ecirp_wen@,3ecirp_dlo@,3ecirp_wen@,2ecirp_dlo@,2ecirp_wen@ 	

,epyt_ecirp@,galf_hcnarb@,ecirp_dlo@,ecirp_wen@ ,on_meti@ ,galf_dilav@ 		

,on_teehs@ ,on_hcnarb@ ,on_snart@ otni rosruc_wolfecirp hctef	


 5piv_dlo@, 5piv_wen@         

, 4piv_dlo@, 4piv_wen@, 3piv_dlo@, 3piv_wen@, 2piv_dlo@, 2piv_wen@, 1piv_dlo@, 1piv_wen@         

, 4ecirp_dlo@, 4ecirp_wen@, 3ecirp_dlo@, 3ecirp_wen@, 2ecirp_dlo@, 2ecirp_wen@, epyt_ecirp@         

, galf_hcnarb@,ecirp_dlo@ ,ecirp_wen@ ,on_meti@ ,xp_on_hcnarb@  xpr_tceffe_wolf_ecirp_cp_rp cexe    

价调联关 91.01.6002 csgnauH yB ddA--    

	

dne	

nruter   	

'ecirp_egnahc'=)di_rav_sys(rewol erehw metsys_sys_t eteled   	

rosruc_wolfecirp  etacollaed   	

nigeb	

 0 =! rorre@@ fi	


	

on_teehs@ = on_teehs erehw		

 '1' = galf_dilav tes  		

retsam_wolf_ecirp_cp_t etadpu   	

 esle	

 dne 	

dne   	

on_teehs@ = on_teehs erehw  			

 '2' = galf_dilav tes				

retsam_wolf_ecirp_cp_t etadpu 			

esle  		

on_teehs@ = on_teehs erehw  			

 '1' = galf_dilav tes				

retsam_wolf_ecirp_cp_t etadpu 			

 on_hcnarb_g@ = on_hcnarb@ fi  		

  nigeb   	

esle   	

on_teehs@ = on_teehs erehw   		

 '2' = galf_dilav tes 			

retsam_wolf_ecirp_cp_t etadpu  		

 'LLA' = on_hcnarb@ fi   	

nigeb	

'000' = on_hcnarb_g@ fi	

))'1'为设部全(:部分(             --	

)'2'为设>--'LLA'为码编,'2'为设>--部分为码编,'1'为设>--部总为码编(:部总(志标效生新更 --	


dne 	

						

 dne                       

rosruc_hcnarb  etacollaed                        	

rosruc_hcnarb esolc				

	dne			

on_hcnarb@ otni rosruc_hcnarb hctef				

:1tsixe_on                                   

dne					

					

)on_teehs@,tsil_hcnarb@,)dne 5ecirp_piv_meti@ esle 5piv_wen@ neht '1' nehw )1,9,tsil_hcnarb@(gnirtsbus esac(			  				

,)dne 4ecirp_piv_meti@ esle 4piv_wen@ neht '1' nehw )1,8,tsil_hcnarb@(gnirtsbus esac(			  				

,)dne 3ecirp_piv_meti@ esle 3piv_wen@ neht '1' nehw )1,7,tsil_hcnarb@(gnirtsbus esac(			  				

,)dne 2ecirp_piv_meti@ esle 2piv_wen@ neht '1' nehw )1,6,tsil_hcnarb@(gnirtsbus esac(			  				

,'0'			  				

,)dne ecirp_emehcs_meti@ esle 4ecirp_wen@ neht '1' nehw )1,4,tsil_hcnarb@(gnirtsbus esac(			  				

,)dne ecirp_piv_meti@ esle 1piv_wen@ neht '1' nehw )1,5,tsil_hcnarb@(gnirtsbus esac(							

,)dne ecirp_elas_meti@ esle 3ecirp_wen@ neht '1' nehw )1,3,tsil_hcnarb@(gnirtsbus esac(			  				

,)dne ecirp_esab_meti@ esle 2ecirp_wen@ neht '1' nehw )1,2,tsil_hcnarb@(gnirtsbus esac(			  				

,)dne ecirp_meti@ esle ecirp_wen@ neht '1' nehw )1,1,tsil_hcnarb@(gnirtsbus esac(				  			

,on_meti@,on_hcnarb@( SEULAV			  			

  )on_teehs,tsil_ecirp, 5ecirp_piv,4ecirp_piv ,3ecirp_piv,2ecirp_piv		  					

   ,galf_moc,ecirp_emehcs,ecirp_piv,ecirp_elas ,ecirp_esab ,ecirp ,on_meti ,on_hcnarb (							

 ecirp_hcnarb_cp_t OTNI TRESNI						

nigeb					

esle					

dne					

on_meti@=on_meti dna on_hcnarb@=on_hcnarb EREHW		  				 

on_teehs@=on_teehs							

,'0'=galf_moc                            

,tsil_hcnarb@ = tsil_ecirp							

,)dne 5ecirp_piv esle 5piv_wen@ neht '1' nehw )1,9,tsil_hcnarb@(gnirtsbus esac( = 5ecirp_piv							

,)dne 4ecirp_piv esle 4piv_wen@ neht '1' nehw )1,8,tsil_hcnarb@(gnirtsbus esac( = 4ecirp_piv							

,)dne 3ecirp_piv esle 3piv_wen@ neht '1' nehw )1,7,tsil_hcnarb@(gnirtsbus esac( = 3ecirp_piv							

,)dne 2ecirp_piv esle 2piv_wen@ neht '1' nehw )1,6,tsil_hcnarb@(gnirtsbus esac( = 2ecirp_piv							

,)dne ecirp_piv esle 1piv_wen@ neht '1' nehw )1,5,tsil_hcnarb@(gnirtsbus esac( = ecirp_piv							

,)dne ecirp_emehcs esle 4ecirp_wen@ neht '1' nehw )1,4,tsil_hcnarb@(gnirtsbus esac( = ecirp_emehcs							

,)dne ecirp_elas esle 3ecirp_wen@ neht '1' nehw )1,3,tsil_hcnarb@(gnirtsbus esac( = ecirp_elas							

,)dne ecirp_esab esle 2ecirp_wen@ neht '1' nehw )1,2,tsil_hcnarb@(gnirtsbus esac( = ecirp_esab							

,)dne ecirp esle ecirp_wen@ neht '1' nehw )1,1,tsil_hcnarb@(gnirtsbus esac( = ecirp TES							

 ecirp_hcnarb_cp_t ETADPU						

nigeb					

在存否是-- )on_hcnarb@=on_hcnarb dna )on_meti@ = on_meti( erehw ecirp_hcnarb_cp_t morf '1' tceles(stsixe  fi					

					

dne						

)on_meti@ = on_meti( erehw			 				

)dne 5ecirp_piv esle 5piv_wen@ neht '1' nehw )1,9,tsil_hcnarb@(gnirtsbus esac( = 5ecirp_piv				   				

,)dne 4ecirp_piv esle 4piv_wen@ neht '1' nehw )1,8,tsil_hcnarb@(gnirtsbus esac( = 4ecirp_piv				   				

,)dne 3ecirp_piv esle 3piv_wen@ neht '1' nehw )1,7,tsil_hcnarb@(gnirtsbus esac( = 3ecirp_piv				   				

,)dne 2ecirp_piv esle 2piv_wen@ neht '1' nehw )1,6,tsil_hcnarb@(gnirtsbus esac( = 2ecirp_piv				   				

,)dne ecirp_piv esle 1piv_wen@ neht '1' nehw )1,5,tsil_hcnarb@(gnirtsbus esac( = ecirp_piv				   				

, etad_etadpu@=etad_etadpu				   				

,)dne ecirp_emehcs esle 4ecirp_wen@ neht '1' nehw )1,4,tsil_hcnarb@(gnirtsbus esac( = ecirp_emehcs				   				

,)dne ecirp_elas esle 3ecirp_wen@ neht '1' nehw )1,3,tsil_hcnarb@(gnirtsbus esac( = ecirp_elas				   				

,)dne ecirp_esab esle 2ecirp_wen@ neht '1' nehw )1,2,tsil_hcnarb@(gnirtsbus esac( = ecirp_esab				   				

,)dne ecirp esle ecirp_wen@ neht '1' nehw )1,1,tsil_hcnarb@(gnirtsbus esac( = ecirp tes			   					

 ofni_meti_db_t etadpu							

'0' = galf_moc_sl@ tceles							

nigeb			 			

esle		 			

'1' = galf_moc_sl@ tceles						

)单价调的部总即(单价调的地本部分非 -- )on_hcnarb_g@ >< galf_hcnarb@( fi	    				

                 	


1tsixe_on otog  	  				

0 > ))2tsil_hcnarb@(mirtr(nel dna 0 =< )2tsil_hcnarb@,'|'+)on_hcnarb@(mirtr+'|'(xednirahc fi      	  			

nigeb  			

0=sutats_hctef@@ elihw			

on_hcnarb@ otni rosruc_hcnarb hctef			

rosruc_hcnarb nepo	     		

				

dne				

))on_hcnarb_g@(mirtr(mirtl ekil )3,on_hcnarb(tfel dna )'6','5','8','7','3','4','1','0'(ni epyt_edart erehw ofni_hcnarb_db_t morf on_hcnarb tcnitsid tceles					

rof rosruc rosruc_hcnarb eralced					

nigeb				

esle                     

dne				

)on_hcnarb@(mirtr = )3,on_hcnarb(tfel dna )'6','5','8','7','3','4','1','0'(ni epyt_edart erehw ofni_hcnarb_db_t morf on_hcnarb tcnitsid tceles					

rof rosruc rosruc_hcnarb eralced					

nigeb				

'LLA' >< )on_hcnarb@(mirtr dna 3 = ))on_hcnarb@(mirtr(nel  fi                     


nigeb		

部分-- '000' >< on_hcnarb_g@ dna )3 = ))on_hcnarb@(mirtr(nel ro 0 > ) )6,2,2tsil_hcnarb@(gnirtsbus(nel ro'LLA' = on_hcnarb@ ro on_hcnarb_g@ = on_hcnarb@( fi esle	

dne		

dne	 			

dne					

)on_teehs@,tsil_hcnarb@,)dne 5ecirp_piv_meti@ esle 5piv_wen@ neht '1' nehw )1,9,tsil_hcnarb@(gnirtsbus esac(			  				

,)dne 4ecirp_piv_meti@ esle 4piv_wen@ neht '1' nehw )1,8,tsil_hcnarb@(gnirtsbus esac(			  				

,)dne 3ecirp_piv_meti@ esle 3piv_wen@ neht '1' nehw )1,7,tsil_hcnarb@(gnirtsbus esac(			  				

,)dne 2ecirp_piv_meti@ esle 2piv_wen@ neht '1' nehw )1,6,tsil_hcnarb@(gnirtsbus esac(			  				

,'0'			  				

,)dne ecirp_emehcs_meti@ esle 4ecirp_wen@ neht '1' nehw )1,4,tsil_hcnarb@(gnirtsbus esac(			  				

,)dne ecirp_piv_meti@ esle 1piv_wen@ neht '1' nehw )1,5,tsil_hcnarb@(gnirtsbus esac(			  				

,)dne ecirp_elas_meti@ esle 3ecirp_wen@ neht '1' nehw )1,3,tsil_hcnarb@(gnirtsbus esac(			  				

,)dne ecirp_esab_meti@ esle 2ecirp_wen@ neht '1' nehw )1,2,tsil_hcnarb@(gnirtsbus esac(			  				

,)dne ecirp_meti@ esle ecirp_wen@ neht '1' nehw )1,1,tsil_hcnarb@(gnirtsbus esac(			  				

,on_meti@,on_hcnarb@( SEULAV			  			

  ) on_teehs,tsil_ecirp,5ecirp_piv,4ecirp_piv ,3ecirp_piv,2ecirp_piv		  					

   ,galf_moc,ecirp_emehcs,ecirp_piv,ecirp_elas ,ecirp_esab ,ecirp ,on_meti ,on_hcnarb (							

 ecirp_hcnarb_cp_t OTNI TRESNI						

nigeb					

esle					

dne					

on_meti@=on_meti dna on_hcnarb@=on_hcnarb EREHW		  				

on_teehs@=on_teehs							

,'0'=galf_moc                    		

,tsil_hcnarb@ = tsil_ecirp							

,)dne 5ecirp_piv esle 5piv_wen@ neht '1' nehw )1,9,tsil_hcnarb@(gnirtsbus esac( = 5ecirp_piv							

,)dne 4ecirp_piv esle 4piv_wen@ neht '1' nehw )1,8,tsil_hcnarb@(gnirtsbus esac( = 4ecirp_piv							

,)dne 3ecirp_piv esle 3piv_wen@ neht '1' nehw )1,7,tsil_hcnarb@(gnirtsbus esac( = 3ecirp_piv							

,)dne 2ecirp_piv esle 2piv_wen@ neht '1' nehw )1,6,tsil_hcnarb@(gnirtsbus esac( = 2ecirp_piv							

,)dne ecirp_piv esle 1piv_wen@ neht '1' nehw )1,5,tsil_hcnarb@(gnirtsbus esac( = ecirp_piv							

,)dne ecirp_emehcs esle 4ecirp_wen@ neht '1' nehw )1,4,tsil_hcnarb@(gnirtsbus esac( = ecirp_emehcs							

,)dne ecirp_elas esle 3ecirp_wen@ neht '1' nehw )1,3,tsil_hcnarb@(gnirtsbus esac( = ecirp_elas							

,)dne ecirp_esab esle 2ecirp_wen@ neht '1' nehw )1,2,tsil_hcnarb@(gnirtsbus esac( = ecirp_esab							

,)dne ecirp esle ecirp_wen@ neht '1' nehw )1,1,tsil_hcnarb@(gnirtsbus esac( = ecirp TES							

 ecirp_hcnarb_cp_t ETADPU						

nigeb					

在存否是-- )on_hcnarb@=on_hcnarb dna )on_meti@ = on_meti( erehw ecirp_hcnarb_cp_t morf '1' tceles(stsixe fi					

nigeb				

esle			

dne				

rosruc_hcnarb  etacollaed					

 rosruc_hcnarb esolc					

dne					

on_hcnarb@ otni rosruc_hcnarb hctef						

:tsixe_on		  				

)on_teehs@,tsil_hcnarb@,)dne 5ecirp_piv_meti@ esle 5piv_wen@ neht '1' nehw )1,9,tsil_hcnarb@(gnirtsbus esac(			  				

,)dne 4ecirp_piv_meti@ esle 4piv_wen@ neht '1' nehw )1,8,tsil_hcnarb@(gnirtsbus esac(			  				

,)dne 3ecirp_piv_meti@ esle 3piv_wen@ neht '1' nehw )1,7,tsil_hcnarb@(gnirtsbus esac(			  				

,)dne 2ecirp_piv_meti@ esle 2piv_wen@ neht '1' nehw )1,6,tsil_hcnarb@(gnirtsbus esac(			  				

,'0'			  				

,)dne ecirp_emehcs_meti@ esle 4ecirp_wen@ neht '1' nehw )1,4,tsil_hcnarb@(gnirtsbus esac(			  				

,)dne ecirp_piv_meti@ esle 1piv_wen@ neht '1' nehw )1,5,tsil_hcnarb@(gnirtsbus esac(			  				

,)dne ecirp_elas_meti@ esle 3ecirp_wen@ neht '1' nehw )1,3,tsil_hcnarb@(gnirtsbus esac(			  				

,)dne ecirp_esab_meti@ esle 2ecirp_wen@ neht '1' nehw )1,2,tsil_hcnarb@(gnirtsbus esac(			  				

,)dne ecirp_meti@ esle ecirp_wen@ neht '1' nehw )1,1,tsil_hcnarb@(gnirtsbus esac(			  				

,on_meti@,on_hcnarb@( SEULAV			  				

  )on_teehs,tsil_ecirp, 5ecirp_piv,4ecirp_piv ,3ecirp_piv,2ecirp_piv		  						

   ,galf_moc,ecirp_emehcs,ecirp_piv,ecirp_elas ,ecirp_esab ,ecirp ,on_meti ,on_hcnarb (								

 ecirp_hcnarb_cp_t OTNI TRESNI							

ESLE						

on_meti@=on_meti dna on_hcnarb@=on_hcnarb EREHW			  				

on_teehs@=on_teehs 								

,'0'=galf_moc                         		

,tsil_hcnarb@ = tsil_ecirp								

,)dne 5ecirp_piv esle 5piv_wen@ neht '1' nehw )1,9,tsil_hcnarb@(gnirtsbus esac( = 5ecirp_piv								

,)dne 4ecirp_piv esle 4piv_wen@ neht '1' nehw )1,8,tsil_hcnarb@(gnirtsbus esac( = 4ecirp_piv								

,)dne 3ecirp_piv esle 3piv_wen@ neht '1' nehw )1,7,tsil_hcnarb@(gnirtsbus esac( = 3ecirp_piv								

,)dne 2ecirp_piv esle 2piv_wen@ neht '1' nehw )1,6,tsil_hcnarb@(gnirtsbus esac( = 2ecirp_piv								

,)dne ecirp_piv esle 1piv_wen@ neht '1' nehw )1,5,tsil_hcnarb@(gnirtsbus esac( = ecirp_piv								

,)dne ecirp_emehcs esle 4ecirp_wen@ neht '1' nehw )1,4,tsil_hcnarb@(gnirtsbus esac( = ecirp_emehcs								

,)dne ecirp_elas esle 3ecirp_wen@ neht '1' nehw )1,3,tsil_hcnarb@(gnirtsbus esac( = ecirp_elas								

,)dne ecirp_esab esle 2ecirp_wen@ neht '1' nehw )1,2,tsil_hcnarb@(gnirtsbus esac( = ecirp_esab								

,)dne ecirp esle ecirp_wen@ neht '1' nehw )1,1,tsil_hcnarb@(gnirtsbus esac( = ecirp TES								

 ecirp_hcnarb_cp_t ETADPU							

在存不 -- )) on_meti@=on_meti dna on_hcnarb@=on_hcnarb(erehw ecirp_hcnarb_cp_t morf * tceles(stsixe FI						

				


tsixe_on otog  			  				

0 > ))2tsil_hcnarb@(mirtr(nel dna 0 =< )2tsil_hcnarb@,'|'+)on_hcnarb@(mirtr+'|'(xednirahc fi		  				

nigeb	--	  				

 0 > ) )6,2,2tsil_hcnarb@(gnirtsbus(nel FI--	  				

nigeb	  				

0=sutats_hctef@@ elihw					

on_hcnarb@ otni rosruc_hcnarb hctef					

rosruc_hcnarb nepo					

	--						

dne						

)'6','5','8','7','3','4','1','0'(ni epyt_edart erehw ofni_hcnarb_db_t morf on_hcnarb tcnitsid tceles									

rof rosruc rosruc_hcnarb eralced							

nigeb						

esle					

dne						

on_hcnarb@ = onslc_hcnarb erehw ofni_hcnarb_db_t morf on_hcnarb tcnitsid tceles									

rof rosruc rosruc_hcnarb eralced							

nigeb						

2 = ))on_hcnarb@(mirtr(nel fi esle					

dne						

)on_hcnarb@(mirtr = )3,on_hcnarb(tfel dna )'6','5','8','7','3','4','1','0'(ni epyt_edart erehw ofni_hcnarb_db_t morf on_hcnarb tcnitsid tceles									

rof rosruc rosruc_hcnarb eralced							

nigeb						

'LLA' >< )on_hcnarb@(mirtr dna 3 = ))on_hcnarb@(mirtr(nel  fi					

品商的构机各的中表存不入插先 --					

nigeb				

2 = ))on_hcnarb@(mirtr(nel ro 3 = ))on_hcnarb@(mirtr(nel ro 0 > ) )6,2,2tsil_hcnarb@(gnirtsbus(nel ro 'LLA' = on_hcnarb@ fi			

nigeb			

'000' = on_hcnarb_g@ fi		

on_meti@ = on_meti erehw ofni_meti_db_t morf					

5ecirp_piv = 5ecirp_piv_meti@					

,4ecirp_piv = 4ecirp_piv_meti@,3ecirp_piv = 3ecirp_piv_meti@,2ecirp_piv = 2ecirp_piv_meti@,ecirp_piv = ecirp_piv_meti@					

,ecirp_emehcs = ecirp_emehcs_meti@,ecirp_elas = ecirp_elas_meti@,ecirp_esab = ecirp_esab_meti@,ecirp = ecirp_meti@ tceles			

格价各中案档品商取--	

dne		   	

)on_meti@ = on_meti( erehw			 		

)dne 5ecirp_piv esle 5piv_wen@ neht '1' nehw )1,9,tsil_hcnarb@(gnirtsbus esac( = 5ecirp_piv				   		

,)dne 4ecirp_piv esle 4piv_wen@ neht '1' nehw )1,8,tsil_hcnarb@(gnirtsbus esac( = 4ecirp_piv				   		

,)dne 3ecirp_piv esle 3piv_wen@ neht '1' nehw )1,7,tsil_hcnarb@(gnirtsbus esac( = 3ecirp_piv				   		

,)dne 2ecirp_piv esle 2piv_wen@ neht '1' nehw )1,6,tsil_hcnarb@(gnirtsbus esac( = 2ecirp_piv				   		

,)dne ecirp_piv esle 1piv_wen@ neht '1' nehw )1,5,tsil_hcnarb@(gnirtsbus esac( = ecirp_piv				   		

, etad_etadpu@=etad_etadpu				   		

,)dne ecirp_emehcs esle 4ecirp_wen@ neht '1' nehw )1,4,tsil_hcnarb@(gnirtsbus esac( = ecirp_emehcs				   		

,)dne ecirp_elas esle 3ecirp_wen@ neht '1' nehw )1,3,tsil_hcnarb@(gnirtsbus esac( = ecirp_elas				   		

,)dne ecirp_esab esle 2ecirp_wen@ neht '1' nehw )1,2,tsil_hcnarb@(gnirtsbus esac( = ecirp_esab				   		

,)dne ecirp esle ecirp_wen@ neht '1' nehw )1,1,tsil_hcnarb@(gnirtsbus esac( = ecirp  tes			   		

 ofni_meti_db_t etadpu				

nigeb			

 )0 > )2tsil_hcnarb@,'|'+)on_kcots_g@(mirtr+'|'(xednirahc ro 0 > )2tsil_hcnarb@,'|'+)on_hcnarb_g@(mirtr+'|'(xednirahc(                      

 dna )on_kcots_g@ = on_hcnarb@ ro 2 = )on_hcnarb@(nel ro 'LLA' = on_hcnarb@ ro on_hcnarb_g@ = on_hcnarb@( fi	  	

		

41-70-0102 jsgnat 格价案档品商新更亦时同，格价库仓认默调--	   	

nigeb   	

70.30.6002 csgnauH yB ddA 价送配\价发批\价员会\价售零\价进 --  'XP'=on_snart@ fi   

	'|' + 2tsil_hcnarb@ = 2tsil_hcnarb@ tceles  0 > ))2tsil_hcnarb@(mirtr(nel fi   

)'',2tsil_hcnarb@(llunsi = 2tsil_hcnarb@ tceles   

)on_hcnarb_g@(mirtr = on_hcnarb_g@ fi   

)on_hcnarb@(mirtr = on_hcnarb@ fi   

nigeb  

0=sutats_hctef@@ elihw  

  

on_hcnarb@=xp_on_hcnarb@ tceles  

   				

2tsil_hcnarb@,tsil_hcnarb@,5piv_dlo@,5piv_wen@,4piv_dlo@,4piv_wen@,3piv_dlo@,3piv_wen@,2piv_dlo@,2piv_wen@,1piv_dlo@,1piv_wen@   				

,4ecirp_dlo@,4ecirp_wen@,3ecirp_dlo@,3ecirp_wen@,2ecirp_dlo@,2ecirp_wen@   			

,epyt_ecirp@,galf_hcnarb@,ecirp_dlo@,ecirp_wen@ ,on_meti@ ,galf_dilav@,on_teehs@ ,on_hcnarb@ ,on_snart@ otni rosruc_wolfecirp hctef  

rosruc_wolfecirp nepo  



 on_teehs.a yb redro		

))(etadteg =< etad_dilav.a ( dna  		

)'2' = galf_dilav.a ro '0' = galf_dilav.a ( dna  		

 ) 'XP' = on_snart.a ( dna )'1' = galf_evorppa.a ( dna  		

 ) on_teehs.b = on_teehs.a ( erehw		

   b liated_wolf_ecirp_cp_t  			

 ,a retsam_wolf_ecirp_cp_t morf 		

2tsil_hcnarb.a,tsil_hcnarb.a   			

,5piv_dlo.b,5piv_wen.b,4piv_dlo.b,4piv_wen.b,3piv_dlo.b,3piv_wen.b,2piv_dlo.b,2piv_wen.b,1piv_dlo.b,1piv_wen.b   			

,4ecirp_dlo.b,4ecirp_wen.b,3ecirp_dlo.b,3ecirp_wen.b,2ecirp_dlo.b,2ecirp_wen.b   			

,epyt_ecirp.b,galf_hcnarb.a ,ecirp_dlo.b,ecirp_wen.b ,on_meti.b ,galf_dilav.a   					

,on_teehs.a ,on_hcnarb.a ,on_snart.a tcnitsid tceles   	

rof rosruc rosruc_wolfecirp eralced 	

esle  

 on_teehs.a yb redro		

))(etadteg =< etad_dilav.a ( dna  )'0' = galf_dilav.a ( dna  		

 )'XP' = on_snart.a ( dna )'1' = galf_evorppa.a ( dna  		

 ) on_teehs.b = on_teehs.a ( erehw		

   b liated_wolf_ecirp_cp_t  			

 ,a retsam_wolf_ecirp_cp_t morf 		

2tsil_hcnarb.a,tsil_hcnarb.a   			

,5piv_dlo.b,5piv_wen.b,4piv_dlo.b,4piv_wen.b,3piv_dlo.b,3piv_wen.b,2piv_dlo.b,2piv_wen.b,1piv_dlo.b,1piv_wen.b   			

,4ecirp_dlo.b,4ecirp_wen.b,3ecirp_dlo.b,3ecirp_wen.b,2ecirp_dlo.b,2ecirp_wen.b   			

,epyt_ecirp.b ,galf_hcnarb.a ,ecirp_dlo.b,ecirp_wen.b ,on_meti.b ,galf_dilav.a   					

,on_teehs.a ,on_hcnarb.a ,on_snart.a tcnitsid tceles   	

rof rosruc rosruc_wolfecirp eralced	   

'000' = on_hcnarb_g@ fi   

)效生未但表格价库仓新更已:'2' , 效生已:'1' ,效生未:'0' ( galf_dilav --  



'1'=ecirp_hcnarb.ofni_meti_db_t dna          --

dne  

nruter   	

 0 =! rorre@@ fi	

)  galf_elas.ecirp_hcnarb_cp_t >< galf_elas.ofni_meti_db_t ro			

 ecirp_emehcs.ecirp_hcnarb_cp_t >< ecirp_emehcs.ofni_meti_db_t ro			

 ecirp_piv.ecirp_hcnarb_cp_t >< ecirp_piv.ofni_meti_db_t ro			

 ecirp_elas.ecirp_hcnarb_cp_t >< ecirp_elas.ofni_meti_db_t ro			

 ecirp_esab.ecirp_hcnarb_cp_t >< ecirp_esab.ofni_meti_db_t ro			

 ecirp.ecirp_hcnarb_cp_t >< ecirp.ofni_meti_db_t( dna  		

)on_kcots_g@=on_hcnarb.ecirp_hcnarb_cp_t( dna  		

on_meti.ecirp_hcnarb_cp_t=on_meti.ofni_meti_db_t erehw		

ecirp_hcnarb_cp_t,ofni_meti_db_t morf		

galf_elas.ecirp_hcnarb_cp_t = galf_elas		

,)dne )0,5ecirp_piv.ofni_meti_db_t(llunsi esle )0,5ecirp_piv.ecirp_hcnarb_cp_t(llunsi neht '1' = )1,9,tsil_ecirp.ecirp_hcnarb_cp_t(gnirtsbus ro llun si tsil_ecirp.ecirp_hcnarb_cp_t nehw esac(=5ecirp_piv		

,)dne )0,4ecirp_piv.ofni_meti_db_t(llunsi esle )0,4ecirp_piv.ecirp_hcnarb_cp_t(llunsi neht '1' = )1,8,tsil_ecirp.ecirp_hcnarb_cp_t(gnirtsbus ro llun si tsil_ecirp.ecirp_hcnarb_cp_t nehw esac(=4ecirp_piv		

,)dne )0,3ecirp_piv.ofni_meti_db_t(llunsi esle )0,3ecirp_piv.ecirp_hcnarb_cp_t(llunsi neht '1' = )1,7,tsil_ecirp.ecirp_hcnarb_cp_t(gnirtsbus ro llun si tsil_ecirp.ecirp_hcnarb_cp_t nehw esac(=3ecirp_piv		

,)dne )0,2ecirp_piv.ofni_meti_db_t(llunsi esle )0,2ecirp_piv.ecirp_hcnarb_cp_t(llunsi neht '1' = )1,6,tsil_ecirp.ecirp_hcnarb_cp_t(gnirtsbus ro llun si tsil_ecirp.ecirp_hcnarb_cp_t nehw esac(=2ecirp_piv		

,)dne )0,ecirp_piv.ofni_meti_db_t(llunsi esle )0,ecirp_piv.ecirp_hcnarb_cp_t(llunsi neht '1' = )1,5,tsil_ecirp.ecirp_hcnarb_cp_t(gnirtsbus ro llun si tsil_ecirp.ecirp_hcnarb_cp_t nehw esac(=ecirp_piv		

,)dne )0,ecirp_emehcs.ofni_meti_db_t(llunsi esle )0,ecirp_emehcs.ecirp_hcnarb_cp_t(llunsi neht '1' = )1,4,tsil_ecirp.ecirp_hcnarb_cp_t(gnirtsbus ro llun si tsil_ecirp.ecirp_hcnarb_cp_t nehw esac(=ecirp_emehcs		

,)dne )0,ecirp_elas.ofni_meti_db_t(llunsi esle )0,ecirp_elas.ecirp_hcnarb_cp_t(llunsi neht '1' = )1,3,tsil_ecirp.ecirp_hcnarb_cp_t(gnirtsbus ro llun si tsil_ecirp.ecirp_hcnarb_cp_t nehw esac(=ecirp_elas		

,)dne )0,ecirp_esab.ofni_meti_db_t(llunsi esle )0,ecirp_esab.ecirp_hcnarb_cp_t(llunsi neht '1' = )1,2,tsil_ecirp.ecirp_hcnarb_cp_t(gnirtsbus ro llun si tsil_ecirp.ecirp_hcnarb_cp_t nehw esac(=ecirp_esab		

,)dne )0,ecirp.ofni_meti_db_t(llunsi esle )0,ecirp.ecirp_hcnarb_cp_t(llunsi neht '1' = )1,1,tsil_ecirp.ecirp_hcnarb_cp_t(gnirtsbus ro llun si tsil_ecirp.ecirp_hcnarb_cp_t nehw esac(=ecirp		

 tes ofni_meti_db_t etadpu 	


nruter   	

 0 =! rorre@@ fi	

)   galf_elas.ecirp_hcnarb_cp_t >< galf_elas.ofni_meti_db_t ro			

ecirp_emehcs.ecirp_hcnarb_cp_t >< ecirp_emehcs.ofni_meti_db_t ro			

 ecirp_piv.ecirp_hcnarb_cp_t >< ecirp_piv.ofni_meti_db_t ro			

 ecirp_elas.ecirp_hcnarb_cp_t >< ecirp_elas.ofni_meti_db_t ro			

 ecirp_esab.ecirp_hcnarb_cp_t >< ecirp_esab.ofni_meti_db_t ro			

 ecirp.ecirp_hcnarb_cp_t >< ecirp.ofni_meti_db_t( dna  		

) on_hcnarb_g@=on_hcnarb.ecirp_hcnarb_cp_t ( dna  		

on_meti.ecirp_hcnarb_cp_t=on_meti.ofni_meti_db_t erehw		

ecirp_hcnarb_cp_t,ofni_meti_db_t morf		

galf_elas.ecirp_hcnarb_cp_t = galf_elas		

,)dne )0,5ecirp_piv.ofni_meti_db_t(llunsi esle )0,5ecirp_piv.ecirp_hcnarb_cp_t(llunsi neht '1' = )1,9,tsil_ecirp.ecirp_hcnarb_cp_t(gnirtsbus ro llun si tsil_ecirp.ecirp_hcnarb_cp_t nehw esac(=5ecirp_piv		

,)dne )0,4ecirp_piv.ofni_meti_db_t(llunsi esle )0,4ecirp_piv.ecirp_hcnarb_cp_t(llunsi neht '1' = )1,8,tsil_ecirp.ecirp_hcnarb_cp_t(gnirtsbus ro llun si tsil_ecirp.ecirp_hcnarb_cp_t nehw esac(=4ecirp_piv		

,)dne )0,3ecirp_piv.ofni_meti_db_t(llunsi esle )0,3ecirp_piv.ecirp_hcnarb_cp_t(llunsi neht '1' = )1,7,tsil_ecirp.ecirp_hcnarb_cp_t(gnirtsbus ro llun si tsil_ecirp.ecirp_hcnarb_cp_t nehw esac(=3ecirp_piv		

,)dne )0,2ecirp_piv.ofni_meti_db_t(llunsi esle )0,2ecirp_piv.ecirp_hcnarb_cp_t(llunsi neht '1' = )1,6,tsil_ecirp.ecirp_hcnarb_cp_t(gnirtsbus ro llun si tsil_ecirp.ecirp_hcnarb_cp_t nehw esac(=2ecirp_piv		

,)dne )0,ecirp_piv.ofni_meti_db_t(llunsi esle )0,ecirp_piv.ecirp_hcnarb_cp_t(llunsi neht '1' = )1,5,tsil_ecirp.ecirp_hcnarb_cp_t(gnirtsbus ro llun si tsil_ecirp.ecirp_hcnarb_cp_t nehw esac(=ecirp_piv		

,)dne )0,ecirp_emehcs.ofni_meti_db_t(llunsi esle )0,ecirp_emehcs.ecirp_hcnarb_cp_t(llunsi neht '1' = )1,4,tsil_ecirp.ecirp_hcnarb_cp_t(gnirtsbus ro llun si tsil_ecirp.ecirp_hcnarb_cp_t nehw esac(=ecirp_emehcs		

,)dne )0,ecirp_elas.ofni_meti_db_t(llunsi esle )0,ecirp_elas.ecirp_hcnarb_cp_t(llunsi neht '1' = )1,3,tsil_ecirp.ecirp_hcnarb_cp_t(gnirtsbus ro llun si tsil_ecirp.ecirp_hcnarb_cp_t nehw esac(=ecirp_elas		

,)dne )0,ecirp_esab.ofni_meti_db_t(llunsi esle )0,ecirp_esab.ecirp_hcnarb_cp_t(llunsi neht '1' = )1,2,tsil_ecirp.ecirp_hcnarb_cp_t(gnirtsbus ro llun si tsil_ecirp.ecirp_hcnarb_cp_t nehw esac(=ecirp_esab		

,)dne )0,ecirp.ofni_meti_db_t(llunsi esle )0,ecirp.ecirp_hcnarb_cp_t(llunsi neht '1' = )1,1,tsil_ecirp.ecirp_hcnarb_cp_t(gnirtsbus ro llun si tsil_ecirp.ecirp_hcnarb_cp_t nehw esac(=ecirp		

 tes ofni_meti_db_t etadpu	  

	nigeb  

 '8' = epyt_kcots_g@ ro'7' = epyt_kcots_g@ fi  


dne  

nruter   	

 0 =! rorre@@ fi	

)   galf_elas.ecirp_hcnarb_cp_t >< galf_elas.ofni_meti_db_t ro			

ecirp_emehcs.ecirp_hcnarb_cp_t >< ecirp_emehcs.ofni_meti_db_t ro			

 ecirp_piv.ecirp_hcnarb_cp_t >< ecirp_piv.ofni_meti_db_t ro			

 ecirp_elas.ecirp_hcnarb_cp_t >< ecirp_elas.ofni_meti_db_t ro			

 ecirp_esab.ecirp_hcnarb_cp_t >< ecirp_esab.ofni_meti_db_t ro			

 ecirp.ecirp_hcnarb_cp_t >< ecirp.ofni_meti_db_t( dna  		

on_hcnarb_g@=on_hcnarb.ecirp_hcnarb_cp_t dna  		

on_meti.ecirp_hcnarb_cp_t=on_meti.ofni_meti_db_t erehw		

ecirp_hcnarb_cp_t,ofni_meti_db_t morf		

galf_elas.ecirp_hcnarb_cp_t = galf_elas		

,)dne )0,5ecirp_piv.ofni_meti_db_t(llunsi esle )0,5ecirp_piv.ecirp_hcnarb_cp_t(llunsi neht '1' = )1,9,tsil_ecirp.ecirp_hcnarb_cp_t(gnirtsbus ro llun si tsil_ecirp.ecirp_hcnarb_cp_t nehw esac(=5ecirp_piv		

,)dne )0,4ecirp_piv.ofni_meti_db_t(llunsi esle )0,4ecirp_piv.ecirp_hcnarb_cp_t(llunsi neht '1' = )1,8,tsil_ecirp.ecirp_hcnarb_cp_t(gnirtsbus ro llun si tsil_ecirp.ecirp_hcnarb_cp_t nehw esac(=4ecirp_piv		

,)dne )0,3ecirp_piv.ofni_meti_db_t(llunsi esle )0,3ecirp_piv.ecirp_hcnarb_cp_t(llunsi neht '1' = )1,7,tsil_ecirp.ecirp_hcnarb_cp_t(gnirtsbus ro llun si tsil_ecirp.ecirp_hcnarb_cp_t nehw esac(=3ecirp_piv		

,)dne )0,2ecirp_piv.ofni_meti_db_t(llunsi esle )0,2ecirp_piv.ecirp_hcnarb_cp_t(llunsi neht '1' = )1,6,tsil_ecirp.ecirp_hcnarb_cp_t(gnirtsbus ro llun si tsil_ecirp.ecirp_hcnarb_cp_t nehw esac(=2ecirp_piv		

,)dne )0,ecirp_piv.ofni_meti_db_t(llunsi esle )0,ecirp_piv.ecirp_hcnarb_cp_t(llunsi neht '1' = )1,5,tsil_ecirp.ecirp_hcnarb_cp_t(gnirtsbus ro llun si tsil_ecirp.ecirp_hcnarb_cp_t nehw esac(=ecirp_piv		

,)dne )0,ecirp_emehcs.ofni_meti_db_t(llunsi esle )0,ecirp_emehcs.ecirp_hcnarb_cp_t(llunsi neht '1' = )1,4,tsil_ecirp.ecirp_hcnarb_cp_t(gnirtsbus ro llun si tsil_ecirp.ecirp_hcnarb_cp_t nehw esac(=ecirp_emehcs		

,)dne )0,ecirp_elas.ofni_meti_db_t(llunsi esle )0,ecirp_elas.ecirp_hcnarb_cp_t(llunsi neht '1' = )1,3,tsil_ecirp.ecirp_hcnarb_cp_t(gnirtsbus ro llun si tsil_ecirp.ecirp_hcnarb_cp_t nehw esac(=ecirp_elas		

,)dne )0,ecirp_esab.ofni_meti_db_t(llunsi esle )0,ecirp_esab.ecirp_hcnarb_cp_t(llunsi neht '1' = )1,2,tsil_ecirp.ecirp_hcnarb_cp_t(gnirtsbus ro llun si tsil_ecirp.ecirp_hcnarb_cp_t nehw esac(=ecirp_esab		

, )dne )0,ecirp.ofni_meti_db_t(llunsi esle )0,ecirp.ecirp_hcnarb_cp_t(llunsi neht '1' = )1,1,tsil_ecirp.ecirp_hcnarb_cp_t(gnirtsbus ro llun si tsil_ecirp.ecirp_hcnarb_cp_t nehw esac(=ecirp		

 tes ofni_meti_db_t etadpu	  

nigeb  

 '8' >< epyt_kcots_g@  dna '7' >< epyt_kcots_g@ dna '000' >< on_hcnarb_g@ fi  

71209002 zmgnahz yb deifidom;5价员会/4价员会/3价员会/2价员会/1价员会/价送配/价售零/价发批/价:表代别分111111111:为值其.格价的调所中单XP自取tsil_ecirp, ecirp_hcnarb_cp_t ot tsil_ecirp nmuloc dda--  

表息信品商正修格价的前当构机以，部分于对--  


'0' = detubirtsid_si@ tceles     llun si detubirtsid_si@ fi--  

'detubirtsid_si'=)di_rav_sys(rewol erehw metsys_sys_t morf eulav_rav_sys = detubirtsid_si@ tceles--  


on_kcots_g@ = on_hcnarb erehw ofni_hcnarb_db_t morf epyt_edart = epyt_kcots_g@ tceles  


'100000' = on_kcots_g@ tceles     llun si on_kcots_g@ fi  

'on_kcots_g'=)di_rav_sys(rewol erehw metsys_sys_t morf eulav_rav_sys = on_kcots_g@ tceles  

 

'000' = on_hcnarb_g@ tceles     llun si on_hcnarb_g@ fi  

'on_hcnarb_g'=)di_rav_sys(rewol erehw metsys_sys_t morf eulav_rav_sys = on_hcnarb_g@ tceles  

  	

)121 ,)(etadteg ,)01(rahc(trevnoc=etad_etadpu@ tceles  

'>1' tnirp--  

 

nruter  	

esle  

)'ecirp_egnahc','ecirp_egnahc'(seulav )eman_rav_sys,di_rav_sys(metsys_sys_t otni tresni  	

)'ecirp_egnahc'=)di_rav_sys(rewol erehw metsys_sys_t morf eulav_rav_sys tceles(stsixe ton fi  

志标行运程过置设--  

  

)0002(rahcrav       2tsil_hcnarb@  

,)6(rahc       xp_on_hcnarb@  

,)4,61(ciremun    5ecirp_piv_meti@  

,)4,61(ciremun    4ecirp_piv_meti@  

,)4,61(ciremun    3ecirp_piv_meti@  

,)4,61(ciremun    2ecirp_piv_meti@  

,)4,61(ciremun     ecirp_piv_meti@  

,)4,61(ciremun  ecirp_emehcs_meti@  

,)4,61(ciremun    ecirp_elas_meti@  

,)4,61(ciremun    ecirp_esab_meti@  

,)4,61(ciremun         ecirp_meti@  

识标价调--     ,)0002(rahcrav        tsil_hcnarb@  

5价员会新-- ,     )4,61(ciremun           5piv_wen@  

5价员会原--,     )4,61(ciremun           5piv_dlo@  

4价员会新--,     )4,61(ciremun           4piv_wen@  

4价员会原--,     )4,61(ciremun           4piv_dlo@  

3价员会新--,     )4,61(ciremun           3piv_wen@  

3价员会原--,     )4,61(ciremun           3piv_dlo@  

2价员会新--,     )4,61(ciremun           2piv_wen@  

2价员会原--,     )4,61(ciremun           2piv_dlo@  

1价员会新--,     )4,61(ciremun           1piv_wen@  

1价员会原--,     )4,61(ciremun           1piv_dlo@  

型类店门--,  		)1(rahc       	epyt_kcots_g@  

号编库仓统系--,            )6(rahc          on_kcots_g@  

型类格价--,  		)1(rahc       	epyt_ecirp@  

志标输传--,            )1(rahc         galf_moc_sl@  

构机单制价调--,        )01(rahcrav         galf_hcnarb@  

价送配新--,     )4,61(ciremun           4ecirp_wen@  

价送配原--,     )4,61(ciremun           4ecirp_dlo@  

价售新--,     )4,61(ciremun           3ecirp_wen@  

价售原--,     )4,61(ciremun           3ecirp_dlo@  

价发批新--,     )4,61(ciremun           2ecirp_wen@  

价发批原--,     )4,61(ciremun           2ecirp_dlo@  

价进新--,     )4,61(ciremun            ecirp_wen@  

价进原--,     )4,61(ciremun            ecirp_dlo@  

3rehto.ofni_meti_db_t改 口接机款收飞龙--,          )01(rahc         etad_etadpu@  

版式布分--           ,)1(rahc      detubirtsid_si@--  

号编库仓统系--,           )6(rahc         on_hcnarb_g@  

态状效生--,           )1(rahc          galf_dilav@  

码代品货--,          )02(rahc             on_meti@  

号编据单--,          )81(rahc            on_teehs@  

号编库仓--,           )6(rahc           on_hcnarb@  

号编易交--,           )2(rahc            on_snart@  

 eralced  


nigeb

sa

 tceffe_wolf_ecirp_cp_rp erudecorp etaerc



og

tceffe_wolf_ecirp_cp_rp erudecorp pord  

)'tceffe_wolf_ecirp_cp_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_rm_coupon_lock(MS).sql^^^^


dne

nruter	

'1'=nruter@ tceles	


 di_wolf@=di_wolf erehw	

)(etadteg=emit_kcol_b		

,'1'=kcol_b tes	

 nopuoc_piv_mr_t etadpu	


dne	

nruter		

'0'=nruter@ tceles		

nigeb	

0=wor@	 fi	


etad_dne dna etad_nigeb neewteb )(etadteg dna '0'=esu_si dna '0'=kcol_b dna '0'=kcol_a dna di_wolf@=di_wolf erehw nopuoc_piv_mr_t morf )1(tnuoc=wor@ tceles	


0=wor@ tceles	

化始初--    

	

tni wor@ eralced	

 nigeb

sa

)

值回返--		tuptuo )001(rahcrav nruter@	

di券惠优--		,)0,81(lamiced di_wolf@	

(kcol_nopuoc_mr_rp erudecorp etaerc


og

kcol_nopuoc_mr_rp erudecorp pord  

)'kcol_nopuoc_mr_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_rm_coupon_use(MS).sql^^^^

dne

nruter	

'SSECCUS'=nruter@ tceles	


 di_wolf@=di_wolf erehw	

tnuocsid@=tnuocsid		

,on_wolf@=on_wolf		

,on_hcnarb@=on_hcnarb		

,)(etadteg=etad_esu		

,'1'=esu_si tes	

 nopuoc_piv_mr_t etadpu	


dne	

nruter		

'期过经已者或用使否是查检请，效无券惠优该:RORRE'=nruter@ tceles		

nigeb	

0=wor@	 fi	

etad_dne dna etad_nigeb neewteb )(etadteg dna '0'=esu_si dna '1'=kcol_b dna '0'=kcol_a dna di_wolf@=di_wolf erehw nopuoc_piv_mr_t morf )1(tnuoc=wor@ tceles	


0=wor@ tceles	

化始初--    

tni wor@ eralced	

 nigeb

sa

)

值回返--		tuptuo )001(rahcrav nruter@	

额金扣折--	,)2,81(lamiced tnuocsid@	

号单订--		,)02(rahcrav on_wolf@	

号编店门--		,)02(rahcrav on_hcnarb@	

di券惠优--		,)0,81(lamiced di_wolf@	

(esu_nopuoc_mr_rp erudecorp etaerc


og

esu_nopuoc_mr_rp erudecorp pord  

)'esu_nopuoc_mr_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_rm_deduct-在update里面.sql^^^^

og

dne

	

nruter	

tcuded NOITCASNART KCABLLOR--	

:rre	

	

nruter	

	

rre otog 0 >< rorre@@ fi	

dne	

      				dne		

      			

			

) nam_elas.a = di_elas.b (      			

dna ) )0 >< yenom_elas.a dna )0 > etar_elas.a ro 0 > etar_dnarb.a ro 0 > etar_sslc.a ro 0 > mun_cca.a(( ro ))'B' ,'A' ( ni yaw_lles.a dna 0 > )on_tfihs.a,)4,61(ciremun(trevnoc( (      			

dna ))'vp'=galf_ceps.a dna '1'=ecirppiv_tcuded@( ro ) ecirp_elas.a = ecirp_ecruos.a dna '1' = meticeps_tcuded@ ( ro '0' = meticeps_tcuded@ (      			

dna ) on_hcnarb@ ekil on_hcnarb.a (      			

dna ) ot_tda@ dna morf_tda@ neewteb etad_repo.a ( erehw			

b ) 0 ,'9999' tceles noinu namelas_mr_t morf etar_nruter ,di_elas tceles( ,a wolfelas_mr_t morf 			

)dne ) dne '' esle '率比按' neht 0 > mun_cca.a nehw esac( esle '额金按' neht 0 > )on_tfihs.a,)4,61(ciremun(trevnoc nehw esac( = omem 	     			

 ,)dne ) dne )dne '0' esle '2' neht 0 > etar_sslc.a nehw esac( esle '3' neht 0 > etar_dnarb.a nehw esac( esle '1' neht 0 > )on_tfihs.a,)4,61(ciremun(trevnoc ro 0 > mun_cca.a nehw esac( = epyt_tcuded       			

,)) dne ) dne )dne )dne etar_elas.a esle etar_sslc.a neht 0 > etar_sslc.a nehw esac( esle etar_dnarb.a neht 0 > etar_dnarb.a nehw esac( esle mun_cca.a neht 0 > mun_cca.a nehw esac( * yenom_elas esle ytnq_elas.a * )on_tfihs.a,)4,61(ciremun(trevnoc neht 0 > )on_tfihs.a,)4,61(ciremun(trevnoc nehw esac ( ,)4,61(ciremun(trevnoc = tma_tcuded       			

,)121 ,etad_repo.a ,)01(rahc(trevnoc = etad_repo ,nam_elas.a ,on_meti.a ,on_wolf.a ,on_hcnarb.a ,on_tcuded@ tceles			

) omem ,epyt_tcuded ,tma_tcuded ,etad_repo ,nam_elas ,on_meti ,on_wolf ,on_hcnarb ,on_tcuded (wolf_tcuded_namelas_ad_t otni tresni			

			

nigeb		

esle		

员业营 > 别类 > 牌品 > 品商--		

		

dne		

      			

) nam_elas.a = di_elas.b (      			

dna ) ) 0 >< yenom_elas.a dna )0 > etar_elas.a ro 0 > etar_dnarb.a ro 0 > etar_sslc.a ro 0 > mun_cca.a (( ro ))'B' ,'A' ( ni yaw_lles.a dna 0 > )on_tfihs.a,)4,61(ciremun(trevnoc( (      			

dna ))'vp'=galf_ceps.a dna '1'=ecirppiv_tcuded@( ro ) ecirp_elas.a = ecirp_ecruos.a dna '1' = meticeps_tcuded@ ( ro '0' = meticeps_tcuded@ (      			

dna ) on_hcnarb@ ekil on_hcnarb.a (      			

dna ) ot_tda@ dna morf_tda@ neewteb etad_repo.a ( erehw			

b ) 0 ,'9999' tceles noinu namelas_mr_t morf etar_nruter ,di_elas tceles( ,a wolfelas_mr_t morf 			

)dne ) dne '' esle '率比按' neht 0 > mun_cca.a nehw esac( esle '额金按' neht 0 > )on_tfihs.a,)4,61(ciremun(trevnoc nehw esac( = omem 	     			

 ,)dne ) dne )dne '0' esle '3' neht 0 > etar_dnarb.a nehw esac( esle '2' neht 0 > etar_sslc.a nehw esac( esle '1' neht 0 > )on_tfihs.a,)4,61(ciremun(trevnoc ro 0 > mun_cca.a nehw esac( = epyt_tcuded        			

,)) dne ) dne )dne )dne etar_elas.a esle etar_dnarb.a neht 0 > etar_dnarb.a nehw esac( esle etar_sslc.a neht 0 > etar_sslc.a nehw esac( esle mun_cca.a neht 0 > mun_cca.a nehw esac( * yenom_elas esle ytnq_elas.a * )on_tfihs.a,)4,61(ciremun(trevnoc neht 0 > )on_tfihs.a,)4,61(ciremun(trevnoc nehw esac ( ,)4,61(ciremun(trevnoc = tma_tcuded				

,)121 ,etad_repo.a ,)01(rahc(trevnoc = etad_repo ,nam_elas.a ,on_meti.a ,on_wolf.a ,on_hcnarb.a ,on_tcuded@ tceles			

) omem ,epyt_tcuded ,tma_tcuded ,etad_repo ,nam_elas ,on_meti ,on_wolf ,on_hcnarb ,on_tcuded (wolf_tcuded_namelas_ad_t otni tresni			

nigeb		

'1' = ytiroirp_tcuded@ fi		

	员业营 > 牌品 > 别类 > 品商--		

nigeb	

 esle	

响影的级先优虑考，成提合综--	

	

dne	

      	) nam_elas.a = di_elas.b (      		

dna ) 0 >< yenom_elas.a dna 0 > etar_dnarb.a (      		

dna ))'vp'=galf_ceps.a dna '1'=ecirppiv_tcuded@( ro ) ecirp_elas.a = ecirp_ecruos.a dna '1' = meticeps_tcuded@ ( ro '0' = meticeps_tcuded@ (      		

dna ) on_hcnarb@ ekil on_hcnarb.a (      		

dna ) ot_tda@ dna morf_tda@ neewteb etad_repo.a ( erehw		

b ) '9999' tceles noinu namelas_mr_t morf di_elas tceles ( ,a wolfelas_mr_t morf 		

'' = omem ,'3' = epyt_tcuded         	

,) etar_dnarb.a * yenom_elas.a ,)4,61(ciremun(trevnoc = tma_tcuded         	

 ,)121 ,etad_repo.a ,)01(rahc(trevnoc = etad_repo ,nam_elas.a ,on_meti.a ,on_wolf.a ,on_hcnarb.a ,on_tcuded@ tceles  	

) omem ,epyt_tcuded ,tma_tcuded ,etad_repo ,nam_elas ,on_meti ,on_wolf ,on_hcnarb ,on_tcuded (wolf_tcuded_namelas_ad_t otni tresni		

nigeb	

'3' = epyt_tcuded@ fi esle	

成提牌品按--	

	

dne	

      ) nam_elas.a = di_elas.b (      		

dna ) 0 >< yenom_elas.a dna 0 > etar_sslc.a (      		

dna ))'vp'=galf_ceps.a dna '1'=ecirppiv_tcuded@( ro ) ecirp_elas.a = ecirp_ecruos.a dna '1' = meticeps_tcuded@ ( ro '0' = meticeps_tcuded@ (      		

dna ) on_hcnarb@ ekil on_hcnarb.a (      		

dna ) ot_tda@ dna morf_tda@ neewteb etad_repo.a ( erehw		

b ) '9999' tceles noinu namelas_mr_t morf di_elas tceles ( ,a wolfelas_mr_t morf 		

'' = omem ,'2' = epyt_tcuded         	

,) etar_sslc.a * yenom_elas.a ,)4,61(ciremun(trevnoc = tma_tcuded         	

 ,)121 ,etad_repo.a ,)01(rahc(trevnoc = etad_repo ,nam_elas.a ,on_meti.a ,on_wolf.a ,on_hcnarb.a ,on_tcuded@ tceles  	

) omem ,epyt_tcuded ,tma_tcuded ,etad_repo ,nam_elas ,on_meti ,on_wolf ,on_hcnarb ,on_tcuded (wolf_tcuded_namelas_ad_t otni tresni		

nigeb	

'2' = epyt_tcuded@ fi esle	

成提别类按--	

	

dne	

 ) nam_elas.a = di_elas.b (      		

dna  ) )0 >< yenom_elas.a dna 0 > mun_cca.a( ro ))'B' ,'A' ( ni yaw_lles.a dna 0 > )on_tfihs.a,)4,61(ciremun(trevnoc( (      		

dna ))'vp'=galf_ceps.a dna '1'=ecirppiv_tcuded@( ro ) ecirp_elas.a = ecirp_ecruos.a dna '1' = meticeps_tcuded@ ( ro '0' = meticeps_tcuded@ (      		

dna ) on_hcnarb@ ekil on_hcnarb.a (      		

dna ) ot_tda@ dna morf_tda@ neewteb etad_repo.a ( erehw		

b ) '9999' tceles noinu namelas_mr_t morf di_elas tceles ( ,a wolfelas_mr_t morf 		

) dne '额金按' esle '率比按' neht 0 > mun_cca.a nehw esac( = omem         	

,'1' = epyt_tcuded         	

,))dne yenom_elas.a * mun_cca.a esle ytnq_elas.a * )on_tfihs.a,)4,61(ciremun(trevnoc neht 0 > )on_tfihs.a,)4,61(ciremun(trevnoc nehw esac(,)4,61(ciremun(trevnoc = tma_tcuded         	

,)121 ,etad_repo.a ,)01(rahc(trevnoc = etad_repo ,nam_elas.a ,on_meti.a ,on_wolf.a ,on_hcnarb.a ,on_tcuded@ tceles  	

) omem ,epyt_tcuded ,tma_tcuded ,etad_repo ,nam_elas ,on_meti ,on_wolf ,on_hcnarb ,on_tcuded (wolf_tcuded_namelas_ad_t otni tresni		

nigeb	

'1' = epyt_tcuded@ fi	

算计成提的9999员业营认默算计加增--	

etar_elas ,etar_dnarb ,etar_sslc ,mun_cca ,on_tfihs：为别分率比成提员业营、率比成提牌品、率比成提别类、率比成提品单、额金成提品单--	

中表水流售销自取据数的算计成提--	

	

dne	

rre otog 0 >< rorre@@ fi		

on_hcnarb@ ekil on_hcnarb dna ot_sl@ dna morf_sl@ neewteb etad_repo erehw wolf_tcuded_namelas_ad_t eteled		

nigeb	

)on_hcnarb@ ekil on_hcnarb dna ot_sl@ dna morf_sl@ neewteb etad_repo erehw wolf_tcuded_namelas_ad_t morf 1 1 pot tceles(stsixe fi	

据数的中表水流成提员业营除删先--	

	

dne	

rre otog 0 >< rorre@@ fi		

)etad_dne@ ,etad_nigeb@ ,meticeps_tcuded@ ,ytiroirp_tcuded@ ,epyt_tcuded@ ,di_repo@ ,etad_repo@ ,on_tcuded@(seulav		

)etad_dne ,etad_nigeb ,meticeps_tcuded ,ytiroirp_tcuded ,epyt_tcuded ,di_repo ,etad_repo ,on_tcuded(dcrdnoc_tcuded_db_t otni tresni		

nigeb	

)on_tcuded@ = on_tcuded erehw dcrdnoc_tcuded_db_t morf 1 tceles(stsixe ton fi	

录记noitdnoc成提--	

			

'0' = ecirppiv_tcuded@ tes		

 llun si ecirppiv_tcuded@ ro '' = ecirppiv_tcuded@ fi	

	'ecirppiv_tcuded' = di_rav_sys erehw metsys_sys_t morf eulav_rav_sys = ecirppiv_tcuded@ tceles	

20.20.6102 yqgned yb dda 是 1 否 0 算计成提与参品商价员会--	

	

'0' = meticeps_tcuded@ tes		

 llun si meticeps_tcuded@ ro '' = meticeps_tcuded@ fi	

	'meticeps_tcuded' = di_rav_sys erehw metsys_sys_t morf eulav_rav_sys = meticeps_tcuded@ tceles	

是 1	否 0：成提算计不价特--	

	

dne	

'0' = ytiroirp_tcuded@ tes			

 llun si ytiroirp_tcuded@ ro '' = ytiroirp_tcuded@ fi		

	'ytiroirp_tcuded' = di_rav_sys erehw metsys_sys_t morf eulav_rav_sys = ytiroirp_tcuded@ tceles		

nigeb	

'0' = epyt_tcuded@ fi	

	员业营 > 牌品 > 别类 > 品商 1	员业营 > 别类 > 牌品 > 品商 0 ：级先优成提--	

	

'0' = epyt_tcuded@ tes		

 llun si epyt_tcuded@ ro '' = epyt_tcuded@ fi	

'epyt_tcuded' = di_rav_sys erehw metsys_sys_t morf eulav_rav_sys = epyt_tcuded@ tceles	

牌品 3	别类 2	品商 1	合综 0：型类成提--	

	

)(etadteg = etad_repo@ tceles	

)121 ,ot_tda@ ,)01(rahc(trevnoc = ot_sl@ tes	

)121 ,morf_tda@ ,)01(rahc(trevnoc = morf_sl@ tes	

化始初量变--	

		

)1(rahc	ecirppiv_tcuded@		

,)1(rahc	meticeps_tcuded@		

,)1(rahc	ytiroirp_tcuded@		

,)1(rahc	epyt_tcuded@		

,emitetad	etad_repo@		

,)01(rahc  	ot_sl@		

,)01(rahc	morf_sl@		

eralced	

nigeb

sa

)

)6(rahcrav		di_repo@	

,emitetad			ot_tda@	

,emitetad		morf_tda@	

,)01(rahc	etad_dne@	

,)01(rahc	etad_nigeb@	

,)6(rahcrav	on_hcnarb@	

,)81(rahcrav	on_tcuded@	

(tcuded_mr_rp erudecorp etaerc


og

tcuded_mr_rp erudecorp pord  

)'tcuded_mr_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_rm_get_item_info(MS).sql^^^^


dne

mun_cca@,galf_cca@      

,bmoc_sl@      

,tmatfig_sl@      

 ,ytqtfig_sl@      

,metitfig_sl@      

,ytQelas_nl@      

,ecirPdrac_nl@      

,ecirPceps_nl@      

,ecirPelas_nl@      

,ONssalC_sl@      

,ONdnarb_sl@      

,emaNbuS_sl@ tceles    

值回返 --    


)'',rddapus_sl@(llunsi = rddapus_sl@ tceles    

)'',letpus_sl@(llunsi = letpus_sl@ tceles    

)'',tmatfig_sl@(llunsi = tmatfig_sl@ tceles    

)'',ytqtfig_sl@(llunsi = ytqtfig_sl@ tceles    

)'',metitfig_sl@(llunsi = metitfig_sl@ tceles    


))121,etad_dne ,)01(rahc(trevnoc dna )121,etad_trats ,)01(rahc(trevnoc neewteb )121 ,)(etadteG ,)01(rahc(trevnoc(          

dna )'LLA' = on_hcnarb ro )3,ONhcnarb_sa@(tfel = on_hcnarb ro ONhcnarb_sa@ = on_hcnarb(  	

 dna )0> ytq_elas dna '3' = epyt_laiceps dna ONmetI_sa@ = on_meti( erehw    

 ecirp_ceps_mr_t morf    

ecirp_tfig =tmatfig_sl@,ytq_elas = ytQelas_nl@ ,ytq_tfig=ytqtfig_sl@ ,meti_tfig=metitfig_sl@ tcnitsid tceles   

品赠销促理处--    


ecirPelas_nl@ = ecirPdrac_nl@ tceles      

0 = ecirPdrac_nl@ ro llun si ecirPdrac_nl@ fi    

价售零=价卡员会，价卡员会有没 --    


5ecirPpiv_nl@ = ecirPdrac_nl@ tceles	

5 = epyt_ecirppiv_ia@ fi    


4ecirPpiv_nl@ = ecirPdrac_nl@ tceles	

4 = epyt_ecirppiv_ia@ fi    


3ecirPpiv_nl@ = ecirPdrac_nl@ tceles	

3 = epyt_ecirppiv_ia@ fi    


2ecirPpiv_nl@ = ecirPdrac_nl@ tceles	

2 = epyt_ecirppiv_ia@ fi    


ecirPpiv_nl@ = ecirPdrac_nl@ tceles	

1 = epyt_ecirppiv_ia@ fi    


ecirPelas_nl@ = ecirPceps_nl@ tceles      

0 = ecirPceps_nl@ ro llun si ecirPceps_nl@ fi    

价售零=价特，价特有没 --     

    

0 = ecirPdrac_nl@ tceles    

0 = ecirPceps_nl@ tceles    

....理处价卡员会,价特 --    

      


dne	

dne		

	ONmetI_sa@=on_meti dna )3,1,ONhcnarb_sa@(gnirtsbus=on_hcnarb erehw 			

ecirp_hcnarb_cp_t morf  			

5ecirp_piv=5ecirPpiv_nl@, 4ecirp_piv=4ecirPpiv_nl@		       		

, 3ecirp_piv=3ecirPpiv_nl@, 2ecirp_piv=2ecirPpiv_nl@		      		

,ecirp_piv = ecirPpiv_nl@ ,ecirp_elas = ecirPelas_nl@ tceles			

nigeb		

 )ONmetI_sa@=on_meti dna )3,1,ONhcnarb_sa@(gnirtsbus=on_hcnarb erehw ecirp_hcnarb_cp_t morf 1 tceles(stsixe fi		

nigeb	

eslE	

dne	

	ONmetI_sa@=on_meti dna ONhcnarb_sa@=on_hcnarb erehw 		

ecirp_hcnarb_cp_t morf  		

5ecirp_piv=5ecirPpiv_nl@, 4ecirp_piv=4ecirPpiv_nl@       		

, 3ecirp_piv=3ecirPpiv_nl@, 2ecirp_piv=2ecirPpiv_nl@       		

,ecirp_piv = ecirPpiv_nl@ ,ecirp_elas = ecirPelas_nl@ tceles		

nigeb	

 )ONmetI_sa@=on_meti dna ONhcnarb_sa@=on_hcnarb erehw ecirp_hcnarb_cp_t morf 1 tceles(stsixe fi	

	

ONmetI_sa@=on_meti erehw ofni_meti_db_t morf		

5ecirp_piv=5ecirPpiv_nl@, 4ecirp_piv=4ecirPpiv_nl@		

, 3ecirp_piv=3ecirPpiv_nl@, 2ecirp_piv=2ecirPpiv_nl@		

,)0,mun_cca_piv(llunsi = mun_cca@,)'0',galf_cca_piv(llunsi = galf_cca@		

,ecirp_piv=ecirPpiv_nl@      , ats_enibmoc= bmoc_sl@		

,dnarb_meti = ONdnarb_sl@   ,ecirp_elas=ecirPelas_nl@		

,onslc_meti=ONssalC_sl@	,emanbus_meti=emaNbuS_sl@ tceles 	

息信本基的品商台前取获中)ofni_meti_db_t(从 -- 	

	

5价卡员会 --       )4,61(lamiced 5ecirPpiv_nl@    

4价卡员会 --      ,)4,61(lamiced 4ecirPpiv_nl@    

3价卡员会 --      ,)4,61(lamiced 3ecirPpiv_nl@    

2价卡员会 --      ,)4,61(lamiced 2ecirPpiv_nl@    

值分积--,)4,61(lamiced   mun_cca@    

分积否是-- ,)1(rahc  galf_cca@    

号水流 --      ,)0,61(lamiced wolf_nl@    

   ）...生、拆、组（型类品商--				,	)1(rahc	bmoc_sl@    

,    emitetad won_tdl@    

 码编修维--            ,)03(rahcrav onpus_sl@    

址地修维--         ,)001(rahcrav rddapus_sl@    

话电修维--           ,)03(rahcrav letpus_sl@    

04.001/0.03/05.21 :tamrof，列价单品商送赠--          ,)003(rahcrav tmatfig_sl@    

4/2/01 :tamrof，列量数品商送赠--            ,)003(rahcrav ytqtfig_sl@    

300/200/100 :tamrof，列码编品商送赠--         ,)003(rahcrav metitfig_sl@    

量数售销价特的售销经已前当 --        ,)4,61(lamiced ytQdlos_nl@    

量数购限单客 --        ,)4,61(lamiced ytQelas_nl@    

率扣折 --        ,)2,6(lamiced tnuocsid_nl@    

价卡员会 --      ,)4,61(lamiced ecirPpiv_nl@    

价卡员会 --      ,)4,61(lamiced ecirPdrac_nl@    

价特台前 --      ,)4,61(lamiced ecirPceps_nl@    

,)4,61(lamiced ecirPpmt_nl@    

型类价特 --         ,)1(rahc epyTceps_sl@    

价售零 --      ,)4,61(lamiced ecirPelas_nl@    

码编牌品 --            ,)02(rahc ONdnarb_sl@    

码编别类 --            ,)02(rahc ONssalC_sl@    

称简 --    ,)02(rahcrav emaNbuS_sl@ eralced  


nruter )ONmetI_sa@=on_meti erehw ofni_meti_db_t morf 1 tceles(stsixe ton fi  

断判性效有的码编 --

nigeb

sa

)regetni epyt_ecirppiv_ia@ ,)4,21(lamiced ytQelas_na@ ,)02(rahc ONmetI_sa@ ,)6(rahc ONhcnarb_sa@(ofni_meti_teg_mr_rp erudecorp etaerc



og

ofni_meti_teg_mr_rp erudecorp pord  

)'ofni_meti_teg_mr_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_rm_vip(MS).sql^^^^

dne

nruter  	

 	

piv_ruc etacollaed  	

piv_ruc esolc  	

:rorreym	

	

dne 	

di_drac_sl@=di_drac erehw )mun_timil_il@,)01(rahcrav(trevnoc=mun_esu tes ofni_piv_mr_t etadpu  	

1 - mun_timil_il@= mun_timil_il@ tceles  	

数次用使新更--  	

nigeb  	

 0> mun_timil_il@ fi	

   	

rorreym otog llun si mun_timil_il@ fi	

di_drac_sl@=di_drac erehw ofni_piv_mr_t morf mun_esu = mun_timil_il@ tceles	

数次用使可新更--	

	

)'0','',']'+)tnuoma_latot_nl@,)01(rahcrav(trevnoc+'[额费消分积与参际实:分积别类按','',tnuoma_cca_piv_nl@,tnuoma_latot_nl@,onwolf_sa@,)(etadteg,di_repo_sl@,'0',onhcnarb_sl@ ,epyt_drac_sl@,on_drac_sl@,di_drac_sl@(seulav	

)galf_moc,omem,sed_repo,ondrac_wen,mun_cca,tma_musnoc,on_wolf,etad_epo,di_repo,epyt_repo,on_hcnarb,epyt_drac,on_drac,di_drac(tsilcca_piv_mr_t otni tresni	

表员会新更来表个这过通,表列分积入插--	

	

   	

dne   	

tnuoma_cca_piv_nl@- = tnuoma_cca_piv_nl@ tceles      	

tnuoma_piv_nl@- = tnuoma_piv_nl@ tceles      	

nigeb   	

'D' = yaWelas_sl@ ro 'B' = yaWelas_sl@ fi	

   	

 )tnuoma_cca_piv_nl@(roolf = tnuoma_cca_piv_nl@ tceles   	

'1' = tni_cca_sop_sl@ fi	

   	

epyt_drac_sl@ = epyt_piv dna 'tni_cca_piv_sop'=)di_rav_sys(rewol erehw ecnerefer_piv_mr_t morf eulav_rav_sys = tni_cca_sop_sl@ tceles	

'1' = tni_cca_sop_sl@ tceles	

整取分积--	

新更分积--	

	

	

dne	

		

yenomelas_meti_nl@,galf_ceps_sl@,yaWelas_sl@,crPelas_nl@,crPecruos_nl@,ytQelas_nl@,ONmetI_sl@,ONhcnarb_sl@ otni piv_ruc hctef		

:txen_lebal		

dne		

       rorreym otog			

esle		

	dne    		

 tmaevitan_nl@ + tnuoma_piv_nl@ = tnuoma_piv_nl@ tceles        		

elacs_nl@/tmaevitan_nl@  + tnuoma_cca_piv_nl@ = tnuoma_cca_piv_nl@ tceles        		

etar_elas_yap_nl@ * yenomelas_meti_nl@=tmaevitan_nl@ tceles				

nigeb    		

 0>elacs_nl@ fi			

分积别类的品商个这算计--			

	

txen_lebal otog				

0=elacs_nl@ fi			

环循个一下续继 0为果如--			

	

erocs_emusnoc_sopl@=elacs_nl@ tceles				

llun si elacs_nl@ fi			

分积别类他其询查分积饮对别类到不找果如--			

dne			

   	dne    			

)2 - )onslc_sl@(nel,onslc_sl@(tfel = onslc_sl@ tceles					

nigeb    			

esle   			

dne    			

'' = onslc_sl@ tceles        			

onslc_sl@ = slc_meti_piv erehw tes_piv_mr_t morf tma_piv = elacs_nl@ tceles        			

nigeb    			

)onslc_sl@ = slc_meti_piv erehw tes_piv_mr_t morf tma_piv tceles( stsixe fi   			

nigeb			

)2  => )onslc_sl@(nel( elihw			

分积的应对别类算计先--			

nigeb		

)'4'=epyt_emusnoc_sl@( fi		

分积额金费消别类各按--		

		

/*		

1 tceles			

分积值分积品单的中案档品商按-- )'3' = epyt_emusnoc_sl@( fi		

		

dne		

1 tceles			

nigeb		

分积数次费消-- '2'=epyt_emusnoc_sl@ fi		

		

dne		

)(etadteg tceles			

nigeb		

分积额定固-- '1'=epyt_emusnoc_sl@ fi*/		

则规分积看查--		

		

'1'=galf_cca_piv dna ONmetI_sl@=on_meti erehw )kcolon(htiw ofni_meti_db_t morf onslc_meti = onslc_sl@ tceles		

别类到得--		

	    	

dne		

txen_lebal otog   		

nigeb		

llun si galf_pivmeti_sl@ ro '0'=galf_pivmeti_sl@ fi		

环循个一下行进就分积不--		

ONmetI_sl@ = on_meti erehw ofni_meti_db_t morf  galf_cca_piv = galf_pivmeti_sl@ tceles		

分积否是品商断判先--		

nigeb	

 )0 = sutatS_hctef@@( elihw	

     	

yenomelas_meti_nl@,galf_ceps_sl@,yaWelas_sl@,crPelas_nl@,crPecruos_nl@,ytQelas_nl@,ONmetI_sl@,ONhcnarb_sl@ otni piv_ruc hctef	

 piv_ruc nepo	

onwolf_sa@=on_wolf erehw wolfelas_mr_t morf yenom_elas,galf_ceps,yaw_lles,ecirp_elas,ecirp_ecruos,ytnq_elas,on_meti,on_hcnarb tceles	

 rof rosruc piv_ruc eralced	

	

yenom_elas_nl@/tnuoma_latot_nl@ =etar_elas_yap_nl@ tceles	

比占售销款付--	

	

nruter    	

 0=yenom_elas_nl@  fi	

onwolf_sa@=on_wolf erehw  wolfelas_mr_t morf )yenom_elas(mus=yenom_elas_nl@ tceles	

售销据单--	

	

 nruter		

0=tnuoma_latot_nl@ fi	

onwolf_sa@=on_wolf erehw wolfyap_mr_t morf  di_repo=di_repo_sl@,on_hcnarb = onhcnarb_sl@ ,tnuoma_elas = tnuoma_latot_nl@ ,yaw_lles = yawelas_sl@ 1 pot tceles	

额金总款付费消--	

	

epyt_drac_sl@ = epyt_piv dna 'epyt_emusnoc_sop'=)di_rav_sys(rewol erehw )kcolon(htiw ecnerefer_piv_mr_t morf eulav_rav_sys = epyt_emusnoc_sl@ tceles	

型类分积--	

	

	

epyt_drac_sl@ = epyt_piv dna 'tniop_metipiv_sop'=)di_rav_sys(rewol erehw ecnerefer_piv_mr_t morf eulav_rav_sys  = galf_cca_sl@ tceles	

 epyt_drac_sl@ = epyt_piv dna  'piv_drocer_sop'=)di_rav_sys(rewol erehw ecnerefer_piv_mr_t morf eulav_rav_sys = piv_drocer_sop_sl@ tceles	

epyt_drac_sl@ = epyt_piv dna 'erocs_emusnoc_sop'=)di_rav_sys(rewol erehw ecnerefer_piv_mr_t morf )eulav_rav_sys ,)4,61(ciremun(trevnoc = erocs_emusnoc_sopl@ tceles	

分一积元少多别类他其--	

化始初数参--	

	

nruter '0' = cca_drocer_sl@ fi	

回返,卡值储是不且分积录记不--	

	

di_drac_sl@ = di_drac.a dna di_epyt.b=epyt_drac.a erehw )kcolon(htiw b epyt_piv_mr_t,)kcolon(htiw a ofni_piv_mr_t morf on_drac=on_drac_sl@,galf_cca=cca_drocer_sl@,epyt_drac.a = epyt_drac_sl@ tceles	

志标分积否是 galf_cca 分积否是型类属所卡员会--	

	

nruter  )'' = di_drac_sl@( ro )lluN si di_drac_sl@( fi	

	

onwolf_sa@=on_wolf.a dna on_wolf.b=on_wolf.a erehw )kcolon(htiw b wolfyap_mr_t,)kcolon(htiw a wolfelas_mr_t morf di_drac.b=di_drac_sl@ 1 pot tceles	

    	

0 = tnuoma_cca_piv_nl@ tceles	

0 = tnuoma_piv_nl@ tceles	

化始初--	


)01(rahc di_repo_sl@	

,)1(rahc epyt_drac_sl@    

型类价特--		,)01(rahc galf_ceps_sl@    

位2级每，级6为级升经已统系，位2是死定里这,度长别类--			,tni nelslc_il@--    

别类品商--		,)02(rahc  onslc_sl@    

分一积元少多别类他其-- ,)4,61(ciremun  erocs_emusnoc_sopl@	

分积员会录记否是别类员会--        		,)1(rahc cca_drocer_sl@    

值分积品商--			,)4,61(ciremun	cca_pivmeti_dl@    

分积否是品商前当--		,)1(rahcrav    galf_pivmeti_sl@    

”分积否是品商“用起否是--			,)1(rahcrav	galf_cca_sl@    

价特否是前当--			,)1(rahcrav		cepssi_sl@    

分积否是--           ,)1(rahcrav  ecirp_piv_sl@    

额金分积记次本--   ,)4,61(ciremun tnuoma_piv_nl@    

分积记次本--  ,)4,61(ciremun tnuoma_cca_piv_nl@    

额金品单-- ,)4,61(ciremun yenomelas_meti_nl@	

率比售销款付--,)4,61(ciremun etar_elas_yap_nl@	

额金售销计合单本-- ,)4,61(ciremun   yenom_elas_nl@	

额金计合单本-- ,)4,61(ciremun tnuoma_latot_nl@    

,)4,61(ciremun erocs_meityb_nl@    

,)4,61(ciremun timil_meityb_nl@    

式方分积记-- ,)2(rahcrav epyt_emusnoc_sl@    

分积整取是--     ,)1(rahcrav tni_cca_sop_sl@    

分积记否是--  ,)1(rahcrav piv_drocer_sop_sl@    

,)02(rahcrav 1rehto_sl@    

,tni mun_timil_il@    

,)1(rahcrav  yaWelas_sl@    

,)4,61(ciremun crPelas_nl@    

,)4,61(ciremun crPecruos_nl@    

,)4,61(ciremun ytQelas_nl@    

,)4,61(ciremun tmaevitan_nl@    

           ,)4,61(ciremun elacs_nl@    

                 ,)1(rahcrav jt_sl@    

  ,)03(rahcrav on_drac_sl@	

,)03(rahcrav di_drac_sl@    

     ,)02(rahc onmeti_sl@    

,)6(rahc onhcnarb_sl@ eralced

nigeb

sa

    )02(rahcrav  onwolf_sa@  

piv_mr_rp erudecorp etaerc


og

piv_mr_rp erudecorp pord  

)'piv_mr_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_rm_vip_acc_plus(MS).sql^^^^

dne

nruter	

)mun_cca@,)01(rahcrav(trevnoc+'&1'=nruter@ tceles	

 di_drac@=di_drac erehw ofni_piv_mr_t morf mun_cca_won=mun_cca@ tceles	

分积后减冲有含回返--	


dne		

  ) '0' , '减冲分积上网' , )sulp_cca@,)01(rahcrav(trevnoc+'减充分积' , lluN , sulp_cca@ , 0 , '' , ) ( etadteg , '1001' , '1' , '000' , epytdrac_sl@ , di_drac@ , di_drac@ ( SEULAV			

 ) galf_moc , omem , sed_repo , ondrac_wen , mun_cca , tma_musnoc , on_wolf , etad_epo , di_repo , epyt_repo , on_hcnarb , epyt_drac , on_drac , di_drac ( tsilcca_piv_mr_t OTNI TRESNI			

nigeb		

esle	

dne		

  ) '0' , '减冲分积上网' , )sulp_cca@,)01(rahcrav(trevnoc+'励奖分积' , lluN , sulp_cca@ , 0 , '' , ) ( etadteg , '1001' , '2' , '000' , epytdrac_sl@ , di_drac@ , di_drac@ ( SEULAV			

 ) galf_moc , omem , sed_repo , ondrac_wen , mun_cca , tma_musnoc , on_wolf , etad_epo , di_repo , epyt_repo , on_hcnarb , epyt_drac , on_drac , di_drac ( tsilcca_piv_mr_t OTNI TRESNI			

nigeb		

 0>sulp_cca@ fi	


 di_drac@=di_drac erehw	

sulp_cca@+mun_cca=mun_cca 		

,sulp_cca@+mun_cca_won=mun_cca_won  tes	

ofni_piv_mr_t etadpu	


 di_drac@=di_drac erehw ofni_piv_mr_t morf  epyt_drac=epytdrac_sl@ tceles	


dne	

nruter		

'0为分积减冲&0'=nruter@ tceles		

nigeb	

 0=sulp_cca@ fi	

	

dne	

nruter		

'在存不员会&0'=nruter@ tceles		

nigeb	

0=wor@	 fi	


 di_drac@=di_drac erehw )kcolon(htiw ofni_piv_mr_t morf )1(tnuoc=wor@ tceles	


0=wor@ tceles	

化始初--    

	

		)2,61(lamiced mun_cca@ eralced	

)01(rahcrav epytdrac_sl@ eralced	

tni wor@ eralced	

 nigeb

sa

)

值回返--		tuptuo )001(rahcrav nruter@	

少减为数负，加增为数正 分积--		,)2,61(lamiced sulp_cca@	

di员会--		,)03(rahcrav di_drac@	

(sulp_cca_piv_mr_rp erudecorp etaerc


og

sulp_cca_piv_mr_rp erudecorp pord  

)'sulp_cca_piv_mr_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_rm_vip_addsav(MS).sql^^^^



dne

 nruter	


dne		

	'功成'=nruter@ tceles			


 ) '0' , '' , '值储子电' , '值充卡值充' , '1001' , nam_elas@ , '' , 1001 , )(etadteg , tma_tcaf@ , 1 , 'BMR' , DI_drac@ , DI_drac@ , '' , 'A' , yaw_yap@ , on_hcnarb@ , tma_dda@, on_wolf@, 1 ( SEULAV			

 ) galf_moc , on_tfihs , on_rehcuov , omem , on_reihsac , nam_elas , on_retnuoc , di_repo , etad_repo , tnuoma_yap , etar_nioc , on_nioc , on_piv , di_drac , on_drac , yaw_lles , yaw_yap , on_hcnarb , tnuoma_elas , on_wolf , di_wolf ( wolfyap_mr_t OTNI TRESNI			

 水流款付入插值充--			

			

			

)0,0,0,tma_tcaf@,'值充板平',  on_hcnarb@, '1001',)(etadteg,) )(etadteg ,05 , raey ( DDAETAD,tma_dda@,'+' ,onslc_meti@,'0'    ,DI_drac@( seulav                           			

)4mun,3mun,2mun,1mun,omem,on_hcnarb,di_repo,etad_repo,etad_dne,tma_moc,on_bd,onslc_meti,epyt_vas,di_drac(gol_rehto_vas_piv_mr_t otni tresni			

水流值充--			

dne				

)0,0,0,tma_tcaf@,'值充板平',  on_hcnarb@, '1001',)(etadteg,) )(etadteg ,05 , raey ( DDAETAD,)(etadteg,0,tma_dda@,onslc_meti@,'0',DI_drac@( seulav					

)4mun,3mun,2mun,1mun,omem,on_hcnarb,di_repo,etad_repo,etad_dne,etad_nigeb,tma_moc,tma_vas,onslc_meti,epyt_vas,di_drac(rehto_vas_piv_mr_t otni tresni					

nigeb				

esle			

dne				

onslc_meti@=)'',onslc_meti(llunsi dna DI_drac@=di_drac erehw					

 ) )(etadteg ,05 , raey ( DDAETAD=etad_dne						

,tma_tcaf@+ )0,1mun(llunsi=1mun						

,tma_dda@+)0,tma_vas(llunsi=tma_vas tes					

rehto_vas_piv_mr_t etadpu					

nigeb				

 1=tnuoc_ll@  fi			

onslc_meti@=)'',onslc_meti(llunsi dna DI_drac@=di_drac erehw rehto_vas_piv_mr_t morf )1(tnuoc=tnuoc_ll@ tceles			

值充别类--			

nigeb		

esle	

dne		


	'功成'=nruter@ tceles			

		  ) nam_elas@,yaw_yap@ , tma_tcaf@ , '0' , '' , '值充卡值充' , llun , 0 , tma_dda@ , on_wolf@ , )(etadteg , '1001', '4' , on_hcnarb@ , '' , DI_drac@ , DI_drac@ ( seulav			

 ) di_elas,yawyap , tma_laer , galf_moc , omem , sed_repo , ondrac_wen , mun_cca , tma_musnoc , on_wolf , etad_epo , di_repo , epyt_repo , on_hcnarb , epyt_drac , on_drac , di_drac ( tsilevas_piv_mr_t OTNI TRESNI			

水流值充入插--			

)'','值充卡值充',nam_elas@,'1001',)(etadteg,tma_tcaf@,1,'BMR',di_drac@,DI_drac@,'','A',yaw_yap@,on_hcnarb@,tma_dda@,on_wolf@,1(seulav			

)on_rehcuov,omem,nam_elas,di_repo,etad_repo,tnuoma_yap,etar_nioc,on_nioc,on_piv,di_drac,on_drac,yaw_lles,yaw_yap,on_hcnarb,tnuoma_elas,on_wolf,di_wolf(wolfyap_mr_t otni tresni			

水流款付入插--			


di_drac@=di_drac erehw  tma_gnivas@ + )0,tma_evas(llunsi=tma_evas,tma_laudiser@=tma_laudiser tes  ofni_piv_mr_t etadpu			

额余卡值储改修--			

			

)tma_laudiser@(tpyrcne_teg_f.obd=tma_laudiser@ tceles			

)00001*tma_gnivas@,)02(rahcrav(trevnoc=tma_laudiser@ tceles			

密加--			

tma_dda@ + tma_gnivas@=tma_gnivas@ tceles			

)tma_laudiser@(yrcsed_teg_f.obd=tma_gnivas@ tceles			

di_drac@=di_drac erehw )kcolon(htiw ofni_piv_mr_t morf epyt_drac=epyt_drac@,on_drac=on_drac@,tma_laudiser=tma_laudiser@ tceles			

nigeb		

 ''=onslc_meti@ fi	

息信额余到得,息信值储员会询查--	

额余取--	



dne		

)4,)pmet@+00001,)5(rahcrav(trevnoc(thgir +)211,)(etadteg,)8(rahcrav(trevnoc+di_sop@=on_wolf@ tceles			

1+))4,on_wolf@(thgir,)0,61(lamiced(trevnoc=pmet@  tceles			

nigeb		

esle	

dne		

'1000'+)211,)(etadteg,)8(rahcrav(trevnoc+di_sop@=on_wolf@ tceles			

nigeb		

 ''=))'',on_wolf@(llunsi(mirtl fi	

	

on_wolf@  ekil on_wolf dna on_hcnarb@=on_hcnarb erehw wolfelas_mr_t morf )on_wolf(xam=on_wolf@  tceles	

	

	'%'+ )211,)(etadteg,)8(rahcrav(trevnoc+di_sop@=on_wolf@ tceles	

号单前当到得先首--	

号水流票小到得--	

di_sop@=disop erehw sutats_sop_sys_t morf pitsoh=on_hcnarb@ tceles	

号编店分到得--	


	


dne		

nruter			

'在存不卡值储'=nruter@ tceles			

nigeb		

0=tnuoc_ll@ fi	

di_drac@=di_drac erehw )kcolon(htiw ofni_piv_mr_t morf )1(tnuoc=tnuoc_ll@ tceles	


dne		

nruter			

'0为以可不额金值充'=nruter@ tceles			

nigeb		

 0=tma_dda@ fi	


0=tnuoc_ll@ tceles	

化始初--	

)02(rahcrav		pmet@			

号编店分--			,)6(rahcrav	on_hcnarb@			

号票小--		,)02(rahcrav	 on_wolf@			

,)02(rahcrav	epyt_drac@			

,)02(rahcrav	on_drac@			

, tni		tnuoc_ll@			

型字数额余卡值储--  ,)2,61(ciremun		tma_gnivas@			

额余卡值储--	,)02(rahcrav	tma_laudiser@ eralced	

 nigeb

值充别类和值充通普有只值充卡值储--

sa

值回返--		)tuptuo )001(rahcrav nruter@	

号编sop--	,)01(rahcrav			di_sop@	

人荐推--	,)01(rahcrav       nam_elas@	

式方款付--	,)21(rahcrav        yaw_yap@	

额金款付际实-- ,)2,61(ciremun		tma_tcaf@	

额金值充-- ,)2,61(ciremun		tma_dda@	

别类个一充能只次每死制限，值充通普是就空为，号编别类--	,)21(rahcrav onslc_meti@	

di卡--		,)02(rahcrav di_drac@	

(vasdda_piv_mr_rp erudecorp etaerc


og

vasdda_piv_mr_rp erudecorp pord  

)'vasdda_piv_mr_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_rm_vip_edit(MS).sql^^^^


dne

	dne	

nruter		

'功成立建&1'=nruter@ tceles		

) ))(etadteg ,01 , raey ( DDAETAD,)(etadteg,'000','1','历公',)(etadteg,)(etadteg,'1001',999999,))(etadteg ,01 , raey ( DDAETAD,)(etadteg,'0',elibom@,eman_piv@,'XW',di_drac@,di_drac@(seulav		

)etad_dne_vas,etad_trats_vas,on_hcnarb,slaitnederc_piv,galf_htb,ig_etad_repo,etad_repo,di_repo,mun_esu,etad_dne_piv,etad_trats_piv,sutats_drac,elibom,eman_piv,epyt_drac,on_drac,di_drac(ofni_piv_mr_t otni tresni		

nigeb	

esle	

dne	

nruter		

'改修已,在存已&0'=nruter@ tceles		


di_drac@=di_drac erehw		

elibom@=elibom			

,eman_piv@=eman_piv tes		

ofni_piv_mr_t etadpu		

nigeb	

0=wor@	 fi	


 di_drac@=di_drac erehw )kcolon(htiw ofni_piv_mr_t morf )1(tnuoc=wor@ tceles	


'XW'=epytdrac_sl@ tceles	

0=wor@ tceles	

化始初--    

	

		

)01(rahcrav epytdrac_sl@ eralced	

tni wor@ eralced	

 nigeb

sa

)

值回返--		tuptuo )001(rahcrav nruter@	

机手--		,)02(rahcrav  elibom@	

名员会--		,)8(rahcrav eman_piv@	

di员会--		,)03(rahcrav di_drac@	

(tide_piv_mr_rp erudecorp etaerc


og

tide_piv_mr_rp erudecorp pord  

)'tide_piv_mr_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_rm_vip_getsav(MS).sql^^^^



dne

 nruter	

	

onslc_meti.b=*onslc_meti.a dna di_drac@=di_drac.a erehw )kcolon(htiw b slc_meti_db_t,)kcolon(htiw a rehto_vas_piv_mr_t morf tma_moc.a - tma_vas.a,emanslc_meti.b,'额余值储别类',di_drac.a tceles	

lla noinu	

on_meti.b=on_meti.a dna di_drac@=di_drac.a erehw )kcolon(htiw b ofni_meti_db_t,)kcolon(htiw a ofni_piv_dnet_mr_t morf ytq_laer.a - ytq_timil.a,eman_meti.b,'额余值储目项',di_drac.a tceles	

lla noinu	

tma_gnivas@,'值储','额余卡值储',di_drac@ tceles	



 )tma_laudiser@(yrcsed_teg_f.obd=tma_gnivas@ tceles	

di_drac@=di_drac erehw )kcolon(htiw ofni_piv_mr_t morf epyt_drac=epyt_drac@,on_drac=on_drac@,tma_laudiser=tma_laudiser@ tceles	

息信额余到得,息信值储员会询查--	

额余取--	


dne		

nruter			

0,'','' tceles--			

nigeb		

0=tnuoc_ll@ fi	

di_drac@=di_drac erehw )kcolon(htiw ofni_piv_mr_t morf )1(tnuoc=tnuoc_ll@ tceles	


0=tnuoc_ll@ tceles	

化始初--	

)02(rahcrav	epyt_drac@			

,)02(rahcrav	on_drac@			

, tni		tnuoc_ll@			

型字数额余卡值储--  ,)2,61(ciremun		tma_gnivas@			

额余卡值储--	,)02(rahcrav	tma_laudiser@ eralced	

 nigeb

息信额余值储的员会到得--

sa

号单--		))02(rahcrav di_drac@	

(vasteg_piv_mr_rp erudecorp etaerc


og

vasteg_piv_mr_rp erudecorp pord  

)'vasteg_piv_mr_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_rpt_branch_vip_amount(MS).sql^^^^

dne

tnuoma_piv_pmet# elbat pord	


elibom.b,emandnarb_meti.a ,dnarb_meti.a ,eman_piv.b ,on_drac.b ,di_drac.a yb puorg	

di_drac.b = di_drac.a erehw	

b ofni_piv_mr_t ,a tnuoma_piv_pmet# morf	

elibom.b,)tnuoma_elas.a(mus = tnuoma_elas ,)ytnq_elas.a(mus = ytnq_elas ,emandnarb_meti.a ,dnarb_meti.a ,eman_piv.b ,on_drac.b ,di_drac.a tceles	

			

x )	

emandnarb_meti.f ,ondnarb_meti.f ,eman_piv.d ,di_drac.a yb puorg		

  ) 'F' ,'0' (ni epyt_repo.a dna		

  di_repo@ ekil di_repo.a		

 dna ondnarb@ ekil ondnarb_meti.f		

dna on_hcnarb@ ekil on_hcnarb.a		

         dna didrac@ ekil di_drac.a		

  DNA )ot@ dna morf@ neewteb etad_epo.a (		

			 dna '' > di_drac.a dna		

)		

'0' = )di_repo_g@ = di_repo erehw rotarepo_sys_t morf reganam_aera tceles( erehw  ofni_hcnarb_db_t morf on_hcnarb tceles  noinu			

)'1' = reganam_aera dna di_repo_g@ = di_repo erehw rotarepo_sys_t morf di_puorg tceles( = onslc_hcnarb erehw ofni_hcnarb_db_t morf on_hcnarb tceles			

( ni on_hcnarb.c		

 dna ) )di_repo_g@ = di_repo erehw tnarg_atad_repo_sys_t morf on_meti tceles( ni on_meti.b (--		

	 dna ondnarb_meti.f = dnarb_meti.e		

dna di_drac.d = di_drac.a		

 dna on_meti.e = on_meti.b		

 dna on_teehs.c = on_teehs.b		

	 dna on_teehs.c = on_wolf.a erehw		

	 f dnarb_meti_db_t		

,e ofni_meti_db_t		

	, d ofni_piv_mr_t		

,c retsam_teehs_piv_t		

 , b liated_teehs_piv_t		

		,a tsilcca_piv_mr_t morf		

)						

dne						

   1- *)0,ytq_laer.b(llunsi * )0,ecirp_dilav.b(llunsi neht '+' = on_bd.c nehw							

)0,ytq_laer.b(llunsi * )0,ecirp_dilav.b(llunsi neht '-' = on_bd.c nehw esac (mus  = yenom_elas		

,)						

dne						

 0 esle )1- * ytq_laer.b( neht '+' = on_bd.c nehw							

ytq_laer.b neht '-' = on_bd.c nehw esac (mus = ytnq_elas		

,emandnarb_meti.f ,ondnarb_meti.f ,di_drac.a tceles		

lla noinu		

 emandnarb_meti.b ,dnarb_meti.b ,di_drac.b yb puorg		

		b )		

)			

 '0' = )di_repo_g@ = di_repo erehw rotarepo_sys_t morf reganam_aera tceles( erehw ofni_hcnarb_db_t morf on_hcnarb tceles noinu				

)'1' = reganam_aera dna di_repo_g@ = di_repo erehw rotarepo_sys_t morf di_puorg tceles( = onslc_hcnarb erehw ofni_hcnarb_db_t morf on_hcnarb tceles				

(			

 ni on_hcnarb.a dna			

	 )di_repo_g@ = di_repo erehw tnarg_atad_repo_sys_t morf on_meti tceles(ni on_meti.a dna--			

 di_repo@ ekil di_repo.a dna			

 ondnarb@ ekil ondnarb_meti.c dna			

 on_hcnarb@ ekil on_hcnarb.a dna			

 didrac@ ekil di_drac.a dna			

 )ot@ dna morf@ neewteb etad_repo.a( dna			

ondnarb_meti.c = dnarb_meti.b dna			

'' > di_drac.a dna on_meti.b = on_meti.a erehw			

c dnarb_meti_db_t ,b ofni_meti_db_t ,a wolfelas_mr_t morf			

 dne yenom_elas.a esle 0 neht 'C' nehw yaw_lles.a esac = tnuoma_elas				

 ,di_drac.a ,emandnarb_meti.c				

 ,dnarb_meti.b ,ytnq_elas.a ,on_meti.a ,on_hcnarb.a ,on_wolf.a tceles			

(		

 morf		

 )tnuoma_elas(mus = tnuoma_elas ,)ytnq_elas.b(mus = ytnq_elas ,emandnarb_meti.b ,dnarb_meti.b ,di_drac.b tceles		

( morf	

tnuoma_piv_pmet# otni tnuoma_elas.x ,ytnq_elas.x ,emandnarb_meti.x ,dnarb_meti.x ,di_drac.x tceles	

nigeb

sa

)

)01(rahcrav di_repo_g@	

 ,)01(rahcrav di_repo@	

,)02(rahcrav ondnarb@	

,)6(rahcrav on_hcnarb@	

,)02(rahcrav didrac@	

,emitetad ot@	

,emitetad morf@	

(

tnuoma_piv_hcnarb_tpr_rp erudecorp etaerc



og

tnuoma_piv_hcnarb_tpr_rp erudecorp pord  

)'tnuoma_piv_hcnarb_tpr_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_rpt_item_branch_stock(MS).sql^^^^

dne

troper# morf * tceles   


)')0,)on_meti.a = on_meti.troper# erehw a '        

+'ytq_kcots# morf )ytq_kcots.a(mus tceles((llunsi = lla_ytq tes troper# etadpu'(cexe   

)'seulav htiw 0 tluafed )4,61(ciremun lla_ytq dda troper# elbat retla'( cexe   

   

 hcnarb_ruc etacollaed   

 hcnarb_ruc esolc   

dne   

raVhcnarb@ otni hcnarb_ruc hctef      

)'on_meti.troper# = on_meti.ytq_kcots# dna '''+ raVhcnarb@ + '''=on_hcnarb.ytq_kcots# erehw '            

+ ' ytq_kcots# morf tsoc_gva.ytq_kcots#=' + raVhcnarb@ +  '_tsoc_gva,ytq_kcots.ytq_kcots#=' + raVhcnarb@ +  '_ytq tes troper# etadpu'( cexe      

)'seulav htiw 0 tluafed )4,61(ciremun ' + raVhcnarb@ +  '_tsoc_gva dda troper# elbat retla'( cexe      

)'seulav htiw 0 tluafed )4,61(ciremun ' + raVhcnarb@ +  '_ytq dda troper# elbat retla'( cexe      

nigeb   

0=sutats_hctef@@ elihw   

raVhcnarb@ otni hcnarb_ruc hctef   

hcnarb_ruc nepo   

     

csa on_hcnarb yb redro   

ytq_kcots# morf on_hcnarb tcnitsid tceles    

rof rosruc hcnarb_ruc eralced   

)01(rahcrav raVhcnarb@ eralced   


)ytq_kcots# morf on_meti tcnitsid tceles(ni ton on_meti erehw troper# morf eteled   

)          

)            

)             

aera_hcnarb@ ekil )'',onslc_hcnarb(llunsi erehw ofni_hcnarb_db_t morf on_hcnarb tceles(ni )3,on_hcnarb.b(tfel dna              

 )on_hcnarb.b=on_hcnarb.ofni_hcnarb_db_t dna '5'=epyt_edart erehw ofni_hcnarb_db_t morf 1 tceles( stsixe dna              

''=)on_hcnarb.b=on_hcnarb.ofni_hcnarb_db_t erehw ofni_hcnarb_db_t morf )'',))onslc_hcnarb(mirtr(mirtl(llunsi tceles(( ro         

)aera_hcnarb@ ekil )'',onslc_hcnarb(llunsi erehw ofni_hcnarb_db_t morf on_hcnarb tceles(ni on_hcnarb.b(         

dna ) 	

 ) ) '8' >< epyt_edart.c dna '4' >< epyt_edart.c ( dna '4' = epyt_hcnarb@ (  			

ro ) ) '8' = epyt_edart.c ro '4' = epyt_edart.c ( dna '3' = epyt_hcnarb@ (  			

ro ) ) '7' = epyt_edart.c ro '3' = epyt_edart.c ( dna '2' = epyt_hcnarb@ (  			

 ro '1' = epyt_hcnarb@ (         

dna on_hcnarb@ ekil on_hcnarb.b         

dna on_hcnarb.c = on_hcnarb.b         

dna '2'><galf_elas.a         

dna on_meti.b = on_meti.a erehw   

c ofni_hcnarb_db_t,b kcots_hcnarb_mi_t,a ofni_meti_db_t morf    

ytq_kcots# otni     

ytq_kcots.b ,tsoc_gva.b,on_hcnarb.b,on_meti.a tceles   

   

)          

)              

))nel_onslc_sys@,1,onslc_meti.ofni_meti_db_t(gnirtsbus = onslc_meti.g dna '1' = tnarg_atad.g( dna di_repo@ = di_repo.g erehw              

 g tnarg_atad_sys_t morf 1 tceles ( stsixe ro           

'1001' = di_repo@(          

dna on_pus@ ekil )'',tsucpus_niam(llunsi          

dna dnarb_meti@ ekil )'',dnarb_meti(llunsi          

dna onslc_meti@ ekil onslc_meti          

dna eman_meti@ ekil eman_meti  	

dna onbus_meti@ ekil onbus_meti          

dna ))on_meti@ ekil edocrab_meti dna on_meti.ofni_meti_db_t = on_meti erehw edocrab_meti_db_t morf on_meti tceles( stsixe ro on_meti@ ekil on_meti(          

dna '2'><galf_elas erehw    

ofni_meti_db_t morf     

troper# otni     

 ezis_meti,on_tinu,eman_meti,onbus_meti,on_meti tceles   

 

2 = nel_onslc_sys@ tceles      

llun si nel_onslc_sys@ fi   

'nelon_slc_mti_lg' = di_rav_sys erehw metsys_sys_t morf )eulav_rav_sys,tnillams(trevnoc = nel_onslc_sys@ tceles   

tnillams nel_onslc_sys@ eralced   

nigeb

sa

)

)04(rahcrav     eman_meti@   

,)6(rahcrav       di_repo@   

,)6(rahcrav   aera_hcnarb@   

,)01(rahcrav    dnarb_meti@   

,)1(rahc   epyt_hcnarb@   

,)8(rahcrav        on_pus@   

,)51(rahcrav    onbus_meti@   

,)6(rahcrav    onslc_meti@   

,)02(rahcrav       on_meti@   

,)01(rahcrav     on_hcnarb@   

(

kcots_hcnarb_meti_tpr_rp erudecorp etaerc


og

kcots_hcnarb_meti_tpr_rp erudecorp pord  

)'kcots_hcnarb_meti_tpr_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_rpt_sales_item_bigcls.sql^^^^og

dne

troper_lbt# morf * tceles   

   

 )onslc_meti.tma_elas_lbt# = onslc_meti.troper_lbt# erehw tma_elas_lbt# morf )0,)tma_elas.tma_elas_lbt#(mus(llunsi tceles( = latot_lla_tma tes troper_lbt# etadpu   

 )onslc_meti.tma_elas_lbt# = onslc_meti.troper_lbt# erehw tma_elas_lbt# morf )0,)ytq_elas.tma_elas_lbt#(mus(llunsi tceles( = latot_lla_ytq tes troper_lbt# etadpu   


)'seulav htiw 0 tluafed )4,61(ciremun latot_lla_tma dda troper_lbt# elbat retla'( cexe   

)'seulav htiw 0 tluafed )4,61(ciremun latot_lla_ytq dda troper_lbt# elbat retla'( cexe   

   

 hcnarb_ruc etacollaed   

 hcnarb_ruc esolc   

dne   

raVhcnarb@ otni hcnarb_ruc hctef      

)'onslc_meti.troper_lbt# = onslc_meti.tma_elas_lbt# dna '''+ raVhcnarb@ + '''=on_hcnarb.tma_elas_lbt# erehw '            

+ ' tma_elas_lbt# morf ytq_elas.tma_elas_lbt#= '+raVhcnarb@+'_ytq  , tma_elas.tma_elas_lbt#=' + raVhcnarb@ +  '_tma tes troper_lbt# etadpu'( cexe      

)' seulav htiw 0 tluafed )4,61(ciremun ' + raVhcnarb@ +  '_tma dda troper_lbt# elbat retla'( cexe      

)' seulav htiw 0 tluafed )4,61(ciremun ' + raVhcnarb@ +  '_ytq dda troper_lbt# elbat retla'( cexe      

nigeb   

0=sutats_hctef@@ elihw   

raVhcnarb@ otni hcnarb_ruc hctef   

hcnarb_ruc nepo   

aera_hcnarb@ ekil )'',onslc_hcnarb(llunsi dna 0>)epyt_edart@,epyt_edart(xednIrahc dna on_hcnarb@ ekil on_hcnarb dna )'3','2'( ni ytreporp erehw     

ofni_hcnarb_db_t morf on_hcnarb tceles    

rof rosruc hcnarb_ruc eralced   

)01(rahcrav raVhcnarb@ eralced   

   

onslc_meti.c ,on_hcnarb.a yb puorg   

aera_hcnarb@ ekil )'',onslc_hcnarb.d(llunsi dna     

)troper_lbt# morf onslc_meti tceles( ni onslc_meti.c dna     

)0>)epyt_edart@,epyt_edart(xednIrahc dna on_hcnarb@ ekil on_hcnarb dna)'3','2'( ni ytreporp erehw                          

ofni_hcnarb_db_t morf on_hcnarb tceles( ni on_hcnarb.a dna     

dne_etad@ dna nigeb_etad@ neewteb etad_repo.a dna     

on_hcnarb.d = on_hcnarb.a dna     

)nel_onslc@,1,onslc_meti.b(gnirtsbus = onslc_meti.c dna     

on_meti.b = on_meti.a erehw   

d ofni_hcnarb_db_t,c slc_meti_db_t ,b ofni_meti_db_t ,a musyad_cxj_ad_t morf    

tma_elas_lbt# otni     

tma_elas sa )tma_ter_sop.a + tma_sop.a + tma_os.a(mus ,ytq_elas sa )ytq_ter_sop.a + ytq_sop.a + ytq_os.a(mus,onslc_meti.c ,on_hcnarb.a tceles   

 

)          

)              

))nel_onslc_sys@,1,onslc_meti.slc_meti_db_t(gnirtsbus = onslc_meti.g dna '1' = tnarg_atad.g( dna di_repo@ = di_repo.g erehw              

 g tnarg_atad_sys_t morf 1 tceles ( stsixe ro           

'1001' = di_repo@( dna      

onslc_meti@ ekil onslc_meti dna      

 nel_onslc@ =< )onslc_meti(nel erehw    

slc_meti_db_t morf     

troper_lbt# otni     

 emanslc_meti,onslc_meti tceles   

   

nel_slc@ = nel_onslc@ tceles   


)2,nel_onslc_sys@(llunsi = nel_onslc_sys@ tceles   

'nelon_slc_mti_lg' = di_rav_sys erehw metsys_sys_t morf )eulav_rav_sys,tnillams(trevnoc = nel_onslc_sys@ tceles   


tnillams nel_onslc_sys@,tnillams nel_onslc@ eralced   

nigeb

sa

)

)01(rahcrav aera_hcnarb@   

,tnillams    nel_slc@   

,)8(rahcrav    di_repo@   

,)02(rahcrav onslc_meti@   

,)23(rahcrav epyt_edart@   

,)8(rahcrav on_hcnarb@   

,)01(rahcrav   dne_etad@   

,)01(rahcrav nigeb_etad@   

(

slcgib_meti_selas_tpr_rp erudecorp etaerc



og

slcgib_meti_selas_tpr_rp erudecorp pord  

)'slcgib_meti_selas_tpr_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_set_vip_pass(MS).sql^^^^


dne


nruter	

	  

) '1' ,'微致:构机作操', '码密改修员会上线维致',  0 , 0 , '' , ) ( etadteg , '1001' , 'E' , '000' , epyt_drac@ , on_drac@ , di_drac@ ( SEULAV	

 ) galf_moc ,omem,  sed_repo ,  mun_cca , tma_musnoc , on_wolf , etad_epo , di_repo , epyt_repo , on_hcnarb , epyt_drac , on_drac , di_drac ( tsilrepo_piv_mr_t OTNI TRESNI	

志日加添--	

	

0=nruter@ tceles	

di_drac@=di_drac erehw ssap_wen@=ssap tes ofni_piv_mr_t etadpu	


di_drac@=di_drac erehw ofni_piv_mr_t morf epyt_drac=epyt_drac@,on_drac=on_drac@ tceles	


dne	

nruter		

3-=nruter@ tceles		

nigeb	

02>)ssap_wen@(nel fi	


dne	

nruter		

1-=nruter@ tceles		

nigeb	

)di_drac@=di_drac erehw ofni_piv_mr_t morf di_drac tceles(stsixe ton fi	


)2(rahcrav epyt_drac@ eralced	

)02(rahcrav on_drac@ eralced	

功成改修:0 02过超度长码密新:3-  在存不卡:1- nruter@--	

nigeb

sa

)

tuptuo tni nruter@    

,)02(rahcrav ssap_wen@    

	,)02(rahcrav di_drac@    

	(

ssap_piv_tes_rp erudecorp etaerC


og

ssap_piv_tes_rp erudecorp pord  

)'ssap_piv_tes_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_str_decrypt(MS).sql^^^^ dne

tluser_sl@ tceles	

)tluser_sl@(esrever = tluser_sl@ tceles	

	

dne	

	

1+i@= i@ tceles		

)))2 - i@ - nel_ll@( * 2( - ))1,i@,txet_sl@(gnirtsbus( IICSA(rahc + tluser_sl@ = tluser_sl@ tceles		

nigeb	

nel_ll@ =< i@  elihw	

	

1 = i@ tceles	

''= tluser_sl@ tceles	

)txet_sl@(nel = nel_ll@ tceles	

)ecruos_sa@(mirtr = txet_sl@ tceles	

	

)001(rahcrav txet_sl@ eralced	

tni nel_ll@ eralced	

tni i@ eralced	


nigeb

 sa

)tuptuo )001(rahcrav tluser_sl@, )001(rahcrav ecruos_sa@ (tpyrced_rts_rp erudecorp   etaerc


og

tpyrced_rts_rp erudecorp pord  

)'tpyrced_rts_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_str_encrypt(MS).sql^^^^


 dne

tluser_sl@ tceles	

	

dne	

	

1+i@= i@ tceles		

 						

))2 * )2 - i@ - nel_ll@(( + ))1,i@,txet_sl@(gnirtsbus(IICSA(rahc + tluser_sl@ = tluser_sl@ tceles		

nigeb	

nel_ll@ =< i@  elihw	

	

1 = i@ tceles	

''= tluser_sl@ tceles	

)txet_sl@(nel = nel_ll@ tceles	

)ecruos_sa@(mirtr = txet_sl@ tceles	

	

)001(rahcrav txet_sl@ eralced	

tni nel_ll@ eralced	

tni i@ eralced	


nigeb

 sa

)tuptuo )001(rahcrav tluser_sl@, )001(rahcrav ecruos_sa@ (tpyrcne_rts_rp erudecorp   etaerc


og

tpyrcne_rts_rp erudecorp pord  

)'tpyrcne_rts_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_sys_table_info(MS).sql^^^^dne

selbat_c   etacollaed	

selbat_c   esolc	

ecaps_tps#   elbat   pord	

   csed   devreser   yb   redro	

'E'   =   epyt.d                   dna	

1   =   rebmun.d                   erehw	

d   seulav_tps.obd.retsam   ,ecaps_tps#                   morf	

                                  	

)'BK'   +   '   '   +   )0,51,.4201   /   wol.d   *   desunu(rts(mirtl   =   BKdesunU                  	

,)'BK'   +   '   '   +   )0,51,.4201   /   wol.d   *   pxedni(rts(mirtl   =   BKeziSxednI                  	

,)'BK'   +   '   '   +   )0,51,.4201   /   wol.d   *   atad(rts(mirtl   =   BKataD                  	

,)'BK'   +   '   '   +   )0,51,.4201   /   wol.d   *   devreser(rts(mirtl   =   BKdevreseR                  	

,)swor   ,)11(rahc(trevnoc   =   swoR                  	

,)dijbo   =   di   erehw   stcejbosys   morf   )06,eman(tfel   tceles(   =   emaNelbaT                   tceles	

  	

dne	

di@   otni                  	

selbat_c   morf   txen   hctef                  	

  	

di@   =   dijbo   dna                                                                  	

di@   =   di.i   dna                                                                  	

2   <   didni.i   erehw                                                                  	

i   sexednisys   morf                                                  	

swor.i   =   swor   tes                                  	

ecaps_tps#   etadpu                  	

  	

di@   =   dijbo   erehw                                  	

)di@   =   di   dna                                                                                                  	

)552   ,1   ,0(   ni   didni   erehw                                                                                                  	

sexednisys   morf                                                                                  	

)desu(mus   tceles(   -                                                                  	

devreser   =   desunu   tes                                  	

ecaps_tps#   etadpu                  	

/*   )552   ,1   ,0(   ni   didni   erehw   )desu(mus   -   )devreser(mus   :desunu   */                  	

  	

di@   =   dijbo   erehw                                  	

atad   -                                                          	

)di@   =   di   dna                                                                  	

)552   ,1   ,0(   ni   didni   erehw                                                                  	

sexednisys   morf                                                                  	

)desu(mus   tceles(   =   pxedni   tes                                  	

ecaps_tps#   etadpu                  	

/*   atad   -   )552   ,1   ,0(   ni   didni   erehw   )desu(mus   :xedni   */                  	

  	

  	

di@   =   dijbo   erehw                  	

segap@   =   atad   tes                                  	

ecaps_tps#   etadpu                  	

di@   =   di   dna                                                                  	

552   =   didni   erehw                                                  	

sexednisys   morf                                  	

)0   ,)desu(mus(llunsi   +   segap@   =   segap@   tceles                  	

di@   =   di   dna                                                                                  	

2   <   didni   erehw                                                                  	

sexednisys   morf                                                  	

)segapd(mus   =   segap@   tceles                  	

  	

di@   =   di   dna                                                                                  	

)552   ,1   ,0(   ni   didni   erehw                                                                  	

sexednisys   morf                                                  	

)devreser(mus   ,di@   =   dijbo   tceles                                  	

)devreser   ,dijbo(   ecaps_tps#   otni   tresni                  	

/*   desuecaps_ps   morf   edoC   */                  	

  	

nigeb	

0   =   sutats_hctef@@   elihw	

  	

di@   otni	

selbat_c   morf   txen   hctef	

  	

selbat_c   nepo	

  	

'U'   =   epytx                 erehw	

stcejbosys                 morf	

di                 tceles	

rof   rosruc   selbat_c   eralced	

selbat       resu   eht   hguorht   pool   ot   rosruc   a   etaerC   --	

  	

no   tnuocon   tes	

  	

)	

llun   )51(ced                                 desunu                  	

,llun   )51(ced                                 pxedni                  	

,llun   )51(ced                                 atad                  	

,llun   )51(ced                 devreser                  	

,llun   tni                                 swor                  	

,llun   tni                                 dijbo                  	

(	

ecaps_tps#   elbat   etaerc	

  	

)0,51(ced                                 BMrepsegap@   eralced	

)0,51(ced                 egaprepsetyb@   eralced	

)0,51(ced   ezisbd@   eralced	

emansys   emanbd@   eralced	

                                                 tni	

                 segap@                 eralced	

                                   )2(retcarahc                 epyt@   eralced	

                                                 tni                 di@   eralced	

 	

nigeb

 sa

ofni_elbat_sys_rp erudecorp   etaerc


og

ofni_elbat_sys_rp erudecorp pord  

)'ofni_elbat_sys_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_t_rm_vip_info_create_saledate(MS).sql^^^^

dne

    	

les_ruc etacollaed	

les_ruc esolc	

 dne	

etad_epo@ ,on_wolf@ ,epyt_repo_sl@ ,didrac_sl@ otni les_ruc hctef		

didrac_sl@ = pmet_didrac_sl@ tes		

1 + wor_drac@ = wor_drac@ tes		

		

didrac_sl@ = di_drac erehw etad_epo@ = tsal_etadelas tes ofni_piv_mr_t etadpu		

的期日后最是就条一后最，新更次每--		

 )tsal_etadelas@ > etad_epo@ ro llun si tsal_etadelas@( fI--		

据数的传上网断除排时同，新更不时小期日tsal_etadelas@比期日当----		

		

didrac_sl@ = di_drac erehw etad_epo@ = eerht_etadelas tes ofni_piv_mr_t etadpu			

3 = wor_drac@ dna llun si eerht_etadelas@  fi esle		

didrac_sl@ = di_drac erehw etad_epo@ = owt_etadelas tes ofni_piv_mr_t etadpu			

2 = wor_drac@ dna llun si owt_etadelas@  fi esle		

didrac_sl@ = di_drac erehw etad_epo@ = eno_etadelas tes ofni_piv_mr_t etadpu			

次一新更只且，新更才过新更有没-- 1 = wor_drac@ dna llun si eno_etadelas@ fi		

		

didrac_sl@ = di_drac erehw		

ofni_piv_mr_t morf		

tsal_etadelas = tsal_etadelas@,eerht_etadelas = eerht_etadelas@			

,owt_etadelas = owt_etadelas@,eno_etadelas = eno_etadelas@ tceles		

			

1 = wor_drac@ tes			

 didrac_sl@ >< pmet_didrac_sl@ fI		

nigeb	

 0 = SUTATS_HCTEF@@ elihw	

etad_epo@ ,on_wolf@ ,epyt_repo_sl@ ,didrac_sl@ otni les_ruc hctef	

les_ruc nepo	

csa etad_epo yb redro		

'0' = epyt_repo erehw		

tsilcca_piv_mr_t morf		

*--			

 etad_epo			

,on_wolf			

,epyt_repo			

,di_drac			

	 tceles		

noinu		

出列不就录记的同相号单有tsilcca_piv_mr_t果如断判--)di_drac.tsilevas_piv_mr_t = di_drac.tsilcca_piv_mr_t dna				

 on_wolf.tsilevas_piv_mr_t = on_wolf.tsilcca_piv_mr_t erehw				

 tsilcca_piv_mr_t morf 1 tceles ( stsixe ton			

 dna '5' = epyt_repo erehw		

tsilevas_piv_mr_t morf		

*--			

 etad_epo			

,on_wolf			

,epyt_repo			

,di_drac			

tceles		

rof rosruc les_ruc eralced	

1 = wor_drac@ tes	

40904102 pwnehc 作操才型类的费消--	

据数前当 --	


)02(rahcrav pmet_didrac_sl@		

,tni wor_drac@		

,emitetad nim_etadelas@		

,emitetad xam_etadelas@		

,emitetad tsal_etadelas@		

,emitetad eerht_etadelas@		

,emitetad owt_etadelas@		

费消次一第--,emitetad eno_etadelas@		

,tni tnuoc_ter@		

间时作操-- ,emitetad etad_epo@		

号单--,)02(rahcrav on_wolf@		

,)1(rahc epyt_repo_sl@		

号卡员会 --       ,)02(rahc didrac_sl@ eralced	

nigeb

sa

费消次一后最、费消次三第、费消次二第、费消次一第的中表员会到期日费消的据数史历理整----

etadelas_etaerc_ofni_piv_mr_t_rp corp etaerc



og

etadelas_etaerc_ofni_piv_mr_t_rp erudecorp pord  

)'etadelas_etaerc_ofni_piv_mr_t_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_vip_batchadd_gift(MS).sql^^^^

dne

di_drac.t = di_drac.c no t )	


) 						

) ondnarb_meti@ ekil dnarb_meti.c (								

dna ) onslc_meti@ ekil onslc_meti.c (								

dna ) on_meti.c = on_meti.d (								

dna ) on_wolf.d = on_wolf.b (								

dna ) di_drac.a = di_drac.b (								

dna ) fxn_hcnarb@ ekil on_hcnarb.b (								

dna ) fxn_etade@ dna fxn_etadb@ neewteb etad_epo.b ( erehw  						

 c ofni_meti_db_t ,d wolfelas_mr_t ,b tsilcca_piv_mr_t morf   						

 1 tceles(stsixe ton erehw		

a )		

)			

)  			

)  									

)) yad_e@ =< )5 ,6 ,)121 ,yadhtrib ,)01(rahc(trevnoc (gnirtsbus ro yad_b@ => )5 ,6 ,)121 ,yadhtrib ,)01(rahc(trevnoc (gnirtsbus( dna '0' = galf_yad@ (										

ro ) yad_e@ dna yad_b@ neewteb )5 ,6 ,)121 ,yadhtrib ,)01(rahc(trevnoc (gnirtsbus dna '1' = galf_yad@ ( ( dna '1' = galf_htrib@ (			

 ro '0' = galf_htrib@ (			

dna ) ) muncca_b@ => mun_cca dna '1' = galf_muncca_b@ ( ro '0' = galf_muncca_b@ (			

dna ) ) munlav_b@ =< mun_ced - mun_cca dna '1' = galf_munlav_e@ ( ro '0' = galf_munlav_e@ (			

dna ) ) munlav_b@ => mun_ced - mun_cca dna '1' = galf_munlav_b@ ( ro '0' = galf_munlav_b@ (			

期日记登员会--dna )2etad_repo@=<etad_repo dna etad_repo@=>etad_repo(  dna ) didrac_e@ =< di_drac ro '' = didrac_e@ (			

dna ) didrac_b@ => di_drac ro '' = didrac_b@ (			

20705102 hgnat   卡员会的效无滤过--     dna ) '0'=)'0',sutats_drac(lluNsI (		            

dna ) on_hcnarb@ ekil on_hcnarb (			

dna ) di_repo@ ekil di_repo (			

dna ) epyt_drac@ ekil epyt_drac (			

dna ) '2' = epyt_yreuq@ ( erehw			

ofni_piv_mr_t morf			

yadhtrib ,sutats_drac ,eman_piv ,di_drac tceles			

(		

 morf sutats_drac.a ,eman_piv.a ,di_drac.a tceles		


noinu		


) ) fxtma_e@ =< tma_elas.elas_piv dna '1' = galf_fxtma_e@ ( ro '0' = galf_fxtma_e@ (		

dna ) ) fxtma_b@ => tma_elas.elas_piv dna '1' = galf_fxtma_b@ ( ro '0' = galf_fxtma_b@ ( erehw		

elas_piv )		

yadhtrib ,sutats_drac ,eman_piv ,di_drac.a yb puorg			

 ) ondnarb_meti@ ekil dnarb_meti.c (			

dna ) onslc_meti@ ekil onslc_meti.c (			

dna ) on_meti.c = on_meti.d (			

dna ) on_wolf.d = on_wolf.b (			

dna ) di_drac.b = di_drac.a (			

 dna ) fx_hcnarb@ ekil on_hcnarb.b (			

dna ) fx_etade@ dna fx_etadb@ neewteb etad_epo.b ( erehw			

c ofni_meti_db_t			

,d wolfelas_mr_t			

,b tsilcca_piv_mr_t			

,a )			

)				

)  				

)  										

)) yad_e@ =< )5 ,6 ,)121 ,yadhtrib ,)01(rahc(trevnoc (gnirtsbus ro yad_b@ => )5 ,6 ,)121 ,yadhtrib ,)01(rahc(trevnoc (gnirtsbus( dna '0' = galf_yad@ (											

ro ) yad_e@ dna yad_b@ neewteb )5 ,6 ,)121 ,yadhtrib ,)01(rahc(trevnoc (gnirtsbus dna '1' = galf_yad@ ( ( dna '1' = galf_htrib@ (  				

 ro '0' = galf_htrib@ (				

dna ) ) muncca_b@ => mun_cca dna '1' = galf_muncca_b@ ( ro '0' = galf_muncca_b@ (				

dna ) ) munlav_e@ =< mun_ced - mun_cca dna '1' = galf_munlav_e@ ( ro '0' = galf_munlav_e@ (				

dna ) ) munlav_b@ => mun_ced - mun_cca dna '1' = galf_munlav_b@ ( ro '0' = galf_munlav_b@ (				

日记登员会-- dna )2etad_repo@=<etad_repo dna etad_repo@=>etad_repo( dna ) didrac_e@ =< di_drac ro '' = didrac_e@ (				

dna ) didrac_b@ => di_drac ro '' = didrac_b@ (				

20705102 hgnat   卡员会的效无滤过--    dna ) '0'=)'0',sutats_drac(lluNsI (		                

dna ) on_hcnarb@ ekil on_hcnarb (				

dna ) di_repo@ ekil di_repo (				

dna ) epyt_drac@ ekil epyt_drac (				

dna ) '1' = epyt_yreuq@ ( erehw				

ofni_piv_mr_t morf				

yadhtrib ,sutats_drac ,eman_piv ,di_drac tceles				

(			

 morf )yenom_elas.d(mus = tma_elas ,yadhtrib.a ,sutats_drac.a ,eman_piv.a ,di_drac.a tceles			

(		

 morf sutats_drac.elas_piv ,eman_piv.elas_piv ,di_drac.elas_piv tceles		

(	

nioj thgir c ) 1 = 0 erehw etacifitrec_tfig_mr_t morf * tceles ( morf	

'' = di_drac_c		

,1omem.c		

  ,omem.c		

,hcnarb_yap.c		

   ,etad_yap.c		

   ,repo_yap.c		

   ,on_wolf.c		

   ,hcnarb_dnes.c		

   ,etad_dne.c		

   ,etad_nigeb.c		

   ,sutats.c		

   ,etad_repo.c		

   ,di_repo.c		

   ,yenom_tfig.c		

   ,epyt_tfig.c		

   ,on_trectfig.c		

 ,eman_piv.t		

,di_drac.t		

,'0' = tceles_si tcnitsid tceles	



'0' = galf_yad@ tes		

esle	

'1' = galf_yad@ tes		

yad_e@ =< yad_b@ fi	

)5 ,6 ,)121 ,))(etadteg ,syadhtrib_e@ ,dd(ddaetad ,)01(rahc(trevnoc (gnirtsbus = yad_e@ tceles	

)5 ,6 ,)121 ,))(etadteg ,syadhtrib_b@ ,dd(ddaetad ,)01(rahc(trevnoc (gnirtsbus = yad_b@ tceles	


dne	

1 + pmt_il@ = pmt_il@ tes		


		

		

) pmt_sl@ ,emitetad(trevnoc = 2etad_repo@ tceles			

期日记登束结-- 5 = pmt_il@ fi esle		

) pmt_sl@ ,emitetad(trevnoc = etad_repo@ tceles			

期日记登员会-- 4 = pmt_il@ fi esle		

pmt_sl@ = fxn_hcnarb@ tceles			

 3 = pmt_il@ fi esle		

) pmt_sl@ ,emitetad(trevnoc = fxn_etade@ tceles			

2 = pmt_il@ fi esle		

) pmt_sl@ ,emitetad(trevnoc = fxn_etadb@ tceles			

1 = pmt_il@ fi		


dne		

) sop_il@ - )tsilnoitdnoc_sl@(nel ,1 + sop_il@ ,tsilnoitdnoc_sl@(gnirtsbus = tsilnoitdnoc_sl@ tes			

)1 - sop_il@ ,1 ,tsilnoitdnoc_sl@(gnirtsbus = pmt_sl@ tes			

nigeb		

esle		

dne		

'' = tsilnoitdnoc_sl@ tes			

tsilnoitdnoc_sl@ = pmt_sl@ tes			

nigeb		

0 = sop_il@ fi		

)tsilnoitdnoc_sl@ ,'|'(XEDNIRAHC = sop_il@ tes		

nigeb	

5 =< pmt_il@ elihw	

fxn_tsil_noitdnoc@ = tsilnoitdnoc_sl@ tes	

1 = pmt_il@ tes	

析解件条费消未--	


dne	

1 + pmt_il@ = pmt_il@ tes		


) pmt_sl@ ,)4,61(ciremun(trevnoc = fxtma_e@ tceles			

7 = pmt_il@ fi esle		

pmt_sl@ = galf_fxtma_e@ tceles			

6 = pmt_il@ fi esle		

) pmt_sl@ ,)4,61(ciremun(trevnoc = fxtma_b@ tceles			

5 = pmt_il@ fi esle		

pmt_sl@ = galf_fxtma_b@ tceles			

 4 = pmt_il@ fi esle		

pmt_sl@ = fx_hcnarb@ tceles			

 3 = pmt_il@ fi esle		

) pmt_sl@ ,emitetad(trevnoc = fx_etade@ tceles			

2 = pmt_il@ fi esle		

) pmt_sl@ ,emitetad(trevnoc = fx_etadb@ tceles			

1 = pmt_il@ fi		


dne		

) sop_il@ - )tsilnoitdnoc_sl@(nel ,1 + sop_il@ ,tsilnoitdnoc_sl@(gnirtsbus = tsilnoitdnoc_sl@ tes			

)1 - sop_il@ ,1 ,tsilnoitdnoc_sl@(gnirtsbus = pmt_sl@ tes			

nigeb		

esle		

dne		

'' = tsilnoitdnoc_sl@ tes			

tsilnoitdnoc_sl@ = pmt_sl@ tes			

nigeb		

0 = sop_il@ fi		

)tsilnoitdnoc_sl@ ,'|'(XEDNIRAHC = sop_il@ tes		

nigeb	

7 =< pmt_il@ elihw	

fx_tsil_noitdnoc@ = tsilnoitdnoc_sl@ tes	

1 = pmt_il@ tes	

析解件条费消--	



dne	

1 + pmt_il@ = pmt_il@ tes		


) pmt_sl@ ,)0,61(ciremun(trevnoc = syadhtrib_e@ tceles			

3 = pmt_il@ fi esle		

) pmt_sl@ ,)0,61(ciremun(trevnoc = syadhtrib_b@ tceles			

 2 = pmt_il@ fi esle		

 pmt_sl@ = galf_htrib@ tceles			

1 = pmt_il@ fi		


dne		

) sop_il@ - )tsilnoitdnoc_sl@(nel ,1 + sop_il@ ,tsilnoitdnoc_sl@(gnirtsbus = tsilnoitdnoc_sl@ tes			

)1 - sop_il@ ,1 ,tsilnoitdnoc_sl@(gnirtsbus = pmt_sl@ tes			

nigeb		

esle		

dne		

'' = tsilnoitdnoc_sl@ tes			

tsilnoitdnoc_sl@ = pmt_sl@ tes			

nigeb		

0 = sop_il@ fi		

)tsilnoitdnoc_sl@ ,'|'(XEDNIRAHC = sop_il@ tes		

nigeb	

4 =< pmt_il@ elihw	

yadhtrib_moc_tsil_noitdnoc@ = tsilnoitdnoc_sl@ tes	

1 = pmt_il@ tes	

关相日生员会：析解件条询查共公--	


dne	

1 + pmt_il@ = pmt_il@ tes		


) pmt_sl@ ,)4,61(ciremun(trevnoc = muncca_b@ tceles			

2 = pmt_il@ fi esle		

 pmt_sl@ = galf_muncca_b@ tceles			

1 = pmt_il@ fi		


dne		

) sop_il@ - )tsilnoitdnoc_sl@(nel ,1 + sop_il@ ,tsilnoitdnoc_sl@(gnirtsbus = tsilnoitdnoc_sl@ tes			

)1 - sop_il@ ,1 ,tsilnoitdnoc_sl@(gnirtsbus = pmt_sl@ tes			

nigeb		

esle		

dne		

'' = tsilnoitdnoc_sl@ tes			

tsilnoitdnoc_sl@ = pmt_sl@ tes			

nigeb		

0 = sop_il@ fi		

)tsilnoitdnoc_sl@ ,'|'(XEDNIRAHC = sop_il@ tes		

nigeb	

2 =< pmt_il@ elihw	

muncca_moc_tsil_noitdnoc@ = tsilnoitdnoc_sl@ tes	

1 = pmt_il@ tes	

关相分积计累：析解件条询查共公--	


dne	

1 + pmt_il@ = pmt_il@ tes		


) pmt_sl@ ,)4,61(ciremun(trevnoc = munlav_e@ tceles			

4 = pmt_il@ fi esle		

) pmt_sl@ ,)4,61(ciremun(trevnoc = munlav_b@ tceles			

 3 = pmt_il@ fi esle		

 pmt_sl@ = galf_munlav_e@ tceles			

2 = pmt_il@ fi esle		

 pmt_sl@ = galf_munlav_b@ tceles			

1 = pmt_il@ fi		


dne		

) sop_il@ - )tsilnoitdnoc_sl@(nel ,1 + sop_il@ ,tsilnoitdnoc_sl@(gnirtsbus = tsilnoitdnoc_sl@ tes			

)1 - sop_il@ ,1 ,tsilnoitdnoc_sl@(gnirtsbus = pmt_sl@ tes			

nigeb		

esle		

dne		

'' = tsilnoitdnoc_sl@ tes			

tsilnoitdnoc_sl@ = pmt_sl@ tes			

nigeb		

0 = sop_il@ fi		

)tsilnoitdnoc_sl@ ,'|'(XEDNIRAHC = sop_il@ tes		

nigeb	

4 =< pmt_il@ elihw	

munlav_moc_tsil_noitdnoc@ = tsilnoitdnoc_sl@ tes	

1 = pmt_il@ tes	

关相分积余剩：析解件条询查共公--	



期日记登束结--    emitetad	2etad_repo@		

期日记登始开--  , emitetad	etad_repo@		

,)6(rahcrav	fxn_hcnarb@		

,emitetad	fxn_etade@		

,emitetad	fxn_etadb@		

eralced	

置设件条的询查费消未按--	


)4,61(ciremun	fxtma_e@		

,)1(rahc	galf_fxtma_e@		

,)4,61(ciremun	fxtma_b@		

,)1(rahc	galf_fxtma_b@		

,)6(rahcrav	fx_hcnarb@		

,emitetad	fx_etade@		

,emitetad	fx_etadb@		

eralced	

置设件条的询查费消按--	


)0,61(ciremun syadhtrib_e@		

,)0,61(ciremun syadhtrib_b@		

,)1(rahc	galf_htrib@		

	,)4,61(ciremun muncca_b@		

,)1(rahc galf_muncca_b@		

 ,)4,61(ciremun munlav_e@		

 ,)4,61(ciremun munlav_b@		

 ,)1(rahc galf_munlav_e@		

,)1(rahc galf_munlav_b@		

eralced	

件条询查共公--	


)5(rahc	yad_e@		

,)5(rahc	yad_b@		

,)1(rahc galf_yad@		

,tni sop_il@		

,tni	pmt_il@		

,)552(rahcrav tsilnoitdnoc_sl@		

,)552(rahcrav	pmt_sl@		

eralced	

nigeb

sa

)

期日记登员会|店门费消未|期日束结费消未|期日始开费消未：件条询查费消未按--	)552(rahcrav fxn_tsil_noitdnoc@	

	值于等于小额金费消|件条于等于小额金费消用采|值于等于大额金费消|件条于等于大额金费消用采|店门|期日束结|期日始开：件条询查费消按--	,)552(rahcrav fx_tsil_noitdnoc@	

数天束结日生|数天始开日生|件条的日生内天N到M从员会用采：日生员会件条询查用公--	,)552(rahcrav yadhtrib_moc_tsil_noitdnoc@	

值于等于大分积余剩|件条于等于大分积计累用采：分积计累件条询查用公--		,)552(rahcrav muncca_moc_tsil_noitdnoc@	

值于等于小分积余剩|值于等于大分积余剩|件条于等于小分积余剩用采|件条于等于大分积余剩用采：分积余剩件条询查用公--		,)552(rahcrav munlav_moc_tsil_noitdnoc@	

号卡束结--		,)02(rahcrav didrac_e@	

号卡始开--		,)02(rahcrav didrac_b@	

	牌品--	,)02(rahcrav ondnarb_meti@	

别类--	,)02(rahcrav onslc_meti@	

	店门卡发--		,)6(rahcrav on_hcnarb@	

人记登--		,)8(rahcrav di_repo@	

别类卡--		,)2(rahcrav epyt_drac@	

询查费消未按：2 询查费消按：1 式方询查--		,)1(rahc epyt_yreuq@	

(tfig_ddahctab_piv_rp erudecorp etaerc



og

tfig_ddahctab_piv_rp erudecorp pord  

)'tfig_ddahctab_piv_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_vip_course_info-在update里面.sql^^^^

dne

-- ffo tnuocon tes	

	

ytnq_zj_pmet#	 elbat pord	

ytnq_cj_pmet#	 elbat pord	

htnom_raeyruc_pmet#	 elbat pord	

htnom_tsal_pmet#	 elbat pord	

htnom_ruc_pmet#	 elbat pord	

htnom_pmet#	 elbat pord	

tfig_pmet#	 elbat pord	


on_hcnarb@ ekil )'',on_hcnarb.v(llunsi  			

dna di_repo@ ekil )'',di_repo.v(llunsi dna di_drac@ ekil )'',di_drac.v(llunsi dna di_epyt.t = epyt_drac.v erehw		

)kcolon(htiw t epyt_piv_mr_t 			

,di_drac.onslc_rovaf# = di_drac.v no onslc_rovaf# nioj tfel 			

on_tsuc.ytnq_zj_pmet# = di_drac.v no ytnq_zj_pmet# nioj tfel 			

di_drac.ytnq_cj_pmet# = di_drac.v no ytnq_cj_pmet# nioj tfel 			

di_drac.htnom_raeyruc_pmet# = di_drac.v no htnom_raeyruc_pmet# nioj tfel 			

di_drac.htnom_tsal_pmet# = di_drac.v no htnom_tsal_pmet# nioj tfel 			

di_drac.htnom_ruc_pmet# = di_drac.v no htnom_ruc_pmet# nioj tfel 			

di_drac.htnom_pmet# = di_drac.v no htnom_pmet# nioj tfel 			

 di_drac.tfig_pmet# = di_drac.v no tfig_pmet# nioj tfel 			

di_drac.b = di_drac.v no )kcolon(htiw b ytitnedi_doohrehtom_piv_mr_t nioj tfel )kcolon(htiw v ofni_piv_mr_t morf		

)别类(品商爱偏最--  onslc_meti sa onslc_meti.onslc_rovaf#				

量数次计--   ,ytnq_zj sa )0,ytnq_zj.ytnq_zj_pmet#(llunsi				

量数存寄--  ,ytnq_cj sa )0,ytnq_cj.ytnq_cj_pmet#(llunsi				

额金费消年本--  ,tnuoma_raeyruc sa )00.0,tnuoma_raeyruc.htnom_raeyruc_pmet#(llunsi				

数次费消年本--	,mun_raeyruc sa )0,mun_raeyruc.htnom_raeyruc_pmet#(llunsi				

额金费消月上-- ,tnuoma_htnomtsal sa )00.0,tnuoma_htnomtsal.htnom_tsal_pmet#(llunsi				

数次费消月上-- 	,mun_htnomtsal sa )0,mun_htnomtsal.htnom_tsal_pmet#(llunsi				

额金费消月本--  ,tnuoma_htnomruc sa )00.0,tnuoma_htnomruc.htnom_ruc_pmet#(llunsi				

数次费消月本--	,mun_htnomruc sa )0,mun_htnomruc.htnom_ruc_pmet#(llunsi   			

数次店返月-- ,ter_htnom_gva sa )00.0,) )2,61(ciremun sa )dne )))2,61(ciremun sa mun_htnom.htnom_pmet#(tsac/))2,61(ciremun sa mun_yub.htnom_pmet#(tsac( esle 0 neht 0=)0,mun_htnom.htnom_pmet#(llunsi nehw esac((tsac(llunsi   			

价单客均平-- ,ecirptsuc_gva sa )00.0,)dne )mun_yub.htnom_pmet#/tnuoma_yub.htnom_pmet#( esle 00.0 neht 0=)0,mun_yub.htnom_pmet#(llunsi nehw esac((llunsi   			

数月总--	,mun_htnom sa )0,mun_htnom.htnom_pmet#(llunsi   			

 额金费消总--,tnuoma_yub sa )00.0,tnuoma_yub.htnom_pmet#(llunsi   			

数次费消总--		,mun_yub sa )0,mun_yub.htnom_pmet#(llunsi   			

数券礼用可员会--		,mun_tfig sa )0,mun_tfig.tfig_pmet#(llunsi   			

号单费消后最--	,on_wolf sa )dne )tsal_etadelas = etad_epo erehw tsilcca_piv_mr_t morf )on_wolf(XAM tceles( esle   			

 )tsal_etadelas = etad_epo erehw tsilevas_piv_mr_t morf )on_wolf(XAM tceles(				

 neht llun  si )tsal_etadelas = etad_epo erehw tsilcca_piv_mr_t morf )on_wolf(XAM tceles( nehw esac(  			

龄年宝宝-- ,ega_y  )dne '天'+ )))) )etad_yadhtrib_ybab,yad(trapetad - ))(etadteg,yad(trapetad(,)2(rahc(trevnoc(MIRTL(MIRTR+'月个'+ )))))(etadteg,etad_yadhtrib_ybab,htnom( FFIDETAD,)3(rahc(trevnoc(MIRTL(MIRTR esle   			

'期期晚孕' neht 0 < ))(etadteg,etad_yadhtrib_ybab,d(FFIDETAD dna 39- =>))(etadteg,etad_yadhtrib_ybab,d(FFIDETAD nehw   			

'期中孕' neht 39- < ))(etadteg,etad_yadhtrib_ybab,d(FFIDETAD dna 681- =>))(etadteg,etad_yadhtrib_ybab,d(FFIDETAD nehw   			

 '期早孕' neht 681- < ))(etadteg,etad_yadhtrib_ybab,d(FFIDETAD dna 082- =>))(etadteg,etad_yadhtrib_ybab,d(FFIDETAD nehw ESAC(  			

期产预/日生宝宝--	,etad_yadhtrib_ybab.b   			

	别性宝宝--		,xes_ybab   			

名姓宝宝--		,eman_ybab.b   			

号机手--			,elibom   			

			店门费消后最-- ,tsal_hcnarb dne )tsal_etadelas = etad_epo erehw tsilcca_piv_mr_t morf on_hcnarb 1 pot tceles( esle						

 )tsal_etadelas = etad_epo erehw tsilevas_piv_mr_t morf on_hcnarb 1 pot tceles(  						

 neht llun  si )tsal_etadelas = etad_epo erehw tsilcca_piv_mr_t morf on_hcnarb 1 pot tceles( nehw esac   			

分积余剩--	,mun_cca_won.v   			

员销营属所--		,di_repo.v   			

)店门卡发(店门属所--		,on_hcnarb.v   			

期日册注--  ,ig_etad_repo.v   			

	日生员会--		,yadhtrib.v   			

 别性--		,xes_piv.v   			

名姓--		,eman_piv.v   			

	型类卡--		,di_epyt.t   			

号卡--		,di_drac.v tceles		

集果结--		


)di_drac.slc_piv_pmet#=di_drac.a erehw a slc_piv_pmet# morf )ytnq_elas(xam tceles( => ytnq_elas erehw slc_piv_pmet# morf		

onslc_rovaf# otni onslc_meti,di_drac tceles		


onslc_meti.b,di_drac.a yb puorg		

on_hcnarb@ ekil )'',on_hcnarb.a(llunsi dna di_repo@ ekil )'',di_repo.a(llunsi dna di_drac@ ekil di_drac.a  			

	dna )021,))(etadteg ,03-,yad(DDAETAD,)01(rahcrav(trevnoc => etad_repo.s  			

	dna on_meti.b = on_meti.s dna di_drac.s = di_drac.a erehw		

	)kcolon(htiw b ofni_meti_db_t 			

,)kcolon(htiw s musyad_meti_piv_ad_t 			

,)kcolon(htiw a ofni_piv_mr_t morf		

slc_piv_pmet# otni   )ytnq_elas.s(mus = ytnq_elas,onslc_meti.b,di_drac.a tceles		

)别类(品商买购爱偏最--		


on_tsuc.a yb puorg		

di_repo@ ekil )'',di_repo.b(llunsi dna di_drac@ ekil on_tsuc.a dna )'2'=evorppa.a ro '1'=evorppa.a( dna di_drac.b = on_tsuc.a erehw		

)kcolon(htiw b ofni_piv_mr_t,)kcolon(htiw a derots_piv_mr_t morf ytnq_zj_pmet# otni   )on_teehs.a(tnuoc = ytnq_zj,on_tsuc.a tceles		

数录记息信次计员会--		


di_drac.a yb puorg		

di_repo@ ekil )'',di_repo.b(llunsi dna di_drac@ ekil di_drac.a dna '入存'=omem.a dna di_drac.b = di_drac.a EREHW		

)kcolon(htiw b ofni_piv_mr_t,)kcolon(htiw a gol_kcots_sop_mr_t MORF		

 ytnq_cj_pmet# otni		

   )on_wolf.a(tnuoc= ytnq_cj,di_drac.a TCELES		

数录记存寄员会--		


	di_drac yb puorg		

di_repo@ ekil )'',namelas_piv(llunsi dna di_drac@ ekil di_drac  			

 dna )021,etade_ruc@,)01(rahcrav(trevnoc dna )021,raeyb_ruc@,)01(rahcrav(trevnoc neewteb etad_repo erehw		

 )kcolon(htiw musyad_elas_piv_ad_t morf		

htnom_raeyruc_pmet# otni		

额金费消年本--   )tnuoma_yub(mus= tnuoma_raeyruc   			

数次费消年本--	,  )mun_yub(mus=mun_raeyruc   			

,di_drac tceles		

息信费消年本--		


	di_drac yb puorg		

di_repo@ ekil )'',namelas_piv(llunsi dna di_drac@ ekil di_drac  			

 dna )021,etade_tsal@,)01(rahcrav(trevnoc dna )021,etadb_tsal@,)01(rahcrav(trevnoc neewteb etad_repo erehw		

 )kcolon(htiw musyad_elas_piv_ad_t morf		

htnom_tsal_pmet# otni		

额金费消月上-- )tnuoma_yub(mus= tnuoma_htnomtsal   			

数次费消月上--	,   )mun_yub(mus=mun_htnomtsal   			

,di_drac tceles		

息信费消月上--		

		

di_drac yb puorg		

di_repo@ ekil )'',namelas_piv(llunsi dna di_drac@ ekil di_drac  			

 dna	)021,etade_ruc@,)01(rahcrav(trevnoc dna )021,etadb_ruc@,)01(rahcrav(trevnoc neewteb etad_repo erehw		

 )kcolon(htiw musyad_elas_piv_ad_t morf		

htnom_ruc_pmet# otni		

额金费消月本-- )tnuoma_yub(mus = tnuoma_htnomruc  			

数次费消月本--	,   )mun_yub(mus=mun_htnomruc   			

,di_drac tceles		

息信费消月本--		

		

天一第年前当-- )0,))(etadteg,0,yy(FFIDETAD,yy(DDAETAD = raeyb_ruc@ tes		

间时末月上-- )))0,1+))(etadteg,0,m(ffidetad,mm(ddaetad,3-,sm(ddaetaD,1-,mm(ddaetaD-- ))0,))(etadteg,0,mm(FFIDETAD,mm(DDAETAD,3-,sm(ddaetad = etade_tsal@ tes		

间时初月上-- ))0,))(etadteg,0,mm(ffidetad,mm(ddaetaD,1-,mm(ddaetaD = etadb_tsal@ tes		

间时前当月前当--	)(etadteg = etade_ruc@ tes		

间时初月月前当--  )0,))(etadteg,0,mm(ffidetad,mm(ddaetaD = etadb_ruc@ tes		

		

emitetad			raeyb_ruc@					

,emitetad			etade_tsal@					

,emitetad			etadb_tsal@					

,emitetad			etade_ruc@					

,emitetad			etadb_ruc@		eralced		

		

di_drac.d yb puorg		

di_repo@ ekil )'',namelas_piv.d(llunsi dna di_drac@ ekil di_drac.d dna di_drac.v = di_drac.d erehw		

   )kcolon(htiw v ofni_piv_mr_t,)kcolon(htiw d musyad_elas_piv_ad_t morf		

htnom_pmet# otni		

)月本到期日卡发(数月总--    )1+)))(etadteg(xam,)dne )ig_etad_repo.v(nim esle )etad_repo.d(nim neht ''=)'',)ig_etad_repo.v(nim(llunsi nehw esac(, mm (FFIDETAD( = mun_htnom   			

额金费消总--  , )tnuoma_yub(mus=tnuoma_yub   			

数次费消总--	,  )mun_yub(mus=mun_yub   			

,di_drac.d tceles		

价单客均平,数次店返月--		


di_drac yb puorg		

 di_drac@ ekil )'',di_drac.g(llunsi dna )(etadteg > etad_dne dna '1' =sutats erehw )kcolon(htiw g etacifitrec_tfig_mr_t morf tfig_pmet# otni   )0,)1(tnuoc(llunsi=mun_tfig,di_drac tceles		

数券礼用可员会--		


 ))on_hcnarb@(MIRTR(MIRTL = on_hcnarb@ tes		

 ))di_drac@(MIRTR(MIRTL = di_drac@ tes		

 ))di_repo@(MIRTR(MIRTL = di_repo@ tes		

		

 -- no tnuocon tes	

nigeb

 sa

)

店门卡发--		)6(rahcrav	on_hcnarb@	

号卡员会--	,)02(rahcrav	di_drac@	

码编员销营--		,)4(rahcrav	di_repo@	

留预--		,emitetad	etad_dne@--	

留预--		,emitetad	etad_nigeb@--	

   (

ofni_esruoc_piv_rp corp etaerc



og

ofni_esruoc_piv_rp erudecorp pord  

)'ofni_esruoc_piv_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_vip_paid_baby.sql^^^^

dne

ondnarb_sa@ ekil on_dnarb erehw ybab_diap# morf * tceles	


ruc_dnarb etacollaed	

ruc_dnarb esolc	

dne	

eman_dnarb@,on_dnarb@ ,eman_piv@,on_drac@ otni ruc_dnarb hctef    	

on_dnarb@=on_dnarb erehw 3ytnq_elas@ = 3ytnq_elas,2ytnq_elas@ = 2ytnq_elas,1ytnq_elas@ = 1ytnq_elas tes ybab_diap# etadpu            

    	

0=3ytnq_elas@ tceles llun si 3ytnq_elas@ fi    	

0=2ytnq_elas@ tceles llun si 2ytnq_elas@ fi    	

0=1ytnq_elas@ tceles llun si 1ytnq_elas@ fi    	


dnarb_meti.c yb puorg    	

 on_meti_sa@ ekil on_meti.a    dna    	

 on_hcnarb_sa@ ekil on_hcnarb.a    dna    	

 didrac_sa@ ekil di_drac.a    dna    	

 on_dnarb@ ekil dnarb_meti.c  dna    	

 )ot_tda@ dna morf_tda@ neewteb etad_repo.a( dna    	

 on_meti.c=on_meti.a dna    	

 3ytreporp_ybab.b=on_meti.a erehw    	

c ofni_meti_db_t,b ytitnedi_doohrehtom_piv_mr_t,a wolfelas_mr_t morf    	

)0,)ytnq_elas.a(mus(llunsi=3ytnq_elas@ tceles    	


dnarb_meti.c yb puorg    	

  on_meti_sa@ ekil on_meti.a    dna    	

 on_hcnarb_sa@ ekil on_hcnarb.a    dna    	

 didrac_sa@ ekil di_drac.a    dna    	

 on_dnarb@ ekil dnarb_meti.c  dna    	

 )ot_tda@ dna morf_tda@ neewteb etad_repo.a( dna    	

 on_meti.c=on_meti.a dna    	

 2ytreporp_ybab.b=on_meti.a erehw    	

c ofni_meti_db_t,b ytitnedi_doohrehtom_piv_mr_t,a wolfelas_mr_t morf    	

)0,)ytnq_elas.a(mus(llunsi=2ytnq_elas@ tceles    	


dnarb_meti.c yb puorg    	

  on_meti_sa@ ekil on_meti.a    dna    	

 on_hcnarb_sa@ ekil on_hcnarb.a    dna    	

 didrac_sa@ ekil di_drac.a    dna    	

 on_dnarb@ ekil dnarb_meti.c  dna    	

 )ot_tda@ dna morf_tda@ neewteb etad_repo.a( dna    	

 on_meti.c=on_meti.a dna    	

1ytreporp_ybab.b=on_meti.a erehw    	

c ofni_meti_db_t,b ytitnedi_doohrehtom_piv_mr_t,a wolfelas_mr_t morf    	

)0,)ytnq_elas.a(mus(llunsi=1ytnq_elas@ tceles    	

   	

0=3ytnq_elas@ tceles    	

0=2ytnq_elas@ tceles    	

0=1ytnq_elas@ tceles    	


)eman_dnarb@,on_dnarb@,on_drac@(seulav)eman_dnarb,on_dnarb,on_drac(ybab_diap# otni tresni    	


nigeb	

0=sutats_hctef@@ elihw	


eman_dnarb@,on_dnarb@ ,eman_piv@,on_drac@ otni ruc_dnarb hctef	

ruc_dnarb nepo	

	on_meti_sa@ ekil on_meti.wolfelas_mr_t    dna	

 on_hcnarb_sa@ ekil on_hcnarb.wolfelas_mr_t    dna	

 didrac_sa@ ekil di_drac.wolfelas_mr_t    dna	

 )ot_tda@ dna morf_tda@ neewteb etad_repo.wolfelas_mr_t(   dna	

 ''><)'',di_drac.wolfelas_mr_t(llunsi   dna	

 on_meti.wolfelas_mr_t=on_meti.ofni_meti_db_t erehw	

	wolfelas_mr_t,ofni_meti_db_t morf	

emandnarb_meti.ofni_meti_db_t,dnarb_meti.ofni_meti_db_t	

,)'',) di_drac.wolfelas_mr_t= di_drac erehw ofni_piv_mr_t morf eman_piv tceles((llunsi = eman_piv	

, di_drac.wolfelas_mr_t tcnitsid tceles	

rof rosruc ruc_dnarb eralced	


)	

)on_dnarb , on_drac( yek yramirp	

0 tluafed)4,61(ciremun 3ytnq_elas	

,0 tluafed)4,61(ciremun 2ytnq_elas	

,0 tluafed)4,61(ciremun 1ytnq_elas	

,llun )04(rahcrav eman_dnarb	

 ,)02(rahcrav on_dnarb	

,llun )8(rahcrav eman_piv	

,  )02(rahcrav on_drac	

(ybab_diap# elbat etaerc	


)4,61(ciremun 3ytnq_elas@		

,)4,61(ciremun 2ytnq_elas@		

,)4,61(ciremun 1ytnq_elas@		

,)04(rahcrav eman_dnarb@		

,)02(rahcrav on_dnarb@		

,)8(rahcrav eman_piv@		

,)02(rahcrav on_drac@ eralced	

nigeb

sa

)

)02(rahcrav on_meti_sa@		

,)02(rahcrav ondnarb_sa@		

,)6(rahcrav on_hcnarb_sa@		

,)02(rahcrav didrac_sa@		

,emitetad ot_tda@		

,emitetad morf_tda@		

(ybab_diap_piv_rp erudecorp etaerc


og

ybab_diap_piv_rp erudecorp pord  

)'ybab_diap_piv_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_wm_combitem_flow(MS).sql^^^^

dne


nruter  

mob_rucl etacollaed  

mob_rucl esolc  

:rorreym


dne  

ecirp@,ytq_meti@,on_meti@ otni mob_rucl hctef   

dne   

/*dne        

rorreym otog 0 =! rorre@@ fi           

)ytq_mota@,ecirp@,ecirp_mota@,on_meti@,ytq_laer_da@,ecirp_da@,onmeti_sa@,ats_enibmoc@,ONhcnarb_sa@,)121,etaDrepo_tda@,)01(rahc(trevnoc( seulav   

        

)ytq_sc,ecirp_tsoc_sc,ecirp_elas_sc,on_meti_sc,ytq,ecirp_elas,on_meti,epyt_snart,on_hcnarb,etad_repo(wolf_sc_mi_t tresni           

nigeb         

)0=!ytq_laer_da@( fi*/         

	

crPpmt_nl@=ecirp@ tceles 0>crPpmt_nl@ fi         

on_meti@=on_meti dna ONhcnarb_sa@=on_hcnarb erehw kcots_hcnarb_mi_t morf tsoc_gva=crPpmt_nl@ tceles         

	

dne         

dne         	

rorreym otog 0 =! rorre@@ fi            	

)nam_redro@,)31,1,ONmeti_sa@(gnirtsbus+'合组',on_tsuc_sa@,'1001','-',on_snart_sa@,ONhcnarb_sa@,0,0,ytq_meti@*3mun_da@,on_meti@,etaDrepo_tda@,on_teehs_sa@( seulav	            

)nam_redro,omem,on_tsucpus,di_repo,on_bd,on_snart,on_hcnarb,tma_teehs,ecirp,ytq_laer,on_meti,etad_repo,on_rehcuov(wolf_mi_t tresni               

nigeb            

0=3mun_da@ ton fi            

品赠--            


dne            

rorreym otog 0 =! rorre@@ fi      			

)nam_redro@,)31,1,ONmeti_sa@(gnirtsbus+'合组',on_tsuc_sa@,'1001','-',on_snart_sa@,ONhcnarb_sa@,ecirp_mota@*ytq_mota@,ecirp_mota@,ytq_mota@,on_meti@,etaDrepo_tda@,on_teehs_sa@( seulav               

)nam_redro,omem,on_tsucpus,di_repo,on_bd,on_snart,on_hcnarb,tma_teehs,ecirp,ytq_laer,on_meti,etad_repo,on_rehcuov(wolf_mi_t tresni               

nigeb            

42-70-6002 sjuw yb dedda-- 0=! ytq_mota@ FI            

nigeb         

esle         

dne   		

dne         	

rorreym otog 0 =! rorre@@ fi             	

)nam_redro@,)31,1,ONmeti_sa@(gnirtsbus+'合组',etar_yl_pus@,yaw_elas@,on_tsuc_sa@,'1001','-',on_snart_sa@,ONhcnarb_sa@,0,0,ytq_meti@*3mun_da@,on_meti@,etaDrepo_tda@,on_teehs_sa@( seulav                

)nam_redro,omem,etar_yl_pus,yaw_elas,on_tsucpus,di_repo,on_bd,on_snart,on_hcnarb,tma_teehs,ecirp,ytq_laer,on_meti,etad_repo,on_rehcuov(wolf_mi_t tresni                

nigeb            

水流写量数送赠--  0=3mun_da@ ton fi   	


dne           

rorreym otog 0 =! rorre@@ fi     	

)nam_redro@,)31,1,ONmeti_sa@(gnirtsbus+'合组',etar_yl_pus@,yaw_elas@,on_tsuc_sa@,'1001','-',on_snart_sa@,ONhcnarb_sa@,ecirp_mota@*ytq_mota@,ecirp_mota@,ytq_mota@,on_meti@,etaDrepo_tda@,on_teehs_sa@( seulav              

)nam_redro,omem,etar_yl_pus,yaw_elas,on_tsucpus,di_repo,on_bd,on_snart,on_hcnarb,tma_teehs,ecirp,ytq_laer,on_meti,etad_repo,on_rehcuov(wolf_mi_t tresni      	

nigeb           

42-70-6002 sjuw yb dedda-- 0=! ytq_mota@ FI           

nigeb   		

销代率扣和营联-- )'F' = yaw_elas@ ro 'C' = yaw_elas@( fi         

            

           

on_meti@ = on_meti erehw ofni_meti_db_t morf            

0=etar_yl_pus@,galf_pus_meti=yaw_elas@,tsucpus_niam = on_tsucpus@ tceles        

60-10-6002 sjuw yb deifidom--        

	          nigeb       

  品商通普是品商分成--  ESLE       

dne       

/*		

dne          	

rorreym otog 0 =! rorre@@ fi          		

)ytq_mota@,ecirp@,ecirp_mota@,gf_ONmeti_sl@,ytq_laer_da@,ecirp_da@,onmeti_sa@,ats_enibmoc@,ONhcnarb_sa@,)121,etaDrepo_tda@,)01(rahc(trevnoc( seulav          		

)ytq_sc,ecirp_tsoc_sc,ecirp_elas_sc,on_meti_sc,ytq,ecirp_elas,on_meti,epyt_snart,on_hcnarb,etad_repo(wolf_sc_mi_t tresni             	

nigeb          	

42-70-6002 sjuw yb dedda-- 0 =! ytq_laer_da@ FI*/       	

crPpmt_nl@=ecirp@ tceles 0>crPpmt_nl@ fi       	

gf_ONmeti_sl@=on_meti dna ONhcnarb_sa@=on_hcnarb erehw kcots_hcnarb_mi_t morf tsoc_gva=crPpmt_nl@ tceles       	


dne    		

dne          	

rorreym otog 0 =! rorre@@ fi            	

)nam_redro@,)31,1,ONmeti_sa@(gnirtsbus+'合组',on_tsuc_sa@,'1001','-',on_snart_sa@,ONhcnarb_sa@,0,0,ytq_meti@*3mun_da@,on_meti@,etaDrepo_tda@,on_teehs_sa@( seulav	            

)nam_redro,omem,on_tsucpus,di_repo,on_bd,on_snart,on_hcnarb,tma_teehs,ecirp,ytq_laer,on_meti,etad_repo,on_rehcuov(wolf_mi_t tresni                

nigeb             

0=3mun_da@ ton fi             

品赠--             

dne             

rorreym otog 0 =! rorre@@ fi       	

)nam_redro@,)31,1,ONmeti_sa@(gnirtsbus+'拆组',on_tsuc_sa@,'1001','-',on_snart_sa@,ONhcnarb_sa@,ecirp_mota@*ytq_mota@,ecirp_mota@,ytq_mota@,gf_ONmeti_sl@,etaDrepo_tda@,on_teehs_sa@( seulav               

)nam_redro,omem,on_tsucpus,di_repo,on_bd,on_snart,on_hcnarb,tma_teehs,ecirp,ytq_laer,on_meti,etad_repo,on_rehcuov(wolf_mi_t tresni               

nigeb             

42-70-6002 sjuw yb dedda-- 0 =! ytq_mota@ fi             

nigeb          

esle          

dne          

         

dne    	

rorreym otog 0 =! rorre@@ fi              

))31,1,ONmeti_sa@(gnirtsbus+'拆组',etar_yl_pus@,yaw_elas@,on_tsuc_sa@,'1001','-',on_snart_sa@,ONhcnarb_sa@,0,0,ytq_meti@*3mun_da@,gf_ONmeti_sl@,etaDrepo_tda@,on_teehs_sa@( seulav              

)omem,etar_yl_pus,yaw_elas,on_tsucpus,di_repo,on_bd,on_snart,on_hcnarb,tma_teehs,ecirp,ytq_laer,on_meti,etad_repo,on_rehcuov(wolf_mi_t tresni              

nigeb            

水流写量数送赠--  0=3mun_da@ ton fi            

            

dne            

rorreym otog 0 =! rorre@@ fi        	

)nam_redro@,)31,1,ONmeti_sa@(gnirtsbus+'拆组',etar_yl_pus@,yaw_elas@,on_tsuc_sa@,'1001','-',on_snart_sa@,ONhcnarb_sa@,ecirp_mota@*ytq_mota@,ecirp_mota@,ytq_mota@,gf_ONmeti_sl@,etaDrepo_tda@,on_teehs_sa@( seulav                

)nam_redro,omem,etar_yl_pus,yaw_elas,on_tsucpus,di_repo,on_bd,on_snart,on_hcnarb,tma_teehs,ecirp,ytq_laer,on_meti,etad_repo,on_rehcuov(wolf_mi_t tresni                

nigeb            

42-70-6002 sjuw yb dedda-- 0 =! ytq_mota@ fi            

nigeb          

销代率扣和营联-- )'F' = yaw_elas@ ro 'C' = yaw_elas@( fi          

          

            

gf_ONmeti_sl@ = on_meti erehw ofni_meti_db_t morf              

0=etar_yl_pus@,galf_pus_meti=yaw_elas@,tsucpus_niam = on_tsucpus@ tceles          

60-10-6002 sjuw yb deifidom--          

nigeb       

llun ton si gf_ONmeti_sl@ dna ''>< gf_ONmeti_sl@ fi       

货转动自--  '6'=ats_enibmoc.ofni_meti_db_t dna         

 on_meti@= on_meti.tilpsbmoc_meti_db_t dna         

 on_meti_bmoc.tilpsbmoc_meti_db_t=on_meti.ofni_meti_db_t erehw       

 ofni_meti_db_t,tilpsbmoc_meti_db_t morf )'',on_meti_bmoc(llunsi=gf_ONmeti_sl@ tceles       

''=gf_ONmeti_sl@ tceles       

品割分鲜生是品商分成--       

 		

tma_t@/ecirp_da@*ecirp@=ecirp_mota@ tceles      	

价单的中表MOB在品商合组 / 格价现品商合组 * 价单中表MOB在项子原 =         -- 			

 量数的中表MOB在项子原 / 格价现品商合组 * 例比额金中表MOB在项子原 = 价单子原-- 			

esle    	

										0=ecirp_mota@ tceles      	

0=tma_t@ fi    	

量数子原-- ytq_meti@ * ytq_laer_da@=ytq_mota@ tceles       

nigeb  

0=sutats_hctef@@ elihw  

ecirp@,ytq_meti@,on_meti@ otni mob_rucl hctef  

mob_rucl nepo  

  

on_meti.b=on_meti.a dna onmeti_sa@=on_meti_bmoc.a erehw    

b ofni_meti_db_t,a tilpsbmoc_meti_db_t morf    

)0,ecirp_elas.b(llunsi,)0,ytq_meti.a(llunsi,on_meti.a tceles  

rof rosruc mob_rucl eralced  

	

onmeti_sa@=on_meti erehw ofni_meti_db_t morf ats_enibmoc	=ats_enibmoc@ tceles  


ONhcnarb_sa@=on_hcnarb dna on_teehs_sa@=on_teehs erehw retsam_teehs_mw_t morf nam_redro= nam_redro@ tceles  

员务业取--  

dne  

nruter  	

'!核审做再后价调或义定改修请，零为计合额金价售的品商份成的中口窗品商合组在]'+)onmeti_sa@(mirtl+'[品商' tnirp  	  

nigeb  

份成义定有没--  llun si tma_t@ ro 0=tma_t@ fi  

dne  

nruter  	

'！核审做再后义定请，零为量数份成的品商份成的]'+)ONmeti_sa@(mirtl+'[品商' tnirp  	  

nigeb  

量数份成义定有没--  llun si ytq_nl@ ro 0=ytq_nl@ fi  

dne  

nruter  	

'！核审做再后义定请，品商份成义定有没的]'+)ONmeti_sa@(mirtl+'[品商' tnirp  	  

nigeb  

份成义定有没--  llun si ytq@ ro 0=ytq@ fi  

on_meti.b=on_meti.a dna onmeti_sa@=on_meti_bmoc.a erehw    

b ofni_meti_db_t,a tilpsbmoc_meti_db_t morf    

))0,ytq_meti.a(llunsi(mus=ytq_nl@,)on_meti.a(tnuoc=ytq@,))0,ecirp_elas.b(llunsi*)0,ytq_meti.a(llunsi(mus=tma_t@ tceles  

测检--  


员务业-- )01(rahcrav nam_redro@    

,)4,61(ciremun ytq_nl@    

,)02(rahcrav gf_ONmeti_sl@    

,)4,61(ciremun crPpmt_nl@    

,)1(rahc ats_enibmoc@    

,)4,61(ciremun etar_yl_pus@    

,)8(rahcrav    yaw_elas@    

,)01(rahcrav  on_tsucpus@    

数种品份成的品商合组 --    ,)4,61(ciremun ytq@    

额金计合份成品商合组 -- , )4,61(ciremun tma_t@    

价售子原 --   ,)4,61(ciremun ecirp_tsoc_mota@    

价售子原 --   ,)4,61(ciremun ecirp_mota@    

量数售销子原 --    ,)4,61(ciremun ytq_mota@    

介售 --   ,)4,61(ciremun ecirp@    

量数售销 --    ,)4,61(ciremun ytq_meti@    

码编品商 --        ,)02(rahc on_meti@    

 eralced

nigeb

sa

))6(rahc ONhcnarb_sa@,)4,61(ciremun ecirp_da@ ,)4,61(ciremun 3mun_da@,)4,61(ciremun ytq_laer_da@   

,)02(rahc ONmeti_sa@,emitetad etaDrepo_tda@,)4(rahc on_snart_sa@,)01(rahcrav on_tsuc_sa@,)02(rahc on_teehs_sa@(wolf_metibmoc_mw_rp erudecorp etaerc


og

wolf_metibmoc_mw_rp erudecorp pord  

)'wolf_metibmoc_mw_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_wm_get_item_price(MS).sql^^^^

dne


ecirPelas_nl@ = ecirp_laer@ tceles

     

值回返 -- 


ONmetI_sa@=on_meti erehw ofni_meti_db_t morf 8ecirp_esab=ecirPelas_nl@ tceles   

1价发批--'M'=epyt_ecirp@ fi


ONmetI_sa@=on_meti erehw ofni_meti_db_t morf 7ecirp_esab=ecirPelas_nl@ tceles   

1价发批--'L'=epyt_ecirp@ fi


ONmetI_sa@=on_meti erehw ofni_meti_db_t morf 6ecirp_esab=ecirPelas_nl@ tceles   

1价发批--'K'=epyt_ecirp@ fi


ONmetI_sa@=on_meti erehw ofni_meti_db_t morf 5ecirp_esab=ecirPelas_nl@ tceles   

1价发批--'J'=epyt_ecirp@ fi


ONmetI_sa@=on_meti erehw ofni_meti_db_t morf 4ecirp_esab=ecirPelas_nl@ tceles   

1价发批--'I'=epyt_ecirp@ fi


ONmetI_sa@=on_meti erehw ofni_meti_db_t morf 3ecirp_esab=ecirPelas_nl@ tceles   

1价发批--'H'=epyt_ecirp@ fi


ONmetI_sa@=on_meti erehw ofni_meti_db_t morf 2ecirp_esab=ecirPelas_nl@ tceles   

1价发批--'G'=epyt_ecirp@ fi


ONmetI_sa@=on_meti erehw ofni_meti_db_t morf 1ecirp_esab=ecirPelas_nl@ tceles   

1价发批--'F'=epyt_ecirp@ fi


ONmetI_sa@=on_meti erehw ofni_meti_db_t morf 5ecirp_piv=ecirPelas_nl@ tceles   

E	5价员会--'E'=epyt_ecirp@ fi


ONmetI_sa@=on_meti erehw ofni_meti_db_t morf 4ecirp_piv=ecirPelas_nl@ tceles   

D	4价员会--'D'=epyt_ecirp@ fi


ONmetI_sa@=on_meti erehw ofni_meti_db_t morf 3ecirp_piv=ecirPelas_nl@ tceles   

C	3价员会--'C'=epyt_ecirp@ fi


ONmetI_sa@=on_meti erehw ofni_meti_db_t morf 2ecirp_piv=ecirPelas_nl@ tceles   

B	2价员会--'A'=epyt_ecirp@ fi


ONmetI_sa@=on_meti erehw ofni_meti_db_t morf ecirp_piv=ecirPelas_nl@ tceles   

A	1价员会--'A'=epyt_ecirp@ fi


ONmetI_sa@=on_meti erehw ofni_meti_db_t morf ecirp_emehcs=ecirPelas_nl@ tceles   

9	价送配--'9'=epyt_ecirp@ fi


0=ecirPelas_nl@ tceles   

8	零为格价--'8'=epyt_ecirp@ fi


0=ecirPelas_nl@ tceles   

7	>>无<<--'7'=epyt_ecirp@ fi


ontsuc_sa@=on_tsucpus dna ONmetI_sa@=on_meti erehw meti_tsucpus_db_t morf ecirp_detnioppa=ecirPelas_nl@ tceles   

6	价售定约--'6'=epyt_ecirp@ fi


ontsuc_sa@=on_tsucpus dna ONmetI_sa@=on_meti erehw meti_tsucpus_db_t morf ecirp_tsal=ecirPelas_nl@ tceles   

5	价售近最--'5'=epyt_ecirp@ fi


tsucpus_niam@=on_tsucpus dna ONmetI_sa@=on_meti erehw meti_tsucpus_db_t morf ecirp_tsal=ecirPelas_nl@ tceles   

价货进近最--'4'=epyt_ecirp@ fi


on_hcnarb@ = on_hcnarb dna ONmetI_sa@=on_meti erehw kcots_hcnarb_mi_t morf tsoc_gva=ecirPelas_nl@ tceles   

价本成前当--'3'=epyt_ecirp@ fi


ONmetI_sa@=on_meti erehw ofni_meti_db_t morf ecirp_elas=ecirPelas_nl@ tceles   

价售零--'2'=epyt_ecirp@ fi


ONmetI_sa@=on_meti erehw ofni_meti_db_t morf ecirp_esab=ecirPelas_nl@ tceles   

价发批--'1'=epyt_ecirp@ fi


ONmetI_sa@=on_meti erehw ofni_meti_db_t morf ecirp=ecirPelas_nl@ tceles   

价货进--'0'=epyt_ecirp@ fi


ONmetI_sa@=on_meti erehw ofni_meti_db_t morf ecirp_esab=ecirPelas_nl@ tceles   

''=epyt_ecirp@ fi


ONmetI_sa@=on_meti erehw ofni_meti_db_t  morf tsucpus_niam= tsucpus_niam@ tceles

ontsuc_sa@=on_tsucpus dna 'C'=galf_tsucpus erehw ofni_tsucpus_db_t morf )'',level_cca(llunsi=epyt_ecirp@ tceles

'on_kcots_g'= di_rav_sys erehw metsys_sys_t morf eulav_rav_sys= on_hcnarb@ tceles


商应供主-- )6(rahcrav tsucpus_niam@    

库仓应对前当-- ,)6(rahcrav on_hcnarb@    

型类格价-- ,)1(rahcrav epyt_ecirp@    

 价售零 --      ,)4,61(lamiced ecirPelas_nl@    

 eralced  


nruter )ONmetI_sa@=on_meti erehw ofni_meti_db_t morf 1 tceles(stsixe ton fi  

00.0=ecirp_laer@ tceles  

断判性效有的码编 --

nigeb

sa

)tuptuo ) 4,61(lamiced ecirp_laer@,)02(rahcrav ONmetI_sa@ ,)6(rahcrav ontsuc_sa@(ecirp_meti_teg_mw_rp erudecorp etaerc


og

ecirp_meti_teg_mw_rp erudecorp pord  

)'ecirp_meti_teg_mw_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_wxsf_member_add_point(MS).sql^^^^

dne 

	

 TIMMOC	

di_drac@=]di_drac[ erehw		

 ofni_piv_mr_t morf		

 on_wolf@,sed_repo@,mun_cca@,tma_musnoc@,)02,on_wolf@(THGIR,etad_repo@,'1001','0','000',epyt_drac,on_drac,di_drac tceles		

)omem,sed_repo,mun_cca,tma_musnoc,on_wolf,etad_epo,di_repo,epyt_repo,on_hcnarb,epyt_drac,on_drac,di_drac( tsilcca_piv_mr_t otni tresni		

		

di_drac@=]di_drac[ erehw mun_cca@+)0,mun_cca(LLUNSI=mun_cca	--		

,mun_cca@+)0,mun_cca_won(LLUNSI=mun_cca_won tes ofni_piv_mr_t etadpu--		

	NOITCASNART NIGEB	

 no troba_tcax tes	

务事--	

 	

 	dne 	

nruter		

'足不分积','0' tceles		

nigeb 	

0<mun_cca@+mun_cca_won@ fi 	

di_drac@=]di_drac[ erehw ofni_piv_mr_t morf )0,mun_cca_won(llunsi=mun_cca_won@ tceles 	

分积余剩---- 	

 	

di_drac@=]di_drac[ erehw ofni_piv_mr_t morf )'',on_drac(LLUNSI=on_drac@ tceles 	

)4,61(ciremun mun_cca_won@ eralced 	

)05(rahcravn on_drac@ eralced 	

 	

		nruter		

)on_wolf@=omem erehw tsilcca_piv_mr_t morf 1 tceles(stsixe fi	

理处复重-- 

 .容内息消：列二第；功成1，败失 0：列一第；列两,序顺定固:容内回返的过通不证验    .证验足不分积加新，动活等分积费消上线合配了为-- 

.分积用已 mun_ced,分积计累 mun_cca,分积余剩 mun_cca_won-- 

nigeb 

sa 

) 

述描件事-- )0001(rahcravn sed_repo@

分积加增次本-- ,)2,81(ciremun mun_cca@

额金费消-- ,)2,81(ciremun tma_musnoc@

号票小--,)001(rahcravn on_wolf@

,emitetad etad_repo@

,)02(rahcravn di_drac@

(tniop_dda_rebmem_fsxw_rp corp etaerc


og

tniop_dda_rebmem_fsxw_rp erudecorp pord  

)'tniop_dda_rebmem_fsxw_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_wxsf_member_point_detail(MS).sql^^^^

dne 

dne@ dna trats@ neewteb munwor erehw elbaTataDgnigaPpmt# morf * tceles	

elbaTataDgnigaPpmt# morf )1(TNUOC=tnuoc_latot@ tceles	

csed etad_epo  yb redro t ) 		

  di_drac@=]di_drac[ erehw tsilcca_piv_mr_t morf		

  sed_repo,omem,mun_cca,tma_musnoc,on_wolf,etad_epo,di_repo,on_hcnarb,on_drac,di_drac   TCELES    

( morf elbaTataDgnigaPpmt# otni *.t,munwor sa )1,1, tni(ytitnedi tceles	

	

ezisegap@* xedniegap@ =dne@ tceles	


ezisegap@*)1-xedniegap@(=trats@ tceles		

 esle	

 1+)ezisegap@*)1-xedniegap@((=trats@ tceles		

 1>xedniegap@ fi	

 tni dne@ eralced	

tni trats@ eralced	

细明分积员会--	

nigeb 

sa 


) 

tuptuo tni tnuoc_latot@ 

条少多页每--		,tni ezisegap@ 

数页--	,tni xedniegap@ 

,)02(rahcravn di_drac@ 

(liated_tniop_rebmem_fsxw_rp corp etaerc 


og

liated_tniop_rebmem_fsxw_rp erudecorp pord  

)'liated_tniop_rebmem_fsxw_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_wxsf_member_point_query(MS).sql^^^^

dne 

di_drac@=]di_drac[ erehw	

 ofni_piv_mr_t morf	

  mun_ced,mun_cca,mun_cca_won sa )0,mun_ced(llunsi - mun_cca   TCELES    

分积减冲 分积总 分积前当 询查分积员会--	

nigeb 

sa 

))02(rahcrav di_drac@(yreuq_tniop_rebmem_fsxw_rp corp etaerc


og

yreuq_tniop_rebmem_fsxw_rp erudecorp pord  

)'yreuq_tniop_rebmem_fsxw_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_wxsf_member_save_detail(MS).sql^^^^

dne 

dne@ dna trats@ neewteb munwor erehw elbaTataDgnigaPpmt# morf * tceles	

elbaTataDgnigaPpmt# morf )1(TNUOC=tnuoc_latot@ tceles	

csed etad_epo  yb redro t ) 		

di_drac@=]di_drac[ erehw tsilevas_piv_mr_t morf		

  sed_repo,omem,mun_cca,tma_musnoc,on_wolf,etad_epo,di_repo,on_hcnarb,on_drac,di_drac   TCELES    

( morf elbaTataDgnigaPpmt# otni *.t,munwor sa )1,1, tni(ytitnedi tceles	

	

ezisegap@* xedniegap@ =dne@ tceles	


ezisegap@*)1-xedniegap@(=trats@ tceles		

 esle	

 1+)ezisegap@*)1-xedniegap@((=trats@ tceles		

 1>xedniegap@ fi	

 tni dne@ eralced	

tni trats@ eralced	

细明值储员会--	

nigeb 

sa 

) 

数行的总--  tuptuo tni tnuoc_latot@ 

行几页一--  ,tni ezisegap@ 

数页-- ,tni xedniegap@ 

,)02(rahcravn di_drac@ 

(liated_evas_rebmem_fsxw_rp corp etaerc


og

liated_evas_rebmem_fsxw_rp erudecorp pord  

)'liated_evas_rebmem_fsxw_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_xz_get_item_price(MS).sql^^^^


dne

nruter    


dne	

)ecirPelas_nl@,)02(rahcrav(trevnoc=nruter@ tceles			

esle		

)ecirPdrac_nl@,)02(rahcrav(trevnoc=nruter@ tceles			

ecirPelas_nl@<ecirPdrac_nl@ fi		

nigeb	

esle    

 dne	

)ecirPdrac_nl@,)02(rahcrav(trevnoc=nruter@ tceles			

esle		

)ecirPceps_nl@,)02(rahcrav(trevnoc=nruter@ tceles			

ecirPdrac_nl@<ecirPceps_nl@ fi		

nigeb	

 0>ecirPceps_nl@ fi    

值回返 --    

	

	

tnuocsid_nl@*ecirPdrac_nl@=ecirPdrac_nl@ tceles		

'2'=yaw_elas@ fi	

	

tnuocsid_nl@*ecirPelas_nl@=ecirPdrac_nl@ tceles		

'0'=yaw_elas@ fi	

	

ecirPelas_nl@ = ecirPdrac_nl@ tceles      

0 = ecirPdrac_nl@ ro llun si ecirPdrac_nl@ fi    

价售零=价卡员会，价卡员会有没 --    

	

	

5ecirPpiv_nl@ = ecirPdrac_nl@ tceles	

5 = epyt_ecirppiv_ia@ fi    


4ecirPpiv_nl@ = ecirPdrac_nl@ tceles	

4 = epyt_ecirppiv_ia@ fi    


3ecirPpiv_nl@ = ecirPdrac_nl@ tceles	

3 = epyt_ecirppiv_ia@ fi    


2ecirPpiv_nl@ = ecirPdrac_nl@ tceles	

2 = epyt_ecirppiv_ia@ fi    


ecirPpiv_nl@ = ecirPdrac_nl@ tceles	

1 = epyt_ecirppiv_ia@ fi    


ecirPelas_nl@ = ecirPceps_nl@ tceles      

0 = ecirPceps_nl@ ro llun si ecirPceps_nl@ fi    

价售零=价特，价特有没 --     

    

0 = ecirPdrac_nl@ tceles    

0 = ecirPceps_nl@ tceles    

....理处价卡员会,价特 --    

      


dne	

dne		

	ONmetI_sa@=on_meti dna )3,1,ONhcnarb_sa@(gnirtsbus=on_hcnarb erehw 			

ecirp_hcnarb_cp_t morf  			

5ecirp_piv=5ecirPpiv_nl@, 4ecirp_piv=4ecirPpiv_nl@		       		

, 3ecirp_piv=3ecirPpiv_nl@, 2ecirp_piv=2ecirPpiv_nl@		      		

,ecirp_piv = ecirPpiv_nl@ ,ecirp_elas = ecirPelas_nl@ tceles			

nigeb		

 )ONmetI_sa@=on_meti dna )3,1,ONhcnarb_sa@(gnirtsbus=on_hcnarb erehw ecirp_hcnarb_cp_t morf 1 tceles(stsixe fi		

nigeb	

eslE	

dne	

	ONmetI_sa@=on_meti dna ONhcnarb_sa@=on_hcnarb erehw 		

ecirp_hcnarb_cp_t morf  		

5ecirp_piv=5ecirPpiv_nl@, 4ecirp_piv=4ecirPpiv_nl@       		

, 3ecirp_piv=3ecirPpiv_nl@, 2ecirp_piv=2ecirPpiv_nl@       		

,ecirp_piv = ecirPpiv_nl@ ,ecirp_elas = ecirPelas_nl@ tceles		

nigeb	

 )ONmetI_sa@=on_meti dna ONhcnarb_sa@=on_hcnarb erehw ecirp_hcnarb_cp_t morf 1 tceles(stsixe fi	

	

ONmetI_sa@=on_meti erehw		

 ofni_meti_db_t morf		

5ecirp_piv=5ecirPpiv_nl@, 4ecirp_piv=4ecirPpiv_nl@		

, 3ecirp_piv=3ecirPpiv_nl@, 2ecirp_piv=2ecirPpiv_nl@		

,)0,mun_cca_piv(llunsi = mun_cca@,)'0',galf_cca_piv(llunsi = galf_cca@		

,ecirp_piv=ecirPpiv_nl@      , ats_enibmoc= bmoc_sl@		

,dnarb_meti = ONdnarb_sl@   ,ecirp_elas=ecirPelas_nl@		

,onslc_meti=ONssalC_sl@	,emanbus_meti=emaNbuS_sl@ tceles 	

息信本基的品商台前取获中)ofni_meti_db_t(从 -- 	

	

di_drac@ =di_drac.a dna di_epyt.b=epyt_drac.a erehw b epyt_piv_mr_t ,a ofni_piv_mr_t morf  tnuocsid=tnuocsid_nl@,yaw_elas.b=yaw_elas@,epyt_ecirp.b= epyt_ecirppiv_ia@ tceles    

型类格价卡员会到得--	


    

扣折价员会：2 价员会：1 扣折价售零:0 员会--			)2(rahc	yaw_elas@	

型类格价员会--		,tni epyt_ecirppiv_ia@    

5价卡员会 --       ,)4,61(lamiced 5ecirPpiv_nl@    

4价卡员会 --      ,)4,61(lamiced 4ecirPpiv_nl@    

3价卡员会 --      ,)4,61(lamiced 3ecirPpiv_nl@    

2价卡员会 --      ,)4,61(lamiced 2ecirPpiv_nl@    

值分积--,)4,61(lamiced   mun_cca@    

分积否是-- ,)1(rahc  galf_cca@    

号水流 --      ,)0,61(lamiced wolf_nl@    

   ）...生、拆、组（型类品商--				,	)1(rahc	bmoc_sl@    

,    emitetad won_tdl@    

 码编修维--            ,)03(rahcrav onpus_sl@    

址地修维--         ,)001(rahcrav rddapus_sl@    

话电修维--           ,)03(rahcrav letpus_sl@    

04.001/0.03/05.21 :tamrof，列价单品商送赠--          ,)003(rahcrav tmatfig_sl@    

4/2/01 :tamrof，列量数品商送赠--            ,)003(rahcrav ytqtfig_sl@    

300/200/100 :tamrof，列码编品商送赠--         ,)003(rahcrav metitfig_sl@    

量数售销价特的售销经已前当 --        ,)4,61(lamiced ytQdlos_nl@    

量数购限单客 --        ,)4,61(lamiced ytQelas_nl@    

率扣折 --        ,)2,6(lamiced tnuocsid_nl@    

价卡员会 --      ,)4,61(lamiced ecirPpiv_nl@    

价卡员会 --      ,)4,61(lamiced ecirPdrac_nl@    

价特台前 --      ,)4,61(lamiced ecirPceps_nl@    

,)4,61(lamiced ecirPpmt_nl@    

型类价特 --         ,)1(rahc epyTceps_sl@    

价售零 --      ,)4,61(lamiced ecirPelas_nl@    

码编牌品 --            ,)02(rahc ONdnarb_sl@    

码编别类 --            ,)02(rahc ONssalC_sl@    

称简 --    ,)02(rahcrav emaNbuS_sl@ eralced  


nruter )ONmetI_sa@=on_meti erehw ofni_meti_db_t morf 1 tceles(stsixe ton fi  

断判性效有的码编 --

nigeb

sa

)tuptuo  )02(rahcrav nruter@ ,)03(rahcrav di_drac@  ,)02(rahcrav ONmetI_sa@ ,)6(rahcrav ONhcnarb_sa@(ecirp_meti_teg_zx_rp erudecorp etaerc



og

ecirp_meti_teg_zx_rp erudecorp pord  

)'ecirp_meti_teg_zx_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$pr_xz_sheet_pay(MS).sql^^^^


dne

	

	

	 nruter	

物事交提-- noitcasnart  timmoc	

on_wolf@+'&'+ofni_sl@+'SSECCUS'=nruter@ tceles	

	

on_esnepxe@ = on_esnepxe erehw	

yaw_yap@=yaw_yap		

,'账结已'=sutats		

,)(etadteg=emit_dne tes	

ofni_esnepxe_mm_t etadpu	

功成款扣--	

	



dne	

dne			

	 nruter				

物事滚回-- noitcasnart  kcabllor				

'款付后值充到请款扣足不,'+)tma_gnivas@,)02(rahcrav(trevnoc+'：为额余卡值储'=nruter@ tceles				

nigeb			

esle		

dne			

)ey_tma_gnivas@,)03(rahcrav(trevnoc+'：额余后费消值储'+'&'+ofni_sl@=ofni_sl@ tceles				

额余回返--				

				

)on_esnepxe@,'款付澡洗',di_elas@,di_repo@,)(etadteg,yap_deen@,1,'BMR',di_drac@,on_drac@,di_drac@,'A','VAS',on_hcnarb@,tma_elas@,on_wolf@,yap_di_wolf@(seulav				

)on_rehcuov,omem,nam_elas,di_repo,etad_repo,tnuoma_yap,etar_nioc,on_nioc,on_piv,di_drac,on_drac,yaw_lles,yaw_yap,on_hcnarb,tnuoma_elas,on_wolf,di_wolf(wolfyap_mr_t otni tresni				

1 + yap_di_wolf@=yap_di_wolf@ tceles				

水流款付入插--				

	

di_drac@=di_drac erehw tma_laudiser@=tma_laudiser tes  ofni_piv_mr_t etadpu				

额余卡值储改修--				

				

)tma_laudiser@(tpyrcne_teg_f.obd=tma_laudiser@ tceles				

)00001*ey_tma_gnivas@,)03(rahcrav(trevnoc=tma_laudiser@ tceles				

密加--				

				

)'BMR',ey_tma_gnivas@,'款扣澡洗','费消卡值充',0,yap_deen@,on_wolf@,)(etadteg,di_repo@,'5',on_hcnarb@,epyt_drac@,on_drac@,di_drac@(seulav				

)yawyap,tma_laer,omem,sed_repo,mun_cca,tma_musnoc,on_wolf,etad_epo,di_repo,epyt_repo,on_hcnarb,epyt_drac,on_drac,di_drac(tsilevas_piv_mr_t otni tresni				

水流款付入插--				

yap_deen@ - tma_gnivas@=ey_tma_gnivas@ tceles				

款扣始开--				

nigeb			

 yap_deen@=>tma_gnivas@ fi		

nigeb	

0>yap_deen@  fi	

款扣卡值储--	

dne	

 dne			

0=yap_deen@ tceles				

了完付--				

)on_esnepxe@,'款付澡洗',di_elas@,di_repo@,)(etadteg,yap_deen@,1,'BMR',di_drac@,on_drac@,di_drac@,'A',yaw_yap@,on_hcnarb@,tma_elas@,on_wolf@,yap_di_wolf@(seulav					

)on_rehcuov,omem,nam_elas,di_repo,etad_repo,tnuoma_yap,etar_nioc,on_nioc,on_piv,di_drac,on_drac,yaw_lles,yaw_yap,on_hcnarb,tnuoma_elas,on_wolf,di_wolf(wolfyap_mr_t otni tresni				

1 + yap_di_wolf@=yap_di_wolf@ tceles				

nigeb			

'BFZ'=yaw_yap@ ro 'FXW'=yaw_yap@ ro 'DRC'=yaw_yap@ ro 'BMR'=yaw_yap@ fi		

nigeb	

0>yap_deen@  fi	

式方款付他其--	


dne	

)on_esnepxe@,'值储别类-款付澡洗',di_elas@,di_repo@,)(etadteg,yap_tma_gnivas_slc@,1,'BMR',di_drac@,on_drac@,di_drac@,'A','ASE',on_hcnarb@,tma_elas@,on_wolf@,yap_di_wolf@(seulav         					

)on_rehcuov,omem,nam_elas,di_repo,etad_repo,tnuoma_yap,etar_nioc,on_nioc,on_piv,di_drac,on_drac,yaw_lles,yaw_yap,on_hcnarb,tnuoma_elas,on_wolf,di_wolf(wolfyap_mr_t otni tresni			

1 + yap_di_wolf@=yap_di_wolf@ tceles		

nigeb	

 0>yap_tma_gnivas_slc@ fi	

水流款付入插，0于大计合款付值储别类果如--	

dne		

	 nruter			

物事滚回-- noitcasnart  kcabllor			

'算结再后目项点请，目项单点有没'=nruter@ tceles			

nigeb		

'0'=yapsi_rts@ fi	

	

  

liated_rucl etacollaed	  

liated_rucl esolc	  


dne	

liated_di_elas@,ecirp_elas@,etad_repo@,ytq_elas@,on_meti@ otni liated_rucl hctef		

环循个一下续继--		


dne			

)ytq_elas@ * ecirp_elas@( +yap_deen@=yap_deen@ tceles				

nigeb			

款付卡值储非--esle		

dne			

dne					

				)ytq_elas@ * ecirp_elas@( +yap_deen@=yap_deen@ tceles						

的款付卡值储要需计累功成款付有没个两面前--						

esle					

dne						

)))ytq_elas@ * ecirp_elas@(- tma_gnivas_slc@,)2,81(lamiced(trevnoC,)02(rahcrav(trevnoc+'：额余后费消'+eman_sl@+'：别类'+'&'+ofni_sl@=ofni_sl@ tceles							

onslc_meti@=onslc_meti erehw slc_meti_db_t morf )emanslc_meti(mirtr+':'+)onslc_meti(mirtr=eman_sl@ tceles							

额余回返--							

		

ytq_elas@ * ecirp_elas@ + yap_tma_gnivas_slc@=yap_tma_gnivas_slc@ tceles							

计合款付值储别类--							

				

onslc_meti@=onslc_meti dna di_drac@=di_drac erehw ytq_elas@ * ecirp_elas@+)0,tma_moc(llunsi =tma_moc tes rehto_vas_piv_mr_t etadpu							

值储别类扣--							

)))ytq_elas@ * ecirp_elas@(- tma_gnivas_slc@,)02(rahcrav(trevnoc+'：额余后款扣',on_wolf@,on_hcnarb@,'1001',)(etadteg,ytq_elas@ * ecirp_elas@,'-',onslc_meti@,'0',di_drac@(seulav    													

)omem,on_wolf,on_hcnarb,di_repo,etad_repo,tma_moc,on_bd,onslc_meti,epyt_vas,di_drac(gol_rehto_vas_piv_mr_t otni tresni							

水流款扣入插--							

nigeb						

 0>tma_gnivas_slc@ fi					

		

0=tma_gnivas_slc@ tceles						

esle					

0>)ytq_elas@ * ecirp_elas@ -tma_moc - tma_vas( dna etad_dne dna etad_nigeb neewteb )(etadteg dna onslc_meti@=onslc_meti dna di_drac@=di_drac erehw rehto_vas_piv_mr_t morf )tma_moc - tma_vas(=tma_gnivas_slc@ tceles						

0>wor_ll@ fi					

0>)ytq_elas@ * ecirp_elas@ -tma_moc - tma_vas( dna etad_dne dna etad_nigeb neewteb )(etadteg dna onslc_meti@=onslc_meti dna di_drac@=di_drac erehw rehto_vas_piv_mr_t morf )1(tnuoc=wor_ll@ tceles					

在存否是值储别类查检--					

on_meti@=on_meti erehw ofni_meti_db_t morf )2,onslc_meti(tfel=onslc_meti@ tceles					

款付值储别类--					

nigeb					

esle				

dne					

) )wor_ll@,)0,81(lamiced(trevnoC,)02(rahcrav(trevnoc+'：额余后费消'+eman_sl@+'：目项'+'&'+ofni_sl@=ofni_sl@ tceles						

on_meti@=on_meti erehw ofni_meti_db_t morf )eman_meti(mirtr+':'+)on_meti(mirtr=eman_sl@ tceles						

额余回返--						

						

on_meti@=on_meti dna di_drac@=di_drac erehw ytq_elas@+ytq_laer=ytq_laer tes ofni_piv_dnet_mr_t etadpu						

表值储目项改修--						

)'0',di_elas@,)(etadteg,'1001',ecirp_elas@*wor_ll@,ecirp_elas@,ytq_elas@,on_meti@,on_drac@,di_drac@,on_wolf@,on_hcnarb@(seulav 													

)galf_moc,nam_elas,etad_repo,di_repo,tma_niamer,ecirp_elas,ytq_laer,on_meti,on_drac,di_drac,on_wolf,on_hcnarb(liated_emusnoc_dnet_mr_t otni tresni						

水流值储扣值储目项入插--						

)on_esnepxe@,'值储目项-款付澡洗',di_elas@,di_repo@,)(etadteg,ytq_elas@ * ecirp_elas@,1,'BMR',di_drac@,on_drac@,di_drac@,'A','VAS',on_hcnarb@,tma_elas@,on_wolf@,yap_di_wolf@(seulav         								

)on_rehcuov,omem,nam_elas,di_repo,etad_repo,tnuoma_yap,etar_nioc,on_nioc,on_piv,di_drac,on_drac,yaw_lles,yaw_yap,on_hcnarb,tnuoma_elas,on_wolf,di_wolf(wolfyap_mr_t otni tresni						

1 + yap_di_wolf@=yap_di_wolf@ tceles						

水流款付入插先--						

ytq_elas@ - wor_ll@=wor_ll@ tceles						

数次的后减扣掉减--						

nigeb					

ytq_elas@=>wor_ll@ dna 0>wor_ll@ fi				

		

0=wor_ll@ tceles					

esle				

dne					

0=wor_ll@ tceles							

llun= wor_ll@ fi						

0>)ytq_laer - ytq_timil( dna on_meti@=on_meti dna di_drac@=di_drac erehw ofni_piv_dnet_mr_t morf )ytq_laer - ytq_timil(=wor_ll@ tceles						

nigeb					

0>wor_ll@ fi				

0>)ytq_laer - ytq_timil( dna on_meti@=on_meti dna di_drac@=di_drac erehw ofni_piv_dnet_mr_t morf )1(tnuoc=wor_ll@ tceles				

款付测监值储目项--				

nigeb			

'VAS'=yaw_yap@ fi		

里这行进才候时的款付卡员会是--		

		

)0,0,0,0,0,0,1,'0',0.0,etad_repo@,liated_di_elas@,di_repo@,'A',ytq_elas@ * ecirp_elas@,ytq_elas@,ecirp_elas@,ecirp_elas@,on_meti@,on_hcnarb@,on_wolf@,di_wolf@(seulav		

)etar_ytud_elas,etar_elas,etar_dnarb,etar_sslc,etar_ced,mun_cca,di_orp,galf_moc,on_tfihs,etad_repo,nam_elas,di_repo,yaw_lles,yenom_elas,ytnq_elas,ecirp_elas,ecirp_ecruos,on_meti,on_hcnarb,on_wolf,di_wolf(wolfelas_mr_t otni tresni		

		

di_elas@=liated_di_elas@ tceles			

''=)'',liated_di_elas@(llunsi fi		

1+ di_wolf@=di_wolf@ tceles		


'1'=yapsi_rts@ tceles		

志标据数有置设--		

nigeb	  

0=sutats_hctef@@ elihw	  

liated_di_elas@,ecirp_elas@,etad_repo@,ytq_elas@,on_meti@ otni liated_rucl hctef	

liated_rucl nepo	

'认确已'=sutats dna on_esnepxe@ = on_esnepxe  erehw )kcolon(htiw liated_esnepxe_mm_t morf di_elas,ecirp,emit_trats,mun_meti,on_meti tceles	 rof rosruc liated_rucl eralced	


物事启开-- noitcasnart nigeb	

水流售销品商成生--	


'认确已'=sutats dna on_esnepxe@ = on_esnepxe  erehw )kcolon(htiw liated_esnepxe_mm_t morf )ecirp * mun_meti(mus=tma_elas@ tceles	

额金售销的总到得--	

	

 )tma_laudiser@(yrcsed_teg_f.obd=tma_gnivas@ tceles	

di_drac@=di_drac erehw ofni_piv_mr_t morf epyt_drac=epyt_drac@,on_drac=on_drac@,tma_laudiser=tma_laudiser@ tceles	

息信额余到得,息信值储员会询查--	


onwolf_lebal otog		

 0>wor_ll@ fi	

on_wolf@=on_wolf erehw wolfelas_mr_t morf )1(tnuoc=wor_ll@ tceles	

复重否是号票小测检--	

	

dne		

)4,)pmet@+00001,)5(rahcrav(trevnoc(thgir +)211,)(etadteg,)8(rahcrav(trevnoc+di_sop@=on_wolf@ tceles			

1+))4,on_wolf@(thgir,)0,61(lamiced(trevnoc=pmet@  tceles			

:onwolf_lebal			

nigeb		

esle	

dne		

'1000'+)211,)(etadteg,)8(rahcrav(trevnoc+di_sop@=on_wolf@ tceles			

nigeb		

 ''=))'',on_wolf@(llunsi(mirtl fi	


	

on_wolf@  = )11,on_wolf(tfel erehw )kcolon(htiw wolfelas_mr_t morf )on_wolf(xam=on_wolf@  tceles	

	

	)211,)(etadteg,)8(rahcrav(trevnoc+di_sop@=on_wolf@ tceles	

号单前当到得先首--	


'1001'=di_repo@ tceles		

''=)'',di_repo@(llunsi fi	

'账结已'><sutats dna on_esnepxe@ = on_esnepxe erehw )kcolon(htiw ofni_esnepxe_mm_t morf di_elas=di_elas@,di_repo=di_repo@,)on_hcnarb(mirtr=on_hcnarb@,)di_sop(mirtr=di_sop@,di_drac=di_drac@ tceles	


dne		

 nruter			

'号单此无者或，款付经已号单该'=nruter@ tceles			

nigeb		

0=wor_ll@ fi	

'账结已'><sutats dna on_esnepxe@ = on_esnepxe erehw )kcolon(htiw ofni_esnepxe_mm_t morf)1(tnuoc=wor_ll@ tceles	

算结要需子单有否是断判--	

	

''=ofni_sl@ tceles	

0=yap_tma_gnivas_slc@ tceles	

0=tma_gnivas_slc@ tceles	

0=wor_ll@ tceles	

'0'=yapsi_rts@ tceles	

0=yap_di_wolf@ tceles	

0=di_wolf@ tceles	

0=yap_deen@ tceles	

值化始初--	

	

'11531281407102' = on_esnepxe@ tceles--			

	)001(rahcrav nruter@--			

号单--		,)02(rahcrav on_esnepxe@--			

额余值储别类、值储目项、卡值储回返--			)005(rahcrav	ofni_sl@			

字名值回返--			,)001(rahcrav	eman_sl@			

计合款付卡值储别类--  ,)4,61(ciremun		yap_tma_gnivas_slc@			

额余卡值储别类--  ,)4,61(ciremun		tma_gnivas_slc@			

,tni		tnuoc_ll@			

,tni			wor_ll@			

理处不则否理处才据数有，据数有否是--		,)1(rahc		yapsi_rts@			

额金的款付卡值储要需--	,)4,61(ciremun		yap_deen@			

额余款完扣,型字数额余卡值储--  ,)4,61(ciremun		ey_tma_gnivas@			

型字数额余卡值储--  ,)4,61(ciremun		tma_gnivas@			

额余卡值储--	,)02(rahcrav	tma_laudiser@			

di师技应对细明--		,)4(rahc	liated_di_elas@			

,emitetad	etad_repo@			

额金总价售--		,)4,61(ciremun	 tma_elas@			

价售--		,)4,61(ciremun ecirp_elas@			

量数售销--		,)4,61(ciremun	ytq_elas@			

,)02(rahc	onslc_meti@			

,)02(rahc	on_meti@			

di师技--			,)4(rahc	di_elas@			

di员作操--			,)4(rahc	di_repo@			

款付号序顺水流--			,tni		yap_di_wolf@			

品商号序顺水流--			,tni		di_wolf@			

,tni		pmet@			

,)02(rahcrav	 on_wolf@			

,)02(rahcrav	epyt_drac@			

,)02(rahcrav	on_drac@			

,)02(rahcrav	 di_drac@			

,)01(rahcrav	 on_hcnarb@			

,)01(rahcrav	 di_sop@ eralced	


 nigeb

账结款付澡洗--

sa

)

值回返--		tuptuo )005(rahcrav nruter@	

式方款付--			,)02(rahcrav yaw_yap@	

号单--		,)02(rahcrav on_esnepxe@	

(yap_teehs_zx_rp erudecorp etaerc


og

yap_teehs_zx_rp erudecorp pord  

)'yap_teehs_zx_rp'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$t_rm_tend_vip_type(MS).sql^^^^

dne

meti_sni etacollaed  

meti_sni esolc  

dne  

stnemmoc@,ecirp_elas@,on_meti@,di_epyt@ otni meti_sni hctef    

      

)on_meti.ofni_meti_db_t = on_meti.a dna di_drac.ofni_piv_mr_t=di_drac.a erehw a ofni_piv_dnet_mr_t morf 1 tceles(stsixe ton          

dna on_meti@=on_meti          

dna '0'=sutats_drac.ofni_piv_mr_t          

dna di_epyt@=epyt_drac.ofni_piv_mr_t erehw    

 ofni_meti_db_t,ofni_piv_mr_t morf    

stnemmoc@,0,ecirp_elas,0,0,on_meti,on_drac,di_drac tceles        

)stnemmoc,tma_timil,ecirp_elas,ytq_laer,ytq_timil,on_meti,on_drac,di_drac(ofni_piv_dnet_mr_t otni tresni    

nigeb  

0=sutats_hctef@@ elihw  

stnemmoc@,ecirp_elas@,on_meti@,di_epyt@ otni meti_sni hctef  

meti_sni nepo  

detresni morf stnemmoc,ecirp_elas,on_meti,di_epyt tceles          

 rof rosruc meti_sni eralced  

dne  

meti_led etacollaed    

meti_led esolc    

dne    

stnemmoc@,ecirp_elas@,on_meti@,di_epyt@ otni meti_led hctef      

      

di_drac.ofni_piv_mr_t = di_drac.ofni_piv_dnet_mr_t      

dna di_epyt@=epyt_drac.ofni_piv_mr_t      

dna 0 = )0,ytq_timil(llunsi      

dna on_meti@=on_meti erehw      

ofni_piv_mr_t morf ofni_piv_dnet_mr_t  eteled      

nigeb    

0=sutats_hctef@@ elihw    

stnemmoc@,ecirp_elas@,on_meti@,di_epyt@ otni meti_led hctef    

meti_led nepo    

deteled morf stnemmoc,ecirp_elas,on_meti,di_epyt tceles          

 rof rosruc meti_led eralced    

nigeb  

目项费消卡员会下其除删时同，目项费消别类员会除删--  '1'=galf_led_si@ fi  

'metidrac_led_piv'=di_rav_sys erehw metsys_sys_t morf )'0',eulav_rav_sys(llunsi=galf_led_si@ tceles  


)1(rahc  galf_led_si@          

,)04(rahcrav     stnemmoc@          

,)4,61(ciremun   ecirp_elas@          

,)02(rahcrav      on_meti@          

,)2(rahc      di_epyt@ eralced  

nigeb

sa

 etadpu,eteled,tresni rof

epyt_piv_dnet_mr_t no epyt_piv_dnet_mr_rt reggirt etaerc


og

epyt_piv_dnet_mr_rt reggirt pord  

)'epyt_piv_dnet_mr_rt'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$t_rm_vip_savelist_insert(MS).sql^^^^

dne


)'0',epyt_repo_sl@,tma_musnoc_nl@,didrac_sl@,on_hcnarb_sl@,'4'(seulav )galf_dnes,epyt_repo,tma_tsilevas,di_drac,on_hcnarb,epyt_ssem(egassem_piv_t_ssem otni tresni	


信短送发不分部值充，值储转分积--  nruter '6' = epyt_repo_sl@ fi	


nruter '1' >< )1,eulav_rav_sl@(tfel fi	

nruter '' = )'',eulav_rav_sl@(llunsi ro 0 = )eulav_rav_sl@(nel fi	


'on_hcnarb_g' = di_rav_sys erehw metsys_sys_t morf eulav_rav_sys = on_hcnarb_sl@ tceles--	

值构机--	


dne	

;)))'yap_dracevas'(MIRTR(MIRTL(reppU = )))di_rav_sys(MIRTR(MIRTL(reppU EREHW metsys_sys_t_ssem MORF  eulav_rav_sys = eulav_rav_sl@ TCELES		

nigeb	

'5' = epyt_repo_sl@ fi	

dne	

;)))'evas_drac'(MIRTR(MIRTL(reppU = )))di_rav_sys(MIRTR(MIRTL(reppU EREHW metsys_sys_t_ssem MORF  eulav_rav_sys = eulav_rav_sl@ TCELES		

nigeb	

'4' = epyt_repo_sl@ fi	


    	

 dne	

dne		


didrac_sl@ = di_drac erehw etad_epo@ = tsal_etadelas tes ofni_piv_mr_t etadpu				

 )tsal_etadelas@ > etad_epo@ ro llun si tsal_etadelas@( fI			

据数的传上网断除排时同，新更不时小期日tsal_etadelas@比期日当--			

			

didrac_sl@ = di_drac erehw etad_epo@ = eerht_etadelas tes ofni_piv_mr_t etadpu				

llun si eerht_etadelas@  fi esle			

didrac_sl@ = di_drac erehw etad_epo@ = owt_etadelas tes ofni_piv_mr_t etadpu				

llun si owt_etadelas@  fi esle			

didrac_sl@ = di_drac erehw etad_epo@ = eno_etadelas tes ofni_piv_mr_t etadpu				

次一新更只且，新更才过新更有没-- llun si eno_etadelas@ fi			

			

didrac_sl@ = di_drac erehw			

ofni_piv_mr_t morf			

tsal_etadelas = tsal_etadelas@,eerht_etadelas = eerht_etadelas@				

,owt_etadelas = owt_etadelas@,eno_etadelas = eno_etadelas@ tceles			

nigeb		

)llun si tnuoc_ter@ ro 1 >< tnuoc_ter@( fi		

didrac_sl@ = di_drac dna on_wolf@ = on_wolf erehw tsilcca_piv_mr_t morf 1 = tnuoc_ter@ tceles		

了新更会不就录记的同相号单有tsilcca_piv_mr_t果如断判--		

nigeb	

40904102 pwnehc 作操才型类的费消-- '5' = epyt_repo_sl@ fI	

	

detresni morf	

etad_epo = etad_epo@		

,on_wolf = on_wolf@		

,on_hcnarb=on_hcnarb_sl@		

,epyt_repo=epyt_repo_sl@		

,tma_musnoc=tma_musnoc_nl@		

,di_drac=didrac_sl@	 tceles	

据数前当 --	


emitetad tsal_etadelas@		

,emitetad eerht_etadelas@		

,emitetad owt_etadelas@		

费消次一第--,emitetad eno_etadelas@		

,tni tnuoc_ter@		

间时作操-- ,emitetad etad_epo@		

号单--,)02(rahcrav on_wolf@		

,)01(rahcrav on_hcnarb_g@		

,)01(rahcrav on_hcnarb_sl@		

,)552(rahc eulav_rav_sl@		

,)1(rahc epyt_repo_sl@		

额金值充 --  ,)4,61(ciremun tma_musnoc_nl@		

号卡员会 --       ,)02(rahc didrac_sl@ eralced	


nigeb

sa

tresni rof

tsilevas_piv_mr_t no tresni_tsilevas_piv_mr_t reggirt etaerc


og

tresni_tsilevas_piv_mr_t reggirt pord  

)'tresni_tsilevas_piv_mr_t'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$tr_bd_d_item_info(MS).sql^^^^

dne


ruc_meti_eteled etacollaed	

ruc_meti_eteled esolc	

dne	  

on_meti@ otni ruc_meti_eteled hctef		


on_meti@ = on_meti erehw ecirp_hcnarb_cp_t morf eteled--		

.息信的中表格价构机除删--		

		

on_meti@ = on_meti erehw meti_tsucpus_db_t morf eteled		


)llun ,)(etadteg ,on_meti@ ,'D' ,'ofni_meti_db_t'( seulav			

)on_hcnarb ,etad_etadpu ,1yek ,epyt_egnahc ,elbat_moc( atad_mc_sys_t otni tresni		

nigeb	

0=sutats_hctef@@ elihw	

on_meti@ otni ruc_meti_eteled hctef	

ruc_meti_eteled nepo	

ylno daer rof deteled morf on_meti tceles		

rof rosruc ruc_meti_eteled eralced	

)02(rahcrav on_meti@ eralced	


nruter '1' = )'detubirtsid_si'=)di_rav_sys(rewol erehw metsys_sys_t morf eulav_rav_sys tceles( ton fi  --  

回返则是不果如，版式部分是否是查检--	

nigeb

sa

eteled rof

 ofni_meti_db_t no ofni_meti_d_db_rt reggirt etaerc


og

ofni_meti_d_db_rt reggirt pord  

)'ofni_meti_d_db_rt'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$tr_bd_i_item_info(MS).sql^^^^

dne


)on_meti.a = on_meti.c dna on_hcnarb.b = on_hcnarb.c erehw c ecirp_hcnarb_cp_t morf 1 tceles( stsixe ton   dna       	

)'3','2'( ni ytreporp.b erehw       	

 b ofni_hcnarb_db_t  ,a detresni morf               

'0','111111111',5ecirp_piv.a,4ecirp_piv.a          	

,3ecirp_piv.a,2ecirp_piv.a,ecirp_emehcs.a,ecirp_piv.a,ecirp_elas.a,ecirp_esab.a,ecirp.a,on_meti.a, on_hcnarb.b tceles   	

)galf_elas,tsil_ecirp,5ecirp_piv,4ecirp_piv          	

,3ecirp_piv,2ecirp_piv,ecirp_emehcs,ecirp_piv,ecirp_elas,ecirp_esab ,ecirp,on_meti,on_hcnarb( ecirp_hcnarb_cp_t tresni   	

'1'=)'detubirtsid_si'=)di_rav_sys(rewol erehw metsys_sys_t morf eulav_rav_sys tceles(fi        

03800102  JSgnaT 表格价构机写才部总--        

02509002 zmgnahz yb dda 表格价构机入写--	

	

ruc_meti_tresni etacollaed	

ruc_meti_tresni esolc	

dne	

tsucpus_niam@,on_meti@ otni ruc_meti_tresni hctef		


)tsucpus_niam@,on_meti@( seulav    			

)on_tsucpus,on_meti( meti_tsucpus_db_t tresni     		

)tsucpus_niam@ = on_tsucpus dna on_meti@ = on_meti erehw meti_tsucpus_db_t morf on_meti tceles( stsixe ton fi                

		

)llun ,)(etadteg ,on_meti@ ,'I' ,'ofni_meti_db_t'( seulav			

)on_hcnarb ,etad_etadpu ,1yek ,epyt_egnahc ,elbat_moc( atad_mc_sys_t otni tresni		


)on_hcnarb@ ,on_meti@( seulav )on_hcnarb,on_meti( kcots_hcnarb_mi_t tresni	--		

)on_meti@ = on_meti dna on_hcnarb@ = on_hcnarb erehw kcots_hcnarb_mi_t morf on_meti tceles(stsixe ton fi--		

.表存库入插不时加增品新 21017002lqc --       

nigeb	

0=sutats_hctef@@ elihw	

tsucpus_niam@,on_meti@ otni ruc_meti_tresni hctef	

ruc_meti_tresni nepo	

ylno daer rof		

detresni morf tsucpus_niam,on_meti  tceles		

rof rosruc ruc_meti_tresni eralced	

入插--	

	

'100' + on_hcnarb@ = on_hcnarb@ tceles	

'on_hcnarb_g'=di_rav_sys erehw metsys_sys_t morf eulav_rav_sys=on_hcnarb@ tceles	

库仓的认默统系--	

	

)01(rahcrav on_hcnarb@,)01(rahcrav yaw_selas@,)02(rahcrav tsucpus_niam@,)02(rahcrav on_meti@ eralced	

量变明声--	

   

nruter )'3','1'( ni )'detubirtsid_si'=)di_rav_sys(rewol erehw metsys_sys_t morf eulav_rav_sys tceles( ton fi   

回返则是不果如，处事办司公分或部总的式部分是否是查检--	

nigeb

sa

tresni rof

 ofni_meti_db_t no ofni_meti_i_db_rt reggirt etaerc


og

ofni_meti_i_db_rt reggirt pord  

)'ofni_meti_i_db_rt'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$tr_bd_item_barcode_d(MS).sql^^^^

 dne

deteled morf )(etadteg,edocrab_meti,'D' tceles    

)etad_etadpu,edocrab_meti,epyt_egnahc(tniopkaerb_edocrab_meti_db_t otni tresni	

nigeb

sa

 eteled rof

 edocrab_meti_db_t no d_edocrab_meti_db_rt reggirt etaerc



og

d_edocrab_meti_db_rt reggirt pord  

)'d_edocrab_meti_db_rt'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$tr_bd_item_barcode_i(MS).sql^^^^

dne

detresni morf )(etadteg,edocrab_meti,'I' tceles    

)etad_etadpu,edocrab_meti,epyt_egnahc(tniopkaerb_edocrab_meti_db_t otni tresni	

nigeb

sa

 tresni rof

 edocrab_meti_db_t no i_edocrab_meti_db_rt reggirt etaerc


og

i_edocrab_meti_db_rt reggirt pord  

)'i_edocrab_meti_db_rt'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$tr_bd_item_barcode_u(MS).sql^^^^

dne

detresni morf )(etadteg,edocrab_meti,'I' tceles    

)etad_etadpu,edocrab_meti,epyt_egnahc(tniopkaerb_edocrab_meti_db_t otni tresni	


deteled morf )(etadteg,edocrab_meti,'D' tceles    

)etad_etadpu,edocrab_meti,epyt_egnahc(tniopkaerb_edocrab_meti_db_t otni tresni	

nigeb

sa

 etadpu rof

 edocrab_meti_db_t no u_edocrab_meti_db_rt reggirt etaerc


og

u_edocrab_meti_db_rt reggirt pord  

)'u_edocrab_meti_db_rt'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$tr_bd_item_info_d(MS).sql^^^^


 dne


	


deteled morf )(etadteg,on_meti,'D' tceles    

)etad_etadpu,on_meti,epyt_egnahc(tniopkaerb_ofni_meti_db_t otni tresni	

	


nigeb

sa

 eteled rof

 ofni_meti_db_t no d_ofni_meti_db_rt reggirt etaerc



og

d_ofni_meti_db_rt reggirt pord  

)'d_ofni_meti_db_rt'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$tr_bd_item_info_i(MS).sql^^^^


 dne

detresni morf )(etadteg,on_meti,'I' tceles    

)etad_etadpu,on_meti,epyt_egnahc(tniopkaerb_ofni_meti_db_t otni tresni	


on_meti.tniopkaerb_ofni_meti_db_t=on_meti.detresni erehw	

detresni,tniopkaerb_ofni_meti_db_t morf	

tniopkaerb_ofni_meti_db_t   eteled	

nigeb

sa

 tresni rof

 ofni_meti_db_t no i_ofni_meti_db_rt reggirt etaerc



og

i_ofni_meti_db_rt reggirt pord  

)'i_ofni_meti_db_rt'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$tr_bd_item_info_u(MS).sql^^^^

 dne

detresni morf )(etadteg,on_meti,'I' tceles    

)etad_etadpu,on_meti,epyt_egnahc(tniopkaerb_ofni_meti_db_t otni tresni	


deteled morf )(etadteg,on_meti,'D' tceles    

)etad_etadpu,on_meti,epyt_egnahc(tniopkaerb_ofni_meti_db_t otni tresni	

nigeb

sa

 etadpu rof

 ofni_meti_db_t no u_ofni_meti_db_rt reggirt etaerc



og

u_ofni_meti_db_rt reggirt pord  

)'u_ofni_meti_db_rt'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$tr_bd_u_item_info(MS).sql^^^^

dne

dne		

ruc_meti_tresni etacollaed			

ruc_meti_tresni esolc			

dne			

tsucpus_niam@,on_meti@ otni ruc_meti_tresni hctef				

dne				

)tsucpus_niam@,on_meti@( seulav					

 )on_tsucpus,on_meti( meti_tsucpus_db_t tresni					

'S'=galf_tsucpus dna tsucpus_niam@ = on_tsucpus erehw ofni_tsucpus_db_t morf yaw_elas = yaw_selas@ tceles					

nigeb				

0 > )tsucpus_niam@(nel fi				

)tsucpus_niam@ = on_tsucpus dna on_meti@ = on_meti erehw meti_tsucpus_db_t morf on_meti tceles( stsixe ton fi				

nigeb			

0=sutats_hctef@@ elihw			

tsucpus_niam@,on_meti@ otni ruc_meti_tresni hctef			

ruc_meti_tresni nepo			

ylno daer rof detresni morf tsucpus_niam,on_meti tceles  rof rosruc ruc_meti_tresni eralced			

nigeb		

)tsucpus_niam(etadpu fi	

)01(rahcrav yaw_selas@,)02(rahcrav tsucpus_niam@ eralced	

	

ruc_meti_tresni etacollaed	

ruc_meti_tresni esolc	

dne		

			

on_meti@ otni ruc_meti_tresni hctef			

)llun ,)(etadteg ,on_meti@ ,'I' ,'ofni_meti_db_t'( seulav				

)on_hcnarb ,etad_etadpu ,1yek ,epyt_egnahc ,elbat_moc( atad_mc_sys_t otni tresni			

nigeb		

0=sutats_hctef@@ elihw	

on_meti@ otni ruc_meti_tresni hctef	

ruc_meti_tresni nepo	

ylno daer rof detresni morf on_meti  tceles  rof rosruc ruc_meti_tresni eralced	

入插--	

    

dne		

ruc_meti_eteled etacollaed    		

ruc_meti_eteled esolc    		

dne    		

on_meti@ otni ruc_meti_eteled hctef        		

		

)llun ,)(etadteg ,on_meti@ ,'D' ,'ofni_meti_db_t'( seulav				

)on_hcnarb ,etad_etadpu ,1yek ,epyt_egnahc ,elbat_moc( atad_mc_sys_t otni tresni			

动改成完部分在能不码编原凭仅则否,效有码编品商改对--			

nigeb    		

0=sutats_hctef@@ elihw    		

on_meti@ otni ruc_meti_eteled hctef    		

		

ruc_meti_eteled nepo    		

ylno daer rof deteled morf on_meti tceles rof rosruc ruc_meti_eteled eralced    		

除删--    		

nigeb		

)on_meti(etadpu fi	

用使时码编新更于限仅 --	


dne		

ruc_meti_etadpu etacollaed			

ruc_meti_etadpu esolc			

dne				

galf_elas@,5ecirp_piv@,4ecirp_piv@,3ecirp_piv@,2ecirp_piv@,ecirp_emehcs@,ecirp_piv@,ecirp_elas@,ecirp_esab@,ecirp@,on_meti@ otni ruc_meti_etadpu hctef					

)'2' = ytreporp dna '5' = epyt_edart erehw ofni_hcnarb_db_t morf on_hcnarb tceles( ni on_hcnarb dna on_meti@ = on_meti erehw					

galf_elas@ = galf_elas,5ecirp_piv@ = 5ecirp_piv,4ecirp_piv@ = 4ecirp_piv,3ecirp_piv@ = 3ecirp_piv,2ecirp_piv@ = 2ecirp_piv    					

,ecirp_emehcs@ = ecirp_emehcs,ecirp_piv@ = ecirp_piv,ecirp_elas@ = ecirp_elas,ecirp_esab@ = ecirp_esab,ecirp@ = ecirp tes					

 ecirp_hcnarb_cp_t etadpu					

nigeb				

0 = sutats_hctef@@ elihw			

galf_elas@,5ecirp_piv@,4ecirp_piv@,3ecirp_piv@,2ecirp_piv@,ecirp_emehcs@,ecirp_piv@,ecirp_elas@,ecirp_esab@,ecirp@,on_meti@ otni ruc_meti_etadpu hctef			

ruc_meti_etadpu nepo			

ylno daer rof detresni morf galf_elas,5ecirp_piv,4ecirp_piv,3ecirp_piv,2ecirp_piv,ecirp_emehcs,ecirp_piv,ecirp_elas,ecirp_esab,ecirp,on_meti tceles rof rosruc ruc_meti_etadpu eralced			

nigeb		

)galf_elas(etadpu ro )5ecirp_piv(etadpu ro )4ecirp_piv(etadpu ro )3ecirp_piv(etadpu ro )2ecirp_piv(etadpu ro)ecirp_emehcs(etadpu ro )ecirp_piv(etadpu ro )ecirp_elas(etadpu ro )ecirp_esab(etadpu ro )ecirp(etadpu fi	

.息信表格价构机部总改更-----	


dne		

 dne			 

dne			

di_repo_etadpu etacollaed  			

di_repo_etadpu esolc  			

	 	  			

dips@@ = dips erehw sessecorpsys.obd.retsam morf        				

'价改单价调非,志日库据数台后','案档品商',noitpircsed@,emantsoh,)4,1,)emanigol(mirtr(gnirtsbus,)(etadteg tceles  				

)omem,on_snart,noitpircsed,eman_retupmoc ,di_repo ,etad_repo( gol_rotarepo_sys_t tresni  				

理处法方来原按员作操到取有没--  			

esle  			

                                dips@@ = dips erehw sessecorpsys.obd.retsam morf        				

'价改单价调非,志日库据数台后','案档品商',on_meti@+'：品商 '+noitpircsed@,emantsoh,di_repo_yfidom@,)(etadteg tceles   				

)omem,on_snart,noitpircsed,eman_retupmoc ,di_repo ,etad_repo( gol_rotarepo_sys_t tresni                                   

                         

''><di_repo_yfidom@  dna 0= sutats_hctef@@ fi                          

''=di_repo_yfidom@ tceles                             

 ''=di_repo_yfidom@ ro llun si di_repo_yfidom@ fi  			

di_repo_yfidom@,on_meti@ otni di_repo_etadpu hctef  			

di_repo_etadpu nepo  			 

ylno daer rof detresni morf di_repo_yfidom,on_meti tceles rof rosruc di_repo_etadpu eralced                          

码编品商和员作操录记，时息信格价的品商改更当lqnehc--                          


nigeb 			

'1'= )'goLrepO_droceR'=di_rav_sys erehw metsys_sys_t morf eulav_rav_sys tceles( fi                         

志日录记否是断判lqnehc--                         

)1-)noitpircsed@(nel,1,noitpircsed@(gnirtsbus=noitpircsed@ tceles  			

'/5价员会改'+noitpircsed@=noitpircsed@ tceles  )5ecirp_piv(etadpu fi  			

'/4价员会改'+noitpircsed@=noitpircsed@ tceles  )4ecirp_piv(etadpu fi  			

'/3价员会改'+noitpircsed@=noitpircsed@ tceles  )3ecirp_piv(etadpu fi  			

'/2价员会改'+noitpircsed@=noitpircsed@ tceles  )2ecirp_piv(etadpu fi  			

'/1价员会改'+noitpircsed@=noitpircsed@ tceles  )ecirp_piv(etadpu fi  			

'/价售零改'+noitpircsed@=noitpircsed@ tceles )ecirp_elas(etadpu fi  			

'/价发批改'+noitpircsed@=noitpircsed@ tceles )ecirp_esab(etadpu fi  			

'/价货进改'=noitpircsed@ tceles )ecirp(etadpu fi  			

''=noitpircsed@ tceles  			

)69(rahcrav noitpircsed@ eralced  			

nigeb			

))5ecirp_piv(etadpu ro )4ecirp_piv(etadpu ro )3ecirp_piv(etadpu ro )2ecirp_piv(etadpu    			

 ro )ecirp_piv(etadpu ro )ecirp_elas(etadpu ro )ecirp_esab(etadpu ro )ecirp(etadpu( fi			

20.20.7002 csgnauH yfidoM,志日写,价改单价调非--			

nigeb		

esle	

 dne		

nruter ))ecirp_piv(etadpu ro )ecirp_elas(etadpu ro )ecirp_esab(etadpu ro )ecirp(etadpu( fi			

决解单价调传下过通价变--		

nigeb		

 '1' = )'ecirp_egnahc_ib'=)di_rav_sys(rewol erehw metsys_sys_t morf eulav_rav_sys tceles( fi	

价改单价调用是还价改中案档在否是--	

	

nruter '1' = )'detubirtsid_si'=)di_rav_sys(rewol erehw metsys_sys_t morf eulav_rav_sys tceles( ton fi   -- 

回返则是不果如，部总版式部分是否是查检--	

)4(rahc di_repo_yfidom@,)1(rahc galf_elas@,)4,61(ciremun 5ecirp_piv@,)4,61(ciremun 4ecirp_piv@,)4,61(ciremun 3ecirp_piv@,)4,61(ciremun 2ecirp_piv@		

,)4,61(ciremun ecirp_emehcs@,)4,61(ciremun ecirp_piv@,)4,61(ciremun ecirp_elas@,)4,61(ciremun ecirp_esab@,)4,61(ciremun ecirp@,)02(rahcrav on_meti@ eralced	

nigeb

sa

etadpu rof

 ofni_meti_db_t no ofni_meti_u_db_rt reggirt etaerc


og

ofni_meti_u_db_rt reggirt pord  

)'ofni_meti_u_db_rt'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$tr_cm_i_branch(MS).sql^^^^

 dne

wolf_hcnarb etacollaed  

dne  

ytreporp@,on_hcnarb@ otni wolf_hcnarb hctef      


)on_meti.b = on_meti.c dna on_hcnarb.a = on_hcnarb.c erehw c ecirp_hcnarb_cp_t morf 1 tceles( stsixe ton   dna    	

)'3','2'( ni ytreporp.a erehw    	

 b ofni_meti_db_t  ,a detresni morf            

'0','111111111',5ecirp_piv.b,4ecirp_piv.b       	

,3ecirp_piv.b,2ecirp_piv.b,ecirp_emehcs.b,ecirp_piv.b,ecirp_elas.b,ecirp_esab.b,ecirp.b,on_meti.b, on_hcnarb.a tceles	

)galf_elas,tsil_ecirp,5ecirp_piv,4ecirp_piv       	

,3ecirp_piv,2ecirp_piv,ecirp_emehcs,ecirp_piv,ecirp_elas,ecirp_esab ,ecirp,on_meti,on_hcnarb( ecirp_hcnarb_cp_t tresni      

02509002 zmgnahz yb dda 表格价构机入写--      


dne      

nruter        

wolf_hcnarb etacollaed        

nigeb      

 0 =! rorre@@ fi      


)'0','kcots',on_hcnarb@(seulav        

)degnahc_si ,elbat_moc ,on_hcnarb(tniopkaerb_mc_sys_t OTNI TRESNI      

)点断留保,传重部全可(存库--      

 

)'','musyad_rehsac_mr_t',on_hcnarb@(seulav        

)etad_kb ,elbat_moc ,on_hcnarb(tniopkaerb_mc_sys_t OTNI TRESNI      

)'0','wolfyap_mr_t',on_hcnarb@(seulav        

)degnahc_si ,elbat_moc ,on_hcnarb(tniopkaerb_mc_sys_t OTNI TRESNI      

)'0','wolfelas_mr_t',on_hcnarb@(seulav        

)degnahc_si ,elbat_moc ,on_hcnarb(tniopkaerb_mc_sys_t OTNI TRESNI      

)'0','musyad_mr_t',on_hcnarb@(seulav        

)degnahc_si ,elbat_moc ,on_hcnarb(tniopkaerb_mc_sys_t OTNI TRESNI      

)'0','musyad_tfihs_mr_t',on_hcnarb@(seulav        

)degnahc_si ,elbat_moc ,on_hcnarb(tniopkaerb_mc_sys_t OTNI TRESNI      

)点断个几这留保,虑考能性易交时实,传上时随于出(据数结日--      

---------------------------------------------------------------  	  

传上--  	  

      


)0,'ofni_gsmliam',on_hcnarb@(seulav        

)wolf_kb ,elbat_moc ,on_hcnarb(tniopkaerb_mc_sys_t OTNI TRESNI      

件邮--      

        

)'','SP',on_hcnarb@(seulav        

)onteehs_kb ,elbat_moc ,on_hcnarb(tniopkaerb_mc_sys_t OTNI TRESNI      

)'','XP',on_hcnarb@(seulav        

)onteehs_kb ,elbat_moc ,on_hcnarb(tniopkaerb_mc_sys_t OTNI TRESNI      

价调--      

据单务业--      


)0,'atad_mc_sys_t',on_hcnarb@(seulav        

)wolf_kb ,elbat_moc ,on_hcnarb(tniopkaerb_mc_sys_t OTNI TRESNI      

ecirp & piv & meti  表志日，料资本基--      

       

       

)'0','tnuocsid_piv_mr_t',on_hcnarb@(seulav        

)degnahc_si ,elbat_moc ,on_hcnarb(tniopkaerb_mc_sys_t OTNI TRESNI       

)'0','tes_piv_mr_t',on_hcnarb@(seulav        

)degnahc_si ,elbat_moc ,on_hcnarb(tniopkaerb_mc_sys_t OTNI TRESNI       

)'0','retnuoc_mr_t',on_hcnarb@(seulav        

)degnahc_si ,elbat_moc ,on_hcnarb(tniopkaerb_mc_sys_t OTNI TRESNI       

)'0','epyt_piv_mr_t',on_hcnarb@(seulav        

)degnahc_si ,elbat_moc ,on_hcnarb(tniopkaerb_mc_sys_t OTNI TRESNI       

)'0','ofni_tcartnoc_mt_t',on_hcnarb@(seulav        

)degnahc_si ,elbat_moc ,on_hcnarb(tniopkaerb_mc_sys_t OTNI TRESNI       


)'0','ofni_tcartnocyl_db_t',on_hcnarb@(seulav        

)degnahc_si ,elbat_moc ,on_hcnarb(tniopkaerb_mc_sys_t OTNI TRESNI       

)'0','ofni_tcartnoc_db_t',on_hcnarb@(seulav        

)degnahc_si ,elbat_moc ,on_hcnarb(tniopkaerb_mc_sys_t OTNI TRESNI       

)'0','ofni_ecalp_db_t',on_hcnarb@(seulav        

)degnahc_si ,elbat_moc ,on_hcnarb(tniopkaerb_mc_sys_t OTNI TRESNI       

)'0','tilpsbmoc_meti_db_t',on_hcnarb@(seulav        

)degnahc_si ,elbat_moc ,on_hcnarb(tniopkaerb_mc_sys_t OTNI TRESNI      

)'0','tped_meti_mr_t',on_hcnarb@(seulav        

)degnahc_si ,elbat_moc ,on_hcnarb(tniopkaerb_mc_sys_t OTNI TRESNI      

)'0','ofni_tnemyap_db_t',on_hcnarb@(seulav        

)degnahc_si ,elbat_moc ,on_hcnarb(tniopkaerb_mc_sys_t OTNI TRESNI      

)'0','ofni_tsucpus_db_t',on_hcnarb@(seulav        

)degnahc_si ,elbat_moc ,on_hcnarb(tniopkaerb_mc_sys_t OTNI TRESNI      

)'0','ofni_tped_db_t',on_hcnarb@(seulav        

)degnahc_si ,elbat_moc ,on_hcnarb(tniopkaerb_mc_sys_t OTNI TRESNI      

)'0','ofni_noitats_db_t',on_hcnarb@(seulav        

)degnahc_si ,elbat_moc ,on_hcnarb(tniopkaerb_mc_sys_t OTNI TRESNI      

)'0','edoc_esab_db_t',on_hcnarb@(seulav        

)degnahc_si ,elbat_moc ,on_hcnarb(tniopkaerb_mc_sys_t OTNI TRESNI      

)'0','slc_meti_db_t',on_hcnarb@(seulav        

)degnahc_si ,elbat_moc ,on_hcnarb(tniopkaerb_mc_sys_t OTNI TRESNI      

)'0','ofni_hcnarb_db_t',on_hcnarb@(seulav        

)degnahc_si ,elbat_moc ,on_hcnarb(tniopkaerb_mc_sys_t OTNI TRESNI      

)分>-总(输传表整，料资本基--  	  

---------------------------------------------------------------  	  

传下--  	  

点断讯通加增--      

nigeb  

0=sutats_hctef@@ elihw  

ytreporp@,on_hcnarb@ otni wolf_hcnarb hctef  

wolf_hcnarb nepo  

)'8' = epyt_edart ro '7' = epyt_edart( ro '1'=ytreporp ro '0' =ytreporp erehw detresni morf ytreporp,on_hcnarb tceles    

rof rosruc wolf_hcnarb eralced  

加增--

nruter '1' = )'detubirtsid_si'=)di_rav_sys(rewol erehw metsys_sys_t morf eulav_rav_sys tceles( ton fi  


)1(rahc     ytreporp@    

,)6(rahc    on_hcnarb@    

     ERALCED  

nigeb

sa

 tresni rof

  ofni_hcnarb_db_t no hcnarb_i_mc_rt reggirt etaerc


og

hcnarb_i_mc_rt reggirt pord  

)'hcnarb_i_mc_rt'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$tr_im_branch_stock(MS).sql^^^^



 dne


hcnarb_ruc etacollaed	

hcnarb_ruc esolc	

dne		

tsoc_gva@,on_meti@,on_hcnarb@ otni hcnarb_ruc hctef			

:1lebal			

			

			etad_nigeb@=>etad_repo dna 0<ytq_elttes dna on_meti@=on_meti dna on_hcnarb@=on_hcnarb erehw			

ytq_elttes*tsoc_gva@ = tma_elttes				

,tsoc_gva@*)ytq_dnes_sop + ytq_ter_sop + ytq_sop +ytq_os( - )tma_os+tma_ter_sop + tma_sop( = tma_tiforp_gva				

,tsoc_gva@*)ytq_dnes_sop + ytq_ter_sop + ytq_sop +ytq_os( = tma_tsoc_gva				

,ytq_tini * tsoc_gva@ = tma_tini				

,tsoc_gva@=ecirp_tsoc tes			

musyad_cxj_ad_t etadpu			

				

1lebal  otog				

 0=wor@ fi			

etad_nigeb@=>etad_repo dna 0<ytq_elttes dna on_meti@=on_meti dna on_hcnarb@=on_hcnarb erehw musyad_cxj_ad_t morf )1(tnuoc=wor@ tceles			

			

0=>ytq_tini dna on_meti@=on_meti dna on_hcnarb@=on_hcnarb  erehw musyad_cxj_ad_t morf )etad_repo(xam=etad_nigeb@ tceles			

			

nigeb    	

0 = sutats_hctef@@ elihw    	

tsoc_gva@,on_meti@,on_hcnarb@ otni hcnarb_ruc hctef		

hcnarb_ruc nepo		

		

0>ytq_kcots erehw  detresni morf tsoc_gva,on_meti, on_hcnarb tceles		

rof rosruc  hcnarb_ruc  eralced	

	

nruter		

 '1'><tsoc_retupmocer_ip@ fi	

'tsoc_retupmocer_ip'= di_rav_sys erehw metsys_sys_t morf eulav_rav_sys=tsoc_retupmocer_ip@ tceles	

回返利毛的存库负算计新重置设有没--	


dne	

	

1hcnarb_ruc etacollaed		

1hcnarb_ruc esolc		

dne			

tsoc_gva@,ytq_kcots@,on_meti@,on_hcnarb@ otni 1hcnarb_ruc hctef				

				

))(etadteg,tsoc_gva@,ytq_kcots@,on_meti@,on_hcnarb@(seulav yortsih_kcots_hcnarb_mi_t otni tresni				

nigeb	    		

0 = sutats_hctef@@ elihw    		

tsoc_gva@,ytq_kcots@,on_meti@,on_hcnarb@ otni 1hcnarb_ruc hctef		

1hcnarb_ruc nepo		

		

ylno daer rof  detresni morf tsoc_gva,ytq_kcots,on_meti, on_hcnarb tceles		

rof rosruc  1hcnarb_ruc  eralced		

nigeb	

 '1'=evas_gnahc_kcots@ fi	

'evas_gnahc_kcots'= di_rav_sys erehw metsys_sys_t morf eulav_rav_sys=evas_gnahc_kcots@ tceles	

存库的候时动变次每录记--	

化变存库录记-- )01(rahcrav evas_gnahc_kcots@ eralced	

emitetad etad_nigeb@ eralced	

tni wor@ eralced	

)01(rahcrav on_hcnarb@ eralced	

)4,61(lamiced tsoc_gva@ eralced	

)4,61(lamiced ytq_kcots@ eralced	

)03(rahcrav on_meti@ eralced	

)01(rahcrav tsoc_retupmocer_ip@ eralced	  

nigeb

sa

 etadpu,tresni rof

kcots_hcnarb_mi_t no kcots_hcnarb_mi_rt reggirt etaerc


og

kcots_hcnarb_mi_rt reggirt pord  

)'kcots_hcnarb_mi_rt'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$tr_im_cs_approve(MS).sql^^^^


dne

nruter  

1_ruc_ci etacollaed  

1_ruc_ci esolc  

:rorreym


nruter  

1_ruc_ci etacollaed  

1_ruc_ci esolc  

dne  

etad_dilav_tilps@,etad_dilav_bmoc@,ecirp@,ytq@,on_meti@,ecirp_bmoc@,ytq_bmoc@,onmeti_bmoc@        

,galf_sc@,nam_mrifnoc@,di_repo@,etad_krow@,etad_repo@        

,galf_evorppa@,on_hcnarb@,on_bd@,on_snart@,on_teehs@        

otni 1_ruc_ci hctef    


dne    

rorreym otog 0 =! rorre@@ fi      

)etad_dilav_tilps@ ,ytq@ + ytq_kcots@,di_repo@,'A','laiceps','+',on_snart@,llun,on_hcnarb@          

,ecirp@*ytq@,ecirp@,ecirp@,ytq@,on_meti@,etad_krow@,on_teehs@(seulav        

)etad_dilav,ytnq_erp ,di_repo,yaw_elas,on_tsucpus,on_bd,on_snart,on_hcnarb_d,on_hcnarb          

,tma_teehs,ecirp_tsoc,ecirp,ytq_laer,on_meti ,etad_repo,on_rehcuov(wolf_mi_t otni tresnI      


0 = ytq_kcots@ tceles   	

 llun si ytq_kcots@ fi        

on_hcnarb@ = on_hcnarb dna on_meti@ = on_meti erehw kcots_hcnarb_mi_t morf ytq_kcots = ytq_kcots@ tceles        

0 = ytq_kcots@ tceles        

水流库入品商子原写--      

dne      

'1'=ko_etirW@ tceles        

rorreym otog 0 =! rorre@@ fi        

)llun ,ytq_bmoc@ - ytq_kcots@,di_repo@,'A','laiceps','-',on_snart@,llun,on_hcnarb@            

,ecirp_bmoc@*ytq_bmoc@,ecirp_bmoc@,ecirp_bmoc@,ytq_bmoc@,onmeti_bmoc@,etad_krow@,on_teehs@(seulav          

)etad_dilav,ytnq_erp ,di_repo,yaw_elas,on_tsucpus,on_bd,on_snart,on_hcnarb_d,on_hcnarb            

,tma_teehs,ecirp_tsoc,ecirp,ytq_laer,on_meti ,etad_repo,on_rehcuov(wolf_mi_t otni tresnI	


水流库出品商合复写--        

	

0 = ytq_kcots@ tceles   	

 llun si ytq_kcots@ fi	

on_hcnarb@ = on_hcnarb dna onmeti_bmoc@ = on_meti erehw kcots_hcnarb_mi_t morf ytq_kcots = ytq_kcots@ tceles	

0 = ytq_kcots@ tceles	

nigeb      

'0'=ko_etirW@ fi      

nigeb    

分拆-- '-'=on_bd@ fi esle    

dne    

rorreym otog 0 =! rorre@@ fi      

)llun , ytq@ - ytq_kcots@,di_repo@,'A','laiceps','-',on_snart@,llun,on_hcnarb@          

,ecirp@*ytq@,ecirp@,ecirp@,ytq@,on_meti@,etad_krow@,on_teehs@(seulav        

)etad_dilav,ytnq_erp ,di_repo,yaw_elas,on_tsucpus,on_bd,on_snart,on_hcnarb_d,on_hcnarb          

,tma_teehs,ecirp_tsoc,ecirp,ytq_laer,on_meti ,etad_repo,on_rehcuov(wolf_mi_t otni tresnI      

0 = ytq_kcots@ tceles 	

 llun si ytq_kcots@ fi      

on_hcnarb@ = on_hcnarb dna on_meti@ = on_meti erehw kcots_hcnarb_mi_t morf ytq_kcots = ytq_kcots@ tceles      

0 = ytq_kcots@ tceles      

水流库出品商子原写--      

dne      

'1'=ko_etirW@ tceles        

rorreym otog 0 =! rorre@@ fi        

)etad_dilav_bmoc@ ,ytq_bmoc@ + ytq_kcots@,di_repo@,'A','laiceps','+',on_snart@,llun,on_hcnarb@            

,ecirp_bmoc@*ytq_bmoc@,ecirp_bmoc@,ecirp_bmoc@,ytq_bmoc@,onmeti_bmoc@,etad_krow@,on_teehs@(seulav          

)etad_dilav,ytnq_erp ,di_repo,yaw_elas,on_tsucpus,on_bd,on_snart,on_hcnarb_d,on_hcnarb            

,tma_teehs,ecirp_tsoc,ecirp,ytq_laer,on_meti ,etad_repo,on_rehcuov(wolf_mi_t otni tresnI        

水流库入品商合复写--        


0 = ytq_kcots@ tceles   	

 llun si ytq_kcots@ fi	

on_hcnarb@ = on_hcnarb dna onmeti_bmoc@ = on_meti erehw kcots_hcnarb_mi_t morf ytq_kcots = ytq_kcots@ tceles	

0 = ytq_kcots@ tceles	

nigeb      

'0'=ko_etirW@ fi      

nigeb    

合组-- '+'=on_bd@ fi    

nigeb  

0=sutats_hctef@@ elihw  

etad_dilav_tilps@,etad_dilav_bmoc@,ecirp@,ytq@,on_meti@,ecirp_bmoc@,ytq_bmoc@,onmeti_bmoc@        

,galf_sc@,nam_mrifnoc@,di_repo@,etad_krow@,etad_repo@        

,galf_evorppa@,on_hcnarb@,on_bd@,on_snart@,on_teehs@        

otni 1_ruc_ci hctef  

1_ruc_ci nepo  

0 >< ytq.a  dna )'1' = galf_evorppa.a( dna      

) on_teehs.b = on_teehs.a ( erehw    

b liated_tilps_bmoc_mi_t ,a detresni morf    

etad_dilav.b,etad_dilav.a,ecirp.b,ytq.b,on_meti.b,ecirp.a,ytq.a,on_meti.a        

,galf_sc.a,nam_mrifnoc.a,di_repo.a,etad_krow.a,etad_repo.a        

,galf_evorppa.a,on_hcnarb.a,on_bd.a,on_snart.a,on_teehs.a tceles    

rof rosruc 1_ruc_ci eralced  


'0'=ko_etirW@ tceles    


)1(rahc       ko_etirW@    

		,)4,61(ciremun      ytq_kcots@    

,)4,61(ciremun          ecirp@    

量数--,   )4,61(ciremun            ytq@    

码代品货--,        )02(rahc        on_meti@    

,)4(rahc    nam_mrifnoc@    

,)4(rahc        di_repo@    

期效有品商库入分拆--,   emitetad      etad_dilav_tilps@    

期效有品商库入合组--,   emitetad       etad_dilav_bmoc@    

期日核审--,   emitetad      etad_krow@    

期日作操--,   emitetad      etad_repo@    

核审-1，核审未-0--  志标批审--,      )1(rahc   galf_evorppa@    

式方作操存库--,         )2(rahc       on_snart@    

式方库入出--,      )1(rahc        galf_sc@    

式方库入出--,      )1(rahc          on_bd@    

--,   )4,61(ciremun     ecirp_bmoc@    

量数--,   )4,61(ciremun       ytq_bmoc@    

码代品货--,        )02(rahc    onmeti_bmoc@    

码代店本--,        )6(rahc      on_hcnarb@    

号单作工--, )81(rahc       on_teehs@    

eralced  


nruter )galf_evorppa(etadpu ton fi  

nigeb

sa

etadpu rof

retsam_tilps_bmoc_mi_t no evorppa_sc_mi_rt reggirt etaerc


og

evorppa_sc_mi_rt reggirt pord  

)'evorppa_sc_mi_rt'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$tr_im_sheet_master(MS).sql^^^^


dne

nruter  

1_ruc_ci etacollaed  

1_ruc_ci esolc  

:rorreym




dne     

	

  	

rorreym otog 0 =! rorre@@ fi		

)'B',)3,rav_on_hcnarb_d@(tfel,etad_yap@,'A',rav_on_hcnarb@,'0',rav_etad_repo@,'A',0,tma_latot@,rav_on_snart@ ,rav_on_teehs@ ,1(seulav	  	

)epyt_cca,on_hcnarb,etad_cca,yaw_yap,on_tsucpus,galf_elttes,etad_repo,yaw_elas,tma_xat,tma_dluohs,on_snart,on_rehcuov,epyt_yap(wolf_yapcer_mf_t otni tresni		

	

)'1'=eulav_rav dna) )3,rav_on_hcnarb@(tfel=on_hcnarb ro )3,rav_on_hcnarb_d@(tfel=on_hcnarb( dna 'galf_cca_u'=di_rav erehw tes_hcnarb_sys_t morf eulav_rav  tceles( stsixe fi 	

nigeb      

 'OM'=rav_on_snart@ fi    


dne     

	

  	

rorreym otog 0 =! rorre@@ fi		

)'B',)3,rav_on_hcnarb@(tfel,rav_etad_repo@,'A',rav_on_hcnarb_d@,'0',rav_etad_repo@,'A',0,tma_latot@*1-,rav_on_snart@ ,rav_on_teehs@ ,1(seulav	  	

)epyt_cca,on_hcnarb,etad_cca,yaw_yap,on_tsucpus,galf_elttes,etad_repo,yaw_elas,tma_xat,tma_dluohs,on_snart,on_rehcuov,epyt_yap(wolf_yapcer_mf_t otni tresni		

	

)'1'=eulav_rav dna) )3,rav_on_hcnarb@(tfel=on_hcnarb ro )3,rav_on_hcnarb_d@(tfel=on_hcnarb( dna 'galf_cca_u'=di_rav erehw tes_hcnarb_sys_t morf eulav_rav  tceles( stsixe fi 	

nigeb     

 'IM' = rav_on_snart@ fi    

 款帐生产出调入调:司公分:91-30-7002 ygnaw yb dda-- 

dne     

	

rorreym otog 0 =! rorre@@ fi	  


dne     	

rorreym otog 0 =! rorre@@ fi		

)'B',rav_on_hcnarb_d@,rav_etad_repo@,'A',rav_on_hcnarb@,'0',rav_etad_repo@,'A',0,tma_latot@,rav_on_snart@ ,rav_on_teehs@ ,1(seulav	  	

)epyt_cca,on_hcnarb,etad_cca,yaw_yap,on_tsucpus,galf_elttes,etad_repo,yaw_elas,tma_xat,tma_dluohs,on_snart,on_rehcuov,epyt_yap(wolf_yapcer_mf_t otni tresni		

nigeb     	

'8' = ot_epyt_hcnarb@ ro '8' = epyt_hcnarb@ ro '4' = ot_epyt_hcnarb@  ro '4' = epyt_hcnarb@ fi   	


)3,rav_on_hcnarb_d@(tfel = rav_on_hcnarb_d@ tceles	    	

 '5' = ot_epyt_hcnarb@ fi   	

)3,rav_on_hcnarb@(tfel = rav_on_hcnarb@ tceles	    	

 '

5' = epyt_hcnarb@ fi   	


rav_on_hcnarb_d@ = on_hcnarb erehw ofni_hcnarb_db_t morf epyt_edart = ot_epyt_hcnarb@ tceles   	

rav_on_hcnarb@ = on_hcnarb erehw ofni_hcnarb_db_t morf epyt_edart = epyt_hcnarb@ tceles   	


nigeb     

 'OD'=rav_on_snart@ fi    


dne     

	

dne     	

rorreym otog 0 =! rorre@@ fi		

)'B',rav_on_hcnarb@,etad_yap@,'A',rav_on_hcnarb_d@,'0',rav_etad_repo@,'A',0,tma_latot@*1-,rav_on_snart@ ,rav_on_teehs@ ,1(seulav	  	

)epyt_cca,on_hcnarb,etad_cca,yaw_yap,on_tsucpus,galf_elttes,etad_repo,yaw_elas,tma_xat,tma_dluohs,on_snart,on_rehcuov,epyt_yap(wolf_yapcer_mf_t otni tresni		

nigeb     	

'8' = ot_epyt_hcnarb@ ro '8' = epyt_hcnarb@ ro '4' = ot_epyt_hcnarb@ ro '4' = epyt_hcnarb@ fi   	 

		

)3,rav_on_hcnarb@(tfel = rav_on_hcnarb@ tceles	    	

 '5' = ot_epyt_hcnarb@ fi   	

)3,rav_on_hcnarb_d@(tfel = rav_on_hcnarb_d@ tceles	    	

 '5' = epyt_hcnarb@ fi   	


rav_on_hcnarb@ = on_hcnarb erehw ofni_hcnarb_db_t morf epyt_edart = ot_epyt_hcnarb@ tceles   	

rav_on_hcnarb_d@ = on_hcnarb erehw ofni_hcnarb_db_t morf epyt_edart = epyt_hcnarb@ tceles   	


nigeb     

 'ID' = rav_on_snart@ fi    

款帐生产-- 



dne  

ecirp_elas@,xat@,tma_bus@        

,ecirp_dilav@,ecirp_igro@,ytq_laer@,ytq_redro@,on_meti@        

,galf_tcca@,galf_snart@        

,nam_mrifnoc@,di_repo@ ,nam_redro@,etad_krow@,etad_repo@        

,galf_evorppa@,etad_yap@ ,yaw_yap@        

,on_nioc@,on_tsucpus@,on_rehcuov@        

,on_hcnarb_d@,on_hcnarb@,on_bd@,on_snart@,on_teehs@        

otni 1_ruc_ci hctef    


ecirp_dilav@*ytq_laer@+tma_latot@=tma_latot@ tceles      

'OM'=on_snart@ ro 'IM'=on_snart@ ro 'OD'=on_snart@ ro 'ID'=on_snart@ fi    

 


dne     

dne 	

rorreym otog 0 =! rorre@@ fi		

	

on_teehs@ = on_teehs erehw '1' = galf_ni tes retsam_teehs_mi_t etadpu		

esle	

on_teehs@ = on_teehs erehw '2' = galf_ni tes retsam_teehs_mi_t etadpu		

)3,on_hcnarb_d@(tfel = )3,on_hcnarb@(tfel  dna	

)on_hcnarb_d@=on_hcnarb dna '5'=epyt_edart erehw ofni_hcnarb_db_t  morf 1 tceles( stsixe   dna )on_hcnarb@=on_hcnarb dna '5'=epyt_edart erehw ofni_hcnarb_db_t  morf 1 tceles( stsixe fi	

51-30-7002 入调已为态状改修接直,库仓一同是果如,单OD ygnaw yb dda--	

rorreym otog 0 =! rorre@@ fi        	

)etad_yap@,on_rehcuov@,etad_dilav@ ,ytq_kcots@			

,di_repo@,on_hcnarb@,'-',on_snart@,on_hcnarb@,on_hcnarb_d@        		

,ecirp_dilav@*ytq_laer@,ecirp_elas@,ecirp_tsoc@,ecirp_dilav@,ytq_laer@,on_meti@,etad_krow@,on_teehs@(seulav  		

)etad_cca,omem,etad_dilav,ytnq_erp    		

,di_repo,on_tsucpus,on_bd,on_snart,on_hcnarb_d,on_hcnarb,tma_teehs    		

,ecirp_elas,ecirp_tsoc,ecirp,ytq_laer,on_meti ,etad_repo,on_rehcuov(wolf_mi_t otni tresnI        	

)的目(水流写--		

/*      

ytq_kcots@/)ecirp_dilav@*ytq_laer@ - yenom_kcots@( = ecirp_tsoc@ tceles   	   	

'1' = ecirp_egnahc_bl@ fi		

价前当取价本成处此，取时入插的表wolf_mi_t在为改已价本成取*/  		

ecirp_dilav@ = ecirp_tsoc@ tceles		

		

ytq_laer@ - ytq_kcots@ = ytq_kcots@ tceles		

ytq_laer@ - = ytq_laer@ tceles		

nigeb 	

51 = )on_teehs@(nel dna )'6' = epyt_hcnarb@ ro '5' = epyt_hcnarb@ ( fi	


on_hcnarb_d@ = on_hcnarb erehw ofni_hcnarb_db_t morf epyt_edart = epyt_hcnarb@ tceles	


on_meti@ = on_meti erehw ofni_meti_db_t morf ecirp = ecirp_tsoc@ tceles		

 llun si ecirp_tsoc@ fi	    


0 = ytq_kcots@ tceles	        

 llun si ytq_kcots@ fi	    


rorreym otog 0 =! rorre@@ fi	    

on_meti@ = on_meti dna on_hcnarb_d@= on_hcnarb erehw	    

 kcots_hcnarb_mi_t morf tsoc_gva = ecirp_tsoc@,ytq_kcots = ytq_kcots@ tceles	    

llun = ecirp_tsoc@ tceles	    

llun = yenom_kcots@ tceles	    

llun = ytq_kcots@ tceles	

价本成和量数存库得获--	


nigeb     

'OD' = on_snart@  fi    

    

dne     

	

dne	

rorreym otog 0 =! rorre@@ fi		

	

on_teehs@ = on_teehs erehw '1' = galf_ni tes retsam_teehs_mi_t etadpu		


rorreym otog 0 =! rorre@@ fi	      	

	

)etad_yap@,on_rehcuov@,etad_dilav@ ,ytq_kcots@			

,di_repo@,on_hcnarb@,'+',on_snart@,on_hcnarb@,on_hcnarb_d@        		

,ecirp_dilav@*ytq_laer@,ecirp_elas@,ecirp_tsoc@,ecirp_dilav@,ytq_laer@,on_meti@,etad_krow@,on_teehs@(seulav  		

)etad_cca,omem,etad_dilav,ytnq_erp    		

,di_repo,on_tsucpus,on_bd,on_snart,on_hcnarb_d,on_hcnarb,tma_teehs    		

,ecirp_elas,ecirp_tsoc,ecirp,ytq_laer,on_meti ,etad_repo,on_rehcuov(wolf_mi_t otni tresnI        	

)的目(水流写--		

      

/*      

ytq_kcots@/)ecirp_dilav@*ytq_laer@ + yenom_kcots@( = ecirp_tsoc@ tceles                      

esle                   

))ytq_laer@(sba +)ytq_kcots@(sba(/))ecirp_dilav@*ytq_laer@(sba + )yenom_kcots@(sba( = ecirp_tsoc@ tceles      	   	

 0 = ytq_kcots@ fi                   

41.40.6002 csgnauH yB ddA --                   

'1' = ecirp_egnahc_bl@ fi		

价前当取价本成处此，取时入插的表wolf_mi_t在为改已价本成取*/  		

ecirp_dilav@ = ecirp_tsoc@ tceles		

		

ytq_laer@ + ytq_kcots@ = ytq_kcots@ tceles		

ytq_laer@ - = ytq_laer@ tceles		


nigeb 	

'1' >< galf_gtbz@ dna 51 = )on_teehs@(nel dna ) '6' = epyt_hcnarb@ ro '5' = epyt_hcnarb@ ( fi        

        

rav_on_hcnarb_d@ tnirp--		

rav_on_hcnarb_d@ = on_hcnarb erehw ofni_hcnarb_db_t morf galf_gtbz = galf_gtbz@ tceles		

rav_on_hcnarb@ = on_hcnarb erehw ofni_hcnarb_db_t morf epyt_edart = epyt_hcnarb@ tceles        


on_meti@ = on_meti erehw ofni_meti_db_t morf ecirp = ecirp_tsoc@ tceles--		  	


22504102格价的面里单入调取价本成存库有没果如时单入调-- ecirp_dilav@= ecirp_tsoc@ tceles   		

llun si ecirp_tsoc@ fi	    


0 = ytq_kcots@ tceles	        

 llun si ytq_kcots@ fi	    


rorreym otog 0 =! rorre@@ fi	    

on_meti@ = on_meti dna on_hcnarb_d@= on_hcnarb erehw 	    

 kcots_hcnarb_mi_t morf tsoc_gva = ecirp_tsoc@,ytq_kcots = ytq_kcots@ tceles	    

llun = ecirp_tsoc@ tceles	    

llun = yenom_kcots@ tceles	    

llun = ytq_kcots@ tceles	 

价本成和量数存库得获--	


nigeb     

'ID' = on_snart@ fi    


dne    

rorreym otog 0 =! rorre@@ fi         


)etad_yap@,on_rehcuov@,etad_dilav@ ,ytq_kcots@		

,di_repo@,on_tsucpus@,on_bd@,on_snart@,on_hcnarb_d@,on_hcnarb@        	

,ecirp_dilav@*ytq_laer@,ecirp_elas@,ecirp_tsoc@,ecirp_dilav@,ytq_laer@,on_meti@,etad_krow@,on_teehs@(seulav  	

)etad_cca,omem,etad_dilav,ytnq_erp    	

,di_repo,on_tsucpus,on_bd,on_snart,on_hcnarb_d,on_hcnarb,tma_teehs    	

,ecirp_elas,ecirp_tsoc,ecirp,ytq_laer,on_meti ,etad_repo,on_rehcuov(wolf_mi_t otni tresnI 	

 	

0 = tma_elas_ip@ tceles    	

esle 	

)2 ,ecirp_elas@ * ytq_laer@(dnuor = tma_elas_ip@ tceles    	

'ID' = on_snart@ ro 'IM' = on_snart@ fi         

nigeb    

货转、价调品次残-- 'OI' >< on_snart@ dna 'HZ' >< on_snart@ dna 'JJ' >< on_snart@ fi    

水流写--   


dne       

dne  	

/*   		

ytq_kcots@/)ecirp_dilav@*ytq_laer@ - yenom_kcots@( = ecirp_tsoc@ tceles   		

 esle                

))ytq_laer@(sba +)ytq_kcots@(sba(/))ecirp_dilav@*ytq_laer@(sba - )yenom_kcots@(sba( = ecirp_tsoc@ tceles                   

0 = ytq_kcots@ fi                

41.40.6002 csgnauH yB ddA --                

'1' = ecirp_egnahc_bl@ fi    	

价前当取价本成处此，取时入插的表wolf_mi_t在为改已价本成取*/  		

ecirp_dilav@ = ecirp_tsoc@ tceles  		

ytq_laer@ - ytq_kcots@ = ytq_kcots@ tceles    	

	nigeb  	 

esle        

dne  	

/*      

ytq_kcots@/)ecirp_dilav@*ytq_laer@ + yenom_kcots@( = ecirp_tsoc@ tceles                

esle            

))ytq_laer@(sba +)ytq_kcots@(sba(/))ecirp_dilav@*ytq_laer@(sba + )yenom_kcots@(sba( = ecirp_tsoc@ tceles                

0 = ytq_kcots@ fi            

41.40.6002 csgnauH yB ddA --            

'1' = ecirp_egnahc_bl@ fi    	

价前当取价本成处此，取时入插的表wolf_mi_t在为改已价本成取*/  		

  		

ecirp_dilav@ = ecirp_tsoc@ tceles  		

  		

ytq_laer@ + ytq_kcots@ = ytq_kcots@ tceles    	

	nigeb  	

'+' = on_bd@ fi	


nigeb       

 'OO' = on_snart@ fi   


dne       

/*   

ytq_kcots@/)ecirp_dilav@*ytq_laer@ - yenom_kcots@( = ecirp_tsoc@ tceles     	

esle           

))ytq_laer@(sba +)ytq_kcots@(sba(/))ecirp_dilav@*ytq_laer@(sba - )yenom_kcots@(sba( = ecirp_tsoc@ tceles             

0 = ytq_kcots@ fi           

41.40.6002 csgnauH yB ddA --           

'1' = ecirp_egnahc_bl@ fi	

价前当取价本成处此，取时入插的表wolf_mi_t在为改已价本成取*/	

ecirp_dilav@ = ecirp_tsoc@ tceles     	

     	

ytq_laer@ - ytq_kcots@ = ytq_kcots@ tceles     	

nigeb       

'OD' = on_snart@ ro 'OM' = on_snart@ fi    


dne  

     

/*   

ytq_kcots@/)ecirp_dilav@*ytq_laer@ + yenom_kcots@( = ecirp_tsoc@ tceles              

esle           

))ytq_laer@(sba +)ytq_kcots@(sba(/))ecirp_dilav@*ytq_laer@(sba + )yenom_kcots@(sba( = ecirp_tsoc@ tceles      	

0 = ytq_kcots@ fi           

41.40.6002 csgnauH yb ddA --           

'1' = ecirp_egnahc_bl@ fi	

价前当取价本成处此，取时入插的表wolf_mi_t在为改已价本成取*/	

ecirp_dilav@ = ecirp_tsoc@ tceles       	

       	ytq_laer@ + ytq_kcots@ = ytq_kcots@ tceles       	

nigeb       

'ID' = on_snart@ ro 'IM' = on_snart@ fi    


on_meti@ = on_meti erehw ofni_meti_db_t morf ecirp = ecirp_tsoc@ tceles	

 llun si ecirp_tsoc@ fi    


0 = yenom_kcots@ tceles        

 llun si yenom_kcots@ fi    

    

0 = ytq_kcots@ tceles        

 llun si ytq_kcots@ fi    


rorreym otog 0 =! rorre@@ fi    

on_meti@ = on_meti dna on_hcnarb@= on_hcnarb erehw    

 kcots_hcnarb_mi_t morf tma_tsoc = yenom_kcots@ ,tsoc_gva = ecirp_tsoc@,ytq_kcots = ytq_kcots@ tceles    

llun = ecirp_tsoc@ tceles    

llun = yenom_kcots@ tceles    

llun = ytq_kcots@ tceles    

价本成和量数存库得获--    


dne    


'1' = galfcca_evas@ tceles 	

'8' = epyt_hcnarb@ ro '4' = epyt_hcnarb@ fi      

      

dne      

rorreym otog 0 =! rorre@@ fi         

on_rehcuov@ = on_teehs erehw '1' = sutats_redro TES  retsam_teehs_mp_t ETADPU           

esle         

on_rehcuov@ = on_teehs erehw '2' = sutats_redro TES  retsam_teehs_mp_t ETADPU           

)on_teehs yb puorg ytq_redro > ytq_laer dna on_rehcuov@ = on_teehs erehw           

liated_teehs_mp_t morf   on_teehs tceles(stsixe ton FI         

态状单定新更--         

    

rorreym otog 0 =! rorre@@ fi         

on_meti@ = on_meti dna on_rehcuov@ = on_teehs erehw           

ytq_laer@ + )0,ytq_redro(llunsi = ytq_redro TES  liated_teehs_mp_t ETADPU         

态状单订,ytq_redro量数购采单货要改修--         

         

rorreym otog 0 =! rorre@@ fi         

on_rehcuov@ = on_teehs erehw '2' = galf_rppa_rehto TES  retsam_teehs_mi_t ETADPU           

esle         

on_rehcuov@ = on_teehs erehw '3' = galf_rppa_rehto TES  retsam_teehs_mi_t ETADPU           

)on_teehs yb puorg ytq_redro > ytq_laer dna on_rehcuov@ = on_teehs erehw           

liated_teehs_mi_t morf   on_teehs tceles(stsixe ton FI         

态状单请申调直新更--         

rorreym otog 0 =! rorre@@ fi         

on_meti@ = on_meti dna on_rehcuov@ = on_teehs erehw           

ytq_laer@ + )0,ytq_redro(llunsi = ytq_redro TES  liated_teehs_mi_t ETADPU         

态状单订,ytq_redro量数单请申调直改修-- 	      

nigeb      

'' >< )on_rehcuov@(mirtr fi      


on_rehcuov@=on_teehs erehw '1'=galf_ni tes retsam_teehs_mp_t etadpu--      

单货要始原新更--      


构机标目为商应供/户客--  on_hcnarb_d@=on_tsucpus@ tceles      

'-'=on_bd@ tceles      

水流库出库仓源写只--      

nigeb    

出调部外-- 'OD'=on_snart@ ro 'OM'=on_snart@ fi esle    

    

dne    

	

rorreym otog 0 =! rorre@@ fi--				


on_teehs@ = on_teehs erehw '1' = galf_ni tes retsam_teehs_mi_t etadpu--				

        

        


rorreym otog 0 =! rorre@@ fi	      

		

)etad_yap@,on_rehcuov@,etad_dilav@ ,ytq_kcots@				

,di_repo@,on_hcnarb@,'-',on_snart@,on_hcnarb_d@,on_hcnarb@        			

,ecirp_dilav@*ytq_laer@,ecirp_elas@,ecirp_tsoc@,ecirp_dilav@,ytq_laer@,on_meti@,etad_krow@,on_teehs@(seulav  			

)etad_cca,omem,etad_dilav,ytnq_erp    			

,di_repo,on_tsucpus,on_bd,on_snart,on_hcnarb_d,on_hcnarb,tma_teehs    			

,ecirp_elas,ecirp_tsoc,ecirp,ytq_laer,on_meti ,etad_repo,on_rehcuov(wolf_mi_t otni tresnI        

)的目(水流写--			

      	

/*      	

ytq_kcots@/)ecirp_dilav@*ytq_laer@ + yenom_kcots@( = ecirp_tsoc@ tceles                      	

esle                   	

))ytq_laer@(sba +)ytq_kcots@(sba(/))ecirp_dilav@*ytq_laer@(sba + )yenom_kcots@(sba( = ecirp_tsoc@ tceles      	   		

 0 = ytq_kcots@ fi                   	

41.40.6002 csgnauH yB ddA --                   	

'1' = ecirp_egnahc_bl@ fi			

价前当取价本成处此，取时入插的表wolf_mi_t在为改已价本成取*/  			

ecirp_dilav@ = ecirp_tsoc@ tceles			

			

ytq_laer@ - ytq_kcots@ = ytq_kcots@ tceles			

ytq_laer@ - = ytq_laer@ tceles--			

        

rav_on_hcnarb@ = on_hcnarb erehw ofni_hcnarb_db_t morf epyt_edart = epyt_hcnarb@ tceles--      


on_meti@ = on_meti erehw ofni_meti_db_t morf ecirp = ecirp_tsoc@ tceles       	

 llun si ecirp_tsoc@ fi	    


0 = ytq_kcots@ tceles	        

 llun si ytq_kcots@ fi	    


rorreym otog 0 =! rorre@@ fi	    

on_meti@ = on_meti dna on_hcnarb@= on_hcnarb erehw 	    

 kcots_hcnarb_mi_t morf tsoc_gva = ecirp_tsoc@,ytq_kcots = ytq_kcots@ tceles	    

llun = ecirp_tsoc@ tceles	    

llun = yenom_kcots@ tceles	    

llun = ytq_kcots@ tceles	 		

价本成和量数存库库仓出转得获--      

        

rorreym otog 0 =! rorre@@ fi	      

		

)etad_yap@,on_rehcuov@,etad_dilav@ ,ytq_kcots@				

,di_repo@,on_hcnarb@,'+',on_snart@,on_hcnarb@,on_hcnarb_d@        			

,ecirp_dilav@*ytq_laer@,ecirp_elas@,ecirp_tsoc@,ecirp_dilav@,ytq_laer@,on_meti@,etad_krow@,on_teehs@(seulav  			

)etad_cca,omem,etad_dilav,ytnq_erp    			

,di_repo,on_tsucpus,on_bd,on_snart,on_hcnarb_d,on_hcnarb,tma_teehs    			

,ecirp_elas,ecirp_tsoc,ecirp,ytq_laer,on_meti ,etad_repo,on_rehcuov(wolf_mi_t otni tresnI        

)的目(水流写--			

      	

/*      	

ytq_kcots@/)ecirp_dilav@*ytq_laer@ + yenom_kcots@( = ecirp_tsoc@ tceles                      	

esle                   	

))ytq_laer@(sba +)ytq_kcots@(sba(/))ecirp_dilav@*ytq_laer@(sba + )yenom_kcots@(sba( = ecirp_tsoc@ tceles      	   		

 0 = ytq_kcots@ fi                   	

41.40.6002 csgnauH yB ddA --                   	

'1' = ecirp_egnahc_bl@ fi			

价前当取价本成处此，取时入插的表wolf_mi_t在为改已价本成取*/  			

ecirp_dilav@ = ecirp_tsoc@ tceles			

			

ytq_laer@ + ytq_kcots@ = ytq_kcots@ tceles			

ytq_laer@ - = ytq_laer@ tceles--			

        

rav_on_hcnarb@ = on_hcnarb erehw ofni_hcnarb_db_t morf epyt_edart = epyt_hcnarb@ tceles--      


on_meti@ = on_meti erehw ofni_meti_db_t morf ecirp = ecirp_tsoc@ tceles       	

 llun si ecirp_tsoc@ fi	    


0 = ytq_kcots@ tceles	        

 llun si ytq_kcots@ fi	    


rorreym otog 0 =! rorre@@ fi	    

on_meti@ = on_meti dna on_hcnarb_d@= on_hcnarb erehw 	    

 kcots_hcnarb_mi_t morf tsoc_gva = ecirp_tsoc@,ytq_kcots = ytq_kcots@ tceles	    

llun = ecirp_tsoc@ tceles	    

llun = yenom_kcots@ tceles	    

llun = ytq_kcots@ tceles	 		

价本成和量数存库库仓入转得获--			


nigeb    

  单仓转--   'OI' = on_snart@ fi esle    

dne    

      


on_rehcuov@=on_teehs erehw  '1'=galf_ni tes retsam_teehs_mi_t etadpu--      


dne	  

rorreym otog 0 =! rorre@@ fi           

on_hy@ = on_teehs erehw '1' = galf_ni TES  retsam_teehs_mp_t ETADPU           

esle         

on_hy@ = on_teehs erehw '2' = galf_ni TES  retsam_teehs_mp_t ETADPU           

)on_teehs yb puorg )0,mun_emoc(llunsi > ytq_laer dna on_hy@ = on_teehs erehw liated_teehs_mp_t morf on_teehs tceles(stsixe ton FI         

态状单货要新更--         

    

rorreym otog 0 =! rorre@@ fi         

on_meti@ = on_meti dna on_hy@ = on_teehs erehw           

ytq_laer@ + )0,mun_emoc(llunsi = mun_emoc TES liated_teehs_mp_t ETADPU         

态状单订,1mun量数货到单货要改修--         

nigeb	  

 0>)on_hy@(nel fi      

量货到终最的货要店门写，货收店门于对--	  

	

on_rehcuov@=on_teehs erehw retsam_teehs_mi_t morf )'',on_rehcuov(llunsi=on_hy@ tceles      


dne      

rorreym otog 0 =! rorre@@ fi         

on_rehcuov@ = on_teehs erehw '1' = galf_ni TES  retsam_teehs_mi_t ETADPU           

esle         

on_rehcuov@ = on_teehs erehw '2' = galf_ni TES  retsam_teehs_mi_t ETADPU           

)on_teehs yb puorg ytq_redro > ytq_laer dna on_rehcuov@ = on_teehs erehw           

liated_teehs_mi_t morf   on_teehs tceles(stsixe ton FI         

态状单定新更--         

    

rorreym otog 0 =! rorre@@ fi         

on_meti@ = on_meti dna on_rehcuov@ = on_teehs erehw           

ytq_laer@ + )0,ytq_redro(llunsi = ytq_redro TES  liated_teehs_mi_t ETADPU         

态状,ytq_redro单出调始原改修--         

nigeb      

'' >< )on_rehcuov@(mirtr fi      

态状货收的单出调始原新更--      

      

'+'=on_bd@ tceles      


on_hcnarb_t@=on_hcnarb@ tceles      

on_hcnarb@=on_hcnarb_d@ tceles      

on_hcnarb_d@=on_hcnarb_t@ tceles      

     

）构机部外为库仓源（水流库入库仓标目写只--      


'2' = galfcca_evas@ tceles       	

'8' = epyt_hcnarb@ ro '4' = epyt_hcnarb@ fi      


on_hcnarb_d@ = on_hcnarb erehw ofni_hcnarb_db_t morf epyt_edart = epyt_hcnarb@ tceles      

      

构机源为商应供/户客货退--  on_hcnarb@=on_tsucpus@ tceles      

nigeb    

入调部外店门、入调部外--  'ID'=on_snart@ ro 'IM'=on_snart@ fi    


on_snart@ = di_teehs EREHW on_teehs_sys_t MORF tsoc_egnahc = ecirp_egnahc_bl@ TCELES     

on_hcnarb_d@ = rav_on_hcnarb_d@ tceles     

on_hcnarb@ = rav_on_hcnarb@ tceles     

etad_repo@ = rav_etad_repo@ tceles     

on_snart@ = rav_on_snart@ tceles     

on_teehs@ = rav_on_teehs@ tceles     


nigeb  

0=sutats_hctef@@ elihw  



ecirp_elas@,xat@,tma_bus@        

,ecirp_dilav@,ecirp_igro@,ytq_laer@,ytq_redro@,on_meti@        

,galf_tcca@,galf_snart@        

,nam_mrifnoc@,di_repo@ ,nam_redro@,etad_krow@,etad_repo@        

,galf_evorppa@,etad_yap@ ,yaw_yap@        

,on_nioc@,on_tsucpus@,on_rehcuov@        

,on_hcnarb_d@,on_hcnarb@,on_bd@,on_snart@,on_teehs@        

otni 1_ruc_ci hctef  

1_ruc_ci nepo  


'0' = galfcca_evas@ tceles  

'0'=etadpu_ydaerla@ tceles  

0=tma_latot@ tceles  


0 >< ytq_laer.b  dna )'1' = galf_evorppa.a( dna      

) on_teehs.b = on_teehs.a ( erehw    

b liated_teehs_mi_t ,a detresni morf    

ecirp_elas.b,xat.b,tma_bus.b        

,ecirp_dilav.b,ecirp_igro.b,ytq_laer.b,ytq_redro.b,on_meti.b        

,galf_tcca.a,galf_snart.a        

,nam_mrifnoc.a,di_repo.a,nam_redro.a,etad_krow.a,etad_repo.a        

,galf_evorppa.a,etad_yap.a ,)'A',yaw_yap.a(llunsi        

,)'BMR',on_nioc.a(llunsi,)'',on_tsucpus.a(llunsi,)'',on_rehcuov.a(llunsi        

,)'',on_hcnarb_d.a(llunsi,on_hcnarb.a,on_bd.a,on_snart.a,on_teehs.a tceles    

rof rosruc 1_ruc_ci eralced  


)1(rahc		galf_gtbz@    

额金存库--,)4,61(ciremun	yenom_kcots@    

,)1(rahc	ecirp_egnahc_bl@    

码代地的目--        ,)6(rahc    rav_on_hcnarb_d@    

,)1(rahc	ot_epyt_hcnarb@    

,)1(rahc	epyt_hcnarb@    

,)1(rahc	galfcca_evas@    

,emitetad      rav_etad_dilav@    

期日作操--,   emitetad       rav_etad_repo@    

,)1(rahc     rav_yaw_elas@    

码代户客商应供--,        )8(rahc     rav_on_tsucpus@    

码代店本--,        )6(rahc       rav_on_hcnarb@    

式方作操存库--,         )2(rahc      rav_on_snart@    

号单作工--, )81(rahc  rav_on_teehs@    

价本成--,)4,61(ciremun     	ecirp_tsoc@    

存库--,)4,61(ciremun     	ytq_kcots@    

--,)4,61(ciremun     tma_elas_ip@    

号单货要始原--        ,)81(rahc      on_hy@    

,)02(rahcrav			1rehto@    

)价调(码代品货--,        )02(rahc       on_meti_y@    

,)1(rahc  etadpu_ydaerla@    

,)1(rahc         tnuocca@    

, regetni        epyt_yap@    

,regetni          pmet_t@    

额金--   ,)4,61(ciremun       tma_latot@    

,)6(rahc     on_hcnarb_t@    

,)2(rahc       snart_dlo@    

,emitetad      etad_dilav@    

,)4,5(ciremun             xat@    

,)4,61(ciremun         tma_bus@    

价单售零--,   )4,61(ciremun     ecirp_elas@    

价单际实--,   )4,61(ciremun     ecirp_dilav@    

价原--,   )4,61(ciremun      ecirp_igro@    

量数--,   )4,61(ciremun          ytq_laer@    

量数--,   )4,61(ciremun          ytq_redro@    

码代品货--,        )02(rahc         on_meti@    

,)1(rahc       galf_tcca@    

,)1(rahc      galf_snart@    

,)4(rahc     nam_mrifnoc@    

,)4(rahc         di_repo@    

,)4(rahc       nam_redro@    

期日核审--,   emitetad       etad_krow@    

期日作操--,   emitetad       etad_repo@    

核审-1，核审未-0--  志标批审--,      )1(rahc   galf_evorppa@    

期日款付--,   emitetad        etad_yap@    

式方款付--,         )2(rahc        yaw_yap@    

种币--,         )3(rahc         on_nioc@    

码代户客商应供--,        )8(rahc     on_tsucpus@    

号证凭始原--,         )81(rahc      on_rehcuov@    

码代地的目--,        )6(rahc    on_hcnarb_d@    

码代店本--,        )6(rahc       on_hcnarb@    

式方库入出--,      )1(rahc        on_bd@    

式方作操存库--,         )2(rahc      on_snart@    

号单作工--, )81(rahc  on_teehs@    

eralced  


nruter )galf_evorppa(etadpu ton fi  

nigeb

sa

 etadpu rof

  retsam_teehs_mi_t no retsam_teehs_mi_rt reggirt etaerc


og

retsam_teehs_mi_rt reggirt pord  

)'retsam_teehs_mi_rt'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$tr_pc_branch_price_i(MS).sql^^^^


dne


pitsoh.b=on_hcnarb.a erehw	

)kcolon(htiw b sutats_sop_sys_t	

,	a detresni morf	

 )(etadteg,galf_moc.a,disop.b,on_meti.a,on_hcnarb.a  tceles	

sop_ecirp_hcnarb_cp_t otni tresni	


on_meti.detresni=on_meti.sop_ecirp_hcnarb_cp_t erehw	

detresni,sop_ecirp_hcnarb_cp_t morf	

sop_ecirp_hcnarb_cp_t eteled	

况情新更galf_moc的应对disop个每录记表sop店分应对入插表格价店分的建新--	

nigeb

sa

tresni rof

ecirp_hcnarb_cp_t no i_ecirp_hcnarb_cp_rt reggirt etaerc


og

i_ecirp_hcnarb_cp_rt reggirt pord  

)'i_ecirp_hcnarb_cp_rt'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$tr_pc_branch_price_u(MS).sql^^^^


dne


)disop.b=disop.sop_ecirp_hcnarb_cp_t dna on_meti.a=on_meti.sop_ecirp_hcnarb_cp_t dna on_hcnarb.a=on_hcnarb.sop_ecirp_hcnarb_cp_t  erehw sop_ecirp_hcnarb_cp_t morf 1 tceles(stsixe ton dna--	

pitsoh.b=on_hcnarb.a erehw--	

)kcolon(htiw b sutats_sop_sys_t--	

,)kcolon(htiw	a ecirp_hcnarb_cp_t morf--	

 )(etadteg,galf_moc.a,disop.b,on_meti.a,on_hcnarb.a  tceles--	

sop_ecirp_hcnarb_cp_t otni tresni--	

	

dne	

on_meti.b=on_meti.a		

dna on_hcnarb.b=on_hcnarb.a erehw		

b detresni,a sop_ecirp_hcnarb_cp_t morf		

)(etadteg=etad_repo.a			

,galf_moc.b=galf_moc.a tes		

a etadpu		

nigeb	

 )galf_moc(etadpu fi	

况情新更galf_moc的应对disop个每录记表sop店分应对新更时同表格价店分的新更--	

nigeb

sa

etadpu rof

ecirp_hcnarb_cp_t no u_ecirp_hcnarb_cp_rt reggirt etaerc


og

u_ecirp_hcnarb_cp_rt reggirt pord  

)'u_ecirp_hcnarb_cp_rt'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$tr_pm_sheet_master(MS).sql^^^^

dne

nruter  

1_ruc_oc etacollaed  

1_ruc_oc esolc  

:rorreym


nruter 

 

 

dne 

rorreym otog 0 =! rorre@@ fi    

)'S',on_hcnarb@ ,etad_yap@,'A'              	

,on_tsucpus@,'0',etad_repo@,'A',tma_xat@,tma_latot@ ,on_snart@ ,on_teehs@ ,1-(seulav       	

)epyt_cca,on_hcnarb,etad_cca,yaw_yap,on_tsucpus,galf_elttes,etad_repo,yaw_elas                                   	

,tma_xat,tma_dluohs,on_snart,on_rehcuov,epyt_yap(wolf_yapcer_mf_t otni tresni      	

       'C' >< yaw_elas@ fi      

 on_tsucpus@ = on_tsucpus erehw ofni_tsucpus_db_t morf yaw_elas = yaw_elas@ tceles      

)(etadteg=etad_yap@ tceles      

llun si etad_yap@ fi    

nigeb  

'OR'=on_snart@ ro 'IP'=on_snart@ fi  

账付应--  

  

  

1_ruc_oc etacollaed  

1_ruc_oc esolc  


dne  

ecirp_elas@,2mun@,xat@,tma_bus@        

,ecirp_dilav@,ecirp_igro@,ytq_laer@,ytq_redro@,on_meti@        

,galf_tcca@,galf_snart@        

,nam_mrifnoc@,di_repo@ ,nam_redro@        

,sutats_redro@,tma_redro@,etad_krow@,etad_repo@        

,galf_evorppa@,etad_yap@ ,yaw_yap@        

,on_nioc@,on_tsucpus@,on_rehcuov@        

,on_hcnarb_d@,on_hcnarb@,on_bd@,on_snart@,on_teehs@        

otni 1_ruc_oc hctef     


dne    

dne      

 dne        

rorreym otog 0 =! rorre@@ fi           

)on_meti@,on_tsucpus@(seulav             

)on_meti,on_tsucpus(meti_tsucpus_db_t otni tresni           

'1'=galf_tluafed@ tceles             

esle           

'0'=galf_tluafed@ tceles             

)on_meti@=on_meti erehw meti_tsucpus_db_t morf 1 tceles(stsixe fi           

品商应供商应供它其有--           

nigeb        

)on_meti@=on_meti dna on_tsucpus@=on_tsucpus erehw meti_tsucpus_db_t morf 1 tceles(stsixe ton fi        

nigeb      

)'1' = detubirtsid_si@ ro '0' = detubirtsid_si@( dna  '1' = lrtc_metipus_sg@ fi      

系关品商商应供护维部总在仅--      

nigeb    

'IC'=on_snart@ ro 'IG'=on_snart@ ro 'OR'=on_snart@ ro 'OP'=on_snart@ fi    

dne      

)xat@+1(/)xat@*ecirp_dilav@*ytq_laer@(+tma_xat@=tma_xat@ tceles         

ecirp_dilav@*ytq_laer@+tma_latot@=tma_latot@ tceles         

nigeb      

esle      

dne      

)xat@+1(/)xat@*tma_bus@(+tma_xat@=tma_xat@ tceles         

tma_bus@+tma_latot@=tma_latot@ tceles         

nigeb      

 10.0=<) ecirp_dilav@*ytq_laer@ - tma_bus@(sba fi      

61-70-0102 jsgnat 现出况情的合符不额金际实与额金单款帐的成生--      

，下况情格价算反量数、额金据根免避以，tma_bus取，下况情10.0=<差相ecirp_dilav*ytq_laer与tma_bus品商--      

'IC'=on_snart@ ro 'OR'=on_snart@ ro 'IP'=on_snart@ fi    

    



dne    

rorreym otog 0 =! rorre@@ fi      

)etad_dilav_meti@ , ytq_laer@ + ytq_kcots@,di_repo@,on_tsucpus@,on_bd@,on_snart@,on_hcnarb_d@,on_hcnarb@,0,tsoc_kcots@,0,ytq_laer@,on_meti@,etad_krow@,on_teehs@(seulav        

)etad_dilav,ytnq_erp ,di_repo,on_tsucpus,on_bd,on_snart,on_hcnarb_d,on_hcnarb,tma_teehs,ecirp_tsoc,ecirp,ytq_laer,on_meti ,etad_repo,on_rehcuov(wolf_mi_t otni tresnI      


on_meti@ = on_meti erehw ofni_meti_db_t morf )0,ecirp(llunsi = tsoc_kcots@ tceles   		

llun si tsoc_kcots@ fi		

esle        

dne   	

) ytq_laer@ + ytq_kcots@(/yenom_kcots@ = tsoc_kcots@ tceles	   		

0 >< ytq_laer@ + ytq_kcots@ fi   		

esle		

0 = tsoc_kcots@ tceles   		

llun si tsoc_kcots@ fi		 

nigeb   	

'1' = ecirp_egnahc@ fi	


'IG' = di_teehs erehw on_teehs_sys_t morf )'0',tsoc_egnahc(llunsi = ecirp_egnahc@ tceles	


nigeb    

 'IG'=on_snart@ fi    


dne    

dne	

rorreym otog 0 =! rorre@@ fi     	

)etad_yap@,2mun@ + ytq_kcots@,di_repo@,on_tsucpus@,on_bd@,'OR',on_hcnarb_d@,on_hcnarb@,0,0,0,2mun@,on_meti@,etad_krow@,)31,on_teehs@(thgir+'IG'(seulav     	

)etad_cca,ytnq_erp ,di_repo,on_tsucpus,on_bd,on_snart,on_hcnarb_d,on_hcnarb,tma_teehs,ecirp_tsoc,ecirp,ytq_laer,on_meti ,etad_repo,on_rehcuov(wolf_mi_t otni tresnI   	

    

on_meti@ = on_meti erehw ofni_meti_db_t morf )0,ecirp(llunsi = tsoc_kcots@ tceles		

llun si tsoc_kcots@ fi     	

esle          

dne     	

) 2mun@ + ytq_kcots@(/)ecirp_dilav@ * ytq_laer@ + yenom_kcots@( = tsoc_kcots@ tceles	   		

0 >< 2mun@ + ytq_kcots@ fi   		

esle		

0 = tsoc_kcots@ tceles   		

llun si tsoc_kcots@ fi		 

nigeb     	

'1' = ecirp_egnahc@ fi  	

/*价前当取价本成处此，取时入插的表wolf_mi_t在为改已价本成取*/ 	   

ecirp_dilav@ = tsoc_kcots@ tceles	    

'IG' = di_teehs erehw on_teehs_sys_t morf )'0',tsoc_egnahc(llunsi = ecirp_egnahc@ tceles  	


2mun@-=2mun@ tceles          

	

nigeb        

0=2mun@ ton fi        

品赠--      

      

rorreym otog 0 =! rorre@@ fi      

)etad_yap@,etad_dilav_meti@ ,ytq_laer@ - ytq_kcots@,di_repo@,on_tsucpus@,on_bd@,on_snart@,on_hcnarb_d@,on_hcnarb@,ecirp_dilav@*ytq_laer@,ecirp_elas@,tsoc_kcots@,ecirp_dilav@,ytq_laer@,on_meti@,etad_krow@,on_teehs@(seulav        

)etad_cca,etad_dilav,ytnq_erp ,di_repo,on_tsucpus,on_bd,on_snart,on_hcnarb_d,on_hcnarb,tma_teehs,ecirp_elas,ecirp_tsoc,ecirp,ytq_laer,on_meti ,etad_repo,on_rehcuov(wolf_mi_t otni tresnI      

/*    

      on_meti@ = on_meti erehw ofni_meti_db_t morf )0,ecirp(llunsi = tsoc_kcots@ tceles   	

llun si tsoc_kcots@ fi	

esle      

dne	

ytq_kcots@/) ecirp_dilav@ * ytq_laer@ + yenom_kcots@ ( = tsoc_kcots@ tceles   	

0 >< ytq_kcots@ fi   	

esle	

ecirp_dilav@ = tsoc_kcots@ tceles   	

llun si tsoc_kcots@ fi   	

nigeb	

'1' = ecirp_egnahc@ fi      

价前当取价本成处此，取时入插的表wolf_mi_t在为改已价本成取*/    

ecirp_dilav@ = tsoc_kcots@ tceles      

ytq_laer@ + ytq_kcots@ = ytq_kcots@ tceles      

水流写--      

ytq_laer@-=ytq_laer@ tceles        

数负为改量数库入出--      


dne        

rorreym otog 0 =! rorre@@ fi          

on_rehcuov@ = on_teehs erehw '1' = sutats_redro TES  retsam_teehs_mp_t ETADPU            

esle          

on_rehcuov@ = on_teehs erehw '2' = sutats_redro TES  retsam_teehs_mp_t ETADPU            

)on_teehs yb puorg ytq_redro > ytq_laer dna on_rehcuov@ = on_teehs erehw            

liated_teehs_mp_t morf  on_teehs tceles(stsixe ton FI          

态状单定新更--          

    

rorreym otog 0 =! rorre@@ fi          

on_meti@ = on_meti dna on_rehcuov@ = on_teehs erehw            

2mun@ + )0,mun_emoc(llunsi = mun_emoc ,ytq_laer@ + )0,ytq_redro(llunsi = ytq_redro TES  liated_teehs_mp_t ETADPU          

量数货到品赠作用1mun ,态状单订,ytq_redro量数货到单定购采改修--          

nigeb        

'TR'=)2,on_rehcuov@(tfel dna '' >< )on_rehcuov@(mirtr fi      

态状单知通货退改更--       

nigeb    

 '+'=on_bd--  'OR'=on_snart@ fi    


dne    

 dne        

rorreym otog 0 =! rorre@@ fi            

)llun si tsucpus_niam ro on_tsucpus@ >< tsucpus_niam( dna on_meti@=on_meti erehw              

 on_tsucpus@=tsucpus_niam tes ofni_meti_db_t etadpu            

nigeb        

'1'=)'ppus_etadpu_otua'=)di_rav_sys(rewol erehw metsys_sys_t morf eulav_rav_sys tceles(fi        

商应供主品商新更商应供前当按--        

        

 dne        


 on_hcnarb@=on_hcnarb dna  ecirp_dilav@ >< ecirp dna on_meti@=on_meti erehw ecirp_dilav@=ecirp tes ecirp_hcnarb_cp_t etadpu    			

esle    		

)'1' >< galf_gtbz  dna '5' = epyt_edart erehw ofni_hcnarb_db_t morf on_hcnarb tceles( ni on_hcnarb dna				

)3,on_hcnarb@(tfel=)3,on_hcnarb(tfel dna  ecirp_dilav@ >< ecirp dna on_meti@=on_meti erehw ecirp_dilav@=ecirp tes ecirp_hcnarb_cp_t etadpu            		

'5'=)on_hcnarb@=)on_hcnarb(rewol erehw ofni_hcnarb_db_t morf epyt_edart tceles(fi    	    	

/*)3,on_hcnarb@(tfel=on_hcnarb dna ecirp_dilav@ >< ecirp dna on_meti@=on_meti erehw ecirp_dilav@=ecirp tes ecirp_hcnarb_cp_t etadpu*/            	

价进构机新更--            	

            	

rorreym otog 0 =! rorre@@ fi            	

ecirp_dilav@ >< ecirp dna on_meti@=on_meti erehw )(etadteg =etad_yfidom,di_repo@=di_repo_yfidom, ecirp_dilav@=ecirp tes ofni_meti_db_t etadpu            	

nigeb        

)'1' >< ))'orez_egnahcton_ip'=)di_rav_sys(rewol erehw metsys_sys_t morf eulav_rav_sys tceles(( ro )0 >< ecirp_dilav@ dna '1' = )'orez_egnahcton_ip'=)di_rav_sys(rewol erehw metsys_sys_t morf eulav_rav_sys tceles((( dna '1'=)'ecirpni_egnahc_ip'=)di_rav_sys(rewol erehw metsys_sys_t morf eulav_rav_sys tceles(fi        


)'0','案档新更否是0为格价','orez_egnahcton_ip'(seulav )eulav_rav_sys,eman_rav_sys,di_rav_sys( metsys_sys_t otni tresni		

)'orez_egnahcton_ip'=di_rav_sys erehw metsys_sys_t morf eulav_rav_sys tceles(stsixe ton fi	

存保否是价0有否是断判--	

间时改修和，人改修后最新更并价进品商新更价货收按--        

        

rorreym otog 0 =! rorre@@ fi        

dne        

dne            

)ecirp_dilav@,ecirp_dilav@,ecirp_dilav@,on_meti@,on_tsucpus@(seulav                

)ecirp_tsal,ecirp_mottob,ecirp_pot,on_meti,on_tsucpus(meti_tsucpus_db_t otni tresni              

'1'=galf_tluafed@ tceles                

esle              

'0'=galf_tluafed@ tceles                

)on_meti@=on_meti erehw meti_tsucpus_db_t morf 1 tceles(stsixe fi              

品商应供商应供它其有--              

nigeb            

esle            

on_meti@=on_meti dna on_tsucpus@=on_tsucpus erehw                

ecirp_dilav@=ecirp_tsal                

,)dne ecirp_mottob esle ecirp_dilav@ neht llun si ecirp_mottob ro 0=ecirp_mottob ro )ecirp_dilav@>ecirp_mottob( nehw esac(=ecirp_mottob                

换代格价务业前当用应，况情的LLUN或0为价低最有现理处应--                

,)dne ecirp_pot esle ecirp_dilav@ neht ecirp_dilav@<ecirp_pot nehw esac(=ecirp_pot                

tes meti_tsucpus_db_t etadpu              

)on_meti@=on_meti dna on_tsucpus@=on_tsucpus erehw meti_tsucpus_db_t morf 1 tceles(stsixe fi            

nigeb        

)'1' = detubirtsid_si@ ro '0' = detubirtsid_si@( dna  '1' = lrtc_metipus_sg@ fi        

系关品商与商应供护维部总在限仅 --        

  		

dne	

rorreym otog 0 =! rorre@@ fi       	

) ecirp_elas@ ,etad_yap@ ,2mun@ + ytq_kcots@,di_repo@,on_tsucpus@,on_bd@,'IG',on_hcnarb_d@,on_hcnarb@,0,tsoc_kcots@,0,2mun@,on_meti@,etad_krow@,)31,on_teehs@(thgir+'IG'(seulav           	

)ecirp_elas,etad_cca,ytnq_erp ,di_repo,on_tsucpus,on_bd,on_snart,on_hcnarb_d,on_hcnarb,tma_teehs,ecirp_tsoc,ecirp,ytq_laer,on_meti ,etad_repo,on_rehcuov(wolf_mi_t otni tresnI        	

    	

on_meti@ = on_meti erehw ofni_meti_db_t morf )0,ecirp(llunsi = tsoc_kcots@ tceles   			

llun si tsoc_kcots@ fi			

esle        	

dne   		

) 2mun@ + ytq_kcots@(/) ecirp_dilav@ * ytq_laer@ + yenom_kcots@ (= tsoc_kcots@ tceles	   			

0 >< 2mun@ + ytq_kcots@ fi   			

esle			

0 = tsoc_kcots@ tceles   			

llun si tsoc_kcots@ fi		 	

nigeb   		

'1' = ecirp_egnahc@ fi		

/*价前当取价本成处此，取时入插的表wolf_mi_t在为改已价本成取*/    

ecirp_dilav@ = tsoc_kcots@ tceles		

'IG' = di_teehs erehw on_teehs_sys_t morf )'0',tsoc_egnahc(llunsi = ecirp_egnahc@ tceles		

nigeb        

	0=2mun@ ton fi        

品赠--	

        

dne	

rorreym otog 0 =! rorre@@ fi    	

) ecirp_elas@ ,etad_yap@ , ytq_laer@ + ytq_kcots@,di_repo@,on_tsucpus@,on_bd@,on_snart@,on_hcnarb_d@,on_hcnarb@,ecirp_dilav@*ytq_laer@,tsoc_kcots@,ecirp_dilav@,ytq_laer@,on_meti@,etad_krow@,on_teehs@(seulav           	

)ecirp_elas,etad_cca,ytnq_erp ,di_repo,on_tsucpus,on_bd,on_snart,on_hcnarb_d,on_hcnarb,tma_teehs,ecirp_tsoc,ecirp,ytq_laer,on_meti ,etad_repo,on_rehcuov(wolf_mi_t otni tresnI    	

ecirp_dilav@ = tsoc_kcots@ tceles	     

/*    

0 = tsoc_kcots@ tceles      

ytq_laer@ + ytq_kcots@ = ytq_kcots@ tceles    	

      

on_meti@ = on_meti erehw ofni_meti_db_t morf )0,ecirp(llunsi = tsoc_kcots@ tceles   		

llun si tsoc_kcots@ fi		

esle    	

dne		

) ytq_laer@ + ytq_kcots@(/) ecirp_dilav@ * ytq_laer@ + yenom_kcots@ ( = tsoc_kcots@ tceles	   		

0 >< ytq_laer@ + ytq_kcots@ fi   		

esle		

ecirp_dilav@ = tsoc_kcots@ tceles   		

llun si tsoc_kcots@ fi		 

nigeb		

'1' = ecirp_egnahc@ fi    	

价前当取价本成处此，取时入插的表wolf_mi_t在为改已价本成取*/      

nigeb        

0=ytq_laer@ ton fi        

水流写--        


dne        

rorreym otog 0 =! rorre@@ fi          

on_rehcuov@ = on_teehs erehw '1' = sutats_redro TES  retsam_teehs_mp_t ETADPU            

esle          

on_rehcuov@ = on_teehs erehw '2' = sutats_redro TES  retsam_teehs_mp_t ETADPU            

)on_teehs yb puorg ytq_redro > ytq_laer dna on_rehcuov@ = on_teehs erehw            

liated_teehs_mp_t morf   on_teehs tceles(stsixe ton FI          

态状单定新更--          

    

rorreym otog 0 =! rorre@@ fi          

on_meti@ = on_meti dna on_rehcuov@ = on_teehs erehw            

2mun@ + )0,mun_emoc(llunsi = mun_emoc ,ytq_laer@ + )0,ytq_redro(llunsi = ytq_redro TES  liated_teehs_mp_t ETADPU          

量数货到品赠作用1mun ,态状单订,ytq_redro量数货到单定购采改修--          

nigeb        

'OP'=)2,on_rehcuov@(tfel dna '' >< )on_rehcuov@(mirtr fi        

nigeb    

库入货进-- 'IP'=on_snart@ fi    


dne    

dne        

rorreym otog 0 =! rorre@@ fi          

on_rehcuov@ = on_teehs erehw '1' = sutats_redro TES  retsam_teehs_mp_t ETADPU            

esle          

on_rehcuov@ = on_teehs erehw '2' = sutats_redro TES  retsam_teehs_mp_t ETADPU            

)on_teehs yb puorg  )mun_emoc > )0,ytq_dnes(llunsi ro ytq_redro > ytq_laer ( dna on_rehcuov@ = on_teehs erehw            

liated_teehs_mp_t morf   on_teehs tceles(stsixe ton FI          

态状单定新更--          

    

rorreym otog 0 =! rorre@@ fi          

on_meti@ = on_meti dna on_rehcuov@ = on_teehs erehw            

ytq_laer@ + )0,ytq_redro(llunsi = ytq_redro TES  liated_teehs_mp_t ETADPU          

态状单订,ytq_redro量数购采单货要改修--          

nigeb        

'' >< )on_rehcuov@(mirtr fi        

nigeb    

'OP'=on_snart@ fi    


on_meti@ = on_meti erehw ofni_meti_db_t morf )0,ecirp(llunsi = tsoc_kcots@ tceles--    

llun si tsoc_kcots@ fi--    


0 = yenom_kcots@ tceles	

llun si yenom_kcots@ fi    


0 = ytq_kcots@ tceles	

llun si ytq_kcots@ fi    


on_meti@ = on_meti dna on_hcnarb@ = on_hcnarb erehw kcots_hcnarb_mi_t morf      

tma_tsoc = yenom_kcots@, tsoc_gva = tsoc_kcots@ ,ytq_kcots = ytq_kcots@ tceles    

llun = tsoc_kcots@ tceles    

llun = yenom_kcots@ tceles    

llun = ytq_kcots@ tceles    



on_snart@ = di_teehs erehw on_teehs_sys_t morf )'0',tsoc_egnahc(llunsi = ecirp_egnahc@ tceles    


rorreym otog       

出退接直--'HH'=on_snart@ ro 'QP'=on_snart@ ro 'HY'=on_snart@ ro 'JX'=on_snart@ fi    


nigeb  

0=sutats_hctef@@ elihw  

ecirp_elas@,2mun@,xat@,tma_bus@        

,ecirp_dilav@,ecirp_igro@,ytq_laer@,ytq_redro@,on_meti@        

,galf_tcca@,galf_snart@        

,nam_mrifnoc@,di_repo@ ,nam_redro@        

,sutats_redro@,tma_redro@,etad_krow@,etad_repo@        

,galf_evorppa@,etad_yap@ ,yaw_yap@        

,on_nioc@,on_tsucpus@,on_rehcuov@        

,on_hcnarb_d@,on_hcnarb@,on_bd@,on_snart@,on_teehs@        

otni 1_ruc_oc hctef  

1_ruc_oc nepo  


'0' = lrtc_metipus_sg@ tceles     

 '' = lrtc_metipus_sg@ ro llun si lrtc_metipus_sg@ fI  


'lrtc_metipus'=)di_rav_sys(rewol erehw metsys_sys_t morf    

 eulav_rav_sys = lrtc_metipus_sg@ tceles  

  

)'0' ,detubirtsid_si@(llunsi = detubirtsid_si@ tceles  

'detubirtsid_si'=)di_rav_sys(rewol erehw metsys_sys_t morf eulav_rav_sys=detubirtsid_si@ tceles  

0=tma_xat@ tceles  

0=tma_latot@ tceles  


零为得不量数据单--  )0><ytq_dnes.b ro 0><ytq_laer.b(  dna )'1' = galf_evorppa.a( dna      

) on_teehs.b = on_teehs.a ( erehw    

b liated_teehs_mp_t ,a detresni morf    

ecirp_elas.b,ytq_dnes.b,xat.b,tma_bus.b        

,ecirp_dilav.b,ecirp_igro.b,ytq_laer.b,ytq_redro.b,on_meti.b        

,galf_tcca.a,galf_snart.a        

,nam_mrifnoc.a,di_repo.a ,nam_redro.a        

,sutats_redro.a,tma_redro.a,etad_krow.a,etad_repo.a        

,galf_evorppa.a,etad_yap.a ,)'A',yaw_yap.a(llunsi        

,)'BMR',on_nioc.a(llunsi,)'',on_tsucpus.a(llunsi,)'',on_rehcuov.a(llunsi        

,)'',on_hcnarb_d.a(llunsi,on_hcnarb.a,on_bd.a,on_snart.a,on_teehs.a tceles    

rof rosruc 1_ruc_oc eralced  

   

额税--   )4,61(ciremun            tma_xat@    

额金本成-- , )4,61(ciremun	  yenom_kcots@    

,)1(rahc	 ecirp_egnahc@    

格价本成--  ,)4,61(ciremun	  tsoc_kcots@    

量数存库--  ,)4,61(ciremun	  ytq_kcots@    

价售零的时库入--  ,)4,61(ciremun	 ecirp_elas@    

,)2(rahcrav     detubirtsid_si@    

,)02(rahcrav	       2rehto@    

,)02(rahcrav	       1rehto@    

,)1(rahc       galf_tluafed@    

理管系关品商商应供--        ,)1(rahc    lrtc_metipus_sg@    

号证凭始原--        ,)81(rahc      on_rehcuov_ip@    

,)2(rahc	       snart_dlo@    

额金--   ,)4,61(ciremun	       tma_latot@    

,emitetad    etad_dilav_meti@    

,)4,5(ciremun	             xat@    

,)4,61(ciremun	         tma_bus@    

价单售零--,   )4,61(ciremun	     ecirp_dilav@    

价单货进--,   )4,61(ciremun	      ecirp_igro@    

量数品赠--,   )4,61(ciremun	          2mun@    

量数--,   )4,61(ciremun	          ytq_laer@    

量数--,   )4,61(ciremun          ytq_redro@    

码代品货--,        )02(rahc	         on_meti@    

,)1(rahc	       galf_tcca@    

,)1(rahc	      galf_snart@    

,)1(rahc	       yaw_elas@    

,)4(rahc	         di_tped@    

,)4(rahc	     nam_mrifnoc@    

,)4(rahc	         di_repo@    

,)4(rahc	       nam_redro@    

,)1(rahc	  sutats_redro@    

,   )4,61(ciremun	    tma_redro@    

期效有单订--,   emitetad	       etad_dilav@    

期日核审--,   emitetad	       etad_krow@    

期日作操--,   emitetad	       etad_repo@    

核审-1，核审未-0--  志标批审--,      )1(rahc	   galf_evorppa@    

志标调协--      ,)1(rahc	      galf_tped@    

期日款付--,   emitetad	        etad_yap@    

式方款付--,         )2(rahc	        yaw_yap@    

种币--,         )3(rahc	         on_nioc@    

码代户客商应供--,        )8(rahc	     on_tsucpus@    

号证凭始原--,         )81(rahc	      on_rehcuov@    

码代地的目--,        )6(rahc	    on_hcnarb_d@    

码代店本--,        )6(rahc	       on_hcnarb@    

式方库入出--,      )1(rahc	        on_bd@    

式方作操存库--,         )2(rahc	      on_snart@    

号单作工--, )81(rahc		  on_teehs@    

eralced  


nruter )galf_evorppa(etadpu ton fi  

nigeb

sa

 etadpu rof

  retsam_teehs_mp_t no retsam_teehs_mp_rt reggirt etaerc



og

retsam_teehs_mp_rt reggirt pord  

)'retsam_teehs_mp_rt'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$tr_rm_saleflow(MS).sql^^^^

dne


dne	

dne   	

)tmAelas_nl@,on_wolf@,)021,03 * shtnom_retfa@ + )(etadteg,)01(rahc(trevnoc,)(etadteg,'0',di_drac@,ONhcnarb_sl@,'9','01'(seulaV  		

)tma_tsilevas,on_wolf,etad_dnes,etad_repo,galf_dnes,di_drac,on_hcnarb,epyt_repo,epyt_ssem(egassem_piv_t_ssem OTNI TRESNI  		

)on_wolf@=on_wolf dna '9'=epyt_repo dna '01'=epyt_ssem erehw egassem_piv_t_ssem morf 1 tceles( stsixe ton fi  		

nigeb   	

)'1' = eulav_sl@ dna 0 > shtnom_retfa@( fi   	


'shtnom_retfa_esu' = di_rav_sys	 erehW metsys_sys_t MORF  )'0',eulav_rav_sys(llunsi = eulav_sl@ TCELES   	

'shtnom_retfa' = di_rav_sys	erehW metsys_sys_t MORF	)0,eulav_rav_sys(llunsi = shtnom_retfa@	 TCELES   	


dne   	

)tmAelas_nl@,on_wolf@,)021,7 * skeew_retfa@ + )(etadteg,)01(rahc(trevnoc,)(etadteg,'0',di_drac@,ONhcnarb_sl@,'8','01'(seulaV  		

)tma_tsilevas,on_wolf,etad_dnes,etad_repo,galf_dnes,di_drac,on_hcnarb,epyt_repo,epyt_ssem(egassem_piv_t_ssem OTNI TRESNI  		

)on_wolf@=on_wolf dna '8'=epyt_repo dna '01'=epyt_ssem erehw egassem_piv_t_ssem morf 1 tceles( stsixe ton fi  		

nigeb   	

)'1' = eulav_sl@ dna 0 > skeew_retfa@( fi   	


'skeew_retfa_esu' = di_rav_sys	 erehW metsys_sys_t MORF  )'0',eulav_rav_sys(llunsi = eulav_sl@ TCELES		

'skeew_retfa' = di_rav_sys	erehW metsys_sys_t MORF )0,eulav_rav_sys(llunsi = skeew_retfa@ TCELES		


dne   	

)tmAelas_nl@,on_wolf@,)021,syad_retfa@ + )(etadteg,)01(rahc(trevnoc,)(etadteg,'0',di_drac@,ONhcnarb_sl@,'7','01'(seulaV  		

)tma_tsilevas,on_wolf,etad_dnes,etad_repo,galf_dnes,di_drac,on_hcnarb,epyt_repo,epyt_ssem(egassem_piv_t_ssem OTNI TRESNI  		

)on_wolf@=on_wolf dna '7'=epyt_repo dna '01'=epyt_ssem erehw egassem_piv_t_ssem morf 1 tceles( stsixe ton fi  		

nigeb   	

)'1' = eulav_sl@ dna 0 => syad_retfa@( fi   	


'syad_retfa_esu' = di_rav_sys	 erehW metsys_sys_t MORF )'0',eulav_rav_sys(llunsi = eulav_sl@ TCELES		

'syad_retfa' = di_rav_sys	 erehW metsys_sys_t MORF )0,eulav_rav_sys(llunsi = syad_retfa@ TCELES		

nigeb	

 0 > )))di_drac@(mirtr(mirtl(nel fi	

。醒提信短送发后月N，周N、天N费消员会--	


31-60-0102 jsgnat 蔽屏处此，理处detimil_evas_fo中niam_w_liater在量售已新更--

dne   

dne       

)dI_wolf@,galf_pus_meti@,on_tsucpus@,'0',etar_yl_pus@,'C',ytQelas_nl@ - ytq_kcots@ ,'售销台前',on_wolf@,di_repo@,'-','TP',ONhcnarb_sl@,crPecruos_nl@,ecirp_tsoc@,0,crPelas_nl@,ytQelas_nl@,ONmeti_sl@,emiTetaDelas_tdl@( seulav             

 )di_sop,yaw_elas_pus,on_pus,galf_yap,etar_yl_pus,yaw_elas,ytnq_erp,omem,on_rehcuov,di_repo,on_bd,on_snart,on_hcnarb,ecirp_elas,ecirp_tsoc,tma_teehs,ecirp,ytq_laer,on_meti,etad_repo(wolf_mi_t otni tresni             

送赠 -- 'C'=yaWelas_sl@ fi esle          

)dI_wolf@,galf_pus_meti@,on_tsucpus@,'0',etar_yl_pus@,'B',ytQelas_nl@ - ytq_kcots@ ,'售销台前',on_wolf@,di_repo@,'-','TP',ONhcnarb_sl@,crPecruos_nl@,ecirp_tsoc@,tmAelas_nl@,crPelas_nl@,ytQelas_nl@,ONmeti_sl@,emiTetaDelas_tdl@( seulav             

 )di_sop,yaw_elas_pus,on_pus,galf_yap,etar_yl_pus,yaw_elas,ytnq_erp,omem,on_rehcuov,di_repo,on_bd,on_snart,on_hcnarb,ecirp_elas,ecirp_tsoc,tma_teehs,ecirp,ytq_laer,on_meti,etad_repo(wolf_mi_t otni tresni             

货退 -- 'B'=yaWelas_sl@ fi esle          

)dI_wolf@,galf_pus_meti@,on_tsucpus@,'0',etar_yl_pus@,'A',ytQelas_nl@ - ytq_kcots@ ,'售销台前',on_wolf@,di_repo@,'-','TP',ONhcnarb_sl@,crPecruos_nl@,ecirp_tsoc@,tmAelas_nl@,crPelas_nl@,ytQelas_nl@,ONmeti_sl@,emiTetaDelas_tdl@( seulav             

 )di_sop,yaw_elas_pus,on_pus,galf_yap,etar_yl_pus,yaw_elas,ytnq_erp,omem,on_rehcuov,di_repo,on_bd,on_snart,on_hcnarb,ecirp_elas,ecirp_tsoc,tma_teehs,ecirp,ytq_laer,on_meti,etad_repo(wolf_mi_t otni tresni             

售销 -- 'A'=yaWelas_sl@ fi          

nigeb       

esle       

dne       

nruter 0 =! rorre@@ fi           

yaWelas_sl@,on_wolf@,di_repo@,ONhcnarb_sl@,crPelas_nl@,ytQelas_nl@,ONmeti_sl@,emiTetaDelas_tdl@ wolf_metibmoc_rp cexe           

nigeb       

)'1'= ats_enibmoc dna ONmeti_sl@=on_meti erehw ofni_meti_db_t morf 1 tceles(stsixe fi       

水流写品商份成将则是，品商合组销促为否是断判 --       

       

)0 ,etar_yl_pus@(llunsi = etar_yl_pus@ tceles        


        

    dne        

)率扣营联-1( * 价售 = 价本成，品商营联 --  ) )0,etar_yl_pus@(llunsi -1( * crPelas_nl@ = ecirp_tsoc@ tes			

存库理管不品商营联用启 --  '1' = kcots_meti_pus@ fi			

 etar_ced_edl@ =etar_yl_pus@ tceles				

 0 >< etar_ced_edl@ dna )llun ton si etar_ced_edl@( fi			

            nigeb        

商应供营联-- 'C' = galf_pus_meti@ fi        

        

on_tsucpus@=on_tsucpus erehw  ofni_tsucpus_db_t morf yaw_elas=galf_pus_meti@ tceles--        

ONmetI_sl@ = on_meti erehw ofni_meti_db_t morf tsucpus_niam=on_tsucpus@,etar_pus=etar_yl_pus@ ,galf_pus_meti=galf_pus_meti@ tceles        

存库新更--        

nigeb   

)      

)'3'=epyt_kcots@( ro )'6' = epyt_kcots@(        

ro )'5' = epyt_kcots@ dna )3,ONhcnarb_sl@(tfel = )3,hcnarb_lacol@(tfel(        

 ro )ONhcnarb_sl@ = hcnarb_lacol@( ( fI   

存库新更 ,水流存库写 录记的店管代 者或 售销)库仓下店本(店本--   

60-60-9002 sjuw yb deifidoM--   

   

dne   

nam_elas@=di_elas dna etaDrepo_sl@=etad_repo dna ONmetI_sl@=on_meti dna ONhcnarb_sl@=on_hcnarb erehw          

)0,tma_etar_ytud(llunsi =	  tma_etar_ytud      	

,)0,tma_etar_nruter(llunsi =	 tma_etar_nruter      	

,)0,tma_etar_dnarb(llunsi =	tma_etar_dnarb      	

, )0,tma_etar_sslc(llunsi =	 tma_etar_sslc      	

,)0,tma_noitar_elas(llunsi =	tma_noitar_elas      	

额成提算计不送赠-- , )0,tma_etar_elas(llunsi =	 tma_etar_elas      	

,'0'=galf_moc              

,etar_elas_nl@=etar_elas              

,crPelas_nl@=ecirp_elas              

,tmAelas_nl@+tma_dnes_sop=tma_dnes_sop              

,ytQelas_nl@+ytq_dnes_sop=ytq_dnes_sop              

tes musyad_namelas_ad_t etadpu          

  送赠 -- 'C'=yaWelas_sl@ fi esle       

nam_elas@=di_elas dna etaDrepo_sl@=etad_repo dna ONmetI_sl@=on_meti dna ONhcnarb_sl@=on_hcnarb erehw          

tma_etar_ytud@ +	 )0,tma_etar_ytud(llunsi =	  tma_etar_ytud      	

,tma_etar_nruter@ +	 )0,tma_etar_nruter(llunsi =	 tma_etar_nruter      	

,tma_etar_dnarb@ +	 )0,tma_etar_dnarb(llunsi =	tma_etar_dnarb      	

,tma_etar_sslc@ +	 )0,tma_etar_sslc(llunsi =	 tma_etar_sslc      	

,tma_noitar_elas@ +	 )0,tma_noitar_elas(llunsi =	tma_noitar_elas      	

去减额金的成提算计原将要需货退--  ,tma_etar_elas@ +	 )0,tma_etar_elas(llunsi =	 tma_etar_elas      	

,'0'=galf_moc              

,etar_elas_nl@=		etar_elas              

,tmAtcd_nl@ -		 tma_tcd_sop=	tma_tcd_sop              

,crPelas_nl@=	ecirp_elas              

,tmAelas_nl@ +		tma_ter_sop=	tma_ter_sop              

,ytQelas_nl@ +		ytq_ter_sop=	ytq_ter_sop              

tes musyad_namelas_ad_t etadpu          

货退 -- 'B'=yaWelas_sl@ fi esle       

nam_elas@=di_elas dna etaDrepo_sl@=etad_repo dna ONmetI_sl@=on_meti dna ONhcnarb_sl@=on_hcnarb erehw          

tma_etar_ytud@ +	 )0,tma_etar_ytud(llunsi =	  tma_etar_ytud     	

,tma_etar_nruter@ +	 )0,tma_etar_nruter(llunsi =	 tma_etar_nruter     	

,tma_etar_dnarb@ +	 )0,tma_etar_dnarb(llunsi =	tma_etar_dnarb     	

,tma_etar_sslc@ +	 )0,tma_etar_sslc(llunsi =	 tma_etar_sslc     	

,tma_noitar_elas@ +	 )0,tma_noitar_elas(llunsi =	tma_noitar_elas     	

额金成提的应相加增要需售销--,tma_etar_elas@ +	 )0,tma_etar_elas(llunsi =	 tma_etar_elas     	

,'0'=galf_moc             

,etar_elas_nl@=		etar_elas             

,tmAtcd_nl@ +		 tma_tcd_sop=	tma_tcd_sop             

,crPelas_nl@=		ecirp_elas             

,tmAelas_nl@ +		tma_sop=		tma_sop             

,ytQelas_nl@ +		ytq_sop=		ytq_sop             

tes musyad_namelas_ad_t etadpu          

售销 -- 'A'=yaWelas_sl@ fi       

nigeb   

新更，在存已细明 --  esle   

dne   

)0,0,0,0,0,0,'0',0,etar_elas_nl@,crPelas_nl@,tmAelas_nl@,0,0,ytQelas_nl@,0,0,ecirp_tsoc@,nam_elas@,etaDrepo_sl@,ONmetI_sl@,ONhcnarb_sl@( seulav          

)tma_etar_ytud,tma_etar_nruter,tma_etar_dnarb,tma_etar_sslc,tma_noitar_elas,tma_etar_elas,galf_moc,tma_tcd_sop,etar_elas,ecirp_elas,tma_dnes_sop,tma_ter_sop,tma_sop,ytq_dnes_sop,ytq_ter_sop,ytq_sop,ecirp_tsoc,di_elas,etad_repo,on_meti,on_hcnarb(musyad_namelas_ad_t otni tresni          

送赠 -- 'C'=yaWelas_sl@ fi esle       

)tma_etar_ytud@,tma_etar_nruter@,tma_etar_dnarb@,tma_etar_sslc@,tma_noitar_elas@,tma_etar_elas@,'0',tmAtcd_nl@-,etar_elas_nl@,crPelas_nl@,0,tmAelas_nl@,0,0,ytQelas_nl@,0,ecirp_tsoc@,nam_elas@,etaDrepo_sl@,ONmetI_sl@,ONhcnarb_sl@( seulav          

)tma_etar_ytud,tma_etar_nruter,tma_etar_dnarb,tma_etar_sslc,tma_noitar_elas,tma_etar_elas,galf_moc,tma_tcd_sop,etar_elas,ecirp_elas,tma_dnes_sop,tma_ter_sop,tma_sop,ytq_dnes_sop,ytq_ter_sop,ytq_sop,ecirp_tsoc,di_elas,etad_repo,on_meti,on_hcnarb(musyad_namelas_ad_t otni tresni          

货退 -- 'B'=yaWelas_sl@ fi esle       

)tma_etar_ytud@,tma_etar_nruter@,tma_etar_dnarb@,tma_etar_sslc@,tma_noitar_elas@,tma_etar_elas@,'0',tmAtcd_nl@,etar_elas_nl@,crPelas_nl@,0,0,tmAelas_nl@,0,0,ytQelas_nl@,ecirp_tsoc@,nam_elas@,etaDrepo_sl@,ONmetI_sl@,ONhcnarb_sl@( seulav          

)tma_etar_ytud,tma_etar_nruter,tma_etar_dnarb,tma_etar_sslc,tma_noitar_elas,tma_etar_elas,galf_moc,tma_tcd_sop,etar_elas,ecirp_elas,tma_dnes_sop,tma_ter_sop,tma_sop,ytq_dnes_sop,ytq_ter_sop,ytq_sop,ecirp_tsoc,di_elas,etad_repo,on_meti,on_hcnarb(musyad_namelas_ad_t otni tresni          

         售销 -- 'A'=yaWelas_sl@ fi       

nigeb   

加增，在存不细明 -- '0'=galFtsixEmetI_sl@ fi   

	


	 额成提务职员业营品商本--	etar_ytud_elas_nl@ * tmAelas_nl@ =  tma_etar_ytud@ tceles	

di_repo@ = di_sbin.b dna  di_elas.b = di_elas.a erehw  b liated_namelas_mr_t,  a namelas_mr_t morf ) 0 ,etar_ytud_elas (llunsi  = etar_ytud_elas_nl@ tceles	

额成提属上应对员作操该到得--   

额成提员业营品商本--		  etar_elas_nl@ * tmAelas_nl@ =tma_etar_nruter@ tceles	

额成提牌品品商本--		 etar_dnarb_nl@ * tmAelas_nl@ = tma_etar_dnarb@ tceles	

额成提别类品商本--		  etar_sslc_nl@ * tmAelas_nl@ =  tma_etar_sslc@ tceles	

额成提售销品商本--		   etarelas_nl@ * tmAelas_nl@ =  tma_etar_elas@ tceles	

)musyad_namelas_ad_t(表结日员业营写 --   


'1'=galFtsixEmetI_sl@ tceles      

在存已 --  esle   

'0'=galFtsixEmetI_sl@ tceles      

在存不 -- ))nam_elas@ = di_elas dna  etaDrepo_sl@=etad_repo dna ONmetI_sl@=on_meti dna ONhcnarb_sl@=on_hcnarb(erehw musyad_namelas_ad_t morf * tceles(stsixe ton fi   

在存已否是中表结日员业营在找查 --   

	

dne	

 di_repo@=di_repo dna ONhcnarb_sl@=on_hcnarb dna etaDrepo_sl@=etad_repo  erehw          

'0'=galf_moc,tmAecruos_nl@ + )0,tma_vig(llunsi = tma_vig tes vig_musyad_rehsac_mr_t etadpu          

esle       

) '0',tmAecruos_nl@,di_repo@,ONhcnarb_sl@,etaDrepo_sl@(seulav               

)galf_moc,tma_vig,di_repo,on_hcnarb,etad_repo(vig_musyad_rehsac_mr_t otni tresni      	

'0'=galFtsixEmetI_sl@ fi   	

'1'=galFtsixEmetI_sl@ tceles      	

在存已 --  esle   	

'0'=galFtsixEmetI_sl@ tceles       	

在存不 -- ))etaDrepo_sl@=etad_repo dna di_repo@=di_repo dna ONhcnarb_sl@=on_hcnarb(erehw      	

vig_musyad_rehsac_mr_t morf * tceles(stsixe ton fi   	

nigeb	

'C'=yaWelas_sl@ fi	

在存已否是中表送赠员银收在找查 --   

   

dne   

etaDrepo_sl@=etad_repo dna ONmetI_sl@=on_meti dna ONhcnarb_sl@=on_hcnarb erehw             

'0'=galf_moc               

,crPelas_nl@=ecirp_elas               

,tmAelas_nl@+tma_vig=tma_vig               

,ytQelas_nl@+ytq_vig=ytq_vig               

tes musyad_mr_t etadpu            

送赠 -- 'C'=yaWelas_sl@ fi esle       

etaDrepo_sl@=etad_repo dna ONmetI_sl@=on_meti dna ONhcnarb_sl@=on_hcnarb erehw             

'0'=galf_moc               

,tmAtcd_nl@ - tnuoma_tcd=tnuoma_tcd               

,crPelas_nl@=ecirp_elas               

,tmAelas_nl@+tma_ter=tma_ter               

,ytQelas_nl@+ytq_ter=ytq_ter               

tes musyad_mr_t etadpu            

货退 -- 'B'=yaWelas_sl@ fi esle       

etaDrepo_sl@=etad_repo dna ONmetI_sl@=on_meti dna ONhcnarb_sl@=on_hcnarb erehw             

'0'=galf_moc                

,tmAtcd_nl@ + tnuoma_tcd=tnuoma_tcd                

,crPelas_nl@=ecirp_elas                

,tmAelas_nl@+tma_elas=tma_elas                

,ytQelas_nl@+ytq_elas=ytq_elas                

tes musyad_mr_t etadpu            

售销 -- 'A'=yaWelas_sl@ fi       

nigeb   

新更，在存已细明 --  esle   

dne   

)0,0,crPelas_nl@,tmAelas_nl@,0,0,ytQelas_nl@,0,0,etaDrepo_sl@,ONmetI_sl@,ONhcnarb_sl@( seulav         

)tnuoma_tcd,ytq_erp,ecirp_elas,tma_vig,tma_ter,tma_elas,ytq_vig,ytq_ter,ytq_elas,etad_repo,on_meti,on_hcnarb(musyad_mr_t otni tresni         

送赠 -- 'C'=yaWelas_sl@ fi esle       

)tmAtcd_nl@-,0,crPelas_nl@,0,tmAelas_nl@,0,0,ytQelas_nl@,0,etaDrepo_sl@,ONmetI_sl@,ONhcnarb_sl@( seulav         

)tnuoma_tcd,ytq_erp,ecirp_elas,tma_vig,tma_ter,tma_elas,ytq_vig,ytq_ter,ytq_elas,etad_repo,on_meti,on_hcnarb(musyad_mr_t otni tresni         

货退 -- 'B'=yaWelas_sl@ fi esle       

)tmAtcd_nl@,0,crPelas_nl@,0,0,tmAelas_nl@,0,0,ytQelas_nl@,etaDrepo_sl@,ONmetI_sl@,ONhcnarb_sl@( seulav         

)tnuoma_tcd,ytq_erp,ecirp_elas,tma_vig,tma_ter,tma_elas,ytq_vig,ytq_ter,ytq_elas,etad_repo,on_meti,on_hcnarb(musyad_mr_t otni tresni         

售销 -- 'A'=yaWelas_sl@ fi       

nigeb   

加增，在存不细明 -- '0'=galFtsixEmetI_sl@ fi   

trats.............................................)muSyad_mr_t(表结日售销品商写 --   

   

'1'=galFtsixEmetI_sl@ tceles      

在存已 --  esle   

'0'=galFtsixEmetI_sl@ tceles      

在存不 -- ))etaDrepo_sl@=etad_repo dna ONmetI_sl@=on_meti dna ONhcnarb_sl@=on_hcnarb(erehw      

musyad_mr_t morf * tceles(stsixe ton fi   

在存已否是中表结日售销品商在找查 --   

   

)121,emiTetaDelas_tdl@,)01(rahc(trevnoc=etaDrepo_sl@ tceles   

ddmmyyyy='211'：为式格，）天当（期日型符字换转 --   

   

   

0 = tmAtcd_nl@ tceles )''=)galf_ceps_sl@(mirtl ro llun si galf_ceps_sl@( fi   

额金利让取接直 --   

   

)0,ytq_kcots@(llunsi = ytq_kcots@ tceles   

ONmetI_sl@ = on_meti dna ONhcnarb_sl@ = on_hcnarb erehw kcots_hcnarb_mi_t morf )0,ytq_kcots(llunsi = ytq_kcots@ tceles   

   

)4  ,crPelas_nl@ * ytQelas_nl@(dnuor =   tmAelas_nl@ tceles   

)4,crPecruos_nl@ * ytQelas_nl@(dnuor = tmAecruos_nl@ tceles   

数小位四取额金 额金售销的际实和额金售销的定预来原算计 --   

   

dnE   

/*      

nruter         

))3,ONhcnarb_sl@(tfel >< )3,hcnarb_lacol@(tfel ( ro '8' = epyt_kcots@ ro '7' = epyt_kcots@ fi      

据数表报的他其成生据数水流售销由部总在后然,流售销传上式方输传的新 *      

50-60-9002 sjuw yb detnemmoC  */      

ONhcnarb_sl@ = on_hcnarb EREHW ofni_hcnarb_db_t MORF epyt_edart = epyt_kcots@ TCELES      

nigeB   

ONhcnarb_sl@ >< hcnarb_lacol@ fI   

   

detresni morf etar_ytud_elas,etar_elas,etar_dnarb,etar_sslc,di_orp,on_drac,di_drac,etar_ced,mun_cca,ecirp_ni,tma_ferp,galf_ceps,galf_moc,on_tfihs			

,etad_repo,nam_elas,di_repo,yaw_lles,yenom_elas,ytnq_elas,ecirp_tsoc,ecirp_elas,ecirp_ecruos,on_meti,on_hcnarb,on_wolf,di_wolf tceles		

)etar_ytud_elas,etar_elas,etar_dnarb,etar_sslc,di_orp,on_drac,di_drac,etar_ced,mun_cca,ecirp_ni,tma_ferp,galf_ceps,galf_moc,on_tfihs			

,etad_repo,nam_elas,di_repo,yaw_lles,yenom_elas,ytnq_elas,ecirp_tsoc,ecirp_elas,ecirp_ecruos,on_meti,on_hcnarb,on_wolf,di_wolf(pukcab_wolfelas_mr_t otni tresni   

息信等水流款付及水流库入出有但，失丢据数水流售销现出下况情常异免以，据数水流份备先 10303102 no lil yb dedda--   

   

'on_kcots_g' = di_rav_sys EREHW metsys_sys_t MORF )'' ,eulav_rav_sys(llunsi = hcnarb_lacol@ TCELES   

   

detresni morf      

成提额定--on_tfihs=	tma_noitar_elas@	

,etar_ced=	    etar_ced_edl@	

,etar_ytud_elas=	 etar_ytud_elas_nl@	

,etar_dnarb=		etar_dnarb_nl@	

,etar_sslc=		etar_sslc_nl@        

,etar_elas=		 etar_elas_nl@	

,mun_cca=		etarelas_nl@        

,nam_elas=		nam_elas@        

,di_repo=		 di_repo@        

,ecirp_tsoc=		 ecirp_tsoc@        

,tma_ferp=		tmAtcd_nl@        

,galf_ceps=		galf_ceps_sl@        

,etad_repo=	emiTetaDelas_tdl@        

,yaw_lles=		yaWelas_sl@        

,ecirp_elas=		crPelas_nl@        

,ecirp_ecruos=		crPecruos_nl@        

,ytnq_elas=		ytQelas_nl@        

,di_drac=		di_drac@	

,on_meti=		ONmetI_sl@        

,on_hcnarb=		ONhcnarb_sl@        

,on_wolf=		 on_wolf@        

,di_wolf=		 dI_wolf@  tceles      


'kcots_meti_pus'=di_rav_sys erehw metsys_sys_t morf )'0',eulav_rav_sys(llunsi = kcots_meti_pus@ tceles      


据数水流售销前当 --   

 。信短送发后月N费消员会--  	tni			shtnom_retfa@      

。信短送发后周N费消员会--  ,tni			skeew_retfa@      

。信短送发后天N费消员会--  ,tni			syad_retfa@      

  额成提例比案档--	,)4,61(ciremun		tma_etar_elas@      

额成提额定案档--  ,)4,61(ciremun		tma_noitar_elas@      

存库理管不品商营联用启 -- ,)1(rahc kcots_meti_pus@      

式方成提案档--	,)1(rahc		epyt_mfpd@      

额成提务职员业营--	,)4,61(ciremun		tma_etar_ytud@      

    额成提员业营--	,)4,61(ciremun		tma_etar_nruter@      

    额成提牌品品商--	,)4,61(ciremun		tma_etar_dnarb@      

  额成提别类品商--	,)4,61(ciremun		tma_etar_sslc@      

     率比成提务职员业营--	,)4,61(ciremun	 etar_ytud_elas_nl@      

率比成提牌品品商--	 ,)4,61(ciremun		 etar_dnarb_nl@      

率比成提别类品商--	 ,)4,61(ciremun		 etar_sslc_nl@      

率比成提案档品商--  ,)4,61(ciremun		  etarelas_nl@      

量限场全--	,)4,61(ciremun		 ytq_detimil_nl@      

地本否是--	     ,)1(rahc		 hcnarb_lacolsi@      

,)8(rahc		 on_tsucpus@      

率扣营联--	 ,)4,61(ciremun		etar_ced_edl@      

率扣营联--	 ,)4,61(ciremun		 etar_pmt_nl@      

率扣营联--	 ,)4,61(ciremun		 etar_yl_pus@      

,)1(rahc		 galf_pus_meti@      

率比成提员业营--	 ,)4,61(ciremun		 etar_elas_nl@      

员业营--	 ,)6(rahc		  nam_elas@      

,)6(rahc		 hcnarb_lacol@      

 型类店门--	    ,)1(rahc		 epyt_kcots@      

,)4,61(ciremun		 ytq_kcots@      

,)3(ciremun			 dI_wolf@      

,)1(rahc                 eulav_sl@      

,)81(rahc			 on_wolf@      

,)6(rahc			 di_repo@      

,)4,61(ciremun		 ecirp_tsoc@      

,)01(rahcrav		 galf_ceps_sl@      

在存已='1'；在存不='0'，志标在存已否是中)muSyad_mr_t(表结日售销品商在品商细明 --	   ,)1(rahc	 galFtsixEmetI_sl@      

ddmmyyyy：为式格，）天当（期日型符字 --       ,)01(rahc		 etaDrepo_sl@      

间时售销 --	   ,emitetad	 emiTetaDelas_tdl@      

卡员会 --		,)02(rahc			di_drac@      

式方售销 --        ,)1(rahc		 yaWelas_sl@      

.额金扣折品商--  ,)4,61(ciremun		 tmAtcd_nl@      

额金售销品商 --  ,)4,61(ciremun		 tmAelas_nl@      

额金售销的定预来原品商 --  ,)4,61(ciremun		tmAecruos_nl@      

价单售销品商 --  ,)4,61(ciremun		 crPelas_nl@      

价单的定预来原品商 --  ,)4,61(ciremun		 crPecruos_nl@      

量数售销品商 --  ,)4,61(ciremun		 ytQelas_nl@      

码编品商 --       ,)02(rahc		 ONmetI_sl@      

码编库仓 --	       ,)6(rahc		 ONhcnarb_sl@ eralced  


nigeb

sa

tresni rof

 wolfelas_mr_t no wolfelas_mr_rt reggirt etaerC


og

wolfelas_mr_rt reggirt pord  

)'wolfelas_mr_rt'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$tr_rm_tend_vip_conver_detail_insert(MS).sql^^^^

dne

	

)on_meti_sl@,'0','7',tma_musnoc_nl@,didrac_sl@,on_hcnarb_sl@,'4'(seulav )on_meti, galf_dnes,epyt_repo,tma_tsilevas,di_drac,on_hcnarb,epyt_ssem(egassem_piv_t_ssem otni tresni	

      

nruter '1' >< )1,eulav_rav_sl@(tfel fi      

nruter '' = )'',eulav_rav_sl@(llunsi ro 0 = )eulav_rav_sl@(nel fi      

      

'on_hcnarb_g' = di_rav_sys erehw metsys_sys_t morf eulav_rav_sys = on_hcnarb_sl@ tceles--       

值构机--       


       

;on_teehs_sl@ = on_teehs erehw retsam_revnoc_piv_dnet_mr_t morF        di_drac =    didrac_sl@ tceles	

; )))'on_kcots_g'(mirtr(mirtl(reppu = )))di_rav_sys(mirtr(mirtl(reppu erehw metsys_sys_t MORF  eulav_rav_sys = on_hcnarb_sl@ tceles	

;)))'revnoc_piv_dnet'(MIRTR(MIRTL(reppU = )))di_rav_sys(MIRTR(MIRTL(reppU EREHW metsys_sys_t_ssem MORF  eulav_rav_sys = eulav_rav_sl@ TCELES	      


detresni morf        	

on_meti =    on_meti_sl@		

,ytq_laer = tma_musnoc_nl@		

,  on_teehs =   on_teehs_sl@	 tceles	

据数前当 --      

      

)02(rahcrav on_teehs_sl@      

,)02(rahcrav on_meti_sl@      

,)01(rahcrav on_hcnarb_g@      

,)01(rahcrav on_hcnarb_sl@      

,)552(rahc eulav_rav_sl@      

,)1(rahc epyt_repo_sl@      

  ,)4,61(ciremun tma_musnoc_nl@      

       ,)02(rahc didrac_sl@ eralced  


nigeb

sa

tresni rof

liated_revnoc_piv_dnet_mr_t no tresni_liated_revnoc_piv_dnet_mr_rt reggirt etaerc


og

tresni_liated_revnoc_piv_dnet_mr_rt reggirt pord  

)'tresni_liated_revnoc_piv_dnet_mr_rt'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$tr_rm_tend_vip_conver_master(MS).sql^^^^


dne

nruter  

1_ruc_oc etacollaed  

1_ruc_oc esolc  

:rorreym

	

dne	

nruter  		

2_ruc_oc etacollaed  		

2_ruc_oc esolc			

dne			

  etadrepo@,tma_dlo@,nam_mrifnoc@,ecirp_elas@,ytq_dlo@,di_wolf@,tma_laer@,ytq_laer@,on_meti@ otni 2_ruc_oc hctef					

		dne					

on_meti@ = on_meti dna         			

di_drac@ = di_drac erehw	       			

etadrepo@ = etadrepo_laer   				

,ecirp_elas@=ecirp_elas           			

,tma_laer@ + tma_timil=tma_timil           			

,ytq_laer@ + ytq_timil=ytq_timil tes	       			

ofni_piv_dnet_mr_t etadpu						

	

							

rorreym otog 0 =! rorre@@ fi							

							

;)nam_mrifnoc@,ecirp_elas@,ytq_laer@,ytq_laer@ + ytq_dlo@,on_meti@,on_teehs@,on_drac@,di_drac@,etad_krow@,on_hcnarb@( seulav							

)di_repo,ecirp_elas,ytq_laer,ytq_niamer,on_meti,on_wolf,on_drac,di_drac,etad_repo,on_hcnarb(liated_dda_dnet_mr_t otni tresni							

  	  	  		

)ytq_laer@ + ytq_dlo@(/)tma_laer@ + tma_dlo@( = ecirp_elas@ tceles						

esle					

0= ecirp_elas@ tceles						

0=ytq_laer@ + ytq_dlo@ fi    	  	  		

nigeb  	  		

'0000' >< on_meti@ fi  	  		

nigeb  		

0=sutats_hctef@@ elihw  		

etadrepo@,tma_dlo@,nam_mrifnoc@,ecirp_elas@,ytq_dlo@,di_wolf@,tma_laer@,ytq_laer@,on_meti@ otni 2_ruc_oc hctef  		

2_ruc_oc nepo  		

零为得不量数据单--  )0>1mun.b(  dna-- )'1' = galf_evorppa.a( dna      		

) on_teehs.b = on_teehs.a ( erehw    		

b liated_revnoc_piv_dnet_mr_t ,a detresni morf    		

etadrepo_laer.b,tma_dlo.b,nam_mrifnoc.a,ecirp_elas.b,ytq_dlo.b,di_wolf.b,1mun.b,ytq_laer.b,on_meti.b tceles    		

rof rosruc 2_ruc_oc eralced		

nigeb	

'FC' = on_snart@ fi esle	

dne	

nruter 		

1_ruc_oc etacollaed  		

1_ruc_oc esolc  		


dne  		

di_wolf@,tma_laer@,ytq_laer@,on_meti@ otni 1_ruc_oc hctef    		

      		

di_wolf@ = di_wolf.liated_revnoc_piv_dnet_mr_t dna      		

on_meti.liated_revnoc_piv_dnet_mr_t = on_meti.ofni_piv_dnet_mr_t dna      		

di_drac@ = di_drac.ofni_piv_dnet_mr_t erehw    		

ofni_piv_dnet_mr_t,liated_revnoc_piv_dnet_mr_t morf     		

ecirp_elas.ofni_piv_dnet_mr_t * ytq_laer.ofni_piv_dnet_mr_t - tma_timil.ofni_piv_dnet_mr_t = tma_niamer         		

,ytq_laer.ofni_piv_dnet_mr_t - ytq_timil.ofni_piv_dnet_mr_t = ytq_niamer tes     		

liated_revnoc_piv_dnet_mr_t etadpu    		

    		

rorreym otog 0 =! rorre@@ fi    		

		

on_meti@ = on_meti dna         		

di_drac@ = di_drac erehw       		

tma_laer@ + tma_timil=tma_timil           		

,ytq_laer@ + ytq_timil=ytq_timil tes       		

ofni_piv_dnet_mr_t etadpu       		

		

 '0000' >< on_meti@ fi    		

nigeb  		

0=sutats_hctef@@ elihw  		

di_wolf@,tma_laer@,ytq_laer@,on_meti@ otni 1_ruc_oc hctef  		

1_ruc_oc nepo  		

零为得不量数据单--  )0>1mun.b(  dna-- )'1' = galf_evorppa.a( dna      		

) on_teehs.b = on_teehs.a ( erehw    		

b liated_revnoc_piv_dnet_mr_t ,a detresni morf    		

di_wolf.b,1mun.b,ytq_laer.b,on_meti.b tceles    		

rof rosruc 1_ruc_oc eralced  		

  		

dne			

rorreym otog 0 =! rorre@@ fi  				

  				

on_teehs@ = on_teehs.retsam_revnoc_piv_dnet_mr_t dna    				

on_meti_iro.retsam_revnoc_piv_dnet_mr_t = on_meti.ofni_piv_dnet_mr_t dna    				

di_drac.retsam_revnoc_piv_dnet_mr_t = di_drac.ofni_piv_dnet_mr_t erehw  				

ofni_piv_dnet_mr_t,retsam_revnoc_piv_dnet_mr_t morf  				

ytq_laer.ofni_piv_dnet_mr_t - ytq_timil.ofni_piv_dnet_mr_t = ytq_niamer tes  				

retsam_revnoc_piv_dnet_mr_t etadpu  				

  				

rorreym otog 0 =! rorre@@ fi  				

  				

on_meti_iro@ = on_meti dna  				

di_drac@ = di_drac erehw  				

tma_teehs@ - tma_timil=tma_timil      				

,ytq_iro@ - ytq_timil=ytq_timil tes  				

ofni_piv_dnet_mr_t etadpu  				

nigeb  	  

'0000' >< on_meti_iro@ fi  	  

nigeb  

'VC' = on_snart@ fi  

detresni morf  

etad_krow=etad_krow@,on_hcnarb=on_hcnarb@,)2,1,on_teehs(gnirtsbus=on_snart@,on_teehs=on_teehs@,tma_teehs=tma_teehs@,ytq_iro=ytq_iro@,)'',on_meti_iro(llunsi=on_meti_iro@,on_drac = on_drac@,di_drac = di_drac@ tceles  

    

期效有-- emitetad  etadrepo@    

期日核审-- ,emitetad etad_krow@    

,)4(rahc nam_mrifnoc@    

,)4,61(ciremun ecirp_elas@    

,)4,61(ciremun tma_dlo@    

,)0,21(ciremun ytq_dlo@    

,)0 ,41(ciremun di_wolf@    

,)0,21(ciremun     ytq_laer@    

,)02(rahcrav      on_meti@    

,)4,61(ciremun   tma_laer@    

,)4,61(ciremun  tma_teehs@    

,)0,21(ciremun  ytq_iro@    

,)02(rahcrav  on_meti_iro@    

号卡--,)02(rahcrav    on_drac@    

号卡--,)02(rahcrav    di_drac@    

号单作工--, )81(rahc  on_teehs@    

型类据单--,)2(rahc  on_snart@    

库仓--,)6(rahc on_hcnarb@    

eralced  


nruter )galf_evorppa(etadpu ton fi  

nigeb

sa

 etadpu rof

  retsam_revnoc_piv_dnet_mr_t no retsam_revnoc_piv_dnet_mr_rt reggirt etaerc


og

retsam_revnoc_piv_dnet_mr_rt reggirt pord  

)'retsam_revnoc_piv_dnet_mr_rt'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$tr_rm_vip_accflow(MS).sql^^^^

dne

    	

 dne  	

	dne     		

	


dne								

)'0',epyt_drac_ot@,epyt_drac@,didrac_sl@,on_hcnarb_sl@,'1'(seulav )galf_dnes,epyt_drac_ot,epyt_drac,di_drac,on_hcnarb,epyt_ssem(egassem_piv_t_ssem otni tresni 										

 '1' = )1,eulav_rav_sl@(tfel fi        									

)))'epyt_drac'(MIRTR(MIRTL(reppU = )))di_rav_sys(MIRTR(MIRTL(reppU EREHW metsys_sys_t_ssem MORF  )'',eulav_rav_sys(llunsi = eulav_rav_sl@ TCELES									

nigeb								

 0 > wor_ll@ fi								

级升动自卡员会--								

didrac_sl@ = di_drac erehw   epyt_drac_ot@ = epyt_drac tes ofni_piv_mr_t etadpu								

won_tma_etadpu_nl@ > ot_tma_etadpu_nl@ dna epyt_drac_ot@ >< epyt_drac@ dna llun ton si  epyt_drac_ot@ fi							

epyt_drac@ = di_epyt erehw epyt_piv_mr_t morf )0,tma_etadpu(llunsi = won_tma_etadpu_nl@ tceles						

CSA tma_etadpu yb redro								

 tma_musnoc_nl@ =< )0,tma_etadpu(llunsi erehw							

epyt_piv_mr_t morf  )0,tma_etadpu(llunsi = ot_tma_etadpu_nl@,di_epyt = epyt_drac_ot@ tceles						

nigeb     		

额费消按---- '1' = epytpu_piv@ fi    		

	

dne		     	

								

dne						

)'0',epyt_drac_ot@,epyt_drac@,didrac_sl@,on_hcnarb_sl@,'1'(seulav )galf_dnes,epyt_drac_ot,epyt_drac,di_drac,on_hcnarb,epyt_ssem(egassem_piv_t_ssem otni tresni							

 '1' = )1,eulav_rav_sl@(tfel fi							

)))'epyt_drac'(MIRTR(MIRTL(reppU = )))di_rav_sys(MIRTR(MIRTL(reppU EREHW metsys_sys_t_ssem MORF  )'',eulav_rav_sys(llunsi = eulav_rav_sl@ TCELES							

nigeb						

1 = edargpu@ dna 0 > wor_ll@ fi						

级升动自卡员会--						

			dne					

dne						

1 = edargpu@ tes							

didrac_sl@ = di_drac erehw   epyt_drac_ot@ = epyt_drac tes ofni_piv_mr_t etadpu							

nigeb						

  won_cca_etadpu_nl@ >< ot_cca_etadpu_nl@ dna epyt_drac_ot@ >< epyt_drac@ dna llun ton si epyt_drac_ot@ fi						

epyt_drac@ = di_epyt erehw epyt_piv_mr_t morf )0,cca_etadpu(llunsi = won_cca_etadpu_nl@ tceles						

CSA cca_etadpu yb redro						

 mun_cca_won@ =< )0,cca_etadpu(llunsi erehw						

epyt_piv_mr_t morf )0,cca_etadpu(llunsi = ot_cca_etadpu_nl@,di_epyt = epyt_drac_ot@  tceles						

nigeb					

5-21-4102	xzuohz	041853-701141：求需加参，级降能可有式方式方种此 ,级升分积余剩按--	esle					

dne					

dne							

1 = edargpu@ tes								

didrac_sl@ = di_drac erehw   epyt_drac_ot@ = epyt_drac tes ofni_piv_mr_t etadpu								

nigeb							

won_cca_etadpu_nl@ > ot_cca_etadpu_nl@ dna epyt_drac_ot@ >< epyt_drac@ dna llun ton si epyt_drac_ot@ fi							

epyt_drac@ = di_epyt erehw epyt_piv_mr_t morf )0,cca_etadpu(llunsi = won_cca_etadpu_nl@ tceles						

CSA cca_etadpu yb redro								

 mun_cca_nl@ =< )0,cca_etadpu(llunsi erehw							

epyt_piv_mr_t morf )0,cca_etadpu(llunsi = ot_cca_etadpu_nl@,di_epyt = epyt_drac_ot@  tceles						

nigeb					

级升分积计累按--	'0' = epyt_edargpu_fj@ fi				

nigeb		     	

分积按---- '0' = epytpu_piv@ fi    		

didrac_sl@ = di_drac erehw ofni_piv_mr_t morf		

分积余剩--  mun_ced - mun_cca = mun_cca_won@ ,mun_cca = mun_cca_nl@ , tma_musnoc = tma_musnoc_nl@ tceles		

nigeb    	

 '1' = etadpu_piv@ fi  	

         

志标断判级升分积余剩是还分积计累--	)'0' ,epyt_edargpu_fj@(llunsi = epyt_edargpu_fj@ tes   	

	

'0'=epytpu_piv@ tceles	  	

llun si epytpu_piv@ fi  	

		

'0' = etadpu_piv@  tceles		

llun si etadpu_piv@ fi  	

5-21-4102	xzuohz	志标断判级升分积余剩是还分积计累--	'epyt_edargpu_fj' = di_rav_sys erehw metsys_sys_t morf eulav_rav_sys = epyt_edargpu_fj@ tceles	

'epytpu_piv_sop' = di_rav_sys erehw metsys_sys_t  morf eulav_rav_sys=epytpu_piv@ tceles	

'etadpu_piv_sop' = di_rav_sys erehw metsys_sys_t  morf eulav_rav_sys=etadpu_piv@ tceles	

级升动自员会行进-----	    


               

dne			

	

)tma_musnoc_nl@,'6','0',mun_cca_nl@,didrac_sl@,didrac_sl@,on_hcnarb_sl@,'2'(seulav )tma_egnahc,epyt_repo,galf_dnes,mun_cca_vig,drac_rehtaf,di_drac,on_hcnarb,epyt_ssem(egassem_piv_t_ssem otni tresni 					

值储转分积--  					

 '1' = )1,eulav_rav_sl@(tfel fi        				

)))'6vig_piv'(MIRTR(MIRTL(reppU = )))di_rav_sys(MIRTR(MIRTL(reppU EREHW metsys_sys_t_ssem MORF  )'',eulav_rav_sys(llunsi = eulav_rav_sl@ TCELES				

nigeb			

0 > wor_ll@ fi		

'6' = epyt_repo_sl@ fi	

               

dne			

)'3','0',mun_cca_nl@,didrac_sl@,didrac_sl@,on_hcnarb_sl@,'2'(seulav )epyt_repo,galf_dnes,mun_cca_vig,drac_rehtaf,di_drac,on_hcnarb,epyt_ssem(egassem_piv_t_ssem otni tresni					

品商换兑分积-- 					

 '1' = )1,eulav_rav_sl@(tfel fi        				

)))'3vig_piv'(MIRTR(MIRTL(reppU = )))di_rav_sys(MIRTR(MIRTL(reppU EREHW metsys_sys_t_ssem MORF  )'',eulav_rav_sys(llunsi = eulav_rav_sl@ TCELES				

nigeb			

 0 > wor_ll@ fi		

'3' = epyt_repo_sl@ fi	


		

dne			

)tma_musnoc_nl@,'F','0',mun_cca_nl@,didrac_sl@,didrac_sl@,on_hcnarb_sl@,'2'(seulav )tma_egnahc,epyt_repo,galf_dnes,mun_cca_vig,drac_rehtaf,di_drac,on_hcnarb,epyt_ssem(egassem_piv_t_ssem otni tresni						

表此写才时负为分积用-- 0 < mun_cca_nl@ fi					

 '1' = )1,eulav_rav_sl@(tfel fi				

'PIV' = on_nioc dna on_wolf_sl@ = on_wolf erehw  wolfyap_mr_t morf tnuoma_yap = tma_musnoc_nl@ tceles				

)))'fvig_piv'(MIRTR(MIRTL(reppU = )))di_rav_sys(MIRTR(MIRTL(reppU EREHW metsys_sys_t_ssem MORF  )'',eulav_rav_sys(llunsi = eulav_rav_sl@ TCELES				

nigeb			

 0 > wor_ll@ fi		

式款付分积--		

didrac_sl@ = di_drac erehw			

mun_cca_nl@ - )0,mun_ced(llunsi = mun_ced	                

62701102 hygneg yb 蔽屏句此--  ,mun_cca_nl@ + )0,mun_cca(llunsi = mun_cca--			

,mun_cca_nl@ + )0,mun_cca_won(llunsi = mun_cca_won  tes 		  	

 ofni_piv_mr_t etadpu		

中分积用已至加，分积计累减扣不，款付分积--		

 )'F' = epyt_repo_sl@( fi	


dne		

dne					

)on_wolf_sl@,'0','0',tma_musnoc_nl@,mun_cca_nl@,didrac_sl@,on_hcnarb_sl@,'5'( seulav )on_wolf,galf_dnes,epyt_repo,tma_wolf,mun_cca,di_drac,on_hcnarb,epyt_ssem(egassem_piv_t_ssem otni tresni							

 '1' = )1,eulav_rav_sl@(tfel fi        					     

)))'otua_remusnoc'(MIRTR(MIRTL(reppU = )))di_rav_sys(MIRTR(MIRTL(reppU EREHW metsys_sys_t_ssem MORF  )'',eulav_rav_sys(llunsi = eulav_rav_sl@ TCELES						

nigeb					

 0 > wor_ll@ fi				

				

didrac_sl@ = di_drac erehw 				 	

mun_cca_nl@ + )0,mun_cca(llunsi = mun_cca						

,mun_cca_nl@ + )0,mun_cca_won(llunsi = mun_cca_won						

,mun_elas_nl@ + )0,tnuoc_musnoc(llunsi = tnuoc_musnoc						

,tma_musnoc_nl@ + )0,tma_musnoc(llunsi = tma_musnoc  tes 					  	

 ofni_piv_mr_t etadpu				           

esle				

         				

didrac_sl@ = di_drac erehw 				 	

mun_cca_nl@ + )0,mun_cca(llunsi = mun_cca						

,mun_cca_nl@ + )0,mun_cca_won(llunsi = mun_cca_won  tes 				  	

 ofni_piv_mr_t etadpu				   	

 0>tnuoc_l@ fi 			  	

     1 = mun_elas_nl@ tceles 				    	

esle			  	

0 = mun_elas_nl@ tceles				     	

0 = tma_musnoc_nl@ fi			  	

on_wolf_sl@=on_wolf dna didrac_sl@=di_drac erehw tsilevas_piv_mr_t morf   )di_drac(tnuoc=tnuoc_l@ tceles		  	

nigeb		

费消员会--		

 )'0' = epyt_repo_sl@( fi	

		

  'on_hcnarb_g'=di_rav_sys erehw metsys_sys_t morf eulav_rav_sys=on_hcnarb_g@ tceles--	

'metsys_sys_t_ssem' = eman erehw stcejbosys morf )*(tnuoc = wor_ll@ tceles	

表数参信短有否是断判，信短动自--	



 dne			

		

didrac_sl@ = di_drac erehw etad_epo@ = tsal_etadelas tes ofni_piv_mr_t etadpu					

 )tsal_etadelas@ > etad_epo@ ro llun si tsal_etadelas@( fI				

据数的传上网断除排时同，新更不时小期日tsal_etadelas@比期日当--				

				

didrac_sl@ = di_drac erehw etad_epo@ = eerht_etadelas tes ofni_piv_mr_t etadpu					

llun si eerht_etadelas@  fi esle				

didrac_sl@ = di_drac erehw etad_epo@ = owt_etadelas tes ofni_piv_mr_t etadpu					

llun si owt_etadelas@  fi esle				

didrac_sl@ = di_drac erehw etad_epo@ = eno_etadelas tes ofni_piv_mr_t etadpu					

次一新更只且，新更才过新更有没-- llun si eno_etadelas@ fi				

				

didrac_sl@ = di_drac erehw				

ofni_piv_mr_t morf				

tsal_etadelas = tsal_etadelas@,eerht_etadelas = eerht_etadelas@					

,owt_etadelas = owt_etadelas@,eno_etadelas = eno_etadelas@ tceles				

nigeb			

作操才型类的分积-- '0' = epyt_repo_sl@ fI		

52507102间时费消的员会录记--		

		

detresni morf		

etad_epo = etad_epo@		

,on_hcnarb=on_hcnarb_sl@		

,on_wolf=on_wolf_sl@        

,mun_cca=mun_cca_nl@		

,tma_musnoc=tma_musnoc_nl@		

,epyt_repo=epyt_repo_sl@		

,epyt_drac=epyt_drac@		

,di_drac=didrac_sl@	 tceles  	

据数水流分积售销前当 --  	


emitetad tsal_etadelas@		

,emitetad eerht_etadelas@		

,emitetad owt_etadelas@		

费消次一第--,emitetad eno_etadelas@		

,tni tnuoc_ter@	  	

间时作操-- ,emitetad etad_epo@	  	

级升否是员会--	,tib edargpu@      

分积余剩的别类卡前当----,)4,61(ciremun mun_cca_won@      

分积余剩按：2，）式方认默（级升分积计累按：1：型类级升的级升分积按--	,)1(rahc epyt_edargpu_fj@      

,)01(rahcrav on_hcnarb_g@      

,)01(rahcrav on_hcnarb_sl@      

,)552(rahcrav eulav_rav_sl@      

,)0,2(ciremun wor_ll@      

额金费消计累别类卡的到级升要----- ,)4,61(ciremun ot_tma_etadpu_nl@      

额金费消计累的别类卡前当----,)4,61(ciremun won_tma_etadpu_nl@      

分积计累别类卡的到级升要----- ,)4,61(ciremun ot_cca_etadpu_nl@      

分积计累的别类卡前当----,)4,61(ciremun won_cca_etadpu_nl@      

,)02(rahc on_wolf_sl@      

,)0,2(ciremun tnuoc_l@      

别类卡新---- ,)2(rahc epyt_drac_ot@      

别类卡原--,)2(rahc  epyt_drac@      

额费消按 1 分积按 0 则规级升动自--,)1(rahc epytpu_piv@      

别类员会级升动自用启否是--,)1(rahc etadpu_piv@      

数次费消--	,tni mun_elas_nl@      

值分积 --  ,)4,61(ciremun mun_cca_nl@      

额金费消 --    ,)4,61(ciremun tma_musnoc_nl@      

型类作操 --        ,)1(rahc epyt_repo_sl@      

号卡员会 --       ,)02(rahc didrac_sl@ eralced  


nigeb

sa

tresni rof

 tsilcca_piv_mr_t no wolfcca_piv_mr_rt reggirt etaerc


og

wolfcca_piv_mr_rt reggirt pord  

)'wolfcca_piv_mr_rt'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$tr_rm_vip_info_cm(MS).sql^^^^

dne

ruc_tresni etacollaed	

ruc_tresni esolc	

dne	

di_drac@ otni ruc_tresni hctef		

)llun ,)(etadteg ,di_drac@ ,'I' ,'ofni_piv_mr_t'( seulav			

)on_hcnarb ,etad_etadpu ,1yek ,epyt_egnahc ,elbat_moc( atad_mc_sys_t otni tresni		

nigeb	

0=sutats_hctef@@ elihw	

di_drac@ otni ruc_tresni hctef	

ruc_tresni nepo	

ylno daer rof detresni morf di_drac tceles		

rof rosruc ruc_tresni eralced	

入插--	

	

ruc_eteled etacollaed	

ruc_eteled esolc	

dne	  

di_drac@ otni ruc_eteled hctef		

)llun ,)(etadteg ,di_drac@ ,'D' ,'ofni_piv_mr_t'( seulav			

)on_hcnarb ,etad_etadpu ,1yek ,epyt_egnahc ,elbat_moc( atad_mc_sys_t otni tresni		

nigeb    

0 = sutats_hctef@@ elihw    

di_drac@ otni ruc_eteled hctef    

ruc_eteled nepo    

ylno daer rof deteled morf di_drac tceles		

rof rosruc ruc_eteled eralced    

除删--   


)02(rahc di_drac@ eralced	

量变明声--	


nigeb

sa

etadpu,eteled,tresni rof

 ofni_piv_mr_t no mc_ofni_piv_mr_rt reggirt etaerc



og

mc_ofni_piv_mr_rt reggirt pord  

)'mc_ofni_piv_mr_rt'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$tr_rm_vip_info_d(MS).sql^^^^

 dne

deteled morf )(etadteg,di_drac,'D' tceles    

)etad_etadpu,di_drac,epyt_egnahc(tniopkaerb_ofni_piv_mr_t otni tresni	

nigeb

sa

 eteled rof

 ofni_piv_mr_t no d_ofni_piv_mr_rt reggirt etaerc



og

d_ofni_piv_mr_rt reggirt pord  

)'d_ofni_piv_mr_rt'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$tr_rm_vip_info_insert(MS).sql^^^^

dne

dne	

    dne			

)'0',drac_rehtaf_sl@,didrac_sl@,on_hcnarb_sl@,'3'( seulav )galf_dnes,drac_rehtaf,di_drac,on_hcnarb,epyt_ssem(egassem_piv_t_ssem otni tresni					

 '1' = )1,eulav_rav_sl@(tfel fi        				

)))'wen_piv'(MIRTR(MIRTL(reppU = )))di_rav_sys(MIRTR(MIRTL(reppU EREHW metsys_sys_t_ssem MORF  )'',eulav_rav_sys(llunsi = eulav_rav_sl@ TCELES				

nigeb			

0 > wor_ll@ fi		

员会新--		

nigeb	

)etad_repo@ = b_etad_repo@( dna ))'5' = epyt_kcots_edart@ dna '0' = epyt_hcnarb_edart@ dna ))llun si knil_ceps_piv_bg@( ro )'0' = knil_ceps_piv_bg@((( ro '1' = knil_ceps_piv_bg@( fi	

)021 , etad_repo@,)01(rahc(trevnoc = etad_repo@ tceles	

)021,)(etadteg,)01(rahc(trevnoc = b_etad_repo@ tceles	

	

on_kcots_sl@ = on_hcnarb erehw ofni_hcnarb_db_t morF     epyt_piv = knil_ceps_piv_bg@ tceleS	


on_kcots_sl@ = on_hcnarb erehw ofni_hcnarb_db_t morf   epyt_edart = epyt_kcots_edart@ tceles	

on_hcnarb_sl@ = on_hcnarb erehw ofni_hcnarb_db_t morf  epyt_edart = epyt_hcnarb_edart@ tceles	


'on_kcots_g' = di_rav_sys erehw metsys_sys_t morf eulav_rav_sys =  on_kcots_sl@ tceles	

'on_hcnarb_g' = di_rav_sys erehw metsys_sys_t morf eulav_rav_sys = on_hcnarb_sl@ tceles	

值构机--        

detresni morf		

etad_repo=etad_repo@                

,di_repo=di_repo_sl@        	

,drac_rehtaf=drac_rehtaf_sl@		

,di_drac=didrac_sl@	 tceles	

据数前当 --      

      

'metsys_sys_t_ssem' = eman erehw stcejbosys morf )*(tnuoc = wor_ll@ tceles	

表数参信短有否是断判，信短动自--      


)552(rahcrav eulav_rav_sl@      

,)0,2(ciremun wor_ll@      

, emitetad b_etad_repo@      

,emitetad etad_repo@      

,)4(rahc di_repo_sl@      

,)02(rahcrav on_drac_sl@      

,)2(rahc epyt_drac_sl@      

, )1(rahc knil_ceps_piv_bg@      

, )1(rahc epyt_kcots_edart@      

, )1(rahc epyt_hcnarb_edart@      

,)6(rahc on_kcots_sl@      

,)6(rahc on_hcnarb_sl@      

分积送赠--   ,)4,61(ciremun mun_cca_vig_nl@      

卡父--    ,)02(rahc drac_rehtaf_sl@      

分积有现--,)4,61(ciremun mun_cca_won_nl@      

分积减冲--  ,)4,61(ciremun mun_ced_nl@      

值分积计累 --  ,)4,61(ciremun mun_cca_nl@      

号卡员会 --       ,)02(rahc didrac_sl@ eralced  


 nigeb

sa

tresni rof

ofni_piv_mr_t no tresni_ofni_piv_mr_rt reggirt etaerc


og

tresni_ofni_piv_mr_rt reggirt pord  

)'tresni_ofni_piv_mr_rt'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$tr_rm_vip_info_u(MS).sql^^^^

dne

detresni morf )(etadteg,di_drac,'I' tceles   

)etad_etadpu,di_drac,epyt_egnahc(tniopkaerb_ofni_piv_mr_t otni tresni   


deteled morf )(etadteg,di_drac,'D' tceles   

)etad_etadpu,di_drac,epyt_egnahc(tniopkaerb_ofni_piv_mr_t otni tresni   

	   

   


dne	

  nruter	

 )mun_esu(ETADPU ro )tma_evas(ETADPU ro )tma_laudiser(ETADPU ro )mun_ced(ETADPU ro )mun_cca(ETADPU ro )mun_cca_won(ETADPU FI	

nigeb    

 ) deteled MORF 1 TCELES ( STSIXE DNA ) detresni MORF 1  TCELES ( STSIXE FI    

表点断写要需不 额金值储或分积新更是果如--     

nigeb

sa

 ETADPU ,TRESNI rof

 ofni_piv_mr_t no u_ofni_piv_mr_rt reggirt etaerc



og

u_ofni_piv_mr_rt reggirt pord  

)'u_ofni_piv_mr_rt'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$tr_rm_vip_info_update(MS).sql^^^^

dne

nruter      	

detresni morf		

tnetni_piv		

,	krow_piv		

,	slaitnederc_piv		

,	3etad_ceps_piv		

,	2etad_ceps_piv		

,	1etad_ceps_piv		

,01ytreporp_xenna		

,	9ytreporp_xenna		

,	8ytreporp_xenna		

, 7ytreporp_xenna		

,	6ytreporp_xenna		

,	5ytreporp_xenna		

, 4ytreporp_xenna		

, 3ytreporp_xenna		

,	2ytreporp_xenna		

,	1ytreporp_xenna		

,	2dda_piv		

,	1dda_piv		

,	etad_dne_vas		

,	etad_trats_vas		

,		 '0'		

,	drac_rehtaf		

,		omem		

,		'0'		

,	)(etadteg		

,		ssap		

,		rovaf		

,	epyt_doolb		

,		thgiew		

,		thgieh		

,		noitan		

,	level_yralas		

,	egairram		

,	ecalp_evil		

,	ecalp_ger		

,	ecalpemoh		

,		elibom		

	,		eerged		

,		ytud		

,		ynapmoc		

,	di_laicos		

,	yadhtrib		

,		mun_esu		

,	etad_dne_piv		

,	etad_trats_piv		

,	etad_repo		

,		di_repo		

,	sutats_drac		

,		xat_piv		

	,	liame_piv		

	,		let_piv		

,	 piz_piv		

,	 dda_piv		

,	 xes_piv		

,	 eman_piv		

,	 epyt_drac		

,	 on_drac		

,	 di_drac		

,	 on_hcnarb@    tceles      

 tide_ofni_piv_mr_t otni tresni      

      

) detresni morf di_drac tceles( ni di_drac dna on_hcnarb@ = on_hcnarb dna '0' = galf_moc erehw           

 tide_ofni_piv_mr_t morf eteled      

/******据数的传上未但辑编次上除删******/      

     

nruter ))epyt_drac(etadpu ton dna )mun_esu(etadpu( ro )tma_laudiser(etadpu ro )mun_cca_won(etadpu ro )mun_ced(etadpu ro )mun_cca(etadpu fi      

41-70-0102 jsgnat 回返接直 数次用使、额余值储、分积前当、分积减冲、分积计累新更果如--    

     

nruter  )'8' = epyt_edart@ ro '7' = epyt_edart@( ton fi	

nruter  '0' = enola_piv_bg@ ton fi	      

on_hcnarb@ = on_hcnarb erehw ofni_hcnarb_db_t morf epyt_piv = enola_piv_bg@ ,epyt_edart = epyt_edart@ tceles	      

'on_kcots_g' = di_rav_sys erehw metsys_sys_t morf eulav_rav_sys = on_hcnarb@ tceles	

    

/************行执才的员会享共且并,店盟加型输传和店营自型输传******/    


nruter  0 = swormun@ fi      

tnuocwor@@ = swormun@  tceles      

)护维独单1,享共0( 员会享共否是店分----   )1(rahc enola_piv_bg@      

,)1(rahc epyt_edart@      

,)01(rahcrav on_hcnarb@      

,tni  swormun@      

eralced   

nigeb

sa etadpu rof

 ofni_piv_mr_t no etadpu_ofni_piv_mr_rt reggirt etaerc



og

etadpu_ofni_piv_mr_rt reggirt pord  

)'etadpu_ofni_piv_mr_rt'=eman erehw stcejbosys morf 1 tceles(stsixe fi####$$$$$$tr_wm_sheet_master(MS).sql^^^^


dne

nruter  

kcabllor  

1_ruc_ms etacollaed  

1_ruc_ms esolc  

:rorreym

nruter


dne  


rorreym otog 0 =! rorre@@ fi    

)on_hcnarb@,'C',ca_etad_yap@,'A',ca_on_tsucpus@,'0',ca_etad_repo@,'A',0,tma_latot@ ,ca_on_snart@ ,ca_on_teehs@ ,1(seulav       

)on_hcnarb,epyt_cca,etad_cca,yaw_yap,on_tsucpus,galf_elttes,etad_repo,yaw_elas,tma_xat,tma_dluohs        

,on_snart,on_rehcuov,epyt_yap(wolf_yapcer_mf_t otni tresni      


)(etadteg=etad_yap@ tceles      

llun si etad_yap@ fi    

nigeb  

'IR'=on_snart@ ro 'OS'=on_snart@ fi  

账收应--  



1_ruc_ms etacollaed  

1_ruc_ms esolc  


dne  

ytq_dnes@,ecirp_elas@,xat@,tma_bus@        

,ecirp_dilav@,ecirp_igro@,ytq_laer@,ytq_redro@,on_meti@        

,galf_tcca@,galf_snart@        

,etad_yap@,etad_dilav@,etad_krow@,etad_repo@        

,nam_mrifnoc@,nam_redro@,di_repo@        

,galf_evorppa@,sutats_redro@        

,on_nioc@,tnuocsid@ ,yaw_yap@,on_tsucpus@        

,on_hcnarb@,on_rehcuov@,on_bd@,on_snart@,on_teehs@        

otni 1_ruc_ms hctef    


dne	

dne  	 

		

)galf_pus_meti@,on_tsucpus@,'0',etar_yl_pus@,etad_yap@,on_rehcuov@,llun ,ytq_dnes@ - ytq_kcots@			

,'A',di_repo@,on_tsucpus@,'-',on_snart@,'',on_hcnarb@			

,0,ecirp_elas@,ecirp_tsoc@,0,ytq_dnes@,on_meti@,etad_krow@,on_teehs@(seulav		

)yaw_elas_pus,on_pus,galf_yap,etar_yl_pus,etad_cca,omem,etad_dilav,ytnq_erp			

,yaw_elas,di_repo,on_tsucpus,on_bd,on_snart,on_hcnarb_d,on_hcnarb,tma_teehs			

,ecirp_elas,ecirp_tsoc,ecirp,ytq_laer,on_meti ,etad_repo,on_rehcuov(wolf_mi_t otni tresnI		

nigeb          

 0><ytq_dnes@ fi       

rorreym otog 0 =! rorre@@ fi       


)nam_redro@,etar_pp@,etar_slc@,on_pp@,on_slc@,etar_nruter@,epyt_mfpd@		

,galf_pus_meti@,on_tsucpus@,'0',etar_yl_pus@,etad_yap@,on_rehcuov@,llun ,ytq_laer@ - ytq_kcots@		

,'A',di_repo@,on_tsucpus@,'-',on_snart@,'',on_hcnarb@        	

,ecirp_dilav@*ytq_laer@,ecirp_elas@,ecirp_tsoc@,ecirp_dilav@,ytq_laer@,on_meti@,etad_krow@,on_teehs@(seulav	

)nam_redro,etar_pp,etar_slc,on_pp,on_slc,etar_nruter,epyt_mfpd            

,yaw_elas_pus,on_pus,galf_yap,etar_yl_pus,etad_cca,omem,etad_dilav,ytnq_erp    	

,yaw_elas,di_repo,on_tsucpus,on_bd,on_snart,on_hcnarb_d,on_hcnarb,tma_teehs    	

,ecirp_elas,ecirp_tsoc,ecirp,ytq_laer,on_meti ,etad_repo,on_rehcuov(wolf_mi_t otni tresnI      

nigeb      

esle      


dne      

rorreym otog 0 =! rorre@@ fi           

on_hcnarb@,ecirp_dilav@,ytq_dnes@,ytq_laer@,on_meti@,etad_krow@,on_snart@,on_tsucpus@,on_teehs@ wolf_metibmoc_mw_rp cexe   	   

nigeb      

))'1'( ni ats_enibmoc dna on_meti@=on_meti erehw ofni_meti_db_t morf 1 tceles(stsixe fi      

 	


on_pp@=ondnarb_meti erehw dnarb_meti_db_t morf etar_nruter=etar_pp@ tceles      

on_slc@=onslc_meti erehw slc_meti_db_t morf etar_nruter=etar_slc@ tceles      


on_tsucpus@=on_tsucpus erehw  ofni_tsucpus_db_t morf yaw_elas=galf_pus_meti@ tceles      


on_meti@ = on_meti erehw ofni_meti_db_t morf dnarb_meti=on_pp@,onslc_meti=on_slc@      

 ,)0,etar_nruter(llunsi=etar_nruter@,epyt_mfpd=epyt_mfpd@,tsucpus_niam=on_tsucpus@,etar_pus=etar_yl_pus@ tceles      


ecirp_dilav@ = ecirp_tsoc@ tceles     

   

    

dne    

      

tmAtcd_nl@ - tmAtnuocsid_nl@ = tmAtnuocsid_nl@ tceles      

ecirp_dilav@*ytq_laer@+tma_latot@=tma_latot@ tceles      

         

)121,etad_krow@,)01(rahc(trevnoc=etaDrepo_sl@ tceles      

         

0=tmAtcd_nl@ tceles         

llun si tmAtcd_nl@ ro 0<tmAtcd_nl@ fi      

on_meti@=on_meti erehw ofni_meti_db_t morf ytq_laer@ *)ecirp_dilav@ - ecirp_elas(=tmAtcd_nl@ tceles      

0=tmAtcd_nl@ tceles      

额利让--      

ytq_dnes@-=ytq_dnes@ tceles        

ytq_laer@-=ytq_laer@ tceles        

数负为改量数库入出--      

nigeb    

'-'=on_bd--  'IR'=on_snart@ fi esle    

dne    

          

tmAtcd_nl@ + tmAtnuocsid_nl@ = tmAtnuocsid_nl@ tceles      

ecirp_dilav@*ytq_laer@+tma_latot@=tma_latot@ tceles      


)121,etad_krow@,)01(rahc(trevnoc=etaDrepo_sl@ tceles      

         

0=tmAtcd_nl@ tceles         

llun si tmAtcd_nl@ ro 0<tmAtcd_nl@ fi      

on_meti@=on_meti erehw ofni_meti_db_t morf ytq_laer@*)ecirp_dilav@ - ecirp_elas(=tmAtcd_nl@ tceles      

0=tmAtcd_nl@ tceles      

额利让--      


rorreym otog 0 =! rorre@@ fi      

    

)ecirp_dilav@,ecirp_dilav@,ecirp_dilav@,on_meti@,on_tsucpus@(seulav          

)ecirp_tsal,ecirp_mottob,ecirp_pot,on_meti,on_tsucpus(meti_tsucpus_db_t otni tresni        

esle      

on_meti@=on_meti dna on_tsucpus@=on_tsucpus erehw          

ecirp_dilav@=ecirp_tsal          

,)dne ecirp_mottob esle ecirp_dilav@ neht llun si ecirp_mottob ro 0=ecirp_mottob ro )ecirp_dilav@>ecirp_mottob( nehw esac(=ecirp_mottob          

换代格价务业前当用应，况情的LLUN或0为价低最有现--          

,)dne ecirp_pot esle ecirp_dilav@ neht ecirp_dilav@<ecirp_pot nehw esac(=ecirp_pot          

tes meti_tsucpus_db_t etadpu        

)on_meti@=on_meti dna on_tsucpus@=on_tsucpus erehw meti_tsucpus_db_t morf 1 tceles(stsixe fi      

系关品商与户客商应供护维--      

 dne      

rorreym otog 0 =! rorre@@ fi        

on_rehcuov@ = on_teehs erehw '1' = sutats_redro TES  retsam_teehs_mw_t ETADPU          

esle        

on_rehcuov@ = on_teehs erehw '2' = sutats_redro TES  retsam_teehs_mw_t ETADPU          

)on_teehs yb puorg) )0,mun_emoc(llunsi >)0,ytq_dnes(llunsi ro ytq_redro > ytq_laer( dna on_rehcuov@ = on_teehs erehw          

liated_teehs_mw_t morf on_teehs tceles(stsixe ton FI        

  

rorreym otog 0 =! rorre@@ fi        

on_meti@ = on_meti dna on_rehcuov@ = on_teehs  erehw          

)0,ytq_dnes@(llunsi+)0,mun_emoc(llunsi=mun_emoc,)0,ytq_laer@(llunsi + )0,ytq_redro(llunsi = ytq_redro TES liated_teehs_mw_t ETADPU        

态状、ytq_redro量数货到单定售销改修--        

nigeb      

'' >< on_rehcuov@ fi      

nigeb    

库出售销-- 'OS'=on_snart@ fi    



0 = ytq_kcots@ tceles	

llun si ytq_kcots@ fi    


on_meti@ = on_meti dna on_hcnarb@ = on_hcnarb erehw kcots_hcnarb_mi_t morf      

tma_tsoc = yenom_kcots@, tsoc_gva = tsoc_kcots@ ,ytq_kcots = ytq_kcots@ tceles    

llun = tsoc_kcots@ tceles    

llun = yenom_kcots@ tceles    

llun = ytq_kcots@ tceles    


on_snart@ = di_teehs erehw on_teehs_sys_t morf )'0',tsoc_egnahc(llunsi = ecirp_egnahc@ tceles    


on_tsucpus@ = ca_on_tsucpus@ tceles    

etad_yap@ =  ca_etad_yap@ tceles    

 etad_repo@ = ca_etad_repo@ tceles    

on_snart@ = ca_on_snart@ tceles    

on_teehs@ = ca_on_teehs@ tceles    


nigeb  

0=sutats_hctef@@ elihw  

    

ytq_dnes@,ecirp_elas@,xat@,tma_bus@        

,ecirp_dilav@,ecirp_igro@,ytq_laer@,ytq_redro@,on_meti@        

,galf_tcca@,galf_snart@        

,etad_yap@,etad_dilav@,etad_krow@,etad_repo@        

,nam_mrifnoc@,nam_redro@,di_repo@        

,galf_evorppa@,sutats_redro@        

,on_nioc@,tnuocsid@ ,yaw_yap@,on_tsucpus@        

,on_hcnarb@,on_rehcuov@,on_bd@,on_snart@,on_teehs@        

otni 1_ruc_ms hctef  

1_ruc_ms nepo  


0= tmAtnuocsid_nl@ tceles    

0=tma_latot@ tceles    


零为得不量数据单-- )0><ytq_dnes.b ro 0><ytq_laer.b(  dna )'1' = galf_evorppa.a( dna      

) on_teehs.b = on_teehs.a ( erehw    

b liated_teehs_mw_t ,a detresni morf    

ytq_dnes.b,ecirp_elas.b,xat.b,tma_bus.b        

,ecirp_dilav.b,ecirp_igro.b,ytq_laer.b,ytq_redro.b,on_meti.b        

,galf_tcca.a,galf_snart.a        

,etad_yap.a,etad_dilav.a,etad_krow.a,etad_repo.a        

,nam_mrifnoc.a,nam_redro.a,di_repo.a        

,galf_evorppa.a,sutats_redro.a        

,)'BMR',on_nioc.a(llunsi,tnuocsid.a,)'A',yaw_yap.a(llunsi,)'',on_tsucpus.a(llunsi        

,on_hcnarb.a,)'',on_rehcuov.a(llunsi,on_bd.a,on_snart.a,on_teehs.a tceles    

rof rosruc 1_ruc_ms eralced  


牌品--       )02(rahcrav   on_pp@    

别类--       ,)02(rahcrav  on_slc@    

例比成提--     ,)4,61(ciremun etar_pp@    

例比成提别类--    ,)4,61(ciremun etar_slc@    

额金成提/例比成提-- ,)4,61(ciremun etar_nruter@    

型类成提品商--        ,)1(rahc  epyt_mfpd@    

,)4,61(ciremun ytq_dnes@    

率扣营联--, )4,61(ciremun etar_yl_pus@    

,)1(rahc galf_pus_meti@    

额金本成--  ,)4,61(ciremun     yenom_kcots@    

,)1(rahc    ecirp_egnahc@    

格价本成--  ,)4,61(ciremun      tsoc_kcots@    

码代户客商应供--       , )8(rahc   ca_on_tsucpus@    

期日款付--,   emitetad     ca_etad_yap@    

期日作操--,   emitetad    ca_etad_repo@    

式方作操存库--,         )2(rahc     ca_on_snart@    

号单作工--, )81(rahc     ca_on_teehs@    

式方售销 --      ,)1(rahc      yaWelas_sl@    

,)4,61(ciremun  tmAtnuocsid_nl@    

,)01(rahc     etaDrepo_sl@    

,)4,61(ciremun       tmAtcd_nl@    

号证凭始原--       , )81(rahc   on_rehcuov_os@    

,)2(rahc       snart_dlo@    

额金--   ,)4,61(ciremun       tma_latot@    

,)4,5(ciremun             xat@    

,)4,61(ciremun         tma_bus@    

价单售零--,   )4,61(ciremun      ecirp_elas@    

价单售零--,   )4,61(ciremun      ecirp_tsoc@    

价单售零--,   )4,61(ciremun     ecirp_dilav@    

价单货进--,   )4,61(ciremun      ecirp_igro@    

量数--,   )4,61(ciremun        ytq_laer@    

量数--,   )4,61(ciremun       ytq_redro@    

码代品货--,        )02(rahc         on_meti@    

存库--,)4,61(ciremun     	ytq_kcots@    

,)1(rahc       galf_tcca@    

,)1(rahc      galf_snart@    

,)1(rahc        yaw_elas@    

期日款付--,   emitetad        etad_yap@    

期效有单订--,   emitetad      etad_dilav@    

期日核审--,   emitetad       etad_krow@    

期日作操--,   emitetad       etad_repo@    

,)4(rahc     nam_mrifnoc@    

,)4(rahc       nam_redro@    

,)4(rahc         di_repo@    

核审-1，核审未-0--  志标批审--,      )1(rahc    galf_evorppa@    

,)1(rahc    sutats_redro@    

种币--,         )3(rahc         on_nioc@    

,   )4,5(ciremun        tnuocsid@    

式方款付--,         )2(rahc         yaw_yap@    

码代户客商应供--,        )8(rahc      on_tsucpus@    

码代店本--,        )6(rahc       on_hcnarb@    

号证凭始原--,         )81(rahc      on_rehcuov@    

式方库入出--,      )1(rahc           on_bd@    

式方作操存库--,         )2(rahc        on_snart@    

号单作工--, )81(rahc     	  on_teehs@    

eralced  


nruter )galf_evorppa(etadpu ton fi  

nigeb

sa

 etadpu rof

 retsam_teehs_mw_t no retsam_teehs_mw_rt reggirt etaerc


og

retsam_teehs_mw_rt reggirt pord  

)'retsam_teehs_mw_rt'=eman erehw stcejbosys morf 1 tceles(stsixe fi####@@@@