Skip to content

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

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

feat(trade-in): validate active warehouse stock for trade-in serial numbers#398
iamtalib13 wants to merge 1 commit into
Aakvatech-Limited:version-15from
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

@aakvatech
aakvatech changed the base branch from version-15 to version-15-hotfix August 14, 2026 19:10
@aakvatech
aakvatech changed the base branch from version-15-hotfix to version-15 August 14, 2026 19:11
@aakvatech

Copy link
Copy Markdown
Contributor

@iamtalib13 please redo this for version-15-hotfix and not version-15 branch

@aakvatech aakvatech closed this Aug 14, 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.

2 participants