Utility bills are entered into Energy CAP to facilitate energy management. Bills may be entered manually or electronically via file import (EDI or flat file).
A bill can only be created for a bill-enabled account--that is, an account that has been correctly set up with all required information and associations with meters/vendors/bill templates/places, etc. Using the Account Wizard for account setup helps ensure that all information required for successful bill entry has been entered into the EnergyCAP software.
Associated bill template(s) must be effective for the bill start and end dates. Templates assure that all desired billing information is entered into the EnergyCAP database.
Bills are usually entered from the Account Manager (Accounting/Accounts) via the New Bills button from the Account Manager title bar. however, there are several other ways and places to open a Bill Entry window. Bills can be opened in Create (data can be entered) View (read-only) or Edit (data can be changed) modes. The remaining topics in this section of the User Manual will explain the bill entry module in detail.
A current bill is the next or most recent usage or cost data to be entered in the system. When creating a current bill, the start date defaults to the end date for the most recent bill in the system.
A historical bill is any usage or cost data entered in the system prior to the most current data already in the system. When creating a historical bill, the system prompts you for a start and end date instead of using the default start and end dates of the most recent bill in the system.
This topic describes some basic terms, acronyms and definitions used for electronic payments. When possible, an online reference is provided for additional research and explanation.
NACHA (National Automated Clearing House Association)
http://www.nacha.org/
EFT (Electronic Funds Transfer) and Wire Transfer:
http://www.fms.treas.gov/eft/index.html
ACH (Automated Clearing House)
http://www.fms.treas.gov/ach/index.html
ACH /CCD (Automated Clearing House/Cash Concentration and Disbursement)
http://www.allbusiness.com/glossaries/automated-clearing-house-ach/4943617-1.html
ACH/CCD + (Automated Clearing House/Cash Concentration and Disbursement + Addenda Record)
ACH /CTX(Automated Clearing House/Corporate Trade Exchange)
EDI (Electronic Data Interchange) 820 Payment and Remittance Order
http://www.amosoft.com/articles/edi-overview.html
To correct or update this document, please add your comment using the comments field available below.
The auditing setup process is discussed in detail in the comprehensive HELP topic group on the subject.
This topic provides information on bill audit options that may be part of the work flow process for bill entry.
Bills can be audited in a number of ways:
To audit a single bill in EnergyCAP, open the bill in the Create, View or Edit mode and click the Audit button at the bottom of the Bill window. 
The Quick Check Audit Group that was pre-selected in the Work Flow Wizard will run automatically for the bill, including any and all audits associated with the group.
After the Quick Check is complete, audit results (if any) will be displayed in the Audit Results window.

To run additional audits, click the check box corresponding to the desired audit group. Then click the OK button.
To audit a bill batch, complete bill entry for all bills in the batch. Then click the Work Flow Manager icon from the Accounting navigation icons. The Work Flow Manager will open.
Locate the Batch folder in the Work Flow Manager Tree View and then find the desired batch in the folder.
Once the bills are displayed, use the Shift-click or Ctrl-click functionality to highlight/select the bills in the batch. then RIGHT-click and select Audit from the popup menu options.
If the batch has already been closed, click the Options button from the Work Flow Manager title bar to open the Work Flow Options window.
From the General tab, select the desired display option in the drop-down list and then click the checkbox for the Show Bills in Batch filter option. Input the Batch Code, then click OK.
Once the bills are displayed, use the Shift-click or Ctrl-click functionality to highlight/select the bills in the batch. then RIGHT-click and select Audit from the popup menu options.
Audit results will be displayed in the Audit pane of the Work Flow Manager, directly below the bill list. Audits are listed individually for each bill. to view the audits, scroll down the bill list and highlight individual bills. You can also use the keyboard up/down arrow keys to select the next bill in the list.
To audit from the Audit Manager, click on the Bill Audits folder for a desired Audit Batch. Then click the Audit menu item and select Execute/All Data or Execute/Selected.
NOTE: This option may take quite some time, and is generally not recommended. If the Audit procedure is initiated using this option, the audits may be cancelled by clicking the Cancel Audit button that will appear in the Audit Manager title bar during audit execution.

NOTES: Use the Drop-Down arrows to select the desired Vendor/Commodity/Cost Center/Place/Account. Use the horizontal "Add" arrow to add the accounts associated with the filter to the Selected Accounts list box.
The Remove Selection arrow removes a highlighted account from the Selected Accounts list box.
Multiple accounts can be added individually by selecting the individual account from the drop-down list, and then clicking the "Add" arrow to populate the Selected Accounts list box with the currently-selected account.
Audits may be run multiple times. The same audit may be part of multiple audit groups. Running an audit more than once on a bill will cause the bill to be re-audited, regardless of the results of the previous audit.
If the bill failed previously, the audit result record will be updated with the new result.
The audit result table (called BillMessageLog) does not record the Audit Group; i.e. the Audit Group is irrelevant.
For additional information on auditing in EnergyCAP, see the Audit Overview and Installation.
In the EnergyCAP database, there are three tables that maintain Bill details:
This topic provides detailed information about each table, including:
A thorough understanding of these three tables will be helpful in maintaining the database and extracting meaningful data in EnergyCAP reports and custom spreadsheets.
The purpose of the Bill Table is to store summary bill information. The Bill table contains all of the optional Bill Header data available through the Workflow Wizard setup process: The following table lists each data element column in the Bill table, along with the input Data Type, NULL information, and a Description of the element.
| Column Name | Data Type | Allow NULLs | Description |
| billID | int | No | Unique bill identifier. A BillID equates to ONE bill in EnergyCAP |
| batchID | int | Yes | References the Batch table and ties a Bill to a Batch |
| accountID | int | No | References the Account table and ties a Bill to an Account |
| beginDate | datetime | No | Start Date of the Bill |
| endDate | datetime | No | End Date of the Bill |
| billingPeriodID | int | No | References the BillingPeriod table and ties a Bill to a Billing Period |
| billingPeriod | numeric(6, 0) | Yes | Billing Period of the Bill |
| billingPeriodYear | int | No | Billing Period Year of the Bill |
| accountPeriodID | int | Yes | References the AccountPeriod table and ties a Bill to a Accounting Period |
| accountPeriod | numeric(6, 0) | Yes | Accounting Period of the Bill |
| accountPeriodYear | int | Yes | Accounting Period Year of the Bill |
| totalCost | money | No | Pay Amount of the Bill |
| estimated | bit | No | Indicates if the Bill is an Estimated Bill or not |
| approved | bit | No | Indicates if the Bill is Approved or not |
| approveDate | datetime | Yes | When the Bill was Approved |
| approvedBy | int | Yes | Who Approved the Bill - References the SystemUser table (approvedby = systemuserid) |
| exported | bit | No | Indicates if the Bill is Exported or not |
| exportDate | datetime | Yes | When the Bill was Exported |
| exportedBy | int | Yes | Who Exported the Bill - References the SystemUser table (exportedby = systemuserid) |
| observationMethodID | int | No | References the ObservationMethod table - Indicates the method by which the Bill was created (Manual, Simulated, Automatic/Imported, Accrual, Estimated) |
| statementDate | datetime | Yes | Statement Date of the Bill |
| dueDate | datetime | Yes | Due Date of the Bill |
| nextReading | datetime | Yes | Next Reading of the Bill |
| controlCode | varchar(255) | Yes | Control Code of the Bill - often stores the Bill Image file name without the file extension |
| invoiceNumber | varchar(32) | Yes | Invoice Number of the Bill |
| invoicePages | int | Yes | Number of Invoice Pages of the Bill |
| checkNumber | varchar(32) | Yes | Check Number used to pay the Bill |
| checkDate | datetime | Yes | Date of the Check used to pay the Bill |
| payStatus | varchar(10) | Yes | Status of the Bill Payment |
| clearedDate | datetime | Yes | Date the Check used to pay the Bill was cleared |
| createdBy | int | No | Who Created the Bill - References the SystemUser table (createdby = systemuserid) |
| createdDate | datetime | No | When the Bill was Created |
| modifiedBy | int | No | Who last Modified the Bill - References the SystemUser table (modifiedby = systemuserid) |
| modifiedDate | datetime | No | When the Bill was last Modified |
| void | bit | No | Indicates if the Bill is VOID |
| dirty | bit | No | Indicates if the Bill is "dirty" - meaning if it is dirty, BillAccountMeter may not have the proper values for the Bill and cleanbill should be run |
| importVerified | bit | No | Indicates if the Bill was verified after import to EnergyCAP |
| accrual | bit | No | Indicate if the Bill is an Accrual |
| accrualReversed | bit | No | Indicates if the Bill is an Accrual and has been reversed |
| accrualReversedDate | datetime | Yes | Indicates if the Bill is an Accrual and when it was reversed |
| exportHold | bit | No | indicates if the Bill is being held from being Exported to AP |
| glExported | bit | No | Indicates if the Bill has been exported to GL |
| glExportDate | datetime | Yes | When the Bill was exported to GL |
| glExportedBy | int | Yes | Who exported the Bill to GL - References the SystemUser table (glexportedby = systemuserid) |
| fromVendor | bit | No | Indicates if the bill was from a vendor or to a customer |
| hasBeenSplit | bit | No | Indicates if the Bill has been split yet in cases where Bill Splits are involved |
| wasSplitDate | datetime | Yes | When the Bill was split |
| transRefNum | varchar(32) | Yes | Not Used |
| paymentType | varchar(32) | Yes | Indicates the method of payment used to pay the Bill |
| actualAmountPaid | money | Yes | Indicates the actual amount that was paid |
Relationships to Bodyline and BillAccountMeter
The Bill table contains the TOTAL COST of the bill – the sum total of the Bodylines of the bill. Unlike BillAccountMeter, no meter-specific information is included. When the Observation Type rules (Ignored, Credit/Provided, Debit/Consumed) are applied the Bodylines of a bill, the total amount should equal the TotalCost in the Bill table.
The Bodyline table contains the line by line information that is entered on the Bill Template. Each line of the Bill Template – the value and the cost and even the caption – are stored in the Bodyline table. It contains the most detailed view of a bill as it contains each and every template line that makes up a bill.
The following table lists each data element column in the Bodyline table and what it refers to.
| Column Name | Data Type | Allow NULLs | Description |
| bodyLineID | int | No | Unique ID for each row of each bill in EnergyCAP - No duplicates ever |
| meterID | int | Yes | References the Meter table. If NULL, indicates the bodyline is an Account Charge, otherwise it indicates which Meter the bodyline is associated with. |
| generalLedgerID | int | Yes | References the Generalledger table. If NULL, indicates the bodyline is not associated with a GL Record. |
| accountID | int | No | References the Account table. Indicates which Account the bodyline is associated with. |
| billID | int | No | References the Bill table. Indicates which Bill the bodyline is associated with. |
| vendorID | int | No | References the Vendor table. Indicates which vendor the bodyline is associated with. |
| observationTypeID | int | No | References the ObservationType table. Indicates which Observation Type the bodyline is associated with. |
| commodityID | int | No | References the Commodity table. Inidcates which commodity the bodyline is associated with. |
| observationMethodID | int | No | References the ObservationMethod table. Indicates the method by which the Bill was created (Manual, Simulated, Automatic/Imported, Accrual, Estimated) |
| unitID | int | Yes | References the Unit table. Indicates the unit of measure that the bodyline value is associated with. |
| value | numeric(19, 6) | Yes | The Value of the bodyline Observation Type |
| cost | money | Yes | The Cost of the bodyline Observation Type |
| costUnitID | int | Yes | References the Unit table. Indicates the unit of measure that the bodyline cost is associated with. |
| displayOrder | int | No | Indicates what order the bodyline appears on the bill when it is viewed in EnergyCAP |
| caption | varchar(32) | Yes | The caption of the bodyline from the Bill Template |
| helpTag | varchar(32) | Yes | The help tag of the bodyline from the Bill Template |
| beginDate | datetime | No | Start Date of the bodyline of the Bill - most times it is the same as the Bill's Start Date |
| endDate | datetime | No | End Date of the Bill - most times it is the same as the Bill's End Date |
Relationships to Bill and BillAccountMeter
Bodyline cost, when the Observation Type rules are taken into account, should total up to be the Bill totalcost. The stored procedure cleanbill will read the bodylines of a particular bill and then summarize them to the BillAccountMeter table according to the Observation type rules. When a Bill is marked as dirty, cleanbill will read the bodylines that match the BillID of the dirty bill and then UPDATE the BillAccountMeter table rows that have the same BillID value. In this way, if the Common Roll-up unit is changed, the Bills in EnergyCAP can be marked as dirty so that cleanbill can re-calculate the proper Common and Global values in the BillAccountMeter table for each of the bills.
About Observation Types and the Observation Type Table
The Bodyline table contains an ObservationTypeID value which corresponds to a particular Observation Type. The master list of Observation Types can be referenced from within the EnergyCAP application by clicking on Tools then Unit System from the menu bar. The Types tab displays each Observation Type and the color indicates how the Observation Type is interpreted/calculated by EnergyCAP. The bodyline table contains the link to this Observation Type for each and every utility bill value that is entered on a bill. It is essentially the building blocks to determine the total cost, consumption, and demand for a bill.
The BillAccountMeter table contains summarized totals by meter (and where MeterID is NULL, a summary of the account charges) by account for each bill. So, as an example, if an account has two meters on it, and a bill is saved, there would be TWO BillAccountMeter records created – one for each meter UNLESS there were account charges entered as well in which case there would be THREE records created. This is the table which the majority of EnergyCAP Custom Spreadsheets, Reports, and PowerViews are based from. The true power of the BillAccountMeter table is its native, Common, and Global roll-up values. The cleanbill process utilitzes the Unit System conversions and setup to transform the bodyline value to Common and Global values. In other words, Bodyline would contain the value of 100 if a Bill were to have 100 THERMS of gas on it. BillAccountMeter would have 100 as the NativeUse, 10 as the Common Use (assuming the Common Roll-up for Natural Gas is DKTHERM), and 1 as the GlobalUse (assuming the Global Roll-up is MMBTU). So BillAccountMeter is critical to reporting on accounts of the same or different commodities that use various units of measure.
The following table lists each data element column in the Bodyline table and what it refers to.
| Column Name | Data Type | Allow NULLs | Description |
| rowNum | int | No | Used as a unique identifier |
| billID | int | No | References the Bill table. Indicates which Bill the bodyline is associated with. |
| masterAccountID | int | No | References the Account table. Indicates the Master Account ID (in cases of Bill Splits), or in other words, the source account which was used to create the bill |
| accountID | int | No | References the Account table. Indicates which Account the bodyline is associated with. |
| meterID | int | Yes | References the Meter table. If NULL, indicates the bodyline is an Account Charge, otherwise it indicates which Meter the bodyline is associated with. |
| commodityID | int | Yes | References the Commodity table. Inidcates which commodity the bodyline is associated with. |
| vendorID | int | No | References the Vendor table. Indicates which vendor the bodyline is associated with. |
| placeID | int | Yes | References the Place table. Indicates where the MeterID is located in the facility tree. |
| billingPeriod | numeric(6, 0) | No | Billing Period of the Bill |
| beginDate | datetime | No | Start Date of the Bill |
| endDate | datetime | No | End Date of the Bill |
| days | int | No | Number of days in the billing period of the bill |
| nativeUse | numeric(19, 6) | Yes | The total of the Usage Observation Type vlaues from Bodyline |
| nativeUsePerDay | numeric(19, 6) | Yes | Native Use divided by the number of days in the billing period. |
| nativeUseUnitID | int | Yes | References the Unit table. Indicates the unit of measure that was setup on the Bill Template for Usage. From the Observation Type UnitID in Bodyline. |
| commonUse | numeric(19, 6) | Yes | The total of the Usage Observation Type vlaues from Bodyline CONVERTED to the Common Roll-up Unit of Measure indicated in the Unit System for the specific commodity |
| commonUsePerDay | numeric(19, 6) | Yes | Common Use divided by the number of days in the billing period. |
| commonUseUnitID | int | Yes | References the Unit table. Indicates the unit of measure in the Unit System for usage Common Roll-up. |
| globalUse | numeric(19, 6) | Yes | The total of the Usage Observation Type vlaues from Bodyline CONVERTED to the Global Roll-up Unit of Measure indicated in the Unit System for all commodities of energy |
| globalUsePerDay | numeric(19, 6) | Yes | Global Use divided by the number of days in the billing period. |
| globalUseUnitID | int | Yes | References the Unit table. Indicates the unit of measure in the Unit System for usage Gobal Roll-up. |
| nativeBillDem | numeric(19, 6) | Yes | Same as nativeuse, but for the Observation Type Billed Demand |
| nativeBillDemUnitID | int | Yes | Same as nativeuse, but for the Observation Type Billed Demand |
| nativeActDem | numeric(19, 6) | Yes | Same as nativeuse, but for the Observation Type Actual Demand |
| nativeActDemUnitID | int | Yes | Same as nativeuse, but for the Observation Type Actual Demand |
| nativeDem | numeric(19, 6) | Yes | Same as nativeuse, but for the Observation Type Demand |
| nativeDemUnitID | int | Yes | Same as nativeuse, but for the Observation Type Demand |
| commonBillDem | numeric(19, 6) | Yes | Same as common use, but for the Observation Type Billed Demand |
| commonBillDemUnitID | int | Yes | Same as common use, but for the Observation Type Billed Demand |
| commonActDem | numeric(19, 6) | Yes | Same as common use, but for the Observation Type Actual Demand |
| commonActDemUnitID | int | Yes | Same as common use, but for the Observation Type Actual Demand |
| commonDem | numeric(19, 6) | Yes | Same as common use, but for the Observation Type Demand |
| commonDemUnitID | int | Yes | Same as common use, but for the Observation Type Demand |
| directCost | money | Yes | The sum of the costs from bodyline with Observation Type rules being considered for the meter indicated by the MeterID |
| directCostPerDay | money | Yes | The sum of the costs from bodyline with Observation Type rules being considered for the meter indicated by the MeterID divided by the number of days in the billing period. |
| propCost | money | Yes | The sum of the costs from bodyline with Observation Type rules being considered for the meter indicated by the MeterID PLUS Account Charges that were evenly distributed across the meters on the bill |
| propCostPerDay | money | Yes | The sum of the costs from bodyline with Observation Type rules being considered for the meter indicated by the MeterID PLUS Account Charges that were evenly distributed across the meters on the bill divided by the number of days in the billing period |
Relationships to Bill and Bodyline
The sum total of the BillAccountMeter propcost should sum to be the Bill totalcost. The Observation Type, value, unitid, cost, and costunitid from bodyline are all used by cleanbill to determine the nativeuse, commonuse, globaluse, nativebilldem, nativeactdem, nativedem, commonbilldem, commonactdem, and commondem in BillAccountMeter. Every time a change is made to the Unit System in EnergyCAP such as changing the Common Roll-up for natural Gas from DKTHERM to MCF, the bill need to be marked as dirty and then the cleanbill process needs to be run so that the Common Use, Common Demand, and Global Use values can be re-calculated and updated to billAccountMeter so the reports will report the correct values according to the new Unit System settings.
A Custom Spreadsheet has been created as a tool for reporting on, and extracting billing data. The Custom Spreadsheet is not part of the standard EnergyCAP installation. To obtain a copy of this Custom Spreadsheet, download the Tech Support Custom Spreadsheets file (TechSupportCS.xml) from our Support Suite technical support website.
When the contents and the relationship between EnergyCAP’s three bill tables is understood, the Tech Support Custom Spreadsheets will provide an excellent tool for reporting on, and extracting billing data.
There are three primary billing tables in EnergyCAP Enterprise:
The Bodyline table in EnergyCAP Enterprise contains utility bill data. Bodyline table design philosophy is that each bodyline essentially describes an element of a transaction or sale. Something is being sold, and the bodyline describes the sale. There are five data elements relating to bodyline data:
EXAMPLE: If the purchased commodity was natural gas, it might be purchased by volume or energy content (heat). If it were by volume the observation type would be usage and the unit of measure might be CCF or MCF.
In EnergyCAP, the property of the commodity being sold is called an “Observation Type”, since it is a measured or observed aspect of the commodity. An observation type in EnergyCAP is defined as a noun (also called “class”) plus modifiers (three different types—see below). The most common noun is “Usage.” To view the list of observation types in EnergyCAP, click Tools>-Unit System>Types tab. Note that there are several possible modifiers to Observation Type. From the Tools>Unit System>Types tab, click on any observation type and then click Properties. The Class (noun) and Details (modifiers) for the Observation Type will be displayed.
- Class
A class is a ‘category’ that describes the Observation Type. There are a limited number of fixed Classes in EnergyCAP Enterprise.
- Time of Use Modifier
Instead of creating a noun for each time of use period, the observation type is set up to allow selection of one of several possible Time of Use periods. In the example, ONPEAKUSE, USE is the noun; ON PEAK is the modifier. There are a limited number of fixed Time of Use modifiers in EnergyCAP Enterprise.
- Origin Modifier
The Origin modifier enables the processing of deregulated bills by permitting tracking of both the retailer and local distribution company usage without it twice. Observation Types with an Origin set to anything other than Null have use ignored in the BAM table (described below) and therefore do not appear on standard reports. Available Origins include: contracted, distribution, generation, standby, storage, transmission and stranded. Custom reports can include bodylines that use these origin modifiers. There are a limited number of fixed Origin modifiers in EnergyCAP Enterprise.
- Applied Modifier
The Applied modifier was created to handle rebates and “negative” value situations. The normal value is “credit/provided.” Debit/consumed came about because of rebates which for accounting purposes offset expenditures, but were recorded as positive expenditures (all entries in the cost column are positive expenditures). See the section below on Cost for the rule on using the “ignored” option for Applied. There are a limited number of fixed Applied modifiers in EnergyCAP Enterprise.
The BillAccountMeter table (BAM) is used to create most EnergyCAP reports. It is a consolidated meter view with calculated Use, Demand, Actual Demand, Billed Demand and cost per meter per bill. The BAM table accelerates report processing, because without it the system would have to evaluate all bodylines and apply various logic to each. The BAM table is maintained as bills are entered, thereby serving as a report ‘pre-processor.’
How BAM works
To calculate the BAM entries for a bill, EnergyCAP first determines that it is a valid bill. It cannot be unapproved, void, or a recharge bill (billObservationMethodID = 3).
Then, EnergyCAP decides whether to accumulate the use, actual demand, billed demand, and cost in the BAM table for the appropriate account, meter and bill. It does this by examining the noun (class) first, and then the modifiers. Below is an explanation of the logic EnergyCAP uses to deciding whether to include each data element:
Use
Logic: Include Use in BAM if (ObservationType.noun = 26) AND (ObservationType.creation IS NULL) AND (ObservationType.credit <> 3)
The Noun must be Usage (ID=26, see Noun table). Note that “Billed Use”, use that is billed to others (tenants, etc) has a Noun ID = 3 and is therefore excluded.
The Origin modifier must be NULL; BAM does not include use for any deregulated bill type (generation, transmission, etc)
The Applied modifier must not be ignore (ID=3). (The Rebate credit is handled by this formula: (abs(observationtype.credit - 2) * 2 - 1) * value. The Applied modifier is 2, so (2-2)*2-1= -1)
By looking in the ObservationType table, it is straightforward to determine if any particular Observation Type will qualify based on these three criteria.
Actual Demand
Logic: Include Actual Demand in BAM if (ObservationType.noun = 10) AND (ObservationType.credit) <> 3
The noun must be Demand(10)
The credit must not be ignore(3)
Billed Demand
Logic: Include Billed Demand in BAM if (ObservationType.noun = 2) AND (ObservationType.credit <> 3)
The noun must be Billed Demand(2)
The credit must not be ignore(3)
Cost
Logic: Include Cost in BAM if (observationtype.credit <> 3 or (observationtype.credit = 3 and (bodyline.cost is not null and (bodyline.unitid <> bodyline.costunitid))))
The Applied must not be ignore(3) UNLESS there is a cost on the bodyline, and the bodyline is ignored and the value being observed is not the cost.
This rather odd rule come from the fact that EnergyCAP is recording two pieces of data on every bodyline (use/demand/etc and cost), but the observationtype applies to only one of them (use/demand/etc).
To ignore cost on reports, place the cost on its own bodyline, and set the observation type Applied modifier to ignore(3).
Once the bodyline determinations for a meter on an account are done, EnergyCAP sums the uses and costs for the meter, and chooses the maximum actual and billed demand. The Demand for the bill is calculated by examining those maximums and following the rule: if there is an actual demand, use that value; if not, use the billed demand. Use and cost are also divided by the number of days in the bill to derive use per day and cost per day. The BAM record is then created.
Most EnergyCAP installed reports which include Use follow the same rules as above, since report data is pulled from the BAM table and NOT from Bodyline (exceptions are AN21, BL07, BL16, BL16A, and BL19--data for these reports is taken from the Bodyline table).
The same is true for actual demand and billed demand. Reports based on the demand_trend view also use the Demand rule of actual, then billed Demand. Cost follows the above rules, and reports based on the energy_cost_trend view use the prorated cost per meter which assigns account-only cost to each meter in proportion to its direct cost.
Custom reports, however, can be created to key off (or ignore) any of the fields discussed above. As long as the data is captured in the Bodyline table, it is possible to report on it.
EnergyCAP offers several options for creating accounts and bills for internal and/or tenant billing (chargebacks/recharge billing):
The diagrams below provide insights into each option, and how the various options may be blended to accommodate a variety of potential scenarios.




NOTE: Once appropriate accounts are set up and and processes are in place, the IN01 report provides a means of generating invoice-like documents for internal and/or tenant billing. Other available invoice-related reports include IN02--Account History and IN03--Customer History. See the Sample Reports web page for more information.
The Special Charges Editor allows you manage a list of special charges, any of which can be added to the bill entry template for a specific bill during the bill entry process. Special Charges enable data entry of one-time, occasional or periodic charges that do not exist on the bill entry template that has been associated with the account.
To manage the list of Special Charges available to bill entry personnel:
Select Accounting > Accounts. The Account Manager appears.
From the Account menu, select Editors> Special Charges. The Special Charges Editor window will open.
You can:
Exit the Special Charges Editor window by clicking Close.
Special charges are assigned during bill entry, and may be added to a bill whenever the pay amount total does not equal the sum of the template charges/costs (i.e., whenever there is a balance) at the time the Save button is clicked.
EnergyCAP will prompt bill entry personnel to allocate any balance (positive or negative) through the Remaining Balance window.
To assign a Special Charge:

The best practice for handling refund checks in EnergyCAP is to identify the account(s)/meter(s) and cost/usage associated with the refund and to apply the refund to the associated account(s)/meter(s) in the relevant billing period(s). This helps ensure the integrity of EnergyCAP data, which will enhance the accuracy of related calculations including total use and cost, cost per unit, budgets, cost avoidance, and accruals.
Refunds can be handled by either entering a refund “bill” with negative values for the relevant billing period (see image below) or by adjusting the use and cost of the original bill to take the refund into account.

[A refund “bill”—note negative values for use and cost.]
The appropriate choice will depend on the relationship between EnergyCAP and the organization Accounts Payable department. If EnergyCAP is serving as a ‘front end’ for A/P and exporting billing data to AP directly for payment, special arrangements may need to be made for refund processing, especially if the entire A/P billing cycle is tracked in EnergyCAP. In this case, consult with the A/P department to determine the best refund process.
QUESTION: What if the refund statement does not include any usage data?
ANSWER: If the statement includes enough information to determine a time period to which the refund should be applied, use the historical cost/day and use/day information available in EnergyCAP to determine usage. If neither usage nor time period is available, contact the utility vendor to obtain additional information.
QUESTION: What if the refund is due to a long-term running overcharge?
ANSWER: If the time period can be determined, then individual bills can still be edited, or a series of “refund bills” can be applied.
QUESTION: How important is it that ECAP agrees exactly with A/P with respect to refund tracking?
ANSWER: This depends upon the organization use of EnergyCAP, and the processes tying EnergyCAP to A/P.
QUESTION: How will refunds appear in PowerViews/reports?
ANSWER: If handled using the best practice described above, refunds will balance with the initial overcharge, providing an accurate graphical representation of use and cost for all PowerViews™. Columnar reports will display refund bills separately when refunds are recorded in that manner, and it would also be possible to create a Bill Message and Key called REFUND (RF) that could be used to flag all refund bills. The BL20 report could then be used to generate monthly cost totals for refunds. Another solution is to create an Issue (Cost Avoidance/Issue Tracker) and document the refund with an Issue Type. CAP14 reports on Issue Cost.
CAUTION: The Groups Manager uses different logic than the other PowerViews (Bills/Facility) and will produce different cost/day and use/day results when determining these values for accounts/meters for refunds handled with a separate, negative refund transaction.
QUESTION: How will refunds impact budget creation and audits, and is that a problem?
ANSWER: Again, if best practices are followed, budgets (which are based on historical billing data) will be more accurate. EnergyCAP may flag an overcharge during auditing. The “refund” bill may also be flagged, depending on the use/cost values associated with each.
Question: Is there a way to have a tax bill item included in the bill total, but excluded from the Average Unit Cost (AUC) in the Power Views? For example, a bill for 100 kWh has a total charge of $110, where $100 is the cost for the kWh consumed and $10 is Tax. Currently, the Power View shows an AUC of $1.10, rather than an AUC of $1.00.
Answer: Yes. However, it is important to consider that many reporting organizations may consider taxes as part of the cost of doing business. Therefore, it is recommended that taxes be included in the AUC calculations. That being said, if it is necessary to exclude taxes from the AUC calculations, those taxes will need to be assigned to the Account Level, rather than the Meter Level, during EnergyCAP Bill Entry. There are two methods that can be used to have the taxes assigned to the Account Level.
It's important in EnergyCAP to accurately DATE cost and consumption data. This ensures that expenses and use are tracked correctly in time-related graphs and charts. For most utility bills this is easy to do because the Start Date and End Date defined for the utility billing period clearly fall in one month or another.
Many EnergyCAP graphs, charts, and reports display utility billing data based on the Billing Period. When you have a bill that is dated, say, June 15 to July 15, selecting the proper Billing Period can be complicated. In terms of monthly reporting, is it a June bill or a July bill? And what about quarterly billing, and so on. How does EnergyCAP decide?
The goals are:
To accomplish these two goals, EnergyCAP uses a series of logical rules to determine the billing period month of each bill, regardless of whether it is manually keyed OR imported:
The 'default' rule is that EnergyCAP 'splits the difference' between the Start Date and End Date for the billing period; the middle of the period marks the billing period month.
If the number of days in the billing period is greater than 45, then the 'default' logic is still used.
However, IF the billing period is LESS than 45 days, then a second logical step is applied.
THEN: The billing period month will be moved back one month.
Similarly, when there ALREADY exists a bill for THIS month AND the 'middle-of-the-bill' date is equal to or greater than the 26th of THIS month, AND the billing period End Date is greater than Day 1 of the NEXT month, then the billing period will be moved forward a month.
To enter bills, first locate and select the account to which the biill is to be assigned.
To select a specific account for bill entry:

NOTE: For a more advanced account search, use the Find Account button
from the Account Manager title bar to open a Search window. With the advanced Search window, multiple search criteria can be selected:
A bill can only be created for a bill-enabled account with an associated template effective for the period relevant to the bill start date. A current bill is the next or most recent usage or cost data to be entered in the system. When using the Create Current Bill Process, the start date defaults to the end date of the most recent bill for that account in the system. If you need to enter a bill with a different start date, go to Creating a Historical Bill.
You can create current bills from the EnergyCAP Work Flow Manager or the Account Manager.
To create a current bill from the Work Flow Manager:
Select the Bill folder.
From the Bill menu, select New > Current. The Account Selection window appears.
In the Account code field, enter any or all of the account's unique, self-defined identifier. Matches are displayed in the Matches list.
Select the appropriate account.
Click OK. The Create Bill window appears.
Enter bill information.
When done, click Save to save the bill information. Or use the Alt-N or Alt-S keyboard combination. Alt-S saves the current bill and does nothing else. Alt-N and the Save button saves the current bill and moves forward per the user's work flow manager option settings (Tools > Options-This Manager > Bill Entry tab).
To create a current bill from the Account Manager:
Click
to navigate to the cost center under which the account exists.
Select the account to add the bill.
From the Bill menu, select New > Current. The Create Bill window appears.
Enter bill information.
When done, click Save to save the bill information.
A bill can only be created for a bill-enabled account with an associated template effective for the period relevant to the bill start date. A historical bill is any usage or cost data to be entered in the system relevant to a period in time prior to the most current data already in the system.
When creating a historical bill, the system prompts you for a start date instead of using the default start date of the most recent bill in the system. If you need to enter a bill with a start date that is more recent than the most current bill in the system, go to Creating a Current Bill.
You can create historical bills in the Work Flow Manager or the Account Manager.
To create a historical bill in the Work Flow Manager:
Select the Bill folder.
From the Bill menu, select New > Historical. The Account Selection window appears.
In the Account code field, enter any or all of the account's unique, self-defined identifier. Matches are displayed in the Matches list.
Select the appropriate account.
Click OK. The Assign Bill Dates window appears.
Go to step 3.
To create a historical bill in the Account Manager:
Click
to navigate to the cost center under which the account exists.
Select the account to add the bill.
From the Bill menu, select New > Historical. The Assign Bill Dates window appears.
Go to step 3.
In the Assign Bill Dates window Start date field, enter the date or use the drop-down calendar to select the date.
The calendar day signifying the beginning of the specific billing interval.
In the Assign Bill Dates window End date field, enter the date or use the drop-down calendar to select the date.
The calendar day signifying the conclusion of the specific billing interval.
Click OK. The Create Bill window appears.
Go to Creating a Bill.
During bill entry, complete or edit any line items associated with the bill entry template. Depending on the nature of the bill entry template used, some available fields may require a value and others may not. It is impossible to address the bill creation process with specificity. Many of the displayed labels and inputs are components of one or more templates assigned to the account or the associated meter(s). Others are part of the bill entry work flow as defined in the Work Flow Wizard.
Enter or edit the following fields:
Start date: The calendar day signifying the beginning of the specific billing interval. The default is the end date of the most recent bill entered in E2is or the current date if no bills are currently entered.
To change the date, type the date or use the drop-down calendar to select the date.
End date: The calendar day signifying the conclusion of the specific billing interval. The default is the end date based on the account billing cycle.
To change the date, type the date or use the drop-down calendar to select the date.
Billing period: The user defined chronological division used to group bill data for accounts payable purposes.
Select the month from the drop-down list. This field is auto-populated based on the midpoint between bill Start and End dates but can be changed by the user.
Select the year from the drop-down list. This field is auto-populated based on the midpoint between bill Start and End dates but can be changed by the user.
Pay amount: The monetary figure representing the balance of payment due.
If applicable, complete or edit options including the following:
Batch number: The bill batch that includes the current bill.
Invoice Number: The unique vendor identifier for the bill.
Account Period: The chronological division used to group bill data for financial accounting and/or budgeting purposes.
Next Reading: The calendar day of the subsequent scheduled meter/counter examination.
Control Code: File or document scan identifier distinguishing the storage location of the physical bill.
Statement Date: The calendar day the account record was generated.
Due Date: The calendar day payment is expected.
Account Year: The specific twelve-month period with regards to your organization’s financial accounting system.
Estimated checkbox: Indicates that the bill values are estimated, not actual, values.
Complete the unique template information for the commodity associated with the account/meter, including:
Use: The amount of the commodity consumed, as indicated on the billing statement.
Cost: The cost for purchasing the commodity (may be the same as pay amount or may be different).
Other: Unique items required for energy management and utility bill tracking. Will vary from bill template to bill template
Special Charges: Additional bill elements that are customarily not associated with usage, such as late fees, etc.
Click in the Bill Entry Grid (the 'yellow' portion of the Bill Entry window) to activate the Special Charge toolbar icons
below the bill entry window title bar.
NOTE: The toolbar icons are only active when you are creating or editing a bill. The icons will not be active from the View Bill window.
To add a line for the special charge to the bill entry window, click the Add Special Charge icon
. The Remaining Balance window will open. Use the radio buttons to assign the charge(s) to the account or meter. Then select the desired charge from the list box.
Special Charges are listed by caption and unit of measure. Sort the list of available Special Charges by clicking a column heading. To reverse sort, click the column heading again.
If the Special Charge list does not contain an appropriate charge for the specific situation, the list can be modified from the Account Manager (Account/Editors/Special Charges). Or a new special charge can be created 'on the fly' from the Remaining Balance window by clicking the 'plus' button and completing the required information in the Create Special Charge window. For more information, see Setting Up and Assigning Special Charges.
To remove a line from the bill entry window, click the specific line data entry field and then click the Remove Line icon
from the bill menu bar. The Confirm window will open. Click Yes to remove the line or No to cancel the action.
The Edit Bill toolbar contains a number of shortcut tools you can use to access bill edit functions.

| Toolbar Icon | Shortcut | Description |
![]() |
Previous/Next | View the Previous/Next bill in the sequence. |
![]() |
Properties | View the bill properties |
![]() |
Override G/L Code | Override the G/L code. This icon becomes active when the focus of the application is on a bill entry field. See the topic on Overriding a G/L Code for a specific bill. |
![]() |
Add Special Charge (left icon) |
Add a special charge |
![]() |
Remove Line (right icon) |
Remove a line |
![]() |
New Message | Create a new bill message |
![]() |
Bill Messages | View bill messages |
![]() |
Account Alerts | View Account Alerts (Account Alerts can be set in the Account Properties window from the Alerts tab). |
![]() |
Account Memos | View Account Memos (Account Memos can be set in the Account Properties window from the Memos tab). |
![]() |
Bill Image | View the scanned bill image (icon is active only if an image is available to view) |
![]() |
Issue Tracker | Create a bill issue using the Cost Avoidance Issue Tracker tool. Issues can be tracked, shared, and reported on. |
![]() |
View Issue | View existing bill Issue. |
![]() |
Find | Locate a particular Account using the Find Account window. |
![]() |
Cancel Edit | Exits the Edit window and opens a Create Bill window for the current account. CAUTION: If used from the Edit window for an historical bill, the historical bill dates will be the default date values. |
![]() |
Calculator | NOTE: This icon is only active when the cursor/focus is in a numeric field in the bill enty grid ('yellow' portion of the bill entry screen). Permits entry of mathematical formulae. The result will automatically be entered in the current field. |
![]() |
Run Rate Processor | NOTE: This icon is only active when the current account/meter has an associated rate. Runs the rate processor for the rate associated with the current account/meter. |
![]() |
Assign Template | Opens the Assign Templates and G/L Records window for the current account. |
![]() |
Refresh Templates on Screen | Updates the Bill window with the current bill template. |
![]() |
Void/UnVoid |
Voids or UnVoids the bill (toggle) while maintaining billing data in the system. Void bills are not counted in reports or PowerViews. They will not display in the bill entry window. They will display in the Bills tab, and may be unvoided using the right-click popup menu, or by editing the bill, clicking on the Void/UnVoid icon, and selecting the UnVoid option. NOTE: Voided bills can be hidden in the Account Manager Bill list if the Hide Non-Standard Bills checkbox is checked (see Bills tab). Although a change is made to the Bill History List in the Account Manager as soon as the the box is checked/unchecked, there is no communication between the Account Manager and the Bill Entry window so the state of the checkbox is not recorded by the EnergyCAP application until the application shuts down and is restarted. If it is necessary to see/hide voided bills quickly, set the checkbox appropriately and restart the EnergyCAP application. |
![]() |
Edit this Bill | Opens an Edit window for the currently-viewed Bill. |
![]() |
Split Bill | Splits the current bill by running the Bill Split Processor for the current bill. This icon is only active from the Bill Edit window for bills that were not split during data entry |
![]() |
Unsplit Bill | Reverses/unsplits the bill split for the current bill. This icon is only active from the Bill edit window for a bill that has already been split. |
![]() |
Line Item Adjustment | Opens the Line Item Adjustments window to permit Adjustments for all or part of any bill line item. Adjustment Bills will be created for any adjusted line item. If exporting bills, consult with your A/P department regarding an appropriate adjustment process. |
Access the Bill Edit window from the Work Flow Manager. Click Accounting>Work Flow Manager and click to open one of the Bill or Batch folders. Then click to select the bill from the bill list, right-click, and select the Edit option from the popup menu. The Edit Bill window will open.

It is also possible to access the Bill Edit window from the historical bill list in the Create Bill and View Bill windows.

Double-click the bill from the list. The Edit Bill window will open.
It is also possible to access the Bill Edit window from the Account Manager. Click Accounting>Accounts to open the Account Manager. Then click the Bills tab.

Highlight the historical bill in the list, right-click the bill line, and select the Edit option from the popup menu. The Edit Bill window will open.
Once the Bill Edit window is open, you can:
View the bill's scanned image
To audit the bill, click the
button at the bottom of the Edit Bill window. The bill will be audited using the current Work Flow settings for the quick check audit. After the audit is complete, audit results will be posted in a popup window. When the window is closed, additional audit groups may be selected from the Select Audit Groups window.
After making your selections, click
Save to save the edited bill and close the Edit Bill window.
To close the Edit Bill window WITHOUT saving changes, click
.
To override the G/L Code for a specific bill:



button to create and save a new G/L code "on the fly".
The View Bill toolbar contains a number of shortcut tools you can use.
|
Toolbar Icon |
Shortcut |
Description |
|
|
Previous Bill |
View the previous bill for the selected account |
|
|
Next Bill |
View the next bill for the selected account |
|
|
Properties |
View the bill properties |
|
|
Bill Messages |
View bill messages |
|
|
Account Alerts |
View account alerts |
|
|
Account Memos |
View account memos |
|
|
Bill Image |
View the scanned bill image (active only if an image is available to view) |
|
|
Close |
Close the View Bill dialog box |
You can view bills in the Work Flow Manager or the Account Manager.
View a bill in the Work Flow Manager by selecting Accounting > Work Flow Manager. The Work Flow Manager appears.
Click
to navigate the Bill folders and select the appropriate bill.
Right-click and select View. The View Bill window appears.
Go to step 3.
View a bill in the Account Manager by selecting Accounting > Accounts. The Account Manager appears.
Navigate in the Account Manger Tree View to the cost center under which the account exists.
Select the account under which the bill exists.
Select the specific bill to view.
From the Bill menu, select View. The View Bill window appears.
Go to step 3.
If there is an alert associated with the account, the Account Alerts window appears. Account alerts are listed by severity and message. You can sort the lists by clicking a column heading. To sort the lists in reverse order, click the column heading once more. Close the Account Alerts window by clicking the X in the upper right-hand corner of the window.
From the View Bill window, it is possible to:
View the bill's scanned image (see below)
View the account's previous bill by clicking 
View the account's next bill by clicking 
Close the View Bill window by clicking
.
View the bill's properties by clicking
. The Bill Properties window appears. See Viewing a Bill's Properties.
Exit the Bill Properties window by clicking OK.
it is possible to view the scanned bill image if bill image files are available to view and have been correctly linked in EnergyCAP. For more information on linking bill images in EnergyCAP, see the topic on setting Global Options.
To view a scanned bill image associated with the current bill, click the Bill Image icon
. The Bill Image view window will be displayed. Click the "X" to exit the Bill Image window.
View bill messages by clicking
. The Bill Messages window appears.
Messages are listed by severity, key, message, and status. You can sort the lists by clicking a column heading. Sort the lists in reverse order by clicking the column heading once more.
Print a message by selecting the appropriate message then clicking
. The message text is printed to your default printer.
Exit the Bill Messages window by clicking Cancel.
View the account alerts by clicking
. The Account Alerts window appears. Account alerts are listed by severity and message. You can sort the lists by clicking a column heading. Sort the lists in reverse order by clicking the column heading once more.
Close the Account Alerts window by clicking the X in the upper right-hand corner of the window.
View the account memos by clicking
. The Account Memo window appears.
Close the Account Memo window by clicking the X in the upper right-hand corner of the window.
Bill entry fields displayed are:
Account The associated account.
Description Any description that was entered.
Vendor The associated vendor's display.
Address The account's service address.
Start date The start date of the specific billing interval.
End date The end date of the specific billing interval.
Billing period
Pay amount The dollar amount of the payment.
Additional bill entry fields that may be displayed:
Account Period The chronological division used to group bill data for financial accounting and/or budgeting purposes.
Invoice Number The unique vendor identifier for the bill.
Control Code File or document scan identifier distinguishing the storage location of the physical bill.
Statement Date The calendar day the account record was generated.
Due Date The calendar day payment is expected.
Account Year The specific twelve-month period with regards to your organization’s financial accounting system.
Estimated Indicates the bill values are not actual values.
Next Reading The calendar day of the subsequent scheduled meter/counter examination.
Vendor address The vendor's remitting address.
The Bill Grid area displays any line items and special charges.
Select Accounting > Accounts. The Account Manager appears.
Click
to navigate to the cost center under which the account exists.
Select the account under which the bill exists.
Select the appropriate bill.
From the File menu, select Properties. The Bill Properties window appears.
Select the General tab to view general bill properties.
Created by: The creator's user ID.
Creation date: The date the bill was created.
Modified by: The user ID of the last individual that modified the bill.
Modified date: The date of the last modification.
Approval date: The date the bill was approved.
Export date: The date the bill was exported.
Batch number: Displays the batch number if the bill was created through batch entry.
Creation: Indicates whether the bill was created manually or through batch entry.
Estimated: Indicates the bill values are not actual values.
Select the Headers tab to view the optional header fields (optional data entry values) and their default values (data automatically populated) associated with the bill.
Batch Number: Displays the batch number if the bill was created through batch entry.
Statement Date: The calendar day signifying when an account record was generated.
Due Date: The calendar day signifying when payment is expected.
Next Reading: The calendar day signifying the subsequent scheduled meter/counter examination.
Control Code: File or document scan identifier distinguishing the storage location of a physical bill. Input values up to 255 characters.
Invoice Number: The unique vendor defined identifier for a bill.
Account Period: The user defined chronological division used to group bill data for financial accounting and/or budgeting purposes.
Account Year: The specific twelve-month period with regards to your organization's financial accounting system.
Exit the Bill Properties window by clicking OK.
EnergyCAP, Inc. typically recommends saving bills in PDF format for easy viewing on most computers since most modern computers have Adobe Acrobat Reader installed. Some clients, however, have TIFF files because older bill images were saved that way, or their current scanning software prefers TIFF. Although the bill can still be viewed when using EnergyCAP, the bill image opens in an second, external program - typically Microsoft Document Viewer. The downside is that EnergyCAP is left with a blank open window (which usually has an erroneous error message in it). Although this presents no real functionality problems, it can be annoying to have to always close two windows when viewing bill images.
In researching an acceptable plug-in solution for clients, EnergyCAP, Inc. has only found one viable (and free) option: AlternaTIFF. Once installed, AlternaTIFF works very well and has some very nice features that other fee-based plug-ins do not. EnergyCAP, Inc. does not provide support for the plug-in itself, but offers this information as an option for clients who may often need to view TIFF format bill images.
To install the AlternaTIFF software:
This association will cause a browser to open to view any TIFF image. The browser will use the new plug-in.
Add a bill message by clicking the Bill Mesage icon
. The New Message window will open.
NOTE: Once a bill message has been created, it has the potential of creating an audit trail, and cannot be deleted!
You can either:
Select a pre-defined message
Select and edit a pre-defined message
Create a message
To select a predefined message:
Select the Pre-defined check box.
Select the appropriate message.
To edit a pre-defined message:
Select the Pre-defined check box.
Select the appropriate message.
Select the User defined check box.
If applicable, in the Key field edit the message key.
If applicable, select a new severity level from the drop-down list.
In the Message field, edit the message. You are limited to 255 characters.
To create a message:
Select the User defined check box.
In the Key field, type a message key.
Select a severity level from the drop-down list.
In the Message field, enter the text to be displayed. You are limited to 255 characters.
After making your selections, click OK. The New Message window closes.
View bill messages by clicking the View Message icon
. The Bill Messages window will open.
Messages are listed by audit severity, key, message, and status. You can sort the lists by clicking a column heading. Sort the lists in reverse order by clicking the column heading once more.
Print the messages by clicking the Print icon
. The message list will be printed using your default printer.
Exit the Bill Messages window by clicking Close.
Account Alerts are account-based bill messages that are accessible from the Bill Entry window in EnergyCAP. Account Alerts are valuable for several reasons:
NOTE: Account alerts are triggered during manual bill entry in EnergyCAP. They will not be triggered during bill import processes.
REAL-LIFE SCENARIO:
QUESTION: My real estate department has informed me that we are selling building #505 on December 1 and will no longer be responsible for the utility bills after that date. There are two electric accounts, a gas account and two water accounts. How can this EnergyCAP feature help me?
ANSWER: Set up a Bill Account Alert for each of the accounts associated with the building. The message text could be “Do not pay for services provided after December 1—Building Sold” The Begin Date for the Alert could be set for December 1. No End Date would be required. This is the date that the Alert would begin displaying from the Edit/Create bill windows. The initial severity level could be fairly low (PASS) to ensure that final utility bills and payment data could be recorded in EnergyCAP. After the final bills had been processed, the severity level could be increased to a “Fail” status, preventing further entry of billing data for that meter. Alternatively, you could set two Alerts; the first with a Begin Date of 12/1/08 (“Pass” status) and the second with a Begin Date of 1/1/09 (“Fail” status) and appropriate Alert messages.
To add an Account Alert:

For information on creating an Account Alert for multiple accounts, see: Modifying an Account.
How do I edit an alert?
ANSWER: You can modify Alerts at any time in a manner similar to the way you created them. From the Alerts tab, instead of clicking the “+” icon to create a NEW Alert, position your cursor in the field(s) you want to change in the Alert you want to change. Then update the values and click OK to save the Alert and close the Account Properties window.
What user permissions do I need to create, edit or delete an alert?
ANSWER: You will need View/Modify/Delete/Create access to the Account Properties window (Application/Accounts from the Permissions tab in User Properties).
Can I create, edit or delete an Alert from the Bill Entry screen?
ANSWER: Yes, by clicking on the Account Code link (highlighted in blue).The Account Code link will open the Account Properties window for the account; alerts can be created/modified from the Alerts tab in Account Properties.
View the account alerts by clicking the Account Alert icon
. The Account Alerts window will open.
Account alerts are listed by severity and message. Sort the lists by any column heading by clicking on the heading. Reverse the sort order by clicking the column heading again.
Close the Account Alerts window by clicking the Close button or the X in the upper right-hand corner of the Account Alerts window.
Account Memos are account-associated messages that can be viewed, edited and retrieved from the Bill Entry window as well as the Account Properties window in EnergyCAP.
Since Account Memos are associated with the ACCOUNT rather than the bill, and because the messages are not associated with a particular timeframe, Account Memos are useful for adding 'informal' account-related information that can and should be seen and edited by both bill entry and supervisory personnel.
When a new Memo is created, a timestamp is automatically added, but it can be edited/deleted along with any other data. Account Memos are accessible and editable from any Bill Entry window that is associated with the account, regardless of bill date.
. The Account Memo window will open.
View the account memos from the Bill Entry window for the associated account by clicking the Account Memo icon
. The Account Memo window will open.
Edit the Account memo by clicking the Edit button.
Close the Account Memo window by clicking the Close button or the X in the upper right-hand corner of the Account Memo window.
Bill Entry Notes are meter-based one-line annotations that can be added to the Bill Entry grid via Meter Properties. They will appear on the Bill tab for all current or historical bills for the account associated with the meter. Bill Entry Notes are a good way to provide meter-specific information that might be valuable for bill entry personnel or Energy Managers to know when viewing utility bills.
To add a Bill Entry Note:
Bill Entry Notes are viewable from the Bill Entry grid for all current or historical bills associated with the meter with which the Note is associated.
To view a Bill Entry Note:
There are many ways to view a bill with which a Bill Entry Note has been associated. One way is to navigate to the Account Manager (Accounting>Accounts) and select the account with which the meter with the note has been associated. Then click the Bills tab and double-click any of the historical bills associated with the account. The Bill Entry Note will be displayed in the Bill Entry grid.
The Bill Entry windows (Create Bill/View Bill/Edit Bill) provide an icon for creating a new Bill Issue 'on the fly' using the Cost Avoidance Issue Tracker. See the Issue Tracker topic in Cost Avoidance for more information on this energy management tool.
In addition to providing a bill entry template, the View/Create/Edit Bill windows provide an abundance of contextual historical data for the selected account and/or meter.
The view pane in the upper right portion of the Bill window displays a year of utility billing information in a spreadsheet format, including:
Billing Period Month
Billing Period Year
Bill Start Date
Bill End Date
Bill Pay Amount
The tabbed pages at the bottom of the View/Create/Edit Bill windows display more extensive historical utility billing information drawn from the EnergyCAP database for the selected account and the associated meter(s):

Meter History Tab--Provides a spreadsheet view of all historical information for the selected meter. Bills highlighted in blue are yearly 'markers' corresponding to the month of the most current bill. The bill highlighted in green is the bill currently being viewed.
Account Cost Tab--Displays a monthly comparative line graph with 12 data points to produce a year of cost history for the account.
Account Cost/Day Tab--Displays a monthly comparative line graph with 12 data points to produce a year of cost per day history for the account.
Meter Cost/Day Tab--Displays a monthly comparative line graph with 12 data points to produce a year of cost per day history for the currently-selected meter.
Meter Use/Day Tab--Displays a monthly comparative line graph with 12 data points to produce a year of usage history for the currently-selected meter.
Unit Cost Tab--Displays a monthly comparative line graph with 12 data points to produce a year of unit cost history for the currently-selected meter.
Demand Tab--Displays a monthly comparative line graph with 12 data points to produce a year of demand history for the account.
Load Factor Tab--Displays a monthly comparative line graph with 12 data points to produce a year of load factor history for the account.
NOTE: With Release 6.0 and subsequent, accrual bills are no longer included in this graph view.
The chart data for both the ACCOUNT and METER graphs is drawn from the utility billing information in the EnergyCAP database.
NOTE: The ACCOUNT graphs will be a rollup of all associated account and meter charges/usage. The METER, DEMAND, LOAD FACTOR and UNIT graphs will display the currently-selected meter information, as archived in the Meter History. For multi-meter accounts, you can change the meter focus using the drop-down box at the bottom of the Bill window.
Select Accounting > Work Flow Manager. The Work Flow Manager is displayed.
Click
to navigate to the folder where the bill resides.
Click in the bill list to higlight/select the appropriate bill. Associated problem messages will be displayed in the bottom pane of the View window, including data for:
Severity
Status
Message
Date Created
Created By
Comment
Once created, Problem Messages can be edited from the Work Flow Manager. To maintain the audit trail, only two fields are editable:
The Status can be updated. There are three Status options:
The Comment: field may also be edited to include a text comment of up to 255 characters in length.
To edit a Bill Problem Message:
Select Accounting | Work Flow Manager. The Work Flow Manager appears.
Click
to open the Bill
folder and navigate to the appropriate
bill.
From the Message menu, select Show Ignored Messages. The Message view displays bill messages with the status of Ignored.
A calculator is available during bill entry (creating or editing bills). The total calculated can populate the cost field.
The auto-decimal option also applies to the bill calculator. For auto-decimal, each numeric entry is divided by 100 before calculating the resulting value and inserting it into the grid.
Select the appropriate line in the Bill Grid. The Calculator icon
will become active.
Click the Calculator icon or press F4 on your keyboard. The Calculator window will open.
Enter a mathematical expression by using the numeric keys, and the [+], [-], [*], [/] keys.
Once the expression is entered, click OK to evaluate the expression and insert the result to the grid.
If an invalid expression is entered, an error message appears. Click OK to close the message window.
NOTE: The calculated expression will not be saved unless the Save button is clicked to close the Bill window.Problem: The vendor has revised a prior utility bill and has included the adjustments in the current month's bill. What’s the best way to handle this in EnergyCAP?
Solution: There is no single method; the best way to revise prior bills depends upon several factors. Three methods are discussed below.
The quickest and simplest way to revise a prior bill is just to edit it. When doing so, you can:
Advantage of editing the original bill:
The revision is made in the proper month, so bill history is accurate and therefore there will be no adverse impact on the accuracy of future forecasting, budgeting, audits or cost avoidance – all of these functions use bill history as a basis for ‘expected’ consumption and cost.
Disadvantages of editing the original bill:
Leave the original bill (last month) untouched; true up the account by making an adjustment in the current bill. A good way to do this is to build a cost and usage adjustment line item in each template. The adjustment may be recorded using this line item whenever you receive a cancel/rebill or other vendor adjustment.
Advantages of correcting the current bill:
The correct transaction will flow to A/P and EnergyCAP will be ‘synchronized’ with vendor records. Year-to-date energy use and cost will be correct.
Disadvantages of correcting the current bill:
Individual monthly energy use and cost will not be correct. (Example: Last month shows values that are too high due to vendor overcharge; this month shows values that are too low due to correction.) Future forecasts, budgets, audits and cost avoidance reports that use this data will be skewed although year-to-date values will normally be accurate.
Instead of showing the adjustment on today’s bill, enter today’s bill as the gross amount (the actual cost and consumption not including the adjustment) and then create a second bill that includes just the adjusted cost and consumption. If a credit, these values will be negative. This adjustment bill can use the dates and billing period of today’s bill (if you want to track the adjustment this month) or you can use prior dates and billing periods in order to reflect the adjustment in the proper month. Click here for How to do Bill Adjustments.
Advantages of an adjustment bill:
Disadvantages of an adjustment bill:
A bit trickier to do since two bills will be created.
The bill adjustment feature in EnergyCAP is designed to help make adjustments to bills which have already been entered and saved. The process involves the creation of two transactions as a result of the adjustment – a credit bill and a debit bill. The adjustment can include one or all of the line items from the bill being adjusted. Also, the GL, Accounting Period, and Control Code values can be modified for the adjustment bills.
! Before making bill adjustments, please contact your EnergyCAP System Administrator to determine if creating Bill Adjustments will have any impact on financial system interfaces such as accounts payable. You will need a good understanding of how these interfaces are set up in order to complete a successful bill adjustment. !
If you use Batch Mode you will need to create an open batch to use the Bill Adjustment option (See Work Flow Manager for more information on Batch Mode).
Go to Work Flow Manager and click on the Open/Close Batch button
to create a batch if you do not have one currently open.
! The name of the batch may be important since some financial system interfaces require a certain naming convention for bills intended to be paid (for accounting system purposes external to EnergyCAP) and those intended for internal adjustments (for reporting purposes in EnergyCAP) !
NOTE: You can only create bill adjustments for SAVED bills.
Edit the bill, either from the Account Manager or the Work Flow Manager as follows:
Highlight the bill to be adjusted from the Account Manager > Bills tab and access the edit window (Bill/Edit or right-click popup menu) OR
highlight the bill to be adjusted in the Work Flow Manager module and access the edit window (Bill/Edit or right-click popup menu)


From the Bill Entry / Edit window, click on the wrench icon
in the upper-right corner of the edit window. the Line Item Adjustments window will open.
The Line Item Adjustments window is divided into four different regions:
Source Bill Information: Contains details about the source bill being edited.
Target Account / Meter: Used to select a target account and meter OTHER than the current Account / Meter to create the adjustments to.
Modify GL, Accounting Period, and Control Code on Adjustments: Contains the options for changing the adjusted bills’ values for these fields.
Source (original bill) and Target (adjusted) Bill Line Items: Contains the line items that will be used to create the adjusted bills.

If necessary, update the values in the Target Account / Meter section to reflect the changes in the new bill. If the adjustments need to be made to an account other than the current account, click on the Find Account button. If the adjustments need to be made on the same account, but a different meter, click on the drop-down arrow and select the meter the adjustments are to be made on. If the adjustments are being made to the same account /meter, leave these values alone.
If necessary, update the G/L Record or Accounting Period Options.
NOTE: G/L Record Options affect ONLY the adjustment bill for the target Account/Meter.

Use Target Meter G/L: This option will use the G/L Record (if any) assigned to the target Account/Meter as the G/L for the adjustment bill created for the target Account/Meter.
Same as Original Bill: This option will use the G/L Record (if any) from the source bill as the G/L for the adjustment bill created for the target Account/Meter.
Leave G/L Record Blank: This option will simply not assign a G/L Record for the adjustment bill created for the target Account/Meter.
Use this G/L Record: This option allows for ANY G/L Record in EnergyCAP to be assigned to the adjustment bill created for the target Account/Meter.
Account Period Options: Affects the adjustment bills for the target and source Account / Meter
Leave Account Period Blank: This option will leave the Account Period blank for the adjustment bill created for the target Account/Meter as well as the adjustment bill created for the source Account/Meter.
Same as Original Bill: This option will use the Account Period (if any) from the source bill for the target Account/Meter as well as the adjustment bill created for the source Account/Meter.
Use this Period and Year: This option allows for ANY combination of Account Period and Year to be used for the target Account/Meter as well as the adjustment bill created for the source Account/Meter.
Control Code: Affects the adjustment bills for the target and source Account / Meter as well as updates the Control Code on the original source bill
New Control Code / Comment: The value placed here will be used for the target Account/Meter as well as the adjustment bill created for the source Account/Meter. Changes here will also update the value(s) in the original source bill.
In the Source and Target Bill Line Items section, select the line items from the source bill that need to be adjusted.
To move all line items from Source Bill Line Items to Target Bill Line Items, click on the
button.
To clear all line items from Target Bill Line Items, click on the
button.
To move one line item at a time from Source Bill Line Items to Target Bill Line Items, click on the value you want to move and then click on the
button.
NOTE: Any line item can be "copied" multiple times to the Adjustment Values pane.
As values are moved into Target Bill Line Items, the values for each item will appear in red text. By default, the adjustment will include the entire amount, therefore effectively zeroing out the original source bill. Be sure to edit the values to the correct amounts.

Verify all the values you have entered in the Line Items Adjustments dialog box, and click the Create Adjustment Bills button...

... to save the Adjustment Bills (the credt bill for the original bill and the debit bill reflecting the
Adjustment(s).
If you wish to cancel your changes instead, click on the Exit Without Saving button. 
You will be returned to the Bill Edit window. Close this window by clicking on the Close button. 
For new Bill records created by the Bill Adjustment process:
NOTE: Inherit means that the values are inherited from the original bill.
|
Field
|
Rule
|
|
billID
|
New
|
|
batchID
|
Set to current open batchID for this user if batch mode is on in work flow, else null. (If batch mode on and no open batch for user, disallow use of dialog and explain why.) |
|
accountID
|
Set to accountID for target account
|
|
beginDate
|
Inherit
|
|
endDate
|
Inherit
|
|
billingPeriodID
|
Inherit
|
|
billingPeriod
|
Inherit
|
|
billingPeriodYear
|
Inherit
|
|
accountPeriodID
|
Per user option in ADJ dialog
|
|
accountPeriod
|
Per user option in ADJ dialog
|
|
accountPeriodYear
|
Per user option in ADJ dialog
|
|
totalCost
|
Calculate
|
|
estimated
|
Inherit
|
|
approved
|
True if workflow approval process is set to off, false if approval process is set to on. |
|
approveDate
|
Per above
|
|
approvedBy
|
Per above
|
|
exported
|
False
|
|
exportDate
|
Null
|
|
exportedBy
|
Null
|
|
observationMethodID
|
6 (Adjustment)
|
|
statementDate
|
Inherit
|
|
dueDate
|
Inherit
|
|
nextReading
|
Inherit
|
|
controlCode
|
Allow user to enter/edit in ADJ dialog
|
|
invoiceNumber
|
Inherit
|
|
invPages
|
Inherit
|
|
checkNumber
|
Inherit
|
|
checkDate
|
Inherit
|
|
payStatus
|
Inherit
|
|
clearedDate
|
Inherit
|
|
createdBy
|
Current UserID
|
|
createdDate
|
Today’s date
|
|
modifiedBy
|
Current UserID
|
|
modifiedDate
|
Today’s date
|
|
void
|
Inherit
|
|
dirty
|
Inherit
|
|
importVerified
|
Inherit
|
|
accrual
|
Inherit
|
|
accrualReversed
|
Inherit
|
|
accrualReversedDate
|
Inherit
|
|
exportHold
|
Inherit
|
|
glExported
|
False
|
|
glExportDate
|
Null
|
|
glExportedBy
|
Null
|
|
fromVendor
|
Inherit
|
|
hasBeenSplit
|
Inherit
|
|
wasSplitDate
|
Inherit
|
|
transRefNum
|
Null
|
Bill approval processes vary from organization to organization. Processes for batch bill entry, bill approval, data collection options, bill problem messages and bill export options are configured by the EnergyCAP Work Flow Wizard. The bill approval process is only applicable when the Use bill approval system option has been selected from the Work Flow Wizard.
To approve a bill:
Select Accounting > Work Flow Manager. The Work Flow Manager will be displayed.
Click
to open the Bill folder and navigate to the Unapproved folder.
Select the bill to approve.
NOTES: If bill batches are being used, a bill will not appear in the Unapproved folder UNTIL the batch is closed. Bills may also be approved from the Holding for Export folder.
Right-click and select Approve. The Confirm window appears.
Select Yes to approve the bill.
Select No to cancel the operation.
Energy CAP Enterprise allows you to change bill statuses by either selecting a bill or selecting a status associated with a bill.
Select Accounting > Work Flow Manager. The Work Flow Manager appears.
Click
to open the Bill folder and navigate to the appropriate bill. The associated statuses for the bill are displayed in the bottom pane.
Select the appropriate bill or status.
From the Message menu, select either:
Status > Problem: A problem was identified during the audit process.
Status > Fixed: The problem is resolved and the bill is removed from the Problem folder.
Status > Ignore: The problem is not being addressed at this time. The status message is removed from the view. See Viewing Ignored Bill Messages to display any bills whose status has been changed to Ignore.
to navigate the display of bill folders.
Bill Splits in EnergyCAP provide a way of splitting a source bill (usually an incoming vendor bill) into one or more sub-account/meter bills via a simple percentage formula. This feature is most commonly used in shared facilities and campus situations where you need to divide a metered area into two or more separate areas, usually for energy management and/or accounting reasons. Since the “submeters” represented by the bill split do not exist, they are virtual or “phantom” meters.
Bill Splits allow the EnergyCAP user to allocate a single vendor bill to multiple accounts for bill payment, such as is common in “charge-back” situations. This also enables the facility energy manager to track energy costs associated with specific accounts/areas more precisely.
Since energy use and cost is associated with the actual or “Master” meter (for vendor payment) as well as the associated phantom submeters (for the “charge-back” situation), care must be taken in the organization setup to avoid “double-counting” the resultant bills. This is usually done by placing the virtual meters in the Facility tree in the most logical “place” corresponding to their presumed location. The “master” meter is then placed in a separate Facility tree that is reserved for similar types of chargeback or other scenarios (see example below) .
A similar type of arrangement should be followed on the Accounting tree, with the master account associated with the vendor and the sub-accounts associated with the charge-back entities as appropriate for the organization accounting system (see example below).
When setting up a bill split scenario, consider how the setup will impact the resultant reports for facilities (esp. Analysis reports) , cost centers (BL03, BL04, BL08 and others) and/or vendors (BL11, BL31 and others) associated with the bill splits.
NOTE: Invoice reports based on split bills can be used for handling chargebacks for tenant and/or internal billing.
There are several steps involved in setting up bill splits. The first is to create the master/vendor account. Then the bill split accounts must be created. Then the master must be configured to properly allocate cost/use to the subordinate accounts.
Create the master (vendor) account like any other account, using the Account/Meter Setup Wizard. See the Bill Splits Introduction topic for tips on organizing your Facility and Accounts trees to accommodate the split.
NOTE: Make sure that the account properties Billing tab for the master/vendor account indicates that the account “receives” bills.
Create the virtual submeter accounts and meters (only one meter per account) like any other account, using the Account/Meter Setup Wizard.
NOTE: If you would like to be able to view the submeter billing information that will be generated automatically from the master meter, you should assign the sub-accounts the same bill entry template as the “master” (vendor) account. For charge-back situations, make certain that the account properties Billing tab indicates that the account “creates” bills.
After the master and bill split accounts/meters have been created, configure the master account as the bill split master as follows:





If it is necessary to change the percentage for the split(s), the user is encouraged to set up another version of the bill split, and assign a new Effective Date. If more than one version of the splits is saved, the Effective Date determines which version will be used. Note that the source bill’s Start Date must be on or after the Effective Date of the new version. If you edit a split percentage, a new version is not required. However, for accounting/audit purposes, creation of a new version is recommended whenever the bill split percentage changes.
QUESTION: How can I know if the bill split processor has successfully split the bill?
ANSWER: Open the View Bill window and see Bill Properties. Included in the properties list (when applicable) is the Was Split Date. 
QUESTION: Why would a bill NOT be split when the Bill Split Processor was run?
ANSWER: If the version effective date of the bill split is later than the billing period, the bill will not be split. The Version Effective Date is input by the user during setup of the Bill Split (see the Bill Split Dialog for the suspect bill). 
QUESTION: How do I know if a bill has been Unsplit?
ANSWER: Unsplit bills have the bill split date set back to the 19th century. Open the View Bill window and check the Was Split Date. A year date of 1899 is an indication that the bill has been unsplit:
In some cases (particularly when the number of submeters is very large, or the number of bills processed is very high), it is advantageous to postpone the bill split process by running the bill split processor for all bills (or a filtered subset you select) at a later time, rather than splitting the bills individually during the bill data entry process.
! If your organizational workflow is set up for bill approval, the Bill Split processor will not split bills that are Unapproved. !
To Split Bills outside of the normal bill entry process, click the No button when initially prompted to split bills from the bill entry window.

NOTE: Work flow options may also be adjusted to prevent the Bill Splits prompt from appearing during bill entry. To do this, click the Options button from the Work Flow Manager. The Work Flow Options window will open. Then click the Bill Entry tab and uncheck the Bill Splits checkbox . Click OK to save Work Flow changes.
There are two ways to split existing bills outside of the Bill Entry window—from the Account Manager or from the Tools menu (all Managers).


To void (undo) a bill split for a particular bill:

NOTE: Once you delete the bill split, the Bill Split icon will become active.

Then you can “re-split” the bill as follows:
QUESTION: How are G/L assignments handled for ACCOUNT-LEVEL charges when the Bill Processor splits bills?
ANSWER: There are two types of Account-level charges:
Both types of charges will be handled the same way during the bill split process. The table below explains the way G/L associations work with account-level charges when the Bill Split Processor is run:
|
Master Account GL Assigned? |
Split Account GL Assigned? |
Split Bill G/L Selected |
|
Yes |
No |
Master GL |
|
No |
No |
No GL |
|
Yes |
Yes |
Split GL |
|
No |
Yes |
Split GL |
QUESTION: I have an account with multiple meters but I only want to split bills for one/some of the meters. What is the best way to set this up? And how are the ACCOUNT-LEVEL charges distributed?
ANSWER: Beginning with EnergyCAP Release 6.0, all split bills must reconcile/balance with the master account bill totals. For bill splits totalling 100 percent, it will be necessary to set up bill split percentages for every meter associated with the account, regardless of whether the charges associated with that meter are to be split. This procedure is necessary to accurately split and reconcile account-level charges (see previous topic). The 'unneeded' Bill Splits (sub-accounts and sub-meters) should be located in a 'dummy' Cost Center and Place respectively, in order to separate the unneeded billing information from the 'regular' accounting and facilities hierarchies for your organization.
An important difference between this type of bill split setup and the setup procedure recommended in the normal bill split topic is that the unneeded bill split meters will be located in a 'dummy' organization and NOT in the 'regular' organization in the Facilities tree, since these bill splits are not an organizational requirement but a software/functionality requirement. Here's what the dummy meter organization could look like:
The associated accounts will also be located in a 'dummy' cost center, unrelated to any "Master Account" or organization cost centers. Here's what the dummy cost center could look like:
Distributing Account-Level Charges
During the Bill Split process for bill splits totalling 100 percent, account-level charges with the master account are allocated to the subaccounts according to the percentages input for each account during Bill Split Setup. At the conclusion of the split, EnergyCAP checks to make certain that the total dollar amounts for all sub-accounts add up to the total amount for the master account bill.
With the setup described above, the Account-level charges associated with the master account can be correctly and accurately 'filtered down' to their related sub-accounts (and associated sub-meters) in EnergyCAP when the Bill Split Processor is run on the master account.
QUESTION: I have an account with multiple meters but data is only available for one/some of the meters. How will the Bill Split Processor handle that?
ANSWER: If you run the Bill Split Processor for a multiple-meter account, the Processor will split the bill for any meters for which split data is available. You will receive an error message (Workflow Manager Problems folder) noting that there may be missing data associated with the bill split.
When split bills are created from the original bill record, the new bill records are created according to the following rules:
NOTE: Inherit means that the split bill values are inherited from the original bill.
| Field | Rule |
| billID | New |
| batchID | Set to current open batchID for this user |
| accountID | Set to accountID for this account |
| beginDate | Inherit |
| endDate | Inherit |
| billingPeriodID | Inherit |
| billingPeriod | Inherit |
| billingPeriodYear | Inherit |
| accountPeriodID | Null |
| accountPeriod | Null |
| accountPeriodYear | Null |
| totalCost | Per calculation |
| estimated | Inherit |
| approved | True if workflow approval process is set to off, false if approval process is set to on. |
| approveDate | Follows above logic |
| approvedBy | same |
| exported | false |
| exportDate | Null |
| exportedBy | null |
| observationMethodID | simulated |
| statementDate | Inherit |
| dueDate | Inherit |
| nextReading | Inherit |
| controlCode | Inherit |
| invoiceNumber | null |
| invPages | Inherit |
| checkNumber | Inherit |
| checkDate | Inherit |
| payStatus | Inherit |
| clearedDate | Inherit |
| createdBy | Current user |
| createdDate | today |
| modifiedBy | Current user |
| modifiedDate | today |
| void | Inherit |
| dirty | true |
| importVerified | Inherit |
| accrual | Inherit |
| accrualReversed | Inherit |
| accrualReversedDate | Inherit |
| exportHold | Inherit |
| glExported | False |
| glExportDate | Null |
| glExportedBy | null |
| fromVendor | false |
| hasBeenSplit | False (Source bill is set to True) |
| wasSplitDate | Null (Today’s date set in source bill) |
| transRefNum | Inherit |
A bill batch is a collection of related bills. Batches allow data entry personnel to organize their work by keeping related bills together in order to better manage bill entry work flow. Using bill batches also helps the supervisor during the verification and approval process.
A batch can only be created if the Enter bills in batches option is enabled in the Work Flow Wizard. If the option is not enabled, it is impossible to enter batch bills (see Work Flow Wizard Batch Window). EnergyCAP permits only one open batch at a time per user.
If the Close Batch option is displayed on the Bill menu selections in place of the Create Batch option, this indicates that the current user already has a batch open and cannot open another batch until the open batch is closed.
Select Accounting > Work Flow Manager. The Work Flow Manager appears.
From the Bill menu, select Create Batch. The Batch Setup window appears.
In the Batch number field, enter the unique, user-defined identifier for the collection of related bills.
The Batch Setup Grid displays any fields available to automatically populate into the specified bill entry field. This may or may not include the following fields:
Enter any comments in the Note field.
Any related comments specific to this bill batch up to 255 characters.
After making your selections, click OK.
NOTE: Only users who have created the batch, or administrators with Modify permissions for Other Settings - Workflow management, may close an open batch.
To close a bill batch:


to navigate the Batches folders.
The setup process below enables automatic incrementing of batch numbers for bill entry purposes. A similar approach can be used for Batch Values in the Batch Setup window (Bill/Open Batch), such as StatementDate and DueDate. The advantage to auto-incrementing is that Data Entry operators do not have to manually select and input this information during bill entry. A restriction of the auto-incrementing option using the procedure below is that the batch number cannot contain any alpha characters--it must be comprised solely of numbers.
NOTES: If you need to change the sequential Batch Numbering in the future, you may enter a new Batch Number when Creating a Batch, rather than using the default value shown. This new Batch Number must be greater than the default value shown to avoid any Batch Number conflicts within EnergyCAP, as each Batch Number must be unique. For example, if the default Batch Number value shown is 123, and it is necessary to change the sequential Batch Number, simply replace the 123 value with a larger number. Note that EnergyCAP will not create any Batches with Batch Numbers between 123 and the new number.
The Auto-Increment capability of the Workflow Wizard has not yet been fully documented. Users familiar with script language may derive additional ideas from the examples below:
EXAMPLE 1:
=(cstr(year(date())&"-"&month(date())&"-"&day(date())&"_"&CSTR(AutoInc+1)))
Output: YEAR-MONTH-DAY_AUTOINCREMENTNUMBER
EXAMPLE 2: (Batch Setup Window)
StatementDate Batch Value: =date - 4
DueDate Batch Value: =date + 14
Virtual Bill Scripts (VBS) are powerful and flexible tools for bringing together cost information and interval usage data from varied sources. VBS are intended to provide additional data processing capability when the Calculated Account and Bill Splits features in EnergyCAP are insufficient. However, scripting expertise and a programming background are required to take advantage of possibilities offered by the VBS functionality.
The scripting process is relatively straightforward:
First, determine the source for consumption data. This data must be:
Then determine the source for cost data (formula, master meter, or other supported source.
Determine what information needs to appear on destination bill.
Determine how start and end dates of destination bill will be determined.
Once the scripts have been created, the user can generate virtual bills for all accounts by using the Virtual Bill Processor from the Tools menu or for a single account by selecting the applicable account in the Account Manager.
The Virtual Bill Processor executes VBS to create virtual bills. You must create a bill script version for an account before generating virtual bills. Energy CAP Enterprise maintains a history of an account's bill scripts in order to match its bill period to the applicable bill script version when creating virtual bills.
Examples: Source Account A with a monthly billing cycle has bill script versions effective 01/01/01-03/31/01, 04/01/01-09/30/01, and 10/01/01-12/31/01. When creating a virtual bill for the bill period June 2001, Energy CAP Enterprise looks at all bill versions for the account and selects the bill script version effective June 30, 2001, version 04/01/01-09/30/01.
You can create virtual bills by billing period (GetBillsByPeriod function) or for a specific creation date (GetBillsByDate function).
When using the billing period function, Energy CAP Enterprise recommends that you create virtual bills using the same billing cycle as the source account. If the source account billing cycle differs, Energy CAP Enterprise creates the virtual bill based on the availability of the source account's bills for the virtual bill period. Click here to view an example. When creating virtual bills, Energy CAP Enterprise reviews the source account bills at the end of its bill period (i.e., quarterly, the end of the third month) and if a source bill is available, EnergyCAP creates the virtual bill. If the source account does not have a bill for that bill period, an error is generated and logged in the Work Flow Manager Virtual Bill Processor Problem folder. Click here to view an example.
When using the creation date function, Energy CAP Enterprise looks for source account bills with creation dates between the start and end dates entered in the Bill Equation Processor.
To review a bill script sample, see the Virtual Bill Sample Script topic.
Source account A has a monthly billing cycle
Source account B has a bimonthly billing cycle
You wish to create a virtual bills for an account that has a monthly or bi-monthly billing cycles. EnergyCAP Enterprise reviews each account's bill period to create the monthly virtual bills. The following virtual bills are created:
|
|
Jan |
Feb |
Mar |
April |
May |
June |
|
A |
|
$x.xx |
$x.xx |
$x.xx |
$x.xx |
$x.xx |
|
B |
|
$x.xx |
|
$x.xx |
|
$x.xx |
|
C |
|
|
|
|
|
|
|
D |
Error (no bills) |
= A + B |
= A |
= A + B |
= A |
= A + B |
For further explanation, click Virtual Bill Example 2.
Source account A has a monthly billing cycle
Source account B has a bimonthly billing cycle
You wish to create a virtual bills for an account that has a monthly billing cycle. EnergyCAP Enterprise reviews the source account bills at the end of its bill period:
End of each month for source account A
End of every second month for source account B
If a source bill is available, EnergyCAP Enterprise creates the virtual bill. If the source account does not have a bill for that bill period, an error is generated and logged in the Work Flow Manager Virtual Bill Processor Problem folder.
|
|
Jan |
Feb |
Mar |
April |
May |
June |
|
A |
|
$x.xx $x.xx (two bills in one period) |
$x.xx |
$x.xx |
$x.xx |
$x.xx |
|
B |
|
$x.xx |
|
$x.xx |
|
$x.xx |
|
C |
Error |
= A + B |
= A |
= A + B |
= A |
= A + B |
January A virtual bill cannot be created since a bill for a source account (in this case, A and B) is not available. An error is generated and logged in the Virtual Bill Processor Problem folder.
February A virtual bill is created containing two bills; one bill for source account A and one bill for source account B.
March A virtual bill was created from source account A.
April A virtual bill is created containing two bills; one bill for source account A and one bill for source account B.
May A virtual bill is created using the bill from source account A, the only bill eligible.
June A virtual bill is created using bills from both source accounts (A & B).
' Sample Virtual Account Script
' This Virtual Account Script must be assigned to the Account having its bills calculated.
' This script uses interval data from a Meter Use Channel to determine the bill consumption.
' This script uses an EnergyCAP Rate to calculate the bill cost.
'
'=======
' Declare the Source Meter and Rate
'=======
DIM ChannelMeterCode
ChannelMeterCode = "METER123"
'
DIM RateCode
RateCode = "RATE_01"
'
'=======
' Define any Customer Charge, Line Loss Factor, or Bill Factor
'=======
'
' Monthly Customer Charge in addition to any calculated charges.
' If none, or if Customer Charge included in Rate, set equal to zero.
DIM CustomerCharge
CustomerCharge = 0.00
'
' Line Loss within internal delivery network.
' A Line Loss Factor of 1.05 corresponds to an assumption of a 5 percent line loss.
' If Line Losses not being included, set equal to 1.00.
DIM LineLossFactor
LineLossFactor = 1.00
'
' Bill Factor is used to adjust the consumption determined by the interval data or meter readings.
' A Bill Factor of 0.20 will result in the consumption being 20 percent of the metered consumption.
' If consumption is not being adjusted, set equal to 1.00.
DIM BillFactor
BillFactor = 1.00
'
'=======
' Get the consumption from a Use Channel
'=======
'
' Adjust the FormTemplate Dates to be the Dest.StartDate and Dest.EndDate
' Not necessary to AdjustDates when using Interval Data (15-minute, hourly, or daily)
' Must add 1 to obtain Meter Reading Channel Data for the Destination Bill Period
'AdjustDates Dest.StartDate + 1, Dest.EndDate + 1
'
Dim ChannelUse
ChannelUse = TotalUse(ChannelMeterCode)
'
' Use this Msgbox to check for returned data while debugging code
'Msgbox ("Channel for Source Meter Code " & ChannelMeterCode & " Returned Use of " & ChannelUse)
'
' A Channel Use less than or equal to zero may indicate a problem with the interval data
If ChannelUse = 0.0 Then
Msgbox ("Channel Data for Source Meter Code " & ChannelMeterCode & " Returned Zero Use!")
End If
If ChannelUse < 0.0 Then
MsgBox ("Channel Data for Source Meter Code " & ChannelMeterCode & " returned NEGATIVE Use of " & ChannelUse)
End If
'
'=======
' Declare and initialize temporary variables to store the Usage and Cost
' The Cost variable will trap the calculated cost returned by the Rate (below)
'=======
'
DIM tmpUse, tmpCost
' Initialize tmpUse and incorporate the usage factors from above
tmpUse = (ChannelUse * (LineLossFactor * BillFactor))
'
' Initialize tmpCost to zero
tmpCost = 0.00
'
' Adjust the FormTemplate Dates back to the original dates, IF adjusted above.
'AdjustDates Dest.StartDate - 1, Dest.EndDate - 1
'
'=======
' Initialize the Rate and create a dummy bill to pass the Inputs needed for the Rate Calculation
' The Rate.CreateBillEx(StartDate, EndDate) function creates a bill with Line Items that correspond
' to the Inputs needed for the Rate.
'=======
'
DIM Rate
Set Rate = GetRate(RateCode)
'
Dim DummyBill
' THE STARTDATE AND ENDDATE ARE SET TO THE MANUAL PROCESS STARTDATE AND ENDDATE, UNLESS AN ADJUSTDATE IS USED ABOVE.
' Use this MsgBox to check data while debugging code
'MsgBox("StartDate = " & StartDate & " EndDate = " & EndDate)
Set DummyBill = Rate.CreateBillEx(StartDate, EndDate)
'
'=======
' Set the DummyBill Line Item values to be used as Inputs for the Rate
' There may be many more than just the Usage, depending on the complexity of the Rate
' To see how many Line Items exist, use the following:
' MsgBox("Number of DummyBill Line Items = " & DummyBill.Lines.Count)
' To see what the Line Item Captions are, edit and use the following as many times as needed (up to the count of line items):
' MsgBox("Line Item 1 Caption = " & DummyBill.Lines(1).Caption)
'=======
'
DummyBill.Lines("Usage").value = tmpUse
'
'=======
' Now have the Rate perform the cost calculations and return the Outputs
' There are several Outputs including Total Cost, Taxes, and Customer Charges
'=======
'
DIM Outputs
Set Outputs = Rate.Calculate(DummyBill)
' Set the cost variable equal to the TotalCost Output from the Rate Calculation
tmpCost = Outputs("TotalCost").value
'
' Use these MsgBoxes to check the data while debugging code
' What cost value was calculated by the Rate?
'MsgBox ("Cost returned from the Rate = " & tmpCost)
' Is the tmpCost value being returned correct?
' Double check that usage value is retained
'MsgBox ("Current Usage value = " & tmpUse)
'
'=======
' Calculate the Destination Bill Charges
'=======
'
DIM DestBillCost
' Include any additional monthly Customer Charges from above.
DestBillCost = tmpCost + CustomerCharge
'
' Use this MsgBox to check the data while debugging code
'MsgBox ("Destination Bill Cost = " & DestBillCost)
'
'=======
' Generate the Destination Bill
' Destination bill has Template "KWH_01" Assigned
' Line items are for "Usage" and "Total Cost"
'=======
'
Dest.Lines("Usage").Value = tmpUse
Dest.Lines("Total Cost").Cost = DestBillCost
Dest.Cost = DestBillCost
'
'=======
' end script
The Bill Script Editor is a tool for quickly generating bill scripts in EnergyCAP. Bill scripts are written in Visual Basic programming language. The virtual bill creation process uses bill scripts to supply values to a virtual bill. EnergyCAP Enterprise maintains a history of the account's bill script versions.
When editing a bill script, the modified script applies to the current version and all future versions of this bill.
Editing scripts should only be attempted by advanced users with Visual Basic programming skills.
Select Setup > Contacts. The Account Manager appears.
Browse the Accounting tree to locate the desired account.
Highlight the account and right-click; then select View Script from the popup menu options. The Bill Script Editor window will open.
NOTE: The View Script option will not be available for Calculated Accounts or Bill Split accounts.
Once the Bill Script Editor is open, it is possible to:
Click
. The Open window appears.
Input, or navigate to, the desired File name and path for the script file.
Click Open. The opened script file text replaces the existing script text.
Click
. The Save As window appears.
In the Save in field, select the directory location for the file.
In the File name field, enter a name for the file.
After making your selections, click Save. The script is saved as a file to the location you specified.
Click
. The Find window appears.
In the Find what: text box, enter the text you want to find.
Click the associated checkboxes to Select/Deselect any search options:
Match whole word only: Finds only whole words instead of searching for your text inside longer words.
Match case: Finds only text that has the same pattern of upper and lower case as the text you specified in the Find What field.
Click Find Next. A search begins for the instance of the text you specified in the Find What field. Matching text is highlighted in the Script Editor.
To search for the next occurrence (if any), click Find Next.
Exit the Find window by clicking Cancel.
Click
. The script text is printed to your default printer.
To exit the Bill Script Editor:
|
|
When viewing or editing a bill script using Microsoft® Windows® 2000 Professional, not all lines may be displayed and/or unusual characters may be displayed. |
Bill scripts are written in Visual Basic programming language. The virtual bill creation process uses bill scripts to supply values to a virtual bill.
Select Accounting > Accounts. The Account Manager appears.
Click
to navigate the display of cost centers and accounts.
Select the applicable account.
From the Account menu, select View Script. The Bill Script Editor window appears.
Enter the script effective date by clicking
. The Choose a date window appears.
The script effective date must be greater than or equal to the template effective date.
Enter an effective date or use the drop-down arrow to select the date from a calendar.
Click OK. The Choose a date window closes and the text area of the Bill Script Editor displays <enter script>.
Clear the text area of the Bill Script Editor.
Enter your script text.
When complete, click OK.
When editing a bill script, the modified script applies to the current version and all future versions of this bill.
Editing scripts should only be attempted by advanced users with Visual Basic programming skills.
Select Accounting > Accounts. The Account Manager appears.
Click
to navigate the display of cost centers and accounts.
Select the applicable account.
From the Account menu, select View Script. The Bill Script Editor window appears.
Place the cursor in the area of the script text that you wish to edit.
Make the necessary modifications.
Click OK. The modified bill script is saved and the Bill Script Editor window closes.
Select Accounting > Accounts. The Account Manager appears.
Navigate the display of cost centers and accounts until the desired account is located.
Select the applicable account.
From the Account menu, select View Script. The Bill Script Editor window appears.
Select the appropriate bill script version in the Version drop-down list.
Click
.
Repeat steps 5 and 6 to delete other bill script versions for this account.
Click OK to save your changes. The Bill Script Editor window closes.
Select Accounting | Accounts. The Account Manager appears.
Click
to navigate the display of cost centers and accounts.
Select the applicable account.
From the Account menu, select Run Script. The Bill Equation Processor window appears.
Select either:
Automatic
Select Automatic to begin processing based on previously specified conditions.
The start date is the "last run" date of the processor.
The end date is the first day of the month after the current month.
Manual
Select Manual to set a start and end date for the processor to run. The start date must be greater than or equal to the template effective date.
Set the start date by entering the date or use the drop-down arrow to select the date from a calendar.
Set the end date by entering the date or use the drop-down arrow to select the date from a calendar.
Reprocess from log
Select Reprocess from log to process all records from the Virtual Bill Processors Problem log which are not flagged as "Hold". During reprocessing:
If there is already a bill in the period and year with matching start and end dates to one that would be created AND it is marked as approved, nothing happens.
If the log message is removed from the Problem folder, the bill has been successfully created.
If the log message is marked as Hold, the processor has failed to create a bill.
Click Start.
If any errors occur, a message window appears. Close the message window by clicking OK then go to the Virtual Bill Processor Problems folder in the Work Flow Manager to view the details.
When the process is complete, click Close. The Bill Equation Processor window closes.
The Virtual Bill Processor executes user-defined formulas to create calculated bill line item data. The Processor is designed to assist in generating monthly bills.
You can create virtual bills for ALL accounts by using the Virtual Bill Processor from the Tools menu or for a SINGLE account by selecting the applicable account in the Account Manager.
To create virtual bills for all accounts, from the Tools menu, select Processor | Virtual Bills. The Bill Equation Processor window appears.
Go to step 3.
To create virtual bills for a single account, select Accounting | Accounts. The Account Manager appears.
Navigate the Accounting Tree to select the appropriate account.
From the Account menu, select Run Script. The Bill Equation Processor window appears.
Go to step 3.
Select either:
Automatic: Select Automatic to begin processing based on previously specified conditions.
The start date is the "last run" date of the processor.
The end date is the first day of the month after the current month.
Manual: Select Manual to set a different start and end date for the processor to run. Note that the start date must be greater than or equal to the bill template effective date or bills will not be generated.
Set the start date by entering the date or use the drop-down arrow to select the date from a calendar.
Set the end date by entering the date or use the drop-down arrow to select the date from a calendar.
Reprocess from log: Select Reprocess from log to process all records from the Virtual Bill Processors Problem log which are not flagged as "Hold". During reprocessing:
If there is already a bill in the period and year with matching start and end dates to one that would be created AND it is marked as approved, nothing happens.
If the log message is removed from the Problem folder, the bill has been successfully created.
If the log message is marked as Hold, the processor has failed to create a bill.
Use Batch Variables: If desired, select Use Batch Variables to have the Virtual Bills inherit some of the variables from the batch of the Source bill:
Variables that can be inherited are Batch Number, Invoice Number, Account Period, and Control Code
Variables that cannot be inherited are Next Reading, Statement Date, and Due Date.
All values are derived from the source bill, rather than the batch.
Click Start.
Cancel the operation by clicking Abort.
If any errors occur, a message window appears. Close the message window by clicking OK then go to the Virtual Bill Processor Problems folder in the Work Flow Manager to view the details.
When the process is complete, click Close. The Bill Equation Processor window will close.
NOTE: When the Virtual Bill Processor runs, the Processor automatically checks Account Properties for the associated account to determine if the account Receives bills (FromVendor flag=1) or Creates bills (FromVendor flag=0). This account property should be set from the Account Properties/Billing tab. The script-created bill will reflect the current Billing setting.
Select Accounting > Work Flow Manager. The Work Flow Manager appears.
Click
to open the Virtual Bill Processor folder and navigate to the Problem folder.
Select the appropriate bill.
From the File menu, select Properties. The Virtual Bill Properties window will open and display the following information:
Account
Billing period
Billing period year
Status
Category
Estimation method
Message
Exit the Virtual Bill Properties window by clicking Close.
Select Accounting > Work Flow Manager. The Work Flow Manager appears.
Click
to open the Virtual Bill Processor Problem folder.
Select the appropriate account.
Right-click and from the Status menu select any of the following:
Hold: There is still a problem with this bill.
Try with Real: The bill is flagged to reprocess using real data. Go to Creating Virtual Bills.
Try with Estimate: The bill is flagged to reprocess using estimated data. Go to Creating Virtual Bills.
To reprocess bills for ALL accounts, run the Virtual Bill Processor from the Tools menu. See details below.
To reprocess bills for a SINGLE account, navigate the Account Manager to select only the appropriate account. See details below.
To reprocess virtual bills for all accounts, from the Tools menu, select Processor > Virtual Bills. The Bill Equation Processor window appears.
Go to step 3.
To reprocess virtual bills for a single account, select Accounting > Accounts. The Account Manager appears.
Navigate the Accounting tree to select the appropriate account.
From the Account menu, select Run Script. The Bill Equation Processor window appears.
Go to step 3.
Select Reprocess from log. All records from the Virtual Bill Processors Problem log which are not flagged as "Hold" are reprocessed. During reprocessing:
If there is already a bill in the period and year with matching start and end dates to one that would be created AND it is marked as approved, nothing happens.
If the log message is removed from the Problem folder, the bill has been successfully created.
If the log message is marked as Hold, the processor has failed to create a bill.
Click Start.
When the process is complete, click Close. The Bill Equation Processor window closes.
TASK: Apply a rate to usage and demand (that would come from submeter readings/channel):
Getting usage from a reading channel is supported via the ReadingDelta function. If there is a Demand channel, the Max demand value for the date range determined by the bill start and end dates can be retrieved from there.
Getting those values into a Rate and calculating the cost is where things get tricky. As long as you know the names of the rate inputs for the Usage and Demand for the rate and know the names of the rate outputs that will have the values you want, it can be done. Since these values are available to the person writing the script, it's not a huge task and once it is done for the first one, most of it becomes a cut/paste for any others using the same rate and bill template. And since most of the rates will be using the standard names from the Wizard, it's mostly a matter of choosing the right values.
First you need a way to do the rate calculation:
Function DoRateCalculation(RateTariffID, StartDate, Usage, Demand)
Dim Tariff
Set Tariff = CreateObject("EnergySense.Tariff")
Tariff.Load(RateTariffID)
' Load the rate
Dim Rate
Set Rate = Tariff.GetRate(StartDate)
' create a bill that matches the rate
Dim RateBill
Set RateBill = Rate.CreateBill
' populate its use (and dem)
For Each Line in RateBill.Lines
If Line.Caption="Usage" Then
Line.Value = Usage
ElseIf Line.Caption="BilledDemand" Then
Line.Value = Demand
ElseIf Line.Caption="ActualDemand" Then
Line.Value = Demand
End If
Next
Set DoRateCalculation = Rate.Calculate(RateBill)
End Function
If that is done, the return value from this Function is a Collection of Rate Outputs so the whole thing looks something like this:
Dim outputs
Set outputs = DoRateCalculation(1024, Dest.StartDate, Usage, Demand)
If IsObject(outputs) Then
Dim RateEnergyCost
RateEnergyCost = 0.0
Dim RateDemandCost
RateDemandCost = 0.0
Dim RateTotalCost
RateTotalCost = 0.0
For Each Element in Outputs
If Element.Name = "TotalCost" Then
RateTotalCost = Element.Value
ElseIf Element.Name = "EnergyCost" Then
RateEnergyCost = Element.Value
ElseIf Element.Name = "DemandCost" Then
RateDemandCost = Element.Value
End If
Next
' put values into created bill (Dest)
If RateEnergyCost <> 0.0 Then
For Each Line In Dest.Lines
If Line.Caption="EnergyCost" Then
Line.Cost = RateEnergyCost
ElseIf Line.Caption = "TotalCost" Then
Line.Cost = RateTotalCost
ElseIf Line.Caption = "DemandCost" Then
Line.Cost = RateDemandCost
End If
Next
End If
End If
TASK: Create a Virtual Bill using Interval Data to calculate the Use and Demand (from Channel Data).
The ReadingDelta Helper function works well for monthly readings, but does not work well for more frequent intervals of data (15 Minute or Hourly), since it subtracts the current reading from the next most previous reading. For more frequent intervals, the MeterSummary Helper function should be used.
The MeterSummary Helper function is a programming Object available to Virtual Account Scripts. It is used to obtain summary information regarding interval data for a defined period of time, from a defined Meter Channel. MeterSummary Helper returns the:
Here is an example Virtual Account Script for a meter with a 15-minute Demand Channel, using the MeterSummary Helper function to generate a Virtual Bill containing Use, Demand, and Cost.
' Sample Virtual Account Script using MeterSummary Helper Function
' set a Debug variable
Dim Debug
' Debug = 1 for True, Debug = 0 for False
Debug = 1
'
' declare variables
Dim UnitCost, MeterCode, ChannelCode
' initialize variables
UnitCost = 0.15
MeterCode = "Meter123"
ChannelCode = "DEMAND:KW"
'
' =======
' MeterSummary helper function should return Maximum, Minimum, Average, Total, and Count
'
' declare variables
Dim MSMax, MSMin, MSAvg, MSTotal, MSCount
' initialize variables
MSMax = 0.0
MSMin = 0.0
MSAvg = 0.0
MSTotal = 0.0
MSCount = 0.0
'
If Debug = 1 Then
MsgBox ("MSMax = " & MSMax & ", MSMin = " & MSMin & ", MSAvg = " & MSAvg)
MsgBox ("MSTotal = " & MSTotal & ", MSCount = " & MSCount)
End If
'
' Now use MeterSummary helper function to retrieve the data
Dim MSHF
Set MSHF = MeterSummary(MeterCode, ChannelCode, 0)
'
MSMax = MSHF.Maximum
MSMin = MSHF.Minimum
MSAvg = MSHF.Average
MSTotal = MSHF.Total
MSCount = MSHF.Count
'
If Debug = 1 Then
MsgBox ("MSMax = " & MSMax & ", MSMin = " & MSMin & ", MSAvg = " & MSAvg)
MsgBox ("MSTotal = " & MSTotal & ", MSCount = " & MSCount)
End If
'
' generate the destination bill
'=======
' The kWh consumption is equal to the sum of the 15-minute KW values, divided by 4
Dest.Lines("Usage").value = (MSTotal/4.0)
Dest.Lines("Demand").value = MSMax
Dest.Lines("Total Cost").cost = ((MSTotal/4.0) * UnitCost)
Dest.Cost = (MSTotal * UnitCost)
'
' =======
' end of script
Electronic Data Interchange (EDI) is a standard method used by utility vendors to transmit electronic billing data. In EnergyCAP, the EDI Processor executes user-defined formulas (scripts) associated with the account to create bills from imported data.
EnergyCAP’s part in the EDI process is simply to receive the EDI 810 v 4010 (X.12 compliant) transaction and to import specified billing invoice data into the database. EnergyCAP does not produce any EDI compliant response transaction such as an EDI 997 acknowledgement. EnergyCAP will not generate an EDI 820 Remittance.
Each utility company’s implementation of EDI is different and each has rules and guidelines which govern the arrangement between the customer and the utility. Most arrangements require that a VAN (Value Added Network) partner is in place to handle the distribution of the EDI transactions. In addition, some utilities mandate a paperless invoice process with payments made via ACH/EFT methods through an EDI 820 Remittance transaction.
Contact your vendor(s) to determine the specific rules for their EDI offerings. In most cases, there will be a trial period for a test group of accounts prior to switching from paper invoices to EDI transactions only. The trial period helps to ensure that the bill detail is being captured properly and that the payment methods are working as expected.
If you are interested in implementing EDI for your organization, first contact your utility companies and begin discussions with them regarding EDI requirements. Then contact EnergyCAP Sales (sales@energycap.com) to determine pricing for implementing EDI transactions in EnergyCAP. You may also find the following online resources helpful as you investigate the benefits of EDI for your organization.
Southern California – Edison EDI Overview:
http://en.wikipedia.org/wiki/Electronic_Data_Interchange
EnergyCAP Enterprise maintains a history of a vendor's bill scripts in order to match the bill period to the applicable EDI script version when importing bills.
Before importing EDI data, use the EDI Script Editor (accessible from the Contact Manager via the Contact menu item, or by right-clicking the desired account-View Script option) to create a script for the desired vendor.
In order to import EDI data into EnergyCAP Enterprise, first verify the following:
NOTE: EnergyCAP Enterprise lists any errors that occur during the import process in the EDI Processor Problem folder of the Work Flow Manager.
The ediprofile.ini file, located in the Local Settings\Application Data\EnergyCAP Enterprise directory under the Documents and Settings directory for your Windows login profile, allows you to toggle global settings for the bill import processor:
EDI scripts are written in Visual Basic programming language. The EDI import process uses the script to supply values to bills. Energy CAP Enterprise maintains a history of the vendor's EDI script versions.
When editing a bill script, the modified script applies to the current version and all future versions of this bill.
Editing scripts should only be attempted by advanced users with Visual Basic programming skills.
Select Setup > Contacts. The Contact Manager appears.
From the Contact menu, select View > Vendors.
Select the applicable vendor.
From the Contact menu, select View Script. The EDI Script Editor window appears.
You can:
Click
. The Save As window appears.
In the Save in field, select the directory location for the file.
In the File name field, enter a name for the file.
After making your selections, click Save. The script is saved as a file to the location you specified.
Click
. The Open dialog box appears.
In the Look in field, select the directory location of the script file.
In the File List section, select the appropriate script file.
Click Open. The opened script file text replaces the existing script text.
Click
. The Find window appears.
Enter the text you want to find.
Select any search options:
Match whole word only Finds only whole words instead of searching for your text inside longer words.
Match case Finds only text that has the same pattern of upper and lower case as the text you specified in the Find What field.
Click Find Next. A search begins for the instance of the text you specified in the Find What field. Matching text is highlighted in the Script Editor.
To search for the next occurrence, click Find Next.
Exit the Find dialog by clicking Cancel.
Click
. The script text is printed to your default printer.
Exit the EDI Script Editor dialog box by clicking Cancel.
EDI scripts are written in Visual Basic programming language. The EDI import process uses the script to supply values to bills. Energy CAP Enterprise maintains a history of the vendor's EDI script versions.
Select Setup | Contacts. The Contact Manager appears.
From the Contact menu, select View | Vendors.
Select the applicable vendor.
From the Contact menu, select View Script. The EDI Script Editor dialog box appears.
Enter the script effective date by clicking
. The Choose a date
dialog box appears.
Enter an effective date or use the drop-down arrow to select the date from a calendar.
Click OK. The Choose a date dialog box closes and the text area of the Bill Script Editor displays <enter script>.
Clear the text area of the Bill Script Editor.
Enter your script text.
When complete, click OK.
When editing a script, the modified script applies to all imported bills transmitted between the version begin and end dates.
Script editing should only be attempted by advanced users with Visual Basic programming skills. EnergyCAP, Inc. does not support or troubleshoot user-edited custom scripts without previous contractual agreement.
Select Setup > Contacts. The Contact Manager appears.
From the Contact menu, select View > Vendors.
Select the applicable vendor.
From the Contact menu, select View Script. The EDI Script Editor window appears.
Place the cursor in the area of the script text to edit.
Make the necessary modifications.
Click OK. The modified bill script is saved and the EDI Script Editor window closes.
.
When importing EDI data, the data used is available to all vendors having the same import ID (Vendor Properties / Other tab) as the EDI ID used in the EDI file. The EDI ID is a concatenation of elements 5 and 6 from the ISA envelope segment.
. The Save As window appears.
. The log file display is printed to the default printer.Select Accounting > Work Flow Manager. The Work Flow Manager appears.
Click
to open the Bill Import Processor folder and navigate to the Problem folder.
Select the appropriate bill. Problems resulting from running the EDI import processor have a message beginning with "ED".
From the File menu, select Properties. The Kickout Properties window appears and displays the following information:
Account
Kickout code
Information
Kickout text
Exit the Kickout Properties window by clicking Close.
Could not open EDI file filename.
Error reading from EDI file filename.
Could not open translated EDI file.
Error reading from translated EDI file.
File is unreadable. ISA delimiter not found.
File is unreadable. End-of-line delimiter not found.
File is unreadable. GS segment not found. Unable to process consolidated invoice. Invoiced discarded.
Unable to process credit/debit memo. Invoice discarded.
Invoice is of an unknown type. Invoice discarded.
Account 'EDI account number' is not found. Invoice discarded.
Account 'EDI account number' is not a billing account. Invoice discarded.
Account 'EDI account number' is not in service during this service period (start date to end date). Invoice discarded.
Vendor 'EDI vendor code' account 'EDI account number' is now assigned to vendor ‘account vendor code’. Invoice discarded.
Service period start date (start date) must be less than end date (end date). Invoice discarded.
'EDI commodity code' meter count (EDI meter count) does not match account meter count (account meter count). Invoice discarded.
'EDI commodity code' meter 'EDI meter code' is not found. Invoice discarded.
Meter 'EDI meter code' commodity 'EDI commodity code' does not match account meter commodity 'account meter commodity'. Invoice discarded.
'EDI commodity code' meter 'EDI meter code' is not assigned to account 'EDI account number'. Invoice discarded.
'EDI commodity code' meter 'EDI meter code' is not in service during the service period from start date to end date. Invoice discarded.
'EDI commodity code' meter 'EDI meter code' is not in service on account 'EDI account number' during the service period from start date to end date. Invoice discarded.
Mandatory invoice detail 'observation type' is not set. Invoice discarded.
Invoice total cost is not set. Invoice discarded.
Test import. Invoice discarded.
This is an adjustment invoice. Please verify processed invoice.
This is a corrected invoice. Please verify processed invoice.
This is a duplicate invoice. Please verify processed invoice.
This is a final invoice. Please deactivate account.
Account number 'Old EDI account number' has changed to 'EDI account number'. Please update database.
'EDI commodity code' meter 'EDI meter code' could not be matched using meter code; meter matched by commodity only.
Multiple 'EDI commodity code' meter matches (account meter count) occurred based on EDI import code; first meter selected.
Multiple 'EDI commodity code' meter matches (account meter count) occurred based on serial number; first meter selected.
Multiple 'EDI commodity code' meter matches (account meter count) occurred based on device code; first meter selected.
Multiple 'EDI commodity code' meter matches (account meter count) occurred based on commodity; first meter selected.
Commodity 'EDI commodity code' is not found. Invoice detail discarded.
Observation type 'observation type' is not found. Invoice detail discarded.
Observation method 'observation method' is not found. Invoice detail discarded.
Unit code 'unit code' is not found. Invoice detail discarded.
EDI bills are reimported using the Bill Reimport Processor.
The Bill Reimport Processor attempts to reimport ALL bills that were successfully read but were NOT successfully imported. These bills can be viewed in the Bill Import Processor problem folder of the Work Flow Manager.
Kickout messages beginning with "ED" are produced by the EDI import processor. Only kickout records with entries in the kickout text field are eligible for reimport. Currently, it is impossible to edit EDI transactions in EnergyCAP.
From the Tools menu, select Processor > Bill Reimport. A progress indicator appears.
When the process is complete, the Log window appears the status of the import process. If errors did occur, they are listed in the log, and it will be necessary to correct these errors in order to successfully reimport the file into the database. If the reimport was successful, this will be indicated in the log.
To save the log file, click
. The Save As window appears.
In the Save in field, select the directory location for the file.
In the File name field, enter a name for the file.
Click Save.
Print the log file by clicking
. The log file display is printed to the default printer.
Exit the Log window by clicking Close.
To import EDI files into EnergyCAP:
NOTES: Any ‘kickouts’ are shown in the Bill Import Processor Problem folder. Kickouts can be edited and re-imported using the Reimport Processor.
EnergyCAP Enterprise uses Visual Basic scripts to interpret incoming EDI invoices from utility company vendors. Following is a sample of an EDI 810 v4010 import script for PG&E.
______________________________
' -- Start Main EDI Import Script --
'
' EDI Version Check
'
Select Case EdiTransaction.TransactionSet
Case "810"
Select Case EdiTransaction.Version
Case "002040"
Import810Version2040
Case "003030"
Import810Version3030
Case "003040"
Import810Version3040
Case "004010"
Import810Version4010
Case Else
AddMessage("Cannot read this version of 810 transaction.\r\nInvoice discarded.")
ExitScript
End Select
Case Else
'
' Do nothing; just ignore data
'
End Select
' -- End Main EDI Import Script --
' -- Start EDI Version Import Scripts --
Sub Import810Version2040
AddMessage("Script to read version 2040 810 transactions not yet implemented.\r\nInvoice discarded.")
ExitScript
End Sub
Sub Import810Version3030
AddMessage("Script to read version 3030 810 transactions not yet implemented.\r\nInvoice discarded.")
ExitScript
End Sub
Sub Import810Version3040
AddMessage("Script to read version 3040 810 transactions not yet implemented.\r\nInvoice discarded.")
ExitScript
End Sub
Sub Import810Version4010
Dim Seg1
Dim Seg2
Dim Elem1
Dim Elem2
Dim AccountCode
Dim OldAccountCode
Dim InvoiceNumber
Dim InvoiceType
Dim DocumentCode
Dim StartDate
Dim EndDate
Dim InvoiceDate
Dim DueDate
Dim Estimated
Dim MeterCode
Dim CommodityCode
Dim ObservationType
Dim ValueUnitCode
Dim Value
Dim CostUnitCode
Dim Cost
Dim RoundoffError
Dim Caption
Dim Bill
Dim FoundUseMEA
Dim FoundDemandMEA
Dim MeterMultiplier
'
' Importer settings
'
RoundoffMethod = rmAmount ' do a fixed-amount roundoff compensation
RoundoffAmount = 2 ' allow two cents per detail
'
' Find transaction account number
'
Set Seg1 = EdiTransaction.FindSegment("BIG", "", sdFirst)
If (IsObject(Seg1)) Then
Set Elem1 = Seg1.FindElement("2")
' Begin method one
' AccountCode = Elem1.Value
' End method one
' Begin method two
If (Len(Elem1.Value) > 6) Then
AccountCode = Left(Elem1.Value, Len(Elem1.Value) - 6)
Else
AccountCode = ""
End If
' End method two
Else
AccountCode = ""
End If
' Set Seg1 = EdiTransaction.FindSegment("REF", "REF:01='11'", sdFirst)
' If (IsObject(Seg1)) Then
' AccountCode = Seg1.FindElement("2").Value
' End If
'
' Find transaction invoice number
'
' Set Seg1 = EdiTransaction.FindSegment("BIG", "", sdFirst)
If (IsObject(Seg1)) Then
InvoiceNumber = Seg1.FindElement("2").Value
Else
InvoiceNumber = ""
End If
'
' Find invoice type
'
' Element 7 of the BIG segment contains a code indicating
' what kind of invoice is being processed. The types of invoices
' to expect will vary by vendor. These codes are
' typically one of the following:
'
' Invoice type code Invoice type
' --------------------------------------- -------------------------
' CI (consolidated invoice) itConsolidated
' CO (corrected invoice) itCorrected
' DU (duplicate invoice) itDuplicate
' FB (final invoice) itFinal
' FE (memorandum, final invoice) itFinal
' ME (memorandum) itMemo
' PR (original invoice) itOriginal
' <other> itUnknown
'
' Element 8 of the BIG segment may contain a code additionally indicating
' what kind of invoice is being processed. These codes are
' typically one of the following:
'
' Invoice action code Invoice type
' --------------------------------------- -------------------------
' 00 (original invoice) itOriginal
' 01 (cancel invoice) itCancelled
' 05 (replace invoice) itCorrected
' 07 (duplicate invoice) itDuplicate
' CO (corrected invoice) itCorrected
' <other> <ignore code>, or itUnknown
'
' Invoice type itAdjustment is also available for invoices which
' contain only adjustments to a prior invoice, rather than
' an entirely new invoice to replace a prior one. There are currently
' no known EDI codes to indicate this type of invoice.
'
If (IsObject(Seg1)) Then
Select Case Seg1.FindElement("7").Value
Case "PR"
InvoiceType = itOriginal
Case Else
' Don't know how to implement other types of invoices at this time
InvoiceType = itUnknown
End Select
Else
InvoiceType = itUnknown
End If
'
' Find control code
'
DocumentCode = Right("000000000" & EdiTransaction.IchgCtrlNumber, 9)
DocumentCode = DocumentCode & Right("000000000" & EdiTransaction.FcnlGrpCtrlNumber, 9)
DocumentCode = DocumentCode & Right("000000000" & EdiTransaction.TrxCtrlNumber, 9)
'
' Find invoice date
'
If (IsObject(Seg1)) Then
Set Elem1 = Seg1.FindElement("1")
InvoiceDate = CDate(Mid(Elem1.Value, 5, 2) & "/" & Mid(Elem1.Value, 7, 2) & "/" & Mid(Elem1.Value, 1, 4))
Else
InvoiceDate = 0
End If
'
' Find payment due date
'
Set Seg1 = EdiTransaction.FindSegment("ITD", "", sdFirst)
If (IsObject(Seg1)) Then
Set Elem1 = Seg1.FindElement("6")
DueDate = CDate(Mid(Elem1.Value, 5, 2) & "/" & Mid(Elem1.Value, 7, 2) & "/" & Mid(Elem1.Value, 1, 4))
Else
DueDate = 0
End If
'
' Find transaction old account number (if it exists)
'
Set Seg1 = EdiTransaction.FindSegment("REF", "REF:01='45'", sdFirst)
If (IsObject(Seg1)) Then
OldAccountCode = Seg1.FindElement("2").Value
Else
OldAccountCode = ""
End If
'
' Find service period start date
'
Set Seg1 = EdiTransaction.FindSegment("DTM", "DTM:01='150'", sdFirst)
If (Not IsObject(Seg1)) Then
Set Seg1 = EdiTransaction.FindSegment("DTM", "DTM:01='186'", sdFirst)
End If
If (IsObject(Seg1)) Then
Set Elem1 = Seg1.FindElement("2")
If (Elem1.Value = "") Then
Set Elem1 = Seg1.FindElement("6")
End If
StartDate = CDate(Mid(Elem1.Value, 5, 2) & "/" & Mid(Elem1.Value, 7, 2) & "/" & Mid(Elem1.Value, 1, 4))
Else
StartDate = 0
End If
'
' Find service period end date
'
Set Seg1 = EdiTransaction.FindSegment("DTM", "DTM:01='151'", sdFirst)
If (Not IsObject(Seg1)) Then
Set Seg1 = EdiTransaction.FindSegment("DTM", "DTM:01='187'", sdFirst)
End If
If (IsObject(Seg1)) Then
Set Elem1 = Seg1.FindElement("2")
If (Elem1.Value = "") Then
Set Elem1 = Seg1.FindElement("6")
End If
EndDate = CDate(Mid(Elem1.Value, 5, 2) & "/" & Mid(Elem1.Value, 7, 2) & "/" & Mid(Elem1.Value, 1, 4))
Else
EndDate = 0
End If
'
' Set "estimated bill" flag
'
Set Seg1 = EdiTransaction.FindSegment("MEA", "MEA:01='AE' OR MEA:01='EE'", sdFirst)
If (IsObject(Seg1)) Then
Estimated = True
Else
Estimated = False
End If
'
' Create an EnergySense bill object to populate;
' set the bill properties for the data that we've read
'
Set Bill = CreateBill(AccountCode, StartDate, EndDate)
Bill.OldAccountNumber = OldAccountCode
Bill.InvoiceNumber = InvoiceNumber
Bill.InvoiceType = InvoiceType
Bill.DocumentCode = DocumentCode
If (InvoiceDate > 0) Then
Bill.StatementDate = InvoiceDate
End If
If (DueDate > 0) Then
Bill.DueDate = DueDate
End If
Bill.Estimated = Estimated
'
' Read account balance data and store it as information-only line items
'
' The ToNumber function used below is defined in the utility subroutine
' section of this script.
'
MeterCode = ""
CommodityCode = "MONEY"
Value = 0 ' these are all cost details
ValueUnitCode = "" ' these are all cost details
CostUnitCode = "USDOLLARS"
RoundoffError = False
Set Seg1 = EdiTransaction.FindSegment("BAL", "", sdFirst)
While (IsObject(Seg1))
Cost = CDbl(ToNumber(Seg1.FindElement("3").Value))
Select Case Seg1.FindElement("2").Value
Case "PB"
ObservationType = "PRIORBALANCE"
Caption = "Balance From Previous Period"
Case "YB" ' not sure what this is meant to convey
ObservationType = "PRIORBALANCE"
Caption = "Unknown Prior Balance"
Case Else ' don't know what to do
ObservationType = "PRIORBALANCE"
Caption = "Unknown Prior Balance"
Caption = UCase(Caption) ' make it stand out on screen
End Select
'
' Add cost detail to bill and find next BAL segment
'
If ((Cost <> 0) And (ObservationType <> "")) Then
Bill.AddLineItem MeterCode, CommodityCode, ObservationType, ValueUnitCode, Value, CostUnitCode, Cost, RoundoffError, ctDebit, Caption
End If
Set Seg1 = EdiTransaction.FindSegment("BAL", "", sdNext)
Wend
'
' Find account charge section and assign bill with details
'
Set Seg1 = EdiTransaction.FindSegment("IT1(TDS)", "IT1:09='ACCOUNT'", sdFirst)
If (IsObject(Seg1)) Then
'
' Read account cost details inside the current IT1 segment loop.
'
MeterCode = ""
CommodityCode = "MONEY"
Value = 0 ' these are all cost details
ValueUnitCode = "" ' these are all cost details
RoundoffError = False
Set Seg2 = Seg1.FindSegment("SAC", "", sdNext)
While (IsObject(Seg2))
Cost = GetSACCostNoCharge(Seg2)
GetSACObsTypeAndCaption Seg2, ObservationType, ValueUnitCode, Value, Caption
'
' Add cost detail to bill and find next SAC segment
'
If ((Cost <> 0) And (ObservationType <> "")) Then
If (Seg2.FindElement("1").Value = "N") Then
ObservationType = "NOCHARGE"
End If
Bill.AddLineItem MeterCode, CommodityCode, ObservationType, "", 0, CostUnitCode, Cost, RoundoffError, ctDebit, Caption
End If
Set Seg2 = Seg1.FindSegment("SAC", "", sdNext)
Wend
'
' Read TXI segments now
'
Value = 0 ' these are all cost details
ValueUnitCode = "" ' these are all cost details
Set Seg1 = EdiTransaction.FindSegment("IT1(TDS)", "", sdCurrent) ' get another IT1 segment object positioned at beginning of loop to use for TXI search
Set Seg2 = Seg1.FindSegment("TXI", "", sdNext)
While (IsObject(Seg2))
Cost = CDbl(ToNumber(Seg2.FindElement("2").Value))
GetTXIObsTypeAndCaption Seg2, ObservationType, ValueUnitCode, Value, Caption
'
' Add cost detail to bill and find next TXI segment
'
If ((Cost <> 0) And (ObservationType <> "")) Then
If (Seg2.FindElement("7").Value = "O") Then
ObservationType = "NOCHARGE"
End If
Bill.AddLineItem MeterCode, CommodityCode, ObservationType, ValueUnitCode, Value, CostUnitCode, Cost, RoundoffError, ctDebit, Caption
End If
Set Seg2 = Seg1.FindSegment("TXI", "", sdNext)
Wend
End If
'
' Find meter charge section and assign bill with details
'
CommodityCode = ""
Set Seg1 = EdiTransaction.FindSegment("IT1(TDS)", "IT1:09='METER' OR IT1:09='UNMET'", sdFirst)
While (IsObject(Seg1))
'
' Read meter commodity
'
Set Elem1 = Seg1.FindElement("7")
If (CommodityCode <> Elem1.Value) Then ' only reading one meter code per commodity
MeterCode = ""
End If
CommodityCode = Elem1.Value
'
' Find meter code
'
' There is no requirement that meter serial numbers
' be provided in the invoice. If there is one here, read it.
'
Set Seg2 = Seg1.FindSegment("IT1(TDS)", "", sdCurrent, False)
Set Seg2 = Seg2.FindSegment("REF", "REF:01='MG'", sdNext)
If (IsObject(Seg2)) Then
If (MeterCode = "") Then
MeterCode = Seg2.FindElement("2").Value
End If
End If
'
' Spin through all measurement segments within the current IT1 segment loop
' to see if there are any "use" or "demand" segments, and find meter multiplier
'
FoundUseMEA = 0
FoundDemandMEA = 0
MeterMultiplier = 1
Set Seg2 = Seg1.FindSegment("MEA", "", sdNext)
While (IsObject(Seg2))
GetMEAObsTypeAndCaption Seg2, ObservationType, ValueUnitCode, Value, Caption
'
' Set "found" flags and/or meter multiplier
'
If (Seg2.FindElement("2").Value = "MU") Then
MeterMultiplier = CDbl(ToNumber(Seg2.FindElement("3").Value))
ElseIf (ObservationType <> "") Then
Select Case ValueUnitCode
Case "KWH"
FoundUseMEA = FoundUseMEA + 1
Case "KW"
FoundDemandMEA = FoundDemandMEA + 1
Case Else ' don't know what type of measurement
End Select
End If
Set Seg2 = Seg1.FindSegment("MEA", "", sdNext)
Wend
'
' Read all measurement segments within the current IT1 segment loop;
'
Set Seg1 = EdiTransaction.FindSegment("IT1(TDS)", "", sdCurrent) ' get another IT1 segment object positioned at beginning of loop to use for SAC search
Set Seg2 = Seg1.FindSegment("MEA", "", sdNext)
While (IsObject(Seg2))
Value = CDbl(ToNumber(Seg2.FindElement("6").Value))
GetMEAObsTypeAndCaption Seg2, ObservationType, ValueUnitCode, Value, Caption
'
' Add value detail to bill and find next MEA segment
'
If ((FoundDemandMEA > 1) And (ValueUnitCode = "KW") And (Seg2.FindElement("7").Value = "51")) Then
ObservationType = "" ' don't add this detail to bill - it is a duplicate
End If
If ((Value <> 0) And (ObservationType <> "")) Then
Bill.AddLineItem MeterCode, CommodityCode, ObservationType, ValueUnitCode, Value, CostUnitCode, 0, False, ctDebit, Caption
Else
'
' See if we need to add demand detail
'
Value = (Value - CDbl(ToNumber(Seg2.FindElement("5").Value))) * MeterMultiplier
If ((FoundDemandMEA = 0) And (Value <> 0) And (ObservationType <> "") And (ValueUnitCode = "KW")) Then
ObservationType = "DEMAND"
End If
If ((Value <> 0) And (ObservationType <> "")) Then
Bill.AddLineItem MeterCode, CommodityCode, ObservationType, ValueUnitCode, Value, CostUnitCode, 0, False, ctDebit, Caption
End If
End If
Set Seg2 = Seg1.FindSegment("MEA", "", sdNext)
Wend
'
' Read all invoice consumption/cost details inside
' the current IT1 segment loop
'
RoundoffError = False
Set Seg1 = EdiTransaction.FindSegment("IT1(TDS)", "", sdCurrent) ' get another IT1 segment object positioned at beginning of loop to use for SAC search
Set Seg2 = Seg1.FindSegment("SAC", "", sdNext)
While (IsObject(Seg2))
Value = CDbl(ToNumber(Seg2.FindElement("10").Value))
Cost = GetSACCostNoCharge(Seg2)
Select Case Seg2.FindElement("9").Value
Case "KH"
ValueUnitCode = "KWH"
Case "K1"
ValueUnitCode = "KW"
Case "EA"
Value = 0 ' don't use value
ValueUnitCode = ""
Case Else ' don't know what unit to assign if not one of the codes above
ValueUnitCode = ""
End Select
GetSACObsTypeAndCaption Seg2, ObservationType, ValueUnitCode, Value, Caption
'
' Add value and cost details to bill and find next SAC segment
' (add value and cost as seperate details so that "no charge"
' details can be captured correctly regardless of template setup.
'
If ((FoundUseMEA = 0) And (ObservationType = "GENERATIONUSE")) Then
ObservationType = "USE" ' no generation use, just normal use
Caption = "Use"
End If
If (ObservationType <> "") Then
If (Seg2.FindElement("1").Value = "N") Then
If (Value <> 0) Then
Bill.AddLineItem MeterCode, CommodityCode, ObservationType, ValueUnitCode, Value, CostUnitCode, 0, False, ctDebit, Caption
End If
If (Cost <> 0) Then
ObservationType = "NOCHARGE"
Bill.AddLineItem MeterCode, CommodityCode, ObservationType, "", 0, CostUnitCode, Cost, RoundoffError, ctDebit, Caption
End If
Else
Bill.AddLineItem MeterCode, CommodityCode, ObservationType, ValueUnitCode, Value, CostUnitCode, Cost, RoundoffError, ctDebit, Caption
End If
End If
Set Seg2 = Seg1.FindSegment("SAC", "", sdNext)
Wend
'
' Read TXI segments now
'
Value = 0 ' these are all cost details
ValueUnitCode = "" ' these are all cost details
Set Seg1 = EdiTransaction.FindSegment("IT1(TDS)", "", sdCurrent) ' get another IT1 segment object positioned at beginning of loop to use for TXI search
Set Seg2 = Seg1.FindSegment("TXI", "", sdNext)
While (IsObject(Seg2))
Cost = CDbl(ToNumber(Seg2.FindElement("2").Value))
GetTXIObsTypeAndCaption Seg2, ObservationType, ValueUnitCode, Value, Caption
'
' Add cost detail to bill and find next TXI segment
'
If (ObservationType <> "") Then
If (Seg2.FindElement("7").Value = "O") Then
ObservationType = "NOCHARGE"
End If
Bill.AddLineItem MeterCode, CommodityCode, ObservationType, ValueUnitCode, Value, CostUnitCode, Cost, RoundoffError, ctDebit, Caption
End If
Set Seg2 = Seg1.FindSegment("TXI", "", sdNext)
Wend
Set Seg1 = EdiTransaction.FindSegment("IT1(TDS)", "", sdNext)
Wend
'
' Read the total invoice cost
'
Set Seg1 = EdiTransaction.FindSegment("TDS", "", sdNext)
If (IsObject(Seg1)) Then
Bill.Cost = CDbl(ToNumber(Seg1.FindElement("1").Value) / 100)
'
' Read all invoice consumption/cost details
' that follow the TDS segment
'
MeterCode = ""
CommodityCode = "MONEY"
Value = 0 ' these are all cost details
ValueUnitCode = "" ' these are all cost details
RoundoffError = False
Set Seg2 = Seg1.FindSegment("SAC", "", sdNext)
While (IsObject(Seg2))
Cost = GetSACCostNoCharge(Seg2)
GetSACObsTypeAndCaption Seg2, ObservationType, ValueUnitCode, Value, Caption
'
' Add cost detail to bill and find next SAC segment
'
If ((Cost <> 0) And (ObservationType <> "")) Then
If (Seg2.FindElement("1").Value = "N") Then
ObservationType = "NOCHARGE"
End If
Bill.AddLineItem MeterCode, CommodityCode, ObservationType, ValueUnitCode, Value, CostUnitCode, Cost, RoundoffError, ctDebit, Caption
End If
Set Seg2 = Seg1.FindSegment("SAC", "", sdNext)
Wend
'
' Read TXI segments now
'
Set Seg1 = EdiTransaction.FindSegment("TDS", "", sdCurrent) ' get another TDS segment object positioned at beginning of summary section to use for TXI search
Set Seg2 = Seg1.FindSegment("TXI", "", sdNext)
While (IsObject(Seg2))
Cost = CDbl(ToNumber(Seg2.FindElement("2").Value))
GetTXIObsTypeAndCaption Seg2, ObservationType, ValueUnitCode, Value, Caption
'
' Add cost detail to bill and find next TXI segment
'
If ((Cost <> 0) And (ObservationType <> "")) Then
If (Seg2.FindElement("7").Value = "O") Then
ObservationType = "NOCHARGE"
End If
Bill.AddLineItem MeterCode, CommodityCode, ObservationType, ValueUnitCode, Value, CostUnitCode, Cost, RoundoffError, ctDebit, Caption
End If
Set Seg2 = Seg1.FindSegment("TXI", "", sdNext)
Wend
End If
'
' Save the bill into ES
'
Bill.Save
End Sub
' -- End EDI Version Import Scripts --
' -- Start Utility Subroutines --
'
' This function performs the operations required to extract
' cost data correctly from ITA segments. Cost value
' is returned normally if "no charge" indicator is set.
'
' Element 1 contains a debit/credit/no charge indicator.
' Element 4 may contain another debit/credit/no charge indicator.
' Element 7 contains the cost value in cents.
'
Function GetITACostNoCharge(Seg)
If ((Seg.FindElement("1").Value = "A") Or (Seg.FindElement("4").Value = "04")) Then
GetITACostNoCharge = -Abs(CDbl(ToNumber(Seg.FindElement("7").Value)) / 100)
Else
GetITACostNoCharge = CDbl(ToNumber(Seg.FindElement("7").Value)) / 100
End If
End Function
'
' This function performs the operations required to extract
' cost data correctly from ITA segments.
'
' Element 1 contains a debit/credit/no charge indicator.
' Element 4 may contain another debit/credit/no charge indicator.
' Element 7 contains the cost value in cents.
'
Function GetITACost(Seg)
If (Seg.FindElement("1").Value = "N") Then
GetITACost = 0
Else
GetITACost = GetITACostNoCharge(Seg)
End If
End Function
'
' This function performs the operations required to extract
' cost data correctly from SAC segments. Cost value
' is returned normally if "no charge" indicator is set.
'
' Element 1 contains a debit/credit/no charge indicator.
' Element 5 contains the cost value in cents.
' Element 12 may contain another debit/credit/no charge indicator.
'
Function GetSACCostNoCharge(Seg)
If ((Seg.FindElement("1").Value = "A") Or (Seg.FindElement("12").Value = "04")) Then
GetSACCostNoCharge = -Abs(CDbl(ToNumber(Seg.FindElement("5").Value)) / 100)
Else
GetSACCostNoCharge = CDbl(ToNumber(Seg.FindElement("5").Value)) / 100
End If
End Function
'
' This function performs the operations required to extract
' cost data correctly from SAC segments.
'
' Element 1 contains a debit/credit/no charge indicator.
' Element 5 contains the cost value in cents.
' Element 12 may contain another debit/credit/no charge indicator.
'
Function GetSACCost(Seg)
If (Seg.FindElement("1").Value = "N") Then
GetSACCost = 0
Else
GetSACCost = GetSACCostNoCharge(Seg)
End If
End Function
'
' This function is basically here to
' convert empty text strings into numeric values of zero.
'
Function ToNumber(Value)
If (Trim(Value) = "") Then
ToNumber = 0
Else
ToNumber = Trim(Value)
End If
End Function
'
' This subroutine interprets elements 4 and 15 of SAC segments
' and translates them into observation types and captions
'
Sub GetSACObsTypeAndCaption(Seg, ObservationType, ValueUnitCode, Value, Caption)
Dim SAC04Code, SAC15Code
SAC04Code = Seg.FindElement("4").Value
SAC15Code = Seg.FindElement("15").Value
Select Case SAC04Code
Case "SER000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Service Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "SER001"
ObservationType = "CHARGE"
Caption = "Service Charge"
Case "SER002"
ObservationType = "CHARGE"
Caption = "Cost of Service"
Case "SER003"
ObservationType = "CHARGE"
Caption = "Customer Switching Charge"
Case "SER004"
ObservationType = "CHARGE"
Caption = "Service Charge (Off-Peak Demand)"
Case "SER005"
ObservationType = "CHARGE"
Caption = "Third Party Adminstrative Fee"
Case "SER006"
ObservationType = "CHARGE"
Caption = "Schedule Service Charge"
Case "SER007"
ObservationType = "CHARGE"
Caption = "Change of Account Info Charge"
Case "SER008"
ObservationType = "CHARGE"
Caption = "Special Metering Fee"
Case "ADJ000"
Select Case SAC15Code
Case "ELECTRIC REFUND ADJUSTMENT"
ObservationType = "CHARGE"
Caption = "Electric Refund Adjustment"
Case "REBATE-NON TAXABLE"
ObservationType = "CHARGE"
Caption = "Rebate"
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Adjustment"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "ADJ001"
ObservationType = "CHARGE"
Caption = "Cost Recovery Adjustment"
Case "ADJ002"
ObservationType = "CHARGE"
Caption = "Adjustment"
Case "ADJ003"
ObservationType = "CHARGE"
Caption = "Bank Adjustment"
Case "ADJ004"
ObservationType = "CHARGE"
Caption = "Baseline Adjustment"
Case "ADJ005"
ObservationType = "CHARGE"
Caption = "Collection Charge Adjustment"
Case "ADJ006"
ObservationType = "CHARGE"
Caption = "Franchise Fee Adjustment"
Case "ADJ007"
ObservationType = "CHARGE"
Caption = "Metering Adjustment"
Case "ADJ008"
ObservationType = "CHARGE"
Caption = "Policy Adjustment"
Case "BAS000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Account Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "BAS001"
ObservationType = "CHARGE"
Caption = "Basic Customer Charge"
Case "BAS002"
ObservationType = "CHARGE"
Caption = "Special Billing Charge"
Case "BAS003"
ObservationType = "CHARGE"
Caption = "Delivery Point Charge"
Case "BAS004"
ObservationType = "CHARGE"
Caption = "Field Service Charge"
Case "BAS005" ' this code is supposed to be obsolete
ObservationType = "CHARGE"
Caption = "Baseline Energy Charge"
Case "BAS006" ' this code is supposed to be obsolete
ObservationType = "CHARGE"
Caption = "Above Baseline Energy Charge"
Case "BUD000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Budget Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "BUD001"
ObservationType = "CHARGE"
Caption = "Budget Billing Amount"
Case "BUD002"
ObservationType = "CHARGE"
Caption = "Budget Billing Settlement"
Case "BUD003"
ObservationType = "CHARGE"
Caption = "Budget Billing Interest"
Case "COL000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Collection Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "COL001"
ObservationType = "CHARGE"
Caption = "Collection Charge"
Case "CRE000"
Select Case SAC15Code
Case "ANNUAL MERGER SAVINGS CREDIT"
ObservationType = "CHARGE"
Caption = "Annual Merger Savings Credit"
Case "DIRECT ACCESS FRANCHISE FEE CREDIT"
ObservationType = "CHARGE"
Caption = "Direct Access Franchise Credit"
Case "REVENUE CYCLE SERVICE CREDIT"
ObservationType = "CHARGE"
Caption = "Revenue Cycle Service Credit"
Case "UTILITY SERVICE CREDIT"
ObservationType = "CUSTOMERCHARGE"
Caption = "Utility Service Charge"
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Credit"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "CRE001"
ObservationType = "CHARGE"
Caption = "Credit"
Case "CRE002"
ObservationType = "CHARGE"
Caption = "Bill Limiter Credit"
Case "CRE003"
ObservationType = "CHARGE"
Caption = "Cash Discount Credit"
Case "CRE004"
ObservationType = "CHARGE"
Caption = "Transformer Credit"
Case "CRE005"
ObservationType = "CHARGE"
Caption = "Generation Credit"
Case "CRE006"
ObservationType = "CHARGE"
Caption = "Equipment Credit"
Case "CRE007"
ObservationType = "CHARGE"
Caption = "Energy Assistance Credit"
Case "CRE008"
ObservationType = "CHARGE"
Caption = "Master Meter Credit"
Case "CRE009"
ObservationType = "CHARGE"
Caption = "Interruptible Credit"
Case "CRE010"
ObservationType = "CHARGE"
Caption = "Off Peak Credit"
Case "CRE011"
ObservationType = "CHARGE"
Caption = "Service Guarantee Credit"
Case "CRE012"
ObservationType = "CHARGE"
Caption = "Zone Credit"
Case "CRE013"
ObservationType = "CHARGE"
Caption = "NGV 3rd Party Credit"
Case "CRE014"
ObservationType = "CHARGE"
Caption = "Direct Access Energy Credit"
Case "CRE015"
ObservationType = "CHARGE"
Caption = "Hourly PX Pricing Optn Energy Cr"
Case "CRE016"
ObservationType = "CHARGE"
Caption = "CTC Exemption Credit"
Case "CRE017"
ObservationType = "CHARGE"
Caption = "Baseline Credit"
Case "CRE018"
ObservationType = "CHARGE"
Caption = "One-Phase Service Credit"
Case "CRE019"
ObservationType = "CHARGE"
Caption = "PX Energy Credit"
Case "CRE020"
ObservationType = "CHARGE"
Caption = "Meter Owner Credit"
Case "CRE021"
ObservationType = "CHARGE"
Caption = "Meter Service Credit"
Case "CRE022"
ObservationType = "CHARGE"
Caption = "Meter Reading Credit"
Case "CRE023"
ObservationType = "CHARGE"
Caption = "Billing and Payment Credit"
Case "DMD000"
Select Case SAC15Code
Case Else
ObservationType = "DEMAND"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Demand"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "DMD001"
ObservationType = "DEMAND"
Caption = "Demand"
Case "DMD002"
ObservationType = "CONTRACTDEMAND"
Caption = "Contract Demand"
Case "DMD003"
ObservationType = "DEMAND"
Caption = "Baseline Demand"
Case "DMD004"
ObservationType = "REACTIVEDEMAND"
Caption = "Reactive Demand"
Case "DMD005"
ObservationType = "DEMAND"
Caption = "Summer Demand"
Case "DMD006"
ObservationType = "OFFPEAKDEM"
Caption = "Off-Peak Demand"
Case "DMD007"
ObservationType = "ONPEAKDEM"
Caption = "On-Peak Demand"
Case "DMD008"
ObservationType = "MIDPEAKDEM"
Caption = "Mid-Peak Demand"
Case "DMD009" ' not sure if this is an adjusted demand or a demand adjustment...
ObservationType = "DEMAND"
Caption = "Demand Adjustment"
Case "DMD010"
ObservationType = "DEMAND"
Caption = "Prior Period Demand"
Case "DMD011"
ObservationType = "OFFPEAKDEM"
Caption = "Summer Off-Peak Demand"
Case "DMD012"
ObservationType = "ONPEAKDEM"
Caption = "Summer On-Peak Demand"
Case "DMD013"
ObservationType = "MIDPEAKDEM"
Caption = "Summer Mid-Peak Demand"
Case "DMD014"
ObservationType = "SUPPEAKDEM"
Caption = "Summer Super On-Peak Demand"
Case "DMD015" ' no valid codes for super off-peak measurements
ObservationType = "OFFPEAKDEM"
Caption = "Summer Super Off-Peak Demand"
Case "DMD016"
ObservationType = "ONPEAKDEM"
Caption = "Winter On-Peak Demand"
Case "DMD017"
ObservationType = "OFFPEAKDEM"
Caption = "Winter Off-Peak Demand"
Case "DMD018"
ObservationType = "MIDPEAKDEM"
Caption = "Winter Mid-Peak Demand"
Case "DMD019" ' no valid codes for super off-peak measurements
ObservationType = "OFFPEAKDEM"
Caption = "Winter Super Off-Peak Demand"
Case "DMD020" ' no specific codes for daytime measurements
ObservationType = "ONPEAKDEM"
Caption = "Summer Daytime Demand"
Case "DMD021" ' no specific codes for nighttime measurements
ObservationType = "OFFPEAKDEM"
Caption = "Summer Nighttime Demand"
Case "DMD022" ' no specific codes for daytime measurements
ObservationType = "ONPEAKDEM"
Caption = "Winter Daytime Demand"
Case "DMD023" ' no specific codes for nighttime measurements
ObservationType = "OFFPEAKDEM"
Caption = "Winter Nighttime Demand"
Case "DMD024"
ObservationType = "DEMAND"
Caption = "Summer Demand"
Case "DMD025"
ObservationType = "DEMAND"
Caption = "Winter Demand"
Case "DMD026" ' no specific codes for daytime measurements
ObservationType = "ONPEAKDEM"
Caption = "Daytime Demand"
Case "DMD027" ' no specific codes for nighttime measurements
ObservationType = "OFFPEAKDEM"
Caption = "Nighttime Demand"
Case "DMD028"
ObservationType = "DEMAND"
Caption = "Demand (Gas)"
Case "DMD029"
ObservationType = "SHDPEAKDEM"
Caption = "Shoulder Demand"
Case "DAB000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Deposit"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "DAB001"
ObservationType = "CHARGE"
Caption = "Deposit"
Case "DAB002"
ObservationType = "CHARGE"
Caption = "Deposit Interest"
Case "DAB003"
ObservationType = "CHARGE"
Caption = "Deposit Applied"
Case "DAB004"
ObservationType = "CHARGE"
Caption = "Deposit Reduction"
Case "DCS000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Disconnect Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "DCS001"
ObservationType = "CHARGE"
Caption = "Disconnect Charge"
Case "DCS002"
ObservationType = "CHARGE"
Caption = "Disconnect Visit Charge"
Case "DCS003"
ObservationType = "CHARGE"
Caption = "Land Owner Disconnect Charge"
Case "DSC000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Discount"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "DSC001"
ObservationType = "CHARGE"
Caption = "Discount"
Case "DSC002"
ObservationType = "CHARGE"
Caption = "Equipment Cycle Discount"
Case "DSC003"
ObservationType = "CHARGE"
Caption = "Rate Limit Discount"
Case "DSC004"
ObservationType = "CHARGE"
Caption = "Economic Development Discount"
Case "DSC005"
ObservationType = "CHARGE"
Caption = "Energy Discount"
Case "DSC006"
ObservationType = "CHARGE"
Caption = "Church Discount"
Case "DSC007"
ObservationType = "CHARGE"
Caption = "Government Service Discount"
Case "DSC008"
ObservationType = "CHARGE"
Caption = "School Discount"
Case "DSC009"
ObservationType = "CHARGE"
Caption = "Energy Assistance Discount"
Case "DSC010"
ObservationType = "CHARGE"
Caption = "Multi-Family Discount"
Case "DSC011"
ObservationType = "CHARGE"
Caption = "Legislated Rate Reduction Discnt"
Case "DSC012"
ObservationType = "CHARGE"
Caption = "Demand Voltage Discount"
Case "DSC013"
ObservationType = "CHARGE"
Caption = "Energy Voltage Discount"
Case "DIS000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Distribution Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "DIS001"
ObservationType = "CHARGE"
Caption = "Distribution Charge"
Case "DIS002"
ObservationType = "CHARGE"
Caption = "Gas Delivery Charge"
Case "DIS003"
ObservationType = "CHARGE"
Caption = "Interstate Transportation Charge"
Case "ENC000"
Select Case SAC15Code
Case Else
ObservationType = "USE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Use"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "ENC001"
ObservationType = "GENERATIONUSE"
Caption = "Generation Use"
Case "ENC002"
ObservationType = "USE"
Caption = "Use Tier"
Case "ENC003"
ObservationType = "OFFPEAKUSE"
Caption = "Off-Peak Use"
Case "ENC004"
ObservationType = "OFFPEAKUSE"
Caption = "Summer Off-Peak Use"
Case "ENC005"
ObservationType = "ONPEAKUSE"
Caption = "Summer On-Peak Use"
Case "ENC006"
ObservationType = "MIDPEAKUSE"
Caption = "Summer Mid-Peak Use"
Case "ENC007"
ObservationType = "SUPPEAKUSE"
Caption = "Summer Super On-Peak Use"
Case "ENC008" ' no valid codes for super off-peak measurements
ObservationType = "OFFPEAKUSE"
Caption = "Summer Super Off-Peak Use"
Case "ENC009"
ObservationType = "ONPEAKUSE"
Caption = "Winter On-Peak Use"
Case "ENC010"
ObservationType = "MIDPEAKUSE"
Caption = "Winter Mid-Peak Use"
Case "ENC011"
ObservationType = "OFFPEAKUSE"
Caption = "Winter Off-Peak Use"
Case "ENC012" ' no valid codes for super off-peak measurements
ObservationType = "OFFPEAKUSE"
Caption = "Winter Super Off-Peak Use"
Case "ENC013" ' no specific codes for daytime measurements
ObservationType = "ONPEAKUSE"
Caption = "Summer Daytime Use"
Case "ENC014" ' no specific codes for nighttime measurements
ObservationType = "OFFPEAKUSE"
Caption = "Summer Nighttime Use"
Case "ENC015" ' no specific codes for daytime measurements
ObservationType = "ONPEAKUSE"
Caption = "Winter Daytime Use"
Case "ENC016" ' no specific codes for nighttime measurements
ObservationType = "OFFPEAKUSE"
Caption = "Winter Nighttime Use"
Case "ENC017"
ObservationType = "USE"
Caption = "Summer Use"
Case "ENC018"
ObservationType = "USE"
Caption = "Winter Use"
Case "ENC019" ' no specific codes for daytime measurements
ObservationType = "USE"
Caption = "Daytime Use"
Case "ENC020" ' no specific codes for nighttime measurements
ObservationType = "USE"
Caption = "Nighttime Use"
Case "ENC021"
ObservationType = "USE"
Caption = "Commodity Charge"
Case "ENC022"
ObservationType = "USE"
Caption = "Interconnect Access Transmit Ch"
Case "ENC023"
ObservationType = "USE"
Caption = "Volume Tier 1 Charge"
Case "ENC024"
ObservationType = "USE"
Caption = "Volume Tier 1 Negotiated Rate"
Case "ENC025"
ObservationType = "USE"
Caption = "Volume Tier 2 Charge"
Case "ENC026"
ObservationType = "USE"
Caption = "Volume Tier 3 Charge"
Case "ENC027"
ObservationType = "USE"
Caption = "Volume G30 Size Cat 1 Charge"
Case "ENC028"
ObservationType = "USE"
Caption = "Volume G30 Size Cat 1 Negot Rate"
Case "ENC029"
ObservationType = "USE"
Caption = "Volume G30 Size Cat 2 Charge"
Case "ENC030"
ObservationType = "USE"
Caption = "Volume G30 Size Cat 2 Negot Rate"
Case "ENC031"
ObservationType = "USE"
Caption = "Volume G30 Size Cat 3 Charge"
Case "ENC032"
ObservationType = "USE"
Caption = "Volume G30 Size Cat 3 Negot Rate"
Case "ENC033"
ObservationType = "USE"
Caption = "Volume G30 Size Cat 4 Charge"
Case "ENC034"
ObservationType = "USE"
Caption = "Volume G30 Size Cat 4 Negot Rate"
Case "ENC035"
ObservationType = "USE"
Caption = "3rd Party Procurement Charge"
Case "ENC036"
ObservationType = "USE"
Caption = "ESP Charge"
Case "ENC037"
ObservationType = "USE"
Caption = "Baseline Energy Charge"
Case "ENC038"
ObservationType = "USE"
Caption = "Above Baseline Energy Charge"
Case "ENC039"
ObservationType = "ONPEAKUSE"
Caption = "On-Peak Use"
Case "ENC040"
ObservationType = "USE"
Caption = "Block 1 Use"
Case "ENC041"
ObservationType = "USE"
Caption = "Block 2 Use"
Case "FAC000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Facility Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "FAC001"
ObservationType = "CHARGE"
Caption = "Equipment and Service Charge"
Case "FAC002"
ObservationType = "CHARGE"
Caption = "Facilities Rental Charge"
Case "FAC003"
ObservationType = "CHARGE"
Caption = "Facilities Installation Charge"
Case "FAC004"
ObservationType = "CHARGE"
Caption = "Facilities Removal Charge"
Case "FFR000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Flat-Rate Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "FFR001"
ObservationType = "CHARGE"
Caption = "Unmetered Service Charge"
Case "FUE000"
Select Case SAC15Code
Case Else
ObservationType = "FUELADJUSTCHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Fuel Adjustment Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "FUE001"
ObservationType = "FUELADJUSTCHARGE"
Caption = "Fuel Adjustment Charge"
Case "FUE002"
ObservationType = "FUELADJUSTCHARGE"
Caption = "On-Peak Fuel Adjustment Charge"
Case "FUE003"
ObservationType = "FUELADJUSTCHARGE"
Caption = "Off-Peak Fuel Adjustment Charge"
Case "FUE004"
ObservationType = "FUELADJUSTCHARGE"
Caption = "In-Kind Fuel Charge"
Case "FUE005"
ObservationType = "FUELADJUSTCHARGE"
Caption = "GITC Interconnect Access Fuel Ch"
Case "GEN000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Generation Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "GEN001" ' don't know if this is use or demand
ObservationType = "GENERATIONUSE"
Caption = "Generation Use"
Case "GEN002" ' don't know if this is use or demand
ObservationType = "GENERATIONUSE"
Caption = "Measured Generation Use"
Case "GEN003" ' don't know if this is use or demand
ObservationType = "GENERATIONUSE"
Caption = "Adjusted Generation Use"
Case "GEN004" ' don't know if this is use or demand
ObservationType = "GENBILLEDUSE"
Caption = "Billed Generation Use"
Case "GEN005" ' don't know if this is use or demand
ObservationType = "GENERATIONUSE"
Caption = "On-Peak Generation Use"
Case "GEN006" ' don't know if this is use or demand
ObservationType = "GENERATIONUSE"
Caption = "Off-Peak Generation Use"
Case "GTC000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Gen/Trans Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "GTC001"
ObservationType = "CHARGE"
Caption = "Gen/Trans Charge"
Case "GTC002"
ObservationType = "CHARGE"
Caption = "Measured Gen/Trans Charge"
Case "GTC003"
ObservationType = "CHARGE"
Caption = "Adjusted Gen/Trans Charge"
Case "GTC004"
ObservationType = "CHARGE"
Caption = "Billed Gen/Trans Charge"
Case "GTC005"
ObservationType = "CHARGE"
Caption = "On-Peak Gen/Trans Charge"
Case "GTC006"
ObservationType = "CHARGE"
Caption = "Off-Peak Gen/Trans Charge"
Case "HOC000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Service Connect Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "HOC001"
ObservationType = "CHARGE"
Caption = "Service Connect Charge"
Case "IBC000"
Select Case SAC15Code
Case Else
ObservationType = "IMBALANCEUSE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Imbalance Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "IBC001"
ObservationType = "IMBALANCEUSE"
Caption = "Core Standby Service Charge"
Case "IBC002"
ObservationType = "IMBALANCEUSE"
Caption = "Non-core Retail Standby Svc Ch"
Case "IBC003"
ObservationType = "IMBALANCEUSE"
Caption = "Wholesale Standby Service Ch"
Case "IBC004"
ObservationType = "IMBALANCEUSE"
Caption = "Core Buyback Charge"
Case "IBC005"
ObservationType = "IMBALANCEUSE"
Caption = "Daily Bal WS Standby Proc Ch"
Case "IBC006"
ObservationType = "IMBALANCEUSE"
Caption = "Non-core Buyback Charge"
Case "IBC007"
ObservationType = "IMBALANCEUSE"
Caption = "Wholesale Buyback"
Case "IBC008"
ObservationType = "IMBALANCEUSE"
Caption = "Retail Buyback"
Case "IBC009"
ObservationType = "IMBALANCEUSE"
Caption = "Daily Bal Core Standby Proc Ch"
Case "IBC010"
ObservationType = "IMBALANCEUSE"
Caption = "Daily Bal N-Core Standby Proc Ch"
Case "IBC011"
ObservationType = "IMBALANCEUSE"
Caption = "Over-Nominations Buyback"
Case "IBC012"
ObservationType = "IMBALANCEUSE"
Caption = "Standby Curtailment Charge"
Case "IBC013"
ObservationType = "IMBALANCEUSE"
Caption = "Curtailment Diversion Credit"
Case "IBC014"
ObservationType = "IMBALANCEUSE"
Caption = "Curtailment Violation Charge"
Case "IBC015"
ObservationType = "IMBALANCEUSE"
Caption = "Op Flow Order Curtail Pd Penalty"
Case "IBC016"
ObservationType = "IMBALANCEUSE"
Caption = "SL2 Surcharge"
Case "IBC017"
ObservationType = "IMBALANCEUSE"
Caption = "SL345 Credit"
Case "INT000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Interest Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "INT001"
ObservationType = "CHARGE"
Caption = "Interest on Sale"
Case "INT002"
ObservationType = "CHARGE"
Caption = "Interest on Loan"
Case "INT003"
ObservationType = "CHARGE"
Caption = "ITC Adjustment Interest"
Case "LAA000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Labor Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "LAA001"
ObservationType = "CHARGE"
Caption = "Billing for Work Done"
Case "LPC000"
Select Case SAC15Code
Case Else
ObservationType = "LATECHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Late Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "LPC001"
ObservationType = "LATECHARGE"
Caption = "Late Payment Charge"
Case "ODL000"
Select Case SAC15Code
Case Else
ObservationType = "USE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Unmetered Lighting"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "ODL001"
ObservationType = "USE"
Caption = "Outdoor Lighting"
Case "ODL002"
ObservationType = "USE"
Caption = "Street Lighting"
Case "ODL003"
ObservationType = "USE"
Caption = "Traffic Signals"
Case "MAD000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Minimum Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "MAD001"
ObservationType = "CHARGE"
Caption = "Minimum Bill"
Case "MAD002"
ObservationType = "CHARGE"
Caption = "Minimum Energy Charge"
Case "MAD003"
ObservationType = "CHARGE"
Caption = "Minimum Contract"
Case "MAD004"
ObservationType = "CHARGE"
Caption = "Minimum Demand Charge"
Case "MSC000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Misc Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "MSC001"
Select Case SAC15Code
Case "LOOP SUBTOTAL" ' do nothing for now - this contains a cost subtotal for all charges in this IT1 loop
ObservationType = ""
Caption = ""
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Misc Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "MSC002"
ObservationType = "CHARGE"
Caption = "Set-time Appointment Charge"
Case "MSC003"
ObservationType = "CHARGE"
Caption = "Meter Seal Replacement Charge"
Case "MSC004"
ObservationType = "CHARGE"
Caption = "Rescheduled Appointment Charge"
Case "MSC005"
ObservationType = "CHARGE"
Caption = "Benefits/Insurance Charge"
Case "MSC006"
ObservationType = "CHARGE"
Caption = "Diversion Gas"
Case "MSC007"
ObservationType = "CHARGE"
Caption = "Property Damage Charge"
Case "MSC008"
ObservationType = "CHARGE"
Caption = "Punitive Damage Charge"
Case "MSC009"
ObservationType = "CHARGE"
Caption = "Preferred Due Date Setup Fee"
Case "MSC010"
ObservationType = "CHARGE"
Caption = "Select Read Cycle Monthly Fee"
Case "MSC011"
ObservationType = "CHARGE"
Caption = "Wrap and Strap Charge"
Case "MSC012"
ObservationType = "CHARGE"
Caption = "Water Heater Strapping Charge"
Case "MSC013"
ObservationType = "CHARGE"
Caption = "Water Heater Wrapping Charge"
Case "MSC014"
ObservationType = "CHARGE"
Caption = "Appliance Connection Charge"
Case "MSC015"
ObservationType = "CHARGE"
Caption = "Injection O&M Charge"
Case "MSC016"
ObservationType = "CHARGE"
Caption = "Storage Procurement Charge"
Case "MSC017"
ObservationType = "CHARGE"
Caption = "Storage Transmission Charge"
Case "MSC018"
ObservationType = "CHARGE"
Caption = "Withdrawal O&M Charge"
Case "MSC019"
ObservationType = "CHARGE"
Caption = "Base EBB Charge"
Case "MSC020"
ObservationType = "CHARGE"
Caption = "Manual Imbalance Processing Fee"
Case "MSC021"
ObservationType = "CHARGE"
Caption = "EBB Use Charge"
Case "MSC022"
ObservationType = "CHARGE"
Caption = "Competition Transition Charge"
Case "MSC023"
ObservationType = "CHARGE"
Caption = "Trust Transfer Amount"
Case "MSC024"
ObservationType = "CHARGE"
Caption = "Public Purpose Program"
Case "MSC025"
ObservationType = "CHARGE"
Caption = "Nuclear Decommissioning Charge"
Case "MSC026"
ObservationType = "CHARGE"
Caption = "Interruptible Penalty Charge"
Case "PAY000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Payment Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "PAY001"
ObservationType = "CHARGE"
Caption = "Payment Plan Amount"
Case "PAY002"
ObservationType = "CHARGE"
Caption = "Payment Plan Settlement"
Case "PRB000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Prior Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "PRB001"
ObservationType = "CHARGE"
Caption = "Past Due Balance"
Case "PRB002"
ObservationType = "CHARGE"
Caption = "Unpaid Balance"
Case "PFA000"
Select Case SAC15Code
Case Else
ObservationType = "POWERFACTOR"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Power Factor Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "PFA001"
Value = CDbl(ToNumber(Seg.FindElement("7").Value)) ' value is in element 7
ValueUnitCode = "PERCENT" ' couldn't tell correct unit from SAC09 because it wasn't supplied
ObservationType = "POWERFACTOR"
Caption = "Power Factor Adjustment"
Case "PFA002"
Value = CDbl(ToNumber(Seg.FindElement("7").Value)) ' value is in element 7
ValueUnitCode = "PERCENT" ' couldn't tell correct unit from SAC09 because it wasn't supplied
ObservationType = "POWERFACTOR"
Caption = "Winter Power Factor Adjustment"
Case "PFA003"
Value = CDbl(ToNumber(Seg.FindElement("7").Value)) ' value is in element 7
ValueUnitCode = "PERCENT" ' couldn't tell correct unit from SAC09 because it wasn't supplied
ObservationType = "POWERFACTOR"
Caption = "Summer Power Factor Adjustment"
Case "RSC000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Reconnect Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "RSC001"
ObservationType = "CHARGE"
Caption = "Reconnect Charge"
Case "RRR000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Regulatory Refund"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "RRR001"
ObservationType = "CHARGE"
Caption = "State/Intrastate Refund"
Case "RRR002"
ObservationType = "CHARGE"
Caption = "Local Refund"
Case "RRR003"
ObservationType = "CHARGE"
Caption = "Municipal Refund"
Case "RRR004"
ObservationType = "CHARGE"
Caption = "Federal/Interstate Refund"
Case "RRR005"
ObservationType = "CHARGE"
Caption = "Targeted Sales Refund"
Case "RRR006"
ObservationType = "CHARGE"
Caption = "Reg Commission Mandated Refund"
Case "RRR007"
ObservationType = "CHARGE"
Caption = "Interest on Refund"
Case "RES000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Reservation Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "RES001"
ObservationType = "CHARGE"
Caption = "Core Subscription Reserve Charge"
Case "RES002"
ObservationType = "CHARGE"
Caption = "Core Subscr Reserve Charge Adj"
Case "RES003"
ObservationType = "CHARGE"
Caption = "Injection Reservation Charge"
Case "RES004"
ObservationType = "CHARGE"
Caption = "Withdrawal Reservation Charge"
Case "RES005"
ObservationType = "CHARGE"
Caption = "Inventory Reservation Charge"
Case "RES006"
ObservationType = "CHARGE"
Caption = "Storage Reserve Charge Prepaymnt"
Case "RES007"
ObservationType = "CHARGE"
Caption = "Interconnect Assess Firm Res Ch"
Case "RES008"
ObservationType = "CHARGE"
Caption = "ITC Reservation Charge"
Case "RTC000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Return Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "RTC001"
ObservationType = "CHARGE"
Caption = "Return Check Fee"
Case "RTC002"
ObservationType = "CHARGE"
Caption = "Return Check Amount"
Case "SMD000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Sales/Merchandise Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "SMD001"
ObservationType = "CHARGE"
Caption = "Appliance Contract Installment"
Case "SMD002"
ObservationType = "CHARGE"
Caption = "Cash Sales/Stores Purchase"
Case "SMD003"
ObservationType = "CHARGE"
Caption = "Comm Heat Pump/Water Heater Ch"
Case "SMD004"
ObservationType = "CHARGE"
Caption = "Contract Installment"
Case "SMD005"
ObservationType = "CHARGE"
Caption = "Grain Drying Service Charge"
Case "SMD006"
ObservationType = "CHARGE"
Caption = "Heat Pump/Comm Equip Charge"
Case "SMD007"
ObservationType = "CHARGE"
Caption = "Heat Pump Installment Charge"
Case "SMD008"
ObservationType = "CHARGE"
Caption = "Home Wiring Inspection Charge"
Case "SMD009"
ObservationType = "CHARGE"
Caption = "Delinquent Merchandise Chargeoff"
Case "SMD010"
ObservationType = "CHARGE"
Caption = "Miscellaneous Materials Charge"
Case "SMD011"
ObservationType = "CHARGE"
Caption = "Other Services/Merch Charge"
Case "SMD012"
ObservationType = "CHARGE"
Caption = "Power Protection Equip Charge"
Case "SMD013"
ObservationType = "CHARGE"
Caption = "Purchased Parts Charge"
Case "SMD014"
ObservationType = "CHARGE"
Caption = "Meter Installation Charge"
Case "SMD015"
ObservationType = "CHARGE"
Caption = "Meter Maintenance/Repair Charge"
Case "SMD016"
ObservationType = "CHARGE"
Caption = "Meter Read Charge"
Case "SMD017"
ObservationType = "CHARGE"
Caption = "Meter Removal Charge"
Case "SMD018"
ObservationType = "CHARGE"
Caption = "Other Meter Services"
Case "SMD019"
ObservationType = "CHARGE"
Caption = "Special Meter Read Charge"
Case "SMD020"
ObservationType = "CHARGE"
Caption = "Meter Changeout Charge"
Case "SUR000"
Select Case SAC15Code
Case "ELECTRIC EMERGENCY PROCUREMENT SURCHARGE"
ObservationType = "CHARGE"
Caption = "Emergency Procurement Charge"
Case "ENERGY SURCHARGE: 131% - 200% OF BASELINE"
ObservationType = "CHARGE"
Caption = "Excess Use Charge (131%-200%)"
Case "ENERGY SURCHARGE: 201% - 300% OF BASELINE"
ObservationType = "CHARGE"
Caption = "Excess Use Charge (201%-300%)"
Case "ENERGY SURCHARGE: OVER 300% OF BASELINE"
ObservationType = "CHARGE"
Caption = "Excess Use Charge (>300%)"
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Surcharge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "SUR001"
ObservationType = "CHARGE"
Caption = "State/Intrastate Surcharge"
Case "SUR002"
ObservationType = "CHARGE"
Caption = "Local Surcharge"
Case "SUR003"
ObservationType = "CHARGE"
Caption = "Federal/Interstate Surcharge"
Case "SUR004"
ObservationType = "CHARGE"
Caption = "Mobile Home Park Surcharge"
Case "SUR005"
ObservationType = "CHARGE"
Caption = "Imputed Transportation Charge"
Case "SUR006"
ObservationType = "CHARGE"
Caption = "GITC Interconnect Cost Surch"
Case "SUR007"
ObservationType = "CHARGE"
Caption = "Low Income Surcharge"
Case "SUR008"
ObservationType = "CHARGE"
Caption = "Interstate Transition Cost Surch"
Case "SUR009"
ObservationType = "CHARGE"
Caption = "Interstate Transition Surch Cr"
Case "TEM000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Surcharge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "TEM001"
ObservationType = "CHARGE"
Caption = "Temporary Service Charge"
Case "TPI000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown 3rd Party Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "TPI001"
ObservationType = "CHARGE"
Caption = "Utility-Initiated Line Item"
Case "TPI002"
ObservationType = "CHARGE"
Caption = "ESP-Initiated Line Item"
Case "TRS000"
Select Case SAC15Code
Case "TRANSFER DEBIT"
ObservationType = "CHARGE"
Caption = "Transfer Debit"
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Transfer Amount"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "TRS001"
ObservationType = "CHARGE"
Caption = "Transfer From Other Account"
Case "TRS002"
ObservationType = "CHARGE"
Caption = "Transfer To Deposit Amount"
Case "TRN000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Transmission Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "TRN001"
ObservationType = "CHARGE"
Caption = "Transmission Charge"
Case "VOC000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Voltage Charge"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "VOC001" ' this code is supposed to be obsolete
ObservationType = "CHARGE"
Caption = "Demand Voltage Discount"
Case "VOC002" ' this code is supposed to be obsolete
ObservationType = "CHARGE"
Caption = "Energy Voltage Discount"
Case "VOC003"
ObservationType = "CHARGE"
Caption = "General Primary Voltage Charge"
Case "VOC004"
ObservationType = "CHARGE"
Caption = "General Secondary Voltage Charge"
Case "VCR000"
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Contribution"
End If
Caption = UCase(Caption) ' make it stand out on screen
End Select
Case "VCR001"
ObservationType = "CHARGE"
Caption = "Charitable Contribution"
Case Else ' any other code is an unknown
Select Case SAC15Code
Case Else
ObservationType = "CHARGE"
If (Len(SAC15Code) > 0) Then
Caption = SAC15Code
Else
Caption = "Unknown Charge"
End If
End Select
Caption = UCase(Caption) ' make it stand out on screen
End Select
End Sub
Sub GetTXIObsTypeAndCaption(Seg, ObservationType, ValueUnitCode, Value, Caption)
Select Case Seg.FindElement("1").Value
Case "CA"
ObservationType = "CITYTAX"
Caption = "City Tax"
Case "ET" ' some kind of energy tax; just use generic tax code
ObservationType = "TAX"
Caption = "Energy Comm. Tax"
Case "MP"
ObservationType = "MUNICIPALTAX"
Caption = "Municipal Tax"
Case Else ' don't know what kind of taxes to expect, so just make a general tax line
ObservationType = "TAX"
Caption = "Unknown Tax"
Caption = UCase(Caption) ' make it stand out on screen
End Select
End Sub
Sub GetMEAObsTypeAndCaption(Seg, ObservationType, ValueUnitCode, Value, Caption)
Select Case Seg.FindElement("4").Value
Case "KH"
ValueUnitCode = "KWH"
Case "K1"
ValueUnitCode = "KW"
Case "K3"
ValueUnitCode = "KVARH"
Case "TD"
ValueUnitCode = "THERM"
Case Else ' don't know what unit to assign if not one of the codes above
ValueUnitCode = ""
End Select
Select Case Seg.FindElement("7").Value
Case "41"
Select Case ValueUnitCode
Case "KWH"
ObservationType = "OFFPEAKUSE"
Caption = "Off-Peak Distribution Use"
Case "KW"
ObservationType = "OFFPEAKDEM"
Caption = "Off-Peak Distribution Demand"
Case "KVARH"
ObservationType = "OFFPKREACTIVEUSE"
Caption = "Off-Peak Reactive Use"
Case Else ' don't know what type of measurement
ObservationType = ""
Caption = ""
End Select
Case "42"
Select Case ValueUnitCode
Case "KWH"
ObservationType = "ONPEAKUSE"
Caption = "On-Peak Distribution Use"
Case "KW"
ObservationType = "ONPEAKDEM"
Caption = "On-Peak Distribution Demand"
Case "KVARH"
ObservationType = "ONPKREACTIVEUSE"
Caption = "On-Peak Reactive Use"
Case Else ' don't know what type of measurement
ObservationType = ""
Caption = ""
End Select
Case "43"
Select Case ValueUnitCode
Case "KWH"
ObservationType = "MIDPEAKUSE"
Caption = "Mid-Peak Distribution Use"
Case "KW"
ObservationType = "MIDPEAKDEM"
Caption = "Mid-Peak Distribution Demand"
Case "KVARH"
ObservationType = "MIDPKREACTIVEUSE"
Caption = "Mid-Peak Reactive Use"
Case Else ' don't know what type of measurement
ObservationType = ""
Caption = ""
End Select
Case "45"
Select Case ValueUnitCode
Case "KWH"
ObservationType = "ONPEAKUSE"
Caption = "Summer On-Peak Distribution Use"
Case "KW"
ObservationType = "ONPEAKDEM"
Caption = "Summer On-Peak Distribution Dem"
Case "KVARH"
ObservationType = "ONPKREACTIVEUSE"
Caption = "Summer On-Peak Reactive Use"
Case Else ' don't know what type of measurement
ObservationType = ""
Caption = ""
End Select
Case "49"
Select Case ValueUnitCode
Case "KWH"
ObservationType = "ONPEAKUSE"
Caption = "Winter On-Peak Distribution Use"
Case "KW"
ObservationType = "ONPEAKDEM"
Caption = "Winter On-Peak Distribution Dem"
Case "KVARH"
ObservationType = "ONPKREACTIVEUSE"
Caption = "Winter On-Peak Reactive Use"
Case Else ' don't know what type of measurement
ObservationType = ""
Caption = ""
End Select
Case "50"
Select Case ValueUnitCode
Case "KWH"
ObservationType = "MIDPEAKUSE"
Caption = "Witner Mid-Peak Distribution Use"
Case "KW"
ObservationType = "MIDPEAKDEM"
Caption = "Witner Mid-Peak Distribution Dem"
Case "KVARH"
ObservationType = "MIDPKREACTIVEUSE"
Caption = "Witner Mid-Peak Reactive Use"
Case Else ' don't know what type of measurement
ObservationType = ""
Caption = ""
End Select
Case "51"
Select Case ValueUnitCode
Case "KWH"
ObservationType = "USE"
Caption = "Distribution Use"
Case "KW"
ObservationType = "DEMAND"
Caption = "Distribution Demand"
Case "KVARH"
ObservationType = "REACTIVEUSE"
Caption = "Reactive Use"
Case Else ' don't know what type of measurement
ObservationType = ""
Caption = ""
End Select
Case "73"
Select Case ValueUnitCode
Case "KWH"
ObservationType = "OFFPEAKUSE"
Caption = "Summer Off-Peak Distribution Use"
Case "KW"
ObservationType = "OFFPEAKDEM"
Caption = "Summer Off-Peak Distribution Dem"
Case "KVARH"
ObservationType = "OFFPKREACTIVEUSE"
Caption = "Summer Off-Peak Reactive Use"
Case Else ' don't know what type of measurement
ObservationType = ""
Caption = ""
End Select
Case "74"
Select Case ValueUnitCode
Case "KWH"
ObservationType = "MIDPEAKUSE"
Caption = "Summer Mid-Peak Distribution Use"
Case "KW"
ObservationType = "MIDPEAKDEM"
Caption = "Summer Mid-Peak Distribution Dem"
Case "KVARH"
ObservationType = "MIDPKREACTIVEUSE"
Caption = "Summer Mid-Peak Reactive Use"
Case Else ' don't know what type of measurement
ObservationType = ""
Caption = ""
End Select
Case "75"
Select Case ValueUnitCode
Case "KWH"
ObservationType = "OFFPEAKUSE"
Caption = "Winter Off-Peak Distribution Use"
Case "KW"
ObservationType = "OFFPEAKDEM"
Caption = "Winter Off-Peak Distribution Dem"
Case "KVARH"
ObservationType = "OFFPKREACTIVEUSE"
Caption = "Winter Off-Peak Reactive Use"
Case Else ' don't know what type of measurement
ObservationType = ""
Caption = ""
End Select
Case Else ' don't know what unit to assign if not one of the codes above
ObservationType = ""
Caption = ""
End Select
End Sub
' -- End Utility Subroutines --
EnergyCAP provides two methods for importing billing data into the EnergyCAP database using a flat file format.
This topic describes the import process from the EnergyCAP Work Flow Manager. For more detailed information on flat file preparation than is provided in this topic (including acceptable data formats, observation pairings, etc.), see the topic on bill import rules and options.
The actual bill import is part of an import process that may vary from organization to organization, but will generally include all or most of the following steps:
Below, each of these steps are explained in more detail.
REQUIRED file information/formats:
For additional information, see the topic on import rules and options.


After the import, check for problem bills from the batch in the Bill Import Processor Problem folder. 
Bills appearing there should be edited and then re-imported (see next step).



Click here for an example Excel file with some common errors.
Typically, each line in the file will be for an Account-Bill Start Date-Meter group. Sort Order must be:
The Account Code cannot be NULL.
Any other value, or no value, is interpreted as if it were an "A."
| AccountCode | STARTDATE | ENDDATE | ACE | MeterCode |
| 123456-1 | 20071201 | 20071231 | A | !AUTO! |
In the above example, the importer will look for the meter on account 123456-1. If it has JUST ONE METER, then the importer will assign all charges in this row to that meter. If it has more than one meter, then it will not import the row.
| AccountCode | Start Date | End Date | ACE | MeterCode |
| 123456-1 | 20071201 | 20071231 | A | !AUTO!:ELECTRIC |
In the above example, the importer will look for the ELECTRIC meter on account 123456-1. If it has JUST ONE METER, then the importer will assign all charges in this row to that meter. If it has more than one ELECTRIC meter, then it will not import the row.
To view the commodities in EnergyCAP, click Tools > Unit System

The full list of available commodities can be see from the Commodities tab in the Unit System Editor window.
Typically, each line in the file will be for an Account-Bill Start Date-Meter group. Thus, the file should be sorted by ascending Account Code, ascending Vendor Code (if included), ascending Start Date, ascending End Date.
The headers for the first five columns described above (Account code, start date, end date, actual/estimated, meter code) are mandatory columns. Every column after meter code is optional and therefore the column heading is what defines the column contents. These column headings must be in ALL CAPS except for the CAPTION portion.
Example of Bodylines in a Bill
To achieve the above results, the import file should be formatted in the following manner (Note: the first five columns have been removed from this example):
| USE:KWH | USE:USDOLLARS | DEMAND:KW | ONPKDEMAND:KW | ONPKUSE:KWH | OFFPKDEMAND:KW | ONPKDEMAND:KW |
| 10880 | 705.52 | 30 | 0 | 0 | 0 | 0 |
Since each row represents charges for a specific meter on a specific account, there will be occurrences where the row of data will not have values for some columns (ex. You have water and electric on a particular account. The OBSERVATION TYPE:UNIT:CAPTION for water will be different than the electric - and so you need to just put values in the columns corresponding to that row’s meter).
The "OBSERVATION TYPE:UNIT:CAPTION" pair can appear multiple times in each row. It is valid to define multiple Value, Cost, or Value immediately followed by Cost fields in the file header. For example, a file containing data for accounts with Electric Use and Cost, Electric Demand and Cost, and Natural Gas Use and Cost would have a header record of: "USE:KWH", "USE:USDOLLARS", "BILLEDDEMAND:KW", "BILLEDDEMAND:USDOLLARS", "USE:CCF", "USE:USDOLLARS". The body lines for Electric Use/Cost and Demand/Cost are expected to be associated with an electric meter and the body lines for Natural Gas Use/Cost are expected to be associated with a natural gas meter. The Natural Gas Use/Cost fields should not be populated in the electric meter line and vice versa.
To obtain bills with both Value and Cost entries on a single body line, you must enter the value first and immediately follow it with the cost. For example, a body line with usage in KWH and a cost in dollars would need the columns to be defined as "USE:KWH", "USE:USDOLLARS". ! Beginning with Release 6.0, NO NULLS are permitted in any observation type pair (such as USE/USE)! If a NULL is present, the record will not be imported and an error will be generated. !
If two consecutive columns have the same OBSERVATION TYPE, and the second column has a UNIT of cost, a single line item is created on the bill using both the value and the cost. For example, consecutive columns of "USE:KWH", "USE:USDOLLARS" will result in a single line on the bill having KWH and Cost (in US Dollars).
To obtain bills with a Cost Only body line, use one of the NOUN observation types that are associated with MONEY (Charge, SubtotalCost, Tax, etc.). For example, "CHARGE:USDOLLARS".
Example:
In this example, the consecutive columns share the same observation type of USE. Since the first column reflects the UOM of KWH and the second column shows a UOM of USDOLLARS (which is associated with MONEY).
| USE:KWH | USE:USDOLLARS |
| 10880 | 705.52 |
This will produce a single line in the bill view.

To import bills with a Value Only body line, use any of the NOUN observation types that are NOT associated with MONEY. For example, "DEMAND:KW".
This screenshot shows bodylines (underlined in red) which are Value Only.
Normally, the caption (the text label shown on the left side of the bill entry screen for each line item on a bill) is set equal to the observation type display name. You can set your own captions by making a third entry in the heading. Example: "USE:KWH:ON PEAK TIER 1 USAGE" is the column heading to insert the desired bill bodyline heading. The caption cannot have a colon in it. If you choose to use a caption in situations such as USE:KWH and USE:COST, you want to specify a caption JUST FOR THE FIRST ITEM IN THE PAIR, and not the second. So in the example, this is the correct way to modify the caption and still end up with the information being represented in the bill as one line and not two:
Correct: USE:KWH:Electric Usage and USE:USDOLLARS
Incorrect: USE:KWH:Electric Usage and USE:USDOLLARS:Electric Usage
The "PAYAMOUNT:USDOLLARS" column specifies the pay amount for the bill. In earlier versions of EnerygCAP, if this column was not included in the import file, the bill pay amount would be the sum of all costs of all bodylines on the bill subject to the rules indicated in the Unit System for each observation type specified. If PayAmount is included, but the sum of the charges on the bill calculated to a different total, the bill was saved but with a + or - balance. This was not good. Therefore, beginning with Release 6.0, the PayAmount column is simply ignored by the Importer. This assures that all imported bills will balance.
IMPORTANT: It is HIGHLY recommended to add an additional column called ‘*EndOfRecord’, that will be ignored in the import, so that the last column of every row in the import file has a value in it. The value for that column can be anything, but is generally set to the letter ‘X’. Again, this data is NOT imported to EC, but is used to indicate to the import utility that there are no further values to be processed in the current row and to proceed with the next row in the import file. Every row in the import file should have a value of ‘X’ in this column.
Example Header:
ACCOUNT, STARTDATE, ENDDATE, ACE, METER, USE:KWH, USE:COST, *END_OF_RECORD_MARKER
The * in the column header ‘*END_OF_RECORD_MARKER’ tells the importer to ignore the contents of this column. It is then recommended to give every row in the import file a value of ‘X’ for this column. In that way each row is terminated and will be ensured to process correctly.
WHEN IN DOUBT, be CONSERVATIVE and EXPLICIT and test a sample of the file format with a small number of records.
Any column that has a header which begins with an * will be ignored. This allows you to minimize the reformatting of non-comforming spreadsheets by simply ignoring non-conforming columns. See Pay Amount section for another suggestion of how this can be used.
This is a list of optional fields which can be used in the bill import process. These fields can provide additional information for a bill that may be useful or necessary information for specific data needs.
In the event that a file aborts partially through processing, the bills which have been successfully entered will remain in EnergyCAP Enterprise. As long as the file does not contain Corrected "C" records, it can be corrected and processed again. If the file does contain Corrected "C" records and it is processed again, additional bills for the "C" records will be created and manual steps will need to be taken to remove/prevent duplicate bills from causing difficulties. As an alternative to this, rows that generated errors can be re-imported through the Bill Reimport Processor which is available from within Workflow Manager.
Example: The problems listed in the Bill Import Processor folder are eligible for re-import by using the Bill Reimport Processor. Unless the issues indicated in the Message column are addressed, the bills will not import successfully.

To run the Bill Reimport Processor, navigate to the Account Manager in EnergyCAP (Accounting/Accounts)and click Tools/Processor/Bill Reimport.

The Bill Reimport window will open. Click the Start button to initiate the Reimport. When done click Close.
After bills are imported into EnergyCAP, they are given a status of Unverified. In order for a bill to be eligible for export, it must have a status of Verified. To verify bills you have imported, go to Work Flow Manager and verify bills contained in the Waiting to Verify folder.
The import results are reported in an on-screen log. You can save or print this log in order to maintain a record. Additionally, any issues logged will be viewable from within Work Flow Manager in the Bill Import Problem folder.
Bill Import external to EnergyCAP using the imptsk.exe program
It is also possible to import bills from the command line. See also the topic on External Tasks. Here is an example and explanation of each element:
The usage is:
imptsk -d [dsn] -u [user] -p [pwd] -c [converter] -f [path] -x -a [path] -l [path] -s [section] -v [verbose messages] -remote -t [traceID]
Where:
Usage Example:
"c:\Program Files\EnergyCAP Enterprise\imptsk.exe" -d retailer -u kvs -p kvs -c STANDARD:HISTORICAL_BILL_IMPORT -f "c:\b-test\*.csv" -l "log.txt"
The Bill Import Processor in EnergyCAP contains intelligence logic that enables processing of multiple records in a single bill. However, when there are import problems, EnergyCAP stores the problem records independently of one another in the Bill Import Processor Problem folder. This can cause problems with some accounting system workflows when the problem records are RE-IMPORTED because the Re-import Processor has no built-in logic to distinguish which of the independent records should be included in the re-imported bill. That is, what was one bill in the original import can become two or more bills in the re-import process. Future releases of EnergyCAP will enhance the logic of the Import Processor and the Re-import Processor. For the time being, the following work-around is recommended:
The example below presents two kickouts, each with a header row and a data row:

To join the records, copy the data row from Kickout #2 to the data row of the ‘master’ kickout record for the multi-record bill. Then delete Kickout #2. Repeat the process for any additional kickout records bearing the same account number and start/end dates. In the examples below, the data was corrected in the kickout record (in this case, the account code ‘test2’ was changed to ‘test1’ which is an existing account):

After correcting the kickout records, re-import bills using the Re-Import Processor:


About 50% of EnergyCAP Enterprise clients export billing data to their organization Accounts Payable or General Ledger system. The specific process and necessary software tools can be developed during software implementation. First, the information is entered or received into EnergyCAP. EnergyCAP audits the bills for billing errors, flags the issues and then passes the bills onto a supervisor for approval. When approved, the billing data is exported to the AP/GL system for payment. Once the AP/GL system pays the bills, information such as payment date, check number, etc can be imported back into EnergyCAP. The result is a complete bill record.
There are several advantages to doing business this way:
EnergyCAP can export to any AP/GL system. The company has extensive experience mapping data to and from a variety of different accounting systems. Typically, EnergyCAP exports to an intermediary file. A custom application reformats the EnergyCAP data to fit the AP/GL system and then imports to the system. When bringing data into EnergyCAP from the AP/GL system, the process is the same. This method ensures EnergyCAP’s compatibility with any system and at the same time protects the AP/GL system’s security and integrity.
NOTE: Bill Export and Import for AP/GL integration is a customized process for each organization. For pricing and implementation details, and/or a list of the applications interfaced with to date, contact EnergyCAP sales at sales@energycap.com.
See also—Exporting Bills from EnergyCAP to an AP/GL System.
Billing data can be exported from the EnergyCAP® database to a user-selected file type. The following file formats are supported:
The bill export procedure involves defining and/or selecting an export Profile which specifies precisely what data will be exported and the format of the file. The bill export Profile includes a topmost Cost Center filter, as well as options for selecting which accounts and/or billing dates will be included in the export. The exported file can then be imported to the client A/P system, manipulated in a spreadsheet program for energy analysis, and/or used for reporting or other purposes. For most EnergyCAP clients, the export process is defined and all details finalized during software implementation.
There are two export streams in EnergyCAP; these export options offer additional flexibility for integration into an organization’s accounting structure:
There are also two ways to initiate bill export:
The advantage of the export task is that it can be run independently of the EnergyCAP program, even as a ‘scheduled task’ in Windows®, using a previously-defined export profile. For more information about this procedure, see the topic on External Tasks.
The advantage of using the Bill Export window/wizard is that the bill export profile can be defined and/or modified. Follow the procedure below to define an export profile and export billing data from the EnergyCAP program.






The bill export process is complete.
This advanced topic provides guidance in constructing a visual basic script that can be automatically executed as a Windows Scheduled task. This script example runs the bill exporter (exports everything that's in the Waiting to A/P Export folder in Work Flow Manager) and locates it in a folder called D:\UtilBill\Out. The file is named AP_ECAP_EXPORT.csv. The export "map" (called the billexp.ini profile) is named BILLEXPORT.
The A/P import process must obtain the AP_ECAP_EXPORT.csv file from the AP_folder.
"ecap" is the datasource name (the name of the ODBC connection)
"apexport" is the user name and user password of a user set up just for exporting purposes. This user can have only one permission - Other Settings/Export.
________________________________
Option Explicit
Dim objFSO, myshell, export_folder, archive_folder, AP_folder, strFilename, strDate, strTime, strDateTime, EnergyCAP_APExport, strECEProgramDirectory
export_folder = "d:\utilbill\out\temp\" 'The folder for the file to be exported
AP_folder = "d:\utilbill\out\" 'The folder where A/P will grab the data
archive_folder = "d:\utilbill\out\archive\" 'The folder where the file is to be archived
strFilename = "AP_ECAP_Export" 'Name of the file to be created by EnergyCAP
strDate = Cstr(Year(date) & "-" & MonthName(month(date)) & "-" & Day(date)) 'Just the date in format YYYY-MON-DD
strTime = Cstr(FormatDateTime(Now(),vbLongTime)) 'Just the time in format HH:MM:SS AM/PM
strTime = Replace (strTime, ":",".",1,-1,vbTextCompare) 'Time is formatted to be HH.MM.SS AM/PM
strDateTime = strDate & "_" & strTime 'Date and time are strung together
EnergyCAP_APExport = "exptsk -d ""ecap"" -u apexport -p apexport -c STANDARD:BILL_TEXT -f """& export_folder & strFilename & ".csv"" -s ""BillExport""" 'This is the command line to execute the AP exporter - note the various parts of the command line and change where necessary
strECEProgramDirectory = "c:\program files\energycap enterprise\" 'Install location of EnergyCAP - the location of the exptsk.exe utility on the applications server
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set myshell = WScript.CreateObject("WScript.Shell")
if(objFSO.FileExists(export_folder & strFilename & ".csv")) then 'Looks in the dir to see if any files exist
objFSO.DeleteFile export_folder & strFilename & ".csv", "True"
end if
if(objFSO.FileExists(etl_folder & strFilename & ".csv")) then 'Looks in the dir to see if any files exist
objFSO.DeleteFile etl_folder & strFilename & ".csv", "True"
end if
myshell.CurrentDirectory = strECEProgramDirectory 'Sets the working directory to be the location where EnergyCAP is installed
myshell.Run EnergyCAP_APExport, 1, True 'Executes the AP Exporter
if(objFSO.FileExists(export_folder & strFilename & ".csv")) then 'Looks in the dir to see if any files exist
objFSO.CopyFile export_folder & strFilename & ".csv", archive_folder & strFilename & "_" & strDateTime & ".csv", "True" 'Archives the csv file created by EnergyCAP
objFSO.CopyFile export_folder & strFilename & ".csv", AP_folder & strFilename & ".csv", "True" 'readies the csv file created by EnergyCAP for AP
end if
if(objFSO.FileExists(export_folder & strFilename & ".csv")) then 'Cleans out any files left from the AP Export task
objFSO.DeleteFile export_folder & strFilename & ".csv", "True"
end if
There is no way to remove an unwanted export profile using the EnergyCAP software. However, the profile can be deleted by externally editing the billexp.ini file by hand.
! CAUTION: Be sure to make a backup of the billexp.ini file before editing it because if you accidentally delete the profile you want to keep you won't be able to recover it!
In a default EnergyCAP installation, the file is located in the following directory:
C:\Documents and Settings\your_user_name\Local Settings\Application Data\EnergyCAP Enterprise
The text document is organized in multiple sections. There will be a section for each profile, headed by the profile name in brackets, and ending with the MergeSelections= statement. Just delete the unwanted section and save the edited file to the same name and location.
Last Revised: EnergyCAP Release and Database Version: EnergyCAP Enterprise 6.2.64.130 [DB 64]
This document lists and describes all exportable AP fields and (if applicable) their field names in the EnergyCAP Enterprise database (assuming the database version mentioned above). This document will be helpful in developing specifications and processes for sharing EnergyCAP information with accounting (AP/GL) interfaces.
This topic does not provide details of the EnergyCAP bill export process. To learn more about exporting bill data, see Bill Export Detail and Process .
During the export setup, the user may select which lines of data to export. Best practices as of 4Q 2011 dictate that AT MINIMUM, the Bill summary, Account summary, Meter summary, G/L summary, and Bill Line summary should be selected for export. The individual fields within each of these lines may be chosen at the Project Manager’s discretion.

String Literals are used to clearly identify individual lines of the export file. Best practices dictate that for EVERY line type used for bill export, a string “literal” field should be added to the output fields to identify the line type for any AP interface. This is done during export profile definition using the EnergyCAP export interface:

At minimum, the string literal must contain the letter “L” plus a number (0-6), depending upon the line type. Also, the string literal MUST be the FIRST field, in order, from top to bottom. The string literal should contain the [abbreviation] and full name of the line type. Custom also dictates that an “@” character is added to the END of the string literal. Customarily, each string literal will contain the name of the output line with which it is associated.
Below is an example demonstrating how to create and insert the string literal for the Bill Header line of the export profile during profile definition:

The Bill Header line appears ONCE at the top of a given export file. It contains highest-level summary information about the bills contained in the file.

| Field Name | Database Field | Field Description | Sample Value |
| Current date | N/A | This is the date that the export file is generated. | 01/10/2012 |
| Current time | N/A |
This is the time that the export file is generated . |
03:45:16 |
| Number of bills | N/A | This is the number of bills written to the export file. | 9 |
| Total debits | N/A | This is the total cost of all debits in the export file. | $0.00 |
| Total credits | N/A | This is the total cost of all credits in the export file. | $31152.79 |
| Total amount | N/A | This is the sum of the Bill.TotalCost amounts for all the bills in the export file. | $31152.79 |
Bill Summary lines appear ONCE per bill. They contain high-level summary information about a particular bill.

| Field Name | Database Field | Field Description | Sample Value |
| Bill ID | Bill.billID | This is the unique ID number assigned to each bill. | 1024 |
| Cost center | CostCenter.costCenterInfo | This is the display name of the Cost Center containing the Account associated with this bill. | My Cost Center |
| Cost center code | CostCenter.costCenterCode | This is the unique code of the Cost Center containing the Account associated with this bill. | MYCOSTCENTER |
| Parent cost center | CostCenterParentChildView.costCenterInfo | This is the display name of the Cost Center containing the Cost Center associated with the Account associated with this bill. | Parent Cost Center |
| Parent cost center code | CostCenterParentChildView.costCenterCode | This is the unique code of the Cost Center containing the Cost Center associated with the Account associated with this bill. |
PARENTCC |
| Account | Account.accountCode | This is the unique account code of the Account associated with this bill. | 66661 |
| Start date | Bill.beginDate | This is the begin date of the time period covered by the bill. | 01/10/2012 |
| End date | Bill.endDate | This is the end date of the time period covered by the bill. | 02/09/2012 |
| Exported | Bill.exported | This is the flag to show whether or not the bill has been exported. | 0 |
| Exported date | Bill.exportDate | This is the date upon which the bill has been exported. If the bill has never been exported, this field will contain the value “<none>”. |
<none> |
| Total cost | Bill.totalCost |
This is the total cost of all charges on the bill | $150.00 |
| Vendor |
Vendor.vendorCode | This is the unique vendor code for the vendor assigned to the account with which this bill is assigned. | VENDOR2 |
| Billing period | Bill.billingPeriod | This is the billing period month to which this bill is assigned. | Jan |
| Billing year | Bill.billingPeriodYear | This is the billing period year to which this bill is assigned. | 2012 |
| Batch number |
Batch.batchCode | This is the unique batch number to which this bill is assigned. This field will be blank if the bill is not assigned to a batch. | 012012 |
| Account period | Bill.accountPeriod | This is the account period month assigned to this bill. This field will be blank if the bill is not assigned to an account period. |
March |
| Account year | Bill.accountPeriodYear | This is the account period year assigned to this bill. This field will be blank if the bill is not assigned to an account period. |
2012 |
| Control code | Bill.controlCode | This is the control code assigned to this bill. This field will be blank if there is no control code assigned to this bill. | 0010102012 |
| Due date | Bill.dueDate | This is the due date assigned to the bill. This field will contain the value “<none>” if no due date is assigned. | <none> |
| Estimated | Bill.estimated | This flag indicates whether the bill is an estimated bill or an actual bill. | 0 |
| Invoice number | Bill.invoiceNumber | This is the invoice number assigned to the bill. | 14243414241 |
| Next reading | Bill.NextReading | The Date/Time Stamp of when we expect the next reading to be taken. | 01/02/2012 |
| Statement date | Bill.StatementDate | This is the statement date assigned to the bill. | <none> |
| Observation method ID | Bill.observationMethodID |
This is the unique identifier for the type of bill. * |
|
| Account service Address | Bill.addressid | This is the service address assigned to the account to which this bill is assigned.** | |
| Account active | Account.active | This flag indicates whether or not the account to which this bill is assigned is active. | 1 |
| Created Date | Bill.createdDate |
This is the date on which the bill was created and saved. | 01/10/2012 |
| Modified Date | Bill.modifiedDate | This is the date on which the bill was last modified. | 01/10/2012 |
*Bills can be Automatic (1), Manual (2), Estimated (3), Simulated (4), Accrual (5), Adjustment (6) … from the ObservationMethod Table. The Observation Method used depends on what method is used to create the bill. For example, Manual is when bills are hand-keyed, Automated is for Bills that are imported, Estimated is when the Estimated flag is checked, Simulated is from processors like Bill Splits and Calculated Accounts. Accrual bills are created by the accruals module/processor, and Adjustment bills are when the “monkey wrench” is used from the bill edit screen.
**Joined to Address table where addresstypeid = 3 (Note: Physical – 1, Billing – 2, Service – 3)
Account Summary lines appear ONCE per bill. They contain account-level summary information about a particular bill.

| Field Name | Database Field | Field Description | Sample Value |
| Account ID | Account.accountID | This is the unique ID number assigned to the account. | 1024 |
| Start date | Bill.beginDate | This is the begin date of the time period covered by the bill. | 01/10/2012 |
| End date | Bill.endDate | This is the end date of the time period covered by the bill. | 02/09/2012 |
| Code |
Account.accountCode | This is the unique account code of the Account associated with this bill. | 66661 |
| Display |
Account.accountInfo | This is the display name of the Account associated with this bill. | 66661 |
| Vendor ID | Account.vendorID | This is the unique ID number of the vendor to which this account is assigned. Generated automatically by EnergyCAP during vendor creation. |
1024 |
| Vendor | Vendor.vendorCode | This is the unique code associated with the vendor to which this account is assigned. |
VENDOR1 |
| Rollup cost | N/A | This is the sum of all the dollar amounts belonging to the meters and account charges assigned to this account for this bill. | $1548.23 |
Meter Summary lines appear MULTIPLE times per Account Summary. They contain meter-level summary information about a particular bill.

| Field Name | Database Field | Field Description | Sample Value |
| Place ID | LogicalDevice.placeID | This is the unique ID number assigned to the place to which this meter is assigned. Generated automatically by EnergyCAP during Place creation. | 216 |
| Place code | Place.placeCode | This is the unique place code of the Place to which this meter is assigned. | MYPLACE |
| Place display | Place.placeInfo | This is the display name of the Place to which this meter is assigned. | My Place |
| Place type | PlaceType.placeTypeCode | This is the unique place type code of the Place to which this meter is assigned. | BUILDING |
| Meter ID | Meter.meterID | This is the unique ID number assigned to this meter. Generated automatically by EnergyCAP during Meter creation. | 52 |
| Meter code | LogicalDevice.logicalDeviceCode | This is the unique code assigned to this meter. | MULTIMETERS-ELE01 |
| Meter display | LogicalDevice.logicalDeviceInfo | This is the display name assigned to this meter. | MULTIMETERS-ELE01 |
| Cost | N/A | This is the sum of all the charges in this bill which are assigned to this meter. |
$845.12 |
| Use | N/A | This is the usage assigned to this meter in this bill. | 457.0000 |
| Demand | N/A | This is the demand assigned to this meter in this bill |
1245.0000 |
| Use unit |
Unit.unitCode | This is the unique unit code assigned to the use for this meter for this bill. | KWH |
| Demand unit | Unit.unitCode | This is the unique unit code assigned to the demand for this meter for this bill. | KW |
| Cost per Unit | N/A | This is the unit cost for the usage assigned to this meter for this bill (Cost / Use). | 1.85 |
G/L, GL, or General Ledger Summary lines appear ONCE per Meter Summary (if GL records are assigned to those meters), ONCE per Account Summary (for account-charges, if a GL record is assigned to the meter), or MULTIPLE times per Account Summary (for special charges, if the user inserts extra, non-template bodylines). They contain GL-level summary information about a particular bill.

| Field Name | Database Field | Field Description |
Sample Value |
| Code | GeneralLedger.generalLedgerCode | This is the unique general ledger code of the General Ledger record assigned to this meter. | ABC123 |
| Subcode 1 | GeneralLedger.subCode01 | This is a unique information placeholder. |
ABC124 |
| Subcode 2-19 | GeneralLedger.subCode02-19 | This is a unique information placeholder. | ABC125-143 |
| Subcode 20 | GeneralLedger.subCode20 | This is a unique information placeholder. | ABC144 |
| Cost |
N/A | This is the rolled-up cost of all charge lines underneath this GL. | $123.45 |
Bodyline or Bill Line Summary lines appear MULTIPLE times per GL Summary (if GL records are assigned to Accounts or Meters) or MULTIPLE times per Account or Meter summary. They contain bill bodyline-level information about a particular bill and contain the most granular information of all the export line types.

| Field Name | Database Field | Field Description | Sample Value |
| Commodity | Commodity.commodityCode | This is the unique commodity code for the commodity tracked by this bill bodyline. | MONEY |
| Observation type | ObservationType.observationTypeCode | This is the unique observation type code for the observation type tracked by this bill bodyline. | CHARGE |
| Unit | Unit.unitCode | This is the unique unit code for the unit of measure tracked by this bill bodyline. |
KWH |
| Cost unit | Unit.unitCode | This unique unit code for the cost unit of measure tracked by this bill bodyline. | USDOLLARS |
| Value | BodyLine.value | This is the numerical value for this bodyline. | 1234.0000 |
| Cost | Bodyline.cost | This is the cost for this bodyline. | $123.45 |
The Bill Footer line appears ONCE at the bottom of a given export file. It contains highest-level summary information about the bills contained in the file.

| Field Name |
Database Field | Field Description | Sample Value |
| Current date | N/A |
This is the date that the export file is generated. |
01/10/2012 |
| Current time | N/A |
This is the time that the export file is generated. |
03:45:16 |
| Number of bills | N/A |
This is the number of bills written to the export file. |
9 |
| Total debits | N/A |
This is the total cost of all debits in the export file. |
$0.00 |
| Total credits | N/A |
This is the total cost of all credits in the export file. |
$31152.79 |
| Total amount | N/A |
This is the sum of the Bill.TotalCost amounts for all the bills in the export file. | $31152.79 |