[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r5225 - in phpcompta/trunk: html html/js include
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r5225 - in phpcompta/trunk: html html/js include |
Date: |
Fri, 10 May 2013 22:40:38 +0200 (CEST) |
Author: danydb
Date: 2013-05-10 22:40:38 +0200 (Fri, 10 May 2013)
New Revision: 5225
Modified:
phpcompta/trunk/html/ajax_history.php
phpcompta/trunk/html/js/acc_ledger.js
phpcompta/trunk/include/class_acc_account_ledger.php
phpcompta/trunk/include/class_fiche.php
phpcompta/trunk/include/class_html_input.php
Log:
task #0000823: Mise en evidence des op?\195?\169rations lettr?\195?\169es
Mise en ?\195?\169vidence dans les d?\195?\169tails op?\195?\169ration
Modified: phpcompta/trunk/html/ajax_history.php
===================================================================
--- phpcompta/trunk/html/ajax_history.php 2013-05-10 19:34:30 UTC (rev
5224)
+++ phpcompta/trunk/html/ajax_history.php 2013-05-10 20:40:38 UTC (rev
5225)
@@ -44,7 +44,7 @@
/* 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 */
Modified: phpcompta/trunk/html/js/acc_ledger.js
===================================================================
--- phpcompta/trunk/html/js/acc_ledger.js 2013-05-10 19:34:30 UTC (rev
5224)
+++ phpcompta/trunk/html/js/acc_ledger.js 2013-05-10 20:40:38 UTC (rev
5225)
@@ -563,7 +563,7 @@
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 @@
,'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 @@
{
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;i<count_elt;i++){
+ previous[i].style.backgroundColor='';
+ previous[i].style.color='';
+ }
+ }
+ var name='tr_'+p_let+'_'+p_div;
+ var elt=document.getElementsByName(name);
+ previous=elt;
+ var count_elt=elt.length;
+ var i=0;
+ for (i=0;i<count_elt;i++){
+ elt[i].style.backgroundColor='#000066';
+ elt[i].style.color='white';
+ }
+
+ } catch (e)
+ {
+ alert(e.message);
+ }
+
+
}
\ No newline at end of file
Modified: phpcompta/trunk/include/class_acc_account_ledger.php
===================================================================
--- phpcompta/trunk/include/class_acc_account_ledger.php 2013-05-10
19:34:30 UTC (rev 5224)
+++ phpcompta/trunk/include/class_acc_account_ledger.php 2013-05-10
20:40:38 UTC (rev 5225)
@@ -352,11 +352,15 @@
$idx=0;
foreach ( $this->row as $op )
{
- $vw_operation=sprintf('<A class="detail"
style="text-decoration:underline"
HREF="javascript:modifyOperation(\'%s\',\'%s\')" >%s</A>',
- $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('<A class="detail"
style="text-decoration:underline;color:red"
HREF="javascript:modifyOperation(\'%s\',\'%s\')" >%s</A>', $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 @@
if ($idx%2 == 0) $class='class="odd"'; else $class='
class="even"';
$idx++;
- echo "<TR $class>".
- "<TD>".smaller_date(format_date($op['j_date']))."</TD>".
+ echo "<TR $class name=\"tr_" . $let . "_" . $from_div . "\">" .
+ "<TD>".smaller_date(format_date($op['j_date']))."</TD>".
td(h($op['jr_pj_number'])).
"<TD>".$vw_operation."</TD>".
"<TD>".h($op['description'])."</TD>".
@@ -399,8 +403,8 @@
"<TD
style=\"text-align:right\">".nbm($op['cred_montant'])."</TD>".
td(nbm(abs($progress)).$side,'style="text-align:right"').
- td($let,' style="color:red;text-align:right"').
- "</TR>";
+ td($html_let, ' style="color:red;text-align:right"') .
+ "</TR>";
$old_exercice=$op['p_exercice'];
}
echo '<tfoot>';
Modified: phpcompta/trunk/include/class_fiche.php
===================================================================
--- phpcompta/trunk/include/class_fiche.php 2013-05-10 19:34:30 UTC (rev
5224)
+++ phpcompta/trunk/include/class_fiche.php 2013-05-10 20:40:38 UTC (rev
5225)
@@ -1265,8 +1265,8 @@
}
else
{
- echo "<TABLE class=\"result\"
style=\"width:100%;border-collapse:separate;border-spacing:2px\">";
- }
+ echo "<TABLE id=\"tb" . $from_div . "\"class=\"result\"
style=\"width:100%;border-collapse:separate;border-spacing:2px\">";
+ }
echo '<tbody>';
echo "<TR>".
"<TH style=\"text-align:left\">"._('Date')."</TH>".
@@ -1284,13 +1284,16 @@
$idx=0;
foreach ( $this->row as $op )
{
- $vw_operation=sprintf('<A class="detail"
style="text-decoration:underline"
HREF="javascript:modifyOperation(\'%s\',\'%s\')" >%s</A>',
- $op['jr_id'], dossier::id(),
$op['jr_internal']);
- $let='';
- if ( $op['letter'] !=-1) $let=
strtoupper(base_convert($op['letter'],10,36));
+ $vw_operation = sprintf('<A class="detail"
style="text-decoration:underline;color:red"
HREF="javascript:modifyOperation(\'%s\',\'%s\')" >%s</A>', $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']);
- $tmp_diff=bcsub($op['deb_montant'],$op['cred_montant']);
-
/*
* reset prog. balance to zero if we change of exercice
*/
@@ -1322,16 +1325,16 @@
if ($idx%2 == 0) $class='class="odd"'; else $class='
class="even"';
$idx++;
- echo "<TR $class>".
- "<TD>".smaller_date(format_date($op['j_date_fmt']))."</TD>".
+ echo "<TR $class name=\"tr_" . $let . "_" . $from_div . "\">" .
+
"<TD>".smaller_date(format_date($op['j_date_fmt']))."</TD>".
td(h($op['jr_pj_number'])).
"<TD>".$vw_operation."</TD>".
"<TD>".h($op['description'])."</TD>".
"<TD style=\"text-align:right\">".nbm($op['deb_montant'])."</TD>".
"<TD
style=\"text-align:right\">".nbm($op['cred_montant'])."</TD>".
td(nbm(abs($progress)).$side,'style="text-align:right"').
- td($let,' style="color:red;text-align:right"').
- "</TR>";
+ td($html_let, ' style="text-align:right"') .
+ "</TR>";
$old_exercice=$op['p_exercice'];
}
Modified: phpcompta/trunk/include/class_html_input.php
===================================================================
--- phpcompta/trunk/include/class_html_input.php 2013-05-10 19:34:30 UTC
(rev 5224)
+++ phpcompta/trunk/include/class_html_input.php 2013-05-10 20:40:38 UTC
(rev 5225)
@@ -722,4 +722,11 @@
";
return $r;
}
+
+ static function show_reconcile($p_div, $let)
+ {
+ $r = '<A style="color:red;" href="javascript:void(0)"
onclick="show_reconcile(\'' . $p_div . '\',\'' . $let . '\')">' . $let . '</A>';
+ return $r;
+ }
+
}
\ No newline at end of file
---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpcompta-dev] r5225 - in phpcompta/trunk: html html/js include,
phpcompta-dev <=