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
- Install
erpnextanddi - Run migrations
- Create
DI Settingsfor each company - Add DI bearer token and company identity data
- Configure sale types and sandbox scenarios if needed
- Sync reference data from FBR
- Populate customer NTN/CNIC and registration fields
- Populate item HS codes, sale types, and SRO data where required
- Map sales tax rows using the DI tax type field
- 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:
SandboxorProduction - 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 TaxFurther TaxAdvance 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:
1Cash2Card3Gift Voucher4Loyalty5Mixed6Cheque
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
Recommended Rollout Order
- Configure one company in sandbox
- Sync reference data
- Test invoice preview and validation
- Test DI posting on sample invoices
- Test POS fiscalization if required
- Review
DI Log - Switch the company to production
Last updated 3 hours ago
Was this helpful?