CREATE VIEW vwbuyerinvoicebankcharges AS SELECT a.SID AS InvoiceSid, ISNULL((SELECT ROUND(SUM((ROUND(((b.Amount / c.Amount) * c.BankCharge),5) * c.ExchangeRate)),2) FROM tblbuyerinvoiceadvancedetail B JOIN vwadvancemasterwithexrate C ON C.AdvanceSid = b.AdvanceSid WHERE b.MasterSid = a.SID ISNULL(SELECT ROUND(b1.NegoBankChargeAmt * b1.ExchangeRate,2) AS Round(B1.Negobankchargeamt*B1.ExchangeRate,2) FROM vwbanknegotiationwithexrate B1 WHERE b1.InvoiceSid = a.SID AS NegoBankCharge) FROM tblbuyerinvoicemaster a GROUP BY a.SID
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)