Reply
Highlighted
Ubiquiti Employee
Posts: 3,810
Registered: ‎12-10-2015
Kudos: 1345
Solutions: 295

Re: ARGENTINA | AFIP - INVOICES

Hi @jorgepompe UCRM is ready for AFIP integration. As far as I know, @DiegoMax is already using custom scripts to generate AFIP codes.
Now, it is possible to push these codes into UCRM invoices thanks to features like custom invoice attributes, UCRM plugins, and webhooks.

We will be happy to help with developing such a plugin for this.
New Member
Posts: 2
Registered: ‎08-27-2016

Re: ARGENTINA | AFIP - INVOICES

[ Edited ]

@DiegoMax soy Adrian de un ISP de Argentina queria conversar contigo respecto de lo que has estado probando de poder facturar desde el UCRM ..... Saludos

Member
Posts: 153
Registered: ‎04-11-2017
Kudos: 26
Solutions: 4

Re: ARGENTINA | AFIP - INVOICES

Me sumo al pedido.. 

New Member
Posts: 2
Registered: ‎02-23-2018

Re: ARGENTINA | AFIP - INVOICES

Is there a procedure to implement this? At least to add a barcode...

Emerging Member
Posts: 118
Registered: ‎01-19-2015
Kudos: 90
Solutions: 1

Re: ARGENTINA | AFIP - INVOICES

Hi @UBNT-Petr, although I continue working on my Mikrotik-Queue-Sync plug-in, I'm just wondering to start a new plug-in with this Argentinan invoice requirements. 

 

In this way I'm thinking in the new proforma invoice of the 2.15 and to use a PHP class which needs some info from the proforma.

 

So, at the beginning of the month UCRM send's Proforma to all customers, and when the proforma get paid, then the plug-in is called.

At this point, plug-in takes some info from the proforma and customer, send it to Argentina AFIP web services, and receives back, autorizhed invoice number, CAE code, etc. (user @DiegoMax did a very good description at the beginning of this post).

 

The idea is, if it is possible, to load this received data into the paid invoice. So when printing it with a custom invoice template, we can get all the Argentinian Requisites for a legal invoice.

 

At this point, I've the idea, the AFIP request class, and some time. But I'll need some help with an orientation and maybe some PHP coding.

I know it's an idea to use webhooks (I don't have any idea of what it is or how to use it). Also some custom attributes

 

Please orientate me, and give me any better idea or approximation, so I can start to work in the right way.

 

Thanks in advance and happy New year Man Happy

Kind regards 

New Member
Posts: 2
Registered: ‎02-23-2018

Re: ARGENTINA | AFIP - INVOICES

Hi, I think that the order is incorrect. As far as i know, you should send the invoices with an expiration date (that date is mandatory by AFIP).

 

The right order (as far as i know):

1) Get all the invoice internal information required to generate the invoice form AFIP (DNI/CUIT/CUIL, amount, expiration date, etc?)

2) Post that data into the "connector" with AFIP WebService to generate the CAE. Its the electronic authorization to print the invoice.

3) Save the CAE associated with that customer

4) Generate the UCRM invoice and include the CAE previously saved.

5) Send to the customer or print it.

 

The proforma which you want to send to the customers on the first step (without the CAE) its not valid as an invoice in Argentina. It must have the CAE to be a valid invoice.

 

I have some basic coding skills but maybe I can help you to understand the process.

 

Have a Happy New Year you too!

Emerging Member
Posts: 118
Registered: ‎01-19-2015
Kudos: 90
Solutions: 1

Re: ARGENTINA | AFIP - INVOICES

Hi @Moyanitos, maybe I miss explained in my previous post. But my idea is the same as yours.

The first proforma sent at the beginning of the month is not valid as an invoice, in fact in Argentina is normally used as a "payment notice" with the legend "not valid as invoice" at the top of the invoice, or normally you can hear it as quotation or "Presupuesto" in spanish, the proforma it's nearly the same.

Until here you don't need as mandatory the expiration date.

 

Once the "payment notice / proforma invoice" get paid, then UCRM starts the process at your 1) step.

Ucrm takes customer data, amount, etc from proforma, invoice date and expiration datce could be any you want at that time. (Maybe the paiment day as invoice date and same date for expiration because it will be an already paid invoice).

 

In this way you save to send real invoices to all customers which sometimes doesn't get paid for any reason. Or the amount get changed.

Remember once you made a real invoice in Argentina you have to pay taxes for it, no matters if customer has paid the invoice or not.

That's why I'm looking to create a real invoice type A,B or C depending on the case, only when the proforma get paid.

 

I ave some basic skills too, that's why I'm asking @UBNT-Petr for some advices to start in the right way.

 

Any other help is also welcome at anytime Man Happy

Ubiquiti Employee
Posts: 3,810
Registered: ‎12-10-2015
Kudos: 1345
Solutions: 295

Re: ARGENTINA | AFIP - INVOICES

@fgampel I think you are heading the right direction. Let me give you a few more hints.

 

Proforma invoices

They are useful exactly for this case you described (to avoid paying taxes from unpaid invoices). Using proformas you ensure that all existing invoices in your system are paid always. 

Of course, you can customize the look, headers, etc. of the proforma pdf and proforma email notification. Feel free to call it "payment notice"

 

Paid invoices (automatically created when proforma gets paid)

When an invoice is created based on a paid proforma, the invoice adopts all the invoicing items, you can be sure the invoice amounts are the same.

 

Custom attributes

These are useful if you need to show some specific codes, numbers, texts, etc on the invoice (or proforma). The attribute's value can be set either manually or automatically by an API script or Plugin. In your case, you probably want to set the AFIP code on the invoice. Make sure you also put the attribute to the invoice template.

 

Webhooks

Webhooks can be used to trigger the script/plugin's execution at a specific moment (e.g. a new invoice is created in the system -> this can trigger the plugin which

1) generates a new AFIP code (check the API of the Argentinian AFIP service)  

2) add the code to the invoice's custom attribute (check the UCRM API: https://ucrm.docs.apiary.io/#reference/invoices/invoicesid/patch )

3) regenerate invoice PDF, (and other actions you may need, e.g. send the invoice to client) https://ucrm.docs.apiary.io/#reference/invoices/invoicesidregenerate-pdf/patch

 

Note that webhooks are not mandatory for your needs. You can avoid them by just setting a periodic plugin's execution (e.g. every 5 mins. the plugin can check for newly created invoices not yet having the afip code, generates the code, update these invoices and so on)

 

Hope this made things a little bit more clear and you know what are the possibilities of UCRM API and what the process should be.

 

Let me know if you got more questions.

Emerging Member
Posts: 118
Registered: ‎01-19-2015
Kudos: 90
Solutions: 1

Re: ARGENTINA | AFIP - INVOICES

Great, thanks for your advice @UBNT-Petr I'll start to coding in this days. One last thing, could you please give me an example of how to use webhook.

In my idea I want to do exactly what you said. When an invoice get paid && custom attribute "need AFIP?" Is set to 1, then the script/plug-in should be executed.

 

Have a nice day Man Wink

Ubiquiti Employee
Posts: 3,810
Registered: ‎12-10-2015
Kudos: 1345
Solutions: 295

Re: ARGENTINA | AFIP - INVOICES

Ok, that's great @fgampel

I suggest you start with the basic API scripting - to read/modify invoices. Then you can modify the api script into a new UCRM Plugin. And finally, you can use the plugin as the webhook's endpoint - there is a button for this in the plugin's configuration page - (so the plugin will listen to the webhook's http request which contains info about the new invoice created)

read more about webhooks: https://ucrm-demo.ubnt.com/help/webhooks
Emerging Member
Posts: 118
Registered: ‎01-19-2015
Kudos: 90
Solutions: 1

Re: ARGENTINA | AFIP - INVOICES

Hi @UBNT-Petr, I'm just designing the code, and looking into 2.15-beta2 api responses.

I could not find the "useProforma" settings when I get a client request, for example https://ucrm-demo.ubnt.com/api/v1.0/clients/88 

At UCRM this option is present at the customer edit page. Can I count with this in API for my code? Just a Boolean with true/false in API...

It'll be usefull to the plug-in to identify the way of work. Because some customers doesn't want the proforma, they just want the final invoice.

Meanwhile I'll use a custom attribute for my code.

 

Thanks.

Kind regards Man Wink

Ubiquiti Employee
Posts: 3,810
Registered: ‎12-10-2015
Kudos: 1345
Solutions: 295

Re: ARGENTINA | AFIP - INVOICES

@fgampel yes, this will be added to the API.

Please, if you are working on the Plugin, I suggest you create some minimum viable version first - you can then push it to github and we or the community can review it and/or help you with further extensions.

IMO, the basics are to implement the AFIP code generation and placing it into the invoice. (Handling Proformas is something which is not necessary for this use case. On the contrary, I think the AFIP codes are important only for the real invoices, and it's irrelevant whether a new invoice is or isn't based on proforma.) Just my 2 cents... but the smaller the plugin is the better support and help from us/community is ensured.
Emerging Member
Posts: 118
Registered: ‎01-19-2015
Kudos: 90
Solutions: 1

Re: ARGENTINA | AFIP - INVOICES

Hi @UBNT-Petr yes, i understad completly. i'm going to do it as simple as posible, my questions are all for some "options" i want to have if i need it.

 

In other hand now i have a new problem, while trying to contact to Argentina AFIP services, we need to handle "Certificates" this is not a problem to upload the certificates due the new manifiest upload file option.

But to handle it and to handle de communication to AFIP webservices we need to have openssl and SOAP active on our php install.

As i made a basic test with var_dump(class_exists("SOAPClient")); var_dump(class_exists("openssl")); in both i get bool(false) it means the extensions are disabled, is there a way to enable it for UCRM?

 

Thanks in advance

Ubiquiti Employee
Posts: 1,321
Registered: ‎03-21-2016
Kudos: 214
Solutions: 150

Re: ARGENTINA | AFIP - INVOICES

Hello @fgampel, as for the openssl, there is no such class in PHP, so it would always be false. The openssl function are actually available though (http://php.net/manual/en/book.openssl.php).

 

The SOAP extension will be added in today's beta release.

Emerging Member
Posts: 118
Registered: ‎01-19-2015
Kudos: 90
Solutions: 1

Re: ARGENTINA | AFIP - INVOICES

Great @UBNT-Ondra, i'll wait for today's beta release then!

Thanks for your help.

Ubiquiti Employee
Posts: 3,810
Registered: ‎12-10-2015
Kudos: 1345
Solutions: 295

Re: ARGENTINA | AFIP - INVOICES

@fgampel the SOAP extension has been added, you can try 2.15.0-beta3
Emerging Member
Posts: 118
Registered: ‎01-19-2015
Kudos: 90
Solutions: 1

Re: ARGENTINA | AFIP - INVOICES

Hi @UBNT-Petr, yes I saw it. Thanks! I've a beta of my plug-in already working.

Hope to release my first version in this days.

 

Thanks for your help Man Wink

 

Kind regards

Emerging Member
Posts: 118
Registered: ‎01-19-2015
Kudos: 90
Solutions: 1

Re: ARGENTINA | AFIP - INVOICES

Hi @UBNT-Petr , @UBNT-Ondra, i've my plugin already working and communicating with Argentina AFIP servers.

a just need a little help for the final steps.

 

i've same values as "CAE, Invoice Number, etc" i need to patch into my invoce as custom attributes.

i've already created custom attribute in UCRM named caeNumber, also afipInvoiceNumber. and my variable in php which contains the CAE number is in $result['caeNumber'] and AFIP invoice number $result['afipInvoiceNumber'] .

 

Now i need to patch it but i can't find the right way to send the PATCH command for attributes.

I tried this way with no success:

note that $invoice['id'] is the invoice number to patch

 

$api->patch('invoices/' . $invoice['id'] , [
'attributes' => [caeNumber],
'value' => $result['caeNumber']
] ) ;

 

.......

 

Also i want to know if by api i can change the Inovice Template, so in official AFIP invoices which are already procesed i assign the template "Proccessed invoice".

 

-------

 

and the last one, can you remember to me the API command to regenerate the invoice PDF??

 

 

Thanks in advance.

Kind Regards

 

 

Ubiquiti Employee
Posts: 1,321
Registered: ‎03-21-2016
Kudos: 214
Solutions: 150

Re: ARGENTINA | AFIP - INVOICES

Hello @fgampel,

 

- you can regenerate invoice PDF with this endpoint https://ucrmbeta.docs.apiary.io/#reference/invoices/invoicesidregenerate-pdf/patch

- you can change invoice template of invoice in PATCH with "invoiceTemplateId", but I would recommend to not do this, you should just change the invoice template already in use to have to "if" conditions for filled in AFIP custom parameters

- to detect already processed invocies for AFIP, you can also just check for the custom parameters in invoice data, we could probably also update the invoice collection endpoint with custom parameter filter, similar to the client collection endpoint if it would help you

 

Last, to update an attribute value, you can do the following:

$api->patch(
	'invoices/' . $invoice['id'],
	[
		'attributes' => [
			[
				'customAttributeId' => 1,
				'value' => 'your value',
			]
		],
	]
);

Note, that you need to get the custom attribute's ID before doing this, you can get it with the custom attribute collection endpoint https://ucrmbeta.docs.apiary.io/#reference/custom-attributes/custom-attributesattributetype/get

Emerging Member
Posts: 118
Registered: ‎01-19-2015
Kudos: 90
Solutions: 1

Re: ARGENTINA | AFIP - INVOICES

Thank's @UBNT-Ondra

 

Now my plug-in its nearly to finish... i'm just polishing details hope yo upload it as soon as possible. But i need one more help from you or for someone in this forum.

For the final invoice template you need to acomplish with some requisits as AFIP request.

One of this requisits are "a big capital letter at the center with the type of invoce and under a code related to it" this is easy to made by custom attributtes. At the bottom the most important CAE Attributes, also the invoice number should be same as AFIP returned to us.

 

New, i tried to make the template following user pabloE template in first page of this thread: https://community.ubnt.com/t5/UCRM/ARGENTINA-AFIP-INVOICES/m-p/2073284/highlight/true#M4898 but i have to confess that i'm really really really really REALLY BAD with HTML coding and CSS. so i made my best, with no success to adapt PabloE template to ucrm template and variables.

Here is my template, please if you can use it as refference togheter with PabloE template to make something better we can use with this PlugIn to have the entire solution for Argentina CAE.

 

Thanks for your time.

 

<head><title>Print Invoice</title>
<style>
*
{
margin:0;
padding:0;
font-family:Arial;
font-size:10pt;
color:#000;
}
body
{
width:100%;
font-family:Arial;
font-size:10pt;
margin:0;
padding:0;
}
p
{
margin:0;
padding:0;
}
#contentbill{
height:auto;
}
#invoice
{
width:100%;
margin:0 15mm;
}
table
{
border-left: 1px solid #ccc;
border-top: 1px solid #ccc;
border-spacing:0;
border-collapse: collapse; }
table td {
border-right: 1px solid #ccc;
border-bottom: 1px solid #ccc;
padding: 2mm;
}
table.heading
{
height:50mm;
}
h1.heading
{
font-size:14pt;
color:#000;
font-weight:normal;
}
h2.heading
{
font-size:9pt;
color:#000;
font-weight:normal;
}
hr
{
color:#ccc;
background:#ccc;
}
.header__info table {
  float: right;
  width: auto;
  min-width: 320px;
}

.header__info th {
  font-weight: bold;
  text-align: left;
  background: #f0f0f0;
}

.header__info th,
.header__info td {
  padding: 6px 10px;
  border: 1px solid #e5e5e5;
  border-top-width: 0;
  border-right-width: 0;
  vertical-align: middle;
}

.header__info td {
  text-align: right;
  border-right-width: 1px;
}

.header__info tr.first-child th,
.header__info tr.first-child td {

  border-top-width: 1px;

}
#footer
{ width:100%;
margin:0 15mm;
padding-bottom:3mm;
}
#footer table
{
width:100%;
border-left: 1px solid #ccc;
border-top: 1px solid #ccc;
background:#eee;
border-spacing:0;
border-collapse: collapse; }
#footer table td
{
width:25%;
text-align:center;
font-size:9pt;
border-right: 1px solid #ccc;
border-bottom: 1px solid #ccc;
}
.lineSmall{
border: 0;
color: #345092;
background-color: #345092;
height: 2px;
}
.lineLarge{
width: 100%;
border: 0;
color: #345092;
background-color: #345092;
height: 2px;
margin-top: 0px;
margin-bottom: 0px;
}
.lineDotted{
width: 100%;
border: 1px dashed black;
color: #345092;
height: 1px;
margin-top: 0px;
margin-bottom: 0px;
}
</style></head>
<body>
<div id="invoice">
<div id="logofactura" style="text-align: center;"></div>
<div id="tipofactura" style="text-align: center; padding-top: 5mm;"></div>
<hr class="lineLarge"><br>
<table style="width: 100%; height: 127px;" class="heading">
<tbody>
<tr>
<td style="text-align: center; height: 107px; width: 80mm;" width="50%">
{% if organization.logo %}
                        <img src="{{ organization.logo }}">
                    {% endif %}
</td>
<td style="padding: 3mm; height: 75px;" rowspan="1" colspan="1" align="center" valign="top" width="20%">
<p style="border: 1px solid grey; padding-top: 0px; padding-bottom: 0px; background-color: rgb(52, 80, 146); color: white; font-size: 42px;">B</p>
<!--<p style="border: 1px solid grey; padding-top: 0px; padding-bottom: 0px; background-color: rgb(52, 80, 146); color: white; font-size: 42px;">invoice.getAttribute('invoiceLetter')</p>-->
<br>
<p style="margin-left: 0px; width: 20%;"><small><small>Codigo Nº 06</small></small></p>
<!--<p style="margin-left: 0px; width: 20%;"><small><small>invoice.getAttribute('invoiceCode')</small></small></p>-->
</td>
<td colspan="1" rowspan="3" style="padding: 3mm; height: 75px;" align="right" valign="top" width="30%">
<div style="text-align: right;"><big><big><span style="font-weight: bold;"><big><big><big><br>
FACTURA<br><br></big></big>
</big></span></big></big></div>
                    <table>
                        <tr class="first-child">
                            <th>{% trans %}Invoice number{% endtrans %}:</th>
							<td>{{ invoice.number }}</td>
							<!--HERE I NEED TO INTRODUCE AN IF ATTRIBUTE 'invoiceNumber' ELSE INVOICE.NUMBER, SO WHEN WE HAVE ARGENTINA CAE INVOICE NUMBER WE REPLACE THE ORIGINAL UCRM INVOICE NUMBER -->
						</tr>
                        <tr>
                            <th>{% trans %}Created date{% endtrans %}:</th>
                            <td>{{ invoice.createdDate }}</td>
                        </tr>
                        <tr>
                            <th>{% trans %}Due date{% endtrans %}:</th>
                            <td>{{ invoice.dueDate }}</td>
                        </tr>
                    </table>
</td>
</tr>
<tr>
<td colspan="2" rowspan="1" style="height: 75px;"><small>
{{ organization.name }}<br>
                    {{ organization.street1 }}<br>
                    {% if organization.street2 %}{{ organization.street2 }}<br>{% endif %}
                    {{ organization.city }}{% if organization.state %} {{ organization.state }}{% endif %}&nbsp;&nbsp;{{ organization.zipCode }}<br>
                    {% if organization.country %}{{ organization.country }}<br>{% endif %}
                    <div class="header__organization__more">
                            {% if organization.registrationNumber %}
                                {% trans %}Registration number{% endtrans %}: {{ organization.registrationNumber }}<br>
                            {% endif %}
                            {% if organization.taxId %}
                                {% trans %}Tax ID{% endtrans %}: {{ organization.taxId }}<br>
                            {% endif %}
                        {% if organization.bankAccount %}
                            {% trans %}Bank account{% endtrans %}: {{ organization.bankAccount }}
                        {% endif %}
                    </div>
</td>

</tr>
<tr>
<td colspan="2" rowspan="1" style="height: 57px;"><big><b><small>Cliente Numero:</small>
{{ client.name }}<br>
                    {% if client.invoiceAddressSameAsContact %}
                        {{ client.street1 }}<br>
                        {% if client.street2 %}{{ client.street2 }}<br>{% endif %}
                        {{ client.city }}{% if client.state %} {{ client.state }}{% endif %}&nbsp;&nbsp;{{ client.zipCode }}<br>
                        {% if client.country %}{{ client.country }}<br>{% endif %}
                    {% else %}
                        {{ client.invoiceStreet1 }}<br>
                        {% if client.invoiceStreet2 %}{{ client.invoiceStreet2 }}<br>{% endif %}
                        {{ client.invoiceCity }}{% if client.invoiceState %} {{ client.invoiceState }}{% endif %}&nbsp;&nbsp;{{ client.invoiceZipCode }}<br>
                        {% if client.invoiceCountry %}{{ client.invoiceCountry }}<br>{% endif %}
                    {% endif %}
                    {% if client.companyRegistrationNumber or client.companyTaxId %}
                        <br>
                        {% if client.companyRegistrationNumber %}
                            <small>{% trans %}Registration number{% endtrans %}: {{ client.companyRegistrationNumber }}</small><br>
                        {% endif %}
                        {% if client.companyTaxId %}
                            <small>{% trans %}Tax ID{% endtrans %}: {{ client.companyTaxId }}</small>
                        {% endif %}
                    {% endif %}
</td>
</tr>
</tbody>
</table>
<div id="contentbill">
<div id="periodo" style="text-align: center;">
<div id="invoice_body">
<table class="items{% if invoice.pricesWithTax %} items--pricesWithTax{% endif %}">
        <thead>
            <tr>
                <th class="items__item__label">{% trans %}Item{% endtrans %}</th>
                {% if invoice.pricesWithTax %}
                    <th class="items__item__price">{% trans %}Price{% endtrans %}</th>
                    <th class="items__item__quantity">{% trans %}Quantity{% endtrans %}</th>
                    <th class="items__item__untaxed">{% trans %}Untaxed{% endtrans %}</th>
                    <th class="items__item__tax_rate">{% trans %}Tax rate{% endtrans %}</th>
                    <th class="items__item__tax">{% trans %}Tax{% endtrans %}</th>
                {% else %}
                    <th class="items__item__price">{% trans %}Price{% endtrans %}</th>
                    <th class="items__item__quantity">{% trans %}Quantity{% endtrans %}</th>
                {% endif %}
                <th class="items__item__total last-child">{% trans %}Total{% endtrans %}</th>
            </tr>
        </thead>

        {% for item in items %}
            <tbody>
                <tr class="items__item items__item--{{ item.type }}">
                    <td class="items__item__label"><span>{{ item.label }}</span></td>
                    {% if invoice.pricesWithTax %}
                        <td class="items__item__price">{{ item.priceUntaxed }}</td>
                        <td class="items__item__quantity">{{ item.quantity }}</td>
                        <td class="items__item__untaxed">{{ item.totalUntaxed }}</td>
                        <td class="items__item__tax_rate">{{ item.taxRate }}</td>
                        <td class="items__item__tax">{{ item.taxAmount }}</td>
                    {% else %}
                        <td class="items__item__price">{{ item.price }}</td>
                        <td class="items__item__quantity">{{ item.quantity }}</td>
                    {% endif %}
                    <td class="items__item__total last-child">{{ item.total }}</td>
                </tr>
                {% for child in item.children %}
                    <tr class="items__item items__item--sub items__item--{{ child.type }}">
                        <td class="items__item__label"><span>{{ child.label }}</span></td>
                        {% if invoice.pricesWithTax %}
                            <td class="items__item__price">{{ child.priceUntaxed }}</td>
                            <td class="items__item__quantity">{{ child.quantity }}</td>
                            <td class="items__item__untaxed">{{ child.totalUntaxed }}</td>
                            <td class="items__item__tax_rate">{{ child.taxRate }}</td>
                            <td class="items__item__tax">{{ child.taxAmount }}</td>
                        {% else %}
                            <td class="items__item__price">{{ child.price }}</td>
                            <td class="items__item__quantity">{{ child.quantity }}</td>
                        {% endif %}
                        <td class="items__item__total last-child">{{ child.total }}</td>
                    </tr>
                {% endfor %}
            </tbody>
        {% endfor %}

        <tfoot class="totals">
            <tr>
                <td colspan="{% if invoice.pricesWithTax %}3{% else %}1{% endif %}"></td>
                <td colspan="{% if invoice.pricesWithTax %}4{% else %}3{% endif %}">
                    <table>
                        <tbody>
                            <tr class="last-child">
                                <th>{% trans %}Subtotal{% endtrans %}:</th>
                                <td>{{ totals.subtotal }}</td>
                            </tr>
                        </tbody>

                        {% if totals.hasDiscount or totals.taxes %}
                            <tbody class="totals__sub">
                                {% if totals.hasDiscount %}
                                    <tr {% if not totals.taxes %}class="last-child"{% endif %}>
                                        <th>{{ totals.discountLabel }}</th>
                                        <td>{{ totals.discountPrice }}</td>
                                    </tr>
                                {% endif %}

                                {% for tax in totals.taxes %}
                                    <tr class="totals__tax{% if loop.last %} last-child{% endif %}">
                                        <th>{{ tax.label }}:</th>
                                        <td>{{ tax.price }}</td>
                                    </tr>
                                {% endfor %}
                            </tbody>
                        {% endif %}

                        <tbody class="totals__total">
                            <tr class="last-child">
                                <th>{% trans %}Total{% endtrans %}:</th>
                                <td>{{ totals.total }}</td>
                            </tr>
                        </tbody>

                        {% if totals.hasPayment %}
                            <tbody>
                                <tr class="last-child">
                                    <th>{% trans %}Amount paid{% endtrans %}:</th>
                                    <td>{{ totals.amountPaid }}</td>
                                </tr>
                            </tbody>
                            <tbody class="totals__total">
                                <tr class="last-child">
                                    <th>{% trans %}Amount due{% endtrans %}:</th>
                                    <td>{{ totals.amountDue }}</td>
                                </tr>
                            </tbody>
                        {% endif %}
                    </table>
                </td>
            </tr>
        </tfoot>
    </table>
</div>
<hr class="lineLarge"><br>
<br>
<div id="codigoafip" style="text-align: center;"> <barcode code="%codebar%" type="I25" size="1.0" height="1.0"><br>
</barcode>
<div style="text-align: right;"><barcode code="%codebar%" type="I25" size="1.0" height="1.0"><b>CAE:</b> invoice.getAttribute('caeNumero') </barcode><br>
<barcode code="%codebar%" type="I25" size="1.0" height="1.0"><b>Vto. CAE:</b> invoice.getAttribute('caeFecha')</barcode><br>
<barcode code="%codebar%" type="I25" size="1.0" height="1.0"></barcode></div>
<div style="text-align: left;">%codebar2%
</div>
</div>
<br>
<hr class="lineDotted"><br>
<div id="textoabajofactura" style="text-align: justify;">
<p>&nbsp;</p>
<p><strong>¿COMO PUEDO VER ESTA FACTURA?</strong></p>
<p><br>
Recuerde que puede ver sus facturas en
http://ucrm.public.url<br>
Usuario:  client.username <br>
<br>
</p>
<hr class="lineLarge"></div>
</div>
<p>&nbsp;</p>
</div>
</body>

Reply