dolibarr-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dolibarr-dev] patch facture fournisseur


From: Christophe Combelles
Subject: [Dolibarr-dev] patch facture fournisseur
Date: Fri, 24 Sep 2004 00:15:13 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040820 Debian/1.7.2-4

- La modif d'une facture fournisseur ne marche pas
- les commentaires de la facture ne sont pas affichés
- le lien de l'onglet ne pointe pas au bon endroit
- + une petite faute d'orthographe Emmettre -> Émettre


Voici donc :
- 1 patch pour facturefourn.class.php
- 1 patch pour fourn/facture/fiche.php


Christophe

--- facturefourn.class.php.old  2004-09-24 00:05:40.000000000 +0200
+++ facturefourn.class.php      2004-09-24 00:03:06.000000000 +0200
@@ -154,7 +154,7 @@
     {
       $sql = "SELECT 
fk_soc,libelle,facnumber,amount,remise,".$this->db->pdate(datef)."as df";
       $sql .= ", total_ht, total_tva, total_ttc, fk_user_author";
-      $sql .= ", fk_statut, paye";
+      $sql .= ", fk_statut, paye, f.note";
       $sql .= ", s.nom as socnom, s.idp as socidp";
       $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as 
f,".MAIN_DB_PREFIX."societe as s";
       $sql .= " WHERE f.rowid=$rowid AND f.fk_soc = s.idp ;";
@@ -184,7 +184,7 @@
 
              $this->socidp = $obj->socidp;
              $this->socnom = $obj->socnom;
-
+             $this->note = $obj->note;
              $this->db->free();
 
              /* 
--- fiche.php.old       2004-09-24 00:05:59.000000000 +0200
+++ fiche.php   2004-09-24 00:07:52.000000000 +0200
@@ -68,7 +68,7 @@
 
 if ($_POST["action"] == 'modif_libelle')
 {
-  $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn set libelle = '$form_libelle' 
WHERE rowid = $facid ;";
+  $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn set libelle = '$form_libelle' 
WHERE rowid = ".$_GET["facid"]." ;";
   $result = $db->query( $sql);
 }
 
@@ -82,7 +82,7 @@
   $sql .= ", libelle='".trim($_POST["libelle"])."'";
   $sql .= ", note='".$_POST["note"]."'";
   $sql .= ", datef = '$datefacture'";
-  $sql .= " WHERE rowid = $facid ;";
+  $sql .= " WHERE rowid = ".$_GET['facid']." ;";
   $result = $db->query( $sql);
 }
 
@@ -379,7 +379,7 @@
           *
           */
          
-         $head[0][0] = DOL_URL_ROOT."fiche.php?facid=".$fac->id;
+         $head[0][0] = "fiche.php?facid=".$fac->id;
          $head[0][1] = 'Facture : '.$fac->ref;
          $h = 1;
          $a = 0;
@@ -537,7 +537,7 @@
        }
       elseif ($fac->statut == 1 && $fac->paye == 0  && $user->societe_id == 0)
        {
-         print '<a class="tabAction" 
href="paiement.php?facid='.$fac->id.'&amp;action=create">Emmettre un 
paiement</a>';
+         print '<a class="tabAction" 
href="paiement.php?facid='.$fac->id.'&amp;action=create">Émettre un 
paiement</a>';
        }
       
       if ($fac->statut == 0 && $user->societe_id == 0)    

reply via email to

[Prev in Thread] Current Thread [Next in Thread]