[minor] enhance BOM view
This commit is contained in:
parent
98595dff0b
commit
3714626dd0
@ -360,9 +360,10 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
|||||||
|
|
||||||
this.party_field.make_input();
|
this.party_field.make_input();
|
||||||
setTimeout(this.set_focus.bind(this), 500);
|
setTimeout(this.set_focus.bind(this), 500);
|
||||||
|
|
||||||
this.wrapper.find(".btn-more").on("click", function() {
|
this.wrapper.find(".btn-more").on("click", function() {
|
||||||
me.page_len += 20;
|
me.page_len += 20;
|
||||||
|
me.items = me.get_items();
|
||||||
me.make_item_list();
|
me.make_item_list();
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -476,7 +477,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
|||||||
me.delete_records();
|
me.delete_records();
|
||||||
me.render_list_customers();
|
me.render_list_customers();
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
set_focus: function () {
|
set_focus: function () {
|
||||||
@ -574,21 +575,21 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
|||||||
new_customer: function () {
|
new_customer: function () {
|
||||||
var me = this;
|
var me = this;
|
||||||
if (!this.connection_status) return;
|
if (!this.connection_status) return;
|
||||||
|
|
||||||
this.customer_doc = new frappe.ui.Dialog({
|
this.customer_doc = new frappe.ui.Dialog({
|
||||||
'title': 'Customer',
|
'title': 'Customer',
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
"label": __("Full Name"),
|
"label": __("Full Name"),
|
||||||
"fieldname": "full_name",
|
"fieldname": "full_name",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldtype": "Section Break"
|
"fieldtype": "Section Break"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": __("Email Id"),
|
"label": __("Email Id"),
|
||||||
"fieldname": "email_id",
|
"fieldname": "email_id",
|
||||||
"fieldtype": "Data"
|
"fieldtype": "Data"
|
||||||
},
|
},
|
||||||
@ -596,7 +597,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
|||||||
"fieldtype": "Column Break"
|
"fieldtype": "Column Break"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": __("Contact Number"),
|
"label": __("Contact Number"),
|
||||||
"fieldname": "contact_no",
|
"fieldname": "contact_no",
|
||||||
"fieldtype": "Data"
|
"fieldtype": "Data"
|
||||||
},
|
},
|
||||||
@ -604,12 +605,12 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
|||||||
"fieldtype": "Section Break"
|
"fieldtype": "Section Break"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": __("Address Line 1"),
|
"label": __("Address Line 1"),
|
||||||
"fieldname": "address_line1",
|
"fieldname": "address_line1",
|
||||||
"fieldtype": "Data"
|
"fieldtype": "Data"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": __("Address Line 2"),
|
"label": __("Address Line 2"),
|
||||||
"fieldname": "address_line2",
|
"fieldname": "address_line2",
|
||||||
"fieldtype": "Data"
|
"fieldtype": "Data"
|
||||||
},
|
},
|
||||||
@ -617,31 +618,31 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
|||||||
"fieldtype": "Column Break"
|
"fieldtype": "Column Break"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": __("City"),
|
"label": __("City"),
|
||||||
"fieldname": "city",
|
"fieldname": "city",
|
||||||
"fieldtype": "Data"
|
"fieldtype": "Data"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": __("State"),
|
"label": __("State"),
|
||||||
"fieldname": "state",
|
"fieldname": "state",
|
||||||
"fieldtype": "Data"
|
"fieldtype": "Data"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": __("ZIP Code"),
|
"label": __("ZIP Code"),
|
||||||
"fieldname": "zip_code",
|
"fieldname": "zip_code",
|
||||||
"fieldtype": "Data"
|
"fieldtype": "Data"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
this.customer_doc.show()
|
this.customer_doc.show()
|
||||||
|
|
||||||
this.customer_doc.set_primary_action(__("Save"), function () {
|
this.customer_doc.set_primary_action(__("Save"), function () {
|
||||||
me.make_offline_customer();
|
me.make_offline_customer();
|
||||||
me.pos_bill.show();
|
me.pos_bill.show();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
make_offline_customer: function() {
|
make_offline_customer: function() {
|
||||||
this.frm.doc.customer = this.customer_doc.get_values().full_name;
|
this.frm.doc.customer = this.customer_doc.get_values().full_name;
|
||||||
this.frm.doc.contact_details = JSON.stringify(this.customer_doc.get_values());
|
this.frm.doc.contact_details = JSON.stringify(this.customer_doc.get_values());
|
||||||
@ -709,7 +710,8 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$("<h4>Searching record not found.</h4>").appendTo($wrap)
|
$("<p class='text-muted small' style='padding-left: 10px'>"
|
||||||
|
+__("Not items found")+"</p>").appendTo($wrap)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.items.length == 1
|
if (this.items.length == 1
|
||||||
@ -744,7 +746,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
this.items_list = this.apply_category();
|
this.items_list = this.apply_category();
|
||||||
|
|
||||||
key = this.serach_item.$input.val().toLowerCase().replace(/[&\/\\#,+()\[\]$~.'":*?<>{}]/g, '\\$&');
|
key = this.serach_item.$input.val().toLowerCase().replace(/[&\/\\#,+()\[\]$~.'":*?<>{}]/g, '\\$&');
|
||||||
@ -776,7 +778,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
|||||||
return this.items_list;
|
return this.items_list;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
apply_category: function() {
|
apply_category: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
category = this.search_item_group.$input.val();
|
category = this.search_item_group.$input.val();
|
||||||
|
@ -49,6 +49,11 @@ def get_data():
|
|||||||
"name": "Stock Projected Qty",
|
"name": "Stock Projected Qty",
|
||||||
"doctype": "Item",
|
"doctype": "Item",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "page",
|
||||||
|
"name": "stock-balance",
|
||||||
|
"label": _("Stock Summary")
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "report",
|
"type": "report",
|
||||||
"is_query_report": True,
|
"is_query_report": True,
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 1,
|
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"in_standard_filter": 1,
|
"in_standard_filter": 1,
|
||||||
"label": "Item",
|
"label": "Item",
|
||||||
@ -51,7 +50,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Item Name",
|
"label": "Item Name",
|
||||||
@ -81,7 +79,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Quantity",
|
"label": "Quantity",
|
||||||
@ -110,7 +107,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"length": 0,
|
||||||
@ -137,7 +133,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Is Active",
|
"label": "Is Active",
|
||||||
@ -167,7 +162,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Is Default",
|
"label": "Is Default",
|
||||||
@ -197,7 +191,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "With Operations",
|
"label": "With Operations",
|
||||||
@ -224,7 +217,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Rate Of Materials Based On",
|
"label": "Rate Of Materials Based On",
|
||||||
@ -253,7 +245,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Price List",
|
"label": "Price List",
|
||||||
@ -281,7 +272,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "",
|
"label": "",
|
||||||
@ -309,7 +299,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Currency",
|
"label": "Currency",
|
||||||
@ -338,7 +327,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"length": 0,
|
||||||
@ -365,7 +353,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Conversion Rate",
|
"label": "Conversion Rate",
|
||||||
@ -395,7 +382,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Operations",
|
"label": "Operations",
|
||||||
@ -423,7 +409,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Operations",
|
"label": "Operations",
|
||||||
@ -453,7 +438,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Materials",
|
"label": "Materials",
|
||||||
@ -481,7 +465,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Items",
|
"label": "Items",
|
||||||
@ -511,7 +494,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Scrap",
|
"label": "Scrap",
|
||||||
@ -539,7 +521,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Scrap Items",
|
"label": "Scrap Items",
|
||||||
@ -568,7 +549,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Costing",
|
"label": "Costing",
|
||||||
@ -596,7 +576,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Operating Cost",
|
"label": "Operating Cost",
|
||||||
@ -624,7 +603,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Raw Material Cost",
|
"label": "Raw Material Cost",
|
||||||
@ -652,7 +630,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Scrap Material Cost",
|
"label": "Scrap Material Cost",
|
||||||
@ -681,7 +658,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"length": 0,
|
||||||
@ -707,7 +683,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Operating Cost (Company Currency)",
|
"label": "Operating Cost (Company Currency)",
|
||||||
@ -736,7 +711,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Raw Material Cost(Company Currency)",
|
"label": "Raw Material Cost(Company Currency)",
|
||||||
@ -765,7 +739,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Scrap Material Cost(Company Currency)",
|
"label": "Scrap Material Cost(Company Currency)",
|
||||||
@ -794,7 +767,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"length": 0,
|
||||||
@ -821,7 +793,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Total Cost",
|
"label": "Total Cost",
|
||||||
@ -849,7 +820,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"length": 0,
|
||||||
@ -876,7 +846,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Total Cost(Company Currency)",
|
"label": "Total Cost(Company Currency)",
|
||||||
@ -905,7 +874,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "",
|
"label": "",
|
||||||
@ -932,7 +900,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 1,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Project",
|
"label": "Project",
|
||||||
@ -962,7 +929,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Company",
|
"label": "Company",
|
||||||
@ -991,7 +957,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 1,
|
"ignore_user_permissions": 1,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Amended From",
|
"label": "Amended From",
|
||||||
@ -1019,7 +984,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"length": 0,
|
||||||
@ -1045,7 +1009,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Item UOM",
|
"label": "Item UOM",
|
||||||
@ -1073,7 +1036,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"length": 0,
|
||||||
@ -1100,7 +1062,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Item Description",
|
"label": "Item Description",
|
||||||
@ -1127,7 +1088,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"length": 0,
|
||||||
@ -1154,7 +1114,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Image",
|
"label": "Image",
|
||||||
@ -1182,7 +1141,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Image View",
|
"label": "Image View",
|
||||||
@ -1212,7 +1170,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Materials Required (Exploded)",
|
"label": "Materials Required (Exploded)",
|
||||||
@ -1239,7 +1196,6 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Exploded_items",
|
"label": "Exploded_items",
|
||||||
@ -1271,8 +1227,8 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2016-11-21 17:06:49.349654",
|
"modified": "2017-02-01 14:27:17.949390",
|
||||||
"modified_by": "rohit@erpnext.com",
|
"modified_by": "Administrator",
|
||||||
"module": "Manufacturing",
|
"module": "Manufacturing",
|
||||||
"name": "BOM",
|
"name": "BOM",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
@ -1287,7 +1243,6 @@
|
|||||||
"export": 1,
|
"export": 1,
|
||||||
"if_owner": 0,
|
"if_owner": 0,
|
||||||
"import": 0,
|
"import": 0,
|
||||||
"is_custom": 0,
|
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
@ -1308,7 +1263,6 @@
|
|||||||
"export": 0,
|
"export": 0,
|
||||||
"if_owner": 0,
|
"if_owner": 0,
|
||||||
"import": 0,
|
"import": 0,
|
||||||
"is_custom": 0,
|
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
@ -1329,7 +1283,6 @@
|
|||||||
"export": 0,
|
"export": 0,
|
||||||
"if_owner": 0,
|
"if_owner": 0,
|
||||||
"import": 0,
|
"import": 0,
|
||||||
"is_custom": 0,
|
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
@ -1347,5 +1300,6 @@
|
|||||||
"search_fields": "item",
|
"search_fields": "item",
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
|
"track_changes": 0,
|
||||||
"track_seen": 0
|
"track_seen": 0
|
||||||
}
|
}
|
@ -500,10 +500,15 @@ def validate_bom_no(item, bom_no):
|
|||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_children():
|
def get_children():
|
||||||
if frappe.form_dict.parent:
|
if frappe.form_dict.parent:
|
||||||
return frappe.db.sql("""select item_code,
|
return frappe.db.sql("""select
|
||||||
bom_no as value, qty,
|
bom_item.item_code,
|
||||||
if(ifnull(bom_no, "")!="", 1, 0) as expandable
|
bom_item.bom_no as value,
|
||||||
from `tabBOM Item`
|
bom_item.qty,
|
||||||
where parent=%s
|
if(ifnull(bom_item.bom_no, "")!="", 1, 0) as expandable,
|
||||||
order by idx
|
item.image,
|
||||||
|
item.description
|
||||||
|
from `tabBOM Item` bom_item, tabItem item
|
||||||
|
where bom_item.parent=%s
|
||||||
|
and bom_item.item_code = item.name
|
||||||
|
order by bom_item.idx
|
||||||
""", frappe.form_dict.parent, as_dict=True)
|
""", frappe.form_dict.parent, as_dict=True)
|
21
erpnext/manufacturing/doctype/bom/bom_item_preview.html
Normal file
21
erpnext/manufacturing/doctype/bom/bom_item_preview.html
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<div style="padding: 15px;">
|
||||||
|
{% if data.image %}
|
||||||
|
<img class="responsive" src={{ data.image }}>
|
||||||
|
<hr style="margin: 15px -15px;">
|
||||||
|
{% endif %}
|
||||||
|
<h4>
|
||||||
|
{{ __("Description") }}
|
||||||
|
</h4>
|
||||||
|
<div style="padding-top: 10px;">
|
||||||
|
{{ data.description }}
|
||||||
|
</div>
|
||||||
|
<hr style="margin: 15px -15px;">
|
||||||
|
<p>
|
||||||
|
{% if data.value %}
|
||||||
|
<a style="margin-right: 7px; margin-bottom: 7px" class="btn btn-default btn-xs" href="#Form/BOM/{{ data.value }}">
|
||||||
|
{{ __("Open BOM {0}", [data.value.bold()]) }}</a>
|
||||||
|
{% endif %}
|
||||||
|
<a class="btn btn-default btn-xs" href="#Form/Item/{{ data.item_code }}">
|
||||||
|
{{ __("Open Item {0}", [data.item_code.bold()]) }}</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
@ -20,14 +20,14 @@ frappe.treeview_settings["BOM"] = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
toolbar: [
|
toolbar: [
|
||||||
{toggle_btn: true},
|
{ toggle_btn: true },
|
||||||
{
|
{
|
||||||
label:__("Edit"),
|
label:__("Edit"),
|
||||||
condition: function(node) {
|
condition: function(node) {
|
||||||
return node.expandable;
|
return node.expandable;
|
||||||
},
|
},
|
||||||
click: function(node) {
|
click: function(node) {
|
||||||
|
|
||||||
frappe.set_route("Form", "BOM", node.data.value);
|
frappe.set_route("Form", "BOM", node.data.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -40,5 +40,6 @@ frappe.treeview_settings["BOM"] = {
|
|||||||
},
|
},
|
||||||
condition: 'frappe.boot.user.can_create.indexOf("BOM") !== -1'
|
condition: 'frappe.boot.user.can_create.indexOf("BOM") !== -1'
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
view_template: 'bom_item_preview'
|
||||||
}
|
}
|
@ -7,7 +7,10 @@ frappe.views.calendar["Production Order"] = {
|
|||||||
"end": "planned_end_date",
|
"end": "planned_end_date",
|
||||||
"id": "name",
|
"id": "name",
|
||||||
"title": "name",
|
"title": "name",
|
||||||
"allDay": "allDay"
|
"allDay": "allDay",
|
||||||
|
"progress": function(data) {
|
||||||
|
return flt(data.produced_qty) / data.qty * 100;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
gantt: true,
|
gantt: true,
|
||||||
get_css_class: function(data) {
|
get_css_class: function(data) {
|
||||||
|
@ -7,7 +7,8 @@ frappe.views.calendar["Task"] = {
|
|||||||
"end": "exp_end_date",
|
"end": "exp_end_date",
|
||||||
"id": "name",
|
"id": "name",
|
||||||
"title": "subject",
|
"title": "subject",
|
||||||
"allDay": "allDay"
|
"allDay": "allDay",
|
||||||
|
"progress": "progress"
|
||||||
},
|
},
|
||||||
gantt: true,
|
gantt: true,
|
||||||
filters: [
|
filters: [
|
||||||
|
@ -117,6 +117,10 @@ class StockReconciliation(StockController):
|
|||||||
if buying_rate:
|
if buying_rate:
|
||||||
row.valuation_rate = buying_rate
|
row.valuation_rate = buying_rate
|
||||||
|
|
||||||
|
else:
|
||||||
|
# get valuation rate from Item
|
||||||
|
row.valuation_rate = frappe.get_value('Item', row.item_code, 'valuation_rate')
|
||||||
|
|
||||||
# throw all validation messages
|
# throw all validation messages
|
||||||
if self.validation_messages:
|
if self.validation_messages:
|
||||||
for msg in self.validation_messages:
|
for msg in self.validation_messages:
|
||||||
|
Loading…
Reference in New Issue
Block a user