From e6a9252f79e1288c5d4b8f4a9989bfd5354c747b Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sun, 14 May 2023 16:54:56 +0530 Subject: [PATCH 01/16] refactor: replace join with sub-query for fetching accounts --- .../period_closing_voucher/period_closing_voucher.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py index 866a94d04b1..46e2c50e40b 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py @@ -169,21 +169,18 @@ class PeriodClosingVoucher(AccountsController): return frappe.db.sql( """ select - t2.account_currency, + t1.account_currency, {dimension_fields}, sum(t1.debit_in_account_currency) - sum(t1.credit_in_account_currency) as bal_in_account_currency, sum(t1.debit) - sum(t1.credit) as bal_in_company_currency - from `tabGL Entry` t1, `tabAccount` t2 + from `tabGL Entry` t1 where t1.is_cancelled = 0 - and t1.account = t2.name - and t2.report_type = 'Profit and Loss' - and t2.docstatus < 2 - and t2.company = %s + and t1.account in (select name from `tabAccount` where report_type = 'Profit and Loss' and docstatus < 2 and company = %s) and t1.posting_date between %s and %s group by {dimension_fields} """.format( - dimension_fields=", ".join(dimension_fields) + dimension_fields=", ".join(dimension_fields), ), (self.company, self.get("year_start_date"), self.posting_date), as_dict=1, From 387f8b9e1a98a80b7ddd985d7a80cb346c65c9a2 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 17 May 2023 16:17:25 +0530 Subject: [PATCH 02/16] fix: consider 0 if rate/qty are null (backport #35338) (#35341) fix: consider 0 if rate/qty are null (#35338) [skip ci] (cherry picked from commit e5c86bc2e82202522bd803f66dc1bdc00f8e4432) Co-authored-by: Ankush Menat --- .../patches/v13_0/update_amt_in_work_order_required_items.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/patches/v13_0/update_amt_in_work_order_required_items.py b/erpnext/patches/v13_0/update_amt_in_work_order_required_items.py index e37f291233e..64170edb718 100644 --- a/erpnext/patches/v13_0/update_amt_in_work_order_required_items.py +++ b/erpnext/patches/v13_0/update_amt_in_work_order_required_items.py @@ -7,4 +7,6 @@ def execute(): frappe.reload_doc("manufacturing", "doctype", "work_order") frappe.reload_doc("manufacturing", "doctype", "work_order_item") - frappe.db.sql("""UPDATE `tabWork Order Item` SET amount = rate * required_qty""") + frappe.db.sql( + """UPDATE `tabWork Order Item` SET amount = ifnull(rate, 0.0) * ifnull(required_qty, 0.0)""" + ) From 7506132861bcfe5397e4073642f3aa459e6da60b Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 17 May 2023 22:52:13 +0530 Subject: [PATCH 03/16] fix: depreciation schedule for existing assets [v14] (backport #35255) (#35347) * fix: depreciation schedule for existing assets [v14] (#35255) * fix: depreciation schedule for existing assets * chore: correct logic for existing assets and fix test (cherry picked from commit 0a080efce26e99198a326009caa5d353a8fae862) # Conflicts: # erpnext/assets/doctype/asset/asset.py * chore: fix conflict --------- Co-authored-by: Anand Baburajan --- erpnext/assets/doctype/asset/asset.py | 10 ++++++---- erpnext/assets/doctype/asset/test_asset.py | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index 38a66e470cf..d6de519d232 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -432,7 +432,7 @@ class Asset(AccountsController): ) skip_row = True - if depreciation_amount > 0: + if flt(depreciation_amount, self.precision("gross_purchase_amount")) > 0: self.append( "schedules", { @@ -1281,9 +1281,11 @@ def get_straight_line_or_manual_depr_amount(asset, row): ) # if the Depreciation Schedule is being prepared for the first time else: - return (flt(asset.gross_purchase_amount) - flt(row.expected_value_after_useful_life)) / flt( - row.total_number_of_depreciations - ) + return ( + flt(asset.gross_purchase_amount) + - flt(asset.opening_accumulated_depreciation) + - flt(row.expected_value_after_useful_life) + ) / flt(row.total_number_of_depreciations - asset.number_of_depreciations_booked) def get_wdv_or_dd_depr_amount( diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py index 0cf4d5b603a..55154385947 100644 --- a/erpnext/assets/doctype/asset/test_asset.py +++ b/erpnext/assets/doctype/asset/test_asset.py @@ -569,7 +569,7 @@ class TestDepreciationMethods(AssetSetup): ) self.assertEqual(asset.status, "Draft") - expected_schedules = [["2032-12-31", 30000.0, 77095.89], ["2033-06-06", 12904.11, 90000.0]] + expected_schedules = [["2032-12-31", 42904.11, 90000.0]] schedules = [ [cstr(d.schedule_date), flt(d.depreciation_amount, 2), d.accumulated_depreciation_amount] for d in asset.get("schedules") From 6c170abdf939b26d07964964fcd69de68cadaf6d Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 17 May 2023 13:40:33 +0530 Subject: [PATCH 04/16] fix: tds incorrectly calculated for invoice that are below threshold Two purchase invoices for the same supplier, using different tax withholding categories have this issue. | Category | single | cumulative | |----------+--------+------------| | cat1 | 100 | 500 | | cat2 | 1000 | 5000 | 1. PINV1 of net total: 105/- uses cat1. TDS is calculated as it breached single threshold 2. PINV2 of net total: 200/- uses cat2. TDS incorrectly calculated as PINV1 already has TDS calculated and 'consider_party_ledger_amount' is enabled. (cherry picked from commit 84b7c1bba09f89a390a17898b4d8fa665adcbc8f) --- .../tax_withholding_category/tax_withholding_category.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index ea3ec5fc606..778bd0881e3 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -274,7 +274,7 @@ def get_invoice_vouchers(parties, tax_details, company, party_type="Supplier"): "docstatus": 1, } - if not tax_details.get("consider_party_ledger_amount") and doctype != "Sales Invoice": + if doctype != "Sales Invoice": filters.update( {"apply_tds": 1, "tax_withholding_category": tax_details.get("tax_withholding_category")} ) From 06deecbd9272a0af855df2bd9cb338e0a8ec4862 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 18 May 2023 12:00:59 +0530 Subject: [PATCH 05/16] fix(test): cumulative threshold checks (cherry picked from commit 132846bbd107a921dfbfde9240f368bea9382cf7) --- .../test_tax_withholding_category.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py index e80fe11ab30..913326e9c7b 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py @@ -110,9 +110,9 @@ class TestTaxWithholdingCategory(unittest.TestCase): invoices.append(pi1) # Cumulative threshold is 30000 - # Threshold calculation should be on both the invoices - # TDS should be applied only on 1000 - self.assertEqual(pi1.taxes[0].tax_amount, 1000) + # Threshold calculation should be only on the Second invoice + # Second didn't breach, no TDS should be applied + self.assertEqual(pi1.taxes, []) for d in reversed(invoices): d.cancel() From f0c9d89aab6aa61da44553ed88918930eb13228d Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 3 May 2023 16:40:38 +0530 Subject: [PATCH 06/16] fix: bypass flag in Customer Group wasn't effective (cherry picked from commit f9a4972cb621985dcd5e17460627931db0877e8a) --- erpnext/selling/doctype/customer/customer.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py index 483c79bbdbb..af2a4460eee 100644 --- a/erpnext/selling/doctype/customer/customer.py +++ b/erpnext/selling/doctype/customer/customer.py @@ -656,11 +656,15 @@ def get_credit_limit(customer, company): if not credit_limit: customer_group = frappe.get_cached_value("Customer", customer, "customer_group") - credit_limit = frappe.db.get_value( + + result = frappe.db.get_values( "Customer Credit Limit", {"parent": customer_group, "parenttype": "Customer Group", "company": company}, - "credit_limit", + fieldname=["credit_limit", "bypass_credit_limit_check"], + as_dict=True, ) + if result and not result[0].bypass_credit_limit_check: + credit_limit = result[0].credit_limit if not credit_limit: credit_limit = frappe.get_cached_value("Company", company, "credit_limit") From eb243c2470b7a13291cddb12a8d42fbe5d83d37f Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sat, 20 May 2023 21:03:59 +0530 Subject: [PATCH 07/16] fix: allow over-payment against SO (#35079) fix: allow over-payment against SO (#35079) (cherry picked from commit 870b02b03cec923bedf1fa75ffdc488ca958ded7) Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> Co-authored-by: Deepesh Garg --- erpnext/selling/doctype/sales_order/sales_order.js | 2 +- erpnext/startup/boot.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js index dd88b6c498f..3d7c33401ac 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.js +++ b/erpnext/selling/doctype/sales_order/sales_order.js @@ -235,7 +235,7 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend( } } // payment request - if(flt(doc.per_billed)<100) { + if(flt(doc.per_billed, precision('per_billed', doc)) < 100 + frappe.boot.sysdefaults.over_billing_allowance) { this.frm.add_custom_button(__('Payment Request'), () => this.make_payment_request(), __('Create')); this.frm.add_custom_button(__('Payment'), () => this.make_payment_entry(), __('Create')); } diff --git a/erpnext/startup/boot.py b/erpnext/startup/boot.py index 9790d995477..1949fa7e8fe 100644 --- a/erpnext/startup/boot.py +++ b/erpnext/startup/boot.py @@ -22,6 +22,10 @@ def boot_session(bootinfo): bootinfo.sysdefaults.allow_stale = cint( frappe.db.get_single_value("Accounts Settings", "allow_stale") ) + bootinfo.sysdefaults.over_billing_allowance = frappe.db.get_single_value( + "Accounts Settings", "over_billing_allowance" + ) + bootinfo.sysdefaults.quotation_valid_till = cint( frappe.db.get_single_value("Selling Settings", "default_valid_till") ) From dc04b24234cfce54c9adef2cb9c1f0fdaef8cfd5 Mon Sep 17 00:00:00 2001 From: JunKangChin <79857421+JunKangChin@users.noreply.github.com> Date: Mon, 22 May 2023 00:06:10 +0800 Subject: [PATCH 08/16] fix: Incorrect Earned Leaves Proration (#35156) --- .../leave_policy_assignment/leave_policy_assignment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/hr/doctype/leave_policy_assignment/leave_policy_assignment.py b/erpnext/hr/doctype/leave_policy_assignment/leave_policy_assignment.py index bb19ffa9d1e..2330541813e 100644 --- a/erpnext/hr/doctype/leave_policy_assignment/leave_policy_assignment.py +++ b/erpnext/hr/doctype/leave_policy_assignment/leave_policy_assignment.py @@ -192,9 +192,9 @@ def add_current_month_if_applicable(months_passed, date_of_joining, based_on_doj date = getdate(frappe.flags.current_date) or getdate() if based_on_doj: - # if leave type allocation is based on DOJ, and the date of assignment creation is same as DOJ, + # if leave type allocation is based on DOJ, and the date of assignment creation is after DOJ, # then the month should be considered - if date.day == date_of_joining.day: + if date.day >= date_of_joining.day: months_passed += 1 else: last_day_of_month = get_last_day(date) From 66ba74f3fc60a5faad5d80f542c61895060a5a6c Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 9 May 2023 16:30:09 +0530 Subject: [PATCH 09/16] fix: non manufacturing items/fixed asset items in BOM (cherry picked from commit aba8431d709a7ec7b92bf9df1460821955779cf3) --- erpnext/manufacturing/doctype/bom/bom.js | 4 +- erpnext/manufacturing/doctype/bom/bom.py | 5 ++- erpnext/manufacturing/doctype/bom/test_bom.py | 39 +++++++++++++++++++ 3 files changed, 45 insertions(+), 3 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index ae0b26222ee..0b093176e9a 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -48,7 +48,9 @@ frappe.ui.form.on("BOM", { return { query: "erpnext.manufacturing.doctype.bom.bom.item_query", filters: { - "item_code": doc.item + "item_code": doc.item, + "include_item_in_manufacturing": 1, + "is_fixed_asset": 0 } }; }); diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 9ae9b1a4af2..1a56116718d 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -1346,8 +1346,9 @@ def item_query(doctype, txt, searchfield, start, page_len, filters): if not has_variants: query_filters["has_variants"] = 0 - if filters and filters.get("is_stock_item"): - query_filters["is_stock_item"] = 1 + if filters: + for fieldname, value in filters.items(): + query_filters[fieldname] = value return frappe.get_list( "Item", diff --git a/erpnext/manufacturing/doctype/bom/test_bom.py b/erpnext/manufacturing/doctype/bom/test_bom.py index 16280fc8106..6425769cf38 100644 --- a/erpnext/manufacturing/doctype/bom/test_bom.py +++ b/erpnext/manufacturing/doctype/bom/test_bom.py @@ -605,6 +605,45 @@ class TestBOM(FrappeTestCase): bom.update_cost() self.assertFalse(bom.flags.cost_updated) + def test_do_not_include_manufacturing_and_fixed_items(self): + from erpnext.manufacturing.doctype.bom.bom import item_query + + if not frappe.db.exists("Asset Category", "Computers-Test"): + doc = frappe.get_doc({"doctype": "Asset Category", "asset_category_name": "Computers-Test"}) + doc.flags.ignore_mandatory = True + doc.insert() + + for item_code, properties in { + "_Test RM Item 1 Do Not Include In Manufacture": { + "is_stock_item": 1, + "include_item_in_manufacturing": 0, + }, + "_Test RM Item 2 Fixed Asset Item": { + "is_fixed_asset": 1, + "is_stock_item": 0, + "asset_category": "Computers-Test", + }, + "_Test RM Item 3 Manufacture Item": {"is_stock_item": 1, "include_item_in_manufacturing": 1}, + }.items(): + make_item(item_code, properties) + + data = item_query( + "Item", + txt="_Test RM Item", + searchfield="name", + start=0, + page_len=20000, + filters={"include_item_in_manufacturing": 1, "is_fixed_asset": 0}, + ) + + items = [] + for row in data: + items.append(row[0]) + + self.assertTrue("_Test RM Item 1 Do Not Include In Manufacture" not in items) + self.assertTrue("_Test RM Item 2 Fixed Asset Item" not in items) + self.assertTrue("_Test RM Item 3 Manufacture Item" in items) + def get_default_bom(item_code="_Test FG Item 2"): return frappe.db.get_value("BOM", {"item": item_code, "is_active": 1, "is_default": 1}) From 2aa7729243eeb7f2036059a96a941c4492015548 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Mon, 22 May 2023 13:16:06 +0530 Subject: [PATCH 10/16] fix: get_query filters --- erpnext/manufacturing/doctype/bom/bom.js | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index 0b093176e9a..0c2e52cfbb2 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -48,7 +48,6 @@ frappe.ui.form.on("BOM", { return { query: "erpnext.manufacturing.doctype.bom.bom.item_query", filters: { - "item_code": doc.item, "include_item_in_manufacturing": 1, "is_fixed_asset": 0 } From d6427cfe5362ab1f20151ac1f313453ce57d9292 Mon Sep 17 00:00:00 2001 From: vishnu Date: Mon, 22 May 2023 18:00:50 +0000 Subject: [PATCH 11/16] fix: error while saving job card (cherry picked from commit a209fb4b64cfc43f6bf266a6f96275226d2c2707) # Conflicts: # erpnext/manufacturing/doctype/job_card/job_card.json --- erpnext/manufacturing/doctype/job_card/job_card.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.json b/erpnext/manufacturing/doctype/job_card/job_card.json index dd5bb89bee3..aceb73893fe 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.json +++ b/erpnext/manufacturing/doctype/job_card/job_card.json @@ -117,7 +117,8 @@ "fieldname": "for_quantity", "fieldtype": "Float", "in_list_view": 1, - "label": "Qty To Manufacture" + "label": "Qty To Manufacture", + "reqd": 1 }, { "fieldname": "wip_warehouse", @@ -420,7 +421,11 @@ ], "is_submittable": 1, "links": [], +<<<<<<< HEAD "modified": "2021-11-12 10:15:06.572401", +======= + "modified": "2023-05-22 23:26:57.589331", +>>>>>>> a209fb4b64 (fix: error while saving job card) "modified_by": "Administrator", "module": "Manufacturing", "name": "Job Card", From f63b866de301bf405c8df6d96f7c6760e239ee97 Mon Sep 17 00:00:00 2001 From: vishnu Date: Tue, 23 May 2023 04:27:50 +0000 Subject: [PATCH 12/16] fix: use flt instead of mandatory field (cherry picked from commit 8c34cc0e00980d1968e4daee07a88fd85a0b4a52) # Conflicts: # erpnext/manufacturing/doctype/job_card/job_card.json --- erpnext/manufacturing/doctype/job_card/job_card.json | 7 +++++-- erpnext/manufacturing/doctype/job_card/job_card.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.json b/erpnext/manufacturing/doctype/job_card/job_card.json index aceb73893fe..3d2467b113c 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.json +++ b/erpnext/manufacturing/doctype/job_card/job_card.json @@ -117,8 +117,7 @@ "fieldname": "for_quantity", "fieldtype": "Float", "in_list_view": 1, - "label": "Qty To Manufacture", - "reqd": 1 + "label": "Qty To Manufacture" }, { "fieldname": "wip_warehouse", @@ -421,11 +420,15 @@ ], "is_submittable": 1, "links": [], +<<<<<<< HEAD <<<<<<< HEAD "modified": "2021-11-12 10:15:06.572401", ======= "modified": "2023-05-22 23:26:57.589331", >>>>>>> a209fb4b64 (fix: error while saving job card) +======= + "modified": "2023-05-23 09:56:43.826602", +>>>>>>> 8c34cc0e00 (fix: use flt instead of mandatory field) "modified_by": "Administrator", "module": "Manufacturing", "name": "Job Card", diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index 092ad1ffe83..f9ffc3529dc 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -657,7 +657,7 @@ class JobCard(Document): self.status = {0: "Open", 1: "Submitted", 2: "Cancelled"}[self.docstatus or 0] if self.docstatus < 2: - if self.for_quantity <= self.transferred_qty: + if flt(self.for_quantity) <= flt(self.transferred_qty): self.status = "Material Transferred" if self.time_logs: From 8d97f8b0b73f6e2614b275edf5a608fec9379093 Mon Sep 17 00:00:00 2001 From: Sagar Sharma Date: Tue, 23 May 2023 10:54:27 +0530 Subject: [PATCH 13/16] chore: `conflicts` --- erpnext/manufacturing/doctype/job_card/job_card.json | 8 -------- 1 file changed, 8 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.json b/erpnext/manufacturing/doctype/job_card/job_card.json index 3d2467b113c..43dc5c0b7be 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.json +++ b/erpnext/manufacturing/doctype/job_card/job_card.json @@ -420,15 +420,7 @@ ], "is_submittable": 1, "links": [], -<<<<<<< HEAD -<<<<<<< HEAD - "modified": "2021-11-12 10:15:06.572401", -======= "modified": "2023-05-22 23:26:57.589331", ->>>>>>> a209fb4b64 (fix: error while saving job card) -======= - "modified": "2023-05-23 09:56:43.826602", ->>>>>>> 8c34cc0e00 (fix: use flt instead of mandatory field) "modified_by": "Administrator", "module": "Manufacturing", "name": "Job Card", From f65be40037f381955b38971b314c988d3fff8f6e Mon Sep 17 00:00:00 2001 From: Saurabh Date: Tue, 23 May 2023 12:39:20 +0530 Subject: [PATCH 14/16] fix: change field-type to remove currency field from total row in export --- .../report/salary_register/salary_register.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/erpnext/payroll/report/salary_register/salary_register.py b/erpnext/payroll/report/salary_register/salary_register.py index 94369e4a468..81cd688e371 100644 --- a/erpnext/payroll/report/salary_register/salary_register.py +++ b/erpnext/payroll/report/salary_register/salary_register.py @@ -182,14 +182,7 @@ def get_columns(earning_types, ded_types): "fieldname": "payment_days", "fieldtype": "Float", "width": 120, - }, - { - "label": _("Currency"), - "fieldname": "currency", - "fieldtype": "Link", - "options": "Currency", - "hidden": 1, - }, + } ] for earning in earning_types: @@ -247,6 +240,13 @@ def get_columns(earning_types, ded_types): "options": "currency", "width": 120, }, + { + "label": _("Currency"), + "fieldname": "currency", + "fieldtype": "Data", + "options": "Currency", + "hidden": 1, + }, ] ) From 137898d55d8dbac591c28b298ba2761b85e0f579 Mon Sep 17 00:00:00 2001 From: Sagar Sharma Date: Fri, 19 May 2023 12:57:47 +0530 Subject: [PATCH 15/16] fix: Pick List TypeError (cherry picked from commit a1119171141d64eac0a6bb1227c101c93645d8be) --- erpnext/stock/doctype/pick_list/pick_list.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/pick_list/pick_list.py b/erpnext/stock/doctype/pick_list/pick_list.py index effba8e579b..e88b132e02b 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.py +++ b/erpnext/stock/doctype/pick_list/pick_list.py @@ -292,7 +292,7 @@ def get_items_with_location_and_quantity(item_doc, item_location_map, docstatus) item_doc.qty if (docstatus == 1 and item_doc.stock_qty == 0) else item_doc.stock_qty ) - while remaining_stock_qty > 0 and available_locations: + while flt(remaining_stock_qty) > 0 and available_locations: item_location = available_locations.pop(0) item_location = frappe._dict(item_location) From 0a42e6ff0f6dd1c7ef53031bdf58aa422c09bb73 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Tue, 23 May 2023 15:36:23 +0530 Subject: [PATCH 16/16] fix: linter --- erpnext/payroll/report/salary_register/salary_register.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/payroll/report/salary_register/salary_register.py b/erpnext/payroll/report/salary_register/salary_register.py index 81cd688e371..8ee971e8d38 100644 --- a/erpnext/payroll/report/salary_register/salary_register.py +++ b/erpnext/payroll/report/salary_register/salary_register.py @@ -182,7 +182,7 @@ def get_columns(earning_types, ded_types): "fieldname": "payment_days", "fieldtype": "Float", "width": 120, - } + }, ] for earning in earning_types: