If you want to Customer payment journal settlement with sales invoice by code in axapta. Mark invoice automatically by code before posting of customer payment journal You can refer this code
Microsoft Dynamics Ax,AIF,Axapta, Enterprise portal,,Microsoft , United State,U.S., SharePoint , BI Tools, Performance Tuning, SSRS,Business Logic,Ax ERP Errors and solution,Dynamics 365 Errors Solution,Business software .