mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 19:29:10 +00:00
Merge branch 'develop' of github.com:frappe/erpnext into develop
This commit is contained in:
@@ -6,5 +6,5 @@ import frappe
|
||||
|
||||
from frappe.model.document import Document
|
||||
|
||||
class ModeOfPayment(Document):
|
||||
class ModeofPayment(Document):
|
||||
pass
|
||||
@@ -17,8 +17,8 @@ class Employee(Document):
|
||||
self.salary_structure_exists = frappe.db.get_value("Salary Structure",
|
||||
{"employee": self.name, "is_active": "Yes", "docstatus": ["!=", 2]})
|
||||
|
||||
def as_dict(self):
|
||||
doc = super(Employee, self).as_dict()
|
||||
def as_dict(self, no_nulls=False):
|
||||
doc = super(Employee, self).as_dict(no_nulls)
|
||||
|
||||
if hasattr(self, "salary_structure_exists"):
|
||||
doc["salary_structure_exists"] = self.salary_structure_exists
|
||||
|
||||
@@ -10,6 +10,10 @@ $.extend(cur_frm.cscript, {
|
||||
this.frm.add_fetch("sales_order", "delivery_date", "expected_delivery_date");
|
||||
},
|
||||
|
||||
before_submit: function() {
|
||||
cur_frm.toggle_reqd(["fg_warehouse", "wip_warehouse"], true);
|
||||
},
|
||||
|
||||
refresh: function(doc, dt, dn) {
|
||||
this.frm.dashboard.reset();
|
||||
erpnext.toggle_naming_series();
|
||||
|
||||
@@ -33,7 +33,7 @@ cur_frm.cscript.download_materials_required = function(doc, cdt, cdn) {
|
||||
|
||||
cur_frm.fields_dict['pp_details'].grid.get_field('item_code').get_query = function(doc) {
|
||||
return erpnext.queries.item({
|
||||
'ifnull(tabItem.is_pro_applicable, "No")': 'Yes'
|
||||
'is_pro_applicable': 'Yes'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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");
|
||||
// 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);
|
||||
|
||||
// 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. Schedule'),
|
||||
this.make_maintenance_schedule);
|
||||
}
|
||||
|
||||
// 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'),
|
||||
this.make_material_request);
|
||||
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
|
||||
$.extend(cur_frm.cscript, {
|
||||
onload: function() {
|
||||
cur_frm.set_query("item_code", erpnext.queries.item);
|
||||
cur_frm.set_query("item_code", function() {
|
||||
return erpnext.queries.item({"is_stock_item": "Yes"});
|
||||
});
|
||||
},
|
||||
|
||||
item_code: function() {
|
||||
|
||||
Reference in New Issue
Block a user