Use ajax confirm box to validate supplier order
This commit is contained in:
parent
395a35d0dd
commit
3a7af7189f
@ -513,16 +513,9 @@ if ($id > 0)
|
|||||||
{
|
{
|
||||||
$commande->date_commande=time();
|
$commande->date_commande=time();
|
||||||
|
|
||||||
// on verifie si la commande est en numerotation provisoire
|
// We check if number is temporary number
|
||||||
$ref = substr($commande->ref, 1, 4);
|
if (eregi('^\(PROV',$commande->ref)) $newref = $commande->getNextNumRef($soc);
|
||||||
if ($ref == 'PROV')
|
else $newref = $commande->ref;
|
||||||
{
|
|
||||||
$newref = $commande->getNextNumRef($soc);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$newref = $commande->ref;
|
|
||||||
}
|
|
||||||
|
|
||||||
$text=$langs->trans('ConfirmValidateOrder',$newref);
|
$text=$langs->trans('ConfirmValidateOrder',$newref);
|
||||||
if ($conf->notification->enabled)
|
if ($conf->notification->enabled)
|
||||||
@ -928,7 +921,7 @@ if ($id > 0)
|
|||||||
if (eregi('^\(PROV',$commande->ref)) $num = $commande->getNextNumRef($soc);
|
if (eregi('^\(PROV',$commande->ref)) $num = $commande->getNextNumRef($soc);
|
||||||
else $num = $commande->ref;
|
else $num = $commande->ref;
|
||||||
$url = $_SERVER["PHP_SELF"].'?id='.$commande->id.'&action=confirm_valid&confirm=yes';
|
$url = $_SERVER["PHP_SELF"].'?id='.$commande->id.'&action=confirm_valid&confirm=yes';
|
||||||
print 'href="#" onClick="dialogConfirm(\''.$url.'\',\''.dol_escape_js($langs->trans('ConfirmValidateBill',$num)).'\',\''.dol_escape_js($langs->trans("Yes")).'\',\''.dol_escape_js($langs->trans("No")).'\',\'validate\')"';
|
print 'href="#" onClick="dialogConfirm(\''.$url.'\',\''.dol_escape_js($langs->trans('ConfirmValidateOrder',$num)).'\',\''.dol_escape_js($langs->trans("Yes")).'\',\''.dol_escape_js($langs->trans("No")).'\',\'validate\')"';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user