Merge pull request #20223 from hregis/fix_no_special_code_option_for_invoice

FIX options should not exists on invoices
This commit is contained in:
Laurent Destailleur 2022-02-28 20:36:36 +01:00 committed by GitHub
commit e69b5ba086
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -765,8 +765,8 @@ if (empty($reshook)) {
// Define special_code for special lines
$special_code = GETPOST('special_code', 'int');
if (!GETPOST('qty', 'alpha')) {
$special_code = 3;
if ($special_code == 3) {
$special_code = 0; // Options should not exists on invoices
}
/*$line = new FactureLigne($db);

View File

@ -2371,9 +2371,9 @@ if (empty($reshook)) {
}
// Define special_code for special lines
$special_code = GETPOST('special_code');
if (!GETPOST('qty')) {
$special_code = 3;
$special_code = GETPOST('special_code', 'int');
if ($special_code == 3) {
$special_code = 0; // Options should not exists on invoices
}
$line = new FactureLigne($db);