Spis Treści
Introduction
After a long break, I add another project I wrote to the page. This time it is a lightweight application for managing orders, which is not only a project written for myself, but also fulfills an important function in one of the companies near Warsaw with which I am professionally associated. I invite you to read.
The application was created in connection with the need to organize order management in a production and service company. The assumption was to create a common database of orders for the company's employees so that they always work with up-to-date data and do not have to duplicate them in many places. In addition, the application was to enable a quick search for data of active orders as well as archival ones, e.g. in terms of archival product prices.
Due to the low complexity of the project and the ease of management, I decided to write a web application using the CodeIgniter framework 4.
The application consists of several main modules:
- Contrahents
- Orders
- Zlecone wyroby
- Finances
- Settings
Settings
Due to the fact that the application will be used by different people in the enterprise with different authorizations, an access control system has been implemented based on the filter mechanism available within the framework.

After creating the user and giving him the appropriate privileges, create a password to the system, which the user sets himself during the first login. If the password is forgotten, the system administrator can reset the application password and the user will be able to perform the procedure from the beginning.

The application allows you to register orders in various currencies, which the system administrator defines at the beginning of work and can later freely modify, as well as change currency rates, which will translate into values converted into the base currency, which is PLN. It is important that when an order is archived, the value of the exchange rate that was currently set in the system is also recorded in its record.
Contrahents
The application allows you to manage contractors by adding them, editing and displaying data on currently completed and archived orders.

After clicking on the counterparty's alias, the system returns basic information about the counterparty as well as a list of all his orders. This list can be searched by any value in the table by using the search field and sorted by any column.

Orders
This module contains information about all orders and has been divided into two subcategories: active orders and archived orders. The main view displays a list of orders and it is also possible to search by any value in the table and sort by any column.

From the table level, you can easily go to the details of the contractor who ordered a given order and view the details of the order, such as:
- Ordered Items
- Contracted products,
- Attached files,
- The possibility of generating an order confirmation for copying, e.g. to an e-mail in Polish and English.


Wspomniany wcześniej system kontroli dostępu umożliwia zablokowanie wybranym użytkownikom możliwości edycji, usuwania i dodawania zleceń czy oddzielnie zablokować nawet ich podglądanie. Cenną funkcją jet możliwość podpinania pod zlecenie np papierowych czy podpisanych przez kontrahentów zleceń z dodatkowymi adnotacjami czy korektami naniesionymi w trakcie realizacji zlecenia. System na potrzeby przedsiębiorstwa został skonfigurowany tak aby można było podpinać tylko pliki z rozszerzeniami .pdf, .jpg. .png czy .tiff oraz o rozmiarze nie przekraczającym 5 MB.
Ordered Items
A separate large module is the module of ordered products. It includes the possibility of assigning specific items from the order to orders, as well as, importantly, tracking the current status of the product. For each item, it is also possible to set an individual discount on the base price, as well as set a separate deadline or individual notes.

The management team wanted to be able to quickly determine at which stage of production a given product is. For this purpose, the manufacturing process has been divided into several stages:
- Acceptance for implementation (before technological development)
- Technologically developed (before production starts)
- In production
- Completed (delivery notes sent or completed)
Next to each position in the order or in the collective table with positions from multiple orders, there is an options field that allows you to change the status of the position in the order. The technology department has the right to develop technology, the production department has the start of production, and the shipping department has the option of marking the item as completed. For each stage, it is possible to add a note or annotation, which can be displayed by entering the details of each item. In addition, the system displays who and when made the last change at each stage of production.

When all items of the order are completed, i.e. the number of products shipped is at least as large as the number of products ordered, then the order can be archived. An archived order can no longer be edited or deleted in any way.
Finances
This module includes a simple functionality that allows you to view the total values of orders grouped by contractor in a selected period of time. There are 3 predefined periods as well as the ability to set your own date range.

Some technical ingormations
The application is based on the CodeIgniter 4 framework and additionally uses such solutions as Bootstrap, chart.js or datatable.net. The application does not need an Internet connection to work properly, so it can be installed on a local server and made available on the local network, which increases the security of data stored in the system.
UPDATE 1
The application is based on the CodeIgniter 4 framework and additionally uses such solutions as Bootstrap, chart.js or datatable.net. The application does not need an Internet connection to work properly, so it can be installed on a local server and made available on the local network, which increases the security of data stored in the system.
Adding notes to orders
For the purposes of better information flow, any user can add notes to the order and delete only their previously added notes.

Multiwyszukiwarka
In order to move around the data faster, a search engine has been implemented, which searches the database in terms of orders, positions in orders and contractors. The search engine is available from anywhere in the system from the sidepanel area.

Finance versus time graph
A chart of the planned sales plan has been added based on the data entered under the orders.

Improving the interface
In order to improve the aesthetics of the application, as well as usability, several changes were made to the appearance of the interface.
Report on the current status of the order
On the basis of all the data entered as part of the order, as well as the items from the orders, a simple report is generated, which can be easily saved to a PDF file or printed.