style: change position of hold and resume button

This commit is contained in:
Mangesh-Khairnar 2019-03-14 13:52:56 +05:30
parent e613c4f380
commit db96db2897

View File

@ -100,15 +100,15 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
if(!in_list(["Closed", "Delivered"], doc.status)) {
if (this.frm.has_perm("submit")) {
if(flt(doc.per_billed, 2) < 100 || doc.per_received < 100) {
cur_frm.add_custom_button(__('Close'), this.close_purchase_order, __("Status"));
if (doc.status != "On Hold") {
cur_frm.add_custom_button(__('Hold'),
function() {
me.hold_purchase_order();
}, __("Status"));
function() {
me.hold_purchase_order();
}, __("Status"));
} else{
cur_frm.add_custom_button(__('Resume'), this.unhold_purchase_order, __("Status"));
}
cur_frm.add_custom_button(__('Close'), this.close_purchase_order, __("Status"));
}
}