Skip to content

Navigation Menu

Sign in
Sign up

Latest commit

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Invoice Validator

A small Python script that validates supplier invoices by independently recalculating the total from line items and VAT, and comparing it against the invoice's stated total.

Built as a learning exercise translating validation logic originally built in n8n (see the AI Invoice Processing System project) into plain Python, reusable as a function across multiple invoices.

What it does

Given a list of line item amounts, a VAT amount, and a stated total, validate_invoice() returns whether the numbers actually add up, catching cases where a stated total doesn't match what the line items and VAT actually sum to.

Example

Two invoices are checked: one where the totals correctly match, and one with a deliberate 70ドル.55 discrepancy between the stated total and the real sum, to confirm the validation logic actually catches a mismatch.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /