Skip to content

feat(trade-in): validate active warehouse stock for trade-in serial numbers - #399

Closed
iamtalib13 wants to merge 1 commit into
Aakvatech-Limited:version-15-hotfixfrom
iamtalib13:feat/validate-active-trade-in-serial-no
Closed

feat(trade-in): validate active warehouse stock for trade-in serial numbers#399
iamtalib13 wants to merge 1 commit into
Aakvatech-Limited:version-15-hotfixfrom
iamtalib13:feat/validate-active-trade-in-serial-no

Conversation

@iamtalib13

Copy link
Copy Markdown
Contributor

Summary

Added validation for Trade-In Serial Numbers to prevent receiving serial numbers that are already active in warehouse stock.

Changes

  • Added validation in validate_trade_in_serial_no_and_batch.
  • Checks whether the Trade-In Serial Number is already assigned to a warehouse.
  • Checks whether the Serial No status is Active.
  • Shows a user-friendly validation error on Sales Invoice save.
  • Prevents duplicate stock creation during Trade-In.

Testing

  1. Create an active Serial No assigned to a warehouse.
  2. Create a Sales Invoice with Is Trade In enabled.
  3. Enter the same Serial No in the Trade-In Serial No field.
  4. Click Save.
  5. Verify that validation error is displayed and the document is not saved.

Files Modified

  • csf_tz/custom_api.py

@iamtalib13
iamtalib13 force-pushed the feat/validate-active-trade-in-serial-no branch 3 times, most recently from 3fccadf to 37577a3 Compare August 15, 2026 09:15
@iamtalib13
iamtalib13 force-pushed the feat/validate-active-trade-in-serial-no branch from 37577a3 to efaa818 Compare August 15, 2026 09:20
@iamtalib13 iamtalib13 closed this Aug 15, 2026
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