merge
diff --git a/INSTALL b/INSTALL
deleted file mode 100755
index d3b06fe..0000000
--- a/INSTALL
+++ /dev/null
@@ -1,29 +0,0 @@
-
-0. Make sure the wnmodules folder has the read,write,execute permissions for user,group and others.
-
-1. After installing wnframework using the INSTALL.txt file from that project, do the following:
- edit the defs.py file and set the variables as the templates there say.
-
-2. Install dateutil module (apt-get install python-dateutil)
-
-3. Unzip master.sql.gz in the modules folder
-
-4. goto cgi-bin folder in wnframework and execute
- python webnotes/install_lib/install.py root dbrootpassword dbname -s modules/master.sql
-
- where:
- root is the root database login
- dbrootpassword is the root password
- dbname is the name of the database you want to create for the ERP
-
-5. Login
- Set permissions through Profile(on top toolbar)-->Roles
- Permission: System Manager, Sales User etc.
- Tools-->Clear Cache, and refresh your browser.
-
-6. Go to Control Panel --> Set Company Name --> Clear Cache --> Refresh the system --> Go to Home --> Enter Company Abbr, Year begin date, currency and Save it.
-
-7. Go to Setup-->System-->Global Defaults, save it.
-
-
-
diff --git a/build.json b/build.json
index df91716..7b1dfe6 100644
--- a/build.json
+++ b/build.json
@@ -16,5 +16,14 @@
"erpnext/startup/js/toolbar.js",
"erpnext/startup/js/feature_setup.js",
"conf.js"
- ]
+ ],
+ "public/js/kb_common.js": [
+ "erpnext/utilities/page/kb_common/kb_common.js",
+ ],
+ "public/js/complete_setup.js": [
+ "erpnext/startup/js/complete_setup.js",
+ ],
+ "public/js/product_category.js": [
+ "erpnext/website/js/product_category.js",
+ ],
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.txt b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.txt
index 586fef1..3c2143a 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-05-01 15:03:52',
+ 'modified': '2012-05-10 14:02:05',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
index 8272fb2..abea87c 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
@@ -119,7 +119,6 @@
// Show / Hide button
cur_frm.clear_custom_buttons();
-
if (!cur_frm.cscript.is_onload) cur_frm.cscript.hide_price_list_currency(doc, dt, dn);
if(doc.docstatus==1) {
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.txt b/erpnext/buying/doctype/purchase_order/purchase_order.txt
index 592fa18..f8d3f63 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.txt
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.txt
@@ -5,7 +5,7 @@
{
'creation': '2012-04-13 11:56:19',
'docstatus': 0,
- 'modified': '2012-05-01 13:13:28',
+ 'modified': '2012-05-10 14:00:49',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
@@ -335,6 +335,19 @@
# DocField
{
+ 'doctype': u'DocField',
+ 'fieldname': u'net_total_import',
+ 'fieldtype': u'Currency',
+ 'label': u'Net Total (Import)',
+ 'no_copy': 0,
+ 'oldfieldname': u'net_total_import',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 1,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'get_last_purchase_rate',
@@ -609,19 +622,6 @@
# DocField
{
'doctype': u'DocField',
- 'fieldname': u'net_total_import',
- 'fieldtype': u'Currency',
- 'label': u'Net Total (Import)',
- 'no_copy': 0,
- 'oldfieldname': u'net_total_import',
- 'oldfieldtype': u'Currency',
- 'permlevel': 1,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': u'DocField',
'fieldname': u'grand_total_import',
'fieldtype': u'Currency',
'label': u'Grand Total (Import)',
diff --git a/erpnext/home/page/dashboard/dashboard.js b/erpnext/home/page/dashboard/dashboard.js
index 496c738..fba3cd7 100644
--- a/erpnext/home/page/dashboard/dashboard.js
+++ b/erpnext/home/page/dashboard/dashboard.js
@@ -16,7 +16,7 @@
pscript.onload_dashboard = function() {
// load jqplot
- wn.require('lib/css/lib/jqplot.css');
+ wn.require('js/lib/jqplot/css/jqplot.css');
wn.require('js/lib/jqplot/jquery.jqplot.min.js');
wn.require('js/lib/jqplot/jqplot-plugins/jqplot.barRenderer.js');
wn.require('js/lib/jqplot/jqplot-plugins/jqplot.canvasAxisTickRenderer.min.js');
diff --git a/erpnext/patches/may_2012/stock_reco_patch.py b/erpnext/patches/may_2012/stock_reco_patch.py
new file mode 100644
index 0000000..7eb050f
--- /dev/null
+++ b/erpnext/patches/may_2012/stock_reco_patch.py
@@ -0,0 +1,17 @@
+def execute():
+ import webnotes
+ from webnotes.modules import reload_doc
+ reload_doc('stock', 'doctype', 'stock_reconciliation')
+
+ sr = webnotes.conn.sql("select name, file_list from `tabStock Reconciliation` where docstatus = 1")
+ for d in sr:
+ if d[1]:
+ filename = d[1].split(',')[1]
+
+ from webnotes.utils import file_manager
+ fn, content = file_manager.get_file(filename)
+
+ if not isinstance(content, basestring) and hasattr(content, 'tostring'):
+ content = content.tostring()
+
+ webnotes.conn.sql("update `tabStock Reconciliation` set diff_info = %s where name = %s and ifnull(diff_info, '') = ''", (content, d[0]))
diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py
index b4d882b..67fa451 100644
--- a/erpnext/patches/patch_list.py
+++ b/erpnext/patches/patch_list.py
@@ -334,8 +334,13 @@
},
{
'patch_module': 'patches.may_2012',
+ 'patch_file': 'stock_reco_patch',
+ 'description': 'stock reco patch: store diff info in field'
+ },
+ {
+ 'patch_module': 'patches.may_2012',
'patch_file': 'cms',
'description': 'generate html pages'
},
-
+
]
diff --git a/erpnext/selling/doctype/installation_note/installation_note.py b/erpnext/selling/doctype/installation_note/installation_note.py
index 846d143..0dedf54 100644
--- a/erpnext/selling/doctype/installation_note/installation_note.py
+++ b/erpnext/selling/doctype/installation_note/installation_note.py
@@ -138,7 +138,7 @@
if d.serial_no:
- sr_list = get_sr_no_list(d.serial_no, d.qty)
+ sr_list = get_sr_no_list(d.serial_no, d.qty, d.item_code)
self.is_serial_no_exist(d.item_code, sr_list)
prevdoc_s_no = self.get_prevdoc_serial_no(d.prevdoc_detail_docname, d.prevdoc_docname)
diff --git a/erpnext/selling/doctype/sales_common/sales_common.py b/erpnext/selling/doctype/sales_common/sales_common.py
index f9f8adb..1a60a06 100644
--- a/erpnext/selling/doctype/sales_common/sales_common.py
+++ b/erpnext/selling/doctype/sales_common/sales_common.py
@@ -311,16 +311,6 @@
}
return ret
-
- # Make Packing List from Sales BOM
- # =======================================================================
- def has_sales_bom(self, item_code):
- return webnotes.conn.sql("select name from `tabSales BOM` where name=%s and docstatus != 2", item_code)
-
- def get_sales_bom_items(self, item_code):
- return webnotes.conn.sql("select item_code, qty, uom from `tabSales BOM Item` where parent=%s", item_code)
-
-
# --------------
# get item list
# --------------
@@ -345,8 +335,9 @@
warehouse = (obj.fname == "sales_order_details") and d.reserved_warehouse or d.warehouse
if self.has_sales_bom(d.item_code):
- for i in self.get_sales_bom_items(d.item_code):
- il.append([warehouse, i[0], flt(flt(i[1])* qty), flt(flt(i[1])*reserved_qty), i[2], d.batch_no, d.serial_no])
+ for p in getlist(obj.doclist, 'packing_details'):
+ if p.parent_item == d.item_code:
+ il.append([warehouse, p.item_code, flt(p.qty)*qty, flt(p.qty)* reserved_qty, p.uom, p.batch_no, p.serial_no])
else:
il.append([warehouse, d.item_code, qty, reserved_qty, d.stock_uom, d.batch_no, d.serial_no])
return il
@@ -371,12 +362,16 @@
return qty, max_qty, amt, max_amt
+ # Make Packing List from Sales BOM
+ # =======================================================================
+ def has_sales_bom(self, item_code):
+ return webnotes.conn.sql("select name from `tabSales BOM` where new_item_code=%s and docstatus != 2", item_code)
+
+ def get_sales_bom_items(self, item_code):
+ return webnotes.conn.sql("""select t1.item_code, t1.qty, t1.uom
+ from `tabSales BOM Item` t1, `tabSales BOM` t2
+ where t2.new_item_code=%s and t1.parent = t2.name""", item_code, as_dict=1)
-
-
- # -----------------------
- # add packing list items
- # -----------------------
def get_packing_item_details(self, item):
return webnotes.conn.sql("select item_name, description, stock_uom from `tabItem` where name = %s", item, as_dict = 1)[0]
@@ -384,12 +379,22 @@
det = webnotes.conn.sql("select actual_qty, projected_qty from `tabBin` where item_code = '%s' and warehouse = '%s'" % (item, warehouse), as_dict = 1)
return det and det[0] or ''
- def add_packing_list_item(self,obj, item_code, qty, warehouse, line):
- bin = self.get_bin_qty(item_code, warehouse)
- item = self.get_packing_item_details(item_code)
- pi = addchild(obj.doc, 'packing_details', 'Delivery Note Packing Item', 1, obj.doclist)
- pi.parent_item = item_code
- pi.item_code = item_code
+ def update_packing_list_item(self,obj, packing_item_code, qty, warehouse, line):
+ bin = self.get_bin_qty(packing_item_code, warehouse)
+ item = self.get_packing_item_details(packing_item_code)
+
+ # check if exists
+ exists = 0
+ for d in getlist(obj.doclist, 'packing_details'):
+ if d.parent_item == line.item_code and d.item_code == packing_item_code:
+ pi, exists = d, 1
+ break
+
+ if not exists:
+ pi = addchild(obj.doc, 'packing_details', 'Delivery Note Packing Item', 1, obj.doclist)
+
+ pi.parent_item = line.item_code
+ pi.item_code = packing_item_code
pi.item_name = item['item_name']
pi.parent_detail_docname = line.name
pi.description = item['description']
@@ -399,7 +404,9 @@
pi.projected_qty = bin and flt(bin['projected_qty']) or 0
pi.warehouse = warehouse
pi.prevdoc_doctype = line.prevdoc_doctype
- pi.serial_no = cstr(line.serial_no)
+ if packing_item_code == line.item_code:
+ pi.serial_no = cstr(line.serial_no)
+ pi.batch_no = cstr(line.batch_no)
pi.idx = self.packing_list_idx
self.packing_list_idx += 1
@@ -408,15 +415,14 @@
# make packing list from sales bom if exists or directly copy item with balance
# ------------------
def make_packing_list(self, obj, fname):
- obj.doc.clear_table(obj.doclist, 'packing_details')
self.packing_list_idx = 0
for d in getlist(obj.doclist, fname):
warehouse = fname == "sales_order_details" and d.reserved_warehouse or d.warehouse
if self.has_sales_bom(d.item_code):
for i in self.get_sales_bom_items(d.item_code):
- self.add_packing_list_item(obj, i[0], flt(i[1])*flt(d.qty), warehouse, d)
+ self.update_packing_list_item(obj, i['item_code'], flt(i['qty'])*flt(d.qty), warehouse, d)
else:
- self.add_packing_list_item(obj, d.item_code, d.qty, warehouse, d)
+ self.update_packing_list_item(obj, d.item_code, d.qty, warehouse, d)
# Get total in words
diff --git a/erpnext/selling/doctype/sms_center/sms_center.py b/erpnext/selling/doctype/sms_center/sms_center.py
index 0e54dd6..0d54f72 100644
--- a/erpnext/selling/doctype/sms_center/sms_center.py
+++ b/erpnext/selling/doctype/sms_center/sms_center.py
@@ -46,7 +46,6 @@
where_clause = self.doc.supplier and " and ifnull(is_supplier, 0) = 1 and supplier = '%s'" % self.doc.supplier or " and ifnull(is_supplier, 0) = 1"
if self.doc.send_to == 'All Sales Partner Contact':
where_clause = self.doc.sales_partner and " and ifnull(is_sales_partner, 0) = 1 and sales_aprtner = '%s'" % self.doc.sales_partner or " and ifnull(is_sales_partner, 0) = 1"
- msgprint(1)
if self.doc.send_to in ['All Contact', 'All Customer Contact', 'All Supplier Contact', 'All Sales Partner Contact']:
msgprint("select CONCAT(ifnull(first_name,''),'',ifnull(last_name,'')), mobile_no from `tabContact` where ifnull(mobile_no,'')!='' and docstatus != 2 %s" % where_clause)
rec = sql("select CONCAT(ifnull(first_name,''),'',ifnull(last_name,'')), mobile_no from `tabContact` where ifnull(mobile_no,'')!='' and docstatus != 2 %s" % where_clause)
diff --git a/erpnext/selling/page/sales_dashboard/sales_dashboard.js b/erpnext/selling/page/sales_dashboard/sales_dashboard.js
index e0260c7..e7d1e61 100644
--- a/erpnext/selling/page/sales_dashboard/sales_dashboard.js
+++ b/erpnext/selling/page/sales_dashboard/sales_dashboard.js
@@ -22,7 +22,7 @@
$dh(pscript.mnt_div1);
//pscript.dx_axis = [];
- wn.require('lib/css/lib/jqplot.css');
+ wn.require('js/lib/jqplot/css/jqplot.css');
wn.require('js/lib/jqplot/jquery.jqplot.min.js');
pscript.all_onchnge();
}
diff --git a/erpnext/startup/startup.js b/erpnext/startup/startup.js
index c687d95..2efe55d 100644
--- a/erpnext/startup/startup.js
+++ b/erpnext/startup/startup.js
@@ -76,7 +76,7 @@
// complete registration
if(in_list(user_roles,'System Manager') && (wn.boot.setup_complete=='No')) {
- wn.require("erpnext/startup/js/complete_setup.js");
+ wn.require("js/complete_setup.js");
erpnext.complete_setup.show();
}
if(wn.boot.expires_on && in_list(user_roles, 'System Manager')) {
diff --git a/erpnext/stock/doctype/bin/bin.py b/erpnext/stock/doctype/bin/bin.py
index ce2cae6..fe96c9f 100644
--- a/erpnext/stock/doctype/bin/bin.py
+++ b/erpnext/stock/doctype/bin/bin.py
@@ -181,8 +181,7 @@
# get moving average inventory values
# ------------------------------------
def get_moving_average_inventory_values(self, val_rate, in_rate, opening_qty, actual_qty, is_cancelled):
- #msgprint(actual_qty)
- if flt(in_rate) <= 0: # In case of delivery/stock issue in_rate = 0 or wrong incoming rate
+ if flt(in_rate) == 0: # In case of delivery/stock issue in_rate = 0 or wrong incoming rate
in_rate = val_rate
# val_rate is same as previous entry if :
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py
index 445e93b..e2d2ca3 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.py
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.py
@@ -416,7 +416,6 @@
if not d[0]:
msgprint("Message: Please enter Warehouse for item %s as it is stock item."% d[1])
raise Exception
- # if prevdoc_doctype = "Sales Order"
if d[3] < 0 :
# 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,doc_type=self.doc.doctype,doc_name=self.doc.name, is_amended = (self.doc.amended_from and 'Yes' or 'No'))
diff --git a/erpnext/stock/doctype/delivery_note_packing_item/delivery_note_packing_item.txt b/erpnext/stock/doctype/delivery_note_packing_item/delivery_note_packing_item.txt
index 4299fcc..51001fc 100644
--- a/erpnext/stock/doctype/delivery_note_packing_item/delivery_note_packing_item.txt
+++ b/erpnext/stock/doctype/delivery_note_packing_item/delivery_note_packing_item.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-27 14:36:30',
+ 'creation': '2012-04-13 11:56:35',
'docstatus': 0,
- 'modified': '2012-03-27 14:36:30',
+ 'modified': '2012-05-09 12:55:23',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
@@ -20,7 +20,7 @@
'section_style': u'Tray',
'server_code_error': u' ',
'show_in_menu': 0,
- 'version': 17
+ 'version': 1
},
# These values are common for all DocField
@@ -137,6 +137,15 @@
# DocField
{
'doctype': u'DocField',
+ 'fieldname': u'batch_no',
+ 'fieldtype': u'Data',
+ 'label': u'Batch No',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
'fieldname': u'actual_qty',
'fieldtype': u'Currency',
'label': u'Actual Qty',
@@ -173,34 +182,6 @@
# DocField
{
- 'doctype': u'DocField',
- 'fieldname': u'planned_qty',
- 'fieldtype': u'Currency',
- 'hidden': 1,
- 'label': u'Planned Qty ',
- 'no_copy': 1,
- 'oldfieldname': u'planned_qty',
- 'oldfieldtype': u'Currency',
- 'permlevel': 1,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': u'DocField',
- 'fieldname': u'produced_qty',
- 'fieldtype': u'Currency',
- 'hidden': 1,
- 'label': u'Produced Qty',
- 'no_copy': 1,
- 'oldfieldname': u'produced_qty',
- 'oldfieldtype': u'Currency',
- 'permlevel': 1,
- 'print_hide': 1
- },
-
- # DocField
- {
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'prevdoc_doctype',
@@ -215,47 +196,6 @@
# DocField
{
- 'description': u'The date at which current entry is made in system.',
- 'doctype': u'DocField',
- 'fieldname': u'transaction_date',
- 'fieldtype': u'Date',
- 'hidden': 0,
- 'label': u'Sales Order Date',
- 'oldfieldname': u'transaction_date',
- 'oldfieldtype': u'Date',
- 'permlevel': 1,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': u'DocField',
- 'fieldname': u'delivery_date',
- 'fieldtype': u'Date',
- 'hidden': 0,
- 'label': u'Expected Delivery Date',
- 'oldfieldname': u'delivery_date',
- 'oldfieldtype': u'Date',
- 'permlevel': 1,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': u'DocField',
- 'fieldname': u'confirmation_date',
- 'fieldtype': u'Date',
- 'hidden': 1,
- 'label': u'Confirmed delivery date',
- 'no_copy': 1,
- 'oldfieldname': u'confirmation_date',
- 'oldfieldtype': u'Date',
- 'permlevel': 1,
- 'print_hide': 1
- },
-
- # DocField
- {
'allow_on_submit': 1,
'doctype': u'DocField',
'fieldname': u'page_break',
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
index 798a2c5..37bc8a5 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
@@ -114,7 +114,7 @@
# If Reject Qty than Rejected warehouse is mandatory
if flt(d.rejected_qty) and (not self.doc.rejected_warehouse):
- msgprint("Rejected Warehouse is necessary if there are rejections. See 'Receipt Items'")
+ msgprint("Rejected Warehouse is necessary if there are rejections.")
raise Exception
# Check Received Qty = Accepted Qty + Rejected Qty
@@ -198,6 +198,15 @@
self.update_rw_material_detail()
get_obj('Stock Ledger').scrub_serial_nos(self)
+ self.scrub_rejected_serial_nos()
+
+
+ def scrub_rejected_serial_nos(self):
+ for d in getlist(self.doclist, 'purchase_receipt_details'):
+ if d.rejected_serial_no:
+ d.rejected_serial_no = d.rejected_serial_no.replace(',', '\n')
+ d.save()
+
# On Submit
@@ -232,7 +241,7 @@
self.make_sl_entry(d, d.warehouse, flt(pr_qty), d.valuation_rate, is_submit)
# UPDATE actual to rejected warehouse by rejected qty
if flt(d.rejected_qty) > 0:
- self.make_sl_entry(d, self.doc.rejected_warehouse, flt(d.rejected_qty) * flt(d.conversion_factor), d.valuation_rate, is_submit)
+ self.make_sl_entry(d, self.doc.rejected_warehouse, flt(d.rejected_qty) * flt(d.conversion_factor), d.valuation_rate, is_submit, rejected = 1)
self.bk_flush_supp_wh(is_submit)
@@ -241,24 +250,29 @@
# make Stock Entry
- def make_sl_entry(self, d, wh, qty, in_value, is_submit):
+ def make_sl_entry(self, d, wh, qty, in_value, is_submit, rejected = 0):
+ if rejected:
+ serial_no = d.rejected_serial_no
+ else:
+ serial_no = d.serial_no
+
self.values.append({
- 'item_code' : d.fields.has_key('item_code') and d.item_code or d.rm_item_code,
- 'warehouse' : wh,
+ 'item_code' : d.fields.has_key('item_code') and d.item_code or d.rm_item_code,
+ 'warehouse' : wh,
'transaction_date' : getdate(self.doc.modified).strftime('%Y-%m-%d'),
'posting_date' : self.doc.posting_date,
'posting_time' : self.doc.posting_time,
'voucher_type' : 'Purchase Receipt',
- 'voucher_no' : self.doc.name,
- 'voucher_detail_no' : d.name,
- 'actual_qty' : qty,
- 'stock_uom' : d.stock_uom,
- 'incoming_rate' : in_value,
- 'company' : self.doc.company,
- 'fiscal_year' : self.doc.fiscal_year,
+ 'voucher_no' : self.doc.name,
+ 'voucher_detail_no' : d.name,
+ 'actual_qty' : qty,
+ 'stock_uom' : d.stock_uom,
+ 'incoming_rate' : in_value,
+ 'company' : self.doc.company,
+ 'fiscal_year' : self.doc.fiscal_year,
'is_cancelled' : (is_submit==1) and 'No' or 'Yes',
- 'batch_no' : d.batch_no,
- 'serial_no' : d.serial_no
+ 'batch_no' : d.batch_no,
+ 'serial_no' : serial_no
})
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt
index 913380c..ea50db2 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-05-07 16:44:47',
+ 'creation': '2012-05-10 12:42:13',
'docstatus': 0,
- 'modified': '2012-05-07 16:54:34',
+ 'modified': '2012-05-10 14:01:16',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
@@ -58,6 +58,54 @@
# DocPerm
{
+ 'amend': 0,
+ 'cancel': 0,
+ 'create': 0,
+ 'doctype': u'DocPerm',
+ 'permlevel': 1,
+ 'role': u'Material Manager',
+ 'submit': 0,
+ 'write': 0
+ },
+
+ # DocPerm
+ {
+ 'amend': 1,
+ 'cancel': 1,
+ 'create': 1,
+ 'doctype': u'DocPerm',
+ 'permlevel': 0,
+ 'role': u'Material Manager',
+ 'submit': 1,
+ 'write': 1
+ },
+
+ # DocPerm
+ {
+ 'amend': 0,
+ 'cancel': 0,
+ 'create': 0,
+ 'doctype': u'DocPerm',
+ 'permlevel': 1,
+ 'role': u'Material User',
+ 'submit': 0,
+ 'write': 0
+ },
+
+ # DocPerm
+ {
+ 'amend': 1,
+ 'cancel': 1,
+ 'create': 1,
+ 'doctype': u'DocPerm',
+ 'permlevel': 0,
+ 'role': u'Material User',
+ 'submit': 1,
+ 'write': 1
+ },
+
+ # DocPerm
+ {
'amend': 1,
'cancel': 1,
'create': 1,
@@ -91,54 +139,6 @@
'write': 1
},
- # DocPerm
- {
- 'amend': 0,
- 'cancel': 0,
- 'create': 0,
- 'doctype': u'DocPerm',
- 'permlevel': 1,
- 'role': u'Material Manager',
- 'submit': 0,
- 'write': 0
- },
-
- # DocPerm
- {
- 'amend': 1,
- 'cancel': 1,
- 'create': 1,
- 'doctype': u'DocPerm',
- 'permlevel': 0,
- 'role': u'Material Manager',
- 'submit': 1,
- 'write': 1
- },
-
- # DocPerm
- {
- 'amend': 0,
- 'cancel': 0,
- 'create': 0,
- 'doctype': u'DocPerm',
- 'permlevel': 1,
- 'role': u'Material User',
- 'submit': 0,
- 'write': 0
- },
-
- # DocPerm
- {
- 'amend': 1,
- 'cancel': 1,
- 'create': 1,
- 'doctype': u'DocPerm',
- 'permlevel': 0,
- 'role': u'Material User',
- 'submit': 1,
- 'write': 1
- },
-
# DocField
{
'colour': u'White:FFF',
@@ -384,6 +384,18 @@
# 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_values',
'fieldtype': u'Button',
'label': u'Re-Calculate Values',
@@ -649,18 +661,6 @@
# 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'grand_total_import',
'fieldtype': u'Currency',
'label': u'Grand Total (Import)',
diff --git a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt
index 1a2c383..b316bd8 100755
--- a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt
+++ b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-27 14:36:35',
+ 'creation': '2012-04-13 11:56:36',
'docstatus': 0,
- 'modified': '2012-03-27 14:36:35',
+ 'modified': '2012-05-09 14:25:12',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
@@ -22,7 +22,7 @@
'section_style': u'Tray',
'server_code_error': u' ',
'show_in_menu': 0,
- 'version': 78
+ 'version': 1
},
# These values are common for all DocField
@@ -301,6 +301,16 @@
# DocField
{
+ 'doctype': u'DocField',
+ 'fieldname': u'rejected_serial_no',
+ 'fieldtype': u'Text',
+ 'label': u'Rejected Serial No',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'batch_no',
@@ -579,4 +589,4 @@
'permlevel': 0,
'print_hide': 1
}
-]
+]
\ No newline at end of file
diff --git a/erpnext/stock/doctype/sales_bom/sales_bom.js b/erpnext/stock/doctype/sales_bom/sales_bom.js
index 7d857a2..275af6a 100644
--- a/erpnext/stock/doctype/sales_bom/sales_bom.js
+++ b/erpnext/stock/doctype/sales_bom/sales_bom.js
@@ -23,7 +23,7 @@
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
if(!doc.__islocal) {
- hide_field('new_item_code');
+ get_field(doc.doctype, 'new_item_code', doc.name).permlevel = 1;
}
}
@@ -45,4 +45,4 @@
cur_frm.cscript.find_sales_bom = function(doc, dt, dn) {
$c_obj(make_doclist(dt,dn), 'check_duplicate', 1, '');
-}
\ No newline at end of file
+}
diff --git a/erpnext/stock/doctype/sales_bom/sales_bom.py b/erpnext/stock/doctype/sales_bom/sales_bom.py
index 7dea692..437c91e 100644
--- a/erpnext/stock/doctype/sales_bom/sales_bom.py
+++ b/erpnext/stock/doctype/sales_bom/sales_bom.py
@@ -62,13 +62,9 @@
if d.is_main_item == 'Yes':
is_main_item.append(d.item_code)
# Check that Sales Bom Item cannot be child of Sales Bom.
- if sql("select name from `tabSales BOM` where name = '%s' " % d.item_code):
- msgprint("Sales Bom Item " + d.item_code +" cannot be child item.")
+ if d.item_code == self.doc.new_item_code:
+ msgprint("Sales Bom Item " + d.new_item_code +" cannot be child item.")
raise Exception
- # Check if is_main_item is modified once saved
- #if not self.doc.fields.get('__islocal') and d.is_main_item == "Yes" and cstr(d.item_code) != cstr(self.doc.new_item_code)[:-3] :
- # msgprint("Modifying the main item is not allowed.")
- # raise Exception
if len(is_main_item) > 1:
msgprint('Main item cannot be more than one.')
raise Exception , " Validation Error."
@@ -81,8 +77,7 @@
# Make Item
# ---------
def create_new_item(self):
- i = Document("Item")
-
+ i = Document("Item")
i.item_code = self.doc.new_item_code
i.item_name = self.doc.new_item_name
i.name = i.item_code
@@ -106,7 +101,7 @@
sql("delete from `tabItem Price` where parent=%s and price_list_name = %s", (i.name, self.doc.price_list))
pld = addchild(i,"ref_rate_details", "Item Price")
- pld.price_list_name = self.doc.price_List
+ pld.price_list_name = self.doc.price_list
pld.ref_rate = flt(ref_rate)
pld.ref_currency = self.doc.currency
pld.save()
@@ -121,14 +116,11 @@
i.stock_uom = self.doc.stock_uom
i.item_group = self.doc.item_group
- # update rates
- new_rates = {}
- self.update_ref_rate(i)
i.item_name = self.doc.new_item_name
i.description = self.doc.description
- # set default as 'No' or 0 in Item Master as per TIC/3456
+ # set default as 'No' or 0
i.is_sample_item = 'No'
i.is_asset_item = 'No'
i.is_purchase_item = 'No'
@@ -138,8 +130,10 @@
i.inspection_required = 'No'
i.has_serial_no = 'No'
i.lead_time_days = flt(0)
+ # update rates
+ self.update_ref_rate(i)
i.save()
- msgprint("Items updated successfully.")
+ msgprint("Items: %s updated successfully. To update more details open and edit item master" % self.doc.new_item_code)
def validate(self):
diff --git a/erpnext/stock/doctype/stock_ledger/stock_ledger.py b/erpnext/stock/doctype/stock_ledger/stock_ledger.py
index 1d3aabe..9ee1f62 100644
--- a/erpnext/stock/doctype/stock_ledger/stock_ledger.py
+++ b/erpnext/stock/doctype/stock_ledger/stock_ledger.py
@@ -32,7 +32,7 @@
# -----------------------------------------------------------------------------------------
-def get_sr_no_list(sr_nos, qty = 0):
+def get_sr_no_list(sr_nos, qty = 0, item_code = ''):
serial_nos = cstr(sr_nos).strip().replace(',', '\n').split('\n')
valid_serial_nos = []
for val in serial_nos:
@@ -41,9 +41,8 @@
msgprint("You have entered duplicate serial no: %s" % val, raise_exception=1)
else:
valid_serial_nos.append(val.strip())
-
- if qty > 0 and cstr(sr_nos).strip() and len(valid_serial_nos) != flt(qty):
- msgprint("Please enter serial nos for all "+ cstr(qty) + " quantity", raise_exception = 1)
+ if qty and cstr(sr_nos).strip() and len(valid_serial_nos) != abs(qty):
+ msgprint("Please enter serial nos for "+ cstr(abs(qty)) + " quantity against item code: " + item_code , raise_exception = 1)
return valid_serial_nos
class DocType:
@@ -92,36 +91,46 @@
if is_stock_item != 'Yes':
msgprint("Serial No is not required for non-stock item: %s" % d.item_code, raise_exception=1)
elif ar_required != 'Yes':
- msgprint("If serial no required, please select 'Yes' in 'Has Serial No' in Item :" + d.item_code + ', otherwise please remove serial no', raise_exception=1)
+ msgprint("If serial no required, please select 'Yes' in 'Has Serial No' in Item :" + d.item_code + \
+ ', otherwise please remove serial no', raise_exception=1)
elif ar_required == 'Yes' and not d.serial_no:
msgprint("Serial no is mandatory for item: "+ d.item_code, raise_exception = 1)
+ # validate rejected serial nos
+ if fname == 'purchase_receipt_details' and d.rejected_qty and ar_required == 'Yes' and not d.rejected_serial_no:
+ msgprint("Rejected serial no is mandatory for rejected qty of item: "+ d.item_code, raise_exception = 1)
+
+
+
# -------------------
# get serial no list
# -------------------
- def get_sr_no_list(self, sr_nos, qty = 0):
- return get_sr_no_list(sr_nos, qty)
+ def get_sr_no_list(self, sr_nos, qty = 0, item_code = ''):
+ return get_sr_no_list(sr_nos, qty, item_code)
# ---------------------
# set serial no values
# ---------------------
def set_pur_serial_no_values(self, obj, serial_no, d, s, new_rec):
- item_details = sql("select item_group, warranty_period from `tabItem` where name = '%s' and (ifnull(end_of_life,'')='' or end_of_life = '0000-00-00' or end_of_life > now()) " %(d.item_code), as_dict=1)
+ item_details = sql("select item_group, warranty_period from `tabItem` where name = '%s' and \
+ (ifnull(end_of_life,'')='' or end_of_life = '0000-00-00' or end_of_life > now()) " %(d.item_code), as_dict=1)
+
s.purchase_document_type = obj.doc.doctype
s.purchase_document_no = obj.doc.name
s.purchase_date = obj.doc.posting_date
s.purchase_time = obj.doc.posting_time
s.purchase_rate = d.valuation_rate or d.incoming_rate
s.item_code = d.item_code
+ s.item_name = d.item_name
s.brand = d.brand
s.description = d.description
s.item_group = item_details and item_details[0]['item_group'] or ''
s.warranty_period = item_details and item_details[0]['warranty_period'] or 0
s.supplier = obj.doc.supplier
s.supplier_name = obj.doc.supplier_name
- s.supplier_address = obj.doc.supplier_address
+ s.address_display = obj.doc.address_display or obj.doc.supplier_address
s.warehouse = d.warehouse or d.t_warehouse
s.docstatus = 0
s.status = 'In Store'
@@ -184,7 +193,7 @@
s.delivery_time = obj.doc.posting_time
s.customer = obj.doc.customer
s.customer_name = obj.doc.customer_name
- s.delivery_address = obj.doc.delivery_address
+ s.delivery_address = obj.doc.address_display
s.territory = obj.doc.territory
s.warranty_expiry_date = s.warranty_period and add_days(cstr(obj.doc.posting_date), s.warranty_period) or ''
s.docstatus = 1
@@ -220,6 +229,13 @@
else:
self.update_serial_delivery_details(obj, d, serial_no, is_submit)
+ if fname == 'purchase_receipt_details' and d.rejected_qty and d.rejected_serial_no:
+ serial_nos = self.get_sr_no_list(d.rejected_serial_no)
+ for a in serial_nos:
+ self.update_serial_purchase_details(obj, d, a, is_submit)
+
+
+
# -------------
# update stock
@@ -227,21 +243,22 @@
def update_stock(self, values, is_amended = 'No'):
for v in values:
sle_id, serial_nos = '', ''
-
# get serial nos
if v["serial_no"]:
- serial_nos = self.get_sr_no_list(v["serial_no"], v['actual_qty'])
+ serial_nos = self.get_sr_no_list(v["serial_no"], v['actual_qty'], v['item_code'])
# reverse quantities for cancel
if v['is_cancelled'] == 'Yes':
v['actual_qty'] = -flt(v['actual_qty'])
# cancel matching entry
- sql("update `tabStock Ledger Entry` set is_cancelled='Yes' where voucher_no=%s and voucher_type=%s", (v['voucher_no'], v['voucher_type']))
+ sql("update `tabStock Ledger Entry` set is_cancelled='Yes' where voucher_no=%s \
+ and voucher_type=%s", (v['voucher_no'], v['voucher_type']))
if v["actual_qty"]:
sle_id = self.make_entry(v)
- get_obj('Warehouse', v["warehouse"]).update_bin(flt(v["actual_qty"]), 0, 0, 0, 0, v["item_code"], v["posting_date"], sle_id, v["posting_time"], '', v["is_cancelled"],v["voucher_type"],v["voucher_no"], is_amended)
+ get_obj('Warehouse', v["warehouse"]).update_bin(flt(v["actual_qty"]), 0, 0, 0, 0, v["item_code"], \
+ v["posting_date"], sle_id, v["posting_time"], '', v["is_cancelled"],v["voucher_type"],v["voucher_no"], is_amended)
# -----------
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
index f3742b3..1f3df46 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
@@ -16,7 +16,7 @@
import webnotes
from webnotes.utils import cstr, flt, get_defaults, nowdate
-from webnotes import msgprint
+from webnotes import msgprint, errprint
from webnotes.model.code import get_obj
sql = webnotes.conn.sql
@@ -28,22 +28,30 @@
self.doclist = doclist
self.validated = 1
self.data = []
+ self.val_method = get_defaults()['valuation_method']
def get_template(self):
- return [['Item Code', 'Warehouse', 'Quantity', 'Valuation Rate']]
+ if self.val_method == 'Moving Average':
+ return [['Item Code', 'Warehouse', 'Quantity', 'Valuation Rate']]
+ else:
+ return [['Item Code', 'Warehouse', 'Quantity', 'Incoming Rate']]
- def get_csv_file_data(self):
+
+ def get_csv_file_data(self, submit = 1):
"""Get csv data"""
- filename = self.doc.file_list.split(',')
- if not filename:
- msgprint("Please Attach File. ", raise_exception=1)
+ if submit:
+ filename = self.doc.file_list.split(',')
+ if not filename:
+ msgprint("Please Attach File. ", raise_exception=1)
- from webnotes.utils import file_manager
- fn, content = file_manager.get_file(filename[1])
+ from webnotes.utils import file_manager
+ fn, content = file_manager.get_file(filename[1])
- # NOTE: Don't know why this condition exists
- if not isinstance(content, basestring) and hasattr(content, 'tostring'):
- content = content.tostring()
+ # NOTE: Don't know why this condition exists
+ if not isinstance(content, basestring) and hasattr(content, 'tostring'):
+ content = content.tostring()
+ else:
+ content = self.doc.diff_info
return content
@@ -69,7 +77,7 @@
def get_reconciliation_data(self,submit = 1):
"""Read and validate csv data"""
import csv
- data = csv.reader(self.get_csv_file_data().splitlines())
+ data = csv.reader(self.get_csv_file_data(submit).splitlines())
self.convert_into_list(data, submit)
@@ -96,7 +104,6 @@
def validate(self):
"""Validate attachment data"""
- #self.data = [['it', 'wh1', 20, 150]]
if self.doc.file_list:
self.get_reconciliation_data()
@@ -105,17 +112,32 @@
def get_system_stock(self, it, wh):
"""get actual qty on reconciliation date and time as per system"""
bin = sql("select name from tabBin where item_code=%s and warehouse=%s", (it, wh))
- prev_sle = bin and get_obj('Bin', bin[0][0]).get_sle_prev_timebucket(self.doc.reconciliation_date, self.doc.reconciliation_time) or {}
+ prev_sle = bin and get_obj('Bin', bin[0][0]).get_prev_sle(self.doc.reconciliation_date, self.doc.reconciliation_time) or {}
return {
'actual_qty': prev_sle.get('bin_aqat', 0),
'stock_uom' : sql("select stock_uom from tabItem where name = %s", it)[0][0],
'val_rate' : prev_sle.get('valuation_rate', 0)
}
+
+ def get_incoming_rate(self, row, qty_diff, sys_stock, is_submit):
+ """Calculate incoming rate to maintain valuation rate"""
+ if qty_diff and is_submit:
+ if self.val_method == 'Moving Average':
+ in_rate = flt(row[3]) + (flt(sys_stock['actual_qty'])*(flt(row[3]) - flt(sys_stock['val_rate'])))/ flt(qty_diff)
+ elif not sys_stock and not row[3]:
+ msgprint("Incoming Rate is mandatory for item: %s and warehouse: %s" % (rpw[0], row[1]), raise_exception=1)
+ else:
+ in_rate = qty_diff > 0 and row[3] or 0
+ else:
+ in_rate = 0
+
+ return in_rate
+
def make_sl_entry(self, is_submit, row, qty_diff, sys_stock):
"""Make stock ledger entry"""
- in_rate = self.get_incoming_rate(row, qty_diff, sys_stock)
+ in_rate = self.get_incoming_rate(row, qty_diff, sys_stock, is_submit)
values = [{
'item_code' : row[0],
'warehouse' : row[1],
@@ -133,14 +155,16 @@
'is_cancelled' : (is_submit==1) and 'No' or 'Yes',
'batch_no' : '',
'serial_no' : ''
- }]
+ }]
get_obj('Stock Ledger', 'Stock Ledger').update_stock(values)
-
- def get_incoming_rate(self, row, qty_diff, sys_stock):
- """Calculate incoming rate to maintain valuation rate"""
- in_rate = flt(row[3]) + (flt(sys_stock['actual_qty'])*(flt(row[3]) - flt(sys_stock['val_rate'])))/ flt(qty_diff)
- return in_rate
+
+
+ def make_entry_for_valuation(self, row, sys_stock, is_submit):
+ self.make_sl_entry(is_submit, row, 1, sys_stock)
+ sys_stock['val_rate'] = row[3]
+ sys_stock['actual_qty'] += 1
+ self.make_sl_entry(is_submit, row, -1, sys_stock)
def do_stock_reco(self, is_submit = 1):
@@ -159,33 +183,34 @@
# Make sl entry
if qty_diff:
self.make_sl_entry(is_submit, row, qty_diff, sys_stock)
- elif rate_diff:
- self.make_sl_entry(is_submit, row, 1, sys_stock)
- sys_stock['val_rate'] = row[3]
- sys_stock['actual_qty'] += 1
- self.make_sl_entry(is_submit, row, -1, sys_stock)
+ sys_stock['actual_qty'] += qty_diff
+
+
+ if (not qty_diff and rate_diff) or qty_diff < 0 and self.val_method == 'Moving Average':
+ self.make_entry_for_valuation(row, sys_stock, is_submit)
if is_submit == 1:
- self.add_data_in_CSV(qty_diff, rate_diff)
+ self.store_diff_info(qty_diff, rate_diff)
msgprint("Stock Reconciliation Completed Successfully...")
- def add_data_in_CSV(self, qty_diff, rate_diff):
+ def store_diff_info(self, qty_diff, rate_diff):
"""Add diffs column in attached file"""
# add header
- out = "Item Code, Warehouse, Qty, Valuation Rate, Qty Diff, Val Rate Diff"
+ if self.val_method == 'Moving Average':
+ out = "Item Code, Warehouse, Qty, Valuation Rate, Qty Diff, Rate Diff"
+ else:
+ out = "Item Code, Warehouse, Qty, Incoming Rate, Qty Diff, Rate Diff"
+
# add data
for d in self.data:
s = [cstr(i) for i in d] + [cstr(qty_diff), cstr(rate_diff)]
out += "\n" + ','.join(s)
-
- # write to file
- fname = self.doc.file_list.split(',')
- from webnotes.utils import file_manager
- file_manager.write_file(fname[1], out)
+
+ webnotes.conn.set(self.doc, 'diff_info', out)
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.txt b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.txt
index c2fe30a..ac23d59 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.txt
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-03-27 14:36:40',
+ 'creation': '2012-04-13 11:56:39',
'docstatus': 0,
- 'modified': '2012-03-27 14:45:52',
+ 'modified': '2012-05-10 11:54:52',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
@@ -27,7 +27,7 @@
'server_code_error': u' ',
'show_in_menu': 0,
'subject': u'Date: %(reconciliation_date)s, Time: %(reconciliation_time)s',
- 'version': 107
+ 'version': 1
},
# These values are common for all DocField
@@ -162,6 +162,17 @@
# DocField
{
+ 'doctype': u'DocField',
+ 'fieldname': u'diff_info',
+ 'fieldtype': u'Text',
+ 'hidden': 1,
+ 'label': u'Diff Info',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
'depends_on': u'eval:doc.amended_from',
'description': u'The date at which current entry is corrected in the system.',
'doctype': u'DocField',
diff --git a/erpnext/utilities/page/questions/questions.js b/erpnext/utilities/page/questions/questions.js
index 841d460..33e0853 100644
--- a/erpnext/utilities/page/questions/questions.js
+++ b/erpnext/utilities/page/questions/questions.js
@@ -220,4 +220,4 @@
this.make()
}
-wn.require('erpnext/utilities/page/kb_common/kb_common.js');
+wn.require('js/kb_common.js');
diff --git a/erpnext/website/doctype/blog/blog_page.js b/erpnext/website/doctype/blog/blog_page.js
index 2dba743..1b8523b 100644
--- a/erpnext/website/doctype/blog/blog_page.js
+++ b/erpnext/website/doctype/blog/blog_page.js
@@ -25,7 +25,7 @@
where ifnull(published,0)=1 and name!="{{ doc.name }}" order by modified desc',
hide_refresh: true,
render_row: function(parent, data) {
- console.log(data);
+ //console.log(data);
if(data.content && data.content.length==100) data.content += '...';
parent.innerHTML = repl('<a href="%(name)s.html">%(title)s</a>\
<div class="comment">%(content)s</div><br>', data);
diff --git a/erpnext/website/page/products/products.js b/erpnext/website/page/products/products.js
index d7abfe4..1e8dcaa 100644
--- a/erpnext/website/page/products/products.js
+++ b/erpnext/website/page/products/products.js
@@ -16,7 +16,7 @@
erpnext.products = {}
-wn.require('erpnext/website/js/product_category.js');
+wn.require('js/product_category.js');
pscript.onload_products = function(wrapper) {
erpnext.make_product_categories(wrapper);
diff --git a/erpnext/website/utils.py b/erpnext/website/utils.py
index ae6bff4..dbe1733 100644
--- a/erpnext/website/utils.py
+++ b/erpnext/website/utils.py
@@ -72,6 +72,7 @@
from webnotes.model.doc import Document
from jinja2 import Template
+ import webnotes.utils
def get_item(l, label):
for i in l:
@@ -121,7 +122,7 @@
</div>
</div>
</div>""").render(top_bar_items = top_bar_items,
- brand=website_settings.brand_html or webnotes.get_default('company') or 'ERPNext')
+ brand=website_settings.brand_html or webnotes.utils.get_defaults('company') or 'ERPNext')
def get_footer(page_name):
"""get page footer"""
@@ -143,4 +144,4 @@
{% endfor %}
</ul></div>
<div class="web-footer-copyright">© {{ copyright }}
- </div>""").render(website_settings.fields)
\ No newline at end of file
+ </div>""").render(website_settings.fields)
diff --git a/install_erpnext.py b/install_erpnext.py
new file mode 100644
index 0000000..916d005
--- /dev/null
+++ b/install_erpnext.py
@@ -0,0 +1,123 @@
+#!/usr/bin/python
+import os, commands
+
+# ask for root mysql password
+import getpass
+
+root_pwd = None
+while not root_pwd:
+ root_pwd = getpass.getpass("MySQL Root user's Password: ")
+
+# test root connection
+op = commands.getoutput("mysql -u root -p%s -e 'exit'" % \
+ root_pwd.replace('$', '\$').replace(' ', '\ '))
+if "access denied" in op.lower():
+ raise Exception("Incorrect MySQL Root user's password")
+
+# ask for new dbname
+new_dbname = None
+while not new_dbname:
+ new_dbname = raw_input("New ERPNext Database Name: ")
+
+# ask for new dbpassword
+new_dbpassword = None
+while not new_dbpassword:
+ new_dbpassword = raw_input("New ERPNext Database's Password: ")
+
+# get erpnext path
+erpnext_path = os.path.dirname(os.path.abspath(__file__))
+os.chdir(erpnext_path)
+
+# setup backups
+if not os.path.exists(os.path.join(erpnext_path, 'backups')):
+ os.makedirs('backups')
+ os.symlink(os.path.join(erpnext_path, 'backups'),
+ os.path.join(erpnext_path, 'public', 'backups'))
+
+# setup files
+if not os.path.exists(os.path.join(erpnext_path, 'files')):
+ os.makedirs('files')
+ os.symlink(os.path.join(erpnext_path, 'files'),
+ os.path.join(erpnext_path, 'public', 'files'))
+
+# setup logs
+if not os.path.exists(os.path.join(erpnext_path, 'logs')):
+ os.makedirs('logs')
+ os.system('touch logs/error_log.txt')
+
+# setup lib -- framework repo with read only access
+# change this if you have your own fork
+if not os.path.exists(os.path.join(erpnext_path, 'lib')):
+ os.system('git clone git://github.com/webnotes/wnframework.git lib')
+
+# setup symlinks in public
+if not os.path.exists(os.path.join(erpnext_path, 'public', 'js', 'lib')):
+ os.symlink(os.path.join(erpnext_path, 'lib', 'js', 'lib'),
+ os.path.join(erpnext_path, 'public', 'js', 'lib'))
+if not os.path.exists(os.path.join(erpnext_path, 'public', 'images', 'lib')):
+ os.symlink(os.path.join(erpnext_path, 'lib', 'images'),
+ os.path.join(erpnext_path, 'public', 'images', 'lib'))
+
+# extract master
+if os.path.exists(os.path.join(erpnext_path, 'data', 'master.sql.gz')):
+ os.system('gunzip data/master.sql.gz')
+
+# setup conf
+if not os.path.exists(os.path.join(erpnext_path, 'conf.py')):
+ # read template conf file
+ with open(os.path.join(erpnext_path, 'lib', 'conf', 'conf.py'), 'r') as template:
+ content = template.read()
+
+ # manipulate content
+ import re
+
+ # set new_dbname, new_dbpassword, modules_path, files_path, backup_path, log_file_name
+ content = re.sub("db_name.*", "db_name = '%s'" % new_dbname, content)
+ content = re.sub("db_password.*", "db_password = '%s'" % new_dbpassword, content)
+ content = re.sub("modules_path.*", "modules_path = '%s'" % \
+ os.path.join(erpnext_path, 'erpnext'), content)
+ content = re.sub("files_path.*", "files_path = '%s'" % \
+ os.path.join(erpnext_path, 'files'), content)
+ content = re.sub("backup_path.*", "backup_path = '%s'" % \
+ os.path.join(erpnext_path, 'backups'), content)
+ content = re.sub("log_file_name.*", "log_file_name = '%s'" % \
+ os.path.join(erpnext_path, 'logs', 'error_log.txt'), content)
+
+
+ # write conf file
+ with open(os.path.join(erpnext_path, 'conf.py'), 'w') as new_conf:
+ new_conf.write(content)
+
+# install db
+import sys
+sys.path.append(erpnext_path)
+sys.path.append(os.path.join(erpnext_path, 'lib', 'py'))
+import conf
+sys.path.append(conf.modules_path)
+
+from webnotes.install_lib.install import Installer
+inst = Installer('root', root_pwd)
+inst.import_from_db(new_dbname, source_path=os.path.join(erpnext_path, 'data', 'master.sql'), verbose = 1)
+
+# apply patches
+os.chdir(erpnext_path)
+os.system("lib/wnf.py -l")
+
+# force sync all
+os.system("lib/wnf.py --sync_all -f")
+
+# set filemode false
+os.system("git config core.filemode false")
+os.chdir(os.path.join(erpnext_path, 'lib'))
+os.system("git config core.filemode false")
+
+steps_remaining = """
+To Do:
+
+* Configure apache/http conf file to point to public folder
+* chown recursively all files in your folder to apache user
+* login using: user="Administrator" and password="admin"
+"""
+
+print steps_remaining
+
diff --git a/public/css/all-app.css b/public/css/all-app.css
index 853f677..a9ca08b 100644
--- a/public/css/all-app.css
+++ b/public/css/all-app.css
@@ -3055,490 +3055,6 @@
}
/*
- * lib/css/Aristo/aristo.selected.css
- */
-/*
- * jQuery UI CSS Framework 1.8.7
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Theming/API
- */
-
-/* Layout helpers
-----------------------------------*/
-.ui-helper-hidden { display: none; }
-.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
-.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
-.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
-.ui-helper-clearfix { display: inline-block; }
-/* required comment for clearfix to work in Opera \*/
-* html .ui-helper-clearfix { height:1%; }
-.ui-helper-clearfix { display:block; }
-/* end clearfix */
-.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
-
-
-/* Interaction Cues
-----------------------------------*/
-.ui-state-disabled { cursor: default !important; }
-
-
-/* Icons
-----------------------------------*/
-
-/* states and images */
-.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
-
-
-/* Misc visuals
-----------------------------------*/
-
-/* Overlays */
-.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
-
-
-/*
- * jQuery UI CSS Framework 1.8.7
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Theming/API
- *
- * To view and modify this theme, visit http://jqueryui.com/themeroller/?ctl=themeroller
- */
-
-
-/* Component containers
-----------------------------------*/
-.ui-widget { font-family: Arial,sans-serif; font-size: 1.1em; }
-.ui-widget .ui-widget { font-size: 1em; }
-.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Arial,sans-serif; font-size: 1em; }
-.ui-widget-content { border: 1px solid #B6B6B6; background: #ffffff; color: #4F4F4F; }
-.ui-widget-content a { color: #4F4F4F; }
-.ui-widget-header { border: 1px solid #B6B6B6; color: #4F4F4F; font-weight: bold; }
-.ui-widget-header {
- background: #ededed url(../lib/css/Aristo/images/bg_fallback.png) 0 0 repeat-x; /* Old browsers */
- background: -moz-linear-gradient(top, #ededed 0%, #c4c4c4 100%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(100%,#c4c4c4)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* IE10+ */
- background: linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* W3C */
-}
-.ui-widget-header a { color: #4F4F4F; }
-
-/* Interaction states
-----------------------------------*/
-.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #B6B6B6; font-weight: normal; color: #4F4F4F; }
-.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
- background: #ededed url(../lib/css/Aristo/images/bg_fallback.png) 0 0 repeat-x; /* Old browsers */
- background: -moz-linear-gradient(top, #ededed 0%, #c4c4c4 100%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(100%,#c4c4c4)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* IE10+ */
- background: linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* W3C */
- -webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
- -moz-box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
- box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
-}
-.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #4F4F4F; text-decoration: none; }
-.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #9D9D9D; font-weight: normal; color: #313131; }
-.ui-state-hover a, .ui-state-hover a:hover { color: #313131; text-decoration: none; }
-.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active {
- outline: none;
- color: #1c4257; border: 1px solid #7096ab;
- background: #ededed url(../lib/css/Aristo/images/bg_fallback.png) 0 -50px repeat-x; /* Old browsers */
- background: -moz-linear-gradient(top, #b9e0f5 0%, #92bdd6 100%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b9e0f5), color-stop(100%,#92bdd6)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* IE10+ */
- background: linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* W3C */
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
-}
-.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #313131; text-decoration: none; }
-.ui-widget :active { outline: none; }
-
-/* Interaction Cues
-----------------------------------*/
-.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight { border: 1px solid #d2dbf4; background: #f4f8fd; color: #0d2054; -moz-border-radius: 0 !important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
-.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
-.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error { border: 1px solid #e2d0d0; background: #fcf0f0; color: #280b0b; -moz-border-radius: 0 !important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
-.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
-.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
-.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
-.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
-.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
-
-/* Icons
-----------------------------------*/
-
-/* states and images */
-.ui-icon { width: 16px; height: 16px; background-image: url(../lib/css/Aristo/images/ui-icons_222222_256x240.png); }
-.ui-widget-content .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_222222_256x240.png); }
-.ui-widget-header .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_222222_256x240.png); }
-.ui-state-default .ui-icon { background-image: url(../lib/css/Aristo/images/ui-icons_454545_256x240.png); }
-.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_454545_256x240.png); }
-.ui-state-active .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_454545_256x240.png); }
-.ui-state-highlight .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_454545_256x240.png); }
-.ui-state-error .ui-icon, .ui-state-error-text .ui-icon { background: url(../lib/css/Aristo/images/icon_sprite.png) -16px 0 no-repeat !important; }
-.ui-state-highlight .ui-icon, .ui-state-error .ui-icon { margin-top: -1px; }
-
-/* positioning */
-.ui-icon-carat-1-n { background-position: 0 0; }
-.ui-icon-carat-1-ne { background-position: -16px 0; }
-.ui-icon-carat-1-e { background-position: -32px 0; }
-.ui-icon-carat-1-se { background-position: -48px 0; }
-.ui-icon-carat-1-s { background-position: -64px 0; }
-.ui-icon-carat-1-sw { background-position: -80px 0; }
-.ui-icon-carat-1-w { background-position: -96px 0; }
-.ui-icon-carat-1-nw { background-position: -112px 0; }
-.ui-icon-carat-2-n-s { background-position: -128px 0; }
-.ui-icon-carat-2-e-w { background-position: -144px 0; }
-.ui-icon-triangle-1-n { background-position: 0 -16px; }
-.ui-icon-triangle-1-ne { background-position: -16px -16px; }
-.ui-icon-triangle-1-e { background-position: -32px -16px; }
-.ui-icon-triangle-1-se { background-position: -48px -16px; }
-.ui-icon-triangle-1-s { background-position: -64px -16px; }
-.ui-icon-triangle-1-sw { background-position: -80px -16px; }
-.ui-icon-triangle-1-w { background-position: -96px -16px; }
-.ui-icon-triangle-1-nw { background-position: -112px -16px; }
-.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
-.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
-.ui-icon-arrow-1-n { background-position: 0 -32px; }
-.ui-icon-arrow-1-ne { background-position: -16px -32px; }
-.ui-icon-arrow-1-e { background-position: -32px -32px; }
-.ui-icon-arrow-1-se { background-position: -48px -32px; }
-.ui-icon-arrow-1-s { background-position: -64px -32px; }
-.ui-icon-arrow-1-sw { background-position: -80px -32px; }
-.ui-icon-arrow-1-w { background-position: -96px -32px; }
-.ui-icon-arrow-1-nw { background-position: -112px -32px; }
-.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
-.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
-.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
-.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
-.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
-.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
-.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
-.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
-.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
-.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
-.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
-.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
-.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
-.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
-.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
-.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
-.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
-.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
-.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
-.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
-.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
-.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
-.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
-.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
-.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
-.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
-.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
-.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
-.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
-.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
-.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
-.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
-.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
-.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
-.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
-.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
-.ui-icon-arrow-4 { background-position: 0 -80px; }
-.ui-icon-arrow-4-diag { background-position: -16px -80px; }
-.ui-icon-extlink { background-position: -32px -80px; }
-.ui-icon-newwin { background-position: -48px -80px; }
-.ui-icon-refresh { background-position: -64px -80px; }
-.ui-icon-shuffle { background-position: -80px -80px; }
-.ui-icon-transfer-e-w { background-position: -96px -80px; }
-.ui-icon-transferthick-e-w { background-position: -112px -80px; }
-.ui-icon-folder-collapsed { background-position: 0 -96px; }
-.ui-icon-folder-open { background-position: -16px -96px; }
-.ui-icon-document { background-position: -32px -96px; }
-.ui-icon-document-b { background-position: -48px -96px; }
-.ui-icon-note { background-position: -64px -96px; }
-.ui-icon-mail-closed { background-position: -80px -96px; }
-.ui-icon-mail-open { background-position: -96px -96px; }
-.ui-icon-suitcase { background-position: -112px -96px; }
-.ui-icon-comment { background-position: -128px -96px; }
-.ui-icon-person { background-position: -144px -96px; }
-.ui-icon-print { background-position: -160px -96px; }
-.ui-icon-trash { background-position: -176px -96px; }
-.ui-icon-locked { background-position: -192px -96px; }
-.ui-icon-unlocked { background-position: -208px -96px; }
-.ui-icon-bookmark { background-position: -224px -96px; }
-.ui-icon-tag { background-position: -240px -96px; }
-.ui-icon-home { background-position: 0 -112px; }
-.ui-icon-flag { background-position: -16px -112px; }
-.ui-icon-calendar { background-position: -32px -112px; }
-.ui-icon-cart { background-position: -48px -112px; }
-.ui-icon-pencil { background-position: -64px -112px; }
-.ui-icon-clock { background-position: -80px -112px; }
-.ui-icon-disk { background-position: -96px -112px; }
-.ui-icon-calculator { background-position: -112px -112px; }
-.ui-icon-zoomin { background-position: -128px -112px; }
-.ui-icon-zoomout { background-position: -144px -112px; }
-.ui-icon-search { background-position: -160px -112px; }
-.ui-icon-wrench { background-position: -176px -112px; }
-.ui-icon-gear { background-position: -192px -112px; }
-.ui-icon-heart { background-position: -208px -112px; }
-.ui-icon-star { background-position: -224px -112px; }
-.ui-icon-link { background-position: -240px -112px; }
-.ui-icon-cancel { background-position: 0 -128px; }
-.ui-icon-plus { background-position: -16px -128px; }
-.ui-icon-plusthick { background-position: -32px -128px; }
-.ui-icon-minus { background-position: -48px -128px; }
-.ui-icon-minusthick { background-position: -64px -128px; }
-.ui-icon-close { background-position: -80px -128px; }
-.ui-icon-closethick { background-position: -96px -128px; }
-.ui-icon-key { background-position: -112px -128px; }
-.ui-icon-lightbulb { background-position: -128px -128px; }
-.ui-icon-scissors { background-position: -144px -128px; }
-.ui-icon-clipboard { background-position: -160px -128px; }
-.ui-icon-copy { background-position: -176px -128px; }
-.ui-icon-contact { background-position: -192px -128px; }
-.ui-icon-image { background-position: -208px -128px; }
-.ui-icon-video { background-position: -224px -128px; }
-.ui-icon-script { background-position: -240px -128px; }
-.ui-icon-alert { background-position: 0 -144px; }
-.ui-icon-info { background: url(../lib/css/Aristo/images/icon_sprite.png) 0 0 no-repeat !important; }
-.ui-icon-notice { background-position: -32px -144px; }
-.ui-icon-help { background-position: -48px -144px; }
-.ui-icon-check { background-position: -64px -144px; }
-.ui-icon-bullet { background-position: -80px -144px; }
-.ui-icon-radio-off { background-position: -96px -144px; }
-.ui-icon-radio-on { background-position: -112px -144px; }
-.ui-icon-pin-w { background-position: -128px -144px; }
-.ui-icon-pin-s { background-position: -144px -144px; }
-.ui-icon-play { background-position: 0 -160px; }
-.ui-icon-pause { background-position: -16px -160px; }
-.ui-icon-seek-next { background-position: -32px -160px; }
-.ui-icon-seek-prev { background-position: -48px -160px; }
-.ui-icon-seek-end { background-position: -64px -160px; }
-.ui-icon-seek-start { background-position: -80px -160px; }
-/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
-.ui-icon-seek-first { background-position: -80px -160px; }
-.ui-icon-stop { background-position: -96px -160px; }
-.ui-icon-eject { background-position: -112px -160px; }
-.ui-icon-volume-off { background-position: -128px -160px; }
-.ui-icon-volume-on { background-position: -144px -160px; }
-.ui-icon-power { background-position: 0 -176px; }
-.ui-icon-signal-diag { background-position: -16px -176px; }
-.ui-icon-signal { background-position: -32px -176px; }
-.ui-icon-battery-0 { background-position: -48px -176px; }
-.ui-icon-battery-1 { background-position: -64px -176px; }
-.ui-icon-battery-2 { background-position: -80px -176px; }
-.ui-icon-battery-3 { background-position: -96px -176px; }
-.ui-icon-circle-plus { background-position: 0 -192px; }
-.ui-icon-circle-minus { background-position: -16px -192px; }
-.ui-icon-circle-close { background-position: -32px -192px; }
-.ui-icon-circle-triangle-e { background-position: -48px -192px; }
-.ui-icon-circle-triangle-s { background-position: -64px -192px; }
-.ui-icon-circle-triangle-w { background-position: -80px -192px; }
-.ui-icon-circle-triangle-n { background-position: -96px -192px; }
-.ui-icon-circle-arrow-e { background-position: -112px -192px; }
-.ui-icon-circle-arrow-s { background-position: -128px -192px; }
-.ui-icon-circle-arrow-w { background-position: -144px -192px; }
-.ui-icon-circle-arrow-n { background-position: -160px -192px; }
-.ui-icon-circle-zoomin { background-position: -176px -192px; }
-.ui-icon-circle-zoomout { background-position: -192px -192px; }
-.ui-icon-circle-check { background-position: -208px -192px; }
-.ui-icon-circlesmall-plus { background-position: 0 -208px; }
-.ui-icon-circlesmall-minus { background-position: -16px -208px; }
-.ui-icon-circlesmall-close { background-position: -32px -208px; }
-.ui-icon-squaresmall-plus { background-position: -48px -208px; }
-.ui-icon-squaresmall-minus { background-position: -64px -208px; }
-.ui-icon-squaresmall-close { background-position: -80px -208px; }
-.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
-.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
-.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
-.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
-.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
-.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
-
-
-/* Misc visuals
-----------------------------------*/
-
-/* Corner radius */
-.ui-corner-tl { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; }
-.ui-corner-tr { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; }
-.ui-corner-bl { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; }
-.ui-corner-br { -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
-.ui-corner-top { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; }
-.ui-corner-bottom { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
-.ui-corner-right { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
-.ui-corner-left { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; }
-.ui-corner-all { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; }
-
-/* Overlays */
-.ui-widget-overlay { background: #262b33; opacity: .70;filter:Alpha(Opacity=70); }
-.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #000000; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }
-
-/*
- * jQuery UI Autocomplete 1.8.7
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Autocomplete#theming
- */
-.ui-autocomplete {
- position: absolute; cursor: default; z-index: 3;
- -moz-border-radius: 0;
- -webkit-border-radius: 0;
- border-radius: 0;
- -moz-box-shadow: 0 1px 5px rgba(0,0,0,0.3);
- -webkit-box-shadow: 0 1px 5px rgba(0,0,0,0.3);
- box-shadow: 0 1px 5px rgba(0,0,0,0.3);
-}
-
-/* workarounds */
-* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
-
-/*
- * jQuery UI Menu 1.8.7
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Menu#theming
- */
-.ui-menu {
- list-style:none;
- padding: 2px;
- margin: 0;
- display:block;
- float: left;
-}
-.ui-menu .ui-menu {
- margin-top: -3px;
-}
-.ui-menu .ui-menu-item {
- margin:0;
- padding: 0;
- zoom: 1;
- float: left;
- clear: left;
- width: 100%;
-}
-.ui-menu .ui-menu-item a {
- text-decoration:none;
- display:block;
- padding:.2em .4em;
- line-height:1.5;
- zoom:1;
-}
-.ui-menu .ui-menu-item a.ui-state-hover,
-.ui-menu .ui-menu-item a.ui-state-active {
- font-weight: normal;
- margin: -1px;
- background: #5f83b9;
- color: #FFFFFF;
- border-color: #466086;
- -moz-border-radius: 0;
- -webkit-border-radius: 0;
- border-radius: 0;
-}
-
-/*
- * jQuery UI Datepicker 1.8.7
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Datepicker#theming
- */
-.ui-datepicker { width: 17em; padding: 0; display: none; border-color: #DDDDDD; }
-.ui-datepicker {
- -moz-box-shadow: 0 4px 8px rgba(0,0,0,0.5);
- -webkit-box-shadow: 0 4px 8px rgba(0,0,0,0.5);
- box-shadow: 0 4px 8px rgba(0,0,0,0.5);
-}
-.ui-datepicker .ui-datepicker-header { position:relative; padding:.35em 0; border: none; border-bottom: 1px solid #B6B6B6; -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; }
-.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 6px; width: 1.8em; height: 1.8em; }
-.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { border: 1px none; }
-.ui-datepicker .ui-datepicker-prev { left:2px; }
-.ui-datepicker .ui-datepicker-next { right:2px; }
-.ui-datepicker .ui-datepicker-prev span { background-position: 0px -32px !important; }
-.ui-datepicker .ui-datepicker-next span { background-position: -16px -32px !important; }
-.ui-datepicker .ui-datepicker-prev-hover span { background-position: 0px -48px !important; }
-.ui-datepicker .ui-datepicker-next-hover span { background-position: -16px -48px !important; }
-.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; background: url(../lib/css/Aristo/images/icon_sprite.png) no-repeat; }
-.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; font-size: 12px; text-shadow: 0 1px 0 rgba(255,255,255,0.6); }
-.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
-.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
-.ui-datepicker select.ui-datepicker-month,
-.ui-datepicker select.ui-datepicker-year { width: 49%;}
-.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
-.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
-.ui-datepicker td { border: 0; padding: 1px; }
-.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
-.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
-.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
-.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
-.ui-datepicker table .ui-state-highlight { border-color: #5F83B9; }
-.ui-datepicker table .ui-state-hover { background: #5F83B9; color: #FFF; font-weight: bold; text-shadow: 0 1px 1px #234386; -webkit-box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; -moz-box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; border-color: #5F83B9; }
-.ui-datepicker-calendar .ui-state-default { background: transparent; border-color: #FFF; }
-.ui-datepicker-calendar .ui-state-active { background: #5F83B9; border-color: #5F83B9; color: #FFF; font-weight: bold; text-shadow: 0 1px 1px #234386; }
-
-/* with multiple calendars */
-.ui-datepicker.ui-datepicker-multi { width:auto; }
-.ui-datepicker-multi .ui-datepicker-group { float:left; }
-.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
-.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
-.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
-.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
-.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
-.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
-.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
-.ui-datepicker-row-break { clear:both; width:100%; }
-
-/* RTL support */
-.ui-datepicker-rtl { direction: rtl; }
-.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
-.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
-.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
-.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
-.ui-datepicker-rtl .ui-datepicker-group { float:right; }
-.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
-.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
-
-/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
-.ui-datepicker-cover {
- display: none; /*sorry for IE5*/
- display/**/: block; /*sorry for IE5*/
- position: absolute; /*must have*/
- z-index: -1; /*must have*/
- filter: mask(); /*must have*/
- top: -4px; /*must have*/
- left: -4px; /*must have*/
- width: 200px; /*must have*/
- height: 200px; /*must have*/
-}
-
-
-
-/*
* lib/css/ui/common.css
*/
.navbar-icon-home {
@@ -3798,6 +3314,490 @@
/*
+ * lib/js/lib/Aristo/aristo.selected.css
+ */
+/*
+ * jQuery UI CSS Framework 1.8.7
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ */
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden { display: none; }
+.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
+.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
+.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
+.ui-helper-clearfix { display: inline-block; }
+/* required comment for clearfix to work in Opera \*/
+* html .ui-helper-clearfix { height:1%; }
+.ui-helper-clearfix { display:block; }
+/* end clearfix */
+.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled { cursor: default !important; }
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
+
+
+/*
+ * jQuery UI CSS Framework 1.8.7
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ *
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ctl=themeroller
+ */
+
+
+/* Component containers
+----------------------------------*/
+.ui-widget { font-family: Arial,sans-serif; font-size: 1.1em; }
+.ui-widget .ui-widget { font-size: 1em; }
+.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Arial,sans-serif; font-size: 1em; }
+.ui-widget-content { border: 1px solid #B6B6B6; background: #ffffff; color: #4F4F4F; }
+.ui-widget-content a { color: #4F4F4F; }
+.ui-widget-header { border: 1px solid #B6B6B6; color: #4F4F4F; font-weight: bold; }
+.ui-widget-header {
+ background: #ededed url(../js/lib/Aristo/images/bg_fallback.png) 0 0 repeat-x; /* Old browsers */
+ background: -moz-linear-gradient(top, #ededed 0%, #c4c4c4 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(100%,#c4c4c4)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Opera11.10+ */
+ background: -ms-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* IE10+ */
+ background: linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* W3C */
+}
+.ui-widget-header a { color: #4F4F4F; }
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #B6B6B6; font-weight: normal; color: #4F4F4F; }
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
+ background: #ededed url(../js/lib/Aristo/images/bg_fallback.png) 0 0 repeat-x; /* Old browsers */
+ background: -moz-linear-gradient(top, #ededed 0%, #c4c4c4 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(100%,#c4c4c4)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Opera11.10+ */
+ background: -ms-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* IE10+ */
+ background: linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* W3C */
+ -webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
+ -moz-box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
+ box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
+}
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #4F4F4F; text-decoration: none; }
+.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #9D9D9D; font-weight: normal; color: #313131; }
+.ui-state-hover a, .ui-state-hover a:hover { color: #313131; text-decoration: none; }
+.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active {
+ outline: none;
+ color: #1c4257; border: 1px solid #7096ab;
+ background: #ededed url(../js/lib/Aristo/images/bg_fallback.png) 0 -50px repeat-x; /* Old browsers */
+ background: -moz-linear-gradient(top, #b9e0f5 0%, #92bdd6 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b9e0f5), color-stop(100%,#92bdd6)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Opera11.10+ */
+ background: -ms-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* IE10+ */
+ background: linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* W3C */
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+}
+.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #313131; text-decoration: none; }
+.ui-widget :active { outline: none; }
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight { border: 1px solid #d2dbf4; background: #f4f8fd; color: #0d2054; -moz-border-radius: 0 !important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
+.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
+.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error { border: 1px solid #e2d0d0; background: #fcf0f0; color: #280b0b; -moz-border-radius: 0 !important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
+.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
+.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
+.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
+.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
+.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { width: 16px; height: 16px; background-image: url(../js/lib/Aristo/images/ui-icons_222222_256x240.png); }
+.ui-widget-content .ui-icon {background-image: url(../js/lib/Aristo/images/ui-icons_222222_256x240.png); }
+.ui-widget-header .ui-icon {background-image: url(../js/lib/Aristo/images/ui-icons_222222_256x240.png); }
+.ui-state-default .ui-icon { background-image: url(../js/lib/Aristo/images/ui-icons_454545_256x240.png); }
+.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(../js/lib/Aristo/images/ui-icons_454545_256x240.png); }
+.ui-state-active .ui-icon {background-image: url(../js/lib/Aristo/images/ui-icons_454545_256x240.png); }
+.ui-state-highlight .ui-icon {background-image: url(../js/lib/Aristo/images/ui-icons_454545_256x240.png); }
+.ui-state-error .ui-icon, .ui-state-error-text .ui-icon { background: url(../js/lib/Aristo/images/icon_sprite.png) -16px 0 no-repeat !important; }
+.ui-state-highlight .ui-icon, .ui-state-error .ui-icon { margin-top: -1px; }
+
+/* positioning */
+.ui-icon-carat-1-n { background-position: 0 0; }
+.ui-icon-carat-1-ne { background-position: -16px 0; }
+.ui-icon-carat-1-e { background-position: -32px 0; }
+.ui-icon-carat-1-se { background-position: -48px 0; }
+.ui-icon-carat-1-s { background-position: -64px 0; }
+.ui-icon-carat-1-sw { background-position: -80px 0; }
+.ui-icon-carat-1-w { background-position: -96px 0; }
+.ui-icon-carat-1-nw { background-position: -112px 0; }
+.ui-icon-carat-2-n-s { background-position: -128px 0; }
+.ui-icon-carat-2-e-w { background-position: -144px 0; }
+.ui-icon-triangle-1-n { background-position: 0 -16px; }
+.ui-icon-triangle-1-ne { background-position: -16px -16px; }
+.ui-icon-triangle-1-e { background-position: -32px -16px; }
+.ui-icon-triangle-1-se { background-position: -48px -16px; }
+.ui-icon-triangle-1-s { background-position: -64px -16px; }
+.ui-icon-triangle-1-sw { background-position: -80px -16px; }
+.ui-icon-triangle-1-w { background-position: -96px -16px; }
+.ui-icon-triangle-1-nw { background-position: -112px -16px; }
+.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
+.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
+.ui-icon-arrow-1-n { background-position: 0 -32px; }
+.ui-icon-arrow-1-ne { background-position: -16px -32px; }
+.ui-icon-arrow-1-e { background-position: -32px -32px; }
+.ui-icon-arrow-1-se { background-position: -48px -32px; }
+.ui-icon-arrow-1-s { background-position: -64px -32px; }
+.ui-icon-arrow-1-sw { background-position: -80px -32px; }
+.ui-icon-arrow-1-w { background-position: -96px -32px; }
+.ui-icon-arrow-1-nw { background-position: -112px -32px; }
+.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
+.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
+.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
+.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
+.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
+.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
+.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
+.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
+.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
+.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
+.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
+.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
+.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
+.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
+.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
+.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
+.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
+.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
+.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
+.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+.ui-icon-arrow-4 { background-position: 0 -80px; }
+.ui-icon-arrow-4-diag { background-position: -16px -80px; }
+.ui-icon-extlink { background-position: -32px -80px; }
+.ui-icon-newwin { background-position: -48px -80px; }
+.ui-icon-refresh { background-position: -64px -80px; }
+.ui-icon-shuffle { background-position: -80px -80px; }
+.ui-icon-transfer-e-w { background-position: -96px -80px; }
+.ui-icon-transferthick-e-w { background-position: -112px -80px; }
+.ui-icon-folder-collapsed { background-position: 0 -96px; }
+.ui-icon-folder-open { background-position: -16px -96px; }
+.ui-icon-document { background-position: -32px -96px; }
+.ui-icon-document-b { background-position: -48px -96px; }
+.ui-icon-note { background-position: -64px -96px; }
+.ui-icon-mail-closed { background-position: -80px -96px; }
+.ui-icon-mail-open { background-position: -96px -96px; }
+.ui-icon-suitcase { background-position: -112px -96px; }
+.ui-icon-comment { background-position: -128px -96px; }
+.ui-icon-person { background-position: -144px -96px; }
+.ui-icon-print { background-position: -160px -96px; }
+.ui-icon-trash { background-position: -176px -96px; }
+.ui-icon-locked { background-position: -192px -96px; }
+.ui-icon-unlocked { background-position: -208px -96px; }
+.ui-icon-bookmark { background-position: -224px -96px; }
+.ui-icon-tag { background-position: -240px -96px; }
+.ui-icon-home { background-position: 0 -112px; }
+.ui-icon-flag { background-position: -16px -112px; }
+.ui-icon-calendar { background-position: -32px -112px; }
+.ui-icon-cart { background-position: -48px -112px; }
+.ui-icon-pencil { background-position: -64px -112px; }
+.ui-icon-clock { background-position: -80px -112px; }
+.ui-icon-disk { background-position: -96px -112px; }
+.ui-icon-calculator { background-position: -112px -112px; }
+.ui-icon-zoomin { background-position: -128px -112px; }
+.ui-icon-zoomout { background-position: -144px -112px; }
+.ui-icon-search { background-position: -160px -112px; }
+.ui-icon-wrench { background-position: -176px -112px; }
+.ui-icon-gear { background-position: -192px -112px; }
+.ui-icon-heart { background-position: -208px -112px; }
+.ui-icon-star { background-position: -224px -112px; }
+.ui-icon-link { background-position: -240px -112px; }
+.ui-icon-cancel { background-position: 0 -128px; }
+.ui-icon-plus { background-position: -16px -128px; }
+.ui-icon-plusthick { background-position: -32px -128px; }
+.ui-icon-minus { background-position: -48px -128px; }
+.ui-icon-minusthick { background-position: -64px -128px; }
+.ui-icon-close { background-position: -80px -128px; }
+.ui-icon-closethick { background-position: -96px -128px; }
+.ui-icon-key { background-position: -112px -128px; }
+.ui-icon-lightbulb { background-position: -128px -128px; }
+.ui-icon-scissors { background-position: -144px -128px; }
+.ui-icon-clipboard { background-position: -160px -128px; }
+.ui-icon-copy { background-position: -176px -128px; }
+.ui-icon-contact { background-position: -192px -128px; }
+.ui-icon-image { background-position: -208px -128px; }
+.ui-icon-video { background-position: -224px -128px; }
+.ui-icon-script { background-position: -240px -128px; }
+.ui-icon-alert { background-position: 0 -144px; }
+.ui-icon-info { background: url(../js/lib/Aristo/images/icon_sprite.png) 0 0 no-repeat !important; }
+.ui-icon-notice { background-position: -32px -144px; }
+.ui-icon-help { background-position: -48px -144px; }
+.ui-icon-check { background-position: -64px -144px; }
+.ui-icon-bullet { background-position: -80px -144px; }
+.ui-icon-radio-off { background-position: -96px -144px; }
+.ui-icon-radio-on { background-position: -112px -144px; }
+.ui-icon-pin-w { background-position: -128px -144px; }
+.ui-icon-pin-s { background-position: -144px -144px; }
+.ui-icon-play { background-position: 0 -160px; }
+.ui-icon-pause { background-position: -16px -160px; }
+.ui-icon-seek-next { background-position: -32px -160px; }
+.ui-icon-seek-prev { background-position: -48px -160px; }
+.ui-icon-seek-end { background-position: -64px -160px; }
+.ui-icon-seek-start { background-position: -80px -160px; }
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+.ui-icon-seek-first { background-position: -80px -160px; }
+.ui-icon-stop { background-position: -96px -160px; }
+.ui-icon-eject { background-position: -112px -160px; }
+.ui-icon-volume-off { background-position: -128px -160px; }
+.ui-icon-volume-on { background-position: -144px -160px; }
+.ui-icon-power { background-position: 0 -176px; }
+.ui-icon-signal-diag { background-position: -16px -176px; }
+.ui-icon-signal { background-position: -32px -176px; }
+.ui-icon-battery-0 { background-position: -48px -176px; }
+.ui-icon-battery-1 { background-position: -64px -176px; }
+.ui-icon-battery-2 { background-position: -80px -176px; }
+.ui-icon-battery-3 { background-position: -96px -176px; }
+.ui-icon-circle-plus { background-position: 0 -192px; }
+.ui-icon-circle-minus { background-position: -16px -192px; }
+.ui-icon-circle-close { background-position: -32px -192px; }
+.ui-icon-circle-triangle-e { background-position: -48px -192px; }
+.ui-icon-circle-triangle-s { background-position: -64px -192px; }
+.ui-icon-circle-triangle-w { background-position: -80px -192px; }
+.ui-icon-circle-triangle-n { background-position: -96px -192px; }
+.ui-icon-circle-arrow-e { background-position: -112px -192px; }
+.ui-icon-circle-arrow-s { background-position: -128px -192px; }
+.ui-icon-circle-arrow-w { background-position: -144px -192px; }
+.ui-icon-circle-arrow-n { background-position: -160px -192px; }
+.ui-icon-circle-zoomin { background-position: -176px -192px; }
+.ui-icon-circle-zoomout { background-position: -192px -192px; }
+.ui-icon-circle-check { background-position: -208px -192px; }
+.ui-icon-circlesmall-plus { background-position: 0 -208px; }
+.ui-icon-circlesmall-minus { background-position: -16px -208px; }
+.ui-icon-circlesmall-close { background-position: -32px -208px; }
+.ui-icon-squaresmall-plus { background-position: -48px -208px; }
+.ui-icon-squaresmall-minus { background-position: -64px -208px; }
+.ui-icon-squaresmall-close { background-position: -80px -208px; }
+.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
+.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
+.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
+.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-tl { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; }
+.ui-corner-tr { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; }
+.ui-corner-bl { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; }
+.ui-corner-br { -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
+.ui-corner-top { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; }
+.ui-corner-bottom { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
+.ui-corner-right { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
+.ui-corner-left { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; }
+.ui-corner-all { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; }
+
+/* Overlays */
+.ui-widget-overlay { background: #262b33; opacity: .70;filter:Alpha(Opacity=70); }
+.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #000000; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }
+
+/*
+ * jQuery UI Autocomplete 1.8.7
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Autocomplete#theming
+ */
+.ui-autocomplete {
+ position: absolute; cursor: default; z-index: 3;
+ -moz-border-radius: 0;
+ -webkit-border-radius: 0;
+ border-radius: 0;
+ -moz-box-shadow: 0 1px 5px rgba(0,0,0,0.3);
+ -webkit-box-shadow: 0 1px 5px rgba(0,0,0,0.3);
+ box-shadow: 0 1px 5px rgba(0,0,0,0.3);
+}
+
+/* workarounds */
+* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
+
+/*
+ * jQuery UI Menu 1.8.7
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Menu#theming
+ */
+.ui-menu {
+ list-style:none;
+ padding: 2px;
+ margin: 0;
+ display:block;
+ float: left;
+}
+.ui-menu .ui-menu {
+ margin-top: -3px;
+}
+.ui-menu .ui-menu-item {
+ margin:0;
+ padding: 0;
+ zoom: 1;
+ float: left;
+ clear: left;
+ width: 100%;
+}
+.ui-menu .ui-menu-item a {
+ text-decoration:none;
+ display:block;
+ padding:.2em .4em;
+ line-height:1.5;
+ zoom:1;
+}
+.ui-menu .ui-menu-item a.ui-state-hover,
+.ui-menu .ui-menu-item a.ui-state-active {
+ font-weight: normal;
+ margin: -1px;
+ background: #5f83b9;
+ color: #FFFFFF;
+ border-color: #466086;
+ -moz-border-radius: 0;
+ -webkit-border-radius: 0;
+ border-radius: 0;
+}
+
+/*
+ * jQuery UI Datepicker 1.8.7
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Datepicker#theming
+ */
+.ui-datepicker { width: 17em; padding: 0; display: none; border-color: #DDDDDD; }
+.ui-datepicker {
+ -moz-box-shadow: 0 4px 8px rgba(0,0,0,0.5);
+ -webkit-box-shadow: 0 4px 8px rgba(0,0,0,0.5);
+ box-shadow: 0 4px 8px rgba(0,0,0,0.5);
+}
+.ui-datepicker .ui-datepicker-header { position:relative; padding:.35em 0; border: none; border-bottom: 1px solid #B6B6B6; -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; }
+.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 6px; width: 1.8em; height: 1.8em; }
+.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { border: 1px none; }
+.ui-datepicker .ui-datepicker-prev { left:2px; }
+.ui-datepicker .ui-datepicker-next { right:2px; }
+.ui-datepicker .ui-datepicker-prev span { background-position: 0px -32px !important; }
+.ui-datepicker .ui-datepicker-next span { background-position: -16px -32px !important; }
+.ui-datepicker .ui-datepicker-prev-hover span { background-position: 0px -48px !important; }
+.ui-datepicker .ui-datepicker-next-hover span { background-position: -16px -48px !important; }
+.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; background: url(../js/lib/Aristo/images/icon_sprite.png) no-repeat; }
+.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; font-size: 12px; text-shadow: 0 1px 0 rgba(255,255,255,0.6); }
+.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
+.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
+.ui-datepicker select.ui-datepicker-month,
+.ui-datepicker select.ui-datepicker-year { width: 49%;}
+.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
+.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
+.ui-datepicker td { border: 0; padding: 1px; }
+.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
+.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
+.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
+.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
+.ui-datepicker table .ui-state-highlight { border-color: #5F83B9; }
+.ui-datepicker table .ui-state-hover { background: #5F83B9; color: #FFF; font-weight: bold; text-shadow: 0 1px 1px #234386; -webkit-box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; -moz-box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; border-color: #5F83B9; }
+.ui-datepicker-calendar .ui-state-default { background: transparent; border-color: #FFF; }
+.ui-datepicker-calendar .ui-state-active { background: #5F83B9; border-color: #5F83B9; color: #FFF; font-weight: bold; text-shadow: 0 1px 1px #234386; }
+
+/* with multiple calendars */
+.ui-datepicker.ui-datepicker-multi { width:auto; }
+.ui-datepicker-multi .ui-datepicker-group { float:left; }
+.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
+.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
+.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
+.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
+.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
+.ui-datepicker-row-break { clear:both; width:100%; }
+
+/* RTL support */
+.ui-datepicker-rtl { direction: rtl; }
+.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+
+/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
+.ui-datepicker-cover {
+ display: none; /*sorry for IE5*/
+ display/**/: block; /*sorry for IE5*/
+ position: absolute; /*must have*/
+ z-index: -1; /*must have*/
+ filter: mask(); /*must have*/
+ top: -4px; /*must have*/
+ left: -4px; /*must have*/
+ width: 200px; /*must have*/
+ height: 200px; /*must have*/
+}
+
+
+
+/*
* erpnext/startup/startup.css
*/
h1, h2, h3, h4, h5 {
diff --git a/public/js/all-app.js b/public/js/all-app.js
index 4557975..e2d88b3 100644
--- a/public/js/all-app.js
+++ b/public/js/all-app.js
@@ -2260,7 +2260,7 @@
erpnext.startup.start=function(){console.log('Starting up...');$('#startup_div').html('Starting up...').toggle(true);erpnext.startup.set_globals();if(user!='Guest'){if(wn.boot.user_background){erpnext.set_user_background(wn.boot.user_background);}
wn.boot.profile.allow_modules=wn.boot.profile.allow_modules.concat(['To Do','Knowledge Base','Calendar','Activity','Messages'])
erpnext.toolbar.setup();erpnext.startup.set_periodic_updates();$('footer').html('<div class="web-footer erpnext-footer">\
- <a href="#!attributions">ERPNext | Attributions and License</a></div>');if(in_list(user_roles,'System Manager')&&(wn.boot.setup_complete=='No')){wn.require("erpnext/startup/js/complete_setup.js");erpnext.complete_setup.show();}
+ <a href="#!attributions">ERPNext | Attributions and License</a></div>');if(in_list(user_roles,'System Manager')&&(wn.boot.setup_complete=='No')){wn.require("js/complete_setup.js");erpnext.complete_setup.show();}
if(wn.boot.expires_on&&in_list(user_roles,'System Manager')){var today=dateutil.str_to_obj(dateutil.get_today());var expires_on=dateutil.str_to_obj(wn.boot.expires_on);var diff=dateutil.get_diff(expires_on,today);if(0<=diff&&diff<=15){var expiry_string=diff==0?"today":repl("in %(diff)s day(s)",{diff:diff});$('header').append(repl('<div class="expiry-info"> \
Your ERPNext subscription will <b>expire %(expiry_string)s</b>. \
Please renew your subscription to continue using ERPNext \
diff --git a/public/js/all-web.js b/public/js/all-web.js
index 72ab35d..5db2af5 100644
--- a/public/js/all-web.js
+++ b/public/js/all-web.js
@@ -711,7 +711,7 @@
erpnext.startup.start=function(){console.log('Starting up...');$('#startup_div').html('Starting up...').toggle(true);erpnext.startup.set_globals();if(user!='Guest'){if(wn.boot.user_background){erpnext.set_user_background(wn.boot.user_background);}
wn.boot.profile.allow_modules=wn.boot.profile.allow_modules.concat(['To Do','Knowledge Base','Calendar','Activity','Messages'])
erpnext.toolbar.setup();erpnext.startup.set_periodic_updates();$('footer').html('<div class="web-footer erpnext-footer">\
- <a href="#!attributions">ERPNext | Attributions and License</a></div>');if(in_list(user_roles,'System Manager')&&(wn.boot.setup_complete=='No')){wn.require("erpnext/startup/js/complete_setup.js");erpnext.complete_setup.show();}
+ <a href="#!attributions">ERPNext | Attributions and License</a></div>');if(in_list(user_roles,'System Manager')&&(wn.boot.setup_complete=='No')){wn.require("js/complete_setup.js");erpnext.complete_setup.show();}
if(wn.boot.expires_on&&in_list(user_roles,'System Manager')){var today=dateutil.str_to_obj(dateutil.get_today());var expires_on=dateutil.str_to_obj(wn.boot.expires_on);var diff=dateutil.get_diff(expires_on,today);if(0<=diff&&diff<=15){var expiry_string=diff==0?"today":repl("in %(diff)s day(s)",{diff:diff});$('header').append(repl('<div class="expiry-info"> \
Your ERPNext subscription will <b>expire %(expiry_string)s</b>. \
Please renew your subscription to continue using ERPNext \
diff --git a/public/js/complete_setup.js b/public/js/complete_setup.js
new file mode 100644
index 0000000..5947343
--- /dev/null
+++ b/public/js/complete_setup.js
@@ -0,0 +1,10 @@
+
+/*
+ * erpnext/startup/js/complete_setup.js
+ */
+wn.provide('erpnext.complete_setup');$.extend(erpnext.complete_setup,{show:function(){d=erpnext.complete_setup.prepare_dialog();d.show();},prepare_dialog:function(){var d=new wn.widgets.Dialog({title:"Setup",fields:[{fieldname:'first_name',label:'Your First Name',fieldtype:'Data',reqd:1},{fieldname:'last_name',label:'Your Last Name',fieldtype:'Data'},{fieldname:'company_name',label:'Company Name',fieldtype:'Data',reqd:1,description:'e.g. "My Company LLC"'},{fieldname:'company_abbr',label:'Company Abbreviation',fieldtype:'Data',description:'e.g. "MC"',reqd:1},{fieldname:'fy_start',label:'Financial Year Start Date',fieldtype:'Select',description:'Your financial year begins on"',reqd:1,options:erpnext.complete_setup.fy_start_list.join('\n')},{fieldname:'currency',label:'Default Currency',reqd:1,options:erpnext.complete_setup.currency_list.join('\n'),fieldtype:'Select'},{fieldname:'industry',label:'Industry',reqd:1,options:erpnext.complete_setup.industry_list.join('\n'),fieldtype:'Select'},{fieldname:'country',label:'Country',reqd:1,options:erpnext.complete_setup.country_list.join('\n'),fieldtype:'Select'},{fieldname:'timezone',label:'Time Zone',reqd:1,options:'',fieldtype:'Select'},{fieldname:'update',label:'Setup',fieldtype:'Button'},],});if(user!='Administrator'){$(d.appframe.$titlebar).find('.close').toggle(false);$('header').toggle(false);}
+d.fields_dict.update.input.onclick=function(){var data=d.get_values();if(!data)return;$(this).set_working();$c_obj('Setup Control','setup_account',data,function(r,rt){sys_defaults=r.message;user_fullname=r.message.user_fullname;wn.boot.user_info[user].fullname=user_fullname;d.hide();$('header').toggle(true);wn.container.wntoolbar.set_user_name();});};d.fields_dict.country.input.onchange=function(){var country=d.fields_dict.country.input.value;var $timezone=$(d.fields_dict.timezone.input);$timezone.empty();if(country){var timezone_list=erpnext.complete_setup.timezone_dict[country];if(timezone_list.length>1){timezone_list=[""].concat(timezone_list);}
+$timezone.add_options(timezone_list);}};if(wn.control_panel.company_name){var inp=d.fields_dict.company_name.input;inp.value=wn.control_panel.company_name;inp.disabled=true;}
+if(user_fullname){u=user_fullname.split(' ');if(u[0]){d.fields_dict.first_name.input.value=u[0];}
+if(u[1]){d.fields_dict.last_name.input.value=u[1];}}
+return d;},fy_start_list:['','1st Jan','1st Apr','1st Jul','1st Oct'],currency_list:['','AED','AFN','ALL','AMD','ANG','AOA','ARS','AUD','AZN','BAM','BBD','BDT','BGN','BHD','BIF','BMD','BND','BOB','BRL','BSD','BTN','BYR','BZD','CAD','CDF','CFA','CFP','CHF','CLP','CNY','COP','CRC','CUC','CZK','DJF','DKK','DOP','DZD','EEK','EGP','ERN','ETB','EUR','EURO','FJD','FKP','FMG','GBP','GEL','GHS','GIP','GMD','GNF','GQE','GTQ','GYD','HKD','HNL','HRK','HTG','HUF','IDR','ILS','INR','IQD','IRR','ISK','JMD','JOD','JPY','KES','KGS','KHR','KMF','KPW','KRW','KWD','KYD','KZT','LAK','LBP','LKR','LRD','LSL','LTL','LVL','LYD','MAD','MDL','MGA','MKD','MMK','MNT','MOP','MRO','MUR','MVR','MWK','MXN','MYR','MZM','NAD','NGN','NIO','NOK','NPR','NRs','NZD','OMR','PAB','PEN','PGK','PHP','PKR','PLN','PYG','QAR','RMB','RON','RSD','RUB','RWF','SAR','SCR','SDG','SDR','SEK','SGD','SHP','SOS','SRD','STD','SYP','SZL','THB','TJS','TMT','TND','TRY','TTD','TWD','TZS','UAE','UAH','UGX','USD','USh','UYU','UZS','VEB','VND','VUV','WST','XAF','XCD','XDR','XOF','XPF','YEN','YER','YTL','ZAR','ZMK','ZWR'],industry_list:['','Aerospace and Defence','Agriculture','Apparel','Automobile','Banking','Biotechnology','Chemical','Communications','Consulting','Customer Service','Education','Electronics','Energy','Engineering','Entertainment','Environmental','Finance','Food and Beverage','Government','Healthcare','Hospitality','Information Technology','Insurance','Machinery','Manufacturing','Media','Not For Profit','Recreation','Retail','Shipping','Technology','Telecommunications','Transportation','Trading','Utilities','Other'],country_list:["",'Afghanistan','Albania','Algeria','Andorra','Angola','Antigua and Barbuda','Argentina','Armenia','Australia','Austria','Azerbaijan','Bahamas','Bahrain','Bangladesh','Barbados','Belarus','Belgium','Belize','Benin','Bhutan','Bolivia','Bosnia and Herzegovina','Botswana','Brazil','Brunei Darussalam','Bulgaria','Burkina Faso','Burundi','Cambodia','Cameroon','Canada','Cape Verde','Central African Republic','Chad','Chile','Colombia','Comoros','Costa Rica','Croatia','Cuba','Cyprus','Czech Republic',"C\xc3\xb4te d'Ivoire",'Democratic Republic of the Congo','Denmark','Djibouti','Dominica','Dominican Republic','East Timor','Ecuador','Egypt','El Salvador','Equatorial Guinea','Eritrea','Estonia','Ethiopia','Federated States of Micronesia','Fiji','Finland','France','Gabon','Georgia','Germany','Ghana','Greece','Grenada','Guatemala','Guinea','Guinea-Bissau','Guyana','Haiti','Honduras','Hungary','Iceland','India','Indonesia','Iran','Iraq','Israel','Italy','Jamaica','Japan','Jordan','Kazakhstan','Kenya','Kingdom of the Netherlands','Kiribati','Kuwait','Kyrgyzstan','Laos','Latvia','Lebanon','Lesotho','Liberia','Libya','Liechtenstein','Lithuania','Luxembourg','Macedonia','Madagascar','Malawi','Malaysia','Maldives','Mali','Malta','Marshall Islands','Mauritania','Mauritius','Mexico','Moldova','Monaco','Mongolia','Montenegro','Morocco','Mozambique','Myanmar','Namibia','Nauru','Nepal','New Zealand','Nicaragua','Niger','Nigeria','North Korea','Norway','Oman','Pakistan','Palau','Panama','Papua New Guinea','Paraguay',"People's Republic of China",'Peru','Philippines','Poland','Portugal','Qatar','Republic of Ireland','Republic of the Congo','Romania','Russia','Rwanda','Saint Kitts and Nevis','Saint Lucia','Saint Vincent and the Grenadines','Samoa','San Marino','Saudi Arabia','Senegal','Serbia','Seychelles','Sierra Leone','Singapore','Slovakia','Slovenia','Solomon Islands','Somalia','South Africa','South Korea','Spain','Sri Lanka','Sudan','Suriname','Swaziland','Sweden','Switzerland','Syria','S\xc3\xa3o Tom\xc3\xa9 and Pr\xc3\xadncipe','Tajikistan','Tanzania','Thailand','The Gambia','Togo','Tonga','Trinidad and Tobago','Tunisia','Turkey','Turkmenistan','Tuvalu','Uganda','Ukraine','United Arab Emirates','United Kingdom','United States','Uruguay','Uzbekistan','Vanuatu','Vatican City','Venezuela','Vietnam','Yemen','Zambia','Zimbabwe'],timezone_dict:{'Afghanistan':['Asia/Kabul'],'Albania':['Europe/Tirane'],'Algeria':['Africa/Algiers'],'Andorra':['Europe/Andorra'],'Angola':['Africa/Luanda'],'Antigua and Barbuda':['America/Antigua'],'Argentina':['America/Argentina/Buenos_Aires','America/Argentina/Cordoba','America/Argentina/Jujuy','America/Argentina/Tucuman','America/Argentina/Catamarca','America/Argentina/La_Rioja','America/Argentina/San_Juan','America/Argentina/Mendoza','America/Argentina/Rio_Gallegos','America/Argentina/Ushuaia'],'Armenia':['Asia/Yerevan'],'Australia':['Australia/Lord_Howe','Australia/Hobart','Australia/Currie','Australia/Melbourne','Australia/Sydney','Australia/Broken_Hill','Australia/Brisbane','Australia/Lindeman','Australia/Adelaide','Australia/Darwin','Australia/Perth'],'Austria':['Europe/Vienna'],'Azerbaijan':['Asia/Baku'],'Bahamas':['America/Nassau'],'Bahrain':['Asia/Bahrain'],'Bangladesh':['Asia/Dhaka'],'Barbados':['America/Barbados'],'Belarus':['Europe/Minsk'],'Belgium':['Europe/Brussels'],'Belize':['America/Belize'],'Benin':['Africa/Porto-Novo'],'Bhutan':['Asia/Thimphu'],'Bolivia':['America/La_Paz'],'Bosnia and Herzegovina':['Europe/Sarajevo'],'Botswana':['Africa/Gaborone'],'Brazil':['America/Noronha','America/Belem','America/Fortaleza','America/Recife','America/Araguaina','America/Maceio','America/Bahia','America/Sao_Paulo','America/Campo_Grande','America/Cuiaba','America/Porto_Velho','America/Boa_Vista','America/Manaus','America/Eirunepe','America/Rio_Branco'],'Brunei Darussalam':['Asia/Brunei'],'Bulgaria':['Europe/Sofia'],'Burkina Faso':['Africa/Ouagadougou'],'Burundi':['Africa/Bujumbura'],'Cambodia':['Asia/Phnom_Penh'],'Cameroon':['Africa/Douala'],'Canada':['America/St_Johns','America/Halifax','America/Glace_Bay','America/Moncton','America/Goose_Bay','America/Blanc-Sablon','America/Montreal','America/Toronto','America/Nipigon','America/Thunder_Bay','America/Pangnirtung','America/Iqaluit','America/Atikokan','America/Rankin_Inlet','America/Winnipeg','America/Rainy_River','America/Cambridge_Bay','America/Regina','America/Swift_Current','America/Edmonton','America/Yellowknife','America/Inuvik','America/Dawson_Creek','America/Vancouver','America/Whitehorse','America/Dawson'],'Cape Verde':['Atlantic/Cape_Verde'],'Central African Republic':['Africa/Bangui'],'Chad':['Africa/Ndjamena'],'Chile':['America/Santiago','Pacific/Easter'],'Colombia':['America/Bogota'],'Comoros':['Indian/Comoro'],'Costa Rica':['America/Costa_Rica'],'Croatia':['Europe/Zagreb'],'Cuba':['America/Havana'],'Cyprus':['Asia/Nicosia'],'Czech Republic':['Europe/Prague'],"C\xc3\xb4te d'Ivoire":['Africa/Abidjan'],'Democratic Republic of the Congo':['Africa/Kinshasa','Africa/Lubumbashi'],'Denmark':['Europe/Copenhagen'],'Djibouti':['Africa/Djibouti'],'Dominica':['America/Dominica'],'Dominican Republic':['America/Santo_Domingo'],'East Timor':['Asia/Dili'],'Ecuador':['America/Guayaquil','Pacific/Galapagos'],'Egypt':['Africa/Cairo'],'El Salvador':['America/El_Salvador'],'Equatorial Guinea':['Africa/Malabo'],'Eritrea':['Africa/Asmera'],'Estonia':['Europe/Tallinn'],'Ethiopia':['Africa/Addis_Ababa'],'Federated States of Micronesia':['Pacific/Truk','Pacific/Ponape','Pacific/Kosrae'],'Fiji':['Pacific/Fiji'],'Finland':['Europe/Helsinki'],'France':['Europe/Paris'],'Gabon':['Africa/Libreville'],'Georgia':['Asia/Tbilisi'],'Germany':['Europe/Berlin'],'Ghana':['Africa/Accra'],'Greece':['Europe/Athens'],'Grenada':['America/Grenada'],'Guatemala':['America/Guatemala'],'Guinea':['Africa/Conakry'],'Guinea-Bissau':['Africa/Bissau'],'Guyana':['America/Guyana'],'Haiti':['America/Guatemala'],'Honduras':['America/Tegucigalpa'],'Hungary':['Europe/Budapest'],'Iceland':['Atlantic/Reykjavik'],'India':['Asia/Calcutta'],'Indonesia':['Asia/Jakarta','Asia/Pontianak','Asia/Makassar','Asia/Jayapura'],'Iran':['Asia/Tehran'],'Iraq':['Asia/Baghdad'],'Israel':['Asia/Jerusalem'],'Italy':['Europe/Rome'],'Jamaica':['America/Jamaica'],'Japan':['Asia/Tokyo'],'Jordan':['Asia/Amman'],'Kazakhstan':['Asia/Almaty','Asia/Qyzylorda','Asia/Aqtobe','Asia/Aqtau','Asia/Oral'],'Kenya':['Africa/Nairobi'],'Kingdom of the Netherlands':['Europe/Amsterdam'],'Kiribati':['Pacific/Tarawa','Pacific/Enderbury','Pacific/Kiritimati'],'Kuwait':['Asia/Kuwait'],'Kyrgyzstan':['Asia/Bishkek'],'Laos':['Asia/Vientiane'],'Latvia':['Europe/Riga'],'Lebanon':['Asia/Beirut'],'Lesotho':['Africa/Maseru'],'Liberia':['Africa/Monrovia'],'Libya':['Africa/Tripoli'],'Liechtenstein':['Europe/Vaduz'],'Lithuania':['Europe/Vilnius'],'Luxembourg':['Europe/Luxembourg'],'Macedonia':['Europe/Skopje'],'Madagascar':['Indian/Antananarivo'],'Malawi':['Africa/Blantyre'],'Malaysia':['Asia/Kuala_Lumpur','Asia/Kuching'],'Maldives':['Indian/Maldives'],'Mali':['Africa/Bamako'],'Malta':['Europe/Malta'],'Marshall Islands':['Pacific/Majuro','Pacific/Kwajalein'],'Mauritania':['Africa/Nouakchott'],'Mauritius':['Indian/Mauritius'],'Mexico':['America/Mexico_City','America/Cancun','America/Merida','America/Monterrey','America/Mazatlan','America/Chihuahua','America/Hermosillo','America/Tijuana'],'Moldova':['Europe/Chisinau'],'Monaco':['Europe/Monaco'],'Mongolia':['Asia/Ulaanbaatar','Asia/Hovd','Asia/Choibalsan'],'Montenegro':['Europe/Podgorica'],'Morocco':['Africa/Casablanca'],'Mozambique':['Africa/Maputo'],'Myanmar':['Asia/Rangoon'],'Namibia':['Africa/Windhoek'],'Nauru':['Pacific/Nauru'],'Nepal':['Asia/Katmandu'],'New Zealand':['Pacific/Auckland','Pacific/Chatham'],'Nicaragua':['America/Managua'],'Niger':['Africa/Niamey'],'Nigeria':['Africa/Lagos'],'North Korea':['Asia/Pyongyang'],'Norway':['Europe/Oslo'],'Oman':['Asia/Muscat'],'Pakistan':['Asia/Karachi'],'Palau':['Pacific/Palau'],'Panama':['America/Panama'],'Papua New Guinea':['Pacific/Port_Moresby'],'Paraguay':['America/Asuncion'],"People's Republic of China":['Asia/Shanghai','Asia/Harbin','Asia/Chongqing','Asia/Urumqi','Asia/Kashgar'],'Peru':['America/Lima'],'Philippines':['Asia/Manila'],'Poland':['Europe/Warsaw'],'Portugal':['Europe/Lisbon','Atlantic/Madeira','Atlantic/Azores'],'Qatar':['Asia/Qatar'],'Republic of Ireland':['Europe/Dublin'],'Republic of the Congo':['Africa/Brazzaville'],'Romania':['Europe/Bucharest'],'Russia':['Europe/Kaliningrad','Europe/Moscow','Europe/Volgograd','Europe/Samara','Asia/Yekaterinburg','Asia/Omsk','Asia/Novosibirsk','Asia/Krasnoyarsk','Asia/Irkutsk','Asia/Yakutsk','Asia/Vladivostok','Asia/Sakhalin','Asia/Magadan','Asia/Kamchatka','Asia/Anadyr'],'Rwanda':['Africa/Kigali'],'Saint Kitts and Nevis':['America/St_Kitts'],'Saint Lucia':['America/St_Lucia'],'Saint Vincent and the Grenadines':['America/St_Vincent'],'Samoa':['Pacific/Apia'],'San Marino':['Europe/San_Marino'],'Saudi Arabia':['Asia/Riyadh'],'Senegal':['Africa/Dakar'],'Serbia':['Europe/Belgrade'],'Seychelles':['Indian/Mahe'],'Sierra Leone':['Africa/Freetown'],'Singapore':['Asia/Singapore'],'Slovakia':['Europe/Bratislava'],'Slovenia':['Europe/Ljubljana'],'Solomon Islands':['Pacific/Guadalcanal'],'Somalia':['Africa/Mogadishu'],'South Africa':['Africa/Johannesburg'],'South Korea':['Asia/Seoul'],'Spain':['Europe/Madrid','Africa/Ceuta','Atlantic/Canary'],'Sri Lanka':['Asia/Colombo'],'Sudan':['Africa/Khartoum'],'Suriname':['America/Paramaribo'],'Swaziland':['Africa/Mbabane'],'Sweden':['Europe/Stockholm'],'Switzerland':['Europe/Zurich'],'Syria':['Asia/Damascus'],'S\xc3\xa3o Tom\xc3\xa9 and Pr\xc3\xadncipe':['Africa/Sao_Tome'],'Tajikistan':['Asia/Dushanbe'],'Tanzania':['Africa/Dar_es_Salaam'],'Thailand':['Asia/Bangkok'],'The Gambia':['Africa/Banjul'],'Togo':['Africa/Lome'],'Tonga':['Pacific/Tongatapu'],'Trinidad and Tobago':['America/Port_of_Spain'],'Tunisia':['Africa/Tunis'],'Turkey':['Europe/Istanbul'],'Turkmenistan':['Asia/Ashgabat'],'Tuvalu':['Pacific/Funafuti'],'Uganda':['Africa/Kampala'],'Ukraine':['Europe/Kiev','Europe/Uzhgorod','Europe/Zaporozhye','Europe/Simferopol'],'United Arab Emirates':['Asia/Dubai'],'United Kingdom':['Europe/London'],'United States':['America/New_York','America/Detroit','America/Kentucky/Louisville','America/Kentucky/Monticello','America/Indiana/Indianapolis','America/Indiana/Marengo','America/Indiana/Knox','America/Indiana/Vevay','America/Chicago','America/Indiana/Vincennes','America/Indiana/Petersburg','America/Menominee','America/North_Dakota/Center','America/North_Dakota/New_Salem','America/Denver','America/Boise','America/Shiprock','America/Phoenix','America/Los_Angeles','America/Anchorage','America/Juneau','America/Yakutat','America/Nome','America/Adak','Pacific/Honolulu'],'Uruguay':['America/Montevideo'],'Uzbekistan':['Asia/Samarkand','Asia/Tashkent'],'Vanuatu':['Pacific/Efate'],'Vatican City':['Europe/Vatican'],'Venezuela':['America/Caracas'],'Vietnam':['Asia/Saigon'],'Yemen':['Asia/Aden'],'Zambia':['Africa/Lusaka'],'Zimbabwe':['Africa/Harare'],},});
\ No newline at end of file
diff --git a/public/js/kb_common.js b/public/js/kb_common.js
new file mode 100644
index 0000000..e61b5ef
--- /dev/null
+++ b/public/js/kb_common.js
@@ -0,0 +1,29 @@
+
+/*
+ * erpnext/utilities/page/kb_common/kb_common.js
+ */
+KBItemToolbar=function(args,kb){$.extend(this,args);var me=this;this.make=function(){this.wrapper=$a(this.parent,'div','',{});this.line1=$a(this.wrapper,'div','',{color:'#888',fontSize:'11px',margin:'7px 0px'});this.make_timestamp();if(this.with_tags)
+this.make_tags();this.setup_del();}
+this.make_timestamp=function(){this.line1.innerHTML=repl('By %(name)s | %(when)s',{name:wn.utils.full_name(this.det.first_name,this.det.last_name),when:wn.datetime.comment_when(this.det.modified)});if(has_common(user_roles,['Administrator','System Manager'])){this.line1.innerHTML+=' | <a style="cursor:pointer;"\
+ class="del-link">delete</a>';}}
+this.make_tags=function(){this.line1.innerHTML+=' | '
+this.tags_area=$a(this.line1,'span','kb-tags')
+this.tags=new TagList(this.tags_area,this.det._user_tags&&(this.det._user_tags.split(',')),this.doctype,this.det.name,0,kb.set_tag_filter)}
+this.setup_del=function(){$(this.line1).find('.del-link').click(function(){console.log(1);this.innerHTML='deleting...';this.disabled=1;$c_page('utilities','questions','delete',{dt:me.doctype,dn:me.det.name},function(r,rt){kb.list.run()});});}
+this.make();}
+EditableText=function(args){$.extend(this,args);var me=this;me.$w=$(repl('<div class="ed-text">\
+ <div class="ed-text-display %(disp_class)s"></div>\
+ <a class="ed-text-edit" style="cursor: pointer; float: right; margin-top: -16px;">[edit]</a>\
+ <textarea class="ed-text-input %(inp_class)s hide"></textarea>\
+ <div class="help hide"><br>Formatted as <a href="http://en.wikipedia.org/wiki/Markdown#Syntax_examples"\
+ target="_blank">markdown</a></div>\
+ <button class="btn btn-small btn-info hide ed-text-save">Save</button>\
+ <a class="ed-text-cancel hide" style="cursor: pointer;">Cancel</a>\
+ </div>',args)).appendTo(me.parent);this.set_display=function(txt){me.$w.find('.ed-text-display').html(wn.markdown(txt));me.text=txt;}
+this.set_display(me.text);if(me.height)me.$w.find('.ed-text-input').css('height',me.height);me.$w.find('.ed-text-edit').click(function(){me.$w.find('.ed-text-input').val(me.text);me.show_as_input();})
+me.$w.find('.ed-text-save').click(function(){var v=me.$w.find('.ed-text-input').val();if(!v){msgprint('Please write something!');return;}
+var btn=this;$(btn).set_working();$c_page('utilities','question_view','update_item',{dt:me.dt,dn:me.dn,fn:me.fieldname,text:v},function(r){$(btn).done_working();if(r.exc){msgprint(r.exc);return;}
+me.set_display(v);me.show_as_text();});})
+me.$w.find('.ed-text-cancel').click(function(){me.show_as_text();})
+this.show_as_text=function(){me.$w.find('.ed-text-display, .ed-text-edit').toggle(true);me.$w.find('.ed-text-input, .ed-text-save, .ed-text-cancel, .help').toggle(false);}
+this.show_as_input=function(){me.$w.find('.ed-text-display, .ed-text-edit').toggle(false);me.$w.find('.ed-text-input, .ed-text-save, .ed-text-cancel, .help').toggle(true);}}
\ No newline at end of file
diff --git a/public/js/product_category.js b/public/js/product_category.js
new file mode 100644
index 0000000..aac872f
--- /dev/null
+++ b/public/js/product_category.js
@@ -0,0 +1,7 @@
+
+/*
+ * erpnext/website/js/product_category.js
+ */
+erpnext.make_product_categories=function(wrapper){wrapper.category_list=new wn.ui.Listing({parent:$(wrapper).find('.more-categories').get(0),query:'select count(name) as items, item_group \
+ from tabItem where is_sales_item="Yes" \
+ group by item_group order by items desc',hide_refresh:true,render_row:function(parent,data){parent.innerHTML=repl('<a href="#!products/%(item_group)s">%(item_group)s</a> (%(items)s)',data);}});wrapper.category_list.run();}
\ No newline at end of file