Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Unanswered

Relation between BankChequePaymTrans and specTrans table x++

(0) ShareShare
ReportReport
Posted on by 163
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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,642 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,371 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans