mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-20 18:54:55 +00:00
fix(ux): throw if no row selected to create repost entries
(cherry picked from commit 1905239ec2)
Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
This commit is contained in:
@@ -53,11 +53,14 @@ frappe.query_reports["Stock and Account Value Comparison"] = {
|
|||||||
<p>Are you sure you want to create Reposting Entries?</p>
|
<p>Are you sure you want to create Reposting Entries?</p>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
let indexes = frappe.query_report.datatable.rowmanager.getCheckedRows();
|
||||||
|
let selected_rows = indexes.map(i => frappe.query_report.data[i]);
|
||||||
|
|
||||||
|
if (!selected_rows.length) {
|
||||||
|
frappe.throw(__("Please select rows to create Reposting Entries"));
|
||||||
|
}
|
||||||
|
|
||||||
frappe.confirm(__(message), () => {
|
frappe.confirm(__(message), () => {
|
||||||
let indexes = frappe.query_report.datatable.rowmanager.getCheckedRows();
|
|
||||||
let selected_rows = indexes.map(i => frappe.query_report.data[i]);
|
|
||||||
|
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method: "erpnext.stock.report.stock_and_account_value_comparison.stock_and_account_value_comparison.create_reposting_entries",
|
method: "erpnext.stock.report.stock_and_account_value_comparison.stock_and_account_value_comparison.create_reposting_entries",
|
||||||
args: {
|
args: {
|
||||||
|
|||||||
Reference in New Issue
Block a user