From ADempiere ERP WikiJump to navigationJump to search
- This page is for the proposal of an e-Ticketing system within the Sales Order of ADempiere.
- Sponsored by Energetic Point Sdn Bhd
- Will be based on e-Ticketing for Express Bus service between cities
- How many buses?
-- Model it on number of bus -- What is inside to measure? the seat. -- ie; 1 bus = 20 seats = 20 tickets
-- Location bus from Point A to Point B -- ie: Kuala Lumpur to Skudai
-- How many trips in 1 day? 1 month?
-- Petrol -- Driver -- Maintenance -- Insurance
- It is the intention of our team to reuse and build a vertical on top of the ADempiere Model, i.e. reusing its DataModel, AD features, application platform and ERP context.
- Business logic will follow the field Calllout and Process module
- Printouts will follow the Report and PrintFormat modules
- Customers will follow the BPartner model
- Bus and seating will follow the Product and Resource models
- Seating as children of a bus BOM will be a new model extension.
- Bookings to follow the InfoSchedule model.
- Thus ensuring heavy reuse or ready components and avoidance of model disruption.
- The Proof of Concept below will use the following 2 tables for simple test.
- You run these scripts in the PostgreSQL's SQL editor.
- As advised in ADempiere_Rapid_Development#Data_Modeling define your primary key as <table_name>_ID. Otherwise, the window you created from this table will give you a "pkey cannot be null" error whenever you try to add any item into it.
- This table is for route trips or schedule of trips available. It stores the origin (et_departure) to destinations (et_arrival) mappings.
- This table is for passenger bookings to check up available trips from the earlier table.
- After these tables are created in the database, you can bring them into the Application Dictionary through the Table and Column window.
e-Ticketing System Flow
Suggest to follow Airasia.com way
- 1st the customer go to the site.
- 2nd they choose their route Destination (origin and destination). Pls bear in mind that the system will check from the point of origin, which destination is available.
- 3rd the time (departure date and arrival date) must be selected. A small calendar button will be put next to the form of departure date and arrival date.
- The system will then check for availability of date and seat and return the value to user with price. The user then will be able to make the booking provided seats are/is available.
- Optional : The customer can choose their sitting on the bus
- Then the customer login to the system and will do the transaction using Credit Card
- The e-Ticket will be emailed to the user for reference and bring it during travelling
Proof of Concept
- We could quickly prototype a POC by building 2 tables :-
- one for Vehicle Schedule containing Bus Registration Numbers for each trip;
- and one for Trip Booking to call-up the Vehicle Schedule and return the right Bus Registration No.
- The Table Reference and Dynamic Validation are used to allow a trip planner pull down list that shows only available trips.
- Screen-shots below illustrate the Ajax interface outcome. The Java Client outcome is same.
- To incorporate schedule confirmation and seating selection as 2 extra tabs under the Sales Order Window.
- As the 3rd tab's schedule is confirmed, the 4th tab shall display the available seating to choose from.
- As the seat number is/are chosen, all built information is put as Description in the OrderLine tab.
- The relevant ticket product with correct pricing is extracted from PriceList Version table.
- The number of seats is translated to the OrderLine Quantity.
- Alternatively all this extra work can be put into one single 3rd Tab.
- Image above showing the bus schedule.
- Pull down lists validated against Bus Schedule above. A Java Callout returns the value of the Bus RegNo and writes it to the Description field, as well as the Departure and Arrival venues.
Refer to Reference Table with Dynamic Validation for details to achieve this effect.
- The callout org.compiere.model.CalloutBooking.getAvailable is placed in the Table and Column window, Column Tab.Field = ET_TripEnd.
Reporting On The Fly
- In the Booking window click on the Report icon.
- In the pop-up report viewer, click on the Search icon.
- Click OK to select all records.