Menu

how to work with tarif and price

Help
R A Hunt
2007-03-12
2013-04-17
  • R A Hunt

    R A Hunt - 2007-03-12

    I've successfully downloaded and installed the libraries and the GUIs.  However, I'm not quite sure how the tarif and tarif parts should work, either from looking at the library code or playing with the GUI.  Can anyone clarify what a tarif part is, what an hour part is (lib), or what the difference between a tarif and a price (gui)?
    For example, let's say I want to make the price 3 euros for one hour, figured at 1 euro for every 20 minutes... how would I do that
    1. through the GUI cclfox
    2. using the libfox if I wanted to right my own GUI

    Sorry to have such vague questions; I appreciate any insight.
    Thanks in advance.

     
    • tizoc

      tizoc - 2007-03-13

      A "tarif" covers one entire week, you can have multiple tarifs, and change them whenever you want, and hace different tarifs applied to specific members. A tarif is composed of tarif parts. A tarif part represents a time range (from hour X to hour Y), a price per hour, the days of the week it applies, and individual prices. Prices are a minutes/cost asociation, and they are used when the user used internet for less than the minimum fractioning time (the default is 1 hour, but can be changed)

      If you want 3 euros for one hour and 1 euro for 20 minutes, you can add a price for the 20 minutes, or you can reduce the minutes at with the cost calculation system starts fractioning. When time is below the minimum for fractioning, it is rounded upwards to the nearest time/cost available, and if none if found, the price per hour is used. That means that if the minimum price is 20 minutes at $1 and the user used the pc for 13 minutes, he will be charged $1 (assuming we are not using fractioning at that point).

      If fractioning were used, and the price per hour was $13, he would be charged 3*13/60 = $0.65

       

Log in to post a comment.