forked from DGNum/gestioCOF
Merge branch 'Aufinal/command_interface' into 'k-fet'
Interfaces de commandes et d'inventaires - Modifie la présentation de ces interfaces. - Ajout de tooltips d'aide sur les colonnes. fixes #140 See merge request !170
This commit is contained in:
commit
fbd0d760b6
4 changed files with 81 additions and 24 deletions
|
@ -471,12 +471,16 @@ class InventoryArticleForm(forms.Form):
|
||||||
# Order forms
|
# Order forms
|
||||||
# -----
|
# -----
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class OrderArticleForm(forms.Form):
|
class OrderArticleForm(forms.Form):
|
||||||
article = forms.ModelChoiceField(
|
article = forms.ModelChoiceField(
|
||||||
queryset=Article.objects.all(),
|
queryset=Article.objects.all(),
|
||||||
widget=forms.HiddenInput(),
|
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):
|
def __init__(self, *args, **kwargs):
|
||||||
super(OrderArticleForm, self).__init__(*args, **kwargs)
|
super(OrderArticleForm, self).__init__(*args, **kwargs)
|
||||||
|
@ -503,14 +507,18 @@ class OrderArticleToInventoryForm(forms.Form):
|
||||||
)
|
)
|
||||||
price_HT = forms.DecimalField(
|
price_HT = forms.DecimalField(
|
||||||
max_digits = 7, decimal_places = 4,
|
max_digits = 7, decimal_places = 4,
|
||||||
required = False)
|
required = False,
|
||||||
|
widget=forms.NumberInput(attrs={'class': 'form-control'}))
|
||||||
TVA = forms.DecimalField(
|
TVA = forms.DecimalField(
|
||||||
max_digits = 7, decimal_places = 2,
|
max_digits = 7, decimal_places = 2,
|
||||||
required = False)
|
required = False,
|
||||||
|
widget=forms.NumberInput(attrs={'class': 'form-control'}))
|
||||||
rights = forms.DecimalField(
|
rights = forms.DecimalField(
|
||||||
max_digits = 7, decimal_places = 4,
|
max_digits = 7, decimal_places = 4,
|
||||||
required = False)
|
required = False,
|
||||||
quantity_received = forms.IntegerField()
|
widget=forms.NumberInput(attrs={'class': 'form-control'}))
|
||||||
|
quantity_received = forms.IntegerField(
|
||||||
|
widget=forms.NumberInput(attrs={'class': 'form-control'}))
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super(OrderArticleToInventoryForm, self).__init__(*args, **kwargs)
|
super(OrderArticleToInventoryForm, self).__init__(*args, **kwargs)
|
||||||
|
|
|
@ -213,6 +213,24 @@ textarea {
|
||||||
font-size:25px;
|
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
|
* Pages formulaires seuls
|
||||||
*/
|
*/
|
||||||
|
@ -365,6 +383,11 @@ textarea {
|
||||||
margin:15px 0;
|
margin:15px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Tooltips */
|
||||||
|
thead .tooltip {
|
||||||
|
font-size:13px;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Statistiques
|
* Statistiques
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -5,19 +5,31 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
|
<div class="content-center">
|
||||||
|
<div>
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<table>
|
<table class="table text-center">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td rowspan="2">Article</td>
|
<td rowspan="2">Article</td>
|
||||||
<td colspan="5">Ventes</td>
|
<td colspan="5">Ventes
|
||||||
<td rowspan="2">V. moy.</td>
|
<span class='glyphicon glyphicon-question-sign' title="Ventes des 5 dernières semaines" data-placement="bottom"></span>
|
||||||
<td rowspan="2">E.T.</td>
|
</td>
|
||||||
<td rowspan="2">Prév.</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">Stock</td>
|
||||||
<td rowspan="2">Rec.</td>
|
<td rowspan="2">Rec.
|
||||||
<td rowspan="2">Com.</td>
|
<span class='glyphicon glyphicon-question-sign' title="Quantité conseillée" data-placement="bottom"></span>
|
||||||
|
</td>
|
||||||
|
<td rowspan="2">Commande</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>S1</td>
|
<td>S1</td>
|
||||||
|
@ -30,8 +42,9 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for form in formset %}
|
{% for form in formset %}
|
||||||
{% ifchanged form.category %}
|
{% ifchanged form.category %}
|
||||||
<tr>
|
<tr class='section'>
|
||||||
<td colspan="11">{{ form.category_name }}</td>
|
<td> {{ form.category_name }}</td>
|
||||||
|
<td colspan="11"></td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endifchanged %}
|
{% endifchanged %}
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -56,7 +69,15 @@
|
||||||
<input type="password" name="KFETPASSWORD">
|
<input type="password" name="KFETPASSWORD">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ formset.management_form }}
|
{{ 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>
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type='text/javascript'>
|
||||||
|
$(document).ready(function () {
|
||||||
|
$('.glyphicon-question-sign').tooltip({'html': true}) ;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -7,24 +7,27 @@
|
||||||
|
|
||||||
{% include 'kfet/base_messages.html' %}
|
{% include 'kfet/base_messages.html' %}
|
||||||
|
|
||||||
|
<div class="content-center">
|
||||||
|
<div>
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<table>
|
<table class='table text-center'>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Article</td>
|
<td style="width:25%">Article</td>
|
||||||
<td>HT</td>
|
<td>Prix HT</td>
|
||||||
<td>TVA</td>
|
<td>TVA</td>
|
||||||
<td>Droits</td>
|
<td>Droits</td>
|
||||||
<td>Com.</td>
|
<td>Commandé</td>
|
||||||
<td>Reçu</td>
|
<td>Reçu</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for form in formset %}
|
{% for form in formset %}
|
||||||
{% ifchanged form.category %}
|
{% ifchanged form.category %}
|
||||||
<tr>
|
<tr class='section'>
|
||||||
<td colspan="6">{{ form.category_name }}</td>
|
<td>{{ form.category_name }}</td>
|
||||||
|
<td colspan="5"></td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endifchanged %}
|
{% endifchanged %}
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -42,7 +45,9 @@
|
||||||
<input type="password" name="KFETPASSWORD">
|
<input type="password" name="KFETPASSWORD">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ formset.management_form }}
|
{{ formset.management_form }}
|
||||||
<input type="submit" value="Enregistrer">
|
<input type="submit" class="btn btn-primary btn-lg btn-block" value="Enregistrer">
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in a new issue