[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r4903 - in phpcompta/trunk: include include/template sql
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r4903 - in phpcompta/trunk: include include/template sql |
Date: |
Thu, 14 Jun 2012 23:45:36 +0200 (CEST) |
Author: danydb
Date: 2012-06-14 23:45:35 +0200 (Thu, 14 Jun 2012)
New Revision: 4903
Modified:
phpcompta/trunk/include/class_follow_up.php
phpcompta/trunk/include/template/detail-action.php
phpcompta/trunk/sql/upgrade.sql
Log:
prob with action public, remove ag_cal
Modified: phpcompta/trunk/include/class_follow_up.php
===================================================================
--- phpcompta/trunk/include/class_follow_up.php 2012-06-14 21:34:00 UTC (rev
4902)
+++ phpcompta/trunk/include/class_follow_up.php 2012-06-14 21:45:35 UTC (rev
4903)
@@ -240,18 +240,7 @@
$title->value = $this->ag_title;
$title->size = 60;
- // ag_cal
- $ag_cal = new ICheckBox('ag_cal');
- $ag_cal->readOnly = $readonly;
- $ag_cal->name = "ag_cal";
- if ($this->ag_cal == 'C')
- $ag_cal->selected = true;
- else
- $ag_cal->selected = false;
-
- $str_ag_cal = $ag_cal->input();
-
// Priority of the ag_priority
$ag_priority = new ISelect();
$ag_priority->readOnly = $readonly;
@@ -535,7 +524,7 @@
{
$sql = "select ag_id,to_char (ag_timestamp,'DD.MM.YYYY') as
ag_timestamp," .
"
f_id_dest,ag_title,ag_ref,d_id,ag_type,ag_state, ag_owner, " .
- " ag_dest, ag_hour, ag_priority,
ag_cal,ag_contact,to_char (ag_remind_date,'DD.MM.YYYY') as ag_remind_date " .
+ " ag_dest, ag_hour, ag_priority,
ag_contact,to_char (ag_remind_date,'DD.MM.YYYY') as ag_remind_date " .
" from action_gestion left join document using
(ag_id) where ag_id=" . $this->ag_id;
$r = $this->db->exec_sql($sql);
$row = Database::fetch_all($r);
@@ -554,7 +543,6 @@
$this->ag_dest = $row[0]['ag_dest'];
$this->ag_hour = $row[0]['ag_hour'];
$this->ag_priority = $row[0]['ag_priority'];
- $this->ag_cal = $row[0]['ag_cal'];
$this->ag_remind_date = $row[0]['ag_remind_date'];
$this->ag_owner= $row[0]['ag_owner'];
@@ -613,25 +601,21 @@
$ag_ref=$this->db->get_value('select dt_prefix from
document_type where
dt_id=$1',array($this->dt_id)).'-'.$this->db->get_next_seq($seq_name);
$this->ag_ref = $ag_ref;
- if ($this->ag_cal == 'on')
- $ag_cal = 'C';
- else
- $ag_cal = 'I';
// save into the database
if ($this->ag_remind_date != null || $this->ag_remind_date !=
'')
{
$sql = "insert into action_gestion" .
"(ag_id,ag_timestamp,ag_type,ag_title,f_id_dest,ag_ref, ag_dest, " .
- " ag_hour,
ag_priority,ag_cal,ag_owner,ag_contact,ag_state,ag_remind_date) " .
- " values
($1,to_date($2,'DD.MM.YYYY'),$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,to_date($14,'DD.MM.YYYY'))";
+ " ag_hour,
ag_priority,ag_owner,ag_contact,ag_state,ag_remind_date) " .
+ " values
($1,to_date($2,'DD.MM.YYYY'),$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,to_date($13,'DD.MM.YYYY'))";
}
else
{
$this->ag_remind_date = null;
$sql = "insert into action_gestion" .
"(ag_id,ag_timestamp,ag_type,ag_title,f_id_dest,ag_ref, ag_dest, " .
- " ag_hour,
ag_priority,ag_cal,ag_owner,ag_contact,ag_state,ag_remind_date) " .
- " values
($1,to_date($2,'DD.MM.YYYY'),$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14)";
+ " ag_hour,
ag_priority,ag_owner,ag_contact,ag_state,ag_remind_date) " .
+ " values
($1,to_date($2,'DD.MM.YYYY'),$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13)";
}
if ($this->ag_dest == 0)
{
@@ -646,11 +630,10 @@
$this->ag_dest, /* 7 */
$this->ag_hour, /* 8 */
$this->ag_priority, /* 9 */
- $ag_cal, /* 10 */
- $_SESSION['g_user'], /* 11 */
- $contact->id, /* 12 */
- $this->ag_state, /* 13 */
- $this->ag_remind_date /* 14 */
+ $_SESSION['g_user'], /* 10 */
+ $contact->id, /* 11 */
+ $this->ag_state, /* 12 */
+ $this->ag_remind_date /* 13 */
)
);
@@ -883,10 +866,6 @@
$contact->id = 0;
- if ($this->ag_cal == 'on')
- $ag_cal = 'C';
- else
- $ag_cal = 'I';
if ($this->ag_dest == 0)
{
$this->ag_dest = null;
@@ -902,10 +881,9 @@
" ag_hour = $7 ," .
" ag_priority = $8 ," .
" ag_dest = $9 , " .
- " ag_cal = $10 ," .
- " ag_contact = $11, " .
- " ag_ref = $12, " .
- "
ag_remind_date=to_date($13,'DD.MM.YYYY') " .
+ " ag_contact = $10, " .
+ " ag_ref = $11, " .
+ "
ag_remind_date=to_date($12,'DD.MM.YYYY') " .
" where ag_id = $6", array(
$this->ag_timestamp, /* 1 */
$this->ag_title, /* 2 */
@@ -916,10 +894,9 @@
$this->ag_hour, /* 7 */
$this->ag_priority, /* 8 */
$this->ag_dest, /* 9 */
- $ag_cal, /* 10 */
- $contact->id, /* 11 */
- $this->ag_ref, /* 12 */
- $this->ag_remind_date /* 13 */
+ $contact->id, /* 10*/
+ $this->ag_ref, /* 11 */
+ $this->ag_remind_date /* 12 */
));
}
else
@@ -933,9 +910,8 @@
" ag_hour = $7 ," .
" ag_priority = $8 ," .
" ag_dest = $9 , " .
- " ag_cal = $10 ," .
- " ag_contact = $11, " .
- " ag_ref = $12, " .
+ " ag_contact = $10, " .
+ " ag_ref = $11, " .
" ag_remind_date=null " .
" where ag_id = $6", array(
$this->ag_timestamp, /* 1 */
@@ -947,9 +923,8 @@
$this->ag_hour, /* 7 */
$this->ag_priority, /* 8 */
$this->ag_dest, /* 9 */
- $ag_cal, /* 10 */
- $contact->id, /* 11 */
- $this->ag_ref /* 12 */
+ $contact->id, /* 10 */
+ $this->ag_ref /* 11 */
));
}
// Upload documents
@@ -1014,7 +989,6 @@
$this->ag_hour = (isset($p_array['ag_hour'])) ?
$p_array['ag_hour'] : "";
$this->ag_dest = (isset($p_array['ag_dest'])) ?
$p_array['ag_dest'] : "";
$this->ag_priority = (isset($p_array['ag_priority'])) ?
$p_array['ag_priority'] : 2;
- $this->ag_cal = (isset($p_array['ag_cal'])) ? 'on' : "";
$this->ag_contact = (isset($p_array['ag_contact'])) ?
$p_array['ag_contact'] : "";
$this->ag_comment = (isset($p_array['ag_comment'])) ?
$p_array['ag_comment'] : "";
$this->ag_remind_date = (isset($p_array['ag_remind_date'])) ?
$p_array['ag_remind_date'] : null;
@@ -1261,7 +1235,7 @@
$query .= ' and f_id_dest=0 ';
if ( isset($all_action))
{
- $query .=" and (ag_owner='" . $_SESSION['g_user'] . "'
or ".self::sql_security_filter($cn, "R")." )";
+ $query .=" and (ag_owner='" . $_SESSION['g_user'] . "'
or ".self::sql_security_filter($cn, "R")." or ag_dest=-1 )";
}
if (isset($date_start) && isDate($date_start) != null)
{
Modified: phpcompta/trunk/include/template/detail-action.php
===================================================================
--- phpcompta/trunk/include/template/detail-action.php 2012-06-14 21:34:00 UTC
(rev 4902)
+++ phpcompta/trunk/include/template/detail-action.php 2012-06-14 21:45:35 UTC
(rev 4903)
@@ -100,15 +100,6 @@
<tr>
<TD>
- <?=_('Calendrier')?>
- </TD>
- <TD>
- <?php echo $str_ag_cal;
- ?>
- </TD>
- </tr>
- <tr>
- <TD>
<?=_('Etat')?>
</TD>
<td>
Modified: phpcompta/trunk/sql/upgrade.sql
===================================================================
--- phpcompta/trunk/sql/upgrade.sql 2012-06-14 21:34:00 UTC (rev 4902)
+++ phpcompta/trunk/sql/upgrade.sql 2012-06-14 21:45:35 UTC (rev 4903)
@@ -269,4 +269,5 @@
ALTER TABLE stock_goods ADD COLUMN r_id bigint;
update stock_goods set r_id=1;
ALTER TABLE stock_goods ADD CONSTRAINT stock_goods_sg_type CHECK (sg_type =
'c'::bpchar OR sg_type = 'd'::bpchar);
-CREATE INDEX fk_stock_good_repository_r_id ON stock_goods (r_id );
\ No newline at end of file
+CREATE INDEX fk_stock_good_repository_r_id ON stock_goods (r_id );
+alter table action_gestion drop ag_cal;
\ 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] r4903 - in phpcompta/trunk: include include/template sql,
phpcompta-dev <=