Skip to content

Commit 095fe65

Browse files
authored
Merge pull request #52103 from frappe/version-16-hotfix
chore: release v16
2 parents bb2bada + b285548 commit 095fe65

63 files changed

Lines changed: 3756 additions & 2886 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"cards": [
3+
{
4+
"card": "Total Outgoing Bills"
5+
},
6+
{
7+
"card": "Total Incoming Bills"
8+
},
9+
{
10+
"card": "Total Incoming Payment"
11+
},
12+
{
13+
"card": "Total Outgoing Payment"
14+
}
15+
],
16+
"charts": [
17+
{
18+
"chart": "Incoming Bills (Purchase Invoice)",
19+
"width": "Half"
20+
},
21+
{
22+
"chart": "Outgoing Bills (Sales Invoice)",
23+
"width": "Half"
24+
},
25+
{
26+
"chart": "Accounts Receivable Ageing",
27+
"width": "Half"
28+
},
29+
{
30+
"chart": "Accounts Payable Ageing",
31+
"width": "Half"
32+
},
33+
{
34+
"chart": "Bank Balance",
35+
"width": "Full"
36+
}
37+
],
38+
"creation": "2026-01-26 21:25:12.793893",
39+
"dashboard_name": "Payments",
40+
"docstatus": 0,
41+
"doctype": "Dashboard",
42+
"idx": 0,
43+
"is_default": 0,
44+
"is_standard": 1,
45+
"modified": "2026-01-26 21:25:12.793893",
46+
"modified_by": "Administrator",
47+
"module": "Accounts",
48+
"name": "Payments",
49+
"owner": "Administrator"
50+
}

erpnext/accounts/doctype/bank/bank.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
frappe.provide("erpnext.integrations");
44

55
frappe.ui.form.on("Bank", {
6-
onload: function (frm) {
7-
add_fields_to_mapping_table(frm);
8-
},
96
refresh: function (frm) {
107
add_fields_to_mapping_table(frm);
118
frm.toggle_display(["address_html", "contact_html"], !frm.doc.__islocal);
@@ -37,11 +34,11 @@ let add_fields_to_mapping_table = function (frm) {
3734
});
3835
});
3936

40-
frm.fields_dict.bank_transaction_mapping.grid.update_docfield_property(
41-
"bank_transaction_field",
42-
"options",
43-
options
44-
);
37+
const grid = frm.fields_dict.bank_transaction_mapping?.grid;
38+
39+
if (grid) {
40+
grid.update_docfield_property("bank_transaction_field", "options", options);
41+
}
4542
};
4643

4744
erpnext.integrations.refreshPlaidLink = class refreshPlaidLink {
@@ -116,7 +113,7 @@ erpnext.integrations.refreshPlaidLink = class refreshPlaidLink {
116113
"There was an issue connecting to Plaid's authentication server. Check browser console for more information"
117114
)
118115
);
119-
console.log(error);
116+
console.error(error);
120117
}
121118

122119
plaid_success(token, response) {

erpnext/accounts/doctype/journal_entry/journal_entry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def validate_for_repost(self):
179179
validate_docs_for_deferred_accounting([self.name], [])
180180

181181
def submit(self):
182-
if len(self.accounts) > 100:
182+
if len(self.accounts) > 100 and not self.meta.queue_in_background:
183183
queue_submission(self, "_submit")
184184
else:
185185
return self._submit()

erpnext/accounts/doctype/payment_entry/payment_entry.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,16 @@ frappe.ui.form.on("Payment Entry", {
400400
);
401401

402402
frm.refresh_fields();
403+
404+
const party_currency =
405+
frm.doc.payment_type === "Receive" ? "paid_from_account_currency" : "paid_to_account_currency";
406+
407+
var reference_grid = frm.fields_dict["references"].grid;
408+
["total_amount", "outstanding_amount", "allocated_amount"].forEach((fieldname) => {
409+
reference_grid.update_docfield_property(fieldname, "options", party_currency);
410+
});
411+
412+
reference_grid.refresh();
403413
},
404414

405415
show_general_ledger: function (frm) {
@@ -1104,7 +1114,7 @@ frappe.ui.form.on("Payment Entry", {
11041114

11051115
allocate_party_amount_against_ref_docs: async function (frm, paid_amount, paid_amount_change) {
11061116
await frm.call("allocate_amount_to_references", {
1107-
paid_amount: paid_amount,
1117+
paid_amount: flt(paid_amount),
11081118
paid_amount_change: paid_amount_change,
11091119
allocate_payment_amount: frappe.flags.allocate_payment_amount ?? false,
11101120
});

erpnext/accounts/doctype/payment_ledger_entry/payment_ledger_entry.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,12 @@
132132
"fieldtype": "Link",
133133
"label": "Cost Center",
134134
"options": "Cost Center"
135+
},
136+
{
137+
"fieldname": "project",
138+
"fieldtype": "Link",
139+
"label": "Project",
140+
"options": "Project"
135141
},
136142
{
137143
"fieldname": "due_date",

erpnext/accounts/doctype/payment_ledger_entry/payment_ledger_entry.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class PaymentLedgerEntry(Document):
3838
amount_in_account_currency: DF.Currency
3939
company: DF.Link | None
4040
cost_center: DF.Link | None
41+
project: DF.Link | None
4142
delinked: DF.Check
4243
due_date: DF.Date | None
4344
finance_book: DF.Link | None

erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ def build_dimensions_filter_conditions(self):
746746
ple = qb.DocType("Payment Ledger Entry")
747747
for x in self.dimensions:
748748
dimension = x.fieldname
749-
if self.get(dimension):
749+
if self.get(dimension) and frappe.db.has_column("Payment Ledger Entry", dimension):
750750
self.accounting_dimension_filter_conditions.append(ple[dimension] == self.get(dimension))
751751

752752
def build_qb_filter_conditions(self, get_invoices=False, get_return_invoices=False):

erpnext/accounts/doctype/sales_invoice/sales_invoice.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,20 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends (
116116

117117
if (cint(doc.update_stock) != 1) {
118118
if (!is_delivered_by_supplier) {
119-
this.frm.add_custom_button(
120-
__("Delivery Note"),
121-
this.frm.cscript["Make Delivery Note"],
122-
__("Create")
119+
const should_create_delivery_note = doc.items.some(
120+
(item) =>
121+
item.qty - item.delivered_qty > 0 &&
122+
!item.scio_detail &&
123+
!item.dn_detail &&
124+
!item.delivered_by_supplier
123125
);
126+
if (should_create_delivery_note) {
127+
this.frm.add_custom_button(
128+
__("Delivery Note"),
129+
this.frm.cscript["Make Delivery Note"],
130+
__("Create")
131+
);
132+
}
124133
}
125134
}
126135

erpnext/accounts/doctype/sales_invoice/sales_invoice.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2424,7 +2424,8 @@ def update_item(source_doc, target_doc, source_parent):
24242424
"postprocess": update_item,
24252425
"condition": lambda doc: doc.delivered_by_supplier != 1
24262426
and not doc.scio_detail
2427-
and not doc.dn_detail,
2427+
and not doc.dn_detail
2428+
and doc.qty - doc.delivered_qty > 0,
24282429
},
24292430
"Sales Taxes and Charges": {"doctype": "Sales Taxes and Charges", "reset_value": True},
24302431
"Sales Team": {

erpnext/accounts/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1947,6 +1947,7 @@ def get_account_type(account):
19471947
account=gle.account,
19481948
party_type=gle.party_type,
19491949
party=gle.party,
1950+
project=gle.project,
19501951
cost_center=gle.cost_center,
19511952
finance_book=gle.finance_book,
19521953
due_date=gle.due_date,

0 commit comments

Comments
 (0)