Merge pull request #23168 from ruchamahabal/fix-appointment-overlap
fix: don't overwrite patient appointment duration if already specified
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
index 31613e5..2397b7d 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
@@ -447,7 +447,7 @@
{
"allow_on_submit": 1,
"fieldname": "po_no",
- "fieldtype": "Small Text",
+ "fieldtype": "Data",
"hide_days": 1,
"hide_seconds": 1,
"label": "Customer's Purchase Order",
@@ -1946,7 +1946,7 @@
"idx": 181,
"is_submittable": 1,
"links": [],
- "modified": "2020-08-03 23:31:12.675040",
+ "modified": "2020-08-27 01:56:28.532140",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice",
diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py
index 2a14be8..92cfdb7 100644
--- a/erpnext/controllers/taxes_and_totals.py
+++ b/erpnext/controllers/taxes_and_totals.py
@@ -9,6 +9,7 @@
from erpnext.controllers.accounts_controller import validate_conversion_rate, \
validate_taxes_and_charges, validate_inclusive_tax
from erpnext.stock.get_item_details import _get_item_tax_template
+from erpnext.accounts.doctype.pricing_rule.utils import get_applied_pricing_rules
class calculate_taxes_and_totals(object):
def __init__(self, doc):
@@ -209,7 +210,7 @@
elif tax.charge_type == "On Previous Row Total":
current_tax_fraction = (tax_rate / 100.0) * \
self.doc.get("taxes")[cint(tax.row_id) - 1].grand_total_fraction_for_current_item
-
+
elif tax.charge_type == "On Item Quantity":
inclusive_tax_amount_per_qty = flt(tax_rate)
@@ -607,7 +608,7 @@
base_rate_with_margin = 0.0
if item.price_list_rate:
if item.pricing_rules and not self.doc.ignore_pricing_rule:
- for d in json.loads(item.pricing_rules):
+ for d in get_applied_pricing_rules(item.pricing_rules):
pricing_rule = frappe.get_cached_doc('Pricing Rule', d)
if (pricing_rule.margin_type == 'Amount' and pricing_rule.currency == self.doc.currency)\
diff --git a/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py b/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py
index e6c10ad..742d18c 100644
--- a/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py
+++ b/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py
@@ -90,6 +90,7 @@
update_cost()
def replace_bom(args):
+ frappe.db.auto_commit_on_many_writes = 1
args = frappe._dict(args)
doc = frappe.get_doc("BOM Update Tool")
@@ -97,6 +98,8 @@
doc.new_bom = args.new_bom
doc.replace_bom()
+ frappe.db.auto_commit_on_many_writes = 0
+
def update_cost():
frappe.db.auto_commit_on_many_writes = 1
bom_list = get_boms_in_bottom_up_order()
diff --git a/erpnext/selling/doctype/customer/customer_dashboard.py b/erpnext/selling/doctype/customer/customer_dashboard.py
index cf23465..532c11b 100644
--- a/erpnext/selling/doctype/customer/customer_dashboard.py
+++ b/erpnext/selling/doctype/customer/customer_dashboard.py
@@ -33,7 +33,7 @@
},
{
'label': _('Support'),
- 'items': ['Issue', 'Maintenance Visit']
+ 'items': ['Issue', 'Maintenance Visit', 'Installation Note', 'Warranty Claim']
},
{
'label': _('Projects'),
diff --git a/erpnext/templates/generators/item/item_inquiry.js b/erpnext/templates/generators/item/item_inquiry.js
index 52ddae2..e7db3a3 100644
--- a/erpnext/templates/generators/item/item_inquiry.js
+++ b/erpnext/templates/generators/item/item_inquiry.js
@@ -22,6 +22,13 @@
},
{
fieldtype: 'Data',
+ label: __('Phone Number'),
+ fieldname: 'phone',
+ options: 'Phone',
+ reqd: 1
+ },
+ {
+ fieldtype: 'Data',
label: __('Subject'),
fieldname: 'subject',
reqd: 1