Purchase order performance report

madmmadm Member Posts: 92
edited 2006-12-13 in Navision Attain
In order to analyse our vendors, I have created a report that compares the promised receipt date with the posting date of the last GRN against this order.

I have then set it

if promised < GRN posting date then late
if promised > GRN Posring date then early etc

One thing I have noticed is that our purch department seem to miss the promised date on a number of orders. In this case I would like the variable to be calculated from the requested delivery date.

I have tried to IF Promised Date <> '' THEN..

but this gives a date to text conversion errror. How do I go about saying that if the Promised Date <> '' then calculate "this way", else calculate "another way"..

The next thing I would like to do, is then count late/early/on time and do a percentage against each supplier, and then possibly a league table at the end of the report. Will this be simple?!

Thanks

Comments

  • krikikriki Member, Moderator Posts: 9,115
    IF Promised Date <> 0D THEN
    

    To have the no. of days between 2 dates, just subtract them and the result is an integer.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • madmmadm Member Posts: 92
    kriki wrote:
    IF Promised Date <> 0D THEN
    

    To have the no. of days between 2 dates, just subtract them and the result is an integer.

    thanks :) but the promised date is an actual date entered on the purchase header. What I am trying to do, is if the promised date is missing, then use expected receipt date. :)
  • krikikriki Member, Moderator Posts: 9,115
    TheDate := "promised date";
    IF TheDate O 0D THEN
      TheDate := "Expected Receipt Date";
    
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • madmmadm Member Posts: 92
    that has sorted it! :D Thanks.

    I now have a set of IFs :


    IF TheDate < PRH."Posting Date" THEN
    KPI := 'LATE';

    giving early, on time etc

    How would I count each late for each group? I have tried the kpi = late then latecounter = 1

    and then have done a totallate = latecounter + 1.

    However, since late is a text it doesnt like it. I then tried putting

    IF TheDate < PRH."Posting Date" THEN
    KPI := 'LATE';
    LATEBOOLEAN := True

    but that didnt work either.
  • krikikriki Member, Moderator Posts: 9,115
    madm wrote:
    that has sorted it! :D Thanks.

    I now have a set of IFs :


    IF TheDate < PRH."Posting Date" THEN
    KPI := 'LATE';

    giving early, on time etc

    How would I count each late for each group? I have tried the kpi = late then latecounter = 1

    and then have done a totallate = latecounter + 1.

    However, since late is a text it doesnt like it. I then tried putting

    IF TheDate < PRH."Posting Date" THEN
    KPI := 'LATE';
    LATEBOOLEAN := True

    but that didnt work either.

    I didn't understand what exactly you want to do :-k
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • madmmadm Member Posts: 92
    kriki wrote:
    I didn't understand what exactly you want to do :-k
    Apologies - it was early ;):D

    The report checks the purchase order header "expected/promised date" against the last receipt posting date. This then illustrates how late/early the vendor sent the goods in.

    I have declared the following variables ( I used your "TheDate"!):

    IF TheDate < PRH."Posting Date" THEN
    KPI := 'LATE';
    IF TheDate > PRH."Posting Date" THEN
    KPI := 'EARLY';
    IF TheDate = PRH."Posting Date" THEN
    KPI := 'ON TIME';
    IF ("Last Receiving No." = '') AND (TheDate <= TODAY) THEN
    KPI := 'GOODS OVERDUE';
    IF ("Last Receiving No." = '') AND (TheDate >= TODAY) THEN
    KPI := 'NOT DUE';

    As a summary for each vendor, I want to count the number of orders and then number of lates, on time etc etc. This will then illustrate how the vendor is performing.

    (we use get receipt lines so the purchase orders are not posted upon invoice).

    Vendor No Of Orders Late On Time Early Etc etc
    abc 10 2 7 1
  • krikikriki Member, Moderator Posts: 9,115
    IF TheDate < PRH."Posting Date" THEN BEGIN
      KPI := 'LATE';
      intLate := intLate + 1;
    END;
    IF TheDate > PRH."Posting Date" THEN BEGIN
      KPI := 'EARLY';
      intEarly := intEarly + 1;
    END;
    IF TheDate = PRH."Posting Date" THEN BEGIN
      KPI := 'ON TIME';
      intOnTime := intOnTime + 1;
    END;
    IF ("Last Receiving No." = '') AND (TheDate <= TODAY) THEN
    KPI := 'GOODS OVERDUE';
    IF ("Last Receiving No." = '') AND (TheDate >= TODAY) THEN
    KPI := 'NOT DUE';
    
    And later you print those integers.
    Remember that you have to reset the integers for each vendor.
    I also suppose you print the orders ordered per Vendor.
    If not, those integers you must keep per vendor in a temptable.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.