diff --git a/html/ajax_history.php b/html/ajax_history.php index 86949ea1c..37a8dfa5f 100644 --- a/html/ajax_history.php +++ b/html/ajax_history.php @@ -44,7 +44,7 @@ $g_user=new User($cn); /* security */ if ( $g_user->check_dossier(dossier::id(),true) == 'X' ) exit(); -$from_div=(isset ($_REQUEST['ajax']))?1:0; +$from_div = (isset($_REQUEST['ajax'])) ? 1 : $_GET['l']; /////////////////////////////////////////////////////////////////////////// /* first detail for a card */ diff --git a/html/js/acc_ledger.js b/html/js/acc_ledger.js index e0e7fe82b..a65099749 100644 --- a/html/js/acc_ledger.js +++ b/html/js/acc_ledger.js @@ -563,7 +563,7 @@ function view_history_account(p_value,dossier) id='det'+layer; var popup={'id': id,'cssclass':'inner_box','html':loading(),'drag':true}; - querystring='gDossier='+dossier+'&act=de&pcm_val='+p_value+'&div='+id; + querystring='gDossier='+dossier+'&act=de&pcm_val='+p_value+'&div='+id+"&l="+layer; add_div(popup); var action=new Ajax.Request( @@ -622,7 +622,7 @@ var popup={'id': ,'html': loading(),'drag': true}; - querystring='gDossier='+dossier+'&act=de&f_id='+p_value+'&div='+id; + querystring='gDossier='+dossier+'&act=de&f_id='+p_value+'&div='+id+"&l="+layer; add_div(popup); var action=new Ajax.Request( "ajax_history.php", @@ -938,4 +938,35 @@ function get_history_account(ctl,dossier) { { view_history_account($(ctl).value, dossier); } +} +var previous=[]; +function show_reconcile(p_div,p_let) +{ + try + { + if (previous.length != 0) + { + var count_elt=previous.length; + var i=0; + for (i=0;irow as $op ) { - $vw_operation=sprintf('%s', - $op['jr_id'], dossier::id(), $op['jr_internal']); - $let=''; - if ( $op['letter'] !=-1) $let= strtoupper (base_convert ( $op['letter'],10,36)); - $tmp_diff=bcsub($op['deb_montant'],$op['cred_montant']); + $vw_operation = sprintf('%s', $op['jr_id'], dossier::id(), $op['jr_internal']); + $let = ''; + $html_let = ""; + if ($op['letter'] != -1) + { + $let = strtoupper(base_convert($op['letter'], 10, 36)); + $html_let = HtmlInput::show_reconcile($from_div, $let); + } + $tmp_diff=bcsub($op['deb_montant'],$op['cred_montant']); /* * reset prog. balance to zero if we change of exercice @@ -390,8 +394,8 @@ class Acc_Account_Ledger if ($idx%2 == 0) $class='class="odd"'; else $class=' class="even"'; $idx++; - echo "". - "".smaller_date(format_date($op['j_date']))."". + echo "" . + "".smaller_date(format_date($op['j_date']))."". td(h($op['jr_pj_number'])). "".$vw_operation."". "".h($op['description'])."". @@ -399,8 +403,8 @@ class Acc_Account_Ledger "".nbm($op['cred_montant'])."". td(nbm(abs($progress)).$side,'style="text-align:right"'). - td($let,' style="color:red;text-align:right"'). - ""; + td($html_let, ' style="color:red;text-align:right"') . + ""; $old_exercice=$op['p_exercice']; } echo ''; diff --git a/include/class_fiche.php b/include/class_fiche.php index c58fa8245..03a2c51fd 100644 --- a/include/class_fiche.php +++ b/include/class_fiche.php @@ -1265,8 +1265,8 @@ class Fiche } else { - echo ""; - } + echo "
"; + } echo ''; echo "". "". @@ -1284,12 +1284,15 @@ class Fiche $idx=0; foreach ( $this->row as $op ) { - $vw_operation=sprintf('%s', - $op['jr_id'], dossier::id(), $op['jr_internal']); - $let=''; - if ( $op['letter'] !=-1) $let= strtoupper(base_convert($op['letter'],10,36)); - - $tmp_diff=bcsub($op['deb_montant'],$op['cred_montant']); + $vw_operation = sprintf('%s', $op['jr_id'], dossier::id(), $op['jr_internal']); + $let = ''; + $html_let = ""; + if ($op['letter'] != -1) + { + $let = strtoupper(base_convert($op['letter'], 10, 36)); + $html_let = HtmlInput::show_reconcile($from_div, $let); + } + $tmp_diff=bcsub($op['deb_montant'],$op['cred_montant']); /* * reset prog. balance to zero if we change of exercice @@ -1322,16 +1325,16 @@ class Fiche if ($idx%2 == 0) $class='class="odd"'; else $class=' class="even"'; $idx++; - echo "". - "". + echo "" . + "". td(h($op['jr_pj_number'])). "". "". "". "". td(nbm(abs($progress)).$side,'style="text-align:right"'). - td($let,' style="color:red;text-align:right"'). - ""; + td($html_let, ' style="text-align:right"') . + ""; $old_exercice=$op['p_exercice']; } diff --git a/include/class_html_input.php b/include/class_html_input.php index 7aeab0c8d..80f916e13 100755 --- a/include/class_html_input.php +++ b/include/class_html_input.php @@ -722,4 +722,11 @@ class HtmlInput "; return $r; } + + static function show_reconcile($p_div, $let) + { + $r = '' . $let . ''; + return $r; + } + } \ No newline at end of file
"._('Date')."
".smaller_date(format_date($op['j_date_fmt']))."
".smaller_date(format_date($op['j_date_fmt']))."".$vw_operation."".h($op['description'])."".nbm($op['deb_montant'])."".nbm($op['cred_montant'])."