Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / Getting error when app...
Finance forum
Unanswered

Getting error when applying prepayment for 1 vendor only

Posted on by 320
Hello,
 
im getting this error recently:You have marked prepayment application or reversal transactions in closed period, please unmark them before applying prepayment
its when i try to apply prepayment for a puchase order for a certain vendor. this error only occurs for this vendor, also it shows when January 2022 ledger calendar is closed, when  i open it, its working fine, i need to know why this error is showing only if january 2022 is closed and only for this vendor. please note that this vendor has one PO in jan 2023. so lets say i create a new PO in july 2024 with this vendor, the error is showing also, but if i open Jan 2022 ledger calendar, its working fine.
I also checked under the backend the code related to this error:
   private void checkExistingVendAdvanceTransInOpenPeriod(VendInvoiceAccount _invoiceAccount)
        {
            VendInvoiceJour vendInvoiceJour;
            VendAdvanceApplicationTrans vendAdvanceApplicationTrans;
            RecId calendarRecId = CompanyInfoHelper::fiscalCalendarRecId();
            while select vendAdvanceApplicationTrans
            join vendInvoiceJour
                where vendAdvanceApplicationTrans.PostedInvoiceRecId == vendInvoiceJour.RecId
                    && vendInvoiceJour.InvoiceAccount == _invoiceAccount
            {
                if (!LedgerFiscalCalendar::checkDateIsValid(calendarRecId, vendAdvanceApplicationTrans.SettlementPostingDate, FiscalPeriodType::Operating, false))
                {
                    throw warning("@AccountsPayable:MarkedPrepaymentInClosedPeriod");
                }
         
i need to know why this is happening.
 
thanks
  • D365FO DEV Profile Picture
    D365FO DEV 320 on at
    Getting error when applying prepayment for 1 vendor only
    Hi Andre,
     
    my scenario is same as Mario's scenario. same issue with different dates
  • Mario Barnaba Profile Picture
    Mario Barnaba 7 on at
    Getting error when applying prepayment for 1 vendor only
    this PO is issued in November 2023, this issue is only available for one vendor which is using this purchase order.
     
    when I open February 2022 in ledger calendar, I can apply this prepayment even though in February 2022, we have only 1 transaction for this vendor which is also a Purchase order with a prepayment fully applied.

    and as we searched for this error, it is standard and the meaning of it is that we need to have the fiscal period of both prepayment and PO open which they are (November 2023), but why when I open February 2022 only, I can apply this prepayment?

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 287,835 Super User on at
    D365fo - getting error when applying prepayment for 1 vendor only!!!
    Hi D365 FO Developer,
     
    Can you tell what date is used for the pre-payment? Can you share a screenshot?

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,835 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,526 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans