Fleet management system with Symfony 2, php, MySQL; TeamERP Transport

TeamERP Transport Symfony 2

Updated on 2014-05-19.

I have been programming for one week and I have a transport module that can work for different situation now. I have released it as a MIT license so that any one can use it or do what ever they want with it. My objective is to create a truly free ERP system. But you have to start somewhere, and I have decided that the transport module could be a nice module. This module is a software that can be used to record transport expenses and to follow the cars movements. It’s not a tracking systems. but in the future I an planning to integrate it with one of this projects. the project was developed with Symfony 2; php, MySQL.

In this document I described the Symfony 2 development process for the development of a Fleet management system. I started from scratch to what I currently have and it took me one week of work. The project is going to be used by a friend of mine company. All the iterations and problems found along a real life development process will be posted here. This document is about the Transport module and the objective is not to have a book of how to use Symfony 2 and develop. But a guide of what has been done with Symfony 2 and the current state of the module. More like a diary of notes and the documentation of this development. You can also find some other Symfony 2 development material here.

The company for who we will develop it will be TEAM Engineers, is a mobiles and prefabs company. Currently they do every thing manually, no computer implied except for accounts. So we need to bring this company activity to the XXI century. To do that we will start by the Fleet management system. They have a a fleet of around 15 trucks and some small cars.

Excel Prototype for development

Excel Initial Prototype for development

Kay, who is the process engineer tester and quality checker and me the developer architect and software engineer.

Requisite capture

On that regard my good friend Kay plays a very important role. As he is directly involved on the development. He manager to get involved with the company personnel (the client); specifically with the transport department to determine most of their requisites. From them he managed to get a trust relationship and he generated the following excel documents based on their needs. Kay is not and IT person, but he is a smart guy. and his materials and apportions will be very useful as the first approach to this development process. The first picture represents the information needed and the second the most basic graphic report they need.

This material covers for now:

  1. The initial approach to the requisite capture.
  2. The first steps on the development process.

The module should collect and render the following information:

Information to collect:

Delivery No (Auto generated non editable)

Graphic of fuel consumption

Graphic of fuel consumption

Date (auto selected to today, editable)

Destination (place name)

ODD meter at the Start (it’s a float number always greater than the last ODO meter value)

ODO meter at the End (it’s a float number always greater than the last ODO meter value)

Total Distance in Km (calculated field after we have initial and end ODO value)

Delivery Type (code)

Fuel used (L)

Fuel Consumption (km/L)

Service Status (the service is only required depending on quantity of KM)

Driver (Name)

Crew (Names rigger)

Trailer (Trailer plate number, is a field to connect the car to a trailer )

Status

Pending

In progress

Completed

Remarks (Comments or incidents)

Return load planned (description)

Information to render.

Graphic of fuel consumption per vehicle.

We we have some information, we could continue to have a more refined document, but the client is really interested on fast results initially , so I started developing right away and the we will refine the development as the process goes on. To do that I will use the iterations development approach. I have installed all the Symfony 2 requirements using my windows 8 computer and Wamp Server following this material. If you have Linux then you need to do something like this.

Project Development Folder

Project Development Folder

Symfony 2 Installation process

Once we are done with it you just need the sources that you can get from github here; to generate the github repository I have used the official documentation. I have created a folder for it in my www folder called team that is going to contain the fleet management system and also any further development. Check out the picture. To install symfony you need to use the command prompt and run the commands as described in Symfony 2 website download page. Of course you need to meet the requirements first as describe before on the links about the installation process. But this is the command to install it.

composer create-project symfony/framework-standard-edition team/ 2.4.3

And then composer downloads the whole skeleton with the framework included. It will also prompt you for database information and mailing information and will write it in this file in your project ‘app/config/parameters.yml’.

parameters:
    database_driver: pdo_mysql
    database_host: 127.0.0.1
    database_port: null
    database_name: team001
    database_user: root
    database_password: null
    mailer_transport: smtp
    mailer_host: 127.0.0.1
    mailer_user: null
    mailer_password: null
    locale: en
    secret: secretPhrase

And that is pretty much what you need to do about installing Symfony 2. Now we need to do ins to install the code of the project and make it work. for that you could go to the github README-TeamERP.md file and take it from there.

Road Map

Well the project is just starting. The general objective is to create a competitive Symfony, PHP, ERP that is completely free software but we are still far from that. The immediate objectives is to improve the TeamERP Transport module as much as I can and the go to the next module.

TeamERP Transport road map:

  1. Bug fix, if you fin one you can let me know.
  2. Create a base bundle to store the code and media that can be used by other modules.
  3. Add more functionality.
  4. Add smart validations to fields. e.g.: a car ODO meter can not have a smaller value than before.

By the way any kind of help will be appreciated; bug find, development, donations, comments about your own experience, etc. just post here or contact me.

Leave a Reply

Your email address will not be published. Required fields are marked *