Ajout de champs supplémentaire dans l'export des commandes.

récupération des notes privées et public de propal à commande.
Ajout option dans la config du module commande qui permet de valider la commande après cloture de la propale, permet de ne pas passer par une commande provisoire.
This commit is contained in:
Regis Houssin 2007-03-21 16:54:31 +00:00
parent 24fc3a898e
commit c39bb227ee
3 changed files with 27 additions and 3 deletions

View File

@ -129,6 +129,11 @@ if ($_POST["action"] == 'sethidetreated')
dolibarr_set_const($db, "COMMANDE_HIDE_TREATED",$_POST["hidetreated"]); dolibarr_set_const($db, "COMMANDE_HIDE_TREATED",$_POST["hidetreated"]);
} }
if ($_POST["action"] == 'setvalidorder')
{
dolibarr_set_const($db, "COMMANDE_VALID_AFTER_CLOSE_PROPAL",$_POST["validorder"]);
}
if ($_POST["action"] == 'deliverycostline') if ($_POST["action"] == 'deliverycostline')
{ {
dolibarr_set_const($db, "COMMANDE_ADD_DELIVERY_COST_LINE",$_POST["addline"]); dolibarr_set_const($db, "COMMANDE_ADD_DELIVERY_COST_LINE",$_POST["addline"]);
@ -343,7 +348,7 @@ print '<td align="center" width="160">'.$langs->trans("Value").'</td>';
print "</tr>\n"; print "</tr>\n";
$var=true; $var=true;
// cacher les commandes classer facturées des listes // Cacher les commandes classer facturées des listes
$var=! $var; $var=! $var;
print '<tr '.$bc[$var].'><td>'; print '<tr '.$bc[$var].'><td>';
@ -356,8 +361,21 @@ print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'
print "</form>\n"; print "</form>\n";
print "</td></tr>\n"; print "</td></tr>\n";
// Valider la commande après cloture de la propale
// permet de na pas passer par l'option commande provisoire
$var=! $var;
// cacher les commandes classer facturées des listes print '<tr '.$bc[$var].'><td>';
print $langs->trans("ValidOrderAfterPropalClosed");
print '</td><td width="160" align="center">';
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="action" value="setvalidorder">';
print $html->selectyesno("validorder",$conf->global->COMMANDE_VALID_AFTER_CLOSE_PROPAL,1);
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print "</form>\n";
print "</td></tr>\n";
// Ajouter une ligne de frais port indiquant le poids de la commande
$var=! $var; $var=! $var;
print '<tr '.$bc[$var].'><td>'; print '<tr '.$bc[$var].'><td>';

View File

@ -492,7 +492,6 @@ class Commande extends CommonObject
// Fin appel triggers // Fin appel triggers
$this->db->commit(); $this->db->commit();
#$this->valid($user);
return $this->id; return $this->id;
} }
else else

View File

@ -1306,6 +1306,13 @@ class Propal extends CommonObject
include_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php"); include_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php");
$commande = new Commande($this->db); $commande = new Commande($this->db);
$result=$commande->create_from_propale($user, $this->id); $result=$commande->create_from_propale($user, $this->id);
// Ne pas passer par la commande provisoire
if ($conf->global->COMMANDE_VALID_AFTER_CLOSE_PROPAL == 1)
{
$commande->fetch($result);
$commande->valid($user);
}
return $result; return $result;
} }