Migrate invoices and lot of eboutic improvements

This commit is contained in:
Skia
2016-08-18 19:52:20 +02:00
parent 50c452c287
commit 05bd177a9d
19 changed files with 470 additions and 156 deletions

View File

@ -1,5 +1,9 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Eboutic{% endtrans %}
{% endblock %}
{% macro add_product(id, content) %}
<form method="post" action="{{ url('eboutic:main') }}" class="inline" style="display:inline">
{% csrf_token %}
@ -34,11 +38,14 @@
</form>
</div>
<div>
<p><strong>{% trans %}Products: {% endtrans %}</strong>
{% for p in eboutic.products.all() %}
{{ add_product(p.id, p.name) }}
{% for t in categories %}
{% if eboutic.products.filter(product_type=t).exists() %}
<h5>{{ t }}</h5>
{% for p in eboutic.products.filter(product_type=t).all() %}
{{ add_product(p.id, p.name) }}
{% endfor %}
{% endif %}
{% endfor %}
</p>
</div>
{% endblock %}

View File

@ -1,5 +1,9 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Basket state{% endtrans %}
{% endblock %}
{% block content %}
<h3>{% trans %}Eboutic{% endtrans %}</h3>
@ -30,7 +34,7 @@
{% endfor %}
<input type="submit" value="{% trans %}Pay with credit card{% endtrans %}" />
</form>
{% if basket.items.filter(type="REFILLING").exists() %}
{% if basket.items.filter(type_id=settings.SITH_COUNTER_PRODUCTTYPE_REFILLING).exists() %}
<p>{% trans %}AE account payment disabled because your basket contains refilling items.{% endtrans %}</p>
{% else %}
<form method="post" action="{{ url('eboutic:pay_with_sith') }}">