Projects:StornoInvoice
Contents |
Project branch
- The project's branch (module code): https://code.openbravo.com/erp/pmods/org.openbravo.storno.invoice
- The project's home page: http://forge.openbravo.com/projects/stornoinvoice
- Enforcements: dalsasua
- Module
- Name: Storno Invoice
- Type: Module
- DB Prefix: STORNO
- Java package: org.openbravo.storno.invoice
Description
Storno Invoice module provides new document types that allows user to create purchase and sales invoices that, when posted, do generate the same entry as the invoice, but with opposite sign. For example, a sales invoice with one line of $1,000 and 18% VAT tax will generate:
In case of using a ARInvoice document type:
Account | Debit | Credit |
Revenue | 1,000 | |
VAT | 180 | |
Customer | 1,180 |
In case of using a Storno Sales Invoice document type:
Account | Debit | Credit |
Revenue | -1,000 | |
VAT | -180 | |
Customer | -1,180 |
Configuration Guide
Once the module is installed, the dataset included must be applied to the desired organization, and two steps must be followed:
Application Dictionary
The validation of the column Transaction Document of the Invoice table must be changed. Core uses validation "C_DocType AR/AP Invoices and Credit Memos". For this module to work must use the validation "STORNO_Invoide Doc Type Validation" included in the module. In order to do this, it's recommended to implement the change in an industry template (such as Universities Template):
<columnDataChange tablename="AD_COLUMN" columnname="AD_VAL_RULE_ID" pkRow="3781"> <oldValue><![CDATA[124]]></oldValue> <newValue><![CDATA[70E6112CF4D847D5A64DE0FEFE5DAF73]]></newValue> </columnDataChange>
If the module is installed alone, with no template, this change must be done manually:
- Through this SQL query:
update ad_column set ad_val_rule_id='70E6112CF4D847D5A64DE0FEFE5DAF73' where ad_column_id='3781';
- Through UI going to Application Dictionary || Tables and Columns || Table >> Column, for table C_Invoice and column C_DocTypeTarget_ID; then set the Validation to STORNO_Invoide Doc Type Validation
General Ledger configuration
In the path Financial Management || Accounting || Setup || General Ledger Configuration >> Active Tables, the user can find all the tables suitable to be posted for a given general ledger. One of them is the Invoice table. Click on it and go to the Documents sub-tab. There create two rows one for each document category below:
- Storno Purchase Invoice
- Storno Sales Invoice
In both, the "Accounting Template" to be set is Storno Documents Posting Logic. Finally the Allow Negative flag must be active.