mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 15:12:51 +00:00
BugFix: Sales Order with Order Type as Shopping Cart
This commit is contained in:
@@ -28,18 +28,18 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
|
|||||||
|
|
||||||
cur_frm.add_custom_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
|
cur_frm.add_custom_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
|
||||||
// delivery note
|
// delivery note
|
||||||
if(flt(doc.per_delivered, 2) < 100 && doc.order_type=='Sales')
|
if(flt(doc.per_delivered, 2) < 100 && ["Sales", "Shopping Cart"].indexOf(doc.order_type)!==-1)
|
||||||
cur_frm.add_custom_button(__('Make Delivery'), this.make_delivery_note);
|
cur_frm.add_custom_button(__('Make Delivery'), this.make_delivery_note);
|
||||||
|
|
||||||
// maintenance
|
// maintenance
|
||||||
if(flt(doc.per_delivered, 2) < 100 && (doc.order_type !='Sales')) {
|
if(flt(doc.per_delivered, 2) < 100 && ["Sales", "Shopping Cart"].indexOf(doc.order_type)===-1) {
|
||||||
cur_frm.add_custom_button(__('Make Maint. Visit'), this.make_maintenance_visit);
|
cur_frm.add_custom_button(__('Make Maint. Visit'), this.make_maintenance_visit);
|
||||||
cur_frm.add_custom_button(__('Make Maint. Schedule'),
|
cur_frm.add_custom_button(__('Make Maint. Schedule'),
|
||||||
this.make_maintenance_schedule);
|
this.make_maintenance_schedule);
|
||||||
}
|
}
|
||||||
|
|
||||||
// indent
|
// indent
|
||||||
if(!doc.order_type || (doc.order_type == 'Sales'))
|
if(!doc.order_type || ["Sales", "Shopping Cart"].indexOf(doc.order_type)!==-1)
|
||||||
cur_frm.add_custom_button(__('Make ') + __('Material Request'),
|
cur_frm.add_custom_button(__('Make ') + __('Material Request'),
|
||||||
this.make_material_request);
|
this.make_material_request);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user