diff --git a/htdocs/telephonie/index.php b/htdocs/telephonie/index.php index f2a94247895..760f65f3e05 100644 --- a/htdocs/telephonie/index.php +++ b/htdocs/telephonie/index.php @@ -32,7 +32,6 @@ llxHeader('','Telephonie'); */ print ''; - print ''; print "\n"; print ""; print ''; -print '
'; print '
'; @@ -41,9 +40,15 @@ print '
Recherche ligne
Numéro
'; +print '
'; -print '
'; +print '
'; +print ''; +print ''; +print "\n"; +print ""; +print ''; +print '
Recherche contrat
Numéro

'; print '
'; print ''; @@ -141,52 +146,6 @@ else print ''; print '
'; -$sql = "SELECT f.facnumber, f.rowid, s.nom, s.idp, f.total_ttc, sum(pf.amount) as am"; -$sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f "; -$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf on f.rowid=pf.fk_facture"; -$sql .= " WHERE s.idp = f.fk_soc AND f.paye = 0 AND f.fk_statut = 1"; -$sql .= " GROUP BY f.facnumber,f.rowid,s.nom, s.idp, f.total_ttc"; - -$resql = $db->query($sql); - -if ($resql) -{ - $num = $db->num_rows($resql); - $i = 0; - - if ($num) - { - print ''; - print ''; - $var = True; - $total = $totalam = 0; - while ($i < $num ) - { - $obj = $db->fetch_object($resql); - if ($obj->total_ttc <> $obj->am) - { - $var=!$var; - print ''; - print ''; - print ''; - print ''; - $total += $obj->total_ttc; - $totalam += $obj->am; - } - $i++; - } - $var=!$var; - print ''; - print "
Factures clients impayées ('.$num.')Montant TTCReçu
'.img_file().''; - print ' '.$obj->facnumber.''.$obj->nom.''.price($obj->total_ttc).''.price($obj->am).'
'.$langs->trans("RemainderToTake").' : '.price($total-$totalam).''.price($total).''.price($totalam).'

"; - } - $db->free($resql); -} -else -{ - print $sql; -} - print '
';