Options

Create Reminder

RikarddoRikarddo Member Posts: 80
Hello all,

In NAV 2016 we use the Report Create Reminder to create a letter with customer ledger entries and its details.
In the report filters we have not to calc and show some docs like Document No. : <>NCVS*&<>VD*&<>FTVS*

What i want now is to not show <>NCVS*&<>VD* and the FTVS only show those that due date - posting date >180.
Where in code it calcs the custledgerentries?
I know it calls a function in codeunit Reminder-Make

can someone help?

Best Answer

  • Options
    RikarddoRikarddo Member Posts: 80
    Answer ✓
    It was easier in the function MAkeReminder alter the code:
    {IF (CALCDATE(ReminderLevel."Grace Period",ReminderDueDate) < ReminderHeaderReq."Document Date") AND
                 ((LineLevel <= ReminderTerms."Max. No. of Reminders") OR (ReminderTerms."Max. No. of Reminders" = 0))}//OLD CODE
    
    //NEW CODE
              //Roliveira 2019-07-11
                IF ((CALCDATE(ReminderLevel."Grace Period",ReminderDueDate) < ReminderHeaderReq."Document Date") AND
                  ((COPYSTR(CustLedgEntry."Document No.",1,4)<>'FTVS'))AND
                  ((COPYSTR(CustLedgEntry."Document No.",1,2)<>'VD')))
                AND
                  (((LineLevel <= ReminderTerms."Max. No. of Reminders") OR (ReminderTerms."Max. No. of Reminders" = 0)) AND
                  ((COPYSTR(CustLedgEntry."Document No.",1,4)<>'FTVS'))AND
                  ((COPYSTR(CustLedgEntry."Document No.",1,4)<>'NCVS')))
                OR ((COPYSTR(CustLedgEntry."Document No.",1,4)='FTVS') AND (TODAY-CustLedgEntry."Posting Date" >180))
                 AND
                 ((COPYSTR(CustLedgEntry."Document No.",1,2)<>'VD'))
                 AND
                  ((COPYSTR(CustLedgEntry."Document No.",1,4)<>'NCVS'))
    

Answers

  • Options
    RikarddoRikarddo Member Posts: 80
    edited 2019-07-11
    So i've made this..

    LOCAL FilterCustLedgEntries(VAR ReminderLevel2 : Record "Reminder Level")

    CustLedgEntry.SETFILTER("Document No.",'<>%1|<>%2','VD*','NCVS*');
    IF COPYSTR(CustLedgEntry."Document No.",1,4)='FTVS' THEN
    IF (Today-CustLedgEntry."Posting Date" >180) THEN...


    But it keeps me showing and calculating some Invoices that doesn't respect the 180 days condition
  • Options
    RikarddoRikarddo Member Posts: 80
    Answer ✓
    It was easier in the function MAkeReminder alter the code:
    {IF (CALCDATE(ReminderLevel."Grace Period",ReminderDueDate) < ReminderHeaderReq."Document Date") AND
                 ((LineLevel <= ReminderTerms."Max. No. of Reminders") OR (ReminderTerms."Max. No. of Reminders" = 0))}//OLD CODE
    
    //NEW CODE
              //Roliveira 2019-07-11
                IF ((CALCDATE(ReminderLevel."Grace Period",ReminderDueDate) < ReminderHeaderReq."Document Date") AND
                  ((COPYSTR(CustLedgEntry."Document No.",1,4)<>'FTVS'))AND
                  ((COPYSTR(CustLedgEntry."Document No.",1,2)<>'VD')))
                AND
                  (((LineLevel <= ReminderTerms."Max. No. of Reminders") OR (ReminderTerms."Max. No. of Reminders" = 0)) AND
                  ((COPYSTR(CustLedgEntry."Document No.",1,4)<>'FTVS'))AND
                  ((COPYSTR(CustLedgEntry."Document No.",1,4)<>'NCVS')))
                OR ((COPYSTR(CustLedgEntry."Document No.",1,4)='FTVS') AND (TODAY-CustLedgEntry."Posting Date" >180))
                 AND
                 ((COPYSTR(CustLedgEntry."Document No.",1,2)<>'VD'))
                 AND
                  ((COPYSTR(CustLedgEntry."Document No.",1,4)<>'NCVS'))
    
Sign In or Register to comment.