Need help

raja123raja123 Member Posts: 50
Calculate the monthly average sales of the item by taking the last six months sales and display it on item card

using nav2017

Answers

  • krikikriki Member, Moderator Posts: 9,086
    [Giving your topic a good title and explaining better what you need might help. This seems like you haven't the slightest idea what you need to do and want a complete solution from the community.]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • KTA8KTA8 Member Posts: 388
    You need to sum all the period, for that
    //filter sales
    recItemEntries.SETRANGE(recItemEntries."Entry type",recItemEntries."Entry type"::Sale);
    //item
    recItemEntries.SETRANGE(recItemEntries.Nº,youritem);
    //period of time
    startdate=CALCDATE('<-6M>',TODAY);
    recItemEntries.SETRANGE(recItemEntries.postingdate,startdate,TODAY);
    //total period
    recItemEntries.CALCSUMS(recItemEntries.quantity);
    //average
    avg=recItemEntries.quantity/6;
  • raja123raja123 Member Posts: 50
    KTA8 wrote: »
    You need to sum all the period, for that
    //filter sales
    recItemEntries.SETRANGE(recItemEntries."Entry type",recItemEntries."Entry type"::Sale);
    //item
    recItemEntries.SETRANGE(recItemEntries.Nº,youritem);
    //period of time
    startdate=CALCDATE('<-6M>',TODAY);
    recItemEntries.SETRANGE(recItemEntries.postingdate,startdate,TODAY);
    //total period
    recItemEntries.CALCSUMS(recItemEntries.quantity);
    //average
    avg=recItemEntries.quantity/6;

    I want Monthwise
  • raja123raja123 Member Posts: 50
    kriki wrote: »
    [Giving your topic a good title and explaining better what you need might help. This seems like you haven't the slightest idea what you need to do and want a complete solution from the community.]

    I'll try to implement your suggestions , thank you
Sign In or Register to comment.