diff --git a/include/bank.inc.php b/include/bank.inc.php
index e414a8030..ff49b8b49 100644
--- a/include/bank.inc.php
+++ b/include/bank.inc.php
@@ -122,13 +122,14 @@ if ( $sub_action == "list")
}
// show the menu with the list item selected
echo '
';
diff --git a/include/class_document.php b/include/class_document.php
index 72368aab5..432d3164e 100644
--- a/include/class_document.php
+++ b/include/class_document.php
@@ -80,7 +80,8 @@ class Document
{
// create a temp directory in /tmp to unpack file and to parse it
$dirname=tempnam('/tmp','doc_');
- echo $dirname;
+
+
unlink($dirname);
mkdir ($dirname);
echo_debug('class_action',__LINE__,"Dirname is $dirname");
@@ -107,9 +108,14 @@ class Document
if ( strpos($row['md_mimetype'],'vnd.oasis') != 0 )
{
echo_debug('class_document',__LINE__,'Unzip the OOo');
+ echo '';
+ echo '';
+ echo '';
+ ob_start();
system("unzip ".$filename);
// Remove the file we do not need anymore
unlink($filename);
+ ob_end_clean();
$file_to_parse="content.xml";
$type="OOo";
}
@@ -126,7 +132,11 @@ class Document
// if the doc is a OOo, we need to re-zip it
if ( strpos($row['md_mimetype'],'vnd.oasis') != 0 )
{
+ ob_start();
system ("zip -r ".$filename." *");
+ ob_end_clean();
+ echo "le document est prêt ";
+
$file_to_parse=$filename;
}
// Create a directory
diff --git a/include/class_widget.php b/include/class_widget.php
index 3b9864f25..2b79e76d6 100644
--- a/include/class_widget.php
+++ b/include/class_widget.php
@@ -394,7 +394,7 @@ class widget {
if ( $this->table==1)
{
$r=sprintf('
-
+
%s
',
$l_sessid,
@@ -410,7 +410,7 @@ class widget {
else
{
$r=sprintf('
-
+
%s ',
$l_sessid,
$this->extra,
diff --git a/include/facture.inc.php b/include/facture.inc.php
index 9f9364415..f17639bf9 100644
--- a/include/facture.inc.php
+++ b/include/facture.inc.php
@@ -119,11 +119,21 @@ if ( $sub_action == "list")
$current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->GetPeriode();
$w->selected=$current;
- echo 'Période '.$w->IOValue("p_periode",$periode_start).$w->Submit('gl_submit','Valider');
+ echo 'Période '.$w->IOValue("p_periode",$periode_start);
$qcode=(isset($_GET['qcode']))?$_GET['qcode']:"";
- printf ('Tiers QuickCode: ',
- $qcode);
+
+ echo JS_SEARCH_CARD;
+ $w=new widget('js_search_only');
+ $w->name='qcode';
+ $w->value=$qcode;
+ $w->label='';
+ $w->extra='9';
+ $w->table=0;
+ $sp= new widget("span");
+ echo $sp->IOValue("qcode_label","",$qcode);
+ echo $w->IOValue();
+echo $w->Submit('gl_submit','Rechercher');
// Show list of sell
// Date - date of payment - Customer - amount
$sql=SQL_LIST_ALL_INVOICE." and jr_tech_per=".$current." and jr_def_type='VEN'" ;
diff --git a/include/impress_jrn.php b/include/impress_jrn.php
index a7b0360ba..af156e557 100644
--- a/include/impress_jrn.php
+++ b/include/impress_jrn.php
@@ -205,11 +205,14 @@ $w->label="Choississez le journal";
print $w->IOValue("jrn_id",$ret);
print '';
print '
';
-$periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode order by p_id");
+// filter on the current year
+$filter_year=" where p_exercice='".$User->getExercice()."'";
+
+$periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_id");
$w->label="Depuis";
print $w->IOValue('from_periode',$periode_start);
$w->label=" jusqu'à ";
-$periode_end=make_array($cn,"select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode order by p_id");
+$periode_end=make_array($cn,"select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode $filter_year order by p_id");
print $w->IOValue('to_periode',$periode_end);
print "