Merge branch 'responsive' of github.com:webnotes/erpnext into responsive

This commit is contained in:
Rushabh Mehta 2013-07-02 18:14:07 +05:30
commit e6bf83e653
34 changed files with 548 additions and 202 deletions

View File

@ -50,6 +50,7 @@ cur_frm.fields_dict.voucher_no.get_query = function(doc) {
where against_voucher_type = '%(dt)s' \ where against_voucher_type = '%(dt)s' \
and against_voucher = gle.voucher_no \ and against_voucher = gle.voucher_no \
and voucher_no != gle.voucher_no \ and voucher_no != gle.voucher_no \
and account = gle.account \
and ifnull(is_cancelled, 'No') = 'No') != \ and ifnull(is_cancelled, 'No') = 'No') != \
abs(ifnull(gle.debit, 0) - ifnull(gle.credit, 0)) \ abs(ifnull(gle.debit, 0) - ifnull(gle.credit, 0)) \
ORDER BY gle.posting_date DESC, gle.voucher_no DESC LIMIT 50", ORDER BY gle.posting_date DESC, gle.voucher_no DESC LIMIT 50",

View File

@ -147,7 +147,7 @@ cur_frm.cscript.account_head = function(doc, cdt, cdn) {
d.account_head = ''; d.account_head = '';
} }
else if(d.account_head && d.charge_type) { else if(d.account_head && d.charge_type) {
arg = "{'charge_type' : '" + d.charge_type +"', 'account_head' : '" + d.account_head + "'}"; arg = "{'charge_type' : '" + d.charge_type + "', 'account_head' : '" + d.account_head + "'}";
get_server_fields('get_rate', arg, 'purchase_tax_details', doc, cdt, cdn, 1); get_server_fields('get_rate', arg, 'purchase_tax_details', doc, cdt, cdn, 1);
} }
refresh_field('account_head',d.name,'purchase_tax_details'); refresh_field('account_head',d.name,'purchase_tax_details');

View File

@ -26,11 +26,11 @@ sql = webnotes.conn.sql
class DocType: class DocType:
def __init__(self, doc, doclist=[]): def __init__(self, doc, doclist=[]):
self.doc = doc self.doc = doc
self.doclist = doclist self.doclist = doclist
# Get Tax Rate if account type is Tax # Get Tax Rate if account type is Tax
# =================================================================== # ===================================================================
def get_rate(self, arg): def get_rate(self, arg):
return get_obj('Purchase Common').get_rate(arg, self) return get_obj('Purchase Common').get_rate(arg, self)

View File

@ -1,8 +1,8 @@
[ [
{ {
"creation": "2013-04-19 11:00:07", "creation": "2013-06-04 11:02:19",
"docstatus": 0, "docstatus": 0,
"modified": "2013-05-22 12:07:00", "modified": "2013-06-26 14:34:00",
"modified_by": "Administrator", "modified_by": "Administrator",
"owner": "Administrator" "owner": "Administrator"
}, },
@ -243,7 +243,8 @@
"oldfieldname": "serial_no", "oldfieldname": "serial_no",
"oldfieldtype": "Small Text", "oldfieldtype": "Small Text",
"print_hide": 0, "print_hide": 0,
"read_only": 0 "read_only": 0,
"reqd": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",

View File

@ -21,8 +21,7 @@ from controllers.trends import get_columns,get_data
def execute(filters=None): def execute(filters=None):
if not filters: filters ={} if not filters: filters ={}
data = [] data = []
trans = "Purchase Invoice" conditions = get_columns(filters, "Purchase Invoice")
conditions = get_columns(filters, trans)
data = get_data(filters, conditions) data = get_data(filters, conditions)
return conditions["columns"], data return conditions["columns"], data

View File

@ -40,9 +40,10 @@ def execute(filters=None):
# invoice details # invoice details
purchase_order = list(set(invoice_po_pr_map.get(inv.name, {}).get("purchase_order", []))) purchase_order = list(set(invoice_po_pr_map.get(inv.name, {}).get("purchase_order", [])))
purchase_receipt = list(set(invoice_po_pr_map.get(inv.name, {}).get("purchase_receipt", []))) purchase_receipt = list(set(invoice_po_pr_map.get(inv.name, {}).get("purchase_receipt", [])))
project_name = list(set(invoice_po_pr_map.get(inv.name, {}).get("project_name", [])))
row = [inv.name, inv.posting_date, inv.supplier, inv.credit_to, row = [inv.name, inv.posting_date, inv.supplier, inv.credit_to,
account_map.get(inv.credit_to), inv.project_name, inv.bill_no, inv.bill_date, account_map.get(inv.credit_to), ", ".join(project_name), inv.bill_no, inv.bill_date,
inv.remarks, ", ".join(purchase_order), ", ".join(purchase_receipt)] inv.remarks, ", ".join(purchase_order), ", ".join(purchase_receipt)]
# map expense values # map expense values
@ -105,11 +106,10 @@ def get_conditions(filters):
def get_invoices(filters): def get_invoices(filters):
conditions = get_conditions(filters) conditions = get_conditions(filters)
return webnotes.conn.sql("""select pi.name, pi.posting_date, pi.credit_to, return webnotes.conn.sql("""select name, posting_date, credit_to,
pii.project_name, pi.supplier, pi.bill_no, pi.bill_date, pi.remarks, pi.net_total, supplier, bill_no, bill_date, remarks, net_total,
pi.total_tax, pi.grand_total, pi.outstanding_amount total_tax, grand_total, outstanding_amount
from `tabPurchase Invoice` pi, `tabPurchase Invoice Item` pii from `tabPurchase Invoice` where docstatus = 1 %s
where pii.parent = pi.name and pi.docstatus = 1 %s
order by posting_date desc, name desc""" % conditions, filters, as_dict=1) order by posting_date desc, name desc""" % conditions, filters, as_dict=1)
@ -138,8 +138,8 @@ def get_invoice_tax_map(invoice_list):
return invoice_tax_map return invoice_tax_map
def get_invoice_po_pr_map(invoice_list): def get_invoice_po_pr_map(invoice_list):
pi_items = webnotes.conn.sql("""select parent, purchase_order, purchase_receipt pi_items = webnotes.conn.sql("""select parent, purchase_order, purchase_receipt,
from `tabPurchase Invoice Item` where parent in (%s) project_name from `tabPurchase Invoice Item` where parent in (%s)
and (ifnull(purchase_order, '') != '' or ifnull(purchase_receipt, '') != '')""" % and (ifnull(purchase_order, '') != '' or ifnull(purchase_receipt, '') != '')""" %
', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]), as_dict=1) ', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]), as_dict=1)
@ -151,6 +151,9 @@ def get_invoice_po_pr_map(invoice_list):
if d.purchase_receipt: if d.purchase_receipt:
invoice_po_pr_map.setdefault(d.parent, webnotes._dict()).setdefault( invoice_po_pr_map.setdefault(d.parent, webnotes._dict()).setdefault(
"purchase_receipt", []).append(d.purchase_receipt) "purchase_receipt", []).append(d.purchase_receipt)
if d.project_name:
invoice_po_pr_map.setdefault(d.parent, webnotes._dict()).setdefault(
"project_name", []).append(d.project_name)
return invoice_po_pr_map return invoice_po_pr_map

View File

@ -21,8 +21,7 @@ from controllers.trends import get_columns,get_data
def execute(filters=None): def execute(filters=None):
if not filters: filters ={} if not filters: filters ={}
data = [] data = []
trans = "Sales Invoice" conditions = get_columns(filters, "Sales Invoice")
conditions = get_columns(filters, trans)
data = get_data(filters, conditions) data = get_data(filters, conditions)
return conditions["columns"], data return conditions["columns"], data

View File

@ -21,8 +21,7 @@ from controllers.trends import get_columns,get_data
def execute(filters=None): def execute(filters=None):
if not filters: filters ={} if not filters: filters ={}
data = [] data = []
trans = "Purchase Order" conditions = get_columns(filters, "Purchase Order")
conditions = get_columns(filters, trans)
data = get_data(filters, conditions) data = get_data(filters, conditions)
return conditions["columns"], data return conditions["columns"], data

View File

@ -120,6 +120,14 @@
"tickets": { "tickets": {
"template": "app/website/templates/pages/tickets" "template": "app/website/templates/pages/tickets"
}, },
"address": {
"no_cache": true,
"template": "app/website/templates/pages/address",
"args_method": "utilities.doctype.address.address.get_website_args"
},
"addresses": {
"template": "app/website/templates/pages/addresses"
},
"writers": { "writers": {
"template": "app/website/templates/pages/writers", "template": "app/website/templates/pages/writers",
"args_method": "website.helpers.blog.get_writers_args" "args_method": "website.helpers.blog.get_writers_args"

View File

@ -71,7 +71,7 @@ class AccountsController(TransactionBase):
ret = get_item_details(args) ret = get_item_details(args)
for fieldname, value in ret.items(): for fieldname, value in ret.items():
if self.meta.get_field(fieldname, parentfield=self.fname) and \ if self.meta.get_field(fieldname, parentfield=self.fname) and \
not item.fields.get(fieldname): item.fields.get(fieldname) is None:
item.fields[fieldname] = value item.fields[fieldname] = value
def set_taxes(self, tax_doctype, tax_parentfield, tax_master_field): def set_taxes(self, tax_doctype, tax_parentfield, tax_master_field):

View File

@ -243,10 +243,9 @@ patch_list = [
"execute:webnotes.delete_doc('DocType', 'System Console')", "execute:webnotes.delete_doc('DocType', 'System Console')",
"patches.june_2013.p03_buying_selling_for_price_list", "patches.june_2013.p03_buying_selling_for_price_list",
"patches.june_2013.p04_fix_event_for_lead_oppty_project", "patches.june_2013.p04_fix_event_for_lead_oppty_project",
"patches.june_2013.p05_remove_search_criteria_reports",
"patches.june_2013.p05_remove_unused_doctypes", "patches.june_2013.p05_remove_unused_doctypes",
"patches.june_2013.p06_drop_unused_tables", "patches.june_2013.p06_drop_unused_tables",
"patches.june_2013.p08_shopping_cart_settings",
"patches.june_2013.p05_remove_search_criteria_reports",
"patches.june_2013.p07_taxes_price_list_for_territory", "patches.june_2013.p07_taxes_price_list_for_territory",
"patches.june_2013.p08_shopping_cart_settings", "patches.june_2013.p08_shopping_cart_settings",
"patches.june_2013.p09_update_global_defaults", "patches.june_2013.p09_update_global_defaults",

View File

@ -10,7 +10,7 @@ erpnext.send_message = function(opts) {
method: "website.helpers.contact.send_message", method: "website.helpers.contact.send_message",
args: opts, args: opts,
callback: opts.callback callback: opts.callback
}) });
} }
wn.call = function(opts) { wn.call = function(opts) {

View File

@ -35,11 +35,12 @@ class DocType:
def create_receiver_list(self): def create_receiver_list(self):
rec, where_clause = '', '' rec, where_clause = '', ''
if self.doc.send_to == 'All Customer Contact': if self.doc.send_to == 'All Customer Contact':
where_clause = self.doc.customer and " and customer = '%s'" % self.doc.customer or " and ifnull(is_customer, 0) = 1" where_clause = self.doc.customer and " and customer = '%s'" % self.doc.customer or " and ifnull(customer, '') != ''"
if self.doc.send_to == 'All Supplier Contact': if self.doc.send_to == 'All Supplier Contact':
where_clause = self.doc.supplier and " and ifnull(is_supplier, 0) = 1 and supplier = '%s'" % self.doc.supplier or " and ifnull(is_supplier, 0) = 1" where_clause = self.doc.supplier and " and ifnull(is_supplier, 0) = 1 and supplier = '%s'" % self.doc.supplier or " and ifnull(supplier, '') != ''"
if self.doc.send_to == 'All Sales Partner Contact': if self.doc.send_to == 'All Sales Partner Contact':
where_clause = self.doc.sales_partner and " and ifnull(is_sales_partner, 0) = 1 and sales_aprtner = '%s'" % self.doc.sales_partner or " and ifnull(is_sales_partner, 0) = 1" where_clause = self.doc.sales_partner and " and ifnull(is_sales_partner, 0) = 1 and sales_partner = '%s'" % self.doc.sales_partner or " and ifnull(sales_partner, '') != ''"
if self.doc.send_to in ['All Contact', 'All Customer Contact', 'All Supplier Contact', 'All Sales Partner Contact']: if self.doc.send_to in ['All Contact', 'All Customer Contact', 'All Supplier Contact', 'All Sales Partner Contact']:
rec = sql("select CONCAT(ifnull(first_name,''),'',ifnull(last_name,'')), mobile_no from `tabContact` where ifnull(mobile_no,'')!='' and docstatus != 2 %s" % where_clause) rec = sql("select CONCAT(ifnull(first_name,''),'',ifnull(last_name,'')), mobile_no from `tabContact` where ifnull(mobile_no,'')!='' and docstatus != 2 %s" % where_clause)
elif self.doc.send_to == 'All Lead (Open)': elif self.doc.send_to == 'All Lead (Open)':

View File

@ -21,8 +21,7 @@ from controllers.trends import get_columns, get_data
def execute(filters=None): def execute(filters=None):
if not filters: filters ={} if not filters: filters ={}
data = [] data = []
trans = "Quotation" conditions = get_columns(filters, "Quotation")
conditions = get_columns(filters, trans)
data = get_data(filters, conditions) data = get_data(filters, conditions)
return conditions["columns"], data return conditions["columns"], data

View File

@ -21,8 +21,7 @@ from controllers.trends import get_columns,get_data
def execute(filters=None): def execute(filters=None):
if not filters: filters ={} if not filters: filters ={}
data = [] data = []
trans = "Sales Order" conditions = get_columns(filters, "Sales Order")
conditions = get_columns(filters, trans)
data = get_data(filters, conditions) data = get_data(filters, conditions)
return conditions["columns"], data return conditions["columns"], data

View File

@ -2,13 +2,13 @@
{ {
"creation": "2013-05-16 10:59:15", "creation": "2013-05-16 10:59:15",
"docstatus": 0, "docstatus": 0,
"modified": "2013-06-20 11:23:01", "modified": "2013-07-02 12:07:21",
"modified_by": "Administrator", "modified_by": "Administrator",
"owner": "Administrator" "owner": "Administrator"
}, },
{ {
"allow_attach": 1, "allow_attach": 1,
"allow_rename": 0, "allow_rename": 1,
"autoname": "field:serial_no", "autoname": "field:serial_no",
"description": "Distinct unit of an Item", "description": "Distinct unit of an Item",
"doctype": "DocType", "doctype": "DocType",

View File

@ -21,8 +21,7 @@ from controllers.trends import get_columns,get_data
def execute(filters=None): def execute(filters=None):
if not filters: filters ={} if not filters: filters ={}
data = [] data = []
trans = "Delivery Note" conditions = get_columns(filters, "Delivery Note")
conditions = get_columns(filters, trans)
data = get_data(filters, conditions) data = get_data(filters, conditions)
return conditions["columns"], data return conditions["columns"], data

View File

@ -21,11 +21,7 @@ from controllers.trends import get_columns,get_data
def execute(filters=None): def execute(filters=None):
if not filters: filters ={} if not filters: filters ={}
data = [] data = []
trans = "Purchase Receipt" conditions = get_columns(filters, "Purchase Receipt")
conditions = get_columns(filters, trans) data = get_data(filters, conditions)
data = get_data(filters, tab, conditions)
if not data :
webnotes.msgprint("Data not found for selected criterias")
return conditions["columns"], data return conditions["columns"], data

View File

@ -20,14 +20,16 @@ import webnotes
def delete_transactions(): def delete_transactions():
print "Deleting transactions..." print "Deleting transactions..."
trans = ['Timesheet', 'Task', 'Support Ticket', 'Stock Reconciliation', 'Stock Ledger Entry', trans = ['Task', 'Support Ticket', 'Stock Reconciliation', 'Stock Ledger Entry',
'Stock Entry', 'Sales Order', 'Salary Slip','Sales Invoice', 'Quotation', 'Stock Entry', 'Sales Order', 'Salary Slip','Sales Invoice', 'Quotation',
'Quality Inspection', 'Purchase Receipt', 'Purchase Order', 'Production Order', 'Quality Inspection', 'Purchase Receipt', 'Purchase Order', 'Production Order',
'POS Setting', 'Period Closing Voucher', 'Purchase Invoice', 'Maintenance Visit', 'POS Setting', 'Period Closing Voucher', 'Purchase Invoice', 'Maintenance Visit',
'Maintenance Schedule', 'Leave Application', 'Leave Allocation', 'Lead', 'Journal Voucher', 'Maintenance Schedule', 'Leave Application', 'Leave Allocation', 'Lead', 'Journal Voucher',
'Installation Note', 'Material Request', 'GL Entry', 'Expense Claim', 'Opportunity', 'Installation Note', 'Material Request', 'GL Entry', 'Expense Claim', 'Opportunity',
'Delivery Note', 'Customer Issue', 'Bin', 'Authorization Rule', 'Attendance', 'C-Form', 'Delivery Note', 'Customer Issue', 'Bin', 'Authorization Rule', 'Attendance', 'C-Form',
'Appraisal', 'Installation Note', 'Communication'] 'Appraisal', 'Installation Note', 'Communication', "Supplier Quotation", "Newsletter",
"Job Applicant", "Web Page", "Website Slideshow", "Blog Post", "Blog Category", "Blogger",
"Time Log", "Time Log Batch", "Workflow"]
for d in trans: for d in trans:
for t in webnotes.conn.sql("select options from tabDocField where parent='%s' and fieldtype='Table'" % d): for t in webnotes.conn.sql("select options from tabDocField where parent='%s' and fieldtype='Table'" % d):
webnotes.conn.sql("delete from `tab%s`" % (t)) webnotes.conn.sql("delete from `tab%s`" % (t))
@ -66,6 +68,7 @@ def delete_masters():
'Item Group': ['All Item Groups', 'Default'], 'Item Group': ['All Item Groups', 'Default'],
'Item': '', 'Item': '',
'Holiday List': '', 'Holiday List': '',
'Activity Type': '',
'Grade': '', 'Grade': '',
'Feed': '', 'Feed': '',
'Expense Claim Type': ['Travel', 'Medical', 'Calls', 'Food', 'Others'], 'Expense Claim Type': ['Travel', 'Medical', 'Calls', 'Food', 'Others'],

View File

@ -18,7 +18,7 @@ from __future__ import unicode_literals
import webnotes import webnotes
from webnotes import msgprint from webnotes import msgprint
from webnotes.utils import cstr from webnotes.utils import cstr, cint
class DocType: class DocType:
def __init__(self, doc, doclist=[]): def __init__(self, doc, doclist=[]):
@ -63,4 +63,26 @@ class DocType:
if self.doc.fields.get(fieldname): if self.doc.fields.get(fieldname):
webnotes.conn.sql("""update `tabAddress` set `%s`=0 where `%s`=%s and name!=%s""" % webnotes.conn.sql("""update `tabAddress` set `%s`=0 where `%s`=%s and name!=%s""" %
(is_address_type, fieldname, "%s", "%s"), (self.doc.fields[fieldname], self.doc.name)) (is_address_type, fieldname, "%s", "%s"), (self.doc.fields[fieldname], self.doc.name))
break break
def get_website_args():
def _get_fields(fieldnames):
return [webnotes._dict(zip(["label", "fieldname", "fieldtype", "options"],
[df.label, df.fieldname, df.fieldtype, df.options]))
for df in webnotes.get_doctype("Address", processed=True).get({"fieldname": ["in", fieldnames]})]
bean = None
if webnotes.form_dict.name:
bean = webnotes.bean("Address", webnotes.form_dict.name)
return {
"doc": bean.doc if bean else None,
"meta": webnotes._dict({
"left_fields": _get_fields(["address_title", "address_type", "address_line1", "address_line2",
"city", "state", "pincode", "country"]),
"right_fields": _get_fields(["email_id", "phone", "fax", "is_primary_address",
"is_shipping_address"])
}),
"cint": cint
}

View File

@ -2,7 +2,7 @@
{ {
"creation": "2013-01-10 16:34:32", "creation": "2013-01-10 16:34:32",
"docstatus": 0, "docstatus": 0,
"modified": "2013-07-01 15:56:39", "modified": "2013-07-01 17:25:00",
"modified_by": "Administrator", "modified_by": "Administrator",
"owner": "Administrator" "owner": "Administrator"
}, },
@ -40,10 +40,12 @@
"name": "Address" "name": "Address"
}, },
{ {
"description": "Name of person or organization that this address belongs to.",
"doctype": "DocField", "doctype": "DocField",
"fieldname": "address_details", "fieldname": "address_title",
"fieldtype": "Section Break", "fieldtype": "Data",
"label": "Address Details" "label": "Address Title",
"reqd": 1
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -53,26 +55,18 @@
"options": "Billing\nShipping\nOffice\nPersonal\nPlant\nPostal\nShop\nSubsidiary\nWarehouse\nOther", "options": "Billing\nShipping\nOffice\nPersonal\nPlant\nPostal\nShop\nSubsidiary\nWarehouse\nOther",
"reqd": 1 "reqd": 1
}, },
{
"description": "Name of person or organization that this address belongs to.",
"doctype": "DocField",
"fieldname": "address_title",
"fieldtype": "Data",
"label": "Address Title",
"reqd": 0
},
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "address_line1", "fieldname": "address_line1",
"fieldtype": "Data", "fieldtype": "Data",
"label": "Address Line1", "label": "Address Line 1",
"reqd": 1 "reqd": 1
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "address_line2", "fieldname": "address_line2",
"fieldtype": "Data", "fieldtype": "Data",
"label": "Address Line2" "label": "Address Line 2"
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -84,6 +78,15 @@
"reqd": 1, "reqd": 1,
"search_index": 1 "search_index": 1
}, },
{
"doctype": "DocField",
"fieldname": "state",
"fieldtype": "Data",
"in_filter": 1,
"label": "State",
"options": "Suggest",
"search_index": 0
},
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "pincode", "fieldname": "pincode",
@ -103,15 +106,6 @@
"reqd": 1, "reqd": 1,
"search_index": 1 "search_index": 1
}, },
{
"doctype": "DocField",
"fieldname": "state",
"fieldtype": "Data",
"in_filter": 1,
"label": "State",
"options": "Suggest",
"search_index": 0
},
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "column_break0", "fieldname": "column_break0",
@ -119,6 +113,12 @@
"print_hide": 0, "print_hide": 0,
"width": "50%" "width": "50%"
}, },
{
"doctype": "DocField",
"fieldname": "email_id",
"fieldtype": "Data",
"label": "Email Id"
},
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "phone", "fieldname": "phone",
@ -126,12 +126,6 @@
"label": "Phone", "label": "Phone",
"reqd": 1 "reqd": 1
}, },
{
"doctype": "DocField",
"fieldname": "email_id",
"fieldtype": "Data",
"label": "Email Id"
},
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "fax", "fieldname": "fax",
@ -181,7 +175,7 @@
"read_only": 1 "read_only": 1
}, },
{ {
"depends_on": "eval:!doc.customer && !doc.sales_partner", "depends_on": "eval:!doc.customer && !doc.sales_partner && !doc.lead",
"doctype": "DocField", "doctype": "DocField",
"fieldname": "supplier", "fieldname": "supplier",
"fieldtype": "Link", "fieldtype": "Link",
@ -189,7 +183,7 @@
"options": "Supplier" "options": "Supplier"
}, },
{ {
"depends_on": "eval:!doc.customer && !doc.sales_partner", "depends_on": "eval:!doc.customer && !doc.sales_partner && !doc.lead",
"doctype": "DocField", "doctype": "DocField",
"fieldname": "supplier_name", "fieldname": "supplier_name",
"fieldtype": "Data", "fieldtype": "Data",
@ -200,7 +194,7 @@
"search_index": 0 "search_index": 0
}, },
{ {
"depends_on": "eval:!doc.customer && !doc.supplier", "depends_on": "eval:!doc.customer && !doc.supplier && !doc.lead",
"doctype": "DocField", "doctype": "DocField",
"fieldname": "sales_partner", "fieldname": "sales_partner",
"fieldtype": "Link", "fieldtype": "Link",

View File

@ -312,6 +312,20 @@ class TransactionBase(StatusUpdater):
}) })
webnotes.bean(event_doclist).insert() webnotes.bean(event_doclist).insert()
def get_address_display(address_dict):
meta = webnotes.get_doctype("Address")
address_sequence = (("", "address_line1"), ("\n", "address_line2"), ("\n", "city"),
("\n", "state"), ("\n" + meta.get_label("pincode") + ": ", "pincode"), ("\n", "country"),
("\n" + meta.get_label("phone") + ": ", "phone"), ("\n" + meta.get_label("fax") + ": ", "fax"))
address_display = ""
for separator, fieldname in address_sequence:
if address_dict.get(fieldname):
address_display += separator + address_dict.get(fieldname)
return address_display
def validate_conversion_rate(currency, conversion_rate, conversion_rate_label, company): def validate_conversion_rate(currency, conversion_rate, conversion_rate_label, company):
"""common validation for currency and price list currency""" """common validation for currency and price list currency"""

View File

@ -126,4 +126,8 @@ a {
.hidden-sm-inline { .hidden-sm-inline {
display: inline; display: inline;
} }
}
.accordion-heading, .accordion-inner {
padding-left: 10px;
} }

View File

@ -8,6 +8,19 @@ from webnotes.utils import cint, get_fullname, fmt_money
class WebsitePriceListMissingError(webnotes.ValidationError): pass class WebsitePriceListMissingError(webnotes.ValidationError): pass
@webnotes.whitelist()
def get_cart_quotation(doclist=None):
party = get_lead_or_customer()
if not doclist:
doclist = _get_cart_quotation(party).doclist
return {
"doclist": decorate_quotation_doclist(doclist),
"addresses": [{"name": address.name, "display": address.display}
for address in get_address_docs(party)]
}
@webnotes.whitelist() @webnotes.whitelist()
def update_cart(item_code, qty, with_doclist=0): def update_cart(item_code, qty, with_doclist=0):
quotation = _get_cart_quotation() quotation = _get_cart_quotation()
@ -31,9 +44,79 @@ def update_cart(item_code, qty, with_doclist=0):
quotation.save() quotation.save()
if with_doclist: if with_doclist:
return decorate_quotation_doclist(quotation.doclist) return get_cart_quotation(quotation.doclist)
else: else:
return quotation.doc.name return quotation.doc.name
@webnotes.whitelist()
def update_cart_address(address_fieldname, address_name):
from utilities.transaction_base import get_address_display
quotation = _get_cart_quotation()
address_display = get_address_display(webnotes.doc("Address", address_name).fields)
if address_fieldname == "shipping_address_name":
quotation.doc.shipping_address_name = address_name
quotation.doc.shipping_address = address_display
if not quotation.doc.customer_address:
address_fieldname == "customer_address"
if address_fieldname == "customer_address":
quotation.doc.customer_address = address_name
quotation.doc.address_display = address_display
quotation.ignore_permissions = True
quotation.save()
return get_cart_quotation(quotation.doclist)
@webnotes.whitelist()
def get_addresses():
return [d.fields for d in get_address_docs()]
@webnotes.whitelist()
def save_address(fields, address_fieldname=None):
party = get_lead_or_customer()
fields = webnotes.load_json(fields)
if fields.get("name"):
bean = webnotes.bean("Address", fields.get("name"))
else:
bean = webnotes.bean({"doctype": "Address", "__islocal": 1})
bean.doc.fields.update(fields)
party_fieldname = party.doctype.lower()
bean.doc.fields.update({
party_fieldname: party.name,
(party_fieldname + "_name"): party.fields[party_fieldname + "_name"]
})
bean.ignore_permissions = True
bean.save()
if address_fieldname:
update_cart_address(address_fieldname, bean.doc.name)
return bean.doc.name
def get_address_docs(party=None):
from webnotes.model.doclist import objectify
from utilities.transaction_base import get_address_display
if not party:
party = get_lead_or_customer()
address_docs = objectify(webnotes.conn.sql("""select * from `tabAddress`
where `%s`=%s order by name""" % (party.doctype.lower(), "%s"), party.name,
as_dict=True, update={"doctype": "Address"}))
for address in address_docs:
address.display = get_address_display(address.fields)
address.display = (address.display).replace("\n", "<br>\n")
return address_docs
def get_lead_or_customer(): def get_lead_or_customer():
customer = webnotes.conn.get_value("Contact", {"email_id": webnotes.session.user}, "customer") customer = webnotes.conn.get_value("Contact", {"email_id": webnotes.session.user}, "customer")
@ -56,12 +139,6 @@ def get_lead_or_customer():
lead_bean.insert() lead_bean.insert()
return lead_bean.doc return lead_bean.doc
@webnotes.whitelist()
def get_cart_quotation():
doclist = _get_cart_quotation(get_lead_or_customer()).doclist
return decorate_quotation_doclist(doclist)
def decorate_quotation_doclist(doclist): def decorate_quotation_doclist(doclist):
for d in doclist: for d in doclist:

View File

@ -30,6 +30,8 @@ $(document).ready(function() {
if(r.exc) { if(r.exc) {
if(r.exc.indexOf("WebsitePriceListMissingError")!==-1) { if(r.exc.indexOf("WebsitePriceListMissingError")!==-1) {
wn.cart.show_error("Oops!", "Price List not configured."); wn.cart.show_error("Oops!", "Price List not configured.");
} else if(r["403"]) {
wn.cart.show_error("Hey!", "You need to be logged in to view your cart.");
} else { } else {
wn.cart.show_error("Oops!", "Something went wrong."); wn.cart.show_error("Oops!", "Something went wrong.");
} }
@ -66,114 +68,145 @@ $.extend(wn.cart, {
}, },
}); });
}); });
$("#cart-add-shipping-address").on("click", function() {
window.location.href = "address?address_fieldname=shipping_address_name";
});
$("#cart-add-billing-address").on("click", function() {
window.location.href = "address?address_fieldname=customer_address";
});
}, },
render: function(doclist) { render: function(out) {
var $cart_wrapper = $("#cart-items").empty(); var doclist = out.doclist;
var addresses = out.addresses;
var $cart_items = $("#cart-items").empty();
var $cart_taxes = $("#cart-taxes").empty();
var $cart_billing_address = $("#cart-billing-address").empty();
var $cart_shipping_address = $("#cart-shipping-address").empty();
if($.map(doclist, function(d) { return d.item_code || null;}).length===0) { var no_items = $.map(doclist, function(d) { return d.item_code || null;}).length===0;
if(no_items) {
wn.cart.show_error("Empty :-(", "Go ahead and add something to your cart."); wn.cart.show_error("Empty :-(", "Go ahead and add something to your cart.");
$("#cart-addresses").toggle(false);
return; return;
} }
$.each(doclist, function(i, doc) { $.each(doclist, function(i, doc) {
if(doc.doctype === "Quotation Item") { if(doc.doctype === "Quotation Item") {
doc.image_html = doc.image ? wn.cart.render_item_row($cart_items, doc);
'<div style="height: 120px; overflow: hidden;"><img src="' + doc.image + '" /></div>' :
'{% include "app/website/templates/html/product_missing_image.html" %}';
if(!doc.web_short_description) doc.web_short_description = doc.description;
$(repl('<div class="row">\
<div class="col col-lg-9 col-sm-9">\
<div class="row">\
<div class="col col-lg-3">%(image_html)s</div>\
<div class="col col-lg-9">\
<h4><a href="%(page_name)s">%(item_name)s</a></h4>\
<p>%(web_short_description)s</p>\
</div>\
</div>\
</div>\
<div class="col col-lg-3 col-sm-3">\
<div class="input-group item-update-cart">\
<input type="text" placeholder="Qty" value="%(qty)s" \
data-item-code="%(item_code)s">\
<div class="input-group-btn">\
<button class="btn btn-primary" data-item-code="%(item_code)s">\
<i class="icon-ok"></i></button>\
</div>\
</div>\
<p style="margin-top: 10px;">at %(formatted_rate)s</p>\
<small class="text-muted" style="margin-top: 10px;">= %(formatted_amount)s</small>\
</div>\
</div><hr>', doc)).appendTo($cart_wrapper);
} }
}); });
if(!(addresses && addresses.length)) {
$cart_shipping_address.html('<div class="well">Hey! Go ahead and add an address</div>');
return;
if(Object.keys(wn.cart.get_cart()).length) {
$.each(wn.cart.get_cart(), function(item_code, item) {
item.image_html = item.image ?
'<div style="height: 120px; overflow: hidden;"><img src="' + item.image + '" /></div>' :
'{% include "app/website/templates/html/product_missing_image.html" %}';
item.price_html = item.price ? ('<p>at ' + item.price + '</p>') : "";
$(repl('<div class="row">\
<div class="col col-lg-9 col-sm-9">\
<div class="row">\
<div class="col col-lg-3">%(image_html)s</div>\
<div class="col col-lg-9">\
<h4><a href="%(url)s">%(item_name)s</a></h4>\
<p>%(description)s</p>\
</div>\
</div>\
</div>\
<div class="col col-lg-3 col-sm-3">\
<p><input type="text" placeholder="Qty" value="%(qty)s" \
item_code="%(item_code)s" class="cart-input-qty"></p>\
%(price_html)s\
</div>\
</div><hr>', item)).appendTo($cart_wrapper);
});
$('<p class="text-right"><button type="button" class="btn btn-success checkout-btn">\
<span class="icon-ok"></span> Checkout</button></p>')
.appendTo($cart_wrapper);
} else { } else {
$('<p class="alert">No Items added to cart.</p>').appendTo($cart_wrapper); wn.cart.render_address($cart_shipping_address, addresses, doclist[0].shipping_address_name);
wn.cart.render_address($cart_billing_address, addresses, doclist[0].customer_address);
} }
}, },
// bind_events: function() { render_item_row: function($cart_items, doc) {
// // on change of qty doc.image_html = doc.image ?
// $(".cart-input-qty").on("change", function on_change_of_qty() { '<div style="height: 120px; overflow: hidden;"><img src="' + doc.image + '" /></div>' :
// wn.cart.set_value_in_cart($(this).attr("item_code"), "qty", $(this).val()); '{% include "app/website/templates/html/product_missing_image.html" %}';
// });
// if(!doc.web_short_description) doc.web_short_description = doc.description;
// // shopping cart button
// $(".checkout-btn").on("click", function() { $(repl('<div class="row">\
// console.log("checkout!"); <div class="col col-lg-9 col-sm-9">\
// console.log(wn.cart.get_cart()); <div class="row">\
// <div class="col col-lg-3">%(image_html)s</div>\
// var user_is_logged_in = getCookie("full_name"); <div class="col col-lg-9">\
// if(user_is_logged_in) { <h4><a href="%(page_name)s">%(item_name)s</a></h4>\
// wn.call({ <p>%(web_short_description)s</p>\
// method: "website.helpers.cart.checkout", </div>\
// args: {cart: wn.cart.get_cart()}, </div>\
// btn: this, </div>\
// callback: function(r) { <div class="col col-lg-3 col-sm-3">\
// console.log(r); <div class="input-group item-update-cart">\
// } <input type="text" placeholder="Qty" value="%(qty)s" \
// }); data-item-code="%(item_code)s">\
// } else { <div class="input-group-btn">\
// window.location.href = "login?from=cart"; <button class="btn btn-primary" data-item-code="%(item_code)s">\
// } <i class="icon-ok"></i></button>\
// }); </div>\
// } </div>\
<p style="margin-top: 10px;">at %(formatted_rate)s</p>\
<small class="text-muted" style="margin-top: 10px;">= %(formatted_amount)s</small>\
</div>\
</div><hr>', doc)).appendTo($cart_items);
},
render_address: function($address_wrapper, addresses, address_name) {
$.each(addresses, function(i, address) {
$(repl('<div class="accordion-group"> \
<div class="accordion-heading"> \
<div class="row"> \
<div class="col col-lg-10 address-title" \
data-address-name="%(name)s"><strong>%(name)s</strong></div> \
<div class="col col-lg-2"><input type="checkbox" \
data-address-name="%(name)s"></div> \
</div> \
</div> \
<div class="accordion-body collapse" data-address-name="%(name)s"> \
<div class="accordion-inner">%(display)s</div> \
</div> \
</div>', address))
.css({"margin": "10px auto"})
.appendTo($address_wrapper);
});
$address_wrapper.find(".accordion-heading")
.css({
"background-color": "#eee",
"padding": "10px",
})
.find(".address-title")
.css({"cursor": "pointer"})
.on("click", function() {
$address_wrapper.find('.accordion-body[data-address-name="'
+$(this).attr("data-address-name")+'"]').collapse("toggle");
});
$address_wrapper.find('input[type="checkbox"]').on("click", function() {
if($(this).is(":checked")) {
var me = this;
$address_wrapper.find('input[type="checkbox"]').each(function(i, chk) {
if($(chk).attr("data-address-name")!=$(me).attr("data-address-name")) {
$(chk).removeAttr("checked");
}
});
wn.call({
type: "POST",
method: "website.helpers.cart.update_cart_address",
args: {
address_fieldname: $address_wrapper.attr("data-fieldname"),
address_name: $(this).attr("data-address-name")
},
callback: function(r) {
if(!r.exc) {
wn.cart.render(r.message);
}
}
});
} else {
return false;
}
});
$address_wrapper.find('input[type="checkbox"][data-address-name="'+ address_name +'"]')
.attr("checked", "checked");
$address_wrapper.find(".accordion-body").collapse({
parent: $address_wrapper,
toggle: false
});
$address_wrapper.find('.accordion-body[data-address-name="'+ address_name +'"]')
.collapse("show");
}
}); });

View File

@ -5,14 +5,15 @@
{% block content %} {% block content %}
<div class="col col-lg-12"> <div class="col col-lg-12">
<ul class="breadcrumb"> <ul class="breadcrumb">
<li><a href="index">Home</a> <span class="divider">/</span></li> <li><a href="index">Home</a></li>
<li class="active">My Account</li> <li class="active">My Account</li>
</ul> </ul>
<h3>My Account</h3> <h3>My Account</h3>
<p><a href="profile"><i class="icon-user"></i> Change my name, password</a></p> <p><a href="profile"><i class="icon-user icon-fixed-width"></i> Change my name, password</a></p>
<p><a href="orders"><i class="icon-list"></i> My Orders</a></p> <p><a href="addresses"><i class="icon-map-marker icon-fixed-width"></i> My Addresses</a></p>
<p><a href="tickets"><i class="icon-tags"></i> My Tickets</a></p> <p><a href="orders"><i class="icon-list icon-fixed-width"></i> My Orders</a></p>
<p><a href="server.py?cmd=web_logout"><i class="icon-signout"></i> Logout</a></p> <p><a href="tickets"><i class="icon-tags icon-fixed-width"></i> My Tickets</a></p>
<p><a href="server.py?cmd=web_logout"><i class="icon-signout icon-fixed-width"></i> Logout</a></p>
</ul> </ul>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -0,0 +1,123 @@
{% extends "app/website/templates/html/page.html" %}
{% set title=doc and doc.name or "New Address" %}
{% set docname=(doc and doc.name or "") %}
{% macro render_fields(docfields) -%}
{% for df in docfields -%}
{% if df.fieldtype in ["Data", "Link"] -%}
<fieldset>
<label>{{ df.label }}</label>
<input type="text" placeholder="Type {{ df.label }}"
data-fieldname="{{ df.fieldname }}" data-fieldtype="{{ df.fieldtype }}"
{% if doc and doc.fields.get(df.fieldname) -%} value="{{ doc.fields[df.fieldname] }}" {%- endif %}>
</fieldset>
{% elif df.fieldtype == "Check" -%}
<fieldset class="checkbox">
<label><input type="checkbox" data-fieldname="{{ df.fieldname }}"
data-fieldtype="{{ df.fieldtype }}"
{% if doc and cint(doc.fields.get(df.fieldname)) -%} checked="checked" {%- endif %}>
{{ df.label }}</label>
</fieldset>
{% elif df.fieldtype == "Select" -%}
<fieldset>
<label>{{ df.label }}</label>
<select data-fieldname="{{ df.fieldname }}" data-fieldtype="{{ df.fieldtype }}">
{% for value in df.options.split("\n") -%}
{% if doc and doc.fields.get(df.fieldname) == value -%}
<option selected="selected">{{ value }}</option>
{% else -%}
<option>{{ value }}</option>
{%- endif %}
{%- endfor %}
</select>
</fieldset>
{%- endif %}
{%- endfor %}
{%- endmacro %}
{% block content %}
<div class="col col-lg-12">
<ul class="breadcrumb">
<li><a href="index">Home</a></li>
<li><a href="account">My Account</a></li>
<li><a href="addresses">My Addresses</a></li>
<li class="active">{{ title }}</li>
</ul>
<h3><i class="icon-map-marker"></i> {{ title }}</h3>
<button type="button" class="btn btn-primary pull-right" id="address-save"><i class="icon-ok"></i>
{{ doc and "Save" or "Insert" }}</button>
<div class="clearfix"></div>
<hr>
<div id="address-error" class="alert alert-danger" style="display: none;"></div>
<form autocomplete="on">
<div class="row">
<section class="col col-lg-6">
{{ render_fields(meta.left_fields) }}
</section>
<section class="col col-lg-6">
{{ render_fields(meta.right_fields) }}
</section>
</section>
</form>
</div>
<script>
;(function() {
$(document).ready(function() {
bind_save();
});
var bind_save = function() {
$("#address-save").on("click", function() {
var fields = {
name: "{{ docname }}"
};
$("form").find("[data-fieldname]").each(function(i, input) {
var $input = $(input);
var fieldname = $(input).attr("data-fieldname");
var fieldtype = $(input).attr("data-fieldtype");
if(fieldtype == "Check") {
fields[fieldname] = $input.is(":checked") ? 1 : 0;
} else {
fields[fieldname] = $input.val();
}
});
wn.call({
btn: $(this),
type: "POST",
method: "website.helpers.cart.save_address",
args: { fields: fields, address_fieldname: get_url_arg("address_fieldname") },
callback: function(r) {
if(r.exc) {
var msg = "";
if(r._server_messages) {
msg = JSON.parse(r._server_messages || []).join("<br>");
}
$("#address-error")
.html(msg || "Something went wrong!")
.toggle(true);
} else if(get_url_arg("address_fieldname")) {
window.location.href = "cart";
} else {
window.location.href = "address?name=" + encodeURIComponent(r.message);
}
}
});
});
};
})();
</script>
{% endblock %}
{% block css %}
<style>
fieldset {
margin-bottom: 20px;
}
</style>
{% endblock %}

View File

@ -0,0 +1,54 @@
{% extends "app/website/templates/html/page.html" %}
{% set title="My Addresses" %}
{% block content %}
<div class="col col-lg-12">
<ul class="breadcrumb">
<li><a href="index">Home</a></li>
<li><a href="account">My Account</a></li>
<li class="active">My Addresses</li>
</ul>
<h3><i class="icon-map-marker icon-fixed-width"></i> My Addresses</h3>
<hr>
<p><a class="btn btn-default" href="address"><i class="icon-plus"> New Address</i></a></p>
<hr>
<div id="address-list">
<div class="progress progress-striped active">
<div class="progress-bar progress-bar-info" style="width: 100%;"></div>
</div>
</div>
</div>
<script>
;(function() {
$(document).ready(function() {
fetch_addresses();
});
var fetch_addresses = function() {
wn.call({
method: "website.helpers.cart.get_addresses",
callback: function(r) {
$("#address-list .progress").remove();
var $list = $("#address-list");
if(!(r.message && r.message.length)) {
$list.html("<div class='alert'>No Addresses Found</div>");
return;
}
$.each(r.message, function(i, address) {
address.url_name = encodeURIComponent(address.name);
$(repl('<div> \
<p><a href="address?name=%(url_name)s">%(name)s</a></p> \
<p>%(display)s</p> \
<hr> \
</div>', address)).appendTo($list);
});
}
});
};
})();
</script>
{% endblock %}

View File

@ -8,7 +8,7 @@
{% block content %} {% block content %}
<div class="col col-lg-12"> <div class="col col-lg-12">
<h2><i class="icon-shopping-cart"></i> Shopping Cart</h2> <h2><i class="icon-shopping-cart"></i> {{ title }}</h2>
<div class="progress progress-striped active"> <div class="progress progress-striped active">
<div class="progress-bar progress-bar-info" style="width: 100%;"></div> <div class="progress-bar progress-bar-info" style="width: 100%;"></div>
</div> </div>
@ -20,17 +20,35 @@
<div class="col col-lg-9 col-sm-9"> <div class="col col-lg-9 col-sm-9">
<div class="row"> <div class="row">
<div class="col col-lg-3"></div> <div class="col col-lg-3"></div>
<div class="col col-lg-9"><strong>Item Details</strong></div> <div class="col col-lg-9"><h4>Item Details</h4></div>
</div> </div>
</div> </div>
<div class="col col-lg-3 col-sm-3"><strong>Qty</strong></div> <div class="col col-lg-3 col-sm-3"><h4>Qty</h4></div>
</div><hr> </div><hr>
<div id="cart-items"> <div id="cart-items">
</div> </div>
<hr>
<div id="cart-taxes"> <div id="cart-taxes">
</div> </div>
<hr>
<div id="cart-addresses"> <div id="cart-addresses">
<div class="row">
<div class="col col-lg-6">
<h4>Shipping Address</h4>
<div id="cart-shipping-address" class="accordion"
data-fieldname="shipping_address_name"></div>
<button class="btn btn-default" type="button" id="cart-add-shipping-address">
<span class="icon icon-plus"></span> New Address</button>
</div>
<div class="col col-lg-6">
<h4>Billing Address</h4>
<div id="cart-billing-address" class="accordion"
data-fieldname="customer_address"></div>
<button class="btn btn-default" type="button" id="cart-add-billing-address">
<span class="icon icon-plus"></span> New Address</button>
</div>
</div>
<hr>
</div> </div>
<button class="btn btn-success pull-right" type="button">Place Order</button> <button class="btn btn-success pull-right" type="button">Place Order</button>
</div> </div>

View File

@ -5,9 +5,9 @@
{% block content %} {% block content %}
<div class="col col-lg-12"> <div class="col col-lg-12">
<ul class="breadcrumb"> <ul class="breadcrumb">
<li><a href="index">Home</a> <span class="divider">/</span></li> <li><a href="index">Home</a></li>
<li><a href="account">My Account</a> <span class="divider">/</span></li> <li><a href="account">My Account</a></li>
<li><a href="orders">My Orders</a> <span class="divider">/</span></li> <li><a href="orders">My Orders</a></li>
<li class="active">{{ doc.name }}</li> <li class="active">{{ doc.name }}</li>
</ul> </ul>
<h3><i class="icon-file"></i> {{ doc.name }}</h3> <h3><i class="icon-file"></i> {{ doc.name }}</h3>

View File

@ -14,7 +14,7 @@ wn.currency_symbols = {{ currency_symbols }};
<li><a href="account">My Account</a> <span class="divider">/</span></li> <li><a href="account">My Account</a> <span class="divider">/</span></li>
<li class="active">My Orders</li> <li class="active">My Orders</li>
</ul> </ul>
<h3><i class="icon-list"></i> My Orders</h3> <h3><i class="icon-list icon-fixed-width"></i> My Orders</h3>
<hr> <hr>
<div id="order-list" style="font-size: 13px;"> <div id="order-list" style="font-size: 13px;">
<div class="progress progress-striped active"> <div class="progress progress-striped active">

View File

@ -1,10 +1,10 @@
{% extends "app/website/templates/html/page.html" %} {% extends "app/website/templates/html/page.html" %}
{% set title="Sales Partners" %} {% set title="Partners" %}
{% block content %} {% block content %}
<div class="col col-lg-12"> <div class="col col-lg-12">
<h2 id="blog-title">Partners</h2> <h2 id="blog-title">{{ title }}</h2>
<hr> <hr>
{% for partner_info in partners %} {% for partner_info in partners %}
<div class="row"> <div class="row">

View File

@ -27,7 +27,7 @@
</div> </div>
<div class="control-group"> <div class="control-group">
<div class="controls"> <div class="controls">
<button id="update_profile" type="submit" class="btn">Update</button> <button id="update_profile" type="submit" class="btn btn-default">Update</button>
</div> </div>
</div> </div>
</form> </form>

View File

@ -5,11 +5,11 @@
{% block content %} {% block content %}
<div class="col col-lg-12"> <div class="col col-lg-12">
<ul class="breadcrumb"> <ul class="breadcrumb">
<li><a href="index">Home</a> <span class="divider">/</span></li> <li><a href="index">Home</a></li>
<li><a href="account">My Account</a> <span class="divider">/</span></li> <li><a href="account">My Account</a></li>
<li class="active">My Tickets</li> <li class="active">My Tickets</li>
</ul> </ul>
<h3><i class="icon-tags"></i> My Tickets</h3> <h3><i class="icon-tags icon-fixed-width"></i> My Tickets</h3>
<hr> <hr>
<div id="ticket-list" style="font-size: 13px;"> <div id="ticket-list" style="font-size: 13px;">
<div class="progress progress-striped active"> <div class="progress progress-striped active">