Download the PHP package smart-dato/brt-documento-di-ritiro without Composer
On this page you can find all versions of the php package smart-dato/brt-documento-di-ritiro. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download smart-dato/brt-documento-di-ritiro
More information about smart-dato/brt-documento-di-ritiro
Files in smart-dato/brt-documento-di-ritiro
Package brt-documento-di-ritiro
Short Description Generate BRT (Bartolini) Documento di Ritiro pickup documents and segnacollo parcel labels
License MIT
Homepage https://github.com/smart-dato/brt-documento-di-ritiro
Informations about the package brt-documento-di-ritiro
BRT Documento di Ritiro
Generate BRT (Bartolini) "Documento di Ritiro" pickup paperwork from plain PHP data objects:
- the A4 corriere document ("DA CONSEGNARE AL CORRIERE") — one page per delivery-address group, with segnacollo thumbnails, weights, volumes and cash-on-delivery totals,
- one A4 parcel label per parcel ("DA APPLICARE SUL PACCO"), each carrying its segnacollo barcode and the shipment barcode strip,
- segnacollo barcode allocation from BRT number ranges, with database locking against duplicate numbers,
- the fixed-width FNVAO booking record BRT's VAS system parses.
Everything is rendered in memory and returned as binaries — the package never touches your models, storage paths or database rows (except the barcode-range table it owns). Optional helpers store the results on any Laravel filesystem disk.
Requirements
- PHP 8.4+ with the GD extension
- Laravel 11, 12 or 13
Installation
Publish the config file if you need to override defaults:
The segnacollo allocator persists its number ranges in a table (default brt_documento_di_ritiro). Publish and run the migration unless the table already exists in your schema:
Usage
Generating a documento di ritiro
Describe the pickup with data objects and let the fluent builder render everything:
branding() and clientCode() are required: the BRT client code, terms URL, side logo and non-IT fallback recipient are your business data — the package ships none of it.
The GenerationResult carries every artifact and the barcode bookkeeping:
Store the artifacts on any Laravel disk — the helpers throw a StorageException when a write fails:
Parcels that already carry a barcode keep it (existingBarcode), and parcels that already have a label are skipped but stay part of the merged document (hasLabel + existingLabelPdf).
Segnacollo barcode allocation
Barcodes are drawn from number ranges BRT assigns to you. Seed them once:
The database allocator hands out sequential numbers with the BRT check digit inside a locking transaction, rolls over between ranges and returns null on exhaustion (the generator then falls back to the parcel key). Monitor the remaining stock:
Bind your own SegnacolloAllocator implementation to replace the database-backed default.
FNVAO booking record
Render the fixed-width booking file BRT expects when a pickup is announced:
Configuration
A note on the bundled fonts
The rendered form uses Verdana and Franklin Gothic, which are proprietary typefaces. The bundled copies exist so the output matches the documents BRT has historically accepted — make sure your own licensing situation covers their use, or point the fonts config entries at typefaces you are licensed for.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.
All versions of brt-documento-di-ritiro with dependencies
ext-gd Version *
barryvdh/laravel-dompdf Version ^3.0
illuminate/contracts Version ^11.0||^12.0||^13.0
intervention/image Version ^2.3
laminas/laminas-barcode Version ^2.14
setasign/fpdf Version ^1.8
setasign/fpdi Version ^2.3
spatie/laravel-data Version ^4.7
spatie/laravel-package-tools Version ^1.16