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();
|
||||
$error = 0;
|
||||
foreach ($toselect as $checked) {
|
||||
if ($tmpproposal->fetch($checked)) {
|
||||
if ($tmpproposal->fetch($checked) > 0) {
|
||||
if ($tmpproposal->statut == $tmpproposal::STATUS_DRAFT) {
|
||||
if ($tmpproposal->valid($user)) {
|
||||
if ($tmpproposal->valid($user) > 0) {
|
||||
setEventMessage($tmpproposal->ref." ".$langs->trans('PassedInOpenStatus'), 'mesgs');
|
||||
} else {
|
||||
setEventMessage($langs->trans('CantBeValidated'), 'errors');
|
||||
@ -285,7 +285,7 @@ if ($action == 'validate') {
|
||||
$error++;
|
||||
}
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
setEventMessages($tmpproposal->error, $tmpproposal->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
@ -305,14 +305,14 @@ if ($action == "sign") {
|
||||
$db->begin();
|
||||
$error = 0;
|
||||
foreach ($toselect as $checked) {
|
||||
if ($tmpproposal->fetch($checked)) {
|
||||
if ($tmpproposal->fetch($checked) > 0) {
|
||||
if ($tmpproposal->statut == $tmpproposal::STATUS_VALIDATED) {
|
||||
$tmpproposal->statut = $tmpproposal::STATUS_SIGNED;
|
||||
|
||||
if ($tmpproposal->update($user)) {
|
||||
if ($tmpproposal->update($user) > 0) {
|
||||
setEventMessage($tmpproposal->ref." ".$langs->trans('Signed'), 'mesgs');
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
setEventMessages($tmpproposal->error, $tmpproposal->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
} else {
|
||||
@ -320,7 +320,7 @@ if ($action == "sign") {
|
||||
$error++;
|
||||
}
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
setEventMessages($tmpproposal->error, $tmpproposal->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -84,6 +84,17 @@ ProposalCustomerSignature=Written acceptance, company stamp, date and signature
|
||||
ProposalsStatisticsSuppliers=Vendor proposals statistics
|
||||
CaseFollowedBy=Case followed by
|
||||
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
|
||||
IdProduct=Product ID
|
||||
PrParentLine=Proposal Parent Line
|
||||
|
||||
Loading…
Reference in New Issue
Block a user