diff --git a/html/ajax_ledger.php b/html/ajax_ledger.php index 24086720d..aa6536ac7 100644 --- a/html/ajax_ledger.php +++ b/html/ajax_ledger.php @@ -103,7 +103,7 @@ case 'de': $obj=$op->get_quant(); /* return an obj. ACH / FIN or VEN or null if nothing is found*/ $oLedger=new Acc_Ledger($cn,$ledger); - if ( $obj == null ) { + if ( $obj==null || $obj->signature == 'ODS' ) { /* only the details */ ob_start(); require_once('template/ledger_detail_misc.php'); diff --git a/html/js/scripts.js b/html/js/scripts.js index 28e961579..eea4952e5 100644 --- a/html/js/scripts.js +++ b/html/js/scripts.js @@ -472,7 +472,12 @@ function success_box(req,json) code_html=unescape_xml(code_html); g(name_ctl).innerHTML=code_html; g(name_ctl).style.height='auto'; - g(name_ctl).style.width='auto'; + // if IE set to 60 % + if(navigator.appName == "Microsoft Internet Explorer") + g(name_ctl).style.width='auto'; + else + g(name_ctl).style.width='auto'; + } catch (e) { alert("success_box"+e.message);} diff --git a/html/style-color.css b/html/style-color.css index 160c5eb26..7590ae871 100644 --- a/html/style-color.css +++ b/html/style-color.css @@ -845,12 +845,15 @@ div.op_detail { font-family:helvetica,arial,sans-serif; padding:0; margin:0; - overflow:none; + overflow:hidden; z-index:3; -position:absolute;width:500;height:200;left:200; +position:absolute; +left:10%;right:10%; + + +border:1px solid darkblue; width:300; -border:1px solid darkblue; } div.op_detail_title { background-color:grey; diff --git a/include/class_anc_operation.php b/include/class_anc_operation.php index 30ddf91d3..a7a2e2cf2 100644 --- a/include/class_anc_operation.php +++ b/include/class_anc_operation.php @@ -556,7 +556,38 @@ function get_balance($p_from,$p_to,$p_plan_id) $sql="delete from operation_analytique where j_id=$p_jid"; $this->db->exec_sql($sql); } + /** + *@brief return a HTML table with the data of a specific + * operation (jrnx.j_id). First, it load data from the database + * and after it displays them + *@param $div is the div id used to give a name to the table + *@param $opt 0 if the CA is mandatory and 1 for optional + *@note the data must be first loaded + *@see Anc_Operation::get_by_jid + */ + function print_table($array,$div,$opt,$j_id,$seq) { + $r=''; + $col=0; + $r.=HtmlInput::hidden('ident['.$seq.']',$j_id); + $plan=new Anc_Plan($this->db); + $a_plan=$plan->get_list(); + if (empty($a_plan)) return ''; + /* create the table */ + $table_id="tb".$div."[$seq]"; + $r.=""; + $r.=tr($plan->header().th('Montant',' class="inum"')); + /* numb. of rows for this operation */ + $nb_row=$this->db->get_value('select max(oa_row) from operation_analytique where j_id=$1',array($j_id)); + for ( $i=0;$i<$nb_row;$i++) { + + /* each plan is a column */ + foreach ($a_plan as $r_plan) { + + + } + } + } /*\brief test the class *\param *\param @@ -569,4 +600,5 @@ function get_balance($p_from,$p_to,$p_plan_id) } + } diff --git a/include/template/ledger_detail_bottom.php b/include/template/ledger_detail_bottom.php index ad1d189e3..6adbd500c 100644 --- a/include/template/ledger_detail_bottom.php +++ b/include/template/ledger_detail_bottom.php @@ -28,7 +28,7 @@ if ($aRap != null ) { $remove=$rmReconciliation->input(); else $remove=''; - echo tr (td(''.$internal.'').td($amount).td($remove)); + echo tr (td(''.$internal.'').td($amount).td($remove)); } echo '
'; } diff --git a/include/template/ledger_detail_misc.php b/include/template/ledger_detail_misc.php index 3b6e7a5c7..18cf004cf 100644 --- a/include/template/ledger_detail_misc.php +++ b/include/template/ledger_detail_misc.php @@ -1,4 +1,99 @@ -

MISC

- + +
-?> \ No newline at end of file + +
+ + + + + +det->jr_date);?> + + + +value=$obj->det->jr_comment; + $itext->size=40; + echo td(_('Libellé')).td($itext->input()); + + +?> + + +det->jr_montant,' class="inum"');?> + + +value=$obj->det->jr_pj_number; +echo td(_('Pièce')).td($itext->input()); +?> + + +
+
+ + + + + + +MY_ANALYTIC != 'nu'){ + echo th('Plan Analytique'); + } + + $idx_ca=0; + for ($e=0;$edet->array);$e++) { + $row=''; $q=$obj->det->array; + $row=td($q[$e]['j_poste']); + $row.=td($q[$e]['j_qcode']); + if ( $q[$e]['j_qcode'] !='') { + // nom de la fiche + $ff=new Fiche($cn); + $ff->get_by_qcode( $q[$e]['j_qcode']); + $row.=td(h($ff->strAttribut(ATTR_DEF_NAME))); + } else { + // libellé du compte + $name=$cn->get_value('select pcm_lib from tmp_pcmn where pcm_val=$1',array($q[$e]['j_poste'])); + $row.=td(h($name)); + } + $montant=td($q[$e]['j_montant'],'class="num"'); + $row.=($q[$e]['j_debit']=='t')?$montant:td(''); + $row.=($q[$e]['j_debit']=='f')?$montant:td(''); + /* Analytic accountancy */ + if ( $owner->MY_ANALYTIC != "nu"){ + if ( preg_match('/^(6|7)/',$q[$e]['j_poste'])) { + $row.=display_table_ca($cn,$idx_ca,$q[$e]['j_id'],$owner,1,$q[$e]['j_montant']); + + $idx_ca++; + } else { + $row.=td(''); + } + } + echo tr($row); + + } +?> +
+
+ + +
\ No newline at end of file diff --git a/include/template/ledger_detail_top.php b/include/template/ledger_detail_top.php index 68dc56b64..2b056df0b 100644 --- a/include/template/ledger_detail_top.php +++ b/include/template/ledger_detail_top.php @@ -1,5 +1,6 @@
Agrandir'; echo 'Fermer'; ?>