Ajoute les codes retours

This commit is contained in:
Rodolphe Quiedeville 2006-12-12 16:40:07 +00:00
parent f1ee880ac8
commit 9178a748bb

View File

@ -107,15 +107,17 @@ class InterfaceFraisport
{ {
return $this->_add_line_haulier($action,$object,$user,$langs,$conf); return $this->_add_line_haulier($action,$object,$user,$langs,$conf);
} }
// Renvoi 0 car aucune action de faite
return 0;
} }
function _add_line_haulier($action,$object,$user,$langs,$conf) function _add_line_haulier($action,$object,$user,$langs,$conf)
{ {
// Calcul les frais de port automatiquement // Ajoute une ligne de frais de port automatiquement
// //
// //
if (1 == 1) if ($conf->global->COMMANDE_ADD_DELIVERY_COST_LINE)
{ {
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->fk_commande); dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->fk_commande);
/* /*
@ -197,15 +199,15 @@ class InterfaceFraisport
} }
/* /*
* Calcul les frais de port * Calcul les frais de port
*
*/ */
$desc = "Frais de port (".$total." kg)"; $desc = "Frais de port (".$total." kg)";
$txtva = 19.6; $txtva = 19.6;
$rang = $num_lignes + 1; $rang = $num_lignes + 1;
$total_ht = 1 * $total; // Tout a 0 tant que l'on ne sait pas calculer
$total_tva = round($total_ht * $txtva / 100,2); $total_ht = 0;
$total_ttc = $total_ht + $total_tva; $total_tva = 0;
$total_ttc = 0;
if ($exists > 0) if ($exists > 0)
{ {
@ -220,7 +222,7 @@ class InterfaceFraisport
if ($resql) if ($resql)
{ {
return 2;
} }
else else
{ {
@ -253,21 +255,19 @@ class InterfaceFraisport
if ($resql) if ($resql)
{ {
return 1;
} }
else else
{ {
dolibarr_syslog("Trigger '".$this->name."' in action '$action' [5] SQL ERROR $sql"); dolibarr_syslog("Trigger '".$this->name."' in action '$action' [5] SQL ERROR $sql");
} }
} }
} }
else else
{ {
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); // Aucune action car l'option est desactivee
return -1; return 0;
} }
return 0;
} }
} }
?> ?>