phpcompta-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpcompta-dev] r190 - in trunk: amortis amortis/include importbank impo


From: phpcompta-dev
Subject: [Phpcompta-dev] r190 - in trunk: amortis amortis/include importbank importbank/include importbank/include/template modop skel tool_pcmn tools tools/include tools/include/template tva
Date: Mon, 14 Nov 2011 21:29:39 +0100 (CET)

Author: danydb
Date: 2011-11-14 21:29:38 +0100 (Mon, 14 Nov 2011)
New Revision: 190

Modified:
   trunk/amortis/amortize_javascript.js
   trunk/amortis/include/class_am_generate.php
   trunk/importbank/bank_js.js
   trunk/importbank/include/class_bank_item.php
   trunk/importbank/include/class_import_bank.php
   trunk/importbank/include/import_bank.php
   trunk/importbank/include/template/show_field.php
   trunk/importbank/include/template/show_list.php
   trunk/importbank/index.php
   trunk/modop/class_modop_operation.php
   trunk/modop/index.php
   trunk/modop/modop_display.php
   trunk/skel/skel_javascript.js
   trunk/tool_pcmn/index.php
   trunk/tools/include/operation.inc.php
   trunk/tools/include/template/numbering.php
   trunk/tools/include/template/search_view.php
   trunk/tools/index.php
   trunk/tva/ajax.php
   trunk/tva/index.php
   trunk/tva/js_scripts.js
Log:
adapt?\195?\169 ?\195?\160 version 6.0

Modified: trunk/amortis/amortize_javascript.js
===================================================================
--- trunk/amortis/amortize_javascript.js        2011-11-14 10:28:44 UTC (rev 
189)
+++ trunk/amortis/amortize_javascript.js        2011-11-14 20:29:38 UTC (rev 
190)
@@ -29,7 +29,7 @@
      }
     var str_style="top:"+sx+";width:50%;height:70%";
 
-    var div={id:target, cssclass:'op_detail',style:str_style,html:loading()};
+    var div={id:target, cssclass:'inner_box',style:str_style,html:loading()};
 
     add_div(div);
 
@@ -62,7 +62,7 @@
      }
     var str_style="top:"+sx+";width:50%;height:auto";
 
-    var div={id:target, cssclass:'op_detail',style:str_style,html:loading()};
+    var div={id:target, cssclass:'inner_box',style:str_style,html:loading()};
 
     add_div(div);
 

Modified: trunk/amortis/include/class_am_generate.php
===================================================================
--- trunk/amortis/include/class_am_generate.php 2011-11-14 10:28:44 UTC (rev 
189)
+++ trunk/amortis/include/class_am_generate.php 2011-11-14 20:29:38 UTC (rev 
190)
@@ -78,7 +78,7 @@
   'p_year' => string '' (length=0)
   'p_jrn' => string '4' (length=1)
   'p_date' => string '' (length=0)
-  'a_id' => 
+  'a_id' =>
     array
       0 => string '86' (length=2)
       1 => string '85' (length=2)
@@ -92,7 +92,7 @@
     $msg='';
     if ( isNumber($p_array['p_year']) == 0 || $p_array['p_year'] < 1900 || 
$p_array['p_year']>2100) $msg="Année invalide\n";
     if ( isDate($p_array['p_date']) == null) $msg.="Date invalide ";
-    if ( $msg != '') 
+    if ( $msg != '')
       {
        echo alert($msg);
        return false;
@@ -112,7 +112,7 @@
       {
        if ( isset ($p_array['p_ck'.$i]))
          {
-        
+
            /*
             * If selected the add it to array
             */
@@ -134,15 +134,15 @@
                       'ld'.$idx =>'Amortissement 
'.$fiche->strAttribut(ATTR_DEF_QUICKCODE),
                       'qc_'.$idx=>'');
            $array+=$mat;
-           $idx++;            
+           $idx++;
          }
       }
     $array+=array('nb_item'=>$idx);
     $ledger=new Acc_Ledger($cn,$p_array['p_jrn']);
-    $ledger->with_concerned=false;    
+    $ledger->with_concerned=false;
     echo '<div style="width:80%;margin-left:10%">';
     echo '<form method="POST" style="display:inline">';
-    echo $ledger->show_form($array,true);
+    echo $ledger->input($array,true);
     echo HtmlInput::submit('save','Sauver');
     echo HtmlInput::hidden('sa',$p_array['sa']);
     echo HtmlInput::hidden('sb',$p_array['sb']);
@@ -178,7 +178,7 @@
     echo HtmlInput::submit('correct','Corriger');
     echo '</form>';
     echo '</div>';
-    return true;                
+    return true;
   }
   /**
    * save into amortissement_histo
@@ -190,7 +190,7 @@
   'p_year' => string '' (length=0)
   'p_jrn' => string '4' (length=1)
   'p_date' => string '' (length=0)
-  'a_id' => 
+  'a_id' =>
     array
       0 => string '86' (length=2)
       1 => string '85' (length=2)

Modified: trunk/importbank/bank_js.js
===================================================================
--- trunk/importbank/bank_js.js 2011-11-14 10:28:44 UTC (rev 189)
+++ trunk/importbank/bank_js.js 2011-11-14 20:29:38 UTC (rev 190)
@@ -1,7 +1,7 @@
 function reconcilie(target,dossier_id,p_id,plugin_code)
 {
-    var 
qs="?gDossier="+dossier_id+'&plugin_code='+plugin_code+'&act=show&id='+p_id+'&ctl='+target;
-    
+    var 
qs="gDossier="+dossier_id+'&plugin_code='+plugin_code+'&act=show&id='+p_id+'&ctl='+target;
+
     var action=new Ajax.Request ( 'ajax.php',
                                  {
                                      method:'get',
@@ -10,12 +10,12 @@
                                      onSuccess:success_box
                                  }
                                );
-    if ( $(target)) 
+    if ( $(target))
     {
        removeDiv(target);
     }
     var sx=0;
-    var height=0; 
+    var height=0;
     if ( window.scrollY)
     {
         sx=window.scrollY+height;
@@ -26,8 +26,8 @@
      }
     var str_style="top:"+sx+";margin-left:10%;";
 
-    var div={id:target, 
cssclass:'op_detail',style:str_style,html:loading(),drag:1};
-    
+    var div={id:target, 
cssclass:'inner_box',style:str_style,html:loading(),drag:1};
+
     add_div(div);
 }
 
@@ -41,7 +41,7 @@
                                      onFailure:error_box,
                                      onSuccess:success_bank_info
                                  });
-    
+
     return false;
 }
 
@@ -60,4 +60,4 @@
     catch(e) {
        alert('Erreur success_box_info '+e.message);
     }
-}      
\ No newline at end of file
+}
\ No newline at end of file

Modified: trunk/importbank/include/class_bank_item.php
===================================================================
--- trunk/importbank/include/class_bank_item.php        2011-11-14 10:28:44 UTC 
(rev 189)
+++ trunk/importbank/include/class_bank_item.php        2011-11-14 20:29:38 UTC 
(rev 190)
@@ -53,12 +53,12 @@
        $w->set_attribute('label','e_third');
        $w->set_attribute('typecard','deb');
        $w->set_callback('filter_card');
-       $w->set_function('fill_data'); 
+       $w->set_function('fill_data');
        $w->set_attribute('inp','fiche');
 
        $wConcerned=new IConcerned();
        $wConcerned->name="e_concerned".$id;
-       $wConcerned->extra=abs($bi->amount);
+       $wConcerned->amount_id=abs($bi->amount);
        $wConcerned->extra2='paid';
        $wConcerned->label=_('op. concernée');
        $wConcerned->table=0;

Modified: trunk/importbank/include/class_import_bank.php
===================================================================
--- trunk/importbank/include/class_import_bank.php      2011-11-14 10:28:44 UTC 
(rev 189)
+++ trunk/importbank/include/class_import_bank.php      2011-11-14 20:29:38 UTC 
(rev 190)
@@ -91,7 +91,8 @@
                                from importbank.import as a
                                join importbank.format_bank as b on 
(format_bank_id=b.id)
                                order by i_date desc');
-    
$link='?'.Dossier::get().'&plugin_code='.$_REQUEST['plugin_code'].'&sb=list&sa='.$_REQUEST['sa'];
+    $link='?'.Dossier::get().'&plugin_code='.$_REQUEST['plugin_code'].
+                       '&sb=list&sa='.$_REQUEST['sa']."&ac=".$_REQUEST['ac'];
 
     $status=$cn->prepare('status','select count(*) from importbank.temp_bank 
where import_id=$1  and status=$2');
 
@@ -174,11 +175,11 @@
 
   }
   /**
-   * return the HTML style for the status 
+   * return the HTML style for the status
    * White : new
    * green : transfered
    * red  : error
-   */ 
+   */
   static function color_status($id)
   {
     $style="";
@@ -214,7 +215,7 @@
   }
   /**
    address@hidden import row marked to transfer and from the specific import to
-   * the database 
+   * the database
    address@hidden $p_array
    */
   static function transfer_record($p_array)
@@ -255,7 +256,7 @@
 
            if ( $row->f_id == null || $row->f_id=='')
              {
-               // error 
+               // error
                self::transfert_error($row->id,'Aucune fiche donnée');
                continue;
              }
@@ -268,13 +269,13 @@
             // Vérification que le poste comptable trouvé existe
             if ( $poste_comptable == NOTFOUND || 
strlen(trim($poste_comptable))==0)
              {
-               // error 
+               // error
                self::transfert_error($row->id,'Poste comptable de la  fiche 
est incorrecte');
                continue;
              }
            if ( self::check_date ($row->tp_date) == false)
              {
-               // error 
+               // error
                self::transfert_error($row->id,'Date hors des limites');
                continue;
              }
@@ -355,9 +356,9 @@
                  array('E',$message,$id));
   }
   /**
-   * check 
+   * check
    * if the date is outside the defined periode
-   */ 
+   */
   function check_date($p_date)
   {
     global $cn;
@@ -388,6 +389,6 @@
        $err=$e->getMessage();
        return $err;
       }
-   
+
   }
 }
\ No newline at end of file

Modified: trunk/importbank/include/import_bank.php
===================================================================
--- trunk/importbank/include/import_bank.php    2011-11-14 10:28:44 UTC (rev 
189)
+++ trunk/importbank/include/import_bank.php    2011-11-14 20:29:38 UTC (rev 
190)
@@ -2,7 +2,7 @@
 /*
  * Step 1/4
  */
-if ( ! isset ($_REQUEST ['sb'])) 
+if ( ! isset ($_REQUEST ['sb']))
   {
     echo '<div class="content" style="width:80%;margin-left:10%">';
     echo '<form method="get">';
@@ -12,7 +12,7 @@
     $iselect->value[]=$new;
     require_once('template/import_new.php');
     echo HtmlInput::submit('select_submit','Valider');
-    echo HtmlInput::get_to_hidden(array('gDossier','plugin_code','sa'));
+    echo HtmlInput::get_to_hidden(array('gDossier','plugin_code','sa','ac'));
     echo HtmlInput::hidden('sb','select_form');
     echo '</form>';
     echo '</div>';
@@ -27,30 +27,30 @@
 $jrn_def->value=$cn->make_array('select jrn_def_id,jrn_def_name from jrn_def 
where '.$user->get_ledger_sql('FIN',3).' order by jrn_def_name');
 $sep_decimal=new ISelect('sep_dec');
 $sep_decimal->value=$adecimal;
-    
+
 $sep_thousand=new ISelect('sep_thous');
 $sep_thousand->value=$athousand;
-    
+
 $sep_field=new ISelect('sep_field');
 $sep_field->value=$aseparator;
 
 $col_valid=new INum('col_valid');
-    
+
 $format_date=new ISelect('format_date');
 $format_date->value=$aformat_date;
-    
+
 $file=new IFile('import_file');
 $skip=new INum('skip');
 $skip->value=0;
 $skip->size=5;
 
-$nb_col=new INum('nb_col');    
+$nb_col=new INum('nb_col');
 /*
  * Step 2 : show the selected format and upload the file
  */
 if ( $_REQUEST ['sb'] == 'select_form')
   {
-    
+
     if ( $_GET['format'] != '0')
       {
        $format_bank=new Format_Bank_Sql($cn,$_GET['format']);
@@ -135,7 +135,7 @@
        $nb_col->value=$_POST['nb_col'];
        $skip->value=$_POST['skip'];
 
-       
+
        $filename=$_POST['filename'];
 
        $fbank=fopen($filename,'r');
@@ -155,7 +155,7 @@
            $pos_extra=$format_bank->pos_extra;
 
          }
- 
+
        echo '<div class="content" style="width:80%;margin-left:10%">';
        $sb='confirm';
        require_once ('template/confirm_transfer.php');

Modified: trunk/importbank/include/template/show_field.php
===================================================================
--- trunk/importbank/include/template/show_field.php    2011-11-14 10:28:44 UTC 
(rev 189)
+++ trunk/importbank/include/template/show_field.php    2011-11-14 20:29:38 UTC 
(rev 190)
@@ -1,6 +1,6 @@
 <h2>Etape 2 / 4: introduire le fichier</h2>
 
-<form method="POST"   enctype="multipart/form-data" action="extension.php">
+<form method="POST"   enctype="multipart/form-data" >
 <table>
 <tr>
        <td>
@@ -77,7 +77,7 @@
 
 Fichier à importer <?=$file->input()?>
 
-<? 
+<?
 echo HtmlInput::submit('input_file','Valider');
 echo 
HtmlInput::get_to_hidden(array('format','gDossier','sa','plugin_code','format'));
 echo HtmlInput::hidden('sb',$sb);

Modified: trunk/importbank/include/template/show_list.php
===================================================================
--- trunk/importbank/include/template/show_list.php     2011-11-14 10:28:44 UTC 
(rev 189)
+++ trunk/importbank/include/template/show_list.php     2011-11-14 20:29:38 UTC 
(rev 190)
@@ -1,11 +1,11 @@
 <form method="get">
 
 Filtrer : <?=$filter->input()?>
-<?=HtmlInput::request_to_hidden(array('gDossier','plugin_code','sb','sa','id'))?>
+<?=HtmlInput::request_to_hidden(array('gDossier','plugin_code','ac','sb','sa','id'))?>
 <?=HtmlInput::submit('refresh','Recharger')?>
 </form>
 <form method="get" onsubmit="return confirm ('Vous confirmez ?')">
-<?=HtmlInput::request_to_hidden(array('gDossier','plugin_code','sb','sa','id',$filter->name))?>
+<?=HtmlInput::request_to_hidden(array('gDossier','plugin_code','ac','sb','sa','id',$filter->name))?>
 <?=HtmlInput::submit('delete_record','Effacer')?>
 <?=HtmlInput::submit('transfer_record','Transfèrer')?>
 </form>
@@ -70,7 +70,7 @@
 
 </table>
 <form method="get" onsubmit="return confirm ('Vous confirmez?')">
-<?=HtmlInput::request_to_hidden(array('gDossier','plugin_code','sb','sa','id',$filter->name))?>
+<?=HtmlInput::request_to_hidden(array('gDossier','plugin_code','ac','sb','sa','id',$filter->name))?>
 <?=HtmlInput::submit('delete_record','Effacer')?>
 <?=HtmlInput::submit('transfer_record','Transfèrer')?>
 </form>

Modified: trunk/importbank/index.php
===================================================================
--- trunk/importbank/index.php  2011-11-14 10:28:44 UTC (rev 189)
+++ trunk/importbank/index.php  2011-11-14 20:29:38 UTC (rev 190)
@@ -45,7 +45,7 @@
  */
 global $cn;
 
-$url='?'.dossier::get().'&plugin_code='.$_REQUEST['plugin_code'];
+$url='?'.dossier::get().'&plugin_code='.$_REQUEST['plugin_code']."&ac=".$_REQUEST['ac'];
 
 $array=array (
        array($url.'&sa=import',_('Importation'),_('Importation de nouveaux 
fichiers'),1),
@@ -119,7 +119,7 @@
       }
 
     /*
-     * Show all the import 
+     * Show all the import
      */
     if ( ! isset($_REQUEST['sb']))
       {

Modified: trunk/modop/class_modop_operation.php
===================================================================
--- trunk/modop/class_modop_operation.php       2011-11-14 10:28:44 UTC (rev 
189)
+++ trunk/modop/class_modop_operation.php       2011-11-14 20:29:38 UTC (rev 
190)
@@ -26,10 +26,10 @@
 
 class Modop_Operation
 {
-    function __construct($p_cn,$p_internal)
+    function __construct($p_cn,$p_id)
     {
         $this->db=$p_cn;
-        $this->jr_internal=trim($p_internal);
+        $this->jr_id=trim($p_id);
         $this->array=array();
     }
     /**
@@ -41,8 +41,8 @@
     {
         /*  check if we retrieve it */
         $this->ledger_type=$this->db->get_value("select jrn_def_type from 
jrn_def ".
-                                                " where jrn_def_id = (select 
jr_def_id from jrn where jr_internal=$1)",
-                                                array($this->jr_internal));
+                                                " where jrn_def_id = (select 
jr_def_id from jrn where jr_id=$1)",
+                                                array($this->jr_id));
         if ($this->ledger_type=='')
             throw new Exception('Operation non trouvée');
         /* 
---------------------------------------------------------------------- */
@@ -53,10 +53,12 @@
             $this->array['e_mp']=0;
             $this->array['jrn_type']='ACH';
             $jrn=$this->db->get_array("select 
jr_id,to_char(jr_date,'DD.MM.YYYY') as date_fmt,".
-                                      " to_char(jrn_ech,'DD.MM.YYYY') as 
ech_fmt,jr_comment,jr_pj_number, jr_tech_per,jr_Def_id ".
-                                      " from jrn where jr_internal=$1",
-                                      array($this->jr_internal));
+                                      " to_char(jrn_ech,'DD.MM.YYYY') as 
ech_fmt,jr_comment,jr_pj_number,
+                                                                               
  jr_tech_per,jr_Def_id,jr_internal ".
+                                      " from jrn where jr_id=$1",
+                                      array($this->jr_id));
             $this->jr_id=$jrn[0]['jr_id'];
+                       $this->jr_internal=$jrn[0]['jr_internal'];
             /*  retrieve from jrn */
             $this->array['e_ech']=$jrn[0]['ech_fmt'];
             $this->array['e_date']=$jrn[0]['date_fmt'];
@@ -101,9 +103,15 @@
         {
             $this->array['e_mp']=0;
             $this->array['jrn_type']='VEN';
-            $jrn=$this->db->get_array("select 
jr_id,to_char(jr_date,'DD.MM.YYYY') as date_fmt,to_char(jrn_ech,'DD.MM.YYYY') 
as ech_fmt,jr_comment,jr_pj_number, jr_tech_per,jr_Def_id from jrn where 
jr_internal=$1",
-                                      array($this->jr_internal));
+            $jrn=$this->db->get_array("select jr_id,
+                                               to_char(jr_date,'DD.MM.YYYY') 
as date_fmt,
+                                               to_char(jrn_ech,'DD.MM.YYYY') 
as ech_fmt,
+                                               jr_comment,jr_pj_number,
+                                               
jr_tech_per,jr_Def_id,jr_internal
+                                               from jrn where jr_id=$1",
+                                      array($this->jr_id));
             $this->jr_id=$jrn[0]['jr_id'];
+            $this->jr_internal=$jrn[0]['jr_internal'];
             /*  retrieve from jrn */
             $this->array['e_ech']=$jrn[0]['ech_fmt'];
             $this->array['e_date']=$jrn[0]['date_fmt'];
@@ -149,17 +157,18 @@
         {
             $this->array['e_mp']=0;
             $this->array['jrn_type']='ODS';
-            $jrn=$this->db->get_array("select 
jr_id,to_char(jr_date,'DD.MM.YYYY') as date_fmt,jr_comment,jr_pj_number, 
jr_tech_per,jr_Def_id from jrn where jr_internal=$1",
-                                      array($this->jr_internal));
+            $jrn=$this->db->get_array("select 
jr_id,jr_internal,to_char(jr_date,'DD.MM.YYYY') as 
date_fmt,jr_comment,jr_pj_number, jr_tech_per,jr_Def_id from jrn where 
jr_id=$1",
+                                      array($this->jr_id));
             $this->jr_id=$jrn[0]['jr_id'];
+            $this->jr_internal=$jrn[0]['jr_internal'];
             /*  retrieve from jrn */
             $this->array['e_date']=$jrn[0]['date_fmt'];
             $this->array['desc']=$jrn[0]['jr_comment'];
             $this->array['e_pj']=$jrn[0]['jr_pj_number'];
             $this->array['p_jrn']=$jrn[0]['jr_def_id'];
             $this->array['periode']=$jrn[0]['jr_tech_per'];
-            $ods=$this->db->get_array('select 
j_qcode,j_poste,j_text,j_montant,j_debit from jrnx where j_grpt = (select 
jr_grpt_id from jrn where jr_internal=$1)',
-                                      array($this->jr_internal));
+            $ods=$this->db->get_array('select 
j_qcode,j_poste,j_text,j_montant,j_debit from jrnx where j_grpt = (select 
jr_grpt_id from jrn where jr_id=$1)',
+                                      array($this->jr_id));
             for ($e=0; $e<count($ods); $e++)
             {
                 $this->array['qc_'.$e]=$ods[$e]['j_qcode'];
@@ -177,8 +186,8 @@
 ///////////////////////////////////////////////////////////////////////////
         if ( $this->ledger_type=="FIN")
         {
-            $jrn=$this->db->get_array("select 
jr_id,to_char(jr_date,'DD.MM.YYYY') as date_fmt,to_char(jrn_ech,'DD.MM.YYYY') 
as ech_fmt,jr_comment,jr_pj_number, jr_tech_per,jr_Def_id from jrn where 
jr_internal=$1",
-                                      array($this->jr_internal));
+            $jrn=$this->db->get_array("select 
jr_id,to_char(jr_date,'DD.MM.YYYY') as date_fmt,to_char(jrn_ech,'DD.MM.YYYY') 
as ech_fmt,jr_comment,jr_pj_number, jr_tech_per,jr_Def_id from jrn where 
jr_id=$1",
+                                      array($this->jr_id));
             /*  retrieve from jrn */
             $this->jr_id=$jrn[0]['jr_id'];
             $this->array['e_date']=$jrn[0]['date_fmt'];

Modified: trunk/modop/index.php
===================================================================
--- trunk/modop/index.php       2011-11-14 10:28:44 UTC (rev 189)
+++ trunk/modop/index.php       2011-11-14 20:29:38 UTC (rev 190)
@@ -24,32 +24,30 @@
  * \brief modify a operation
  */
 Extension::check_version(3432);
-$str=new IText("jr_internal");
-$str->value=(isset($_GET['jr_internal']))?strtoupper($_GET['jr_internal']):'';
-$str->value=(isset($_GET['ext_jr_internal']))?strtoupper($_GET['ext_jr_internal']):$str->value;
+$str=new IConcerned("jr_id");
+$str->value=(isset($_GET['jr_id']))?strtoupper($_GET['jr_id']):'';
+$str->value=(isset($_GET['ext_jr_id']))?strtoupper($_GET['ext_jr_id']):$str->value;
 
-$search=new IButton('getjr');
-$js="openRecherche(".dossier::id().")";
-$search->label='Chercher dans les journaux';
-$search->javascript=sprintf('%s',$js);
 
+
 ?>
 <FORM METHOD="GET">
   <? echo HtmlInput::extension().dossier::hidden();?>
   <? echo HtmlInput::hidden('ac',$_REQUEST['ac']);?>
 <?=_("Code interne de l'opération à modifier") ?>
   <?=$str->input()?>
-  <?=HtmlInput::submit('seek','retrouver')?>
+       <?
+
+       echo HtmlInput::submit('seek','retrouver')?>
 </FORM>
-  <?=$search->input()?>
 <hr>
 <?php
   if ( isset($_GET['seek'])) {
     /* retrieve and show the accounting */
-    if ( trim($_GET['jr_internal'])=='') {
+    if ( trim($_GET['jr_id'])=='') {
       alert('Aucune opération demandé'); exit;}
     /*  retrieve and display operation */
-    require_once('modop_display.php'); 
+    require_once('modop_display.php');
     exit();
   }
 $action=(isset ($_GET['action']))?$_GET['action']:'end';

Modified: trunk/modop/modop_display.php
===================================================================
--- trunk/modop/modop_display.php       2011-11-14 10:28:44 UTC (rev 189)
+++ trunk/modop/modop_display.php       2011-11-14 20:29:38 UTC (rev 190)
@@ -33,21 +33,12 @@
 require_once ('class_ipopup.php');
 //----------------------------------------------------------------------
 // create compute button
-$compute=new IPopup('compute');
-$compute->value=JS_CALC_LINE;
-//$compute->title="Calculatrice";
-$compute->drag=true;
-$compute->blocking=false;
-$compute->set_height("350");
-$compute->set_width("500");
-echo $compute->input();
-
 $cn=new Database(dossier::id());
 
 /*  we can't modify from a closed periode */
 /*  get periode */
-$sql="select jr_tech_per from jrn where jr_internal=$1";
-$periode=$cn->get_value($sql,array(trim($_GET['jr_internal'])));
+$sql="select jr_tech_per from jrn where jr_id=$1";
+$periode=$cn->get_value($sql,array(trim($_GET['jr_id'])));
 if ( $cn->count() == 0 )
 {
     alert('Opération non trouvée');
@@ -65,7 +56,7 @@
 
 /* check if periode is closed */
 // retrieve jrn
-$op=new Modop_Operation($cn,$_GET['jr_internal']);
+$op=new Modop_Operation($cn,$_GET['jr_id']);
 try
 {
     $op->format();             /* load format the data into an array with by 
the class_acc_ledger... */
@@ -313,10 +304,6 @@
     $wAmount->setReadOnly(false);
     $array[0]['amount']=$wAmount->input();
     // show compute
-    $cal=new IButton('calc');
-    $cal->label='Calculatrice';
-    $cal->javascript=" showIPopup('compute') ";
-    $str_cal_button=$cal->input();
     require_once('template_ledger_fin.php');
 
     echo 
HtmlInput::extension().dossier::hidden().HtmlInput::hidden('jrn_type','FIN');

Modified: trunk/skel/skel_javascript.js
===================================================================
--- trunk/skel/skel_javascript.js       2011-11-14 10:28:44 UTC (rev 189)
+++ trunk/skel/skel_javascript.js       2011-11-14 20:29:38 UTC (rev 190)
@@ -29,7 +29,7 @@
      }
     var str_style="top:"+sx+";width:50%;height:70%";
 
-    var div={id:target, cssclass:'op_detail',style:str_style,html:loading()};
+    var div={id:target, cssclass:'inner_box',style:str_style,html:loading()};
     
     add_div(div);
 
@@ -62,7 +62,7 @@
      }
     var str_style="top:"+sx+";width:50%;height:auto";
 
-    var div={id:target, cssclass:'op_detail',style:str_style,html:loading()};
+    var div={id:target, cssclass:'inner_box',style:str_style,html:loading()};
     
     add_div(div);
 

Modified: trunk/tool_pcmn/index.php
===================================================================
--- trunk/tool_pcmn/index.php   2011-11-14 10:28:44 UTC (rev 189)
+++ trunk/tool_pcmn/index.php   2011-11-14 20:29:38 UTC (rev 190)
@@ -35,7 +35,7 @@
  * load javascript
  */
 
-$url='?'.dossier::get().'&plugin_code='.$_REQUEST['plugin_code'];
+$url='?'.dossier::get().'&plugin_code='.$_REQUEST['plugin_code']."&ac=".$_REQUEST['ac'];
 
 $cn=new Database (dossier::id());
 

Modified: trunk/tools/include/operation.inc.php
===================================================================
--- trunk/tools/include/operation.inc.php       2011-11-14 10:28:44 UTC (rev 
189)
+++ trunk/tools/include/operation.inc.php       2011-11-14 20:29:38 UTC (rev 
190)
@@ -9,6 +9,7 @@
 echo HtmlInput::submit("viewsearch",_("Recherche"));
 echo HtmlInput::extension();
 echo HtmlInput::hidden('sa',$_REQUEST['sa']);
+echo HtmlInput::hidden('ac',$_REQUEST['ac']);
 echo '</form>';
 
 /*

Modified: trunk/tools/include/template/numbering.php
===================================================================
--- trunk/tools/include/template/numbering.php  2011-11-14 10:28:44 UTC (rev 
189)
+++ trunk/tools/include/template/numbering.php  2011-11-14 20:29:38 UTC (rev 
190)
@@ -1,7 +1,7 @@
 <?
 echo  HtmlInput::button('receipt_bt','Renuméroter les 
pièces','onclick="$(\'div_receipt\').show();"');
 ?>
-<div id="div_receipt" class="op_detail" 
style="top:230;margin:5;overflow:visible;display:none;">
+<div id="div_receipt" class="inner_box" 
style="top:230;margin:5;overflow:visible;display:none;">
 <h2 class="info" >Rénuméroter les pièces, donner le préfixe puis le numéro</h2>
 <p class="notice">Il vaut mieux que le préfixe se termine par autre chose 
qu'un chiffre</p>
 <form method="POST" id="form1" onsubmit="return confirm('Vous confirmez ?')">

Modified: trunk/tools/include/template/search_view.php
===================================================================
--- trunk/tools/include/template/search_view.php        2011-11-14 10:28:44 UTC 
(rev 189)
+++ trunk/tools/include/template/search_view.php        2011-11-14 20:29:38 UTC 
(rev 190)
@@ -9,11 +9,11 @@
 <form method="POST" id="form1" onsubmit="return confirm('Vous confirmez?')">
 <?
        echo HtmlInput::extension();
-       echo HtmlInput::get_to_hidden(array('sa'));
+       echo HtmlInput::get_to_hidden(array('sa','ac'));
        echo Dossier::hidden();
 ?>
 
-<div id="div_poste" class="op_detail" 
style="top:230;margin:5;overflow:visible;display:none;">
+<div id="div_poste" class="inner_box" 
style="top:230;margin:5;overflow:visible;display:none;">
        <h2 class="info">Poste comptable </h2>
        <p class="notice">Changera dans les opérations sélectionnées le poste 
comptable.Attention, cela ne changera pas la fiche, soyez prudent</p>
 <?
@@ -49,7 +49,7 @@
 </table>
 </div>
 
-<div id="div_card" class="op_detail" 
style="top:230;margin:5;overflow:visible;display:none;">
+<div id="div_card" class="inner_box" 
style="top:230;margin:5;overflow:visible;display:none;">
 <h2 class="info">Changer  la fiche </h2>
        <p class="notice">Attention, dans les opérations sélectionnées cela 
changera la fiche et le poste comptable: ce sera celui de la fiche qui sera 
utilisé, soyez prudent</p>
 <?
@@ -93,7 +93,7 @@
 
 </div>
 
-<div id="div_ledger" class="op_detail" 
style="top:230;margin:5;overflow:visible;display:none;">
+<div id="div_ledger" class="inner_box" 
style="top:230;margin:5;overflow:visible;display:none;">
 <h2 class="info">Déplacer dans un autre journal </h2>
        <p class="notice">Attention, pour les opérations sélectionnées,cela  
transfèrera les opérations vers le journal choisi mais il faut que ce journal 
soit de même type (achat vers achat, vente vers vente...), les pièces 
justificatives ne seront pas mises à jour, soyez prudent</p>
 

Modified: trunk/tools/index.php
===================================================================
--- trunk/tools/index.php       2011-11-14 10:28:44 UTC (rev 189)
+++ trunk/tools/index.php       2011-11-14 20:29:38 UTC (rev 190)
@@ -21,7 +21,7 @@
 // Copyright Author Dany De Bontridder address@hidden
 
 /*!\file
- * \brief main file for tools 
+ * \brief main file for tools
  */
 
 /*
@@ -33,7 +33,7 @@
 ob_clean();
 echo create_script($j);
 
-$url='?'.dossier::get()."&plugin_code=".$_REQUEST['plugin_code'];
+$url='?'.dossier::get()."&plugin_code=".$_REQUEST['plugin_code']."&ac=".$_REQUEST['ac'];
 $array=array (
          array($url.'&sa=op',_('Opération'),_('Changer poste comptable ou 
fiche'),1),
          array($url.'&sa=pj',_('Pièce'),_('Rénuméroter des pièces 
justificative'),2)

Modified: trunk/tva/ajax.php
===================================================================
--- trunk/tva/ajax.php  2011-11-14 10:28:44 UTC (rev 189)
+++ trunk/tva/ajax.php  2011-11-14 20:29:38 UTC (rev 190)
@@ -71,7 +71,7 @@
       $r.=dossier::hidden();
       $r.=HtmlInput::submit('save','Sauver','onclick="return confirm(\'Vous 
confirmez ? \')"');
       $r.='</form>';
-    } else 
+    } else
     {
       $ctl='record_write';
       $r=HtmlInput::anchor_close($ctl);
@@ -105,7 +105,7 @@
       $array['poste'.$i]=$atva;
       $array['amount'.$i]=$atva_amount;
       $array['ld'.$i]='';
-      if ( isset($atva_ic)) $array['ck'.$i]=1;      
+      if ( isset($atva_ic)) $array['ck'.$i]=1;
       $i++;
       $nb_item++;
     }
@@ -114,7 +114,7 @@
       $array['poste'.$i]=$crtva;
       $array['amount'.$i]=$crtva_amount;
       $array['ld'.$i]='';
-      if ( isset($crtva_ic)) $array['ck'.$i]=1;      
+      if ( isset($crtva_ic)) $array['ck'.$i]=1;
       $i++;
       $nb_item++;
     }
@@ -123,7 +123,7 @@
       $array['poste'.$i]=$dttva;
       $array['amount'.$i]=$dttva_amount;
       $array['ld'.$i]='';
-      if ( isset($dttva_ic)) $array['ck'.$i]=1;      
+      if ( isset($dttva_ic)) $array['ck'.$i]=1;
       $i++;
       $nb_item++;
     }
@@ -132,7 +132,7 @@
       $array['poste'.$i]=$solde;
       $array['amount'.$i]=$solde_amount;
       $array['ld'.$i]='';
-      if ( isset($solde_ic)) $array['ck'.$i]=1;      
+      if ( isset($solde_ic)) $array['ck'.$i]=1;
       $i++;
       $nb_item++;
     }
@@ -148,7 +148,8 @@
    $ods->save($array);
    echo h2info("Sauvée : ajoutez le numéro de pièce");
    echo   HtmlInput::detail_op($ods->jr_id,'détail opération : 
'.$ods->internal);
-   
+   $ods->with_concerned=false;
+   echo $ods->confirm($array,true);
   } catch(Exception $e) {
     echo alert($e->getMessage());
   }
@@ -157,7 +158,7 @@
    break;
 case 'rm_form':
   switch($type)
-    { 
+    {
     case 'da':
       $sql="delete from tva_belge.declaration_amount where da_id=$1";
       break;

Modified: trunk/tva/index.php
===================================================================
--- trunk/tva/index.php 2011-11-14 10:28:44 UTC (rev 189)
+++ trunk/tva/index.php 2011-11-14 20:29:38 UTC (rev 190)
@@ -25,7 +25,7 @@
  */
 Extension::check_version(3600);
 
-$url='?'.dossier::get().'&plugin_code='.$_REQUEST['plugin_code'];
+$url='?'.dossier::get().'&plugin_code='.$_REQUEST['plugin_code']."&ac=".$_REQUEST['ac'];
 $array=array (
        array($url.'&sa=dec',_('Déclaration TVA'),_('Déclaration Trimestriel ou 
annuel de TVA'),1),
        array($url.'&sa=li',_('Listing intracommunautaire'),_('Listing 
intracommunautaire trimestriel'),2),
@@ -69,23 +69,23 @@
 }
 // check schema
 $a=$cn->exist_column('assujetti_chld','ac_periode','tva_belge');
-if ( $a == false) 
+if ( $a == false)
   $cn->exec_sql("alter table tva_belge.assujetti_chld add ac_periode text");
 
 $a=$cn->exist_column('assujetti_chld','exercice','tva_belge');
-if ( $a == false) 
+if ( $a == false)
   $cn->exec_sql("alter table tva_belge.assujetti_chld add exercice text");
 
 $a=$cn->exist_column('declaration_amount','exercice','tva_belge');
-if ( $a == false) 
+if ( $a == false)
   $cn->exec_sql("alter table tva_belge.declaration_amount add exercice text");
 
 $a=$cn->exist_column('intracomm','exercice','tva_belge');
-if ( $a == false) 
+if ( $a == false)
   $cn->exec_sql("alter table tva_belge.intracomm add exercice text");
 
 $a=$cn->exist_column('assujetti','exercice','tva_belge');
-if ( $a == false) 
+if ( $a == false)
   $cn->exec_sql("alter table tva_belge.assujetti add exercice text");
 
 echo '<div style="float:right"><a class="mtitle" style="font-size:140%" 
href="http://wiki.phpcompta.eu/doku.php?id=tva"; target="_blank">Aide</a></div>';

Modified: trunk/tva/js_scripts.js
===================================================================
--- trunk/tva/js_scripts.js     2011-11-14 10:28:44 UTC (rev 189)
+++ trunk/tva/js_scripts.js     2011-11-14 20:29:38 UTC (rev 190)
@@ -4,7 +4,7 @@
        $('detail').show();
        $('main').hide();
        var gDossier=$('gDossier').value; var code=$('plugin_code').value;
-       var queryString='?act=dsp_decl&gDossier='+gDossier+'&plugin_code='+code;
+       var queryString='act=dsp_decl&gDossier='+gDossier+'&plugin_code='+code;
        queryString+='&type='+p_type+'&id='+p_id;
        var action=new Ajax.Request ( 'ajax.php',
                                  {
@@ -33,17 +33,17 @@
 }
 function record_writing(plugin,dossier,p_id) {
     // call ajax to fill with form
-    query='?gDossier='+dossier+'&plugin_code='+plugin+'&act=rw&p_id='+p_id;
+    query='gDossier='+dossier+'&plugin_code='+plugin+'&act=rw&p_id='+p_id;
 
     // add a section
-    
show_box({id:'record_write',html:loading(),cssclass:'op_detail',style:'position:absolute;top:0;left:0%;margin-top:10%;height:80%;margin-left:10%;width:80%;',js_error:null,js_success:success_record_writing,qs:query,fixed:1,callback:'ajax.php'});
+    
show_box({id:'record_write',html:loading(),cssclass:'inner_box',style:'position:absolute;top:0;left:0%;margin-top:10%;height:80%;margin-left:10%;width:80%;',js_error:null,js_success:success_record_writing,qs:query,fixed:1,callback:'ajax.php'});
 }
 function remove_form(plugin,dossier,p_id,type) {
     // call ajax to fill with form
-    
query='?gDossier='+dossier+'&plugin_code='+plugin+'&act=rm_form&p_id='+p_id+"&type="+type;
+    
query='gDossier='+dossier+'&plugin_code='+plugin+'&act=rm_form&p_id='+p_id+"&type="+type;
 
     // add a section
-    
show_box({id:'remove_form',html:loading(),cssclass:'op_detail',style:'position:absolute;top:0;left:20%;margin-top:10%;',js_error:null,js_success:success_box,qs:query,callback:'ajax.php'});
+    
show_box({id:'remove_form',html:loading(),cssclass:'inner_box',style:'position:absolute;top:0;left:20%;margin-top:10%;',js_error:null,js_success:success_box,qs:query,callback:'ajax.php'});
 }
 
 function success_record_writing(req) {
@@ -54,10 +54,10 @@
        if ( a.length == 0 ) { var rec=req.responseText;alert ('erreur :'+rec);}
        var name_ctl=a[0].firstChild.nodeValue;
        var code_html=getNodeText(html[0]);
-       
+
        code_html=unescape_xml(code_html);
        g(name_ctl).innerHTML=code_html;
-    } 
+    }
     catch (e) {
        alert("success_box"+e.message);}
     try{
@@ -66,7 +66,7 @@
        alert("answer_box Impossible executer script de la 
reponse\n"+e.message);}
 }
 function save_write(obj) {
-    var query="?act=sw&"+$(obj).serialize();
+    var query="act=sw&"+$(obj).serialize();
     var action=new Ajax.Request ( 'ajax.php',
                                  {
                                      method:'get',
@@ -85,10 +85,10 @@
        if ( a.length == 0 ) { var rec=req.responseText;alert ('erreur :'+rec);}
        var name_ctl=a[0].firstChild.nodeValue;
        var code_html=getNodeText(html[0]);
-       
+
        code_html=unescape_xml(code_html);
        g(name_ctl).innerHTML=code_html;
-    } 
+    }
     catch (e) {
        alert("success_box"+e.message);}
     try{




reply via email to

[Prev in Thread] Current Thread [Next in Thread]