Idem for checkoutstatements
This commit is contained in:
parent
8e65298c7c
commit
91d5fe234c
4 changed files with 35 additions and 29 deletions
|
@ -273,29 +273,35 @@ class CheckoutStatement(models.Model):
|
|||
checkout = models.ForeignKey(
|
||||
Checkout, on_delete = models.PROTECT,
|
||||
related_name = "statements")
|
||||
balance_old = models.DecimalField(max_digits = 6, decimal_places = 2)
|
||||
balance_new = models.DecimalField(max_digits = 6, decimal_places = 2)
|
||||
amount_taken = models.DecimalField(max_digits = 6, decimal_places = 2)
|
||||
amount_error = models.DecimalField(max_digits = 6, decimal_places = 2)
|
||||
balance_old = models.DecimalField("Ancienne balance",
|
||||
max_digits = 6, decimal_places = 2)
|
||||
balance_new = models.DecimalField("Nouvelle balance",
|
||||
max_digits = 6, decimal_places = 2)
|
||||
amount_taken = models.DecimalField("Montant pris",
|
||||
max_digits = 6, decimal_places = 2)
|
||||
amount_error = models.DecimalField("Montant de l'erreur",
|
||||
max_digits = 6, decimal_places = 2)
|
||||
at = models.DateTimeField(auto_now_add = True)
|
||||
not_count = models.BooleanField(default=False)
|
||||
not_count = models.BooleanField("Caisse non comptée", default=False)
|
||||
|
||||
taken_001 = models.PositiveSmallIntegerField(default=0)
|
||||
taken_002 = models.PositiveSmallIntegerField(default=0)
|
||||
taken_005 = models.PositiveSmallIntegerField(default=0)
|
||||
taken_01 = models.PositiveSmallIntegerField(default=0)
|
||||
taken_02 = models.PositiveSmallIntegerField(default=0)
|
||||
taken_05 = models.PositiveSmallIntegerField(default=0)
|
||||
taken_1 = models.PositiveSmallIntegerField(default=0)
|
||||
taken_2 = models.PositiveSmallIntegerField(default=0)
|
||||
taken_5 = models.PositiveSmallIntegerField(default=0)
|
||||
taken_10 = models.PositiveSmallIntegerField(default=0)
|
||||
taken_20 = models.PositiveSmallIntegerField(default=0)
|
||||
taken_50 = models.PositiveSmallIntegerField(default=0)
|
||||
taken_100 = models.PositiveSmallIntegerField(default=0)
|
||||
taken_200 = models.PositiveSmallIntegerField(default=0)
|
||||
taken_500 = models.PositiveSmallIntegerField(default=0)
|
||||
taken_cheque = models.DecimalField(default=0, max_digits=6, decimal_places=2)
|
||||
taken_001 = models.PositiveSmallIntegerField("Pièces de 1¢", default=0)
|
||||
taken_002 = models.PositiveSmallIntegerField("Pièces de 2¢", default=0)
|
||||
taken_005 = models.PositiveSmallIntegerField("Pièces de 5¢", default=0)
|
||||
taken_01 = models.PositiveSmallIntegerField("Pièces de 10¢", default=0)
|
||||
taken_02 = models.PositiveSmallIntegerField("Pièces de 20¢", default=0)
|
||||
taken_05 = models.PositiveSmallIntegerField("Pièces de 50¢", default=0)
|
||||
taken_1 = models.PositiveSmallIntegerField("Pièces de 1€", default=0)
|
||||
taken_2 = models.PositiveSmallIntegerField("Pièces de 2€", default=0)
|
||||
taken_5 = models.PositiveSmallIntegerField("Billets de 5€", default=0)
|
||||
taken_10 = models.PositiveSmallIntegerField("Billets de 10€", default=0)
|
||||
taken_20 = models.PositiveSmallIntegerField("Billets de 20€", default=0)
|
||||
taken_50 = models.PositiveSmallIntegerField("Billets de 50€", default=0)
|
||||
taken_100 = models.PositiveSmallIntegerField("Billets de 100€", default=0)
|
||||
taken_200 = models.PositiveSmallIntegerField("Billets de 200€", default=0)
|
||||
taken_500 = models.PositiveSmallIntegerField("Billets de 500€", default=0)
|
||||
taken_cheque = models.DecimalField(
|
||||
"Montant des chèques",
|
||||
default=0, max_digits=6, decimal_places=2)
|
||||
|
||||
def __str__(self):
|
||||
return '%s %s' % (self.checkout, self.at)
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<form submit="" method="post" class="form-horizontal">
|
||||
{% csrf_token %}
|
||||
{% include 'kfet/form_snippet.html' with form=form %}
|
||||
{% if not perms.kfet.add_article %}
|
||||
{% if not perms.kfet.change_article %}
|
||||
{% include 'kfet/form_authentication_snippet.html' %}
|
||||
{% endif %}
|
||||
{% include 'kfet/form_submit_snippet.html' with value="Mettre à jour" %}
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
<td><input id="id_taken_001" name="taken_001" data-value="0.01" min="0" value="0" type="number" class="form-control" required></td>
|
||||
</tr>
|
||||
</table>
|
||||
Chèque: <input id="id_taken_cheque" name="taken_cheque" data-value="1" min="0" step="0.01" value="0" type="number" class="form-control" required>
|
||||
<p style="font-weight:bold"> Chèque:</p> <input id="id_taken_cheque" name="taken_cheque" data-value="1" min="0" step="0.01" value="0" type="number" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-right-block">
|
||||
|
|
|
@ -15,15 +15,15 @@ Caisse {{ checkout.name }} - Modification relevé {{ checkoutstatement.at }}
|
|||
</div>
|
||||
<div class="col-sm-8 col-md-9 col-content-right">
|
||||
{% include 'kfet/base_messages.html' %}
|
||||
<div class="content-right">
|
||||
<div class="content-right-block">
|
||||
<form action="" method="post">
|
||||
<div class="content-right form-only">
|
||||
<div class="content-form">
|
||||
<form submit="" method="post" class="form-horizontal">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
{% include 'kfet/form_snippet.html' with form=form %}
|
||||
{% if not perms.kfet.change_checkoutstatement %}
|
||||
<input type="password" name="KFETPASSWORD">
|
||||
{% include 'kfet/form_authentication_snippet.html' %}
|
||||
{% endif %}
|
||||
<input type="submit" value="Enregistrer">
|
||||
{% include 'kfet/form_submit_snippet.html' with value="Enregistrer" %}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue