How to get extra charges

Vazid_490Vazid_490 Member Posts: 52
Hi,
I add three new fields and post them as item charges

Answers

  • KlappstuhlKlappstuhl Member Posts: 9
    Do you assign a fixed amount of dollars, euros, cents, etc to the specific carrier type? For example you could use cases.
    CASE "carrier type" OF
      "carrier type"::train:
        BEGIN
          amount := 0.30;
          "extra charges" := distance * amount;
        END;
      "carrier type"::truck:
        BEGIN
    
  • Vazid_490Vazid_490 Member Posts: 52
    edited 2016-08-27
    Thank you,
  • KlappstuhlKlappstuhl Member Posts: 9
    Vazid_490 wrote: »
    Thank you,
    here carrier type is a text data type not option....the above code is used when a carrier type is option..is am correct..??

    Yes you are right, in the case of a text field do the following
    CASE "carrier type" OF
      'train':
        BEGIN
          amount := 0.30;
          "extra charges" := distance * amount;
        END;
      'truck':
        BEGIN
    

    But I would recommend to use an option field.
  • Vazid_490Vazid_490 Member Posts: 52
    Thank you, I got it :)
  • Vazid_490Vazid_490 Member Posts: 52
    edited 2016-08-27
    ok
Sign In or Register to comment.