diff --git a/htdocs/compta/facture.php3 b/htdocs/compta/facture.php3 index 65dd541041b..f32d13610a4 100644 --- a/htdocs/compta/facture.php3 +++ b/htdocs/compta/facture.php3 @@ -218,7 +218,7 @@ if ($action == 'send') $sendto = htmlentities($sendto); - $sql = "INSERT INTO llx_actioncomm (datea,fk_action,fk_soc,note,fk_facture, fk_contact,fk_user_author, label) VALUES (now(), 9 ,$fac->socidp ,'Envoyée à $sendto',$fac->id, $sendtoid, $user->id, 'Envoi Facture par mail');"; + $sql = "INSERT INTO llx_actioncomm (datea,fk_action,fk_soc,note,fk_facture, fk_contact,fk_user_author, label, percent) VALUES (now(), 9 ,$fac->socidp ,'Envoyée à $sendto',$fac->id, $sendtoid, $user->id, 'Envoi Facture par mail',100);"; if (! $db->query($sql) ) { @@ -872,6 +872,17 @@ else { $sql .= " AND date_format(f.datef, '%m') = $month"; } + + if ($filtre) + { + $filtrearr = split(",", $filtre); + foreach ($filtrearr as $fil) + { + $filt = split(":", $fil); + $sql .= " AND " . $filt[0] . " = " . $filt[1]; + } + } + if ($year > 0) { $sql .= " AND date_format(f.datef, '%Y') = $year"; @@ -907,17 +918,25 @@ else $var=!$var; print "