Retours PR
This commit is contained in:
parent
8c514c8025
commit
bcd9a0b29f
@ -1314,21 +1314,28 @@ if ($resql)
|
|||||||
if ($action == 'validate') {
|
if ($action == 'validate') {
|
||||||
if (GETPOST('confirm') == 'yes') {
|
if (GETPOST('confirm') == 'yes') {
|
||||||
$tmpproposal = new Propal($db);
|
$tmpproposal = new Propal($db);
|
||||||
|
$db->begin();
|
||||||
foreach ($toselect as $checked) {
|
foreach ($toselect as $checked) {
|
||||||
$tmpproposal->fetch($checked);
|
|
||||||
if ($tmpproposal->fetch($checked)) {
|
if ($tmpproposal->fetch($checked)) {
|
||||||
if ($tmpproposal->statut == 0) {
|
if ($tmpproposal->statut == 0) {
|
||||||
$tmpproposal->valid($user);
|
if($tmpproposal->valid($user)){
|
||||||
setEventMessage($tmpproposal->ref . " " . $langs->trans('PassedInOpenStatus'), 'mesgs');
|
setEventMessage($tmpproposal->ref . " " . $langs->trans('PassedInOpenStatus'), 'mesgs');
|
||||||
|
} else {
|
||||||
|
setEventMessage($langs->trans('CantBeValidated'), 'errors');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
setEventMessage($tmpproposal->ref . " " . $langs->trans('IsNotADraft'), 'errors');
|
setEventMessage($tmpproposal->ref . " " . $langs->trans('IsNotADraft'), 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$db->commit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($action == "sign") {
|
if ($action == "sign") {
|
||||||
if (GETPOST('confirm') == 'yes') {
|
if (GETPOST('confirm') == 'yes') {
|
||||||
$tmpproposal = new Propal($db);
|
$tmpproposal = new Propal($db);
|
||||||
|
$db->begin();
|
||||||
foreach ($toselect as $checked) {
|
foreach ($toselect as $checked) {
|
||||||
$tmpproposal->fetch($checked);
|
$tmpproposal->fetch($checked);
|
||||||
if ($tmpproposal->fetch($checked)) {
|
if ($tmpproposal->fetch($checked)) {
|
||||||
@ -1347,8 +1354,10 @@ if ($resql)
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$db->commit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -91,6 +91,7 @@ CantBeSign = ne peut pas être signée
|
|||||||
Sign = Signer
|
Sign = Signer
|
||||||
Signed = signé
|
Signed = signé
|
||||||
CantBeSign = ne peut pas être signé
|
CantBeSign = ne peut pas être signé
|
||||||
|
CantBeValidated = Ne peut pas être validé
|
||||||
ConfirmMassValidation = Confirmer la validation ?
|
ConfirmMassValidation = Confirmer la validation ?
|
||||||
ConfirmMassSignature = Confirmer la signature ?
|
ConfirmMassSignature = Confirmer la signature ?
|
||||||
ConfirmMassValidationQuestion = Voulez-vous confirmer la validation des devis brouillons selectionnés ?
|
ConfirmMassValidationQuestion = Voulez-vous confirmer la validation des devis brouillons selectionnés ?
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user