Skip to content
Centriu
Centriu Gauge

Proof-of-Payment Persistence Automation: Paid, With Proof That Vanished on Reload

Centriu Gauge lets a bill be marked as paid with a proof-of-payment document attached at the same time — a receipt, a bank confirmation, whatever evidence the payment actually happened. The action that recorded this attached document, before this fix, created the document's record using a client-generated identifier built from the current timestamp, kept only in the browser's own in-memory component state — that record was never written to the database, and the actual file selected was never uploaded to storage at all. The bill's own paid status WAS genuinely persisted, correctly, to the database. The proof document attached alongside it existed solely as long as that specific browser tab stayed open on that specific screen: a page reload lost the reference to it entirely, and even before any reload, there had never been an actual downloadable file stored anywhere to lose — the upload step had simply never been attempted. Fixed by persisting the document's real metadata to the database first (yielding a genuine, permanent identifier), then uploading the actual file to storage keyed by that real identifier, with a visible error shown to the person if either step genuinely fails, rather than a failure logged only to the browser's own developer console where no one settling a bill would ever see it.
Never written, never uploaded
Real record, real file
Bill payment and document attachment screen
Paid, with proof that vanished on reload.

A record that lives only in a browser tab is not a record at all

Updating a screen's own local, in-memory state immediately after an action feels, and often is, the correct way to give someone instant visual feedback that something just happened — a new item appears in a list the moment they finish an action, with no visible delay waiting for a server round-trip. The risk is specific to what happens when that immediate, local update is the ONLY place the new data ever actually lives: a browser tab's own in-memory state is, by its nature, temporary — it disappears the moment the tab is closed or the page is reloaded, and it was never shared with any other device, teammate, or session in the first place. Any piece of data meant to be a durable record of something that happened has to be written somewhere that outlives the specific browser tab that created it, or it is not genuinely a record — it is a temporary illusion of one.

How the underlying problem shows up before you fix it

A record's own identifier is generated on the client (a timestamp-based string, for example) rather than being assigned by, and read back from, the actual database after a genuine insert — meaning that identifier has no corresponding row anywhere until, and unless, something separately writes one.

An action that is supposed to attach or reference a file only updates a screen's own local, in-memory list of items — with no corresponding call to actually upload the underlying file to a storage system at all.

One part of a combined action (here: marking a bill paid) is genuinely and correctly persisted, while a DIFFERENT part of the same combined action (attaching proof of that payment) is not — creating a state where the overall action LOOKS fully successful, because the more visible half of it worked.

A page reload, a different device, or a colleague opening the same record from their own session reveals that a specific piece of data — an attached document, in this case — that was clearly visible moments earlier during the original action, is simply gone, with no error message ever having been shown to explain why.

Errors from a background action (a failed upload, a failed database write) are sent only to a browser's own developer console, invisible to the actual person performing the action, rather than being surfaced as a visible message they would notice.

How a proof document that only existed in memory became a genuinely stored one

Centriu Gauge's Accounts Payable screen lets a person settle an outstanding bill and, in the same action, attach a proof-of-payment document — a receipt or bank confirmation evidencing that the payment genuinely occurred, an important part of a real financial audit trail for any organization tracking its own payables carefully.

Before this fix, completing this action built a document object entirely in local JavaScript memory: `const newDoc: FinancialDocument = { id: \`doc${Date.now()}\`, payableId, fileName: documentData.file.name, ... }` — an identifier constructed from the current timestamp, with no corresponding row ever written to any database table, and updated the screen's own displayed document list with `setDocuments(prev => [...prev, newDoc])` — a purely local, in-memory state update. The actual file the person had selected — the real receipt or confirmation image or PDF — was never uploaded anywhere; no call to any storage system existed in this path at all. Immediately afterward, the code DID correctly call `payableService.markAsPaid(payableId, paymentDate, accountId)`, which genuinely persisted the bill's own paid status, its payment date, and which cashbox account the payment came from, to the real database.

The practical result: a person settling a bill and attaching proof would see, in that exact moment, both the bill move to "Paid" status and a document appear in the attached-documents list — a completely successful-looking action, end to end, on screen. The bill's paid status genuinely was correct and durable. The attached document, however, existed only in that specific browser tab's own memory: reloading the page, returning to the same bill later, or a colleague opening the identical record from a different session would show no proof document at all, because none had ever actually been written anywhere durable — not to a database table recording its existence, and not to any storage location holding the actual file. The one piece of the action specifically meant to serve as durable evidence that a payment happened was the one piece that was never genuinely saved.

The fix corrects both halves of the persistence gap in sequence. The document's real metadata is now created first, through `documentService.create({ payableId, fileName, fileType, documentType, uploadDate, supplierId })` — a genuine database insert returning a real, permanent row identifier (`savedDoc.id`), rather than a value invented on the client. That real identifier is then used to upload the actual selected file to Supabase Storage, at a path keyed specifically by that database identifier (`gauge-documents/<savedDoc.id>/<fileName>`) — matching the exact path convention the product's own document-download feature already expects elsewhere, so a stored file is genuinely retrievable later, not merely present in storage under some unrelated name. The upload step is treated as best-effort relative to the metadata write that precedes it — a storage failure is logged rather than aborting the whole action, on the reasoning that the document's own record (proving intent and providing basic information) is more important to preserve than blocking the entire payment-settlement action over a transient storage hiccup — but ANY failure in the overall settlement flow now surfaces a visible error message to the person performing the action, replacing a prior behavior where a failure was written only to the browser's own developer console, someplace no one settling a real bill would ever think to check.

What is actually built today

Centriu Gauge persists a proof-of-payment document's real metadata to the database, with a genuine, permanent identifier, before referencing it anywhere else in the settlement action.

The actual selected file is uploaded to storage, keyed by that real, permanent database identifier, at the exact path convention the product's own document-download feature already expects — a stored file is genuinely retrievable later.

A proof-of-payment document attached during bill settlement survives a page reload, a different device, and a colleague opening the same record from an independent session, because it now lives in the database and in storage rather than only in one browser tab's own memory.

Any failure during the settlement action — a document metadata write failing, a payment status update failing — now surfaces a visible error message to the person performing the action, rather than being logged only to a developer console no one settling a real bill would see.

A storage upload failure specifically is treated as non-fatal relative to the document's own metadata record, which is written first and independently — the intent and basic information about the attached proof survives even in the rare case the file upload itself has a transient failure.

A receipt that was there, until it wasn't (illustrative framing of the actual measured finding)

Before the fix, a person settling a bill inside Centriu Gauge and attaching a bank confirmation receipt would see the bill move to "Paid" and the receipt appear in the attached-documents list, both immediately and both looking entirely correct. Returning to that same bill the next day — or simply reloading the page — would still show the bill correctly as "Paid," but the attached receipt would be gone, with no record it had ever existed and no actual file to be found anywhere in storage. After the fix, the identical action persists a real document record and uploads the actual file, and the receipt remains genuinely attached and downloadable indefinitely afterward.

What changes operationally

Centriu Gauge now genuinely persists a proof-of-payment document's metadata and actual file whenever a bill is settled with a document attached, closing a gap where the bill's own paid status was correctly and durably saved while the attached evidence of that payment existed only in the originating browser tab's temporary memory — gone on reload, and never actually uploaded to storage in the first place.

When this is not the right fit

This automation governs Centriu Gauge's own internal persistence of proof-of-payment documents specifically attached during bill settlement — it does not change the settlement action itself (a bill's paid status was already correctly persisted before this fix), and does not add a new document-management feature beyond making the existing attach-during-settlement flow genuinely durable.

Immediate local feedback vs. immediate feedback backed by a real write

Updating a screen's own local state immediately after an action, before waiting for a server round-trip to confirm it, is a reasonable pattern for responsiveness — most of the time, the local update and the eventual server state agree, and the person sees instant feedback with no perceptible cost. The risk is specific to a case where the local update was never actually followed by a real, durable write at all — the immediate feedback becomes the entire lifespan of the data, rather than a preview of a save already genuinely in progress. Writing the real record first, and reflecting it on screen once that write is confirmed (or, as here, immediately alongside a fire-and-forget write that is independently checked for failure), keeps the responsiveness while ensuring the data the screen shows actually corresponds to something durable.

Related systems

Main system: Centriu Gauge.

What it does NOT do

  • Does not change how a bill's own paid status is recorded — that was already correctly and durably persisted before this fix; the gap was specific to the proof-of-payment document attached alongside it.
  • Does not retroactively recover any proof-of-payment document that was "attached" during the affected period before this fix shipped — since no record or file was ever actually saved for those, there is nothing to restore; a team with that concern would need to re-attach proof for any bills settled during that window where the original evidence is still available.
  • Does not change the document-download feature's own expected storage path convention — the fix specifically matches the existing convention that feature already relies on, rather than introducing a new one.
  • Does not treat a storage-upload failure as fatal to the overall settlement action — the bill's paid status and the document's own metadata record are still saved even if the file upload specifically has a transient failure, with that failure now visibly surfaced rather than silently logged.
  • Does not overlap with this pillar's separate finding about Centriu Gauge's own realtime-update display gap — that is covered on its own companion page and is an unrelated mechanism in a different part of the product.

Security and governance

Centriu Gauge now persists a proof-of-payment document's real metadata and actual file whenever a bill is settled with a document attached, closing a gap where a financial audit-trail document existed only in a browser tab's temporary memory rather than in durable storage. Full detail on access control and audit trails lives at /governanca and /iso.

Pricing and contracting

Available by custom proposal, arranged directly with the team. Values and terms come from the official pricing table at /precos (Centriu's central source — never restated here).

Frequently asked questions

Was the bill's own paid status ever affected by this defect?

No — the bill's paid status, payment date, and cashbox account were always correctly and durably persisted to the database. The gap was specific to the attached proof-of-payment document, not the payment record itself.

Was the actual receipt or confirmation file ever uploaded anywhere before the fix?

No — the upload step had never been attempted at all before this fix; the document existed only as an in-memory object in the browser, with no file ever sent to storage.

How does the fix know where to store the file so it can be found again later?

It uploads the file to a path keyed by the document's own real, permanent database identifier, matching the exact convention the product's own document-download feature already expects when looking for a stored file.

What happens now if the file upload itself fails for some reason?

The document's own metadata record is written first and independently, so it survives even if the subsequent file upload has a transient failure — and any failure in the overall action now shows a visible error message rather than only logging to a developer console.

Can proof documents lost during the affected period be recovered?

No — since no record or file was ever actually saved for those, there is nothing to restore automatically; the original proof would need to be re-attached if it is still available.

What does Centriu Gauge cost?

It is sold by subscription with a published starting price — exact current values are on the central pricing page.

See how Centriu Gauge keeps proof of payment genuinely on file

Reach our commercial team directly, or leave your details below — we'll follow up with guidance for your case.

Sources

  1. Centriu Gauge — public product page — Centriu, 2026-07-20 · link(primária)
  2. Centriu Gauge — public factsheet (API, JSON) — Centriu, 2026-07-21 · link
  3. Law No. 13,709/2018 — Brazil’s General Data Protection Law (LGPD) — Presidência da República (Brazil), 2018-08-14 · link

Last material update on .

By · AI-assisted production, with human review