Odoo 19 app

FBR Digital Invoicing

Pakistan FBR Digital Invoicing for Odoo 19: customer invoices and debit notes go to the FBR / PRAL DI API, and the FBR invoice number is printed on the invoice with its QR code.

FBR Digital InvoicingPRAL DI APISandbox Scenarios SN001-SN028FBR Invoice NumberQR CodeDebit NotesRetry QueueUrdu

What it does

Sales tax registered businesses in Pakistan must share every sale invoice with FBR in real time through the Digital Invoicing (DI) API run by PRAL. This module connects Odoo Invoicing to that API: when you confirm a customer invoice, Odoo checks it with FBR, posts it, stores the FBR invoice number and prints it on the invoice with the QR code FBR asks for.

Who it is for

  • Sales tax registered manufacturers in Pakistan. Every sale invoice has to be shared with FBR through the PRAL Digital Invoicing API. This app sends confirmed customer invoices from Odoo Invoicing, stores the FBR invoice number and prints it with the QR code.
  • Importers and distributors with mixed tax treatments. Each product carries its HS code, FBR unit of measure, sale type, rate text and SRO details, and each tax is mapped to sales tax, further tax, extra tax, FED or tax withheld. Standard, reduced, exempt and third schedule lines can sit on the same system.
  • Wholesalers who issue debit notes. A debit note goes to FBR as a Debit Note with the FBR number of the original invoice as its reference, so the adjustment is tied to the sale it corrects.
  • Accounts teams that need to see what FBR said. Every validate and post call is kept in the FBR Log with the JSON sent and the JSON returned. A rejected invoice shows the error code, FBR's message and a short hint on what to change.

Features

Validate, then posteach invoice is first sent to validateinvoicedata; only data FBR calls valid is posted to postinvoicedata, so no invalid invoice is registered.
FBR invoice number on the invoicethe number FBR returns, its date and the item numbers are stored; the invoice PDF prints the number, a 1 x 1 inch QR code and the Digital Invoicing logo you upload.
Sandbox scenarios and productionswitch between the sandbox (with the scenario ID SN001-SN028 per invoice, as FBR requires for testing) and production; each environment has its own security token.
Debit notesdebit notes are sent as "Debit Note" with the FBR number of the original invoice as invoiceRefNo. Credit notes can be sent too once FBR lists that document type for your profile.
Rejections explainedwhen FBR rejects an invoice, the error code, the FBR message and a plain "what to change" line are shown on the invoice.
Retry queueinvoices that could not reach FBR are queued and sent again every 10 minutes while Send on Confirm is on. With it off, nothing is sent automatically and queued invoices wait until you click Send to FBR. An accepted invoice is never sent twice and cannot be reset to draft.
Products and taxesHS code, FBR unit of measure, sale type, rate text, SRO schedule and SRO item serial on the product; each tax is mapped to sales tax, further tax, extra tax, FED or ST withheld.
Reference data and buyer checksdownload provinces, document types, HS codes, SRO items, transaction types and units from FBR, look up rates, SRO schedules and HS units, and check a buyer with Get_Reg_Type and STATL.

Setting it up

  1. Register your software for Digital Invoicing with FBR and get the sandbox and production security tokens from PRAL.
  2. Go to Invoicing > Configuration > Settings and find the Pakistan FBR Digital Invoicing block. Turn on FBR Digital Invoicing.
  3. Set FBR DI Environment to Sandbox, paste the Sandbox Security Token, and fill Seller NTN/CNIC and Seller Province. Pick a Default Sandbox Scenario and upload the FBR Digital Invoicing Logo.
  4. Decide on Send on Confirm and Validate Before Posting, then click Test Connection and Download Reference Data.
  5. On each product, open the FBR tab and fill FBR HS Code, FBR Unit of Measure (or press From FBR), FBR Sale Type and FBR Rate Description. On each sales tax, set FBR Digital Invoicing Field.
  6. On customers, open the Accounting tab, enter FBR NTN/CNIC and FBR Province, and press Check with FBR to read their registration type and active taxpayer status.
  7. Confirm invoices and run the sandbox scenarios for your business. When that's done, switch the environment to Production and enter the production token.

FBR Digital Invoicing: questions

Do I need anything from FBR before installing?

Yes. You need a PRAL security token for each environment, which comes with your Digital Invoicing registration. Without a token nothing can be sent, and the invoice tells you which setting is missing.

What happens when FBR can't be reached?

The invoice stays confirmed in Odoo and is marked Queued for Retry. A scheduled action sends queued invoices again every 10 minutes. An invoice FBR has already accepted is never sent twice.

Can I edit an invoice after FBR accepted it?

No. It can't be reset to draft. You issue a debit note, or a credit note if your profile allows it, instead.

Are credit notes sent?

Only if you fill Credit Note Document Type with the document type FBR lists for your profile. Left empty, credit notes stay out of Digital Invoicing.

Is this the FBR POS integration for retailers?

No. It covers invoices and debit notes made in Odoo Invoicing, not the separate FBR system for point of sale. It runs on Community or Enterprise and includes an Urdu translation.

Will it tell me the correct sales tax treatment?

No. It sends the rates, sale types and HS codes you configure. Which treatment applies to your goods is something to confirm with your tax adviser or FBR.