Skip to content

Commit

Permalink
Merge branch 'develop' into fix-appointment-booking
Browse files Browse the repository at this point in the history
  • Loading branch information
sagarvora authored Dec 16, 2022
2 parents 4802d71 + 6bb22c7 commit 9989ccb
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
4 changes: 3 additions & 1 deletion erpnext/accounts/doctype/payment_entry/payment_entry.json
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@
"fieldname": "source_exchange_rate",
"fieldtype": "Float",
"label": "Exchange Rate",
"precision": "9",
"print_hide": 1,
"reqd": 1
},
Expand Down Expand Up @@ -334,6 +335,7 @@
"fieldname": "target_exchange_rate",
"fieldtype": "Float",
"label": "Exchange Rate",
"precision": "9",
"print_hide": 1,
"reqd": 1
},
Expand Down Expand Up @@ -731,7 +733,7 @@
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2022-02-23 20:08:39.559814",
"modified": "2022-12-08 16:25:43.824051",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Entry",
Expand Down
3 changes: 2 additions & 1 deletion erpnext/accounts/doctype/subscription/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,8 @@ def validate(self):
self.validate_plans_billing_cycle(self.get_billing_cycle_and_interval())
self.validate_end_date()
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):
"""
Expand Down
2 changes: 1 addition & 1 deletion erpnext/portal/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def create_party_contact(doctype, fullname, user, party_name):
contact = frappe.new_doc("Contact")
contact.update({"first_name": fullname, "email_id": user})
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.insert(ignore_permissions=True)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def delete_communications(self, doctype, company_fieldname):

@frappe.whitelist()
def get_doctypes_to_be_ignored():
doctypes_to_be_ignored_list = [
doctypes_to_be_ignored = [
"Account",
"Cost Center",
"Warehouse",
Expand All @@ -223,4 +223,7 @@ def get_doctypes_to_be_ignored():
"Customer",
"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
4 changes: 2 additions & 2 deletions erpnext/stock/get_item_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -828,9 +828,9 @@ def insert_item_price(args):
):
if frappe.has_permission("Item Price", "write"):
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")
else (args.rate + args.discount_amount)
else (flt(args.rate) + flt(args.discount_amount))
)

item_price = frappe.db.get_value(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def get_item_info(filters):
item.safety_stock,
item.lead_time_days,
)
.where(item.is_stock_item == 1)
.where((item.is_stock_item == 1) & (item.disabled == 0))
)

if brand := filters.get("brand"):
Expand Down

0 comments on commit 9989ccb

Please sign in to comment.