Fixing style errors.

This commit is contained in:
stickler-ci 2020-09-03 12:30:04 +00:00
parent bcd9a0b29f
commit 43590587e5

View File

@ -1318,7 +1318,7 @@ if ($resql)
foreach ($toselect as $checked) { foreach ($toselect as $checked) {
if ($tmpproposal->fetch($checked)) { if ($tmpproposal->fetch($checked)) {
if ($tmpproposal->statut == 0) { if ($tmpproposal->statut == 0) {
if($tmpproposal->valid($user)){ if ($tmpproposal->valid($user)){
setEventMessage($tmpproposal->ref . " " . $langs->trans('PassedInOpenStatus'), 'mesgs'); setEventMessage($tmpproposal->ref . " " . $langs->trans('PassedInOpenStatus'), 'mesgs');
} else { } else {
setEventMessage($langs->trans('CantBeValidated'), 'errors'); setEventMessage($langs->trans('CantBeValidated'), 'errors');
@ -1332,32 +1332,31 @@ if ($resql)
} }
} }
if ($action == "sign") { if ($action == "sign") {
if (GETPOST('confirm') == 'yes') { if (GETPOST('confirm') == 'yes') {
$tmpproposal = new Propal($db); $tmpproposal = new Propal($db);
$db->begin(); $db->begin();
foreach ($toselect as $checked) { foreach ($toselect as $checked) {
$tmpproposal->fetch($checked); $tmpproposal->fetch($checked);
if ($tmpproposal->fetch($checked)) { if ($tmpproposal->fetch($checked)) {
if ($tmpproposal->statut == 1) { if ($tmpproposal->statut == 1) {
$sqlp = "UPDATE " . MAIN_DB_PREFIX . "propal SET fk_statut = 2 WHERE rowid = " . $checked; $sqlp = "UPDATE " . MAIN_DB_PREFIX . "propal SET fk_statut = 2 WHERE rowid = " . $checked;
$resqlp = $db->query($sqlp); $resqlp = $db->query($sqlp);
if ($resqlp) { if ($resqlp) {
setEventMessage($tmpproposal->ref . " " . $langs->trans('Signed'), 'mesgs'); setEventMessage($tmpproposal->ref . " " . $langs->trans('Signed'), 'mesgs');
} else {
dol_print_error($db);
}
} else { } else {
setEventMessage($tmpproposal->ref . " " . $langs->trans('CantBeSign'), 'errors'); dol_print_error($db);
} }
} else { } else {
dol_print_error($db); setEventMessage($tmpproposal->ref . " " . $langs->trans('CantBeSign'), 'errors');
} }
} else {
dol_print_error($db);
} }
$db->commit();
} }
$db->commit();
} }
}
} else { } else {
dol_print_error($db); dol_print_error($db);
} }