TapeTrack Documentation

Because there is more to tape management than you ever realized

User Tools

Site Tools


cookbook:billing_process

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
cookbook:billing_process [2019/07/26 02:03] – [Example] Scott Cunliffecookbook:billing_process [2025/01/21 22:07] (current) – external edit 127.0.0.1
Line 3: Line 3:
 The TapeTrack Billing process uses the following steps: The TapeTrack Billing process uses the following steps:
  
-  * Extract data related to billing from the TapeTrack Database+  * Extract data related to Billing from the TapeTrack Database
   * Write the Billing data to .ttstats files, one for each Customer ID   * Write the Billing data to .ttstats files, one for each Customer ID
   * Process the Billing data using a definition file which filters the data and applies the relevant charges   * Process the Billing data using a definition file which filters the data and applies the relevant charges
-  * Output the Customer Billing data to XML file for input into your Invoice generating software, excel sheet or other software package.+  * Output the Customer Billing data to XML file for input into your Invoice generating software, Excel sheet or other software package.
  
 ===== Extracting Data ===== ===== Extracting Data =====
  
-[[cli:TMSS10LogStatsExtractDB|TMSS10LogStatsExtractDB]] reads through the TapeTrack history tables and creates billing extract files within the date range specified when the program is called.+[[cli:TMSS10LogStatsExtractDB|TMSS10LogStatsExtractDB]] reads through the TapeTrack history tables and creates Billing extract files within the date range specified when the program is called.
  
-At the completion of the program you will have one .ttstats (TapeTrack Statistics) file for each TapeTrack customer.+At the completion of the program you will have one .ttstats (TapeTrack Statistics) file for each TapeTrack [[object:customer|Customer]].
  
 ==== Example ==== ==== Example ====
Line 21: Line 21:
   * ''-h "%TMSS10DB%"'' is the database location   * ''-h "%TMSS10DB%"'' is the database location
  
-<sxh>+<code>
 TMSS10LogStatsExtractDB -R M-1:m-1 -h "%TMSS10DB%" TMSS10LogStatsExtractDB -R M-1:m-1 -h "%TMSS10DB%"
-</sxh>+</code>
  
 ==== Output ==== ==== Output ====
Line 31: Line 31:
 US01.ttstats US01.ttstats
  
-<sxh+<code
- +CUS02 
-</sxh>+ILTO 20201029000221000000 
 +SLTO LIBR20201029000220000000 
 +HLTO LIBR20201029000000000000 
 +SLTO OFFS20201029000001000000 
 +HLTO OFFS20201029000000000000 
 +ILTO 20201030000221000001 
 +SLTO LIBR20201030000220000001 
 +HLTO LIBR20201030000000000001 
 +SLTO OFFS20201030000001000001 
 +HLTO OFFS20201030000000000001 
 +ILTO 00000000000221000002 
 +SLTO LIBR00000000000440000002 
 +HLTO LIBR00000000000000000002 
 +SLTO OFFS00000000000002000002 
 +HLTO OFFS00000000000000000002 
 +</code>
  
 ===== Processing Data ===== ===== Processing Data =====
Line 43: Line 58:
 === Billing Definition File === === Billing Definition File ===
  
-<sxh>+Add storage charges for: 
 +   * US01 
 +     * DLT Catridges @ 4 cents per day 
 +     * LTO Cartridges @ 5 cents per day 
 + 
 +Add Movement or Transport charges for: 
 +  * US01 
 +    * From Customer to Vault @ 10 Cents per Volume 
 +    * From Vault to Customer @ 10 cents per Volume 
 + 
 +Add Delivery surcharge on non standard delivery times for: 
 +  * US01 
 +    * Express @ $4.00 
 +    * Overnight @ $6.00 
 +    * Immediate @ $10.00 
 + 
 +<code>
 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 +#
 # AddStorageCharge(  # AddStorageCharge( 
 # Package Filter, <-- Package Filter # Package Filter, <-- Package Filter
Line 63: Line 95:
 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
  
-AddStorageChargeItem("*", "US01", "DLT", "OFFS", 0, 0, 00000, 00000, 0, "$CUSTOMER", "$CUSTOMER2 STORAGE_OFFSITE", "DLT Vaulting Charge", 4,0); +AddStorageChargeItem( 
-AddStorageChargeItem("*", "US01", "LTO", "OFFS", 0, 0, 00000, 00000, 0, "$CUSTOMER", "$CUSTOMER2 STORAGE_OFFSITE", "LTO Cartridge Vaulting Charge", 4,0);+ "*",  
 + "US01",  
 + "DLT",  
 + "OFFS",  
 + 0,  
 + 0,  
 + 00000,  
 + 00000,  
 + 0,  
 + "$CUSTOMER",  
 + "$CUSTOMER2 STORAGE_OFFSITE",  
 + "DLT Vaulting Charge",  
 + 4,  
 + false 
 + ); 
 + 
 +AddStorageChargeItem( 
 + "*",  
 + "US01",  
 + "LTO",  
 + "OFFS",  
 + 0,  
 + 0,  
 + 00000,  
 + 00000,  
 + 0,  
 + "$CUSTOMER",  
 + "$CUSTOMER2 STORAGE_OFFSITE",  
 + "LTO Cartridge Vaulting Charge",  
 + 5 
 + false 
 + );
  
   
 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 +#
 # AddMovementChargeItem(  # AddMovementChargeItem( 
 # Package Filter, <-- Package Filter  # Package Filter, <-- Package Filter
Line 76: Line 140:
 # Round Up Factor, <-- Round up factor e.g. if 10 number will be rounded up to nearest 10 # Round Up Factor, <-- Round up factor e.g. if 10 number will be rounded up to nearest 10
 # Minumum Units, <-- Minimum units to bill  # Minumum Units, <-- Minimum units to bill
-# Threshold, <-- Theshold value, only totals over this value are billed  +# Threshold, <-- Threshold value, only totals over this value are billed  
-# Cap, <-- Cap Value  +# Cap, <-- Cap Value  
-# Model, <-- Model number  +# Model, <-- Model number  
-# Item Code, <-- Item code string  +# Item Code, <-- Item code string  
-# Customer, <-- Customer string +# Customer, <-- Customer string
 # Description, <-- Description string  # Description, <-- Description string
-# Cost, <-- Cost in cents  +# Cost, <-- Cost in cents  
-# Continue  <-- continue on and bill next item if appropriate (0=No, !0=Yes)+# Continue  <-- continue on and bill next item if appropriate (0=No, !0=Yes)
 # ); # );
 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
  
-AddMovementChargeItem("*", "US01", "DLT", "LIBR", "OFFS", 0, 0, 00000, 00000, 0, "$CUSTOMER", "$CUSTOMER2 to Vault", "DLT Transport Charge", 1,0); +AddMovementChargeItem( 
-AddMovementChargeItem("*", "US01", "LTO", "LIBR", "OFFS", 0, 0, 00000, 00000, 0, "$CUSTOMER", "$CUSTOMER2 to Vault", "LTO Transport Charge", 1,0);+ "*",  
 + "US01",  
 + "DLT",  
 + "LIBR",  
 + "OFFS",  
 + 0,  
 + 0,  
 + 00000,  
 + 00000,  
 + 0,  
 + "$CUSTOMER",  
 + "$CUSTOMER2 to Vault",  
 + "DLT Transport Charge",  
 + 10,  
 + false 
 + );
  
-AddMovementChargeItem("*", "US01", "DLT", "OFFS", "LIBR", 0, 0, 00000, 00000, 0, "$CUSTOMER", "Vault to $CUSTOMER2", "DLT Transport Charge", 1,0); +AddMovementChargeItem( 
-AddMovementChargeItem("*", "US011", "LTO", "OFFS", "LIBR", 0, 0, 00000, 00000, 0, "$CUSTOMER", "Vault to $CUSTOMER2", "LTO Transport Charge", 1,0); + "*",  
 + "US01",  
 + "LTO",  
 + "LIBR",  
 + "OFFS", 
 + 0,  
 + 0,  
 + 00000,  
 + 00000,  
 + 0,  
 + "$CUSTOMER",  
 + "$CUSTOMER2 to Vault",  
 + "LTO Transport Charge",  
 + 10,  
 + false 
 + ); 
 + 
 +AddMovementChargeItem( 
 + "*",  
 + "US01",  
 + "DLT",  
 + "OFFS",  
 + "LIBR",  
 + 0,  
 + 0,  
 + 00000,  
 + 00000,  
 + 0,  
 + "$CUSTOMER",  
 + "Vault to $CUSTOMER2",  
 + "DLT Transport Charge",  
 + 10 
 + false 
 + ); 
 + 
 +AddMovementChargeItem( 
 + "*",  
 + "US011",  
 + "LTO",  
 + "OFFS",  
 + "LIBR",  
 + 0,  
 + 0,  
 + 00000,  
 + 00000,  
 + 0,  
 + "$CUSTOMER",  
 + "Vault to $CUSTOMER2",  
 + "LTO Transport Charge",  
 + 10 
 + false 
 + );
   
   
 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 +#
 # AddJournalChargeItem( # AddJournalChargeItem(
 # Package Filter, <-- Package Filter  # Package Filter, <-- Package Filter
Line 101: Line 232:
 # Round Up Factor, <-- Round up factor e.g. if 10 number will be rounded up to nearest 10 # Round Up Factor, <-- Round up factor e.g. if 10 number will be rounded up to nearest 10
 # Minumum Units, <-- Minimum units to bill  # Minumum Units, <-- Minimum units to bill
-# Threshold, <-- Theshold value, only totals over this value are billed  +# Threshold, <-- Theshold value, only totals over this value are billed  
-# Cap, <-- Cap Value  +# Cap, <-- Cap Value  
-# Model, <-- Model number  +# Model, <-- Model number  
-# Item Code, <- Item code string  +# Item Code, <- Item code string  
-# Customer, <-- Customer string +# Customer, <-- Customer string
 # Description, <-- Description string  # Description, <-- Description string
-# Cost, <-- Cost in cents  +# Cost, <-- Cost in cents  
-# Continue <- continue on and bill next item if appropriate (0=No, !0=Yes) +# Continue <- continue on and bill next item if appropriate (0=No, !0=Yes)
 # ); # );
 # #
 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
  
-AddJournalChargeItem("*", "US01", "00000", 0, 0, 0, 0, 0, "$CUSTOMER", "Delivery Charge", "Standard Delivery", 200, 1); +AddJournalChargeItem( 
-AddJournalChargeItem("*", "US01", "00001", 0, 0, 0, 0, 0, "$CUSTOMER", "Delivery Charge", "Express Delivery", 400, 1); + "*",  
-AddJournalChargeItem("*", "US01", "00002", 0, 0, 0, 0, 0, "$CUSTOMER", "Delivery Charge", "Over Night Delivery", 600, 1); + "US01",  
-AddJournalChargeItem("*", "US01", "00003", 0, 0, 0, 0, 0, "$CUSTOMER", "Delivery Charge", "Immediate Delivery", 1000, 1);+ "00001",   
 + 0,  
 + 0,  
 + 0,  
 + 0,  
 + 0,   
 + "$CUSTOMER",  
 + "Delivery Charge",  
 + "Express Delivery",  
 + 400,   
 + false 
 + ); 
 + 
 +AddJournalChargeItem( 
 + "*",  
 + "US01",  
 + "00002",   
 + 0,  
 + 0,  
 + 0,  
 + 0,  
 + 0,  
 + "$CUSTOMER",  
 + "Delivery Charge",  
 + "Over Night Delivery",  
 + 600,   
 + false 
 + );
  
-</sxh>+AddJournalChargeItem( 
 + "*",  
 + "US01",  
 + "00003",  
 + 0,  
 + 0,  
 + 0,  
 + 0,  
 + 0,  
 + "$CUSTOMER",  
 + "Delivery Charge",  
 + "Immediate Delivery",  
 + 1000,   
 + false 
 + );
  
  
 + 
 +</code>
  
  
  
 +{{tag> cookbook}}
  
  
cookbook/billing_process.1564106586.txt.gz · Last modified: 2025/01/21 22:07 (external edit)