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.