Merge branch 'develop' into fix-appointment-booking

This commit is contained in:
Sagar Vora
2022-12-16 10:36:48 +00:00
committed by GitHub
6 changed files with 14 additions and 8 deletions

View File

@@ -305,6 +305,7 @@
"fieldname": "source_exchange_rate", "fieldname": "source_exchange_rate",
"fieldtype": "Float", "fieldtype": "Float",
"label": "Exchange Rate", "label": "Exchange Rate",
"precision": "9",
"print_hide": 1, "print_hide": 1,
"reqd": 1 "reqd": 1
}, },
@@ -334,6 +335,7 @@
"fieldname": "target_exchange_rate", "fieldname": "target_exchange_rate",
"fieldtype": "Float", "fieldtype": "Float",
"label": "Exchange Rate", "label": "Exchange Rate",
"precision": "9",
"print_hide": 1, "print_hide": 1,
"reqd": 1 "reqd": 1
}, },
@@ -731,7 +733,7 @@
"index_web_pages_for_search": 1, "index_web_pages_for_search": 1,
"is_submittable": 1, "is_submittable": 1,
"links": [], "links": [],
"modified": "2022-02-23 20:08:39.559814", "modified": "2022-12-08 16:25:43.824051",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Payment Entry", "name": "Payment Entry",

View File

@@ -280,7 +280,8 @@ class Subscription(Document):
self.validate_plans_billing_cycle(self.get_billing_cycle_and_interval()) self.validate_plans_billing_cycle(self.get_billing_cycle_and_interval())
self.validate_end_date() self.validate_end_date()
self.validate_to_follow_calendar_months() self.validate_to_follow_calendar_months()
self.cost_center = erpnext.get_default_cost_center(self.get("company")) if not self.cost_center:
self.cost_center = erpnext.get_default_cost_center(self.get("company"))
def validate_trial_period(self): def validate_trial_period(self):
""" """

View File

@@ -102,7 +102,7 @@ def create_party_contact(doctype, fullname, user, party_name):
contact = frappe.new_doc("Contact") contact = frappe.new_doc("Contact")
contact.update({"first_name": fullname, "email_id": user}) contact.update({"first_name": fullname, "email_id": user})
contact.append("links", dict(link_doctype=doctype, link_name=party_name)) contact.append("links", dict(link_doctype=doctype, link_name=party_name))
contact.append("email_ids", dict(email_id=user)) contact.append("email_ids", dict(email_id=user, is_primary=True))
contact.flags.ignore_mandatory = True contact.flags.ignore_mandatory = True
contact.insert(ignore_permissions=True) contact.insert(ignore_permissions=True)

View File

@@ -204,7 +204,7 @@ class TransactionDeletionRecord(Document):
@frappe.whitelist() @frappe.whitelist()
def get_doctypes_to_be_ignored(): def get_doctypes_to_be_ignored():
doctypes_to_be_ignored_list = [ doctypes_to_be_ignored = [
"Account", "Account",
"Cost Center", "Cost Center",
"Warehouse", "Warehouse",
@@ -223,4 +223,7 @@ def get_doctypes_to_be_ignored():
"Customer", "Customer",
"Supplier", "Supplier",
] ]
return doctypes_to_be_ignored_list
doctypes_to_be_ignored.extend(frappe.get_hooks("company_data_to_be_ignored") or [])
return doctypes_to_be_ignored

View File

@@ -828,9 +828,9 @@ def insert_item_price(args):
): ):
if frappe.has_permission("Item Price", "write"): if frappe.has_permission("Item Price", "write"):
price_list_rate = ( price_list_rate = (
(args.rate + args.discount_amount) / args.get("conversion_factor") (flt(args.rate) + flt(args.discount_amount)) / args.get("conversion_factor")
if args.get("conversion_factor") if args.get("conversion_factor")
else (args.rate + args.discount_amount) else (flt(args.rate) + flt(args.discount_amount))
) )
item_price = frappe.db.get_value( item_price = frappe.db.get_value(

View File

@@ -82,7 +82,7 @@ def get_item_info(filters):
item.safety_stock, item.safety_stock,
item.lead_time_days, item.lead_time_days,
) )
.where(item.is_stock_item == 1) .where((item.is_stock_item == 1) & (item.disabled == 0))
) )
if brand := filters.get("brand"): if brand := filters.get("brand"):