diff --git a/htdocs/compta/index.php3 b/htdocs/compta/index.php3 index c55368290ee..1adf061c6fa 100644 --- a/htdocs/compta/index.php3 +++ b/htdocs/compta/index.php3 @@ -50,14 +50,22 @@ function valeur($sql) { $db = new Db(); -if ($action == 'add_bookmark') { +if ($action == 'add_bookmark') +{ + $sql = "DELETE FROM llx_bookmark WHERE fk_soc = ".$socidp." AND fk_user=".$user->id; + if (! $db->query($sql) ) + { + print $db->error(); + } $sql = "INSERT INTO llx_bookmark (fk_soc, dateb, fk_user) VALUES ($socidp, now(),".$user->id.");"; - if (! $db->query($sql) ) { - print $db->error(); - } + if (! $db->query($sql) ) + { + print $db->error(); + } } -if ($action == 'del_bookmark') { +if ($action == 'del_bookmark') +{ $sql = "DELETE FROM llx_bookmark WHERE rowid=$bid"; $result = $db->query($sql); } @@ -176,7 +184,8 @@ $sql .= " FROM llx_societe as s, llx_bookmark as b"; $sql .= " WHERE b.fk_soc = s.idp AND b.fk_user = ".$user->id; $sql .= " ORDER BY lower(s.nom) ASC"; -if ( $db->query($sql) ) { +if ( $db->query($sql) ) +{ $num = $db->num_rows(); $i = 0; @@ -185,16 +194,17 @@ if ( $db->query($sql) ) { print "


| Charges à payer | '; + print 'Factures à payer | '; print "||
| '.$obj->libelle.' | '; + print ''.$obj->libelle.' | '; print ''.price($obj->amount).' | '; print '|