Invoice printout Numberformat/Variable Problem?

Post here if you think you have found a bug in hoteldruid or error in its documentation.

Moderator: marco

Post Reply
sepp_huber
Posts: 2
Joined: Tue Apr 19, 2016 1:11 pm

Invoice printout Numberformat/Variable Problem?

Post by sepp_huber »

Hi,

we have got a problem with our invoices:
I do not know if it is a general bug or a bug in our form logic...

Invoices under 1.000 € are ok, for invoices over 1.000 € the tax rate of the room is zero in the printout.
For sure we have made some changes on the "standard".
It seems that the problem is in this statement and the "_p" in the variable and numbers over 1.000:
Set [rate_vat_p] Equal [rate_price_withdiscount_p] - [rate_no_vat_invo_p]
I have inserted some debug printouts in the invoice template and the two variables "rate_price_withdiscount_p" and "rate_no_vat_invo_p" have the correct values. The result of the subtraction is zero, but only for bigger numbers.
I cannot understand this, because for me the code is always the same... for big and small numbers.
The problem is also if I change the numberformat in the settings from "1.050.000,32" to "1,050,000.32"
The Problem was in 2.1.4 and today I have done a upgrade to 2.2.1, it also is there.
Any ideas?

Screenshots are here
https://drive.google.com/file/d/0B20s39 ... sp=sharing
sepp_huber
Posts: 2
Joined: Tue Apr 19, 2016 1:11 pm

Re: Invoice printout Numberformat/Variable Problem?

Post by sepp_huber »

Hi marco,

do you need more information for the problem?
marco
Posts: 1332
Joined: Tue Jul 05, 2005 6:00 pm
Location: Roma, Italia

Re: Invoice printout Numberformat/Variable Problem?

Post by marco »

Hello,
this is not a bug, the variables ending with _p are transformed with the thousands separators, so you should not make operations on them (use them only to display numbers in the document), use the variable without _p instead.

Regards,
Marco
Problems installing, configuring, upgrading?
Try the easiest way to use HotelDruid:
https://www.digitaldruid.net/hosted/index.php
Post Reply