PUQ Mautic

Overwrite Tax Rules

Description

 Order now | Dowload | FAQ

Overwrite Tax Rules

The "Overwrite Tax Rules" extension allows you to overwrite and configure tax rules in WHMCS in a highly flexible manner, without relying on the standard WHMCS tax rules. It offers the following key features:

  1. Multiple Home Companies: You can configure separate parameters for each home company, including company name, country, tax ID/VAT number, tax name, tax rate, pay-to text, proforma invoice numbering, and invoice numbering. These home companies are used in tax rules and when creating client invoices, providing a convenient way to create multi-brands in the financial aspect of WHMCS.

  2. Country Sets: These are groups of countries that participate in tax rule settings.

  3. Tax Rules: These rules have parameters for filtering and applying to client invoices. You can specify the client's country or a set of countries to which the rule should apply, the client type (private client, company without VAT ID, company with VAT ID), the home company that will serve the client. You can also set an individual tax rate and tax name to be used on the invoice; otherwise, the parameters from the home country will be used.

  4. Freeze Client and Home Company Data: The extension fully supports freezing client and home company data on invoices. This means that the data on the invoice will not change if the client modifies it in their profile. However, administrators have the ability to modify these data.

  5. VIES VAT Number Validation: The extension includes built-in support for validating VAT numbers through VIES (VAT Information Exchange System) in the following scenarios: validation when registering a client, validation when editing a client, validation when creating an order, and manual validation.

  6. Client Overview Widget: The admin area includes a widget that displays information about the client, such as client type, home company, tax rule number, VIES status (valid) and last validation date, and tax exemption.

  7. Invoice Editing: When editing an invoice, a section is added that displays the current and frozen data of the client and home company.

  8. PDF Invoice Customization: The extension provides a small integration code for adapting the PDF invoice template.

The "Overwrite Tax Rules" extension fulfills a wide range of invoicing and multi-brand needs that are not achievable through standard WHMCS configuration. Furthermore, this extension is available for free compared to well-known competing modules.

 

image-1687262819654.png

image-1687262843769.png

image-1687262853198.png

image-1687262870926.png

 

image-1687262883090.png

image-1687262895430.png

image-1687262906381.png

 

 

 

Configuration

 Order now | Dowload | FAQ

image-1687265277066.png

Enabled - Enabling or disabling all custom functions of this extension affects the automation and visibility of its features in the client area. When extension disabled, the automation capabilities and related features provided by the extension will not be active or visible to clients. However, as an administrator, you will still have access to configure and utilize the extension's functionalities through the administration interface. This gives you the flexibility to control the visibility and automation aspects of the extension based on your specific needs and preferences.

On the configuration page, you will find the following settings:

  1. PUQ Customization - OverwriteTaxRules - Integration Code: This is a PHP code snippet named "PUQ Customization - OverwriteTaxRules - Integration Code." It serves as a hint for users to add this code to the top of their invoice template.

  2. Client VAT ID field: This setting allows you to choose between using the standard VAT ID field or a custom VAT ID field for clients.

  3. Freeze Data: This option can be set to "YES" or "NO." When enabled, the system will populate invoices with the frozen data that was captured when the invoice was created. Note that data is always frozen, but this option controls whether it is displayed on the invoice.

  4. Set Invoice Date on Payment: When set to "YES," the invoice date will be automatically set to the current date upon payment.

  5. Set Invoice Due Date on Payment: Similarly, when set to "YES," the invoice due date will be automatically set to the current date upon payment.

  6. VIES VAT number validation: Enabling this option allows for support of VIES VAT number verification for B2B tax exemption. Please note that activating this option will change the default tax exemption option to "none" (not exempt) for all clients.

  7. Validation when registering a client: This setting determines whether VIES VAT number validation is performed when registering a client. It can be set to "YES" or "NO."

  8. Validation when editing a client: Similarly, this setting controls VIES VAT number validation when editing a client's information.

  9. Validation when creating an order: This setting determines whether VIES VAT number validation is performed when creating an order.

These configuration options provide flexibility and control over various aspects of the "Overwrite Tax Rules" extension's functionality.

Home companies

 Order now | Dowload | FAQ

image-1687266281286.png

On the "Home Companies" page, you have the option to add home companies that will be involved in your document management with clients. Please note that at least one home company must be configured.

The following options are available for configuration:

  1. Company Name: Enter the name of the company.

  2. Default: One of the home companies must be designated as the default. It will be assigned to clients who do not match any tax rules.

  3. Country: Select the country where the company is registered.

  4. Your Tax ID/VAT Number: Enter the tax identification or VAT number if applicable.

  5. Tax Name: Specify the tax name in the native language of the company.

  6. Tax Rate: Set the applicable tax rate for this company.

  7. Numbering: Configure the numbering format for invoices and proformas. You can use tags such as {YEAR}, {MONTH}, {DAY}, and {NUMBER}. Additionally, you can enable auto-reset of numbering on an annual or monthly basis.

  8. Pay to Text: Enter the text that will be displayed on the invoice as the payment recipient.

These configuration options allow you to define and customize the home companies that will be involved in your invoicing process.

Countries set

 Order now | Dowload | FAQ

image-1687267247880.png

On the "Countries Set" page, you can configure sets of countries that will be involved in the conditions of your tax rules.

To configure a countries set, follow these steps:

  1. Assign a name to the set by entering it in the designated field.

  2. To add countries to the set, click on the checkbox next to the country you want to include. By selecting the checkbox, you indicate that the respective country will be part of the countries set.

By selecting specific countries for each set, you can define which countries will be considered in the tax rule conditions. This allows you to customize and apply tax rules based on the selected countries within each set.

Tax rules

 Order now | Dowload | FAQ

image-1687268676814.png

On the "Tax Rules" page, you can add tax rules, each of which allows you to specify the following parameters:

  1. Client Country: This field determines the country or set of countries to which the tax rule applies. You can select a specific country or a predefined set of countries.

  2. The rule applies to: This parameter defines the type of client to whom the tax rule applies. You can choose from the following options:

    • Private client
    • Company without VAT ID
    • Company with VAT ID
  3. Home Company: This field specifies the home company that serves clients falling under this tax rule. You can select the appropriate home company from the available options.

  4. Individual TAX (Tax name, Tax rate): If you need to apply an individual tax with a specific name and rate to clients matching this rule, you can enter the tax name and rate in this section. This allows for customized tax calculations for clients assigned to this tax rule.

 

image-1687268770176.png

On the "Tax Rules" page, you can also manage the order of tax rules. To move a rule down, click the arrow-down button next to the corresponding rule. To move a rule up, click the arrow-up button on the respective rule.

Please note that the order of rules is crucial as they are applied from top to bottom. The rules are evaluated each time an invoice is created or transitions to the "Paid" state.

 

 

 

 

Client Overview Widget

 Order now | Dowload | FAQ

image-1687270168152.png

The extension adds a data panel in the admin panel for viewing and editing client information. This panel includes the following data:

These details provide quick access to essential information related to the client's tax status and company association.

Invoice Editing

 Order now | Dowload | FAQ

image-1687270705058.png

When editing an invoice, a section is added to display both the current and frozen data of the client and home company. The frozen data represents the information that was originally frozen when the invoice was created, meaning it remains unchanged even if the client modifies it in their profile.

However, if there is a need to edit the frozen data for any reason, you can click on the "EDIT" button. This action allows you to modify the frozen data, giving you the flexibility to make necessary adjustments.

image-1687270710517.png

Integration Code

 

PUQ Customization - OverwriteTaxRules - Integration Code

Add to top "invoicepdf.tpl"

# PUQ Customization - OverwriteTaxRules - Integration Code
if(file_exists(ROOTDIR . '/modules/addons/puq_customization/extensions/OverwriteTaxRules/lib/invoicepdf.php')){
    require_once(ROOTDIR . '/modules/addons/puq_customization/extensions/OverwriteTaxRules/lib/invoicepdf.php');
    foreach(puq_customization_overwrite_tax_rules_invoicepdf($tplvars) as $k=>$v) $$k = $v;
}

By including this code in your invoice template file, you enable the integration of the OverwriteTaxRules extension with the PDF generation process. It allows the extension to modify and customize the invoice PDF output.

Please make sure to place this code immediately after the <?php tag in your invoice template file.

 

image-1687272214461.png