[minor] merged with master branch

This commit is contained in:
Nabin Hait 2013-09-17 10:30:24 +05:30
commit 5cd1d54347
134 changed files with 5280 additions and 549 deletions

View File

@ -1,13 +1,30 @@
# Contributing to ERPNext
### Reporting issues
## Reporting issues
We only accept issues that are bug reports or feature requests. Bugs must be isolated and reproducible problems. Please read the following guidelines before opening any issue.
1. **Search for existing issues.** We want to avoid duplication, and you'd help us out a lot by first checking if someone else has reported the same issue. Moreover, the issue may have already been resolved with a fix available.
1. **Share as much information as possible.** Include operating system and version, browser and version, when did you last update ERPNext, how is it customized, etc. where appropriate. Also include steps to reproduce the bug.
1. **Search for existing issues.** We want to avoid duplication, and you'd help us out a lot by first checking if someone else has reported the same issue. The issue may have already been resolved with a fix available.
### New Features
### Issues
1. **Share as much information as possible.** Include operating system and version, browser and version, when did you last update ERPNext, how is it customized, etc. where appropriate. Also include steps to reproduce the bug.
1. Consider adding screenshots annotated with what goes wrong.
1. If you are reporting an issue from the browser, Open the Javascript Console and paste us any error messages you see.
### Feature Requests
1. We need as much information you can to consider a feature request.
1. Think about **how** you want us to build the feature. Consider including:
1. Mockups (wireframes of features)
1. Screenshots (annotated with what should change)
1. Screenshots from other products if you want us to implement features present in other products.
1. Basically, the more you help us, the faster your request is likely to be completed.
1. A one line feature request like **Implement Capacity Planning** will be closed.
## Pull Requests
General guidelines for sending pull requests:
#### Don't Repeat Yourself (DRY)
@ -20,6 +37,10 @@ that function to accommodate your use case.
DocTypes are easy to create but hard to maintain. If you find that there is a another DocType with a similar functionality, then please try and extend that functionality. For example, by adding a "type" field to classify the new type of record.
#### Don't Send Trivial Requests
Don't send pull requests for fixing a simple typo in a code comment.
#### Tabs or spaces?
Tabs!

View File

@ -2,14 +2,14 @@
{
"creation": "2011-12-21 11:08:55",
"docstatus": 0,
"modified": "2013-08-30 12:46:21",
"modified": "2013-09-13 17:17:47",
"modified_by": "Administrator",
"owner": "Administrator"
},
{
"doc_type": "Sales Invoice",
"doctype": "Print Format",
"html": "<html>\n<head>\n<!--Item Table, Totals and Other Charges-->\n<script>\nfunction get_print_format() {\n\tvar oc = getchildren('Sales Invoice Item', doc.name, 'entries');\n\tvar rows = '<table width=\"100%\" cellpadding=\"0\" class=\"cart\">\\\n <tr>\\\n <td colspan=\"3\"><hr></td>\\\n </tr>\\\n <tr>\\\n <td width=\"60%\" align=\"left\">ITEM CODE/DESC.</td>\\\n <td width=\"10%\" align=\"right\">QTY</td>\\\n <td width=\"30%\" align=\"right\">RATE</td>\\\n </tr>\\\n <tr>\\\n <td colspan=\"3\"><hr></td>\\\n </tr>';\n\tfor (var x=0; x<oc.length; x++) {\n\t\trows += '<tr>\\\n <td align=\"left\">' + oc[x].item_code + '<br>' + oc[x].item_name + '</td>\\\n <td align=\"right\" style=\"vertical-align:top;\">' + oc[x].qty + '</td>\\\n <td align=\"right\" valign=\"top\">' + format_currency(oc[x].export_amount) + '</td>\\\n </tr>';\n\t}\n rows += '<tr>\\\n <td colspan=\"3\"><hr></td>\\\n </tr>\\\n <tr>\\\n <td colspan=\"2\" align=\"right\">Net Total</td>\\\n <td align=\"right\">' + format_currency(doc.net_total_export) + '</td>\\\n </tr>';\n if (doc.other_charges_total_export != 0) {\n var taxes = wn.model.get_children(\"Sales Taxes and Charges\", doc.name, \"other_charges\", \"Sales Invoice\");\n\t\t$.each(taxes, function(i, d) {\n\t\t\trows += '<tr>\\\n \t\t\t\t<td colspan=\"2\" align=\"right\">' + d.description + '</td>\\\n \t\t\t\t<td style=\"text-align: right;\">' + format_currency(d.tax_amount) + '</td>\\\n \t\t\t<tr>';\n\t\t});\n }\n rows += '<tr>\\\n <td colspan=\"2\" align=\"right\" style=\"vertical-align:middle;\">Grand Total</td>\\\n <td align=\"right\"><hr width=\"90%\" align=\"right\">' + format_currency(doc.grand_total_export) + '<br>\\\n <hr width=\"90%\" align=\"right\"></td>\\\n </tr>\\\n <tr>\\\n <td align=\"center\" colspan=\"3\">Thank You. Please visit again.</td>\\\n </tr>\\\n </table>';\n\treturn rows;\n}\n</script>\n<style>\n table, tr, td, div, p {\n font-family: Monospace;\n line-height: 200%;\n }\n h1, h2, h3, h4, h5, h6 {\n text-align: center;\n }\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 4in;\n\t\t}\n\t}\n</style>\n</head>\n\n<body>\n<table width=\"100%\" cellpadding=\"4\">\n <tr>\n <td align=\"left\">RECEIPT NO: <script>doc.name</script></td>\n <td align=\"right\">DATE: <script>date.str_to_user(doc.posting_date)</script></td>\n </tr>\n <tr>\n <td>M/s <script>doc.customer</script></td>\n </tr>\n</table>\n<!--Item Table & Totals-->\n<div><script>get_print_format();</script></div>\n</body>\n</html>\n",
"html": "<html>\n<head>\n<!--Item Table, Totals and Other Charges-->\n<script>\nfunction get_print_format() {\n var oc = getchildren('Sales Invoice Item', doc.name, 'entries');\n\tvar rows = '<table width=\"100%\" cellpadding=\"0\" class=\"cart\">\\\n <tr>\\\n <td colspan=\"3\"><hr></td>\\\n </tr>\\\n <tr>\\\n <td width=\"60%\" align=\"left\">ITEM NAME.</td>\\\n <td width=\"10%\" align=\"right\">QTY</td>\\\n <td width=\"30%\" align=\"right\">AMOUNT</td>\\\n </tr>\\\n <tr>\\\n <td colspan=\"3\"><hr></td>\\\n </tr>';\n\tfor (var x=0; x<oc.length; x++) {\n console.log(oc[x].item_code!=oc[x].item_name);\n\t\trows += '<tr>\\\n <td align=\"left\">' + oc[x].item_code + \n (oc[x].item_code!=oc[x].item_name ? ('<br>' + oc[x].item_name) : '') + '</td>\\\n <td align=\"right\" style=\"vertical-align:top;\">' + oc[x].qty + '</td>\\\n <td align=\"right\" valign=\"top\">' + format_currency(oc[x].export_amount, doc.currency) + '</td>\\\n </tr>';\n\t}\n rows += '<tr>\\\n <td colspan=\"3\"><hr></td>\\\n </tr>\\\n <tr>\\\n <td colspan=\"2\" align=\"right\">Net Total</td>\\\n <td align=\"right\">' + format_currency(doc.net_total_export, doc.currency) + '</td>\\\n </tr>';\n if (doc.other_charges_total_export != 0) {\n var taxes = wn.model.get_children(\"Sales Taxes and Charges\", doc.name, \"other_charges\", \"Sales Invoice\");\n\t\t$.each(taxes, function(i, d) {\n\t\t\trows += '<tr>\\\n \t\t\t\t<td colspan=\"2\" align=\"right\">' + d.description + '</td>\\\n \t\t\t\t<td style=\"text-align: right;\">' + format_currency(d.tax_amount / doc.conversion_rate, doc.currency) + '</td>\\\n \t\t\t<tr>';\n\t\t});\n }\n rows += '<tr>\\\n <td colspan=\"2\" align=\"right\" style=\"vertical-align:middle;\">Grand Total</td>\\\n <td align=\"right\"><hr width=\"90%\" align=\"right\">' + format_currency(doc.grand_total_export, doc.currency) + '<br>\\\n <hr width=\"90%\" align=\"right\"></td>\\\n </tr>\\\n <tr>\\\n <td align=\"center\" colspan=\"3\">Thank You. Please visit again.</td>\\\n </tr>\\\n </table>';\n\treturn rows;\n}\n</script>\n<style>\n table, tr, td, div, p {\n font-family: Monospace;\n line-height: 200%;\n }\n h1, h2, h3, h4, h5, h6 {\n text-align: center;\n }\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 4in;\n\t\t}\n\t}\n</style>\n</head>\n\n<body>\n<table width=\"100%\" cellpadding=\"4\">\n <tr>\n <td align=\"left\">RECEIPT NO: <script>doc.name</script></td>\n <td align=\"right\">DATE: <script>date.str_to_user(doc.posting_date)</script></td>\n </tr>\n <tr>\n <td>M/s <script>doc.customer</script></td>\n </tr>\n</table>\n<!--Item Table & Totals-->\n<div><script>get_print_format();</script></div>\n</body>\n</html>\n",
"module": "Accounts",
"name": "__common__",
"print_format_type": "Client",

View File

@ -2,11 +2,12 @@
{
"creation": "2013-03-25 10:53:52",
"docstatus": 0,
"modified": "2013-08-08 14:21:56",
"modified": "2013-09-10 14:59:41",
"modified_by": "Administrator",
"owner": "Administrator"
},
{
"allow_import": 1,
"autoname": "naming_series:",
"doctype": "DocType",
"icon": "icon-file-text",

View File

@ -19,8 +19,10 @@ class DocType:
webnotes.conn.get_value("Account", self.doc.account, "debit_or_credit").lower() or ""
def get_voucher_details(self):
total_amount = webnotes.conn.sql("""select %s from `tabGL Entry`
where voucher_type = %s and voucher_no = %s and account = %s""" %
total_amount = webnotes.conn.sql("""select sum(%s) from `tabGL Entry`
where voucher_type = %s and voucher_no = %s
and account = %s and ifnull(is_cancelled, 'No') = 'No'""" %
(self.doc.account_type, '%s', '%s', '%s'),
(self.doc.voucher_type, self.doc.voucher_no, self.doc.account))

View File

@ -40,13 +40,15 @@ class DocType:
msgprint(_("Expense Account is mandatory"), raise_exception=1)
def validate_all_link_fields(self):
accounts = {"Account": [self.doc.cash_bank_account, self.doc.income_account, self.doc.expense_account], \
"Cost Center": [self.doc.cost_center], "Warehouse": [self.doc.warehouse]}
accounts = {"Account": [self.doc.cash_bank_account, self.doc.income_account,
self.doc.expense_account], "Cost Center": [self.doc.cost_center],
"Warehouse": [self.doc.warehouse]}
for link_dt, dn_list in accounts.items():
for link_dn in dn_list:
if not webnotes.conn.exists({"doctype": link_dt, "company": self.doc.company, "name": link_dn}):
msgprint(link_dn +_(" does not belong to ") + self.doc.company)
if link_dn and not webnotes.conn.exists({"doctype": link_dt,
"company": self.doc.company, "name": link_dn}):
webnotes.throw(link_dn +_(" does not belong to ") + self.doc.company)
def on_update(self):
webnotes.defaults.clear_default("is_pos")

View File

@ -339,7 +339,7 @@ erpnext.POS = Class.extend({
}
// if form is submitted & cancelled then disable all input box & buttons
if (cur_frm.doc.docstatus>=1) {
if (cur_frm.doc.docstatus>=1 && cint(cur_frm.doc.is_pos)) {
me.wrapper.find('input, button').each(function () {
$(this).prop('disabled', true);
});
@ -425,7 +425,7 @@ erpnext.POS = Class.extend({
dialog.show();
cur_frm.pos.barcode.$input.focus();
dialog.get_input("total_amount").attr("disabled", "disabled");
dialog.get_input("total_amount").prop("disabled", true);
dialog.fields_dict.pay.input.onclick = function() {
cur_frm.set_value("mode_of_payment", dialog.get_values().mode_of_payment);

View File

@ -27,10 +27,11 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
}
// toggle to pos view if is_pos is 1 in user_defaults
if (cint(wn.defaults.get_user_defaults("is_pos"))===1 || cur_frm.doc.is_pos) {
this.frm.set_value("is_pos", 1);
this.is_pos();
cur_frm.cscript.toggle_pos(true);
if ((cint(wn.defaults.get_user_defaults("is_pos"))===1 || cur_frm.doc.is_pos) &&
cint(wn.defaults.get_user_defaults("fs_pos_view"))===1) {
this.frm.set_value("is_pos", 1);
this.is_pos();
cur_frm.cscript.toggle_pos(true);
}
// if document is POS then change default print format to "POS Invoice"
@ -61,8 +62,18 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
if(cint(doc.update_stock)!=1)
cur_frm.add_custom_button('Make Delivery', cur_frm.cscript['Make Delivery Note']);
if(cint(doc.update_stock)!=1) {
// show Make Delivery Note button only if Sales Invoice is not created from Delivery Note
var from_delivery_note = false;
from_delivery_note = cur_frm.get_doclist({parentfield: "entries"})
.some(function(item) {
return item.delivery_note ? true : false;
});
if(!from_delivery_note)
cur_frm.add_custom_button('Make Delivery', cur_frm.cscript['Make Delivery Note']);
}
if(doc.outstanding_amount!=0)
cur_frm.add_custom_button('Make Payment Entry', cur_frm.cscript.make_bank_voucher);
@ -191,7 +202,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
flt(this.frm.doc.grand_total - this.frm.doc.paid_amount), precision("write_off_amount"));
}
this.frm.runclientscript("write_off_amount");
this.frm.script_manager.trigger("write_off_amount");
},
write_off_amount: function() {

View File

@ -259,6 +259,7 @@ class TestSalesInvoice(unittest.TestCase):
self.assertEquals(w.doc.outstanding_amount, w.doc.grand_total)
def test_payment(self):
webnotes.conn.sql("""delete from `tabGL Entry`""")
w = self.make()
from accounts.doctype.journal_voucher.test_journal_voucher \
@ -711,6 +712,7 @@ test_records = [
{
"naming_series": "_T-Sales Invoice-",
"company": "_Test Company",
"is_pos": 0,
"conversion_rate": 1.0,
"currency": "INR",
"debit_to": "_Test Customer - _TC",
@ -774,6 +776,7 @@ test_records = [
{
"naming_series": "_T-Sales Invoice-",
"company": "_Test Company",
"is_pos": 0,
"conversion_rate": 1.0,
"currency": "INR",
"debit_to": "_Test Customer - _TC",
@ -827,6 +830,7 @@ test_records = [
{
"naming_series": "_T-Sales Invoice-",
"company": "_Test Company",
"is_pos": 0,
"conversion_rate": 1.0,
"currency": "INR",
"debit_to": "_Test Customer - _TC",
@ -952,6 +956,7 @@ test_records = [
{
"naming_series": "_T-Sales Invoice-",
"company": "_Test Company",
"is_pos": 0,
"conversion_rate": 1.0,
"currency": "INR",
"debit_to": "_Test Customer - _TC",

View File

@ -2,7 +2,7 @@
{
"creation": "2013-07-30 17:28:49",
"docstatus": 0,
"modified": "2013-08-02 12:41:28",
"modified": "2013-09-05 12:40:04",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -10,7 +10,7 @@
"doctype": "Report",
"is_standard": "Yes",
"name": "__common__",
"query": "select\n `tabDelivery Note`.`name` as \"Delivery Note:Link/Delivery Note:120\",\n\t`tabDelivery Note`.`customer` as \"Customer:Link/Customer:120\",\n\t`tabDelivery Note`.`posting_date` as \"Date:Date\",\n\t`tabDelivery Note`.`project_name` as \"Project\",\n\t`tabDelivery Note Item`.`item_code` as \"Item:Link/Item:120\",\n\t(`tabDelivery Note Item`.`qty` - ifnull((select sum(qty) from `tabSales Invoice Item` \n\t where `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n\t `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\n\t\tas \"Qty:Float:110\",\n\t(`tabDelivery Note Item`.`amount` - ifnull((select sum(amount) from `tabSales Invoice Item` \n where `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\n\t\tas \"Amount:Currency:110\",\n\t`tabDelivery Note Item`.`item_name` as \"Item Name::150\",\n\t`tabDelivery Note Item`.`description` as \"Description::200\"\nfrom `tabDelivery Note`, `tabDelivery Note Item`\nwhere\n `tabDelivery Note`.docstatus = 1 and\n\t`tabDelivery Note`.`status` != \"Stopped\" and\n `tabDelivery Note`.name = `tabDelivery Note Item`.parent and\n (`tabDelivery Note Item`.qty > ifnull((select sum(qty) from `tabSales Invoice Item` \n where `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\norder by `tabDelivery Note`.`name` desc",
"query": "select\n `tabDelivery Note`.`name` as \"Delivery Note:Link/Delivery Note:120\",\n\t`tabDelivery Note`.`customer` as \"Customer:Link/Customer:120\",\n\t`tabDelivery Note`.`posting_date` as \"Date:Date\",\n\t`tabDelivery Note`.`project_name` as \"Project\",\n\t`tabDelivery Note Item`.`item_code` as \"Item:Link/Item:120\",\n\t(`tabDelivery Note Item`.`qty` - ifnull((select sum(qty) from `tabSales Invoice Item` \n\t where `tabSales Invoice Item`.docstatus=1 and \n `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n\t `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\n\t\tas \"Qty:Float:110\",\n\t(`tabDelivery Note Item`.`amount` - ifnull((select sum(amount) from `tabSales Invoice Item` \n where `tabSales Invoice Item`.docstatus=1 and \n `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\n\t\tas \"Amount:Currency:110\",\n\t`tabDelivery Note Item`.`item_name` as \"Item Name::150\",\n\t`tabDelivery Note Item`.`description` as \"Description::200\"\nfrom `tabDelivery Note`, `tabDelivery Note Item`\nwhere\n `tabDelivery Note`.docstatus = 1 and\n\t`tabDelivery Note`.`status` != \"Stopped\" and\n `tabDelivery Note`.name = `tabDelivery Note Item`.parent and\n (`tabDelivery Note Item`.qty > ifnull((select sum(qty) from `tabSales Invoice Item` \n where `tabSales Invoice Item`.docstatus=1 and \n `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\norder by `tabDelivery Note`.`name` desc",
"ref_doctype": "Sales Invoice",
"report_name": "Delivered Items To Be Billed",
"report_type": "Query Report"

View File

@ -2,7 +2,7 @@
{
"creation": "2013-05-21 16:16:39",
"docstatus": 0,
"modified": "2013-08-09 14:45:51",
"modified": "2013-09-12 18:34:54",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -132,6 +132,7 @@
"fieldtype": "Date",
"in_filter": 1,
"label": "Purchase Order Date",
"no_copy": 1,
"oldfieldname": "transaction_date",
"oldfieldtype": "Date",
"reqd": 1,

View File

@ -132,14 +132,10 @@ class DocType(TransactionBase):
sql("delete from `tabAddress` where name=%s",(rec['name']))
def delete_supplier_contact(self):
for rec in sql("select * from `tabContact` where supplier=%s", (self.doc.name,), as_dict=1):
sql("delete from `tabContact` where name=%s",(rec['name']))
def delete_supplier_communication(self):
webnotes.conn.sql("""\
delete from `tabCommunication`
where supplier = %s and customer is null""", self.doc.name)
for contact in webnotes.conn.sql_list("""select name from `tabContact`
where supplier=%s""", self.doc.name):
webnotes.delete_doc("Contact", contact)
def delete_supplier_account(self):
"""delete supplier's ledger if exist and check balance before deletion"""
acc = sql("select name from `tabAccount` where master_type = 'Supplier' \

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:11",
"docstatus": 0,
"modified": "2013-09-02 16:25:44",
"modified": "2013-09-10 10:53:50",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -137,13 +137,15 @@
"fieldname": "communication_history",
"fieldtype": "Section Break",
"label": "Communication History",
"options": "icon-comments"
"options": "icon-comments",
"print_hide": 1
},
{
"doctype": "DocField",
"fieldname": "communication_html",
"fieldtype": "HTML",
"label": "Communication HTML"
"label": "Communication HTML",
"print_hide": 1
},
{
"doctype": "DocField",
@ -210,7 +212,8 @@
"fieldtype": "Table",
"hidden": 1,
"label": "Communications",
"options": "Communication"
"options": "Communication",
"print_hide": 1
},
{
"cancel": 0,

View File

@ -101,13 +101,51 @@
},
"order": {
"no_cache": true,
"template": "app/website/templates/pages/order",
"args_method": "selling.doctype.sales_order.sales_order.get_website_args"
"template": "app/website/templates/pages/sale",
"args_method": "website.helpers.transaction.get_order_args",
"portal": {
"doctype": "Sales Order",
"conditions": {
"docstatus": 1
}
}
},
"orders": {
"no_cache": true,
"template": "app/website/templates/pages/orders",
"args_method": "selling.doctype.sales_order.sales_order.get_currency_and_number_format"
"template": "app/website/templates/pages/sales_transactions",
"args_method": "website.helpers.transaction.order_list_args"
},
"invoice": {
"no_cache": true,
"template": "app/website/templates/pages/sale",
"args_method": "website.helpers.transaction.get_invoice_args",
"portal": {
"doctype": "Sales Invoice",
"conditions": {
"docstatus": 1
}
}
},
"invoices": {
"no_cache": true,
"template": "app/website/templates/pages/sales_transactions",
"args_method": "website.helpers.transaction.invoice_list_args"
},
"shipment": {
"no_cache": true,
"template": "app/website/templates/pages/sale",
"args_method": "website.helpers.transaction.get_shipment_args",
"portal": {
"doctype": "Delivery Note",
"conditions": {
"docstatus": 1
}
}
},
"shipments": {
"no_cache": true,
"template": "app/website/templates/pages/sales_transactions",
"args_method": "website.helpers.transaction.shipment_list_args"
},
"product_search": {
"template": "app/website/templates/pages/product_search"
@ -115,10 +153,14 @@
"ticket": {
"no_cache": true,
"template": "app/website/templates/pages/ticket",
"args_method": "support.doctype.support_ticket.support_ticket.get_website_args"
"args_method": "support.doctype.support_ticket.support_ticket.get_website_args",
"portal": {
"doctype": "Support Ticket"
}
},
"tickets": {
"template": "app/website/templates/pages/tickets"
"template": "app/website/templates/pages/tickets",
"args_method": "website.helpers.transaction.ticket_list_args"
},
"address": {
"no_cache": true,

View File

@ -292,7 +292,12 @@ class AccountsController(TransactionBase):
current_tax_amount = flt(current_tax_amount, self.precision("tax_amount", tax))
# store tax breakup for each item
tax.item_wise_tax_detail[item.item_code or item.item_name] = [tax_rate, current_tax_amount]
key = item.item_code or item.item_name
if tax.item_wise_tax_detail.get(key):
item_wise_tax_amount = tax.item_wise_tax_detail[key][1] + current_tax_amount
tax.item_wise_tax_detail[key] = [tax_rate, item_wise_tax_amount]
else:
tax.item_wise_tax_detail[key] = [tax_rate, current_tax_amount]
return current_tax_amount

View File

@ -15,6 +15,6 @@
---
### Is this for me?
To starting hacking into ERPNext, you must have some understanding of how a dynamic web application works. There are hundreds of architectures and frameworks to make web development easier, but at the core there are a few elements that are important to understand.
To start hacking into ERPNext, you must have some understanding of how a dynamic web application works. There are hundreds of architectures and frameworks to make web development easier, but at the core there are a few elements that are important to understand.
ERPNext is built on `wnframework` which is primarily developed for ERPNext but can be extended to make similar database driven applications. wnframework uses Python on the server-side and has a javascript based client for entering data, managing workflow and making reports.

View File

@ -3,7 +3,7 @@
"_label": "Closing a Financial Period"
}
---
At the end of every year (or quarter or maybe even monthly) after you complete your auditing, you close your books of accounts. This means that you make all your special entries like:
At the end of every year or (quarterly or maybe even monthly), after completing auditing, you close your books of accounts. This means that you make all your special entries like:
- Depreciation
- Change in value of Assets
@ -18,4 +18,13 @@ In ERPNext after making all the special entries via Journal Voucher, you can mak
> Accounts > Tools > Period Closing Voucher
![Period Closing](img/period-closing.png)
The Period Closing Voucher will make accounting entries (GL Entry) making all your Income and Expense Accounts zero and transferring the balance to the Account you define.

View File

@ -9,6 +9,13 @@ To create a Journal Voucher go to:
> Accounts > Journal Voucher > New Journal Voucher
![Journal Voucher](img/journal-voucher.png)
In a Journal Voucher, you must select.
- Type of Voucher from the drop down.

View File

@ -1,8 +1,21 @@
---
{
"_label": "Accounts"
"_label": "Accounts",
"_toc": [
"docs.user.accounts.sales_invoice",
"docs.user.accounts.purchase_invoice",
"docs.user.accounts.payments",
"docs.user.accounts.journal_voucher",
"docs.user.accounts.opening_entry",
"docs.user.accounts.closing",
"docs.user.accounts.reports",
"docs.user.accounts.voucher_import",
"docs.user.accounts.pos"
]
}
---
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:

View File

@ -55,6 +55,7 @@ Select your “Bank” Account and enter the dates of your statement. Here you w
By doing this you will be able to sync your bank statements and entries into the system.
---
## Managing Outstanding Payments

View File

@ -9,6 +9,16 @@ Some of the major accounting reports are:
General Ledger is based on the table GL Entry and can be filtered by Account and between a period. This will help you get a full update for all entries done in that period for that Account.
![General Ledger](img/general-ledger.png)
### Trial Balance
Trial Balance is the list of Account balances for all your Accounts (“Ledger” and “Group”) on a particular date. For each Account it will give you the:
@ -18,14 +28,34 @@ Trial Balance is the list of Account balances for all your Accounts (“Ledger
- Credits
- Closing
![Trial Balance](img/trial-balance.png)
The sum of all closing balances in a Trial Balance must be zero.
### Accounts Payable and Accounts Receivable (AP / AR)
These reports help you to track the outstanding invoices sent to Customer and Suppliers. In this report, you will get your outstanding amounts period wise. i.e. between 0-30 days, 30-60 days and so on.
![Query Report](img/query-report-accounts-payable.png)
You can also get your payables and receivables from direct reports on Sales Invoice and Purchase Invoice.
### Sales and Purchase Register
In this report, each tax Account is transposed in columns.For each Invoice and invoice Item, you will get the amount of individual tax that has been paid, based on the Taxes and Charges table.
![Query Report Sales Register](img/query-report-sales-register.png)

View File

@ -15,13 +15,12 @@ or from the “Make Sales Invoice” button in the Sales Order or Delivery Note.
<br>
![Sales Invoice](img/sales-invoice.png)
<br>

View File

@ -5,11 +5,17 @@
---
A Purchase Order is analogous to a Sales Order. It is usually a binding contract with your Supplier that you promise to buy a set of Items under the given conditions.
In ERPNext, you can make a Purchase Order by going to:
A Purchase Order can be automatically created from a Material Request or Supplier Quotation.
![Purchase Order](img/purchase-order-f.jpg)
In ERPNext, you can also make a Purchase Order directly by going to:
> Buying > Purchase Order > New Purchase Order
A Purchase Order can also be automatically created from a Purchase Request or Supplier Quotation.
![Purchase Order](img/purchase-order.png)

View File

@ -6,18 +6,25 @@
A Supplier Quotation is a formal statement of promise by potential supplier to supply the goods or services required by a buyer, at specified prices, and within a specified period. A quotation may also contain terms of sale and payment, and warranties. Acceptance of quotation by the buyer constitutes an agreement binding on both parties.
You can make a Supplier Quotation directly from:
You can make a supplier quotation from a Material Request
![Supplier Quotation](img/supplier-quotation-f.jpg)
You can also make a Supplier Quotation directly from:
> Buying > Supplier Quotation > New Supplier Quotation
or directly from the Purchase Request.
![Supplier Quotation](img/supplier-quotation.png)
If you have multiple **Suppliers** who supply you with the same **Item**, you usually send out a message (Request for Quote) to various **Suppliers**. In many cases, especially if you have centralized buying, you may want to record all the quotes so that
- You can easily compare prices in the future

View File

@ -0,0 +1,6 @@
---
{
"_label": "Custom Scripts"
}
---

View File

@ -0,0 +1,6 @@
---
{
"_label": "Custom Scripts"
}
---

View File

@ -0,0 +1,22 @@
---
{
"_label": "Hiding Modules and Features"
}
---
### Hiding Unused Features
As you have seen from this manual that ERPNext contains tons of features which you may not use. We have observed that most users start with using 20% of the features, though a different 20%. To hide fields belonging to features you dont require, go to:
> Setup > Customize ERPNext > Disable Features.
Check / uncheck the features you want to use and refresh your page for the changes to take effect.
---
### Hiding Module Icons
To hide modules (icons) from the home page, go to:
Setup > Customize ERPNext > Modules Setup
> Note: Modules are automatically hidden for users that have no permissions on the documents within that module. For example, if a user has no permissions on Purchase Order, Purchase Request, Supplier, the “Buying” module will automatically be hidden.

View File

@ -1,6 +1,13 @@
---
{
"_label": "Customize ERPNext"
"_label": "Customize ERPNext",
"_toc": [
"docs.user.customize.custom_field",
"docs.user.customize.custom_form",
"docs.user.customize.hide_unhide",
"docs.user.customize.print_format",
"docs.user.customize.custom_scripts"
]
}
---
ERPNext offers many tools to customize the system.

View File

@ -1,6 +1,6 @@
---
{
"_label": "Hiding Modules and Features"
"_label": "Hiding Modules and Features "
}
---
### Hiding Unused Features

View File

@ -8,7 +8,7 @@
"docs.user.selling",
"docs.user.buying",
"docs.user.stock",
"docs.user.accounting",
"docs.user.accounts",
"docs.user.hr",
"docs.user.mfg",
"docs.user.support",
@ -48,19 +48,20 @@ Contents
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. [Price Lists](docs.user.setup.price_list.html)
1. [Adding Opening Entries](docs.user.setup.opening.html)
1. [POS Setting](docs.user.setup.pos_setting.html)
1. [Third Party Backups](docs.user.setup.third_party_backups.html)
1. [Selling](docs.user.selling.html)
1. Selling Setup
1. [Selling Setup](docs.user.selling.selling_setup.html)
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. [Price Lists](docs.user.setup.price_list.html)
1. [Discount](docs.user.selling.discount.html)
1. [Customers](docs.user.selling.customer.html)
1. [Lead](docs.user.selling.lead.html)
1. [Opportunity](docs.user.selling.opportunity.html)
@ -73,7 +74,7 @@ Contents
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. [Price Lists](docs.user.setup.price_list.html)
1. [Sub Contracting](docs.user.stock.sub_contracting.html)
1. [Stock (Inventory)](docs.user.stock.html)
1. [Warehouse](docs.user.stock.warehouse.html)
@ -89,7 +90,7 @@ Contents
1. [Projected Quantity](docs.user.stock.projected_quantity.html)
1. [Accounting for Stock](docs.user.stock.accounting_for_stock.html)
1. [Perpetual Inventory](docs.user.stock.perpetual_inventory.html)
1. [Accounting](docs.user.accounting.html)
1. [Accounts](docs.user.accounts.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)
@ -100,7 +101,7 @@ Contents
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. [Point of Sale (POS) Invoice](docs.user.accounts.pos.html)
1. [Point of Sale (POS) Invoice](docs.user.accounts.pos.html)
1. [Human Resources (HR)](docs.user.hr.html)
1. [HR Setup](docs.user.hr.setup.html)
1. [Employee](docs.user.hr.employee.html)
@ -137,6 +138,6 @@ Contents
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. [Hide / Unhide modules](docs.user.customize.hide_unhide.html)
1. [Print Formats](docs.user.customize.print_formats.html)
1. [Custom Scripts](docs.user.customize.custom_scripts.html)

View File

@ -1,24 +0,0 @@
---
{
"_label": "Projects"
}
---
Managing Projects
ERPNext helps you manage your Projects by breaking them into Tasks and allocating them to different people.
Purchasing and selling can also be tracked against Projects and this can help the company keep tabs on its budget, delivery and profitability for a Project.
Projects can be used to manage internal projects, manufacturing jobs or service jobs. For service jobs, Time Sheets can also be created that can be used to bill Customers if billing is done on a Time & Money basis.
## Project
The Project record maintains the details of your project and milestones that you have set. The Project record can be linked in Quotations, Sales Orders, Delivery Notes, Sales Invoices, Purchase Requests, Purchase Orders and Purchase Invoices. This way you can keep a track of all the activities that happen around this project.
## Tasks
Project is broken into Tasks and each Task is allocated to a resource. In ERPNext, you can also create an allocate a Task independently of a Project. If you define the start and end dates, it will add calendar events for the same and also show the task on the Gantt Chart that you can use for monitoring the Project.
## Time Sheets
You can create Time Sheets to track billable work to Customers. These Time Sheets can be tracked against Project and Tasks so that you can get reports on how much time was spent on each Task or Project.

View File

@ -5,6 +5,25 @@
---
In ERPNext, you can manage Employee Appraisals by creating an Appraisal Template for each role with the parameters that define the performance by giving appropriate weightage to each parameter.
> HR > Appraisal > New Appraisal
#### Step 1: Select an Appraisal Template
![Appraisal](img/appraisal-1.png)
After you select the template, the remaining form appears.
#### Step 2: Enter Employee Details
![Appraisal](img/appraisal-2.png)
Once the Appraisal Template is completed, you can create Appraisal records for each period where you track performance. You can give points out of 5 for each parameter and the system will calculate the overall performance of the Employee.
To make the Appraisal final, make sure to “Submit” it.

View File

@ -0,0 +1,26 @@
---
{
"_label": "Attendance"
}
---
An Attendance record stating that an Employee has been present on a particular day can be created manually by:
> HR > Attendance > New Attendance
![Attendance](img/attendance.png)
It can also be done by collecting attendance information via an automated system like a swipe card. You can even upload a CSV file with the attendance information.
You can get a monthly report of your Attendance data by going to the “Monthly Attendance Details” report.
To upload the attendance go to:
> HR > Upload Attendance
![Upload Attendance](img/upload-attendance.png)

View File

@ -5,17 +5,43 @@
---
There are many fields you can add in your Employee records. As the organisation grows, it becomes difficult to manage more records. It is advisable to keep updating and entering records to facilitate data management of employees.
Employee records also help in keeping a list of your teams skills, previous employment history and also emergency information.
Employee records also help in keeping a list of your teams skills, previous employment history and emergency information.
To create new Employee go to:
> HR > Employee > New Employee
#### Step 1: Capture basic information and Employement Details.
![Employee Master](img/employee-master-1.png)
<br>
#### Step 2: Complete Job Profile and Organisation Profile.
![Employee Master](img/employee-master-2.png)
<br>
#### Step 3: Update contact details, personal details, and previous employement details.
![Employee Master](img/employee-master-3.png)
### Numbering Employees (Employee ID)
By default, in ERPNext Employee Records are Numbered. You can have multiple series if you are a really large company and want to have separate numbering series for separate locations etc. You can set the numbering series just like any other transaction by going to:
> Setup > Customize ERPNext > Numbering Series.
> Setup > Customize > Document Numbering Series.
Alternatively, you can create employees by the “Employee Number” field if you already have an existing Employee Numbering system you want to follow. To set this, go to

View File

@ -9,6 +9,12 @@ To make a new Expense Claim, go to:
> HR > Expense Claim > New Expense Claim
![Expense Claim](img/expense-claim.png)
Set the Employee ID, date and the list of expenses that are to be claimed and “Submit” the record.
### Approving Expenses
@ -21,4 +27,4 @@ Comments can be added in the Comments section explaining why the claim was appro
### Booking the Expense and Reimbursement
The approved Expense Claim must then be converted into a Journal Voucher and a payment must be made. Note: This amount should not be clubbed with Salary because the amount will then be taxable to the Employee.
The approved Expense Claim must then be converted into a Journal Voucher and a payment must be made. Note: This amount should not be clubbed with Salary because the amount will then be taxable to the Employee.

View File

@ -1,31 +1,30 @@
---
{
"_label": "Leave and Attendance"
"_label": "Leave"
}
---
An Attendance record stating that an Employee has been present on a particular day can be created either manually by:
> HR > Attendance > New Attendance
Or if you are collecting attendance information via an automated system like a swipe card, then you can upload a CSV file with the attendance information.
You can get a monthly report of your Attendance data by going to the “Monthly Attendance Details” report.
To upload the attendance go to:
> HR > Upload Attendance (sidebar)
---
### Leave Allotment
Fixed number of leaves per Employee can be allocated using the Leave Allocation Tool. If you have special leaves to be allocated, you can also allocate them manually by create new Leave Allocation records.
Fixed number of leaves per Employee can be allocated using the Leave Allocation Tool. If you have special leaves to be allocated, you can also allocate them manually by creating new Leave Allocation records.
> HR > Leave Allocation > New Leave Allocation
![Leave ALlocation](img/leave-allocation.png)
---
### Leave Application
If your company has a formal system where Employees have to apply for leaves and only if their leaves are approved they are considered as paid leaves, you can create Leave Application to track approval and usage of leaves. You have to mention the Employee, Leave Type and the period for which the leave is taken. If you want only certain users to approve leaves, you can give “Submission” rights to those users only.
If your company has a formal system where Employees have to apply for leaves to be able to qualify as paid leaveas, you can create Leave Application to track approval and usage of leaves. You have to mention the Employee, Leave Type and the period for which the leave is taken. If you want specific users to approve leaves, you can give “Submission” rights to those users only.
> HR > Leave Application > Make New Leave Application
![New Leave Application](img/new-leave-application.png)
If you want all users to create their own Leave Applications, you can set their “Employee ID” as a match rule in the Leave Application Permission settings. See the earlier discussion on permission settings for more info. [Permissions](docs.user.setup.permissions.html)
If you want all users to create their own Leave Applications, you can set their “Employee ID” as a match rule in the Leave Application Permission settings. See the earlier discussion on permission settings for more info.

View File

@ -1,6 +1,15 @@
---
{
"_label": "Human Resource Management"
"_label": "Human Resource Management",
"_toc": [
"docs.user.hr.set-up",
"docs.user.hr.employee",
"docs.user.hr.leave",
"docs.user.hr.attendance",
"docs.user.hr.payroll",
"docs.user.hr.expense_claim",
"docs.user.hr.appraisal"
]
}
---
The Human Resources (HR) Module covers the processes linked to managing a team of co-workers. Most important feature here is processing the payroll by using the Salary Manager to generate Salary Slips. Most countries have complex tax rules stating which expenses the company can make on behalf of the Employees. There are a set of rules for the company to deduct taxes and social security from employee payroll. ERPNext allows to accomodate all types of taxes and their calculation.

View File

@ -13,7 +13,11 @@ To process Payroll in ERPNext,
The Salary Structure represents how Salaries are calculated based on Earnings and Deductions. To create a new Salary Structure go to:
> HR > Salary and Payroll > Salary Structure > New Salary Structure
> HR > Salary Structure > New Salary Structure
![Salary Structure](img/salary-structure.png)
s
### In the Salary Structure,
@ -31,9 +35,24 @@ If you dont want ERPNext to manage LWP, just dont click on LWP in any of t
### Creating Salary Slips
Once the Salary Structure is created, you can process your payroll for the month using the Salary Manager
Once the Salary Structure is created, you can make a salary slip from the same form or you can process your payroll for the month using the Salary Manager.
To create a salary slip from Salary Structure, click on the button Make Salary Slip.
![Salary Slip](img/salary-slip-1.png)
<br>
Through Salary Manager:
> HR > Process Payroll
![Salary Manager](img/salary-manager.png)
> HR > Salary and Payroll > Process Payroll
In the Salary Manager tool,

View File

@ -1,6 +1,11 @@
---
{
"_label": "Manufacturing"
"_label": "Manufacturing",
"_toc": [
"docs.user.mfg.bom",
"docs.user.mfg.planning",
"docs.user.mfg.production_order"
]
}
---
The Manufacturing module in ERPNext helps you to maintain multi-level Bill of Materials (BOMs) for your Items. It helps you in Product Costing, planing your production via Production Plan, creating Production Orders for your manufacturing shop floor,s and planing your inventory by getting your material requirement via BOMs (also called Material Requirements Planning MRP).

View File

@ -0,0 +1,18 @@
---
{
"_label": "Projects",
"_toc": [
"docs.user.projects.projects",
"docs.user.projects.task",
"docs.user.projects.timelog"
]
}
---
Managing Projects
ERPNext helps you manage your Projects by breaking them into Tasks and allocating them to different people.
Purchasing and selling can also be tracked against Projects and this can help the company keep tabs on its budget, delivery and profitability for a Project.
Projects can be used to manage internal projects, manufacturing jobs or service jobs. For service jobs, Time Sheets can also be created that can be used to bill Customers if billing is done on a Time & Money basis.

View File

@ -0,0 +1,12 @@
---
{
"_label": "Projects"
}
---
## Project
The Project record maintains the details of your project and milestones that you have set. The Project record can be linked in Quotations, Sales Orders, Delivery Notes, Sales Invoices, Purchase Requests, Purchase Orders and Purchase Invoices. This way you can keep a track of all the activities that happen around this project.
![projects](img/projects.png)

View File

@ -0,0 +1,15 @@
---
{
"_label": "Tasks"
}
---
## Tasks
Project is divided into Tasks and each Task is allocated to a resource. In ERPNext, you can also create and allocate a Task independently of a Project. If you define the start and end dates, it will add calendar events for the same and also show the task on the Gantt Chart that you can use for monitoring the Project.
![Tasks](img/tasks.png)

View File

@ -0,0 +1,14 @@
---
{
"_label": "Task"
}
---
## Tasks
Project is broken into Tasks and each Task is allocated to a resource. In ERPNext, you can also create an allocate a Task independently of a Project. If you define the start and end dates, it will add calendar events for the same and also show the task on the Gantt Chart that you can use for monitoring the Project.
![Tasks](img/tasks.png)

View File

@ -0,0 +1,12 @@
---
{
"_label": "Time Log"
}
---
## Time Sheets
You can create Time Sheets to track billable work to Customers. These Time Sheets can be tracked against Project and Tasks so that you can get reports on how much time was spent on each Task or Project.
![Time Log](img/time-log.png)

View File

@ -0,0 +1,11 @@
---
{
"_label": "Campaign"
}
---
A Campaign is a full-scale implementation of a sales strategy to promote a product or a service. This is done in a market segment of a particular geographical area, to achieve specified objectives.
![Campaign](img/campaign.png)

View File

@ -11,6 +11,12 @@ You can either directly create your Customers via
or upload it via the Data Import Tool.
![Customer Master](img/customer.png)
> Note: Customers are separate from Contacts and Addresses. A Customer can have multiple Contacts and Addresses.
### Contacts and Addresses
@ -49,6 +55,14 @@ You can group your Customers so that you can get trend analysis for each group.
> Tip: If you think all this is too much effort, you can leave it at “Default Customer Group”. But all this effort, will pay off when you start getting reports.
An example of a sample report is given below:
![Sales Analytics](img/sales-analytics-customer.png)
### Territory
If your business operates in multiple Territories (could be countries, states or cities) it is usually a great idea to build your structure in the system. Once you group your Customers by Territories, you can set annual targets for each Item Group and get reports that will show your actual performance in the territory v/s what you had planned.

View File

@ -0,0 +1,11 @@
---
{
"_label": "Customer Group"
}
---
Customer Group is a category where you specify your customer group type. Your customers can be Individuals or they can be corporate(Company) customers. Your customers could also be government officials or non-profit organisations. ERPNext allows you to create your own Customer Group.
![Customer Group Tree](img/customer-group-tree.png)

View File

@ -0,0 +1,16 @@
---
{
"_label": "Discount"
}
---
While making your sales transactions like a Quotation (or Sales Order) you would already have noticed that there is a “Discount” column. On the left is the “Price List Rate” on the right is the “Basic Rate”. You can add a “Discount” value to update the basic rate.
Since your taxes are calculated on Items, you must apply your discounts here so that you apply the tax on the discounted rate, which is the case for most taxes.
The second way to apply discount is to add it in your Taxes and Charges table. This way you can explicitly show the Customer the discount you have applied on the order. If you choose this method, remember that you will tax your Customer at the full rate, not the discounted rate. So this is not a good way to track discounts.
There is a third way to do it. Create an Item called “Discount” and make sure that all the taxes apply in the same way as the main Items. (This method is useful if only one type of tax is applicable on the sale). This way your “Discount” will appear as an expense. You will see a slightly higher income and expense but your profits will still remain the same. This method might be interesting where you want detailed accounting of your discounts.
> Note: The maximum Discount that can be applied on an Item can be fixed in the Item master.

View File

@ -18,6 +18,12 @@ To create a Lead, go to:
> Selling > Lead > New Lead
![Lead](img/lead.png)
ERPNext gives you a lot of options you may want to store about your Leads. For example what is the source, how likely are they to give you business etc. If you have a healthy number of leads, this information will help you prioritize who you want to work with.
> **Tip:** ERPNext makes it easy to follow-up on leads by updating the “Next Contact” details. This will add a new event in the Calendar for the User who has to contact the lead next.

View File

@ -1,6 +1,20 @@
---
{
"_label": "Selling"
"_label": "Selling",
"_toc": [
"docs.user.selling.selling_setup",
"docs.user.selling.customer_group",
"docs.user.selling.territory",
"docs.user.selling.sales_partner",
"docs.user.selling.sales_person",
"docs.user.selling.campaign",
"docs.user.selling.terms",
"docs.user.selling. customer",
"docs.user.selling.lead",
"docs.user.selling.opportunity",
"docs.user.selling.quotation",
"docs.user.selling.sales_order"
]
}
---
Selling is the communication that happens with the customer 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.

View File

@ -11,6 +11,21 @@ You can create an Opportunity from:
or open a “Open” Lead and click on “Create Opportunity” button.
![Opportunity](img/opportunity.png)
You can also open a “Open” Lead and click on “Create Opportunity” button.
![Opportunity 1](img/opportunity-1.png)
An Opportunity can also come from an existing Customer. You can create multiple Opportunities against the same Lead. In Opportunity, apart from the Communication, you can also add the Items for which the Lead or Contact is looking for.
> Best Practice: Leads and Opportunities are often referred as your “Sales Pipeline” this is what you need to track if you want to be able to predict how much business you are going to get in the future. Its always a good idea to be able to track what is coming in order to adjust your resources.

View File

@ -3,17 +3,25 @@
"_label": "Quotation"
}
---
During a sale, the customer may want you to give him a written note about the products or services you are planning to offer, along with the prices and other terms of engagement. This is called a “Proposal” or an “Estimate” or a “Pro Forma Invoice”or a Quotation.
During a sale, the customer may request for a written note about the products or services you are planning to offer, along with the prices and other terms of engagement. This is called a “Proposal” or an “Estimate” or a “Pro Forma Invoice”or a Quotation.
To create a new Quotation go to:
> Selling > Quotation > New Quotation
![Quotation](img/quotation.png)
A Quotation contains details about:
- The recipient of the Quotation
- The Items and quantities you are offering.
- The rates at which they are offered.
- The rates at which they are offered. For details refer
- The taxes applicable.
- Other charges (like shipping, insurance) if applicable.
- The validity of contract.
@ -27,8 +35,9 @@ A Quotation contains details about:
The rates you quote may depend on two things.
- The Price List: If you have multiple Price Lists, you can select a Price List or tag it to the Customer (so that it is auto-selected). Your Item prices will automatically be updated from the Price List.
- The Currency: If you are quoting to a Customer in a different currency, you will have to update the conversion rates to enable ERPNext to save the information in your standard Currency. This will help you to analyze the value of your Quotations in reports in your standard Currency.
- The Price List: If you have multiple Price Lists, you can select a Price List or tag it to the Customer (so that it is auto-selected). Your Item prices will automatically be updated from the Price List.For details refer [Price List](docs.user.setup.price_list.html)
- The Currency: If you are quoting to a Customer in a different currency, you will have to update the conversion rates to enable ERPNext to save the information in your standard Currency. This will help you to analyze the value of your Quotations in standard Currency.
### Taxes
@ -38,7 +47,8 @@ You can add taxes in the same manner as the Sales Taxes and Charges Master.
### Terms and Conditions
Each Quotation must ideally contain a set of terms of your contract. It is usually a good idea to make templates of your Terms and Conditions, so that you have a standard set of terms. You can do this by going to:
Each Quotation must ideally contain a set of terms, of your contract. It is usually a good idea to make templates of your Terms and Conditions, so that you have a standard set of terms.
You can do this by going to:
> Selling > Terms and Conditions (right sidebar)
@ -60,15 +70,7 @@ Quotation is a “Submittable” transaction. Since you send this Quotation to y
> Tip: Quotations can also be titled as “Proforma Invoice” or “Proposal”. Select the right heading in the “Print Heading” field in the “More Info” section. To create new Print Headings go to Setup > Branding and Printing > Print Headings.
## Discounts
### Discount
While making your sales transactions like a Quotation (or Sales Order) you would already have noticed that there is a “Discount” column. On the left is the “Price List Rate” on the right is the “Basic Rate”. You can add a “Discount” value to update the basic rate.
Since your taxes are calculated on Items, you must apply your discounts here so that you apply the tax on the discounted rate, which is the case for most taxes.
The second way to apply discount is to add it in your Taxes and Charges table. This way you can explicitly show the Customer the discount you have applied on the order. If you choose this method, remember that you will tax your Customer at the full rate, not the discounted rate. So this is not a good way to track discounts.
There is a third way to do it. Create an Item called “Discount” and make sure that all the taxes apply in the same way as the main Items. (This method is useful if only one type of tax is applicable on the sale). This way your “Discount” will appear as an expense. You will see a slightly higher income and expense but your profits will still remain the same. This method might be interesting where you want detailed accounting of your discounts.
> Note: The maximum Discount that can be applied on an Item can be fixed in the Item master.
While making your sales transactions like a Quotation (or Sales Order) you would already have noticed that there is a “Discount” column. On the left is the “Price List Rate” on the right is the “Basic Rate”. You can add a “Discount” value to update the basic rate. To understand more about discount read [Discount](docs.user.selling.discount.html)

View File

@ -7,10 +7,29 @@ The Sales Order confirms your sales and triggers purchase (**Purchase Request**)
A Sales Order is usually a binding Contract with your Customer.
Once your customer confirms the Quotation you can convert your Quotation into a Sales Order. Alternatively, you can create a Sales Order directly from:
Once your customer confirms the Quotation you can convert your Quotation into a Sales Order.
![Sales Order](img/sales-order-f.jpg)
Alternatively, you can create a Sales Order directly from:
> Selling > Sales Order > New Sales Order
![Sales Order](img/sales-order.png)
Most of the information in your Sales Order is the same as the Quotation. There are a few amongst other things that a Sales Order will ask you to update.
- Expected date of delivery.

View File

@ -0,0 +1,11 @@
---
{
"_label": "Sales Partner"
}
---
People who assist you in getting business are termed as Sales Partners. Sales Partners can be represented by different names in ERPNext. You can call them Channel Partner, Distributor, Dealer, Agent, Retailer, Implementation Partner, Reseller etc. Based on the partner's functions and their areas of expertise, you can create your own Sales Partner Names.
![Sales Partner](img/sales-partner.png)

View File

@ -0,0 +1,8 @@
---
{
"_label": "Sales Person"
}
---
The person who helps in selling your products or services is called a Sales Person. A Sales Person could be your Sales Manager, Sales Executive, General Manager-Sales, Vice President-Sales etc.

View File

@ -0,0 +1,13 @@
---
{
"_label": "Selling Setup"
}
---
Completing the selling setup is an important step in ERPNext. You need to identify whether you would like to name your customers with their Customer Name or with Serial No. Also, specify whether all the sales transactions have to be accompanied with Sales Order and Delivery Note. Specify your Default Customer Group and the Default Territory you operate in.
<br>
![Selling Setup](img/selling-setup.png)

View File

@ -0,0 +1,13 @@
---
{
"_label": "Terms and Conditions"
}
---
Terms and conditions are the general and special arrangements, provisions, requirements, rules, specifications, and standards that a company follows. These specifications are an integral part of an agreement or contract that the company gets into with its customers, suppliers or partners.
![Terms and Conditions](img/terms.png)

View File

@ -0,0 +1,14 @@
---
{
"_label": "Territory"
}
---
Territory is a place to signify where your customers come from. If you operate in one country, you can give that country name as your Territory. For Example, India, US, or Rest of the World, could be your Territories. If you operate in many locations, ERPNext allows you to create more Territories. You can also have child Territories under parent Territories. This helps in assigning different regions to different sales staff.
![Territory Tree](img/territory-tree.png)

View File

@ -21,6 +21,14 @@ The Chart of Accounts helps you to answer:
> Tip: If you cant read a Balance Sheet (I confess it took me a long time to figure this out) it's a good opportunity to start learning about this. It will be worth the effort. You can also take the help of your accountant to setup your Chart of Accounts.
Financial statement of your company is easily viewable in ERPNext. An Example of a financial statement is given below:
![Financial Analytics Balance Sheet](img/financial-analytic-bs.png)
To edit your Chart of Accounts in ERPNext go to:
> [Accounts](docs.user.accounts.html) > Chart of Accounts
@ -49,6 +57,18 @@ Profit and Loss is the group of Income and Expense accounts that represent your
Unlike Balance sheet accounts, Profit and Loss accounts (or PL accounts) do not represent net worth (assets), but rather represent the amount of money spent and collected in servicing customers during the period. Hence at the beginning and end of your Fiscal Year, they become zero.
In ERPNext it is easy to create a Profit and Loss analysis chart. An example of a Profit and Loss analysis chart is given below:
![Financial Analytics Profit and Loss](img/financial-analytic-pl.png)
(On the first day of the year you have not made any profit or loss, but you still have assets, hence balance sheet accounts never become zero at the beginning or end of a period)
### Groups and Ledgers

View File

@ -0,0 +1,14 @@
---
{
"_label": "Company Setup"
}
---
Enter your company details to complete Company Setup. Mention the type of business, under Domain. You can enter manufacturing, retail, or services depending on the nature of your business activity. If you have more than one companies, create the setup under the Company Setup page.
> Setup > Company > New Company
![Company Setup](img/company.png)

View File

@ -17,7 +17,12 @@ All emails sent from the system are added to the Communication table.
To setup your outgoing mails, go to
> Setup > Email and Notifications > Email Settings
> Setup > Outgoing Email Settings > Email Settings
![Email Settings](img/email-settings1.png)
Set your outgoing mail server settings here. These are the same settings you would use in your Outlook, Thunderbird, Apple Mail or other such email applications. If you are not sure, get in touch with your email service provider.
@ -31,7 +36,13 @@ A very useful email integration is to sync the incoming emails from support inbo
To setup your Support integration, go to:
> Setup > Email and Notifications > Email Settings > Incoming Mail Settings
> Setup > Support Email Settings > EMail Settings
![Email Settings](img/email-settings2.png)
To make ERPNext pull emails from your mail box, enter the POP3 settings. (POP3 is a way of extracting emails from your mailbox. It should be fairly easy to find out what your POP3 settings are. If you have problems, contact your email service provider).
If you want to setup an auto reply, check on the “Send Autoreply” box and whenever someone sends an email, an autoreply will be sent.
@ -41,7 +52,12 @@ Add a custom signature which you want to send with your replies.
ERPNext allows you to automatically email documents on “Submission” to the contact mentioned in the document. To set this up, go to:
> Setup > Email and Notifications > Auto-notifications
> Setup > Tools > Enable / Disable Notifications.
![Auto Notification](img/auto-notification.png)
Check on the transactions you want to send via email directly on Submission and add a custom message if you want on these documents.
@ -55,4 +71,7 @@ Email Digests are a great way for top managers to keep track of the big numbers
To setup Email Digests, go to:
> Setup > Email and Notifications > Email Digests > New Email Digest
> Setup > Email Digest > New Email Digest
![Email Digest](img/email-digest.png)

View File

@ -0,0 +1,19 @@
---
{
"_label": "Global Default"
}
---
Default means automatic. Something that is predefined in the system settings, occurs without change or effort, if you do not choose another option.
For example, If you deal in the currency-Rupee, you can set your default global setting as Rupee. Whenever a transaction takes place in ERPNext, the system will automatically consider Rupee as the default medium of currency, unless you specify otherwise.
> Setup > Tools > Global Settings/Defaults
![Global Defaults](img/global-defaults.png)

View File

@ -5,10 +5,22 @@
---
You can create / manage Letter Heads from:
> Setup > Branding and Printing > Letter Heads
> Setup > Printing > Letter Head > New Letter Head
#### Step 1: Letter Head Name
![Letter Head](img/letter-head1.png)
#### Step 2 : Attach Image
![Letter Head](img/letter-head2.png)
- Create an image with your logo, brand and other information that you want to put on your letter head.
- Attach the image in your Letter Head record and click on “Set From Image” to automatically generate the HTML required for this Letter Head.
- Attach the image in your Letter Head record by clicking on image icon to automatically generate the HTML required for this Letter Head.
- If you want to make this the default letter head, click on “Is Default”.
Thats it! Your letter head will now appear in all Prints and Emails of documents.

View File

@ -32,6 +32,14 @@ In ERPNext Opening Accounts are setup by submitting a special Journal Entries (J
Note: Make sure to set “Is Opening” as “Yes” in the More Info section.
> Setup > Opening Accounts and Stock > Opening Accounting Entries.
![Opening Entry](img/opening-entry.png)
You can make two Opening Journal Vouchers:
- For all assets (excluding Accounts Receivables): This entry will contain all your assets except the amounts you are expecting from your Customers against outstanding Sales Invoices. You will have to update your receivables by making an individual entry for each Invoice (this is because, the system will help you track the invoices which are yet to be paid). Since all the entries in this voucher will be of type “Debit”, you can credit the sum of all these debits against the “Temp Opening Liabilities” account.
@ -63,4 +71,7 @@ To make a Stock Reconciliation, go to:
> Stock > Stock Reconciliation > New Stock Reconciliation
and follow the steps mentioned on the page.
and follow the steps mentioned on the page.
![Stock Reconciliation](img/stock-reconciliation1.png)

View File

@ -1,45 +1,10 @@
---
{
"_label": "Setting up Users, Roles and Permissions"
"_label": "Setting up Permissions"
}
---
ERPNext has a role-based permission system, which means that you can assign Roles to Users, and permissions on Roles.
## Users (Profile)
Each ERPNext user has a Profile. The Profile contains the users email and authentication and can be set from:
> Setup > Users and Permissions > Users
#### Adding a new User
To add a new user, click on “Add” button and enter the users
- Email Id
- First Name
- Last Name
- Password
An invitation email will be sent to the user with the login details.
#### Setting Roles
ERPNext comes with a bunch of predefined roles. Each role comes with predefined permissions. See the Preset Permission Chart to find out what permission each role comes with.
After creating the User, you can add / remove Roles for that User by clicking on “Roles” button. To find out what permission each role has, click on the “?” sign next to the Role.
You can also create new Roles as you wish via
> Document > Role
#### Security Settings
- Enabling / disabling users: You can enable or disable users. Disabled users will not be able to log in.
- Setting login time: If login time is set, users can only log-in within the defined hours as per your timezone.
- Change Password: You can update the users password by setting the password field.
## Permissions
ERPNext has a very powerful permission structure that will allow you to set permissions right up to the field level.
Permissions are applied on:
@ -56,6 +21,11 @@ ERPNext comes with pre-set permission rules that you can change anytime by going
> Setup > Users and Permissions > Permission Manager
![Permission Manager](img/permission-manager.png)
## Using the Permission Manager
The Permission Manager is an easy way to set / unset permission rules. The Permission Manager allows you to monitor rules per Document Type.

View File

@ -3,13 +3,19 @@
"_label": "Price Lists"
}
---
A Price List is a place where different rate plans can be stored. Its a name you give to a set of Item Prices stored under a particular Price List.
Price List is a table of sale price for an Item. An Item can have multiple prices based on customer, currency, region, shipping cost etc.
An Item can have multiple prices based on customer, currency, region, shipping cost etc, which can be stored as different rate plans. In ERPNext, you are required to store all the lists seperately. Buying Price List is different from Selling Price List and thus is stored separately.
A Price List is a place where different rate plans can be stored. Its a name you can give to a set of Item prices. In case you have different zones (based on the shipping costs), for different currencies etc, you can maintain different Price Lists.You can maintain a Price List for your international customers with USD as transacting currency.
> Selling > Price List
![Price-List](img/price-lists.png)
A Price List is formed when you create different Item Prices. To import Item Price visit “Import Item Price”.
> For multiple currencies, maintain multiple Price Lists.
To add a new Item to the Price List, add the Item Code and its rate in the Item Prices table.
You can also import Item Prices via [Data Import Tool](docs.user.setup.data_import.html)

View File

@ -0,0 +1,36 @@
---
{
"_label": "Print Headings"
}
---
Print Headings are the names which you can give to your sales invoices, supplier quotations etc. You can create a list of names for different business communications.
You can create print headings from :
> Setup > Printing > Print Heading > New Print Heading
![Print Heading](img/print-heading1.png)
Example of a change in print heading is shown below:
![Print Heading](img/print-heading2.png)

View File

@ -0,0 +1,36 @@
---
{
"_label": "Print Headings"
}
---
Print Headings are the names which you can give to your sales invoices, supplier quotations etc. You can create a list of names for different business communications.
You can create print headings from :
> Setup > Printing > Print Heading > New Print Heading
![Print Heading](img/print-heading1.png)
Example of a change in print heading is shown below:
![Print Heading](img/print-heading2.png)

View File

@ -1,6 +1,6 @@
---
{
"_label": "Creating Numbering Series"
"_label": "Document Naming Series"
}
---
Data records are broadly classified as “Master” or “Transaction”. A master record is a record that has a “name”, for example a Customer, Item, Supplier, Employee etc. A Transaction is a record that has a “number”. Examples of transactions include Sales Invoices, Quotations etc. You make transactions against a number of master records.
@ -17,7 +17,13 @@ etc. You could also have a separate series for each type of Customer or for each
To setup a series, go to:
> Setup > Customize ERPNext > Numbering Series
> Setup > Tools > Update Numbering Series
![Document Naming Series](img/naming-series.png)
In this form,

View File

@ -0,0 +1,30 @@
---
{
"_label": "SMS Setting"
}
---
To integrate SMS in ERPNext, approach a SMS Gateway Provider who provides HTTP API. They will create an account for you and will provide an unique username and password.
To configure SMS Settings in ERPNext, find out their HTTP API (a document which describes the method of accessing their SMS interface from 3rd party applications). In this document, you will get an URL which is used to send the SMS using HTTP request. Using this URL, you can configure SMS Settings in ERPNext.
Example URL: <br>
<pre>http://instant.smses.com/web2sms.php?username=&lt;USERNAME>&password=&lt;PASSWORD>&to=&lt;MOBILENUMBER>&sender=&lt;SENDERID>&message=&lt;MESSAGE>
</pre>
![SMS Settings](img/sms-setting2.jpg)
> Note: the string up to the "?" is the SMS Gateway URL
Example:
<pre>http://instant.smses.com/web2sms.php?username=abcd&password=abcd&to=9900XXXXXX&sender
=DEMO&message=THIS+IS+A+TEST+SMS</pre>
The above URL will send SMS from account abcd to mobile number 9900XXXXXX with sender ID as DEMO with text message as "THIS IS A TEST SMS"
Note that some parameters in the URL are static.You will get static values from your SMS Provider like username, password etc. These static values should be entered in the Static Parameters table.
![SMS Setting](img/sms-settings1.png)

View File

@ -3,7 +3,7 @@
"_label": "Setting up Taxes"
}
---
One of the primary motivator for compulsory use of accounting tools is calculation of Taxes. You may or may not make money but your government will (to help your country be safe and prosperous). And if you dont do your taxes correctly, they get very unhappy. Ok, philosophy aside, ERPNext allows you to make configurable tax templates that you can apply to your sales or purchase.
One of the primary motivator for compulsory use of accounting tools is calculation of Taxes. You may or may not make money but your government will (to help your country be safe and prosperous). And if you dont calculate your taxes correctly, they get very unhappy. Ok, philosophy aside, ERPNext allows you to make configurable tax templates that you can apply to your sales or purchase.
### Tax Accounts
@ -17,7 +17,12 @@ The way ERPNext sets up taxes is via templates. Other types of charges that may
To create a new sales tax template called Sales Taxes and Charges Master, you have to go to:
> Selling > Setup (sidebar) > Sales Taxes and Charge Master
> Setup > Accounts > Sales Taxes and Charge Master
![Sales Tax Master](img/sales-tax-master.png)
When you create a new master, you will have to add a row for each tax type.
@ -45,6 +50,7 @@ Once you setup your template, you can select this in your sales transactions.
Similar to your Sales Taxes and Charges Master is the Purchase Taxes and Charges Master.
This is the tax template that you can use in your Purchase Orders and Purchase Invoices. If you have value added taxes (VAT), where you pay to the government the difference between your incoming and outgoing taxes, you can select the same Account that you use for sales taxes.
For more details see [Purchase Taxes](docs.user.buying.purchase_taxes.html)
The columns in this table are similar to the Sales Taxes and Charges Master with the difference as follows:

View File

@ -0,0 +1,47 @@
---
{
"_label": "Adding Users"
}
---
ERPNext has a role-based permission system, which means that you can assign Roles to Users, and permissions on Roles.Each ERPNext user has a Profile. The Profile contains the users email and authentication and can be set from:
> Setup > Users and Permissions > Users
#### Step 1: Adding a new User
To add a new user, click on “Add” button and enter the users
- Email Id
- First Name
- Last Name
![User](img/user1.png)
#### Step 2: Password and Image
Enter a new password and select the image of the user. Write a small description about the User under the heading Short Bio
![User](img/user2.png)
<br>
> Roles will be visible only after you save the Docuemnt.
#### Step 3 :Setting Roles and Email Settings
Check the boxes which the User can access. ERPNext comes with a bunch of predefined roles.
Enter his email settings. The message will appear at the end of every mail.
![User](img/user3.png)
#### Step 4: Security Settings
- Enabling / disabling users: You can enable or disable users. Disabled users will not be able to log in.
- Setting login time: If login time is set, users can only log-in within the defined hours as per your timezone.
If you wish to give the user access to the system only between office hours, or during weekends, mention it under security settings.
![User](img/user4.png)

View File

@ -0,0 +1,52 @@
---
{
"_label": "Workflows"
}
---
In order to allow multiple people to submit multiple requests, for approvals, by multiple users, ERPNext requires you to fill the workflow conditions. ERPNext tracks the multiple permissions before submission.
Example of a leave application workflow is given below:
If an user applies for a leave, then his request will be sent to the HR department. The HR department(HR User) will either reject or approve this request. Once this process is completed, the user's Manager(leave approver) will get an indication that the HR department has Accepted or Rejected. The Manager, who is the approving authority, will either Approve or Reject this request. Accordingly,the user will get his Approved or Rejected status.
![Workflow](img/workflow-leave-fl.jpg)
To make this Workflow and transition rules go to :
> Setup > Workflow > New Workflow
#### Step 1: Enter the different states of Leave Approval Process.
![Workflow](img/workflow-leave1.png)
#### Step 2: Enter Transition Rules.
![Workflow](img/workflow-leave2.png)
Example of a Leave Application Process:
Go to the Human Resources Module and click on Leave Application. Apply for a Leave.
When a Leave Application is submitted, the status on the right hand corner of the page shows as "Applied"
![Workflow Employee LA](img/workflow-employee-la.png)
When the HR User logs in, he can either Approve or Reject. If approved the status on the right hand corner of the page shows as Approved. However, a blue band of information is displayed saying approval is pending by leave approver.
![Leave Approver](img/workflow-hr-user-la.png)
When the leave approver opens the Leave Application page, he should select the status and convert to Approved or Rejected.
![Workflow Leave Approver](img/workflow-leave-approver-la.png)

View File

@ -4,6 +4,12 @@
}
---
Item Group is the classification category. Depending on the type of product, you have to categorise it under its respective field. If the product is service oriented, you have to name it under the group head Service. If the product is used as a raw-material, you have to name it under the Raw-material category. In case, your product is used only in trading, you can categorise it under Trading.
Item Group is the classification category. Depending on the type of product, you have to categorise it under its respective field. If the product is service oriented, you have to name it under the group head service. If the product is used as a raw-material, you have to name it under the Raw-material category. In case, your product is used only in trading, you can categorise it under Trading.
You can also create your own Item groups .
> Stock > Item Group
![Item Group](img/item-group-tree.png)
You can also create your own groups . Go to Setup- Master Data- Item Group- Item Group Tree- Add Child.

View File

@ -1,9 +1,24 @@
---
{
"_label": "Stock / Inventory"
"_label": "Stock / Inventory",
"_toc": [
"docs.user.stock.warehouse",
"docs.user.stock.item_group",
"docs.user.stock.item",
"docs.user.stock.serialized",
"docs.user.stock.purchase_receipt",
"docs.user.stock.delivery_note",
"docs.user.stock.stock_entry",
"docs.user.stock.material_issue",
"docs.user.stock.sales_return",
"docs.user.stock.purchase_return",
"docs.user.stock.projected_quantity"
]
}
---
![Stock-Inventory](img/stock-inventory.png)

View File

@ -2,10 +2,10 @@
{
"_label": "Support",
"_toc": [
"docs.user.ops.support.support_ticket",
"docs.user.ops.support.customer_issue",
"docs.user.ops.support.maintenance_visit",
"docs.user.ops.support.maintenance_schedule"
"docs.user.support.support_ticket",
"docs.user.support.customer_issue",
"docs.user.support.maintenance_visit",
"docs.user.support.maintenance_schedule"
]
}
---

View File

@ -21,9 +21,4 @@ class DocType(TransactionBase):
else:
status = "Open"
webnotes.conn.set(self.doc, 'status', status)
def on_trash(self):
webnotes.conn.sql("""delete from `tabCommunication`
where job_applicant=%s""", self.doc.name)
webnotes.conn.set(self.doc, 'status', status)

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-29 19:25:37",
"docstatus": 0,
"modified": "2013-09-02 16:26:23",
"modified": "2013-09-10 10:51:51",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -95,7 +95,8 @@
"fieldtype": "Table",
"hidden": 1,
"label": "Communications",
"options": "Communication"
"options": "Communication",
"print_hide": 1
},
{
"doctype": "DocPerm"

View File

@ -149,6 +149,7 @@ def install_python_modules():
exec_in_shell("easy_install pip")
exec_in_shell("pip install --upgrade pip")
exec_in_shell("pip install --upgrade setuptools")
exec_in_shell("pip install --upgrade virtualenv")
exec_in_shell("pip install -q %s" % python_modules)

View File

@ -9,9 +9,6 @@ def execute():
webnotes.conn.sql("""update tabAddress set address_title = customer_name where ifnull(customer_name,'')!=''""")
webnotes.conn.sql("""update tabAddress set address_title = supplier_name where ifnull(supplier_name,'')!=''""")
webnotes.conn.sql("""update tabAddress set address_title = sales_partner where ifnull(sales_partner,'')!=''""")
webnotes.reload_doc("website", "doctype", "product_settings")
webnotes.reset_perms("Product Settings")
# move code to new doctype
webnotes.conn.set_value("Website Script", None, "javascript",

View File

@ -1,21 +1,29 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes.utils import cint
import MySQLdb
def execute():
webnotes.reload_doc("setup", "doctype", "price_list")
webnotes.reload_doc("stock", "doctype", "item_price")
for price_list in webnotes.conn.sql_list("""select name from `tabPrice List`"""):
buying, selling = False, False
for b, s in webnotes.conn.sql("""select distinct buying, selling
from `tabItem Price` where price_list_name=%s""", price_list):
buying = buying or cint(b)
selling = selling or cint(s)
try:
for price_list in webnotes.conn.sql_list("""select name from `tabPrice List`"""):
buying, selling = False, False
for b, s in webnotes.conn.sql("""select distinct buying, selling
from `tabItem Price` where price_list_name=%s""", price_list):
buying = buying or cint(b)
selling = selling or cint(s)
buying_or_selling = "Selling" if selling else "Buying"
webnotes.conn.set_value("Price List", price_list, "buying_or_selling", buying_or_selling)
webnotes.conn.sql("""update `tabItem Price` set buying_or_selling=%s
where price_list_name=%s""", (buying_or_selling, price_list))
buying_or_selling = "Selling" if selling else "Buying"
webnotes.conn.set_value("Price List", price_list, "buying_or_selling", buying_or_selling)
webnotes.conn.sql("""update `tabItem Price` set buying_or_selling=%s
where price_list_name=%s""", (buying_or_selling, price_list))
except MySQLdb.OperationalError, e:
if e.args[0] == 1054:
webnotes.conn.sql("""update `tabItem Price` set buying_or_selling="Selling" """)
else:
raise e

View File

@ -263,7 +263,9 @@ patch_list = [
"execute:webnotes.reload_doc('accounts', 'Print Format', 'POS Invoice') # 2013-09-02",
"patches.september_2013.p01_fix_buying_amount_gl_entries",
"patches.september_2013.p01_update_communication",
"execute:webnotes.reload_doc('setup', 'doctype', 'features_setup') # 2013-09-05",
"patches.september_2013.p02_fix_serial_no_status",
"patches.august_2013.p06_deprecate_is_cancelled",
"execute:webnotes.delete_doc('DocType', 'Budget Control')",
"patches.september_2013.p03_update_stock_uom_in_sle",
]

View File

@ -1,15 +1,22 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
import MySQLdb
def execute():
webnotes.reload_doc("core", "doctype", "communication")
webnotes.conn.sql("""update tabCommunication set communication_date = creation where
ifnull(communication_date, '')='' """)
for doctype in ("Contact", "Lead", "Job Applicant", "Supplier", "Customer", "Quotation", "Sales Person", "Support Ticket"):
fieldname = doctype.replace(" ", '_').lower()
webnotes.conn.sql("""update tabCommunication
set parenttype=%s, parentfield='communications',
parent=`%s`
where ifnull(`%s`, '')!=''""" % ("%s", fieldname, fieldname), doctype)
webnotes.reload_doc("core", "doctype", "communication")
webnotes.conn.sql("""update tabCommunication set communication_date = creation where
ifnull(communication_date, '')='' """)
try:
fieldname = doctype.replace(" ", '_').lower()
webnotes.conn.sql("""update tabCommunication
set parenttype=%s, parentfield='communications',
parent=`%s`
where ifnull(`%s`, '')!=''""" % ("%s", fieldname, fieldname), doctype)
except MySQLdb.OperationalError, e:
if e.args[0] != 1054:
raise e

View File

@ -0,0 +1,9 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
def execute():
webnotes.conn.sql("""update `tabStock Ledger Entry` sle, tabItem i
set sle.stock_uom = i.stock_uom
where sle.item_code = i.name and ifnull(sle.stock_uom, '') = ''""")

View File

@ -7,8 +7,7 @@
"app/public/js/startup.css"
],
"public/js/all-web.min.js": [
"app/public/js/website_utils.js",
"lib/public/js/wn/misc/number_format.js"
"app/public/js/website_utils.js"
],
"public/js/all-app.min.js": [
"app/public/js/startup.js",

View File

@ -15,8 +15,9 @@ erpnext.toolbar.setup = function() {
$user.append('<li><a href="http://groups.google.com/group/erpnext-user-forum" target="_blank">\
<i class="icon-fixed-width icon-quote-left"></i> '+wn._('Forum')+'</a></li>');
if(wn.boot.expires_on) {
$user.append('<li><a href="http://www.providesupport.com?messenger=iwebnotes" target="_blank">\
if(wn.boot.expires_on || wn.boot.commercial_support) {
$user.append('<li>\
<a href="http://www.providesupport.com?messenger=iwebnotes" target="_blank">\
<i class="icon-fixed-width icon-comments"></i> '+wn._('Live Chat')+'</a></li>');
}

View File

@ -338,8 +338,19 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
var headings = $.map([wn._("Item Name")].concat($.map(tax_accounts, function(head) { return head[1]; })),
function(head) { return '<th style="min-width: 100px;">' + (head || "") + "</th>" }).join("\n");
var distinct_item_names = [];
var distinct_items = [];
$.each(this.get_item_doclist(), function(i, item) {
if(distinct_item_names.indexOf(item.item_code || item.item_name)===-1) {
distinct_item_names.push(item.item_code || item.item_name);
distinct_items.push(item);
}
});
var rows = $.map(this.get_item_doclist(), function(item) {
console.log(distinct_items);
var rows = $.map(distinct_items, function(item) {
var item_tax_record = item_tax[item.item_code || item.item_name];
if(!item_tax_record) { return null; }
return repl("<tr><td>%(item_name)s</td>%(taxes)s</tr>", {

View File

@ -1,9 +1,8 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
// License: GNU General Public License v3. See license.txt
var erpnext = {};
var wn = {};
if(!window.erpnext) erpnext = {};
if(!window.wn) wn = {};
// Add / update a new Lead / Communication
// subject, sender, description
@ -18,7 +17,7 @@ erpnext.send_message = function(opts) {
wn.call = function(opts) {
if(opts.btn) {
$(opts.btn).attr("disabled", "disabled");
$(opts.btn).prop("disabled", true);
}
if(opts.msg) {
@ -51,7 +50,7 @@ wn.call = function(opts) {
dataType: "json",
success: function(data) {
if(opts.btn) {
$(opts.btn).attr("disabled", false);
$(opts.btn).prop("disabled", false);
}
if(data.exc) {
if(opts.btn) {
@ -200,7 +199,7 @@ $.extend(wn.cart, {
update_cart: function(opts) {
if(!full_name) {
if(localStorage) {
localStorage.setItem("last_visited", window.location.pathname.slice(1));
localStorage.setItem("last_visited", window.location.href.split("/").slice(-1)[0]);
localStorage.setItem("pending_add_to_cart", opts.item_code);
}
window.location.href = "login";
@ -229,4 +228,26 @@ $.extend(wn.cart, {
if(cart_count)
$(".cart-count").html("( "+ cart_count +" )")
}
});
});
function remove_script_and_style(txt) {
return (!txt || (txt.indexOf("<script>")===-1 && txt.indexOf("<style>")===-1)) ? txt :
$("<div></div>").html(txt).find("script,noscript,style,title,meta").remove().end().html();
}
function is_html(txt) {
if(txt.indexOf("<br>")==-1 && txt.indexOf("<p")==-1
&& txt.indexOf("<img")==-1 && txt.indexOf("<div")==-1) {
return false;
}
return true;
}
function ask_to_login() {
if(!full_name) {
if(localStorage) {
localStorage.setItem("last_visited", window.location.href.split("/").slice(-1)[0]);
}
window.location.href = "login";
}
}

View File

@ -126,14 +126,10 @@ class DocType(TransactionBase):
webnotes.conn.sql("""delete from `tabAddress` where name=%s""", name)
def delete_customer_contact(self):
for rec in sql("select * from `tabContact` where customer=%s", (self.doc.name,), as_dict=1):
sql("delete from `tabContact` where name=%s",(rec['name']))
for contact in webnotes.conn.sql_list("""select name from `tabContact`
where customer=%s""", self.doc.name):
webnotes.delete_doc("Contact", contact)
def delete_customer_communication(self):
webnotes.conn.sql("""\
delete from `tabCommunication`
where customer = %s and supplier is null""", self.doc.name)
def delete_customer_account(self):
"""delete customer's ledger if exist and check balance before deletion"""
acc = sql("select name from `tabAccount` where master_type = 'Customer' \
@ -145,7 +141,6 @@ class DocType(TransactionBase):
def on_trash(self):
self.delete_customer_address()
self.delete_customer_contact()
self.delete_customer_communication()
self.delete_customer_account()
if self.doc.lead_name:
sql("update `tabLead` set status='Interested' where name=%s",self.doc.lead_name)

View File

@ -2,7 +2,7 @@
{
"creation": "2013-06-11 14:26:44",
"docstatus": 0,
"modified": "2013-09-02 16:25:13",
"modified": "2013-09-10 10:50:50",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -195,14 +195,16 @@
"fieldtype": "Section Break",
"label": "Communication History",
"options": "icon-comments",
"permlevel": 0
"permlevel": 0,
"print_hide": 1
},
{
"doctype": "DocField",
"fieldname": "communication_html",
"fieldtype": "HTML",
"label": "Communication HTML",
"permlevel": 0
"permlevel": 0,
"print_hide": 1
},
{
"doctype": "DocField",
@ -355,7 +357,8 @@
"hidden": 1,
"label": "Communications",
"options": "Communication",
"permlevel": 0
"permlevel": 0,
"print_hide": 1
},
{
"amend": 0,

View File

@ -80,7 +80,6 @@ class DocType(SellingController):
return webnotes.conn.get_value('Sales Email Settings',None,'email_id')
def on_trash(self):
webnotes.conn.sql("""update tabCommunication set lead=null where lead=%s""", self.doc.name)
webnotes.conn.sql("""update `tabSupport Ticket` set lead='' where lead=%s""",
self.doc.name)

View File

@ -2,7 +2,7 @@
{
"creation": "2013-04-10 11:45:37",
"docstatus": 0,
"modified": "2013-09-02 17:25:59",
"modified": "2013-09-10 10:52:20",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -159,7 +159,8 @@
"fieldname": "communication_history",
"fieldtype": "Section Break",
"label": "Communication History",
"options": "icon-comments"
"options": "icon-comments",
"print_hide": 1
},
{
"allow_on_submit": 0,
@ -168,7 +169,8 @@
"fieldtype": "HTML",
"label": "Communication HTML",
"oldfieldname": "follow_up",
"oldfieldtype": "Table"
"oldfieldtype": "Table",
"print_hide": 1
},
{
"doctype": "DocField",
@ -416,7 +418,8 @@
"fieldtype": "Table",
"hidden": 1,
"label": "Communications",
"options": "Communication"
"options": "Communication",
"print_hide": 1
},
{
"cancel": 1,

View File

@ -160,6 +160,11 @@ class DocType(TransactionBase):
def make_quotation(source_name, target_doclist=None):
from webnotes.model.mapper import get_mapped_doclist
def set_missing_values(source, target):
quotation = webnotes.bean(target)
quotation.run_method("onload_post_render")
quotation.run_method("calculate_taxes_and_totals")
doclist = get_mapped_doclist("Opportunity", source_name, {
"Opportunity": {
"doctype": "Quotation",
@ -181,6 +186,6 @@ def make_quotation(source_name, target_doclist=None):
},
"add_if_empty": True
}
}, target_doclist)
}, target_doclist, set_missing_values)
return [d.fields for d in doclist]

View File

@ -2,7 +2,7 @@
{
"creation": "2013-03-07 18:50:30",
"docstatus": 0,
"modified": "2013-09-02 16:27:33",
"modified": "2013-09-10 10:52:49",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -168,6 +168,7 @@
"label": "Communication History",
"oldfieldtype": "Section Break",
"options": "icon-comments",
"print_hide": 1,
"read_only": 0
},
{
@ -178,6 +179,7 @@
"label": "Communication HTML",
"oldfieldname": "follow_up",
"oldfieldtype": "Table",
"print_hide": 1,
"read_only": 0
},
{
@ -448,7 +450,8 @@
"fieldtype": "Table",
"hidden": 1,
"label": "Communications",
"options": "Communication"
"options": "Communication",
"print_hide": 1
},
{
"doctype": "DocPerm",

View File

@ -204,11 +204,6 @@ class DocType(SellingController):
print_lst.append(lst1)
return print_lst
def update_followup_details(self):
sql("delete from `tabCommunication Log` where parent = '%s'"%self.doc.name)
for d in getlist(self.doclist, 'follow_up'):
d.save()
@webnotes.whitelist()
def make_sales_order(source_name, target_doclist=None):
return _make_sales_order(source_name, target_doclist)

View File

@ -2,7 +2,7 @@
{
"creation": "2013-05-24 19:29:08",
"docstatus": 0,
"modified": "2013-09-02 16:25:01",
"modified": "2013-09-10 10:46:33",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -841,7 +841,8 @@
"fieldtype": "Table",
"hidden": 1,
"label": "Communications",
"options": "Communication"
"options": "Communication",
"print_hide": 1
},
{
"amend": 1,

View File

@ -432,14 +432,16 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
calculate_outstanding_amount: function() {
// NOTE:
// write_off_amount is only for POS Invoice
// paid_amount and write_off_amount is only for POS Invoice
// total_advance is only for non POS Invoice
if(this.frm.doc.doctype == "Sales Invoice" && this.frm.doc.docstatus==0) {
wn.model.round_floats_in(this.frm.doc, ["grand_total", "total_advance", "write_off_amount",
"paid_amount"]);
var total_amount_to_pay = this.frm.doc.grand_total - this.frm.doc.write_off_amount;
this.frm.doc.outstanding_amount = flt(total_amount_to_pay - this.frm.doc.total_advance -
this.frm.doc.paid_amount, precision("outstanding_amount"));
var total_amount_to_pay = this.frm.doc.grand_total - this.frm.doc.write_off_amount - this.frm.doc.total_advance;
this.frm.doc.paid_amount = this.frm.doc.is_pos? flt(total_amount_to_pay): 0.0;
this.frm.doc.outstanding_amount = flt(total_amount_to_pay - this.frm.doc.paid_amount,
precision("outstanding_amount"));
}
},

View File

@ -4,7 +4,6 @@
from __future__ import unicode_literals
import webnotes
import webnotes.utils
import json
from webnotes.utils import cstr, flt, getdate
from webnotes.model.bean import getlist
@ -289,55 +288,6 @@ class DocType(SellingController):
def on_update(self):
pass
@webnotes.whitelist()
def get_orders():
# find customer id
customer = webnotes.conn.get_value("Contact", {"email_id": webnotes.session.user},
"customer")
if customer:
orders = webnotes.conn.sql("""select
name, creation, currency from `tabSales Order`
where customer=%s
and docstatus=1
order by creation desc
limit 20
""", customer, as_dict=1)
for order in orders:
order.items = webnotes.conn.sql("""select
item_name, qty, export_rate, export_amount, delivered_qty, stock_uom
from `tabSales Order Item`
where parent=%s
order by idx""", order.name, as_dict=1)
return orders
else:
return []
def get_website_args():
customer = webnotes.conn.get_value("Contact", {"email_id": webnotes.session.user},
"customer")
bean = webnotes.bean("Sales Order", webnotes.form_dict.name)
if bean.doc.customer != customer:
return {
"doc": {"name": "Not Allowed"}
}
else:
return {
"doc": bean.doc,
"doclist": bean.doclist,
"webnotes": webnotes,
"utils": webnotes.utils
}
def get_currency_and_number_format():
return {
"global_number_format": webnotes.conn.get_default("number_format") or "#,###.##",
"currency": webnotes.conn.get_default("currency"),
"currency_symbols": json.dumps(dict(webnotes.conn.sql("""select name, symbol
from tabCurrency where ifnull(enabled,0)=1""")))
}
def set_missing_values(source, target):
bean = webnotes.bean(target)
bean.run_method("onload_post_render")
@ -409,7 +359,12 @@ def make_delivery_note(source_name, target_doclist=None):
return [d.fields for d in doclist]
@webnotes.whitelist()
def make_sales_invoice(source_name, target_doclist=None):
def make_sales_invoice(source_name, target_doclist=None):
def set_missing_values(source, target):
bean = webnotes.bean(target)
bean.doc.is_pos = 0
bean.run_method("onload_post_render")
def update_item(obj, target, source_parent):
target.export_amount = flt(obj.export_amount) - flt(obj.billed_amt)
target.amount = target.export_amount * flt(source_parent.conversion_rate)

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:24",
"docstatus": 0,
"modified": "2013-09-02 16:26:54",
"modified": "2013-09-10 10:53:28",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -166,7 +166,8 @@
"fieldtype": "Table",
"hidden": 1,
"label": "Communications",
"options": "Communication"
"options": "Communication",
"print_hide": 1
},
{
"cancel": 0,

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:24",
"docstatus": 0,
"modified": "2013-07-05 14:55:50",
"modified": "2013-09-10 17:20:25",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -35,7 +35,7 @@
"parenttype": "DocType",
"permlevel": 0,
"read": 1,
"report": 1,
"report": 0,
"role": "System Manager",
"submit": 0,
"write": 1
@ -78,7 +78,6 @@
"doctype": "DocField",
"fieldname": "static_parameters",
"fieldtype": "Column Break",
"label": "Static Parameters",
"width": "50%"
},
{
@ -86,7 +85,7 @@
"doctype": "DocField",
"fieldname": "static_parameter_details",
"fieldtype": "Table",
"label": "SMS Parameters",
"label": "Static Parameters",
"options": "SMS Parameter"
},
{

View File

@ -21,25 +21,6 @@ from __future__ import unicode_literals
import webnotes
lang_names = {
"हिंदी": "hi",
"deutsch": "de",
"english": "en",
"español": "es",
"français": "fr",
"português": "pt",
"português brasileiro": "pt-BR",
"nederlands": "nl",
"српски":"sr",
"தமிழ்": "ta",
"hrvatski": "hr",
"italiano": "it",
"ไทย": "th",
"العربية":"ar"
}
lang_list = ["ar", "de", "en", "es", "fr", "hi", "hr", "it", "nl", "pt-BR", "pt", "th", "sr", "ta"]
product_name = "ERPNext"
profile_defaults = {
"Company": "company",

Some files were not shown because too many files have changed in this diff Show More