Debug v24 (error was reset when it should not)

This commit is contained in:
Laurent Destailleur 2026-04-28 00:42:43 +02:00
parent 6957444c99
commit cc2f50f7eb
2 changed files with 4 additions and 3 deletions

View file

@ -35,6 +35,7 @@
* @var User $user
*
* @var int $id
* @var int $error
* @var string $dolibarr_main_url_root
* @var string $action
* @var ?string $subject
@ -49,7 +50,6 @@
@phan-var-force CommonObject $object
';
$error = 0;
/*
* Add file in email form

View file

@ -422,7 +422,6 @@ $help_url = '';
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-product page-stock-stocktransfer_stocktransfer_card');
// Example : Adding jquery code
print '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {';
@ -697,6 +696,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '<div class="clearboth"></div>';
/*
* Lines
*/
@ -913,6 +913,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '</tr>';
}
// Line to add a new line
if (empty($object->status) && $action !== 'editline' && $permissiontoadd) {
print '<tr class="oddeven">';
// Product
@ -977,7 +978,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '</td>';
// Qty
print '<td class="center"><input type="text" class="flat maxwidth50" name="qty" '.(!empty($error) ? 'value="'.$qty.'"' : '').'></td>';
print '<td class="center"><input type="text" class="flat maxwidth50" name="qty" '.(!empty($error) ? 'value="'.(GETPOSTISSET('qty') ? GETPOST('qty') : $qty).'"' : '').'></td>';
// PMP
print '<td></td>';