Le dimanche 02 octobre 2005 à 23:18 -0400, Christophe a écrit :
> Je ne sais pas pour vous, mais chez moi, le helvetica pour les "box",
> c'est vraiment pas chouette.
[...]
> De même, pour l'affichage des produits, les <td> en 2 lignes avec
> l'icone sur une, et le texte sur l'autre, c'est pas top :

Heureux de voir que ces deux patches ont été appliqués, merci Laurent.

Du coup, ça me donne envie de re-proposer certains autres, en pensant
que vous êtes peut-être passés à côté. Je joins un patch global
correspondant.

-- 
Christophe
diff -auNr --exclude-from=/var/www/excl_dolibarr2 /var/www/dolibarrcvs/htdocs/comm/addpropal.php /var/www/dolibarr/htdocs/comm/addpropal.php
--- /var/www/dolibarrcvs/htdocs/comm/addpropal.php	2005-09-16 23:25:23.000000000 -0400
+++ /var/www/dolibarr/htdocs/comm/addpropal.php	2005-10-03 18:34:08.000000000 -0400
@@ -131,7 +131,7 @@
                 print '<option value="'.$contact->idp.'"';
                 if ($contact->idp == $setcontact)
                 {
-                    print ' selected';
+                    print ' selected="true"';
                 }
                 print '>'.$contact->firstname.' '.$contact->name;
                 if ($contact->email) { print ' &lt;'.$contact->email.'&gt;'; }
@@ -191,7 +191,7 @@
         for ($i = 1 ; $i <= PROPALE_NEW_FORM_NB_PRODUCT ; $i++)
         {
             print '<tr><td>';
-            $form->select_produits('',"idprod".$i);
+            $form->select_produits('',"idprod".$i,'',50);
             print '</td>';
             print '<td><input type="text" size="2" name="qty'.$i.'" value="1"></td>';
             print '<td><input type="text" size="3" name="remise'.$i.'" value="'.$soc->remise_client.'"> %</td></tr>';
diff -auNr --exclude-from=/var/www/excl_dolibarr2 /var/www/dolibarrcvs/htdocs/comm/propal.php /var/www/dolibarr/htdocs/comm/propal.php
--- /var/www/dolibarrcvs/htdocs/comm/propal.php	2005-09-27 00:11:12.000000000 -0400
+++ /var/www/dolibarr/htdocs/comm/propal.php	2005-10-03 18:58:44.000000000 -0400
@@ -817,7 +817,7 @@
                 $var=!$var;
                 print '<tr '.$bc[$var].'>';
                 print '<td colspan="2">';
-                $html->select_produits('','idprod','',20);
+                $html->select_produits('','idprod','',50);
                 print '<br>';
                 print '<textarea cols="50" name="np_desc" rows="1"></textarea>';
                 print '</td>';
diff -auNr --exclude-from=/var/www/excl_dolibarr2 /var/www/dolibarrcvs/htdocs/compta/facture.php /var/www/dolibarr/htdocs/compta/facture.php
--- /var/www/dolibarrcvs/htdocs/compta/facture.php	2005-10-02 22:44:43.000000000 -0400
+++ /var/www/dolibarr/htdocs/compta/facture.php	2005-10-02 22:50:58.000000000 -0400
@@ -757,12 +757,12 @@
 			$html->select_produits('','idprod'.$i);
 			print '</td>';
 			print '<td><input type="text" size="3" name="qty'.$i.'" value="1"></td>';
-			print '<td><input type="text" size="4" name="remise_percent'.$i.'" value="0">%</td>';
+			print '<td nowrap="nowrap"><input type="text" size="4" name="remise_percent'.$i.'" value="0">%</td>';
 			print '<td>&nbsp;</td>';
 			// Si le module service est actif, on propose des dates de début et fin à la ligne
 			if ($conf->service->enabled)
 			{
-				print '<td>';
+				print '<td nowrap="nowrap">';
 				print 'Du ';
 				print $html->select_date('','date_start'.$i,0,0,1);
 				print '<br>au ';
diff -auNr --exclude-from=/var/www/excl_dolibarr2 /var/www/dolibarrcvs/htdocs/compta/stats/comp.php /var/www/dolibarr/htdocs/compta/stats/comp.php
--- /var/www/dolibarrcvs/htdocs/compta/stats/comp.php	2005-07-10 11:46:19.000000000 -0400
+++ /var/www/dolibarr/htdocs/compta/stats/comp.php	2005-08-20 16:48:52.000000000 -0400
@@ -212,7 +212,7 @@
     if ($num) {
       $beg = $obj->dm;
     } else {
-      $beg = 1 ;
+      $beg = 0 ;
     }
 
     if ($beg <= 12 ) {
diff -auNr --exclude-from=/var/www/excl_dolibarr2 /var/www/dolibarrcvs/htdocs/facture.class.php /var/www/dolibarr/htdocs/facture.class.php
--- /var/www/dolibarrcvs/htdocs/facture.class.php	2005-10-02 22:44:28.000000000 -0400
+++ /var/www/dolibarr/htdocs/facture.class.php	2005-10-02 22:50:51.000000000 -0400
@@ -130,8 +130,9 @@
 		if (! $this->projetid) $this->projetid = 'NULL';
 
 		$totalht = ($amount - $remise);
-		$tva = tva($totalht);
-		$total = $totalht + $tva;
+// NE ME SEMBLE PLUS JUSTIFIE ICI
+// 		$tva = tva($totalht);
+// 		$total = $totalht + $tva;
 
 		$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'facture (facnumber, fk_soc, datec, amount, remise, remise_percent';
 		$sql .= ', datef, note, fk_user_author, fk_projet';
diff -auNr --exclude-from=/var/www/excl_dolibarr2 /var/www/dolibarrcvs/htdocs/fourn/facture/fiche.php /var/www/dolibarr/htdocs/fourn/facture/fiche.php
--- /var/www/dolibarrcvs/htdocs/fourn/facture/fiche.php	2005-09-19 23:12:16.000000000 -0400
+++ /var/www/dolibarr/htdocs/fourn/facture/fiche.php	2005-09-19 23:32:54.000000000 -0400
@@ -115,10 +115,11 @@
 			      $_POST["reday"],
 			      $_POST["reyear"]);
 
-        $tva = 0;
-        $tva = ($_POST['tva_taux'] * $_POST['amount']) / 100 ;
+        $tva = (abs($_POST["tva_taux"]) * $_POST["amount"]) / 100 ;
         $remise = 0;
-        $total = $tva + $_POST['amount'];
+        $total = $_POST["amount"] ;
+        if ( (float)$_POST["tva_taux"] >= 0 )
+            $total += $tva;
 
         $db->begin();
 
@@ -159,7 +160,14 @@
 					$ttc = $_POST[$amountttc];
 					$ttc = str_replace(' ', '', $ttc);
 					$ttc = str_replace(',', '.', $ttc);
-                    $ht = $ttc / (1 + ($_POST[$tauxtva] / 100));
+                    if ( (float)$_POST[$tauxtva] >= 0 )
+                    {
+                        $ht = $ttc / (1 + ($_POST[$tauxtva] / 100));
+                    }
+					else
+					{
+						$ht = $ttc;
+					}
                     $atleastoneline=1;
                     $ret=$facfou->addline($_POST[$label], $ht, $_POST[$tauxtva], $_POST[$qty], 1);
                     if ($ret < 0) $nberror++;
@@ -217,7 +225,14 @@
 		$ttc = $_POST['amountttc'];
 		$ttc = str_replace(' ', '', $ttc);
 		$ttc = str_replace(',', '.', $ttc);
-		$ht = $ttc / (1 + ($_POST['tauxtva'] / 100));
+		if ( (float)$_POST['tauxtva'] >= 0 )
+		{
+			$ht = $ttc / (1 + ($_POST['tauxtva'] / 100));
+		}
+		else
+		{
+			$ht = $ttc;
+		}
 		$facfou->addline($_POST['label'], $ht, $_POST['tauxtva'], $_POST['qty']);
 	}
 	$_GET['action'] = 'edit';
@@ -434,7 +449,7 @@
             {
                 print "<tr $bc[1]>".'<td>'.$fac->lignes[$i][0]."</td>";
                 print '<td align="center">'.price($fac->lignes[$i][1])."</td>";
-                print '<td align="center">'.price($fac->lignes[$i][1] * (1+($fac->lignes[$i][2]/100)))."</td>";
+                print '<td align="center">'.price($fac->lignes[$i][1] * (1+(($fac->lignes[$i][2] >=0 ? $fac->lignes[$i][2] : 0 )/100)))."</td>";
                 print '<td align="center">'.$fac->lignes[$i][3]."</td>";
                 print '<td align="center">'.price($fac->lignes[$i][4])."</td>";
                 print '<td align="center">'.$fac->lignes[$i][2]."</td>";
diff -auNr --exclude-from=/var/www/excl_dolibarr2 /var/www/dolibarrcvs/htdocs/fourn/fournisseur.facture.class.php /var/www/dolibarr/htdocs/fourn/fournisseur.facture.class.php
--- /var/www/dolibarrcvs/htdocs/fourn/fournisseur.facture.class.php	2005-09-02 19:32:43.000000000 -0400
+++ /var/www/dolibarr/htdocs/fourn/fournisseur.facture.class.php	2005-09-02 19:36:39.000000000 -0400
@@ -98,8 +98,9 @@
         
         if (! $remise) $remise = 0 ;
         $totalht = ($amount - $remise);
-        $tva = tva($totalht);
-        $total = $totalht + $tva;
+// NE ME SEMBLE PLUS JUSTIFIE ICI
+//        $tva = tva($totalht);
+//        $total = $totalht + $tva;
     
         $sql = "INSERT INTO ".MAIN_DB_PREFIX."facture_fourn (facnumber, libelle, fk_soc, datec, datef, note, fk_user_author, date_lim_reglement) ";
         $sql .= " VALUES ('".$number."','".addslashes($this->libelle)."',";
@@ -341,8 +342,12 @@
     if (is_numeric($puht) && is_numeric($qty))
     {
         $totalht  = ($puht * $qty);
-        $tva      = ($totalht * $tauxtva /  100);
-        $totalttc = $totalht + $tva;
+        $tva      = ($totalht * abs($tauxtva) /  100);
+        $totalttc = $totalht;
+        if ( (float)$tauxtva >= 0 )
+        {
+            $totalttc += $tva;
+        }
     
         $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det ";
         $sql .= "SET description ='".addslashes($label)."'";
@@ -414,16 +419,10 @@
                 $total_tva = $row[1];
                 $total_ttc = $row[2];
     
-                if ($total_ht == '')
-                $total_ht = 0;
-    
-                if ($total_tva == '')
-                $total_tva = 0;
-    
-                if ($total_ttc == '')
-                $total_ttc = 0;
-    
             }
+            $total_ht  = $total_ht  != '' ? $total_ht  : 0;
+            $total_tva = $total_tva != '' ? $total_tva : 0;
+            $total_ttc = $total_ttc != '' ? $total_ttc : 0;
     
             $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn SET";
             $sql .= " total_ht = ". ereg_replace(",",".",$total_ht);
diff -auNr --exclude-from=/var/www/excl_dolibarr2 /var/www/dolibarrcvs/htdocs/html.form.class.php /var/www/dolibarr/htdocs/html.form.class.php
--- /var/www/dolibarrcvs/htdocs/html.form.class.php	2005-09-25 22:43:33.000000000 -0400
+++ /var/www/dolibarr/htdocs/html.form.class.php	2005-09-25 22:46:34.000000000 -0400
@@ -1212,18 +1212,14 @@
             for ($i = 0; $i < $num; $i++)
             {
                 $obj = $this->db->fetch_object();
-                $txtva[ $i ] = $obj->taux;
-                $libtva[ $i ] = $obj->taux.'%'.($obj->recuperableonly ? ' *':'');
+                $txtva[ $i ] = $obj->taux * ($obj->recuperableonly ? -1: 1);
             }
         }
         else
         {
             $txtva[0] = '19.6';
-            $libtva[0] = '19.6%';
             $txtva[1] = '5.5';
-            $libtva[1] = '5.5%';
             $txtva[2] = '0';
-            $libtva[2] = '0%';
         }
 
         if ($defaulttx == '')
@@ -1243,7 +1239,7 @@
             {
                 print ' selected="true"';
             }
-            print '>'.$libtva[$i].'</option>';
+            print '>'.abs($txtva[$i]).'%'.($txtva[$i]<0?MENTION_NPR:'').'</option>';
         }
         print '</select>';
     }
diff -auNr --exclude-from=/var/www/excl_dolibarr2 /var/www/dolibarrcvs/htdocs/includes/boxes/box_factures_fourn_imp.php /var/www/dolibarr/htdocs/includes/boxes/box_factures_fourn_imp.php
--- /var/www/dolibarrcvs/htdocs/includes/boxes/box_factures_fourn_imp.php	2005-07-14 15:02:33.000000000 -0400
+++ /var/www/dolibarr/htdocs/includes/boxes/box_factures_fourn_imp.php	2005-08-17 01:54:12.000000000 -0400
@@ -96,20 +96,6 @@
 
                     $i++;
                 }
-                
-                $i=$num;
-                while ($i < $max)
-                {
-                    if ($num==0 && $i==$num)
-                    {
-                        $this->info_box_contents[$i][0] = array('align' => 'center','text'=>$langs->trans("NoSupplierBillsUnpayed"));
-                        $this->info_box_contents[$i][1] = array('text'=>'&nbsp;');
-                    } else {
-                        $this->info_box_contents[$i][0] = array('text'=>'&nbsp;');
-                        $this->info_box_contents[$i][1] = array('text'=>'&nbsp;');
-                    }
-                    $i++;
-                }
             }
             else {
                 dolibarr_print_error($db);
diff -auNr --exclude-from=/var/www/excl_dolibarr2 /var/www/dolibarrcvs/htdocs/includes/modules/facture/pdf_bernique.modules.php /var/www/dolibarr/htdocs/includes/modules/facture/pdf_bernique.modules.php
--- /var/www/dolibarrcvs/htdocs/includes/modules/facture/pdf_bernique.modules.php	2005-07-16 07:11:39.000000000 -0400
+++ /var/www/dolibarr/htdocs/includes/modules/facture/pdf_bernique.modules.php	2005-08-20 01:08:39.000000000 -0400
@@ -247,7 +247,7 @@
     foreach ($tvas as $key => $value)
       {
 	$pdf->SetXY (10, $tab4_top + ( $i * $tab2_hl));
-	$pdf->MultiCell(25, $tab2_hl, "TVA à ". $key."%", 0, 'L', 0);
+	$pdf->MultiCell(25, $tab2_hl, "TVA à ". abs($key)."%".( (float)$key < 0 ? " (".$langs->trans("NonPercuRecuperable").")" : '') , 0, 'L', 0);
 	$pdf->SetXY (35, $tab4_top + ( $i * $tab2_hl));
 	$pdf->MultiCell(20, $tab2_hl, price($tvas[$key]), 0, 'R', 0);
 	$i++;
diff -auNr --exclude-from=/var/www/excl_dolibarr2 /var/www/dolibarrcvs/htdocs/includes/modules/facture/pdf_crabe.modules.php /var/www/dolibarr/htdocs/includes/modules/facture/pdf_crabe.modules.php
--- /var/www/dolibarrcvs/htdocs/includes/modules/facture/pdf_crabe.modules.php	2005-09-12 00:26:12.000000000 -0400
+++ /var/www/dolibarr/htdocs/includes/modules/facture/pdf_crabe.modules.php	2005-09-12 00:27:52.000000000 -0400
@@ -706,28 +706,31 @@
         }
 
         // Caractéristiques emetteur
-        $pdf->SetFont('Arial','',9);
+        $carac_emetteur = '';
         if (defined("FAC_PDF_ADRESSE"))
         {
-            $pdf->MultiCell(80, 4, FAC_PDF_ADRESSE);
+            $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).FAC_PDF_ADRESSE;
         }
-        $pdf->MultiCell(80, 4, "\n");
+        $carac_emetteur .= "\n";
         if (defined("FAC_PDF_TEL") && FAC_PDF_TEL)
         {
-            $pdf->MultiCell(80, 4, $langs->trans("Phone").": ".FAC_PDF_TEL);
+            $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$langs->trans("Phone").": ".FAC_PDF_TEL;
         }
         if (defined("FAC_PDF_FAX") && FAC_PDF_FAX)
         {
-            $pdf->MultiCell(80, 4, $langs->trans("Fax").": ".FAC_PDF_FAX);
+            $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$langs->trans("Fax").": ".FAC_PDF_FAX;
         }
 		if (defined("FAC_PDF_MEL") && FAC_PDF_MEL)
 		{
-			$pdf->MultiCell(80, 4, $langs->trans("Email").": ".FAC_PDF_MEL);
+			$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$langs->trans("Email").": ".FAC_PDF_MEL;
 		}
 		if (defined("FAC_PDF_WWW") && FAC_PDF_WWW)
 		{
-			$pdf->MultiCell(80, 4, $langs->trans("Web").": ".FAC_PDF_WWW);
+			$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$langs->trans("Web").": ".FAC_PDF_WWW;
 		}
+        $pdf->SetFont('Arial','',9);
+        $pdf->SetXY(12,$posy+8);
+        $pdf->MultiCell(80,4, $carac_emetteur);
 
         // Client destinataire
         $posy=42;
diff -auNr --exclude-from=/var/www/excl_dolibarr2 /var/www/dolibarrcvs/htdocs/includes/modules/propale/pdf_propale_azur.modules.php /var/www/dolibarr/htdocs/includes/modules/propale/pdf_propale_azur.modules.php
--- /var/www/dolibarrcvs/htdocs/includes/modules/propale/pdf_propale_azur.modules.php	2005-09-12 00:26:13.000000000 -0400
+++ /var/www/dolibarr/htdocs/includes/modules/propale/pdf_propale_azur.modules.php	2005-09-29 15:06:34.000000000 -0400
@@ -622,28 +638,31 @@
         }
 
         // Caractéristiques emetteur
-        $pdf->SetFont('Arial','',9);
+        $carac_emetteur = '';
         if (defined("FAC_PDF_ADRESSE"))
         {
-            $pdf->MultiCell(80, 4, FAC_PDF_ADRESSE);
+            $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).FAC_PDF_ADRESSE;
         }
-        $pdf->MultiCell(80, 4, "\n");
+        $carac_emetteur .= "\n";
         if (defined("FAC_PDF_TEL") && FAC_PDF_TEL)
         {
-            $pdf->MultiCell(80, 4, $langs->trans("Phone").": ".FAC_PDF_TEL);
+            $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$langs->trans("Phone").": ".FAC_PDF_TEL;
         }
         if (defined("FAC_PDF_FAX") && FAC_PDF_FAX)
         {
-            $pdf->MultiCell(80, 4, $langs->trans("Fax").": ".FAC_PDF_FAX);
+            $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$langs->trans("Fax").": ".FAC_PDF_FAX;
         }
 		if (defined("FAC_PDF_MEL") && FAC_PDF_MEL)
 		{
-			$pdf->MultiCell(80, 4, $langs->trans("Email").": ".FAC_PDF_MEL);
+			$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$langs->trans("Email").": ".FAC_PDF_MEL;
 		}
 		if (defined("FAC_PDF_WWW") && FAC_PDF_WWW)
 		{
-			$pdf->MultiCell(80, 4, $langs->trans("Web").": ".FAC_PDF_WWW);
+			$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$langs->trans("Web").": ".FAC_PDF_WWW;
         }
+        $pdf->SetFont('Arial','',9);
+        $pdf->SetXY(12,$posy+8);
+        $pdf->MultiCell(80,4, $carac_emetteur);
 
         // Client destinataire
         $posy=42;
diff -auNr --exclude-from=/var/www/excl_dolibarr2 /var/www/dolibarrcvs/htdocs/lib/functions.inc.php /var/www/dolibarr/htdocs/lib/functions.inc.php
--- /var/www/dolibarrcvs/htdocs/lib/functions.inc.php	2005-10-02 22:44:53.000000000 -0400
+++ /var/www/dolibarr/htdocs/lib/functions.inc.php	2005-10-02 22:51:00.000000000 -0400
@@ -1544,7 +1544,7 @@
 */
 function tva($euros, $taux=19.6)
 {
-  $taux = $taux / 100 ;
+  $taux = abs($taux) / 100 ;
 
   return sprintf("%01.2f",($euros * $taux));
 }
diff -auNr --exclude-from=/var/www/excl_dolibarr2 /var/www/dolibarrcvs/htdocs/lib/price.lib.php /var/www/dolibarr/htdocs/lib/price.lib.php
--- /var/www/dolibarrcvs/htdocs/lib/price.lib.php	2004-10-19 18:47:16.000000000 -0400
+++ /var/www/dolibarr/htdocs/lib/price.lib.php	2005-08-21 22:11:33.000000000 -0400
@@ -38,67 +38,78 @@
 
 function calcul_price($products, $remise_percent)
 {
-  $total_ht = 0;
-  $amount_ht = 0;
-  $tva = array();
-  $total_tva = 0;
-  $total_remise = 0;
-
-  $num = sizeof($products);
-  $i = 0;
-
-  while ($i < $num)	  
-    {
-      $prod_price = $products[$i][0];
-      $prod_qty   = $products[$i][1];
-      $prod_txtva = $products[$i][2];
-
-      $lprice = $prod_qty * $prod_price;
-
-      $amount_ht = $amount_ht + $lprice;
-
-      if ($remise_percent > 0)
+	$total_ht = 0;
+	$amount_ht = 0;
+	$total_tva = 0;
+	$total_ttc = 0;
+	$total_remise = 0;
+	$result[5] = array();
+	
+	if ( sizeof( $products ) )
 	{
-	  $lremise = ($lprice * $remise_percent / 100);
-	  $lprice = $lprice - $lremise;
-	  $total_remise = $total_remise + $lremise;
+		foreach ($products as $product)
+		{
+			$prod_price = $product[0];
+			$prod_qty   = $product[1];
+			$prod_txtva = $product[2];
+		
+			// montant total HT de la ligne
+			$line_price_ht = $prod_qty * $prod_price;
+		
+			// incrémentation montant HT hors remise de l'ensemble
+			$amount_ht += $line_price_ht;
+		
+			// si une remise est consentie sur l'ensemble
+			if ($remise_percent > 0)
+			{
+				// calcul de la remise sur la ligne
+				$line_remise = ($line_price_ht * $remise_percent / 100);
+				// soustraction de cette remise au montant HT de la ligne
+				$line_price_ht -= $line_remise;
+				// incrémentation du montant total de remise sur l'ensemble
+				$total_remise += $line_remise;
+			}
+			// incrémentation du montant HT remisé de l'ensemble
+			$total_ht += $line_price_ht;
+		
+			// calcul de la TVA sur la ligne
+			$line_tva = ($line_price_ht * (abs($prod_txtva) / 100));
+		
+			// incrémentation du montant TTC de la valeur HT, on traite la TVA ensuite
+			$total_ttc  += $line_price_ht; 
+			// traitement de la tva non perçue récupérable
+			if ( $prod_txtva >= 0 )
+			{
+				// ce n'est pas une TVA non perçue récupérable,
+				// donc on incrémente le total TTC de l'ensemble, de la valeur de TVA de la ligne
+				$total_ttc  += $line_tva; 
+			}
+			// dans tous les cas, on incrémente le total de TVA
+			$total_tva += $line_tva;
+			// on incrémente le tableau de différentiation des taux de TVA
+// s'il faut rassembler les tva facturables ou non, du même taux
+// dans un même ligne du tableau, remplacer la ligne suivante par :
+//			$result[5][abs($prod_txtva)] += $line_tva;
+			$result[5][$prod_txtva] += $line_tva;
+		
+			$i++;
+		}
 	}
-      
-      $total_ht = $total_ht + $lprice;
-
-      $ligne_tva = ($lprice * ($prod_txtva / 100));
-
-      $tva[$prod_txtva] = $tva[$prod_txtva] + $ligne_tva;
-      $i++;
-    }
-
-  /*
-   * Sommes et arrondis
-   */
-  $j=0;
-  $result[5] = array();
-
-  foreach ($tva as $key => $value)
-    {
-      $tva[$key] = round($tva[$key], 2);
-      $total_tva = $total_tva + $tva[$key];
-      $result[5][$key] = $tva[$key];
-      $j++;
-    }
-  
-  $total_ht  = round($total_ht, 2);
-  $total_tva = round($total_tva, 2);
-  
-  $total_ttc = $total_ht + $total_tva;
-  
-  /*
-   *
-   */
-  $result[0] = $total_ht;
-  $result[1] = $total_tva;
-  $result[2] = $total_ttc;
-  $result[3] = $total_remise;
-  $result[4] = $amount_ht;
-
-  return $result;
+	/*
+	* arrondis
+	*/
+	$total_ht  = round($total_ht, 2);
+	$total_tva = round($total_tva, 2);
+	
+	/*
+	*
+	*/
+	$result[0] = $total_ht;
+	$result[1] = $total_tva;
+	$result[2] = $total_ttc;
+	$result[3] = $total_remise;
+	$result[4] = $amount_ht;
+	
+	return $result;
 }
+
diff -auNr --exclude-from=/var/www/excl_dolibarr2 /var/www/dolibarrcvs/htdocs/master.inc.php /var/www/dolibarr/htdocs/master.inc.php
--- /var/www/dolibarrcvs/htdocs/master.inc.php	2005-10-02 22:44:29.000000000 -0400
+++ /var/www/dolibarr/htdocs/master.inc.php	2005-10-02 22:50:51.000000000 -0400
@@ -411,4 +411,5 @@
 $yesno[0]="no";
 $yesno[1]="yes";
 
+if ( ! defined('MENTION_NPR') ) define('MENTION_NPR','(npr)');
 ?>
diff -auNr --exclude-from=/var/www/excl_dolibarr2 /var/www/dolibarrcvs/htdocs/product/fiche.php /var/www/dolibarr/htdocs/product/fiche.php
--- /var/www/dolibarrcvs/htdocs/product/fiche.php	2005-10-02 22:44:54.000000000 -0400
+++ /var/www/dolibarr/htdocs/product/fiche.php	2005-10-02 22:54:24.000000000 -0400
@@ -102,7 +102,8 @@
     {
         $product->ref                = stripslashes($_POST["ref"]);
         $product->libelle            = stripslashes($_POST["libelle"]);
-        $product->price              = stripslashes($_POST["price"]);
+        if ( isset( $_POST["price"] ) )
+          $product->price              = stripslashes($_POST["price"]);
         $product->tva_tx             = $_POST["tva_tx"];
         $product->description        = stripslashes($_POST["desc"]);
         $product->note               = stripslashes($_POST["note"]);
diff -auNr --exclude-from=/var/www/excl_dolibarr2 /var/www/dolibarrcvs/mysql/migration/1.1.0-2.0.0.sql /var/www/dolibarr/mysql/migration/1.1.0-2.0.0.sql
--- /var/www/dolibarrcvs/mysql/migration/1.1.0-2.0.0.sql	2005-09-28 00:33:12.000000000 -0400
+++ /var/www/dolibarr/mysql/migration/1.1.0-2.0.0.sql	2005-09-28 00:34:17.000000000 -0400
@@ -1366,6 +1366,7 @@
 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'52','Société en nom collectif');
 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'53','Société en commandite');
 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'54','Société à responsabilité limité (SARL)');
+insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'54b','Entreprise Unipersonnelle à Responsabilité Limitée (EURL)');
 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'55','Société anonyme à conseil d\'administration');
 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'56','Société anonyme à directoire');
 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'57','Société par actions simplifiée');
_______________________________________________
Dolibarr-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/dolibarr-dev

Répondre à