====== Billing Process ====== The TapeTrack Billing process uses the following steps: * Extract data related to Billing from the TapeTrack Database * 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 * Output the Customer Billing data to XML file for input into your Invoice generating software, Excel sheet or other software package. ===== 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. At the completion of the program you will have one .ttstats (TapeTrack Statistics) file for each TapeTrack [[object:customer|Customer]]. ==== Example ==== Extract Billing data from last month where: * ''--R M-1:m-1'' is the date range * ''-h "%TMSS10DB%"'' is the database location TMSS10LogStatsExtractDB -R M-1:m-1 -h "%TMSS10DB%" ==== Output ==== Output from database with one Customer US01.ttstats CUS02 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 ===== Processing Data ===== [[cli:tmss10logstatsprocess|TMSS10LogStatsProcess]] reads through the .ttstats file and, using a definition file, filters the data, counts and applies the appropriate charges and creates an XML output file. ==== Example ==== === Billing Definition File === 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 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # AddStorageCharge( # Package Filter, <-- Package Filter # Customer Filter, <-- Customer Filter value e.g. ACME or AC* # Media Filter, <-- Media Filter value e.g. DL or D* or !(AI) # Rep Filter, <-- Repository filter e.g. OFFS # Round Up Factor, <-- Round up factor e.g. if 10 number will be rounded up to nearest 10 # Minumum Units, <-- Minimum units to bill # Threshold, <-- Theshold value, only totals over this value are billed # Cap, <-- Cap Value # Model, <-- Model number # Item Code, <-- Item code string # Customer, <-- Customer string # Description, <-- Description string # Cost, <-- Cost in cents # Continue, <-- continue on and bill next item if appropriate (0=No, !0=Yes) # ); # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # AddStorageChargeItem( "*", "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( # Package Filter, <-- Package Filter # Customer Filter, <-- Customer Filter value e.g. ACME or AC* # Media Filter, <-- Media Filter value e.g. DL or D* or !(AI) # From Rep Filter, <-- Repository filter e.g. OFFS # To Rep Filter, <-- Repository filter e.g. LIBR # Round Up Factor, <-- Round up factor e.g. if 10 number will be rounded up to nearest 10 # Minumum Units, <-- Minimum units to bill # Threshold, <-- Threshold value, only totals over this value are billed # Cap, <-- Cap Value # Model, <-- Model number # Item Code, <-- Item code string # Customer, <-- Customer string # Description, <-- Description string # Cost, <-- Cost in cents # 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", 10, false ); AddMovementChargeItem( "*", "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( # Package Filter, <-- Package Filter # Customer Filter, <-- Customer Filter value e.g. ACME or AC* # Journal Filter, <-- Journal Filter value e.g. 000001 # Round Up Factor, <-- Round up factor e.g. if 10 number will be rounded up to nearest 10 # Minumum Units, <-- Minimum units to bill # Threshold, <-- Theshold value, only totals over this value are billed # Cap, <-- Cap Value # Model, <-- Model number # Item Code, <- Item code string # Customer, <-- Customer string # Description, <-- Description string # Cost, <-- Cost in cents # Continue <- continue on and bill next item if appropriate (0=No, !0=Yes) # ); # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # AddJournalChargeItem( "*", "US01", "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 ); AddJournalChargeItem( "*", "US01", "00003", 0, 0, 0, 0, 0, "$CUSTOMER", "Delivery Charge", "Immediate Delivery", 1000, false ); {{tag> cookbook}}