Sales Invoice Totals by Custom Field
Sales Invoice Totals by Custom Field — Complete User Guide — Two Accounts Web
Comprehensive guide for generating, analysing, and understanding the Sales Invoice Totals by Custom Field report — grouping and totalling sales invoice amounts by custom field values across multiple periods
Table of Contents
- What Is the Sales Invoice Totals by Custom Field Report?
- Enabling from the Customize Menu
- Field-by-Field Guide
- Settings Configuration
- Creating a Sales Invoice Totals by Custom Field Report
- How the Report Is Calculated
- Drill-Down Capabilities
- Sample Data and Report Output
- Common Issues and Solutions
- Accounting Regulation Compliance
1. What Is the Sales Invoice Totals by Custom Field Report?
The Sales Invoice Totals by Custom Field report groups sales invoice amounts by the value of a selected custom field, across one or more period columns. This allows you to analyse sales by any dimension that you have set up as a custom field — such as sales region, product category, project code, or any other classification.
For example, if you have a custom field called "Sales Region" on your Sales Invoice header with values like "North", "South", "East", "West", this report will show total sales for each region side by side across multiple periods.
1.1 Purpose and Structure
The report groups sales invoice transactions by the value of a selected custom field. Each unique custom field value becomes a row. Each period column shows the total for that value during that period. A total row is added at the bottom.
1.2 Compatible Custom Field Placements
Custom fields can be assigned to different entity types (Placement). This report supports custom fields placed on the following entity types:
| Placement Entity | What It Groups | Amount Source | Sign Convention |
|---|---|---|---|
| Sales Invoice (header) | Custom field value from the invoice header | Invoice total (net + tax), sign-flipped | Base amount × −1 |
| Sales Invoice Line | Custom field value from each invoice line | Line amount | Base amount as-is |
| Customer | Custom field value from the customer record | Invoice total, sign-flipped | Base amount × −1 |
| Inventory Item | Custom field value from the inventory item | Line amount | Base amount as-is |
| Non-Inventory Item | Custom field value from the non-inventory item | Line amount | Base amount as-is |
2. Enabling from the Customize Menu
The Sales Invoice Totals by Custom Field report appears under:
- Reports → Customers → Sales Invoice Totals by Custom Field
The report is only visible when the Customers tab is enabled in Customize Menu. No additional toggle is needed.
3. Field-by-Field Guide
3.1 Report Header Fields
Location: Reports → Customers → Sales Invoice Totals by Custom Field → New Report
| Field | Required? | Description |
|---|---|---|
| Name | No | An optional custom title for the report. Defaults to "Sales Invoice Totals by Custom Field". |
| Custom Field | Yes | Select the custom field to group by. Only custom fields with placements compatible with this report (Sales Invoice, Sales Invoice Line, Customer, Inventory Item, Non-Inventory Item) are shown. |
3.2 Report Columns (Periods)
Each report can contain one or more period columns for comparative analysis (e.g. Q1 vs Q2). Each period shows the total for each custom field value during that period.
| Field | Required? | Description |
|---|---|---|
| From Date | Yes | The start date for this period. |
| To Date | Yes | The end date for this period. |
| Column Name | No | Optional custom column heading. If left blank, the To Date is used. |
4. Settings Configuration
4.1 Custom Fields
Location: Settings → Custom Fields
Custom Fields are user-defined fields that can store additional information on various entity types. To use a custom field in this report, it must be assigned to one of the supported placements:
- Sales Invoice — custom field on the invoice header (e.g. "Sales Region", "Project Code")
- Sales Invoice Line — custom field on individual line items
- Customer — custom field on the customer record (e.g. "Customer Tier", "Industry")
- Inventory Item — custom field on the inventory item
- Non-Inventory Item — custom field on the non-inventory item
4.2 Setting Up a Custom Field for This Report
Location: Settings → Custom Fields
Two Accounts Web has six types of custom fields. Each type stores its values in a separate internal dictionary.
Example: Setting Up "Sales Region" as a Dropdown List
The recommended approach for a "Sales Region" field with predefined values (North, South, East) is to use a Classic Custom Field with Type set to DropdownList. This ensures the report can read the values and prevents data entry errors from manual typing.
- Go to Settings → Custom Fields
- Click New Custom Field under Classic Custom Fields (not Text Custom Fields)
- Enter the Name: "Sales Region"
- Set Type: DropdownList
- In the Options for Dropdown List field, enter each region on a separate line:
NorthSouthEast - Under Placement, check Sales Invoice
- Click Save
Once saved, the "Sales Region" field appears on every Sales Invoice form as a dropdown. When creating each invoice, select the appropriate region from the list:
| Invoice | Customer | Date | Sales Region (Dropdown) |
|---|---|---|---|
| SI-001 | Customer A | 5-Jan-2026 | North |
| SI-002 | Customer B | 15-Jan-2026 | South |
| SI-003 | Customer C | 25-Jan-2026 | North |
| SI-004 | Customer B | 5-Feb-2026 | East |
| SI-005 | Customer A | 15-Feb-2026 | North |
| SI-006 | Customer C | 25-Feb-2026 | South |
| SI-007 | Customer A | 5-Mar-2026 | East |
| SI-008 | Customer B | 15-Mar-2026 | North |
| SI-009 | Customer C | 25-Mar-2026 | South |
When you create the report, select "Sales Region" from the Custom Field dropdown. The report groups by each unique region value and totals the invoice amounts per period.
5. Creating a Sales Invoice Totals by Custom Field Report
- Go to Reports → Customers → Sales Invoice Totals by Custom Field
- Click New Report
- Enter a Name (optional)
- Select the Custom Field to group by
- Add Periods:
- Click Add to add a period
- Enter the From Date and To Date
- Optionally enter a custom Column Name
- Add additional periods for comparative analysis
- Click Save
- The report generates showing each custom field value as a row with totals per period
6. How the Report Is Calculated
6.1 Transaction Reads
The system reads all General Ledger transactions where the source transaction is a Sales Invoice or Credit Note. Only the counter-balancing entry (the side opposite to Accounts Receivable) is used for header-level fields, so the amount represents the net revenue including tax.
6.2 Custom Field Value Extraction
Depending on the custom field's placement, the system extracts the custom field value from:
- Sales Invoice header — reads the custom field value from the Sales Invoice's custom fields dictionary
- Sales Invoice Line — reads the custom field value from each invoice line's custom fields
- Customer — reads the custom field value from the Customer's custom fields dictionary
- Inventory Item — reads the custom field value from the Inventory Item's custom fields
- Non-Inventory Item — reads the custom field value from the Non-Inventory Item's custom fields
6.3 Per-Period Amount Calculation
For each unique custom field value and each period column:
Amount = Sum of (base currency amount) × −1
for all transactions matching this custom field value
where the transaction date is within the period (FromDate to ToDate)
The system performs an additional sign reversal (× −1) at line 99 of the view, on top of any sign reversal already applied during data extraction.
6.4 Sign Convention
| Placement | Raw Amount | Extraction Sign | Period Sign | Final Display |
|---|---|---|---|---|
| Sales Invoice header | Base × −1 | Already flipped | × −1 again | Positive = revenue |
| Sales Invoice Line | Base (as-is) | Same | × −1 | Positive for debits? (check) |
| Customer | Base × −1 | Already flipped | × −1 again | Positive = revenue |
| Inventory Item | Base (as-is) | Same | × −1 | Negative for credits (COGS) |
| Non-Inventory Item | Base (as-is) | Same | × −1 | Negative for credits |
6.5 Multiple Period Columns
When multiple periods are added, each period appears as a separate column. The report groups by custom field value, and each column shows the total for that value during that period's date range. This enables period-over-period comparison of custom field segments.
7. Drill-Down Capabilities
Each amount in any period column is clickable. Clicking any cell opens a Sales Invoice Totals by Custom Field Transactions viewer showing the individual transactions behind that amount, filtered by the selected custom field, value, date range, and period.
| Drill-Down Target | Filter Applied | What You See |
|---|---|---|
| Any period amount | That custom field + that value + date range [From, To] | Individual Sales Invoices and Credit Notes with that custom field value, showing date, customer, description, and amount |
8. Sample Data and Report Output
8.1 Sample Setup
A trading company uses a custom field called "Sales Region" on the Sales Invoice header, with values "North", "South", and "East". The following invoices were issued during Q1 2026:
Custom Field Defined
| Name | Type | Placement |
|---|---|---|
| Sales Region | Classic — DropdownList | Sales Invoice |
Sales Invoices
| Date | Customer | Invoice | Amount (net + tax) | Sales Region | Period |
|---|---|---|---|---|---|
| 5-Jan-2026 | Customer A | SI-001 | 115,000 | North | Q1 |
| 15-Jan-2026 | Customer B | SI-002 | 57,500 | South | Q1 |
| 25-Jan-2026 | Customer C | SI-003 | 230,000 | North | Q1 |
| 5-Feb-2026 | Customer B | SI-004 | 115,000 | East | Q1 |
| 15-Feb-2026 | Customer A | SI-005 | 172,500 | North | Q1 |
| 25-Feb-2026 | Customer C | SI-006 | 57,500 | South | Q1 |
| 5-Mar-2026 | Customer A | SI-007 | 115,000 | East | Q1 |
| 15-Mar-2026 | Customer B | SI-008 | 230,000 | North | Q1 |
| 25-Mar-2026 | Customer C | SI-009 | 57,500 | South | Q1 |
Monthly Breakdown by Region
| Region | Jan | Feb | Mar | Total |
|---|---|---|---|---|
| North | 345,000 | 172,500 | 230,000 | 747,500 |
| South | 57,500 | 57,500 | 57,500 | 172,500 |
| East | — | 115,000 | 115,000 | 230,000 |
| Total | 402,500 | 345,000 | 402,500 | 1,150,000 |
8.2 Report Output
Sales Invoice Totals by Custom Field — By Sales Region
For the period: 1-Jan-2026 to 31-Mar-2026
Jan-2026 Feb-2026 Mar-2026
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
North 345,000 172,500 230,000 ¹
South 57,500 57,500 57,500 ²
East 0 115,000 115,000 ³
─────── ─────── ───────
Total 402,500 345,000 402,500 ⁴
Notes:
- North: SI-001 (115,000) + SI-003 (230,000) = 345,000 in Jan. SI-005 (172,500) in Feb. SI-008 (230,000) in Mar. Total: 747,500.
- South: SI-002 (57,500) in Jan. SI-006 (57,500) in Feb. SI-009 (57,500) in Mar. Total: 172,500.
- East: SI-004 (115,000) in Feb. SI-007 (115,000) in Mar. Total: 230,000.
- Grand Total: 402,500 + 345,000 + 402,500 = 1,150,000. Check: 747,500 + 172,500 + 230,000 = 1,150,000 ✓.
8.3 Verification of Calculation
CUSTOM FIELD GROUPING VERIFICATION:
North invoices: SI-001, SI-003, SI-005, SI-008
Jan: 115,000 + 230,000 = 345,000 ✓
Feb: 172,500 = 172,500 ✓
Mar: 230,000 = 230,000 ✓
South invoices: SI-002, SI-006, SI-009
Jan: 57,500 = 57,500 ✓
Feb: 57,500 = 57,500 ✓
Mar: 57,500 = 57,500 ✓
East invoices: SI-004, SI-007
Jan: 0 = 0 ✓
Feb: 115,000 = 115,000 ✓
Mar: 115,000 = 115,000 ✓
SIGN CONVENTION VERIFICATION:
All amounts are positive (revenue increases) ✓
All SI amounts are revenue (no credit notes in this sample) ✓
DR = CR (all transactions):
Each invoice: Dr AR = Cr Revenue + Cr Tax Payable ✓
GL is in balance ✓
9. Common Issues and Solutions
9.1 Report Shows No Data
Cause: No Sales Invoices or Credit Notes have the selected custom field populated, or no transactions exist within the selected date range.
Solution: Verify that the custom field is set on the relevant entity (Sales Invoice, Customer, etc.). Check that invoices exist in the date range. Ensure the custom field's Placement includes at least one of the supported entity types.
9.2 Custom Field Does Not Appear in Dropdown
Cause: The custom field must have a Placement that matches at least one of the supported entity types. The dropdown is filtered to only show compatible custom fields.
Solution: Edit the custom field in Settings → Custom Fields. Under Placement, check at least one of: Sales Invoice, Sales Invoice Line, Customer, Inventory Item, or Non-Inventory Item.
9.3 Amounts Look Incorrect or Negative
Cause: The sign convention differs depending on the custom field's placement. Header-level and Customer-level amounts are sign-flipped. Line-level amounts (Invoice Line, Inventory Item, Non-Inventory Item) are displayed as-is. Credit Notes will show as negative amounts.
Solution: Verify the custom field's Placement setting. For line-level placements, amounts represent line totals which may be debit or credit. Credit Notes correctly show as negative.
9.4 Invoice Total Does Not Match the Invoice
Cause: For header-level and Customer placements, the amount is taken from the counter-balancing entry of the Sales Invoice — this represents the net revenue including tax. Line-level amounts represent individual line totals.
Solution: This is correct. The amounts represent revenue-side amounts, not the Accounts Receivable total.
9.5 Comparative Periods Show Different Totals
Cause: This is the purpose of the report — to compare custom field values across periods. Different totals reflect different sales volumes in each period.
Solution: Review the underlying transactions using the drill-down to see which invoices contributed to each period's total.
10. Accounting Regulation Compliance
10.1 IFRS 15 — Revenue from Contracts with Customers
| Requirement | Reference | Compliance |
|---|---|---|
| Disaggregation of revenue by category | §114 | ✓ This report directly supports IFRS 15 §114 by allowing revenue disaggregation by custom field values — which can represent geographical region, product line, project type, or any other category relevant to the business. |
10.2 IFRS 8 — Operating Segments
| Requirement | Reference | Compliance |
|---|---|---|
| Segment information reported internally | §5 | ✓ Custom fields set up for sales regions, divisions, or product categories can serve as segment identifiers, and this report provides the revenue breakdown per segment across periods. |
10.3 DR = CR Verification
Sample Data Verification:
North total: 345,000 + 172,500 + 230,000 = 747,500 ✓
South total: 57,500 + 57,500 + 57,500 = 172,500 ✓
East total: 0 + 115,000 + 115,000 = 230,000 ✓
Grand total: 747,500 + 172,500 + 230,000 = 1,150,000 ✓
Each invoice DR = CR ✓
All custom field values correctly grouped ✓
End of Sales Invoice Totals by Custom Field Guide