Author: danydb
Date: 2012-02-03 23:35:14 +0100 (Fri, 03 Feb 2012)
New Revision: 296
Modified:
trunk/import_card/include/class_import_card.php
Log:
improve feedback
Modified: trunk/import_card/include/class_import_card.php
===================================================================
--- trunk/import_card/include/class_import_card.php 2012-02-03 22:23:55 UTC
(rev 295)
+++ trunk/import_card/include/class_import_card.php 2012-02-03 22:35:14 UTC
(rev 296)
@@ -112,7 +112,8 @@
*/
static function record_import()
{
- global $cn;
+
+ global $cn,$g_failed,$g_succeed;
extract ($_POST);
$fd=fopen($filename,'r');
/*
@@ -193,7 +194,16 @@
$attr=sprintf('av_text%d',ATTR_DEF_ACCOUNT);
$array[$attr]='';
}
- $fiche->insert($rfichedef,$array);
+ try
+ {
+ $fiche->insert($rfichedef,$array);
+ echo td($g_succeed);
+ }
+ catch(Exception $e)
+ {
+ echo td($g_failed);
+ echo td($e->getMessage());
+ }
echo '</tr>';
}
$table_content=ob_get_contents();
---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu
_______________________________________________
Phpcompta est un logiciel libre de comptabilité en ligne
(http://www.phpcompta.eu)
Phpcompta-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/phpcompta-dev