refactor: make payments app a soft dependency (#33245)

refactor: make payment app a soft dependency
This commit is contained in:
Ankush Menat
2022-12-08 16:40:13 +05:30
committed by GitHub
parent 07c815f35f
commit 0b86b1baca
14 changed files with 74 additions and 13 deletions

View File

@@ -333,8 +333,18 @@ $.extend(erpnext.utils, {
}
frappe.ui.form.make_quick_entry(doctype, null, null, new_doc);
});
}
},
// check if payments app is installed on site, if not warn user.
check_payments_app: () => {
if (frappe.boot.versions && !frappe.boot.versions.payments) {
const marketplace_link = '<a href="https://frappecloud.com/marketplace/apps/payments">Marketplace</a>'
const github_link = '<a href="https://github.com/frappe/payments/">GitHub</a>'
const msg = __("payments app is not installed. Please install it from {0} or {1}", [marketplace_link, github_link])
frappe.msgprint(msg);
}
},
});
erpnext.utils.select_alternate_items = function(opts) {