|
@@ -22,9 +22,11 @@
|
|
|
sp.cDefine10 as invoicenum,
|
|
|
sp.cMaker as preparedBy,
|
|
|
ex.cExpName as expenseItem,
|
|
|
- sps.INatMoney as disbursedLocalmoney,
|
|
|
v.cVenName as processUnit,
|
|
|
- sps.iMoney as disbursedOriginalmoney
|
|
|
+ case when sps.cExpCode='00011' then sps.iMoney end as shuiemoney,
|
|
|
+ case when sps.cExpCode!='00011' and sp.Cexch_Name='美元' then sps.iMoney*sp.iexchrate
|
|
|
+ when sps.cExpCode!='00011' and sp.Cexch_Name='人民币' then sps.iMoney end as disbursedLocalmoney,
|
|
|
+ case when sps.cExpCode!='00011' and sp.Cexch_Name='美元' then sps.iMoney end as disbursedOriginalmoney
|
|
|
FROM
|
|
|
UFDATA_101_2021.dbo.SalePayVouch sp
|
|
|
INNER JOIN UFDATA_101_2021.dbo.SalePayVouchs sps ON sp.id = sps.id
|
|
@@ -46,9 +48,11 @@
|
|
|
sp.cDefine10 as invoicenum,
|
|
|
sp.cMaker as preparedBy,
|
|
|
ex.cExpName as expenseItem,
|
|
|
- sps.INatMoney as disbursedLocalmoney,
|
|
|
v.cVenName as processUnit,
|
|
|
- sps.iMoney as disbursedOriginalmoney
|
|
|
+ case when sps.cExpCode='00011' then sps.iMoney end as shuiemoney,
|
|
|
+ case when sps.cExpCode!='00011' and sp.Cexch_Name='美元' then sps.iMoney*sp.iexchrate
|
|
|
+ when sps.cExpCode!='00011' and sp.Cexch_Name='人民币' then sps.iMoney end as disbursedLocalmoney,
|
|
|
+ case when sps.cExpCode!='00011' and sp.Cexch_Name='美元' then sps.iMoney end as disbursedOriginalmoney
|
|
|
FROM
|
|
|
UFDATA_102_2021.dbo.SalePayVouch sp
|
|
|
INNER JOIN UFDATA_102_2021.dbo.SalePayVouchs sps ON sp.id = sps.id
|
|
@@ -70,9 +74,11 @@
|
|
|
sp.cDefine10 as invoicenum,
|
|
|
sp.cMaker as preparedBy,
|
|
|
ex.cExpName as expenseItem,
|
|
|
- sps.INatMoney as disbursedLocalmoney,
|
|
|
v.cVenName as processUnit,
|
|
|
- sps.iMoney as disbursedOriginalmoney
|
|
|
+ case when sps.cExpCode='00011' then sps.iMoney end as shuiemoney,
|
|
|
+ case when sps.cExpCode!='00011' and sp.Cexch_Name='美元' then sps.iMoney*sp.iexchrate
|
|
|
+ when sps.cExpCode!='00011' and sp.Cexch_Name='人民币' then sps.iMoney end as disbursedLocalmoney,
|
|
|
+ case when sps.cExpCode!='00011' and sp.Cexch_Name='美元' then sps.iMoney end as disbursedOriginalmoney
|
|
|
FROM
|
|
|
UFDATA_103_2021.dbo.SalePayVouch sp
|
|
|
INNER JOIN UFDATA_103_2021.dbo.SalePayVouchs sps ON sp.id = sps.id
|