mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 06:59:20 +00:00
Merge branch 'responsive' of github.com:webnotes/erpnext into responsive
Conflicts: selling/doctype/quotation/quotation.py utilities/transaction_base.py
This commit is contained in:
@@ -122,8 +122,14 @@ cur_frm.cscript.make_contact = function() {
|
||||
}
|
||||
|
||||
cur_frm.fields_dict['customer_group'].get_query = function(doc,dt,dn) {
|
||||
return 'SELECT `tabCustomer Group`.`name`, `tabCustomer Group`.`parent_customer_group` FROM `tabCustomer Group` WHERE `tabCustomer Group`.`is_group` = "No" AND `tabCustomer Group`.`docstatus`!= 2 AND `tabCustomer Group`.%(key)s LIKE "%s" ORDER BY `tabCustomer Group`.`name` ASC LIMIT 50';
|
||||
return{
|
||||
filters:{'is_group': 'No'}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
cur_frm.fields_dict.lead_name.get_query = erpnext.utils.lead_query;
|
||||
cur_frm.fields_dict.lead_name.get_query = function(doc,cdt,cdn) {
|
||||
return{
|
||||
query:"controllers.queries.lead_query"
|
||||
}
|
||||
}
|
||||
@@ -184,7 +184,7 @@ class DocType(TransactionBase):
|
||||
|
||||
@webnotes.whitelist()
|
||||
def get_dashboard_info(customer):
|
||||
if not webnotes.has_permission("Customer", customer):
|
||||
if not webnotes.has_permission("Customer", "read", customer):
|
||||
webnotes.msgprint("No Permission", raise_exception=True)
|
||||
|
||||
out = {}
|
||||
|
||||
@@ -62,16 +62,20 @@ cur_frm.cscript.onload = function(doc, dt, dn) {
|
||||
|
||||
cur_frm.fields_dict['delivery_note_no'].get_query = function(doc) {
|
||||
doc = locals[this.doctype][this.docname];
|
||||
var cond = '';
|
||||
if(doc.customer) {
|
||||
cond = '`tabDelivery Note`.customer = "'+doc.customer+'" AND';
|
||||
}
|
||||
return repl('SELECT DISTINCT `tabDelivery Note`.name, `tabDelivery Note`.customer_name FROM `tabDelivery Note`, `tabDelivery Note Item` WHERE `tabDelivery Note`.company = "%(company)s" AND `tabDelivery Note`.docstatus = 1 AND ifnull(`tabDelivery Note`.per_installed,0) < 99.99 AND %(cond)s `tabDelivery Note`.name LIKE "%s" ORDER BY `tabDelivery Note`.name DESC LIMIT 50', {company:doc.company, cond:cond});
|
||||
|
||||
var filter = {
|
||||
'company': doc.company,
|
||||
'docstatus': 1,
|
||||
'per_installed': 99.99
|
||||
};
|
||||
if(doc.customer) filter['customer'] = doc.customer;
|
||||
return { filters: filter }
|
||||
}
|
||||
|
||||
|
||||
cur_frm.fields_dict['territory'].get_query = function(doc,cdt,cdn) {
|
||||
return 'SELECT `tabTerritory`.`name`,`tabTerritory`.`parent_territory` FROM `tabTerritory` WHERE `tabTerritory`.`is_group` = "No" AND `tabTerritory`.`docstatus`!= 2 AND `tabTerritory`.%(key)s LIKE "%s" ORDER BY `tabTerritory`.`name` ASC LIMIT 50';
|
||||
return{
|
||||
filters: { 'is_group': "No" }
|
||||
}
|
||||
}
|
||||
|
||||
cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) {
|
||||
@@ -79,11 +83,19 @@ cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc
|
||||
}
|
||||
|
||||
cur_frm.fields_dict['customer_address'].get_query = function(doc, cdt, cdn) {
|
||||
return 'SELECT name,address_line1,city FROM tabAddress WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50';
|
||||
return{
|
||||
filters: { 'customer': doc.customer }
|
||||
}
|
||||
}
|
||||
|
||||
cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
|
||||
return 'SELECT name,CONCAT(first_name," ",ifnull(last_name,"")) As FullName,department,designation FROM tabContact WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50';
|
||||
return{
|
||||
filters: { 'customer': doc.customer }
|
||||
}
|
||||
}
|
||||
|
||||
cur_frm.fields_dict.customer.get_query = erpnext.utils.customer_query;
|
||||
cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
|
||||
return{
|
||||
query:"controllers.queries.customer_query"
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:51",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-03-07 07:03:21",
|
||||
"modified": "2013-07-10 14:54:09",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -29,6 +29,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "item_code",
|
||||
"fieldtype": "Link",
|
||||
"in_list_view": 1,
|
||||
"label": "Item Code",
|
||||
"oldfieldname": "item_code",
|
||||
"oldfieldtype": "Link",
|
||||
@@ -39,6 +40,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "description",
|
||||
"fieldtype": "Data",
|
||||
"in_list_view": 1,
|
||||
"label": "Description",
|
||||
"oldfieldname": "description",
|
||||
"oldfieldtype": "Data",
|
||||
@@ -51,6 +53,7 @@
|
||||
"fieldname": "prevdoc_date",
|
||||
"fieldtype": "Date",
|
||||
"hidden": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Delivery Date",
|
||||
"oldfieldname": "prevdoc_date",
|
||||
"oldfieldtype": "Date",
|
||||
@@ -61,6 +64,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "serial_no",
|
||||
"fieldtype": "Small Text",
|
||||
"in_list_view": 1,
|
||||
"label": "Serial No",
|
||||
"oldfieldname": "serial_no",
|
||||
"oldfieldtype": "Small Text",
|
||||
@@ -72,6 +76,7 @@
|
||||
"fieldname": "prevdoc_detail_docname",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Against Document Detail No",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "prevdoc_detail_docname",
|
||||
@@ -87,6 +92,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Against Document No",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "prevdoc_docname",
|
||||
@@ -103,6 +109,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Document Type",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "prevdoc_doctype",
|
||||
@@ -117,6 +124,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "qty",
|
||||
"fieldtype": "Float",
|
||||
"in_list_view": 1,
|
||||
"label": "Installed Qty",
|
||||
"oldfieldname": "qty",
|
||||
"oldfieldtype": "Currency",
|
||||
|
||||
@@ -20,16 +20,19 @@ wn.require('app/setup/doctype/contact_control/contact_control.js');
|
||||
wn.provide("erpnext");
|
||||
erpnext.LeadController = wn.ui.form.Controller.extend({
|
||||
setup: function() {
|
||||
this.frm.fields_dict.customer.get_query = erpnext.utils.customer_query;
|
||||
this.frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
|
||||
return { query:"controllers.queries.customer_query" } }
|
||||
},
|
||||
|
||||
onload: function() {
|
||||
if(cur_frm.fields_dict.lead_owner.df.options.match(/^Profile/)) {
|
||||
cur_frm.fields_dict.lead_owner.get_query = erpnext.utils.profile_query;
|
||||
cur_frm.fields_dict.lead_owner.get_query = function(doc,cdt,cdn) {
|
||||
return { query:"controllers.queries.profile_query" } }
|
||||
}
|
||||
|
||||
if(cur_frm.fields_dict.contact_by.df.options.match(/^Profile/)) {
|
||||
cur_frm.fields_dict.contact_by.get_query = erpnext.utils.profile_query;
|
||||
cur_frm.fields_dict.contact_by.get_query = function(doc,cdt,cdn) {
|
||||
return { query:"controllers.queries.profile_query" } }
|
||||
}
|
||||
|
||||
if(in_list(user_roles,'System Manager')) {
|
||||
|
||||
@@ -109,7 +109,8 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
}
|
||||
|
||||
if(cur_frm.fields_dict.contact_by.df.options.match(/^Profile/)) {
|
||||
cur_frm.fields_dict.contact_by.get_query = erpnext.utils.profile_query;
|
||||
cur_frm.fields_dict.contact_by.get_query = function(doc,cdt,cdn) {
|
||||
return { query:"controllers.queries.profile_query" } }
|
||||
}
|
||||
|
||||
if(doc.customer && !doc.customer_name) cur_frm.cscript.customer(doc);
|
||||
@@ -153,23 +154,23 @@ cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc
|
||||
}
|
||||
|
||||
cur_frm.fields_dict['customer_address'].get_query = function(doc, cdt, cdn) {
|
||||
return 'SELECT name, address_line1, city FROM tabAddress \
|
||||
WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND \
|
||||
%(key)s LIKE "%s" ORDER BY name ASC LIMIT 50';
|
||||
return {
|
||||
filters:{'customer':doc.customer}
|
||||
}
|
||||
}
|
||||
|
||||
cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
|
||||
if (!doc.customer) msgprint("Please select customer first");
|
||||
else {
|
||||
return 'SELECT name, CONCAT(first_name," ",ifnull(last_name,"")) As FullName, \
|
||||
department, designation FROM tabContact WHERE customer = "'+ doc.customer +
|
||||
'" AND docstatus != 2 AND %(key)s LIKE "%s" ORDER BY name ASC LIMIT 50';
|
||||
filters:{'customer':doc.customer}
|
||||
}
|
||||
}
|
||||
|
||||
// lead
|
||||
cur_frm.fields_dict['lead'].get_query = function(doc,cdt,cdn){
|
||||
return 'SELECT `tabLead`.name, `tabLead`.lead_name FROM `tabLead` WHERE `tabLead`.%(key)s LIKE "%s" ORDER BY `tabLead`.`name` ASC LIMIT 50';
|
||||
return {
|
||||
query: "selling.doctype.opportunity.opportunity.get_lead"
|
||||
}
|
||||
}
|
||||
|
||||
cur_frm.cscript.lead = function(doc, cdt, cdn) {
|
||||
@@ -185,14 +186,17 @@ cur_frm.cscript.lead = function(doc, cdt, cdn) {
|
||||
}
|
||||
|
||||
cur_frm.fields_dict['enquiry_details'].grid.get_field('item_code').get_query = function(doc, cdt, cdn) {
|
||||
if (doc.enquiry_type == 'Maintenance')
|
||||
return erpnext.queries.item({
|
||||
'ifnull(tabItem.is_service_item, "No")': 'Yes'
|
||||
});
|
||||
else
|
||||
return erpnext.queries.item({
|
||||
'ifnull(tabItem.is_sales_item, "No")': 'Yes'
|
||||
});
|
||||
if (doc.enquiry_type == 'Maintenance') {
|
||||
return {
|
||||
query:"controllers.queries.item_query",
|
||||
filters:{ 'is_service_item': 'Yes' }
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
query:"controllers.queries.item_query",
|
||||
filters:{ 'is_sales_item': 'Yes' }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cur_frm.cscript['Declare Opportunity Lost'] = function(){
|
||||
@@ -229,8 +233,12 @@ cur_frm.cscript['Declare Opportunity Lost'] = function(){
|
||||
|
||||
//get query select Territory
|
||||
cur_frm.fields_dict['territory'].get_query = function(doc,cdt,cdn) {
|
||||
return 'SELECT `tabTerritory`.`name`,`tabTerritory`.`parent_territory` FROM `tabTerritory` WHERE `tabTerritory`.`is_group` = "No" AND `tabTerritory`.`docstatus`!= 2 AND `tabTerritory`.%(key)s LIKE "%s" ORDER BY `tabTerritory`.`name` ASC LIMIT 50';}
|
||||
return{
|
||||
filters:{'is_group': 'No'}
|
||||
}
|
||||
|
||||
cur_frm.fields_dict.lead.get_query = erpnext.utils.lead_query;
|
||||
cur_frm.fields_dict.lead.get_query = function(doc,cdt,cdn) {
|
||||
return { query:"controllers.queries.lead_query" } }
|
||||
|
||||
cur_frm.fields_dict.customer.get_query = erpnext.utils.customer_query;
|
||||
cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
|
||||
return { query:"controllers.queries.customer_query" } }
|
||||
@@ -202,4 +202,14 @@ def make_quotation(source_name, target_doclist=None):
|
||||
}
|
||||
}, target_doclist)
|
||||
|
||||
return [d.fields for d in doclist]
|
||||
return [d.fields for d in doclist]
|
||||
|
||||
def get_lead(doctype, txt, searchfield, start, page_len, filters):
|
||||
from controllers.queries import get_match_cond
|
||||
return webnotes.conn.sql ("""select `tabLead`.name, `tabLead`.lead_name FROM `tabLead`
|
||||
where `tabLead`.%(key)s like "%(txt)s"
|
||||
%(mcond)s
|
||||
order by `tabLead`.`name` asc
|
||||
limit %(start)s, %(page_len)s """ % {'key': searchfield,
|
||||
'txt': "%%%s%%" % txt, 'mcond':get_match_cond(doctype, searchfield),
|
||||
'start': start, 'page_len': page_len})
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:51",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-03-07 07:03:26",
|
||||
"modified": "2013-07-10 14:54:11",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -28,6 +28,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "item_code",
|
||||
"fieldtype": "Link",
|
||||
"in_list_view": 1,
|
||||
"label": "Item Code",
|
||||
"oldfieldname": "item_code",
|
||||
"oldfieldtype": "Link",
|
||||
@@ -38,6 +39,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "item_name",
|
||||
"fieldtype": "Data",
|
||||
"in_list_view": 1,
|
||||
"label": "Item Name",
|
||||
"oldfieldname": "item_name",
|
||||
"oldfieldtype": "Data",
|
||||
@@ -47,6 +49,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "description",
|
||||
"fieldtype": "Text",
|
||||
"in_list_view": 1,
|
||||
"label": "Description",
|
||||
"oldfieldname": "description",
|
||||
"oldfieldtype": "Text",
|
||||
@@ -59,6 +62,7 @@
|
||||
"fieldname": "item_group",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Item Group",
|
||||
"oldfieldname": "item_group",
|
||||
"oldfieldtype": "Link",
|
||||
@@ -71,6 +75,7 @@
|
||||
"fieldname": "brand",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Brand",
|
||||
"oldfieldname": "brand",
|
||||
"oldfieldtype": "Link",
|
||||
@@ -78,29 +83,39 @@
|
||||
"print_hide": 1,
|
||||
"search_index": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "quantity_and_rate",
|
||||
"fieldtype": "Section Break",
|
||||
"in_list_view": 0,
|
||||
"label": "Quantity and Rate"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "qty",
|
||||
"fieldtype": "Float",
|
||||
"in_list_view": 1,
|
||||
"label": "Qty",
|
||||
"oldfieldname": "qty",
|
||||
"oldfieldtype": "Currency"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "basic_rate",
|
||||
"fieldtype": "Currency",
|
||||
"hidden": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Basic Rate",
|
||||
"oldfieldname": "basic_rate",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "Company:company:default_currency",
|
||||
"print_hide": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "qty",
|
||||
"fieldtype": "Float",
|
||||
"label": "Qty",
|
||||
"oldfieldname": "qty",
|
||||
"oldfieldtype": "Currency"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "uom",
|
||||
"fieldtype": "Link",
|
||||
"in_list_view": 0,
|
||||
"label": "UOM",
|
||||
"oldfieldname": "uom",
|
||||
"oldfieldtype": "Link",
|
||||
|
||||
@@ -118,7 +118,8 @@ cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc
|
||||
}),'', doc, dt, dn, 1);
|
||||
}
|
||||
|
||||
cur_frm.fields_dict.lead.get_query = erpnext.utils.lead_query;
|
||||
cur_frm.fields_dict.lead.get_query = function(doc,cdt,cdn) {
|
||||
return{ query:"controllers.queries.lead_query" } }
|
||||
|
||||
cur_frm.cscript.lead = function(doc, cdt, cdn) {
|
||||
if(doc.lead) {
|
||||
@@ -186,45 +187,21 @@ cur_frm.fields_dict['quotation_details'].grid.get_field('item_code').get_query=
|
||||
if(doc.customer) {
|
||||
var export_rate_field = wn.meta.get_docfield(cdt, 'export_rate', cdn);
|
||||
var precision = (export_rate_field && export_rate_field.fieldtype) === 'Float' ? 6 : 2;
|
||||
return repl("\
|
||||
select \
|
||||
item.name, \
|
||||
( \
|
||||
select concat('Last Quote @ ', q.currency, ' ', \
|
||||
format(q_item.export_rate, %(precision)s)) \
|
||||
from `tabQuotation` q, `tabQuotation Item` q_item \
|
||||
where \
|
||||
q.name = q_item.parent \
|
||||
and q_item.item_code = item.name \
|
||||
and q.docstatus = 1 \
|
||||
and q.customer = \"%(cust)s\" \
|
||||
order by q.transaction_date desc \
|
||||
limit 1 \
|
||||
) as quote_rate, \
|
||||
( \
|
||||
select concat('Last Sale @ ', si.currency, ' ', \
|
||||
format(si_item.basic_rate, %(precision)s)) \
|
||||
from `tabSales Invoice` si, `tabSales Invoice Item` si_item \
|
||||
where \
|
||||
si.name = si_item.parent \
|
||||
and si_item.item_code = item.name \
|
||||
and si.docstatus = 1 \
|
||||
and si.customer = \"%(cust)s\" \
|
||||
order by si.posting_date desc \
|
||||
limit 1 \
|
||||
) as sales_rate, \
|
||||
item.item_name, item.description \
|
||||
from `tabItem` item \
|
||||
where \
|
||||
item.%(key)s like \"%s\" \
|
||||
%(cond)s \
|
||||
limit 25", {
|
||||
cust: doc.customer,
|
||||
cond: cond,
|
||||
precision: precision
|
||||
});
|
||||
return {
|
||||
query: "selling.doctype.quotation.quotation.quotation_details",
|
||||
filters:{
|
||||
cust: doc.customer,
|
||||
cond: cond,
|
||||
precision: precision
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return repl("SELECT name, item_name, description FROM `tabItem` item WHERE item.%(key)s LIKE '%s' %(cond)s ORDER BY item.item_code DESC LIMIT 50", {cond:cond});
|
||||
return {
|
||||
query: 'selling.doctype.quotation.quotation.quotation_details',
|
||||
filters:{
|
||||
cond: cond
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -270,7 +270,7 @@ def _make_sales_order(source_name, target_doclist=None, ignore_permissions=False
|
||||
# postprocess: fetch shipping address, set missing values
|
||||
|
||||
return [d.fields for d in doclist]
|
||||
|
||||
|
||||
def _make_customer(source_name, ignore_permissions=False):
|
||||
quotation = webnotes.conn.get_value("Quotation", source_name, ["lead", "order_type"])
|
||||
if quotation and quotation[0]:
|
||||
@@ -295,4 +295,42 @@ def _make_customer(source_name, ignore_permissions=False):
|
||||
customer.insert()
|
||||
return customer
|
||||
else:
|
||||
raise e
|
||||
raise e
|
||||
|
||||
def quotation_details(doctype, txt, searchfield, start, page_len, filters):
|
||||
from controllers.queries import get_match_cond
|
||||
|
||||
if filters.has_key('cust') and filters.has_key('precision'):
|
||||
return webnotes.conn.sql("""select item.name,
|
||||
(select concat('Last Quote @ ', q.currency, ' ',
|
||||
format(q_item.export_rate, %(precision)s))
|
||||
from `tabQuotation` q, `tabQuotation Item` q_item
|
||||
where q.name = q_item.parent
|
||||
and q_item.item_code = item.name
|
||||
and q.docstatus = 1
|
||||
and q.customer = "%(cust)s"
|
||||
order by q.transaction_date desc
|
||||
limit 1) as quote_rate,
|
||||
(select concat('Last Sale @ ', si.currency, ' ',
|
||||
format(si_item.basic_rate, %(precision)s))
|
||||
from `tabSales Invoice` si, `tabSales Invoice Item` si_item
|
||||
where si.name = si_item.parent
|
||||
and si_item.item_code = item.name
|
||||
and si.docstatus = 1
|
||||
and si.customer ="%(cust)s"
|
||||
order by si.posting_date desc
|
||||
limit 1) as sales_rate,
|
||||
item.item_name, item.description
|
||||
from `tabItem` item
|
||||
where %(cond)s %(mcond)s
|
||||
and item.%(searchfield)s like '%(txt)s'
|
||||
order by item.name desc limit %(start)s, %(page_len)s """ % {'precision': filters["precision"],
|
||||
'cust': filters['cust'], 'cond': filters['cond'], 'searchfield': searchfield,
|
||||
'txt': "%%%s%%" % txt, 'mcond': get_match_cond(doctype, searchfield),
|
||||
'start': start, 'page_len': page_len})
|
||||
|
||||
else:
|
||||
return webnotes.conn.sql(""" select name, item_name, description from `tabItem` item
|
||||
where %s %s and %s like %s order by name desc limit %s, %s""" %
|
||||
("%s", get_match_cond(doctype, searchfield), searchfield, "%s", "%s", "%s"),
|
||||
(filters["cond"], "%%%s%%" % txt, start, page_len))
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-03-07 11:42:57",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-09 12:24:21",
|
||||
"modified": "2013-07-10 14:54:18",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -31,6 +31,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"label": "Item Code",
|
||||
"oldfieldname": "item_code",
|
||||
"oldfieldtype": "Link",
|
||||
@@ -47,6 +48,7 @@
|
||||
"fieldname": "customer_item_code",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Customer's Item Code",
|
||||
"print_hide": 1,
|
||||
"read_only": 1
|
||||
@@ -56,6 +58,7 @@
|
||||
"fieldname": "item_name",
|
||||
"fieldtype": "Data",
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Item Name",
|
||||
"oldfieldname": "item_name",
|
||||
"oldfieldtype": "Data",
|
||||
@@ -70,6 +73,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "description",
|
||||
"fieldtype": "Small Text",
|
||||
"in_list_view": 1,
|
||||
"label": "Description",
|
||||
"oldfieldname": "description",
|
||||
"oldfieldtype": "Small Text",
|
||||
@@ -79,12 +83,20 @@
|
||||
"reqd": 1,
|
||||
"width": "300px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "quantity_and_rate",
|
||||
"fieldtype": "Section Break",
|
||||
"in_list_view": 0,
|
||||
"label": "Quantity and Rate"
|
||||
},
|
||||
{
|
||||
"default": "0.00",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "qty",
|
||||
"fieldtype": "Float",
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Quantity",
|
||||
"oldfieldname": "qty",
|
||||
"oldfieldtype": "Currency",
|
||||
@@ -99,6 +111,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "stock_uom",
|
||||
"fieldtype": "Data",
|
||||
"in_list_view": 0,
|
||||
"label": "UOM",
|
||||
"oldfieldname": "stock_uom",
|
||||
"oldfieldtype": "Data",
|
||||
@@ -113,6 +126,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "ref_rate",
|
||||
"fieldtype": "Currency",
|
||||
"in_list_view": 0,
|
||||
"label": "Price List Rate",
|
||||
"oldfieldname": "ref_rate",
|
||||
"oldfieldtype": "Currency",
|
||||
@@ -128,6 +142,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "adj_rate",
|
||||
"fieldtype": "Float",
|
||||
"in_list_view": 0,
|
||||
"label": "Discount (%)",
|
||||
"oldfieldname": "adj_rate",
|
||||
"oldfieldtype": "Float",
|
||||
@@ -142,6 +157,7 @@
|
||||
"fieldname": "export_rate",
|
||||
"fieldtype": "Currency",
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Rate",
|
||||
"oldfieldname": "export_rate",
|
||||
"oldfieldtype": "Currency",
|
||||
@@ -159,6 +175,7 @@
|
||||
"fieldname": "export_amount",
|
||||
"fieldtype": "Currency",
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Amount",
|
||||
"oldfieldname": "export_amount",
|
||||
"oldfieldtype": "Currency",
|
||||
@@ -174,6 +191,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "base_ref_rate",
|
||||
"fieldtype": "Currency",
|
||||
"in_list_view": 0,
|
||||
"label": "Price List Rate (Company Currency)",
|
||||
"oldfieldname": "base_ref_rate",
|
||||
"oldfieldtype": "Currency",
|
||||
@@ -189,6 +207,7 @@
|
||||
"fieldname": "basic_rate",
|
||||
"fieldtype": "Currency",
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Basic Rate (Company Currency)",
|
||||
"oldfieldname": "basic_rate",
|
||||
"oldfieldtype": "Currency",
|
||||
@@ -206,6 +225,7 @@
|
||||
"fieldname": "amount",
|
||||
"fieldtype": "Currency",
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Amount (Company Currency)",
|
||||
"oldfieldname": "amount",
|
||||
"oldfieldtype": "Currency",
|
||||
@@ -217,12 +237,20 @@
|
||||
"search_index": 0,
|
||||
"width": "100px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "reference",
|
||||
"fieldtype": "Section Break",
|
||||
"in_list_view": 0,
|
||||
"label": "Reference"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "item_group",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 1,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Item Group",
|
||||
"oldfieldname": "item_group",
|
||||
"oldfieldtype": "Link",
|
||||
@@ -237,6 +265,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 1,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Brand",
|
||||
"oldfieldname": "brand",
|
||||
"oldfieldtype": "Link",
|
||||
@@ -252,6 +281,7 @@
|
||||
"fieldname": "item_tax_rate",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Item Tax Rate",
|
||||
"oldfieldname": "item_tax_rate",
|
||||
"oldfieldtype": "Small Text",
|
||||
@@ -263,6 +293,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "prevdoc_docname",
|
||||
"fieldtype": "Data",
|
||||
"in_list_view": 0,
|
||||
"label": "Against Docname",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "prevdoc_docname",
|
||||
@@ -278,6 +309,7 @@
|
||||
"fieldname": "prevdoc_doctype",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Against Doctype",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "prevdoc_doctype",
|
||||
@@ -294,6 +326,7 @@
|
||||
"fieldname": "page_break",
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Page Break",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "page_break",
|
||||
|
||||
@@ -24,9 +24,9 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||
}
|
||||
|
||||
cur_frm.fields_dict.new_item_code.get_query = function() {
|
||||
return 'select name, description from tabItem where is_stock_item="No" and is_sales_item="Yes"\
|
||||
and name not in (select name from `tabSales BOM`)\
|
||||
and `%(key)s` like "%s"'
|
||||
return{
|
||||
query: "selling.doctype.sales_bom.sales_bom.get_new_item_code"
|
||||
}
|
||||
}
|
||||
cur_frm.fields_dict.new_item_code.query_description = 'Select Item where "Is Stock Item" is "No" \
|
||||
and "Is Sales Item" is "Yes" and there is no other Sales BOM';
|
||||
|
||||
@@ -83,3 +83,13 @@ class DocType:
|
||||
if l not in l2:
|
||||
return 0
|
||||
return 1
|
||||
|
||||
def get_new_item_code(doctype, txt, searchfield, start, page_len, filters):
|
||||
from controllers.queries import get_match_cond
|
||||
|
||||
return webnotes.conn.sql("""select name, description from tabItem
|
||||
where is_stock_item="No" and is_sales_item="Yes"
|
||||
and name not in (select name from `tabSales BOM`) and %s like "%s"
|
||||
%s limit %s, %s""" % (searchfield, "%s",
|
||||
get_match_cond(doctype, searchfield),"%s", "%s"),
|
||||
("%%%s%%" % txt, start, page_len))
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-05-23 16:55:51",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-06-26 13:45:41",
|
||||
"modified": "2013-07-10 14:54:19",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -28,6 +28,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "item_code",
|
||||
"fieldtype": "Link",
|
||||
"in_list_view": 1,
|
||||
"label": "Item",
|
||||
"oldfieldname": "item_code",
|
||||
"oldfieldtype": "Link",
|
||||
@@ -38,6 +39,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "qty",
|
||||
"fieldtype": "Float",
|
||||
"in_list_view": 1,
|
||||
"label": "Qty",
|
||||
"oldfieldname": "qty",
|
||||
"oldfieldtype": "Currency",
|
||||
@@ -47,6 +49,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "description",
|
||||
"fieldtype": "Text",
|
||||
"in_list_view": 1,
|
||||
"label": "Description",
|
||||
"oldfieldname": "description",
|
||||
"oldfieldtype": "Text",
|
||||
@@ -57,6 +60,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "rate",
|
||||
"fieldtype": "Float",
|
||||
"in_list_view": 1,
|
||||
"label": "Rate",
|
||||
"oldfieldname": "rate",
|
||||
"oldfieldtype": "Currency"
|
||||
@@ -65,6 +69,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "uom",
|
||||
"fieldtype": "Link",
|
||||
"in_list_view": 0,
|
||||
"label": "UOM",
|
||||
"oldfieldname": "uom",
|
||||
"oldfieldtype": "Link",
|
||||
|
||||
@@ -36,32 +36,34 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
||||
}
|
||||
|
||||
this.frm.set_query("customer_address", function() {
|
||||
return 'SELECT name, address_line1, city FROM tabAddress \
|
||||
WHERE customer = "'+ me.frm.doc.customer +'" AND docstatus != 2 AND \
|
||||
%(key)s LIKE "%s" ORDER BY name ASC LIMIT 50';
|
||||
return {
|
||||
filters: {'customer': me.frm.doc.customer }
|
||||
}
|
||||
});
|
||||
|
||||
this.frm.set_query("contact_person", function() {
|
||||
return 'SELECT name, CONCAT(first_name," ",ifnull(last_name,"")) As FullName, \
|
||||
department, designation FROM tabContact WHERE customer = "'+ me.frm.doc.customer +
|
||||
'" AND docstatus != 2 AND %(key)s LIKE "%s" ORDER BY name ASC LIMIT 50';
|
||||
return {
|
||||
filters: {'customer': me.frm.doc.customer }
|
||||
}
|
||||
});
|
||||
|
||||
if(this.frm.fields_dict.charge) {
|
||||
this.frm.set_query("charge", function() {
|
||||
return 'SELECT DISTINCT `tabSales Taxes and Charges Master`.name FROM \
|
||||
`tabSales Taxes and Charges Master` \
|
||||
WHERE `tabSales Taxes and Charges Master`.company = "' + me.frm.doc.company +
|
||||
'" AND `tabSales Taxes and Charges Master`.company is not NULL \
|
||||
AND `tabSales Taxes and Charges Master`.docstatus != 2 \
|
||||
AND `tabSales Taxes and Charges Master`.%(key)s LIKE "%s" \
|
||||
ORDER BY `tabSales Taxes and Charges Master`.name LIMIT 50';
|
||||
return {
|
||||
filters: [
|
||||
['Sales Taxes and Charges Master', 'company', '=', me.frm.doc.company],
|
||||
['Sales Taxes and Charges Master', 'company', 'is not', 'NULL'],
|
||||
['Sales Taxes and Charges Master', 'docstatus', '!=', 2]
|
||||
]
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.frm.fields_dict.customer.get_query = erpnext.utils.customer_query;
|
||||
this.frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
|
||||
return{ query:"controllers.queries.customer_query" } }
|
||||
|
||||
this.frm.fields_dict.lead && this.frm.set_query("lead", erpnext.utils.lead_query);
|
||||
this.frm.fields_dict.lead && this.frm.set_query("lead", function(doc,cdt,cdn) {
|
||||
return{ query:"controllers.queries.lead_query" } });
|
||||
|
||||
if(!this.fname) {
|
||||
return;
|
||||
@@ -70,8 +72,10 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
||||
if(this.frm.fields_dict[this.fname].grid.get_field('item_code')) {
|
||||
this.frm.set_query("item_code", this.fname, function() {
|
||||
return me.frm.doc.order_type === "Maintenance" ?
|
||||
erpnext.queries.item({'ifnull(tabItem.is_service_item, "No")': "Yes"}) :
|
||||
erpnext.queries.item({'ifnull(tabItem.is_sales_item, "No")': "Yes"});
|
||||
{ query:"controllers.queries.item_query",
|
||||
filters:{'is_service_item': 'Yes'}} :
|
||||
{ query:"controllers.queries.item_query",
|
||||
filters:{'is_sales_item': 'Yes' }} ;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -82,18 +86,22 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
||||
wn.throw("Please enter Item Code to get batch no");
|
||||
} else {
|
||||
if(item.warehouse) {
|
||||
return "select batch_no from `tabStock Ledger Entry` sle \
|
||||
where item_code = '" + item.item_code +
|
||||
"' and warehouse = '" + item.warehouse +
|
||||
"' and ifnull(is_cancelled, 'No') = 'No' and batch_no like '%s' \
|
||||
and exists(select * from `tabBatch` where \
|
||||
name = sle.batch_no and expiry_date >= '" + me.frm.doc.posting_date +
|
||||
"' and docstatus != 2) group by batch_no having sum(actual_qty) > 0 \
|
||||
order by batch_no desc limit 50";
|
||||
return {
|
||||
query : "selling.doctype.sales_common.sales_common.get_batch_no",
|
||||
filters: {
|
||||
'item_code': item.item_code,
|
||||
'warehouse': item.warehouse,
|
||||
'posting_date': me.frm.doc.posting_date
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return "SELECT name FROM tabBatch WHERE docstatus != 2 AND item = '" +
|
||||
item.item_code + "' and expiry_date >= '" + me.frm.doc.posting_date +
|
||||
"' AND name like '%s' ORDER BY name DESC LIMIT 50";
|
||||
return{
|
||||
query : "selling.doctype.sales_common.sales_common.get_batch_no",
|
||||
filters: {
|
||||
'item': item.item_code,
|
||||
'posting_date': me.frm.doc.posting_date
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -365,3 +365,35 @@ class DocType(TransactionBase):
|
||||
dt = webnotes.conn.sql("select transaction_date from `tab%s` where name = '%s'" % (d.prevdoc_doctype, d.prevdoc_docname))
|
||||
d.prevdoc_date = (dt and dt[0][0]) and dt[0][0].strftime('%Y-%m-%d') or ''
|
||||
|
||||
def get_batch_no(doctype, txt, searchfield, start, page_len, filters):
|
||||
from controllers.queries import get_match_cond
|
||||
|
||||
if filters.has_key('warehouse'):
|
||||
return webnotes.conn.sql("""select batch_no from `tabStock Ledger Entry` sle
|
||||
where item_code = '%(item_code)s'
|
||||
and warehouse = '%(warehouse)s'
|
||||
and ifnull(is_cancelled, 'No') = 'No'
|
||||
and batch_no like '%(txt)s'
|
||||
and exists(select * from `tabBatch`
|
||||
where name = sle.batch_no
|
||||
and expiry_date >= '%(posting_date)s'
|
||||
and docstatus != 2)
|
||||
%(mcond)s
|
||||
group by batch_no having sum(actual_qty) > 0
|
||||
order by batch_no desc
|
||||
limit %(start)s, %(page_len)s """ % {'item_code': filters['item_code'],
|
||||
'warehouse': filters['warehouse'], 'posting_date': filters['posting_date'],
|
||||
'txt': "%%%s%%" % txt, 'mcond':get_match_cond(doctype, searchfield),
|
||||
'start': start, 'page_len': page_len})
|
||||
else:
|
||||
return webnotes.conn.sql("""select name from tabBatch
|
||||
where docstatus != 2
|
||||
and item = '%(item_code)s'
|
||||
and expiry_date >= '%(posting_date)s'
|
||||
and name like '%(txt)s'
|
||||
%(mcond)s
|
||||
order by name desc
|
||||
limit %(start)s, %(page_len)s""" % {'item_code': filters['item_code'],
|
||||
'posting_date': filters['posting_date'], 'txt': "%%%s%%" % txt,
|
||||
'mcond':get_match_cond(doctype, searchfield),'start': start,
|
||||
'page_len': page_len})
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2012-03-27 14:36:14",
|
||||
"docstatus": 0,
|
||||
"modified": "2012-03-27 14:36:14",
|
||||
"modified": "2013-07-10 14:54:19",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -10,10 +10,7 @@
|
||||
"doctype": "DocType",
|
||||
"issingle": 1,
|
||||
"module": "Selling",
|
||||
"name": "__common__",
|
||||
"section_style": "Simple",
|
||||
"show_in_menu": 0,
|
||||
"version": 290
|
||||
"name": "__common__"
|
||||
},
|
||||
{
|
||||
"doctype": "DocType",
|
||||
|
||||
@@ -154,12 +154,12 @@ cur_frm.cscript.new_contact = function(){
|
||||
}
|
||||
|
||||
cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) {
|
||||
var cond = '';
|
||||
if(doc.customer) cond = '(`tabProject`.customer = "'+doc.customer+'" OR IFNULL(`tabProject`.customer,"")="") AND';
|
||||
return repl('SELECT `tabProject`.name FROM `tabProject` \
|
||||
WHERE `tabProject`.status not in ("Completed", "Cancelled") \
|
||||
AND %(cond)s `tabProject`.name LIKE "%s" \
|
||||
ORDER BY `tabProject`.name ASC LIMIT 50', {cond:cond});
|
||||
return {
|
||||
query: "controllers.queries.get_project_name",
|
||||
filters: {
|
||||
'customer': doc.customer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cur_frm.cscript['Stop Sales Order'] = function() {
|
||||
@@ -193,7 +193,9 @@ cur_frm.cscript['Unstop Sales Order'] = function() {
|
||||
}
|
||||
|
||||
cur_frm.fields_dict['territory'].get_query = function(doc,cdt,cdn) {
|
||||
return 'SELECT `tabTerritory`.`name`,`tabTerritory`.`parent_territory` FROM `tabTerritory` WHERE `tabTerritory`.`is_group` = "No" AND `tabTerritory`.`docstatus`!= 2 AND `tabTerritory`.%(key)s LIKE "%s" ORDER BY `tabTerritory`.`name` ASC LIMIT 50';
|
||||
return{
|
||||
filters:{ 'is_group': "No"}
|
||||
}
|
||||
}
|
||||
|
||||
cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-03-07 11:42:58",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-09 12:28:31",
|
||||
"modified": "2013-07-10 14:54:21",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -30,6 +30,7 @@
|
||||
"fieldname": "item_code",
|
||||
"fieldtype": "Link",
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"label": "Item Code",
|
||||
"oldfieldname": "item_code",
|
||||
"oldfieldtype": "Link",
|
||||
@@ -45,6 +46,7 @@
|
||||
"fieldname": "customer_item_code",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Customer's Item Code",
|
||||
"print_hide": 1,
|
||||
"read_only": 1
|
||||
@@ -53,6 +55,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "item_name",
|
||||
"fieldtype": "Data",
|
||||
"in_list_view": 0,
|
||||
"label": "Item Name",
|
||||
"oldfieldname": "item_name",
|
||||
"oldfieldtype": "Data",
|
||||
@@ -67,6 +70,7 @@
|
||||
"fieldname": "description",
|
||||
"fieldtype": "Small Text",
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"label": "Description",
|
||||
"oldfieldname": "description",
|
||||
"oldfieldtype": "Small Text",
|
||||
@@ -76,11 +80,19 @@
|
||||
"search_index": 1,
|
||||
"width": "300px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "quantity_and_rate",
|
||||
"fieldtype": "Section Break",
|
||||
"in_list_view": 0,
|
||||
"label": "Quantity and Rate"
|
||||
},
|
||||
{
|
||||
"default": "0.00",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "qty",
|
||||
"fieldtype": "Float",
|
||||
"in_list_view": 1,
|
||||
"label": "Quantity",
|
||||
"oldfieldname": "qty",
|
||||
"oldfieldtype": "Currency",
|
||||
@@ -94,6 +106,7 @@
|
||||
"fieldname": "stock_uom",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "UOM",
|
||||
"oldfieldname": "stock_uom",
|
||||
"oldfieldtype": "Data",
|
||||
@@ -107,6 +120,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "ref_rate",
|
||||
"fieldtype": "Currency",
|
||||
"in_list_view": 0,
|
||||
"label": "Price List Rate",
|
||||
"oldfieldname": "ref_rate",
|
||||
"oldfieldtype": "Currency",
|
||||
@@ -122,6 +136,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "adj_rate",
|
||||
"fieldtype": "Float",
|
||||
"in_list_view": 0,
|
||||
"label": "Discount(%)",
|
||||
"oldfieldname": "adj_rate",
|
||||
"oldfieldtype": "Float",
|
||||
@@ -135,6 +150,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "export_rate",
|
||||
"fieldtype": "Currency",
|
||||
"in_list_view": 1,
|
||||
"label": "Rate",
|
||||
"oldfieldname": "export_rate",
|
||||
"oldfieldtype": "Currency",
|
||||
@@ -149,6 +165,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "export_amount",
|
||||
"fieldtype": "Currency",
|
||||
"in_list_view": 1,
|
||||
"label": "Amount",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "export_amount",
|
||||
@@ -163,6 +180,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "base_ref_rate",
|
||||
"fieldtype": "Currency",
|
||||
"in_list_view": 0,
|
||||
"label": "Price List Rate (Company Currency)",
|
||||
"oldfieldname": "base_ref_rate",
|
||||
"oldfieldtype": "Currency",
|
||||
@@ -177,6 +195,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "basic_rate",
|
||||
"fieldtype": "Currency",
|
||||
"in_list_view": 0,
|
||||
"label": "Basic Rate (Company Currency)",
|
||||
"oldfieldname": "basic_rate",
|
||||
"oldfieldtype": "Currency",
|
||||
@@ -192,6 +211,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "amount",
|
||||
"fieldtype": "Currency",
|
||||
"in_list_view": 0,
|
||||
"label": "Amount (Company Currency)",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "amount",
|
||||
@@ -203,10 +223,18 @@
|
||||
"reqd": 0,
|
||||
"width": "100px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "warehouse_and_reference",
|
||||
"fieldtype": "Section Break",
|
||||
"in_list_view": 0,
|
||||
"label": "Warehouse and Reference"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "reserved_warehouse",
|
||||
"fieldtype": "Link",
|
||||
"in_list_view": 0,
|
||||
"label": "Reserved Warehouse",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "reserved_warehouse",
|
||||
@@ -224,6 +252,7 @@
|
||||
"fieldname": "projected_qty",
|
||||
"fieldtype": "Float",
|
||||
"hidden": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Projected Qty",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "projected_qty",
|
||||
@@ -238,6 +267,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "actual_qty",
|
||||
"fieldtype": "Float",
|
||||
"in_list_view": 0,
|
||||
"label": "Actual Qty",
|
||||
"no_copy": 1,
|
||||
"print_hide": 1,
|
||||
@@ -252,6 +282,7 @@
|
||||
"fieldtype": "Float",
|
||||
"hidden": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Delivered Qty",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "delivered_qty",
|
||||
@@ -266,6 +297,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "billed_amt",
|
||||
"fieldtype": "Currency",
|
||||
"in_list_view": 0,
|
||||
"label": "Billed Amt",
|
||||
"no_copy": 1,
|
||||
"options": "currency",
|
||||
@@ -278,6 +310,7 @@
|
||||
"fieldname": "planned_qty",
|
||||
"fieldtype": "Float",
|
||||
"hidden": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Planned Quantity",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "planned_qty",
|
||||
@@ -294,6 +327,7 @@
|
||||
"fieldname": "produced_qty",
|
||||
"fieldtype": "Float",
|
||||
"hidden": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Produced Quantity",
|
||||
"oldfieldname": "produced_qty",
|
||||
"oldfieldtype": "Currency",
|
||||
@@ -309,6 +343,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 1,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Brand Name",
|
||||
"oldfieldname": "brand",
|
||||
"oldfieldtype": "Link",
|
||||
@@ -323,6 +358,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 1,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Item Group",
|
||||
"oldfieldname": "item_group",
|
||||
"oldfieldtype": "Link",
|
||||
@@ -337,6 +373,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Quotation",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "prevdoc_docname",
|
||||
@@ -351,6 +388,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "page_break",
|
||||
"fieldtype": "Check",
|
||||
"in_list_view": 0,
|
||||
"label": "Page Break",
|
||||
"oldfieldname": "page_break",
|
||||
"oldfieldtype": "Check",
|
||||
@@ -363,6 +401,7 @@
|
||||
"fieldname": "item_tax_rate",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Item Tax Rate",
|
||||
"oldfieldname": "item_tax_rate",
|
||||
"oldfieldtype": "Small Text",
|
||||
@@ -377,6 +416,7 @@
|
||||
"fieldtype": "Date",
|
||||
"hidden": 1,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Sales Order Date",
|
||||
"oldfieldname": "transaction_date",
|
||||
"oldfieldtype": "Date",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-04-19 13:30:51",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-05-21 17:04:45",
|
||||
"modified": "2013-07-10 14:54:22",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -29,6 +29,7 @@
|
||||
"fieldname": "sales_person",
|
||||
"fieldtype": "Link",
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"label": "Sales Person",
|
||||
"oldfieldname": "sales_person",
|
||||
"oldfieldtype": "Link",
|
||||
@@ -43,6 +44,7 @@
|
||||
"fieldname": "sales_designation",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Designation",
|
||||
"oldfieldname": "sales_designation",
|
||||
"oldfieldtype": "Data",
|
||||
@@ -54,6 +56,7 @@
|
||||
"fieldname": "contact_no",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"in_list_view": 1,
|
||||
"label": "Contact No.",
|
||||
"oldfieldname": "contact_no",
|
||||
"oldfieldtype": "Data",
|
||||
@@ -64,6 +67,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "allocated_percentage",
|
||||
"fieldtype": "Float",
|
||||
"in_list_view": 1,
|
||||
"label": "Contribution (%)",
|
||||
"oldfieldname": "allocated_percentage",
|
||||
"oldfieldtype": "Currency",
|
||||
@@ -75,6 +79,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "allocated_amount",
|
||||
"fieldtype": "Currency",
|
||||
"in_list_view": 1,
|
||||
"label": "Contribution to Net Total",
|
||||
"oldfieldname": "allocated_amount",
|
||||
"oldfieldtype": "Currency",
|
||||
@@ -90,6 +95,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Parenttype",
|
||||
"oldfieldname": "parenttype",
|
||||
"oldfieldtype": "Data",
|
||||
@@ -100,6 +106,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "incentives",
|
||||
"fieldtype": "Currency",
|
||||
"in_list_view": 1,
|
||||
"label": "Incentives",
|
||||
"oldfieldname": "incentives",
|
||||
"oldfieldtype": "Currency",
|
||||
|
||||
Reference in New Issue
Block a user