Merge branch 'master' into customer-login
This commit is contained in:
commit
0e23929740
@ -70,5 +70,5 @@ cur_frm.fields_dict["expense_account"].get_query = function(doc) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.fields_dict.user.get_query = function(doc,cdt,cdn) {
|
cur_frm.fields_dict.user.get_query = function(doc,cdt,cdn) {
|
||||||
return{ query:"controllers.queries.profile_query"}
|
return{ query:"core.doctype.profile.profile.profile_query"}
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,6 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
|||||||
source_doctype: "Delivery Note",
|
source_doctype: "Delivery Note",
|
||||||
get_query: function() {
|
get_query: function() {
|
||||||
var filters = {
|
var filters = {
|
||||||
docstatus: 1,
|
|
||||||
company: cur_frm.doc.company
|
company: cur_frm.doc.company
|
||||||
};
|
};
|
||||||
if(cur_frm.doc.customer) filters["customer"] = cur_frm.doc.customer;
|
if(cur_frm.doc.customer) filters["customer"] = cur_frm.doc.customer;
|
||||||
|
@ -333,10 +333,10 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
|
|||||||
// other charges added/deducted
|
// other charges added/deducted
|
||||||
if(tax_count) {
|
if(tax_count) {
|
||||||
this.frm.doc.other_charges_added = wn.utils.sum($.map(this.frm.tax_doclist,
|
this.frm.doc.other_charges_added = wn.utils.sum($.map(this.frm.tax_doclist,
|
||||||
function(tax) { return tax.add_deduct_tax == "Add" ? tax.tax_amount : 0.0; }));
|
function(tax) { return (tax.add_deduct_tax == "Add" && in_list(["Valuation and Total", "Total"], tax.category)) ? tax.tax_amount : 0.0; }));
|
||||||
|
|
||||||
this.frm.doc.other_charges_deducted = wn.utils.sum($.map(this.frm.tax_doclist,
|
this.frm.doc.other_charges_deducted = wn.utils.sum($.map(this.frm.tax_doclist,
|
||||||
function(tax) { return tax.add_deduct_tax == "Deduct" ? tax.tax_amount : 0.0; }));
|
function(tax) { return (tax.add_deduct_tax == "Deduct" && in_list(["Valuation and Total", "Total"], tax.category)) ? tax.tax_amount : 0.0; }));
|
||||||
|
|
||||||
wn.model.round_floats_in(this.frm.doc, ["other_charges_added", "other_charges_deducted"]);
|
wn.model.round_floats_in(this.frm.doc, ["other_charges_added", "other_charges_deducted"]);
|
||||||
|
|
||||||
|
@ -18,9 +18,6 @@ class DocType(TransactionBase):
|
|||||||
self.doc = doc
|
self.doc = doc
|
||||||
self.doclist = doclist
|
self.doclist = doclist
|
||||||
|
|
||||||
def onload(self):
|
|
||||||
self.add_communication_list()
|
|
||||||
|
|
||||||
def autoname(self):
|
def autoname(self):
|
||||||
supp_master_name = webnotes.defaults.get_global_default('supp_master_name')
|
supp_master_name = webnotes.defaults.get_global_default('supp_master_name')
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-10 16:34:11",
|
"creation": "2013-01-10 16:34:11",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-08-08 14:22:08",
|
"modified": "2013-09-02 16:25:44",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@ -204,6 +204,14 @@
|
|||||||
"oldfieldname": "website",
|
"oldfieldname": "website",
|
||||||
"oldfieldtype": "Data"
|
"oldfieldtype": "Data"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"doctype": "DocField",
|
||||||
|
"fieldname": "communications",
|
||||||
|
"fieldtype": "Table",
|
||||||
|
"hidden": 1,
|
||||||
|
"label": "Communications",
|
||||||
|
"options": "Communication"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cancel": 0,
|
"cancel": 0,
|
||||||
"create": 0,
|
"create": 0,
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import webnotes
|
import webnotes
|
||||||
|
from webnotes.widgets.reportview import get_match_cond
|
||||||
|
|
||||||
def get_filters_cond(doctype, filters, conditions):
|
def get_filters_cond(doctype, filters, conditions):
|
||||||
if filters:
|
if filters:
|
||||||
@ -22,34 +23,6 @@ def get_filters_cond(doctype, filters, conditions):
|
|||||||
cond = ''
|
cond = ''
|
||||||
return cond
|
return cond
|
||||||
|
|
||||||
def get_match_cond(doctype, searchfield = 'name'):
|
|
||||||
from webnotes.widgets.reportview import build_match_conditions
|
|
||||||
cond = build_match_conditions(doctype)
|
|
||||||
|
|
||||||
if cond:
|
|
||||||
cond = ' and ' + cond
|
|
||||||
else:
|
|
||||||
cond = ''
|
|
||||||
return cond
|
|
||||||
|
|
||||||
# searches for enabled profiles
|
|
||||||
def profile_query(doctype, txt, searchfield, start, page_len, filters):
|
|
||||||
return webnotes.conn.sql("""select name, concat_ws(' ', first_name, middle_name, last_name)
|
|
||||||
from `tabProfile`
|
|
||||||
where ifnull(enabled, 0)=1
|
|
||||||
and docstatus < 2
|
|
||||||
and name not in ('Administrator', 'Guest')
|
|
||||||
and (%(key)s like "%(txt)s"
|
|
||||||
or concat_ws(' ', first_name, middle_name, last_name) like "%(txt)s")
|
|
||||||
%(mcond)s
|
|
||||||
order by
|
|
||||||
case when name like "%(txt)s" then 0 else 1 end,
|
|
||||||
case when concat_ws(' ', first_name, middle_name, last_name) like "%(txt)s"
|
|
||||||
then 0 else 1 end,
|
|
||||||
name asc
|
|
||||||
limit %(start)s, %(page_len)s""" % {'key': searchfield, 'txt': "%%%s%%" % txt,
|
|
||||||
'mcond':get_match_cond(doctype, searchfield), 'start': start, 'page_len': page_len})
|
|
||||||
|
|
||||||
# searches for active employees
|
# searches for active employees
|
||||||
def employee_query(doctype, txt, searchfield, start, page_len, filters):
|
def employee_query(doctype, txt, searchfield, start, page_len, filters):
|
||||||
return webnotes.conn.sql("""select name, employee_name from `tabEmployee`
|
return webnotes.conn.sql("""select name, employee_name from `tabEmployee`
|
||||||
@ -196,10 +169,12 @@ def get_price_list_currency(doctype, txt, searchfield, start, page_len, filters)
|
|||||||
def get_delivery_notes_to_be_billed(doctype, txt, searchfield, start, page_len, filters):
|
def get_delivery_notes_to_be_billed(doctype, txt, searchfield, start, page_len, filters):
|
||||||
return webnotes.conn.sql("""select `tabDelivery Note`.name, `tabDelivery Note`.customer_name
|
return webnotes.conn.sql("""select `tabDelivery Note`.name, `tabDelivery Note`.customer_name
|
||||||
from `tabDelivery Note`
|
from `tabDelivery Note`
|
||||||
where `tabDelivery Note`.`%(key)s` like %(txt)s %(fcond)s and
|
where `tabDelivery Note`.`%(key)s` like %(txt)s and
|
||||||
|
`tabDelivery Note`.docstatus = 1 %(fcond)s and
|
||||||
(ifnull((select sum(qty) from `tabDelivery Note Item` where
|
(ifnull((select sum(qty) from `tabDelivery Note Item` where
|
||||||
`tabDelivery Note Item`.parent=`tabDelivery Note`.name), 0) >
|
`tabDelivery Note Item`.parent=`tabDelivery Note`.name), 0) >
|
||||||
ifnull((select sum(qty) from `tabSales Invoice Item` where
|
ifnull((select sum(qty) from `tabSales Invoice Item` where
|
||||||
|
`tabSales Invoice Item`.docstatus = 1 and
|
||||||
`tabSales Invoice Item`.delivery_note=`tabDelivery Note`.name), 0))
|
`tabSales Invoice Item`.delivery_note=`tabDelivery Note`.name), 0))
|
||||||
%(mcond)s order by `tabDelivery Note`.`%(key)s` asc
|
%(mcond)s order by `tabDelivery Note`.`%(key)s` asc
|
||||||
limit %(start)s, %(page_len)s""" % {
|
limit %(start)s, %(page_len)s""" % {
|
||||||
|
@ -99,6 +99,8 @@ class SellingController(StockController):
|
|||||||
for item in self.doclist.get({"parentfield": self.fname}):
|
for item in self.doclist.get({"parentfield": self.fname}):
|
||||||
if item.item_code in self.stock_items or \
|
if item.item_code in self.stock_items or \
|
||||||
(item_sales_bom and item_sales_bom.get(item.item_code)):
|
(item_sales_bom and item_sales_bom.get(item.item_code)):
|
||||||
|
|
||||||
|
buying_amount = 0
|
||||||
if item.item_code in self.stock_items:
|
if item.item_code in self.stock_items:
|
||||||
buying_amount = get_buying_amount(self.doc.doctype, self.doc.name,
|
buying_amount = get_buying_amount(self.doc.doctype, self.doc.name,
|
||||||
item.name, stock_ledger_entries.get((item.item_code,
|
item.name, stock_ledger_entries.get((item.item_code,
|
||||||
@ -108,9 +110,10 @@ class SellingController(StockController):
|
|||||||
self.doc.doctype, self.doc.name, item.name, stock_ledger_entries,
|
self.doc.doctype, self.doc.name, item.name, stock_ledger_entries,
|
||||||
item_sales_bom)
|
item_sales_bom)
|
||||||
|
|
||||||
item.buying_amount = buying_amount >= 0.01 and buying_amount or 0
|
# buying_amount >= 0.01 so that gl entry doesn't get created for such small amounts
|
||||||
webnotes.conn.set_value(item.doctype, item.name, "buying_amount",
|
item.buying_amount = buying_amount >= 0.01 and buying_amount or 0
|
||||||
item.buying_amount)
|
webnotes.conn.set_value(item.doctype, item.name, "buying_amount",
|
||||||
|
item.buying_amount)
|
||||||
|
|
||||||
def check_expense_account(self, item):
|
def check_expense_account(self, item):
|
||||||
if item.buying_amount and not item.expense_account:
|
if item.buying_amount and not item.expense_account:
|
||||||
|
10
docs/dev/docs.dev.client_script.md
Normal file
10
docs/dev/docs.dev.client_script.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
{
|
||||||
|
"_label": "Client Scripts: Custoimzing ERPNext"
|
||||||
|
|
||||||
|
}
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -5,8 +5,9 @@
|
|||||||
"docs.dev.install",
|
"docs.dev.install",
|
||||||
"docs.dev.quickstart",
|
"docs.dev.quickstart",
|
||||||
"docs.dev.framework",
|
"docs.dev.framework",
|
||||||
"docs.dev.api",
|
|
||||||
"docs.dev.modules",
|
"docs.dev.modules",
|
||||||
|
"docs.dev.client_script",
|
||||||
|
"docs.dev.api",
|
||||||
"docs.dev.translate",
|
"docs.dev.translate",
|
||||||
"docs.dev.docs"
|
"docs.dev.docs"
|
||||||
]
|
]
|
51
docs/templates/docs.html
vendored
Normal file
51
docs/templates/docs.html
vendored
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
{% extends "lib/core/doctype/documentation_tool/docs.html" %}
|
||||||
|
|
||||||
|
{% block navbar %}
|
||||||
|
<div class="navbar navbar-default" style="border-bottom: 2px solid #c0392b">
|
||||||
|
<div class="container">
|
||||||
|
<button type="button" class="navbar-toggle"
|
||||||
|
data-toggle="collapse" data-target=".navbar-responsive-collapse">
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
</button>
|
||||||
|
<a class="navbar-brand" href="index.html">
|
||||||
|
<object data="img/splash.svg" class="erpnext-logo"
|
||||||
|
type="image/svg+xml"></object> erpnext.org</a>
|
||||||
|
<div class="collapse navbar-collapse navbar-responsive-collapse">
|
||||||
|
<ul class="nav navbar-nav">
|
||||||
|
<li><a href="docs.user.html">User</a></li>
|
||||||
|
<li><a href="docs.dev.html">Developer</a></li>
|
||||||
|
<li><a href="docs.user.help.html">Help</a></li>
|
||||||
|
<li><a href="docs.download.html">Download</a></li>
|
||||||
|
<li><a href="https://erpnext.com" target="_blank">Cloud</a></li>
|
||||||
|
</ul>
|
||||||
|
<ul class="nav navbar-nav pull-right">
|
||||||
|
<li><a href="docs.about.html">About</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block footer %}
|
||||||
|
<hr />
|
||||||
|
<div class="footer text-muted" style="font-size: 80%;">
|
||||||
|
<div class="content row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
© <a href="https://erpnext.com">Web Notes</a> |
|
||||||
|
<a href="docs.user.help.html">Help</a> |
|
||||||
|
<a href="https://github.com/webnotes/erpnext" target="_blank">Code</a> |
|
||||||
|
<a href="docs.attributions.html">Attributions</a> |
|
||||||
|
<a href="https://erpnext.com">ERPNext Cloud</a> |
|
||||||
|
<a href="https://erpnext.com/partners">Find a Partner</a> |
|
||||||
|
<a href="https://erpnext.com/donate">Donate</a>
|
||||||
|
<br>
|
||||||
|
<p>
|
||||||
|
Code License: <a href="https://www.gnu.org/licenses/gpl.html">GNU/GPL 3</a>.
|
||||||
|
Documentation License: <a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA-3.0</a>.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user