invoice discount amount fix

This commit is contained in:
Arvind Tiwari 2018-05-07 07:50:32 +05:30
parent 3d2ce27954
commit 0fdb88b8aa
3 changed files with 7 additions and 6 deletions

View file

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2018-05-06 14:20
# Generated by Django 1.9.4 on 2018-05-07 02:19
from __future__ import unicode_literals
from django.db import migrations, models
@ -15,7 +15,8 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='vmpricing',
name='discount_amount',
field=models.DecimalField(decimal_places=2, default=0, max_digits=4),
field=models.DecimalField(
decimal_places=2, default=0, max_digits=6),
),
migrations.AddField(
model_name='vmpricing',

View file

@ -76,11 +76,11 @@
<span class="pull-right">{{vm.vat|floatformat:2|intcomma}} CHF</span>
</p>
{% endif %}
{% if vm.discount > 0 %}
{% if vm.discount.amount > 0 %}
<p class="text-primary">
{%trans "Discount" as discount_name %}
<span>{{ vm.discount.name|default:discount_name }}: </span>
<span class="pull-right">- {{ discount.amount }} CHF</span>
<span class="pull-right">- {{ vm.discount.amount }} CHF</span>
</p>
{% endif %}
<p>

View file

@ -138,11 +138,11 @@
<span class="pull-right">{{vm.vat|floatformat:2|intcomma}} CHF</span>
</p>
{% endif %}
{% if vm.discount > 0 %}
{% if vm.discount.amount > 0 %}
<p class="text-primary">
{%trans "Discount" as discount_name %}
<span>{{ vm.discount.name|default:discount_name }}: </span>
<span class="pull-right">- {{ discount.amount }} CHF</span>
<span class="pull-right">- {{ vm.discount.amount }} CHF</span>
</p>
{% endif %}
<p>