View source | Discuss this page | Page history | Printable version   

Cash VAT Management/Technical Documentation

Contents

Introduction

The Cash VAT management development is split in Core and an external module called Cash VAT Management, that can be installed from the Central Repository.

All the business logic is directly implemented in Core, and the external module only contains the User Interface artifacts (Tabs and Fields). This is an easy way to hide this functionality for the clients that won't use it.

Database

New Columns

C_Tax

Column Datatype Nullable Default On Create Default Foreign Key Foreign table AD Reference Description Other Info
IsCashVAT CHAR(1 BYTE) No No No No YesNo Cash VAT Tax Rate Show only when Tax Deductible=Y

C_AcctSchema_Default

Column Datatype Nullable Default On Create Default Foreign Key Foreign table AD Reference Description
T_Due_Trans_Acct CHARACTER VARYING(32 BYTE) Yes Null Null Yes C_ValidCombination Valid Combination Selector Transitory account for Cash VAT operations (Due)
T_Credit_Trans_Acct CHARACTER VARYING(32 BYTE) Yes Null Null Yes C_ValidCombination Valid Combination Selector Transitory account for Cash VAT operations (Credit)


C_Tax_Acct

Column Datatype Nullable Default On Create Default Foreign Key Foreign table AD Reference Description
T_Due_Trans_Acct CHARACTER VARYING(32 BYTE) Yes Null Null Yes C_ValidCombination Valid Combination Selector Transitory account for Cash VAT operations (Due)
T_Credit_Trans_Acct CHARACTER VARYING(32 BYTE) Yes Null Null Yes C_ValidCombination Valid Combination Selector Transitory account for Cash VAT operations (Credit)

C_BPartner

Column Datatype Nullable Default On Create Default Foreign Key Foreign table AD Reference Description Other Info
IsCashVAT CHAR(1 BYTE) No No No No YesNo Cash VAT Tax Rate Show only in Vendor tab

AD_OrgInfo

Column Datatype Nullable Default On Create Default Foreign Key Foreign table AD Reference Description Other Info
IsCashVAT CHAR(1 BYTE) No No No No YesNo Cash VAT Tax Rate Show only for legal entities

C_Invoice

Column Datatype Nullable Default On Create Default Foreign Key Foreign table AD Reference Description Other Info
IsCashVAT CHAR(1 BYTE) No No No No YesNo Cash VAT Tax Rate Inherit the value from C_BPartner in Purchase Invoice. Editable

Inherit the value from AD_OrgInfo in Sales Invoice. Editable

C_Order

Column Datatype Nullable Default On Create Default Foreign Key Foreign table AD Reference Description Other Info
IsCashVAT CHAR(1 BYTE) No No No No YesNo Cash VAT Tax Rate Inherit the value from C_BPartner in Purchase Order. Editable

Inherit the value from AD_OrgInfo in Sales Order. Editable

New Tables

C_Invoice_Tax_CashVAT


Column Datatype Nullable Default Foreign Key Foreign table AD Reference Description Other Info
C_Invoice_Tax_CashVAT_ID VARCHAR2(32 BYTE) No get_uuid() No ID
AD_CLIENT_ID VARCHAR2(32 BYTE) No Yes AD_Client TableDir
AD_ORG_ID VARCHAR2(32 BYTE) No Yes AD_Org TableDir
ISACTIVE CHAR(1 BYTE) No Yes No YesNo
CREATED DATE No now() No DateTime


CREATEDBY VARCHAR2(32 BYTE) No No Search
UPDATED DATE No now() No DateTime


UPDATEDBY VARCHAR2(32 BYTE) No No Search
C_INVOICETAX_ID VARCHAR2(32 BYTE) No Yes C_INVOICETAX TableDir The C_Tax_ID can be reached through the c_invoicetax table
PERCENTAGE_TAX NUMERIC No No Amount Stores the percentage of the c_invoicetax paid with this line
AMOUNT_TAX NUMERIC No No Amount Stores the amount of the c_invoicetax paid with this line
FIN_Payment_ScheduleDetail_ID VARCHAR2(32 BYTE) Yes Yes FIN_Payment_ScheduleDetail TableDir Filled when the line comes from a FIN_Payment.
C_Invoice_CashVAT_EndYear_ID VARCHAR2(32 BYTE) Yes No TableDir Filled when the line comes from a C_Invoice_CashVAT_EndYear

Modify Triggers

C_Tax_TRG

C_InvoiceLine_TRG

Modify PL/SQL functions

C_Order_Post

C_Invoice_Post

C_GetTax

In case of an exception, the callout will call a new pl/sql function (c_gettax_override_cashvat), which will be based on the c_gettax, but that will override the organization/business partner cash VAT configuration. Otherwise the behaviour will be the same. This way we ensure we don't break the API in any manner.

New PL/SQL functions

C_GetTax_Override_CashVAT

Java

Modify Callouts

SE_Invoice_BPartner

SE_Order_BPartner


SL_Invoice_Product

SL_Order_Product


SL_Invoice_Amt

SL_Order_Amt

New Callouts

SE_Invoice_Organization

SE_Order_Organization

SE_Organization_NotTaxDeductable

SE_TaxRate_Withholding

Modify Java processes

InitialSetupUtility.java


FIN_PaymentProcess.java

Accounting engine

The usage of the Cash VAT transitory accounts forces us to modify the accounting engine:

Modify DocInvoice

Modify DocFINPayment

DocFINFinAccTransaction

DocFINReconciliation

Open Topics

How and when to create the Invoice Cash VAT documents?

VMA: we have different possibilities to automatically create the document:

VMA: We need also to decide when the document should be created (and this will give us the way to implement it). For example, shall we create the document when the payment is created or posted, or when the transaction is created or posted, or when the reconciliation is created or posted? Alternatively, should we create a configuration in the Payment Method to configure this behaviour?


ANSWER: The C_Invoice_Tax_CashVAT records will be created when processing the payment. However the accounting entries that represents the movement of the cash VAT amounts from the transitory accounts to the final ones will be executed when the payment/transaction/reconciliation is posted

Is it necessary to modify the Orders Accounting?

ANSWER: No, it is not necessary

Is it necessary to modify the Payment, Transaction or Reconciliation accounting?

VMA: I don't think it's necessary since these documents don't take taxes into account

ANSWER: It's necessary to move the cash VAT amounts from the transitory accounts to the final ones in the same moment where the payment, transaction or reconciliation have been posted

Retrieved from "http://wiki.openbravo.com/wiki/Cash_VAT_Management/Technical_Documentation"

This page has been accessed 5,067 times. This page was last modified on 11 November 2015, at 10:40. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.