diff options
author | Filipp Lepalaan <filipp@mac.com> | 2015-08-04 10:11:24 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2015-08-04 10:11:24 +0300 |
commit | 63b0fc6269b38edf7234b9f151b80d81f614c0a3 (patch) | |
tree | 555de3068f33f8dddb4619349bbea7d9b7c822fd /servo/templates/purchases | |
download | Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.tar.gz Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.tar.bz2 Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.zip |
Initial commit
First public commit
Diffstat (limited to 'servo/templates/purchases')
-rwxr-xr-x | servo/templates/purchases/edit_po.html | 92 | ||||
-rwxr-xr-x | servo/templates/purchases/list_pos.html | 132 | ||||
-rwxr-xr-x | servo/templates/purchases/order_stock.html | 17 | ||||
-rwxr-xr-x | servo/templates/purchases/view_po.html | 56 |
4 files changed, 297 insertions, 0 deletions
diff --git a/servo/templates/purchases/edit_po.html b/servo/templates/purchases/edit_po.html new file mode 100755 index 0000000..618f1a3 --- /dev/null +++ b/servo/templates/purchases/edit_po.html @@ -0,0 +1,92 @@ +{% extends "purchases/list_pos.html" %} +{% load servo_tags %} +{% load i18n %} + +{% block toolbar %} + <a class="btn" href="{% url 'purchases-choose_for_po' order.pk %}" data-modal="#modal"><i class="icon-shopping-cart"></i> {% trans "Add Product" %}</a> +{% endblock toolbar %} + +{% block filter_bar %} +{% endblock filter_bar %} + +{% block detail_view %} + <form method="post" accept-charset="utf-8" action=""> + <div class="span3"> + {% include "form_field_snippet.html" with field=form.sales_order %} + {% include "form_field_snippet.html" with field=form.reference %} + {% include "form_field_snippet.html" with field=form.confirmation %} + </div> + <div class="span9"> + <ul class="nav nav-tabs"> + <li class="active"><a href="#tab1" data-toggle="tab">{% trans "Products" %}</a></li> + <li><a href="#tab2" data-toggle="tab">{% trans "Dispatch" %}</a></li> + </ul> + <div class="tab-content"> + {% csrf_token %} + {{ formset.management_form }} + <div class="tab-pane active" id="tab1"> + <table class="table"> + <thead> + <tr> + <th>{% trans "Code" %}</th> + <th>{% trans "Product" %}</th> + <th>{% trans "Reference" %}</th> + <th>{% trans "Amount" %}</th> + <th>{% trans "Purchase Price" %}</th> + {% if not order.submitted_at %} + <th>{% trans "Delete" %}</th> + {% else %} + <th></th> + {% endif %} + </tr> + </thead> + <tbody> + {% for form in formset %} + {{ form.id }} + {{ form.product }} + <tr> + <td>{{ form.code }}</td> + <td>{{ form.title }}</td> + <td>{{ form.reference }}</td> + <td>{{ form.amount }}</td> + <td>{{ form.price }}</td> + {% if not order.submitted_at %} + <td>{{ form.DELETE }}</td> + {% else %} + <td></td> + {% endif %} + </tr> + {% empty %} + <tr> + <td colspan="6" class="muted empty">{% trans "Order does not contain any products" %}</td> + </tr> + {% endfor %} + </tbody> + <tfoot> + <tr> + <td colspan="3" style="text-align:right">{% trans "Total" %}:</td> + <td>{{ order.amount }}</td> + <td>{{ order.sum|currency }}</td> + <td></td> + </tr> + </tfoot> + </table> + </div> + <div class="tab-pane" id="tab2"> + {% include "form_field_snippet.html" with field=form.carrier %} + {% include "form_field_snippet.html" with field=form.supplier %} + {% include "form_field_snippet.html" with field=form.tracking_id %} + {% include "form_field_snippet.html" with field=form.days_delivered %} + </div> + </div> + {% if not order.submitted_at %} + <div class="form-actions"> + <label class="checkbox pull-left"> + <input type="checkbox" name="confirm" id="id_confirm"> {% trans "Confirm" %} + </label> + <div class="pull-right"><button type="submit" class="btn btn-primary" id="save-bulk-return" data-placeholder="{% trans "Submit" %}">{% trans "Save" %}</button></div> + </div> + {% endif %} + </div> + </form> +{% endblock detail_view %} diff --git a/servo/templates/purchases/list_pos.html b/servo/templates/purchases/list_pos.html new file mode 100755 index 0000000..f580598 --- /dev/null +++ b/servo/templates/purchases/list_pos.html @@ -0,0 +1,132 @@ +{% extends "default.html" %} +{% load servo_tags %} +{% load i18n %} + +{% block toolbar %} +<div class="btn-group"> + <a href="{% url 'purchases-create_po' %}" class="btn"><i class="icon-plus"></i> {% trans "New" %}</a> +</div> +{% endblock toolbar %} + +{% block content %} + +<div class="row-fluid row-header"> + <div class="span12"> + <form class="form-search pull-right"> + + </form> + </div> +</div> + +{% include "products/tabs.html" %} + +{% block filter_bar %} +<div class="row-fluid"> + <div class="span12 well"> + <form action="" method="post" class="form-inline"> + {% csrf_token %} + {% for field in form %} + <div class="control-group pull-left"> + <label class="control-label">{{ field.label }}</label> + <div class="controls">{{ field }}</div> + </div> + {% endfor %} + <div class="control-group"> + <label class="control-label"> </label> + <div class="controls"> + <button class="btn btn-primary pull-right" type="submit"><i class="icon-search icon-white"></i> {% trans "Search" %}</button> + </div> + </div> + </form> + </div> +</div> +{% endblock filter_bar %} + +<div class="row-fluid"> + <div class="span12"> + {% block detail_view %} + <table class="table table-hover"> + <thead> + <tr> + <th>#</th> + <th>{% trans "Created" %}</th> + <th>{% trans "Ordered" %}</th> + <th>{% trans "Reference" %}</th> + <th>{% trans "Confirmation" %}</th> + <th>{% trans "Received" %}</th> + <th>{% trans "Order" %}</th> + <th>{% trans "Products" %}</th> + <th>{% trans "Total" %}</th> + <th></th> + </tr> + </thead> + <tbody> + {% for po in orders %} + <tr> + <td><a href="{{ po.get_absolute_url }}">{{ po.id|safe }}</a></td> + <td>{{ po.created_at|date:"SHORT_DATE_FORMAT" }}</td> + <td>{{ po.submitted_at|date:"SHORT_DATE_FORMAT" }}</td> + <td>{{ po.reference|default:"" }}</td> + <td>{{ po.confirmation|default:"" }}</td> + <td>{{ po.date_arrived }}</td> + {% if po.sales_order %} + <td><a href="{% url 'orders-edit' po.sales_order.pk %}">{{ po.sales_order.code }}</a></td> + {% else %} + <td></td> + {% endif %} + <td>{{ po.amount }}</td> + <td>{{ po.sum|currency }}</td> + <td> + <div class="btn-group pull-right"> + <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> + <i class="icon-cog"></i> <span class="caret"></span> + </a> + <ul class="dropdown-menu"> + {% if po.can_create_gsx_stock %} + <li><a href="{% url 'purchases-submit_stock_order' po.id %}" data-modal="#modal">{% trans "Create GSX Stocking Order" %}</a></li> + {% else %} + <li class="disabled"><a href="#">{% trans "Create GSX Stocking Order" %}</a></li> + {% endif %} + <li class="divider"></li> + {% if perms.servo.change_purchaseorder and po.is_editable %} + <li><a href="{{ po.get_absolute_url }}">{% trans "Edit" %}</a></li> + {% else %} + <li class="disabled"><a href="#">{% trans "Edit" %}</a></li> + {% endif %} + {% if perms.servo.delete_purchaseorder and po.is_editable %} + <li><a href="{% url 'purchases-delete_po' po.id %}">{% trans "Delete" %}</a></li> + {% else %} + <li class="disabled"><a href="#">{% trans "Delete" %}</a></li> + {% endif %} + </ul> + </div> + </td> + </tr> + {% empty %} + <tr><td colspan="10" class="empty muted">{% trans "No Purchase Orders" %}</td></tr> + {% endfor %} + </tbody> + <tfoot> + <tr> + <td></td> + <td></td> + <td></td> + <td></td> + <td></td> + <td></td> + <td></td> + <td></td> + <td><strong>{{ total.total__sum|currency|default:"" }}</strong></td> + <td></td> + </tr> + </tfoot> + </table> + {% include "pagination.html" with items=orders %} + {% endblock detail_view %} + </div> +</div> +{% endblock content %} + +{% block crumbs %} +<li><a href="{% url 'purchases-list_pos' %}">{% trans "Purchase Orders" %}</a></li> +{% endblock crumbs %} diff --git a/servo/templates/purchases/order_stock.html b/servo/templates/purchases/order_stock.html new file mode 100755 index 0000000..fe3f4a0 --- /dev/null +++ b/servo/templates/purchases/order_stock.html @@ -0,0 +1,17 @@ +{% extends "modal.html" %} +{% load i18n %} + +{% block header %} + {% trans "Submit this stocking order?" %} +{% endblock header %} + +{% block body %} + {% trans "Products will be ordered from GSX." %} +{% endblock body %} + +{% block footer %} + <form action="{{ action }}" method="post"> + {% csrf_token %} + <button class="btn btn-danger">{% trans "Submit" %}</button> + </form> +{% endblock footer %} diff --git a/servo/templates/purchases/view_po.html b/servo/templates/purchases/view_po.html new file mode 100755 index 0000000..c43a058 --- /dev/null +++ b/servo/templates/purchases/view_po.html @@ -0,0 +1,56 @@ +{% extends "purchases/edit_po.html" %} +{% load servo_tags %} +{% load i18n %} + +{% block toolbar %} +{% endblock toolbar %} + +{% block filter_bar %} +{% endblock filter_bar %} + +{% block detail_view %} + <div class="row"> + <div class="span4"> + <dl class="dl-horizontal"> + <dt>{% trans "Created By" %}</dt> + <dd>{{ po.created_by }}</dd> + <dt>{% trans "Created At" %}</dt> + <dd>{{ po.created_at|date:"SHORT_DATE_FORMAT" }}</dd> + <dt>{% trans "Sales Order" %}</dt> + <dd>{{ po.sales_order|default:"" }}</dd> + <dt>{% trans "Reference" %}</dt> + <dd>{{ po.reference }}</dd> + <dt>{% trans "Confirmation" %}</dt> + <dd>{{ po.confirmation }}</dd> + </dl> + </div> + <div class="span8"> + <table class="table"> + <thead> + <tr> + <th>{% trans "Product" %}</th> + <th>{% trans "Reference" %}</th> + <th>{% trans "Amount" %}</th> + <th>{% trans "Purchase Price" %}</th> + <th>{% trans "Received At" %}</th> + </tr> + </thead> + <tbody> + {% for i in po.purchaseorderitem_set.all %} + <tr> + <td><strong>{{ i.code }}</strong><br/>{{ i.title }}</td> + <td>{{ i.reference }}</td> + <td>{{ i.amount }}</td> + <td>{{ i.price|currency }}</td> + <td>{{ i.received_at|date:"SHORT_DATE_FORMAT"|default:"-" }}</td> + </tr> + {% endfor %} + </tbody> + </table> + </div> + </div> +{% endblock detail_view %} + +{% block crumbs %} + <li><a href="{% url 'purchases-list_pos' %}">{% trans "Purchase Orders" %}</a></li> +{% endblock crumbs %} |