Skip to content

Commit

Permalink
Merge pull request #43362 from frappe/version-14-hotfix
Browse files Browse the repository at this point in the history
chore: release v14
  • Loading branch information
ruthra-kumar authored Sep 25, 2024
2 parents 481610d + 4146bdf commit 644ada8
Show file tree
Hide file tree
Showing 17 changed files with 107 additions and 48 deletions.
52 changes: 49 additions & 3 deletions erpnext/accounts/doctype/bank_account/bank_account.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -246,4 +292,4 @@
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
}
20 changes: 0 additions & 20 deletions erpnext/accounts/doctype/bank_account/bank_account_dashboard.py

This file was deleted.

2 changes: 1 addition & 1 deletion erpnext/accounts/doctype/pos_invoice/pos_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ 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
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))
Expand Down
5 changes: 5 additions & 0 deletions erpnext/accounts/doctype/sales_invoice/sales_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 6 additions & 2 deletions erpnext/accounts/report/balance_sheet/balance_sheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 = [], [], []
Expand Down Expand Up @@ -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
6 changes: 4 additions & 2 deletions erpnext/accounts/report/cash_flow/cash_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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 = [
{
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,7 @@ def get_columns(self):
dict(
label=_("Voucher Type"),
fieldname="voucher_type",
fieldtype="Link",
options="DocType",
fieldtype="Data",
width="100",
)
)
Expand All @@ -219,8 +218,7 @@ def get_columns(self):
dict(
label=_("Party Type"),
fieldname="party_type",
fieldtype="Link",
options="DocType",
fieldtype="Data",
width="100",
)
)
Expand Down
2 changes: 1 addition & 1 deletion erpnext/accounts/report/payment_ledger/payment_ledger.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down Expand Up @@ -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 = [], [], []
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion erpnext/assets/doctype/asset/asset.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ frappe.ui.form.on("Asset", {
<div class="row">
<div class="col-xs-12 col-sm-6">
<span class="indicator whitespace-nowrap red">
<span>Failed to post depreciation entries</span>
<span>${__("Failed to post depreciation entries")}</span>
</span>
</div>
</div>`;
Expand Down
4 changes: 2 additions & 2 deletions erpnext/selling/doctype/sales_order/sales_order.js
Original file line number Diff line number Diff line change
Expand Up @@ -778,8 +778,8 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex
]
}
],
primary_action_label: 'Create Purchase Order',
primary_action (args) {
primary_action_label: __("Create Purchase Order"),
primary_action(args) {
if (!args) return;

let selected_items = dialog.fields_dict.items_for_po.grid.get_selected_children();
Expand Down
2 changes: 1 addition & 1 deletion erpnext/stock/doctype/serial_no/serial_no.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 6 additions & 0 deletions erpnext/stock/report/stock_balance/stock_balance.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 4 additions & 1 deletion erpnext/stock/report/stock_balance/stock_balance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
19 changes: 16 additions & 3 deletions erpnext/translations/de.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 644ada8

Please sign in to comment.