Skip to content

Commit ec74a5e

Browse files
committed
style: format js files
1 parent 2c16036 commit ec74a5e

File tree

566 files changed

+24285
-21341
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

566 files changed

+24285
-21341
lines changed

commitlint.config.js

+7-19
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,13 @@
11
module.exports = {
2-
parserPreset: 'conventional-changelog-conventionalcommits',
2+
parserPreset: "conventional-changelog-conventionalcommits",
33
rules: {
4-
'subject-empty': [2, 'never'],
5-
'type-case': [2, 'always', 'lower-case'],
6-
'type-empty': [2, 'never'],
7-
'type-enum': [
4+
"subject-empty": [2, "never"],
5+
"type-case": [2, "always", "lower-case"],
6+
"type-empty": [2, "never"],
7+
"type-enum": [
88
2,
9-
'always',
10-
[
11-
'build',
12-
'chore',
13-
'ci',
14-
'docs',
15-
'feat',
16-
'fix',
17-
'perf',
18-
'refactor',
19-
'revert',
20-
'style',
21-
'test',
22-
],
9+
"always",
10+
["build", "chore", "ci", "docs", "feat", "fix", "perf", "refactor", "revert", "style", "test"],
2311
],
2412
},
2513
};
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
frappe.provide('frappe.dashboards.chart_sources');
1+
frappe.provide("frappe.dashboards.chart_sources");
22

33
frappe.dashboards.chart_sources["Account Balance Timeline"] = {
44
method: "erpnext.accounts.dashboard_chart_source.account_balance_timeline.account_balance_timeline.get",
@@ -9,14 +9,14 @@ frappe.dashboards.chart_sources["Account Balance Timeline"] = {
99
fieldtype: "Link",
1010
options: "Company",
1111
default: frappe.defaults.get_user_default("Company"),
12-
reqd: 1
12+
reqd: 1,
1313
},
1414
{
1515
fieldname: "account",
1616
label: __("Account"),
1717
fieldtype: "Link",
1818
options: "Account",
19-
reqd: 1
19+
reqd: 1,
2020
},
21-
]
21+
],
2222
};

erpnext/accounts/doctype/account/account.js

+31-36
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,14 @@ frappe.ui.form.on("Account", {
2626
frm.toggle_enable(["is_group", "company"], false);
2727

2828
if (cint(frm.doc.is_group) == 0) {
29-
frm.toggle_display(
30-
"freeze_account",
31-
frm.doc.__onload && frm.doc.__onload.can_freeze_account
32-
);
29+
frm.toggle_display("freeze_account", frm.doc.__onload && frm.doc.__onload.can_freeze_account);
3330
}
3431

3532
// read-only for root accounts
3633
if (!frm.is_new()) {
3734
if (!frm.doc.parent_account) {
3835
frm.set_read_only();
39-
frm.set_intro(
40-
__("This is a root account and cannot be edited.")
41-
);
36+
frm.set_intro(__("This is a root account and cannot be edited."));
4237
} else {
4338
// credit days and type if customer or supplier
4439
frm.set_intro(null);
@@ -80,27 +75,33 @@ frappe.ui.form.on("Account", {
8075
);
8176

8277
if (frm.doc.is_group == 1) {
83-
frm.add_custom_button(__('Convert to Non-Group'), function () {
84-
return frappe.call({
85-
doc: frm.doc,
86-
method: 'convert_group_to_ledger',
87-
callback: function() {
88-
frm.refresh();
89-
}
90-
});
91-
}, __('Actions'));
92-
93-
} else if (cint(frm.doc.is_group) == 0
94-
&& frappe.boot.user.can_read.indexOf("GL Entry") !== -1) {
95-
frm.add_custom_button(__('General Ledger'), function () {
96-
frappe.route_options = {
97-
"account": frm.doc.name,
98-
"from_date": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
99-
"to_date": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2],
100-
"company": frm.doc.company
101-
};
102-
frappe.set_route("query-report", "General Ledger");
103-
}, __('View'));
78+
frm.add_custom_button(
79+
__("Convert to Non-Group"),
80+
function () {
81+
return frappe.call({
82+
doc: frm.doc,
83+
method: "convert_group_to_ledger",
84+
callback: function () {
85+
frm.refresh();
86+
},
87+
});
88+
},
89+
__("Actions")
90+
);
91+
} else if (cint(frm.doc.is_group) == 0 && frappe.boot.user.can_read.indexOf("GL Entry") !== -1) {
92+
frm.add_custom_button(
93+
__("General Ledger"),
94+
function () {
95+
frappe.route_options = {
96+
account: frm.doc.name,
97+
from_date: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
98+
to_date: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2],
99+
company: frm.doc.company,
100+
};
101+
frappe.set_route("query-report", "General Ledger");
102+
},
103+
__("View")
104+
);
104105

105106
frm.add_custom_button(
106107
__("Convert to Group"),
@@ -193,14 +194,8 @@ frappe.ui.form.on("Account", {
193194
if (r.message) {
194195
frappe.set_route("Form", "Account", r.message);
195196
} else {
196-
frm.set_value(
197-
"account_number",
198-
data.account_number
199-
);
200-
frm.set_value(
201-
"account_name",
202-
data.account_name
203-
);
197+
frm.set_value("account_number", data.account_number);
198+
frm.set_value("account_name", data.account_name);
204199
}
205200
d.hide();
206201
}

0 commit comments

Comments
 (0)