Merge branch 'responsive' of github.com:webnotes/erpnext into responsive
diff --git a/docs/docs.dev.install.debian.md b/docs/docs.dev.install.debian.md
new file mode 100644
index 0000000..f140f29
--- /dev/null
+++ b/docs/docs.dev.install.debian.md
@@ -0,0 +1,25 @@
+---
+{
+	"_label": "ERPNext Pre-requisites for Debian systems (Unbuntu)"
+}
+---
+#### If not root user
+`sudo su`
+
+#### Installing Pre-Requisites
+
+	cd ~
+	apt-get install python python-setuptools python-mysqldb apache2 mysql-server libmysqlclient-dev git memcached -y
+	easy_install pip
+	pip install pytz python-dateutil jinja2 markdown2 termcolor python-memcached requests chardet dropbox google-api-python-client pygeoip
+	a2enmod rewrite
+	service apache2 start
+	service mysql start
+	memcached -d -l 127.0.0.1 -p 11211 -m 64 -u www-data 
+
+> ```memcached -d -l 127.0.0.1 -p 11211 -m [64 or more mb of ram] -u apache ```
+
+#### Other useful programs
+
+	apt-get install ntp vim screen htop -y
+	service ntpd start
diff --git a/docs/docs.dev.install.md b/docs/docs.dev.install.md
new file mode 100644
index 0000000..5564fff
--- /dev/null
+++ b/docs/docs.dev.install.md
@@ -0,0 +1,141 @@
+---
+{
+	"_label": "How to Install ERPNext",
+	"_toc": [
+		"docs.dev.install.red_hat",
+		"docs.dev.install.debian"
+	]
+}
+---
+
+> These are instructions that will help you to install ERPNext on your Unix like system (Linux / Ubuntu / MacOS) using the Terminal. If you are looking at easier ways to evaluate ERPNext, [see this page](docs.user.intro.try.html).
+
+1. You will need some linux background to be able to install this on your system.
+1. These are high-level instructions and by no means cover every installation issue.
+
+### Pre-requisites:
+
+* any unix based os
+* python 2.6+ (python 3+ not supported)
+* apache
+* mysql 5+
+* git
+* python libraries:
+    * python MySQLdb
+    * pytz
+    * jinja2
+    * markdown2
+    * dateutil
+    * termcolor
+    * python-memcached
+    * requests
+    * chardet
+    * pygeoip
+    * dropbox
+    * google-api-python-client
+* memcached
+
+## Fresh Installation
+
+### Steps: [using terminal]
+
+#### Get the Install Script
+
+Download the standard install script and install. This script will:
+
+- Create `app` and `lib` folders.
+- Clone the code repositories for `wnframework` and `erpnext` from GitHub. It is important to clone the repositories from GitHub rather than just downloading the code, because this will help you in upgrading the system.
+- Create the database.
+- Create a default `erpnext.conf` Apache configuration file for ERPnext.
+- Create the standard wnframework configuration file `conf.py`
+- Build the `public` folder from which the ERPNext client application will be served via Apache and CGI.
+
+**Instructions**
+
+1. ensure mysql service is running
+1. create a folder where you want to install erpnext
+1. go to the new folder
+1. `wget https://github.com/webnotes/erpnext/blob/master/install_erpnext.py`
+1. `python install_erpnext.py`
+
+#### Setup Apache
+
+1. check your apache/httpd user and group. Most often it is either `apache` or `_www`. This can be found in its conf file.
+1. run `chown -R apache:apache *` or `chown -R _www:_www *`. This will make the erpnext folder accessible to apache webserver.
+1. create erpnext.conf file in erpnext folder and paste a modified version of apache configuration file as shown in the example below. (You will need to change the values in square brackets)
+    * For debian systems, `sudo ln -s [PATH TO ERPNEXT INSTALLATION]/erpnext.conf /etc/apache2/sites-enabled/erpnext.conf`
+    * For redhat systems, `sudo ln -s [PATH TO ERPNEXT INSTALLATION]/erpnext.conf /etc/httpd/conf.d/erpnext.conf`
+1. restart apache service
+1. if firewall exists, run
+```
+iptables -I INPUT 1 -p tcp --dport 8080 -j ACCEPT
+service iptables save
+```
+
+### Setup Schueduler
+
+1. setup cron using `crontab -e` and enter the following and then save it:
+```
+*/3 * * * * cd [PATH TO ERPNEXT INSTALLATION] && python lib/wnf.py --run_scheduler >> /var/log/erpnext-sch.log 2>&1
+0 */6 * * * cd [PATH TO ERPNEXT INSTALLATION] && python lib/wnf.py --backup >> /var/log/erpnext-backup.log 2>&1
+```
+
+### Start
+
+1. go to erpnext folder and run `lib/wnf.py --domain localhost:8080`
+1. start your browser and go to http://localhost:8080
+1. login as user: Administrator and password: admin
+
+> If you are installing on your server for deployment, remember to change Administrator's password!
+
+### What to write in apache configuration file? 
+
+	Listen 8080
+	NameVirtualHost *:8080
+	<VirtualHost *:8080>
+		ServerName localhost
+		DocumentRoot [PATH TO ERPNEXT INSTALLATION]/public/
+		
+		AddHandler cgi-script .cgi .xml .py
+		AddType application/vnd.ms-fontobject .eot
+		AddType font/ttf .ttf
+		AddType font/otf .otf
+		AddType application/x-font-woff .woff
+
+		<Directory [PATH TO ERPNEXT INSTALLATION]/public/>
+			# directory specific options
+			Options -Indexes +FollowSymLinks +ExecCGI
+		
+			# directory's index file
+			DirectoryIndex web.py
+			
+			AllowOverride all
+			Order Allow,Deny
+			Allow from all
+
+			# rewrite rule
+			RewriteEngine on
+			RewriteCond %{REQUEST_FILENAME} !-f
+			RewriteCond %{REQUEST_FILENAME} !-d
+			RewriteCond %{REQUEST_FILENAME} !-l
+			RewriteRule ^([^/]+)$ /web.py?page=$1 [QSA,L]		
+		</Directory>
+	</VirtualHost>
+
+## Upgrade / run latest patches
+
+1. Backup your database!
+1. go to Setup > Update This Application [under Update Manager]
+1. click on 'Get Latest Updates'
+
+
+#### If you cannot see this option (Update This Application), you will need to run a manual update once
+
+1. go your erpnext folder i.e. `cd /var/www/erpnext`
+1. run `lib/wnf.py --update origin master`
+1. run `chown -R apache:apache *` or `chown -R _www:_www *`. This will make the erpnext folder accessible to apache webserver.
+1. once done, you can use Setup > Update This Application, henceforth.
+
+---
+
+> Looking for a one click installer? Help us build one.
\ No newline at end of file
diff --git a/docs/docs.dev.install.red_hat.md b/docs/docs.dev.install.red_hat.md
new file mode 100644
index 0000000..17a6072
--- /dev/null
+++ b/docs/docs.dev.install.red_hat.md
@@ -0,0 +1,59 @@
+---
+{
+	"_label": "ERPNext Pre-requisites for Red Hat systems (CentOS, Fedora)"
+}
+---
+#### If not root user
+`sudo su`
+
+#### Installing Pre-Requisites
+
+	cd ~
+	yum update python -y
+	yum install python-setuptools MySQL-python httpd mysql mysql-server mysql-devel git memcached ntp vim -y
+	easy_install pip
+	pip install pytz python-dateutil jinja2 markdown2 termcolor python-memcached requests chardet dropbox google-api-python-client pygeoip
+	service httpd start
+	service mysqld start
+	service ntpd start
+	mysqladmin -u root password [NEW PASSWORD]
+
+#### memcached
+
+1. `vim /etc/sysconfig/memcached`
+1. change user to the apache user, change the cache size if desired (depending on available memory), save the file
+1. `service memcached start`
+
+#### set services to run when machine starts
+
+	chkconfig --level 2345 mysql on
+	chkconfig --level 2345 httpd on
+	chkconfig --level 2345 memcached on
+	chkconfig --level 2345 ntpd on
+
+#### Other useful programs
+
+wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
+rpm -i http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
+yum install htop screen -y
+
+--
+
+#### CPanel Users
+
+If you are using CPanel, you are likely to face perl dependency issues when installing git. To install git in this case, follow this procedure:
+
+1. `vim /etc/yum.conf`, remove perl* from exclude list and save the file
+1. `yum install git -y`
+1. `vim /etc/yum.conf`, add perl* back to exclude list and save the file
+
+> source: [http://forums.cpanel.net/f5/upcp-errors-due-dependeny-problems-centos-6-3-not-upgraded-centos-6-4-a-332102.html](http://forums.cpanel.net/f5/upcp-errors-due-dependeny-problems-centos-6-3-not-upgraded-centos-6-4-a-332102.html)
+
+CPanel users should follow these steps to set the apache configuration for ERPNext:
+
+1. `vim /etc/httpd/conf/includes/post_virtualhost_2.conf`
+1. add the line `Include [PATH TO ERPNEXT CONF FILE]` (example: /var/www/erpnext.conf) and save the file
+1. `vim [PATH TO ERPNEXT CONF FILE]`, set the apache configuration for ERPNext and save it
+1. `service httpd restart`
+
+*The mysql root password may be found at* `/root/.my.cnf`
\ No newline at end of file
diff --git a/docs/docs.dev.md b/docs/docs.dev.md
index 6c46abf..008391a 100644
--- a/docs/docs.dev.md
+++ b/docs/docs.dev.md
@@ -2,6 +2,7 @@
 {
 	"_label": "Developer API",
 	"_toc": [
+		"docs.dev.install",
 		"docs.dev.quickstart",
 		"docs.dev.framework",
 		"docs.dev.modules"
diff --git a/docs/docs.md b/docs/docs.md
index fa07dba..6000ec3 100644
--- a/docs/docs.md
+++ b/docs/docs.md
@@ -13,7 +13,6 @@
 }
 ---
 <br>
-<br>
 <h1 style="text-align: center">All-in-One Platform to Manage Your Organization.</h1>
 <h3 style="text-align: center; font-weight: normal; color: #888">100% Free and Open Source.</h1>
 <br>
diff --git a/docs/docs.user.ops.accounts.closing.md b/docs/docs.user.accounts.closing.md
similarity index 100%
rename from docs/docs.user.ops.accounts.closing.md
rename to docs/docs.user.accounts.closing.md
diff --git a/docs/docs.user.ops.accounts.journal_voucher.md b/docs/docs.user.accounts.journal_voucher.md
similarity index 100%
rename from docs/docs.user.ops.accounts.journal_voucher.md
rename to docs/docs.user.accounts.journal_voucher.md
diff --git a/docs/docs.user.accounts.md b/docs/docs.user.accounts.md
index b1f3b3a..57597cb 100644
--- a/docs/docs.user.accounts.md
+++ b/docs/docs.user.accounts.md
@@ -1,16 +1,42 @@
 ---
 {
-	"_label": "Accounts Module"
+	"_label": "Accounts"
 }
 ---
-You must have Accounts User or Accounts Manager role to use the Accounts Module.
+At end of the sales and purchase cycle is billing and payments. You may have an accountant in your team, or you may be doing accounting yourself or you may have outsourced your accounting. Financial accounting forms the core of any business management system like an ERP.
 
-To access the module, go to the Desktop and click on the "Accounts" Icon.
+In ERPNext, your accounting operations consists of 3 main transactions:
 
-> The desktop icons are draggable, so you may not see your module in the same order.
+- Sales Invoice: The bills that you raise to your Customers for the products or services you provide.

+- Purchase Invoice: Bills that your Suppliers give you for their products or services.

+- Journal Vouchers: For accounting entries, like payments, credit and other types.
 
-![Desktop: Accounts](img/desktop-accounts.png)
+---
 
-You will see the Accounts Module Home Page.
+### Accounting Basics
 
-![Accounts Home](img/accounts-home.png)
\ No newline at end of file
+#### Debit and Credit
+
+People new to accounting are often confused with the terms Debit and Credit. Contrary to their meaning, these terms have nothing to do with who owes what. 
+
+Debit and Credit are conventions. All accounting follows these so that it is easy to understand the state of finances in a universal manner. These conventions are:
+
+- All Accounts are of type Debit or Credit.
+- Assets and Expenses (and their sub-groups) are always Debit.
+- Liabilities and Income (and their sub-groups) are always Credit.
+- In all accounting entries, you “debit” an Account or “credit” one.
+- When you “debit” an Debit Account (an asset or expense), its value increases (“add” operation). When you “credit” a Debit Account, its value decreases (“subtract” operation). The same rule applies for Credit Accounts. “Crediting” a Credit Account, increases its value, “debiting” it decreases its value.
+- All accounting transactions (like a sales or a payment) must affect at least two different Accounts and sum of debits must be equal to sum of credits for the transaction. This is called the “double-entry bookkeeping system”.
+
+Still confused? These conventions will become clearer as you make transactions.
+
+#### Accrual System
+
+Another important concept to understand in Accounting is accrual. This is important when your payment happens separately from delivery. 
+
+For example you buy X from a Supplier and your Supplier sends you a bill and expects you to pay in, for example, seven days. Even if you have not yet paid your Supplier, your expense must be booked immediately. This expense is booked against a group of Accounts called “Accounts Payable” that is the sum of all your outstanding dues to your Suppliers. This is called accrual. When you pay your Supplier, you will cancel his dues and update your bank account.
+
+ERPNext works on an accrual system. The transactions that accrue income and expense are Sales Invoice and Purchase Invoice.
+
+In retail, typically, delivery and payment happens at the same time. To cover this scenario, we have in ERPNext a POS Invoice (POS = Point of Sales). More on that later.
+
diff --git a/docs/docs.user.ops.accounts.payments.md b/docs/docs.user.accounts.payments.md
similarity index 100%
rename from docs/docs.user.ops.accounts.payments.md
rename to docs/docs.user.accounts.payments.md
diff --git a/docs/docs.user.ops.accounts.pos.md b/docs/docs.user.accounts.pos.md
similarity index 100%
rename from docs/docs.user.ops.accounts.pos.md
rename to docs/docs.user.accounts.pos.md
diff --git a/docs/docs.user.ops.accounts.purchase_invoice.md b/docs/docs.user.accounts.purchase_invoice.md
similarity index 100%
rename from docs/docs.user.ops.accounts.purchase_invoice.md
rename to docs/docs.user.accounts.purchase_invoice.md
diff --git a/docs/docs.user.ops.accounts.reports.md b/docs/docs.user.accounts.reports.md
similarity index 100%
rename from docs/docs.user.ops.accounts.reports.md
rename to docs/docs.user.accounts.reports.md
diff --git a/docs/docs.user.ops.accounts.returns.md b/docs/docs.user.accounts.returns.md
similarity index 100%
rename from docs/docs.user.ops.accounts.returns.md
rename to docs/docs.user.accounts.returns.md
diff --git a/docs/docs.user.ops.accounts.sales_invoice.md b/docs/docs.user.accounts.sales_invoice.md
similarity index 100%
rename from docs/docs.user.ops.accounts.sales_invoice.md
rename to docs/docs.user.accounts.sales_invoice.md
diff --git a/docs/docs.user.ops.buying.material_request.md b/docs/docs.user.buying.material_request.md
similarity index 100%
rename from docs/docs.user.ops.buying.material_request.md
rename to docs/docs.user.buying.material_request.md
diff --git a/docs/docs.user.ops.buying.md b/docs/docs.user.buying.md
similarity index 72%
rename from docs/docs.user.ops.buying.md
rename to docs/docs.user.buying.md
index e54e1fc..a079323 100644
--- a/docs/docs.user.ops.buying.md
+++ b/docs/docs.user.buying.md
@@ -1,11 +1,6 @@
 ---
 {
-	"_label": "Buying",
-	"_toc": [
-		"docs.user.ops.buying.material_request",
-		"docs.user.ops.buying.supplier_quotation",
-		"docs.user.ops.buying.purchase_order"
-	]
+	"_label": "Buying"
 }
 ---
 If your business involves physical goods, buying is on of your core business activities. Your suppliers are as important as your customers and they must be provided with as much accurate information as possible.
diff --git a/docs/docs.user.ops.buying.purchase_order.md b/docs/docs.user.buying.purchase_order.md
similarity index 100%
rename from docs/docs.user.ops.buying.purchase_order.md
rename to docs/docs.user.buying.purchase_order.md
diff --git a/docs/docs.user.setup.supplier.md b/docs/docs.user.buying.supplier.md
similarity index 100%
rename from docs/docs.user.setup.supplier.md
rename to docs/docs.user.buying.supplier.md
diff --git a/docs/docs.user.ops.buying.supplier_quotation.md b/docs/docs.user.buying.supplier_quotation.md
similarity index 100%
rename from docs/docs.user.ops.buying.supplier_quotation.md
rename to docs/docs.user.buying.supplier_quotation.md
diff --git a/docs/docs.user.customize.md b/docs/docs.user.customize.md
index b1e9701..ec9c3b3 100644
--- a/docs/docs.user.customize.md
+++ b/docs/docs.user.customize.md
@@ -1,12 +1,6 @@
 ---
 {
-	"_label": "Customize ERPNext",
-	"_toc": [
-		"docs.user.customize.modules",
-		"docs.user.customize.custom_field",
-		"docs.user.customize.custom_form",
-		"docs.user.customize.print_format"
-	]
+	"_label": "Customize ERPNext"
 }
 ---
 ERPNext offers many tools to customize the system.
diff --git a/docs/docs.user.ops.hr.appraisal.md b/docs/docs.user.hr.appraisal.md
similarity index 100%
rename from docs/docs.user.ops.hr.appraisal.md
rename to docs/docs.user.hr.appraisal.md
diff --git a/docs/docs.user.ops.hr.employee.md b/docs/docs.user.hr.employee.md
similarity index 100%
rename from docs/docs.user.ops.hr.employee.md
rename to docs/docs.user.hr.employee.md
diff --git a/docs/docs.user.ops.hr.expense_claim.md b/docs/docs.user.hr.expense_claim.md
similarity index 100%
rename from docs/docs.user.ops.hr.expense_claim.md
rename to docs/docs.user.hr.expense_claim.md
diff --git a/docs/docs.user.ops.hr.leave.md b/docs/docs.user.hr.leave.md
similarity index 100%
rename from docs/docs.user.ops.hr.leave.md
rename to docs/docs.user.hr.leave.md
diff --git a/docs/docs.user.ops.hr.md b/docs/docs.user.hr.md
similarity index 80%
rename from docs/docs.user.ops.hr.md
rename to docs/docs.user.hr.md
index 95da44a..e585757 100644
--- a/docs/docs.user.ops.hr.md
+++ b/docs/docs.user.hr.md
@@ -1,14 +1,6 @@
 ---
 {
-	"_label": "Human Resource Management",
-	"_toc": [
-		"docs.user.ops.hr.setup",
-		"docs.user.ops.hr.employee",
-		"docs.user.ops.hr.leave",
-		"docs.user.ops.hr.expense_claim",
-		"docs.user.ops.hr.payroll",
-		"docs.user.ops.hr.appraisal"
-	]
+	"_label": "Human Resource Management"
 }
 ---
 The Human Resources (HR) Module covers the processes linked to administering a team of co-workers. Most common among this is processing payroll by using the Salary Manager to generate Salary Slips. Most countries have complex tax rules stating what expenses can the company made on behalf of Employees and also expect the company to deduct taxes and social security from their payroll.
diff --git a/docs/docs.user.ops.hr.payroll.md b/docs/docs.user.hr.payroll.md
similarity index 100%
rename from docs/docs.user.ops.hr.payroll.md
rename to docs/docs.user.hr.payroll.md
diff --git a/docs/docs.user.ops.hr.setup.md b/docs/docs.user.hr.setup.md
similarity index 100%
rename from docs/docs.user.ops.hr.setup.md
rename to docs/docs.user.hr.setup.md
diff --git a/docs/docs.user.intro.open_source.md b/docs/docs.user.intro.open_source.md
new file mode 100644
index 0000000..0979e38
--- /dev/null
+++ b/docs/docs.user.intro.open_source.md
@@ -0,0 +1,26 @@
+---
+{
+	"_label": "Open Source"
+}
+---
+What Open Source means is that there is no license on the software. The source code is open for anyone to understand, extend or improve and it is free!
+
+A non-software business might think why does Open Source matter, because they will pay some service provider to help them manage their ERP. The way it matters is that:
+
+1. You can choose to change your service provider anytime.
+1. You can host the application anywhere, including your own server so you have complete ownership and privacy of the data.
+1. There will always be a community to support you incase you need help and you are not dependant on only your service provider.
+1. The product is critiqued and used by a wide range of people who have reported hundreds of issues and suggestions to make the product better and this will always continue.
+
+---
+
+### Alternatives
+
+There are many Open Source ERPs you can consider. Popular among them are:
+
+1. OpenERP
+1. OpenBravo
+1. Apache OfBiz
+1. xTuple
+1. Compiere (and forks)
+
diff --git a/docs/docs.user.intro.try.md b/docs/docs.user.intro.try.md
new file mode 100644
index 0000000..64d6895
--- /dev/null
+++ b/docs/docs.user.intro.try.md
@@ -0,0 +1,39 @@
+---
+{
+	"_label":"Getting Started with ERPNext"
+}
+---
+There are many ways to get started with ERPNext.
+
+### 1. See the Demo
+
+If you just want to check out the user interface and **feel** the application, just see the demo at:
+
+- [https://demo.erpnext.com](https://demo.erpnext.com)
+
+### 2. Get a Free 30 day Trial at ERPNext.com
+
+If you like the feel and want to setup your own company, you can try a 30 day free trial (on credit card details required) at ERPNext.com
+
+ERPNext.com is managed by the organization (Web Notes) that publishes ERPNext and you can do a trial run with your own account by [signing up on the website](https://erpnext.com/pricing-and-signup).
+
+You can also decide to host your application at ERPNext.com by buying the hosting plans. This way you also support the organization that has developed and keeps improving ERPNext. You also get one-to-one functional (usage) support with the hosting plans.
+
+### 3. Download a Virtual Machine
+
+To avoid the trouble of installing an instance, ERPNext is available as a Virtual Image (a full loaded operating system with ERPNext installed). You can use this on **any** platform including Microsoft Windows.
+
+[Click here to see instructions on how to use the Virtual Image](docs.download.html)
+
+### 4. Install ERPNext on your Unix/Linux/Mac machine
+
+ERPNext reasonably easy to install on a Unix like operating system and requires:
+
+1. MySQL database
+1. Apache Web Server
+1. Python
+1. Memcached
+
+to be installed.
+
+[More instructions on this page](docs.dev.install.html).
\ No newline at end of file
diff --git a/docs/docs.user.md b/docs/docs.user.md
index a1b3ddf..4dc9145 100644
--- a/docs/docs.user.md
+++ b/docs/docs.user.md
@@ -1,15 +1,122 @@
 ---
 {
-	"_label": "User Guide",
-	"_toc": [
-		"docs.user.intro",
-		"docs.user.setup",
-		"docs.user.ops",
-		"docs.user.website",
-		"docs.user.tools",
-		"docs.user.reports",
-		"docs.user.customize"
-	]
+	"_label": "User Guide"
 }
 ---
 This manual covers all the major processes in setting up and using ERPNext. The manual is written in a way that the user can manage a self-implementation of the ERP. We recommend that the manual be read first before starting implementation.
+
+Contents
+
+1. [Introduction](docs.user.intro.html)
+	1. [Open Source](docs.user.intro.open_source.html)
+	1. [Ways to get started](docs.user.intro.try.html)
+	1. [Installation](docs.dev.install.html)
+		1. [Pre-requisites for Red Hat Systems](docs.dev.install.red_hat.html)
+		1. [Pre-requisites for Debain Systems](docs.dev.install.debian.html)
+	1. [Getting Help](docs.user.help.html)
+1. Implementation
+	1. [Before you Start](docs.user.setup.before.html)
+	1. [Implementation Strategy](docs.user.setup.strategy.html)
+1. [Setup](docs.user.setup.html)
+	1. [First Login](docs.user.setup.first.html)
+	1. [Chart of Accounts](docs.user.setup.accounting.html)
+	1. [Chart of Cost Centers](docs.user.setup.cost_centers.html)
+	1. [Company Setup](docs.user.setup.company.html)
+	1. [Adding Users](docs.user.setup.users.html)
+	1. [Permissions](docs.user.setup.permissions.html)
+	1. [Workflows](docs.user.setup.workflows.html)
+	1. [Letter Heads](docs.user.setup.letter_head.html)
+	1. [Print Headings](docs.user.setup.print_headings.html)
+	1. [Numbering Series](docs.user.setup.series.html)
+	1. [Global Defaults](docs.user.setup.global_defaults.html)
+	1. [Importing Data](docs.user.setup.data_import.html)
+	1. [Email Settings](docs.user.setup.email.html)
+	1. [SMS Settings](docs.user.setup.sms.html)
+	1. [Setting up Taxes](docs.user.setup.taxes.html)
+	1. [Price Lists](docs.user.setup.price_lists.html)
+	1. [Adding Opening Entries](docs.user.setup.opening.html)
+1. [Selling](docs.user.selling.html)
+	1. Selling Setup
+		1. [Customer Group](docs.user.selling.customer_groups.html)
+		1. [Territory](docs.user.selling.territory.html)
+		1. [Sales Partner](docs.user.selling.sales_partner.html)
+		1. [Sales Person](docs.user.selling.sales_person.html)
+		1. [Campaign](docs.user.selling.campaign.html)
+		1. [Terms and Conditions](docs.user.selling.terms.html)
+		1. [Price Lists](docs.user.setup.price_lists.html)
+	1. [Customers](docs.user.selling.customer.html)
+	1. [Lead](docs.user.selling.lead.html)
+	1. [Opportunity](docs.user.selling.opportunity.html)
+	1. [Quotation](docs.user.selling.quotation.html)
+	1. [Sales Order](docs.user.selling.sales_order.html)
+1. [Buying](docs.user.buying.html)
+	1. [Supplier Type](docs.user.buying.supplier_type.html)
+	1. [Supplier](docs.user.buying.supplier.html)
+	1. [Material Request](docs.user.buying.material_request.html)
+	1. [Supplier Quotation](docs.user.buying.supplier_quotation.html)
+	1. [Purchase Order](docs.user.buying.purchase_order.html)
+	1. [Purchase Taxes](docs.user.buying.purchase_taxes.html)
+	1. [Price Lists](docs.user.setup.price_lists.html)
+	1. [Sub Contracting](docs.user.stock.sub_contracting.html)
+1. [Stock (Inventory)](docs.user.stock.html)
+	1. [Warehouse](docs.user.stock.item.html)
+	1. [Item Group](docs.user.stock.item_group.html)
+	1. [Item](docs.user.stock.item.html)
+	1. [Serialized Inventory](docs.user.stock.serialized.html)
+	1. [Purchase Receipt](docs.user.stock.purchase_receipt.html)
+	1. [Delivery Note](docs.user.stock.delivery_note.html)
+	1. [Stock Entry / Material Transfer](docs.user.stock.stock_entry.html)
+	1. [Material Issue](docs.user.stock.material_issue.html)
+	1. [Material Issue](docs.user.stock.material_issue.html)
+	1. [Sales Return](docs.user.stock.sales_return.html)
+	1. [Purchase Return](docs.user.stock.sales_return.html)
+1. [Accounting](docs,user.accounting.html)
+	1. [Chart of Accounts](docs.user.setup.accounting.html)
+	1. [Chart of Cost Centers](docs.user.setup.cost_centers.html)
+	1. [Sales Invoice](docs.user.accounts.sales_invoice.html)
+	1. [Purchase Invoice](docs.user.accounts.purchase_invoice.html)
+	1. [Payment Entry](docs.user.accounts.payments.html)
+	1. [Journal Voucher](docs.user.accounts.journal_voucher.html)
+	1. [Opening Entry](docs.user.accounts.opening_entry.html)
+	1. [Period Closing](docs.user.accounts.closing.html)
+	1. [Accounting Reports](docs.user.accounts.reports.html)
+	1. [Upload Journal Entries in Bulk](docs.user.accounts.voucher_import.html)
+1. [Human Resources (HR)](docs.user.hr.html)
+	1. [HR Setup](docs.user.hr.setup.html)
+	1. [Employee](docs.user.hr.employee.html)
+	1. [Leave Management](docs.user.hr.leave.html)
+	1. [Attendance](docs.user.hr.attendance.html)
+	1. [Salary and Payroll](docs.user.hr.payroll.html)
+	1. [Expense Claim](docs.user.hr.expense_claim.html)
+	1. [Appraisal](docs.user.hr.appraisal.html)
+1. [Manufacturing](docs.user.mfg.html)
+	1. [Bill of Materials](docs.user.mfg.bom.html)
+	1. [Production Planning](docs.user.mfg.planning.html)
+	1. [Production Order](docs.user.mfg.production_order.html)
+1. [Customer Support and Maintenance](docs.user.mfg.html)
+	1. [Support Ticket](docs.user.support.support_ticket.html)
+	1. [Customer Issue](docs.user.support.customer_issue.html)
+	1. [Maintenance Schedule](docs.user.support.maintenance_schedule.html)
+	1. [Maintenance Visit](docs.user.support.maintenance_visit.html)
+	1. [Maintenance Schedule](docs.user.support.maintenance_schedule.html)
+1. [Projects](docs.user.projects.html)
+	1. [Projects](docs.user.projects.projects.html)
+	1. [Task](docs.user.projects.task.html)
+	1. [Time Log](docs.user.projects.time_log.html)
+1. [Website](docs.user.website.html)
+	1. [Setup](docs.user.website.setup.html)
+	1. [Web Pages](docs.user.website.web_page.html)
+	1. [Style](docs.user.website.style.html)
+	1. [Blog](docs.user.website.blog.html)
+	1. [Shopping Cart](docs.user.website.shopping_cart.html)
+1. [Tools](docs.user.tools.html)
+	1. [To Do](docs.user.tools.todo.html)
+	1. [Calendar](docs.user.tools.calendar.html)
+	1. [Assignments](docs.user.tools.assignment.html)
+	1. [Tags](docs.user.tools.tags.html)
+1. [Customize](docs.user.customize.html)
+	1. [Custom Fields](docs.user.customize.custom_field.html)
+	1. [Customize Form](docs.user.customize.custom_form.html)
+	1. [Hide / Unhide modules](docs.user.customize.module.html)
+	1. [Print Formats](docs.user.customize.print_formats.html)
+	1. [Custom Scripts](docs.user.customize.custom_scripts.html)
\ No newline at end of file
diff --git a/docs/docs.user.ops.mfg.bom.md b/docs/docs.user.mfg.bom.md
similarity index 100%
rename from docs/docs.user.ops.mfg.bom.md
rename to docs/docs.user.mfg.bom.md
diff --git a/docs/docs.user.ops.mfg.md b/docs/docs.user.mfg.md
similarity index 96%
rename from docs/docs.user.ops.mfg.md
rename to docs/docs.user.mfg.md
index fcf9c9f..50e0eeb 100644
--- a/docs/docs.user.ops.mfg.md
+++ b/docs/docs.user.mfg.md
@@ -1,11 +1,6 @@
 ---
 {
-	"_label": "Manufacturing",
-	"_toc": [
-		"docs.user.ops.mfg.bom",
-		"docs.user.ops.mfg.planning",
-		"docs.user.ops.mfg.production_order"
-	]
+	"_label": "Manufacturing"
 }
 ---
 The Manufacturing module in ERPNext helps you maintain multi-level Bill of Materials (BOMs) for your Items, help you in Product Costing, plan your production via Production Plan, create Production Orders for your manufacturing shop floor and plan your inventory by getting your material requirement via your BOMs (also called Material Requirements Planning MRP).
diff --git a/docs/docs.user.ops.mfg.planning.md b/docs/docs.user.mfg.planning.md
similarity index 100%
rename from docs/docs.user.ops.mfg.planning.md
rename to docs/docs.user.mfg.planning.md
diff --git a/docs/docs.user.ops.mfg.production_order.md b/docs/docs.user.mfg.production_order.md
similarity index 100%
rename from docs/docs.user.ops.mfg.production_order.md
rename to docs/docs.user.mfg.production_order.md
diff --git a/docs/docs.user.ops.accounts.md b/docs/docs.user.ops.accounts.md
deleted file mode 100644
index 855913b..0000000
--- a/docs/docs.user.ops.accounts.md
+++ /dev/null
@@ -1,52 +0,0 @@
----
-{
-	"_label": "Accounts",
-	"_toc": [
-		"docs.user.ops.accounts.sales_invoice",
-		"docs.user.ops.accounts.pos",
-		"docs.user.ops.accounts.purchase_invoice",
-		"docs.user.ops.accounts.journal_voucher",
-		"docs.user.ops.accounts.payments",
-		"docs.user.ops.accounts.returns",
-		"docs.user.ops.accounts.closing",
-		"docs.user.ops.accounts.reports"
-	]
-}
----
-At end of the sales and purchase cycle is billing and payments. You may have an accountant in your team, or you may be doing accounting yourself or you may have outsourced your accounting. Financial accounting forms the core of any business management system like an ERP.
-
-In ERPNext, your accounting operations consists of 3 main transactions:
-
-- Sales Invoice: The bills that you raise to your Customers for the products or services you provide.

-- Purchase Invoice: Bills that your Suppliers give you for their products or services.

-- Journal Vouchers: For accounting entries, like payments, credit and other types.
-
----
-
-### Accounting Basics
-
-#### Debit and Credit
-
-People new to accounting are often confused with the terms Debit and Credit. Contrary to their meaning, these terms have nothing to do with who owes what. 
-
-Debit and Credit are conventions. All accounting follows these so that it is easy to understand the state of finances in a universal manner. These conventions are:
-
-- All Accounts are of type Debit or Credit.
-- Assets and Expenses (and their sub-groups) are always Debit.
-- Liabilities and Income (and their sub-groups) are always Credit.
-- In all accounting entries, you “debit” an Account or “credit” one.
-- When you “debit” an Debit Account (an asset or expense), its value increases (“add” operation). When you “credit” a Debit Account, its value decreases (“subtract” operation). The same rule applies for Credit Accounts. “Crediting” a Credit Account, increases its value, “debiting” it decreases its value.
-- All accounting transactions (like a sales or a payment) must affect at least two different Accounts and sum of debits must be equal to sum of credits for the transaction. This is called the “double-entry bookkeeping system”.
-
-Still confused? These conventions will become clearer as you make transactions.
-
-#### Accrual System
-
-Another important concept to understand in Accounting is accrual. This is important when your payment happens separately from delivery. 
-
-For example you buy X from a Supplier and your Supplier sends you a bill and expects you to pay in, for example, seven days. Even if you have not yet paid your Supplier, your expense must be booked immediately. This expense is booked against a group of Accounts called “Accounts Payable” that is the sum of all your outstanding dues to your Suppliers. This is called accrual. When you pay your Supplier, you will cancel his dues and update your bank account.
-
-ERPNext works on an accrual system. The transactions that accrue income and expense are Sales Invoice and Purchase Invoice.
-
-In retail, typically, delivery and payment happens at the same time. To cover this scenario, we have in ERPNext a POS Invoice (POS = Point of Sales). More on that later.
-
diff --git a/docs/docs.user.ops.md b/docs/docs.user.ops.md
deleted file mode 100644
index 37d6026..0000000
--- a/docs/docs.user.ops.md
+++ /dev/null
@@ -1,15 +0,0 @@
----
-{
-	"_label": "Managing Operations in ERPNext",
-	"_toc": [
-		"docs.user.ops.selling",
-		"docs.user.ops.buying",
-		"docs.user.ops.inventory",
-		"docs.user.ops.accounts",
-		"docs.user.ops.mfg",
-		"docs.user.ops.projects",
-		"docs.user.ops.support",
-		"docs.user.ops.hr"
-	]
-}
----
\ No newline at end of file
diff --git a/docs/docs.user.ops.projects.md b/docs/docs.user.projects.md
similarity index 100%
rename from docs/docs.user.ops.projects.md
rename to docs/docs.user.projects.md
diff --git a/docs/docs.user.setup.customer.md b/docs/docs.user.selling.customer.md
similarity index 100%
rename from docs/docs.user.setup.customer.md
rename to docs/docs.user.selling.customer.md
diff --git a/docs/docs.user.ops.selling.lead.md b/docs/docs.user.selling.lead.md
similarity index 100%
rename from docs/docs.user.ops.selling.lead.md
rename to docs/docs.user.selling.lead.md
diff --git a/docs/docs.user.ops.selling.md b/docs/docs.user.selling.md
similarity index 73%
rename from docs/docs.user.ops.selling.md
rename to docs/docs.user.selling.md
index 006a0f5..56ca481 100644
--- a/docs/docs.user.ops.selling.md
+++ b/docs/docs.user.selling.md
@@ -1,12 +1,6 @@
 ---
 {
-	"_label": "Selling",
-	"_toc": [
-		"docs.user.ops.selling.lead",
-		"docs.user.ops.selling.opportunity",
-		"docs.user.ops.selling.quotation",
-		"docs.user.ops.selling.sales_order"
-	]
+	"_label": "Selling"
 }
 ---
 Selling is that the communication that happens with the customer the prior to and during the sale. You might be managing all the communication yourself or you may have a small team of sales people to handle this. ERPNext helps you track the communication leading up to the sale, by keeping all your documents in an organized and searchable manner.
diff --git a/docs/docs.user.ops.selling.opportunity.md b/docs/docs.user.selling.opportunity.md
similarity index 100%
rename from docs/docs.user.ops.selling.opportunity.md
rename to docs/docs.user.selling.opportunity.md
diff --git a/docs/docs.user.ops.selling.quotation.md b/docs/docs.user.selling.quotation.md
similarity index 100%
rename from docs/docs.user.ops.selling.quotation.md
rename to docs/docs.user.selling.quotation.md
diff --git a/docs/docs.user.ops.selling.sales_order.md b/docs/docs.user.selling.sales_order.md
similarity index 100%
rename from docs/docs.user.ops.selling.sales_order.md
rename to docs/docs.user.selling.sales_order.md
diff --git a/docs/docs.user.setup.before.md b/docs/docs.user.setup.before.md
index 158890f..d16ba0d 100644
--- a/docs/docs.user.setup.before.md
+++ b/docs/docs.user.setup.before.md
@@ -4,8 +4,6 @@
 	"_title_image": "img/before-we-start.png"
 }
 ---
-## Before We Start
-
 We have seem dozens of ERP implementations over the past few years and we realize that successful implementations are a lot about intangibles and attitude. 
 
 > The Benefits come Later
diff --git a/docs/docs.user.setup.md b/docs/docs.user.setup.md
index a33e34f..eda32c2 100644
--- a/docs/docs.user.setup.md
+++ b/docs/docs.user.setup.md
@@ -1,23 +1,6 @@
 ---
 {
-	"_label": "Setting Up",
-	"_toc": [
-		"docs.user.setup.before",
-		"docs.user.setup.strategy",
-		"docs.user.setup.first",
-		"docs.user.setup.accounting",
-		"docs.user.setup.cost_centers",
-		"docs.user.setup.item",
-		"docs.user.setup.customer",
-		"docs.user.setup.supplier",
-		"docs.user.setup.taxes",
-		"docs.user.setup.series",
-		"docs.user.setup.email",
-		"docs.user.setup.permissions",
-		"docs.user.setup.letter_head",
-		"docs.user.setup.data_import",
-		"docs.user.setup.opening"
-	]
+	"_label": "Setting Up"
 }
 ---
 Setting up an ERP system is like starting your business all over again, but in the virtual
diff --git a/docs/docs.user.ops.inventory.delivery_note.md b/docs/docs.user.stock.delivery_note.md
similarity index 100%
rename from docs/docs.user.ops.inventory.delivery_note.md
rename to docs/docs.user.stock.delivery_note.md
diff --git a/docs/docs.user.setup.item.md b/docs/docs.user.stock.item.md
similarity index 100%
rename from docs/docs.user.setup.item.md
rename to docs/docs.user.stock.item.md
diff --git a/docs/docs.user.ops.inventory.md b/docs/docs.user.stock.md
similarity index 86%
rename from docs/docs.user.ops.inventory.md
rename to docs/docs.user.stock.md
index 4576f24..eeb4e8a 100644
--- a/docs/docs.user.ops.inventory.md
+++ b/docs/docs.user.stock.md
@@ -1,13 +1,6 @@
 ---
 {
-	"_label": "Inventory",
-	"_toc": [
-		"docs.user.ops.inventory.purchase_receipt",
-		"docs.user.ops.inventory.delivery_note",
-		"docs.user.ops.inventory.stock_entry",
-		"docs.user.ops.inventory.sub_contracting",
-		"docs.user.ops.inventory.serialized"
-	]
+	"_label": "Stock / Inventory"
 }
 ---
 For most small business that deal in physical goods, a large part of their net worth is invested in the stock in hand. 
diff --git a/docs/docs.user.ops.inventory.purchase_receipt.md b/docs/docs.user.stock.purchase_receipt.md
similarity index 100%
rename from docs/docs.user.ops.inventory.purchase_receipt.md
rename to docs/docs.user.stock.purchase_receipt.md
diff --git a/docs/docs.user.ops.inventory.serialized.md b/docs/docs.user.stock.serialized.md
similarity index 100%
rename from docs/docs.user.ops.inventory.serialized.md
rename to docs/docs.user.stock.serialized.md
diff --git a/docs/docs.user.ops.inventory.stock_entry.md b/docs/docs.user.stock.stock_entry.md
similarity index 100%
rename from docs/docs.user.ops.inventory.stock_entry.md
rename to docs/docs.user.stock.stock_entry.md
diff --git a/docs/docs.user.ops.inventory.sub_contracting.md b/docs/docs.user.stock.sub_contracting.md
similarity index 100%
rename from docs/docs.user.ops.inventory.sub_contracting.md
rename to docs/docs.user.stock.sub_contracting.md
diff --git a/docs/docs.user.ops.support.customer_issue.md b/docs/docs.user.support.customer_issue.md
similarity index 100%
rename from docs/docs.user.ops.support.customer_issue.md
rename to docs/docs.user.support.customer_issue.md
diff --git a/docs/docs.user.ops.support.maintenance_schedule.md b/docs/docs.user.support.maintenance_schedule.md
similarity index 100%
rename from docs/docs.user.ops.support.maintenance_schedule.md
rename to docs/docs.user.support.maintenance_schedule.md
diff --git a/docs/docs.user.ops.support.maintenance_visit.md b/docs/docs.user.support.maintenance_visit.md
similarity index 100%
rename from docs/docs.user.ops.support.maintenance_visit.md
rename to docs/docs.user.support.maintenance_visit.md
diff --git a/docs/docs.user.ops.support.md b/docs/docs.user.support.md
similarity index 100%
rename from docs/docs.user.ops.support.md
rename to docs/docs.user.support.md
diff --git a/docs/docs.user.ops.support.support_ticket.md b/docs/docs.user.support.support_ticket.md
similarity index 100%
rename from docs/docs.user.ops.support.support_ticket.md
rename to docs/docs.user.support.support_ticket.md
diff --git a/install_erpnext.py b/install_erpnext.py
new file mode 100644
index 0000000..badb4dd
--- /dev/null
+++ b/install_erpnext.py
@@ -0,0 +1,170 @@
+#!/usr/bin/python
+from __future__ import unicode_literals
+import os, commands, sys
+
+def install():
+	# get required details
+	root_pwd = get_root_password()
+	db_name, db_pwd = get_new_db_details()
+	
+	# install path
+	install_path = os.getcwd()
+	
+	setup_folders(install_path)
+	
+	setup_conf(install_path, db_name, db_pwd)
+	
+	# setup paths
+	sys.path.append('.')
+	sys.path.append('lib')
+	sys.path.append('app')
+	
+	setup_db(install_path, root_pwd, db_name)
+	
+	apply_patches(install_path)
+	
+	show_remaining_steps()
+	
+def setup_folders(path):
+	execute_in_shell("git clone git://github.com/webnotes/wnframework.git lib", verbose=1)
+	execute_in_shell("git clone git://github.com/webnotes/erpnext.git app", verbose=1)
+	public = os.path.join(path, "public")
+	os.mkdir(public)
+	os.mkdir(os.path.join(public, "files"))
+	os.mkdir(os.path.join(public, "backups"))
+	os.mkdir(os.path.join(path, "logs"))
+	
+def setup_conf(path, db_name, db_pwd):
+	# read template conf file
+	with open(os.path.join(path, 'lib', 'conf', 'conf.py'), 'r') as template:
+		content = template.read()
+
+	# manipulate content
+	import re
+
+	# set new_dbname, new_dbpassword, files_path, backup_path, log_file_name
+	content = re.sub("db_name.*", "db_name = '%s'" % db_name, content)
+	content = re.sub("db_password.*", "db_password = '%s'" % db_pwd, content)
+
+	# write conf file
+	with open(os.path.join(path, 'conf.py'), 'w') as new_conf:
+		new_conf.write(content)
+	
+def setup_db(path, root_pwd, db_name):
+	source = os.path.join(path, 'app', "master.sql")
+	execute_in_shell("gunzip -c %s.gz > %s" % (source, source), verbose=1)
+
+	from webnotes.install_lib.install import Installer
+	inst = Installer('root', root_pwd)
+	inst.import_from_db(db_name, source_path=source, verbose = 1)
+	execute_in_shell("rm %s" % source)
+	
+def apply_patches(path):
+	# need to build before patches, once, so that all-web.js and all-web.css exists
+	execute_in_shell("./lib/wnf.py -b", verbose=1)
+	execute_in_shell("./lib/wnf.py --patch_sync_build", verbose=1)
+	
+	# set filemode false
+	execute_in_shell("cd app && git config core.filemode false", verbose=1)
+	execute_in_shell("cd lib && git config core.filemode false", verbose=1)
+	
+def get_root_password():
+	# 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(root_pwd)
+	
+	return root_pwd
+	
+def test_root_connection(root_pwd):
+	err, out = execute_in_shell("mysql -u root -p%s -e 'exit'" % \
+		root_pwd.replace('$', '\$').replace(' ', '\ '))
+	if "access denied" in out.lower():
+		raise Exception("Incorrect MySQL Root user's password")
+	
+def get_new_db_details():
+	return get_input("New ERPNext Database Name: "), \
+		get_input("New ERPNext Database's Password: ")
+	
+def get_input(msg):
+	val = None
+	while not val:
+		val = raw_input(msg)
+	return val
+
+def show_remaining_steps():
+	steps_remaining = """
+	Notes:
+	------
+
+	sample apache conf file
+	#-----------------------------------------------------------
+	SetEnv PYTHON_EGG_CACHE /var/www
+
+	# you can change 99 to any other port
+
+	Listen 99
+	NameVirtualHost *:99
+	<VirtualHost *:99>
+		ServerName localhost
+		DocumentRoot {path to erpnext's folder}/public
+	    AddHandler cgi-script .cgi .xml .py
+
+		<Directory {path to erpnext's folder}/public/>
+			# directory specific options
+			Options -Indexes +FollowSymLinks +ExecCGI
+
+			# directory's index file
+			DirectoryIndex web.py
+
+			# rewrite rule
+			RewriteEngine on
+
+			# condition 1:
+			# ignore login-page.html, app.html, blank.html, unsupported.html
+			RewriteCond %{REQUEST_URI} ^((?!app\.html|blank\.html|unsupported\.html).)*$
+
+			# condition 2: if there are no slashes
+			# and file is .html or does not containt a .
+			RewriteCond %{REQUEST_URI} ^(?!.+/)((.+\.html)|([^.]+))$
+
+			# rewrite if both of the above conditions are true
+			RewriteRule ^(.+)$ web.py?page=$1 [NC,L]
+
+			AllowOverride all
+			Order Allow,Deny
+			Allow from all
+		</Directory>
+	</VirtualHost>
+	#-----------------------------------------------------------
+
+	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
+
+def execute_in_shell(cmd, verbose=0):
+	# using Popen instead of os.system - as recommended by python docs
+	from subprocess import Popen, PIPE
+	p = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE)
+
+	# get err and output
+	err, out = p.stderr.read(), p.stdout.read()
+
+	if verbose:
+		if err: print err
+		if out: print out
+
+	return err, out
+
+if __name__=="__main__":
+	install()
\ No newline at end of file