Fixing style errors.
This commit is contained in:
parent
bcd9a0b29f
commit
43590587e5
@ -1318,7 +1318,7 @@ if ($resql)
|
||||
foreach ($toselect as $checked) {
|
||||
if ($tmpproposal->fetch($checked)) {
|
||||
if ($tmpproposal->statut == 0) {
|
||||
if($tmpproposal->valid($user)){
|
||||
if ($tmpproposal->valid($user)){
|
||||
setEventMessage($tmpproposal->ref . " " . $langs->trans('PassedInOpenStatus'), 'mesgs');
|
||||
} else {
|
||||
setEventMessage($langs->trans('CantBeValidated'), 'errors');
|
||||
@ -1332,32 +1332,31 @@ if ($resql)
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == "sign") {
|
||||
if (GETPOST('confirm') == 'yes') {
|
||||
$tmpproposal = new Propal($db);
|
||||
$db->begin();
|
||||
foreach ($toselect as $checked) {
|
||||
$tmpproposal->fetch($checked);
|
||||
if ($tmpproposal->fetch($checked)) {
|
||||
if ($tmpproposal->statut == 1) {
|
||||
$sqlp = "UPDATE " . MAIN_DB_PREFIX . "propal SET fk_statut = 2 WHERE rowid = " . $checked;
|
||||
$resqlp = $db->query($sqlp);
|
||||
if ($resqlp) {
|
||||
setEventMessage($tmpproposal->ref . " " . $langs->trans('Signed'), 'mesgs');
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
if ($action == "sign") {
|
||||
if (GETPOST('confirm') == 'yes') {
|
||||
$tmpproposal = new Propal($db);
|
||||
$db->begin();
|
||||
foreach ($toselect as $checked) {
|
||||
$tmpproposal->fetch($checked);
|
||||
if ($tmpproposal->fetch($checked)) {
|
||||
if ($tmpproposal->statut == 1) {
|
||||
$sqlp = "UPDATE " . MAIN_DB_PREFIX . "propal SET fk_statut = 2 WHERE rowid = " . $checked;
|
||||
$resqlp = $db->query($sqlp);
|
||||
if ($resqlp) {
|
||||
setEventMessage($tmpproposal->ref . " " . $langs->trans('Signed'), 'mesgs');
|
||||
} else {
|
||||
setEventMessage($tmpproposal->ref . " " . $langs->trans('CantBeSign'), 'errors');
|
||||
dol_print_error($db);
|
||||
}
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
setEventMessage($tmpproposal->ref . " " . $langs->trans('CantBeSign'), 'errors');
|
||||
}
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
$db->commit();
|
||||
}
|
||||
$db->commit();
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user