I have a storm site where, when I create an invoice, I can't set "VAT application" to "do not apply tax". Likewise, I can't set VAT percentage to "0" (zero). When I do this, these items get reverted to the default variables (true and 20 respectively).
I traced this to the storm_taxation() function in storm.module, which fetches the default value for these items if they are not set. However, by using
if (!$node->tax1app) ...
rather than
if ($node->tax1app === null) ...
the function will consider the "tax application" and "tax percentage" to be not set if they are zero. In this case zero and not set are different values.
The enclosed patch addresses the problem and works on my test site (although I haven't tested it extensively). Comments welcome.
Cheers,
Albert.
| Comment | File | Size | Author |
|---|---|---|---|
| taxation_issue.patch | 1.05 KB | alberto56 |
Comments
Comment #1
Magnity commentedGood spot.
Though I wonder whether
if (!isset($node->tax1app)) ...would be a little more self documenting.Comment #2
Magnity commentedCommitted to both branches.
Thanks for pointing out!