mirror of https://gitlab.federez.net/re2o/re2o
committed by
chirac
13 changed files with 511 additions and 9 deletions
@ -0,0 +1,28 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Generated by Django 1.10.7 on 2018-12-29 21:03 |
||||
|
from __future__ import unicode_literals |
||||
|
|
||||
|
from django.db import migrations, models |
||||
|
import django.db.models.deletion |
||||
|
|
||||
|
|
||||
|
class Migration(migrations.Migration): |
||||
|
|
||||
|
dependencies = [ |
||||
|
('cotisations', '0036_custominvoice_remark'), |
||||
|
] |
||||
|
|
||||
|
operations = [ |
||||
|
migrations.CreateModel( |
||||
|
name='CostEstimate', |
||||
|
fields=[ |
||||
|
('custominvoice_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='cotisations.CustomInvoice')), |
||||
|
('validity', models.DurationField(verbose_name='Period of validity')), |
||||
|
('final_invoice', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='origin_cost_estimate', to='cotisations.CustomInvoice')), |
||||
|
], |
||||
|
options={ |
||||
|
'permissions': (('view_costestimate', 'Can view a cost estimate object'),), |
||||
|
}, |
||||
|
bases=('cotisations.custominvoice',), |
||||
|
), |
||||
|
] |
||||
@ -0,0 +1,31 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Generated by Django 1.10.7 on 2018-12-31 22:57 |
||||
|
from __future__ import unicode_literals |
||||
|
|
||||
|
from django.db import migrations, models |
||||
|
import django.db.models.deletion |
||||
|
|
||||
|
|
||||
|
class Migration(migrations.Migration): |
||||
|
|
||||
|
dependencies = [ |
||||
|
('cotisations', '0037_costestimate'), |
||||
|
] |
||||
|
|
||||
|
operations = [ |
||||
|
migrations.AlterField( |
||||
|
model_name='costestimate', |
||||
|
name='final_invoice', |
||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='origin_cost_estimate', to='cotisations.CustomInvoice'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='costestimate', |
||||
|
name='validity', |
||||
|
field=models.DurationField(help_text='DD HH:MM:SS', verbose_name='Period of validity'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='custominvoice', |
||||
|
name='paid', |
||||
|
field=models.BooleanField(default=False, verbose_name='Paid'), |
||||
|
), |
||||
|
] |
||||
@ -0,0 +1,101 @@ |
|||||
|
{% comment %} |
||||
|
Re2o est un logiciel d'administration développé initiallement au rezometz. Il |
||||
|
se veut agnostique au réseau considéré, de manière à être installable en |
||||
|
quelques clics. |
||||
|
|
||||
|
Copyright © 2018 Hugo Levy-Falk |
||||
|
|
||||
|
This program is free software; you can redistribute it and/or modify |
||||
|
it under the terms of the GNU General Public License as published by |
||||
|
the Free Software Foundation; either version 2 of the License, or |
||||
|
(at your option) any later version. |
||||
|
|
||||
|
This program is distributed in the hope that it will be useful, |
||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
GNU General Public License for more details. |
||||
|
|
||||
|
You should have received a copy of the GNU General Public License along |
||||
|
with this program; if not, write to the Free Software Foundation, Inc., |
||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
||||
|
{% endcomment %} |
||||
|
{% load i18n %} |
||||
|
{% load acl %} |
||||
|
{% load logs_extra %} |
||||
|
{% load design %} |
||||
|
|
||||
|
<div class="table-responsive"> |
||||
|
{% if cost_estimate_list.paginator %} |
||||
|
{% include 'pagination.html' with list=cost_estimate_list%} |
||||
|
{% endif %} |
||||
|
|
||||
|
<table class="table table-striped"> |
||||
|
<thead> |
||||
|
<tr> |
||||
|
<th> |
||||
|
{% trans "Recipient" as tr_recip %} |
||||
|
{% include 'buttons/sort.html' with prefix='invoice' col='user' text=tr_user %} |
||||
|
</th> |
||||
|
<th>{% trans "Designation" %}</th> |
||||
|
<th>{% trans "Total price" %}</th> |
||||
|
<th> |
||||
|
{% trans "Payment method" as tr_payment_method %} |
||||
|
{% include 'buttons/sort.html' with prefix='invoice' col='payement' text=tr_payment_method %} |
||||
|
</th> |
||||
|
<th> |
||||
|
{% trans "Date" as tr_date %} |
||||
|
{% include 'buttons/sort.html' with prefix='invoice' col='date' text=tr_date %} |
||||
|
</th> |
||||
|
<th> |
||||
|
{% trans "Validity" as tr_validity %} |
||||
|
{% include 'buttons/sort.html' with prefix='invoice' col='validity' text=tr_validity %} |
||||
|
</th> |
||||
|
<th> |
||||
|
{% trans "Cost estimate ID" as tr_estimate_id %} |
||||
|
{% include 'buttons/sort.html' with prefix='invoice' col='id' text=tr_estimate_id %} |
||||
|
</th> |
||||
|
<th> |
||||
|
{% trans "Invoice created" as tr_invoice_created%} |
||||
|
{% include 'buttons/sort.html' with prefix='invoice' col='paid' text=tr_invoice_created %} |
||||
|
</th> |
||||
|
<th></th> |
||||
|
<th></th> |
||||
|
</tr> |
||||
|
</thead> |
||||
|
{% for estimate in cost_estimate_list %} |
||||
|
<tr> |
||||
|
<td>{{ estimate.recipient }}</td> |
||||
|
<td>{{ estimate.name }}</td> |
||||
|
<td>{{ estimate.prix_total }}</td> |
||||
|
<td>{{ estimate.payment }}</td> |
||||
|
<td>{{ estimate.date }}</td> |
||||
|
<td>{{ estimate.validity }}</td> |
||||
|
<td>{{ estimate.id }}</td> |
||||
|
<td> |
||||
|
{% if estimate.final_invoice %} |
||||
|
<a href="{% url 'cotisations:edit-custom-invoice' estimate.final_invoice.pk %}"><i style="color: #1ECA18;" class="fa fa-check"></i></a> |
||||
|
{% else %} |
||||
|
<i style="color: #D10115;" class="fa fa-times"></i>' |
||||
|
{% endif %} |
||||
|
</td> |
||||
|
<td> |
||||
|
{% can_edit estimate %} |
||||
|
{% include 'buttons/edit.html' with href='cotisations:edit-cost-estimate' id=estimate.id %} |
||||
|
{% acl_end %} |
||||
|
{% history_button estimate %} |
||||
|
{% include 'buttons/suppr.html' with href='cotisations:del-cost-estimate' id=estimate.id %} |
||||
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:cost-estimate-to-invoice' estimate.id %}"> |
||||
|
<i class="fa fa-file"></i> |
||||
|
</a> |
||||
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:cost-estimate-pdf' estimate.id %}"> |
||||
|
<i class="fa fa-file-pdf-o"></i> {% trans "PDF" %} |
||||
|
</a> |
||||
|
</td> |
||||
|
</tr> |
||||
|
{% endfor %} |
||||
|
</table> |
||||
|
|
||||
|
{% if custom_invoice_list.paginator %} |
||||
|
{% include 'pagination.html' with list=custom_invoice_list %} |
||||
|
{% endif %} |
||||
|
</div> |
||||
@ -0,0 +1,36 @@ |
|||||
|
{% extends "cotisations/sidebar.html" %} |
||||
|
{% comment %} |
||||
|
Re2o est un logiciel d'administration développé initiallement au rezometz. Il |
||||
|
se veut agnostique au réseau considéré, de manière à être installable en |
||||
|
quelques clics. |
||||
|
|
||||
|
Copyright © 2017 Gabriel Détraz |
||||
|
Copyright © 2017 Goulven Kermarec |
||||
|
Copyright © 2017 Augustin Lemesle |
||||
|
|
||||
|
This program is free software; you can redistribute it and/or modify |
||||
|
it under the terms of the GNU General Public License as published by |
||||
|
the Free Software Foundation; either version 2 of the License, or |
||||
|
(at your option) any later version. |
||||
|
|
||||
|
This program is distributed in the hope that it will be useful, |
||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
GNU General Public License for more details. |
||||
|
|
||||
|
You should have received a copy of the GNU General Public License along |
||||
|
with this program; if not, write to the Free Software Foundation, Inc., |
||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
||||
|
{% endcomment %} |
||||
|
{% load acl %} |
||||
|
{% load i18n %} |
||||
|
|
||||
|
{% block title %}{% trans "Cost estimates" %}{% endblock %} |
||||
|
|
||||
|
{% block content %} |
||||
|
<h2>{% trans "Cost estimates list" %}</h2> |
||||
|
{% can_create CostEstimate %} |
||||
|
{% include "buttons/add.html" with href='cotisations:new-cost-estimate'%} |
||||
|
{% acl_end %} |
||||
|
{% include 'cotisations/aff_cost_estimate.html' %} |
||||
|
{% endblock %} |
||||
Loading…
Reference in new issue