Any idea how can i get debit amount, credit amount , balance amount from Custtrans/custtransopen tables using X++
Any idea how can i get debit amount, credit amount , balance amount from Custtrans/custtransopen tables using X++
-
Get Debit amount, Credit amount and balance amount for customer statementHi Raj,Many thanks on your reply, let me try it and will update you for balance is it credit - debit or debit - credit because customer natural account is debit i need to ensure from this partAlso, why do you settlementamountmst and do not use AmountCurdid you use or try this code beforeThanksH
-
Get Debit amount, Credit amount and balance amount for customer statementHi Hisham,Here is your answer.Pls, mark the reply as a verified answer.AmountMST credit = 0,debit = 0,balance = 0;
CustTrans custTrans;
while Select custTrans where custTrans.AccountNum == "AsPerYourRequirement" // customer account
{
if(custTrans.SettleAmountMST > 0)
{
credit += custTrans.AmountMST;
}
else
{
debit += custTrans.AmountMST;
}
}
// Total credit and debit of Customer
balance = credit - debit;Thank you,Raj D Borad -
Get Debit amount, Credit amount and balance amount for customer statementHi Mohamed,Thanks for your reply i understand now but do you have x++ for that or try it in real case and what about the balance amount how can i get it?Thanks,Hisham
-
Get Debit amount, Credit amount and balance amount for customer statementHi @Hisham,there a field AmounCurif AmountCur < 0 then Credit else DebitBest regards,Mohamed Amine MAHMOUDI
Helpful resources
Quick Links
Subscribe to
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
Leaderboard
Andre Arnaud de Cal... 283,176 Super User
Martin Dráb 222,727 Super User
nmaenpaa 101,138