| ';
-
- // main table
- out +=''+make_row('Net Total',fmt_money(convert_rate(doc.net_total)),1);
+ var cl = getchildren('RV Tax Detail',doc.name,'other_charges');
- // add rows
- if(cl.length){
- for(var i=0;i';
- out += '';
- out += '| In Words | '
- out+= ''+doc.in_words_export+' | '
- }
- out +='
| ';
- }
- return out;
+ // outer table
+ var out=' | ';
+
+ // main table
+
+ out +='';
+ if(!print_hide_dict['net_total']) {
+ out +=make_row('Net Total',fmt_money(convert_rate(doc.net_total)),1);
+ }
+
+ // add rows
+ if(cl.length){
+ for(var i=0;i';
+ out += '';
+ out += '| In Words | '
+ out+= ''+doc.in_words_export+' | '
+ }
+ out +='
| ';
+ }
+ return out;
}
cur_frm.cscript.charge_type = function(doc, cdt, cdn) {
diff --git a/erpnext/startup/event_handlers.py b/erpnext/startup/event_handlers.py
index 53b979e066e..4eec0bc1676 100644
--- a/erpnext/startup/event_handlers.py
+++ b/erpnext/startup/event_handlers.py
@@ -44,6 +44,20 @@ def on_login_post_session(login_manager):
if webnotes.form_dict.get('login_from'):
webnotes.session['data']['login_from'] = webnotes.form.getvalue('login_from')
webnotes.session_obj.update()
+
+ # Clear previous sessions i.e. logout previous log-in attempts
+ exception_list = ['demo@webnotestech.com', 'Administrator']
+ if webnotes.session['user'] not in exception_list:
+ sid_list = webnotes.conn.sql("""
+ SELECT sid
+ FROM `tabSessions`
+ WHERE
+ user=%s AND
+ sid!=%s
+ ORDER BY lastupdate desc""", \
+ (webnotes.session['user'], webnotes.session['sid']), as_list=1)
+ for sid in sid_list:
+ webnotes.conn.sql("DELETE FROM `tabSessions` WHERE sid=%s", sid[0])
update_account_details()
@@ -53,7 +67,7 @@ def on_login_post_session(login_manager):
def on_logout(login_manager):
if cint(webnotes.conn.get_value('Control Panel', None, 'sync_with_gateway')):
from server_tools.gateway_utils import logout_sso
- logout_sso()
+ logout_sso(user=login_manager.user)
#
# create a profile (if logs in for the first time)
@@ -81,4 +95,4 @@ def login_as(user, login_manager):
p.enabled = 1
p.owner = user
p.save(1)
-
\ No newline at end of file
+
diff --git a/erpnext/startup/startup.js b/erpnext/startup/startup.js
index 07c1629f836..5a66ec672d6 100644
--- a/erpnext/startup/startup.js
+++ b/erpnext/startup/startup.js
@@ -432,16 +432,17 @@ pscript.startup_set_module_order = function() {
pscript.startup_setup_toolbar = function() {
var menu_tab = page_body.wntoolbar.menu_table_right;
- // Profile
- // ---------
- $td(menu_tab,0,0).innerHTML = ''+user_fullname+'';
-
+ // help
+ // ----
+ $td(menu_tab,0,0).innerHTML = 'Help';
+
+ $td(menu_tab,0,1).innerHTML = 'Forum';
+
if(pscript.is_erpnext_saas){
- // Help
- // --------------
- //var help_url = login_file + '#!helpdesk'
- $td(menu_tab,0,1).innerHTML = 'Forum';
-
+ // Live Chat Help
+ // --------------
+ $td(menu_tab,0,2).innerHTML = 'Chat';
+
// Manage account
// --------------
if(is_system_manager) {
@@ -449,18 +450,10 @@ pscript.startup_setup_toolbar = function() {
}
}
else{
- $dh($td(menu_tab,0,1));
+ $dh($td(menu_tab,0,2));
$dh($td(menu_tab,0,3));
}
- // Live Chat Help
- // --------------
- $td(menu_tab,0,2).innerHTML = 'Chat';
-
- // help
- // ----
- var cell = menu_tab.rows[0].insertCell(3);
- cell.innerHTML = 'Help';
$y(cell, page_body.wntoolbar.right_table_style);
}
diff --git a/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt b/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt
index 67738bdcb35..b26cd03a183 100644
--- a/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt
+++ b/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt
@@ -234,4 +234,4 @@
'to_table': 'Purchase Tax Detail',
'validation_logic': 'docstatus = 1'
}
-]
\ No newline at end of file
+]
diff --git a/erpnext/stock/Print Format/Delivery Note Classic/Delivery Note Classic.txt b/erpnext/stock/Print Format/Delivery Note Classic/Delivery Note Classic.txt
index aa90475e806..b33b28d5c4c 100644
--- a/erpnext/stock/Print Format/Delivery Note Classic/Delivery Note Classic.txt
+++ b/erpnext/stock/Print Format/Delivery Note Classic/Delivery Note Classic.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2011-12-13 11:02:59',
+ 'creation': '2011-12-21 11:02:04',
'docstatus': 0,
- 'modified': '2011-12-13 13:11:24',
+ 'modified': '2012-01-06 14:16:03',
'modified_by': 'Administrator',
'owner': 'Administrator'
},
@@ -14,7 +14,7 @@
{
'doc_type': 'Delivery Note',
'doctype': 'Print Format',
- 'html': '\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n \n\n\t\n\t\n \n\n\t\n\t\n \n\n',
+ 'html': '\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n \n\n\t\n\t\n \n\n\t\n\t\n \n',
'module': 'Stock',
'name': '__common__',
'standard': 'Yes'
diff --git a/erpnext/stock/Print Format/Delivery Note Modern/Delivery Note Modern.txt b/erpnext/stock/Print Format/Delivery Note Modern/Delivery Note Modern.txt
index 1b10b1631a8..065f3f49d05 100644
--- a/erpnext/stock/Print Format/Delivery Note Modern/Delivery Note Modern.txt
+++ b/erpnext/stock/Print Format/Delivery Note Modern/Delivery Note Modern.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2011-12-13 11:02:59',
+ 'creation': '2011-12-21 11:02:04',
'docstatus': 0,
- 'modified': '2011-12-13 13:20:50',
+ 'modified': '2012-01-06 14:16:38',
'modified_by': 'Administrator',
'owner': 'Administrator'
},
@@ -14,7 +14,7 @@
{
'doc_type': 'Delivery Note',
'doctype': 'Print Format',
- 'html': '\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n \n\n\t\n\t\n \n\n\t\n\t\n \n',
+ 'html': '\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n \n\n\t\n\t\n \n\n\t\n\t\n \n',
'module': 'Stock',
'name': '__common__',
'standard': 'Yes'
diff --git a/erpnext/stock/Print Format/Delivery Note Spartan/Delivery Note Spartan.txt b/erpnext/stock/Print Format/Delivery Note Spartan/Delivery Note Spartan.txt
index b0931075be0..1309b5cefdf 100644
--- a/erpnext/stock/Print Format/Delivery Note Spartan/Delivery Note Spartan.txt
+++ b/erpnext/stock/Print Format/Delivery Note Spartan/Delivery Note Spartan.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2011-12-13 11:02:59',
+ 'creation': '2011-12-21 11:02:04',
'docstatus': 0,
- 'modified': '2011-12-13 13:22:53',
+ 'modified': '2012-01-06 14:16:51',
'modified_by': 'Administrator',
'owner': 'Administrator'
},
@@ -14,7 +14,7 @@
{
'doc_type': 'Delivery Note',
'doctype': 'Print Format',
- 'html': '\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n \n\n\t\n\t\n \n\n\t\n\t\n \n',
+ 'html': '\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n \n\n\t\n\t\n \n\n\t\n\t\n \n',
'module': 'Stock',
'name': '__common__',
'standard': 'Yes'
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.txt b/erpnext/stock/doctype/delivery_note/delivery_note.txt
index 5340955e675..3078bf6ff28 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.txt
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.txt
@@ -5,7 +5,7 @@
{
'creation': '2011-04-18 15:58:20',
'docstatus': 0,
- 'modified': '2011-12-22 19:03:44',
+ 'modified': '2012-01-09 16:52:43',
'modified_by': 'Administrator',
'owner': 'Administrator'
},
@@ -21,7 +21,7 @@
# These values are common for all DocType
{
- '_last_update': '1324367019',
+ '_last_update': '1326105502',
'colour': 'White:FFF',
'default_print_format': 'Standard',
'doctype': 'DocType',
@@ -37,7 +37,7 @@
'show_in_menu': 0,
'subject': 'To %(customer_name)s on %(transaction_date)s | %(per_billed)s% billed',
'tag_fields': 'billing_status',
- 'version': 460
+ 'version': 463
},
# These values are common for all DocFormat
@@ -703,7 +703,7 @@
'oldfieldname': 'net_total',
'oldfieldtype': 'Currency',
'permlevel': 1,
- 'print_hide': 1,
+ 'print_hide': 0,
'reqd': 0,
'width': '150px'
},
@@ -885,7 +885,7 @@
'oldfieldname': 'grand_total_export',
'oldfieldtype': 'Currency',
'permlevel': 1,
- 'print_hide': 1,
+ 'print_hide': 0,
'reqd': 0,
'width': '150px'
},
@@ -900,7 +900,7 @@
'oldfieldname': 'rounded_total_export',
'oldfieldtype': 'Currency',
'permlevel': 1,
- 'print_hide': 1,
+ 'print_hide': 0,
'width': '150px'
},
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
index cf9b36b6e31..b5c68c27c46 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
@@ -78,6 +78,7 @@ cur_frm.fields_dict.contact_person.on_new = function(dn) {
locals['Contact'][dn].supplier_name = locals[cur_frm.doctype][cur_frm.docname].supplier_name;
}
+
// Get Purchase Order Button
// -----------------
cur_frm.cscript['Pull Purchase Order Details'] = function(doc, dt, dn) {
@@ -89,6 +90,7 @@ cur_frm.cscript['Pull Purchase Order Details'] = function(doc, dt, dn) {
}
+
//================ create new contact ============================================================================
cur_frm.cscript.new_contact = function(){
tn = createLocal('Contact');
diff --git a/erpnext/support/doctype/support_ticket/__init__.py b/erpnext/support/doctype/support_ticket/__init__.py
index f629cbdde68..3b05bda0510 100644
--- a/erpnext/support/doctype/support_ticket/__init__.py
+++ b/erpnext/support/doctype/support_ticket/__init__.py
@@ -40,19 +40,36 @@ class SupportMailbox(POP3Mailbox):
else:
content, content_type = mail.html_content, 'text/html'
- thread_id = mail.get_thread_id()
+ thread_list = mail.get_thread_id()
- if webnotes.conn.exists('Support Ticket', thread_id):
- from webnotes.model.code import get_obj
-
- st = get_obj('Support Ticket', thread_id)
- st.make_response_record(content, mail.mail['From'], content_type)
- webnotes.conn.set(st.doc, 'status', 'Open')
- update_feed(st.doc)
- # extract attachments
- self.save_attachments(st.doc, mail.attachments)
- return
+
+ email_id = mail.mail['From']
+ if "<" in mail.mail['From']:
+ import re
+ re_result = re.findall('(?<=\<)(\S+)(?=\>)', mail.mail['From'])
+ if re_result and re_result[0]: email_id = re_result[0]
+
+
+ for thread_id in thread_list:
+ exists = webnotes.conn.sql("""\
+ SELECT name
+ FROM `tabSupport Ticket`
+ WHERE name=%s AND raised_by REGEXP %s
+ """ , (thread_id, '(' + email_id + ')'))
+ if exists and exists[0] and exists[0][0]:
+ from webnotes.model.code import get_obj
+ st = get_obj('Support Ticket', thread_id)
+ st.make_response_record(content, mail.mail['From'], content_type)
+ webnotes.conn.set(st.doc, 'status', 'Open')
+ update_feed(st.doc)
+ # extract attachments
+ self.save_attachments(st.doc, mail.attachments)
+ return
+
+ opts = webnotes.conn.sql("""\
+ SELECT options FROM tabDocField
+ WHERE parent='Support Ticket' AND fieldname='naming_series'""")
# new ticket
from webnotes.model.doc import Document
d = Document('Support Ticket')
@@ -61,6 +78,7 @@ class SupportMailbox(POP3Mailbox):
d.raised_by = mail.mail['From']
d.content_type = content_type
d.status = 'Open'
+ d.naming_series = (opts and opts[0] and opts[0][0] and opts[0][0].split("\n")[0]) or 'SUP'
try:
d.save(1)
diff --git a/erpnext/support/doctype/support_ticket/support_ticket.js b/erpnext/support/doctype/support_ticket/support_ticket.js
index 914227b2226..b7413ea9190 100644
--- a/erpnext/support/doctype/support_ticket/support_ticket.js
+++ b/erpnext/support/doctype/support_ticket/support_ticket.js
@@ -47,6 +47,7 @@ $.extend(cur_frm.cscript, {
set_field_permlevel('description',2);
set_field_permlevel('raised_by',2);
}
+ refresh_field('status');
},
//
@@ -83,8 +84,7 @@ $.extend(cur_frm.cscript, {
Send: function(doc, dt, dn) {
$c_obj([doc], 'send_response', '', function(r,rt) {
locals[dt][dn].new_response = '';
- refresh_field('new_response');
- cs.make_listing(doc);
+ cur_frm.refresh();
});
},
diff --git a/erpnext/support/doctype/support_ticket/support_ticket.py b/erpnext/support/doctype/support_ticket/support_ticket.py
index c71304a0f75..709c7638a59 100644
--- a/erpnext/support/doctype/support_ticket/support_ticket.py
+++ b/erpnext/support/doctype/support_ticket/support_ticket.py
@@ -1,4 +1,5 @@
import webnotes
+from webnotes.model.doc import make_autoname
from utilities.transaction_base import TransactionBase
from home import update_feed
@@ -8,6 +9,9 @@ class DocType(TransactionBase):
self.doc = doc
self.doclist = doclist
+ def autoname(self):
+ self.doc.name = make_autoname(self.doc.naming_series+'.#####')
+
def send_response(self):
"""
Adds a new response to the ticket and sends an email to the sender
diff --git a/erpnext/support/doctype/support_ticket/support_ticket.txt b/erpnext/support/doctype/support_ticket/support_ticket.txt
index 0e3dee65903..bcdda149f08 100644
--- a/erpnext/support/doctype/support_ticket/support_ticket.txt
+++ b/erpnext/support/doctype/support_ticket/support_ticket.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2011-05-23 10:00:38',
+ 'creation': '2011-05-23 12:37:01',
'docstatus': 0,
- 'modified': '2011-12-27 17:40:25',
+ 'modified': '2012-01-05 16:29:45',
'modified_by': 'Administrator',
'owner': 'Administrator'
},
@@ -15,8 +15,8 @@
'_last_update': '1311584009',
'allow_attach': 1,
'allow_trash': 1,
- 'autoname': 'SUP.######',
'colour': 'White:FFF',
+ 'default_print_format': 'Standard',
'doctype': 'DocType',
'module': 'Support',
'name': '__common__',
@@ -26,7 +26,7 @@
'show_in_menu': 0,
'subject': '%(subject)s',
'tag_fields': 'status,allocated_to',
- 'version': 149
+ 'version': 153
},
# These values are common for all DocField
@@ -41,6 +41,7 @@
# These values are common for all DocPerm
{
'amend': 0,
+ 'cancel': 0,
'doctype': 'DocPerm',
'name': '__common__',
'parent': 'Support Ticket',
@@ -58,7 +59,6 @@
# DocPerm
{
- 'cancel': 0,
'create': 1,
'doctype': 'DocPerm',
'permlevel': 0,
@@ -68,7 +68,6 @@
# DocPerm
{
- 'cancel': 0,
'create': 1,
'doctype': 'DocPerm',
'permlevel': 0,
@@ -78,7 +77,6 @@
# DocPerm
{
- 'cancel': 1,
'create': 1,
'doctype': 'DocPerm',
'permlevel': 0,
@@ -88,7 +86,6 @@
# DocPerm
{
- 'cancel': 0,
'create': 0,
'doctype': 'DocPerm',
'permlevel': 1,
@@ -98,7 +95,6 @@
# DocPerm
{
- 'cancel': 0,
'create': 0,
'doctype': 'DocPerm',
'permlevel': 2,
@@ -187,7 +183,6 @@
'doctype': 'DocField',
'fieldtype': 'Button',
'label': 'Send',
- 'options': 'send_response',
'permlevel': 0
},
@@ -392,5 +387,20 @@
'no_copy': 1,
'permlevel': 0,
'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': 'DocField',
+ 'fieldname': 'naming_series',
+ 'fieldtype': 'Select',
+ 'hidden': 1,
+ 'label': 'Series',
+ 'no_copy': 1,
+ 'options': 'SUP',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'reqd': 0,
+ 'search_index': 0
}
]
\ No newline at end of file
diff --git a/index.html b/index.html
index b04284a1473..38dd883d118 100644
--- a/index.html
+++ b/index.html
@@ -3,7 +3,7 @@
ERPNext
-
diff --git a/js/app.js b/js/app.js
index aeb10a189da..5a8597d48ba 100644
--- a/js/app.js
+++ b/js/app.js
@@ -4,17 +4,10 @@ wn.require('lib/js/lib/jquery.min.js');
wn.require('lib/js/legacy/tiny_mce_33/jquery.tinymce.js');
wn.require('lib/js/wn/ui/status_bar.js');
-wn.sb = new wn.ui.StatusBar();
-wn.sb.set_value(15);
// for datepicker
wn.require('lib/js/legacy/jquery/jquery-ui.min.js')
-wn.sb.set_value(25);
-
wn.require('lib/js/legacy/wnf.compressed.js');
-wn.sb.set_value(40);
-
wn.require('lib/css/legacy/default.css');
-wn.sb.set_value(70);
$(document).bind('ready', function() {
startup();
diff --git a/templates/index.html b/templates/index.html
index 5a4f9b6c477..1f83af37ade 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -3,7 +3,7 @@
ERPNext
-
+
@@ -13,7 +13,7 @@
- {{ content }}
+ No content
diff --git a/version.num b/version.num
new file mode 100644
index 00000000000..d99e90eb967
--- /dev/null
+++ b/version.num
@@ -0,0 +1 @@
+29
\ No newline at end of file
diff --git a/versions-master.db b/versions-master.db
deleted file mode 100644
index 799c9afc33e..00000000000
Binary files a/versions-master.db and /dev/null differ
|
|