Merge pull request #20424 from marc-dll/13.0_FIX_propal_mass_action
FIX: propal list mass action translations and error management
This commit is contained in:
commit
d92ed35447
@ -272,9 +272,9 @@ if ($action == 'validate') {
|
|||||||
$db->begin();
|
$db->begin();
|
||||||
$error = 0;
|
$error = 0;
|
||||||
foreach ($toselect as $checked) {
|
foreach ($toselect as $checked) {
|
||||||
if ($tmpproposal->fetch($checked)) {
|
if ($tmpproposal->fetch($checked) > 0) {
|
||||||
if ($tmpproposal->statut == $tmpproposal::STATUS_DRAFT) {
|
if ($tmpproposal->statut == $tmpproposal::STATUS_DRAFT) {
|
||||||
if ($tmpproposal->valid($user)) {
|
if ($tmpproposal->valid($user) > 0) {
|
||||||
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');
|
||||||
@ -285,7 +285,7 @@ if ($action == 'validate') {
|
|||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dol_print_error($db);
|
setEventMessages($tmpproposal->error, $tmpproposal->errors, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -305,14 +305,14 @@ if ($action == "sign") {
|
|||||||
$db->begin();
|
$db->begin();
|
||||||
$error = 0;
|
$error = 0;
|
||||||
foreach ($toselect as $checked) {
|
foreach ($toselect as $checked) {
|
||||||
if ($tmpproposal->fetch($checked)) {
|
if ($tmpproposal->fetch($checked) > 0) {
|
||||||
if ($tmpproposal->statut == $tmpproposal::STATUS_VALIDATED) {
|
if ($tmpproposal->statut == $tmpproposal::STATUS_VALIDATED) {
|
||||||
$tmpproposal->statut = $tmpproposal::STATUS_SIGNED;
|
$tmpproposal->statut = $tmpproposal::STATUS_SIGNED;
|
||||||
|
|
||||||
if ($tmpproposal->update($user)) {
|
if ($tmpproposal->update($user) > 0) {
|
||||||
setEventMessage($tmpproposal->ref." ".$langs->trans('Signed'), 'mesgs');
|
setEventMessage($tmpproposal->ref." ".$langs->trans('Signed'), 'mesgs');
|
||||||
} else {
|
} else {
|
||||||
dol_print_error($db);
|
setEventMessages($tmpproposal->error, $tmpproposal->errors, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -320,7 +320,7 @@ if ($action == "sign") {
|
|||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dol_print_error($db);
|
setEventMessages($tmpproposal->error, $tmpproposal->errors, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -84,6 +84,17 @@ ProposalCustomerSignature=Written acceptance, company stamp, date and signature
|
|||||||
ProposalsStatisticsSuppliers=Vendor proposals statistics
|
ProposalsStatisticsSuppliers=Vendor proposals statistics
|
||||||
CaseFollowedBy=Case followed by
|
CaseFollowedBy=Case followed by
|
||||||
SignedOnly=Signed only
|
SignedOnly=Signed only
|
||||||
|
IsNotADraft=is not a draft
|
||||||
|
PassedInOpenStatus=has been validated
|
||||||
|
CantBeSign=cannot be signed
|
||||||
|
Sign=Sign
|
||||||
|
Signed=signed
|
||||||
|
CantBeSign=cannot be signed
|
||||||
|
CantBeValidated=cannot be validated
|
||||||
|
ConfirmMassValidation=Bulk Validate confirmation
|
||||||
|
ConfirmMassSignature=Bulk Signature confirmation
|
||||||
|
ConfirmMassValidationQuestion=Are you sure you want to validate the selected records ?
|
||||||
|
ConfirmMassSignatureQuestion=Are you sure you want to sign the selected records ?
|
||||||
IdProposal=Proposal ID
|
IdProposal=Proposal ID
|
||||||
IdProduct=Product ID
|
IdProduct=Product ID
|
||||||
PrParentLine=Proposal Parent Line
|
PrParentLine=Proposal Parent Line
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user