From 1223ed85e6c937301ac26fb09c0a50d88bb30fc3 Mon Sep 17 00:00:00 2001
From: Marc Aymerich
Please select a "
"payment source for the selected bills"
msgstr ""
-#: actions.py:103
+#: actions.py:107
msgid "Close"
msgstr ""
-#: actions.py:114
+#: actions.py:125
+msgid "One bill has been sent."
+msgstr ""
+
+#: actions.py:126
+#, python-format
+msgid "%i bills have been sent."
+msgstr ""
+
+#: actions.py:128
msgid "Resend"
msgstr ""
-#: actions.py:174
+#: actions.py:189
#, python-format
msgid "%(norders)s orders and %(nlines)s lines undoed."
msgstr ""
-#: actions.py:187
-msgid "Can not move lines from a closed bill."
-msgstr ""
-
-#: actions.py:192
-msgid "Can not move lines from different accounts"
-msgstr ""
-
-#: actions.py:201
-msgid "Target account different than lines account."
-msgstr ""
-
#: actions.py:208
msgid "Lines moved"
msgstr ""
-#: admin.py:48 admin.py:92 admin.py:121 forms.py:11
+#: admin.py:49 admin.py:93 admin.py:128 forms.py:11
msgid "Total"
msgstr ""
-#: admin.py:79
+#: admin.py:80
msgid "Description"
msgstr "DescripciĆ³"
-#: admin.py:87
+#: admin.py:88
msgid "Subtotal"
msgstr ""
-#: admin.py:116
+#: admin.py:118
+msgid "Is open"
+msgstr ""
+
+#: admin.py:123
msgid "Subline"
msgstr ""
-#: admin.py:153
+#: admin.py:157
+msgid "No bills selected."
+msgstr ""
+
+#: admin.py:164
#, python-format
msgid "Manage %s bill lines."
msgstr ""
-#: admin.py:155
+#: admin.py:166
+msgid "Bill not in open state."
+msgstr ""
+
+#: admin.py:169
+msgid "Not all bills are in open state."
+msgstr ""
+
+#: admin.py:170
msgid "Manage bill lines of multiple bills."
msgstr ""
-#: admin.py:175
+#: admin.py:190
msgid "Raw"
msgstr ""
-#: admin.py:196
+#: admin.py:208
+msgid "Created"
+msgstr ""
+
+#: admin.py:213
msgid "lines"
msgstr ""
-#: admin.py:201 templates/bills/microspective.html:118
+#: admin.py:218 templates/bills/microspective.html:118
msgid "total"
msgstr ""
-#: admin.py:209 models.py:88 models.py:340
+#: admin.py:226 models.py:88 models.py:352
msgid "type"
msgstr "tipus"
-#: admin.py:226
+#: admin.py:243
msgid "Payment"
msgstr "Pagament"
@@ -290,82 +307,78 @@ msgstr "comentaris"
msgid "HTML"
msgstr ""
-#: models.py:280
+#: models.py:285
msgid "bill"
msgstr ""
-#: models.py:281 models.py:338 templates/bills/microspective.html:73
+#: models.py:286 models.py:350 templates/bills/microspective.html:73
msgid "description"
msgstr "descripciĆ³"
-#: models.py:282
+#: models.py:287
msgid "rate"
msgstr "tarifa"
-#: models.py:283
+#: models.py:288
msgid "quantity"
msgstr "quantitat"
-#: models.py:284
+#: models.py:289
#, fuzzy
#| msgid "quantity"
msgid "Verbose quantity"
msgstr "quantitat"
-#: models.py:285 templates/bills/microspective.html:77
+#: models.py:290 templates/bills/microspective.html:77
#: templates/bills/microspective.html:111
msgid "subtotal"
msgstr ""
-#: models.py:286
+#: models.py:291
msgid "tax"
msgstr "impostos"
-#: models.py:287
+#: models.py:292
msgid "start"
msgstr ""
-#: models.py:288
+#: models.py:293
msgid "end"
msgstr ""
-#: models.py:290
+#: models.py:295
msgid "Informative link back to the order"
msgstr ""
-#: models.py:291
+#: models.py:296
msgid "order billed"
msgstr ""
-#: models.py:292
+#: models.py:297
msgid "order billed until"
msgstr ""
-#: models.py:293
+#: models.py:298
msgid "created"
msgstr ""
-#: models.py:295
+#: models.py:300
msgid "amended line"
msgstr ""
-#: models.py:316
-msgid "{ini} to {end}"
-msgstr ""
-
-#: models.py:331
+#: models.py:343
msgid "Volume"
msgstr ""
-#: models.py:332
+#: models.py:344
msgid "Compensation"
msgstr ""
-#: models.py:333
+#: models.py:345
msgid "Other"
msgstr ""
-#: models.py:337
+#: models.py:349
msgid "bill line"
msgstr ""
@@ -378,20 +391,15 @@ msgstr ""
msgid "On %(bank_account)s"
msgstr ""
-#: templates/bills/microspective-fee.html:113
+#: templates/bills/microspective-fee.html:114
#, python-format
-msgid "From %(period)s"
+msgid "From %(ini)s to %(end)s"
msgstr ""
-#: templates/bills/microspective-fee.html:118
+#: templates/bills/microspective-fee.html:121
msgid ""
"\n"
-"Con vuestras cuotas, ademas de obtener conexion y multitud "
-"de servicios, estais
\n"
-" Con vuestras cuotas, ademas de obtener conexion y multitud de servicios,"
-"
\n"
-" Con vuestras cuotas, ademas de obtener conexion
\n"
-" Con vuestras cuotas, ademas de obtener
\n"
+"With your membership you are supporting ...\n"
msgstr ""
#: templates/bills/microspective.html:49
@@ -403,8 +411,9 @@ msgid "TOTAL"
msgstr "TOTAL"
#: templates/bills/microspective.html:57
-#, python-format
-msgid "%(bill_type|upper)s DATE "
+#, fuzzy, python-format
+#| msgid "%(bill_type|upper)s DATE "
+msgid "%(bill_type)s DATE"
msgstr "DATA %(bill_type|upper)s"
#: templates/bills/microspective.html:74
@@ -437,10 +446,18 @@ msgid "PAYMENT"
msgstr "PAGAMENT"
#: templates/bills/microspective.html:140
-#, python-format
+#, fuzzy, python-format
+#| msgid ""
+#| "\n"
+#| " You can pay our %(type)s by bank transfer. "
+#| "
\n"
+#| " Please make sure to state your name and the "
+#| "%(type)s number.\n"
+#| " Our bank account number is
\n"
+#| " "
msgid ""
"\n"
-" You can pay our %(type)s by bank transfer.
\n"
+" You can pay our %(type)s by bank transfer.
\n"
" Please make sure to state your name and the %(type)s"
"i> number.\n"
" Our bank account number is
\n"
@@ -459,8 +476,8 @@ msgstr "PREGUNTES"
msgid ""
"\n"
" If you have any question about your %(type)s, please\n"
-" feel free to contact us at your convinience. We will reply as "
-"soon as we get\n"
+" feel free to write us at %(email)s. We will reply as soon as we "
+"get\n"
" your message.\n"
" "
msgstr ""
diff --git a/orchestra/contrib/bills/locale/es/LC_MESSAGES/django.po b/orchestra/contrib/bills/locale/es/LC_MESSAGES/django.po
new file mode 100644
index 00000000..962304c8
--- /dev/null
+++ b/orchestra/contrib/bills/locale/es/LC_MESSAGES/django.po
@@ -0,0 +1,469 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR
Please select a "
+"payment source for the selected bills"
+msgstr ""
+
+#: actions.py:107
+msgid "Close"
+msgstr ""
+
+#: actions.py:125
+msgid "One bill has been sent."
+msgstr ""
+
+#: actions.py:126
+#, python-format
+msgid "%i bills have been sent."
+msgstr ""
+
+#: actions.py:128
+msgid "Resend"
+msgstr ""
+
+#: actions.py:189
+#, python-format
+msgid "%(norders)s orders and %(nlines)s lines undoed."
+msgstr ""
+
+#: actions.py:208
+msgid "Lines moved"
+msgstr ""
+
+#: admin.py:49 admin.py:93 admin.py:128 forms.py:11
+msgid "Total"
+msgstr ""
+
+#: admin.py:80
+msgid "Description"
+msgstr ""
+
+#: admin.py:88
+msgid "Subtotal"
+msgstr ""
+
+#: admin.py:118
+msgid "Is open"
+msgstr ""
+
+#: admin.py:123
+msgid "Subline"
+msgstr ""
+
+#: admin.py:157
+msgid "No bills selected."
+msgstr ""
+
+#: admin.py:164
+#, python-format
+msgid "Manage %s bill lines."
+msgstr ""
+
+#: admin.py:166
+msgid "Bill not in open state."
+msgstr ""
+
+#: admin.py:169
+msgid "Not all bills are in open state."
+msgstr ""
+
+#: admin.py:170
+msgid "Manage bill lines of multiple bills."
+msgstr ""
+
+#: admin.py:190
+msgid "Raw"
+msgstr ""
+
+#: admin.py:208
+msgid "Created"
+msgstr ""
+
+#: admin.py:213
+msgid "lines"
+msgstr ""
+
+#: admin.py:218 templates/bills/microspective.html:118
+msgid "total"
+msgstr ""
+
+#: admin.py:226 models.py:88 models.py:352
+msgid "type"
+msgstr ""
+
+#: admin.py:243
+msgid "Payment"
+msgstr ""
+
+#: filters.py:17
+msgid "All"
+msgstr ""
+
+#: filters.py:18 models.py:78
+msgid "Invoice"
+msgstr ""
+
+#: filters.py:19 models.py:79
+msgid "Amendment invoice"
+msgstr ""
+
+#: filters.py:20 models.py:80
+msgid "Fee"
+msgstr ""
+
+#: filters.py:21
+msgid "Amendment fee"
+msgstr ""
+
+#: filters.py:22
+msgid "Pro-forma"
+msgstr ""
+
+#: filters.py:41
+msgid "positive price"
+msgstr ""
+
+#: filters.py:46 filters.py:64
+msgid "Yes"
+msgstr ""
+
+#: filters.py:47 filters.py:65
+msgid "No"
+msgstr ""
+
+#: filters.py:59
+msgid "has bill contact"
+msgstr ""
+
+#: forms.py:9
+msgid "Number"
+msgstr ""
+
+#: forms.py:10
+msgid "Account"
+msgstr ""
+
+#: forms.py:12
+msgid "Type"
+msgstr ""
+
+#: forms.py:13
+msgid "Source"
+msgstr ""
+
+#: helpers.py:10
+msgid ""
+"{relation} account \"{account}\" does not have a declared invoice contact. "
+"You should provide one"
+msgstr ""
+
+#: helpers.py:17
+msgid "Related"
+msgstr ""
+
+#: helpers.py:24
+msgid "Main"
+msgstr ""
+
+#: models.py:23 models.py:86
+msgid "account"
+msgstr ""
+
+#: models.py:25
+msgid "name"
+msgstr ""
+
+#: models.py:26
+msgid "Account full name will be used when left blank."
+msgstr ""
+
+#: models.py:27
+msgid "address"
+msgstr ""
+
+#: models.py:28
+msgid "city"
+msgstr ""
+
+#: models.py:30
+msgid "zip code"
+msgstr ""
+
+#: models.py:31
+msgid "Enter a valid zipcode."
+msgstr ""
+
+#: models.py:32
+msgid "country"
+msgstr ""
+
+#: models.py:35
+msgid "VAT number"
+msgstr ""
+
+#: models.py:67
+msgid "Paid"
+msgstr ""
+
+#: models.py:68
+msgid "Pending"
+msgstr ""
+
+#: models.py:69
+msgid "Bad debt"
+msgstr ""
+
+#: models.py:81
+msgid "Amendment Fee"
+msgstr ""
+
+#: models.py:82
+msgid "Pro forma"
+msgstr ""
+
+#: models.py:85
+msgid "number"
+msgstr ""
+
+#: models.py:89
+msgid "created on"
+msgstr ""
+
+#: models.py:90
+msgid "closed on"
+msgstr ""
+
+#: models.py:91
+msgid "open"
+msgstr ""
+
+#: models.py:92
+msgid "sent"
+msgstr ""
+
+#: models.py:93
+msgid "due on"
+msgstr ""
+
+#: models.py:94
+msgid "updated on"
+msgstr ""
+
+#: models.py:97
+msgid "comments"
+msgstr ""
+
+#: models.py:98
+msgid "HTML"
+msgstr ""
+
+#: models.py:285
+msgid "bill"
+msgstr ""
+
+#: models.py:286 models.py:350 templates/bills/microspective.html:73
+msgid "description"
+msgstr ""
+
+#: models.py:287
+msgid "rate"
+msgstr ""
+
+#: models.py:288
+msgid "quantity"
+msgstr ""
+
+#: models.py:289
+msgid "Verbose quantity"
+msgstr ""
+
+#: models.py:290 templates/bills/microspective.html:77
+#: templates/bills/microspective.html:111
+msgid "subtotal"
+msgstr ""
+
+#: models.py:291
+msgid "tax"
+msgstr ""
+
+#: models.py:292
+msgid "start"
+msgstr ""
+
+#: models.py:293
+msgid "end"
+msgstr ""
+
+#: models.py:295
+msgid "Informative link back to the order"
+msgstr ""
+
+#: models.py:296
+msgid "order billed"
+msgstr ""
+
+#: models.py:297
+msgid "order billed until"
+msgstr ""
+
+#: models.py:298
+msgid "created"
+msgstr ""
+
+#: models.py:300
+msgid "amended line"
+msgstr ""
+
+#: models.py:343
+msgid "Volume"
+msgstr ""
+
+#: models.py:344
+msgid "Compensation"
+msgstr ""
+
+#: models.py:345
+msgid "Other"
+msgstr ""
+
+#: models.py:349
+msgid "bill line"
+msgstr ""
+
+#: templates/bills/microspective-fee.html:107
+msgid "Due date"
+msgstr ""
+
+#: templates/bills/microspective-fee.html:108
+#, python-format
+msgid "On %(bank_account)s"
+msgstr ""
+
+#: templates/bills/microspective-fee.html:114
+#, python-format
+msgid "From %(ini)s to %(end)s"
+msgstr ""
+
+#: templates/bills/microspective-fee.html:121
+msgid ""
+"\n"
+"With your membership you are supporting ...\n"
+msgstr ""
+
+#: templates/bills/microspective.html:49
+msgid "DUE DATE"
+msgstr ""
+
+#: templates/bills/microspective.html:53
+msgid "TOTAL"
+msgstr ""
+
+#: templates/bills/microspective.html:57
+#, python-format
+msgid "%(bill_type)s DATE"
+msgstr ""
+
+#: templates/bills/microspective.html:74
+msgid "period"
+msgstr ""
+
+#: templates/bills/microspective.html:75
+msgid "hrs/qty"
+msgstr ""
+
+#: templates/bills/microspective.html:76
+msgid "rate/price"
+msgstr ""
+
+#: templates/bills/microspective.html:111
+#: templates/bills/microspective.html:114
+msgid "VAT"
+msgstr ""
+
+#: templates/bills/microspective.html:114
+msgid "taxes"
+msgstr ""
+
+#: templates/bills/microspective.html:130
+msgid "COMMENTS"
+msgstr ""
+
+#: templates/bills/microspective.html:136
+msgid "PAYMENT"
+msgstr ""
+
+#: templates/bills/microspective.html:140
+#, python-format
+msgid ""
+"\n"
+" You can pay our %(type)s by bank transfer.
\n"
+" Please make sure to state your name and the %(type)s"
+"i> number.\n"
+" Our bank account number is
\n"
+" "
+msgstr ""
+
+#: templates/bills/microspective.html:149
+msgid "QUESTIONS"
+msgstr ""
+
+#: templates/bills/microspective.html:150
+#, python-format
+msgid ""
+"\n"
+" If you have any question about your %(type)s, please\n"
+" feel free to write us at %(email)s. We will reply as soon as we "
+"get\n"
+" your message.\n"
+" "
+msgstr ""
diff --git a/orchestra/contrib/bills/models.py b/orchestra/contrib/bills/models.py
index 4cec7a24..8ad88c96 100644
--- a/orchestra/contrib/bills/models.py
+++ b/orchestra/contrib/bills/models.py
@@ -124,6 +124,10 @@ class Bill(models.Model):
return self.PENDING
return self.BAD_DEBT
+ @property
+ def has_multiple_pages(self):
+ return self.type != self.FEE
+
def get_payment_state_display(self):
value = self.payment_state
return force_text(dict(self.PAYMENT_STATES).get(value, value))
@@ -186,6 +190,7 @@ class Bill(models.Model):
def send(self):
html = self.html or self.render()
+ pdf = html_to_pdf(html, pagination=self.has_multiple_pages)
self.account.send_email(
template=settings.BILLS_EMAIL_NOTIFICATION_TEMPLATE,
context={
@@ -195,7 +200,7 @@ class Bill(models.Model):
email_from=settings.BILLS_SELLER_EMAIL,
contacts=(Contact.BILLING,),
attachments=[
- ('%s.pdf' % self.number, html_to_pdf(html), 'application/pdf')
+ ('%s.pdf' % self.number, pdf, 'application/pdf')
]
)
self.is_sent = True
@@ -312,12 +317,10 @@ class BillLine(models.Model):
if self.start_on.day != 1 or self.end_on.day != 1:
date_format = "N j, 'y"
end = date(self.end_on, date_format)
-# .strftime(date_format)
else:
end = date((self.end_on - datetime.timedelta(days=1)), date_format)
-# ).strftime(date_format)
- ini = date(self.start_on, date_format)
- #.strftime(date_format)
+ ini = date(self.start_on, date_format).capitalize()
+ end = end.capitalize()
if not self.end_on:
return ini
if ini == end:
diff --git a/orchestra/contrib/bills/templates/bills/microspective-fee.html b/orchestra/contrib/bills/templates/bills/microspective-fee.html
index a6449d33..5825feec 100644
--- a/orchestra/contrib/bills/templates/bills/microspective-fee.html
+++ b/orchestra/contrib/bills/templates/bills/microspective-fee.html
@@ -99,30 +99,31 @@ hr {
{{ bill.number }}
- {{ bill.closed_on | default:now | date | capfirst }}
+ {{ bill.closed_on | default:now | date:"F j, Y" | capfirst }}
- {% trans "Due date" %} {{ payment.due_date| default:default_due_date | date }}
+ {% trans "Due date" %} {{ payment.due_date| default:default_due_date | date:"F j, Y" }}
{% if not payment.message %}{% blocktrans with bank_account=seller_info.bank_account %}On {{ bank_account }}{% endblocktrans %}{% endif %}
- Con vuestras cuotas, ademas de obtener conexion y multitud de servicios,
- Con vuestras cuotas, ademas de obtener conexion
- Con vuestras cuotas, ademas de obtener
+With your membership you are supporting ...
{% endblocktrans %}
{{ block.super }}
diff --git a/orchestra/contrib/bills/templates/bills/microspective.css b/orchestra/contrib/bills/templates/bills/microspective.css
index b9c3205f..d2e8f4dd 100644
--- a/orchestra/contrib/bills/templates/bills/microspective.css
+++ b/orchestra/contrib/bills/templates/bills/microspective.css
@@ -175,12 +175,12 @@ a:hover {
}
#lines .column-description {
- width: 42%;
+ width: 40%;
text-align: left;
}
#lines .column-period {
- width: 20%;
+ width: 22%;
}
#lines .column-quantity {
diff --git a/orchestra/contrib/bills/templates/bills/microspective.html b/orchestra/contrib/bills/templates/bills/microspective.html
index 753b1cc2..1b2e7162 100644
--- a/orchestra/contrib/bills/templates/bills/microspective.html
+++ b/orchestra/contrib/bills/templates/bills/microspective.html
@@ -47,15 +47,15 @@
-
-
+
{% for line in lines %}
- {% with sublines=line.sublines.all description=line.description|slice:"40:" %}
+ {% with sublines=line.sublines.all description=line.description|slice:"38:" %}
{% if not line.order_id %}L{% endif %}{{ line.order_id }}
- {{ line.description|slice:":40" }}
+ {{ line.description|slice:":38" }}
{{ line.get_verbose_period }}
{{ line.get_verbose_quantity|default:" "|safe }}
{% if line.rate %}{{ line.rate }} &{{ currency.lower }};{% else %} {% endif %}
@@ -87,7 +87,7 @@
{% if description %}
- {{ description|truncatechars:41 }}
+ {{ description|truncatechars:39 }}
@@ -95,7 +95,7 @@
{% endif %}
{% for subline in sublines %}
- {{ subline.description|truncatechars:41 }}
+ {{ subline.description|truncatechars:39 }}
@@ -138,7 +138,7 @@
{{ payment.message | safe }}
{% else %}
{% blocktrans with type=bill.get_type_display.lower %}
- You can pay our {{ type }} by bank transfer.
+ You can pay our {{ type }} by bank transfer.
Please make sure to state your name and the {{ type }} number.
Our bank account number is
{% endblocktrans %}
@@ -147,9 +147,9 @@