---
title: "Introduction & Overview"
space: "Digital Invoicing"
url: "https://docs.kodlyft.com/digital-invoicing/introduction"
updated: "2026-05-16"
---

This document explains what the Digital Invoicing app does and how it fits into  
an ERPNext v15 deployment.  



## Scope

The app integrates ERPNext with Pakistan FBR services for:  



- Digital Invoicing for sales invoices  
- Digital Invoicing for purchase invoices  
- POS Fiscalization 
- buyer registration verification through STATL  
- reference data synchronization from FBR  
- QR code generation for posted invoices





## Runtime Dependencies

- Frappe Framework v15  
- ERPNext v15  
- Python 3.10+  
- valid FBR bearer tokens for DI, STATL, reference sync, and optionally POS





## Required App Relationship

`di` declares `erpnext` as a required app and extends ERPNext doctypes such as:  



- `Sales Invoice`  
- `Purchase Invoice`  
- `Sales Invoice Item`  
- `Purchase Invoice Item`  
- `Customer`  
- `Supplier`  
- `Company`  
- `Item`  
- `POS Profile`  
- `Mode of Payment`  
- `Sales Taxes and Charges`





## Main Building Blocks

### Configuration

The central company-level configuration doctype is `DI Settings`.  



It stores:  



- whether DI is enabled  
- sandbox or production mode  
- automatic posting behavior  
- DI bearer token  
- POS fiscal configuration  
- company NTN/CNIC and address information  
- allowed sale types  
- sandbox scenarios





### Master and Reference Data

The app maintains FBR-facing reference doctypes:  



- `Province`  
- `HS Code`  
- `HS Uom`  
- `Sale Type`  
- `Transaction Type`  
- `SRO Schedule`  
- `SRO Item`  
- `Sandbox Scenario`





These are seeded from fixtures and can be refreshed from FBR APIs.  



### Audit Trail

Every external interaction is logged to `DI Log`, including:  



- API type  
- target document  
- payload  
- response  
- FBR invoice number  
- error code  
- error message

