Correction gestion num commande fournisseur
This commit is contained in:
parent
e478cfae41
commit
eda0e96d37
@ -156,7 +156,7 @@ class Commande extends CommonObject
|
|||||||
global $db, $langs, $conf;
|
global $db, $langs, $conf;
|
||||||
$langs->load("order");
|
$langs->load("order");
|
||||||
|
|
||||||
$dir = DOL_DOCUMENT_ROOT . "/includes/modules/commande/";
|
$dir = DOL_DOCUMENT_ROOT . "/includes/modules/commande";
|
||||||
|
|
||||||
if (defined("COMMANDE_ADDON") && COMMANDE_ADDON)
|
if (defined("COMMANDE_ADDON") && COMMANDE_ADDON)
|
||||||
{
|
{
|
||||||
@ -164,7 +164,7 @@ class Commande extends CommonObject
|
|||||||
|
|
||||||
// Chargement de la classe de numérotation
|
// Chargement de la classe de numérotation
|
||||||
$classname = $conf->global->COMMANDE_ADDON;
|
$classname = $conf->global->COMMANDE_ADDON;
|
||||||
require_once($dir.$file);
|
require_once($dir.'/'.$file);
|
||||||
|
|
||||||
$obj = new $classname();
|
$obj = new $classname();
|
||||||
$numref = "";
|
$numref = "";
|
||||||
|
|||||||
@ -977,8 +977,19 @@ else
|
|||||||
*/
|
*/
|
||||||
if ($_GET['action'] == 'valid')
|
if ($_GET['action'] == 'valid')
|
||||||
{
|
{
|
||||||
//$numfa = commande_get_num($soc);
|
// on vérifie si la facture est en numérotation provisoire
|
||||||
$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$id, $langs->trans('ValidateOrder'), $langs->trans('ConfirmValidateOrder'), 'confirm_valid');
|
$ref = substr($commande->ref, 1, 4);
|
||||||
|
if ($ref == 'PROV')
|
||||||
|
{
|
||||||
|
$num = $commande->getNextNumRef($soc);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$num = $commande->ref;
|
||||||
|
}
|
||||||
|
|
||||||
|
$text=$langs->trans('ConfirmValidateOrder',$num);
|
||||||
|
$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$id, $langs->trans('ValidateOrder'), $text, 'confirm_valid');
|
||||||
print '<br />';
|
print '<br />';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user