Skip to main content
Skip table of contents

Invoice Batch Processing

Overview

The Invoice Batch system is a Microsoft Dynamics 365 Business Central extension that allows users to create multiple invoices efficiently through batch processing. The system supports importing data from Excel files and automatically generating invoices or credit memos based on predefined criteria.

Core Components

1. Invoice Batch (Header)

  • Purpose: Container for grouping related invoice lines

  • Key Fields:

    • Code: Unique identifier for the batch (10 characters)

    • Name: Descriptive name for the batch (30 characters)

image-20250813-160316.png

Invoice Batch

2. Invoice Batch Lines

  • Purpose: Individual line items that will be converted to invoice/credit memo lines

  • Key Fields:

    • Batch Code: Links to the parent batch

    • Line No.: Sequential line number

    • Type: G/L Account, Item, Resource, or Standard Text

    • No.: Item/Resource/Account number

    • Customer No.: Target customer

    • Description: Line description

    • Quantity: Quantity to invoice

    • Unit Price: Price per unit

    • Discount %: Line discount percentage

    • Business Account: Business account code

    • Dimension Codes: For financial reporting

    • Job No.: Optional project reference

    • Posting Date: When to post the transaction

    • Due Date: Payment due date

Getting Started

Setting Up Invoice Batches

  1. Navigate to Invoice Batches

    • Go to the Invoice Batches list page

    • Create a new batch or select an existing one

  2. Create a New Batch

    • Click "New" to create a new invoice batch

    • Enter a unique Code (up to 10 characters)

    • Enter a descriptive Name (up to 30 characters)

    • Save the record

Working with Invoice Batch Lines

Manual Entry

  1. Open Invoice Batch Worksheet

    • Navigate to the "Invoice Batch" page

    • Select your batch code from the dropdown

    • The system will filter to show lines for the selected batch

  2. Add Lines Manually

    • Enter Posting Date (required)

    • Select Customer No.

    • Choose Type (G/L Account, Item, Resource, or blank)

    • Enter No. (the system will auto-populate description and unit price)

    • Set Quantity and adjust Unit Price if needed

    • Add Business Account and dimension codes as required

    • Optional: Add Job No., Work Type Code, etc.

Import from Excel

  1. Prepare Excel File

    • Set up your Excel file with the required columns

    • Ensure proper column mapping for:

      • Customer ID/Number

      • Resource/Item Number

      • Description

      • Project Code

      • Job Number

      • Entry Description

      • Unit of Measure

      • Quantity

      • Unit Price

  2. Run Import Process

    • From the Invoice Batch page, click "Import from Excel"

    • Select your Excel file using the file browser

    • Choose the appropriate worksheet

    • Configure column mappings:

      • Qty head lines: Number of header rows to skip

      • ID Column No.: Column containing customer IDs

      • Resource Column No.: Column with resource/item numbers

      • Description Column No.: Column with line descriptions

      • Quantity Column No.: Column with quantities

      • Unit Price Column No.: Column with unit prices

    • Set batch parameters:

      • Business Account Name

      • Start Date

      • Invoice Type

      • Department Code (applies to all lines)

    • Run the import

Creating Invoices

Batch Invoice Creation Process

  1. Validate Batch Lines

    • Ensure all required fields are populated

    • Verify customer numbers exist

    • Check that quantities and prices are correct

    • Confirm posting dates are appropriate

  2. Run Batch Create Invoices

    • From the Invoice Batch page, click "Create Invoices"

    • Configure creation parameters:

      • Posting Date: Date for invoice posting

      • Document Date: Document date (optional)

      • Posting Description: Description for the posting

      • Sales Line Description: Override description for all lines

      • Get Name from Resource: Use resource names in descriptions

      • Get Price from Resource: Update prices from resource cards

  3. Processing Logic

    • The system groups lines by:

      • Customer Number

      • Business Account

      • Posting Date

    • Creates separate documents for each group

    • Automatically determines if invoice or credit memo based on total amount:

      • Positive amounts → Invoice (Document Type 2)

      • Negative amounts → Credit Memo (Document Type 3)

Invoice Creation Rules

  • Duplicate Prevention: Won't create multiple invoices for the same customer/business account/posting date combination

  • Line Validation: Skips lines with zero quantity for typed items

  • Price Updates: Can automatically update unit prices from resource/item cards

  • Dimension Handling: Automatically applies dimensions from resources when available

  • Customer Creation: Creates new customers automatically if they don't exist (with Icelandic ID validation)

Key Features

Pricing Integration

  • Integrates with Business Central's price calculation engine

  • Supports customer-specific pricing

  • Handles campaign pricing and discounts

  • Automatic price updates based on resources/items

Business Account Support

  • Links invoices to specific business accounts

  • Supports multi-entity invoicing scenarios

  • Maintains business account relationships

Excel Integration

  • Flexible column mapping

  • Support for various Excel file formats

  • Automatic data validation and cleanup

  • Customer ID formatting (adds leading zeros for 9-digit IDs)

Dimension Management

  • Full integration with Business Central dimensions

  • Automatic dimension inheritance from resources

  • Support for department and project tracking

Workflow Example

  1. Preparation

    • Create or select an invoice batch

    • Prepare data (manually or in Excel)

  2. Data Entry

    • Import from Excel or enter manually

    • Review and validate all lines

    • Make any necessary corrections

  3. Invoice Generation

    • Run "Create Invoices" with appropriate settings

    • System creates invoices/credit memos automatically

    • Review generated documents

  4. Post-Processing

    • Open and review created invoices

    • Post invoices when ready

    • Monitor invoice status through the batch lines

Monitoring and Tracking

Invoice Status Tracking

  • Invoiced field shows processing status

  • Invoice No. field links to created document

  • Use "Open Invoice" action to view created documents

Validation Messages

  • System provides feedback on created invoices/credit memos

  • Error messages for validation failures

  • Confirmation of successful processing

Troubleshooting

Common Issues

  1. Missing Posting Date

    • Error: "Your must specify Posting Date!"

    • Solution: Ensure posting date is set before running batch creation

  2. Zero Quantity and Amount

    • Warning: Lines with zero quantity and amount are skipped

    • Solution: Verify quantities and prices are correctly entered

  3. Customer ID Errors

    • System validates Icelandic customer IDs (Kennitala)

    • Solution: Correct invalid customer IDs before processing

  4. Price Update Confirmation

    • System prompts to confirm price updates when enabled

    • Choose whether to proceed with price updates or cancel

Best Practices

  1. Data Validation

    • Always verify customer numbers before processing

    • Check posting dates are within acceptable periods

    • Validate quantities and prices

  2. Batch Organization

    • Use meaningful batch codes and names

    • Group related transactions in the same batch

    • Keep batches to a reasonable size for easier management

  3. Testing

    • Test with small batches first

    • Verify invoice creation logic with sample data

    • Check dimension and pricing integration

  4. Documentation

    • Document your column mappings for Excel imports

    • Keep templates for recurring batch types

    • Maintain procedures for different invoice scenarios

Advanced Features

Integration Events

The system provides several integration events for customization:

  • OnBeforeFindSalesHeaderInBatchCreateInvoices

  • OnAfterInsertSalesLineInBatchCreateInvoices

  • Various pricing and validation events

Price Calculation

  • Implements advanced price calculation interfaces

  • Supports campaign pricing

  • Customer-specific pricing rules

  • Resource-based pricing with work types

This manual provides comprehensive guidance for using the Invoice Batch system effectively. For technical support or customization requirements, consult your Business Central administrator or development team.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.