diff --git a/htdocs/compta/export/index.php b/htdocs/compta/export/index.php index cd4c13bd766..abf2e59f2ab 100644 --- a/htdocs/compta/export/index.php +++ b/htdocs/compta/export/index.php @@ -30,11 +30,7 @@ require("./pre.inc.php"); -llxHeader(); - -print "Export Comptable"; - -print '
Export
'; +require("./ComptaJournalPaiement.class.php"); if ($_GET["action"] == 'export') { @@ -44,8 +40,21 @@ if ($_GET["action"] == 'export') $exc->Export(); print $exc->error_message; + + $jp= new ComptaJournalPaiement($db); + $jp->GeneratePdf(); + } +llxHeader(); + +print_titre("Export Comptable"); + +print ''; + +print ''; } } @@ -75,6 +81,38 @@ while (($file = readdir($handle))!==false) print "
'; + +print '
Export
'; $dir = DOL_DATA_ROOT."/compta/export/"; @@ -65,9 +74,6 @@ while (($file = readdir($handle))!==false) { print '
'.$file.''; - - - print '
"; +print ''; + +$sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."facturedet"; +$sql .= " WHERE fk_export_compta = 0"; +$result = $db->query($sql); +if ($result) +{ + $row = $db->fetch_row($result); + $nbfac = $row[0]; + + $db->free($result); +} + +$sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."paiement"; +$sql .= " WHERE fk_export_compta = 0"; + +$result = $db->query($sql); +if ($result) +{ + $row = $db->fetch_row($result); + $nbp = $row[0]; + + $db->free($result); +} + +print ''; +print ''; +print ''; +print ''; +print "
TypeNb
Factures'.$nbfac.'
Paiements'.$nbp.'
\n"; + +print ''; llxFooter("Dernière modification $Date$ révision $Revision$");