In this guide
A correct grand total can hide the missing line
A supplier invoice arrives as a two-page PDF. Your extractor gets the final total of SAR 575 right, but misses the second line on the first page. If the table goes straight to accounts payable, the invoice header agrees and the allocation across expense accounts is incomplete. Keep invoice headers and extracted lines in separate tables joined by a stable invoice identifier.
Select the extraction route
If you can select the text, start with Excel Power Query’s PDF import where your Excel installation offers it. Choose the table in the Navigator and inspect the result before loading. If the file is scanned, use OCR or approved invoice extraction that supports the document language, and test it against a known Arabic and English sample. Keep the source pages. Use an approved workspace for supplier documents and share only fields the review needs.
At line level keep invoice ID, page and line reference, description, quantity, unit price, discounts, net amount, VAT shown and currency. Capture supplier identifier and invoice date on the header. Treat unclear values as exceptions. Check for page totals and repeated headers that look like items.
Rebuild the total from two lines
Assume a fictional domestic SAR invoice with all items at 15% VAT, no document-level adjustment and no prepayment.
| Source | Quantity × unit price | Discount SAR | Net SAR | VAT SAR |
|---|---|---|---|---|
| Page 1, line 1 | 3 × 120 | 0 | 360 | 54 |
| Page 1, line 2 | 2 × 80 | 20 | 140 | 21 |
| Verified total | 20 | 500 | 75 |
The line total is SAR 500 and the tax is SAR 75. If line 2 is missing, the reconstructed gross is SAR 414, leaving SAR 161 unexplained. For an invoice with mixed rates, allowances or rounding, retain the printed components and group the check by tax category.
Mark exceptions before anyone posts the file
Extract the invoice header and line items into separate tables. Cite the source page for every item. Keep discounts distinct from VAT. Mark unreadable values and repeated rows for review. Recompute net, tax and gross, and show any difference from the printed totals. Leave posting decisions to the reviewer.
Confirm the supplier identity and invoice number, check duplicate candidates against the ledger, and retain the original alongside the reviewed worksheet. Have the reviewer clear missing lines and tax differences before any import.
Sources
- Microsoft Power Query PDF connector (new tab)
- Microsoft documentation on extracting invoice fields and lines (new tab)
- ZATCA guidance on tax invoices and VAT records (new tab)
Sources checked ·
