web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Relation between BankChequePaymTrans and specTrans table x++

(0) ShareShare
ReportReport
Posted on by 169
I need to get TaxWithHoldamount relation to every single line in vendTransOpen table
I create a new Vandor payment journal and I selected two lines with same invoice like (21)  and different TaxWithHoldamount then its appear as one line in journal (sum amount and sum withhold amount )then I generate cheque 
I created a custom report to get all data based on cheque number 
but in my select statement data repeated 
when I remove VendTransOpen from join its appear 2 lines but with VendTransOpen its appear 4 lines 
so what's wrong ?
 
while select BankChequePaymTrans       
            where BankChequePaymTrans.ChequeNum==ChequeNum
            join    VendTrans
            where VendTrans.AccountNum==BankChequePaymTrans.InvoiceAccountNum
                  join   vendtransopen
             where VendTransOpen.RefRecId == VendTrans.RecId
             join RecId from specTrans
            where vendtransopen.TableId == specTrans.RefTableId
            && vendtransopen.DataAreaId == specTrans.RefCompany
            && vendtransopen.RecId == specTrans.RefRecId
{
// Logic
    select TaxWithholdTrans 
                where TaxWithholdTrans.Voucher==BankChequePaymTrans.Voucher 
                && TaxWithholdTrans.Invoice==invno && TaxWithholdTrans.TaxWithholdBaseAmount>0
                && TaxWithholdTrans.SpecTransId == spectrans.RecId;
}

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 544 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 347 Super User 2026 Season 2

#3
CU-1234529-002 Profile Picture

CU-1234529-002 197

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans