Skip to main content

Hi Team

We have a requirement where on payment save we have to programmatically open the financial periods, if closed. I have tried to Implement logic in ARPaymentEntry graph on Save but it is not working as expected, can you help please to achieve this.

public delegate void PersistDelegate();
[PXOverride]
public void Persist(PersistDelegate del)
{
if (Base.Document.Current != null/* && Base.IsImport == true*/)
{

FinPeriodStatusProcess finPeriodStatusProcess = PXGraph.CreateInstance<FinPeriodStatusProcess>();
finPeriodStatusProcess.Filter.Current.Action = FinPeriodStatusProcessParameters.action.Open;
finPeriodStatusProcess.Filter.Current.FromYear = "2024";
finPeriodStatusProcess.Filter.Current.ToYear = "2024";

string month = "202404";
string year = "2024";
FinPeriod masterFinPeriod = PXSelect<FinPeriod, Where<FinPeriod.finPeriodID, Equal<Required<FinPeriod.finPeriodID>>,
And<FinPeriod.finYear, Equal<Required<FinPeriod.finYear>>>>>.Select(Base, month, year);
finPeriodStatusProcess.FinPeriods.Current = masterFinPeriod;

masterFinPeriod.Selected = true;
// masterFinPeriod.Closed = true;
masterFinPeriod.Status = "Open";
finPeriodStatusProcess.FinPeriods.Update(masterFinPeriod);

finPeriodStatusProcess.Actions["Process"].Press();
}
del();
}

Thank you In Advance.

Hello, 

Did you consider adding the AR Payment user to the Financial Supervisor role, and leaving period status as is?

Members of Financial Supervisor role may post to closed periods without re-opening/re-closing any periods.

 

Laura


Hi @Laura02 

Thank you for the response.

Did you consider adding the AR Payment user to the Financial Supervisor role, and leaving period status as is? - Can you please suggest how we can do that ?

Members of Financial Supervisor role may post to closed periods without re-opening/re-closing any periods. - Not sure on this as we have to re-open the financial periods through code. So if  a payment is getting created, user does not have to specifically go to Financial Period screen and re-open the periods.


Hello,

Place the AR User in the Financial Supervisor role in Users screen as shown.

Members of Financial Supervisor may post to closed periods without reopen.

From the Acumatica Help:

Hope this helps! 

Laura


Hi @Laura02 

We enabled the suggested modification and verified the implementation but it is not working as expected.


Hello,

Please post a screen shot of what happens when your AR user who is in the financial supervisor’s role attempts to post a payment to a closed period.

It’s important to know the status of the periods - In this case, Periods should be Closed, not Locked status.

Thank you.

Laura


Hi @Laura02 

We have activated the Financial Supervisor role and verified with the Implemented code but still facing the Issue in Payment and Applications screen.

Please find the below screen shots.


​​​

Thank you


Hello,

To post any transaction in period 04-2024, from any screen, the status of the period must be Open.  Unless your users are posting into the future, it is normal for current Periods (April 2024) to be Open status.  Click Checkbox then Process as shown, or click Process All to open all periods of 2024.

Laura


Reply