Since WHMCS can't calculate different tax categories per product (tax A and tax B on product X and tax A only on Product Y) we would need to be able to take over the tax calculation or be able to modify it to comply with local tax regulations.
See:
https://requests.whmcs.com/topic/specify-second-level-tax-on-specific-products-pst-is-not-charged-on-every-product-in-bcI don't quite know the existing hook flow for invoice creation, so I don't know if a hook like AfterInvoicingGenerateInvoiceItems, InvoiceCreation, PreInvoicingGenerateInvoiceItems or UpdateInvoiceTotal can be used and modified in a way that we can pass back the new tax values (and maybe even names).
We would need the client information for the invoice and all line items including late fees finalized so we can take all that and calculate the proper taxes so that we can pass the taxes to use back to WHMCS. It should be the last call so that nothing will modify the invoice at a later point in the flow.
This should also be available for the ordering process in the frontend so that whenever WHMCS displays a total with taxes these can be modified ahead of the display so that the proper taxes can be shown to the customers as well as apply to invoice/quote modifications in the admin section.
In a nutshell: we want to be able to replace the built-in tax calculation of WHMCS with our own and need all the access the built-in system has.
Mark Krieger
3 Comments
Login to post a comment.
How about naming it "InvoiceCreationFinalized"?