Alex Kovacic

Pegaso: back office for a fall protection company

For a company that installs lifelines and fall protection: quotes with discount rules, sites and crews, site reports from the phone, GPS clock-ins and vans.

Quote built in blocks: materials total and suggested discount for each block, discounts above the band in yellow
Client
Pegaso Anticaduta
Work
business web app and PWA
Technology
Laravel 10, PHP 8, MariaDB, Tailwind CSS, Alpine.js, DomPDF, PWA with offline clock-in, Web Push, Contabilità Facile API, CERVED API, Geotab API

What it does

Pegaso Anticaduta designs, installs and inspects lifelines, guardrails, ladders and safety nets on warehouses, apartment buildings and public buildings. The back office follows a job from the first phone call to the invoice: request, quote, order, project, site work, delivery note, pro forma. I built it with Manzoli Software, working on the same code: 400 commits in nine months, about half each.

Quotes that follow the company's rules

A quote is built in blocks, one per piece of work: the lifeline on building A, the one on building B, the access ladder, the installation. Each block shows its materials total and the suggested discount for the band that total falls in. Two blocks can share a band, like the anchors and the lifeline they hold. A discount can be typed as "10+10" and becomes 19%.

If a discount goes over the category's cap, or the payment terms are more generous than the client's CERVED credit score allows, the quote goes to approval. Until a manager approves it, it can't be printed or turned into an order. The unit price never drops below the list price: a lower price has to go through the discount, where it stays visible. "Force total" finds the discount that brings the quote to the figure agreed with the client, to the cent.

There are also numbered revisions (82/PG, 82/PG_REV_1), alternative solutions for the same site with a PDF that compares them, and a reminder to call the client back after 30 days. A client with an unpaid invoice gets no new quotes unless the administrator unlocks them.

From order to site

An order can be scheduled only once the project and the signed confirmation are attached and the deposit has been paid. Then it becomes a project with one or more jobs (installation, inspection), each with its own dates, status and crew. When you assign someone, the app shows straight away who is free, who is already on another site and who is on holiday or sick. Approved leave blocks the assignment; a few hours off only gets flagged.

The crew leader closes the site from the phone with the site report. For each material in the order they enter how much was installed, and differences show up in red; the manager also sees what they cost. The crew's hours come from the clock-ins made on site.

People, vans and stock

Staff clock in from the phone with their GPS position. Outside the radius of the office or the site the clock-in still counts, but the office gets an alert. With no signal it still works: the phone sends it when the network is back. Holiday accrues by itself every night, pro rata for people who join mid-year.

The vans are linked to Geotab, which sends position and mileage every 10 minutes, so a service falls due on a date or at a mileage. Each van is also a stock location, and when you load material for a site the vans are listed by distance from it. Stock is issued in FIFO lots and composite products are assembled from their bill of materials. Every site has its own stock location, which closes by itself once it's empty.

How it's built

Laravel 10 on PHP 8 with MariaDB, server-rendered pages with Tailwind CSS and Alpine.js. On the phone it's a PWA, with no app store in between. Client records are completed with the CERVED credit score, which also decides which payment terms can be offered. Pro formas, invoices and payments go through Contabilità Facile; agents' commissions are worked out on the month's pro formas, and taken back if the client doesn't pay. Every change lands in a history you can read field by field, and the light or dark theme is chosen from the profile.

The screens of the software come from test copies filled with made-up data.