Merge branch 'k-fet' into qwann/k-fet/home

This commit is contained in:
Qwann 2017-03-10 16:58:10 +01:00
commit 5ddcd2f1ff
4 changed files with 81 additions and 24 deletions

View file

@ -471,12 +471,16 @@ class InventoryArticleForm(forms.Form):
# Order forms
# -----
class OrderArticleForm(forms.Form):
article = forms.ModelChoiceField(
queryset = Article.objects.all(),
widget = forms.HiddenInput(),
queryset=Article.objects.all(),
widget=forms.HiddenInput(),
)
quantity_ordered = forms.IntegerField(required = False)
quantity_ordered = forms.IntegerField(
required=False,
widget=forms.NumberInput(attrs={'class': 'form-control'}))
def __init__(self, *args, **kwargs):
super(OrderArticleForm, self).__init__(*args, **kwargs)
@ -503,14 +507,18 @@ class OrderArticleToInventoryForm(forms.Form):
)
price_HT = forms.DecimalField(
max_digits = 7, decimal_places = 4,
required = False)
required = False,
widget=forms.NumberInput(attrs={'class': 'form-control'}))
TVA = forms.DecimalField(
max_digits = 7, decimal_places = 2,
required = False)
required = False,
widget=forms.NumberInput(attrs={'class': 'form-control'}))
rights = forms.DecimalField(
max_digits = 7, decimal_places = 4,
required = False)
quantity_received = forms.IntegerField()
required = False,
widget=forms.NumberInput(attrs={'class': 'form-control'}))
quantity_received = forms.IntegerField(
widget=forms.NumberInput(attrs={'class': 'form-control'}))
def __init__(self, *args, **kwargs):
super(OrderArticleToInventoryForm, self).__init__(*args, **kwargs)

View file

@ -213,6 +213,24 @@ textarea {
font-size:25px;
}
/*
* Pages tableaux seuls
*/
.content-center > div {
background:#fff;
}
.content-center tbody tr:not(.section) td {
padding:0px 5px !important;
}
.content-center .table .form-control {
padding: 1px 12px ;
height:28px;
margin:3px 0px;
}
/*
* Pages formulaires seuls
*/
@ -365,6 +383,11 @@ textarea {
margin:15px 0;
}
/* Tooltips */
thead .tooltip {
font-size:13px;
}
/*
* Statistiques
*/

View file

@ -5,19 +5,31 @@
{% block content %}
<div class="content-center">
<div>
<form action="" method="post">
{% csrf_token %}
<table>
<table class="table text-center">
<thead>
<tr>
<td rowspan="2">Article</td>
<td colspan="5">Ventes</td>
<td rowspan="2">V. moy.</td>
<td rowspan="2">E.T.</td>
<td rowspan="2">Prév.</td>
<td colspan="5">Ventes
<span class='glyphicon glyphicon-question-sign' title="Ventes des 5 dernières semaines" data-placement="bottom"></span>
</td>
<td rowspan="2">V. moy.
<span class='glyphicon glyphicon-question-sign' title="Moyenne des ventes" data-placement="bottom"></span>
</td>
<td rowspan="2">E.T.
<span class='glyphicon glyphicon-question-sign' title="Écart-type des ventes" data-placement="bottom"></span>
</td>
<td rowspan="2">Prév.
<span class='glyphicon glyphicon-question-sign' title="Prévision de ventes" data-placement="bottom"></span>
</td>
<td rowspan="2">Stock</td>
<td rowspan="2">Rec.</td>
<td rowspan="2">Com.</td>
<td rowspan="2">Rec.
<span class='glyphicon glyphicon-question-sign' title="Quantité conseillée" data-placement="bottom"></span>
</td>
<td rowspan="2">Commande</td>
</tr>
<tr>
<td>S1</td>
@ -30,8 +42,9 @@
<tbody>
{% for form in formset %}
{% ifchanged form.category %}
<tr>
<td colspan="11">{{ form.category_name }}</td>
<tr class='section'>
<td> {{ form.category_name }}</td>
<td colspan="11"></td>
</tr>
{% endifchanged %}
<tr>
@ -56,7 +69,15 @@
<input type="password" name="KFETPASSWORD">
{% endif %}
{{ formset.management_form }}
<input type="submit" class="btn btn-primary btn-lg" value="Envoyer">
<input type="submit" class="btn btn-primary btn-lg btn-block" value="Envoyer">
</form>
</div>
</div>
<script type='text/javascript'>
$(document).ready(function () {
$('.glyphicon-question-sign').tooltip({'html': true}) ;
});
</script>
{% endblock %}

View file

@ -7,24 +7,27 @@
{% include 'kfet/base_messages.html' %}
<div class="content-center">
<div>
<form action="" method="post">
{% csrf_token %}
<table>
<table class='table text-center'>
<thead>
<tr>
<td>Article</td>
<td>HT</td>
<td style="width:25%">Article</td>
<td>Prix HT</td>
<td>TVA</td>
<td>Droits</td>
<td>Com.</td>
<td>Commandé</td>
<td>Reçu</td>
</tr>
</thead>
<tbody>
{% for form in formset %}
{% ifchanged form.category %}
<tr>
<td colspan="6">{{ form.category_name }}</td>
<tr class='section'>
<td>{{ form.category_name }}</td>
<td colspan="5"></td>
</tr>
{% endifchanged %}
<tr>
@ -42,7 +45,9 @@
<input type="password" name="KFETPASSWORD">
{% endif %}
{{ formset.management_form }}
<input type="submit" value="Enregistrer">
<input type="submit" class="btn btn-primary btn-lg btn-block" value="Enregistrer">
</form>
</div>
</div>
{% endblock %}