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