From 796505a83e8e4ac58b9e5002377930cb9dda8338 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 1 May 2012 16:26:16 +0530 Subject: [PATCH] field arrangement in purchase and stock cycle --- .../purchase_invoice/purchase_invoice.js | 22 +- .../purchase_invoice/purchase_invoice.txt | 367 ++++---- .../doctype/purchase_order/purchase_order.js | 12 +- .../doctype/purchase_order/purchase_order.txt | 366 ++++---- .../purchase_request/purchase_request.js | 1 + .../purchase_request/purchase_request.txt | 199 ++--- .../purchase_receipt/purchase_receipt.js | 20 +- .../purchase_receipt/purchase_receipt.txt | 568 +++++++------ .../stock/doctype/stock_entry/stock_entry.js | 23 +- .../stock/doctype/stock_entry/stock_entry.txt | 785 +++++++++--------- .../stock_entry_detail/stock_entry_detail.txt | 222 ++--- 11 files changed, 1312 insertions(+), 1273 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 7a6ae1b3f71..428e05096f8 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -23,21 +23,12 @@ wn.require('erpnext/buying/doctype/purchase_common/purchase_common.js'); // On Load // -------- cur_frm.cscript.onload = function(doc,dt,dn) { - var cp = wn.control_panel; - if(!doc.voucher_date) set_multiple(dt,dn,{voucher_date:get_today()}); if(!doc.posting_date) set_multiple(dt,dn,{posting_date:get_today()}); - - if(cp.country == 'India') { - unhide_field(['tds','tds_applicable','tds_category','get_tds','tax_code','rate','ded_amount','total_tds_on_voucher','tds_amount_on_advance']); - } - else { - hide_field(['tds','tds_applicable','tds_category','get_tds','tax_code','rate','ded_amount','total_tds_on_voucher','tds_amount_on_advance']); - } - if(doc.__islocal){ - hide_field(['supplier_address', 'contact_person', 'supplier_name', 'address_display', 'contact_display', 'contact_mobile', 'contact_email']); - } + tds_flds = ['tds','tds_applicable','tds_category','get_tds','tax_code','rate','ded_amount','total_tds_on_voucher','tds_amount_on_advance']; + if(wn.control_panel.country == 'India') unhide_field(tds_flds); + else hide_field(tds_flds); } @@ -60,6 +51,7 @@ cur_frm.cscript.onload_post_render = function(doc, dt, dn) { cur_frm.cscript.refresh = function(doc, dt, dn) { cur_frm.clear_custom_buttons(); + erpnext.hide_naming_series(); if (!cur_frm.cscript.is_onload) cur_frm.cscript.dynamic_label(doc, dt, dn); @@ -99,7 +91,7 @@ cur_frm.cscript.supplier = function(doc,dt,dn) { } if(doc.supplier) get_server_fields('get_default_supplier_address', JSON.stringify({supplier: doc.supplier}),'', doc, dt, dn, 1,callback); - if(doc.supplier) unhide_field(['supplier_address','contact_person','supplier_name','address_display','contact_display','contact_mobile','contact_email']); + if(doc.supplier) unhide_field(['supplier_address','contact_person']); } cur_frm.cscript.supplier_address = cur_frm.cscript.contact_person = function(doc,dt,dn) { @@ -124,7 +116,7 @@ cur_frm.cscript.credit_to = function(doc,dt,dn) { var callback = function(r,rt) { var doc = locals[cur_frm.doctype][cur_frm.docname]; if(doc.supplier) get_server_fields('get_default_supplier_address', JSON.stringify({supplier: doc.supplier}),'', doc, dt, dn, 1); - if(doc.supplier) unhide_field(['supplier_address','contact_person','supplier_name','address_display','contact_display','contact_mobile','contact_email']); + if(doc.supplier) unhide_field(['supplier_address','contact_person']); cur_frm.refresh(); } @@ -177,7 +169,7 @@ cur_frm.cscript.recalculate = function(doc, cdt, cdn) { // ----------------- cur_frm.cscript.get_items = function(doc, dt, dn) { var callback = function(r,rt) { - unhide_field(['supplier_address', 'contact_person', 'supplier_name', 'address_display', 'contact_display', 'contact_mobile','contact_email']); + unhide_field(['supplier_address', 'contact_person']); refresh_many(['credit_to','supplier','supplier_address','contact_person','supplier_name', 'address_display', 'contact_display','contact_mobile', 'contact_email','entries', 'purchase_receipt_main', 'purchase_order_main', 'purchase_tax_details']); } $c_obj(make_doclist(dt,dn),'pull_details','',callback); diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.txt b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.txt index 18bd7898c48..586fef1ddf1 100755 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.txt +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.txt @@ -5,7 +5,7 @@ { 'creation': '2012-04-13 11:56:17', 'docstatus': 0, - 'modified': '2012-04-27 11:21:21', + 'modified': '2012-05-01 15:03:52', 'modified_by': u'Administrator', 'owner': u'Administrator' }, @@ -186,47 +186,12 @@ 'trigger': u'Client' }, - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'supplier', - 'fieldtype': u'Link', - 'hidden': 0, - 'label': u'Supplier', - 'oldfieldname': u'supplier', - 'oldfieldtype': u'Link', - 'options': u'Supplier', - 'permlevel': 0, - 'print_hide': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'supplier_address', - 'fieldtype': u'Link', - 'label': u'Supplier Address', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'contact_person', - 'fieldtype': u'Link', - 'label': u'Contact Person', - 'options': u'Contact', - 'permlevel': 0, - 'print_hide': 1 - }, - # DocField { 'doctype': u'DocField', 'fieldname': u'supplier_name', 'fieldtype': u'Text', + 'hidden': 1, 'label': u'Name', 'oldfieldname': u'supplier_name', 'oldfieldtype': u'Data', @@ -238,6 +203,7 @@ 'doctype': u'DocField', 'fieldname': u'address_display', 'fieldtype': u'Small Text', + 'hidden': 1, 'label': u'Address', 'permlevel': 1 }, @@ -247,6 +213,7 @@ 'doctype': u'DocField', 'fieldname': u'contact_display', 'fieldtype': u'Small Text', + 'hidden': 1, 'label': u'Contact', 'permlevel': 1 }, @@ -256,6 +223,7 @@ 'doctype': u'DocField', 'fieldname': u'contact_mobile', 'fieldtype': u'Text', + 'hidden': 1, 'label': u'Mobile No', 'permlevel': 1 }, @@ -265,6 +233,7 @@ 'doctype': u'DocField', 'fieldname': u'contact_email', 'fieldtype': u'Text', + 'hidden': 1, 'label': u'Contact Email', 'permlevel': 1, 'print_hide': 1 @@ -299,21 +268,6 @@ 'search_index': 1 }, - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'due_date', - 'fieldtype': u'Date', - 'in_filter': 1, - 'label': u'Due Date', - 'no_copy': 0, - 'oldfieldname': u'due_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'print_hide': 0, - 'search_index': 1 - }, - # DocField { 'description': u'If not applicable please enter: NA', @@ -345,46 +299,6 @@ 'search_index': 1 }, - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'amended_from', - 'fieldtype': u'Link', - 'label': u'Amended From', - 'no_copy': 1, - 'oldfieldname': u'amended_from', - 'oldfieldtype': u'Link', - 'options': u'Purchase Invoice', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'description': u'The date at which current entry is corrected in the system.', - 'doctype': u'DocField', - 'fieldname': u'amendment_date', - 'fieldtype': u'Date', - 'label': u'Amendment Date', - 'no_copy': 1, - 'oldfieldname': u'amendment_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'mode_of_payment', - 'fieldtype': u'Select', - 'label': u'Mode of Payment', - 'oldfieldname': u'mode_of_payment', - 'oldfieldtype': u'Select', - 'options': u'link:Mode of Payment', - 'permlevel': 0 - }, - # DocField { 'doctype': u'DocField', @@ -397,17 +311,69 @@ # DocField { + 'allow_on_submit': 1, 'doctype': u'DocField', - 'fieldname': u'currency', - 'fieldtype': u'Select', - 'label': u'Bill Currency', - 'oldfieldname': u'currency', - 'oldfieldtype': u'Select', - 'options': u'link:Currency', - 'permlevel': 0, + 'fieldname': u'entries', + 'fieldtype': u'Table', + 'label': u'Entries', + 'oldfieldname': u'entries', + 'oldfieldtype': u'Table', + 'options': u'Purchase Invoice Item', + 'permlevel': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'section_break0', + 'fieldtype': u'Section Break', + 'permlevel': 0 + }, + + # DocField + { + 'description': u'Will be calculated automatically when you enter the details', + 'doctype': u'DocField', + 'fieldname': u'net_total', + 'fieldtype': u'Currency', + 'label': u'Net Total', + 'oldfieldname': u'net_total', + 'oldfieldtype': u'Currency', + 'permlevel': 1, 'print_hide': 1 }, + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'net_total_import', + 'fieldtype': u'Currency', + 'label': u'Net Total (Import)', + 'oldfieldname': u'net_total_import', + 'oldfieldtype': u'Currency', + 'permlevel': 1, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'recalculate', + 'fieldtype': u'Button', + 'label': u'Recalculate', + 'oldfieldtype': u'Button', + 'permlevel': 0, + 'trigger': u'Client' + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'column_break2', + 'fieldtype': u'Column Break', + 'permlevel': 0 + }, + # DocField { 'colour': u'White:FFF', @@ -426,9 +392,14 @@ # DocField { 'doctype': u'DocField', - 'fieldname': u'column_break2', - 'fieldtype': u'Column Break', - 'permlevel': 0 + 'fieldname': u'currency', + 'fieldtype': u'Select', + 'label': u'Bill Currency', + 'oldfieldname': u'currency', + 'oldfieldtype': u'Select', + 'options': u'link:Currency', + 'permlevel': 0, + 'print_hide': 1 }, # DocField @@ -475,63 +446,6 @@ 'permlevel': 0 }, - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'section_break0', - 'fieldtype': u'Section Break', - 'permlevel': 0 - }, - - # DocField - { - 'allow_on_submit': 1, - 'doctype': u'DocField', - 'fieldname': u'entries', - 'fieldtype': u'Table', - 'label': u'Entries', - 'oldfieldname': u'entries', - 'oldfieldtype': u'Table', - 'options': u'Purchase Invoice Item', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'recalculate', - 'fieldtype': u'Button', - 'label': u'Recalculate', - 'oldfieldtype': u'Button', - 'permlevel': 0, - 'trigger': u'Client' - }, - - # DocField - { - 'description': u'Will be calculated automatically when you enter the details', - 'doctype': u'DocField', - 'fieldname': u'net_total', - 'fieldtype': u'Currency', - 'label': u'Net Total', - 'oldfieldname': u'net_total', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'net_total_import', - 'fieldtype': u'Currency', - 'label': u'Net Total (Import)', - 'oldfieldname': u'net_total_import', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1 - }, - # DocField { 'colour': u'White:FFF', @@ -616,6 +530,64 @@ 'print_hide': 1 }, + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'contact_section', + 'fieldtype': u'Section Break', + 'label': u'Contact Info', + 'permlevel': 0 + }, + + # DocField + { + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'supplier', + 'fieldtype': u'Link', + 'hidden': 0, + 'label': u'Supplier', + 'oldfieldname': u'supplier', + 'oldfieldtype': u'Link', + 'options': u'Supplier', + 'permlevel': 0, + 'print_hide': 1, + 'trigger': u'Client' + }, + + # DocField + { + 'colour': u'White:FFF', + 'depends_on': u'eval:doc.supplier', + 'doctype': u'DocField', + 'fieldname': u'supplier_address', + 'fieldtype': u'Link', + 'label': u'Supplier Address', + 'permlevel': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'col_break23', + 'fieldtype': u'Column Break', + 'permlevel': 0, + 'width': u'50%' + }, + + # DocField + { + 'colour': u'White:FFF', + 'depends_on': u'eval:doc.supplier', + 'doctype': u'DocField', + 'fieldname': u'contact_person', + 'fieldtype': u'Link', + 'label': u'Contact Person', + 'options': u'Contact', + 'permlevel': 0, + 'print_hide': 1 + }, + # DocField { 'doctype': u'DocField', @@ -669,6 +641,34 @@ 'search_index': 0 }, + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'amended_from', + 'fieldtype': u'Link', + 'label': u'Amended From', + 'no_copy': 1, + 'oldfieldname': u'amended_from', + 'oldfieldtype': u'Link', + 'options': u'Purchase Invoice', + 'permlevel': 1, + 'print_hide': 1 + }, + + # DocField + { + 'description': u'The date at which current entry is corrected in the system.', + 'doctype': u'DocField', + 'fieldname': u'amendment_date', + 'fieldtype': u'Date', + 'label': u'Amendment Date', + 'no_copy': 1, + 'oldfieldname': u'amendment_date', + 'oldfieldtype': u'Date', + 'permlevel': 0, + 'print_hide': 1 + }, + # DocField { 'allow_on_submit': 1, @@ -687,6 +687,33 @@ 'trigger': u'Client' }, + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'due_date', + 'fieldtype': u'Date', + 'in_filter': 1, + 'label': u'Due Date', + 'no_copy': 0, + 'oldfieldname': u'due_date', + 'oldfieldtype': u'Date', + 'permlevel': 0, + 'print_hide': 0, + 'search_index': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'mode_of_payment', + 'fieldtype': u'Select', + 'label': u'Mode of Payment', + 'oldfieldname': u'mode_of_payment', + 'oldfieldtype': u'Select', + 'options': u'link:Mode of Payment', + 'permlevel': 0 + }, + # DocField { 'doctype': u'DocField', @@ -1000,6 +1027,17 @@ 'print_hide': 1 }, + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'column_break8', + 'fieldtype': u'Column Break', + 'oldfieldtype': u'Column Break', + 'permlevel': 0, + 'print_hide': 1, + 'width': u'50%' + }, + # DocField { 'doctype': u'DocField', @@ -1042,17 +1080,6 @@ 'search_index': 1 }, - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'column_break8', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'50%' - }, - # DocField { 'doctype': u'DocField', diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js index 096fec83107..559779e13c4 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order.js @@ -34,12 +34,6 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) { if(!doc.status) set_multiple(cdt,cdn,{status:'Draft'}); if(!doc.transaction_date) set_multiple(cdt,cdn,{transaction_date:get_today()}); if(!doc.is_subcontracted) set_multiple(cdt, cdn, {is_subcontracted:'No'}); - - if(doc.__islocal){ - hide_field(['supplier_name','supplier_address','contact_person','address_display','contact_display','contact_mobile','contact_email']); - } - // defined in purchase_common.js - //cur_frm.cscript.update_item_details(doc, cdt, cdn); } cur_frm.cscript.onload_post_render = function(doc, dt, dn) { @@ -56,6 +50,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { // Show buttons // --------------------------------- cur_frm.clear_custom_buttons(); + erpnext.hide_naming_series(); if (!cur_frm.cscript.is_onload) cur_frm.cscript.dynamic_label(doc, cdt, cdn); @@ -68,6 +63,9 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { if(doc.docstatus == 1 && doc.status == 'Stopped') cur_frm.add_custom_button('Unstop Purchase Order', cur_frm.cscript['Unstop Purchase Order']); + + if(doc.supplier) $(cur_frm.fields_dict.contact_section.row.wrapper).toggle(true); + else $(cur_frm.fields_dict.contact_section.row.wrapper).toggle(false); } @@ -75,7 +73,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { //Supplier cur_frm.cscript.supplier = function(doc,dt,dn) { if(doc.supplier) get_server_fields('get_default_supplier_address', JSON.stringify({supplier: doc.supplier}),'', doc, dt, dn, 1); - if(doc.supplier) unhide_field(['supplier_name','supplier_address','contact_person','address_display','contact_display','contact_mobile','contact_email']); + if(doc.supplier) $(cur_frm.fields_dict.contact_section.row.wrapper).toggle(true); } cur_frm.cscript.supplier_address = cur_frm.cscript.contact_person = function(doc,dt,dn) { diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.txt b/erpnext/buying/doctype/purchase_order/purchase_order.txt index ec6e7768235..592fa18c54c 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.txt +++ b/erpnext/buying/doctype/purchase_order/purchase_order.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2012-04-11 13:17:34', + 'creation': '2012-04-13 11:56:19', 'docstatus': 0, - 'modified': '2012-04-12 18:11:33', + 'modified': '2012-05-01 13:13:28', 'modified_by': u'Administrator', 'owner': u'Administrator' }, @@ -28,7 +28,7 @@ 'server_code_error': u' ', 'show_in_menu': 0, 'subject': u'To %(supplier_name)s on %(transaction_date)s | %(per_received)s% delivered', - 'version': 503 + 'version': 1 }, # These values are common for all DocField @@ -142,7 +142,6 @@ # DocField { 'colour': u'White:FFF', - 'description': u'Enter rates and quantity of items you want to purchase and send the purchase order to your supplier.', 'doctype': u'DocField', 'fieldname': u'basic_info', 'fieldtype': u'Section Break', @@ -198,35 +197,12 @@ 'trigger': u'Client' }, - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'supplier_address', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Supplier Address', - 'options': u'Address', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'contact_person', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Contact Person', - 'options': u'Contact', - 'permlevel': 0, - 'print_hide': 1 - }, - # DocField { 'doctype': u'DocField', 'fieldname': u'supplier_name', 'fieldtype': u'Data', + 'hidden': 1, 'label': u'Name', 'permlevel': 1 }, @@ -236,6 +212,7 @@ 'doctype': u'DocField', 'fieldname': u'address_display', 'fieldtype': u'Small Text', + 'hidden': 1, 'label': u'Address', 'permlevel': 1 }, @@ -245,6 +222,7 @@ 'doctype': u'DocField', 'fieldname': u'contact_display', 'fieldtype': u'Small Text', + 'hidden': 1, 'label': u'Contact', 'permlevel': 1 }, @@ -254,6 +232,7 @@ 'doctype': u'DocField', 'fieldname': u'contact_mobile', 'fieldtype': u'Text', + 'hidden': 1, 'label': u'Mobile No', 'permlevel': 1 }, @@ -263,6 +242,7 @@ 'doctype': u'DocField', 'fieldname': u'contact_email', 'fieldtype': u'Text', + 'hidden': 1, 'label': u'Contact Email', 'permlevel': 1, 'print_hide': 1 @@ -296,85 +276,6 @@ 'trigger': u'Client' }, - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'status', - 'fieldtype': u'Select', - 'in_filter': 1, - 'label': u'Status', - 'no_copy': 1, - 'oldfieldname': u'status', - 'oldfieldtype': u'Select', - 'options': u'\nDraft\nSubmitted\nStopped\nCancelled', - 'permlevel': 1, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Track this Purchase Order against any Project', - 'doctype': u'DocField', - 'fieldname': u'project_name', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Project Name', - 'oldfieldname': u'project_name', - 'oldfieldtype': u'Link', - 'options': u'Project', - 'permlevel': 0, - 'search_index': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'colour': u'White:FFF', - 'depends_on': u'eval:!doc.__islocal', - 'description': u'% of materials received against this Purchase Order', - 'doctype': u'DocField', - 'fieldname': u'per_received', - 'fieldtype': u'Currency', - 'label': u'% Received', - 'no_copy': 1, - 'oldfieldname': u'per_received', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'depends_on': u'eval:!doc.__islocal', - 'description': u'% of materials billed against this Purchase Order.', - 'doctype': u'DocField', - 'fieldname': u'per_billed', - 'fieldtype': u'Currency', - 'label': u'% Billed', - 'no_copy': 1, - 'oldfieldname': u'per_billed', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'default': u'No', - 'doctype': u'DocField', - 'fieldname': u'is_subcontracted', - 'fieldtype': u'Select', - 'label': u'Is Subcontracted', - 'options': u'\nYes\nNo', - 'permlevel': 0, - 'print_hide': 1 - }, - # DocField { 'colour': u'White:FFF', @@ -386,6 +287,29 @@ 'permlevel': 0 }, + # DocField + { + 'allow_on_submit': 1, + 'doctype': u'DocField', + 'fieldname': u'po_details', + 'fieldtype': u'Table', + 'label': u'Purchase Order Items', + 'no_copy': 0, + 'oldfieldname': u'po_details', + 'oldfieldtype': u'Table', + 'options': u'Purchase Order Item', + 'permlevel': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'section_break0', + 'fieldtype': u'Section Break', + 'options': u'Simple', + 'permlevel': 0 + }, + # DocField { 'doctype': u'DocField', @@ -395,6 +319,53 @@ 'width': u'50%' }, + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'net_total', + 'fieldtype': u'Currency', + 'label': u'Net Total*', + 'no_copy': 1, + 'oldfieldname': u'net_total', + 'oldfieldtype': u'Currency', + 'permlevel': 1, + 'print_hide': 1, + 'reqd': 0 + }, + + # DocField + { + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'get_last_purchase_rate', + 'fieldtype': u'Button', + 'label': u'Get Last Purchase Rate', + 'oldfieldtype': u'Button', + 'permlevel': 0, + 'print_hide': 0, + 'trigger': u'Client' + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'recalculate_values', + 'fieldtype': u'Button', + 'label': u'Re-Calculate Values', + 'oldfieldtype': u'Button', + 'permlevel': 0, + 'trigger': u'Client' + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'column_break3', + 'fieldtype': u'Column Break', + 'permlevel': 0, + 'width': u'50%' + }, + # DocField { 'colour': u'White:FFF', @@ -431,15 +402,6 @@ 'trigger': u'Client' }, - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'column_break3', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - # DocField { 'colour': u'White:FFF', @@ -469,66 +431,6 @@ 'permlevel': 0 }, - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'section_break0', - 'fieldtype': u'Section Break', - 'permlevel': 0 - }, - - # DocField - { - 'allow_on_submit': 1, - 'doctype': u'DocField', - 'fieldname': u'po_details', - 'fieldtype': u'Table', - 'label': u'Purchase Order Items', - 'no_copy': 0, - 'oldfieldname': u'po_details', - 'oldfieldtype': u'Table', - 'options': u'Purchase Order Item', - 'permlevel': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'get_last_purchase_rate', - 'fieldtype': u'Button', - 'label': u'Get Last Purchase Rate', - 'oldfieldtype': u'Button', - 'permlevel': 0, - 'print_hide': 0, - 'trigger': u'Client' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'net_total', - 'fieldtype': u'Currency', - 'label': u'Net Total*', - 'no_copy': 1, - 'oldfieldname': u'net_total', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1, - 'reqd': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'recalculate_values', - 'fieldtype': u'Button', - 'label': u'Re-Calculate Values', - 'oldfieldtype': u'Button', - 'permlevel': 0, - 'trigger': u'Client' - }, - # DocField { 'colour': u'White:FFF', @@ -843,6 +745,39 @@ 'permlevel': 0 }, + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'contact_section', + 'fieldtype': u'Section Break', + 'label': u'Contact Info', + 'permlevel': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'supplier_address', + 'fieldtype': u'Link', + 'in_filter': 1, + 'label': u'Supplier Address', + 'options': u'Address', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'contact_person', + 'fieldtype': u'Link', + 'in_filter': 1, + 'label': u'Contact Person', + 'options': u'Contact', + 'permlevel': 0, + 'print_hide': 1 + }, + # DocField { 'doctype': u'DocField', @@ -853,6 +788,36 @@ 'permlevel': 0 }, + # DocField + { + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'status', + 'fieldtype': u'Select', + 'in_filter': 1, + 'label': u'Status', + 'no_copy': 1, + 'oldfieldname': u'status', + 'oldfieldtype': u'Select', + 'options': u'\nDraft\nSubmitted\nStopped\nCancelled', + 'permlevel': 1, + 'print_hide': 1, + 'reqd': 1, + 'search_index': 1 + }, + + # DocField + { + 'default': u'No', + 'doctype': u'DocField', + 'fieldname': u'is_subcontracted', + 'fieldtype': u'Select', + 'label': u'Is Subcontracted', + 'options': u'\nYes\nNo', + 'permlevel': 0, + 'print_hide': 1 + }, + # DocField { 'doctype': u'DocField', @@ -972,6 +937,55 @@ 'width': u'50%' }, + # DocField + { + 'colour': u'White:FFF', + 'description': u'Track this Purchase Order against any Project', + 'doctype': u'DocField', + 'fieldname': u'project_name', + 'fieldtype': u'Link', + 'in_filter': 1, + 'label': u'Project Name', + 'oldfieldname': u'project_name', + 'oldfieldtype': u'Link', + 'options': u'Project', + 'permlevel': 0, + 'search_index': 1, + 'trigger': u'Client' + }, + + # DocField + { + 'colour': u'White:FFF', + 'depends_on': u'eval:!doc.__islocal', + 'description': u'% of materials received against this Purchase Order', + 'doctype': u'DocField', + 'fieldname': u'per_received', + 'fieldtype': u'Currency', + 'label': u'% Received', + 'no_copy': 1, + 'oldfieldname': u'per_received', + 'oldfieldtype': u'Currency', + 'permlevel': 1, + 'print_hide': 1 + }, + + # DocField + { + 'colour': u'White:FFF', + 'depends_on': u'eval:!doc.__islocal', + 'description': u'% of materials billed against this Purchase Order.', + 'doctype': u'DocField', + 'fieldname': u'per_billed', + 'fieldtype': u'Currency', + 'label': u'% Billed', + 'no_copy': 1, + 'oldfieldname': u'per_billed', + 'oldfieldtype': u'Currency', + 'permlevel': 1, + 'print_hide': 1 + }, + # DocField { 'colour': u'White:FFF', diff --git a/erpnext/buying/doctype/purchase_request/purchase_request.js b/erpnext/buying/doctype/purchase_request/purchase_request.js index 8e6654376a6..c29434dee20 100644 --- a/erpnext/buying/doctype/purchase_request/purchase_request.js +++ b/erpnext/buying/doctype/purchase_request/purchase_request.js @@ -47,6 +47,7 @@ cur_frm.cscript.get_item_defaults = function(doc) { //======================= Refresh ===================================== cur_frm.cscript.refresh = function(doc, cdt, cdn) { cur_frm.clear_custom_buttons(); + erpnext.hide_naming_series(); if(doc.docstatus == 1 && doc.status != 'Stopped'){ if(doc.per_ordered < 100) { diff --git a/erpnext/buying/doctype/purchase_request/purchase_request.txt b/erpnext/buying/doctype/purchase_request/purchase_request.txt index 54e932af913..01111431a52 100644 --- a/erpnext/buying/doctype/purchase_request/purchase_request.txt +++ b/erpnext/buying/doctype/purchase_request/purchase_request.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2012-04-11 13:17:39', + 'creation': '2012-04-13 11:56:20', 'docstatus': 0, - 'modified': '2012-04-12 14:36:23', + 'modified': '2012-05-01 13:02:17', 'modified_by': u'Administrator', 'owner': u'Administrator' }, @@ -27,7 +27,7 @@ 'server_code_error': u' ', 'show_in_menu': 0, 'subject': u'%(per_ordered)s% ordered', - 'version': 202 + 'version': 1 }, # These values are common for all DocField @@ -160,17 +160,6 @@ 'print_hide': 1 }, - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'column_break0', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0, - 'print_hide': 0, - 'width': u'50%' - }, - # DocField { 'colour': u'White:FFF', @@ -188,16 +177,6 @@ 'reqd': 1 }, - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'column_break1', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - # DocField { 'colour': u'White:FFF', @@ -228,12 +207,37 @@ 'permlevel': 0 }, + # DocField + { + 'allow_on_submit': 1, + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'indent_details', + 'fieldtype': u'Table', + 'label': u'Purchase Requisition Details', + 'no_copy': 0, + 'oldfieldname': u'indent_details', + 'oldfieldtype': u'Table', + 'options': u'Purchase Request Item', + 'permlevel': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'section_break1', + 'fieldtype': u'Section Break', + 'options': u'Simple', + 'permlevel': 0 + }, + # DocField { 'doctype': u'DocField', 'fieldname': u'column_break4', 'fieldtype': u'Column Break', - 'permlevel': 0 + 'permlevel': 0, + 'width': u'50%' }, # DocField @@ -257,7 +261,8 @@ 'doctype': u'DocField', 'fieldname': u'column_break5', 'fieldtype': u'Column Break', - 'permlevel': 0 + 'permlevel': 0, + 'width': u'50%' }, # DocField @@ -270,30 +275,6 @@ 'permlevel': 0 }, - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'section_break1', - 'fieldtype': u'Section Break', - 'options': u'Simple', - 'permlevel': 0 - }, - - # DocField - { - 'allow_on_submit': 1, - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'indent_details', - 'fieldtype': u'Table', - 'label': u'Purchase Requisition Details', - 'no_copy': 0, - 'oldfieldname': u'indent_details', - 'oldfieldtype': u'Table', - 'options': u'Purchase Request Item', - 'permlevel': 0 - }, - # DocField { 'colour': u'White:FFF', @@ -307,6 +288,16 @@ 'permlevel': 0 }, + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'column_break1', + 'fieldtype': u'Column Break', + 'oldfieldtype': u'Column Break', + 'permlevel': 0, + 'width': u'50%' + }, + # DocField { 'colour': u'White:FFF', @@ -359,6 +350,21 @@ 'width': u'100px' }, + # DocField + { + 'colour': u'White:FFF', + 'description': u'After cancelling the Purchase Requisition, a dialog box will ask you reason for cancellation which will be reflected in this field', + 'doctype': u'DocField', + 'fieldname': u'cancel_reason', + 'fieldtype': u'Data', + 'label': u'Cancel Reason', + 'no_copy': 1, + 'oldfieldname': u'cancel_reason', + 'oldfieldtype': u'Data', + 'permlevel': 1, + 'print_hide': 1 + }, + # DocField { 'doctype': u'DocField', @@ -369,6 +375,20 @@ 'width': u'50%' }, + # DocField + { + 'allow_on_submit': 1, + 'doctype': u'DocField', + 'fieldname': u'letter_head', + 'fieldtype': u'Select', + 'label': u'Letter Head', + 'oldfieldname': u'letter_head', + 'oldfieldtype': u'Select', + 'options': u'link:Letter Head', + 'permlevel': 0, + 'print_hide': 1 + }, + # DocField { 'colour': u'White:FFF', @@ -403,35 +423,6 @@ 'print_hide': 1 }, - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'remark', - 'fieldtype': u'Small Text', - 'label': u'Remarks', - 'no_copy': 1, - 'oldfieldname': u'remark', - 'oldfieldtype': u'Small Text', - 'permlevel': 0, - 'print_hide': 0, - 'width': u'150px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'After cancelling the Purchase Requisition, a dialog box will ask you reason for cancellation which will be reflected in this field', - 'doctype': u'DocField', - 'fieldname': u'cancel_reason', - 'fieldtype': u'Data', - 'label': u'Cancel Reason', - 'no_copy': 1, - 'oldfieldname': u'cancel_reason', - 'oldfieldtype': u'Data', - 'permlevel': 1, - 'print_hide': 1 - }, - # DocField { 'doctype': u'DocField', @@ -461,6 +452,20 @@ 'width': u'100px' }, + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'remark', + 'fieldtype': u'Small Text', + 'label': u'Remarks', + 'no_copy': 1, + 'oldfieldname': u'remark', + 'oldfieldtype': u'Small Text', + 'permlevel': 0, + 'print_hide': 0, + 'width': u'150px' + }, + # DocField { 'description': u'Add Terms and Conditions for the Purchase Requisition. You can also prepare a Terms and Conditions Master and use the Template', @@ -472,20 +477,6 @@ 'permlevel': 0 }, - # DocField - { - 'allow_on_submit': 1, - 'doctype': u'DocField', - 'fieldname': u'letter_head', - 'fieldtype': u'Select', - 'label': u'Letter Head', - 'oldfieldname': u'letter_head', - 'oldfieldtype': u'Select', - 'options': u'link:Letter Head', - 'permlevel': 0, - 'print_hide': 1 - }, - # DocField { 'doctype': u'DocField', @@ -511,18 +502,6 @@ 'permlevel': 0 }, - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'terms_html', - 'fieldtype': u'HTML', - 'label': u'Terms and Conditions HTML', - 'oldfieldtype': u'HTML', - 'options': u'You can add Terms and Notes that will be printed in the Transaction', - 'permlevel': 0, - 'print_hide': 1 - }, - # DocField { 'doctype': u'DocField', @@ -534,16 +513,6 @@ 'permlevel': 0 }, - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'column_break3', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0, - 'print_hide': 1 - }, - # DocField { 'doctype': u'DocField', diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js index e32439ce3b5..fc606a6057e 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js @@ -25,18 +25,10 @@ wn.require('erpnext/setup/doctype/notification_control/notification_control.js') //========================== On Load ================================================================ cur_frm.cscript.onload = function(doc, cdt, cdn) { - if(!doc.fiscal_year && doc.__islocal){ set_default_values(doc);} if (!doc.posting_date) doc.posting_date = dateutil.obj_to_str(new Date()); if (!doc.transaction_date) doc.transaction_date = dateutil.obj_to_str(new Date()); if (!doc.status) doc.status = 'Draft'; - - if(doc.__islocal){ - hide_field(['supplier_name','supplier_address','contact_person','address_display','contact_display','contact_mobile','contact_email']); - } - - if(doc.supplier) unhide_field(['supplier_name','supplier_address','contact_person','address_display','contact_display','contact_mobile','contact_email']); - } cur_frm.cscript.onload_post_render = function(doc, dt, dn) { @@ -54,14 +46,14 @@ cur_frm.cscript.onload_post_render = function(doc, dt, dn) { //========================== Refresh =============================================================== cur_frm.cscript.refresh = function(doc, cdt, cdn) { - - // Unhide Fields in Next Steps - // --------------------------------- cur_frm.clear_custom_buttons(); + + erpnext.hide_naming_series(); + if(doc.supplier) $(cur_frm.fields_dict.contact_section.row.wrapper).toggle(true); + else $(cur_frm.fields_dict.contact_section.row.wrapper).toggle(false); if (!cur_frm.cscript.is_onload) cur_frm.cscript.dynamic_label(doc, cdt, cdn); - if(doc.docstatus == 1){ if (doc.per_billed < 100) cur_frm.add_custom_button('Make Purchase Invoice', cur_frm.cscript['Make Purchase Invoice']); cur_frm.add_custom_button('Send SMS', cur_frm.cscript['Send SMS']); @@ -72,7 +64,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { //Supplier cur_frm.cscript.supplier = function(doc,dt,dn) { if(doc.supplier) get_server_fields('get_default_supplier_address', JSON.stringify({supplier: doc.supplier}),'', doc, dt, dn, 1); - if(doc.supplier) unhide_field(['supplier_name','supplier_address','contact_person','address_display','contact_display','contact_mobile','contact_email']); + if(doc.supplier) $(cur_frm.fields_dict.contact_section.row.wrapper).toggle(true); } cur_frm.cscript.supplier_address = cur_frm.cscript.contact_person = function(doc,dt,dn) { @@ -103,7 +95,7 @@ cur_frm.fields_dict.contact_person.on_new = function(dn) { // ----------------- cur_frm.cscript.pull_purchase_order_details = function(doc, dt, dn) { var callback = function(r,rt) { - unhide_field(['supplier_address','contact_person','supplier_name','address_display', 'contact_display', 'contact_mobile','contact_email']); + //unhide_field(['supplier_address','contact_person','supplier_name','address_display', 'contact_display', 'contact_mobile','contact_email']); refresh_many(['supplier','supplier_address','contact_person', 'supplier_name', 'address_display', 'contact_display','contact_mobile', 'contact_email', 'purchase_receipt_details', 'purchase_tax_details']); } $c_obj(make_doclist(dt,dn),'get_po_details','',callback); diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt index 7b5c82cc694..d6874b62afd 100755 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2012-04-11 13:18:46', + 'creation': '2012-04-13 11:56:36', 'docstatus': 0, - 'modified': '2012-04-12 17:50:10', + 'modified': '2012-05-01 14:34:43', 'modified_by': u'Administrator', 'owner': u'Administrator' }, @@ -28,7 +28,7 @@ 'server_code_error': u' ', 'show_in_menu': 0, 'subject': u'From %(supplier_name)s against %(purchase_order)s on %(posting_date)s', - 'version': 327 + 'version': 1 }, # These values are common for all DocField @@ -142,7 +142,6 @@ # DocField { 'colour': u'White:FFF', - 'description': u'Enter Basic Information about the Purchase Receipt', 'doctype': u'DocField', 'fieldname': u'basic_info', 'fieldtype': u'Section Break', @@ -198,33 +197,12 @@ 'width': u'150px' }, - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'supplier_address', - 'fieldtype': u'Link', - 'label': u'Supplier Address', - 'options': u'Address', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'contact_person', - 'fieldtype': u'Link', - 'label': u'Contact Person', - 'options': u'Contact', - 'permlevel': 0, - 'print_hide': 1 - }, - # DocField { 'doctype': u'DocField', 'fieldname': u'supplier_name', 'fieldtype': u'Data', + 'hidden': 1, 'label': u'Name', 'permlevel': 1 }, @@ -234,6 +212,7 @@ 'doctype': u'DocField', 'fieldname': u'address_display', 'fieldtype': u'Small Text', + 'hidden': 1, 'label': u'Address', 'permlevel': 1 }, @@ -243,6 +222,7 @@ 'doctype': u'DocField', 'fieldname': u'contact_display', 'fieldtype': u'Small Text', + 'hidden': 1, 'label': u'Contact', 'permlevel': 1 }, @@ -252,6 +232,7 @@ 'doctype': u'DocField', 'fieldname': u'contact_mobile', 'fieldtype': u'Text', + 'hidden': 1, 'label': u'Mobile No', 'permlevel': 1 }, @@ -261,42 +242,12 @@ 'doctype': u'DocField', 'fieldname': u'contact_email', 'fieldtype': u'Text', + 'hidden': 1, 'label': u'Contact Email', 'permlevel': 1, 'print_hide': 1 }, - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'amended_from', - 'fieldtype': u'Data', - 'hidden': 1, - 'label': u'Amended From', - 'no_copy': 1, - 'oldfieldname': u'amended_from', - 'oldfieldtype': u'Data', - 'permlevel': 1, - 'print_hide': 1, - 'width': u'150px' - }, - - # DocField - { - 'description': u'The date at which current entry is corrected in the system.', - 'doctype': u'DocField', - 'fieldname': u'amendment_date', - 'fieldtype': u'Date', - 'hidden': 1, - 'label': u'Amendment Date', - 'no_copy': 1, - 'oldfieldname': u'amendment_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'100px' - }, - # DocField { 'doctype': u'DocField', @@ -345,97 +296,6 @@ 'width': u'100px' }, - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'status', - 'fieldtype': u'Select', - 'in_filter': 1, - 'label': u'Status', - 'no_copy': 1, - 'oldfieldname': u'status', - 'oldfieldtype': u'Select', - 'options': u'\nDraft\nSubmitted\nCancelled', - 'permlevel': 1, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 1, - 'width': u'150px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'depends_on': u'eval:!doc.__islocal', - 'description': u'% of materials billed against this Purchase Receipt', - 'doctype': u'DocField', - 'fieldname': u'per_billed', - 'fieldtype': u'Currency', - 'label': u'% Billed', - 'no_copy': 1, - 'oldfieldname': u'per_billed', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'bill_no', - 'fieldtype': u'Data', - 'hidden': 1, - 'label': u'Bill No', - 'oldfieldname': u'bill_no', - 'oldfieldtype': u'Data', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'bill_date', - 'fieldtype': u'Date', - 'hidden': 1, - 'label': u'Bill Date', - 'oldfieldname': u'bill_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'range', - 'fieldtype': u'Data', - 'hidden': 1, - 'label': u'Range', - 'oldfieldname': u'range', - 'oldfieldtype': u'Data', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'default': u'No', - 'description': u'Select "Yes" for sub - contracting items', - 'doctype': u'DocField', - 'fieldname': u'is_subcontracted', - 'fieldtype': u'Select', - 'label': u'Is Subcontracted', - 'oldfieldname': u'is_subcontracted', - 'oldfieldtype': u'Select', - 'options': u'\nYes\nNo', - 'permlevel': 0, - 'print_hide': 1 - }, - # DocField { 'colour': u'White:FFF', @@ -447,6 +307,79 @@ 'permlevel': 0 }, + # DocField + { + 'allow_on_submit': 1, + 'doctype': u'DocField', + 'fieldname': u'purchase_receipt_details', + 'fieldtype': u'Table', + 'label': u'Purchase Receipt Items', + 'oldfieldname': u'purchase_receipt_details', + 'oldfieldtype': u'Table', + 'options': u'Purchase Receipt Item', + 'permlevel': 0, + 'print_hide': 0, + 'reqd': 0 + }, + + # DocField + { + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'section_break0', + 'fieldtype': u'Section Break', + 'oldfieldtype': u'Section Break', + 'options': u'Simple', + 'permlevel': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'net_total', + 'fieldtype': u'Currency', + 'label': u'Net Total', + 'oldfieldname': u'net_total', + 'oldfieldtype': u'Currency', + 'permlevel': 1, + 'print_hide': 1, + 'reqd': 1, + 'width': u'150px' + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'recalculate_values', + 'fieldtype': u'Button', + 'label': u'Re-Calculate Values', + 'oldfieldtype': u'Button', + 'permlevel': 0, + 'trigger': u'Client' + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'get_current_stock', + 'fieldtype': u'Button', + 'label': u'Get Current Stock', + 'oldfieldtype': u'Button', + 'options': u'get_current_stock', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'column_break2', + 'fieldtype': u'Column Break', + 'oldfieldtype': u'Column Break', + 'permlevel': 0, + 'width': u'50%' + }, + # DocField { 'colour': u'White:FFF', @@ -480,49 +413,6 @@ 'trigger': u'Client' }, - # DocField - { - 'colour': u'White:FFF', - 'description': u'Warehouse where you are maintaining stock of rejected items', - 'doctype': u'DocField', - 'fieldname': u'rejected_warehouse', - 'fieldtype': u'Link', - 'label': u'Rejected Warehouse', - 'no_copy': 1, - 'oldfieldname': u'rejected_warehouse', - 'oldfieldtype': u'Link', - 'options': u'Warehouse', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Supplier warehouse where you have issued raw materials for sub - contracting', - 'doctype': u'DocField', - 'fieldname': u'supplier_warehouse', - 'fieldtype': u'Link', - 'label': u'Supplier Warehouse', - 'no_copy': 1, - 'oldfieldname': u'supplier_warehouse', - 'oldfieldtype': u'Link', - 'options': u'Warehouse', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'50px' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'column_break2', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0 - }, - # DocField { 'colour': u'White:FFF', @@ -552,69 +442,6 @@ 'print_hide': 1 }, - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'section_break0', - 'fieldtype': u'Section Break', - 'oldfieldtype': u'Section Break', - 'options': u'Simple', - 'permlevel': 0 - }, - - # DocField - { - 'allow_on_submit': 1, - 'doctype': u'DocField', - 'fieldname': u'purchase_receipt_details', - 'fieldtype': u'Table', - 'label': u'Purchase Receipt Items', - 'oldfieldname': u'purchase_receipt_details', - 'oldfieldtype': u'Table', - 'options': u'Purchase Receipt Item', - 'permlevel': 0, - 'print_hide': 0, - 'reqd': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'net_total', - 'fieldtype': u'Currency', - 'label': u'Net Total', - 'oldfieldname': u'net_total', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1, - 'reqd': 1, - 'width': u'150px' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'get_current_stock', - 'fieldtype': u'Button', - 'label': u'Get Current Stock', - 'oldfieldtype': u'Button', - 'options': u'get_current_stock', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'recalculate_values', - 'fieldtype': u'Button', - 'label': u'Re-Calculate Values', - 'oldfieldtype': u'Button', - 'permlevel': 0, - 'trigger': u'Client' - }, - # DocField { 'colour': u'White:FFF', @@ -905,6 +732,37 @@ 'permlevel': 0 }, + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'contact_section', + 'fieldtype': u'Section Break', + 'label': u'Contact Info', + 'permlevel': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'supplier_address', + 'fieldtype': u'Link', + 'label': u'Supplier Address', + 'options': u'Address', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'contact_person', + 'fieldtype': u'Link', + 'label': u'Contact Person', + 'options': u'Contact', + 'permlevel': 0, + 'print_hide': 1 + }, + # DocField { 'colour': u'White:FFF', @@ -917,6 +775,146 @@ 'permlevel': 0 }, + # DocField + { + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'status', + 'fieldtype': u'Select', + 'in_filter': 1, + 'label': u'Status', + 'no_copy': 1, + 'oldfieldname': u'status', + 'oldfieldtype': u'Select', + 'options': u'\nDraft\nSubmitted\nCancelled', + 'permlevel': 1, + 'print_hide': 1, + 'reqd': 1, + 'search_index': 1, + 'width': u'150px' + }, + + # DocField + { + 'colour': u'White:FFF', + 'depends_on': u'eval:!doc.__islocal', + 'description': u'% of materials billed against this Purchase Receipt', + 'doctype': u'DocField', + 'fieldname': u'per_billed', + 'fieldtype': u'Currency', + 'label': u'% Billed', + 'no_copy': 1, + 'oldfieldname': u'per_billed', + 'oldfieldtype': u'Currency', + 'permlevel': 1, + 'print_hide': 1 + }, + + # DocField + { + 'colour': u'White:FFF', + 'default': u'No', + 'description': u'Select "Yes" for sub - contracting items', + 'doctype': u'DocField', + 'fieldname': u'is_subcontracted', + 'fieldtype': u'Select', + 'label': u'Is Subcontracted', + 'oldfieldname': u'is_subcontracted', + 'oldfieldtype': u'Select', + 'options': u'\nYes\nNo', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'amended_from', + 'fieldtype': u'Data', + 'hidden': 1, + 'label': u'Amended From', + 'no_copy': 1, + 'oldfieldname': u'amended_from', + 'oldfieldtype': u'Data', + 'permlevel': 1, + 'print_hide': 1, + 'width': u'150px' + }, + + # DocField + { + 'description': u'The date at which current entry is corrected in the system.', + 'doctype': u'DocField', + 'fieldname': u'amendment_date', + 'fieldtype': u'Date', + 'hidden': 1, + 'label': u'Amendment Date', + 'no_copy': 1, + 'oldfieldname': u'amendment_date', + 'oldfieldtype': u'Date', + 'permlevel': 0, + 'print_hide': 1, + 'width': u'100px' + }, + + # DocField + { + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'range', + 'fieldtype': u'Data', + 'hidden': 1, + 'label': u'Range', + 'oldfieldname': u'range', + 'oldfieldtype': u'Data', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'bill_no', + 'fieldtype': u'Data', + 'hidden': 1, + 'label': u'Bill No', + 'oldfieldname': u'bill_no', + 'oldfieldtype': u'Data', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'bill_date', + 'fieldtype': u'Date', + 'hidden': 1, + 'label': u'Bill Date', + 'oldfieldname': u'bill_date', + 'oldfieldtype': u'Date', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'allow_on_submit': 1, + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'select_print_heading', + 'fieldtype': u'Link', + 'label': u'Select Print Heading', + 'no_copy': 1, + 'oldfieldname': u'select_print_heading', + 'oldfieldtype': u'Link', + 'options': u'Print Heading', + 'permlevel': 0, + 'print_hide': 1, + 'report_hide': 1, + 'trigger': u'Client' + }, + # DocField { 'colour': u'White:FFF', @@ -984,20 +982,52 @@ # DocField { - 'allow_on_submit': 1, 'colour': u'White:FFF', + 'description': u'Warehouse where you are maintaining stock of rejected items', 'doctype': u'DocField', - 'fieldname': u'select_print_heading', + 'fieldname': u'rejected_warehouse', 'fieldtype': u'Link', - 'label': u'Select Print Heading', + 'label': u'Rejected Warehouse', 'no_copy': 1, - 'oldfieldname': u'select_print_heading', + 'oldfieldname': u'rejected_warehouse', 'oldfieldtype': u'Link', - 'options': u'Print Heading', + 'options': u'Warehouse', 'permlevel': 0, 'print_hide': 1, - 'report_hide': 1, - 'trigger': u'Client' + 'reqd': 0 + }, + + # DocField + { + 'colour': u'White:FFF', + 'description': u'Supplier warehouse where you have issued raw materials for sub - contracting', + 'doctype': u'DocField', + 'fieldname': u'supplier_warehouse', + 'fieldtype': u'Link', + 'label': u'Supplier Warehouse', + 'no_copy': 1, + 'oldfieldname': u'supplier_warehouse', + 'oldfieldtype': u'Link', + 'options': u'Warehouse', + 'permlevel': 0, + 'print_hide': 1, + 'width': u'50px' + }, + + # DocField + { + 'colour': u'White:FFF', + 'depends_on': u'eval:!doc.__islocal', + 'doctype': u'DocField', + 'fieldname': u'cancel_reason', + 'fieldtype': u'Data', + 'hidden': 0, + 'label': u'Cancel Reason', + 'no_copy': 1, + 'oldfieldname': u'cancel_reason', + 'oldfieldtype': u'Data', + 'permlevel': 1, + 'print_hide': 1 }, # DocField @@ -1021,22 +1051,6 @@ 'print_hide': 1 }, - # DocField - { - 'colour': u'White:FFF', - 'depends_on': u'eval:!doc.__islocal', - 'doctype': u'DocField', - 'fieldname': u'cancel_reason', - 'fieldtype': u'Data', - 'hidden': 0, - 'label': u'Cancel Reason', - 'no_copy': 1, - 'oldfieldname': u'cancel_reason', - 'oldfieldtype': u'Data', - 'permlevel': 1, - 'print_hide': 1 - }, - # DocField { 'doctype': u'DocField', diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js index 229600f77b2..996e435bcf6 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.js +++ b/erpnext/stock/doctype/stock_entry/stock_entry.js @@ -24,8 +24,9 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) { var cfn_set_fields = function(doc, cdt, cdn) { lst = ['supplier','supplier_name','supplier_address','customer','customer_name','customer_address']; - if (in_list(['Material Issue', 'Material Transfer', 'Material Receipt', 'Production Order', 'Subcontracting', 'Other'], doc.purpose)) { + if (in_list(['Material Issue', 'Material Transfer', 'Material Receipt', 'Sales Return', 'Purchase Return', 'Production Order', 'Subcontracting', 'Other'], doc.purpose)) { hide_field(lst); + $(cur_frm.fields_dict.contact_section.row.wrapper).toggle(false); } else unhide_field(lst); @@ -33,7 +34,8 @@ var cfn_set_fields = function(doc, cdt, cdn) { unhide_field('get_items'); hide_field(['from_warehouse', 'to_warehouse','purchase_receipt_no','delivery_note_no', 'sales_invoice_no','warehouse_html', 'transporter', 'is_excisable_goods', 'excisable_goods']); if (doc.purpose=='Production Order') unhide_field(['production_order', 'process']); - + else hide_field(['production_order', 'process']); + doc.from_warehouse = ''; doc.to_warehosue = ''; if (doc.process == 'Backflush' || doc.purpose == 'Other'){ @@ -56,17 +58,30 @@ var cfn_set_fields = function(doc, cdt, cdn) { if(doc.purpose == 'Purchase Return'){ doc.customer=doc.customer_name = doc.customer_address=doc.delivery_note_no=doc.sales_invoice_no=''; unhide_field(['supplier','supplier_name','supplier_address','purchase_receipt_no']); - + $(cur_frm.fields_dict.contact_section.row.wrapper).toggle(true); } else if(doc.purpose == 'Sales Return'){ doc.supplier=doc.supplier_name = doc.supplier_address=doc.purchase_receipt_no=''; unhide_field(['customer','customer_name','customer_address','delivery_note_no', 'sales_invoice_no']); + $(cur_frm.fields_dict.contact_section.row.wrapper).toggle(true); } else{ - doc.customer=doc.customer_name=doc.customer_address=doc.delivery_note_no=doc.sales_invoice_no=doc.supplier=doc.supplier_name = doc.supplier_address=doc.purchase_receipt_no=''; + doc.customer=doc.customer_name=doc.customer_address=doc.delivery_note_no=doc.sales_invoice_no=''; + doc.supplier=doc.supplier_name = doc.supplier_address=doc.purchase_receipt_no=''; } refresh_many(lst); } +//Refresh +cur_frm.cscript.refresh = function(doc, cdt, cdn) { + erpnext.hide_naming_series(); + + //India related + excise_flds = ['is_excisable_goods', 'excisable_goods', 'under_rule'] + if(wn.control_panel.country == 'India') unhide_field(excise_flds); + else hide_field(excise_flds); +} + + cur_frm.cscript.delivery_note_no = function(doc,cdt,cdn){ if(doc.delivery_note_no) get_server_fields('get_cust_values','','',doc,cdt,cdn,1); } diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.txt b/erpnext/stock/doctype/stock_entry/stock_entry.txt index fd330e9112a..bac0f74d359 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.txt +++ b/erpnext/stock/doctype/stock_entry/stock_entry.txt @@ -5,7 +5,7 @@ { 'creation': '2012-04-16 15:08:16', 'docstatus': 0, - 'modified': '2012-04-16 15:54:45', + 'modified': '2012-05-01 15:52:31', 'modified_by': u'Administrator', 'owner': u'Administrator' }, @@ -41,7 +41,7 @@ 'subject': u'%(remarks)s', 'tag_fields': u'purpose', 'use_template': 0, - 'version': 264 + 'version': 1 }, # These values are common for all DocField @@ -172,16 +172,6 @@ 'write': 1 }, - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'warehouse_section', - 'fieldtype': u'Section Break', - 'label': u'Warehouse', - 'oldfieldtype': u'Section Break', - 'permlevel': 0 - }, - # DocField { 'doctype': u'DocField', @@ -214,26 +204,6 @@ 'search_index': 0 }, - # DocField - { - 'allow_on_submit': 0, - 'description': u'The date at which current entry is corrected in the system.', - 'doctype': u'DocField', - 'fieldname': u'amendment_date', - 'fieldtype': u'Date', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Amendment Date', - 'no_copy': 1, - 'oldfieldname': u'amendment_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0 - }, - # DocField { 'allow_on_submit': 0, @@ -312,6 +282,331 @@ 'print_hide': 1 }, + # DocField + { + 'allow_on_submit': 0, + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'process', + 'fieldtype': u'Select', + 'hidden': 1, + 'in_filter': 1, + 'label': u'Process', + 'no_copy': 0, + 'oldfieldname': u'process', + 'oldfieldtype': u'Select', + 'options': u'\nMaterial Transfer\nBackflush', + 'permlevel': 0, + 'print_hide': 1, + 'report_hide': 0, + 'reqd': 0, + 'search_index': 0, + 'trigger': u'Client' + }, + + # DocField + { + 'allow_on_submit': 0, + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'production_order', + 'fieldtype': u'Link', + 'hidden': 1, + 'in_filter': 1, + 'label': u'Production Order', + 'no_copy': 0, + 'oldfieldname': u'production_order', + 'oldfieldtype': u'Link', + 'options': u'Production Order', + 'permlevel': 0, + 'print_hide': 1, + 'report_hide': 0, + 'reqd': 0, + 'search_index': 1, + 'trigger': u'Client' + }, + + # DocField + { + 'depends_on': u"eval:doc.purpose == 'Other'", + 'doctype': u'DocField', + 'fieldname': u'bom_no', + 'fieldtype': u'Link', + 'label': u'BOM No', + 'options': u'Bill Of Materials', + 'permlevel': 0 + }, + + # DocField + { + 'colour': u'White:FFF', + 'depends_on': u"eval:doc.purpose == 'Other'", + 'description': u'Select "Yes" if stock is maintained and tracked for sub-assembly items. Select "No" if you want child items of sub-assembly for material transfer.', + 'doctype': u'DocField', + 'fieldname': u'consider_sa_items_as_raw_materials', + 'fieldtype': u'Select', + 'label': u'Consider SA Items as Raw Materials', + 'options': u'\nNo\nYes', + 'permlevel': 0 + }, + + # DocField + { + 'allow_on_submit': 0, + 'doctype': u'DocField', + 'fieldname': u'fg_completed_qty', + 'fieldtype': u'Currency', + 'hidden': 0, + 'in_filter': 0, + 'label': u'FG Completed Qty', + 'no_copy': 0, + 'oldfieldname': u'fg_completed_qty', + 'oldfieldtype': u'Currency', + 'permlevel': 0, + 'print_hide': 1, + 'report_hide': 0, + 'reqd': 0, + 'search_index': 0, + 'trigger': u'Client' + }, + + # DocField + { + 'allow_on_submit': 0, + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'get_items', + 'fieldtype': u'Button', + 'hidden': 0, + 'in_filter': 0, + 'label': u'Get Items', + 'no_copy': 0, + 'oldfieldtype': u'Button', + 'options': u'get_items', + 'permlevel': 0, + 'print_hide': 1, + 'report_hide': 0, + 'reqd': 0, + 'search_index': 0 + }, + + # DocField + { + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'warehouse_html', + 'fieldtype': u'HTML', + 'label': u'Warehouse HTML', + 'no_copy': 0, + 'oldfieldtype': u'HTML', + 'options': u"
Warehouse
", + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'allow_on_submit': 0, + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'from_warehouse', + 'fieldtype': u'Link', + 'hidden': 0, + 'in_filter': 0, + 'label': u'Source Warehouse', + 'no_copy': 0, + 'oldfieldname': u'from_warehouse', + 'oldfieldtype': u'Link', + 'options': u'Warehouse', + 'permlevel': 0, + 'print_hide': 1, + 'report_hide': 0, + 'reqd': 0, + 'search_index': 0, + 'trigger': u'Client' + }, + + # DocField + { + 'allow_on_submit': 0, + 'colour': u'White:FFF', + 'description': u'Notes: Either Source or Target is Mandatory', + 'doctype': u'DocField', + 'fieldname': u'to_warehouse', + 'fieldtype': u'Link', + 'hidden': 0, + 'in_filter': 0, + 'label': u'Target Warehouse', + 'no_copy': 0, + 'oldfieldname': u'to_warehouse', + 'oldfieldtype': u'Link', + 'options': u'Warehouse', + 'permlevel': 0, + 'print_hide': 1, + 'report_hide': 0, + 'reqd': 0, + 'search_index': 0, + 'trigger': u'Client' + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'col2', + 'fieldtype': u'Column Break', + 'oldfieldtype': u'Column Break', + 'permlevel': 0, + 'width': u'50%' + }, + + # DocField + { + 'allow_on_submit': 0, + 'description': u'The date at which current entry will get or has actually executed.', + 'doctype': u'DocField', + 'fieldname': u'posting_date', + 'fieldtype': u'Date', + 'hidden': 0, + 'in_filter': 1, + 'label': u'Posting Date', + 'no_copy': 1, + 'oldfieldname': u'posting_date', + 'oldfieldtype': u'Date', + 'permlevel': 0, + 'print_hide': 1, + 'report_hide': 0, + 'reqd': 1, + 'search_index': 1 + }, + + # DocField + { + 'allow_on_submit': 0, + 'doctype': u'DocField', + 'fieldname': u'posting_time', + 'fieldtype': u'Time', + 'hidden': 0, + 'in_filter': 0, + 'label': u'Posting Time', + 'no_copy': 1, + 'oldfieldname': u'posting_time', + 'oldfieldtype': u'Time', + 'permlevel': 0, + 'print_hide': 1, + 'report_hide': 0, + 'reqd': 1, + 'search_index': 0 + }, + + # DocField + { + 'allow_on_submit': 0, + 'doctype': u'DocField', + 'fieldname': u'remarks', + 'fieldtype': u'Text', + 'hidden': 0, + 'in_filter': 0, + 'label': u'Remarks', + 'no_copy': 1, + 'oldfieldname': u'remarks', + 'oldfieldtype': u'Text', + 'permlevel': 0, + 'print_hide': 1, + 'report_hide': 0, + 'reqd': 1, + 'search_index': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'items_section', + 'fieldtype': u'Section Break', + 'label': u'Items', + 'oldfieldtype': u'Section Break', + 'permlevel': 0 + }, + + # DocField + { + 'allow_on_submit': 0, + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'mtn_details', + 'fieldtype': u'Table', + 'hidden': 0, + 'in_filter': 0, + 'label': u'MTN Details', + 'no_copy': 0, + 'oldfieldname': u'mtn_details', + 'oldfieldtype': u'Table', + 'options': u'Stock Entry Detail', + 'permlevel': 0, + 'print_hide': 0, + 'report_hide': 0, + 'reqd': 0, + 'search_index': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'item_section', + 'fieldtype': u'Section Break', + 'oldfieldtype': u'Section Break', + 'options': u'Simple', + 'permlevel': 0 + }, + + # DocField + { + 'allow_on_submit': 0, + 'doctype': u'DocField', + 'fieldname': u'total_amount', + 'fieldtype': u'Currency', + 'hidden': 0, + 'in_filter': 0, + 'label': u'Total Amount', + 'no_copy': 0, + 'oldfieldname': u'total_amount', + 'oldfieldtype': u'Currency', + 'permlevel': 1, + 'print_hide': 1, + 'report_hide': 0, + 'reqd': 0, + 'search_index': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'col3', + 'fieldtype': u'Column Break', + 'oldfieldtype': u'Column Break', + 'permlevel': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'get_stock_and_rate', + 'fieldtype': u'Button', + 'label': u'Get Stock and Rate', + 'oldfieldtype': u'Button', + 'options': u'get_stock_and_rate', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'contact_section', + 'fieldtype': u'Section Break', + 'label': u'Contact Info', + 'permlevel': 0 + }, + # DocField { 'allow_on_submit': 0, @@ -436,149 +731,21 @@ # DocField { - 'allow_on_submit': 0, - 'colour': u'White:FFF', 'doctype': u'DocField', - 'fieldname': u'process', - 'fieldtype': u'Select', - 'hidden': 1, - 'in_filter': 1, - 'label': u'Process', - 'no_copy': 0, - 'oldfieldname': u'process', - 'oldfieldtype': u'Select', - 'options': u'\nMaterial Transfer\nBackflush', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0, - 'trigger': u'Client' - }, - - # DocField - { - 'allow_on_submit': 0, - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'production_order', - 'fieldtype': u'Link', - 'hidden': 1, - 'in_filter': 1, - 'label': u'Production Order', - 'no_copy': 0, - 'oldfieldname': u'production_order', - 'oldfieldtype': u'Link', - 'options': u'Production Order', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'depends_on': u"eval:doc.purpose == 'Other'", - 'doctype': u'DocField', - 'fieldname': u'bom_no', - 'fieldtype': u'Link', - 'label': u'BOM No', - 'options': u'Bill Of Materials', + 'fieldname': u'more_info', + 'fieldtype': u'Section Break', + 'label': u'More Info', + 'oldfieldtype': u'Section Break', 'permlevel': 0 }, # DocField { - 'colour': u'White:FFF', - 'depends_on': u"eval:doc.purpose == 'Other'", - 'description': u'Select "Yes" if stock is maintained and tracked for sub-assembly items. Select "No" if you want child items of sub-assembly for material transfer.', 'doctype': u'DocField', - 'fieldname': u'consider_sa_items_as_raw_materials', - 'fieldtype': u'Select', - 'label': u'Consider SA Items as Raw Materials', - 'options': u'\nNo\nYes', - 'permlevel': 0 - }, - - # DocField - { - 'allow_on_submit': 0, - 'doctype': u'DocField', - 'fieldname': u'fg_completed_qty', - 'fieldtype': u'Currency', - 'hidden': 0, - 'in_filter': 0, - 'label': u'FG Completed Qty', - 'no_copy': 0, - 'oldfieldname': u'fg_completed_qty', - 'oldfieldtype': u'Currency', + 'fieldname': u'col4', + 'fieldtype': u'Column Break', 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0, - 'trigger': u'Client' - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'warehouse_html', - 'fieldtype': u'HTML', - 'label': u'Warehouse HTML', - 'no_copy': 0, - 'oldfieldtype': u'HTML', - 'options': u"
Warehouse
", - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'allow_on_submit': 0, - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'from_warehouse', - 'fieldtype': u'Link', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Source Warehouse', - 'no_copy': 0, - 'oldfieldname': u'from_warehouse', - 'oldfieldtype': u'Link', - 'options': u'Warehouse', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0, - 'trigger': u'Client' - }, - - # DocField - { - 'allow_on_submit': 0, - 'colour': u'White:FFF', - 'description': u'Notes: Either Source or Target is Mandatory', - 'doctype': u'DocField', - 'fieldname': u'to_warehouse', - 'fieldtype': u'Link', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Target Warehouse', - 'no_copy': 0, - 'oldfieldname': u'to_warehouse', - 'oldfieldtype': u'Link', - 'options': u'Warehouse', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0, - 'trigger': u'Client' + 'width': u'50%' }, # DocField @@ -596,12 +763,41 @@ # DocField { + 'allow_on_submit': 0, 'doctype': u'DocField', - 'fieldname': u'col2', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', + 'fieldname': u'select_print_heading', + 'fieldtype': u'Link', + 'hidden': 0, + 'in_filter': 0, + 'label': u'Select Print Heading', + 'no_copy': 0, + 'oldfieldname': u'select_print_heading', + 'oldfieldtype': u'Link', + 'options': u'Print Heading', 'permlevel': 0, - 'width': u'50%' + 'print_hide': 0, + 'report_hide': 0, + 'reqd': 0, + 'search_index': 0 + }, + + # DocField + { + 'allow_on_submit': 0, + 'doctype': u'DocField', + 'fieldname': u'cancel_reason', + 'fieldtype': u'Data', + 'hidden': 1, + 'in_filter': 0, + 'label': u'Cancel Reason', + 'no_copy': 1, + 'oldfieldname': u'cancel_reason', + 'oldfieldtype': u'Data', + 'permlevel': 1, + 'print_hide': 1, + 'report_hide': 0, + 'reqd': 0, + 'search_index': 0 }, # DocField @@ -626,80 +822,11 @@ # DocField { - 'allow_on_submit': 0, - 'description': u'The date at which current entry will get or has actually executed.', 'doctype': u'DocField', - 'fieldname': u'posting_date', - 'fieldtype': u'Date', - 'hidden': 0, - 'in_filter': 1, - 'label': u'Posting Date', - 'no_copy': 1, - 'oldfieldname': u'posting_date', - 'oldfieldtype': u'Date', + 'fieldname': u'col5', + 'fieldtype': u'Column Break', 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 1, - 'search_index': 1 - }, - - # DocField - { - 'allow_on_submit': 0, - 'doctype': u'DocField', - 'fieldname': u'posting_time', - 'fieldtype': u'Time', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Posting Time', - 'no_copy': 1, - 'oldfieldname': u'posting_time', - 'oldfieldtype': u'Time', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 1, - 'search_index': 0 - }, - - # DocField - { - 'allow_on_submit': 0, - 'doctype': u'DocField', - 'fieldname': u'amended_from', - 'fieldtype': u'Link', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Amended From', - 'no_copy': 1, - 'oldfieldname': u'amended_from', - 'oldfieldtype': u'Link', - 'options': u'Stock Entry', - 'permlevel': 1, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0 - }, - - # DocField - { - 'allow_on_submit': 0, - 'doctype': u'DocField', - 'fieldname': u'transporter', - 'fieldtype': u'Data', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Transporter', - 'no_copy': 0, - 'oldfieldname': u'transporter', - 'oldfieldtype': u'Data', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0 + 'width': u'50%' }, # DocField @@ -766,84 +893,14 @@ { 'allow_on_submit': 0, 'doctype': u'DocField', - 'fieldname': u'remarks', - 'fieldtype': u'Text', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Remarks', - 'no_copy': 1, - 'oldfieldname': u'remarks', - 'oldfieldtype': u'Text', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 1, - 'search_index': 0 - }, - - # DocField - { - 'allow_on_submit': 0, - 'doctype': u'DocField', - 'fieldname': u'cancel_reason', + 'fieldname': u'transporter', 'fieldtype': u'Data', - 'hidden': 1, + 'hidden': 0, 'in_filter': 0, - 'label': u'Cancel Reason', - 'no_copy': 1, - 'oldfieldname': u'cancel_reason', + 'label': u'Transporter', + 'no_copy': 0, + 'oldfieldname': u'transporter', 'oldfieldtype': u'Data', - 'permlevel': 1, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'items_section', - 'fieldtype': u'Section Break', - 'label': u'Items', - 'oldfieldtype': u'Section Break', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'get_stock_and_rate', - 'fieldtype': u'Button', - 'label': u'Get Stock and Rate', - 'oldfieldtype': u'Button', - 'options': u'get_stock_and_rate', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'col3', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0 - }, - - # DocField - { - 'allow_on_submit': 0, - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'get_items', - 'fieldtype': u'Button', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Get Items', - 'no_copy': 0, - 'oldfieldtype': u'Button', - 'options': u'get_items', 'permlevel': 0, 'print_hide': 1, 'report_hide': 0, @@ -851,66 +908,6 @@ 'search_index': 0 }, - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'item_section', - 'fieldtype': u'Section Break', - 'oldfieldtype': u'Section Break', - 'options': u'Simple', - 'permlevel': 0 - }, - - # DocField - { - 'allow_on_submit': 0, - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'mtn_details', - 'fieldtype': u'Table', - 'hidden': 0, - 'in_filter': 0, - 'label': u'MTN Details', - 'no_copy': 0, - 'oldfieldname': u'mtn_details', - 'oldfieldtype': u'Table', - 'options': u'Stock Entry Detail', - 'permlevel': 0, - 'print_hide': 0, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0 - }, - - # DocField - { - 'allow_on_submit': 0, - 'doctype': u'DocField', - 'fieldname': u'total_amount', - 'fieldtype': u'Currency', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Total Amount', - 'no_copy': 0, - 'oldfieldname': u'total_amount', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'other_details_section', - 'fieldtype': u'Section Break', - 'label': u'Other Details', - 'oldfieldtype': u'Section Break', - 'permlevel': 0 - }, - # DocField { 'allow_on_submit': 0, @@ -955,17 +952,37 @@ { 'allow_on_submit': 0, 'doctype': u'DocField', - 'fieldname': u'select_print_heading', + 'fieldname': u'amended_from', 'fieldtype': u'Link', 'hidden': 0, 'in_filter': 0, - 'label': u'Select Print Heading', - 'no_copy': 0, - 'oldfieldname': u'select_print_heading', + 'label': u'Amended From', + 'no_copy': 1, + 'oldfieldname': u'amended_from', 'oldfieldtype': u'Link', - 'options': u'Print Heading', + 'options': u'Stock Entry', + 'permlevel': 1, + 'print_hide': 1, + 'report_hide': 0, + 'reqd': 0, + 'search_index': 0 + }, + + # DocField + { + 'allow_on_submit': 0, + 'description': u'The date at which current entry is corrected in the system.', + 'doctype': u'DocField', + 'fieldname': u'amendment_date', + 'fieldtype': u'Date', + 'hidden': 0, + 'in_filter': 0, + 'label': u'Amendment Date', + 'no_copy': 1, + 'oldfieldname': u'amendment_date', + 'oldfieldtype': u'Date', 'permlevel': 0, - 'print_hide': 0, + 'print_hide': 1, 'report_hide': 0, 'reqd': 0, 'search_index': 0 diff --git a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.txt b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.txt index 9b0170f511b..031bd8f42f9 100644 --- a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.txt +++ b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2012-03-27 14:36:38', + 'creation': '2012-04-13 11:56:38', 'docstatus': 0, - 'modified': '2012-03-27 14:36:38', + 'modified': '2012-05-01 16:16:20', 'modified_by': u'Administrator', 'owner': u'Administrator' }, @@ -22,7 +22,7 @@ 'section_style': u'Tray', 'server_code_error': u' ', 'show_in_menu': 0, - 'version': 26 + 'version': 1 }, # These values are common for all DocField @@ -66,19 +66,6 @@ 'permlevel': 0 }, - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'fg_item', - 'fieldtype': u'Check', - 'in_filter': 1, - 'label': u'FG Item', - 'oldfieldname': u'fg_item', - 'oldfieldtype': u'Check', - 'permlevel': 0, - 'print_hide': 1 - }, - # DocField { 'doctype': u'DocField', @@ -107,36 +94,6 @@ 'width': u'300px' }, - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'batch_no', - 'fieldtype': u'Link', - 'label': u'Batch No', - 'oldfieldname': u'batch_no', - 'oldfieldtype': u'Link', - 'options': u'Batch', - 'permlevel': 0, - 'print_hide': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'actual_qty', - 'fieldtype': u'Read Only', - 'in_filter': 1, - 'label': u'Actual Qty (at source)', - 'no_copy': 1, - 'oldfieldname': u'actual_qty', - 'oldfieldtype': u'Read Only', - 'permlevel': 1, - 'print_hide': 1, - 'reqd': 0, - 'search_index': 1 - }, - # DocField { 'doctype': u'DocField', @@ -150,19 +107,6 @@ 'trigger': u'Client' }, - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'reqd_qty', - 'fieldtype': u'Currency', - 'in_filter': 0, - 'label': u'Reqd Qty', - 'oldfieldname': u'reqd_qty', - 'oldfieldtype': u'Currency', - 'permlevel': 3, - 'print_hide': 1 - }, - # DocField { 'colour': u'White:FFF', @@ -178,58 +122,6 @@ 'trigger': u'Client' }, - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'conversion_factor', - 'fieldtype': u'Currency', - 'label': u'Conversion Factor', - 'oldfieldname': u'conversion_factor', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'reqd': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'stock_uom', - 'fieldtype': u'Link', - 'in_filter': 0, - 'label': u'Stock UOM', - 'oldfieldname': u'stock_uom', - 'oldfieldtype': u'Link', - 'options': u'UOM', - 'permlevel': 1, - 'reqd': 1, - 'search_index': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'transfer_qty', - 'fieldtype': u'Currency', - 'label': u'Stock Qty', - 'oldfieldname': u'transfer_qty', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'reqd': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'serial_no', - 'fieldtype': u'Text', - 'label': u'Serial No', - 'no_copy': 1, - 'oldfieldname': u'serial_no', - 'oldfieldtype': u'Text', - 'permlevel': 0, - 'reqd': 0 - }, - # DocField { 'doctype': u'DocField', @@ -253,6 +145,101 @@ 'permlevel': 1 }, + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'serial_no', + 'fieldtype': u'Text', + 'label': u'Serial No', + 'no_copy': 1, + 'oldfieldname': u'serial_no', + 'oldfieldtype': u'Text', + 'permlevel': 0, + 'reqd': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'batch_no', + 'fieldtype': u'Link', + 'label': u'Batch No', + 'oldfieldname': u'batch_no', + 'oldfieldtype': u'Link', + 'options': u'Batch', + 'permlevel': 0, + 'print_hide': 1, + 'trigger': u'Client' + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'reqd_qty', + 'fieldtype': u'Currency', + 'in_filter': 0, + 'label': u'Reqd Qty', + 'oldfieldname': u'reqd_qty', + 'oldfieldtype': u'Currency', + 'permlevel': 3, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'actual_qty', + 'fieldtype': u'Read Only', + 'in_filter': 1, + 'label': u'Actual Qty (at source)', + 'no_copy': 1, + 'oldfieldname': u'actual_qty', + 'oldfieldtype': u'Read Only', + 'permlevel': 1, + 'print_hide': 1, + 'reqd': 0, + 'search_index': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'conversion_factor', + 'fieldtype': u'Currency', + 'label': u'Conversion Factor', + 'oldfieldname': u'conversion_factor', + 'oldfieldtype': u'Currency', + 'permlevel': 1, + 'reqd': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'transfer_qty', + 'fieldtype': u'Currency', + 'label': u'Stock Qty', + 'oldfieldname': u'transfer_qty', + 'oldfieldtype': u'Currency', + 'permlevel': 1, + 'reqd': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'stock_uom', + 'fieldtype': u'Link', + 'in_filter': 0, + 'label': u'Stock UOM', + 'oldfieldname': u'stock_uom', + 'oldfieldtype': u'Link', + 'options': u'UOM', + 'permlevel': 1, + 'reqd': 1, + 'search_index': 0 + }, + # DocField { 'description': u'BOM No. for a Finished Good Item', @@ -262,5 +249,18 @@ 'label': u'BOM No.', 'options': u'BOM', 'permlevel': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'fg_item', + 'fieldtype': u'Check', + 'in_filter': 1, + 'label': u'FG Item', + 'oldfieldname': u'fg_item', + 'oldfieldtype': u'Check', + 'permlevel': 0, + 'print_hide': 1 } ] \ No newline at end of file