Skip to content

fix: respect Item Price validity dates when fetching POS prices - #341

Open
tushar-git26 wants to merge 1 commit into
BrainWise-DEV:developfrom
Vijay-micronxt:fix/item-price-validity
Open

fix: respect Item Price validity dates when fetching POS prices#341
tushar-git26 wants to merge 1 commit into
BrainWise-DEV:developfrom
Vijay-micronxt:fix/item-price-validity

Conversation

@tushar-git26

Copy link
Copy Markdown

Item Price queries fetched all rows for an item/price list without filtering on valid_from/valid_upto and collapsed them into a UOM-keyed map where the last arbitrarily-ordered row wins. With multiple Item Price records for the same item, the POS could show an expired or stale price instead of the latest valid one.

Add validity-date filters and order by valid_from so the newest valid price wins, matching ERPNext core get_item_price behaviour. Applies to search_by_barcode, get_item_variants, get_items (grid and template min variant price) and get_items_bulk.

Item Price queries fetched all rows for an item/price list without
filtering on valid_from/valid_upto and collapsed them into a UOM-keyed
map where the last arbitrarily-ordered row wins. With multiple Item
Price records for the same item, the POS could show an expired or
stale price instead of the latest valid one.

Add validity-date filters and order by valid_from so the newest valid
price wins, matching ERPNext core get_item_price behaviour. Applies to
search_by_barcode, get_item_variants, get_items (grid and template min
variant price) and get_items_bulk.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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