This article is focused on customizing what columns show up for the list of billing entries on a bill. We'll go over how to:
- Customize what columns show when you are viewing/editing a bill in Centerbase
- Customize what columns show when a client views a printed or online bill
- Customize what columns show in the Staff Summary section on a bill
- Altering columns based on whether a bill is a pre-bill or posted
- Altering columns based on a matter field
Defining columns to show on bills and the bill detail page
The primary place columns are controlled on bills is under System Settings -> Config File Edit -> Billing Entries Grid Settings. This is an XML based configuration file that shows what columns are available in the list of billing entries on a bill.
A sample XML configuration:
<InvoiceGridSettings>
<Columns>
<GridColumn>
<DataField>LinkedObjectName</DataField>
<Label>Matter</Label>
<Hide>false</Hide>
<Printable>false</Printable>
<Width>20%</Width>
<LabelAlign>left</LabelAlign>
<ValueAlign>left</ValueAlign>
</GridColumn>
<GridColumn>
<DataField>Class</DataField>
<Label>Class</Label>
<Hide>true</Hide>
<Printable>true</Printable>
<Width>5%</Width>
<LabelAlign>left</LabelAlign>
<ValueAlign>left</ValueAlign>
<GroupLevel>1</GroupLevel>
</GridColumn>
<GridColumn>
<FieldId>1:1436,32:3253</FieldId>
<Label>Staff Initials</Label>
<Hide>false</Hide>
<Printable>true</Printable>
<Width>20%</Width>
<LabelAlign>left</LabelAlign>
<ValueAlign>left</ValueAlign>
</GridColumn>
<GridColumn>
<DataField>Description</DataField>
<Label>Description</Label>
<Hide>false</Hide>
<Printable>true</Printable>
<Width>35%</Width>
<LabelAlign>left</LabelAlign>
<ValueAlign>left</ValueAlign>
</GridColumn>
<GridColumn>
<DataField>Total</DataField>
<Label>Amount</Label>
<Hide>false</Hide>
<Printable>true</Printable>
<Width>20%</Width>
<LabelAlign>right</LabelAlign>
<ValueAlign>right</ValueAlign>
</GridColumn>
</Columns>
</InvoiceGridSettings>
Each column is in a section of the XML surrounded by a <GridColumn> tag at the beginning and a </GridColumn> tag at the end. Each property of the column has its own set of tags. So for instance, if I wanted to change the Label of a column from Matter to Case, I would take the tag that looks like this: <Label>Matter</Label> and change it to this: <Label>Case</Label>
The order the columns show up in is also important. Whatever order they are defined in the XML will determine the order they show up on the bills.
The two most important properties for each column are DataField and FieldId. Each column must have one or the other (but not both). If you specify a DataField, this will show one of the standard fields that are always retrieved when pulling a list of billing entries. Valid data fields are:
- Date: The entry date
- Class: The type of billing entry (will be either Time or Expense)
- LinkedObjectName: The matter associated with the billing entry
- Username: The timekeeper
- ProductName: The primary billing code
- Description: The description text for the entry
- Quantity: The billable quantity/hours of the entry
- ActualQuantity: The actual quantity/hours worked of the entry. Used if you are showing the difference between how much time was actually worked VS what you are billing.
- Price: The billable price/rate of the entry
- Total: The total billable value of the entry (including mark ups/downs, flat rate, non-billable, and/or flat rate adjustments)
- IsTaxable: Whether the billing entry is taxable
- IsFlatRate: Whether the entry is marked as flat rate
- IsNonBillable: Whether the entry is marked as non-billable
- HideFromInvoice: Whether the entry should be hidden from the bill
If you specify a FieldId, this can allow you to show any custom field you want as a column. This can be used to show additional information about the timekeeper, matter, or billing code.
The main properties you can alter are:
- DataField [text]: This allows you to show a standard field in the column. If this is specified you SHOULD NOT specify a FieldID for the same column.
- FieldId [text]: This allows you to show a custom field in the column. If this is specified you SHOULD NOT specify a DataField for the same column.
- Label [text]: The column header to show on the Bill Detail page in Centerbase and the bill. This header can be overridden on bill templates (both in general or between Fees VS Expenses).
- Hide [true/false]: Allows you to hide the column both from the Bill Detail page and the bill.
- Printable [true/false]: Specifies whether the column should be included when printing a bill. This property is ignored if the column has the Hide property set to true.
- LabelAlign: Specifies how you want the column header text aligned. Can either be left, right, or center.
- ValueAlign: Specifies how you want the column values to be aligned. Can either be left, right, center, or justify (content spaces out such that as many blocks fit onto one line as possible and the first word on that line is along the left edge and the last word is along the right edge).
- Width [percent number]: Specifies the width of the column (in %) on the bill detail page. A sample value is 10%
- GroupLevel [number]: A bill can be grouped by up to two columns. All bills (by default) first group by Fees VS Expenses (group level 1). If you want to specify an additional column to group by (such as Billing Code) you can do so by setting the GroupLevel to 2. Having multiple columns at the same group level or having more than 2 column groups specified is not supported and will be ignored.
These settings control what columns will show on all bill templates and the bill detail page. If there is a piece of data from the line items on a bill that you want to be able to reference/include, it must be defined here. This includes if you want to show/hide it in a column for the line items list or if you want to show details about it in the timekeeper summary section.
Hiding columns on a template
Once a column is defined in the Billing Entries Grid Settings, that column will be available to be shown on bills. You can easily customize certain properties of the column on a bill template.
There are two sections near the top of the bill template where you can customize the columns for the Fees/Time section and the Expense section.
You can use HideColumn to hide a column under fees, expenses, or both. HideColumn has 4 things you can specify:
- Section to hide the column on (ref TimeColumns or ref ExpenseColumns)
- DataField (if applicable)
- FieldID (if applicable)
- A true/false indicating whether you want to still show the group subtotal even if the column is hidden (true) or to hide the subtotal as well (false, default behavior)
To Hide a column under fees, you can add a line like this:
HideColumn(ref TimeColumns, "Price", "");
This would hide the Price/Rate column for all fee line items. The first part defines what section want to hide it from. ref TimeColumns means you want to hide it from the fees section. ref ExpenseColumns means you want to hide it from the expenses section. The second part specifies the DataField of the column you want to hide. The third part specifies the FieldID of the column you want to hide. If you want to hide a standard data field column, you would specify the DataField in the second part and leave the third part empty (""). If you want to hide a custom field column, you would leave the second part empty ("") and specify the FieldID in the third part.
So if to hide the Staff Initials on Expenses, you can add a line like this:
HideColumn(ref ExpenseColumns, "", "1:1436,32:3253");
If you want to hide a column for both fees and expenses, you would add two lines. One saying to hide it for fees (ref TimeColumns) and one saying to hide it for expenses (ref ExpenseColumns).
By default, if you hide either the Quantity or Total column, it will also hide the Subtotal for that column (total hours / total fees or expenses). To hide the column but still show the subtotal, you can specify an additional parameter
HideColumn(ref TimeColumns, "Total", "", true);
This will hide the total column, but because we specified true in the 4th position, this will still show the subtotal for that column.
Showing columns on a template
You also have the option to take a column you have said you don't want to print on most bill templates and show it by using ShowColumn. This is specified just like HideColumn:
- Section to show the column on (ref TimeColumns or ref ExpenseColumns)
- DataField (if applicable)
- FieldID (if applicable)
This will show a column that is normally hidden on this template. For example, this will tell the Staff Category custom field column to show on this template for Fees only.
ShowColumn(ref TimeColumns, "", "1:1012,32:3253");
Renaming columns on a template
Sometimes a firm will want the same column to have different names on different templates or different names on fees VS expenses. A great example of this is Quantity. Most firms want Quantity on fees to show as Hours and on expenses to show as Quantity. To do this you can use RenameColumn:
- Section to rename the column header on (ref TimeColumns or ref ExpenseColumns)
- The new name to give the column
- DataField (if applicable)
- FieldID (if applicable)
This will only change the column header that shows at the top of the section. This will not affect the data that shows below. For example, this will rename Quantity to Hours for Fees only:
RenameColumn(ref TimeColumns, "Hours", "Quantity", "");
Customizing the Staff/Timekeeper Summary section
Bills can have a Staff Summary section. This subtotals fees on the bill by timekeeper/rate and shows total hours / amount charged. So if Timekeeper A had several fees on a bill, all charging $150 an hour, there would be one line in Staff Summary for them showing their total hours, the $150 rate, and the total value of all of their fees on that bill. If Timekeeper B had a few entries charging $200/hour and some others charging $100/hour, then they would have a line showing their total hours/value for the $100 rate and another line showing their total hours/value for the $200 rate. By default, non-billable entries will also have their own line for a timekeeper.
Below the time/expense column adjustment section, there is an area where you can say what columns you want to show on the Staff Summary. By default this section shows the timekeepers username, total hours, rate, and total amount. You can adjust this section by adding or removing the columns specified in this section Whatever order you specify the columns in this section is the order the columns will display as on the bill. For each column you want, you can specify the following:
- DataField [text]: This allows you to show a standard field in the column. If this is specified you SHOULD NOT specify a FieldID for the same column. There are only a few Data Fields available in the Staff Summary
- Name - the username of the timekeeper
- Hours - the total hours for this timekeeper/rate combo
- Rate - the rate for the timekeeper on this line
- Amount - the total value of all time for this timekeeper/rate combo
- FieldId [text]: This allows you to show a custom field in the column. If this is specified you SHOULD NOT specify a DataField for the same column. This FieldID will only be available to the Staff Summary if it was specified as a column in the Billing Entries Grid Settings (whether it was marked as Hidden/Printable or not). So if you want a custom field to show in your Staff Summary, make sure you specify the column in the XML for Billing Entries Grid Settings.
- Label [text]: The column header to show on the Bill Detail page in Centerbase and the bill. This header can be overridden on bill templates (both in general or between Fees VS Expenses).
- LabelAlign: Specifies how you want the column header text aligned. Can either be left, right, or center.
- ValueAlign: Specifies how you want the column values to be aligned. Can either be left, right, center, or justify (content spaces out such that as many blocks fit onto one line as possible and the first word on that line is along the left edge and the last word is along the right edge).
Sample Staff Summary Column Settings:
Model.StaffSummaryColumns.Add(new GridColumn { FieldID = "1:1436,32:3253", Label = "Initials", LabelAlign = "left", ValueAlign = "left" });
Model.StaffSummaryColumns.Add(new GridColumn { DataField = "Hours", Label = "Hours", LabelAlign = "right", ValueAlign = "right" });
Model.StaffSummaryColumns.Add(new GridColumn { DataField = "Rate", Label = "Rate", LabelAlign = "right", ValueAlign = "right" });
Model.StaffSummaryColumns.Add(new GridColumn { DataField = "Amount", Label = "Amount", LabelAlign = "right", ValueAlign = "right" });
There are also a few settings available under System Settings -> System Configuration -> Advanced Billing that specifically apply to the Staff Summary section:
- Show Average Timekeeper rate in Staff Summary Section. If this is checked, instead of showing one line per timekeeper per rate, it will instead show a single line per timekeeper with their average rate. Some people use this and hide the rate column to just show a total for the timekeeper, regardless of multiple rates. This will also include non-billable items in the Total Hours for that timekeeper.
- Include Staff Summary Section. If this is unchecked, the Staff Summary will not print on bills.
Hiding/showing/renaming columns based on criteria
Centerbase supports "smart" templates that can hide/show information based on criteria. This saves trouble when customizing as you don't have to create multiple, almost identical templates that just have a slight difference. It is also easier on the firm as they don't have to carefully choose a template each time, they can just use a single template that adjusts what it shows based on certain criteria.
One popular example is hiding/showing a column on pre-bills only. For instance, let's say the firm wanted to show the ActualQuantity column (hours worked) on a pre-bill, but not on a posted bill. This could be used to compare how much time was actually worked VS how much the client is being charged for. To do this, you can surround your ShowColumn statement with an "if" block. Here is an example of how to show the ActualQuantity column on fees, but only on pre-bills:
if (Model.IsPrebill) {
ShowColumn(ref TimeColumns, "ActualQuantity", ");
}
Model.IsPrebill is an invoice level property that tells us whether the current invoice is a pre-bill or not. So we can use this IF block to specify we only want to do something if the current bill is a pre-bill. The basic structure is:
// If this criteria is TRUE, do something
if ([Put some criteria here]) {
[Do something here]
}
Let's say the firm wanted to hide the Rate and Timekeeper columns on any bill where the Matter's Fee Arrangement is set to Flat Fee. We can use a custom invoice field ID using the following:
if (Model.GetAdditionalField("1001:1084,30:1000151") == "Flat Fee") {
HideColumn(ref TimeColumns, "Username", ");
HideColumn(ref TimeColumns, "Price", ");
}
Getting Field IDs
Some of the most common Field IDs (that can be used to pull custom values from billing entries or invoices) can be found here. This also includes details on how to find a Field ID that is not in this list:
https://support.centerbase.com/hc/en-us/articles/360014973312-Centerbase-Item-Types
Additional invoice level properties and how to specify invoice level custom fields will be covered in an upcoming support article.
Comments
0 comments
Please sign in to leave a comment.