Fbr Integration
FBR Integration for ERPNext — integrates with FBR's Digital Invoicing (DI) system to submit sales invoices directly to FBR.
- Author: ERPNEXT-PAKISTAN
- Repository: https://github.com/ERPNEXT-PAKISTAN/FBR_Integration
- GitHub stars: 0
- Forks: 1
- License: MIT
- Category: Integrations
- Maintenance: Actively Maintained
Install Fbr Integration
bench get-app https://github.com/ERPNEXT-PAKISTAN/FBR_Integration
Add the Frappe Gems badge to your README
Maintain Fbr Integration? Paste this into your README:
[](https://frappegems.com/gems/apps/ERPNEXT-PAKISTAN/FBR_Integration)
About Fbr Integration
FBR Integration
FBR Integration for ERPNext — integrates with FBR's Digital Invoicing (DI) system to submit sales invoices directly to FBR.
Installation
You can install this app using the bench CLI:
cd ~/frappe-bench
bench get-app fbr_integration https://github.com/ERPNEXT-PAKISTAN/FBR_Integration.git --branch main
bench --site site1.local install-app fbr_integration
bench --site site1.local migrate
bench build --app fbr_integration
bench restart
Updating an Existing Installation
If you already have the app installed and want to pull the latest changes:
cd ~/frappe-bench/apps/fbr_integration
git fetch origin
git checkout main
git pull origin main
cd ~/frappe-bench
bench --site site1.local migrate
bench build --app fbr_integration
bench --site site1.local clear-cache
bench restart
Important notes:
- Do not run
bench get-appfor an app that is already installed inapps/fbr_integration. - If your repo uses
upstreamremote instead oforigin, replaceoriginwithupstreamin the commands above. - If your local branch has custom commits/diverges, resolve git merge/rebase first, then run migrate/build.
Scenario Files
The authoritative FBR scenario source is kept in fbr_integration/scenario_data/source/:
DI_Scenarios_Summary.txt— JSON payloads with scenario descriptions
The build process generates:
- 28 individual scenario JSON files: SN001.json through SN028.json
- Scenario index catalog: index.json
These generated files are published to fbr_integration/public/scenario_docs/ as static assets.
The Sales Invoice form loads scenarios from this catalog for the searchable Scenario Index dialog and View Scenario detail popup.
To rebuild scenarios after editing the source text file:
cd ~/frappe-bench/apps/fbr_integration
python3 fbr_integration/scenario_data/build_scenario_docs.py
The build script validates each scenario for:
- Valid scenario ID format (SN001–SN028)
- Required fields: title, description, sample payload
- Required JSON payload keys: invoiceType, scenarioId, items
Short command (after app environment is installed/updated):
fbr-build-scenarios
Contributing
This app uses pre-commit for code formatting and linting. Please install pre-commit and enable it for this repository:
cd apps/fbr_integration
pre-commit install
Pre-commit is configured to use the following tools for checking and formatting your code:
- ruff
- eslint
- prettier
- pyupgrade
CI
This app can use GitHub Actions for CI. The following workflows are configured:
- CI: Installs this app and runs unit tests on every push to
developbranch. - Linters: Runs Frappe Semgrep Rules and pip-audit on every pull request.
License
mit
Related Integrations apps for Frappe & ERPNext
- Insights — Open Source Business Intelligence Tool
- Raven — Simple, open source team messaging platform
- Frappe Whatsapp — WhatsApp cloud integration for frappe
- Frappe Assistant Core — Infrastructure that connects LLMs to ERPNext. Frappe Assistant Core works with the Model Context Protocol (MCP) to expose ERPNext functionality to any compatible Language Model
- Biometric Attendance Sync Tool — A simple tool for syncing Biometric Attendance data with your ERPNext server
- Frappe React Sdk — React hooks for Frappe
- Frappe Js Sdk — TypeScript/JavaScript library for Frappe REST API
- Mcp — Frappe MCP allows Frappe apps to function as MCP servers