Projects:IDLOrders
Contents |
Initial Data Load Extension for Orders - Functional Specifications
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.
Orders were not scoped in the Initial Data Load project so here it is an extension than would cover their load into the system.
Note: This module will not work with price list using "Price including taxes" functionality
Purpose
The purpose of this project is to create a module that implement an Initial Data Load extension for loading Orders into the system. The source of the data will be CSV files in predefined format. The implementator will have to fill up these files to use the utility.
Dependencies
- Initial Data Load 3.0.32
- Openbravo core 3
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 order.
- If "Document No" is empty "Order Reference" will be used to identify the lines from the same order.
- 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 order as unique in the system loaded by IDL Extension for Orders to prevent loading the file two times.
AUTO Mode
Suppose you have two suppliers that send you purchase orders 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 order 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 order 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!!!!!!
Note: This module will not work with price list using "Price including taxes" functionality
Default Values
You can use Default Values from IDL in almost all fields. They should be created in:
- 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
Note: This module will not work with price list using "Price including taxes" functionality
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:
- It's empty in the file (CSV)
- 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 any value, name will be used.
- Exception: "Form Of Payment" 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 **
- Indicates reference of supplier order
5. Description Header
- Description for the header
6. Transaction Document *
- Validation: Transaction Document exists in system and is for orders
- Mandatory
7. Order Date *
- Mandatory
8. Accounting Date
- Validation: Order Date included on an open period
- If it's empty Order Date will be used
9. Promised Date
- If it's empty Order Date will be used
10. Business Partner Searchkey *
- Validation: checks if business partner with the indicated Search Key exists for the organization selected
- 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 Payment" 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. Invoice Terms
- It is considered Immediate as Invoice terms
18. Warehouse Search Key
- Validates if the warehouse with the indicated Search Key exists in the system
- It is mandatory
19. Project
- Validation: Project exists in the system
Lines
20. Product
- Validation: Product exists in system
- It is mandatory
21. Description Lines
- Description for order lines
22. Ordered 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 the Order
Field Process
The last field indicates if the order will be imported in Draft Status or Completed.
27. Process *
- Mandatory
- Validation: TRUE / FALSE
- TRUE : Order will be processed after it is been imported. Final Status: Completed
- FALSE : Order will not be processed after been imported. Final Status: Draft
Note: Orders are processed just after import all the lines so if there is a problem processing one order that ends on line X of the file the error will be showed on line (X+1) with a message like this:
PREVIOUS Order with DocumentNo / OrderReference : 100043 / NA1222 can't be processed : ERROR: The Period does not exist or it is not opened
Field Order Loaded by IDL
There is a read-only field on orders called "Order Loaded by IDL" that only appears if the order has been loaded with IDL Extension for Orders.
The possible values are:
- Only Loaded Not Processed
- Loaded and Processed
--
Files Example
Files must be codified as UTF-8 to avoid problems with special characters