Merge pull request #19524 from 1ocate/typoReceive

Fix typo 'usercanreceived' -> 'usercanreceive' in '/htdocs/fourn/commande/card.php'
This commit is contained in:
Laurent Destailleur 2021-12-08 21:39:55 +01:00 committed by GitHub
commit 160c8402ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1082,7 +1082,7 @@ if (empty($reshook)) {
} }
// Set status of reception (complete, partial, ...) // Set status of reception (complete, partial, ...)
if ($action == 'livraison' && $usercanreceived) { if ($action == 'livraison' && $usercanreceive) {
if ($cancel) { if ($cancel) {
$action = ''; $action = '';
} else { } else {
@ -2510,7 +2510,7 @@ if ($action == 'create') {
} }
if (in_array($object->statut, array(3, 4, 5))) { if (in_array($object->statut, array(3, 4, 5))) {
if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) && $usercanreceived) { if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) && $usercanreceive) {
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/fourn/commande/dispatch.php?id='.$object->id.'">'.$labelofbutton.'</a></div>'; print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/fourn/commande/dispatch.php?id='.$object->id.'">'.$labelofbutton.'</a></div>';
} else { } else {
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$labelofbutton.'</a></div>'; print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$labelofbutton.'</a></div>';
@ -2528,7 +2528,7 @@ if ($action == 'create') {
// Classify received (this does not record reception) // Classify received (this does not record reception)
if ($object->statut == CommandeFournisseur::STATUS_ORDERSENT || $object->statut == CommandeFournisseur::STATUS_RECEIVED_PARTIALLY) { if ($object->statut == CommandeFournisseur::STATUS_ORDERSENT || $object->statut == CommandeFournisseur::STATUS_RECEIVED_PARTIALLY) {
if ($usercanreceived) { if ($usercanreceive) {
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&token='.newToken().'&action=classifyreception#classifyreception">'.$langs->trans("ClassifyReception").'</a></div>'; print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&token='.newToken().'&action=classifyreception#classifyreception">'.$langs->trans("ClassifyReception").'</a></div>';
} }
} }
@ -2647,7 +2647,7 @@ if ($action == 'create') {
print '</div><div class="fichehalfright">'; print '</div><div class="fichehalfright">';
if ($action == 'classifyreception') { if ($action == 'classifyreception') {
if ($usercanreceived && ($object->statut == CommandeFournisseur::STATUS_ORDERSENT || $object->statut == CommandeFournisseur::STATUS_RECEIVED_PARTIALLY)) { if ($usercanreceive && ($object->statut == CommandeFournisseur::STATUS_ORDERSENT || $object->statut == CommandeFournisseur::STATUS_RECEIVED_PARTIALLY)) {
// Set status to received (action=livraison) // Set status to received (action=livraison)
print '<!-- form to record purchase order received -->'."\n"; print '<!-- form to record purchase order received -->'."\n";
print '<form id="classifyreception" action="card.php?id='.$object->id.'" method="post">'; print '<form id="classifyreception" action="card.php?id='.$object->id.'" method="post">';