Skip to content
sreynosolabs
Back to projects

Invoicing, collections and KPIs for two companies

Proveedores y Soluciones Industriales

A desktop app that replaced a spreadsheet of thousands of rows and brought the numbers up to date.

This is a private app: I can walk you through it on a video call.

fx =SUM(D2:D3650)
InvoiceCustomerDueStatus
2E001-0412—#REF!paid?
3E001-0413
4E001-0414—#VALUE!#N/A
5paid?
6E001-0416—#DIV/0!
7E001-0417#REF!
8—
invoices_receivable_FINAL_v3.xlsx
Before
Invoice list in the desktop app, with large text, filters at the top and a color label for each status: Not invoiced (gray), Pending (yellow), Paid (green), Overdue (red) and Voided (struck through). Fictional data.After
Before:
A huge spreadsheet with empty cells and broken KPIs.
After:
Invoices, collections and KPIs up to date, straight from the PDF.

The problem

All the invoicing for two companies lived in a single spreadsheet of about 3,650 rows. The companies got mixed up, invoices got lost, costs were rarely filled in and the KPIs had been broken for years: the margins it showed were wrong.

Administrative expenses weren't tracked anywhere, and almost everything was still manual: finding what was pending, matching payments and putting numbers together.

The solution

An app installed on the PC, with large type and labels that say exactly what each thing does. To record an invoice, you just drag in the PDF: the app reads the SUNAT electronic invoice, fills in number, customer, dates, amounts and products, and all that's left is to review and save.

Each invoice shows its status with no math involved (pending, overdue, paid), collections are laid out week by week and, when a customer pays an amount covering several invoices, the app finds which combinations add up to exactly that payment. Purchase-order costs are split automatically and KPIs export to PDF.

Plus a daily automatic backup to Google Drive and updates that install themselves.

The result

The spreadsheet is gone: the app is in daily use. 3,592 historical invoices since 2022 and 3,496 purchase orders were migrated, with nothing typed by hand.

For the first time, the KPIs come from complete data, and every payment is reconciled to the cent.

On screen

Under the hoodTechnical details

Stack

  • Tauri 2 (Rust)
  • React 19 + TypeScript
  • SQLite
  • pdf.js
  • Python (migration)
  • Vitest and cargo test
  • An invoice reader that works with the text layer of SUNAT electronic PDFs: it rebuilds lines from coordinates and extracts each field with tolerant regular expressions, all on the PC without sending anything to the internet.
  • Payment reconciliation as subset sum: depth-first search with pruning and a step cap so the screen never freezes.
  • Updates signed with minisign, with a database backup before each version is installed.
  • Google Drive backup with no server of its own: desktop OAuth with PKCE, token stored in Windows Credential Manager and the minimum scope (drive.file).
  • Business rules as pure functions, tested against in-memory SQLite using the app's own migrations.

Does your business need something like this?

Let's talk about your project
Next projectGrupo IAP