[merge]
This commit is contained in:
commit
c6f890f892
@ -197,11 +197,21 @@ wn.module_page["Accounts"] = [
|
|||||||
route: "query-report/Delivered Items To Be Billed",
|
route: "query-report/Delivered Items To Be Billed",
|
||||||
doctype: "Sales Invoice"
|
doctype: "Sales Invoice"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label":wn._("Received Items To Be Billed"),
|
||||||
|
route: "query-report/Received Items To Be Billed",
|
||||||
|
doctype: "Purchase Invoice"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label":wn._("Ordered Items To Be Billed"),
|
"label":wn._("Ordered Items To Be Billed"),
|
||||||
route: "query-report/Ordered Items To Be Billed",
|
route: "query-report/Ordered Items To Be Billed",
|
||||||
doctype: "Sales Invoice"
|
doctype: "Sales Invoice"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label":wn._("Purchase Order Items To Be Billed"),
|
||||||
|
route: "query-report/Purchase Order Items To Be Billed",
|
||||||
|
doctype: "Purchase Invoice"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label":wn._("Bank Clearance Summary"),
|
"label":wn._("Bank Clearance Summary"),
|
||||||
route: "query-report/Bank Clearance Summary",
|
route: "query-report/Bank Clearance Summary",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import webnotes
|
import webnotes
|
||||||
from webnotes import _
|
from webnotes import _
|
||||||
from webnotes.utils import flt, comma_and
|
from webnotes.utils import flt, comma_and, cstr
|
||||||
import webnotes.defaults
|
import webnotes.defaults
|
||||||
|
|
||||||
@webnotes.whitelist()
|
@webnotes.whitelist()
|
||||||
@ -31,13 +31,12 @@ def get_template():
|
|||||||
"3. Naming Series Options: %(naming_options)s"
|
"3. Naming Series Options: %(naming_options)s"
|
||||||
"4. Voucher Type Options: %(voucher_type)s"%(extra_note)s
|
"4. Voucher Type Options: %(voucher_type)s"%(extra_note)s
|
||||||
"-------Common Values-----------"
|
"-------Common Values-----------"
|
||||||
"Company:","%(default_company)s"
|
"Company:",
|
||||||
"--------Data----------"
|
"--------Data----------"
|
||||||
%(columns)s
|
%(columns)s
|
||||||
''' % {
|
''' % {
|
||||||
"template_type": template_type,
|
"template_type": template_type,
|
||||||
"user_fmt": webnotes.defaults.get_global_default('date_format'),
|
"user_fmt": webnotes.defaults.get_global_default('date_format'),
|
||||||
"default_company": webnotes.conn.get_default("company"),
|
|
||||||
"naming_options": naming_options.replace("\n", ", "),
|
"naming_options": naming_options.replace("\n", ", "),
|
||||||
"voucher_type": voucher_type.replace("\n", ", "),
|
"voucher_type": voucher_type.replace("\n", ", "),
|
||||||
"extra_note": extra_note,
|
"extra_note": extra_note,
|
||||||
@ -49,15 +48,30 @@ def get_template():
|
|||||||
|
|
||||||
@webnotes.whitelist()
|
@webnotes.whitelist()
|
||||||
def upload():
|
def upload():
|
||||||
|
messages = []
|
||||||
|
try:
|
||||||
from webnotes.utils.datautils import read_csv_content_from_uploaded_file
|
from webnotes.utils.datautils import read_csv_content_from_uploaded_file
|
||||||
rows = read_csv_content_from_uploaded_file()
|
rows = read_csv_content_from_uploaded_file()
|
||||||
|
|
||||||
common_values = get_common_values(rows)
|
common_values = get_common_values(rows)
|
||||||
company_abbr = webnotes.conn.get_value("Company", common_values.company, "abbr")
|
company_abbr = webnotes.conn.get_value("Company", common_values.company, "abbr")
|
||||||
|
|
||||||
|
if not company_abbr:
|
||||||
|
webnotes.msgprint(_("Company is missing or entered incorrect value"), raise_exception=1)
|
||||||
|
|
||||||
data, start_idx = get_data(rows, company_abbr)
|
data, start_idx = get_data(rows, company_abbr)
|
||||||
|
except Exception, e:
|
||||||
|
err_msg = webnotes.message_log and "<br>".join(webnotes.message_log) or cstr(e)
|
||||||
|
messages.append("""<p style='color: red'>%s</p>""" % (err_msg or "No message"))
|
||||||
|
webnotes.errprint(webnotes.getTraceback())
|
||||||
|
webnotes.message_log = []
|
||||||
|
return messages
|
||||||
|
|
||||||
return import_vouchers(common_values, data, start_idx, rows[0][0])
|
return import_vouchers(common_values, data, start_idx, rows[0][0])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def map_fields(field_list, source, target):
|
def map_fields(field_list, source, target):
|
||||||
for f in field_list:
|
for f in field_list:
|
||||||
if ":" in f:
|
if ":" in f:
|
||||||
@ -70,7 +84,6 @@ def import_vouchers(common_values, data, start_idx, import_type):
|
|||||||
from webnotes.model.bean import Bean
|
from webnotes.model.bean import Bean
|
||||||
from accounts.utils import get_fiscal_year
|
from accounts.utils import get_fiscal_year
|
||||||
from webnotes.utils.dateutils import parse_date
|
from webnotes.utils.dateutils import parse_date
|
||||||
|
|
||||||
messages = []
|
messages = []
|
||||||
|
|
||||||
def get_account_details(account):
|
def get_account_details(account):
|
||||||
@ -113,8 +126,9 @@ def import_vouchers(common_values, data, start_idx, import_type):
|
|||||||
|
|
||||||
if d.ref_number:
|
if d.ref_number:
|
||||||
if not d.ref_date:
|
if not d.ref_date:
|
||||||
raise webnotes.ValidationError, \
|
webnotes.msgprint(_("Ref Date is Mandatory if Ref Number is specified"),
|
||||||
"""Ref Date is Mandatory if Ref Number is specified"""
|
raise_exception=1)
|
||||||
|
|
||||||
d.ref_date = parse_date(d.ref_date)
|
d.ref_date = parse_date(d.ref_date)
|
||||||
|
|
||||||
d.company = common_values.company
|
d.company = common_values.company
|
||||||
@ -176,7 +190,7 @@ def import_vouchers(common_values, data, start_idx, import_type):
|
|||||||
webnotes.conn.commit()
|
webnotes.conn.commit()
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
webnotes.conn.rollback()
|
webnotes.conn.rollback()
|
||||||
err_msg = webnotes.message_log and "<br>".join(webnotes.message_log) or unicode(e)
|
err_msg = webnotes.message_log and "<br>".join(webnotes.message_log) or cstr(e)
|
||||||
messages.append("""<p style='color: red'>[row #%s] %s failed: %s</p>"""
|
messages.append("""<p style='color: red'>[row #%s] %s failed: %s</p>"""
|
||||||
% ((start_idx + 1) + i, jv.name or "", err_msg or "No message"))
|
% ((start_idx + 1) + i, jv.name or "", err_msg or "No message"))
|
||||||
messages.append("<p style='color: red'>All transactions rolled back</p>")
|
messages.append("<p style='color: red'>All transactions rolled back</p>")
|
||||||
@ -245,11 +259,15 @@ def get_data(rows, company_abbr):
|
|||||||
if not c.endswith(" - " + company_abbr)]
|
if not c.endswith(" - " + company_abbr)]
|
||||||
accounts = [c for c in rows[i+1] if c.endswith(" - " + company_abbr)]
|
accounts = [c for c in rows[i+1] if c.endswith(" - " + company_abbr)]
|
||||||
|
|
||||||
|
if not accounts:
|
||||||
|
webnotes.msgprint(_("""No Account found in csv file,
|
||||||
|
May be company abbreviation is not correct"""), raise_exception=1)
|
||||||
|
|
||||||
if accounts and (len(columns) != rows[i+1].index(accounts[0])):
|
if accounts and (len(columns) != rows[i+1].index(accounts[0])):
|
||||||
raise Exception, _("""All account columns should be after \
|
webnotes.msgprint(_("""All account columns should be after \
|
||||||
standard columns and on the right.
|
standard columns and on the right.
|
||||||
If you entered it properly, next probable reason \
|
If you entered it properly, next probable reason \
|
||||||
could be wrong account name.
|
could be wrong account name.
|
||||||
Please rectify it in the file and try again.""")
|
Please rectify it in the file and try again."""), raise_exception=1)
|
||||||
|
|
||||||
return data, start_row_idx
|
return data, start_row_idx
|
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-04-16 11:31:13",
|
"creation": "2013-04-16 11:31:13",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-04-30 17:54:47",
|
"modified": "2013-05-24 12:02:52",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
@ -0,0 +1,23 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"creation": "2013-05-28 15:54:16",
|
||||||
|
"docstatus": 0,
|
||||||
|
"modified": "2013-05-28 16:02:57",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"owner": "Administrator"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"add_total_row": 1,
|
||||||
|
"doctype": "Report",
|
||||||
|
"is_standard": "Yes",
|
||||||
|
"name": "__common__",
|
||||||
|
"query": "select \n `tabPurchase Order`.`name` as \"Purchase Order:Link/Purchase Order:120\",\n `tabPurchase Order`.`transaction_date` as \"Date:Date:100\",\n\t`tabPurchase Order`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Order Item`.`project_name` as \"Project\",\n\t`tabPurchase Order Item`.item_code as \"Item Code:Link/Item:120\",\n\t`tabPurchase Order Item`.qty as \"Qty:Float:100\",\n\t`tabPurchase Order Item`.billed_qty as \"Billed Qty:Float:100\", \n\t(`tabPurchase Order Item`.qty - ifnull(`tabPurchase Order Item`.billed_qty, 0)) as \"Qty to Bill:Float:100\",\n\t`tabPurchase Order Item`.item_name as \"Item Name::150\",\n\t`tabPurchase Order Item`.description as \"Description::200\"\nfrom\n\t`tabPurchase Order`, `tabPurchase Order Item`\nwhere\n\t`tabPurchase Order Item`.`parent` = `tabPurchase Order`.`name`\n\tand `tabPurchase Order`.docstatus = 1\n\tand `tabPurchase Order`.status != \"Stopped\"\n\tand ifnull(`tabPurchase Order Item`.billed_qty, 0) < ifnull(`tabPurchase Order Item`.qty, 0)\norder by `tabPurchase Order`.transaction_date asc",
|
||||||
|
"ref_doctype": "Purchase Invoice",
|
||||||
|
"report_name": "Purchase Order Items To Be Billed",
|
||||||
|
"report_type": "Query Report"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"doctype": "Report",
|
||||||
|
"name": "Purchase Order Items To Be Billed"
|
||||||
|
}
|
||||||
|
]
|
@ -0,0 +1,23 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"creation": "2013-05-28 15:57:59",
|
||||||
|
"docstatus": 0,
|
||||||
|
"modified": "2013-05-28 17:34:05",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"owner": "Administrator"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"add_total_row": 1,
|
||||||
|
"doctype": "Report",
|
||||||
|
"is_standard": "Yes",
|
||||||
|
"name": "__common__",
|
||||||
|
"query": "select \n `tabPurchase Receipt`.`name` as \"Purchase Receipt:Link/Purchase Receipt:120\",\n `tabPurchase Receipt`.`posting_date` as \"Date:Date:100\",\n `tabPurchase Receipt`.`supplier` as \"Supplier:Link/Supplier:120\",\n `tabPurchase Receipt Item`.`project_name` as \"Project\",\n\t`tabPurchase Receipt Item`.item_code as \"Item Code:Link/Item:120\",\n\t`tabPurchase Receipt Item`.qty as \"Qty:Float:100\",\n\t`tabPurchase Receipt Item`.billed_qty as \"Billed Qty:Float:100\", \n\t(`tabPurchase Receipt Item`.qty - ifnull(`tabPurchase Receipt Item`.billed_qty, 0)) as \"Qty to Bill:Float:100\",\n\t`tabPurchase Receipt Item`.item_name as \"Item Name::150\",\n\t`tabPurchase Receipt Item`.description as \"Description::200\"\nfrom\n\t`tabPurchase Receipt`, `tabPurchase Receipt Item`\nwhere\n\t`tabPurchase Receipt Item`.`parent` = `tabPurchase Receipt`.`name`\n\tand `tabPurchase Receipt`.docstatus = 1\n\tand `tabPurchase Receipt`.status != \"Stopped\"\n\tand ifnull(`tabPurchase Receipt Item`.billed_qty, 0) < ifnull(`tabPurchase Receipt Item`.qty, 0)\norder by `tabPurchase Receipt`.posting_date asc",
|
||||||
|
"ref_doctype": "Purchase Invoice",
|
||||||
|
"report_name": "Received Items To Be Billed",
|
||||||
|
"report_type": "Query Report"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"doctype": "Report",
|
||||||
|
"name": "Received Items To Be Billed"
|
||||||
|
}
|
||||||
|
]
|
@ -273,13 +273,14 @@ def create_stock_in_hand_jv(reverse=False):
|
|||||||
jv = webnotes.bean([
|
jv = webnotes.bean([
|
||||||
{
|
{
|
||||||
"doctype": "Journal Voucher",
|
"doctype": "Journal Voucher",
|
||||||
"naming_series": "_PATCH-",
|
"naming_series": "JV-AUTO-",
|
||||||
"company": company,
|
"company": company,
|
||||||
"posting_date": today,
|
"posting_date": today,
|
||||||
"fiscal_year": fiscal_year,
|
"fiscal_year": fiscal_year,
|
||||||
"voucher_type": "Journal Entry",
|
"voucher_type": "Journal Entry",
|
||||||
"user_remark": "Accounting Entry for Stock: \
|
"user_remark": (_("Auto Inventory Accounting") + ": " +
|
||||||
Initial booking of stock received but not billed account"
|
(_("Disabled") if reverse else _("Enabled")) + ". " +
|
||||||
|
_("Journal Entry for inventory that is received but not yet invoiced"))
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "Journal Voucher Detail",
|
"doctype": "Journal Voucher Detail",
|
||||||
@ -296,13 +297,21 @@ def create_stock_in_hand_jv(reverse=False):
|
|||||||
},
|
},
|
||||||
])
|
])
|
||||||
jv.insert()
|
jv.insert()
|
||||||
jv.submit()
|
|
||||||
|
|
||||||
jv_list.append(jv.doc.name)
|
jv_list.append(jv.doc.name)
|
||||||
|
|
||||||
if jv_list:
|
if jv_list:
|
||||||
webnotes.msgprint("""Folowing Journal Vouchers has been created automatically:
|
msgprint(_("Following Journal Vouchers have been created automatically") + \
|
||||||
%s""" % '\n'.join(jv_list))
|
":\n%s" % ("\n".join([("<a href=\"#Form/Journal Voucher/%s\">%s</a>" % (jv, jv)) for jv in jv_list]),))
|
||||||
|
|
||||||
|
msgprint(_("""These adjustment vouchers book the difference between \
|
||||||
|
the total value of received items and the total value of invoiced items, \
|
||||||
|
as a required step to use Auto Inventory Accounting.
|
||||||
|
This is an approximation to get you started.
|
||||||
|
You will need to submit these vouchers after checking if the values are correct.
|
||||||
|
For more details, read: \
|
||||||
|
<a href="http://erpnext.com/auto-inventory-accounting" target="_blank">\
|
||||||
|
Auto Inventory Accounting</a>"""))
|
||||||
|
|
||||||
webnotes.msgprint("""Please refresh the system to get effect of Auto Inventory Accounting""")
|
webnotes.msgprint("""Please refresh the system to get effect of Auto Inventory Accounting""")
|
||||||
|
|
||||||
@ -322,3 +331,20 @@ def get_stock_rbnb_value(company):
|
|||||||
and exists(select name from `tabPurchase Invoice`
|
and exists(select name from `tabPurchase Invoice`
|
||||||
where name = pi_item.parent and company = %s)""", company)
|
where name = pi_item.parent and company = %s)""", company)
|
||||||
return flt(total_received_amount[0][0]) - flt(total_billed_amount[0][0])
|
return flt(total_received_amount[0][0]) - flt(total_billed_amount[0][0])
|
||||||
|
|
||||||
|
|
||||||
|
def fix_total_debit_credit():
|
||||||
|
vouchers = webnotes.conn.sql("""select voucher_type, voucher_no,
|
||||||
|
sum(debit) - sum(credit) as diff
|
||||||
|
from `tabGL Entry`
|
||||||
|
group by voucher_type, voucher_no
|
||||||
|
having sum(ifnull(debit, 0)) != sum(ifnull(credit, 0))""", as_dict=1)
|
||||||
|
|
||||||
|
for d in vouchers:
|
||||||
|
if abs(d.diff) > 0:
|
||||||
|
dr_or_cr = d.voucher_type == "Sales Invoice" and "credit" or "debit"
|
||||||
|
|
||||||
|
webnotes.conn.sql("""update `tabGL Entry` set %s = %s + %s
|
||||||
|
where voucher_type = %s and voucher_no = %s and %s > 0 limit 1""" %
|
||||||
|
(dr_or_cr, dr_or_cr, '%s', '%s', '%s', dr_or_cr),
|
||||||
|
(d.diff, d.voucher_type, d.voucher_no), debug=1)
|
@ -5,6 +5,7 @@ def execute():
|
|||||||
webnotes.reload_doc("utilities", "doctype", "note_user")
|
webnotes.reload_doc("utilities", "doctype", "note_user")
|
||||||
|
|
||||||
for question in webnotes.conn.sql("""select * from tabQuestion""", as_dict=True):
|
for question in webnotes.conn.sql("""select * from tabQuestion""", as_dict=True):
|
||||||
|
if question.question:
|
||||||
name = question.question[:180]
|
name = question.question[:180]
|
||||||
if webnotes.conn.exists("Note", name):
|
if webnotes.conn.exists("Note", name):
|
||||||
webnotes.delete_doc("Note", name)
|
webnotes.delete_doc("Note", name)
|
||||||
|
@ -219,27 +219,8 @@ class DocType(TransactionBase):
|
|||||||
def on_rename(self, new, old, merge=False):
|
def on_rename(self, new, old, merge=False):
|
||||||
#update customer_name if not naming series
|
#update customer_name if not naming series
|
||||||
if webnotes.defaults.get_global_default('cust_master_name') == 'Customer Name':
|
if webnotes.defaults.get_global_default('cust_master_name') == 'Customer Name':
|
||||||
update_fields = [
|
webnotes.conn.sql("""update `tabCustomer` set customer_name = %s where name = %s""",
|
||||||
('Customer', 'name'),
|
(new, old))
|
||||||
('Address', 'customer'),
|
|
||||||
('Contact', 'customer'),
|
|
||||||
('Customer Issue', 'customer'),
|
|
||||||
('Delivery Note', 'customer'),
|
|
||||||
('Opportunity', 'customer'),
|
|
||||||
('Installation Note', 'customer'),
|
|
||||||
('Maintenance Schedule', 'customer'),
|
|
||||||
('Maintenance Visit', 'customer'),
|
|
||||||
('Project', 'customer'),
|
|
||||||
('Quotation', 'customer'),
|
|
||||||
('Sales Invoice', 'customer'),
|
|
||||||
('Sales Order', 'customer'),
|
|
||||||
('Serial No', 'customer'),
|
|
||||||
('Shipping Address', 'customer'),
|
|
||||||
('Stock Entry', 'customer'),
|
|
||||||
('Support Ticket', 'customer')]
|
|
||||||
for rec in update_fields:
|
|
||||||
sql("""update `tab%s` set customer_name = %s
|
|
||||||
where `%s` = %s""" % (rec[0], "%s" ,rec[1], "%s"), (new, old))
|
|
||||||
|
|
||||||
for account in webnotes.conn.sql("""select name, account_name from
|
for account in webnotes.conn.sql("""select name, account_name from
|
||||||
tabAccount where master_name=%s and master_type='Customer'""", old, as_dict=1):
|
tabAccount where master_name=%s and master_type='Customer'""", old, as_dict=1):
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"creation": "2013-05-03 14:38:34",
|
"creation": "2013-05-23 17:42:24",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-05-07 11:19:40",
|
"modified": "2013-05-24 12:20:17",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"add_total_row": 1,
|
"add_total_row": 1,
|
||||||
|
"disabled": 0,
|
||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
|
@ -50,5 +50,11 @@ wn.query_reports["Sales Person-wise Transaction Summary"] = {
|
|||||||
fieldtype: "Link",
|
fieldtype: "Link",
|
||||||
options: "Customer",
|
options: "Customer",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
fieldname:"territory",
|
||||||
|
label: "Territory",
|
||||||
|
fieldtype: "Link",
|
||||||
|
options: "Territory",
|
||||||
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -54,6 +54,7 @@ def get_conditions(filters, date_field):
|
|||||||
conditions = ""
|
conditions = ""
|
||||||
if filters.get("company"): conditions += " and dt.company = '%s'" % filters["company"]
|
if filters.get("company"): conditions += " and dt.company = '%s'" % filters["company"]
|
||||||
if filters.get("customer"): conditions += " and dt.customer = '%s'" % filters["customer"]
|
if filters.get("customer"): conditions += " and dt.customer = '%s'" % filters["customer"]
|
||||||
|
if filters.get("territory"): conditions += " and dt.territory = '%s'" % filters["territory"]
|
||||||
|
|
||||||
if filters.get("from_date"): conditions += " and dt.%s >= '%s'" % \
|
if filters.get("from_date"): conditions += " and dt.%s >= '%s'" % \
|
||||||
(date_field, filters["from_date"])
|
(date_field, filters["from_date"])
|
||||||
|
@ -123,16 +123,9 @@ class DocType:
|
|||||||
|
|
||||||
def validate_series_name(self, n):
|
def validate_series_name(self, n):
|
||||||
import re
|
import re
|
||||||
if "." in n:
|
if not re.match("^[a-zA-Z0-9-/.#]*$", n):
|
||||||
parts = n.split(".")
|
msgprint('Special Characters except "-" and "/" not allowed in naming series',
|
||||||
if len(parts) > 2:
|
raise_exception=True)
|
||||||
msgprint("Only one dot (.) allowed in " + n, raise_exception=1)
|
|
||||||
if not re.match("#+$", parts[-1]):
|
|
||||||
msgprint("Numbering series must be in hashes (e.g. ####)", raise_exception=1)
|
|
||||||
n = n[0]
|
|
||||||
if not re.match("^[a-zA-Z0-9-/]*$", n):
|
|
||||||
msgprint('Special Characters except "-" and "/" not allowed in naming series')
|
|
||||||
raise Exception
|
|
||||||
|
|
||||||
def get_options(self, arg=''):
|
def get_options(self, arg=''):
|
||||||
sr = webnotes.model.doctype.get_property(self.doc.select_doc_for_series,
|
sr = webnotes.model.doctype.get_property(self.doc.select_doc_for_series,
|
||||||
|
@ -73,7 +73,7 @@ wn.module_page["Setup"] = [
|
|||||||
{
|
{
|
||||||
"route":"Form/Naming Series/Naming Series",
|
"route":"Form/Naming Series/Naming Series",
|
||||||
doctype: "Naming Series",
|
doctype: "Naming Series",
|
||||||
label: wn._("Manage numbering series"),
|
label: wn._("Manage Numbering Series"),
|
||||||
"description":wn._("Set multiple numbering series for transactions")
|
"description":wn._("Set multiple numbering series for transactions")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 18:01:55",
|
"creation": "2013-02-22 18:01:55",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-05-13 16:11:27",
|
"modified": "2013-05-28 16:03:15",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@ -11,7 +11,7 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"query": "select \n `tabPurchase Order`.`name` as \"Purchase Order:Link/Purchase Order:120\",\n\t`tabPurchase Order`.`transaction_date` as \"Date:Date:100\",\n\t`tabPurchase Order`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Order`.`project_name` as \"Project\",\n\t`tabPurchase Order Item`.item_code as \"Item Code:Link/Item:120\",\n\t`tabPurchase Order Item`.qty as \"Qty:Float:100\",\n\t`tabPurchase Order Item`.received_qty as \"Received Qty:Float:100\", \n\t(`tabPurchase Order Item`.qty - ifnull(`tabPurchase Order Item`.received_qty, 0)) as \"Qty to Receive:Float:100\",\n\t`tabPurchase Order Item`.item_name as \"Item Name::150\",\n\t`tabPurchase Order Item`.description as \"Description::200\"\nfrom\n\t`tabPurchase Order`, `tabPurchase Order Item`\nwhere\n\t`tabPurchase Order Item`.`parent` = `tabPurchase Order`.`name`\n\tand `tabPurchase Order`.docstatus = 1\n\tand `tabPurchase Order`.status != \"Stopped\"\n\tand ifnull(`tabPurchase Order Item`.received_qty, 0) < ifnull(`tabPurchase Order Item`.qty, 0)\norder by `tabPurchase Order`.transaction_date asc",
|
"query": "select \n `tabPurchase Order`.`name` as \"Purchase Order:Link/Purchase Order:120\",\n\t`tabPurchase Order`.`transaction_date` as \"Date:Date:100\",\n\t`tabPurchase Order`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Order Item`.`project_name` as \"Project\",\n\t`tabPurchase Order Item`.item_code as \"Item Code:Link/Item:120\",\n\t`tabPurchase Order Item`.qty as \"Qty:Float:100\",\n\t`tabPurchase Order Item`.received_qty as \"Received Qty:Float:100\", \n\t(`tabPurchase Order Item`.qty - ifnull(`tabPurchase Order Item`.received_qty, 0)) as \"Qty to Receive:Float:100\",\n\t`tabPurchase Order Item`.item_name as \"Item Name::150\",\n\t`tabPurchase Order Item`.description as \"Description::200\"\nfrom\n\t`tabPurchase Order`, `tabPurchase Order Item`\nwhere\n\t`tabPurchase Order Item`.`parent` = `tabPurchase Order`.`name`\n\tand `tabPurchase Order`.docstatus = 1\n\tand `tabPurchase Order`.status != \"Stopped\"\n\tand ifnull(`tabPurchase Order Item`.received_qty, 0) < ifnull(`tabPurchase Order Item`.qty, 0)\norder by `tabPurchase Order`.transaction_date asc",
|
||||||
"ref_doctype": "Purchase Receipt",
|
"ref_doctype": "Purchase Receipt",
|
||||||
"report_name": "Purchase Order Items To Be Received",
|
"report_name": "Purchase Order Items To Be Received",
|
||||||
"report_type": "Query Report"
|
"report_type": "Query Report"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user