Skip to content

fix(request-pickup): allow positive COD payout deficits - #250

Merged
yan-ad merged 1 commit into
mainfrom
fix/request-pickup-effective-cod-payout
Jul 16, 2026
Merged

fix(request-pickup): allow positive COD payout deficits#250
yan-ad merged 1 commit into
mainfrom
fix/request-pickup-effective-cod-payout

Conversation

@yan-ad

@yan-ad yan-ad commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • allow COD deficit rows to remain selectable for request pickup when their effective COD payout is non-negative
  • calculate pickup eligibility from WC total minus discounted shipping, insurance, and COD fee instead of blocking on the stale deficit flag alone
  • keep deficit rows blocked when the effective payout is still negative

Why

Some orders are flagged as deficit because the stored minimum/deficit calculation used raw values, but the actual effective COD payout can still be positive after shipping discounts. Those orders should be processable in the request pickup checklist instead of being disabled only because is_deficit is set.

Validation

  • rtk vendor/bin/paratest --configuration paratest.xml --filter RequestPickupPaymentFlowTest
  • rtk make zip

@yan-ad
yan-ad merged commit 8924336 into main Jul 16, 2026
2 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.

1 participant