Tuesday, December 18, 2018

LS NAV - Modify POS Screen to create button to pre-calculate loyalty value of input

Issue: If a customer wants to know how many points it will take to cover a bill, there is no way to determine that without attempting to tender with points, and even so, you cannot define the amount of points to pay with, only the dollar value, and the system then decides how many points it will use based on the exchange rate.
Users have to manually grab a calculator and work out how much money 50 points are worth, and then customers have to juggle items on the bill to get it to fall within that value.

Solution:
Add button to prompt for point input - display dollar output
Add button to prompt for dollar input - display point output


  • Create infocode LOYTOAMT
    • Enter prompt "Cash Amount->Pts"
    • Numeric Input
    • Number Pad
  • Create Button command INFO_K, parameter LOYTOAMT
  • C99008905
    • Create LOYTOAMT function
      • PointsDec Decimal
      • PT Codeunit POS Transaction
      • Txt Text
      • ER Record Currency Exchange Rate
LOYTOAMT(Points : Text) : Decimal
EVALUATE(PointsDec,Points);
Txt :=FORMAT(ER.POSExchangeLCYToFCY(TODAY,'EMP_POINTS',PointsDec));
    PT.PosMessage(Txt);

    • At end of IsInputOk

IF InfoEntry.Infocode = 'LOYTOAMT' THEN BEGIN
LOYTOAMT(InfoEntry.Information);
END;


No comments:

Post a Comment