From a8b5bcfe02b774ef3c02df43b1da8a1beb8cfec4 Mon Sep 17 00:00:00 2001 From: "Nihantra C. Patel" <141945075+Nihantra-Patel@users.noreply.github.com> Date: Wed, 18 Sep 2024 21:36:02 +0530 Subject: [PATCH 01/16] fix: Translation for button SO to PO (cherry picked from commit a5275e9f28bb54c286cad7ae697ab37f9e5e8794) # Conflicts: # erpnext/selling/doctype/sales_order/sales_order.js --- erpnext/selling/doctype/sales_order/sales_order.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js index 1a6658f54184..46f7325a3028 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.js +++ b/erpnext/selling/doctype/sales_order/sales_order.js @@ -778,8 +778,13 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex ] } ], +<<<<<<< HEAD primary_action_label: 'Create Purchase Order', primary_action (args) { +======= + primary_action_label: __("Create Purchase Order"), + primary_action(args) { +>>>>>>> a5275e9f28 (fix: Translation for button SO to PO) if (!args) return; let selected_items = dialog.fields_dict.items_for_po.grid.get_selected_children(); From b6ce9222aa659b93ae752edfafeb0c3d19128075 Mon Sep 17 00:00:00 2001 From: "Nihantra C. Patel" <141945075+Nihantra-Patel@users.noreply.github.com> Date: Wed, 18 Sep 2024 21:47:30 +0530 Subject: [PATCH 02/16] fix: Translation for button SO to PO --conflicts --- erpnext/selling/doctype/sales_order/sales_order.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js index 46f7325a3028..7bdaab75a536 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.js +++ b/erpnext/selling/doctype/sales_order/sales_order.js @@ -778,13 +778,8 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex ] } ], -<<<<<<< HEAD - primary_action_label: 'Create Purchase Order', - primary_action (args) { -======= primary_action_label: __("Create Purchase Order"), primary_action(args) { ->>>>>>> a5275e9f28 (fix: Translation for button SO to PO) if (!args) return; let selected_items = dialog.fields_dict.items_for_po.grid.get_selected_children(); From 7ac39dc233ff5ab7c47a41e330ce6377bc134dc0 Mon Sep 17 00:00:00 2001 From: sameer Chauhan Date: Fri, 13 Sep 2024 17:32:44 +0530 Subject: [PATCH 03/16] fix: Payment Ledger Report currency fieldtype fix (cherry picked from commit ad2d6a16258235a20d041174458e32bb6ebad8f7) --- erpnext/accounts/report/payment_ledger/payment_ledger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/payment_ledger/payment_ledger.py b/erpnext/accounts/report/payment_ledger/payment_ledger.py index 9852c6e7ab99..d4f0f0a107d9 100644 --- a/erpnext/accounts/report/payment_ledger/payment_ledger.py +++ b/erpnext/accounts/report/payment_ledger/payment_ledger.py @@ -210,7 +210,7 @@ def get_columns(self): ) ) self.columns.append( - dict(label=_("Currency"), fieldname="currency", fieldtype="Currency", hidden=True) + dict(label=_("Currency"), fieldname="currency", fieldtype="Link", options="Currency", hidden=True) ) def run(self): From e43c357c08676fa7f17cc4dec2ee4c69ce863fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fancan?= <37839267+doancan@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:06:07 +0300 Subject: [PATCH 04/16] fix: translate in js (cherry picked from commit 25faec5662b317a19e99ad41b589380067b9fa53) --- erpnext/assets/doctype/asset/asset.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/assets/doctype/asset/asset.js b/erpnext/assets/doctype/asset/asset.js index b6afe11e4ff2..a124efc7ac3f 100644 --- a/erpnext/assets/doctype/asset/asset.js +++ b/erpnext/assets/doctype/asset/asset.js @@ -202,7 +202,7 @@ frappe.ui.form.on("Asset", {
- Failed to post depreciation entries + ${__("Failed to post depreciation entries")}
`; From 8abc1f4da96c7d037c2a6bb55d655f9831dfbb41 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 19 Sep 2024 09:37:08 +0530 Subject: [PATCH 05/16] fix: Serial No reserved against historical sales order - unable to sell again (#43294) --- erpnext/stock/doctype/serial_no/serial_no.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/serial_no/serial_no.py b/erpnext/stock/doctype/serial_no/serial_no.py index 10d5ae643b0b..25932a3ad046 100644 --- a/erpnext/stock/doctype/serial_no/serial_no.py +++ b/erpnext/stock/doctype/serial_no/serial_no.py @@ -404,7 +404,7 @@ def validate_serial_no(sle, item_det): ) # if Sales Order reference in Serial No validate the Delivery Note or Invoice is against the same - if sr.sales_order: + if sr.sales_order and sr.delivery_document_no: if sle.voucher_type == "Sales Invoice": if not frappe.db.exists( "Sales Invoice Item", From 1bdbcc670380be1c004023748e9d699e75c7399b Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 19 Sep 2024 10:20:58 +0530 Subject: [PATCH 06/16] fix: incorrect stock balance for inventory dimension (backport #43284) (#43289) * fix: incorrect stock balance for inventory dimension (#43284) (cherry picked from commit 3e7a7a54bf0cda871e0814deb8776238270769b2) # Conflicts: # erpnext/stock/report/stock_balance/stock_balance.js * chore: fix conflicts --------- Co-authored-by: rohitwaghchaure --- erpnext/stock/report/stock_balance/stock_balance.js | 6 ++++++ erpnext/stock/report/stock_balance/stock_balance.py | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/report/stock_balance/stock_balance.js b/erpnext/stock/report/stock_balance/stock_balance.js index ca2c053fdb14..21d5d8f84dca 100644 --- a/erpnext/stock/report/stock_balance/stock_balance.js +++ b/erpnext/stock/report/stock_balance/stock_balance.js @@ -101,6 +101,12 @@ frappe.query_reports["Stock Balance"] = { fieldtype: "Check", default: 0, }, + { + fieldname: "show_dimension_wise_stock", + label: __("Show Dimension Wise Stock"), + fieldtype: "Check", + default: 0, + }, ], formatter: function (value, row, column, data, default_formatter) { diff --git a/erpnext/stock/report/stock_balance/stock_balance.py b/erpnext/stock/report/stock_balance/stock_balance.py index 5a79cdf1827a..eee582ac0547 100644 --- a/erpnext/stock/report/stock_balance/stock_balance.py +++ b/erpnext/stock/report/stock_balance/stock_balance.py @@ -226,7 +226,10 @@ def get_group_by_key(self, row) -> tuple: group_by_key = [row.company, row.item_code, row.warehouse] for fieldname in self.inventory_dimensions: - if self.filters.get(fieldname): + if not row.get(fieldname): + continue + + if self.filters.get(fieldname) or self.filters.get("show_dimension_wise_stock"): group_by_key.append(row.get(fieldname)) return tuple(group_by_key) From 32d4f96e025875492fadfdd2c776f2230d5b93b3 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Thu, 19 Sep 2024 13:57:55 +0200 Subject: [PATCH 07/16] fix(Payment Reconciliation): German translations --- erpnext/translations/de.csv | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/erpnext/translations/de.csv b/erpnext/translations/de.csv index ebe94a9ec472..8161e44cb806 100644 --- a/erpnext/translations/de.csv +++ b/erpnext/translations/de.csv @@ -4603,10 +4603,23 @@ Payment Reconciliation,Zahlungsabgleich, Receivable / Payable Account,Forderungen-/Verbindlichkeiten-Konto, Bank / Cash Account,Bank / Geldkonto, From Invoice Date,Ab Rechnungsdatum, -To Invoice Date,Um Datum Rechnung, -Minimum Invoice Amount,Mindestabrechnung, +To Invoice Date,Bis Rechnungsdatum, +Invoice Limit,Max. Anzahl Rechnungen, +From Payment Date,Ab Zahlungsdatum, +To Payment Date,Bis Zahlungsdatum, +Payment Limit,Max. Anzahl Zahlungen, +Minimum Invoice Amount,Minimaler Rechnungsbetrag, Maximum Invoice Amount,Maximaler Rechnungsbetrag, -System will fetch all the entries if limit value is zero.,"Das System ruft alle Einträge ab, wenn der Grenzwert Null ist.", +Minimum Payment Amount,Minimaler Zahlungsbetrag, +Maximum Payment Amount,Maximaler Zahlungsbetrag, +Filter on Invoice,Filter auf Rechnungsnr., +Filter on Payment,Filter auf Zahlungsnr., +"If you need to reconcile particular transactions against each other, then please select accordingly. If not, all the transactions will be allocated in FIFO order.","Wenn Sie bestimmte Transaktionen gegeneinander abgleichen müssen, wählen Sie diese bitte entsprechend aus. Andernfalls werden alle Transaktionen in FIFO-Reihenfolge zugewiesen.", +System will fetch all the entries if limit value is zero.,"Das System ruft alle Einträge ab, wenn die max. Anzahl Null ist.", +This filter will be applied to Journal Entry.,Dieser Filter wird auf Buchungssätze angewendet., +Unreconciled Entries,Nicht zugeordnete Buchungen, +Allocated Entries,Zugewiesene Buchungen, +Accounting Dimensions Filter,Filetr nach Buchhaltungsdimensionen, Get Unreconciled Entries,Nicht zugeordnete Buchungen aufrufen, Unreconciled Payment Details,Nicht abgeglichene Zahlungen, Invoice/Journal Entry Details,Einzelheiten zu Rechnungs-/Journalbuchungen, From 79235cd68834715c711b3dfa5d7c178411acb792 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sat, 21 Sep 2024 12:27:53 +0530 Subject: [PATCH 08/16] fix: incorrect outstanding on non-pos invoice with write_off_account (cherry picked from commit d5e2906e5974117d91dd265319186a99b2835023) --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 9dd62d76fef3..ff81a114d54b 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -170,6 +170,7 @@ def validate(self): ): validate_loyalty_points(self, self.loyalty_points) + self.allow_write_off_only_on_pos() self.reset_default_field_value("set_warehouse", "items", "warehouse") def validate_accounts(self): @@ -850,6 +851,10 @@ def validate_delivery_note(self): raise_exception=1, ) + def allow_write_off_only_on_pos(self): + if not self.is_pos and self.write_off_account: + self.write_off_account = None + def validate_write_off_account(self): if flt(self.write_off_amount) and not self.write_off_account: self.write_off_account = frappe.get_cached_value("Company", self.company, "write_off_account") From 92438f8dba719670b3815fb6caff83e45ef81fd8 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Fri, 20 Sep 2024 11:43:00 +0530 Subject: [PATCH 09/16] fix: show chart tool tip in report currency (cherry picked from commit 827b3f454241a6e2b9e4a0bcc8bb15bfb4e7ef3e) --- erpnext/accounts/report/balance_sheet/balance_sheet.py | 8 ++++++-- erpnext/accounts/report/cash_flow/cash_flow.py | 6 ++++-- .../profit_and_loss_statement.py | 8 +++++--- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/erpnext/accounts/report/balance_sheet/balance_sheet.py b/erpnext/accounts/report/balance_sheet/balance_sheet.py index 2106451bd1a0..baee062cf846 100644 --- a/erpnext/accounts/report/balance_sheet/balance_sheet.py +++ b/erpnext/accounts/report/balance_sheet/balance_sheet.py @@ -95,7 +95,7 @@ def execute(filters=None): filters.periodicity, period_list, filters.accumulated_values, company=filters.company ) - chart = get_chart_data(filters, columns, asset, liability, equity) + chart = get_chart_data(filters, columns, asset, liability, equity, currency) report_summary, primitive_summary = get_report_summary( period_list, asset, liability, equity, provisional_profit_loss, currency, filters @@ -219,7 +219,7 @@ def get_report_summary( ], (net_asset - net_liability + net_equity) -def get_chart_data(filters, columns, asset, liability, equity): +def get_chart_data(filters, columns, asset, liability, equity, currency): labels = [d.get("label") for d in columns[2:]] asset_data, liability_data, equity_data = [], [], [] @@ -247,4 +247,8 @@ def get_chart_data(filters, columns, asset, liability, equity): else: chart["type"] = "line" + chart["fieldtype"] = "Currency" + chart["options"] = "currency" + chart["currency"] = currency + return chart diff --git a/erpnext/accounts/report/cash_flow/cash_flow.py b/erpnext/accounts/report/cash_flow/cash_flow.py index 87bde218dae4..f38adcf37664 100644 --- a/erpnext/accounts/report/cash_flow/cash_flow.py +++ b/erpnext/accounts/report/cash_flow/cash_flow.py @@ -116,7 +116,7 @@ def execute(filters=None): ) columns = get_columns(filters.periodicity, period_list, filters.accumulated_values, filters.company) - chart = get_chart_data(columns, data) + chart = get_chart_data(columns, data, company_currency) report_summary = get_report_summary(summary_data, company_currency) @@ -257,7 +257,7 @@ def get_report_summary(summary_data, currency): return report_summary -def get_chart_data(columns, data): +def get_chart_data(columns, data, currency): labels = [d.get("label") for d in columns[2:]] datasets = [ { @@ -272,5 +272,7 @@ def get_chart_data(columns, data): chart = {"data": {"labels": labels, "datasets": datasets}, "type": "bar"} chart["fieldtype"] = "Currency" + chart["options"] = "currency" + chart["currency"] = currency return chart diff --git a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py index 4571c4b26a07..da50668f6306 100644 --- a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py +++ b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py @@ -59,11 +59,11 @@ def execute(filters=None): columns = get_columns(filters.periodicity, period_list, filters.accumulated_values, filters.company) - chart = get_chart_data(filters, columns, income, expense, net_profit_loss) - currency = filters.presentation_currency or frappe.get_cached_value( "Company", filters.company, "default_currency" ) + chart = get_chart_data(filters, columns, income, expense, net_profit_loss, currency) + report_summary, primitive_summary = get_report_summary( period_list, filters.periodicity, income, expense, net_profit_loss, currency, filters ) @@ -141,7 +141,7 @@ def get_net_profit_loss(income, expense, period_list, company, currency=None, co return net_profit_loss -def get_chart_data(filters, columns, income, expense, net_profit_loss): +def get_chart_data(filters, columns, income, expense, net_profit_loss, currency): labels = [d.get("label") for d in columns[2:]] income_data, expense_data, net_profit = [], [], [] @@ -170,5 +170,7 @@ def get_chart_data(filters, columns, income, expense, net_profit_loss): chart["type"] = "line" chart["fieldtype"] = "Currency" + chart["options"] = "currency" + chart["currency"] = currency return chart From 6becaba6726a7034461bb79fc93fcc95e06d0dfc Mon Sep 17 00:00:00 2001 From: venkat102 Date: Fri, 20 Sep 2024 12:22:03 +0530 Subject: [PATCH 10/16] fix: add currency in financial statement (cherry picked from commit 91a27bda842cc6d86f65daa35bcc9d68921ab805) --- .../consolidated_financial_statement.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 a780e466ba9c..a809edd33cb9 100644 --- a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py +++ b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py @@ -120,7 +120,7 @@ def get_balance_sheet_data(fiscal_year, companies, columns, filters): True, ) - chart = get_chart_data(filters, columns, asset, liability, equity) + chart = get_chart_data(filters, columns, asset, liability, equity, company_currency) return data, message, chart, report_summary @@ -178,7 +178,7 @@ def get_profit_loss_data(fiscal_year, companies, columns, filters): if net_profit_loss: data.append(net_profit_loss) - chart = get_pl_chart_data(filters, columns, income, expense, net_profit_loss) + chart = get_pl_chart_data(filters, columns, income, expense, net_profit_loss, company_currency) report_summary, primitive_summary = get_pl_summary( companies, "", income, expense, net_profit_loss, company_currency, filters, True From c0dfda6ccc7f30562316113165b3fe06c5b450ee Mon Sep 17 00:00:00 2001 From: venkat102 Date: Fri, 20 Sep 2024 10:53:45 +0530 Subject: [PATCH 11/16] fix: change dynamic link doctype fieldtype to data (cherry picked from commit 1e46f7344af08a89b8daf82c0dba394290b1bf7b) --- .../general_and_payment_ledger_comparison.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/report/general_and_payment_ledger_comparison/general_and_payment_ledger_comparison.py b/erpnext/accounts/report/general_and_payment_ledger_comparison/general_and_payment_ledger_comparison.py index 89cf7e504f0c..9d079eb9ebd2 100644 --- a/erpnext/accounts/report/general_and_payment_ledger_comparison/general_and_payment_ledger_comparison.py +++ b/erpnext/accounts/report/general_and_payment_ledger_comparison/general_and_payment_ledger_comparison.py @@ -199,8 +199,7 @@ def get_columns(self): dict( label=_("Voucher Type"), fieldname="voucher_type", - fieldtype="Link", - options="DocType", + fieldtype="Data", width="100", ) ) @@ -219,8 +218,7 @@ def get_columns(self): dict( label=_("Party Type"), fieldname="party_type", - fieldtype="Link", - options="DocType", + fieldtype="Data", width="100", ) ) From ef7d4fe84adc17ed12b1b1d42c47b3d04a64231f Mon Sep 17 00:00:00 2001 From: "Nihantra C. Patel" <141945075+Nihantra-Patel@users.noreply.github.com> Date: Tue, 17 Sep 2024 14:51:26 +0530 Subject: [PATCH 12/16] fix: partial return on POS invoice (cherry picked from commit 76289fa8dcf3ee670d9c6976e4d53e7ce230cb6c) # Conflicts: # erpnext/accounts/doctype/pos_invoice/pos_invoice.py --- erpnext/accounts/doctype/pos_invoice/pos_invoice.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py index 4abe91680e89..4033db97b826 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py @@ -381,8 +381,14 @@ def validate_payment_amount(self): if self.is_return: invoice_total = self.rounded_total or self.grand_total +<<<<<<< HEAD if total_amount_in_payments and total_amount_in_payments < invoice_total: frappe.throw(_("Total payments amount can't be greater than {}").format(-invoice_total)) +======= + total_amount_in_payments = flt(total_amount_in_payments, self.precision("grand_total")) + if total_amount_in_payments and total_amount_in_payments > invoice_total: + frappe.throw(_("Total payments amount can't be greater than {}").format(invoice_total)) +>>>>>>> 76289fa8dc (fix: partial return on POS invoice) def validate_company_with_pos_company(self): if self.company != frappe.db.get_value("POS Profile", self.pos_profile, "company"): From 50e0f56d18253b3cf1f7889f1d3896ede1223a91 Mon Sep 17 00:00:00 2001 From: "Nihantra C. Patel" <141945075+Nihantra-Patel@users.noreply.github.com> Date: Tue, 17 Sep 2024 15:35:07 +0530 Subject: [PATCH 13/16] fix: partial return on POS invoice (cherry picked from commit 18bdd06652ff3cc772214fa7c6ed620554eddbb7) # Conflicts: # erpnext/accounts/doctype/pos_invoice/pos_invoice.py --- erpnext/accounts/doctype/pos_invoice/pos_invoice.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py index 4033db97b826..899b9aa8f0c8 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py @@ -379,16 +379,21 @@ def validate_payment_amount(self): if self.is_return and entry.amount > 0: frappe.throw(_("Row #{0} (Payment Table): Amount must be negative").format(entry.idx)) - if self.is_return: + if self.is_return and self.docstatus != 0: invoice_total = self.rounded_total or self.grand_total <<<<<<< HEAD if total_amount_in_payments and total_amount_in_payments < invoice_total: frappe.throw(_("Total payments amount can't be greater than {}").format(-invoice_total)) ======= total_amount_in_payments = flt(total_amount_in_payments, self.precision("grand_total")) +<<<<<<< HEAD if total_amount_in_payments and total_amount_in_payments > invoice_total: frappe.throw(_("Total payments amount can't be greater than {}").format(invoice_total)) >>>>>>> 76289fa8dc (fix: partial return on POS invoice) +======= + if total_amount_in_payments and total_amount_in_payments < invoice_total: + frappe.throw(_("Total payments amount can't be greater than {}").format(-invoice_total)) +>>>>>>> 18bdd06652 (fix: partial return on POS invoice) def validate_company_with_pos_company(self): if self.company != frappe.db.get_value("POS Profile", self.pos_profile, "company"): From 5ce4dae204cedb0e9f74b8820ae3250abf770ab2 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 23 Sep 2024 20:02:10 +0530 Subject: [PATCH 14/16] chore: resolve conflict --- erpnext/accounts/doctype/pos_invoice/pos_invoice.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py index 899b9aa8f0c8..80c4db50acb2 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py @@ -381,19 +381,8 @@ def validate_payment_amount(self): if self.is_return and self.docstatus != 0: invoice_total = self.rounded_total or self.grand_total -<<<<<<< HEAD if total_amount_in_payments and total_amount_in_payments < invoice_total: frappe.throw(_("Total payments amount can't be greater than {}").format(-invoice_total)) -======= - total_amount_in_payments = flt(total_amount_in_payments, self.precision("grand_total")) -<<<<<<< HEAD - if total_amount_in_payments and total_amount_in_payments > invoice_total: - frappe.throw(_("Total payments amount can't be greater than {}").format(invoice_total)) ->>>>>>> 76289fa8dc (fix: partial return on POS invoice) -======= - if total_amount_in_payments and total_amount_in_payments < invoice_total: - frappe.throw(_("Total payments amount can't be greater than {}").format(-invoice_total)) ->>>>>>> 18bdd06652 (fix: partial return on POS invoice) def validate_company_with_pos_company(self): if self.company != frappe.db.get_value("POS Profile", self.pos_profile, "company"): From 79f95ba507be31553bd4b21fd9bc2c37927ce369 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 24 Sep 2024 12:13:43 +0530 Subject: [PATCH 15/16] fix: AR / AP report to ignore 0.0 outstanding (cherry picked from commit 6e2cf79e2cf047c89367a5b446f338e65a484ba6) --- .../report/accounts_receivable/accounts_receivable.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index b8341bcfa010..5ef39755ca56 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -305,8 +305,8 @@ def build_data(self): must_consider = False if self.filters.get("for_revaluation_journals"): - if (abs(row.outstanding) >= 0.0 / 10**self.currency_precision) or ( - abs(row.outstanding_in_account_currency) >= 0.0 / 10**self.currency_precision + if (abs(row.outstanding) >= 1.0 / 10**self.currency_precision) or ( + abs(row.outstanding_in_account_currency) >= 1.0 / 10**self.currency_precision ): must_consider = True else: From 4146bdf324519701bf78e3f12af984bddf438388 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 24 Sep 2024 16:20:05 +0200 Subject: [PATCH 16/16] fix(Bank Account): dashboard connections (backport #43365) (#43366) Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> Co-authored-by: rohitwaghchaure fix(Bank Account): dashboard connections (#43365) --- .../doctype/bank_account/bank_account.json | 52 +++++++++++++++++-- .../bank_account/bank_account_dashboard.py | 20 ------- 2 files changed, 49 insertions(+), 23 deletions(-) delete mode 100644 erpnext/accounts/doctype/bank_account/bank_account_dashboard.py diff --git a/erpnext/accounts/doctype/bank_account/bank_account.json b/erpnext/accounts/doctype/bank_account/bank_account.json index b1d53dc1e708..a5a7691eb76e 100644 --- a/erpnext/accounts/doctype/bank_account/bank_account.json +++ b/erpnext/accounts/doctype/bank_account/bank_account.json @@ -208,8 +208,54 @@ "label": "Disabled" } ], - "links": [], - "modified": "2024-02-02 17:50:09.768835", + "links": [ + { + "group": "Transactions", + "link_doctype": "Payment Request", + "link_fieldname": "bank_account" + }, + { + "group": "Transactions", + "link_doctype": "Payment Order", + "link_fieldname": "bank_account" + }, + { + "group": "Transactions", + "link_doctype": "Bank Guarantee", + "link_fieldname": "bank_account" + }, + { + "group": "Transactions", + "link_doctype": "Payroll Entry", + "link_fieldname": "bank_account" + }, + { + "group": "Transactions", + "link_doctype": "Bank Transaction", + "link_fieldname": "bank_account" + }, + { + "group": "Accounting", + "link_doctype": "Payment Entry", + "link_fieldname": "bank_account" + }, + { + "group": "Accounting", + "link_doctype": "Journal Entry", + "link_fieldname": "bank_account" + }, + { + "group": "Party", + "link_doctype": "Customer", + "link_fieldname": "default_bank_account" + }, + { + "group": "Party", + "link_doctype": "Supplier", + "link_fieldname": "default_bank_account" + } + ], + "modified": "2024-09-24 06:57:41.292970", "modified_by": "Administrator", "module": "Accounts", "name": "Bank Account", @@ -246,4 +292,4 @@ "sort_order": "DESC", "states": [], "track_changes": 1 -} \ No newline at end of file +} diff --git a/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py b/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py deleted file mode 100644 index 8bf8d8a5cd01..000000000000 --- a/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py +++ /dev/null @@ -1,20 +0,0 @@ -from frappe import _ - - -def get_data(): - return { - "fieldname": "bank_account", - "non_standard_fieldnames": { - "Customer": "default_bank_account", - "Supplier": "default_bank_account", - }, - "transactions": [ - { - "label": _("Payments"), - "items": ["Payment Entry", "Payment Request", "Payment Order", "Payroll Entry"], - }, - {"label": _("Party"), "items": ["Customer", "Supplier"]}, - {"items": ["Bank Guarantee"]}, - {"items": ["Journal Entry"]}, - ], - }