mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 03:01:22 +00:00
Merge pull request #44007 from frappe/version-14-hotfix
This commit is contained in:
@@ -58,7 +58,7 @@ def build_conditions(process_type, account, company):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if account:
|
if account:
|
||||||
conditions += f"AND {deferred_account}='{frappe.db.escape(account)}'"
|
conditions += f"AND {deferred_account}={frappe.db.escape(account)}"
|
||||||
elif company:
|
elif company:
|
||||||
conditions += f"AND p.company = {frappe.db.escape(company)}"
|
conditions += f"AND p.company = {frappe.db.escape(company)}"
|
||||||
|
|
||||||
|
|||||||
@@ -389,7 +389,9 @@ def split_invoices(invoices):
|
|||||||
if not item.serial_no:
|
if not item.serial_no:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
return_against_is_added = any(d for d in _invoices if d.pos_invoice == pos_invoice.return_against)
|
return_against_is_added = any(
|
||||||
|
d for d in _invoices if d and d[0].pos_invoice == pos_invoice.return_against
|
||||||
|
)
|
||||||
if return_against_is_added:
|
if return_against_is_added:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|||||||
@@ -18,3 +18,21 @@ cur_frm.cscript.onload = function () {
|
|||||||
frappe.ui.form.on("Serial No", "refresh", function (frm) {
|
frappe.ui.form.on("Serial No", "refresh", function (frm) {
|
||||||
frm.toggle_enable("item_code", frm.doc.__islocal);
|
frm.toggle_enable("item_code", frm.doc.__islocal);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
frappe.ui.form.on("Serial No", {
|
||||||
|
refresh(frm) {
|
||||||
|
frm.trigger("view_ledgers");
|
||||||
|
},
|
||||||
|
|
||||||
|
view_ledgers(frm) {
|
||||||
|
frm.add_custom_button(__("View Ledgers"), () => {
|
||||||
|
frappe.route_options = {
|
||||||
|
item_code: frm.doc.item_code,
|
||||||
|
serial_no: frm.doc.name,
|
||||||
|
posting_date: frappe.datetime.now_date(),
|
||||||
|
posting_time: frappe.datetime.now_time(),
|
||||||
|
};
|
||||||
|
frappe.set_route("query-report", "Serial No Ledger");
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|||||||
@@ -45,8 +45,16 @@ frappe.query_reports["Serial No Ledger"] = {
|
|||||||
{
|
{
|
||||||
label: __("As On Date"),
|
label: __("As On Date"),
|
||||||
fieldtype: "Date",
|
fieldtype: "Date",
|
||||||
|
reqd: 1,
|
||||||
fieldname: "posting_date",
|
fieldname: "posting_date",
|
||||||
default: frappe.datetime.get_today(),
|
default: frappe.datetime.get_today(),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: __("Posting Time"),
|
||||||
|
fieldtype: "Time",
|
||||||
|
reqd: 1,
|
||||||
|
fieldname: "posting_time",
|
||||||
|
default: frappe.datetime.now_time(),
|
||||||
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ def get_tasks(project, start=0, search=None, item_status=None):
|
|||||||
"parent_task",
|
"parent_task",
|
||||||
],
|
],
|
||||||
limit_start=start,
|
limit_start=start,
|
||||||
limit_page_length=10,
|
limit_page_length=100,
|
||||||
)
|
)
|
||||||
task_nest = []
|
task_nest = []
|
||||||
for task in tasks:
|
for task in tasks:
|
||||||
|
|||||||
Reference in New Issue
Block a user