Commit cb27a7e7 authored by Patrick's avatar Patrick
Browse files

Restore target="_blank"

parent c5afbced
......@@ -169,15 +169,15 @@ class Customer(models.Model):
if last_customer_invoice.exists():
if balance.amount >= 30:
return '<a href="' + urlresolvers.reverse('customer_invoice_view', args=(0,)) + '?customer=' + str(
self.id) + '" >' + (
self.id) + '" target="_blank" >' + (
'<span style="color:#32CD32">%s</span>' % (balance,)) + '</a>'
elif balance.amount >= -10:
return '<a href="' + urlresolvers.reverse('customer_invoice_view', args=(0,)) + '?customer=' + str(
self.id) + '" >' + (
self.id) + '" target="_blank" >' + (
'<span style="color:#696969">%s</span>' % (balance,)) + '</a>'
else:
return '<a href="' + urlresolvers.reverse('customer_invoice_view', args=(0,)) + '?customer=' + str(
self.id) + '" >' + (
self.id) + '" target="_blank" >' + (
'<span style="color:#FF0000">%s</span>' % (balance,)) + '</a>'
else:
if balance.amount >= 30:
......
......@@ -233,19 +233,19 @@ class Producer(models.Model):
if last_producer_invoice_set.exists():
if balance.amount < 0:
return '<a href="' + urlresolvers.reverse('producer_invoice_view', args=(0,)) + '?producer=' + str(
self.id) + '" >' + (
self.id) + '" target="_blank" >' + (
'<span style="color:#298A08">%s</span>' % (balance,)) + '</a>'
elif balance.amount == 0:
return '<a href="' + urlresolvers.reverse('producer_invoice_view', args=(0,)) + '?producer=' + str(
self.id) + '" >' + (
self.id) + '" target="_blank" >' + (
'<span style="color:#32CD32">%s</span>' % (balance,)) + '</a>'
elif balance.amount > 30:
return '<a href="' + urlresolvers.reverse('producer_invoice_view', args=(0,)) + '?producer=' + str(
self.id) + '" >' + (
self.id) + '" target="_blank" >' + (
'<span style="color:#FF0000">%s</span>' % (balance,)) + '</a>'
else:
return '<a href="' + urlresolvers.reverse('producer_invoice_view', args=(0,)) + '?producer=' + str(
self.id) + '" >' + (
self.id) + '" target="_blank" >' + (
'<span style="color:#696969">%s</span>' % (balance,)) + '</a>'
else:
if balance.amount < 0:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment