fix: convert whitespace to tabs
This commit is contained in:
parent
7554f11260
commit
614b9270e7
@ -55,13 +55,10 @@ frappe.ui.form.on('Ledger Merge', {
|
|||||||
after_save: function(frm) {
|
after_save: function(frm) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
frm.trigger('update_primary_action');
|
frm.trigger('update_primary_action');
|
||||||
}, 750);
|
}, 500);
|
||||||
},
|
},
|
||||||
|
|
||||||
update_primary_action: function(frm) {
|
update_primary_action: function(frm) {
|
||||||
console.log(!frm.is_new());
|
|
||||||
console.log(frm.is_dirty());
|
|
||||||
console.log("-");
|
|
||||||
if (frm.is_dirty()) {
|
if (frm.is_dirty()) {
|
||||||
frm.enable_save();
|
frm.enable_save();
|
||||||
return;
|
return;
|
||||||
@ -69,8 +66,7 @@ frappe.ui.form.on('Ledger Merge', {
|
|||||||
frm.disable_save();
|
frm.disable_save();
|
||||||
if (frm.doc.status !== 'Success') {
|
if (frm.doc.status !== 'Success') {
|
||||||
if (!frm.is_new()) {
|
if (!frm.is_new()) {
|
||||||
let label =
|
let label = frm.doc.status === 'Pending' ? __('Start Merge') : __('Retry');
|
||||||
frm.doc.status === 'Pending' ? __('Start Merge') : __('Retry');
|
|
||||||
frm.page.set_primary_action(label, () => frm.events.start_merge(frm));
|
frm.page.set_primary_action(label, () => frm.events.start_merge(frm));
|
||||||
} else {
|
} else {
|
||||||
frm.page.set_primary_action(__('Save'), () => frm.save());
|
frm.page.set_primary_action(__('Save'), () => frm.save());
|
||||||
@ -115,10 +111,12 @@ frappe.ui.form.on('Ledger Merge Accounts', {
|
|||||||
merge_accounts_add: function(frm, cdt, cdn) {
|
merge_accounts_add: function(frm, cdt, cdn) {
|
||||||
frm.trigger('update_primary_action');
|
frm.trigger('update_primary_action');
|
||||||
},
|
},
|
||||||
|
|
||||||
merge_accounts_remove: function(frm, cdt, cdn) {
|
merge_accounts_remove: function(frm, cdt, cdn) {
|
||||||
frm.trigger('update_primary_action');
|
frm.trigger('update_primary_action');
|
||||||
},
|
},
|
||||||
|
|
||||||
account: function(frm, cdt, cdn) {
|
account: function(frm, cdt, cdn) {
|
||||||
frm.trigger('update_primary_action');
|
frm.trigger('update_primary_action');
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
@ -4,5 +4,6 @@
|
|||||||
# import frappe
|
# import frappe
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
|
||||||
class LedgerMergeAccounts(Document):
|
class LedgerMergeAccounts(Document):
|
||||||
pass
|
pass
|
||||||
|
Loading…
x
Reference in New Issue
Block a user