diff --git a/app/Models/Cliente.php b/app/Models/Cliente.php
index 07b8283..71bfb96 100644
--- a/app/Models/Cliente.php
+++ b/app/Models/Cliente.php
@@ -2,8 +2,10 @@
namespace App\Models;
-use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
+use Picqer\Barcode\BarcodeGeneratorPNG;
+// use Picqer\Barcode\BarcodeGeneratorHTML;
+use Illuminate\Database\Eloquent\Factories\HasFactory;
class Cliente extends Model
{
@@ -77,5 +79,10 @@ class Cliente extends Model
$cliente->delete();
}
+ public static function generateBarcode($barcode)
+ {
+ $generator = new BarcodeGeneratorPNG();
+ return base64_encode($generator->getBarcode($barcode, $generator::TYPE_CODE_39));
+ }
}
diff --git a/composer.json b/composer.json
index dccb59c..742320c 100644
--- a/composer.json
+++ b/composer.json
@@ -12,6 +12,7 @@
"laravel/sanctum": "^3.2",
"laravel/tinker": "^2.8",
"laravel/ui": "^4.2",
+ "picqer/php-barcode-generator": "^2.2",
"spatie/laravel-backup": "^8.1",
"spatie/laravel-permission": "^5.10"
},
diff --git a/composer.lock b/composer.lock
index 10c60be..5a92e04 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "ce5e9d4a01aa0a1733db5cd5ca84ea00",
+ "content-hash": "ddb2289737a39bc98d9c9e244c3a54a7",
"packages": [
{
"name": "barryvdh/laravel-dompdf",
@@ -2687,6 +2687,92 @@
],
"time": "2023-02-25T19:38:58+00:00"
},
+ {
+ "name": "picqer/php-barcode-generator",
+ "version": "v2.2.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/picqer/php-barcode-generator.git",
+ "reference": "b98f110cc5a79f723688fb17fd90b9325300d844"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/picqer/php-barcode-generator/zipball/b98f110cc5a79f723688fb17fd90b9325300d844",
+ "reference": "b98f110cc5a79f723688fb17fd90b9325300d844",
+ "shasum": ""
+ },
+ "require": {
+ "ext-mbstring": "*",
+ "php": "^7.3|^8.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.5"
+ },
+ "suggest": {
+ "ext-bcmath": "Barcode IMB (Intelligent Mail Barcode) needs bcmath extension",
+ "ext-gd": "For JPG and PNG generators, GD or Imagick is required",
+ "ext-imagick": "For JPG and PNG generators, GD or Imagick is required"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Picqer\\Barcode\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "LGPL-3.0-or-later"
+ ],
+ "authors": [
+ {
+ "name": "Nicola Asuni",
+ "email": "info@tecnick.com",
+ "homepage": "http://nicolaasuni.tecnick.com"
+ },
+ {
+ "name": "Casper Bakker",
+ "email": "info@picqer.com",
+ "homepage": "https://picqer.com"
+ }
+ ],
+ "description": "An easy to use, non-bloated, barcode generator in PHP. Creates SVG, PNG, JPG and HTML images from the most used 1D barcode standards.",
+ "homepage": "https://github.com/picqer/php-barcode-generator",
+ "keywords": [
+ "CODABAR",
+ "Code11",
+ "Code93",
+ "EAN13",
+ "KIX",
+ "KIXCODE",
+ "MSI",
+ "POSTNET",
+ "Pharma",
+ "Standard 2 of 5",
+ "barcode",
+ "barcode generator",
+ "code128",
+ "code39",
+ "ean",
+ "html",
+ "jpeg",
+ "jpg",
+ "php",
+ "png",
+ "svg",
+ "upc"
+ ],
+ "support": {
+ "issues": "https://github.com/picqer/php-barcode-generator/issues",
+ "source": "https://github.com/picqer/php-barcode-generator/tree/v2.2.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/casperbakker",
+ "type": "github"
+ }
+ ],
+ "time": "2022-07-01T08:27:26+00:00"
+ },
{
"name": "psr/container",
"version": "2.0.2",
diff --git a/resources/views/PDF/template.blade.php b/resources/views/PDF/template.blade.php
index 6819fe8..079b85f 100644
--- a/resources/views/PDF/template.blade.php
+++ b/resources/views/PDF/template.blade.php
@@ -26,6 +26,7 @@
 |
+ COMMESSA) |
{{env('RAGIONE_SOCIALE')}}
@@ -34,7 +35,7 @@
Tel. {{env('TELEFONO')}}
Email:{{env('EMAIL')}}
Website: {{env('WEBSITE')}}
- IBAN:{{env('IBAN')}} Banca: {{env('BANCA')}}
+
|
@@ -43,7 +44,7 @@
- Commessa N.: 05854 |
+ Commessa N.: 081231723897 |
Del: {{date('d/m/Y')}} |
Operatore: Laboratorio |
@@ -63,8 +64,7 @@
Codice |
Descrizione |
Quantità |
- Prezzo unitario € |
- Totale € |
+
@@ -72,41 +72,40 @@
06544585 |
Ricambio carburatore Husqwarna 06544585 |
1 |
- 1400.00 |
- 1400.00 |
+
06532586 |
Collettore compatibile Typhoon |
1 |
- 105.00 |
- 105.00 |
+
000532 |
Ore laboratorio |
2 |
- 65.00 |
- 130.00 |
+
- |
- Subtotale € |
- 1635.00 |
+ |
- |
- IVA € |
- 294.3 |
+ Rapporto lavorazioni |
- |
- Totale € |
- € 1929.3 |
+ Smontaggio dell'apparecchiatura, individuazione del problema, generazione preventivo per commerciale,
+ Attesa approvazione preventivo, quindi prosecuzione con sostituzione carburatore originale, pulizia e sostituzione collettore di aspirazione con uno compatibile,
+ verifica del serraggio dei prigionieri e quindi rimontaggio apparecchiatura. Test finale e chiusura commessa. |
+
+ |
+ Stato |
+ Riparato |
+
+