phpcompta-dev
[Top][All Lists]
Advanced

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

[Phpcompta-dev] r5049 - in phpcompta/trunk/include: . template


From: phpcompta-dev
Subject: [Phpcompta-dev] r5049 - in phpcompta/trunk/include: . template
Date: Sat, 30 Jun 2012 06:31:22 +0200 (CEST)

Author: danydb
Date: 2012-06-30 06:31:21 +0200 (Sat, 30 Jun 2012)
New Revision: 5049

Modified:
   phpcompta/trunk/include/class_follow_up.php
   phpcompta/trunk/include/dashboard.inc.php
   phpcompta/trunk/include/template/dashboard.php
Log:
Cosmetic: ajout action - retard

Modified: phpcompta/trunk/include/class_follow_up.php
===================================================================
--- phpcompta/trunk/include/class_follow_up.php 2012-06-30 04:09:28 UTC (rev 
5048)
+++ phpcompta/trunk/include/class_follow_up.php 2012-06-30 04:31:21 UTC (rev 
5049)
@@ -823,7 +823,7 @@
         */
        function Update()
        {
-            
+
                // if ag_id == 0 nothing to do
                if ($this->ag_id == 0)
                        return;
@@ -1021,11 +1021,24 @@
        {
                $sql = "select coalesce(vw_name,'Interne') as 
vw_name,ag_id,ag_title,ag_ref, dt_value,to_char(ag_timestamp,'DD.MM.YYYY') as 
ag_timestamp_fmt,ag_timestamp " .
                                " from action_gestion join document_type " .
-                               " on (ag_type=dt_id) left join vw_fiche_attr on 
(f_id=f_id_dest) where ag_state in (2,3)
+                               " on (ag_type=dt_id) left join vw_fiche_attr on 
(f_id=f_id_dest) where ag_state not in (1,4)
                                and 
to_char(ag_remind_date,'DDMMYYYY')=to_char(now(),'DDMMYYYY') ";
                $array = $this->db->get_array($sql);
                return $array;
        }
+              /**
+         * get the action where the remind day is today
+         * @return array
+         */
+       function get_late()
+       {
+               $sql = "select coalesce(vw_name,'Interne') as 
vw_name,ag_id,ag_title,ag_ref, dt_value,to_char(ag_timestamp,'DD.MM.YYYY') as 
ag_timestamp_fmt,ag_timestamp " .
+                               " from action_gestion join document_type " .
+                               " on (ag_type=dt_id) left join vw_fiche_attr on 
(f_id=f_id_dest) where ag_state not in  (1,4)
+                               and 
to_char(ag_remind_date,'DDMMYYYY')<=to_char(now(),'DDMMYYYY') ";
+               $array = $this->db->get_array($sql);
+               return $array;
+       }
        /**
         * insert a related operation
         */
@@ -1152,7 +1165,7 @@
         /**
         address@hidden show a list of actions
         * @param $cn database connextion
-        * @param $p_base base URL 
+        * @param $p_base base URL
         */
        static function show_action_list($cn, $p_base)
        {
@@ -1185,7 +1198,7 @@
                extract($p_array);
                $query = "";
 
-                
+
                 if (isset($_REQUEST['query']))
                {
                        // if a query is request build the sql stmt

Modified: phpcompta/trunk/include/dashboard.inc.php
===================================================================
--- phpcompta/trunk/include/dashboard.inc.php   2012-06-30 04:09:28 UTC (rev 
5048)
+++ phpcompta/trunk/include/dashboard.inc.php   2012-06-30 04:31:21 UTC (rev 
5049)
@@ -21,6 +21,7 @@
 $cal->get_preference();
 $Operation=new Follow_Up($cn);
 $last_operation=$Operation->get_today();
+$late_operation=$Operation->get_late();
 $Ledger=new Acc_Ledger($cn,0);
 $last_ledger=array();
 $last_ledger=$Ledger->get_last(20);

Modified: phpcompta/trunk/include/template/dashboard.php
===================================================================
--- phpcompta/trunk/include/template/dashboard.php      2012-06-30 04:09:28 UTC 
(rev 5048)
+++ phpcompta/trunk/include/template/dashboard.php      2012-06-30 04:31:21 UTC 
(rev 5049)
@@ -1,5 +1,5 @@
-<div style="float:left;width:50%">
-<fieldset style="width:100%">
+<div style="float:left;width: 45%">
+<fieldset >
 <legend><?=_('Calendrier')?>
 </legend>
 <?php echo $cal->display(); ?>
@@ -24,7 +24,7 @@
 $array=$todo->load_all();
 ?>
 
-<div style="float:right;width:45%">
+<div style="float:right;width: 45%">
 <fieldset> <legend><?=_('Pense-Bête')?></legend>
 
 <?php
@@ -57,65 +57,63 @@
 ?>
 </fieldset>
 </div>
-<div style="float:right;width:45%">
-<fieldset>
-<legend><?=_('Action pour aujourd\'hui')?>
-</legend>
-<ol>
-<?php
-for($i=0;$i<count($last_operation);$i++):
-?>
-<li>
-<span>
-<?=smaller_date($last_operation[$i]['ag_timestamp_fmt'])?>
-</span>
-       <span  style="font-weight: bolder ">
-               <?=h($last_operation[$i]['vw_name'])?>
+<div style="float:left;clear:both"></div>
+<div style="float:right;width: 45%">
+<? if (count($last_operation)> 0) : ?>
+       <fieldset>
+       <legend><?=_('Action pour aujourd\'hui')?>
+       </legend>
+       <ol>
+       <?php
+       for($i=0;$i<count($last_operation);$i++):
+       ?>
+       <li>
+       <span>
+       <?=smaller_date($last_operation[$i]['ag_timestamp_fmt'])?>
        </span>
-<span>
-   <?=h(mb_substr($last_operation[$i]['ag_title'],0,40,'UTF-8'))?>
-</span>
-<span style="font-style: italic">
-<?=$last_operation[$i]['dt_value']?>
-</span>
-</li>
-<? endfor;?>
-</ol>
-</fieldset>
-</div>
+               <span  style="font-weight: bolder ">
+                       <?=h($last_operation[$i]['vw_name'])?>
+               </span>
+       <span>
+       <?=h(mb_substr($last_operation[$i]['ag_title'],0,60,'UTF-8'))?>
+       </span>
+       <span style="font-style: italic">
+       <?=$last_operation[$i]['dt_value']?>
+       </span>
+       </li>
+       <? endfor;?>
+       </ol>
+       </fieldset>
+<? endif; ?>
 
-<div style="float:right;width:45%">
-<fieldset>
-<legend><?=_('Dernières opérations')?>
-</legend>
-<table style="width: 100%">
-<?php
-for($i=0;$i<count($last_ledger);$i++):
-       $class=($i%2==0)?' class="even" ':' class="odd" ';
-?>
-<tr <?=$class ?>> 
-       <td><?=  smaller_date($last_ledger[$i]['jr_date_fmt'])?>
-       </td>
-       <td>
-               <?=$last_ledger[$i]['jrn_def_code']?>
-       </td>
-<td>
-   <?=h(mb_substr($last_ledger[$i]['jr_comment'],0,40,'UTF-8'))?>
-</td>
-<td>
-<?=HtmlInput::detail_op($last_ledger[$i]['jr_id'], 
$last_ledger[$i]['jr_internal'])?>
-</td>
-<td class="num">
-<?=nbm($last_ledger[$i]['jr_montant'])?>
-</td>
-
-</tr>
-<? endfor;?>
-</ul></table>
-</fieldset>
+<? if (count($late_operation)> 0) : ?>
+               <fieldset>
+       <legend><?=_('Action en retard ')?>
+       </legend>
+       <ol>
+       <?php
+       for($i=0;$i<count($late_operation);$i++):
+       ?>
+       <li>
+       <span>
+       <?=smaller_date($late_operation[$i]['ag_timestamp_fmt'])?>
+       </span>
+               <span  style="font-weight: bolder ">
+                       <?=h($late_operation[$i]['vw_name'])?>
+               </span>
+       <span>
+       <?=h(mb_substr($late_operation[$i]['ag_title'],0,60,'UTF-8'))?>
+       </span>
+       <span style="font-style: italic">
+       <?=$late_operation[$i]['dt_value']?>
+       </span>
+       </li>
+       <? endfor;?>
+       </ol>
+       </fieldset>
+<? endif; ?>
 </div>
-
-       <div style="float:left;width:50%;clear:left">
+       <div style="float:left;width: 45%">
 <?php
 /*
  * Mini Report
@@ -162,8 +160,40 @@
 
 ?>
 </div>
+
+<div style="float:right;width: 45%">
+<fieldset>
+<legend><?=_('Dernières opérations')?>
+</legend>
+<table style="width: 100%">
+<?php
+for($i=0;$i<count($last_ledger);$i++):
+       $class=($i%2==0)?' class="even" ':' class="odd" ';
+?>
+<tr <?=$class ?>>
+       <td><?=  smaller_date($last_ledger[$i]['jr_date_fmt'])?>
+       </td>
+       <td>
+               <?=$last_ledger[$i]['jrn_def_code']?>
+       </td>
+<td>
+   <?=h(mb_substr($last_ledger[$i]['jr_comment'],0,40,'UTF-8'))?>
+</td>
+<td>
+<?=HtmlInput::detail_op($last_ledger[$i]['jr_id'], 
$last_ledger[$i]['jr_internal'])?>
+</td>
+<td class="num">
+<?=nbm($last_ledger[$i]['jr_montant'])?>
+</td>
+
+</tr>
+<? endfor;?>
+</ul></table>
+</fieldset>
 </div>
 
+
+
 <div id="add_todo_list" class="add_todo_list">
        <script charset="utf8" type="text/javascript" language="javascript">
                new Draggable($('add_todo_list'),{});



---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu



reply via email to

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