Bonnet
Bonnet
Offline
0
Hi, Germinal,
in the product ITEM areas of an invoice triggered by an order passed from HikaShop, the {tax} token evaluates correctly to the applied tax rate only if the product price is not null.
Ok, i've inspected the code in the "plg_invoicemanager_hikashop_2.2.4_3.x.zip" plugin and i understand why there's a requirement to do that -> the product tax rate can only be deduced by dividing the "product tax" by the "product unit-price", and to avoid a division by 0 when the "product price" is 0, you have placed a conditional block which forces the result to be 0.00 in that case -> OK
But, in this particular case, reporting this result as is in the invoice is not clean.
Indeed, when the tax rate computation is not possible due to the nullity of the product price, the product tax rate displayed should not indicate "0.00%" but a string like "-" or simply an empty string.
So, i think you would consider to update the algorithm of the {tax} token
Thanks
Responses (0)
  • There are no replies here yet.
Your Reply