mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 09:08:09 +01:00
Fix composer file to allow to install sparin/swiss-qr-bill
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -64,4 +64,6 @@ doc/install.lock
|
|||||||
.idea/modules.xml
|
.idea/modules.xml
|
||||||
.idea/workspace.xml
|
.idea/workspace.xml
|
||||||
.idea/inspectionProfiles/Project_Default.xml
|
.idea/inspectionProfiles/Project_Default.xml
|
||||||
.idea/jsLinters/jshint.xml
|
.idea/jsLinters/jshint.xml
|
||||||
|
/composer.json
|
||||||
|
/composer.lock
|
||||||
|
|||||||
@@ -28,20 +28,20 @@
|
|||||||
"ckeditor/ckeditor" : "4.12.1",
|
"ckeditor/ckeditor" : "4.12.1",
|
||||||
"mike42/escpos-php" : "3.0",
|
"mike42/escpos-php" : "3.0",
|
||||||
"mobiledetect/mobiledetectlib" : "2.8.41",
|
"mobiledetect/mobiledetectlib" : "2.8.41",
|
||||||
"phpoffice/phpspreadsheet" : "1.12",
|
"phpoffice/phpspreadsheet" : ">=1.12",
|
||||||
"restler/framework" : "3.0.0-RC6",
|
"restler/framework" : "3.0.0-RC6",
|
||||||
"tecnickcom/tcpdf" : "6.3.2",
|
"tecnickcom/tcpdf" : "6.3.2",
|
||||||
"nnnick/chartjs" : "^3.7.1",
|
"nnnick/chartjs" : "^3.7.1",
|
||||||
"stripe/stripe-php" : "10.7.0",
|
"stripe/stripe-php" : "10.7.0",
|
||||||
"maximebf/debugbar" : "1.18.2",
|
"maximebf/debugbar" : "1.18.2",
|
||||||
"symfony/var-dumper" : "3.2"
|
"symfony/var-dumper" : ">=3.2"
|
||||||
},
|
},
|
||||||
"require-dev" : {
|
"require-dev" : {
|
||||||
"php-parallel-lint/php-parallel-lint" : "^0",
|
"php-parallel-lint/php-parallel-lint" : "^0",
|
||||||
"php-parallel-lint/php-console-highlighter" : "^0",
|
"php-parallel-lint/php-console-highlighter" : "^0",
|
||||||
"phpunit/phpunit" : "^4",
|
"phpunit/phpunit" : "^4",
|
||||||
"squizlabs/php_codesniffer" : "^2",
|
"squizlabs/php_codesniffer" : "^2",
|
||||||
"phpunit/phpunit-selenium" : "^2"
|
"phpunit/phpunit-selenium" : "^2",
|
||||||
"rector/rector" : "^0.16.0"
|
"rector/rector" : "^0.16.0"
|
||||||
},
|
},
|
||||||
"suggest" : {
|
"suggest" : {
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // Required because used in classes that inherit
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // Required because used in classes that inherit
|
||||||
|
|
||||||
|
// For the experimental feature using swiss QR invoice generated by composer lib sparin/swiss-qr-bill
|
||||||
use Sprain\SwissQrBill;
|
use Sprain\SwissQrBill;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -105,7 +106,12 @@ abstract class ModelePDFFactures extends CommonDocGenerator
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/includes/sprain/swiss-qr-bill/autoload.php';
|
// Load the autoload file generated by composer
|
||||||
|
if (file_exists(DOL_DOCUMENT_ROOT.'/includes/sprain/swiss-qr-bill/autoload.php')) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/includes/sprain/swiss-qr-bill/autoload.php';
|
||||||
|
} elseif (file_exists(DOL_DOCUMENT_ROOT.'/includes/autoload.php')) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/includes/autoload.php';
|
||||||
|
}
|
||||||
|
|
||||||
// Create a new instance of SwissQrBill, containing default headers with fixed values
|
// Create a new instance of SwissQrBill, containing default headers with fixed values
|
||||||
$qrBill = SwissQrBill\QrBill::create();
|
$qrBill = SwissQrBill\QrBill::create();
|
||||||
|
|||||||
Reference in New Issue
Block a user