[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r5235 - in phpcompta/trunk: html html/js include include
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r5235 - in phpcompta/trunk: html html/js include include/template |
Date: |
Sat, 11 May 2013 19:18:20 +0200 (CEST) |
Author: danydb
Date: 2013-05-11 19:18:19 +0200 (Sat, 11 May 2013)
New Revision: 5235
Modified:
phpcompta/trunk/html/ajax_poste.php
phpcompta/trunk/html/js/accounting_item.js
phpcompta/trunk/include/param_pcmn.inc.php
phpcompta/trunk/include/template/account_result.php
Log:
task #0000813: plan comptable - quick code
Visible dans le popup quand on remplit les fiches et dans CFGPCMN
Modified: phpcompta/trunk/html/ajax_poste.php
===================================================================
--- phpcompta/trunk/html/ajax_poste.php 2013-05-11 17:15:06 UTC (rev 5234)
+++ phpcompta/trunk/html/ajax_poste.php 2013-05-11 17:18:19 UTC (rev 5235)
@@ -99,8 +99,9 @@
$r.='</form>';
- $sql="select pcm_val,pcm_lib,pcm_val_parent,pcm_type ".
- " from tmp_pcmn ";
+ $sql="
+ select pcm_val,pcm_lib,array_to_string(array_agg(j_qcode) ,
',') as acode
+ from tmp_pcmn left join vw_poste_qcode on (j_poste=pcm_val) ";
$sep=" where ";
/* build the sql stmt */
if ( isset($j) && $j > 0 && isNumber($j))
@@ -121,7 +122,7 @@
$sql.=sprintf(" $sep ( pcm_val::text like '%s%%' or pcm_lib::text
ilike '%%%s%%') ",
$q,$q);
}
- $sql.=' order by pcm_val::text limit 50';
+ $sql.=' group by pcm_val,pcm_lib,pcm_val_parent, pcm_type order by
pcm_val::text limit 50';
if ( isset($q) && strlen(trim($q))> 0 )
{
$array=$cn->get_array($sql);
Modified: phpcompta/trunk/html/js/accounting_item.js
===================================================================
--- phpcompta/trunk/html/js/accounting_item.js 2013-05-11 17:15:06 UTC (rev
5234)
+++ phpcompta/trunk/html/js/accounting_item.js 2013-05-11 17:18:19 UTC (rev
5235)
@@ -75,7 +75,7 @@
sx=document.body.scrollTop+60;
}
- var div_style="z-index:15;top:"+sx;
+ var div_style="top:"+sx;
removeDiv('search_account');
add_div({id:'search_account',cssclass:'inner_box',html:loading(),style:div_style,drag:true});
Modified: phpcompta/trunk/include/param_pcmn.inc.php
===================================================================
--- phpcompta/trunk/include/param_pcmn.inc.php 2013-05-11 17:15:06 UTC (rev
5234)
+++ phpcompta/trunk/include/param_pcmn.inc.php 2013-05-11 17:18:19 UTC (rev
5235)
@@ -239,7 +239,9 @@
}
}
-$Ret=$cn->exec_sql("select pcm_val,pcm_lib,pcm_val_parent,pcm_type from
tmp_pcmn where substr(pcm_val::text,1,1)='".$_SESSION['g_start']."' order by
pcm_val::text");
+$Ret=$cn->exec_sql("select
pcm_val,pcm_lib,pcm_val_parent,pcm_type,array_to_string(array_agg(j_qcode) ,
',') as acode
+ from tmp_pcmn left join vw_poste_qcode on (j_poste=pcm_val) where
substr(pcm_val::text,1,1)='".$_SESSION['g_start']."'".
+ " group by pcm_val,pcm_lib,pcm_val_parent, pcm_type order by
pcm_val::text");
$MaxRow=Database::num_row($Ret);
?>
@@ -256,11 +258,13 @@
<TH> Libellé </TH>
<TH> Poste comptable Parent </TH>
<TH> Type </TH>
+ <TH> Fiche</TH>
</TR>
- <?php
- $line=new Acc_Account($cn);
+<?php
+$line=new Acc_Account($cn);
echo $line->form(false);
?>
+ <td></td>
<TD>
<INPUT TYPE="SUBMIT" class="button" Value="Ajout" Name="Ajout">
</TD>
@@ -301,6 +305,20 @@
echo $A['pcm_type'];
echo "</TD>";
+ echo $td;
+ if ( strlen($A['acode']) >0 ) {
+ if (strpos($A['acode'], ",") >0 ) {
+ $det_qcode= split(",", $A['acode']);
+ echo '<ul
style="paddding:0;margin:0;padding-left:0;list-style-type:none;padding-start-value:0">';
+ for ($e=0;$e<count($det_qcode);$e++) {
+ echo '<li
style="padding-start-value:0">'.HtmlInput::card_detail($det_qcode[$e]).'</li>';
+ }
+ echo '</ol>';
+ } else {
+ echo HtmlInput::card_detail($A['acode']);
+ }
+ }
+ echo '</td>';
echo $td;
printf ('<A
href="?ac='.$_REQUEST['ac'].'&l=%s&action=del&%s">Efface</A>',$A['pcm_val'],$str_dossier);
Modified: phpcompta/trunk/include/template/account_result.php
===================================================================
--- phpcompta/trunk/include/template/account_result.php 2013-05-11 17:15:06 UTC
(rev 5234)
+++ phpcompta/trunk/include/template/account_result.php 2013-05-11 17:18:19 UTC
(rev 5235)
@@ -16,6 +16,22 @@
<?=$array[$i]['pcm_lib']?>
</span>
</td>
+<td>
+ <?php
+ if ( strlen($array[$i]['acode']) >0 ) {
+ if (strpos($array[$i]['acode'], ",") >0 ) {
+ $det_qcode= split(",", $array[$i]['acode']);
+ $sep="";
+ for ($e=0;$e<count($det_qcode);$e++) {
+ echo
$sep.HtmlInput::card_detail($det_qcode[$e]);
+ $sep=" , ";
+ }
+ } else {
+ echo HtmlInput::card_detail($array[$i]['acode']);
+ }
+ }
+ ?>
+</td>
</tr>
---
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] r5235 - in phpcompta/trunk: html html/js include include/template,
phpcompta-dev <=