/[dolibarr]/dolibarr/htdocs/propal.class.php
ViewVC logotype

Diff of /dolibarr/htdocs/propal.class.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.56 by eldy, Tue Aug 30 21:07:53 2005 UTC revision 1.57 by eldy, Thu Sep 1 19:29:30 2005 UTC
# Line 221  class Propal Line 221  class Propal
221            
222            
223    /**    /**
224     * \brief     Mise à jour d'une ligne de produit     *    \brief      Mise à jour d'une ligne de produit
225     * \param     id              id de la ligne     *    \param      id              Id de la ligne
226     * \param     subprice        prix unitaire     *    \param      subprice        Prix unitaire
227     * \param     qty             quantité     *    \param      qty             Quantité
228     * \param     remise_percent  remise effectuée sur le produit     *    \param      remise_percent  Remise effectuée sur le produit
229     * \return    int             0 en cas de succès     *    \param      desc            Description
230       *    \return     int             0 en cas de succès
231     */     */
232                    
233      function UpdateLigne($id, $subprice, $qty, $remise_percent=0)      function UpdateLigne($id, $subprice, $qty, $remise_percent=0, $tva_tx, $desc='')
234      {      {
235          if ($this->statut == 0)          if ($this->statut == 0)
236          {          {
# Line 241  class Propal Line 242  class Propal
242              }              }
243            
244              $sql = "UPDATE ".MAIN_DB_PREFIX."propaldet ";              $sql = "UPDATE ".MAIN_DB_PREFIX."propaldet ";
245              $sql .= " SET qty='".$qty."'";              $sql.= " SET qty='".$qty."'";
246              $sql .= " , price='". ereg_replace(",",".",$price)."'";              $sql.= " , price='". ereg_replace(",",".",$price)."'";
247              $sql .= " , remise_percent='".ereg_replace(",",".",$remise_percent)."'";              $sql.= " , remise_percent='".ereg_replace(",",".",$remise_percent)."'";
248              $sql .= " , subprice='".ereg_replace(",",".",$subprice)."'";              $sql.= " , subprice='".ereg_replace(",",".",$subprice)."'";
249              $sql .= " WHERE rowid = '".$id."';";              $sql.= " , tva_tx='".ereg_replace(",",".",$tva_tx)."'";
250                $sql.= " , description='".addslashes($desc)."'";
251                $sql.= " WHERE rowid = '".$id."';";
252            
253              if ($this->db->query($sql) )              if ($this->db->query($sql))
254              {              {
255                  $this->update_price();                  $this->update_price();
256                  return 0;                  return 0;
257              }              }
258              else              else
259              {              {
260                    $this->error=$this->db->error();
261                  dolibarr_syslog("Propal::UpdateLigne Erreur -1");                  dolibarr_syslog("Propal::UpdateLigne Erreur -1");
262                  return -1;                  return -1;
263              }              }

Legend:
Removed from v.1.56  
changed lines
  Added in v.1.57

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26