Skip to content

fix: add validation to prevent saving empty or incomplete invoices#50

Open
Mikey3600 wants to merge 1 commit intoseetadev:mainfrom
Mikey3600:fix/invoice-validation-before-save
Open

fix: add validation to prevent saving empty or incomplete invoices#50
Mikey3600 wants to merge 1 commit intoseetadev:mainfrom
Mikey3600:fix/invoice-validation-before-save

Conversation

@Mikey3600
Copy link
Copy Markdown

Summary

Fixes #48

Adds validation to prevent users from saving empty or incomplete invoices in both Save and Save As workflows.

Changes

  • Added empty content check in doSave() before saving — shows toast message if invoice is empty
  • Added empty content check in doSaveAs() before saving — same validation applied consistently
  • User sees "Cannot save an empty invoice!" toast message when attempting to save empty spreadsheet
  • Prevents corrupt or blank invoice records from being stored

Testing

  • Tested Save with empty spreadsheet — toast message appears correctly
  • Tested Save As with empty spreadsheet — toast message appears correctly
  • Tested Save with valid content — saves successfully as before
  • No regressions in existing save functionality

PR Category

  • Bug Fix

- Added empty content check in doSave() before saving
- Added empty content check in doSaveAs() before saving
- Shows toast message 'Cannot save an empty invoice!' to user
- Fixes seetadev#48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add invoice validation before save to prevent empty/incomplete invoices

1 participant