Jump to content

Inclusive Tax, but invoice items exluding tax


mdeinhardt

Recommended Posts

We are from Germany and it is mandatory for us to show all prices including tax on websites. On invoices we have to list all prices excluding tax though and then add VAT and display the Total. So far, so good and very common I guess.

But how do I do that in WHMCS? I have set all prices to be inclusive tax, otherwise they would displayed wrong in the client area.

But now WHMCS only displays gross prices and using $item.amount in the invoice does the same. Is there a way to make WHMCS display net prices, especially in the invoice?

 

Or am I simply overlooking something? How are others handling this?

 

Thanks

Link to comment
Share on other sites

I've been studying posts and documentation for hours now and know as much as before :-(

 

So here's what I found/think: Tax rules in WHMC seem to be either inclusive or exclusive and I have found no way around that.

 

German law requires prices on websites to be given including tax (not a new thing, always has been this way)

German law requires prices in invoices to be shown excluding tax for each service/product and then add VAT. (see above)

WHMCS can't do that, or can it?

 

Any Germans here, who could shed some light on this? No other country in the world has this kind of requirement?

Link to comment
Share on other sites

Here in Italy we simply add a text like this one in the footer. In past I've seen that also big brands like Microsoft were using the same approach on their websites. Are you allowed to do the same?

 

*all our prices are excluding VAT

 

Anyway there's a solution. You could modify your tpl to display prices including VAT. It should be easy.

Link to comment
Share on other sites

Hi Kian,

 

thanks for taking the time to answer. Unfortunately we can't do that declaration bit, you know Germans, everything has to be following the rules very strictly ;-)

 

Do you mean the invoicepdf.tpl? I would love to do that, but as I found out here http://forum.whmcs.com/showthread.php?22916-V4-Invoice-Template-Calculations-Stopped-Working&highlight=calculate+invoice I can't simply caclulate with the value, since $invoiceitems[amount] delivers a string. Any ideas around that?

 

The other way around, i.e. using prices excluding VAT and then calculate the gross price for output on the web, would be good too, but I haven't yet found how to do that either :-(

Link to comment
Share on other sites

It's true but it's still possible to display the price excluding VAT plus 2 additional columns (if necessary) with tax rate and price including VAT for each item of the invoice. You just need to modify your invoice.tpl file and of course also viewinvoice.php for the printable version.

Link to comment
Share on other sites

Ok, so I have missed resp. haven't found that yet then. Is there any comprehensive listing of the possible variables anywhere? The information under http://docs.whmcs.com/PDF_Invoice_Customisation is very meager, to say the least. And I have scoured the forum for hours, but have found no mention of this.

 

Or do you happen to have the variable at hand?

 

'.$item['amount'].' gives me the price as entered (in my case including tax). What would I use to display the price excluding VAT?

 

Cheers

Link to comment
Share on other sites

I might have to ask a programmer to do this for me anyway, so he would know how to get the number from a string.

 

Ah, great, so $item['rawamount'] is exactly what I was looking for. Where did you find that (just curious, since I a always trying to figure stuff out myself)?

 

Thanks a million for our help, Kian.

Link to comment
Share on other sites

With this in invoicepdf.tpl

echo "<pre>";
print_r($invoiceitems);
echo "</pre>";
die();

$invoiceitems is the array that contains all items of invoice. Basically I'm printing all its content. The result is something like this:

Array
(
   [0] => Array
       (
           [id] => 125
           [type] => Hosting
           [relid] => 89
           [description] => Dedicated Server (28/11/2014 - 27/12/2014)
Add Bulk Space 1gb, $1.95/mo.: 0 x +1gb space €5.00 EUR
Add Bandwidth 1gb, $0.49/mo.: 0 x +1gb bandwidth €5.00 EUR
Add Bulk Bandwidth 10gb, $3.25/mo., 10+% Discount!: 0 x +10gb bandwidth €5.00 EUR
Add DS cPanel/WHM with Fully Managed Support, FREE (a $790/yr value!): Nei
           [rawamount] => 10.00
           [amount] => €10.00 EUR
           [taxed] => 1
       )

   [1] => Array
       (
           [id] => 191
           [type] => 
           [relid] => 0
           [description] => Website Wordpress
           [rawamount] => 1000.00
           [amount] => €1000.00 EUR
           [taxed] => 1
       )

   [2] => Array
       (
           [id] => 192
           [type] => 
           [relid] => 0
           [description] => Dedicated server setup
           [rawamount] => 159.00
           [amount] => €159.00 EUR
           [taxed] => 1
       )

)

Remember that you have to edit invoicepdf.tpl with TCPDF and also viewinvoice.tpl with Smarty so the following skills are required: PHP, Smarty, TCPDF and of course WHMCS. Anyway it's simple to achieve.

Edited by Kian
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated