[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r4898 - in phpcompta/trunk: html include include/templat
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r4898 - in phpcompta/trunk: html include include/template |
Date: |
Thu, 14 Jun 2012 22:00:20 +0200 (CEST) |
Author: danydb
Date: 2012-06-14 22:00:19 +0200 (Thu, 14 Jun 2012)
New Revision: 4898
Modified:
phpcompta/trunk/html/style-light.css
phpcompta/trunk/include/class_acc_ledger.php
phpcompta/trunk/include/class_calendar.php
phpcompta/trunk/include/class_follow_up.php
phpcompta/trunk/include/dashboard.inc.php
phpcompta/trunk/include/template/dashboard.php
Log:
0000623: Dans l'?\195?\169cran d'accueil : modifier calendrier
Modified: phpcompta/trunk/html/style-light.css
===================================================================
--- phpcompta/trunk/html/style-light.css 2012-06-14 18:17:52 UTC (rev
4897)
+++ phpcompta/trunk/html/style-light.css 2012-06-14 20:00:19 UTC (rev
4898)
@@ -748,7 +748,6 @@
}
ul.select_table li span {
display:table-cell;
- width:25em;
margin: 0px;
padding: 0px;
}
Modified: phpcompta/trunk/include/class_acc_ledger.php
===================================================================
--- phpcompta/trunk/include/class_acc_ledger.php 2012-06-14 18:17:52 UTC
(rev 4897)
+++ phpcompta/trunk/include/class_acc_ledger.php 2012-06-14 20:00:19 UTC
(rev 4898)
@@ -2697,9 +2697,12 @@
global $g_user;
$filter_ledger=$g_user->get_ledger_sql('ALL',3);
$filter_ledger=str_replace('jrn_def_id','jr_def_id',$filter_ledger);
- $sql="select jr_id,jr_pj_number,jr_date,to_char(jr_date,'DD.MM.YYYY')
as jr_date_fmt,jr_montant, jr_comment,jr_internal from jrn ".
- " where $filter_ledger ".
- " order by jr_date desc limit $p_limit";
+ $sql="
+ select
jr_id,jr_pj_number,jr_date,to_char(jr_date,'DD.MM.YYYY') as
jr_date_fmt,jr_montant, jr_comment,jr_internal,jrn_def_code
+ from jrn
+ join jrn_def on (jrn_def_id=jr_def_id)
+ where $filter_ledger
+ order by jr_date desc limit $p_limit";
$array=$this->db->get_array($sql);
return $array;
}
Modified: phpcompta/trunk/include/class_calendar.php
===================================================================
--- phpcompta/trunk/include/class_calendar.php 2012-06-14 18:17:52 UTC (rev
4897)
+++ phpcompta/trunk/include/class_calendar.php 2012-06-14 20:00:19 UTC (rev
4898)
@@ -44,22 +44,23 @@
*/
function fill_from_action(&$p_array)
{
+ global $g_user;
+ $profile=$g_user->get_profile();
+
$cn=new Database(dossier::id());
- $sql="select ag_id,substr(ag_title,0,20) as ag_title_fmt,ag_ref,
- to_char(ag_timestamp,'DD')::integer as
ag_timestamp_day ".
+ $sql="select count(*) as nb,to_char(ag_remind_date,'DD')::integer as
ag_timestamp_day ".
" from action_gestion ".
" where ".
- " to_char(ag_timestamp,'MM')::integer=$1 ".
- " and to_char(ag_timestamp,'YYYY')::integer=$2 ".
- " and ag_cal='C' and ag_owner=$3";
-
$array=$cn->get_array($sql,array($this->month,$this->year,$_SESSION['g_user']));
+ " to_char(ag_remind_date,'MM')::integer=$1 ".
+ " and to_char(ag_remind_date,'YYYY')::integer=$2 ".
+ " and ag_dest in (select p_granted from user_sec_action_profile
where p_id =$3)
+ group by
to_char(ag_remind_date,'DD')::integer";
+
+
$array=$cn->get_array($sql,array($this->month,$this->year,$profile));
for ($i=0;$i<count($array);$i++)
{
$ind=$array[$i]['ag_timestamp_day'];
- $p_array[$ind]=(isset($p_array[$ind]))?$p_array[$ind]:'';
- $p_array[$ind].='<A class="line"
HREF="do.php?ac=FOLLOW&'.dossier::get().'&sa=detail&ag_id='.$array[$i]['ag_id'].'">';
- $p_array[$ind].="<span
class=\"calfollow\">".h($array[$i]['ag_ref']."
".$array[$i]['ag_title_fmt']).'</span>';
- $p_array[$ind].="</A>";
+ $p_array[$ind].="<span
class=\"notice\">".$array[$i]['nb'].'</span>';
}
}
@@ -107,7 +108,6 @@
$wMonth->javascript="onchange=change_month(this)";
$wMonth->set_attribute('gDossier',dossier::id());
$month_year=$wMonth->input().$wMonth->get_js_attr();
-
ob_start();
require_once('template/calendar.php');
$ret=ob_get_contents();
Modified: phpcompta/trunk/include/class_follow_up.php
===================================================================
--- phpcompta/trunk/include/class_follow_up.php 2012-06-14 18:17:52 UTC (rev
4897)
+++ phpcompta/trunk/include/class_follow_up.php 2012-06-14 20:00:19 UTC (rev
4898)
@@ -1061,6 +1061,15 @@
return $array;
}
+ function get_today()
+ {
+ $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)
+ and
to_char(ag_remind_date,'DDMMYYYY')=to_char(now(),'DDMMYYYY') ";
+ $array = $this->db->get_array($sql);
+ return $array;
+ }
/**
* insert a related operation
*/
@@ -1264,9 +1273,8 @@
{
$query.=" and ag_timestamp <=
to_date('$date_end','DD.MM.YYYY')";
}
- if (isset($ag_dest_query))
+ if (isset($ag_dest_query)&& ! isset($all_action) &&
$ag_dest_query != -1)
{
- if ($ag_dest_query != 0)
$query.= " and ag_dest = " .
sql_string($ag_dest_query);
}
if (isNumber($ag_id) == 1 && $ag_id != 0)
Modified: phpcompta/trunk/include/dashboard.inc.php
===================================================================
--- phpcompta/trunk/include/dashboard.inc.php 2012-06-14 18:17:52 UTC (rev
4897)
+++ phpcompta/trunk/include/dashboard.inc.php 2012-06-14 20:00:19 UTC (rev
4898)
@@ -12,11 +12,19 @@
require_once("class_itextarea.php");
require_once('class_calendar.php');
require_once('class_acc_ledger.php');
+require_once 'class_follow_up.php';
+
echo '<div class="content">';
global $g_user;
/* others report */
$cal=new Calendar();
$cal->get_preference();
+$Operation=new Follow_Up($cn);
+$last_operation=$Operation->get_today();
+$Ledger=new Acc_Ledger($cn,0);
+$last_ledger=array();
+$last_ledger=$Ledger->get_last(10);
+
ob_start();
require_once('template/dashboard.php');
$ret=ob_get_contents();
Modified: phpcompta/trunk/include/template/dashboard.php
===================================================================
--- phpcompta/trunk/include/template/dashboard.php 2012-06-14 18:17:52 UTC
(rev 4897)
+++ phpcompta/trunk/include/template/dashboard.php 2012-06-14 20:00:19 UTC
(rev 4898)
@@ -57,9 +57,65 @@
?>
</fieldset>
</div>
-<div style="clear:both">
- <div style="float:left;width:50%">
+<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'])?>
+ </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>
+
+<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++):
+?>
+<tr>
+ <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>
+<?=$last_ledger[$i]['jr_internal']?>
+</td>
+<td class="num">
+<?=nbm($last_ledger[$i]['jr_montant'])?>
+</td>
+
+</tr>
+<? endfor;?>
+</ul></table>
+</fieldset>
+</div>
+
+ <div style="float:left;width:50%;clear:left">
+<?php
/*
* Mini Report
*/
@@ -129,4 +185,4 @@
echo
HtmlInput::button('hide',_('Annuler'),'onClick="$(\'add_todo_list\').hide();return
true;"');
?>
</form>
-</div>
\ No newline at end of file
+</div>
---
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] r4898 - in phpcompta/trunk: html include include/template,
phpcompta-dev <=