I am having problem with the following Querry
If I insert 2 attachments the transaction duplicates. & balance amount is doubled
example:
Cust ID: 4 Account Title: BPL - Security Deposit
ID Date G.P / Vou Description Qty Units Price Tax Rate Tax Amount Debit Credit Balance Remarks Attac
1 31-Jan-14 Security Deposit 0 Kgs Rs. 0.00 0.00% Rs. 0.00 Rs. 1,000,000.00 Rs. 0.00 Rs. 1,000,000.00 Man Bank Cashiers Cheque Yes
3752
1 31-Jan-14 Security Deposit 0 Kgs Rs. 0.00 0.00% Rs. 0.00 Rs. 1,000,000.00 Rs. 0.00 Rs. 2,000,000.00 Man Bank Cashiers Cheque Yes
SELECT Pchase.PurCompanyName, Pchase.PurTransId, Pchase.[Purchase Date], Pchase.[Purchase Description], Pchase.[Party Challan #], Pchase.[Invoice #], Pchase.[Purchase Qty], Pchase.[Purchase Price], Pchase.[Purchase Units], Company.CoId, Pchase.[Pur Seller], ([Payment Made]+[Mobile Deduction]) AS Dbt, Pchase.[Amount Returned], [Purchase Remarks] & " " & [D2Party] & " " & [SB] & " " & [PPMTTYP] & " " & [TrNo] & " " & [Cheque PO #] & " " AS Rem, IIf([Amount Returned]=0,([Purqty]*[Purchase Price]+[GST Amount]),[Amount Returned]) AS PurCredit, Pchase.[Pur Varification], Pchase.[Cheque PO #], [Purchase Description] & " " & [Salery Month] AS Des, IIf([Supplier Bank]="Nil",Null,[Supplier Bank]) AS SB, IIf([Payment Type]="Nil",Null,[Payment Type]) AS PPMTTYP, IIf([Delivered To Party]="Nil",Null,[Delivered To Party]) AS D2Party, Pchase.purattach, Pchase.[Mobile Deduction], Pchase.[Payment Made], IIf(IsNull([purattach].[FileData])," ","Yes") AS Patt, Company.[NIC No], Voucher.VoucherNo, [Party Challan #] & " " & [VoucherNo] AS GPVOU, IIf([Truck #]="Nil"," ",[Truck #]) AS TrNo, Company.CoAttach, Company.NICcopyFront, Company.NICcopyBack, Pchase.[GST Rate], Pchase.[GST Amount], Pchase.[Total Amount], Pchase.GSTR, Pchase.Purqty, Pchase.[Purchase Cash Qty], Pchase.[Purchase Sales Tax]
FROM Company INNER JOIN (Pchase LEFT JOIN Voucher ON Pchase.PurTransId = Voucher.[Vou ID]) ON Company.ComapnyName = Pchase.PurCompanyName
ORDER BY Pchase.PurTransId, Pchase.[Purchase Date];
I have no idea how to fix this issue
need urgent help