Purpose of the Project

The purpose of this document is to describe the Technical Specifications required for a new extension module called Gross Amounts in Invoices and Orders.

Introduction

This Technical Specification document outlines the implementation of Gross Amounts in Invoices and Orders feature.

High Level Functional Requirements

This module will provide the following functionalities:

1. Public Sector organizations to enter and properly post either Gross or Net amount “National” purchase invoices in the system. Public Sector organizations cannot deduct VAT paid which means VAT amount is an expense for them.

3. Public Sector organizations and Commercial Units to enter and properly post Net amount “Intra-community” purchase invoices in the system. Intra-community purchase invoice do not include VAT regardless of what VAT must be paid at destination country. Public Sector organizations will not be able to deduct Intra-community VAT but Commercial organizations.

Technical Implementation

Module Definition

Name: Gross Amounts in Invoices and Orders

Java Package: org.openbravo.module.grossamountinvoicelines

Version: 1.0.0

Description: Gross amounts (Amounts including Taxes) can be entered at order/invoice line Level

Help/Comment: This module will allow the end user to enter in the system Gross Amounts (Amounts including Taxes, by example VAT), at sales/purchase order line level as well as sales/purchase invoice line level. The system will re-calculate Net amounts based on the Gross amount and tax amount entered by the end-user

Translation Required: checked

Module Language: English

IsCommercial: checked

License Type=OB Commercial License

License Text=Licensed under the Openbravo Commercial License version 1.0. You may obtain a copy of the License at http://www.openbravo.com/legal/obcl.html or in the legal folder of the Openbravo ERP core distribution.

Author/Licensor = Openbravo S.L.

URL = forge.openbravo.com/projects/amountandvat

Dependency with: core

DB Prefix:GNAT

High Level Technical Requirements

1. In Purchase/Sales Order/Invoice Header, the following fields are to be renamed.

1.1 Summed Line Amount as Total Net Amount

1.2 Grand Total Amount as Total Gross Amount

2. In Purchase/Sales Order/Invoice Lines tab, the following new fields are to be added in Amounts section.

2.1 Tax Amount

2.2 Gross Unit Price

2.3 Gross List Price

2.4 Gross Standard Price (in case of Purchase/Sales Orders)

2.5 Line Gross Amount

2.6 Edit Line Net Amount - flag used to allow the end-user to edit Line Net Amount field.

2.7 Edit Line Gross Amount - flag used to allow the end-user to edit Line Gross Amount field.

3. In Purchase/Sales Order/Invoice Lines tab, the following fields are to be renamed.

4. In Purchase/Sales Invoice Lines tab, the Line Net Amount field is to be modified as editable one based on Edit Line Net Amount flag and it must be moved to Amounts section.

5. If Edit Line Net Amount is checked, then it is normal OB behavior(means considered as Net Amount Invoice). So the user can able to enter/edit Line Net Amount field and choose the Tax. Based on these inputs, the System must calculate the following.

5.1 Tax Amount= Line Net Amount * VAT Rate/100

5.2 Line Gross Amount= Line Net Amount + Tax Amount

5.3 Gross Unit Price= Net Unit Price + (Net Unit Price* VAT Rate/100)

6. If Edit Line Gross Amount is checked, then it means the invoice is considered as Gross Amount Invoice. So the user can able to enter/edit Line Gross Amount field and choose the Tax. Based on these inputs, the System must calculate the following.

6.1 Tax Amount= Line Gross Amount * VAT Rate/(100 + VAT Rate)

6.2 Line Net Amount= Line Gross Amount *100 / (100 + VAT Rate)

6.3 Gross Unit Price= Net Unit Price + (Net Unit Price* VAT Rate/100)

To Implement above functionalities (5 and 6), we need to write a callout that updates the Tax Amount, Line Gross Amount and Gross Unit Price, while Line Net Amount is edited and updates the Tax Amount, Line Net Amount and Net Unit Price, while Line Gross Amount is edited.