Jump to content

Assign custom tax variable value permanently


elkato

Recommended Posts

Based on topic above, I'm trying to handle tax values on my own (different in my country) by permanently change value to array? From adding a product to cart or order,and maintain the value to the end of the process. Invoice with that tax too.

Is it possible to set that way with Price Formatter ? How and where should I use that?

Is there a better way to get that?

Thanks for doing great community!

Link to comment
Share on other sites

20 hours ago, elkato said:

Is it possible to set that way with Price Formatter ? How and where should I use that?

Is there a better way to get that?

I suspect that you should direct your attention towards the shopping cart and/or invoicing hooks rather than price formatter.... you might need to use PF down the road, but what you're thinking of doing could end up a lot more complicated than just formatting an amount in the cart.

https://developers.whmcs.com/hooks/hook-index/

Link to comment
Share on other sites

Thanks for your reply brian!

I understand what you mean about PF.

So if I understand correctly to get a complete handle of taxes on my own (plan to  use 2 taxes levels, but switched by customer condition, not country), is not possible to change tax value on var permanently to be then generated with that value on invoice right? So I just could change output to screen on each page and then After invoice generated change on db on invoice...

Would be that right approach?

Thank you

Link to comment
Share on other sites

16 hours ago, elkato said:

Would be that right approach?

before doing anything else, my first thought would be to check whether there was an existing solution in Marketplace (or elsewhere) that can do what you want.

16 hours ago, elkato said:

So I just could change output to screen on each page and then After invoice generated change on db on invoice...

after the invoice is created, but before it's sent to the client.

Link to comment
Share on other sites

8 hours ago, brian! said:

which country is this for ?

Argentina it is.

I'm seeing probably I will need to charge more taxes then. So I'm trying to figure out how I could handle this.

Taxes are based by products and conditionally by customer type. So it is possible to invoice item with different taxes, and possible 3 or 4 taxrates (3,5%, 10,5%, 21% and 27%).

So I think, I would need an addon module to handle product own taxes, adding then different new taxesrates columns to tblinvoices, or maybe better on a new referenced table for upgrade purposes, and lot of hooks to calculate taxes/subtotal/totals and calling api to modify invoice before email sent...

I hope some day to see that finished and working :/

Link to comment
Share on other sites

16 hours ago, elkato said:

So I think, I would need an addon module to handle product own taxes, adding then different new taxesrates columns to tblinvoices, or maybe better on a new referenced table for upgrade purposes, and lot of hooks to calculate taxes/subtotal/totals and calling api to modify invoice before email sent...

I wouldn't recommend adding new columns to default tables - it would be easier to create a new table and reference one from the other.

16 hours ago, elkato said:

Taxes are based by products and conditionally by customer type. So it is possible to invoice item with different taxes, and possible 3 or 4 taxrates (3,5%, 10,5%, 21% and 27%).

I guess you might need to specify in the product, e.g with the use of a product custom field, which tax rate should be applied to that product..

i'd suggest having a word with @Kian about this as he wrote the Billing Extension addon and knows the WHMCS tax/invoicing inside out.

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