Fix yogosha#11976
This commit is contained in:
parent
39dccc4fdf
commit
0a623ab068
@ -203,25 +203,30 @@ if ($action == 'builddoc') {
|
|||||||
$forceimgscalewidth = (empty($conf->global->BARCODE_FORCEIMGSCALEWIDTH) ? 1 : $conf->global->BARCODE_FORCEIMGSCALEWIDTH);
|
$forceimgscalewidth = (empty($conf->global->BARCODE_FORCEIMGSCALEWIDTH) ? 1 : $conf->global->BARCODE_FORCEIMGSCALEWIDTH);
|
||||||
$forceimgscaleheight = (empty($conf->global->BARCODE_FORCEIMGSCALEHEIGHT) ? 1 : $conf->global->BARCODE_FORCEIMGSCALEHEIGHT);
|
$forceimgscaleheight = (empty($conf->global->BARCODE_FORCEIMGSCALEHEIGHT) ? 1 : $conf->global->BARCODE_FORCEIMGSCALEHEIGHT);
|
||||||
|
|
||||||
for ($i = 0; $i < $numberofsticker; $i++) {
|
$MAXSTICKERS = 1000;
|
||||||
$arrayofrecords[] = array(
|
if ($numberofsticker <= $MAXSTICKERS) {
|
||||||
'textleft'=>$textleft,
|
for ($i = 0; $i < $numberofsticker; $i++) {
|
||||||
'textheader'=>$textheader,
|
$arrayofrecords[] = array(
|
||||||
'textfooter'=>$textfooter,
|
'textleft'=>$textleft,
|
||||||
'textright'=>$textright,
|
'textheader'=>$textheader,
|
||||||
'code'=>$code,
|
'textfooter'=>$textfooter,
|
||||||
'encoding'=>$encoding,
|
'textright'=>$textright,
|
||||||
'is2d'=>$is2d,
|
'code'=>$code,
|
||||||
'photo'=>$barcodeimage // Photo must be a file that exists with format supported by TCPDF
|
'encoding'=>$encoding,
|
||||||
);
|
'is2d'=>$is2d,
|
||||||
|
'photo'=>$barcodeimage // Photo must be a file that exists with format supported by TCPDF
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$mesg = $langs->trans("ErrorQuantityIsLimitedTo", $MAXSTICKERS);
|
||||||
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
$mesg = '';
|
|
||||||
|
|
||||||
// Build and output PDF
|
// Build and output PDF
|
||||||
if ($mode == 'label') {
|
if (!$error && $mode == 'label') {
|
||||||
if (!count($arrayofrecords)) {
|
if (!count($arrayofrecords)) {
|
||||||
$mesg = $langs->trans("ErrorRecordNotFound");
|
$mesg = $langs->trans("ErrorRecordNotFound");
|
||||||
}
|
}
|
||||||
@ -240,7 +245,7 @@ if ($action == 'builddoc') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result <= 0 || $mesg) {
|
if ($result <= 0 || $mesg || $error) {
|
||||||
if (empty($mesg)) {
|
if (empty($mesg)) {
|
||||||
$mesg = 'Error '.$result;
|
$mesg = 'Error '.$result;
|
||||||
}
|
}
|
||||||
@ -272,8 +277,6 @@ print '<br>';
|
|||||||
print '<span class="opacitymedium">'.$langs->trans("PageToGenerateBarCodeSheets", $langs->transnoentitiesnoconv("BuildPageToPrint")).'</span><br>';
|
print '<span class="opacitymedium">'.$langs->trans("PageToGenerateBarCodeSheets", $langs->transnoentitiesnoconv("BuildPageToPrint")).'</span><br>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
dol_htmloutput_errors($mesg);
|
|
||||||
|
|
||||||
//print img_picto('','puce').' '.$langs->trans("PrintsheetForOneBarCode").'<br>';
|
//print img_picto('','puce').' '.$langs->trans("PrintsheetForOneBarCode").'<br>';
|
||||||
//print '<br>';
|
//print '<br>';
|
||||||
|
|
||||||
|
|||||||
@ -289,6 +289,8 @@ ErrorInvoiceLoadThirdPartyKey=Third-party key "%s" no set for invoice "%s"
|
|||||||
ErrorDeleteLineNotAllowedByObjectStatus=Delete line is not allowed by current object status
|
ErrorDeleteLineNotAllowedByObjectStatus=Delete line is not allowed by current object status
|
||||||
ErrorAjaxRequestFailed=Request failed
|
ErrorAjaxRequestFailed=Request failed
|
||||||
ErrorThirpdartyOrMemberidIsMandatory=Third party or Member of partnership is mandatory
|
ErrorThirpdartyOrMemberidIsMandatory=Third party or Member of partnership is mandatory
|
||||||
|
ErrorFailedToWriteInTempDirectory=Failed to write in temp directory
|
||||||
|
ErrorQuantityIsLimitedTo=Quantity is limited to %s
|
||||||
|
|
||||||
# Warnings
|
# Warnings
|
||||||
WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup.
|
WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user