Skip to content

fix: persist discount fields when clearing quote discount#58

Merged
darshgupta-wisdm merged 1 commit into
mainfrom
fix/quote-discount-persistence
Apr 16, 2026
Merged

fix: persist discount fields when clearing quote discount#58
darshgupta-wisdm merged 1 commit into
mainfrom
fix/quote-discount-persistence

Conversation

@darshgupta-wisdm

Copy link
Copy Markdown
Collaborator

Summary

  • updateQuote used ...(discountType && { discountType }) which silently dropped null values — clearing a discount had no effect
  • Changed to always persist discount fields with explicit null: discountType: discountType || null
  • Also merged data.settings from the form into saved settings JSON so deposit/signature preferences are not lost on save

Test plan

  • Create a quote with a 10% discount, save, verify discount persists
  • Edit the quote and remove the discount, save, verify discount is cleared
  • Edit a quote with deposit/signature settings, save, verify settings persist

Fixes #55

🤖 Generated with Claude Code

The updateQuote action used a spread pattern `...(discountType && {...})`
which silently dropped null values — clearing a discount had no effect.
Changed to always persist discount fields with explicit null.

Also merged `data.settings` from the form into the saved settings JSON
so deposit/signature preferences are not lost on save.

Fixes #55

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@darshgupta-wisdm darshgupta-wisdm merged commit c107cdc into main Apr 16, 2026
4 checks passed
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.

Bug: Quote discount disappears after saving

1 participant