Tuesday, May 31, 2011

Utility to move pin_virtual_time(mode 1) and execute pin_bill_day

It sounds like huh, why should I need a script for changing virtual time or executing pin_bill_day but it has utility. Specially for BRM testing, there are scenarios where the movement of time followed by execution of pin_bill_day and pin_ledger_report are required, e.g.
   - Testing of invalid (soft declined/hard declined) credit cards
   - Checking the monthly bill for a certain period of time
   - Accounting validation by looking at General Ledger(GL) reports of certain months
   - Checking the expiration of the non-currency date based resources valid for a year
   - and so on

So this script has the following modes of operation when you will execute it :

$> perl tbill.pl
Current time is : mode 1  1367341200  Tue Apr 30 10:00:00 2013
mode 1  1367341200  Tue Apr 30 10:00:00 2013

Select from the following :
        1. Increment time to next day
        2. Increment time to a date
        3. Move time to a date by incrementing one day at a time
        4. Move time to a date by incrementing one month at a time :
        5. Move time to a date by incrementing 15 days at a time
        Your Selection(1|2|3|4|5) :


 
Option1 : Increment time to next day and execute pin_bill_day and pin_ledger_report
Option2 : Increment time to a particular date in future like some date after few months in the same year or next year
Option3 : Increment time to a date in future by executing pin_bill_day and pin_ledger_report on each day of that period
Option4 : Increment time to few months by moving one month at a time and executing pin_bill_day and pin_ledger_report each month
Option5 : Increment time to a date by moving 15 day at once and executing pin_bill_day and pin_ledger_report



Here is the link of the script :

5 comments:

  1. Hi,

    I have a query.
    I am writing a shell script for moving the pin_virtual_time to next billing time(from billinfo_t) and doing billing automatically.

    I created a code and ran it-

    like-
    BILLT= date +"%m%d%Y" -d @1366913279
    pin_virtual_time -m2 $BILLT

    This is giving me error that - too many/missing values.

    Can you please help

    ReplyDelete
  2. Try this:
    BILLT=`date +"%m%d0000%Y" -d @1366913279`
    pin_virtual_time -m2 $BILLT

    ReplyDelete
  3. hi sachid,

    Can u pls provide me link for script

    ReplyDelete
  4. Hi Sachid, Can you please provide the link for the script. Thanks

    ReplyDelete
  5. You can write a script to get the next_bill_date in a variable, for ex: bill_date

    and then include these line in the script, it will change the PVT.


    pvt_number=`date -d @$bill_date +'%m%d%H%M%Y'`
    pvt_number=$pvt_number+10
    pin_virtual_time -m2 $pvt_number


    Note: This will only add 1 month to the next_bill_t.

    ReplyDelete

Migrating PDC data from one system to another

Given System “A” with BRM and PDC and System “B” with BRM and PDC, following is the process for moving new or changed pricing data from ...