From 63b0fc6269b38edf7234b9f151b80d81f614c0a3 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Tue, 4 Aug 2015 10:11:24 +0300 Subject: Initial commit First public commit --- servo/templates/products/category_form.html | 13 ++ servo/templates/products/choose-list.html | 9 ++ servo/templates/products/choose.html | 25 +++ servo/templates/products/delete_category.html | 17 ++ servo/templates/products/form.html | 90 +++++++++++ servo/templates/products/get_info.html | 59 +++++++ servo/templates/products/index.html | 104 +++++++++++++ servo/templates/products/index_outgoing.html | 56 +++++++ servo/templates/products/list.html | 27 ++++ servo/templates/products/list_rows.html | 55 +++++++ servo/templates/products/receive_item.html | 51 ++++++ servo/templates/products/remove.html | 13 ++ servo/templates/products/search.html | 20 +++ servo/templates/products/tabs.html | 21 +++ servo/templates/products/upload_gsx_parts.html | 13 ++ servo/templates/products/upload_products.html | 13 ++ servo/templates/products/view.html | 205 +++++++++++++++++++++++++ servo/templates/products/view_incoming.html | 1 + 18 files changed, 792 insertions(+) create mode 100755 servo/templates/products/category_form.html create mode 100755 servo/templates/products/choose-list.html create mode 100755 servo/templates/products/choose.html create mode 100755 servo/templates/products/delete_category.html create mode 100755 servo/templates/products/form.html create mode 100755 servo/templates/products/get_info.html create mode 100755 servo/templates/products/index.html create mode 100755 servo/templates/products/index_outgoing.html create mode 100755 servo/templates/products/list.html create mode 100755 servo/templates/products/list_rows.html create mode 100755 servo/templates/products/receive_item.html create mode 100755 servo/templates/products/remove.html create mode 100755 servo/templates/products/search.html create mode 100755 servo/templates/products/tabs.html create mode 100755 servo/templates/products/upload_gsx_parts.html create mode 100755 servo/templates/products/upload_products.html create mode 100755 servo/templates/products/view.html create mode 100755 servo/templates/products/view_incoming.html (limited to 'servo/templates/products') diff --git a/servo/templates/products/category_form.html b/servo/templates/products/category_form.html new file mode 100755 index 0000000..72ec93a --- /dev/null +++ b/servo/templates/products/category_form.html @@ -0,0 +1,13 @@ +{% extends "modal.html" %} +{% load i18n %} + +{% block header %} + {% trans "Edit Product Group" %} +{% endblock header %} + +{% block body %} +
+ {% csrf_token %} + {% include "form_snippet.html" %} +
+{% endblock body %} diff --git a/servo/templates/products/choose-list.html b/servo/templates/products/choose-list.html new file mode 100755 index 0000000..3188808 --- /dev/null +++ b/servo/templates/products/choose-list.html @@ -0,0 +1,9 @@ +{% load i18n %} +{% load servo_tags %} + diff --git a/servo/templates/products/choose.html b/servo/templates/products/choose.html new file mode 100755 index 0000000..a34834b --- /dev/null +++ b/servo/templates/products/choose.html @@ -0,0 +1,25 @@ +{% extends "modal.html" %} +{% load i18n %} + +{% block header %} + {% trans "Search for a product" %} +{% endblock header %} + +{% block body %} +
+ {% csrf_token %} + +
+
+{% endblock body %} + +{% block footer %} + + {% trans "Search" %} + +{% endblock footer %} \ No newline at end of file diff --git a/servo/templates/products/delete_category.html b/servo/templates/products/delete_category.html new file mode 100755 index 0000000..e9aed7b --- /dev/null +++ b/servo/templates/products/delete_category.html @@ -0,0 +1,17 @@ +{% extends "modal.html" %} +{% load i18n %} + +{% block header %} + {% trans "Delete product category?" %} +{% endblock header %} + +{% block body %} + {% trans "This action will not delete the products in this category." %} +{% endblock body %} + +{% block footer %} +
+ {% csrf_token %} + +
+{% endblock footer %} diff --git a/servo/templates/products/form.html b/servo/templates/products/form.html new file mode 100755 index 0000000..0429e6a --- /dev/null +++ b/servo/templates/products/form.html @@ -0,0 +1,90 @@ +{% extends "products/view.html" %} +{% load i18n %} + +{% block third_column %} +
+
+ {% csrf_token %} + {{ formset.management_form }} + +
+
+ {% include "form_field_snippet.html" with field=form.code %} + {% include "form_field_snippet.html" with field=form.title %} + {% include "form_field_snippet.html" with field=form.description %} + {% include "form_field_snippet.html" with field=form.is_service %} +
+
+ {% include "form_field_snippet.html" with field=form.price_purchase_exchange %} + {% include "form_field_snippet.html" with field=form.pct_margin_exchange %} + {% include "form_field_snippet.html" with field=form.price_notax_exchange %} + {% include "form_field_snippet.html" with field=form.price_sales_exchange %} +
+
+ {% include "form_field_snippet.html" with field=form.price_purchase_stock %} + {% include "form_field_snippet.html" with field=form.pct_margin_stock %} + {% include "form_field_snippet.html" with field=form.price_notax_stock %} + {% include "form_field_snippet.html" with field=form.price_sales_stock %} +
+
+ {% for f in formset %} +
+ {% include "form_snippet.html" with form=f %} +
+ {% endfor %} + {% trans "Add" %} +
+
+ {% include "form_field_snippet.html" with field=form.pct_vat %} + {% include "form_field_snippet.html" with field=form.shipping %} + {% include "form_field_snippet.html" with field=form.warranty_period %} + {% include "form_field_snippet.html" with field=form.brand %} + {% include "form_field_snippet.html" with field=form.categories %} +
+ +
+ +
+ {% for t in product.tags.all %} +
{{ t.tag }}
+ {% endfor %} +
+
+
+ {% include "form_field_snippet.html" with field=form.photo %} + {% include "form_field_snippet.html" with field=form.fixed_price %} + {% include "form_field_snippet.html" with field=form.is_serialized %} +
+
+ {% include "form_field_snippet.html" with field=form.part_type %} + {% include "form_field_snippet.html" with field=form.labour_tier %} + {% include "form_field_snippet.html" with field=form.component_code %} + {% include "form_field_snippet.html" with field=form.eee_code %} +
+
+
+ {% if product.pk %} + {% trans "Cancel" %} + {% else %} + {% trans "Cancel" %} + {% endif %} + +
+
+
+{% endblock third_column %} + +{% block media %} + +{% endblock media %} diff --git a/servo/templates/products/get_info.html b/servo/templates/products/get_info.html new file mode 100755 index 0000000..be024e2 --- /dev/null +++ b/servo/templates/products/get_info.html @@ -0,0 +1,59 @@ +{% extends "modal.html" %} +{% load servo_tags %} +{% load i18n %} + +{% block header %} +{% trans "Product Info" %} +{% endblock header %} + +{% block body %} +
+ + + +
+

{{ product.code }}

+

{{ product.title }}

+

{{ product.description|default:"" }}

+
+
+
+
{% trans "Stock Price" %}
+
{{ product.price_sales_stock|currency }}
+
{% trans "Exchange Price" %}
+
{{ product.price_sales_exchange|currency }}
+ {% if product.component_code %} +
{% trans "Component Group" %}
+
{{ product.get_component_code_display }} ({{ product.get_part_type_display }})
+ {% endif %} +
+
+
{% trans "EEE Code" %}
+
{{ product.eee_code|default:"-"|addspace }}
+
+{% for i in inventory %} +{% ifchanged i.location.id %} +
+

{{ i.location.title }}

+{% endifchanged %} +
+
{% trans "Stocked" %}
+
{{ i.amount_stocked }}
+
{% trans "Ordered" %}
+
{{ i.amount_ordered|default:"-" }}
+
{% trans "Reserved" %}
+
{{ i.amount_reserved|default:"-" }}
+
+{% empty %} +
+
{% trans "Product not in inventory" %}
+{% endfor %} +{% endblock body %} + +{% block footer %} +{% if product.pk %} + {% trans "View" %} + {% trans "Edit" %} +{% endif %} + +{% endblock footer %} \ No newline at end of file diff --git a/servo/templates/products/index.html b/servo/templates/products/index.html new file mode 100755 index 0000000..fefcecd --- /dev/null +++ b/servo/templates/products/index.html @@ -0,0 +1,104 @@ +{% extends "default.html" %} +{% load i18n %} +{% load mptt_tags %} +{% load servo_tags %} + +{% block toolbar %} +
+ {% if perms.servo.add_product %} + {% trans "New Product" %} + + + {% endif %} +
+
+ + + + +
+{% endblock toolbar %} + +{% block content %} +
+
+ +
+
+{% include "products/tabs.html" %} +
+ {% block second_column %} +
+ +
+
+
+
+ {% csrf_token %} + {% for field in form %} +
+ +
{{ field }}
+
+ {% endfor %} +


+
+ +
+
+
+ {% include "products/list.html" %} + {% include "pagination.html" with items=products %} +
+ {% endblock second_column %} + + {% block third_column %} + + {% endblock third_column %} +
+{% endblock content %} + +{% block crumbs %} +
  • {% trans "Products" %}
  • +{% block breadcrumb %} +
  • /{{ group_name }}
  • +{% endblock breadcrumb %} +{% endblock crumbs %} diff --git a/servo/templates/products/index_outgoing.html b/servo/templates/products/index_outgoing.html new file mode 100755 index 0000000..5b1d007 --- /dev/null +++ b/servo/templates/products/index_outgoing.html @@ -0,0 +1,56 @@ +{% extends "products/index.html" %} +{% load i18n %} + +{% block toolbar %} + +{% endblock toolbar %} + +{% block first_column %} + +{% endblock first_column %} + +{% block second_column %} +
    +
    + {% csrf_token %} + + + + + + + + + + + + + + {% for p in parts %} + + + + + + + + + + {% empty %} + + + + {% endfor %} + +
    {% trans "Code" %}{% trans "Title" %}{% trans "Order" %}{% trans "Return Order" %}{% trans "Register For Return" %}{% trans "Serial Number" %}
    {{ p.partNumber }}{{ p.partDescription|truncatechars:42 }}{{ p.purchaseOrderNumber }}{{ p.returnOrderNumber }}{{ p.registeredForReturn }}{{ p.kbbSerialNumber }}
    {% trans "No parts pending return" %}
    + +
    +
    +{% endblock second_column %} + +{% block breadcrumb %} +
  • {% trans "Outgoing" %}
  • +{% endblock breadcrumb %} diff --git a/servo/templates/products/list.html b/servo/templates/products/list.html new file mode 100755 index 0000000..bac34ec --- /dev/null +++ b/servo/templates/products/list.html @@ -0,0 +1,27 @@ +{% load i18n %} +{% load servo_tags %} + + + + + + + + + + + + + {% include "products/list_rows.html" %} + + + + + + + + + + + +
    {% trans "Product" %}{% trans "Stock Price" %}{% trans "Exchange Price" %}{% trans "In Stock" %}
    {{ total_sales_value|currency }}
    {{ total_purchase_value|currency }}
    diff --git a/servo/templates/products/list_rows.html b/servo/templates/products/list_rows.html new file mode 100755 index 0000000..a753687 --- /dev/null +++ b/servo/templates/products/list_rows.html @@ -0,0 +1,55 @@ +{% load i18n %} +{% load servo_tags %} +{% for p in products %} +{% with p.get_pk as product_id %} + + {{ product }} + + {{ p.code }}
    + {{ p.title }}
    {{ p.eee_code|default:""|addspace }} + + {{ p.price_sales_stock|currency }} + {{ p.price_sales_exchange|currency }} + {% if p.is_service %} + ∞ + {% else %} + {{ p|amount_in_location:request.user }} + {% endif %} + +
    + {% if perms.servo.change_product %} + + {% else %} + + {% endif %} + + +
    + + +{% endwith %} +{% empty %} +{% trans "No products found" %} +{% endfor %} diff --git a/servo/templates/products/receive_item.html b/servo/templates/products/receive_item.html new file mode 100755 index 0000000..275fbd2 --- /dev/null +++ b/servo/templates/products/receive_item.html @@ -0,0 +1,51 @@ +{% extends "modal.html" %} +{% load servo_tags %} +{% load i18n %} + +{% block header %} + {{ item.code }} +{% endblock header %} + +{% block body %} +
    + {% csrf_token %} +

    {{ item.title }}

    +
    + {% with item.purchase_order as po %} +
    {% trans "Ordered" %}
    +
    {{ po.created_at|date:"SHORT_DATE_FORMAT" }}, {{ po.created_by }}
    +
    {% trans "Service Order" %}
    + {% if po.sales_order %} +
    {{ po.sales_order.code }}
    + {% else %} +
    {% trans "Stocking Order" %} {{ po.reference }}
    + {% endif %} +
    {% trans "Reference" %}
    +
    {{ po.reference|default:"-" }}
    + {% if item.received_at %} +
    {% trans "Received" %}
    +
    {{ item.received_at|date:"SHORT_DATE_FORMAT" }}, {{ item.received_by }}
    + {% endif %} + {% if item.reference %} +
    {% trans "Reference" %}
    +
    {{ item.reference }}
    + {% endif %} +
    {% trans "Confirmation" %}
    +
    {{ po.confirmation|default:"-" }}
    + {% endwith %} +
    {% trans "Purchase Price" %}
    +
    {{ form.instance.price|currency|default:"-" }}
    +
    + {% include "form_field_snippet.html" with field=form.amount %} + {% if item.product.is_serialized %} + {% include "form_field_snippet.html" with field=form.sn %} + {% endif %} +
    +{% endblock body %} + +{% block footer %} + +{% if not item.received_at %} + +{% endif %} +{% endblock footer %} diff --git a/servo/templates/products/remove.html b/servo/templates/products/remove.html new file mode 100755 index 0000000..e951656 --- /dev/null +++ b/servo/templates/products/remove.html @@ -0,0 +1,13 @@ +{% extends "modal.html" %} +{% load i18n %} + +{% block header %} + {% blocktrans with code=product.code %}Really delete product "{{ code }}"?{% endblocktrans %} +{% endblock header %} + +{% block footer %} +
    + {% csrf_token %} +