feat: Update Panier BR generation, replace contact_ref by contact_id after db cleaning
This commit is contained in:
parent
fedb14c16d
commit
30d79ccccd
1 changed files with 4 additions and 8 deletions
|
|
@ -361,15 +361,11 @@ trait GenerateBR
|
|||
|
||||
imagecopy($mask, $test, 60, 250, 0, 0, imagesx($test), imagesy($test));
|
||||
} else {
|
||||
$codeBarre = $coupon->coupon_code . strtoupper($contact->contact_ref);
|
||||
$codeBarre = $coupon->coupon_code . strtoupper($contact->contact_id);
|
||||
$codeBarrePrint = $codeBarre;
|
||||
if (strpos($contact->contact_ref, "@") !== false) {
|
||||
$codeBarre = $coupon->coupon_code . strtolower($contact->contact_ref);
|
||||
$codeBarrePrint = $coupon->coupon_code . ".@.";
|
||||
}
|
||||
$generator = new \Picqer\Barcode\BarcodeGeneratorPNG();
|
||||
$base64 = $generator->getBarcode($codeBarrePrint, $generator::TYPE_CODE_128_A, 2, 46);
|
||||
$barcodeImage = imagecreatefromstring($base64);
|
||||
$generator = new \Picqer\Barcode\BarcodeGeneratorPNG();
|
||||
$base64 = $generator->getBarcode($codeBarrePrint, $generator::TYPE_CODE_128_A, 2, 46);
|
||||
$barcodeImage = imagecreatefromstring($base64);
|
||||
imagecopy($mask, $barcodeImage, 52, 342, 0, 0, imagesx($barcodeImage), imagesy($barcodeImage));
|
||||
$ImageFond = imagecreate(380, 15);
|
||||
$white = imagecolorallocate($ImageFond, 255, 255, 255);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue