fix: Don't show make jv button if equity or liability account and asset account not specified (#19350)

This commit is contained in:
Saurabh 2019-10-21 16:03:28 +05:30 committed by Nabin Hait
parent c58d7d8a98
commit 48eff90d1f

View File

@ -16,7 +16,7 @@ frappe.ui.form.on('Share Transfer', {
};
};
});
if (frm.doc.docstatus == 1) {
if (frm.doc.docstatus == 1 && frm.doc.equity_or_liability_account && frm.doc.asset_account) {
frm.add_custom_button(__('Create Journal Entry'), function () {
erpnext.share_transfer.make_jv(frm);
});