diff --git a/htdocs/compta/export/index.php b/htdocs/compta/export/index.php index 36359516ea8..85d80082b0f 100644 --- a/htdocs/compta/export/index.php +++ b/htdocs/compta/export/index.php @@ -38,7 +38,15 @@ if ($_GET["action"] == 'export') include_once DOL_DOCUMENT_ROOT.'/compta/export/modules/compta.export.class.php'; $exc = new ComptaExport($db, $user, 'Poivre'); - $exc->Export(); + + if($_GET["id"] > 0) + { + $exc->Export($_GET["id"]); + } + else + { + $exc->Export(); + } print $exc->error_message; @@ -57,16 +65,46 @@ llxHeader('','Compta - Export'); print_titre("Export Comptable"); -print '
| ';
-print ' Nouvel Export '; +$sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."facturedet"; +$sql .= " WHERE fk_export_compta = 0"; +$resql = $db->query($sql); +if ($resql) +{ + $row = $db->fetch_row($resql); + $nbfac = $row[0]; + + $db->free($resql); +} + +$sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."paiement"; +$sql .= " WHERE fk_export_compta = 0"; + +$resql = $db->query($sql); +if ($resql) +{ + $row = $db->fetch_row($resql); + $nbp = $row[0]; + + $db->free($resql); +} + +print '
| ';
$dir = DOL_DATA_ROOT."/compta/export/";
-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 ' |
| ||||||||||||||
| - | \n"; $var=True; @@ -85,7 +86,8 @@ if ($result) print "||||||||||||||||
| '.stripslashes($obj->ref).' | '; - + print ''.strftime("%a %e %b %Y %H:%M:%S",$obj->date_export).' | '; + print 'Regénérer | '; print "