Merge pull request #38147 from kunhimohamed/develop
fix: issue occured when creating supplier with contact details
diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py
index 371474e..5c18e50 100644
--- a/erpnext/accounts/party.py
+++ b/erpnext/accounts/party.py
@@ -236,7 +236,9 @@
if shipping_address:
party_details.update(
shipping_address=shipping_address,
- shipping_address_display=render_address(shipping_address),
+ shipping_address_display=render_address(
+ shipping_address, check_permissions=not ignore_permissions
+ ),
**get_fetch_values(doctype, "shipping_address", shipping_address)
)
diff --git a/erpnext/accounts/report/tax_withholding_details/tax_withholding_details.py b/erpnext/accounts/report/tax_withholding_details/tax_withholding_details.py
index 06c9e44..f6c7bd3 100644
--- a/erpnext/accounts/report/tax_withholding_details/tax_withholding_details.py
+++ b/erpnext/accounts/report/tax_withholding_details/tax_withholding_details.py
@@ -184,6 +184,16 @@
"width": 180,
}
)
+ else:
+ columns.append(
+ {
+ "label": _(filters.get("party_type")),
+ "fieldname": "party",
+ "fieldtype": "Dynamic Link",
+ "options": "party_type",
+ "width": 180,
+ }
+ )
columns.extend(
[
diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
index ad1aa2b..1891261 100644
--- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
+++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
@@ -20,6 +20,10 @@
"valid_till",
"quotation_number",
"amended_from",
+ "accounting_dimensions_section",
+ "cost_center",
+ "dimension_col_break",
+ "project",
"currency_and_price_list",
"currency",
"conversion_rate",
@@ -896,6 +900,27 @@
"fieldtype": "Small Text",
"label": "Billing Address Details",
"read_only": 1
+ },
+ {
+ "fieldname": "cost_center",
+ "fieldtype": "Link",
+ "label": "Cost Center",
+ "options": "Cost Center"
+ },
+ {
+ "fieldname": "project",
+ "fieldtype": "Link",
+ "label": "Project",
+ "options": "Project"
+ },
+ {
+ "fieldname": "dimension_col_break",
+ "fieldtype": "Column Break"
+ },
+ {
+ "fieldname": "accounting_dimensions_section",
+ "fieldtype": "Section Break",
+ "label": "Accounting Dimensions"
}
],
"icon": "fa fa-shopping-cart",
@@ -903,7 +928,7 @@
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
- "modified": "2023-11-03 13:21:40.172508",
+ "modified": "2023-11-17 12:34:30.083077",
"modified_by": "Administrator",
"module": "Buying",
"name": "Supplier Quotation",
diff --git a/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.json b/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.json
index 4bbcacf..a6229b5 100644
--- a/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.json
+++ b/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.json
@@ -68,6 +68,8 @@
"column_break_15",
"manufacturer_part_no",
"ad_sec_break",
+ "cost_center",
+ "dimension_col_break",
"project",
"section_break_44",
"page_break"
@@ -133,7 +135,6 @@
"fieldtype": "Column Break"
},
{
- "fetch_from": "item_code.image",
"fieldname": "image",
"fieldtype": "Attach",
"hidden": 1,
@@ -554,13 +555,23 @@
"fieldname": "expected_delivery_date",
"fieldtype": "Date",
"label": "Expected Delivery Date"
+ },
+ {
+ "fieldname": "cost_center",
+ "fieldtype": "Link",
+ "label": "Cost Center",
+ "options": "Cost Center"
+ },
+ {
+ "fieldname": "dimension_col_break",
+ "fieldtype": "Column Break"
}
],
"idx": 1,
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
- "modified": "2023-11-14 18:35:03.435817",
+ "modified": "2023-11-17 12:25:26.235367",
"modified_by": "Administrator",
"module": "Buying",
"name": "Supplier Quotation Item",
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index 5483a10..55ffaca 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -539,6 +539,8 @@
"Subcontracting Receipt",
"Subcontracting Receipt Item",
"Account Closing Balance",
+ "Supplier Quotation",
+ "Supplier Quotation Item",
]
get_matching_queries = (
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 0aeadce..6c10dd9 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -350,5 +350,6 @@
erpnext.patches.v15_0.rename_daily_depreciation_to_depreciation_amount_based_on_num_days_in_month
erpnext.patches.v15_0.rename_depreciation_amount_based_on_num_days_in_month_to_daily_prorata_based
erpnext.patches.v15_0.set_reserved_stock_in_bin
+erpnext.patches.v14_0.create_accounting_dimensions_in_supplier_quotation
# below migration patch should always run last
erpnext.patches.v14_0.migrate_gl_to_payment_ledger
diff --git a/erpnext/patches/v14_0/create_accounting_dimensions_in_supplier_quotation.py b/erpnext/patches/v14_0/create_accounting_dimensions_in_supplier_quotation.py
new file mode 100644
index 0000000..6966db1
--- /dev/null
+++ b/erpnext/patches/v14_0/create_accounting_dimensions_in_supplier_quotation.py
@@ -0,0 +1,8 @@
+from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import (
+ create_accounting_dimensions_for_doctype,
+)
+
+
+def execute():
+ create_accounting_dimensions_for_doctype(doctype="Supplier Quotation")
+ create_accounting_dimensions_for_doctype(doctype="Supplier Quotation Item")
diff --git a/erpnext/projects/doctype/timesheet/timesheet.py b/erpnext/projects/doctype/timesheet/timesheet.py
index 11156f4..8e464b5 100644
--- a/erpnext/projects/doctype/timesheet/timesheet.py
+++ b/erpnext/projects/doctype/timesheet/timesheet.py
@@ -69,7 +69,7 @@
def update_billing_hours(self, args):
if args.is_billable:
- if flt(args.billing_hours) == 0.0:
+ if flt(args.billing_hours) == 0.0 or flt(args.billing_hours) > flt(args.hours):
args.billing_hours = args.hours
else:
args.billing_hours = 0
diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.json b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.json
index 8be1c1b..383a83b 100644
--- a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.json
+++ b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.json
@@ -11,6 +11,7 @@
"naming_series",
"supplier",
"supplier_name",
+ "supplier_delivery_note",
"column_break1",
"company",
"posting_date",
@@ -634,12 +635,17 @@
"fieldtype": "Button",
"label": "Get Scrap Items",
"options": "get_scrap_items"
+ },
+ {
+ "fieldname": "supplier_delivery_note",
+ "fieldtype": "Data",
+ "label": "Supplier Delivery Note"
}
],
"in_create": 1,
"is_submittable": 1,
"links": [],
- "modified": "2023-08-26 10:52:04.050829",
+ "modified": "2023-11-16 13:04:00.710534",
"modified_by": "Administrator",
"module": "Subcontracting",
"name": "Subcontracting Receipt",