Article ID: 129794, created on Nov 3, 2016, last review on Nov 3, 2016

  • Applies to:
  • Business Automation

Symptoms

Some price was changed on the specific service plan/resource rate, it is required to find out who and when did the changes.

Resolution

The history of the changes is kept in the database.

Price change on the service plan level:

    select "SubscriptionFee", "RenewalFee", "TransferFee", "DepositFee", "UserArc", "DateArc"::abstime from "PlanPeriodArc" where "PlanID" = <id> and "PlanPeriodID" = <period_id>

Price change for some resource rate:

    select "PlanRateID", "setupFee", "recurringFee", "costForAdditional", "UserArc", "DateArc"::abstime from "PlanRateArc" where "PlanID" = <id> and "resourceID" = <id>

compare the values with the records from non Arc table.

For example:

pba=> select "PlanRateID", "setupFee", "recurringFee", "costForAdditional", "UserArc", "DateArc"::abstime from "PlanRateArc" where "PlanID" = 2 and "resourceID" = 100000 order by "DateArc";
 PlanRateID |  setupFee  | recurringFee | costForAdditional | UserArc |        DateArc
------------+------------+--------------+-------------------+---------+------------------------
        424 | 0.00000000 |  20.00000000 |        0.00000000 |       1 | 2016-01-26 10:39:13+07
        424 | 0.00000000 |  20.00000000 |        0.00000000 |       1 | 2016-02-10 18:29:26+07
        424 | 0.00000000 |  20.00000000 |        0.00000000 |       1 | 2016-02-19 14:52:27+07
        424 | 0.00000000 |  20.00000000 |       25.00000000 |       1 | 2016-04-05 11:22:55+07
        424 | 0.00000000 |  20.00000000 |       25.00000000 |       1 | 2016-04-22 10:04:55+07
        424 | 0.00000000 |  20.00000000 |       25.00000000 |       1 | 2016-06-06 15:00:36+07
(6 rows)

pba=> select "PlanRateID", "setupFee", "recurringFee", "costForAdditional", "UserArc", "DateArc"::abstime from "PlanRate" where "PlanID" = 2 and "resourceID" = 100000 order by "DateArc";
 PlanRateID |  setupFee  | recurringFee | costForAdditional | UserArc |        DateArc
------------+------------+--------------+-------------------+---------+------------------------
        424 | 0.00000000 |  20.00000000 |       25.00000000 |       1 | 2016-10-28 15:24:08+07
(1 row)

That means that user 1 changed Overuse fee for the resource 100000 to 25 on 2016-04-05 11:22:55+07.

198398b282069eaf2d94a6af87dcb3ff caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF