Delivery Note changes 1.Net Wt, Gross Wt at packing slip level
This commit is contained in:
parent
06c4de8ae6
commit
28a7b2800f
@ -11,7 +11,7 @@ $import(SMS Control)
|
|||||||
|
|
||||||
// ONLOAD
|
// ONLOAD
|
||||||
// ===================================================================================
|
// ===================================================================================
|
||||||
cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||||
if(!doc.quotation_to) hide_field(['customer','customer_address','contact_person','customer_name','lead', 'lead_name', 'address_display', 'contact_display', 'contact_mobile', 'contact_email', 'territory', 'customer_group']);
|
if(!doc.quotation_to) hide_field(['customer','customer_address','contact_person','customer_name','lead', 'lead_name', 'address_display', 'contact_display', 'contact_mobile', 'contact_email', 'territory', 'customer_group']);
|
||||||
if(!doc.price_list_name) set_multiple(cdt,cdn,{price_list_name:sys_defaults.price_list_name});
|
if(!doc.price_list_name) set_multiple(cdt,cdn,{price_list_name:sys_defaults.price_list_name});
|
||||||
if(!doc.status) set_multiple(cdt,cdn,{status:'Draft'});
|
if(!doc.status) set_multiple(cdt,cdn,{status:'Draft'});
|
||||||
@ -21,7 +21,7 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
|||||||
//if(!doc.price_list_name && sys_defaults.price_list_name) set_multiple(cdt,cdn,{price_list_name:sys_defaults.price_list_name});
|
//if(!doc.price_list_name && sys_defaults.price_list_name) set_multiple(cdt,cdn,{price_list_name:sys_defaults.price_list_name});
|
||||||
if(!doc.company && sys_defaults.company) set_multiple(cdt,cdn,{company:sys_defaults.company});
|
if(!doc.company && sys_defaults.company) set_multiple(cdt,cdn,{company:sys_defaults.company});
|
||||||
if(!doc.fiscal_year && sys_defaults.fiscal_year) set_multiple(cdt,cdn,{fiscal_year:sys_defaults.fiscal_year});
|
if(!doc.fiscal_year && sys_defaults.fiscal_year) set_multiple(cdt,cdn,{fiscal_year:sys_defaults.fiscal_year});
|
||||||
|
|
||||||
if(doc.quotation_to) {
|
if(doc.quotation_to) {
|
||||||
if(doc.quotation_to == 'Customer') {
|
if(doc.quotation_to == 'Customer') {
|
||||||
hide_field(['lead', 'lead_name']);
|
hide_field(['lead', 'lead_name']);
|
||||||
@ -34,7 +34,7 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
|||||||
|
|
||||||
cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
|
cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
|
||||||
// load default charges
|
// load default charges
|
||||||
if(doc.__islocal && !getchildren('RV Tax Detail', doc.name, 'other_charges', doc.doctype).length)
|
if(doc.__islocal && !getchildren('RV Tax Detail', doc.name, 'other_charges', doc.doctype).length)
|
||||||
cur_frm.cscript.load_taxes(doc, cdt, cdn);
|
cur_frm.cscript.load_taxes(doc, cdt, cdn);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,9 +46,9 @@ cur_frm.cscript.lead_cust_show = function(doc,cdt,cdn){
|
|||||||
hide_field(['lead_name','customer','customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
|
hide_field(['lead_name','customer','customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
|
||||||
doc.lead = doc.lead_name = doc.customer = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = "";
|
doc.lead = doc.lead_name = doc.customer = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = "";
|
||||||
}
|
}
|
||||||
else if(doc.quotation_to == 'Customer'){
|
else if(doc.quotation_to == 'Customer'){
|
||||||
unhide_field(['customer']);
|
unhide_field(['customer']);
|
||||||
hide_field(['lead','lead_name','address_display','contact_display','contact_mobile','contact_email','territory']);
|
hide_field(['lead','lead_name','address_display','contact_display','contact_mobile','contact_email','territory']);
|
||||||
doc.lead = doc.lead_name = doc.customer = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = "";
|
doc.lead = doc.lead_name = doc.customer = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = "";
|
||||||
}
|
}
|
||||||
//refresh_many(['lead','customer']);
|
//refresh_many(['lead','customer']);
|
||||||
@ -56,7 +56,7 @@ cur_frm.cscript.lead_cust_show = function(doc,cdt,cdn){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//================ hide - unhide fields on basis of quotation to either lead or customer ===============================
|
//================ hide - unhide fields on basis of quotation to either lead or customer ===============================
|
||||||
cur_frm.cscript.quotation_to = function(doc,cdt,cdn){
|
cur_frm.cscript.quotation_to = function(doc,cdt,cdn){
|
||||||
cur_frm.cscript.lead_cust_show(doc,cdt,cdn);
|
cur_frm.cscript.lead_cust_show(doc,cdt,cdn);
|
||||||
//doc.customer_address = doc.territory = doc.contact_no = doc.email_id = "";
|
//doc.customer_address = doc.territory = doc.contact_no = doc.email_id = "";
|
||||||
@ -77,7 +77,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
|||||||
cur_frm.add_custom_button('Set as Lost', cur_frm.cscript['Declare Order Lost']);
|
cur_frm.add_custom_button('Set as Lost', cur_frm.cscript['Declare Order Lost']);
|
||||||
cur_frm.add_custom_button('Send SMS', cur_frm.cscript['Send SMS']);
|
cur_frm.add_custom_button('Send SMS', cur_frm.cscript['Send SMS']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!doc.docstatus) hide_field(['Update Follow up']);
|
if (!doc.docstatus) hide_field(['Update Follow up']);
|
||||||
else unhide_field(['Update Follow up']);
|
else unhide_field(['Update Follow up']);
|
||||||
//cur_frm.cscript.lead_cust_show(doc,cdt,cdn);
|
//cur_frm.cscript.lead_cust_show(doc,cdt,cdn);
|
||||||
@ -111,7 +111,7 @@ cur_frm.cscript.customer = function(doc,dt,dn) {
|
|||||||
var callback = function(r,rt) {
|
var callback = function(r,rt) {
|
||||||
var doc = locals[cur_frm.doctype][cur_frm.docname];
|
var doc = locals[cur_frm.doctype][cur_frm.docname];
|
||||||
cur_frm.refresh();
|
cur_frm.refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_address', '', callback);
|
if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_address', '', callback);
|
||||||
if(doc.customer) unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
|
if(doc.customer) unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
|
||||||
@ -123,12 +123,12 @@ cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc
|
|||||||
|
|
||||||
cur_frm.fields_dict.customer_address.on_new = function(dn) {
|
cur_frm.fields_dict.customer_address.on_new = function(dn) {
|
||||||
locals['Address'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer;
|
locals['Address'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer;
|
||||||
locals['Address'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name;
|
locals['Address'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.fields_dict.contact_person.on_new = function(dn) {
|
cur_frm.fields_dict.contact_person.on_new = function(dn) {
|
||||||
locals['Contact'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer;
|
locals['Contact'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer;
|
||||||
locals['Contact'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name;
|
locals['Contact'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.fields_dict['customer_address'].get_query = function(doc, cdt, cdn) {
|
cur_frm.fields_dict['customer_address'].get_query = function(doc, cdt, cdn) {
|
||||||
@ -146,7 +146,7 @@ cur_frm.fields_dict['lead'].get_query = function(doc,cdt,cdn){
|
|||||||
|
|
||||||
cur_frm.cscript.lead = function(doc, cdt, cdn) {
|
cur_frm.cscript.lead = function(doc, cdt, cdn) {
|
||||||
if(doc.lead) get_server_fields('get_lead_details', doc.lead,'', doc, cdt, cdn, 1);
|
if(doc.lead) get_server_fields('get_lead_details', doc.lead,'', doc, cdt, cdn, 1);
|
||||||
if(doc.lead) unhide_field(['lead_name','address_display','contact_mobile','contact_email','territory']);
|
if(doc.lead) unhide_field(['lead_name','address_display','contact_mobile','contact_email','territory']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -166,7 +166,7 @@ cur_frm.fields_dict['enq_no'].get_query = function(doc,cdt,cdn){
|
|||||||
cur_frm.cscript['Make Sales Order'] = function() {
|
cur_frm.cscript['Make Sales Order'] = function() {
|
||||||
var doc = cur_frm.doc;
|
var doc = cur_frm.doc;
|
||||||
|
|
||||||
if (doc.docstatus == 1) {
|
if (doc.docstatus == 1) {
|
||||||
var n = createLocal("Sales Order");
|
var n = createLocal("Sales Order");
|
||||||
$c('dt_map', args={
|
$c('dt_map', args={
|
||||||
'docs':compress_doclist([locals["Sales Order"][n]]),
|
'docs':compress_doclist([locals["Sales Order"][n]]),
|
||||||
@ -186,17 +186,17 @@ cur_frm.cscript['Pull Enquiry Detail'] = function(doc,cdt,cdn){
|
|||||||
var callback = function(r,rt){
|
var callback = function(r,rt){
|
||||||
if(r.message){
|
if(r.message){
|
||||||
doc.quotation_to = r.message;
|
doc.quotation_to = r.message;
|
||||||
|
|
||||||
if(doc.quotation_to == 'Lead') {
|
if(doc.quotation_to == 'Lead') {
|
||||||
unhide_field(['lead','lead_name','address_display','contact_mobile','contact_email','territory']);
|
unhide_field(['lead','lead_name','address_display','contact_mobile','contact_email','territory']);
|
||||||
}
|
}
|
||||||
else if(doc.quotation_to == 'Customer') {
|
else if(doc.quotation_to == 'Customer') {
|
||||||
unhide_field(['customer','customer_address','contact_person','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
|
unhide_field(['customer','customer_address','contact_person','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
|
||||||
}
|
}
|
||||||
refresh_many(['quotation_details','quotation_to','customer','customer_address','contact_person','lead','lead_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group','order_type']);
|
refresh_many(['quotation_details','quotation_to','customer','customer_address','contact_person','lead','lead_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group','order_type']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$c_obj(make_doclist(doc.doctype, doc.name),'pull_enq_details','',callback);
|
$c_obj(make_doclist(doc.doctype, doc.name),'pull_enq_details','',callback);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -217,7 +217,7 @@ cur_frm.cscript['Update Follow up'] = function(doc){
|
|||||||
//-------------------------
|
//-------------------------
|
||||||
cur_frm.cscript['Declare Order Lost'] = function(){
|
cur_frm.cscript['Declare Order Lost'] = function(){
|
||||||
var qtn_lost_dialog;
|
var qtn_lost_dialog;
|
||||||
|
|
||||||
set_qtn_lost_dialog = function(doc,cdt,cdn){
|
set_qtn_lost_dialog = function(doc,cdt,cdn){
|
||||||
qtn_lost_dialog = new Dialog(400,400,'Add Quotation Lost Reason');
|
qtn_lost_dialog = new Dialog(400,400,'Add Quotation Lost Reason');
|
||||||
qtn_lost_dialog.make_body([
|
qtn_lost_dialog.make_body([
|
||||||
@ -226,26 +226,26 @@ cur_frm.cscript['Declare Order Lost'] = function(){
|
|||||||
['HTML', 'Response', '<div class = "comment" id="update_quotation_dialog_response"></div>'],
|
['HTML', 'Response', '<div class = "comment" id="update_quotation_dialog_response"></div>'],
|
||||||
['HTML', 'Add Reason', '<div></div>']
|
['HTML', 'Add Reason', '<div></div>']
|
||||||
]);
|
]);
|
||||||
|
|
||||||
var add_reason_btn1 = $a($i(qtn_lost_dialog.widgets['Add Reason']), 'button', 'button');
|
var add_reason_btn1 = $a($i(qtn_lost_dialog.widgets['Add Reason']), 'button', 'button');
|
||||||
add_reason_btn1.innerHTML = 'Add';
|
add_reason_btn1.innerHTML = 'Add';
|
||||||
add_reason_btn1.onclick = function(){ qtn_lost_dialog.add(); }
|
add_reason_btn1.onclick = function(){ qtn_lost_dialog.add(); }
|
||||||
|
|
||||||
var add_reason_btn2 = $a($i(qtn_lost_dialog.widgets['Add Reason']), 'button', 'button');
|
var add_reason_btn2 = $a($i(qtn_lost_dialog.widgets['Add Reason']), 'button', 'button');
|
||||||
add_reason_btn2.innerHTML = 'Cancel';
|
add_reason_btn2.innerHTML = 'Cancel';
|
||||||
$y(add_reason_btn2,{marginLeft:'4px'});
|
$y(add_reason_btn2,{marginLeft:'4px'});
|
||||||
add_reason_btn2.onclick = function(){ qtn_lost_dialog.hide();}
|
add_reason_btn2.onclick = function(){ qtn_lost_dialog.hide();}
|
||||||
|
|
||||||
qtn_lost_dialog.onshow = function() {
|
qtn_lost_dialog.onshow = function() {
|
||||||
qtn_lost_dialog.widgets['Quotation Lost Reason'].value = '';
|
qtn_lost_dialog.widgets['Quotation Lost Reason'].value = '';
|
||||||
$i('update_quotation_dialog_response').innerHTML = '';
|
$i('update_quotation_dialog_response').innerHTML = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
qtn_lost_dialog.add = function() {
|
qtn_lost_dialog.add = function() {
|
||||||
// sending...
|
// sending...
|
||||||
$i('update_quotation_dialog_response').innerHTML = 'Processing...';
|
$i('update_quotation_dialog_response').innerHTML = 'Processing...';
|
||||||
var arg = strip(qtn_lost_dialog.widgets['Quotation Lost Reason'].value);
|
var arg = strip(qtn_lost_dialog.widgets['Quotation Lost Reason'].value);
|
||||||
var call_back = function(r,rt) {
|
var call_back = function(r,rt) {
|
||||||
if(r.message == 'true'){
|
if(r.message == 'true'){
|
||||||
$i('update_quotation_dialog_response').innerHTML = 'Done';
|
$i('update_quotation_dialog_response').innerHTML = 'Done';
|
||||||
qtn_lost_dialog.hide();
|
qtn_lost_dialog.hide();
|
||||||
@ -254,11 +254,11 @@ cur_frm.cscript['Declare Order Lost'] = function(){
|
|||||||
if(arg) $c_obj(make_doclist(cur_frm.doc.doctype, cur_frm.doc.name),'declare_order_lost',arg,call_back);
|
if(arg) $c_obj(make_doclist(cur_frm.doc.doctype, cur_frm.doc.name),'declare_order_lost',arg,call_back);
|
||||||
else msgprint("Please add Quotation lost reason");
|
else msgprint("Please add Quotation lost reason");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!qtn_lost_dialog){
|
if(!qtn_lost_dialog){
|
||||||
set_qtn_lost_dialog(doc,cdt,cdn);
|
set_qtn_lost_dialog(doc,cdt,cdn);
|
||||||
}
|
}
|
||||||
qtn_lost_dialog.show();
|
qtn_lost_dialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -284,23 +284,23 @@ cur_frm.fields_dict['territory'].get_query = function(doc,cdt,cdn) {
|
|||||||
|
|
||||||
//===================== Quotation to validation - either customer or lead mandatory ====================
|
//===================== Quotation to validation - either customer or lead mandatory ====================
|
||||||
cur_frm.cscript.quot_to_validate = function(doc,cdt,cdn){
|
cur_frm.cscript.quot_to_validate = function(doc,cdt,cdn){
|
||||||
|
|
||||||
if(doc.quotation_to == 'Lead'){
|
if(doc.quotation_to == 'Lead'){
|
||||||
|
|
||||||
if(!doc.lead){
|
if(!doc.lead){
|
||||||
alert("Lead is mandatory.");
|
alert("Lead is mandatory.");
|
||||||
validated = false;
|
validated = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(doc.quotation_to == 'Customer'){
|
else if(doc.quotation_to == 'Customer'){
|
||||||
|
|
||||||
if(!doc.customer){
|
if(!doc.customer){
|
||||||
alert("Customer is mandatory.");
|
alert("Customer is mandatory.");
|
||||||
validated = false;
|
validated = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//===================validation function =================================
|
//===================validation function =================================
|
||||||
@ -308,3 +308,35 @@ cur_frm.cscript.quot_to_validate = function(doc,cdt,cdn){
|
|||||||
cur_frm.cscript.validate = function(doc,cdt,cdn){
|
cur_frm.cscript.validate = function(doc,cdt,cdn){
|
||||||
cur_frm.cscript.quot_to_validate(doc,cdt,cdn);
|
cur_frm.cscript.quot_to_validate(doc,cdt,cdn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//================ Last Quoted Price and Last Sold Price suggestion ======================
|
||||||
|
cur_frm.fields_dict['quotation_details'].grid.get_field('item_code').get_query= function(doc, cdt, cdn) {
|
||||||
|
var d = locals[cdt][cdn];
|
||||||
|
if(doc.customer)
|
||||||
|
return repl("SELECT i.name,i.item_code,concat('Last quoted at - ',cast(quote_rate as char)) as quote_rate,concat('Last sold at - ',cast(sales_rate as char)) as sales_rate FROM\
|
||||||
|
(\
|
||||||
|
select item_code,name from tabItem where tabItem.%(key)s like '%s'\
|
||||||
|
)i\
|
||||||
|
left join\
|
||||||
|
(\
|
||||||
|
select q.item_code,q.quote_rate from\
|
||||||
|
(\
|
||||||
|
select q.transaction_date,qd.item_code,basic_rate as quote_rate from `tabQuotation Detail` qd, `tabQuotation` q where q.name=qd.parent and q.docstatus=1 and customer='%(cust)s'\
|
||||||
|
)q,\
|
||||||
|
(\
|
||||||
|
select qd.item_code,max(transaction_date) as transaction_date from `tabQuotation Detail` qd, `tabQuotation` q where q.name=qd.parent and q.docstatus=1 and customer='%(cust)s' group by qd.item_code\
|
||||||
|
)m where q.item_code=m.item_code and q.transaction_date=m.transaction_date\
|
||||||
|
)q on i.item_code=q.item_code\
|
||||||
|
left join\
|
||||||
|
(\
|
||||||
|
select r.item_code,r.sales_rate from\
|
||||||
|
(\
|
||||||
|
select r.voucher_date,rd.item_code,basic_rate as sales_rate from `tabRV Detail` rd, `tabReceivable Voucher` r where r.name=rd.parent and r.docstatus=1 and customer='%(cust)s'\
|
||||||
|
)r,\
|
||||||
|
(\
|
||||||
|
select rd.item_code,max(voucher_date) as voucher_date from `tabRV Detail` rd, `tabReceivable Voucher` r where r.name=rd.parent and r.docstatus=1 and customer='%(cust)s' group by rd.item_code\
|
||||||
|
)m where r.item_code=m.item_code and r.voucher_date=m.voucher_date\
|
||||||
|
)s on i.item_code=s.item_code ORDER BY item_code LIMIT 50",{cust:doc.customer});
|
||||||
|
else
|
||||||
|
return "SELECT name, item_code FROM tabItem WHERE `tabItem`.%(key)s LIKE '%s' ORDER BY tabItem.item_code DESC LIMIT 50";
|
||||||
|
}
|
@ -13,7 +13,7 @@ sql = webnotes.conn.sql
|
|||||||
get_value = webnotes.conn.get_value
|
get_value = webnotes.conn.get_value
|
||||||
in_transaction = webnotes.conn.in_transaction
|
in_transaction = webnotes.conn.in_transaction
|
||||||
convert_to_lists = webnotes.conn.convert_to_lists
|
convert_to_lists = webnotes.conn.convert_to_lists
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------------------
|
||||||
|
|
||||||
from utilities.transaction_base import TransactionBase
|
from utilities.transaction_base import TransactionBase
|
||||||
@ -24,7 +24,7 @@ class DocType(TransactionBase):
|
|||||||
self.doclist = doclist
|
self.doclist = doclist
|
||||||
self.tname = 'Delivery Note Detail'
|
self.tname = 'Delivery Note Detail'
|
||||||
self.fname = 'delivery_note_details'
|
self.fname = 'delivery_note_details'
|
||||||
|
|
||||||
# Notification objects
|
# Notification objects
|
||||||
self.notify_obj = get_obj('Notification Control')
|
self.notify_obj = get_obj('Notification Control')
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ class DocType(TransactionBase):
|
|||||||
def autoname(self):
|
def autoname(self):
|
||||||
self.doc.name = make_autoname(self.doc.naming_series+'.#####')
|
self.doc.name = make_autoname(self.doc.naming_series+'.#####')
|
||||||
|
|
||||||
|
|
||||||
# DOCTYPE TRIGGERS FUNCTIONS
|
# DOCTYPE TRIGGERS FUNCTIONS
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
#************Fiscal Year Validation*****************************
|
#************Fiscal Year Validation*****************************
|
||||||
@ -48,21 +48,21 @@ class DocType(TransactionBase):
|
|||||||
# *********** Get Commission rate of Sales Partner ****************
|
# *********** Get Commission rate of Sales Partner ****************
|
||||||
def get_comm_rate(self, sales_partner):
|
def get_comm_rate(self, sales_partner):
|
||||||
return get_obj('Sales Common').get_comm_rate(sales_partner, self)
|
return get_obj('Sales Common').get_comm_rate(sales_partner, self)
|
||||||
|
|
||||||
# *************** Pull Sales Order Details ************************
|
# *************** Pull Sales Order Details ************************
|
||||||
def pull_sales_order_details(self):
|
def pull_sales_order_details(self):
|
||||||
self.validate_prev_docname()
|
self.validate_prev_docname()
|
||||||
self.doc.clear_table(self.doclist,'other_charges')
|
self.doc.clear_table(self.doclist,'other_charges')
|
||||||
|
|
||||||
if self.doc.sales_order_no:
|
if self.doc.sales_order_no:
|
||||||
get_obj('DocType Mapper', 'Sales Order-Delivery Note').dt_map('Sales Order', 'Delivery Note', self.doc.sales_order_no, self.doc, self.doclist, "[['Sales Order', 'Delivery Note'],['Sales Order Detail', 'Delivery Note Detail'],['RV Tax Detail','RV Tax Detail'],['Sales Team','Sales Team']]")
|
get_obj('DocType Mapper', 'Sales Order-Delivery Note').dt_map('Sales Order', 'Delivery Note', self.doc.sales_order_no, self.doc, self.doclist, "[['Sales Order', 'Delivery Note'],['Sales Order Detail', 'Delivery Note Detail'],['RV Tax Detail','RV Tax Detail'],['Sales Team','Sales Team']]")
|
||||||
else:
|
else:
|
||||||
msgprint("Please select Sales Order No. whose details need to be pulled")
|
msgprint("Please select Sales Order No. whose details need to be pulled")
|
||||||
|
|
||||||
return cstr(self.doc.sales_order_no)
|
return cstr(self.doc.sales_order_no)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#-------------------set item details -uom and item group----------------
|
#-------------------set item details -uom and item group----------------
|
||||||
def set_item_details(self):
|
def set_item_details(self):
|
||||||
for d in getlist(self.doclist,'delivery_note_details'):
|
for d in getlist(self.doclist,'delivery_note_details'):
|
||||||
@ -70,14 +70,14 @@ class DocType(TransactionBase):
|
|||||||
if not d.stock_uom: d.stock_uom = res and cstr(res[0][0]) or ''
|
if not d.stock_uom: d.stock_uom = res and cstr(res[0][0]) or ''
|
||||||
if not d.item_group: d.item_group = res and cstr(res[0][1]) or ''
|
if not d.item_group: d.item_group = res and cstr(res[0][1]) or ''
|
||||||
d.save()
|
d.save()
|
||||||
|
|
||||||
# ::::: Validates that Sales Order is not pulled twice :::::::
|
# ::::: Validates that Sales Order is not pulled twice :::::::
|
||||||
def validate_prev_docname(self):
|
def validate_prev_docname(self):
|
||||||
for d in getlist(self.doclist, 'delivery_note_details'):
|
for d in getlist(self.doclist, 'delivery_note_details'):
|
||||||
if self.doc.sales_order_no == d.prevdoc_docname:
|
if self.doc.sales_order_no == d.prevdoc_docname:
|
||||||
msgprint(cstr(self.doc.sales_order_no) + " sales order details have already been pulled. ")
|
msgprint(cstr(self.doc.sales_order_no) + " sales order details have already been pulled. ")
|
||||||
raise Exception, "Validation Error. "
|
raise Exception, "Validation Error. "
|
||||||
|
|
||||||
#Set Actual Qty based on item code and warehouse
|
#Set Actual Qty based on item code and warehouse
|
||||||
#------------------------------------------------------
|
#------------------------------------------------------
|
||||||
def set_actual_qty(self):
|
def set_actual_qty(self):
|
||||||
@ -91,14 +91,14 @@ class DocType(TransactionBase):
|
|||||||
# -------------------------------------
|
# -------------------------------------
|
||||||
def get_tc_details(self):
|
def get_tc_details(self):
|
||||||
return get_obj('Sales Common').get_tc_details(self)
|
return get_obj('Sales Common').get_tc_details(self)
|
||||||
|
|
||||||
#pull project customer
|
#pull project customer
|
||||||
#-------------------------
|
#-------------------------
|
||||||
def pull_project_customer(self):
|
def pull_project_customer(self):
|
||||||
res = sql("select customer from `tabProject` where name = '%s'"%self.doc.project_name)
|
res = sql("select customer from `tabProject` where name = '%s'"%self.doc.project_name)
|
||||||
if res:
|
if res:
|
||||||
get_obj('DocType Mapper', 'Project-Delivery Note').dt_map('Project', 'Delivery Note', self.doc.project_name, self.doc, self.doclist, "[['Project', 'Delivery Note']]")
|
get_obj('DocType Mapper', 'Project-Delivery Note').dt_map('Project', 'Delivery Note', self.doc.project_name, self.doc, self.doclist, "[['Project', 'Delivery Note']]")
|
||||||
|
|
||||||
# DELIVERY NOTE DETAILS TRIGGER FUNCTIONS
|
# DELIVERY NOTE DETAILS TRIGGER FUNCTIONS
|
||||||
# ================================================================================
|
# ================================================================================
|
||||||
|
|
||||||
@ -119,10 +119,10 @@ class DocType(TransactionBase):
|
|||||||
}
|
}
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
||||||
# OTHER CHARGES TRIGGER FUNCTIONS
|
# OTHER CHARGES TRIGGER FUNCTIONS
|
||||||
# ====================================================================================
|
# ====================================================================================
|
||||||
|
|
||||||
# *********** Get Tax rate if account type is TAX ********************
|
# *********** Get Tax rate if account type is TAX ********************
|
||||||
def get_rate(self,arg):
|
def get_rate(self,arg):
|
||||||
return get_obj('Sales Common').get_rate(arg)
|
return get_obj('Sales Common').get_rate(arg)
|
||||||
@ -137,7 +137,7 @@ class DocType(TransactionBase):
|
|||||||
def get_other_charges(self):
|
def get_other_charges(self):
|
||||||
return get_obj('Sales Common').get_other_charges(self)
|
return get_obj('Sales Common').get_other_charges(self)
|
||||||
|
|
||||||
|
|
||||||
#check in manage account if sales order required or not.
|
#check in manage account if sales order required or not.
|
||||||
# ====================================================================================
|
# ====================================================================================
|
||||||
def so_required(self):
|
def so_required(self):
|
||||||
@ -147,9 +147,9 @@ class DocType(TransactionBase):
|
|||||||
if not d.prevdoc_docname:
|
if not d.prevdoc_docname:
|
||||||
msgprint("Sales Order No. required against item %s"%d.item_code)
|
msgprint("Sales Order No. required against item %s"%d.item_code)
|
||||||
raise Exception
|
raise Exception
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# VALIDATE
|
# VALIDATE
|
||||||
# ====================================================================================
|
# ====================================================================================
|
||||||
def validate(self):
|
def validate(self):
|
||||||
@ -167,13 +167,13 @@ class DocType(TransactionBase):
|
|||||||
sales_com_obj.make_packing_list(self,'delivery_note_details')
|
sales_com_obj.make_packing_list(self,'delivery_note_details')
|
||||||
get_obj('Stock Ledger').validate_serial_no(self, 'packing_details')
|
get_obj('Stock Ledger').validate_serial_no(self, 'packing_details')
|
||||||
sales_com_obj.validate_max_discount(self, 'delivery_note_details') #verify whether rate is not greater than max discount
|
sales_com_obj.validate_max_discount(self, 'delivery_note_details') #verify whether rate is not greater than max discount
|
||||||
sales_com_obj.get_allocated_sum(self) # this is to verify that the allocated % of sales persons is 100%
|
sales_com_obj.get_allocated_sum(self) # this is to verify that the allocated % of sales persons is 100%
|
||||||
sales_com_obj.check_conversion_rate(self)
|
sales_com_obj.check_conversion_rate(self)
|
||||||
# ::::::: Get total in Words ::::::::
|
# ::::::: Get total in Words ::::::::
|
||||||
dcc = TransactionBase().get_company_currency(self.doc.company)
|
dcc = TransactionBase().get_company_currency(self.doc.company)
|
||||||
self.doc.in_words = sales_com_obj.get_total_in_words(dcc, self.doc.rounded_total)
|
self.doc.in_words = sales_com_obj.get_total_in_words(dcc, self.doc.rounded_total)
|
||||||
self.doc.in_words_export = sales_com_obj.get_total_in_words(self.doc.currency, self.doc.rounded_total_export)
|
self.doc.in_words_export = sales_com_obj.get_total_in_words(self.doc.currency, self.doc.rounded_total_export)
|
||||||
|
|
||||||
# ::::::: Set actual qty for each item in selected warehouse :::::::
|
# ::::::: Set actual qty for each item in selected warehouse :::::::
|
||||||
self.update_current_stock()
|
self.update_current_stock()
|
||||||
# :::::: set DN status :::::::
|
# :::::: set DN status :::::::
|
||||||
@ -181,8 +181,8 @@ class DocType(TransactionBase):
|
|||||||
self.doc.status = 'Draft'
|
self.doc.status = 'Draft'
|
||||||
if not self.doc.billing_status: self.doc.billing_status = 'Not Billed'
|
if not self.doc.billing_status: self.doc.billing_status = 'Not Billed'
|
||||||
if not self.doc.installation_status: self.doc.installation_status = 'Not Installed'
|
if not self.doc.installation_status: self.doc.installation_status = 'Not Installed'
|
||||||
|
|
||||||
|
|
||||||
# ************** Validate Mandatory *************************
|
# ************** Validate Mandatory *************************
|
||||||
def validate_mandatory(self):
|
def validate_mandatory(self):
|
||||||
# :::::::::: Amendment Date ::::::::::::::
|
# :::::::::: Amendment Date ::::::::::::::
|
||||||
@ -198,20 +198,20 @@ class DocType(TransactionBase):
|
|||||||
if not res:
|
if not res:
|
||||||
msgprint("Customer - %s does not belong to project - %s. \n\nIf you want to use project for multiple customers then please make customer details blank in project - %s."%(self.doc.customer,self.doc.project_name,self.doc.project_name))
|
msgprint("Customer - %s does not belong to project - %s. \n\nIf you want to use project for multiple customers then please make customer details blank in project - %s."%(self.doc.customer,self.doc.project_name,self.doc.project_name))
|
||||||
raise Exception
|
raise Exception
|
||||||
|
|
||||||
# Validate values with reference document
|
# Validate values with reference document
|
||||||
#----------------------------------------
|
#----------------------------------------
|
||||||
def validate_reference_value(self):
|
def validate_reference_value(self):
|
||||||
get_obj('DocType Mapper', 'Sales Order-Delivery Note', with_children = 1).validate_reference_value(self, self.doc.name)
|
get_obj('DocType Mapper', 'Sales Order-Delivery Note', with_children = 1).validate_reference_value(self, self.doc.name)
|
||||||
|
|
||||||
|
|
||||||
# ******* Validate Previous Document Details ************
|
# ******* Validate Previous Document Details ************
|
||||||
def validate_prevdoc_details(self):
|
def validate_prevdoc_details(self):
|
||||||
for d in getlist(self.doclist,'delivery_note_details'):
|
for d in getlist(self.doclist,'delivery_note_details'):
|
||||||
|
|
||||||
prevdoc = d.prevdoc_doctype
|
prevdoc = d.prevdoc_doctype
|
||||||
prevdoc_docname = d.prevdoc_docname
|
prevdoc_docname = d.prevdoc_docname
|
||||||
|
|
||||||
if prevdoc_docname and prevdoc:
|
if prevdoc_docname and prevdoc:
|
||||||
# ::::::::::: Validates Transaction Date of DN and previous doc (i.e. SO , PO, PR) *********
|
# ::::::::::: Validates Transaction Date of DN and previous doc (i.e. SO , PO, PR) *********
|
||||||
trans_date = sql("select transaction_date from `tab%s` where name = '%s'" %(prevdoc,prevdoc_docname))[0][0]
|
trans_date = sql("select transaction_date from `tab%s` where name = '%s'" %(prevdoc,prevdoc_docname))[0][0]
|
||||||
@ -259,7 +259,7 @@ class DocType(TransactionBase):
|
|||||||
ch = sql("select is_stock_item from `tabItem` where name = '%s'"%d.item_code)
|
ch = sql("select is_stock_item from `tabItem` where name = '%s'"%d.item_code)
|
||||||
if d.prevdoc_doctype and d.prevdoc_detail_docname and ch and ch[0][0]=='Yes':
|
if d.prevdoc_doctype and d.prevdoc_detail_docname and ch and ch[0][0]=='Yes':
|
||||||
self.validate_items_with_prevdoc(d)
|
self.validate_items_with_prevdoc(d)
|
||||||
|
|
||||||
# validates whether item is not entered twice
|
# validates whether item is not entered twice
|
||||||
e = [d.item_code, d.description, d.warehouse, d.prevdoc_docname or '', d.batch_no or '']
|
e = [d.item_code, d.description, d.warehouse, d.prevdoc_docname or '', d.batch_no or '']
|
||||||
f = [d.item_code, d.description, d.prevdoc_docname or '']
|
f = [d.item_code, d.description, d.prevdoc_docname or '']
|
||||||
@ -297,8 +297,8 @@ class DocType(TransactionBase):
|
|||||||
for d in getlist(self.doclist, 'packing_details'):
|
for d in getlist(self.doclist, 'packing_details'):
|
||||||
bin = sql("select actual_qty, projected_qty from `tabBin` where item_code = %s and warehouse = %s", (d.item_code, d.warehouse), as_dict = 1)
|
bin = sql("select actual_qty, projected_qty from `tabBin` where item_code = %s and warehouse = %s", (d.item_code, d.warehouse), as_dict = 1)
|
||||||
d.actual_qty = bin and flt(bin[0]['actual_qty']) or 0
|
d.actual_qty = bin and flt(bin[0]['actual_qty']) or 0
|
||||||
d.projected_qty = bin and flt(bin[0]['projected_qty']) or 0
|
d.projected_qty = bin and flt(bin[0]['projected_qty']) or 0
|
||||||
|
|
||||||
|
|
||||||
# ON SUBMIT
|
# ON SUBMIT
|
||||||
# =================================================================================================
|
# =================================================================================================
|
||||||
@ -322,7 +322,7 @@ class DocType(TransactionBase):
|
|||||||
# on submit notification
|
# on submit notification
|
||||||
self.notify_obj.notify_contact('Delivery Note',self.doc.doctype,self.doc.name, self.doc.email_id, self.doc.contact_person)
|
self.notify_obj.notify_contact('Delivery Note',self.doc.doctype,self.doc.name, self.doc.email_id, self.doc.contact_person)
|
||||||
|
|
||||||
|
|
||||||
# *********** Checks whether actual quantity is present in warehouse *************
|
# *********** Checks whether actual quantity is present in warehouse *************
|
||||||
def check_qty_in_stock(self):
|
def check_qty_in_stock(self):
|
||||||
for d in getlist(self.doclist, 'packing_details'):
|
for d in getlist(self.doclist, 'packing_details'):
|
||||||
@ -334,7 +334,7 @@ class DocType(TransactionBase):
|
|||||||
|
|
||||||
|
|
||||||
# ON CANCEL
|
# ON CANCEL
|
||||||
# =================================================================================================
|
# =================================================================================================
|
||||||
def on_cancel(self):
|
def on_cancel(self):
|
||||||
sales_com_obj = get_obj(dt = 'Sales Common')
|
sales_com_obj = get_obj(dt = 'Sales Common')
|
||||||
sales_com_obj.check_stop_sales_order(self)
|
sales_com_obj.check_stop_sales_order(self)
|
||||||
@ -345,14 +345,14 @@ class DocType(TransactionBase):
|
|||||||
# :::::: set DN status :::::::
|
# :::::: set DN status :::::::
|
||||||
set(self.doc, 'status', 'Cancelled')
|
set(self.doc, 'status', 'Cancelled')
|
||||||
|
|
||||||
|
|
||||||
# ******************** Check Next DocStatus **************************
|
# ******************** Check Next DocStatus **************************
|
||||||
def check_next_docstatus(self):
|
def check_next_docstatus(self):
|
||||||
submit_rv = sql("select t1.name from `tabReceivable Voucher` t1,`tabRV Detail` t2 where t1.name = t2.parent and t2.delivery_note = '%s' and t1.docstatus = 1" % (self.doc.name))
|
submit_rv = sql("select t1.name from `tabReceivable Voucher` t1,`tabRV Detail` t2 where t1.name = t2.parent and t2.delivery_note = '%s' and t1.docstatus = 1" % (self.doc.name))
|
||||||
if submit_rv:
|
if submit_rv:
|
||||||
msgprint("Sales Invoice : " + cstr(submit_rv[0][0]) + " has already been submitted !")
|
msgprint("Sales Invoice : " + cstr(submit_rv[0][0]) + " has already been submitted !")
|
||||||
raise Exception , "Validation Error."
|
raise Exception , "Validation Error."
|
||||||
|
|
||||||
submit_in = sql("select t1.name from `tabInstallation Note` t1, `tabInstalled Item Details` t2 where t1.name = t2.parent and t2.prevdoc_docname = '%s' and t1.docstatus = 1" % (self.doc.name))
|
submit_in = sql("select t1.name from `tabInstallation Note` t1, `tabInstalled Item Details` t2 where t1.name = t2.parent and t2.prevdoc_docname = '%s' and t1.docstatus = 1" % (self.doc.name))
|
||||||
if submit_in:
|
if submit_in:
|
||||||
msgprint("Installation Note : "+cstr(submit_in[0][0]) +" has already been submitted !")
|
msgprint("Installation Note : "+cstr(submit_in[0][0]) +" has already been submitted !")
|
||||||
@ -369,11 +369,11 @@ class DocType(TransactionBase):
|
|||||||
if not d[0]:
|
if not d[0]:
|
||||||
msgprint("Message: Please enter Warehouse for item %s as it is stock item."% d[1])
|
msgprint("Message: Please enter Warehouse for item %s as it is stock item."% d[1])
|
||||||
raise Exception
|
raise Exception
|
||||||
# if prevdoc_doctype = "Sales Order"
|
# if prevdoc_doctype = "Sales Order"
|
||||||
if d[3] < 0 :
|
if d[3] < 0 :
|
||||||
# Reduce Reserved Qty from warehouse
|
# Reduce Reserved Qty from warehouse
|
||||||
bin = get_obj('Warehouse', d[0]).update_bin(0, flt(update_stock) * flt(d[3]), 0, 0, 0, d[1], self.doc.transaction_date)
|
bin = get_obj('Warehouse', d[0]).update_bin(0, flt(update_stock) * flt(d[3]), 0, 0, 0, d[1], self.doc.transaction_date)
|
||||||
|
|
||||||
# Reduce actual qty from warehouse
|
# Reduce actual qty from warehouse
|
||||||
self.make_sl_entry(d, d[0], - flt(d[2]) , 0, update_stock)
|
self.make_sl_entry(d, d[0], - flt(d[2]) , 0, update_stock)
|
||||||
get_obj('Stock Ledger', 'Stock Ledger').update_stock(self.values)
|
get_obj('Stock Ledger', 'Stock Ledger').update_stock(self.values)
|
||||||
@ -383,7 +383,7 @@ class DocType(TransactionBase):
|
|||||||
def get_item_list(self, is_stopped):
|
def get_item_list(self, is_stopped):
|
||||||
return get_obj('Sales Common').get_item_list(self, is_stopped)
|
return get_obj('Sales Common').get_item_list(self, is_stopped)
|
||||||
|
|
||||||
|
|
||||||
# ********************** Make Stock Entry ************************************
|
# ********************** Make Stock Entry ************************************
|
||||||
def make_sl_entry(self, d, wh, qty, in_value, update_stock):
|
def make_sl_entry(self, d, wh, qty, in_value, update_stock):
|
||||||
self.values.append({
|
self.values.append({
|
||||||
@ -394,8 +394,8 @@ class DocType(TransactionBase):
|
|||||||
'posting_time' : self.doc.posting_time,
|
'posting_time' : self.doc.posting_time,
|
||||||
'voucher_type' : 'Delivery Note',
|
'voucher_type' : 'Delivery Note',
|
||||||
'voucher_no' : self.doc.name,
|
'voucher_no' : self.doc.name,
|
||||||
'voucher_detail_no' : '',
|
'voucher_detail_no' : '',
|
||||||
'actual_qty' : qty,
|
'actual_qty' : qty,
|
||||||
'stock_uom' : d[4],
|
'stock_uom' : d[4],
|
||||||
'incoming_rate' : in_value,
|
'incoming_rate' : in_value,
|
||||||
'company' : self.doc.company,
|
'company' : self.doc.company,
|
||||||
@ -403,9 +403,9 @@ class DocType(TransactionBase):
|
|||||||
'is_cancelled' : (update_stock==1) and 'No' or 'Yes',
|
'is_cancelled' : (update_stock==1) and 'No' or 'Yes',
|
||||||
'batch_no' : d[5],
|
'batch_no' : d[5],
|
||||||
'serial_no' : d[6]
|
'serial_no' : d[6]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# SEND SMS
|
# SEND SMS
|
||||||
# ============================================================================================
|
# ============================================================================================
|
||||||
def send_sms(self):
|
def send_sms(self):
|
||||||
@ -436,3 +436,7 @@ class DocType(TransactionBase):
|
|||||||
# ===========================================
|
# ===========================================
|
||||||
def repair_delivery_note(self):
|
def repair_delivery_note(self):
|
||||||
get_obj('Sales Common', 'Sales Common').repair_curr_doctype_details(self)
|
get_obj('Sales Common', 'Sales Common').repair_curr_doctype_details(self)
|
||||||
|
|
||||||
|
# Packing Slip Related
|
||||||
|
# ==========================================
|
||||||
|
#def get
|
@ -5,14 +5,23 @@
|
|||||||
{
|
{
|
||||||
'creation': '2011-04-18 15:58:20',
|
'creation': '2011-04-18 15:58:20',
|
||||||
'docstatus': 0,
|
'docstatus': 0,
|
||||||
'modified': '2011-08-09 17:10:45',
|
'modified': '2011-08-18 16:31:02',
|
||||||
'modified_by': 'Administrator',
|
'modified_by': 'Administrator',
|
||||||
'owner': 'Administrator'
|
'owner': 'Administrator'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
# These values are common for all DocField
|
||||||
|
{
|
||||||
|
'doctype': 'DocField',
|
||||||
|
'name': '__common__',
|
||||||
|
'parent': 'Delivery Note',
|
||||||
|
'parentfield': 'fields',
|
||||||
|
'parenttype': 'DocType'
|
||||||
|
},
|
||||||
|
|
||||||
# These values are common for all DocType
|
# These values are common for all DocType
|
||||||
{
|
{
|
||||||
'_last_update': '1311621379',
|
'_last_update': '1313485457',
|
||||||
'colour': 'White:FFF',
|
'colour': 'White:FFF',
|
||||||
'doctype': 'DocType',
|
'doctype': 'DocType',
|
||||||
'document_type': 'Transaction',
|
'document_type': 'Transaction',
|
||||||
@ -27,15 +36,15 @@
|
|||||||
'show_in_menu': 0,
|
'show_in_menu': 0,
|
||||||
'subject': 'To %(customer_name)s on %(transaction_date)s | %(per_billed)s% billed',
|
'subject': 'To %(customer_name)s on %(transaction_date)s | %(per_billed)s% billed',
|
||||||
'tag_fields': 'billing_status',
|
'tag_fields': 'billing_status',
|
||||||
'version': 446
|
'version': 447
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocField
|
# These values are common for all DocFormat
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocFormat',
|
||||||
'name': '__common__',
|
'name': '__common__',
|
||||||
'parent': 'Delivery Note',
|
'parent': 'Delivery Note',
|
||||||
'parentfield': 'fields',
|
'parentfield': 'formats',
|
||||||
'parenttype': 'DocType'
|
'parenttype': 'DocType'
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -109,21 +118,8 @@
|
|||||||
|
|
||||||
# DocPerm
|
# DocPerm
|
||||||
{
|
{
|
||||||
'amend': 1,
|
|
||||||
'cancel': 1,
|
|
||||||
'create': 1,
|
|
||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'idx': 5,
|
'idx': 5,
|
||||||
'permlevel': 0,
|
|
||||||
'role': 'Sales Manager',
|
|
||||||
'submit': 1,
|
|
||||||
'write': 1
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocPerm
|
|
||||||
{
|
|
||||||
'doctype': 'DocPerm',
|
|
||||||
'idx': 6,
|
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
'role': 'All'
|
'role': 'All'
|
||||||
},
|
},
|
||||||
@ -131,11 +127,25 @@
|
|||||||
# DocPerm
|
# DocPerm
|
||||||
{
|
{
|
||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'idx': 7,
|
'idx': 6,
|
||||||
'permlevel': 2,
|
'permlevel': 2,
|
||||||
'role': 'All'
|
'role': 'All'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
# DocFormat
|
||||||
|
{
|
||||||
|
'doctype': 'DocFormat',
|
||||||
|
'format': 'Delivery Note Format',
|
||||||
|
'idx': 1
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocFormat
|
||||||
|
{
|
||||||
|
'doctype': 'DocFormat',
|
||||||
|
'format': 'Delivery Note Packing List Wise',
|
||||||
|
'idx': 2
|
||||||
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': 'White:FFF',
|
'colour': 'White:FFF',
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
{
|
{
|
||||||
'creation': '2010-08-08 17:08:58',
|
'creation': '2010-08-08 17:08:58',
|
||||||
'docstatus': 0,
|
'docstatus': 0,
|
||||||
'modified': '2011-03-01 10:35:06',
|
'modified': '2011-08-22 12:11:51',
|
||||||
'modified_by': 'Administrator',
|
'modified_by': 'Administrator',
|
||||||
'owner': 'Administrator'
|
'owner': 'Administrator'
|
||||||
},
|
},
|
||||||
@ -21,7 +21,7 @@
|
|||||||
'section_style': 'Tray',
|
'section_style': 'Tray',
|
||||||
'server_code_error': ' ',
|
'server_code_error': ' ',
|
||||||
'show_in_menu': 0,
|
'show_in_menu': 0,
|
||||||
'version': 35
|
'version': 38
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocField
|
# These values are common for all DocField
|
||||||
@ -102,27 +102,13 @@
|
|||||||
'width': '50px'
|
'width': '50px'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': 'DocField',
|
|
||||||
'fieldname': 'no_of_packs',
|
|
||||||
'fieldtype': 'Int',
|
|
||||||
'idx': 5,
|
|
||||||
'label': 'No of Packs',
|
|
||||||
'oldfieldname': 'no_of_packs',
|
|
||||||
'oldfieldtype': 'Int',
|
|
||||||
'permlevel': 0,
|
|
||||||
'print_hide': 1,
|
|
||||||
'width': '100px'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'default': '0.00',
|
'default': '0.00',
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'qty',
|
'fieldname': 'qty',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'idx': 6,
|
'idx': 5,
|
||||||
'label': 'Quantity',
|
'label': 'Quantity',
|
||||||
'oldfieldname': 'qty',
|
'oldfieldname': 'qty',
|
||||||
'oldfieldtype': 'Currency',
|
'oldfieldtype': 'Currency',
|
||||||
@ -138,7 +124,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'ref_rate',
|
'fieldname': 'ref_rate',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'idx': 7,
|
'idx': 6,
|
||||||
'label': 'Ref Rate',
|
'label': 'Ref Rate',
|
||||||
'no_copy': 0,
|
'no_copy': 0,
|
||||||
'oldfieldname': 'ref_rate',
|
'oldfieldname': 'ref_rate',
|
||||||
@ -156,7 +142,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'adj_rate',
|
'fieldname': 'adj_rate',
|
||||||
'fieldtype': 'Float',
|
'fieldtype': 'Float',
|
||||||
'idx': 8,
|
'idx': 7,
|
||||||
'label': 'Discount (%)',
|
'label': 'Discount (%)',
|
||||||
'oldfieldname': 'adj_rate',
|
'oldfieldname': 'adj_rate',
|
||||||
'oldfieldtype': 'Float',
|
'oldfieldtype': 'Float',
|
||||||
@ -171,7 +157,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'export_rate',
|
'fieldname': 'export_rate',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'idx': 9,
|
'idx': 8,
|
||||||
'label': 'Rate',
|
'label': 'Rate',
|
||||||
'oldfieldname': 'export_rate',
|
'oldfieldname': 'export_rate',
|
||||||
'oldfieldtype': 'Currency',
|
'oldfieldtype': 'Currency',
|
||||||
@ -187,7 +173,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'export_amount',
|
'fieldname': 'export_amount',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'idx': 10,
|
'idx': 9,
|
||||||
'label': 'Amount',
|
'label': 'Amount',
|
||||||
'oldfieldname': 'export_amount',
|
'oldfieldname': 'export_amount',
|
||||||
'oldfieldtype': 'Currency',
|
'oldfieldtype': 'Currency',
|
||||||
@ -202,7 +188,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'base_ref_rate',
|
'fieldname': 'base_ref_rate',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'idx': 11,
|
'idx': 10,
|
||||||
'label': 'Ref Rate*',
|
'label': 'Ref Rate*',
|
||||||
'oldfieldname': 'base_ref_rate',
|
'oldfieldname': 'base_ref_rate',
|
||||||
'oldfieldtype': 'Currency',
|
'oldfieldtype': 'Currency',
|
||||||
@ -217,7 +203,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'basic_rate',
|
'fieldname': 'basic_rate',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'idx': 12,
|
'idx': 11,
|
||||||
'label': 'Rate*',
|
'label': 'Rate*',
|
||||||
'oldfieldname': 'basic_rate',
|
'oldfieldname': 'basic_rate',
|
||||||
'oldfieldtype': 'Currency',
|
'oldfieldtype': 'Currency',
|
||||||
@ -233,7 +219,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'amount',
|
'fieldname': 'amount',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'idx': 13,
|
'idx': 12,
|
||||||
'label': 'Amount*',
|
'label': 'Amount*',
|
||||||
'oldfieldname': 'amount',
|
'oldfieldname': 'amount',
|
||||||
'oldfieldtype': 'Currency',
|
'oldfieldtype': 'Currency',
|
||||||
@ -248,7 +234,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'warehouse',
|
'fieldname': 'warehouse',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': 'Link',
|
||||||
'idx': 14,
|
'idx': 13,
|
||||||
'label': 'Warehouse',
|
'label': 'Warehouse',
|
||||||
'oldfieldname': 'warehouse',
|
'oldfieldname': 'warehouse',
|
||||||
'oldfieldtype': 'Link',
|
'oldfieldtype': 'Link',
|
||||||
@ -264,7 +250,8 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'serial_no',
|
'fieldname': 'serial_no',
|
||||||
'fieldtype': 'Text',
|
'fieldtype': 'Text',
|
||||||
'idx': 15,
|
'idx': 14,
|
||||||
|
'in_filter': 1,
|
||||||
'label': 'Serial No',
|
'label': 'Serial No',
|
||||||
'no_copy': 1,
|
'no_copy': 1,
|
||||||
'oldfieldname': 'serial_no',
|
'oldfieldname': 'serial_no',
|
||||||
@ -279,14 +266,13 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'batch_no',
|
'fieldname': 'batch_no',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': 'Link',
|
||||||
'idx': 16,
|
'idx': 15,
|
||||||
'label': 'Batch No',
|
'label': 'Batch No',
|
||||||
'oldfieldname': 'batch_no',
|
'oldfieldname': 'batch_no',
|
||||||
'oldfieldtype': 'Link',
|
'oldfieldtype': 'Link',
|
||||||
'options': 'Batch',
|
'options': 'Batch',
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'print_hide': 1,
|
'print_hide': 1
|
||||||
'search_index': 0
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
@ -294,14 +280,13 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'item_group',
|
'fieldname': 'item_group',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': 'Link',
|
||||||
'idx': 17,
|
'idx': 16,
|
||||||
'label': 'Item Group',
|
'label': 'Item Group',
|
||||||
'oldfieldname': 'item_group',
|
'oldfieldname': 'item_group',
|
||||||
'oldfieldtype': 'Link',
|
'oldfieldtype': 'Link',
|
||||||
'options': 'Item Group',
|
'options': 'Item Group',
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
'print_hide': 1,
|
'print_hide': 1
|
||||||
'search_index': 0
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
@ -309,23 +294,77 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'brand',
|
'fieldname': 'brand',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': 'Link',
|
||||||
'idx': 18,
|
'idx': 17,
|
||||||
'label': 'Brand Name',
|
'label': 'Brand Name',
|
||||||
'oldfieldname': 'brand',
|
'oldfieldname': 'brand',
|
||||||
'oldfieldtype': 'Link',
|
'oldfieldtype': 'Link',
|
||||||
'options': 'Brand',
|
'options': 'Brand',
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
'print_hide': 1,
|
'print_hide': 1,
|
||||||
'search_index': 0,
|
|
||||||
'width': '150px'
|
'width': '150px'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': 'DocField',
|
||||||
|
'fieldname': 'pack_no',
|
||||||
|
'fieldtype': 'Data',
|
||||||
|
'idx': 18,
|
||||||
|
'label': 'Pack No',
|
||||||
|
'permlevel': 0
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': 'DocField',
|
||||||
|
'fieldname': 'pack_gross_wt',
|
||||||
|
'fieldtype': 'Float',
|
||||||
|
'idx': 19,
|
||||||
|
'label': 'Pack Gross Wt',
|
||||||
|
'permlevel': 0
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': 'DocField',
|
||||||
|
'fieldname': 'weight_uom',
|
||||||
|
'fieldtype': 'Link',
|
||||||
|
'idx': 20,
|
||||||
|
'label': 'Weight UOM',
|
||||||
|
'options': 'UOM',
|
||||||
|
'permlevel': 0
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': 'DocField',
|
||||||
|
'fieldname': 'pack_nett_wt',
|
||||||
|
'fieldtype': 'Float',
|
||||||
|
'idx': 21,
|
||||||
|
'label': 'Pack Nett Wt',
|
||||||
|
'permlevel': 0
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': 'DocField',
|
||||||
|
'fieldname': 'no_of_packs',
|
||||||
|
'fieldtype': 'Int',
|
||||||
|
'idx': 22,
|
||||||
|
'label': 'No of Packs',
|
||||||
|
'oldfieldname': 'no_of_packs',
|
||||||
|
'oldfieldtype': 'Int',
|
||||||
|
'permlevel': 0,
|
||||||
|
'print_hide': 1,
|
||||||
|
'width': '100px'
|
||||||
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'pack_unit',
|
'fieldname': 'pack_unit',
|
||||||
'fieldtype': 'Data',
|
'fieldtype': 'Data',
|
||||||
'idx': 19,
|
'idx': 23,
|
||||||
'label': 'Pack Unit',
|
'label': 'Pack Unit',
|
||||||
'oldfieldname': 'pack_unit',
|
'oldfieldname': 'pack_unit',
|
||||||
'oldfieldtype': 'Data',
|
'oldfieldtype': 'Data',
|
||||||
@ -339,7 +378,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'installed_qty',
|
'fieldname': 'installed_qty',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'idx': 20,
|
'idx': 24,
|
||||||
'label': 'Installed Qty',
|
'label': 'Installed Qty',
|
||||||
'no_copy': 1,
|
'no_copy': 1,
|
||||||
'oldfieldname': 'installed_qty',
|
'oldfieldname': 'installed_qty',
|
||||||
@ -354,7 +393,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'actual_qty',
|
'fieldname': 'actual_qty',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'idx': 21,
|
'idx': 25,
|
||||||
'label': 'Available Qty at Warehouse',
|
'label': 'Available Qty at Warehouse',
|
||||||
'no_copy': 1,
|
'no_copy': 1,
|
||||||
'oldfieldname': 'actual_qty',
|
'oldfieldname': 'actual_qty',
|
||||||
@ -364,29 +403,12 @@
|
|||||||
'width': '150px'
|
'width': '150px'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'colour': 'White:FFF',
|
|
||||||
'default': '0.00',
|
|
||||||
'doctype': 'DocField',
|
|
||||||
'fieldname': 'billed_qty',
|
|
||||||
'fieldtype': 'Currency',
|
|
||||||
'idx': 22,
|
|
||||||
'label': 'Billed Qty',
|
|
||||||
'no_copy': 1,
|
|
||||||
'oldfieldname': 'billed_qty',
|
|
||||||
'oldfieldtype': 'Currency',
|
|
||||||
'permlevel': 1,
|
|
||||||
'print_hide': 1,
|
|
||||||
'width': '100px'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'billed_amt',
|
'fieldname': 'billed_amt',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'idx': 23,
|
'idx': 26,
|
||||||
'label': 'Billed Amt',
|
'label': 'Billed Amt',
|
||||||
'no_copy': 1,
|
'no_copy': 1,
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
@ -401,7 +423,7 @@
|
|||||||
'fieldname': 'prevdoc_docname',
|
'fieldname': 'prevdoc_docname',
|
||||||
'fieldtype': 'Data',
|
'fieldtype': 'Data',
|
||||||
'hidden': 0,
|
'hidden': 0,
|
||||||
'idx': 24,
|
'idx': 27,
|
||||||
'in_filter': 1,
|
'in_filter': 1,
|
||||||
'label': 'Against Document No',
|
'label': 'Against Document No',
|
||||||
'no_copy': 1,
|
'no_copy': 1,
|
||||||
@ -419,14 +441,14 @@
|
|||||||
'fieldname': 'prevdoc_doctype',
|
'fieldname': 'prevdoc_doctype',
|
||||||
'fieldtype': 'Data',
|
'fieldtype': 'Data',
|
||||||
'hidden': 1,
|
'hidden': 1,
|
||||||
'idx': 25,
|
'idx': 28,
|
||||||
'in_filter': 1,
|
'in_filter': 1,
|
||||||
'label': 'Document Type',
|
'label': 'Document Type',
|
||||||
'oldfieldname': 'prevdoc_doctype',
|
'oldfieldname': 'prevdoc_doctype',
|
||||||
'oldfieldtype': 'Data',
|
'oldfieldtype': 'Data',
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
'print_hide': 1,
|
'print_hide': 1,
|
||||||
'search_index': 0,
|
'search_index': 1,
|
||||||
'width': '150px'
|
'width': '150px'
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -436,7 +458,7 @@
|
|||||||
'fieldname': 'prevdoc_date',
|
'fieldname': 'prevdoc_date',
|
||||||
'fieldtype': 'Date',
|
'fieldtype': 'Date',
|
||||||
'hidden': 1,
|
'hidden': 1,
|
||||||
'idx': 26,
|
'idx': 29,
|
||||||
'in_filter': 1,
|
'in_filter': 1,
|
||||||
'label': 'Against Document Date',
|
'label': 'Against Document Date',
|
||||||
'oldfieldname': 'prevdoc_date',
|
'oldfieldname': 'prevdoc_date',
|
||||||
@ -451,14 +473,14 @@
|
|||||||
'fieldname': 'prevdoc_detail_docname',
|
'fieldname': 'prevdoc_detail_docname',
|
||||||
'fieldtype': 'Data',
|
'fieldtype': 'Data',
|
||||||
'hidden': 1,
|
'hidden': 1,
|
||||||
'idx': 27,
|
'idx': 30,
|
||||||
'in_filter': 1,
|
'in_filter': 1,
|
||||||
'label': 'Against Document Detail No',
|
'label': 'Against Document Detail No',
|
||||||
'oldfieldname': 'prevdoc_detail_docname',
|
'oldfieldname': 'prevdoc_detail_docname',
|
||||||
'oldfieldtype': 'Data',
|
'oldfieldtype': 'Data',
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
'print_hide': 1,
|
'print_hide': 1,
|
||||||
'search_index': 1,
|
'search_index': 0,
|
||||||
'width': '150px'
|
'width': '150px'
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -468,7 +490,7 @@
|
|||||||
'fieldname': 'item_tax_rate',
|
'fieldname': 'item_tax_rate',
|
||||||
'fieldtype': 'Small Text',
|
'fieldtype': 'Small Text',
|
||||||
'hidden': 1,
|
'hidden': 1,
|
||||||
'idx': 28,
|
'idx': 31,
|
||||||
'label': 'Item Tax Rate',
|
'label': 'Item Tax Rate',
|
||||||
'oldfieldname': 'item_tax_rate',
|
'oldfieldname': 'item_tax_rate',
|
||||||
'oldfieldtype': 'Small Text',
|
'oldfieldtype': 'Small Text',
|
||||||
@ -482,7 +504,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'page_break',
|
'fieldname': 'page_break',
|
||||||
'fieldtype': 'Check',
|
'fieldtype': 'Check',
|
||||||
'idx': 29,
|
'idx': 32,
|
||||||
'label': 'Page Break',
|
'label': 'Page Break',
|
||||||
'oldfieldname': 'page_break',
|
'oldfieldname': 'page_break',
|
||||||
'oldfieldtype': 'Check',
|
'oldfieldtype': 'Check',
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
cur_frm.cscript.refresh = function(doc) {
|
cur_frm.cscript.refresh = function(doc) {
|
||||||
// make sensitive fields(has_serial_no, is_stock_item, valuation_method)
|
// make sensitive fields(has_serial_no, is_stock_item, valuation_method)
|
||||||
// read only if any stock ledger entry exists
|
// read only if any stock ledger entry exists
|
||||||
|
|
||||||
if ((!doc.__islocal) && (doc.is_stock_item == 'Yes')) {
|
if ((!doc.__islocal) && (doc.is_stock_item == 'Yes')) {
|
||||||
var callback = function(r, rt) {
|
var callback = function(r, rt) {
|
||||||
if (r.message == 'exists') permlevel = 1;
|
if (r.message == 'exists') permlevel = 1;
|
||||||
else permlevel = 0;
|
else permlevel = 0;
|
||||||
|
|
||||||
set_field_permlevel('has_serial_no', permlevel);
|
set_field_permlevel('has_serial_no', permlevel);
|
||||||
set_field_permlevel('is_stock_item', permlevel);
|
set_field_permlevel('is_stock_item', permlevel);
|
||||||
set_field_permlevel('valuation_method', permlevel);
|
set_field_permlevel('valuation_method', permlevel);
|
||||||
}
|
}
|
||||||
$c_obj(make_doclist(doc.doctype, doc.name),'check_if_sle_exists','',callback);
|
$c_obj(make_doclist(doc.doctype, doc.name),'check_if_sle_exists','',callback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -24,25 +24,25 @@ cur_frm.fields_dict['default_bom'].get_query = function(doc) {
|
|||||||
|
|
||||||
// Expense Account
|
// Expense Account
|
||||||
// ---------------------------------
|
// ---------------------------------
|
||||||
cur_frm.fields_dict['purchase_account'].get_query = function(doc){
|
cur_frm.fields_dict['purchase_account'].get_query = function(doc){
|
||||||
return 'SELECT DISTINCT `tabAccount`.`name` FROM `tabAccount` WHERE `tabAccount`.`debit_or_credit`="Debit" AND `tabAccount`.`group_or_ledger`="Ledger" AND `tabAccount`.`docstatus`!=2 AND `tabAccount`.`is_pl_account` = "Yes" AND `tabAccount`.%(key)s LIKE "%s" ORDER BY `tabAccount`.`name` LIMIT 50'
|
return 'SELECT DISTINCT `tabAccount`.`name` FROM `tabAccount` WHERE `tabAccount`.`debit_or_credit`="Debit" AND `tabAccount`.`group_or_ledger`="Ledger" AND `tabAccount`.`docstatus`!=2 AND `tabAccount`.`is_pl_account` = "Yes" AND `tabAccount`.%(key)s LIKE "%s" ORDER BY `tabAccount`.`name` LIMIT 50'
|
||||||
}
|
}
|
||||||
|
|
||||||
// Income Account
|
// Income Account
|
||||||
// --------------------------------
|
// --------------------------------
|
||||||
cur_frm.fields_dict['default_income_account'].get_query = function(doc) {
|
cur_frm.fields_dict['default_income_account'].get_query = function(doc) {
|
||||||
return 'SELECT DISTINCT `tabAccount`.`name` FROM `tabAccount` WHERE `tabAccount`.`debit_or_credit`="Credit" AND `tabAccount`.`group_or_ledger`="Ledger" AND `tabAccount`.`is_pl_account` = "Yes" AND `tabAccount`.`docstatus`!=2 AND `tabAccount`.`account_type` ="Income Account" AND `tabAccount`.%(key)s LIKE "%s" ORDER BY `tabAccount`.`name` LIMIT 50'
|
return 'SELECT DISTINCT `tabAccount`.`name` FROM `tabAccount` WHERE `tabAccount`.`debit_or_credit`="Credit" AND `tabAccount`.`group_or_ledger`="Ledger" AND `tabAccount`.`is_pl_account` = "Yes" AND `tabAccount`.`docstatus`!=2 AND `tabAccount`.`account_type` ="Income Account" AND `tabAccount`.%(key)s LIKE "%s" ORDER BY `tabAccount`.`name` LIMIT 50'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Purchase Cost Center
|
// Purchase Cost Center
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
cur_frm.fields_dict['cost_center'].get_query = function(doc) {
|
cur_frm.fields_dict['cost_center'].get_query = function(doc) {
|
||||||
return 'SELECT `tabCost Center`.`name` FROM `tabCost Center` WHERE `tabCost Center`.%(key)s LIKE "%s" AND `tabCost Center`.`group_or_ledger` = "Ledger" AND `tabCost Center`.`docstatus`!= 2 ORDER BY `tabCost Center`.`name` ASC LIMIT 50'
|
return 'SELECT `tabCost Center`.`name` FROM `tabCost Center` WHERE `tabCost Center`.%(key)s LIKE "%s" AND `tabCost Center`.`group_or_ledger` = "Ledger" AND `tabCost Center`.`docstatus`!= 2 ORDER BY `tabCost Center`.`name` ASC LIMIT 50'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Sales Cost Center
|
// Sales Cost Center
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
cur_frm.fields_dict['default_sales_cost_center'].get_query = function(doc) {
|
cur_frm.fields_dict['default_sales_cost_center'].get_query = function(doc) {
|
||||||
return 'SELECT `tabCost Center`.`name` FROM `tabCost Center` WHERE `tabCost Center`.%(key)s LIKE "%s" AND `tabCost Center`.`group_or_ledger` = "Ledger" AND `tabCost Center`.`docstatus`!= 2 ORDER BY `tabCost Center`.`name` ASC LIMIT 50'
|
return 'SELECT `tabCost Center`.`name` FROM `tabCost Center` WHERE `tabCost Center`.%(key)s LIKE "%s" AND `tabCost Center`.`group_or_ledger` = "Ledger" AND `tabCost Center`.`docstatus`!= 2 ORDER BY `tabCost Center`.`name` ASC LIMIT 50'
|
||||||
@ -66,7 +66,7 @@ cur_frm.fields_dict['item_group'].get_query = function(doc,cdt,cdn) {
|
|||||||
|
|
||||||
cur_frm.cscript.IGHelp = function(doc,dt,dn){
|
cur_frm.cscript.IGHelp = function(doc,dt,dn){
|
||||||
var call_back = function(){
|
var call_back = function(){
|
||||||
var sb_obj = new SalesBrowser();
|
var sb_obj = new SalesBrowser();
|
||||||
sb_obj.set_val('Item Group');
|
sb_obj.set_val('Item Group');
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -79,21 +79,34 @@ cur_frm.cscript.IGHelp = function(doc,dt,dn){
|
|||||||
// in the "alternate_description" field
|
// in the "alternate_description" field
|
||||||
cur_frm.cscript['Add Image'] = function(doc, dt, dn) {
|
cur_frm.cscript['Add Image'] = function(doc, dt, dn) {
|
||||||
if(!doc.file_list) {
|
if(!doc.file_list) {
|
||||||
msgprint('Please attach a file first!');
|
msgprint('Please attach a file first!');
|
||||||
}
|
}
|
||||||
|
|
||||||
var f = doc.file_list.split('\n')[0];
|
var f = doc.file_list.split('\n')[0];
|
||||||
var fname = f.split(',')[0];
|
var fname = f.split(',')[0];
|
||||||
var fid = f.split(',')[1];
|
var fid = f.split(',')[1];
|
||||||
if(!in_list(['jpg','jpeg','gif','png'], fname.split('.')[1].toLowerCase())) {
|
if(!in_list(['jpg','jpeg','gif','png'], fname.split('.')[1].toLowerCase())) {
|
||||||
msgprint('File must be of extension jpg, jpeg, gif or png'); return;
|
msgprint('File must be of extension jpg, jpeg, gif or png'); return;
|
||||||
}
|
}
|
||||||
|
|
||||||
doc.description_html = repl('<table style="width: 100%; table-layout: fixed;">'+
|
doc.description_html = repl('<table style="width: 100%; table-layout: fixed;">'+
|
||||||
'<tr><td style="width:110px"><img src="%(imgurl)s" width="100px"></td>'+
|
'<tr><td style="width:110px"><img src="%(imgurl)s" width="100px"></td>'+
|
||||||
'<td>%(desc)s</td></tr>'+
|
'<td>%(desc)s</td></tr>'+
|
||||||
'</table>', {imgurl: wn.urllib.get_file_url(fid), desc:doc.description});
|
'</table>', {imgurl: wn.urllib.get_file_url(fid), desc:doc.description});
|
||||||
|
|
||||||
refresh_field('description_html');
|
refresh_field('description_html');
|
||||||
}
|
}
|
||||||
|
//===================== Quotation to validation - either customer or lead mandatory ====================
|
||||||
|
cur_frm.cscript.weight_to_validate = function(doc,cdt,cdn){
|
||||||
|
|
||||||
|
if((doc.nett_weight || doc.gross_weight) && !doc.weight_uom)
|
||||||
|
{
|
||||||
|
alert('Weight is mentioned,\nPlease mention "Weight UOM" too');
|
||||||
|
validated=0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//===================validation function =================================
|
||||||
|
|
||||||
|
cur_frm.cscript.validate = function(doc,cdt,cdn){
|
||||||
|
cur_frm.cscript.weight_to_validate(doc,cdt,cdn);
|
||||||
|
}
|
||||||
|
@ -13,7 +13,7 @@ sql = webnotes.conn.sql
|
|||||||
get_value = webnotes.conn.get_value
|
get_value = webnotes.conn.get_value
|
||||||
in_transaction = webnotes.conn.in_transaction
|
in_transaction = webnotes.conn.in_transaction
|
||||||
convert_to_lists = webnotes.conn.convert_to_lists
|
convert_to_lists = webnotes.conn.convert_to_lists
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ class DocType:
|
|||||||
def __init__(self, doc, doclist=[]):
|
def __init__(self, doc, doclist=[]):
|
||||||
self.doc = doc
|
self.doc = doc
|
||||||
self.doclist = doclist
|
self.doclist = doclist
|
||||||
|
|
||||||
def get_tax_rate(self, tax_type):
|
def get_tax_rate(self, tax_type):
|
||||||
rate = sql("select tax_rate from tabAccount where name = %s", tax_type)
|
rate = sql("select tax_rate from tabAccount where name = %s", tax_type)
|
||||||
ret = {
|
ret = {
|
||||||
@ -39,14 +39,14 @@ class DocType:
|
|||||||
if not self.doc.stock_uom:
|
if not self.doc.stock_uom:
|
||||||
msgprint("Please enter Stock UOM first.")
|
msgprint("Please enter Stock UOM first.")
|
||||||
raise Exception
|
raise Exception
|
||||||
|
|
||||||
if cstr(d.uom) in check_list:
|
if cstr(d.uom) in check_list:
|
||||||
msgprint("UOM %s has been entered more than once in Conversion Factor Details." % cstr(d.uom))
|
msgprint("UOM %s has been entered more than once in Conversion Factor Details." % cstr(d.uom))
|
||||||
raise Exception
|
raise Exception
|
||||||
|
|
||||||
if not cstr(d.uom) in check_list:
|
if not cstr(d.uom) in check_list:
|
||||||
check_list.append(cstr(d.uom))
|
check_list.append(cstr(d.uom))
|
||||||
|
|
||||||
if cstr(d.uom) == cstr(self.doc.stock_uom):
|
if cstr(d.uom) == cstr(self.doc.stock_uom):
|
||||||
if flt(d.conversion_factor) != 1:
|
if flt(d.conversion_factor) != 1:
|
||||||
msgprint("Conversion Fator of UOM : %s should be equal to 1. As UOM : %s is Stock UOM of Item: %s." % ( cstr(d.uom), cstr(d.uom), cstr(self.doc.name)))
|
msgprint("Conversion Fator of UOM : %s should be equal to 1. As UOM : %s is Stock UOM of Item: %s." % ( cstr(d.uom), cstr(d.uom), cstr(self.doc.name)))
|
||||||
@ -56,14 +56,14 @@ class DocType:
|
|||||||
elif cstr(d.uom) != cstr(self.doc.stock_uom) and flt(d.conversion_factor) == 1:
|
elif cstr(d.uom) != cstr(self.doc.stock_uom) and flt(d.conversion_factor) == 1:
|
||||||
msgprint("Conversion Factor of UOM : %s should not be equal to 1. As UOM : %s is not Stock UOM of Item: %s." % ( cstr(d.uom), cstr(d.uom), cstr(self.doc.name)))
|
msgprint("Conversion Factor of UOM : %s should not be equal to 1. As UOM : %s is not Stock UOM of Item: %s." % ( cstr(d.uom), cstr(d.uom), cstr(self.doc.name)))
|
||||||
raise Exception
|
raise Exception
|
||||||
|
|
||||||
if not cstr(self.doc.stock_uom) in check_list :
|
if not cstr(self.doc.stock_uom) in check_list :
|
||||||
child = addchild( self.doc, 'uom_conversion_details', 'UOM Conversion Detail', 1, self.doclist)
|
child = addchild( self.doc, 'uom_conversion_details', 'UOM Conversion Detail', 1, self.doclist)
|
||||||
child.uom = self.doc.stock_uom
|
child.uom = self.doc.stock_uom
|
||||||
child.conversion_factor = 1
|
child.conversion_factor = 1
|
||||||
child.save()
|
child.save()
|
||||||
|
|
||||||
|
|
||||||
# Check whether Ref Rate is not entered twice for same Price List and Currency
|
# Check whether Ref Rate is not entered twice for same Price List and Currency
|
||||||
def check_ref_rate_detail(self):
|
def check_ref_rate_detail(self):
|
||||||
check_list=[]
|
check_list=[]
|
||||||
@ -73,7 +73,13 @@ class DocType:
|
|||||||
raise Exception
|
raise Exception
|
||||||
else:
|
else:
|
||||||
check_list.append([cstr(d.price_list_name),cstr(d.ref_currency)])
|
check_list.append([cstr(d.price_list_name),cstr(d.ref_currency)])
|
||||||
|
|
||||||
|
# Append all the customer codes and insert into "customer_code" field of item table
|
||||||
|
def fill_customer_code(self):
|
||||||
|
cust_code=[]
|
||||||
|
for d in getlist(self.doclist,'item_customer_details'):
|
||||||
|
cust_code.append(d.ref_code)
|
||||||
|
self.doc.customer_code=','.join(cust_code)
|
||||||
|
|
||||||
# Check whether Tax Rate is not entered twice for same Tax Type
|
# Check whether Tax Rate is not entered twice for same Tax Type
|
||||||
def check_item_tax(self):
|
def check_item_tax(self):
|
||||||
@ -89,7 +95,7 @@ class DocType:
|
|||||||
msgprint("Rate is entered twice for Tax : '%s'." % (d.tax_type))
|
msgprint("Rate is entered twice for Tax : '%s'." % (d.tax_type))
|
||||||
raise Exception
|
raise Exception
|
||||||
else:
|
else:
|
||||||
check_list.append(d.tax_type)
|
check_list.append(d.tax_type)
|
||||||
|
|
||||||
def check_for_active_boms(self, check):
|
def check_for_active_boms(self, check):
|
||||||
if check in ['Is Active', 'Is Purchase Item']:
|
if check in ['Is Active', 'Is Purchase Item']:
|
||||||
@ -102,7 +108,7 @@ class DocType:
|
|||||||
if bom and bom[0][0]:
|
if bom and bom[0][0]:
|
||||||
msgprint("%s should be 'Yes'. As Item %s is present in one or many Active BOMs." % (cstr(check), cstr(self.doc.name)))
|
msgprint("%s should be 'Yes'. As Item %s is present in one or many Active BOMs." % (cstr(check), cstr(self.doc.name)))
|
||||||
raise Exception
|
raise Exception
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
fl = {'is_manufactured_item' :'Is Manufactured Item',
|
fl = {'is_manufactured_item' :'Is Manufactured Item',
|
||||||
'is_sub_contracted_item':'Is Sub Contracted Item',
|
'is_sub_contracted_item':'Is Sub Contracted Item',
|
||||||
@ -112,18 +118,19 @@ class DocType:
|
|||||||
if cstr(self.doc.fields[d]) != 'Yes':
|
if cstr(self.doc.fields[d]) != 'Yes':
|
||||||
self.check_for_active_boms(check = fl[d])
|
self.check_for_active_boms(check = fl[d])
|
||||||
self.check_ref_rate_detail()
|
self.check_ref_rate_detail()
|
||||||
|
self.fill_customer_code()
|
||||||
self.check_item_tax()
|
self.check_item_tax()
|
||||||
if not self.doc.min_order_qty:
|
if not self.doc.min_order_qty:
|
||||||
self.doc.min_order_qty = 0
|
self.doc.min_order_qty = 0
|
||||||
self.check_non_asset_warehouse()
|
self.check_non_asset_warehouse()
|
||||||
|
|
||||||
if self.doc.is_pro_applicable == 'Yes' and self.doc.is_manufactured_item != 'Yes':
|
if self.doc.is_pro_applicable == 'Yes' and self.doc.is_manufactured_item != 'Yes':
|
||||||
msgprint("If making Production Order is allowed then, it should also allow to make Bill of Materials. Refer Manufacturing section.")
|
msgprint("If making Production Order is allowed then, it should also allow to make Bill of Materials. Refer Manufacturing section.")
|
||||||
raise Exception
|
raise Exception
|
||||||
|
|
||||||
if self.doc.is_pro_applicable == 'Yes' and self.doc.is_stock_item == 'No':
|
if self.doc.is_pro_applicable == 'Yes' and self.doc.is_stock_item == 'No':
|
||||||
msgprint("As Production Order can be made for this Item, then Is Stock Item Should be 'Yes' as we maintain it's stock. Refer Manufacturing and Inventory section.", raise_exception=1)
|
msgprint("As Production Order can be made for this Item, then Is Stock Item Should be 'Yes' as we maintain it's stock. Refer Manufacturing and Inventory section.", raise_exception=1)
|
||||||
|
|
||||||
if self.doc.is_stock_item == "Yes" and not self.doc.default_warehouse:
|
if self.doc.is_stock_item == "Yes" and not self.doc.default_warehouse:
|
||||||
msgprint("As we maintain stock of this item, its better to maintain default warehouse. To add default warehouse please go to 'Inventory' section. It will be fetched automatically while making Sales Order, Delivery Note, etc.. ", 1)
|
msgprint("As we maintain stock of this item, its better to maintain default warehouse. To add default warehouse please go to 'Inventory' section. It will be fetched automatically while making Sales Order, Delivery Note, etc.. ", 1)
|
||||||
|
|
||||||
@ -146,7 +153,7 @@ class DocType:
|
|||||||
if flt(total_qty) < flt(self.doc.minimum_inventory_level):
|
if flt(total_qty) < flt(self.doc.minimum_inventory_level):
|
||||||
msgprint("Your minimum inventory level is reached")
|
msgprint("Your minimum inventory level is reached")
|
||||||
send_to = []
|
send_to = []
|
||||||
send = sql("select t1.email from `tabProfile` t1,`tabUserRole` t2 where t2.role IN ('Material Master Manager','Purchase Manager') and t2.parent = t1.name")
|
send = sql("select t1.email from `tabProfile` t1,`tabUserRole` t2 where t2.role IN ('Material Master Manager','Purchase Manager') and t2.parent = t1.name")
|
||||||
for d in send:
|
for d in send:
|
||||||
send_to.append(d[0])
|
send_to.append(d[0])
|
||||||
msg = '''
|
msg = '''
|
||||||
@ -167,10 +174,10 @@ Total Available Qty: %s
|
|||||||
ret = {
|
ret = {
|
||||||
'file_group' : file and file[0]['file_group'] or '',
|
'file_group' : file and file[0]['file_group'] or '',
|
||||||
'description' : file and file[0]['description'] or ''
|
'description' : file and file[0]['description'] or ''
|
||||||
|
|
||||||
}
|
}
|
||||||
return str(ret)
|
return str(ret)
|
||||||
|
|
||||||
def check_if_sle_exists(self):
|
def check_if_sle_exists(self):
|
||||||
"""
|
"""
|
||||||
checks if any stock ledger entry exists for this item
|
checks if any stock ledger entry exists for this item
|
||||||
@ -178,7 +185,7 @@ Total Available Qty: %s
|
|||||||
|
|
||||||
sle = sql("select name from `tabStock Ledger Entry` where item_code = %s and ifnull(is_cancelled, 'No') = 'No'", self.doc.name)
|
sle = sql("select name from `tabStock Ledger Entry` where item_code = %s and ifnull(is_cancelled, 'No') = 'No'", self.doc.name)
|
||||||
return sle and 'exists' or 'not exists'
|
return sle and 'exists' or 'not exists'
|
||||||
|
|
||||||
def on_rename(self,newdn,olddn):
|
def on_rename(self,newdn,olddn):
|
||||||
sql("update tabItem set item_code = %s where name = %s", (newdn, olddn))
|
sql("update tabItem set item_code = %s where name = %s", (newdn, olddn))
|
||||||
|
|
||||||
|
@ -5,14 +5,14 @@
|
|||||||
{
|
{
|
||||||
'creation': '2010-08-08 17:09:05',
|
'creation': '2010-08-08 17:09:05',
|
||||||
'docstatus': 0,
|
'docstatus': 0,
|
||||||
'modified': '2011-05-30 15:22:32',
|
'modified': '2011-08-18 13:03:31',
|
||||||
'modified_by': 'Administrator',
|
'modified_by': 'Administrator',
|
||||||
'owner': 'Administrator'
|
'owner': 'Administrator'
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocType
|
# These values are common for all DocType
|
||||||
{
|
{
|
||||||
'_last_update': '1309508838',
|
'_last_update': '1313651083',
|
||||||
'allow_attach': 1,
|
'allow_attach': 1,
|
||||||
'allow_trash': 1,
|
'allow_trash': 1,
|
||||||
'autoname': 'field:item_code',
|
'autoname': 'field:item_code',
|
||||||
@ -22,13 +22,13 @@
|
|||||||
'max_attachments': 1,
|
'max_attachments': 1,
|
||||||
'module': 'Stock',
|
'module': 'Stock',
|
||||||
'name': '__common__',
|
'name': '__common__',
|
||||||
'search_fields': 'item_name,description,item_group',
|
'search_fields': 'item_name,description,item_group,customer_code',
|
||||||
'section_style': 'Tray',
|
'section_style': 'Tray',
|
||||||
'server_code_error': ' ',
|
'server_code_error': ' ',
|
||||||
'show_in_menu': 0,
|
'show_in_menu': 0,
|
||||||
'subject': '%(item_name)s',
|
'subject': '%(item_name)s',
|
||||||
'tag_fields': 'item_group',
|
'tag_fields': 'item_group',
|
||||||
'version': 153
|
'version': 161
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocField
|
# These values are common for all DocField
|
||||||
@ -42,14 +42,12 @@
|
|||||||
|
|
||||||
# These values are common for all DocPerm
|
# These values are common for all DocPerm
|
||||||
{
|
{
|
||||||
'amend': 0,
|
|
||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'name': '__common__',
|
'name': '__common__',
|
||||||
'parent': 'Item',
|
'parent': 'Item',
|
||||||
'parentfield': 'permissions',
|
'parentfield': 'permissions',
|
||||||
'parenttype': 'DocType',
|
'parenttype': 'DocType',
|
||||||
'read': 1,
|
'read': 1
|
||||||
'submit': 0
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocType, Item
|
# DocType, Item
|
||||||
@ -60,44 +58,53 @@
|
|||||||
|
|
||||||
# DocPerm
|
# DocPerm
|
||||||
{
|
{
|
||||||
'cancel': 0,
|
'amend': 0,
|
||||||
'create': 0,
|
|
||||||
'doctype': 'DocPerm',
|
|
||||||
'permlevel': 0,
|
|
||||||
'role': 'Material User',
|
|
||||||
'write': 0
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocPerm
|
|
||||||
{
|
|
||||||
'cancel': 0,
|
'cancel': 0,
|
||||||
'create': 0,
|
'create': 0,
|
||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'idx': 1,
|
'idx': 1,
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
'role': 'Material Manager',
|
'role': 'Material Manager',
|
||||||
|
'submit': 0,
|
||||||
'write': 0
|
'write': 0
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocPerm
|
# DocPerm
|
||||||
{
|
{
|
||||||
|
'amend': 0,
|
||||||
'cancel': 0,
|
'cancel': 0,
|
||||||
'create': 0,
|
'create': 0,
|
||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'idx': 2,
|
'idx': 2,
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'role': 'Material Manager',
|
'role': 'Material Manager',
|
||||||
|
'submit': 0,
|
||||||
'write': 0
|
'write': 0
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocPerm
|
# DocPerm
|
||||||
{
|
{
|
||||||
|
'amend': 0,
|
||||||
'cancel': 0,
|
'cancel': 0,
|
||||||
'create': 0,
|
'create': 0,
|
||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'idx': 3,
|
'idx': 3,
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
'role': 'Material User',
|
'role': 'Material User',
|
||||||
|
'submit': 0,
|
||||||
|
'write': 0
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocPerm
|
||||||
|
{
|
||||||
|
'amend': 0,
|
||||||
|
'cancel': 0,
|
||||||
|
'create': 0,
|
||||||
|
'doctype': 'DocPerm',
|
||||||
|
'idx': 4,
|
||||||
|
'permlevel': 0,
|
||||||
|
'role': 'Material User',
|
||||||
|
'submit': 0,
|
||||||
'write': 0
|
'write': 0
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -114,7 +121,6 @@
|
|||||||
|
|
||||||
# DocPerm
|
# DocPerm
|
||||||
{
|
{
|
||||||
'cancel': 0,
|
|
||||||
'create': 0,
|
'create': 0,
|
||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'idx': 6,
|
'idx': 6,
|
||||||
@ -136,13 +142,10 @@
|
|||||||
|
|
||||||
# DocPerm
|
# DocPerm
|
||||||
{
|
{
|
||||||
'cancel': 0,
|
|
||||||
'create': 0,
|
|
||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'idx': 8,
|
'idx': 8,
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
'role': 'System Manager',
|
'role': 'System Manager'
|
||||||
'write': 0
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
@ -197,7 +200,7 @@
|
|||||||
'oldfieldtype': 'Data',
|
'oldfieldtype': 'Data',
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'reqd': 1,
|
'reqd': 1,
|
||||||
'search_index': 0
|
'search_index': 1
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
@ -241,8 +244,7 @@
|
|||||||
'options': 'Brand',
|
'options': 'Brand',
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'print_hide': 1,
|
'print_hide': 1,
|
||||||
'reqd': 0,
|
'reqd': 0
|
||||||
'search_index': 0
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
@ -285,7 +287,7 @@
|
|||||||
'description': 'Generates HTML to include image (1st attachment) in the description',
|
'description': 'Generates HTML to include image (1st attachment) in the description',
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'Button',
|
'fieldtype': 'Button',
|
||||||
'idx': 12,
|
'idx': 11,
|
||||||
'label': 'Add Image',
|
'label': 'Add Image',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
},
|
},
|
||||||
@ -294,7 +296,7 @@
|
|||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'Section Break',
|
'fieldtype': 'Section Break',
|
||||||
'idx': 13,
|
'idx': 12,
|
||||||
'label': 'Inventory',
|
'label': 'Inventory',
|
||||||
'oldfieldtype': 'Section Break',
|
'oldfieldtype': 'Section Break',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
@ -307,14 +309,13 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'stock_uom',
|
'fieldname': 'stock_uom',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': 'Link',
|
||||||
'idx': 14,
|
'idx': 13,
|
||||||
'label': 'Default UoM',
|
'label': 'Default UoM',
|
||||||
'oldfieldname': 'stock_uom',
|
'oldfieldname': 'stock_uom',
|
||||||
'oldfieldtype': 'Link',
|
'oldfieldtype': 'Link',
|
||||||
'options': 'UOM',
|
'options': 'UOM',
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'reqd': 1,
|
'reqd': 1
|
||||||
'search_index': 0
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
@ -325,7 +326,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'is_stock_item',
|
'fieldname': 'is_stock_item',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'idx': 15,
|
'idx': 14,
|
||||||
'label': 'Is Stock Item',
|
'label': 'Is Stock Item',
|
||||||
'oldfieldname': 'is_stock_item',
|
'oldfieldname': 'is_stock_item',
|
||||||
'oldfieldtype': 'Select',
|
'oldfieldtype': 'Select',
|
||||||
@ -339,7 +340,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'valuation_method',
|
'fieldname': 'valuation_method',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'idx': 16,
|
'idx': 15,
|
||||||
'label': 'Valuation Method',
|
'label': 'Valuation Method',
|
||||||
'oldfieldname': 'valuation_method',
|
'oldfieldname': 'valuation_method',
|
||||||
'oldfieldtype': 'Select',
|
'oldfieldtype': 'Select',
|
||||||
@ -352,13 +353,12 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'default_warehouse',
|
'fieldname': 'default_warehouse',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': 'Link',
|
||||||
'idx': 17,
|
'idx': 16,
|
||||||
'label': 'Default Warehouse',
|
'label': 'Default Warehouse',
|
||||||
'oldfieldname': 'default_warehouse',
|
'oldfieldname': 'default_warehouse',
|
||||||
'oldfieldtype': 'Link',
|
'oldfieldtype': 'Link',
|
||||||
'options': 'Warehouse',
|
'options': 'Warehouse',
|
||||||
'permlevel': 0,
|
'permlevel': 0
|
||||||
'search_index': 0
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
@ -368,7 +368,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'tolerance',
|
'fieldname': 'tolerance',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'idx': 18,
|
'idx': 17,
|
||||||
'label': 'Allowance Percent',
|
'label': 'Allowance Percent',
|
||||||
'oldfieldname': 'tolerance',
|
'oldfieldname': 'tolerance',
|
||||||
'oldfieldtype': 'Currency',
|
'oldfieldtype': 'Currency',
|
||||||
@ -380,7 +380,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 're_order_level',
|
'fieldname': 're_order_level',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'idx': 19,
|
'idx': 18,
|
||||||
'label': 'Re-Order Level',
|
'label': 'Re-Order Level',
|
||||||
'oldfieldname': 're_order_level',
|
'oldfieldname': 're_order_level',
|
||||||
'oldfieldtype': 'Currency',
|
'oldfieldtype': 'Currency',
|
||||||
@ -395,7 +395,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'minimum_inventory_level',
|
'fieldname': 'minimum_inventory_level',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'idx': 20,
|
'idx': 19,
|
||||||
'label': 'Minimum Inventory Level',
|
'label': 'Minimum Inventory Level',
|
||||||
'oldfieldname': 'minimum_inventory_level',
|
'oldfieldname': 'minimum_inventory_level',
|
||||||
'oldfieldtype': 'Currency',
|
'oldfieldtype': 'Currency',
|
||||||
@ -412,7 +412,7 @@
|
|||||||
'fieldname': 'min_order_qty',
|
'fieldname': 'min_order_qty',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'hidden': 0,
|
'hidden': 0,
|
||||||
'idx': 21,
|
'idx': 20,
|
||||||
'label': 'Minimum Order Qty',
|
'label': 'Minimum Order Qty',
|
||||||
'oldfieldname': 'min_order_qty',
|
'oldfieldname': 'min_order_qty',
|
||||||
'oldfieldtype': 'Currency',
|
'oldfieldtype': 'Currency',
|
||||||
@ -423,7 +423,7 @@
|
|||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'Column Break',
|
'fieldtype': 'Column Break',
|
||||||
'idx': 22,
|
'idx': 21,
|
||||||
'oldfieldtype': 'Column Break',
|
'oldfieldtype': 'Column Break',
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'width': '50%'
|
'width': '50%'
|
||||||
@ -437,7 +437,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'is_asset_item',
|
'fieldname': 'is_asset_item',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'idx': 23,
|
'idx': 22,
|
||||||
'label': 'Is Asset Item',
|
'label': 'Is Asset Item',
|
||||||
'oldfieldname': 'is_asset_item',
|
'oldfieldname': 'is_asset_item',
|
||||||
'oldfieldtype': 'Select',
|
'oldfieldtype': 'Select',
|
||||||
@ -453,7 +453,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'has_batch_no',
|
'fieldname': 'has_batch_no',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'idx': 24,
|
'idx': 23,
|
||||||
'label': 'Has Batch No',
|
'label': 'Has Batch No',
|
||||||
'oldfieldname': 'has_batch_no',
|
'oldfieldname': 'has_batch_no',
|
||||||
'oldfieldtype': 'Select',
|
'oldfieldtype': 'Select',
|
||||||
@ -470,7 +470,8 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'has_serial_no',
|
'fieldname': 'has_serial_no',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'idx': 25,
|
'idx': 24,
|
||||||
|
'in_filter': 1,
|
||||||
'label': 'Has Serial No',
|
'label': 'Has Serial No',
|
||||||
'oldfieldname': 'has_serial_no',
|
'oldfieldname': 'has_serial_no',
|
||||||
'oldfieldtype': 'Select',
|
'oldfieldtype': 'Select',
|
||||||
@ -484,7 +485,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'warranty_period',
|
'fieldname': 'warranty_period',
|
||||||
'fieldtype': 'Data',
|
'fieldtype': 'Data',
|
||||||
'idx': 26,
|
'idx': 25,
|
||||||
'label': 'Warranty Period (in days)',
|
'label': 'Warranty Period (in days)',
|
||||||
'oldfieldname': 'warranty_period',
|
'oldfieldname': 'warranty_period',
|
||||||
'oldfieldtype': 'Data',
|
'oldfieldtype': 'Data',
|
||||||
@ -496,19 +497,50 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'end_of_life',
|
'fieldname': 'end_of_life',
|
||||||
'fieldtype': 'Date',
|
'fieldtype': 'Date',
|
||||||
'idx': 27,
|
'idx': 26,
|
||||||
'label': 'End of Life',
|
'label': 'End of Life',
|
||||||
'oldfieldname': 'end_of_life',
|
'oldfieldname': 'end_of_life',
|
||||||
'oldfieldtype': 'Date',
|
'oldfieldtype': 'Date',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
},
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': 'DocField',
|
||||||
|
'fieldname': 'nett_weight',
|
||||||
|
'fieldtype': 'Float',
|
||||||
|
'idx': 27,
|
||||||
|
'label': 'Nett Weight',
|
||||||
|
'permlevel': 0
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': 'DocField',
|
||||||
|
'fieldname': 'gross_weight',
|
||||||
|
'fieldtype': 'Float',
|
||||||
|
'idx': 28,
|
||||||
|
'label': 'Gross Weight',
|
||||||
|
'permlevel': 0
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': 'DocField',
|
||||||
|
'fieldname': 'weight_uom',
|
||||||
|
'fieldtype': 'Link',
|
||||||
|
'idx': 29,
|
||||||
|
'label': 'Weight UOM',
|
||||||
|
'options': 'UOM',
|
||||||
|
'permlevel': 0
|
||||||
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': 'White:FFF',
|
'colour': 'White:FFF',
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'Section Break',
|
'fieldtype': 'Section Break',
|
||||||
'idx': 28,
|
'idx': 30,
|
||||||
'label': 'Purchase Details',
|
'label': 'Purchase Details',
|
||||||
'oldfieldtype': 'Section Break',
|
'oldfieldtype': 'Section Break',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
@ -522,7 +554,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'is_purchase_item',
|
'fieldname': 'is_purchase_item',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'idx': 29,
|
'idx': 31,
|
||||||
'label': 'Is Purchase Item',
|
'label': 'Is Purchase Item',
|
||||||
'oldfieldname': 'is_purchase_item',
|
'oldfieldname': 'is_purchase_item',
|
||||||
'oldfieldtype': 'Select',
|
'oldfieldtype': 'Select',
|
||||||
@ -538,7 +570,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'lead_time_days',
|
'fieldname': 'lead_time_days',
|
||||||
'fieldtype': 'Int',
|
'fieldtype': 'Int',
|
||||||
'idx': 30,
|
'idx': 32,
|
||||||
'label': 'Lead Time Days',
|
'label': 'Lead Time Days',
|
||||||
'no_copy': 1,
|
'no_copy': 1,
|
||||||
'oldfieldname': 'lead_time_days',
|
'oldfieldname': 'lead_time_days',
|
||||||
@ -553,13 +585,12 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'purchase_account',
|
'fieldname': 'purchase_account',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': 'Link',
|
||||||
'idx': 31,
|
'idx': 33,
|
||||||
'label': 'Default Expense Account',
|
'label': 'Default Expense Account',
|
||||||
'oldfieldname': 'purchase_account',
|
'oldfieldname': 'purchase_account',
|
||||||
'oldfieldtype': 'Link',
|
'oldfieldtype': 'Link',
|
||||||
'options': 'Account',
|
'options': 'Account',
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'search_index': 0,
|
|
||||||
'trigger': 'Client'
|
'trigger': 'Client'
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -570,13 +601,12 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'cost_center',
|
'fieldname': 'cost_center',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': 'Link',
|
||||||
'idx': 32,
|
'idx': 34,
|
||||||
'label': 'Default Cost Center',
|
'label': 'Default Cost Center',
|
||||||
'oldfieldname': 'cost_center',
|
'oldfieldname': 'cost_center',
|
||||||
'oldfieldtype': 'Link',
|
'oldfieldtype': 'Link',
|
||||||
'options': 'Cost Center',
|
'options': 'Cost Center',
|
||||||
'permlevel': 0,
|
'permlevel': 0
|
||||||
'search_index': 0
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
@ -586,7 +616,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'buying_cost',
|
'fieldname': 'buying_cost',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'idx': 33,
|
'idx': 35,
|
||||||
'label': 'Buying Cost',
|
'label': 'Buying Cost',
|
||||||
'no_copy': 1,
|
'no_copy': 1,
|
||||||
'oldfieldname': 'buying_cost',
|
'oldfieldname': 'buying_cost',
|
||||||
@ -600,7 +630,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'last_purchase_rate',
|
'fieldname': 'last_purchase_rate',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'idx': 34,
|
'idx': 36,
|
||||||
'label': 'Last Purchase Rate',
|
'label': 'Last Purchase Rate',
|
||||||
'no_copy': 1,
|
'no_copy': 1,
|
||||||
'oldfieldname': 'last_purchase_rate',
|
'oldfieldname': 'last_purchase_rate',
|
||||||
@ -613,7 +643,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'standard_rate',
|
'fieldname': 'standard_rate',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'idx': 35,
|
'idx': 37,
|
||||||
'label': 'Standard Rate',
|
'label': 'Standard Rate',
|
||||||
'oldfieldname': 'standard_rate',
|
'oldfieldname': 'standard_rate',
|
||||||
'oldfieldtype': 'Currency',
|
'oldfieldtype': 'Currency',
|
||||||
@ -624,7 +654,7 @@
|
|||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'Column Break',
|
'fieldtype': 'Column Break',
|
||||||
'idx': 36,
|
'idx': 38,
|
||||||
'oldfieldtype': 'Column Break',
|
'oldfieldtype': 'Column Break',
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'width': '50%'
|
'width': '50%'
|
||||||
@ -635,7 +665,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'uom_conversion_details',
|
'fieldname': 'uom_conversion_details',
|
||||||
'fieldtype': 'Table',
|
'fieldtype': 'Table',
|
||||||
'idx': 37,
|
'idx': 39,
|
||||||
'label': 'UOM Conversion Details',
|
'label': 'UOM Conversion Details',
|
||||||
'oldfieldname': 'uom_conversion_details',
|
'oldfieldname': 'uom_conversion_details',
|
||||||
'oldfieldtype': 'Table',
|
'oldfieldtype': 'Table',
|
||||||
@ -647,7 +677,7 @@
|
|||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'Section Break',
|
'fieldtype': 'Section Break',
|
||||||
'idx': 38,
|
'idx': 40,
|
||||||
'label': 'Sales Details',
|
'label': 'Sales Details',
|
||||||
'oldfieldtype': 'Section Break',
|
'oldfieldtype': 'Section Break',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
@ -661,7 +691,8 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'is_sales_item',
|
'fieldname': 'is_sales_item',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'idx': 39,
|
'idx': 41,
|
||||||
|
'in_filter': 1,
|
||||||
'label': 'Is Sales Item',
|
'label': 'Is Sales Item',
|
||||||
'oldfieldname': 'is_sales_item',
|
'oldfieldname': 'is_sales_item',
|
||||||
'oldfieldtype': 'Select',
|
'oldfieldtype': 'Select',
|
||||||
@ -678,7 +709,8 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'is_service_item',
|
'fieldname': 'is_service_item',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'idx': 40,
|
'idx': 42,
|
||||||
|
'in_filter': 1,
|
||||||
'label': 'Is Service Item',
|
'label': 'Is Service Item',
|
||||||
'oldfieldname': 'is_service_item',
|
'oldfieldname': 'is_service_item',
|
||||||
'oldfieldtype': 'Select',
|
'oldfieldtype': 'Select',
|
||||||
@ -695,7 +727,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'is_sample_item',
|
'fieldname': 'is_sample_item',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'idx': 41,
|
'idx': 43,
|
||||||
'label': 'Allow Samples',
|
'label': 'Allow Samples',
|
||||||
'oldfieldname': 'is_sample_item',
|
'oldfieldname': 'is_sample_item',
|
||||||
'oldfieldtype': 'Select',
|
'oldfieldtype': 'Select',
|
||||||
@ -709,7 +741,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'max_discount',
|
'fieldname': 'max_discount',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'idx': 42,
|
'idx': 44,
|
||||||
'label': 'Max Discount (%)',
|
'label': 'Max Discount (%)',
|
||||||
'oldfieldname': 'max_discount',
|
'oldfieldname': 'max_discount',
|
||||||
'oldfieldtype': 'Currency',
|
'oldfieldtype': 'Currency',
|
||||||
@ -721,11 +753,10 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'default_income_account',
|
'fieldname': 'default_income_account',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': 'Link',
|
||||||
'idx': 43,
|
'idx': 45,
|
||||||
'label': 'Default Income Account',
|
'label': 'Default Income Account',
|
||||||
'options': 'Account',
|
'options': 'Account',
|
||||||
'permlevel': 0,
|
'permlevel': 0
|
||||||
'search_index': 0
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
@ -733,11 +764,10 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'default_sales_cost_center',
|
'fieldname': 'default_sales_cost_center',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': 'Link',
|
||||||
'idx': 44,
|
'idx': 46,
|
||||||
'label': 'Cost Center',
|
'label': 'Cost Center',
|
||||||
'options': 'Cost Center',
|
'options': 'Cost Center',
|
||||||
'permlevel': 0,
|
'permlevel': 0
|
||||||
'search_index': 0
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
@ -746,7 +776,7 @@
|
|||||||
'fieldname': 'sales_rate',
|
'fieldname': 'sales_rate',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'hidden': 1,
|
'hidden': 1,
|
||||||
'idx': 45,
|
'idx': 47,
|
||||||
'label': 'Sales Rate',
|
'label': 'Sales Rate',
|
||||||
'oldfieldname': 'sales_rate',
|
'oldfieldname': 'sales_rate',
|
||||||
'oldfieldtype': 'Currency',
|
'oldfieldtype': 'Currency',
|
||||||
@ -757,7 +787,7 @@
|
|||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'Column Break',
|
'fieldtype': 'Column Break',
|
||||||
'idx': 46,
|
'idx': 48,
|
||||||
'oldfieldtype': 'Column Break',
|
'oldfieldtype': 'Column Break',
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'width': '50%'
|
'width': '50%'
|
||||||
@ -770,7 +800,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'ref_rate_details',
|
'fieldname': 'ref_rate_details',
|
||||||
'fieldtype': 'Table',
|
'fieldtype': 'Table',
|
||||||
'idx': 47,
|
'idx': 49,
|
||||||
'label': 'Ref Rate Details',
|
'label': 'Ref Rate Details',
|
||||||
'oldfieldname': 'ref_rate_details',
|
'oldfieldname': 'ref_rate_details',
|
||||||
'oldfieldtype': 'Table',
|
'oldfieldtype': 'Table',
|
||||||
@ -778,11 +808,23 @@
|
|||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
},
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'description': 'For the convenience of customers, these codes can be used in print formats like Invoices and Delivery Notes',
|
||||||
|
'doctype': 'DocField',
|
||||||
|
'fieldname': 'item_customer_details',
|
||||||
|
'fieldtype': 'Table',
|
||||||
|
'idx': 50,
|
||||||
|
'label': 'Customer Codes',
|
||||||
|
'options': 'Item Customer Detail',
|
||||||
|
'permlevel': 0
|
||||||
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'Section Break',
|
'fieldtype': 'Section Break',
|
||||||
'idx': 48,
|
'idx': 51,
|
||||||
'label': 'Item Tax',
|
'label': 'Item Tax',
|
||||||
'oldfieldtype': 'Section Break',
|
'oldfieldtype': 'Section Break',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
@ -793,7 +835,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'item_tax',
|
'fieldname': 'item_tax',
|
||||||
'fieldtype': 'Table',
|
'fieldtype': 'Table',
|
||||||
'idx': 49,
|
'idx': 52,
|
||||||
'label': 'Item Tax1',
|
'label': 'Item Tax1',
|
||||||
'oldfieldname': 'item_tax',
|
'oldfieldname': 'item_tax',
|
||||||
'oldfieldtype': 'Table',
|
'oldfieldtype': 'Table',
|
||||||
@ -805,7 +847,7 @@
|
|||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'Section Break',
|
'fieldtype': 'Section Break',
|
||||||
'idx': 50,
|
'idx': 53,
|
||||||
'label': 'Inspection Criteria',
|
'label': 'Inspection Criteria',
|
||||||
'oldfieldtype': 'Section Break',
|
'oldfieldtype': 'Section Break',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
@ -817,7 +859,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'inspection_required',
|
'fieldname': 'inspection_required',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'idx': 51,
|
'idx': 54,
|
||||||
'label': 'Inspection Required',
|
'label': 'Inspection Required',
|
||||||
'no_copy': 0,
|
'no_copy': 0,
|
||||||
'oldfieldname': 'inspection_required',
|
'oldfieldname': 'inspection_required',
|
||||||
@ -832,7 +874,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'item_specification_details',
|
'fieldname': 'item_specification_details',
|
||||||
'fieldtype': 'Table',
|
'fieldtype': 'Table',
|
||||||
'idx': 52,
|
'idx': 55,
|
||||||
'label': 'Item Specification Detail',
|
'label': 'Item Specification Detail',
|
||||||
'oldfieldname': 'item_specification_details',
|
'oldfieldname': 'item_specification_details',
|
||||||
'oldfieldtype': 'Table',
|
'oldfieldtype': 'Table',
|
||||||
@ -844,7 +886,7 @@
|
|||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'Section Break',
|
'fieldtype': 'Section Break',
|
||||||
'idx': 53,
|
'idx': 56,
|
||||||
'label': 'Manufacturing',
|
'label': 'Manufacturing',
|
||||||
'oldfieldtype': 'Section Break',
|
'oldfieldtype': 'Section Break',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
@ -858,7 +900,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'is_manufactured_item',
|
'fieldname': 'is_manufactured_item',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'idx': 54,
|
'idx': 57,
|
||||||
'label': 'Allow Bill of Materials',
|
'label': 'Allow Bill of Materials',
|
||||||
'oldfieldname': 'is_manufactured_item',
|
'oldfieldname': 'is_manufactured_item',
|
||||||
'oldfieldtype': 'Select',
|
'oldfieldtype': 'Select',
|
||||||
@ -873,14 +915,13 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'default_bom',
|
'fieldname': 'default_bom',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': 'Link',
|
||||||
'idx': 55,
|
'idx': 58,
|
||||||
'label': 'Default BOM',
|
'label': 'Default BOM',
|
||||||
'no_copy': 1,
|
'no_copy': 1,
|
||||||
'oldfieldname': 'default_bom',
|
'oldfieldname': 'default_bom',
|
||||||
'oldfieldtype': 'Link',
|
'oldfieldtype': 'Link',
|
||||||
'options': 'Bill Of Materials',
|
'options': 'Bill Of Materials',
|
||||||
'permlevel': 1,
|
'permlevel': 1
|
||||||
'search_index': 0
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
@ -891,7 +932,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'is_pro_applicable',
|
'fieldname': 'is_pro_applicable',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'idx': 56,
|
'idx': 59,
|
||||||
'label': 'Allow Production Order',
|
'label': 'Allow Production Order',
|
||||||
'oldfieldname': 'is_pro_applicable',
|
'oldfieldname': 'is_pro_applicable',
|
||||||
'oldfieldtype': 'Select',
|
'oldfieldtype': 'Select',
|
||||||
@ -908,7 +949,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'is_sub_contracted_item',
|
'fieldname': 'is_sub_contracted_item',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'idx': 57,
|
'idx': 60,
|
||||||
'label': 'Is Sub Contracted Item',
|
'label': 'Is Sub Contracted Item',
|
||||||
'oldfieldname': 'is_sub_contracted_item',
|
'oldfieldname': 'is_sub_contracted_item',
|
||||||
'oldfieldtype': 'Select',
|
'oldfieldtype': 'Select',
|
||||||
@ -923,9 +964,23 @@
|
|||||||
'fieldname': 'file_list',
|
'fieldname': 'file_list',
|
||||||
'fieldtype': 'Text',
|
'fieldtype': 'Text',
|
||||||
'hidden': 1,
|
'hidden': 1,
|
||||||
'idx': 59,
|
'idx': 61,
|
||||||
'label': 'File List',
|
'label': 'File List',
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'print_hide': 1
|
'print_hide': 1
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': 'DocField',
|
||||||
|
'fieldname': 'customer_code',
|
||||||
|
'fieldtype': 'Data',
|
||||||
|
'hidden': 1,
|
||||||
|
'idx': 62,
|
||||||
|
'in_filter': 1,
|
||||||
|
'label': 'Customer Code',
|
||||||
|
'no_copy': 1,
|
||||||
|
'permlevel': 0,
|
||||||
|
'print_hide': 1
|
||||||
}
|
}
|
||||||
]
|
]
|
0
stock/doctype/item_customer_detail/__init__.py
Normal file
0
stock/doctype/item_customer_detail/__init__.py
Normal file
73
stock/doctype/item_customer_detail/item_customer_detail.txt
Normal file
73
stock/doctype/item_customer_detail/item_customer_detail.txt
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
# DocType, Item Customer Detail
|
||||||
|
[
|
||||||
|
|
||||||
|
# These values are common in all dictionaries
|
||||||
|
{
|
||||||
|
'creation': '2011-08-18 11:38:43',
|
||||||
|
'docstatus': 0,
|
||||||
|
'modified': '2011-08-18 11:54:36',
|
||||||
|
'modified_by': 'Administrator',
|
||||||
|
'owner': 'Administrator'
|
||||||
|
},
|
||||||
|
|
||||||
|
# These values are common for all DocType
|
||||||
|
{
|
||||||
|
'autoname': 'ITEMCUST/.#####',
|
||||||
|
'colour': 'White:FFF',
|
||||||
|
'description': 'For the convenience of customers, these codes can be used in print formats like Invoices and Delivery Notes',
|
||||||
|
'doctype': 'DocType',
|
||||||
|
'in_create': 1,
|
||||||
|
'istable': 1,
|
||||||
|
'module': 'Stock',
|
||||||
|
'name': '__common__',
|
||||||
|
'read_only': 0,
|
||||||
|
'section_style': 'Tray',
|
||||||
|
'server_code_error': ' ',
|
||||||
|
'show_in_menu': 0,
|
||||||
|
'version': 7
|
||||||
|
},
|
||||||
|
|
||||||
|
# These values are common for all DocField
|
||||||
|
{
|
||||||
|
'doctype': 'DocField',
|
||||||
|
'in_filter': 1,
|
||||||
|
'name': '__common__',
|
||||||
|
'parent': 'Item Customer Detail',
|
||||||
|
'parentfield': 'fields',
|
||||||
|
'parenttype': 'DocType',
|
||||||
|
'permlevel': 0,
|
||||||
|
'reqd': 1,
|
||||||
|
'search_index': 1
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocType, Item Customer Detail
|
||||||
|
{
|
||||||
|
'doctype': 'DocType',
|
||||||
|
'name': 'Item Customer Detail'
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': 'DocField',
|
||||||
|
'fieldname': 'customer_name',
|
||||||
|
'fieldtype': 'Link',
|
||||||
|
'idx': 1,
|
||||||
|
'label': 'Customer Name',
|
||||||
|
'oldfieldname': 'price_list_name',
|
||||||
|
'oldfieldtype': 'Select',
|
||||||
|
'options': 'Customer',
|
||||||
|
'width': '180px'
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': 'DocField',
|
||||||
|
'fieldname': 'ref_code',
|
||||||
|
'fieldtype': 'Data',
|
||||||
|
'idx': 2,
|
||||||
|
'label': 'Ref Code',
|
||||||
|
'oldfieldname': 'ref_rate',
|
||||||
|
'oldfieldtype': 'Currency',
|
||||||
|
'width': '120px'
|
||||||
|
}
|
||||||
|
]
|
Loading…
x
Reference in New Issue
Block a user