Calculation more Request Order

Hi Everybody.

On Purchase Line of my include more Request Order. I want calculation Amount on all Request. But wrong.

This procedure only calculates 1 line. It can not repeat for the remaining lines by conditional :

RecRequisition.SETRANGE("Requisition No",RecPurchLine."Requisition No");

RecRequisition.RESET;
RecRequisition.SETRANGE("Requisition No",RecPurchLine."Requisition No");
IF RecRequisition.FIND('+') THEN BEGIN
  REPEAT
    RecRequisition.SETRANGE("Requisition No",RecPurchLine."Requisition No");
    RecRequisition.CALCSUMS(Amount);
    PRAmount:=RecRequisition.Amount;
  UNTIL RecRequisition.NEXT=0   ;
END;
MESSAGE(Txt0001,PRAmount);

Please help me fix code. Thanks so much

Best Regards,

Dinh Son

Parents Reply Children
Related
Recommended