-
-
{{ doc.name }}
- {% if doc.name == "Not Allowed" -%}
-
- {% else %}
-
- {%- if doc.status -%}
- {% if doc.status == "Waiting for Customer" -%}
- {% set status = "To Reply" %}
- {% else %}
- {% set status = doc.status %}
- {%- endif -%}
-
-
- {{ status }}
-
-
-
- {{ utils.formatdate(doc.creation) }}
-
-
-
-
Messages
-
-
-
-
-
-
- {%- if doclist.get({"doctype":"Communication"}) -%}
-
-
-
- {%- for comm in
- (doclist.get({"doctype":"Communication"})|sort(reverse=True, attribute="creation")) %}
-
-
-
- {{ comm.sender }} on {{ utils.formatdate(comm.creation) }}
-
- {{ webnotes.utils.is_html(comm.content) and comm.content or
- comm.content.replace("\n", " ")}}
- |
-
- {% endfor -%}
-
-
-
- {%- else -%}
-
No messages
- {%- endif -%}
- {%- endif -%}
- {% endif -%}
-
-{% endblock %}
-
-{% block javascript %}
-
-{% endblock %}
\ No newline at end of file
diff --git a/erpnext/templates/pages/ticket.py b/erpnext/templates/pages/ticket.py
deleted file mode 100644
index f9e5c88040..0000000000
--- a/erpnext/templates/pages/ticket.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
-# License: GNU General Public License v3. See license.txt
-
-from __future__ import unicode_literals
-import webnotes
-from webnotes import _
-from webnotes.utils import today
-
-no_cache = True
-
-def get_context():
- bean = webnotes.bean("Support Ticket", webnotes.form_dict.name)
- if bean.doc.raised_by != webnotes.session.user:
- return {
- "doc": {"name": "Not Allowed"}
- }
- else:
- return {
- "doc": bean.doc,
- "doclist": bean.doclist,
- "webnotes": webnotes,
- "utils": webnotes.utils
- }
-
-@webnotes.whitelist()
-def add_reply(ticket, message):
- if not message:
- raise webnotes.throw(_("Please write something"))
-
- bean = webnotes.bean("Support Ticket", ticket)
- if bean.doc.raised_by != webnotes.session.user:
- raise webnotes.throw(_("You are not allowed to reply to this ticket."), webnotes.PermissionError)
-
- from webnotes.core.doctype.communication.communication import make
- make(content=message, sender=bean.doc.raised_by, subject = bean.doc.subject,
- doctype="Support Ticket", name=bean.doc.name,
- date=today())
\ No newline at end of file
diff --git a/erpnext/templates/pages/tickets.html b/erpnext/templates/pages/tickets.html
deleted file mode 100644
index 6942d3bff0..0000000000
--- a/erpnext/templates/pages/tickets.html
+++ /dev/null
@@ -1,87 +0,0 @@
-{% extends "templates/includes/transactions.html" %}
-
-{% block javascript -%}
-{{ super() }}
-
-
-{%- endblock %}
\ No newline at end of file
diff --git a/erpnext/templates/pages/tickets.py b/erpnext/templates/pages/tickets.py
deleted file mode 100644
index 7434af2075..0000000000
--- a/erpnext/templates/pages/tickets.py
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
-# License: GNU General Public License v3. See license.txt
-
-from __future__ import unicode_literals
-import webnotes
-from webnotes.utils import cint, formatdate
-
-no_cache = True
-
-def get_context():
- return {
- "title": "My Tickets",
- "method": "support.doctype.support_ticket.templates.pages.tickets.get_tickets",
- "icon": "icon-ticket",
- "empty_list_message": "No Tickets Raised",
- "page": "ticket"
- }
-
-@webnotes.whitelist()
-def get_tickets(start=0):
- tickets = webnotes.conn.sql("""select name, subject, status, creation
- from `tabSupport Ticket` where raised_by=%s
- order by modified desc
- limit %s, 20""", (webnotes.session.user, cint(start)), as_dict=True)
- for t in tickets:
- t.creation = formatdate(t.creation)
-
- return tickets
-
-@webnotes.whitelist()
-def make_new_ticket(subject, message):
- if not (subject and message):
- raise webnotes.throw(_("Please write something in subject and message!"))
-
- from erpnext.support.doctype.support_ticket.get_support_mails import add_support_communication
- ticket = add_support_communication(subject, message, webnotes.session.user)
-
- return ticket.doc.name
\ No newline at end of file
diff --git a/erpnext/templates/sale.html b/erpnext/templates/sale.html
deleted file mode 100644
index 5dc72c793b..0000000000
--- a/erpnext/templates/sale.html
+++ /dev/null
@@ -1,89 +0,0 @@
-{% extends base_template %}
-
-{% set title=doc.name %}
-
-{% block content %}
-
-
-
{{ doc.name }}
- {% if doc.name == "Not Allowed" -%}
-
- {% else %}
-
-
-
-
- {% block status -%}{%- endblock %}
-
-
- {{ utils.formatdate(doc.posting_date or doc.transaction_date) }}
-
-
-
-
-
-
-
-
- Sr |
- Item Name |
- Description |
- Qty |
- UoM |
- Basic Rate |
- Amount |
-
- {%- for row in doclist.get({"doctype": doc.doctype + " Item"}) %}
-
- {{ row.idx }} |
- {{ row.item_name }} |
- {{ row.description }} |
- {{ row.qty }} |
- {{ row.stock_uom }} |
- {{ utils.fmt_money(row.export_rate, currency=doc.currency) }} |
- {{ utils.fmt_money(row.export_amount, currency=doc.currency) }} |
-
- {% endfor -%}
-
-
-
-
-
-
-
-
-
-
- Net Total |
- {{
- utils.fmt_money(doc.net_total/doc.conversion_rate, currency=doc.currency)
- }} |
-
- {%- for charge in doclist.get({"doctype":"Sales Taxes and Charges"}) -%}
- {%- if not charge.included_in_print_rate -%}
-
- {{ charge.description }} |
- {{ utils.fmt_money(charge.tax_amount / doc.conversion_rate, currency=doc.currency) }} |
-
- {%- endif -%}
- {%- endfor -%}
-
- Grand Total |
- {{ utils.fmt_money(doc.grand_total_export, currency=doc.currency) }} |
-
-
- Rounded Total |
- {{ utils.fmt_money(doc.rounded_total_export, currency=doc.currency) }} |
-
-
-
-
-
-
- {%- endif %}
-
-{% endblock %}
\ No newline at end of file
diff --git a/erpnext/templates/sales_transactions.html b/erpnext/templates/sales_transactions.html
deleted file mode 100644
index 4836c12dca..0000000000
--- a/erpnext/templates/sales_transactions.html
+++ /dev/null
@@ -1,32 +0,0 @@
-{% extends "templates/includes/transactions.html" %}
-
-{% block javascript -%}
-
-
-{{ super() }}
-
-
-{%- endblock %}
\ No newline at end of file
diff --git a/erpnext/templates/utils.py b/erpnext/templates/utils.py
index 9ec542262a..d75499ff53 100644
--- a/erpnext/templates/utils.py
+++ b/erpnext/templates/utils.py
@@ -3,59 +3,6 @@
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import cint, formatdate
-import json
-
-def get_transaction_list(doctype, start, additional_fields=None):
- # find customer id
- customer = webnotes.conn.get_value("Contact", {"email_id": webnotes.session.user},
- "customer")
-
- if customer:
- if additional_fields:
- additional_fields = ", " + ", ".join(("`%s`" % f for f in additional_fields))
- else:
- additional_fields = ""
-
- transactions = webnotes.conn.sql("""select name, creation, currency, grand_total_export
- %s
- from `tab%s` where customer=%s and docstatus=1
- order by creation desc
- limit %s, 20""" % (additional_fields, doctype, "%s", "%s"),
- (customer, cint(start)), as_dict=True)
- for doc in transactions:
- items = webnotes.conn.sql_list("""select item_name
- from `tab%s Item` where parent=%s limit 6""" % (doctype, "%s"), doc.name)
- doc.items = ", ".join(items[:5]) + ("..." if (len(items) > 5) else "")
- doc.creation = formatdate(doc.creation)
- return transactions
- else:
- return []
-
-def get_currency_context():
- return {
- "global_number_format": webnotes.conn.get_default("number_format") or "#,###.##",
- "currency": webnotes.conn.get_default("currency"),
- "currency_symbols": json.dumps(dict(webnotes.conn.sql("""select name, symbol
- from tabCurrency where ifnull(enabled,0)=1""")))
- }
-
-def get_transaction_context(doctype, name):
- customer = webnotes.conn.get_value("Contact", {"email_id": webnotes.session.user},
- "customer")
-
- bean = webnotes.bean(doctype, name)
- if bean.doc.customer != customer:
- return {
- "doc": {"name": "Not Allowed"}
- }
- else:
- return {
- "doc": bean.doc,
- "doclist": bean.doclist,
- "webnotes": webnotes,
- "utils": webnotes.utils
- }
@webnotes.whitelist(allow_guest=True)
def send_message(subject="Website Query", message="", sender="", status="Open"):