Skip to main content
insightsoftware Documentation insightsoftware Documentation
{%article.title%}
Published:
Was this article helpful?
0 out of 0 found this helpful

Customizing Calculations

Solutions Framework includes preconfigured calculation that you can also customize to suit your company’s needs.

Customizing pre-configured calculations

Solutions framework provides preconfigured calculations archived in the Solutions\Events folder. Customizations are implemented using Configuration libraries in designer.

Customizing events

If you have a custom modification, you must create a configuration library (via Designer with the custom code (using the same name as the pre-configured code files). The name of the configuration library must be the same name as the event.

Extracting event code (for Solutions events)

To extract event code:

  1. On your server, navigate to the \bin folder in your Data Server working directory. For example, C:\Longview\DataServers\LongviewTax\bin.
  2. Copy the kar.exe file to a location on your local computer.
  3. Navigate to the \applications\Solutions\Events\ folder in your Data Server working directory. For example, C:\Longview\DataServers\LongviewTax\applications\Solutions\Events.
  4. Copy the .kar file for the event you wish to customize. to the same location as the kar.exe file on your local computer.
  5. In the local folder, create a Windows Batch file (.bat) with the following command:

    kar x EventName.kar

    where EventName.kar is the kar file for the event that you want to customize code for.

    Note: To list all the files and folders in the .kar file, type kar t EventName.kar.

  6. Double-click the batch file. The command extracts the folders from the EventName.kar file into the local folder. In addition, there will be an EventName folder created that can be ignored.

    Note: To make it easier to find documents you can delete all files with the extension “.xml” as these files are used internally by Designer only.

    Once you have extracted the pre-configured code, you can modify it and then make it available for your system.

Customizing event code (for Solutions events)

To customize event code:

  1. In Designer create a new configuration library named EventName.
  2. Create the document you want to customize in the configuration library with the same name as the extracted document.
  3. Right-click the source file you want to customize and open it in your preferred text editor.
  4. Copy the contents of the entire document and paste the contents to the document created in Designer.
  5. Make the necessary modifications, then save the configuration library.

Creating a custom calculation method in Longview Tax

Instead of using the available standard calculations for calculating tax amounts, it is possible to define the following custom calculation methods to run net income before tax or book-tax difference accounts:

Creating a custom calculation method for net income before tax accounts

You can use Tax Provision to define a custom calculation method to automatically calculate values in the current provision (current tax charge) for NIBT accounts.

To create a custom calculation method for NIBT accounts:

  1. Specify a name for the custom calculation method in NIBT Automation - Custom Actuals Calculation Methods in the System_Settings.csv import file. For more information, see Preparing an Import File for System Settings.

    Note: The name for the new custom calculation method will display in the Net Income Before Tax editor in the Actuals Calculation Method list and will also be the required name for the calculation procedure document. Choose a meaningful name for the calculation method, but make sure that it is of a reasonable length for the drop-down list and that it conforms to the character restrictions for procedure names.

  2. Do one of the following depending on your system type:
    • For an ASC system, add a new procedure in the APPFRMWRK\Events\NIBTTransfer\Code directory with the name NIBTTransfer_name.lvpro.
    • For an IAS system, add a new procedure in the APPFRMWRK\Events\NIBTTransfer12\Code directory with the name NIBTTransfer_name.lvpro.

      Where name is the name of the custom calculation method as set for NIBT Automation - Custom Actuals Calculation Methods in the System_Settings.csv import file.

  3. Add the required calculation logic to the new procedure to perform the custom calculation of the current provision (current tax charge) amounts.
  4. Save the procedure in the directory.
  5. Sign in to Tax Provision.
  6. In the Tax Provision navigation pane, click the Administration category.
  7. Expand Accounts, expand Net Income Before Tax, and then click Net Income Before Tax. The Net Income Before Tax editor opens.
  8. Select Automate NIBT Amounts for the required NIBT accounts.
  9. For Actuals Calculation Method, select the new custom calculation method.
  10. Make the appropriate selections in the remaining fields to define the percentage and the source symbols required for calculation. For more information, see the Longview Tax Administrator’s Guide.
  11. Click Save. Whenever the NIBT Transfer calculation is initiated, your custom calculation method runs for the selected NIBT accounts.

Creating a custom calculation method for book-tax difference accounts

You can use Tax Provision to define a custom calculation method to automatically calculate values in the current provision for permanent differences and temporary differences, and in the gross temporary difference rollforward for temporary differences.

To create a custom calculation method for difference accounts:

  1. Specify a name for the custom calculation method in Current Tax Automation - Custom Actuals Calculation Methods in the System_Settings.csv import file. For more information, see Preparing an Import File for System Settings.

    Note: The name for the new custom calculation method will display in the Book-Tax Differences editor in the Actuals Calculation Method list and will also be the required name for the calculation procedure document. Choose a meaningful name for the custom calculation method, but make sure that it is of a reasonable length for the drop-down list and that it conforms to the character restrictions for procedure names.

    In the following code examples, the name specified for the custom calculation method is Labeled Forecast.

  2. Do one of the following depending on your system type:
    • For an ASC system, add a new procedure in the APPFRMWRK\Events\AutoPrmTmp\Code directory with the name AutoPrmTmp_name.lvpro.
    • For an IAS system, add a new procedure in the APPFRMWRK\Events\AutoPrmTmp12\Code directory with the name AutoPrmTmp12_name.lvpro.

      Where name is the name of the custom calculation method as set for Current Tax Automation - Custom Actuals Calculation Methods in the System_Settings.csv import file.

  3. Add the required calculation logic to the new procedure to perform the custom calculation of the current tax amounts.
  4. Save the procedure in the directory.
  5. Update the model to include the appropriate code.
  6. Sign in to Longview Tax.
  7. In the Tax Provision navigation pane, click the Administration category.
  8. Expand Accounts, expand Book-Tax Differences, and then click Book-Tax Differences. The Book-Tax Differences editor opens.
  9. Select Automate Current Tax Amounts for the required difference accounts.
  10. For Actuals Calculation Method, select the new custom calculation method.
  11. Make the appropriate selections in the remaining fields to define the percentage and the source symbols required for calculation. For more information, see the Longview Tax Administrator’s Guide.
  12. Click Save. Whenever the Perm/Temp Automation calculation is initiated, your custom calculation method runs for the selected difference accounts.

Adding custom code to rollover

The Tax Provision rollover code includes custom code hooks. These custom code hooks allow you to add custom code into the rollover to suit your company’s specific requirements.

There are three places in the rollover code from which these custom code hooks are run:

  • At the end of the locking procedure
  • At the end of the copy procedure
  • At the end of the rollover code

The following are the .lvpro files that are called during the rollover process. In order for these files to run during rollover, you must create the .lvpro files with the exact names as follows:

File Rollover Type Used...

TxRoMAppLck.lvpro

Period End

 

At the end of the locking procedure; allows for locking of additional hierarchies for all dimensions.

TxRoMAppC.lvpro

Period End

At the end of the copy procedure; allows for additional copies to be added for custom data or the ability to override standard copies.

TxRoMApp.lvpro

Period End

At the end of the rollover code; allows for setting of additional attributes.

TxRoYAppLck.lvpro

Year End

At the end of the locking procedure; allows for locking of additional hierarchies for all dimensions.

TxRoYAppC.lvpro

Year End

At the end of the copy procedure; allows for additional copies to be added for custom data or the ability to override standard copies.

TxRoYApp.lvpro

Year End

At the end of the rollover code; allows for setting of additional attributes.

Caution: Longview Solutions strongly recommends that you test any custom rollover code thoroughly before using it in a live system. Modifying rollover code could result in data loss.

To add custom code using a rollover hook, follow these steps:

  1. Locate and open your company’s Tax Rollover code folder. For example, ...\DataServers\<LID>\applications\Longview Tax\Tax Rollover\Code.
  2. In the folder located in step 1, create the following .lvpro files:
    • TxRoMAppLck.lvpro
    • TxRoMAppC.lvpro
    • TxRoMApp.lvpro
    • TxRoYAppLck.lvpro
    • TxRoYAppC.lvpro
    • TxRoYApp.lvpro
  3. Add custom code as desired.

    Note: For more information on customizing code, see Customizing Event Code.

Rule ID conventions for Tax Provision

If you create any custom rules, the rule IDs must between 1 and 1999999. The following rule IDs are reserved for Tax Provision system rules:

Rule type Area ID Range
Validation
  • Reserved for Future Use

  • Reserved for Custom Use
  • 1000000-1899999
  • 1900000-1999999

Model

  • General
  • Common areas
  • ASC
  • IAS
  • ASC - Interim
  • IAS - Interim
  • ASC - MRP
  • IAS - MRP
  • Reserved for Future Use
  • Reserved for Custom Use
  • 2000000–2999999
  • 2000000–2099999
  • 2100000–2199999
  • 2200000–2299999
  • 2300000–2399999
  • 2400000–2499999
  • 2500000-2599999
  • 2600000-2699999
  • 2700000-2899999
  • 2900000-2999999

Rollup

  • General
  • ASC
  • IAS
  • Reserved for Future Use
  • Reserved for Custom Use
  • 3000000–3999999
  • 3100000–3199999
  • 3200000–3299999
  • 3300000-3899999
  • 3900000-3999999

Query

  • General
  • Common
  • ASC
  • IAS
  • ASC - MRP
  • IAS - MRP
  • Reserved for Future Use
  • Reserved for Custom Use
  • 4000000–4999999
  • 4000000–4099999
  • 4100000–4199999
  • 4400000–4499999
  • 4500000-4599999
  • 4600000-4699999
  • 4700000-4799999
  • 4900000-4999999

Event

  • General
  • ASC
  • IAS
  • LTP
  • P2
  • Reserved for Future Use
  • Reserved for Custom Use
  • 5000000–5999999
  • 5100000–5199999
  • 5500000–5599999
  • 5700000-5709999
  • 5750000-5759999
  • 5800000-5899999
  • 5900000-5999999

Published:

Customizing Calculations

Solutions Framework includes preconfigured calculation that you can also customize to suit your company’s needs.

Customizing pre-configured calculations

Solutions framework provides preconfigured calculations archived in the Solutions\Events folder. Customizations are implemented using Configuration libraries in designer.

Customizing events

If you have a custom modification, you must create a configuration library (via Designer with the custom code (using the same name as the pre-configured code files). The name of the configuration library must be the same name as the event.

Extracting event code (for Solutions events)

To extract event code:

  1. On your server, navigate to the \bin folder in your Data Server working directory. For example, C:\Longview\DataServers\LongviewTax\bin.
  2. Copy the kar.exe file to a location on your local computer.
  3. Navigate to the \applications\Solutions\Events\ folder in your Data Server working directory. For example, C:\Longview\DataServers\LongviewTax\applications\Solutions\Events.
  4. Copy the .kar file for the event you wish to customize. to the same location as the kar.exe file on your local computer.
  5. In the local folder, create a Windows Batch file (.bat) with the following command:

    kar x EventName.kar

    where EventName.kar is the kar file for the event that you want to customize code for.

    Note: To list all the files and folders in the .kar file, type kar t EventName.kar.

  6. Double-click the batch file. The command extracts the folders from the EventName.kar file into the local folder. In addition, there will be an EventName folder created that can be ignored.

    Note: To make it easier to find documents you can delete all files with the extension “.xml” as these files are used internally by Designer only.

    Once you have extracted the pre-configured code, you can modify it and then make it available for your system.

Customizing event code (for Solutions events)

To customize event code:

  1. In Designer create a new configuration library named EventName.
  2. Create the document you want to customize in the configuration library with the same name as the extracted document.
  3. Right-click the source file you want to customize and open it in your preferred text editor.
  4. Copy the contents of the entire document and paste the contents to the document created in Designer.
  5. Make the necessary modifications, then save the configuration library.

Creating a custom calculation method in Longview Tax

Instead of using the available standard calculations for calculating tax amounts, it is possible to define the following custom calculation methods to run net income before tax or book-tax difference accounts:

Creating a custom calculation method for net income before tax accounts

You can use Tax Provision to define a custom calculation method to automatically calculate values in the current provision (current tax charge) for NIBT accounts.

To create a custom calculation method for NIBT accounts:

  1. Specify a name for the custom calculation method in NIBT Automation - Custom Actuals Calculation Methods in the System_Settings.csv import file. For more information, see Preparing an Import File for System Settings.

    Note: The name for the new custom calculation method will display in the Net Income Before Tax editor in the Actuals Calculation Method list and will also be the required name for the calculation procedure document. Choose a meaningful name for the calculation method, but make sure that it is of a reasonable length for the drop-down list and that it conforms to the character restrictions for procedure names.

  2. Do one of the following depending on your system type:
    • For an ASC system, add a new procedure in the APPFRMWRK\Events\NIBTTransfer\Code directory with the name NIBTTransfer_name.lvpro.
    • For an IAS system, add a new procedure in the APPFRMWRK\Events\NIBTTransfer12\Code directory with the name NIBTTransfer_name.lvpro.

      Where name is the name of the custom calculation method as set for NIBT Automation - Custom Actuals Calculation Methods in the System_Settings.csv import file.

  3. Add the required calculation logic to the new procedure to perform the custom calculation of the current provision (current tax charge) amounts.
  4. Save the procedure in the directory.
  5. Sign in to Tax Provision.
  6. In the Tax Provision navigation pane, click the Administration category.
  7. Expand Accounts, expand Net Income Before Tax, and then click Net Income Before Tax. The Net Income Before Tax editor opens.
  8. Select Automate NIBT Amounts for the required NIBT accounts.
  9. For Actuals Calculation Method, select the new custom calculation method.
  10. Make the appropriate selections in the remaining fields to define the percentage and the source symbols required for calculation. For more information, see the Longview Tax Administrator’s Guide.
  11. Click Save. Whenever the NIBT Transfer calculation is initiated, your custom calculation method runs for the selected NIBT accounts.

Creating a custom calculation method for book-tax difference accounts

You can use Tax Provision to define a custom calculation method to automatically calculate values in the current provision for permanent differences and temporary differences, and in the gross temporary difference rollforward for temporary differences.

To create a custom calculation method for difference accounts:

  1. Specify a name for the custom calculation method in Current Tax Automation - Custom Actuals Calculation Methods in the System_Settings.csv import file. For more information, see Preparing an Import File for System Settings.

    Note: The name for the new custom calculation method will display in the Book-Tax Differences editor in the Actuals Calculation Method list and will also be the required name for the calculation procedure document. Choose a meaningful name for the custom calculation method, but make sure that it is of a reasonable length for the drop-down list and that it conforms to the character restrictions for procedure names.

    In the following code examples, the name specified for the custom calculation method is Labeled Forecast.

  2. Do one of the following depending on your system type:
    • For an ASC system, add a new procedure in the APPFRMWRK\Events\AutoPrmTmp\Code directory with the name AutoPrmTmp_name.lvpro.
    • For an IAS system, add a new procedure in the APPFRMWRK\Events\AutoPrmTmp12\Code directory with the name AutoPrmTmp12_name.lvpro.

      Where name is the name of the custom calculation method as set for Current Tax Automation - Custom Actuals Calculation Methods in the System_Settings.csv import file.

  3. Add the required calculation logic to the new procedure to perform the custom calculation of the current tax amounts.
  4. Save the procedure in the directory.
  5. Update the model to include the appropriate code.
  6. Sign in to Longview Tax.
  7. In the Tax Provision navigation pane, click the Administration category.
  8. Expand Accounts, expand Book-Tax Differences, and then click Book-Tax Differences. The Book-Tax Differences editor opens.
  9. Select Automate Current Tax Amounts for the required difference accounts.
  10. For Actuals Calculation Method, select the new custom calculation method.
  11. Make the appropriate selections in the remaining fields to define the percentage and the source symbols required for calculation. For more information, see the Longview Tax Administrator’s Guide.
  12. Click Save. Whenever the Perm/Temp Automation calculation is initiated, your custom calculation method runs for the selected difference accounts.

Adding custom code to rollover

The Tax Provision rollover code includes custom code hooks. These custom code hooks allow you to add custom code into the rollover to suit your company’s specific requirements.

There are three places in the rollover code from which these custom code hooks are run:

  • At the end of the locking procedure
  • At the end of the copy procedure
  • At the end of the rollover code

The following are the .lvpro files that are called during the rollover process. In order for these files to run during rollover, you must create the .lvpro files with the exact names as follows:

File Rollover Type Used...

TxRoMAppLck.lvpro

Period End

 

At the end of the locking procedure; allows for locking of additional hierarchies for all dimensions.

TxRoMAppC.lvpro

Period End

At the end of the copy procedure; allows for additional copies to be added for custom data or the ability to override standard copies.

TxRoMApp.lvpro

Period End

At the end of the rollover code; allows for setting of additional attributes.

TxRoYAppLck.lvpro

Year End

At the end of the locking procedure; allows for locking of additional hierarchies for all dimensions.

TxRoYAppC.lvpro

Year End

At the end of the copy procedure; allows for additional copies to be added for custom data or the ability to override standard copies.

TxRoYApp.lvpro

Year End

At the end of the rollover code; allows for setting of additional attributes.

Caution: Longview Solutions strongly recommends that you test any custom rollover code thoroughly before using it in a live system. Modifying rollover code could result in data loss.

To add custom code using a rollover hook, follow these steps:

  1. Locate and open your company’s Tax Rollover code folder. For example, ...\DataServers\<LID>\applications\Longview Tax\Tax Rollover\Code.
  2. In the folder located in step 1, create the following .lvpro files:
    • TxRoMAppLck.lvpro
    • TxRoMAppC.lvpro
    • TxRoMApp.lvpro
    • TxRoYAppLck.lvpro
    • TxRoYAppC.lvpro
    • TxRoYApp.lvpro
  3. Add custom code as desired.

    Note: For more information on customizing code, see Customizing Event Code.

Rule ID conventions for Tax Provision

If you create any custom rules, the rule IDs must between 1 and 1999999. The following rule IDs are reserved for Tax Provision system rules:

Rule type Area ID Range
Validation
  • Reserved for Future Use

  • Reserved for Custom Use
  • 1000000-1899999
  • 1900000-1999999

Model

  • General
  • Common areas
  • ASC
  • IAS
  • ASC - Interim
  • IAS - Interim
  • ASC - MRP
  • IAS - MRP
  • Reserved for Future Use
  • Reserved for Custom Use
  • 2000000–2999999
  • 2000000–2099999
  • 2100000–2199999
  • 2200000–2299999
  • 2300000–2399999
  • 2400000–2499999
  • 2500000-2599999
  • 2600000-2699999
  • 2700000-2899999
  • 2900000-2999999

Rollup

  • General
  • ASC
  • IAS
  • Reserved for Future Use
  • Reserved for Custom Use
  • 3000000–3999999
  • 3100000–3199999
  • 3200000–3299999
  • 3300000-3899999
  • 3900000-3999999

Query

  • General
  • Common
  • ASC
  • IAS
  • ASC - MRP
  • IAS - MRP
  • Reserved for Future Use
  • Reserved for Custom Use
  • 4000000–4999999
  • 4000000–4099999
  • 4100000–4199999
  • 4400000–4499999
  • 4500000-4599999
  • 4600000-4699999
  • 4700000-4799999
  • 4900000-4999999

Event

  • General
  • ASC
  • IAS
  • LTP
  • P2
  • Reserved for Future Use
  • Reserved for Custom Use
  • 5000000–5999999
  • 5100000–5199999
  • 5500000–5599999
  • 5700000-5709999
  • 5750000-5759999
  • 5800000-5899999
  • 5900000-5999999

For an optimal Community experience, Please view on Desktop