Retours PR
This commit is contained in:
parent
8c514c8025
commit
bcd9a0b29f
@ -1312,23 +1312,30 @@ if ($resql)
|
||||
print $formfile->showdocuments('massfilesarea_proposals', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty);
|
||||
|
||||
if ($action == 'validate') {
|
||||
if (GETPOST('confirm') == 'yes') {
|
||||
$tmpproposal = new Propal($db);
|
||||
foreach ($toselect as $checked) {
|
||||
$tmpproposal->fetch($checked);
|
||||
if ($tmpproposal->fetch($checked)) {
|
||||
if ($tmpproposal->statut == 0) {
|
||||
$tmpproposal->valid($user);
|
||||
setEventMessage($tmpproposal->ref . " " . $langs->trans('PassedInOpenStatus'), 'mesgs');
|
||||
} else {
|
||||
setEventMessage($tmpproposal->ref . " " . $langs->trans('IsNotADraft'), 'errors');
|
||||
if (GETPOST('confirm') == 'yes') {
|
||||
$tmpproposal = new Propal($db);
|
||||
$db->begin();
|
||||
foreach ($toselect as $checked) {
|
||||
if ($tmpproposal->fetch($checked)) {
|
||||
if ($tmpproposal->statut == 0) {
|
||||
if($tmpproposal->valid($user)){
|
||||
setEventMessage($tmpproposal->ref . " " . $langs->trans('PassedInOpenStatus'), 'mesgs');
|
||||
} else {
|
||||
setEventMessage($langs->trans('CantBeValidated'), 'errors');
|
||||
}
|
||||
} else {
|
||||
setEventMessage($tmpproposal->ref . " " . $langs->trans('IsNotADraft'), 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
$db->commit();
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == "sign") {
|
||||
if (GETPOST('confirm') == 'yes') {
|
||||
$tmpproposal = new Propal($db);
|
||||
$db->begin();
|
||||
foreach ($toselect as $checked) {
|
||||
$tmpproposal->fetch($checked);
|
||||
if ($tmpproposal->fetch($checked)) {
|
||||
@ -1347,11 +1354,13 @@ if ($resql)
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
$db->commit();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
|
||||
@ -91,6 +91,7 @@ CantBeSign = ne peut pas être signée
|
||||
Sign = Signer
|
||||
Signed = signé
|
||||
CantBeSign = ne peut pas être signé
|
||||
CantBeValidated = Ne peut pas être validé
|
||||
ConfirmMassValidation = Confirmer la validation ?
|
||||
ConfirmMassSignature = Confirmer la signature ?
|
||||
ConfirmMassValidationQuestion = Voulez-vous confirmer la validation des devis brouillons selectionnés ?
|
||||
|
||||
Loading…
Reference in New Issue
Block a user