Merge branch 'master' of github.com:webnotes/erpnext into production

This commit is contained in:
Nabin Hait
2012-12-12 12:58:22 +05:30
15 changed files with 179 additions and 182 deletions

View File

@@ -103,26 +103,19 @@ cur_frm.fields_dict['item_group'].get_query = function(doc,cdt,cdn) {
// a table with both image and attachment in HTML
// in the "alternate_description" field
cur_frm.cscript.add_image = function(doc, dt, dn) {
if(!doc.file_list) {
msgprint('Please attach a file first!');
if(!doc.image) {
msgprint('Please select an "Image" first');
return;
}
var f = doc.file_list.split('\n')[0];
var fname = f.split(',')[0];
var fid = f.split(',')[1];
if(!in_list(['jpg','jpeg','gif','png'], fname.split('.')[1].toLowerCase())) {
msgprint('File must be of extension jpg, jpeg, gif or png'); return;
}
doc.description_html = repl('<table style="width: 100%; table-layout: fixed;">'+
'<tr><td style="width:110px"><img src="%(imgurl)s" width="100px"></td>'+
'<td>%(desc)s</td></tr>'+
'</table>', {imgurl: wn.urllib.get_file_url(fid), desc:doc.description});
'</table>', {imgurl: wn.utils.get_file_link(doc.image), desc:doc.description});
refresh_field('description_html');
}
//===================== Quotation to validation - either customer or lead mandatory ====================
// 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)
@@ -131,13 +124,11 @@ cur_frm.cscript.weight_to_validate = function(doc,cdt,cdn){
validated=0;
}
}
//===================validation function =================================
cur_frm.cscript.validate = function(doc,cdt,cdn){
cur_frm.cscript.weight_to_validate(doc,cdt,cdn);
}
//===========Fill Default Currency in "Item Prices====================
cur_frm.fields_dict['ref_rate_details'].grid.onrowadd = function(doc, cdt, cdn){
locals[cdt][cdn].ref_currency = sys_defaults.currency;
refresh_field('ref_currency',cdn,'ref_rate_details');

View File

@@ -2,9 +2,9 @@
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-12-07 15:15:29",
"creation": "2012-12-11 15:58:47",
"modified_by": "Administrator",
"modified": "2012-12-07 15:44:48"
"modified": "2012-12-11 16:08:49"
},
{
"allow_attach": 1,
@@ -14,6 +14,7 @@
"description": "A Product or a Service that is bought, sold or kept in stock.",
"autoname": "field:item_code",
"name": "__common__",
"default_print_format": "Standard",
"allow_rename": 1,
"doctype": "DocType",
"max_attachments": 1
@@ -131,14 +132,29 @@
"fieldtype": "Column Break",
"permlevel": 0
},
{
"doctype": "DocField",
"label": "Image",
"options": "attach_files:",
"fieldname": "image",
"fieldtype": "Select",
"permlevel": 0
},
{
"doctype": "DocField",
"label": "Image View",
"options": "image",
"fieldname": "image_view",
"fieldtype": "Image",
"permlevel": 0
},
{
"oldfieldtype": "Text",
"doctype": "DocField",
"label": "Description",
"oldfieldname": "description",
"width": "300px",
"fieldname": "description",
"fieldtype": "Text",
"fieldtype": "Small Text",
"search_index": 0,
"reqd": 1,
"permlevel": 0,
@@ -148,13 +164,13 @@
"doctype": "DocField",
"label": "Description HTML",
"fieldname": "description_html",
"fieldtype": "Text",
"fieldtype": "Small Text",
"permlevel": 0
},
{
"description": "Generates HTML to include image (1st attachment) in the description",
"description": "Generates HTML to include selected image in the description",
"doctype": "DocField",
"label": "Add Image",
"label": "Generate Description HTML",
"fieldname": "add_image",
"fieldtype": "Button",
"permlevel": 0
@@ -768,27 +784,18 @@
"doctype": "DocField",
"label": "Short Description",
"fieldname": "web_short_description",
"fieldtype": "Small Text",
"fieldtype": "Text",
"permlevel": 0
},
{
"depends_on": "show_in_website",
"doctype": "DocField",
"label": "Long Description",
"options": "Markdown",
"fieldname": "web_long_description",
"fieldtype": "Text Editor",
"permlevel": 0
},
{
"description": "These details will be shown in a formatted table the page for this product.",
"depends_on": "show_in_website",
"doctype": "DocField",
"label": "Item Website Specifications",
"options": "Item Website Specification",
"fieldname": "item_website_specifications",
"fieldtype": "Table",
"permlevel": 0
},
{
"amend": 0,
"create": 0,

View File

@@ -2,44 +2,41 @@
<div class="appframe-area"></div>
<div class="layout-main-section">
<div style="width: 48%; float: left;">
<h4><a href="#!List/Stock Entry">Stock Entry</a></h4>
<h5><a href="#List/Stock Entry">Stock Entry</a></h5>
<p class="help">Transfer stock from one warehouse to another</p>
<br>
<h4><a href="#!List/Delivery Note">Delivery Note</a></h4>
<h5><a href="#List/Delivery Note">Delivery Note</a></h5>
<p class="help">Delivery (shipment) to customers</p>
<br>
<h4><a href="#!List/Purchase Receipt">Purchase Receipt</a></h4>
<h5><a href="#List/Purchase Receipt">Purchase Receipt</a></h5>
<p class="help">Goods received from Suppliers</p>
</div>
<div style="width: 48%; float: right;">
<h4><a href="#!List/Item">Item</a></h4>
<h5><a href="#List/Item">Item</a></h5>
<p class="help">Item Master</p>
<br>
<h4><a href="#!List/Serial No">Serial No</a></h4>
<h5><a href="#List/Serial No">Serial No</a></h5>
<p class="help">Single unit of an Item</p>
<br>
<h4><a href="#!List/Batch">Batch</a></h4>
<h5><a href="#List/Batch">Batch</a></h5>
<p class="help">Batch of units of an Item</p>
<br>
<h4><a href="#!List/Warehouse">Warehouse</a></h4>
<h5><a href="#List/Warehouse">Warehouse</a></h5>
<p class="help">Warehouse is where items are stored</p>
<br>
<h4><a href="#stock-ledger" data-role="Analytics, Material Manager,
<h5><a href="#stock-ledger" data-role="Analytics, Material Manager,
Material User">Stock Ledger</a>
<span style="background-color: #fed; font-weight: normal; font-size: 80%">beta</span>
</h4>
</h5>
<p class="help">Log of stock movements</p>
<br>
<h4><a href="#stock-analytics" data-role="Analytics, Material Manager">
<h5><a href="#stock-analytics" data-role="Analytics, Material Manager">
Stock Analytics</a>
<span style="background-color: #fed; font-weight: normal; font-size: 80%">beta</span>
</h4>
</h5>
<p class="help">Visual representation of stock trends</p>
<br>
<h4><a href="#stock-ageing" data-role="Analytics, Material Manager">
<h5><a href="#stock-ageing" data-role="Analytics, Material Manager">
Stock Ageing</a>
<span style="background-color: #fed; font-weight: normal; font-size: 80%">beta</span>
</h4>
</h5>
<p class="help">Analysis of slow moving stock</p>
</div>
<div style="clear: both"></div>
@@ -55,47 +52,47 @@
<div class="section-item">
<a class="section-link"
title = "Update stock by uploading a spreadsheet (csv) file"
href="#!List/Stock Reconciliation">Stock Reconciliation</a>
href="#List/Stock Reconciliation">Stock Reconciliation</a>
</div>
<div class="section-item">
<a class="section-link"
title = "Details of item installations"
href="#!List/Installation Note">Installation Note</a>
href="#List/Installation Note">Installation Note</a>
</div>
<div class="section-item">
<a class="section-link"
title = "Details packages against a delivery"
href="#!List/Packing Slip">Packing Slip</a>
href="#List/Packing Slip">Packing Slip</a>
</div>
<div class="section-item">
<a class="section-link"
title = "Multiple prices lists for items"
href="#!List/Price List">Price List</a>
href="#List/Price List">Price List</a>
</div>
<div class="section-item">
<a class="section-link"
title = "Readings of incoming quality inspections"
href="#!List/Quality Inspection">Quality Inspection</a>
href="#List/Quality Inspection">Quality Inspection</a>
</div>
<div class="section-item">
<a class="section-link"
title = "List of expense heads (Account) that will be distributed across incoming purchases (costs that you find out some time after you receive goods, like Custom Duty, but are a part of item valuation)"
href="#!List/Landed Cost Master">Landed Cost Master</a>
href="#List/Landed Cost Master">Landed Cost Master</a>
</div>
<div class="section-item">
<a class="section-link"
title = "Distribute costs on Purchase Receipts and add them to item value"
href="#!Form/Landed Cost Wizard/Landed Cost Wizard">Landed Cost Wizard</a>
href="#Form/Landed Cost Wizard/Landed Cost Wizard">Landed Cost Wizard</a>
</div>
<div class="section-item">
<a class="section-link"
title = "Change Unit of Measure (UOM) of an item"
href="#!Form/Stock UOM Replace Utility/Stock UOM Replace Utility">UOM Replace Utility</a>
href="#Form/Stock UOM Replace Utility/Stock UOM Replace Utility">UOM Replace Utility</a>
</div>
<div class="section-item">
<a class="section-link"
title = "Helper for managing return of goods (sales or purchase)"
href="#!Form/Sales and Purchase Return Tool/Sales and Purchase Return Tool">Sales or Purchase Returns</a>
href="#Form/Sales and Purchase Return Tool/Sales and Purchase Return Tool">Sales or Purchase Returns</a>
</div>
</div>
</div>
@@ -105,24 +102,24 @@
<div class="section-item">
<a class="section-link"
title = "Tree of item classification"
href="#!Sales Browser/Item Group"
href="#Sales Browser/Item Group"
data-role="Material Master Master, Material Manager,
Accounts Manager">Item Group</a>
</div>
<div class="section-item">
<a class="section-link"
title = "Unit of Measure (UOM) master"
href="#!List/UOM">Unit of Measure (UOM)</a>
href="#List/UOM">Unit of Measure (UOM)</a>
</div>
<div class="section-item">
<a class="section-link"
title = "List of Item Brands (optional)"
href="#!List/Brand">Brand</a>
href="#List/Brand">Brand</a>
</div>
<div class="section-item">
<a class="section-link"
title = "Types of warehouses"
href="#!List/Warehouse Type">Warehouse Type</a>
href="#List/Warehouse Type">Warehouse Type</a>
</div>
</div>
</div>