Outpatient reconciliation information

SELECT * from MS_SFMX,MS_MZXX
WHERE MS_SFMX.MZXH = MS_MZXX.MZXH and MS_MZXX.JGID = 1 and MS_MZXX.JZRQ
is null and MS_MZXX.MZLB = 1 and MS_MZXX.YQSB = 1 and MS_MZXX.CZGH = '8888'
and MS_MZXX.SFFS = 0

 

The above information is a summary of outpatient individual, which is a vaccine fee collection at the outpatient fee income generated by the vaccine,

SELECT * from MS_SFMX,MS_MZXX 
WHERE MS_SFMX.MZXH = MS_MZXX.MZXH and MS_MZXX.JGID = 1 and MS_MZXX.JZRQ 
is null and MS_MZXX.MZLB = 1 and MS_MZXX.YQSB = 1 and MS_MZXX.CZGH = '8888' 
and MS_MZXX.SFFS = 0

---- vaccine costs have above 1872, individual accounts, 1011, also said that 1101 is deducted treatment card inside the money, the amount of cash the amount of accounts

The amount of cash that column, 150 and 0, the amount of accounts is 711 + 150 + 150 = 1011,

SELECT * from MS_FKXX,MS_MZXX
where MS_FKXX.MZXH = MS_MZXX.MZXH and MS_MZXX.JGID = 1 and MS_MZXX.JZRQ
is null and MS_MZXX.MZLB = 1 and MS_MZXX.YQSB = 1 and MS_MZXX.CZGH = '8888'
and MS_MZXX.SFRQ <= to_Date('2019-08-10 20:22:18','yyyy-mm-dd hh24:mi:ss')

According to ms_szmx of mzxh ms_fkxx record is found inside, looking to play fkfs, 17 representatives of Alipay,

That this report: 1872 (vaccine fee) +101 (accounts) +60 (contributions) -10 (rebate) = 2023 (cashiers handling money) -1011 (money in the card) = 1023 ( deduct money than in the card, the cashier hand over money required) --- "201 + 711 + 100

 

Guess you like

Origin www.cnblogs.com/thomasbc/p/11332834.html