Projects:Growthmachine/Technical Documentation
Contents |
Growth Machine project
Module Definition
A module must be created with the following parameters:
- Name: Growth Machine
- Version: 0.1.0
- Java package: org.openbravo.growthmachine
- Description: The Growth Machine Project.
- Language: En_US
- License: Commercial
- License Text: Advanced Payables and Receivables is based on the Openbravo Commercial License that can be found here: http://www.openbravo.com/legal/OBCL10/BasicLicense.html
- Author: Openbravo S.L.
In the dependency tab:
- Dependant on core
In the prefix tab: Prefix=OBGM (OpenBravo Growth Machine)
In the datapackage tab: org.openbravo.growthmachine.data
Discount Coupon Window
This will be an maintain window that should be in "Master Data Management || Business Partner Setup || Discount Coupon || Header "
Window Specification
- Name: Discount Coupon
- Window type: Maintain
This window will have only one tab named header with the following fields
- Active
- Business Partner Category
- Client for this installation.
- Discount - The percentage price reduction based on the list price.
- Discount Coupon - Table ID
- Organization
- Product
- Valid from Date
- Valid to Date
Database Structure
Field | Type | Grid | Mandatory | Description |
C_DISCOUNT_ID | TABLEDIR | Yes | Yes | User will register the discount that wants establish controls to.
It will be a reference to the Discounts table ("C_Discount") |
C_BP_GROUP_ID | TABLEDIR | Yes | No | Partner Category that this Coupon will apply to.
It will be a reference to the new Business Partner Level table (created in contract repository module) |
M_PRODUCT_ID | TABLEDIR | Yes | No | User will indicate the Product that this Coupon will apply to.
It will be a reference to the Product table ("M_PRODUCT") |
Valid From Date | Date | Yes | No | Informative start date |
Valid To Date | Date | Yes | No | Informative end date |
Sales Region Management
- Changes have been done in the following tables for Sales Region
C_COUNTRY Table
A new field is added as follows
Field | Type | Grid | Mandatory | Description |
EM_OBGM_C_SALESREGION_ID | TABLEDIR | Yes | Yes | It is a reference to Sales Region table |
M_Pricelist Table
A new field is added as follows
Field | Type | Grid | Mandatory | Description |
EM_OBGM_C_SALESREGION_ID | TABLEDIR | Yes | NO | It is a reference to Sales Region table.It is having display logic so it
will only be visible when “Sales Price List” = ‘Y’ |
C_BANKACCOUNT Table
A new field is added as follows
Field | Type | Grid | Mandatory | Description |
EM_OBGM_BANKACCOUNT_ID | TABLEDIR | Yes | NO | Register the Openbravo’s bank account to be used in Wired Transfers paid
by partners that belong to this sales region |
Changes in product
In Order to manage the diferent product between the partners, a new field in the database is going to create.
Field | Type | Grid | Mandatory | Description |
EM_OBGM_PARTNER_LEVEL | List | Yes | No | This list will be able to take following values:
Registered (Default Value Certified Gold Platinum |
Additionally we will create a trigger to control that when inserting or updating a Product, if its Product Category is “Partner fees” the Partner Level must be informed.
Business Partner
- Changes have been done in the following tables for Business Partner
AD_USER Table
A new fields are added as follows
Field | Type | Grid | Mandatory | Description |
EM_OBGM_FINANCEADMINCONTACT | Yes/No | No | No | Boolean type variable in Contact Tab |
EM_OBGM_PRIMARYCONTACT | Yes/No | No | No | Boolean type variable in Contact Tab |
C_BPARTNER Table
A new fields are added as follows
Field | Type | Grid | Mandatory | Description |
EM_OBGM_C_SALESREGIONID | TableDir | No | No | It is a reference to Sales Region table. |
EM_OBGM_PRINCIPALTERRITORY | String | No | No | |
EM_OBGM_TERRITORIALLOCATION | String | No | No | |
EM_OBGM_PHONE | Numeric | No | No | |
EM_OBGM_FAX | Numeric | No | No | It is a reference to Sales Region table. |
EM_OBGM_SYSTEMINTEGRATOR | Yes/No | No | No | Its under the group of Partner Type |
EM_OBGM_ISV | Yes/No | No | No | Its under the group of Partner Type |
EM_OBGM_VAR | Yes/No | No | No | Its under the group of Partner Type |
EM_OBGM_OTHER | Text | No | No | Its under the group of Partner Type |
A new trigger 'OBGM_BPARTNER_TABLE', is added to control that when updating a business partner the Sales Region, Principal Territory, Territorial Location, Phone, FAX and at least one of the Partner Type fields must be informed for this conditions:-
When Business Partner is a Customer (IsCustomer = ‘Y’)
When Business Partner Category is one of these
- Certified Partner
- Gold Partner
- Platinum Partner
- Registered Partner
- Direct clients
C_BPARTNER_LOCATION Table
Two new fields in order to manage if the location is a headquarters or not
Field | Type | Grid | Mandatory | Description |
EM_OBGM_ISHEADQUARTER | Yes/No | No | No | Boolean type variable |
EM_OBGM_ISLEGALNOTICES | Yes/No | No | No | Boolean type variable |
OBGM_PROFORMA_MANAGEMENT Table - Proforma Management
A new window called “Pro forma management” is built. This window has a single tab including following information
Field | Type | Grid | Mandatory | Description |
PROFORMA | Tabledir | Yes | Yes | It will be a reference to Sales Order table |
Status | List | Yes | Yes | It will be a reference to New Pro forma Status List
with following values(New,Obsolete,Execution,Payment Error,Paid) |
Accepted | Yes/No | Yes | Yes | Default value: ‘N’ |
Bank account | Text | Yes | No | We will register the OBs bank account used for this Pro forma |
Partner_Level | Text | Yes | No | We will register the Partner Level input parameter |
PROFORMA_DATE | Date | Yes | No | We will register current date (sysdate) |
DISCOUNT_COUPON | Text | No | No | We will register the Discount Coupon entered by user |
PAYMENT_METHOD | List | No | No | Reference to new Payment forms list with values,
(Credit Card,Wired Transfer) |
PAYMENT_FEEDBACK | Text | No | No | - |
FOLIORELEASE | Text | No | No | - |
PROJECT_LEADER | Text | No | No | - |
PROJECT_EMAIL | Text | No | No | - |
PURCHASED_CONCURRENT_USERS | Text | No | No | - |
END_CLIENT | Text | No | No | - |
Partner Adquisition Wizard Window
In order to manage the partner adquisition wizard window we need to create a new special form
- Name: Partner Adquisition
- Data Access Level : Client/Organization
- Java Class Name: org.openbravo.growthmachine.PartnerAdquisition
Form Class
- org.openbravo.growthmachine.PartnerAdquisition
And of course this wizard window is going to manage 4 diferents html windows, all of these windows will be controled by one java class but we need to create one mapping per html. Form Mapping
- /ad_forms/partnerAdquisition_W1.html
- /ad_forms/partnerAdquisition_W2.html
Wizard window 1 - Contract Reference
This is the window in charge of creating a new BP and also the contacts related with the business partner. In order to manage the relation between the app. and the database we are going to use DAL.
Quotation
After creating sales order in PartnerAdquisition.java, there will a method called 'saveProforma' to store proforma intermediate values by DAL.