dolibarr-bugtrack
[Top][All Lists]
Advanced

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

[Dolibarr-bugtrack] [bug #18621] another credit nota fix


From: Franky Van Liedekerke
Subject: [Dolibarr-bugtrack] [bug #18621] another credit nota fix
Date: Thu, 28 Dec 2006 21:12:52 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.8.1) Gecko/20060601 Firefox/2.0 (Ubuntu-edgy)

URL:
  <http://savannah.nongnu.org/bugs/?18621>

                 Summary: another credit nota fix
                 Project: Dolibarr
            Submitted by: liedekef
            Submitted on: Thursday 28/12/06 at 21:12
                Severity: 3 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
                 Release: None
        Operating System: None

    _______________________________________________________

Details:

When an invoice has more than one credit nota, it should display them both
when viewing the invoice. It seems that the function getIdAvoirInvoice() in
the file htdocs/facture.class.php only returns 1 credit nota. Changing the
lines in the following code fixes it:

old code:
    $resql=$this->db->query($sql);
    if ($resql)
      {
        $obj = $this->db->fetch_object($resql);
        if ($obj)
          { 
            // Si il y en a
            $idarray[]=$obj->rowid;
          }
      }

As you can see above, there's no loop through the results of $resql if more
than 1 result is found.

new code:
    $resql=$this->db->query($sql);
    if ($resql)
      {
        $num = $this->db->num_rows();
        $i = 0;
        while ($i < $num)
          {
            $row = $this->db->fetch_row($i);
            $idarray[]=$row[0];
            $i++;
          }
      }

Franky




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?18621>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

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