Projects:IDL Extension Invoices/Functional Specification
Note: This module do not take into account Price List with tax included functionality
Contents |
Introduction
There is a project called Initial Data Load: "Within this project it is expected to develop a set of utilities, that will import into a fresh Openbravo ERP installation all the necessary data to start working with it." It's very recommendable to be familiarized with this project before continue reading. Here you have some documentation.
Invoices are not scoped in Initial Data Load project and many customers need to import invoices into their systems.
Purpose
The purpose of this project is to create a module that implement an Initial Data Load extension for loading Invoices into the system. The source of the data will be CSV files in predefined format. The implementor will have to fill up these files to use the utility.
Dependencies
- Initial Data Load 1.1.8
- Openbravo core 2.50
Fields and Validations
Everything or Nothing
The Load of the file follow the rule "Everything or Nothing". No matters how many lines were correctly processed that if only one was wrong nothing will be loaded. So if something was wrong fix the file and try again.
Document Sequence
- By default "Document No" will be used to identify the lines from the same invoice.
- If "Document No" is empty "Order Reference" will be used to identify the lines from the same invoice.
- Either "Document No" or "Order Reference" must be filled, otherwise it will show an error. **
- If both are filled "Document No" rules
- Either "Document No" or "Order Reference" will be used to identify the invoice as unique in the system loaded by IDL Extension for Invoices to prevent loading the file two times.
AUTO Mode
Suppose you have two suppliers that send you purchases invoices with the same number sequence but you don't want to take care about the DocumentNo. If you load leaving the DocumentNo in blank with the Order Reference filled the second invoice of the second supplier will show you an error because system think is repeated. To fix this exists AUTO mode.
If you put the word AUTO in the DocumentNo field the invoice will be loaded without checking if there are others in the system with the same DocumentNo.
IMPORTANT: If you use Auto mode the system wont prevent you if you try to load the same file two times!!!!!!
Default Values
You can use Default Values from IDL in almost all fields. They are situated on:
- Master Data Management || Initial Data Load || Setup || Entity Default Values || Entities >> Fields
Default values has preference when a field is empty
Prices
Prices can be set in three different ways:
1.- Fields Net Unit Price and Field Net List Price of the line 2.- Using Field Price List Version of the line 3.- Using Price List from the Header
Preference rules:
- Field Net Unit Price and Field Net List Price are first in preference.
- If Field Net Unit Price or Field Net List Price are empty it will get the price from Field Price List Version from the line.
- If Price List Version from the line is empty it will get the price from the Price List from the Header.
Notes
- A field it will be considered empty if:
1.- It's empty in the file (CSV) 2.- Don't have a default value in the application
- AUTO FILLED tag means field don't appear in the file (CSV)
- Use the "value" field to fill the referenced entities (org, partner, project, etc...). In case the entity doesn't have value, name will be used.
- Exception: "Form Of Paymet" is a list with value and name. In this case Name will be used because is more descriptive.
--
Header
1. Is Sales Order Transaction *
- Validation: TRUE / FALSE
- Mandatory
Client
- AUTO FILLED with the Client you are logged
2. Organization *
- Validation: Organization exists in system
- Mandatory
3. Document No. **
- If it's empty Transaction Document will be used
4. Order Reference **
5. Description Header
6. Transaction Document *
- Validation: Transaction Document exists in system and is for invoices
- Mandatory
7. Invoice Date *
- Mandatory
8. Accounting Date
- Validation: Invoice Date included on an open period
- If it's empty Invoice Date will be used
9. Tax Date
- If it's empty Invoice Date will be used
10. Business Partner *
Validation: Organization exists in system Mandatory
Partner Address
- AUTO FILLED with the Location/Address of the Partner checked with "Invoice to Address"
11. User/Contact
- If it's empty data from the Partner will be used
12. Price List
- If it's empty data from the Partner will be used
Currency
- AUTO FILLED with the Price List data
13.Sales Representative / Company Agent
- If it's empty data from the Partner will be used
14. Print Discount
- If is empty FALSE will be default value
- Validation: TRUE / FALSE
15. Form of Payment
- If it's empty data from the Partner will be used
- Exception: "Form Of Paymet" is a list with value and name. In this case Name will be used because is more descriptive.
16. Payments Terms
- If it's empty data from the Partner will be used
17. Project
- Validation: Project exists in system
--
Lines
18. Financial Invoice Line
- If is empty FALSE will be default value
- Validation: TRUE / FALSE
19. Account
- Only if "Financial Invoice Line" = Y
- Validation: G/L Item exists in system and has "Enable In Financial Invoices" = TRUE
20. Product
- Only if "Financial Invoice Line" = N
- Validation: Product exists in system
21. Description Lines
22. Invoiced Quantity *
- Mandatory
UOM
- AUTO FILLED with the Product data
23. Price List Version
- If Net Unit Price is empty must be filled.
24. Net Unit Price
- If it's empty data from the Price List Version will be used. If Price List Version is empty must be filled.
25. Net List Price
- If it's empty data from the Price List Version will be used. If Price List Version is empty Net Unit Price will be copied.
26. Tax
- If it's empty data from the Product will be used
- Validation: Tax exists in system
- Tax only can be empty if the amount of the line is 0
Line Net Amount
- AUTO FILLED AutoCalculated
--
Final Status of Invoice
Field Process
The last field indicates if the invoice will be imported in Draft Status or Completed.
27. Process *
- Mandatory
- Validation: TRUE / FALSE
- TRUE : Invoice will be processed after been imported. Final Status: Completed
- FALSE : Invoice will not be processed after been imported. Final Status: Draft
Note: Invoice are processed just after import all the lines so if there is a problem processing one invoice that ends on line X of the file the error will be showed on line (X+1) with a message like this:
PREVIOUS Invoice with DocumentNo / OrderReference : 100043 / NA1222 can't be processed : ERROR: The Period does not exist or it is not opened
Field Invoice Loaded by IDL
There is a read-only field on invoices called "Invoice Loaded by IDL" that only appears if the invoice had been loaded with IDL Extension for Invoices.
The possible values are:
- Only Loaded Not Processed
- Loaded and Processed
--
Withholding (Only Purchase Invoices)
28. Withholding Only apply to Header
- Validation: Withholding exists in system
29. Exclude for Withholding Only apply to Lines
- If is empty FALSE will be default value
- Validation: TRUE / FALSE
Files Example
Files must be codified as UTF-8 to avoid problems with special characters