to select ↑↓ to navigate
Digital Invoicing

Digital Invoicing

Setting-up and Configurations

This document covers installation, initial setup, and rollout configuration.

Installation

cd $PATH_TO_YOUR_BENCH  
bench get-app https://github.com/kodlyft/di --branch develop  
bench setup requirements  
bench --site your-site.com install-app di  
bench --site your-site.com migrate

Initial Setup Checklist

  1. Install erpnext and di
  2. Run migrations
  3. Create DI Settings for each company
  4. Add DI bearer token and company identity data
  5. Configure sale types and sandbox scenarios if needed
  6. Sync reference data from FBR
  7. Populate customer NTN/CNIC and registration fields
  8. Populate item HS codes, sale types, and SRO data where required
  9. Map sales tax rows using the DI tax type field
  10. Configure POS Profile and Mode of Payment if POS fiscalization is required

DI Settings Configuration

For each company, configure:

  • Enabled: turn DI processing on
  • Sync Mode: Sandbox or Production
  • Auto Post on Submit
  • Access Token
  • NTN / CNIC
  • Province
  • Address

Customer Configuration

For each DI-enabled customer, set:

  • NTN / CNIC
  • Province
  • Registration Type
  • DI Address
  • Enable Digital Invoicing

Supplier Configuration

For supplier-side DI purchase flows, set:

  • DI Address
  • Province
  • Registration Type

Item Configuration

For each item used in DI or POS flows, set:

  • HS Code
  • HS UOM
  • Sale Type
  • SRO item serial number if needed
  • SRO schedule number if needed

Tax Configuration

On Sales Taxes and Charges, map each relevant tax row using DI Tax Type:

  • Sales Tax
  • Further Tax
  • Advance Tax

POS Fiscal Configuration

On POS Profile, configure:

  • Enable FBR Integration
  • FBR Environment
  • FBR POS ID
  • FBR Bearer Token
  • optional FBR API URL override

On each Mode of Payment, map the FBR payment mode code:

  • 1 Cash
  • 2 Card
  • 3 Gift Voucher
  • 4 Loyalty
  • 5 Mixed
  • 6 Cheque

Environment Guidance

Sandbox

Use sandbox when:

  • validating setup
  • testing reference sync
  • testing scenario-driven invoice payloads
  • rehearsing rollout before production

Production

Use production only after:

  • credentials are verified
  • customer and item master data is complete
  • tax mappings are correct
  • sandbox testing is complete
  1. Configure one company in sandbox
  2. Sync reference data
  3. Test invoice preview and validation
  4. Test DI posting on sample invoices
  5. Test POS fiscalization if required
  6. Review DI Log
  7. Switch the company to production
Last updated 3 hours ago
Was this helpful?
Thanks!