From d042330c30354acbb7b2439972f580ac647a7b84 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 18 Dec 2024 10:54:21 +0530 Subject: [PATCH 01/17] fix: use utility method to generate url (cherry picked from commit b970eb8b1507813b5c13bce6be4a9a10eb1769db) --- .../doctype/plaid_settings/plaid_settings.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.js b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.js index dae16f46663..a3b401e090a 100644 --- a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.js +++ b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.js @@ -25,7 +25,12 @@ frappe.ui.form.on("Plaid Settings", { method: "erpnext.erpnext_integrations.doctype.plaid_settings.plaid_settings.enqueue_synchronization", freeze: true, callback: () => { - let bank_transaction_link = 'Bank Transaction'; + let bank_transaction_link = frappe.utils.get_form_link( + "Bank Transaction", + "", + true, + "Bank Transaction" + ); frappe.msgprint({ title: __("Sync Started"), From 510e3cebc9278fbff7eb28b92c03c2449c486468 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Wed, 18 Dec 2024 13:47:37 +0530 Subject: [PATCH 02/17] fix: 'str' object has no attribute 'get_sql' (cherry picked from commit 9a43acb65c3930cfd552d25e6aa3f3909bb4adf9) --- erpnext/accounts/report/financial_statements.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index cd0f7e90e04..02f9c827b52 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -528,13 +528,12 @@ def get_accounting_entries( from frappe.desk.reportview import build_match_conditions + query, params = query.walk() match_conditions = build_match_conditions(doctype) if match_conditions: query += "and" + match_conditions - query, params = query.walk() - return frappe.db.sql(query, params, as_dict=True) From 82a3fd13f22aa0e16c67e8a54ed1c1919efbb175 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 18 Dec 2024 17:28:22 +0530 Subject: [PATCH 03/17] fix: added docs.frappe.io in documentation_url (#44776) (cherry picked from commit febdf4c61e0a2b748aa11c23c8e83dcfc6089599) --- .github/helper/documentation.py | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/helper/documentation.py b/.github/helper/documentation.py index 83346045f89..d07c880684e 100644 --- a/.github/helper/documentation.py +++ b/.github/helper/documentation.py @@ -10,6 +10,7 @@ WEBSITE_REPOS = [ DOCUMENTATION_DOMAINS = [ "docs.erpnext.com", + "docs.frappe.io", "frappeframework.com", ] From d2ede713e4dcfd68e061f84f07ce452290e312ea Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 13:37:00 +0530 Subject: [PATCH 04/17] fix: slow posting datetime update (backport #44799) (#44804) fix: slow posting datetime update Co-authored-by: Rohit Waghchaure --- erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py index 523a1d15cee..c0c72d9b3ee 100644 --- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py +++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py @@ -41,6 +41,7 @@ class StockLedgerEntry(Document): self.flags.ignore_submit_comment = True from erpnext.stock.utils import validate_disabled_warehouse, validate_warehouse_company + self.set_posting_datetime() self.validate_mandatory() self.validate_item() self.validate_batch() @@ -56,7 +57,6 @@ class StockLedgerEntry(Document): from erpnext.stock.utils import get_combine_datetime self.posting_datetime = get_combine_datetime(self.posting_date, self.posting_time) - self.db_set("posting_datetime", self.posting_datetime) def validate_inventory_dimension_negative_stock(self): if self.is_cancelled: @@ -128,7 +128,6 @@ class StockLedgerEntry(Document): return inv_dimension_dict def on_submit(self): - self.set_posting_datetime() self.check_stock_frozen_date() self.calculate_batch_qty() From 422ada2726ca17a69bf4ed16f7d44e12a8c11948 Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Mon, 23 Dec 2024 08:48:46 +0530 Subject: [PATCH 05/17] fix: Remove typo (cherry picked from commit ba28f6bf7331b3ef86a49fbcce959e601956a1a4) --- erpnext/accounts/doctype/bank_account/bank_account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/bank_account/bank_account.py b/erpnext/accounts/doctype/bank_account/bank_account.py index 28a4a41e28e..e51c792e8ea 100644 --- a/erpnext/accounts/doctype/bank_account/bank_account.py +++ b/erpnext/accounts/doctype/bank_account/bank_account.py @@ -21,7 +21,7 @@ class BankAccount(Document): self.name = self.account_name + " - " + self.bank def on_trash(self): - delete_contact_and_address("BankAccount", self.name) + delete_contact_and_address("Bank Account", self.name) def validate(self): self.validate_company() From 4cb27b97b4324c8205b574db096ce5c5d9e0464d Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 10:54:34 +0530 Subject: [PATCH 06/17] fix: closing stock balance permissions (backport #44791) (#44792) * fix: closing stock balance permissions (#44791) (cherry picked from commit 3662a6a41d2e1e4631c964dffa4d215542a38af1) # Conflicts: # erpnext/stock/doctype/closing_stock_balance/closing_stock_balance.json * chore: fix conflicts --------- Co-authored-by: rohitwaghchaure --- .../closing_stock_balance.json | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/closing_stock_balance/closing_stock_balance.json b/erpnext/stock/doctype/closing_stock_balance/closing_stock_balance.json index 0c4757ffadb..c1e5878a439 100644 --- a/erpnext/stock/doctype/closing_stock_balance/closing_stock_balance.json +++ b/erpnext/stock/doctype/closing_stock_balance/closing_stock_balance.json @@ -113,7 +113,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2023-05-17 11:46:04.448220", + "modified": "2024-12-19 13:48:46.618066", "modified_by": "Administrator", "module": "Stock", "name": "Closing Stock Balance", @@ -121,6 +121,7 @@ "owner": "Administrator", "permissions": [ { + "cancel": 1, "create": 1, "delete": 1, "email": 1, @@ -130,6 +131,35 @@ "report": 1, "role": "System Manager", "share": 1, + "submit": 1, + "write": 1 + }, + { + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Stock Manager", + "share": 1, + "submit": 1, + "write": 1 + }, + { + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Stock User", + "share": 1, + "submit": 1, "write": 1 } ], From 0179358f07519633e35300bbf8da0e32222f9115 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Tue, 10 Dec 2024 14:28:22 +0100 Subject: [PATCH 07/17] fix: permissions for marking Quotation as lost (cherry picked from commit 4d5241486ffa426fe7b17be3354a93ae0896d730) # Conflicts: # erpnext/crm/doctype/competitor/competitor.json # erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.json --- .../crm/doctype/competitor/competitor.json | 27 ++++++++++++------- .../quotation_lost_reason.json | 20 ++++++++++++++ 2 files changed, 38 insertions(+), 9 deletions(-) diff --git a/erpnext/crm/doctype/competitor/competitor.json b/erpnext/crm/doctype/competitor/competitor.json index fd6da239212..2348394d30e 100644 --- a/erpnext/crm/doctype/competitor/competitor.json +++ b/erpnext/crm/doctype/competitor/competitor.json @@ -38,7 +38,11 @@ "table_fieldname": "competitors" } ], +<<<<<<< HEAD "modified": "2023-11-23 19:33:54.284279", +======= + "modified": "2024-12-10 08:26:38.496003", +>>>>>>> 4d5241486f (fix: permissions for marking Quotation as lost) "modified_by": "Administrator", "module": "CRM", "name": "Competitor", @@ -53,20 +57,25 @@ "print": 1, "read": 1, "report": 1, - "role": "System Manager", + "role": "Sales Master Manager", "share": 1, "write": 1 }, { - "create": 1, - "email": 1, - "export": 1, - "print": 1, "read": 1, - "report": 1, - "role": "Sales User", - "share": 1, - "write": 1 + "role": "Sales User" + }, + { + "read": 1, + "role": "Sales Manager" + }, + { + "read": 1, + "role": "Maintenance Manager" + }, + { + "read": 1, + "role": "Maintenance User" } ], "quick_entry": 1, diff --git a/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.json b/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.json index 0eae08e8707..e1eafb527e3 100644 --- a/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.json +++ b/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.json @@ -32,7 +32,11 @@ "table_fieldname": "lost_reasons" } ], +<<<<<<< HEAD "modified": "2023-11-23 19:31:02.743353", +======= + "modified": "2024-12-10 08:21:38.280627", +>>>>>>> 4d5241486f (fix: permissions for marking Quotation as lost) "modified_by": "Administrator", "module": "Setup", "name": "Quotation Lost Reason", @@ -49,6 +53,22 @@ "role": "Sales Master Manager", "share": 1, "write": 1 + }, + { + "read": 1, + "role": "Sales User" + }, + { + "read": 1, + "role": "Sales Manager" + }, + { + "read": 1, + "role": "Maintenance User" + }, + { + "read": 1, + "role": "Maintenance Manager" } ], "quick_entry": 1, From 67ba639ae1ce6b09b1cb4dda094170e9c382dd6d Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 23 Dec 2024 11:16:04 +0530 Subject: [PATCH 08/17] chore: resolve conflicts --- erpnext/crm/doctype/competitor/competitor.json | 4 ---- .../doctype/quotation_lost_reason/quotation_lost_reason.json | 4 ---- 2 files changed, 8 deletions(-) diff --git a/erpnext/crm/doctype/competitor/competitor.json b/erpnext/crm/doctype/competitor/competitor.json index 2348394d30e..021488ab99b 100644 --- a/erpnext/crm/doctype/competitor/competitor.json +++ b/erpnext/crm/doctype/competitor/competitor.json @@ -38,11 +38,7 @@ "table_fieldname": "competitors" } ], -<<<<<<< HEAD - "modified": "2023-11-23 19:33:54.284279", -======= "modified": "2024-12-10 08:26:38.496003", ->>>>>>> 4d5241486f (fix: permissions for marking Quotation as lost) "modified_by": "Administrator", "module": "CRM", "name": "Competitor", diff --git a/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.json b/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.json index e1eafb527e3..a0e0f176ddf 100644 --- a/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.json +++ b/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.json @@ -32,11 +32,7 @@ "table_fieldname": "lost_reasons" } ], -<<<<<<< HEAD - "modified": "2023-11-23 19:31:02.743353", -======= "modified": "2024-12-10 08:21:38.280627", ->>>>>>> 4d5241486f (fix: permissions for marking Quotation as lost) "modified_by": "Administrator", "module": "Setup", "name": "Quotation Lost Reason", From 7fa3a789b13f94fbab45a4de9dffdd8dfc2df5c9 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 17 Dec 2024 17:54:08 +0530 Subject: [PATCH 09/17] fix: buying rate for service item in gross profit report (cherry picked from commit 8d6e79a16f52723da3b494a2e863f8e77d4419ac) --- erpnext/accounts/report/gross_profit/gross_profit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py index 15617a53cdf..5539954231a 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -726,12 +726,13 @@ class GrossProfitGenerator: .inner_join(purchase_invoice) .on(purchase_invoice.name == purchase_invoice_item.parent) .select( - purchase_invoice.name, purchase_invoice_item.base_rate / purchase_invoice_item.conversion_factor, ) .where(purchase_invoice.docstatus == 1) .where(purchase_invoice.posting_date <= self.filters.to_date) .where(purchase_invoice_item.item_code == item_code) + .where(purchase_invoice.is_return == 0) + .where(purchase_invoice_item.parenttype == "Purchase Invoice") ) if row.project: From 197b13eb8762e4be0d035621f6e9897b86e38e62 Mon Sep 17 00:00:00 2001 From: vishakhdesai Date: Fri, 20 Dec 2024 18:03:42 +0530 Subject: [PATCH 10/17] fix: update correct cost center in Accounts Receivable Report (cherry picked from commit 09776e9a5ab6221329b3f6e8e3ad94aee0e43d5d) --- .../accounts/report/accounts_receivable/accounts_receivable.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index f488b1a5832..974e14b7352 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -145,6 +145,9 @@ class ReceivablePayableReport: if key not in self.voucher_balance: self.voucher_balance[key] = self.build_voucher_dict(ple) + if ple.voucher_type == ple.against_voucher_type and ple.voucher_no == ple.against_voucher_no: + self.voucher_balance[key].cost_center = ple.cost_center + self.get_invoices(ple) if self.filters.get("group_by_party"): From 97d5d18041547b2a1d5b7e49480de62065cdb519 Mon Sep 17 00:00:00 2001 From: vishakhdesai Date: Fri, 20 Dec 2024 18:41:51 +0530 Subject: [PATCH 11/17] fix: do not set cost_center update_voucher_balance as it is set in init_voucher_balance (cherry picked from commit 3b36ce560c1faeeff93c428a589522138ab364d2) --- .../report/accounts_receivable/accounts_receivable.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 974e14b7352..eeff456291a 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -129,7 +129,6 @@ class ReceivablePayableReport: paid_in_account_currency=0.0, credit_note_in_account_currency=0.0, outstanding_in_account_currency=0.0, - cost_center=ple.cost_center, ) def init_voucher_balance(self): @@ -273,9 +272,6 @@ class ReceivablePayableReport: row.paid -= amount row.paid_in_account_currency -= amount_in_account_currency - if not row.cost_center and ple.cost_center: - row.cost_center = str(ple.cost_center) - def update_sub_total_row(self, row, party): total_row = self.total_row_map.get(party) From d0c60343cd48584867991164f2533552c9b7110a Mon Sep 17 00:00:00 2001 From: venkat102 Date: Tue, 17 Dec 2024 13:15:02 +0530 Subject: [PATCH 12/17] chore: use get function (cherry picked from commit 1663c7983eac8112b535c467ca9c3845f94bb577) --- .../tax_withholding_category/tax_withholding_category.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 798e264a532..57039424948 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -507,7 +507,7 @@ def get_tds_amount(ldc, parties, inv, tax_details, vouchers): ) supp_credit_amt = supp_jv_credit_amt - supp_credit_amt += inv.tax_withholding_net_total + supp_credit_amt += inv.get("tax_withholding_net_total", 0) for type in payment_entry_amounts: if type.payment_type == "Pay": @@ -519,9 +519,9 @@ def get_tds_amount(ldc, parties, inv, tax_details, vouchers): cumulative_threshold = tax_details.get("cumulative_threshold", 0) if inv.doctype != "Payment Entry": - tax_withholding_net_total = inv.base_tax_withholding_net_total + tax_withholding_net_total = inv.get("base_tax_withholding_net_total", 0) else: - tax_withholding_net_total = inv.tax_withholding_net_total + tax_withholding_net_total = inv.get("tax_withholding_net_total", 0) if (threshold and tax_withholding_net_total >= threshold) or ( cumulative_threshold and (supp_credit_amt + supp_inv_credit_amt) >= cumulative_threshold From 1093c227f1bce2280a7d56d42c69c0b0d59a7d58 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Tue, 17 Dec 2024 13:15:41 +0530 Subject: [PATCH 13/17] fix: fetch tax withholding category from the voucher (cherry picked from commit 09e64594dbd694e4a77b287a08d4e44fd2bc6aba) --- .../accounts/report/tds_payable_monthly/tds_payable_monthly.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.py b/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.py index 03a5259b96f..3c03005b1cb 100644 --- a/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.py +++ b/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.py @@ -405,7 +405,7 @@ def get_doc_info(vouchers, doctype, tax_category_map, net_total_map=None): "paid_amount_after_tax", "base_paid_amount", ], - "Journal Entry": ["total_debit"], + "Journal Entry": ["tax_withholding_category", "total_debit"], } entries = frappe.get_all( From c9d43f4c88660325427419870d23fff879e26696 Mon Sep 17 00:00:00 2001 From: Nijith anil <83776819+nijithanil@users.noreply.github.com> Date: Mon, 23 Dec 2024 14:48:32 +0530 Subject: [PATCH 14/17] fix(ux): purchase invoice link in error message (#44797) * fix(ux): purchase invoice link in error message * chore: fix linter --------- Co-authored-by: ruthra kumar (cherry picked from commit 6f00a87a9c3036d450dbae22fed53ba8a420b0db) --- .../accounts/doctype/purchase_invoice/purchase_invoice.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index e9e4ffea804..e131b01f9f3 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -1443,7 +1443,12 @@ class PurchaseInvoice(BuyingController): if pi: pi = pi[0][0] - frappe.throw(_("Supplier Invoice No exists in Purchase Invoice {0}").format(pi)) + + frappe.throw( + _("Supplier Invoice No exists in Purchase Invoice {0}").format( + get_link_to_form("Purchase Invoice", pi) + ) + ) def update_billing_status_in_pr(self, update_modified=True): if self.is_return and not self.update_billed_amount_in_purchase_receipt: From 177ca6f431df7ffcf7e26671cf2d49f2f9f42b3c Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 22:30:45 +0530 Subject: [PATCH 15/17] fix: Warehouse wise Stock Value chart roles (backport #44865) (#44866) fix: Warehouse wise Stock Value chart roles (#44865) (cherry picked from commit 7d41805d0e91d681a92b292946f1d63c54f11dd0) Co-authored-by: rohitwaghchaure --- .../warehouse_wise_stock_value.json | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/dashboard_chart/warehouse_wise_stock_value/warehouse_wise_stock_value.json b/erpnext/stock/dashboard_chart/warehouse_wise_stock_value/warehouse_wise_stock_value.json index a07b55382ca..400ec5e0e64 100644 --- a/erpnext/stock/dashboard_chart/warehouse_wise_stock_value/warehouse_wise_stock_value.json +++ b/erpnext/stock/dashboard_chart/warehouse_wise_stock_value/warehouse_wise_stock_value.json @@ -1,19 +1,37 @@ { "chart_name": "Warehouse wise Stock Value", "chart_type": "Custom", - "creation": "2020-07-20 21:01:04.296157", + "creation": "2022-03-30 00:58:02.018824", "docstatus": 0, "doctype": "Dashboard Chart", "filters_json": "{}", "idx": 0, "is_public": 1, "is_standard": 1, - "modified": "2020-07-22 13:01:01.815123", + "last_synced_on": "2024-12-23 18:44:46.822164", + "modified": "2024-12-23 19:31:17.003946", "modified_by": "Administrator", "module": "Stock", "name": "Warehouse wise Stock Value", "number_of_groups": 0, "owner": "Administrator", + "roles": [ + { + "role": "Sales Manager" + }, + { + "role": "Accounts Manager" + }, + { + "role": "Stock Manager" + }, + { + "role": "Stock User" + }, + { + "role": "Accounts User" + } + ], "source": "Warehouse wise Stock Value", "timeseries": 0, "type": "Bar", From d55fe7d33f42a778c8f7064a073c7b0db7884a73 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Thu, 19 Dec 2024 16:27:04 +0530 Subject: [PATCH 16/17] fix: correct tds rate with lower deduction certificate (cherry picked from commit cb9c12d4952f68cf4a175fdd3adc470f37e40272) --- .../tax_withholding_category/tax_withholding_category.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 57039424948..15287f200fb 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -215,14 +215,14 @@ def get_tax_row_for_tds(tax_details, tax_amount): } -def get_lower_deduction_certificate(company, tax_details, pan_no): +def get_lower_deduction_certificate(company, posting_date, tax_details, pan_no): ldc_name = frappe.db.get_value( "Lower Deduction Certificate", { "pan_no": pan_no, "tax_withholding_category": tax_details.tax_withholding_category, - "valid_from": (">=", tax_details.from_date), - "valid_upto": ("<=", tax_details.to_date), + "valid_from": ("<=", posting_date), + "valid_upto": (">=", posting_date), "company": company, }, "name", @@ -270,7 +270,7 @@ def get_tax_amount(party_type, parties, inv, tax_details, posting_date, pan_no=N tax_amount = 0 if party_type == "Supplier": - ldc = get_lower_deduction_certificate(inv.company, tax_details, pan_no) + ldc = get_lower_deduction_certificate(inv.company, posting_date, tax_details, pan_no) if tax_deducted: net_total = inv.tax_withholding_net_total if ldc: From 1a089da51a26f8efcab93ed8d3cece3d051ca559 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Tue, 24 Dec 2024 12:35:38 +0530 Subject: [PATCH 17/17] fix: show profit and loss after period closing (cherry picked from commit dc5cd93bf0448eea9c2caef77413aa18058c3243) --- .../consolidated_financial_statement.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py index 388b7d8fe86..fb340453229 100644 --- a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py +++ b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py @@ -355,7 +355,7 @@ def get_data(companies, root_type, balance_must_be, fiscal_year, filters=None, i gl_entries_by_account, accounts_by_name, accounts, - ignore_closing_entries=False, + ignore_closing_entries=ignore_closing_entries, root_type=root_type, )