Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Bulk update of valid upto field wasn't working (backport #28242) #28243

Merged
merged 1 commit into from
Nov 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion erpnext/stock/doctype/item_price/item_price.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import frappe
from frappe import _
from frappe.model.document import Document
from frappe.utils import getdate


class ItemPriceDuplicateItem(frappe.ValidationError):
Expand All @@ -27,7 +28,7 @@ def validate_item(self):

def validate_dates(self):
if self.valid_from and self.valid_upto:
if self.valid_from > self.valid_upto:
if getdate(self.valid_from) > getdate(self.valid_upto):
frappe.throw(_("Valid From Date must be lesser than Valid Upto Date."))

def update_price_list_details(self):
Expand Down