Commented code on Sales Statistics

AlishaAlisha Member Posts: 217
Hi,

On a Sales Invoice, when pushing F9 to show Sales Statistics, the following code is commented :

SalesSetup.GET;
{
IF SalesSetup."Calc. Inv. Discount" THEN BEGIN
CurrForm.SalesLines.FORM.CalcInvDisc;
COMMIT;
END;
}
FORM.RUNMODAL(FORM::"Sales Statistics",Rec);

Anyone knows the reason for this??

Thanks!

Comments

  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Someone has modified the code. This is the C/AL code that is available on a standard database (3.70 version):
    SalesSetup.GET;
    IF SalesSetup."Calc. Inv. Discount" THEN BEGIN
      CurrForm.SalesLines.FORM.CalcInvDisc;
      COMMIT;
    END;
    FORM.RUNMODAL(FORM::"Sales Statistics",Rec);
    

    So you should ask the person who has made this modification.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • AlishaAlisha Member Posts: 217
    If you see a Crouns DB 4.00 (both with SP1 or SP2), you'll see that the code is commented, without any tags.
  • lakshmivallurulakshmivalluru Member Posts: 168
    i have checked cronus service pack SP1. don't have SP2 .Are you sure its not some one at ur end who commented the code? If not the only explanation i can think of is the statistics will is updating the sales lines with lateest settings by calculating invoice discount. May be the user will not want to do it . So by commenting the code the invoice discount is not being calculated. The statistics is what you see on the order screen. it shouldn't show any difference.

    may be i am wrong... may be i am right...
    LR
  • lakshmivallurulakshmivalluru Member Posts: 168
    Hi, i have checked version4 SP1 and the code is not commented. don't have SP2. 90% i am sure it might be someone at ur end commented the code. if not the explanation can be statistics should dispaly what is there on slaes order screen, instead of calculatiing the lines with current invoice discounts and then dispalying the new statistics. may be the user does not want to update the sales line.
    LR
  • AlishaAlisha Member Posts: 217
    Hi, you made me doubt, so I checked again.. the object where I see the commented code is the form 43. It's not modified on my DB (the demo DB on the CD of 4.00 SP1), it has the date 25/05/05 , 12:00, and the version list is NAVW14.00.01,NAVES3.10.01.

    As you can see, nobody has modified this code, it's original. How is it possible that in your DB it is not commented? Could it be due to the language? This is a big mistery...
  • lakshmivallurulakshmivalluru Member Posts: 168
    Hi,
    As i work for an end user now i don't have access to SP2. So as far as i did a study on this SP2, i think there is code commented in other parts of system as well, but not according to standard. check this topic out in this form . Microsoft Business Solutions-Navision W1 4.0 SP2

    I will try to get moe info if u need
    LR
  • AlishaAlisha Member Posts: 217
    Hi,

    I've downloaded the International version of Cronus (in English), and the code is not commented in that database. Must be some issue with the Spanish version. I'll report it to Microsoft.

    Thanks for your help.
Sign In or Register to comment.