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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Cash Advance Remaining Balance Does Not Deducted

(0) ShareShare
ReportReport
Posted on by 1,982

Hi all,

I made a cash advance for an employee Julia (Contoso USMF) and already approved and paid it, let's say 1000 USD. Cash advance journal successfully generated and also I did payment for the cash advance. Now Julia have to make an expense report. Payment method is set to employee. I have set employee vendor in HR module. When expense report approved, I can't see Julia remaining balance is deducted. Do you know what step I'm missing?

I was following this guide to test.

http://d365tour.com/en/microsoft-dynamics-d365o/trade-logistics-d365fo-en/cash-advance/

Here are some of my screenshots.

My original and final balance of cash advance.

pastedimage1616413968270v1.png

Using payment method Employee as offset.

pastedimage1616414017627v2.png

Cash advance voucher.

pastedimage1616414099988v3.png

Expense report approved and processed for payment.

pastedimage1616414158756v4.png

Transaction on expense report lines.

pastedimage1616414222771v5.png

And when I back to cash advance, still remaining balance not deducted.

One thing that I wondered is, how D365FO know that cash advance which has been made because when creating expense report, I think I didn't refer it to cash advance ID. Maybe something missing in my step? Kindly help.

Thank you.

Jefry

I have the same question (0)
  • Suggested answer
    Michal Krejza Profile Picture
    on at

    Hi Jefry,

    In order to settle Expense report line with Cash advance, it is necessary to setup payment method in following way:

    • Expense owner: Employee
    • Offset account type: Worker

    In your setup the Expense owner is not setup correctly and therefore expense is not settled with cash advance. 

    To your second question - in the current design (10.0.17) - it is not possible to select which Cash advance will be settled with Expense line. System simply selects the Cash advance with highest balance in accounting currency connected to employee from expense. Below is an example of code responsible for selecting the cash advance. 

        /// 
        /// Insert records into TrvAccountingDistribution when expense line (distribution) amount is less than available cash advance.
        /// 
        /// 
        /// The current TrvExpTable record.
        /// 
        private static void insertTrvDistForExpAmountLessThanCashAdv(TrvExpTable _trvExpTable)
        {
            TrvSubmitAccDistribution            trvSubmitAccDistributionView;
            TrvTaxUncommittedDistributionView   trvTaxUncommittedDistributionView;
            TrvAccountingDistribution           trvAccountingDistribution;
            TrvAccountingDistribution           trvAccountingDistributionSum;
            TrvCashAdvance                      trvCashAdvance;
            CurrencyCode                        cashAdvanceCurrencyCode;
            RefRecId                            cashAdvanceOldRecId;
            container                           remainingBalanceContainer;
            AmountMST                           trvAccountingDistributionAmountMST;
            AmountMST                           remainingExpenseLineAmount = 0;
            AmountMST                           remainingAdvanceAmount = 0;
            AmountMST                           cashAdvanceForContainer = 0;
            AmountMST                           cashAdvanceBalanceAmount = 0;
            int                                 numItems, i;
     
            ttsBegin;
     
            // Select all cash advances and consume them against each distribution of expense line.
            while select RecId, BalanceMST, CurrencyCode from trvCashAdvance
                order by trvCashAdvance.BalanceMST desc
                where trvCashAdvance.RequestingWorker == _trvExpTable.CreatingWorker
                && trvCashAdvance.CashAdvanceStatus == TrvWorkflowCashAdvanceStatus::Paid
                && trvCashAdvance.BalanceMST > 0
            {

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 660 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 549 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 307 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans