fix(ux): throw if no row selected to create repost entries
This commit is contained in:
parent
bb21c044f6
commit
1905239ec2
@ -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>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
frappe.confirm(__(message), () => {
|
|
||||||
let indexes = frappe.query_report.datatable.rowmanager.getCheckedRows();
|
let indexes = frappe.query_report.datatable.rowmanager.getCheckedRows();
|
||||||
let selected_rows = indexes.map(i => frappe.query_report.data[i]);
|
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.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: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user