Please enable JavaScript to view this site.

CWT User Interface Design Handbook

Navigation: Appendices > Tariff description

Tariff dynamic description label

Scroll Prev Top Next More

A tariff package contains one or several intervals that can be active at different times. To be able to specify the description in a more dynamic way, the textual tariff description can be specified for each individual interval in a tariff.

If a tariff package has one interval for each one of the days Monday, Tuesday and Wednesday, an individual interval description can be created for each one of the three intervals. The text displayed will then change depending on the current interval.

Intervals are defined with the tariff language within the tariff element (see CWT Software Configuration Handbook for more details).

Important:
If several intervals are active at the same time the CWT will pick the description of the first defined active interval in the tariff tag and display the description for that interval.

The tariff package interval descriptions are defined in a similar way as for a tariff package description, see example below:

<TARIFFPACKAGE name="intervalsample">
  <intervalDescription interval="monday">
    <description row="0" col="0" string="Monday:"/>
    <description row="0" col="1" string="$1 / @hour"/>
  </intervalDescription>
  <intervalDescription interval="tuesday">
    <description row="0" col="0" string="Tuesday:"/>
    <description row="0" col="1" string="$2 / @hour"/>
  </intervalDescription>
  <intervalDescription interval="wednesday">
    <description row="0" col="0" string="Wednesday:"/>
    <description row="0" col="1" string="$3 / @hour"/>
  </intervalDescription>
  <tariff>
     PACKAGE "MondayToWedneday";
     INTERVAL "monday";
     timepredicate = "($weekday = mon)";
     tariffrate = unit 1 per 60;
     INTERVAL "tuesday";
     timepredicate = "($weekday = tue)";
     tariffrate = unit 2 per 60;
     INTERVAL "wednesday";
     timepredicate = "($weekday = wed)";
     tariffrate = unit 3 per 60;
  </tariff>
</TARIFFPACKAGE>

The tariff package interval descriptions with row X and column Y defined in the CWT configuration file correspond to the user interface label with the name:

Name='TariffDynamicDescriptionLabel_Y+1_X+1'

Example: If the above tariff 'MondayToWedneday' is selected and the purchase end day is Wednesday, then the user interface label for row 0 Column 1 Name='TariffDynamicDescriptionLabel_2_1' will contain the string “$3 / hour”.