Revert "lingo: show invoice no online payment reason if present (#10483)"

This reverts commit 31db5daa15.
This commit is contained in:
Serghei Mihai 2016-04-06 20:09:11 +02:00
parent e89b881a04
commit a014881830
4 changed files with 3 additions and 21 deletions

View File

@ -73,9 +73,7 @@ def build_remote_item(data, regie):
subject=data.get('label'),
has_pdf=data.get('has_pdf'),
online_payment=data.get('online_payment'),
paid=data.get('paid'),
payment_date=data.get('payment_date'),
no_online_payment_reason=data.get('no_online_payment_reason'))
payment_date=data.get('payment_date'))
class Regie(models.Model):
@ -234,7 +232,7 @@ class RemoteItem(object):
def __init__(self, id, regie, creation_date, payment_limit_date,
total_amount, amount, display_id, subject, has_pdf,
online_payment, paid, payment_date, no_online_payment_reason):
online_payment, payment_date):
self.id = id
self.regie = regie
self.creation_date = parser.parse(creation_date)
@ -245,15 +243,9 @@ class RemoteItem(object):
self.subject = subject
self.has_pdf = has_pdf
self.online_payment = online_payment
self.paid = paid
self.no_online_payment_reason = no_online_payment_reason
if payment_date:
self.payment_date = parser.parse(payment_date)
@property
def no_online_payment_reason_details(self):
return settings.LINGO_NO_ONLINE_PAYMENT_REASONS.get(self.no_online_payment_reason)
class Transaction(models.Model):
regie = models.ForeignKey(Regie, null=True)

View File

@ -29,11 +29,6 @@
{% if item.payment_date %}
<div class="paid">{% trans "Payed on:" %} <span class="timestamp">{{ item.payment_date|date:"SHORT_DATE_FORMAT" }}</span></div>
{% endif %}
{% with no_online_payment_reason_details=item.no_online_payment_reason_details %}
{% if no_online_payment_reason_details %}
<div class="no-online-payment-reason"><span>{{ no_online_payment_reason_details }}</span></div>
{% endif %}
{% endwith %}
{% if item.online_payment and item.amount >= regie.payment_min_amount %}
{% csrf_token %}
<input type="hidden" name="regie" value="{{ regie.pk }}" />

View File

@ -16,7 +16,7 @@
</thead>
<tbody>
{% for item in items %}
<tr{% if item.no_online_payment_reason %} class='{{ item.no_online_payment_reason }}-invoice'{% endif %}>
<tr>
<td class="invoice-id">{{ item.display_id }}</td>
<td class="invoice-subject">{{ item.subject }}</td>
<td class="invoice-creation-date">{{ item.creation_date|date:"SHORT_DATE_FORMAT" }}</td>

View File

@ -242,11 +242,6 @@ MELLON_USERNAME_TEMPLATE = '{attributes[name_id_content]}'
MELLON_IDENTITY_PROVIDERS = []
# mapping of payment modes
LINGO_NO_ONLINE_PAYMENT_REASONS = {'litigation': _('This is a litigation invoice, thus not payable online'),
'autobilling': _('This is an autobilling invoice, thus not payable online')}
local_settings_file = os.environ.get('COMBO_SETTINGS_FILE',
os.path.join(os.path.dirname(__file__), 'local_settings.py'))
if os.path.exists(local_settings_file):