This is a demo order management application (backend and frontend).
To import this module:
- Create a module named
Demo
- Set the settings as:
{
"type": "git",
"origin": {
"uri": "https://github.com/simplicitesoftware/module-demo.git"
}
}
- Click on the Import module button
In order to have the frontend examples working the password for the
webservices-only user website
must be simplicite
.
This can be achieved by importing the following XML:
<?xml version="1.0" encoding="UTF-8"?>
<simplicite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.simplicite.fr/base" xsi:schemaLocation="http://www.simplicite.fr/base https://www.simplicite.io/resources/schemas/base.xsd">
<object>
<name>UserPwd</name>
<action>update</action>
<data>
<usr_login_read>website</usr_login_read>
<usr_password>simplicite</usr_password>
</data>
</object>
</simplicite>
Some sample data is provided as a module's dataset. It contains:
- Sample providers
- Sample products
- Sample customers
Open this dataset and click on the Apply button after having imported the module and made a full clear cache.
This module can be analysed by the SonarQube analysis tool using this command:
mvn verify sonar:sonar
The contact object holds the interactions with the clients.
A contact can be linked or not a an order of the selelcted client
(when linked to an order the demoCtcOrdId
field is set).
Name | Type | Required | Updatable | Personal | Description |
---|---|---|---|---|---|
demoCtcDatetime |
datetime | yes* | Contcat date and time | ||
demoCtcType |
enum(10) using DEMO_CTC_TYPE list |
yes | yes | Contact type | |
demoCtcSubType |
enum(10) using DEMO_CTC_SUBTYPE list |
yes | Contact sub type | ||
demoCtcCanal |
enum(10) using DEMO_CTC_CANAL list |
yes | yes | Canal used for contact | |
demoCtcPriority |
boolean | yes | yes | Contact priority | |
demoCtcStatus |
enum(1) using DEMO_CTC_STATUS list |
yes | yes | Contact status | |
demoCtcCliId link to DemoClient |
id | yes* | yes | Contact customer | |
Ref. demoCtcCliId.demoCliCode |
regexp(10) | Customer code | |||
Ref. demoCtcCliId.demoCliFirstname |
char(100) | yes | Customer first name | ||
Ref. demoCtcCliId.demoCliLastname |
char(100) | yes | Customer last name | ||
Ref. demoCtcCliId.demoCliEmail |
email(50) | yes | Customer email address | ||
Ref. demoCtcCliId.demoCliHomePhone |
phone(20) | yes | Customer home phone number | ||
Ref. demoCtcCliId.demoCliWorkPhone |
phone(20) | yes | Customer work phone number | ||
Ref. demoCtcCliId.demoCliMobilePhone |
phone(20) | yes | Customer mobile phone number | ||
Ref. demoCtcCliId.demoCliFax |
phone(20) | yes | Customer fax number | ||
demoCtcOrdId link to DemoOrder |
id | yes | Contact order | ||
Ref. demoCtcOrdId.demoOrdNumber |
int(11) | Order number (automatically calculated at creation) | |||
Ref. demoCtcOrdId.demoOrdDate |
date | Order date | |||
Ref. demoCtcOrdId.demoOrdStatus |
enum(30) using DEMO_ORD_STATUS list |
Order status | |||
Ref. demoCtcOrdId.demoOrdCliId |
id | Order customer | |||
Ref. demoOrdCliId.demoCliCode |
regexp(10) | Customer code | |||
Ref. demoCtcOrdId.demoOrdPrdId |
id | Order product | |||
Ref. demoOrdPrdId.demoPrdSupId |
id | Product supplier | |||
Ref. demoPrdSupId.demoSupCode |
regexp(50) | Supplier unique code (e.g. MYSUP ) |
|||
Ref. demoPrdSupId.demoSupUsrId |
id | User responsible of supplier | |||
Ref. demoOrdPrdId.demoPrdReference |
regexp(10) | Product reference | |||
Ref. demoOrdPrdId.demoPrdName |
char(100) | Product name | |||
Ref. demoCtcOrdId.demoOrdQuantity |
int(11) | Product quantity ordered | |||
demoCtcFile |
document | yes | Contact attached file | ||
demoCtcPicture |
image | yes | - | ||
demoCtcMessages |
notepad(50000) | yes | yes | Messages |
DEMO_CTC_TYPE
INF
InformationREQ
RequestCMP
ComplaintOTH
Other
DEMO_CTC_SUBTYPE
EMPTY
DEMO_CTC_CANAL
PHONE
Code PHONEEMAIL
Code EMAILCHAT
Code CHATWEB
Code WEB
DEMO_CTC_STATUS
O
OpenC
ClosedP
Processing
DEMO_ORD_STATUS
P
Pending statusH
On holdV
Validated statusD
Shipped statusC
Canceled status
Contact object history, tracks changes on:
- Status
- Type and/or subtype
- Comments
Name | Type | Required | Updatable | Personal | Description |
---|---|---|---|---|---|
row_ref_id link to DemoContact |
id | yes* | Record row ID | ||
row_idx |
int(11) | yes* | yes | History record index | |
created_by_hist |
char(100) | yes* | Created by | ||
created_dt_hist |
datetime | yes* | Created date | ||
demoCtcStatus |
enum(1) using DEMO_CTC_STATUS list |
yes | yes | Contact status | |
demoCtcType |
enum(10) using DEMO_CTC_TYPE list |
yes | yes | Contact type | |
demoCtcSubType |
enum(10) using DEMO_CTC_SUBTYPE list |
yes | Contact sub type |
DEMO_CTC_STATUS
O
OpenC
ClosedP
Processing
DEMO_CTC_TYPE
INF
InformationREQ
RequestCMP
ComplaintOTH
Other
DEMO_CTC_SUBTYPE
EMPTY
The order business object corresponds to the product orders placed by clients.
An order is for one single product.
Name | Type | Required | Updatable | Personal | Description |
---|---|---|---|---|---|
demoOrdNumber |
int(11) | yes* | Order number (automatically calculated at creation) | ||
demoOrdDate |
date | Order date | |||
demoOrdStatus |
enum(30) using DEMO_ORD_STATUS list |
yes | yes | Order status | |
demoOrdDeliveryDate |
datetime | yes | Order delivery date | ||
demoOrdCliId link to DemoClient |
id | yes* | yes | Order customer | |
Ref. demoOrdCliId.demoCliCode |
regexp(10) | Customer code | |||
Ref. demoOrdCliId.demoCliFirstname |
char(100) | yes | Customer first name | ||
Ref. demoOrdCliId.demoCliLastname |
char(100) | yes | Customer last name | ||
Ref. demoOrdCliId.demoCliEmail |
email(50) | yes | Customer email address | ||
Ref. demoOrdCliId.demoCliAddress1 |
char(100) | yes | Customer address (line 1) | ||
Ref. demoOrdCliId.demoCliAddress2 |
char(100) | yes | Customer address (line 2) | ||
Ref. demoOrdCliId.demoCliZipCode |
char(10) | yes | Customer postal code | ||
Ref. demoOrdCliId.demoCliCity |
char(50) | yes | Customer city | ||
Ref. demoOrdCliId.demoCliCountry |
enum(30) using DEMO_COUNTRY list |
yes | Customer country | ||
demoOrdPrdId link to DemoProduct |
id | yes* | yes | Order product | |
Ref. demoOrdPrdId.demoPrdReference |
regexp(10) | Product reference | |||
Ref. demoOrdPrdId.demoPrdName |
char(100) | Product name | |||
Ref. demoOrdPrdId.demoPrdType |
enum(50) using DEMO_PRD_TYPE list |
Product type | |||
Ref. demoOrdPrdId.demoPrdPicture |
image | Product picture | |||
Ref. demoOrdPrdId.demoPrdSupId |
id | Product supplier | |||
Ref. demoPrdSupId.demoSupCode |
regexp(50) | Supplier unique code (e.g. MYSUP ) |
|||
Ref. demoPrdSupId.demoSupName |
char(100) | Supplier name | |||
Ref. demoPrdSupId.demoSupLogo |
image | Supplier logo | |||
Ref. demoPrdSupId.demoSupUsrId |
id | User responsible of supplier | |||
Ref. demoOrdPrdId.demoPrdStock |
int(11) | Current stock for product | |||
Ref. demoOrdPrdId.demoPrdUnitPrice |
float(11, 2) | Unit price of product | |||
demoOrdUnitPrice |
float(11, 2) | Product unit price for order | |||
demoOrdQuantity |
int(11) | yes | yes | Product quantity ordered | |
demoOrdTotal |
float(11, 2) | Total order amount | |||
demoOrdVAT |
float(11, 2) | VAT for order | |||
demoOrdComments |
notepad(50000) | yes | Comments on order |
DEMO_ORD_STATUS
P
Pending statusH
On holdV
Validated statusD
Shipped statusC
Canceled status
DEMO_COUNTRY
FR
FranceUK
United KingdomSP
Spain
DEMO_PRD_TYPE
LAPTOP
LaptopDESKTOP
DesktopTABLET
TabletSMARTPHONE
SmartphoneOTHER
Other
Order object history, tracks changes on:
- Status
- Quantity
Name | Type | Required | Updatable | Personal | Description |
---|---|---|---|---|---|
row_ref_id link to DemoOrder |
id | yes* | Record row ID | ||
row_idx |
int(11) | yes* | yes | History record index | |
created_by_hist |
char(100) | yes* | Created by | ||
created_dt_hist |
datetime | yes* | Created date | ||
demoOrdStatus |
enum(30) using DEMO_ORD_STATUS list |
yes | yes | Order status | |
demoOrdQuantity |
int(11) | yes | yes | Product quantity ordered |
DEMO_ORD_STATUS
P
Pending statusH
On holdV
Validated statusD
Shipped statusC
Canceled status
Product object history, tracks changes on:
- Product name
- Unit price
- Availability
Name | Type | Required | Updatable | Personal | Description |
---|---|---|---|---|---|
row_ref_id link to DemoProduct |
id | yes* | Record row ID | ||
row_idx |
int(11) | yes* | yes | History record index | |
created_by_hist |
char(100) | yes* | Created by | ||
created_dt_hist |
datetime | yes* | Created date | ||
demoPrdReference |
regexp(10) | yes* | yes | Product reference | |
demoPrdName |
char(100) | yes | yes | Product name | |
demoPrdUnitPrice |
float(11, 2) | yes | yes | Unit price of product | |
demoPrdAvailable |
boolean | yes | yes | Available product? |
The supplier business object corresponds to the suppliers of products that can be ordered.
Name | Type | Required | Updatable | Personal | Description |
---|---|---|---|---|---|
demoSupCode |
regexp(50) | yes* | yes | Supplier unique code (e.g. MYSUP ) |
|
demoSupName |
char(100) | yes | yes | Supplier name | |
demoSupDescription |
html(1000000) | yes | Supplier description | ||
demoSupPhone |
phone(20) | yes | Supplier phone number | ||
demoSupFax |
phone(20) | yes | Supplier fax number | ||
demoSupWebsite |
url(100) | yes | Supplier website URL | ||
demoSupEmail |
email(20) | yes | Supplier email address | ||
demoSupLogo |
image | yes | Supplier logo | ||
demoSupUsrId link to User |
id | yes | User responsible of supplier | ||
Ref. demoSupUsrId.usr_login |
regexp(100) | yes | Login | ||
demoSupComments |
notepad(50000) | yes | Comments on supplier |
The product business object corresponds to the products that can be ordered.
Its reference is unique per supplier.
Name | Type | Required | Updatable | Personal | Description |
---|---|---|---|---|---|
demoPrdSupId link to DemoSupplier |
id | yes* | yes | Product supplier | |
Ref. demoPrdSupId.demoSupCode |
regexp(50) | Supplier unique code (e.g. MYSUP ) |
|||
Ref. demoPrdSupId.demoSupName |
char(100) | Supplier name | |||
Ref. demoPrdSupId.demoSupLogo |
image | Supplier logo | |||
Ref. demoPrdSupId.demoSupUsrId |
id | User responsible of supplier | |||
demoPrdReference |
regexp(10) | yes* | yes | Product reference | |
demoPrdName |
char(100) | yes | yes | Product name | |
demoPrdType |
enum(50) using DEMO_PRD_TYPE list |
yes | yes | Product type | |
demoPrdDescription |
text(1000000) | yes | Product description | ||
demoPrdPicture |
image | yes | Product picture | ||
demoPrdEan13 |
char(13) | yes | EAN13 code | ||
demoPrdEan13Image |
image | EAN13 code image | |||
demoPrdStock |
int(11) | yes | yes | Current stock for product | |
demoPrdUnitPrice |
float(11, 2) | yes | yes | Unit price of product | |
demoPrdAvailable |
boolean | yes | yes | Available product? | |
demoPrdFeatured |
boolean | yes | yes | Featured product? | |
demoPrdDocumentation |
html(1000000) | yes | Product documentation | ||
demoPrdBrochure |
document | yes | Product brochure | ||
demoPrdOnlineDoc |
url(255) | yes | Online product documentation URL | ||
demoPrdComments |
notepad(50000) | yes | Comments on product |
DEMO_PRD_TYPE
LAPTOP
LaptopDESKTOP
DesktopTABLET
TabletSMARTPHONE
SmartphoneOTHER
Other
DEMO_DECSTOCK
: Product stock decrement triggered by the order state transition to shipped status.DEMO_PRD_EMAIL
: Send product information by emailDEMO_INCSTOCK
: Sample action for product stock increment (byN
specified in the product business object code).
The client business object corresponds to the customer who places order.
His address is geolocalized using GoogleMaps® API.
Name | Type | Required | Updatable | Personal | Description |
---|---|---|---|---|---|
demoCliCode |
regexp(10) | yes* | yes | Customer code | |
demoCliFirstname |
char(100) | yes | yes | yes | Customer first name |
demoCliLastname |
char(100) | yes | yes | yes | Customer last name |
demoCliAddress1 |
char(100) | yes | yes | yes | Customer address (line 1) |
demoCliAddress2 |
char(100) | yes | yes | Customer address (line 2) | |
demoCliZipCode |
char(10) | yes | yes | yes | Customer postal code |
demoCliCity |
char(50) | yes | yes | yes | Customer city |
demoCliCountry |
enum(30) using DEMO_COUNTRY list |
yes | yes | yes | Customer country |
demoCliCoords |
geocoords | yes | yes | Customer geoccordinates | |
demoCliEmail |
email(50) | yes | yes | Customer email address | |
demoCliHomePhone |
phone(20) | yes | yes | Customer home phone number | |
demoCliWorkPhone |
phone(20) | yes | yes | Customer work phone number | |
demoCliMobilePhone |
phone(20) | yes | yes | Customer mobile phone number | |
demoCliFax |
phone(20) | yes | yes | Customer fax number | |
demoCliType |
enum(30) using DEMO_CLI_TYPE list |
yes | yes | Customer type | |
demoCliComments |
html(1000000) | yes | Useful comments on customer | ||
demoCliPlacemapLabel |
char(100) | yes | Customer place map label |
DEMO_COUNTRY
FR
FranceUK
United KingdomSP
Spain
DEMO_CLI_TYPE
T1
Code T1T2
Code T2T3
Code T3
Order entry activity workflow
Begin
: Begin activityClientSelect
: Customer selection activitySupplierSelect
: Supplier selection activityProductSelect
: Selected supplier's product selection activityOrderCreate
: Order creation form activityEnd
: End activity
Custom JSON web service for getting the product catalog
Counters
Order delivery agenda
Place new order internal page