Argentina's Credit Note are positive

Hi, I’m testing dolibarr.
I noticed that a Credit Note has negative amount.
In Argentina, there’s no such thing as “negative” credit note.

I don’t care if dolibarr register those amount in negative.
I just have to print out those Credit Notes with positive numbers because those’re the fiscal rules.

I thought multiplying by -1 the amounts into template for credit note, but I don’t know how.

any suggestion?
thansk in advance

I can add an option to invert sign on credit note.
However can you confirm that having absolute value on pdf template is enough. I mean, we can keep negative value on screen ?

Thanks Eldy.

I’m not an accountant, so I might be mistaken.

In the case I’ve tested, the client buy $2000 in products.
He owes me $2000, right?
Then he want to return the products, I have to cancel that invoice by making a credit note. So his debts decreases to $0.

I think it should not care if I see negative values on screen.
If this registration is correct, then I see no problem (I would talk about this with an accountant).

I just want positive values on PDF, cause the fiscal rules on Argentina.

Hi,(sorry about my instromission)
Absolute value in pdf should be enough.

by the way are you using preprinted invoices or dolibarr’s pdf forms as your official document? just for curiosity (I’m not an AFIP crew!!;))
Regards
Ale

Hi Alejandror.
Yes, We’ll using pre-printed forms.

I managed to modify masks to obtain correct numbers and type of documents.
I also make little modifications at template to place/move the values in the right spot (taken htdocs/includes/modules/facture/pdf_oursin.modules.php as reference)

There’s an external Public Accountant Studio that carries accountancy, so we’ll using dolibarr’s modules: stock control, invoice generation and client/supplier administration.
That’s why don’t care about the negative value in screen.

Talking with an accountant I showed him Dolibarr and this issue with credit notes.
He told me:
"If you generate a credit note thats mean your fiscal debit decreases, this could be:

  1. credit note should be adding in the purchase journal (subdiario compras) or
  2. substracting in the sell journal (subdiario ventas)"

As I understood, there would be no problem at all with the negative values in credit note, as they substract from the sell journal.

Edly, if you can add the option to invert sign, I will be very happy :smiley:

I added option INVOICE_POSITIVE_CREDIT_NOTE in development version.

Thanks eldy!! I’m dl-ing the dev version to test.

As I said in the spanish forum (http://www.dolibarr.es/index.php/foro/12-icomo/645-notas-de-credito-en-argentina-deben-ir-en-positivo) I was testing dolibarr, but I’m very close to install it in a production environment.
I just need that option (the new one into dev version)

It is safe to use the development version in a production environment?
Or
Can I use that option in a stable version like 3.0/3.1

We’ll be using stock, client/suppliers and, of course, printing invoices and credit notes. Other functions are no needed in my case.

No, using a development version, nor beta version is not safe for production usage.
Sorry option is not available into previous.

darn! :unhappy:
I’ll have to wait the next stable version then.

Thank you Eldy :woohoo:

Just for the record…

I have pressure to implement Dolibarr as soon as possible.
I need the positive credit notes, so I can’t wait to version 3.2 become stable.

“I took the bull by the horns” and made some modifications.

As I use pre-printed forms, I created a “preimpreso” template copying from crabe template.
I commented all the lines that draw separating lines and blocks to clean the design.

Looking code in alpha version, I found INVOICE_POSITIVE_CREDIT_NOTE and investigate a little.

Then I realized that I could make these changes.
In my “preimpreso” template y find _tableau_tot function and then added:

$sign=1;
if ($object->type == 2) $sign=-1;

and in every price function multiply by $sign
but credit notes keeps having negative values in every item line.

I’ve tried price function, but cut off the decimals…
So I went for the easy way: str_replace to remove the - character.

like this:
$pdf->MultiCell(16, 3, str_replace(’-’,’’,$up_excl_tax), 0, ‘R’, 0);

I know this isn’t the best, nor ideal
but it works for me and doesn’t change the values in invoices.

Also I’ve learned to have diferent instances of Dolibarr in same linux machine so I will have a testing instance to try updates and make changes without compromise the production instance.

Thanks Eldy, and all the Dolibarr team.