diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 0ea29517e63..8b159df97c4 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -3024,6 +3024,7 @@ class Adherent extends CommonObject $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'adherent'; $sql .= " WHERE entity = ".((int) $conf->entity); // Do not use getEntity('adherent').")" here, we want the batch to be on its entity only; + $sql .= " AND statut = 1"; $sql .= " AND datefin = '".$this->db->idate($datetosearchfor)."'"; //$sql .= " LIMIT 10000"; diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 078a19d9437..e45b6cb59a3 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -1906,7 +1906,8 @@ if ($num > 0) { $facturestatic->id = $obj->id; $facturestatic->ref = $obj->ref; - $facturestatic->ref_client = $obj->ref_client; + $facturestatic->ref_client = $obj->ref_client; // deprecated + $facturestatic->ref_customer = $obj->ref_client; $facturestatic->type = $obj->type; $facturestatic->subtype = $obj->subtype; $facturestatic->total_ht = $obj->total_ht; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index fc9b51c4630..47060b949f4 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -9423,9 +9423,9 @@ abstract class CommonObject /** - * Function to prepare a part of the query for insert by returning an array with all properties of object. + * Function to return the array of data key-value from the ->fields and all the ->properties of an object. * - * Note $this->${field} are set by the page that make the createCommon() or the updateCommon(). + * Note: $this->${field} are set by the page that make the createCommon() or the updateCommon(). * $this->${field} should be a clean and string value (so date are formated for SQL insert). * * @return array Array with all values of each properties to update diff --git a/htdocs/core/lib/expensereport.lib.php b/htdocs/core/lib/expensereport.lib.php index 0bd84fc02f3..524ef2ce56e 100644 --- a/htdocs/core/lib/expensereport.lib.php +++ b/htdocs/core/lib/expensereport.lib.php @@ -81,7 +81,7 @@ function expensereport_prepare_head($object) $head[$h][2] = 'info'; $h++; - complete_head_from_modules($conf, $langs, $object, $head, $h, 'donation', 'add', 'external'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'expensereport', 'add', 'external'); complete_head_from_modules($conf, $langs, $object, $head, $h, 'expensereport', 'remove'); diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 708a977677e..985d5d114f4 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1351,8 +1351,6 @@ if (empty($reshook)) { $tva_tx = get_default_tva($soc, $mysoc, $lines[$i]->fk_product, $product_fourn_price_id); } - $object->special_code = $lines[$i]->special_code; - $result = $object->addline( $desc, $lines[$i]->subprice, @@ -1375,7 +1373,9 @@ if (empty($reshook)) { $lines[$i]->fk_unit, 0, $element, - !empty($lines[$i]->id) ? $lines[$i]->id : $lines[$i]->rowid + !empty($lines[$i]->id) ? $lines[$i]->id : $lines[$i]->rowid, + -1, + $lines[$i]->special_code ); if ($result < 0) {