[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r4618 - in phpcompta/tags/rel560_syndic: . html html/adm
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r4618 - in phpcompta/tags/rel560_syndic: . html html/admin/sql/patch include include/template |
Date: |
Sun, 18 Dec 2011 01:22:31 +0100 (CET) |
Author: danydb
Date: 2011-12-18 01:22:29 +0100 (Sun, 18 Dec 2011)
New Revision: 4618
Modified:
phpcompta/tags/rel560_syndic/html/admin/sql/patch/upgrade89.sql
phpcompta/tags/rel560_syndic/html/ajax_card.php
phpcompta/tags/rel560_syndic/html/index.php
phpcompta/tags/rel560_syndic/html/style-print.css
phpcompta/tags/rel560_syndic/include/class_acc_reconciliation.php
phpcompta/tags/rel560_syndic/include/class_html_input.php
phpcompta/tags/rel560_syndic/include/class_lettering.php
phpcompta/tags/rel560_syndic/include/template/ledger_detail_fin.php
phpcompta/tags/rel560_syndic/include/template/ledger_detail_misc.php
phpcompta/tags/rel560_syndic/release-note
Log:
----------------------------------------------------------------------
r4615 | danydb | 2011-12-16 02:56:39 +0100 (Fri, 16 Dec 2011) | 3 lines
Changed paths:
M /phpcompta/branches/rel560/include/class_acc_reconciliation.php
M /phpcompta/branches/rel560/include/class_lettering.php
>From 6.0 add auto lettering when reconciling
------------------------------------------------------------------------
r4614 | danydb | 2011-12-16 02:56:02 +0100 (Fri, 16 Dec 2011) | 3 lines
Changed paths:
M /phpcompta/branches/rel560/include/template/ledger_detail_fin.php
M /phpcompta/branches/rel560/include/template/ledger_detail_misc.php
Show j_text in detailled operation
------------------------------------------------------------------------
r4220 | danydb | 2011-10-19 21:49:33 +0200 (Wed, 19 Oct 2011) | 1 line
Changed paths:
M /phpcompta/branches/rel560/include/class_html_input.php
bug : & in interpreted as HTML entities
------------------------------------------------------------------------
r4211 | danydb | 2011-10-13 23:43:40 +0200 (Thu, 13 Oct 2011) | 1 line
Changed paths:
M /phpcompta/branches/rel560/release-note
remove release
------------------------------------------------------------------------
r4203 | danydb | 2011-09-17 00:01:19 +0200 (Sat, 17 Sep 2011) | 1 line
Changed paths:
M /phpcompta/branches/rel560/include/class_iradio.php
new fct set_checked
------------------------------------------------------------------------
r4202 | danydb | 2011-09-16 23:58:49 +0200 (Fri, 16 Sep 2011) | 1 line
Changed paths:
M /phpcompta/branches/rel560/include/class_icheckbox.php
new fct set_checked
------------------------------------------------------------------------
Modified: phpcompta/tags/rel560_syndic/html/admin/sql/patch/upgrade89.sql
===================================================================
--- phpcompta/tags/rel560_syndic/html/admin/sql/patch/upgrade89.sql
2011-12-17 23:59:32 UTC (rev 4617)
+++ phpcompta/tags/rel560_syndic/html/admin/sql/patch/upgrade89.sql
2011-12-18 00:22:29 UTC (rev 4618)
@@ -28,6 +28,7 @@
$BODY$
LANGUAGE plpgsql;
+-- insert into attr_Def values (32,'Prénom','text',22);
update attr_def set ad_text='Dépense charge du grant (partie privé) ' where
ad_id=31;
Modified: phpcompta/tags/rel560_syndic/html/ajax_card.php
===================================================================
--- phpcompta/tags/rel560_syndic/html/ajax_card.php 2011-12-17 23:59:32 UTC
(rev 4617)
+++ phpcompta/tags/rel560_syndic/html/ajax_card.php 2011-12-18 00:22:29 UTC
(rev 4618)
@@ -336,7 +336,7 @@
/* Build the SQL and show result */
$sql=$fiche->build_sql($sql_array);
- /* We limit the search to 50 records */
+ /* We limit the search to 20 records */
$sql=$sql.' order by vw_name limit 50';
$a=$cn->get_array($sql);
Modified: phpcompta/tags/rel560_syndic/html/index.php
===================================================================
--- phpcompta/tags/rel560_syndic/html/index.php 2011-12-17 23:59:32 UTC (rev
4617)
+++ phpcompta/tags/rel560_syndic/html/index.php 2011-12-18 00:22:29 UTC (rev
4618)
@@ -186,7 +186,7 @@
echo '
<span
style="background-color:#879ed4;color:white;padding-left:4px;padding-right:4px;">
-version 5.6.4201 - '.$my_domain.'
+version 5.6.SVNINFO - '.$my_domain.'
</span>
<BR>
<BR>
Modified: phpcompta/tags/rel560_syndic/html/style-print.css
===================================================================
--- phpcompta/tags/rel560_syndic/html/style-print.css 2011-12-17 23:59:32 UTC
(rev 4617)
+++ phpcompta/tags/rel560_syndic/html/style-print.css 2011-12-18 00:22:29 UTC
(rev 4618)
@@ -243,5 +243,12 @@
.num {
text-align:right;
}
+thead {
+ display:table-header-group;
+ }
+tbody {
+ display:table-row-group;
+ }
+
/* </style> */
Modified: phpcompta/tags/rel560_syndic/include/class_acc_reconciliation.php
===================================================================
--- phpcompta/tags/rel560_syndic/include/class_acc_reconciliation.php
2011-12-17 23:59:32 UTC (rev 4617)
+++ phpcompta/tags/rel560_syndic/include/class_acc_reconciliation.php
2011-12-18 00:22:29 UTC (rev 4618)
@@ -23,11 +23,12 @@
/*!\file
* \brief class acc_reconciliation, this class is new and the code
* must use it
- *
+ *
*/
require_once("class_iconcerned.php");
require_once ('class_database.php');
require_once ('class_dossier.php');
+require_once 'class_lettering.php';
/*! \brief new class for managing the reconciliation it must be used
* instead of the function InsertRapt, ...
@@ -60,7 +61,7 @@
}
/*!
*\brief Insert into jrn_rapt the concerned operations
- *
+ *
* \param $jr_id2 (jrn.jr_id) => jrn_rapt.jra_concerned or a string
* like "jr_id2,jr_id3,jr_id4..."
*
@@ -90,9 +91,9 @@
}
/*!
- *\brief Insert into jrn_rapt the concerned operations
+ *\brief Insert into jrn_rapt the concerned operations
* should not be called directly, use insert instead
- *
+ *
* \param $jr_id2 (jrn.jr_id) => jrn_rapt.jra_concerned
*
* \return none
@@ -112,22 +113,61 @@
"select jra_id from jrn_rapt where
jra_concerned=".$this->jr_id.
" and jr_id=$jr_id2
union
- select jra_id from jrn_rapt where jra_id=".$this->jr_id.
+ select jra_id from jrn_rapt where jr_id=".$this->jr_id.
" and jra_concerned=$jr_id2 ")
==0)
{
// Ok we can insert
$Res=$this->db->exec_sql("insert into
jrn_rapt(jr_id,jra_concerned) values ".
- "(".$this->jr_id.",$jr_id2)");
+ "(".$this->jr_id.",$jr_id2)");
+ // try to letter automatically same account from both
operation
+ $this->auto_letter($jr_id2);
}
return true;
}
- /*!
+ /**
+ * @brief try to letter same card between $p_jrid and $this->jr_id
+ * @param jrn.jr_id $p_jrid the operation to reconcile
+ */
+ function auto_letter($p_jrid)
+ {
+ // Try to find same card from both operation
+ $sql="select j1.f_id as fiche ,coalesce(j1.j_id,-1) as
jrnx_id1,coalesce(j2.j_id,-1) as jrnx_id2,
+j1.j_poste as poste
+ from jrnx as j1
+ join jrn as jr1 on
(j1.j_grpt=jr1.jr_grpt_id)
+ join jrnx as j2 on
(coalesce(j1.f_id,-1)=coalesce(j2.f_id,-1) and j1.j_poste=j2.j_poste)
+ join jrn as jr2 on
(j2.j_grpt=jr2.jr_grpt_id)
+ where
+ jr1.jr_id=$1
+ and
+ jr2.jr_id= $2";
+ $result=$this->db->get_array($sql,array($this->jr_id,$p_jrid));
+ if ( count($result) == 0)
+ {
+ return;
+ }
+ for ($i=0;$i<count($result);$i++)
+ {
+ if ( $result[$i]['fiche'] != -1)
+ {
+ $letter = new Lettering_Card($this->db);
+
$letter->insert_couple($result[$i]['jrnx_id1'],$result[$i]['jrnx_id2']);
+ }
+ else
+ {
+ $letter = new Lettering_Account($this->db);
+
$letter->insert_couple($result[$i]['jrnx_id1'],$result[$i]['jrnx_id2']);
+ }
+ }
+ }
+
+ /*!
*\brief Insert into jrn_rapt the concerned operations
- *
+ *
* \param $this->jr_id (jrn.jr_id) => jrn_rapt.jr_id
* \param $jr_id2 (jrn.jr_id) => jrn_rapt.jra_concerned
- *
+ *
* \return none
*/
function remove($jr_id2)
@@ -144,8 +184,29 @@
select jra_id from jrn_rapt where
jra_concerned=$jr_id2 ".
" and jr_id=".$this->jr_id) !=0)
{
- // Ok we can delete
- $Res=$this->db->exec_sql("delete from jrn_rapt where ".
+ /**
+ * remove also lettering between both operation
+ */
+ $sql = " delete from
+ jnt_letter
+ where jl_id in ( select jl_id from
jnt_letter
+
join letter_cred as lc using(jl_id)
+
join letter_deb as ld using (jl_id)
+ where
+
lc.j_id in (select j_id
+
from jrnx join jrn on (j_grpt=jr_grpt_id)
+
where jr_id in ($1,$2))
+
or
+
ld.j_id in (select j_id
+
from jrnx join jrn on (j_grpt=jr_grpt_id)
+
where jr_id in ($1,$2))
+
+
+
+ )";
+ $this->db->exec_sql($sql, array($jr_id2, $this->jr_id));
+ // Ok we can delete
+ $Res=$this->db->exec_sql("delete from jrn_rapt where ".
"(jra_concerned=$jr_id2 and
jr_id=".$this->jr_id.") or
(jra_concerned=".$this->jr_id." and
jr_id=$jr_id2) ");
}
@@ -153,8 +214,8 @@
/*!
*\brief Return an array of the concerned operation
- *
- *
+ *
+ *
*\param database connection
* \return array if something is found or null
*/
@@ -188,7 +249,7 @@
}
/**
address@hidden return array of not-reconciled operation
-
+
*/
function get_not_reconciled()
{
@@ -207,7 +268,7 @@
return $ret;
}
/**
- *Create a sql condition to filter by security and by asked ledger
+ *Create a sql condition to filter by security and by asked ledger
* based on $this->a_jrn
address@hidden a valid sql stmt to include
address@hidden get_not_reconciled get_reconciled
@@ -309,7 +370,7 @@
$user=new User($this->db);
list($start,$end)=$user->get_limit_current_exercice();
- if (isDate($this->start_day) ==null)
+ if (isDate($this->start_day) ==null)
{
$this->start_day=$start;
}
Modified: phpcompta/tags/rel560_syndic/include/class_html_input.php
===================================================================
--- phpcompta/tags/rel560_syndic/include/class_html_input.php 2011-12-17
23:59:32 UTC (rev 4617)
+++ phpcompta/tags/rel560_syndic/include/class_html_input.php 2011-12-18
00:22:29 UTC (rev 4618)
@@ -127,8 +127,8 @@
/**
* Make a JSON object, this method create a javascript object
* with the attribute set, it returns a javascript string with the object
- * @param $p_name : name of the object, can be null. If the name is not
null, return
- * $p_name={} otherwise only the object {}
+ * @param $p_name : name of the object, can be null. If the name is not
null, return
+ * $p_name={} otherwise only the object {}
* @return javascript string with the object
* @note: there is not check on the key->value, so you could need to escape
* special char as quote, single-quote...
@@ -201,7 +201,7 @@
/*!\brief create a button with a ref
*\param $p_label the text
- *\param $p_value the location of the window,
+ *\param $p_value the location of the window,
*\param $p_name the id of the span
*\param $p_javascript javascript for this button
*\return string with htmlcode
@@ -286,7 +286,7 @@
/**
* return the html code to create an hidden div and a button
* to show this DIV. This contains all the available ledgers
- * for the user in READ or RW
+ * for the user in READ or RW
address@hidden $p_array is an array obtains thanks User::get_ledger
address@hidden $selected is an array of checkbox
address@hidden the choosen ledger are stored in the array r_jrn (_GET)
@@ -376,7 +376,7 @@
return $r;
}
/**
- *close button for the HTML popup
+ *close button for the HTML popup
address@hidden add_div modify_operation
address@hidden $div_name is the name of the div to remove
*/
@@ -418,7 +418,7 @@
/**
* Return a html string with an anchor looking like anchor_button in the
right corner
address@hidden $action action action to perform (message)
- address@hidden $javascript javascript
+ address@hidden $javascript javascript
address@hidden not protected against html
address@hidden Acc_Ledger::display_search_form
*/
@@ -453,8 +453,8 @@
}
/**
*transform request data to hidden
- address@hidden $array is an of indices
- address@hidden $request name of the superglobal $_POST $_GET
$_REQUEST(default)
+ address@hidden $array is an of indices
+ address@hidden $request name of the superglobal $_POST $_GET
$_REQUEST(default)
address@hidden html string with the hidden data
*/
static function array_to_hidden($array,$global_array )
@@ -467,12 +467,12 @@
{
if (isset($global_array [$a])) $r.=HtmlInput::hidden($a,$global_array
[$a]);
}
-
+
return $r;
}
/**
*transform $_GET data to hidden
- address@hidden $array is an of indices
+ address@hidden $array is an of indices
address@hidden HtmlInput::request_to_hidden
address@hidden html string with the hidden data
*/
@@ -484,7 +484,7 @@
/**
*transform $_POST data to hidden
- address@hidden $array is an of indices
+ address@hidden $array is an of indices
address@hidden HtmlInput::request_to_hidden
address@hidden html string with the hidden data
*/
@@ -496,7 +496,7 @@
/**
*transform $_REQUEST data to hidden
- address@hidden $array is an of indices
+ address@hidden $array is an of indices
address@hidden HtmlInput::request_to_hidden
address@hidden html string with the hidden data
*/
@@ -508,8 +508,8 @@
/**
*transform request data to string
- address@hidden $array is an of indices
- address@hidden $request name of the superglobal $_POST $_GET
$_REQUEST(default)
+ address@hidden $array is an of indices
+ address@hidden $request name of the superglobal $_POST $_GET
$_REQUEST(default)
address@hidden html string with the string data
*/
static function array_to_string($array,$global_array )
@@ -518,12 +518,11 @@
$r="?";
if ( count($global_array )==0) return '';
- $and="";
+ $and="";
foreach ($array as $a)
{
- if (isset($global_array [$a])){
+ if (isset($global_array [$a]))
$r.=$and."$a=".$global_array [$a];
- }
$and="&";
}
@@ -531,7 +530,7 @@
}
/**
*transform $_GET data to string
- address@hidden $array is an of indices
+ address@hidden $array is an of indices
address@hidden HtmlInput::request_to_string
address@hidden html string with the string data
*/
@@ -543,7 +542,7 @@
/**
*transform $_POST data to string
- address@hidden $array is an of indices
+ address@hidden $array is an of indices
address@hidden HtmlInput::request_to_string
address@hidden html string with the string data
*/
@@ -555,7 +554,7 @@
/**
*transform $_REQUEST data to string
- address@hidden $array is an of indices
+ address@hidden $array is an of indices
address@hidden HtmlInput::request_to_string
address@hidden html string with the string data
*/
@@ -566,7 +565,7 @@
}
/**
- * generate an unique id for a widget,
+ * generate an unique id for a widget,
address@hidden $p_prefix prefix
address@hidden HtmlInput::IDate
address@hidden string with a unique id
@@ -579,7 +578,7 @@
/**
* return default if the value if the array doesn't exist
address@hidden $ind the index to check
- address@hidden $default the value to return
+ address@hidden $default the value to return
address@hidden $array the array
*/
static function default_value($ind,$default,$array)
Modified: phpcompta/tags/rel560_syndic/include/class_lettering.php
===================================================================
--- phpcompta/tags/rel560_syndic/include/class_lettering.php 2011-12-17
23:59:32 UTC (rev 4617)
+++ phpcompta/tags/rel560_syndic/include/class_lettering.php 2011-12-18
00:22:29 UTC (rev 4618)
@@ -28,11 +28,11 @@
/**
address@hidden mother class for the lettering by account and by card
* use the tables jnt_letter, letter_deb and letter_cred
- * - "account"=>"account", => the accounting of the j_id (use by
Lettering_Account)
- * - "quick_code"=>"quick_code", => the quick_code of the j_id (used by
Lettering_Card)
- * - "start"=>"start", => date of the first day
- * - "end"=>"end", => date of the last day
- * - "sql_ledger"=>"sql_ledger" => the sql clause to filter on the available
ledgers
+ * - "account"=>"account", => the accounting of the j_id (use by
Lettering_Account)
+ * - "quick_code"=>"quick_code", => the quick_code of the j_id (used by
Lettering_Card)
+ * - "start"=>"start", => date of the first day
+ * - "end"=>"end", => date of the last day
+ * - "sql_ledger"=>"sql_ledger" => the sql clause to filter on the available
ledgers
*/
class Lettering
{
@@ -83,38 +83,102 @@
/**
*Use to just insert a couple of lettered operation
*/
- function insert_couple($j_id1,$j_id2)
- {
- $jl_id=$this->db->get_next_seq("jnt_letter_jl_id_seq");
- $this->db->exec_sql('insert into jnt_letter(jl_id) values($1)',
- array($jl_id));
- /* take needed data */
- $first=$this->db->get_value('select j_debit from jrnx where
j_id=$1',array($j_id1));
- if ( $this->db->count() == 0 ) throw new Exception ('Opération non
existante');
+ function insert_couple($j_id1, $j_id2)
+ {
+ /* take needed data */
+ $first = $this->db->get_value('select j_debit from jrnx where
j_id=$1', array($j_id1));
+ if ($this->db->count() == 0)
+ throw new Exception('Opération non existante');
- $second=$this->db->get_value('select j_debit from jrnx where
j_id=$1',array($j_id2));
- if ( $this->db->count() == 0 ) throw new Exception ('Opération non
existante');
- /* insert */
- if ( $first == 't')
- {
- // save into letter_deb
- $ld_id=$this->db->get_value('insert into letter_deb(j_id,jl_id)
values($1,$2) returning ld_id',array($j_id1,$jl_id));
- }
- else
- {
- $lc_id=$this->db->get_value('insert into letter_cred(j_id,jl_id)
values($1,$2) returning lc_id',array($j_id1,$jl_id));
- }
- if ( $second == 't')
- {
- // save into letter_deb
- $ld_id=$this->db->get_value('insert into letter_deb(j_id,jl_id)
values($1,$2) returning ld_id',array($j_id2,$jl_id));
- }
- else
- {
- $lc_id=$this->db->get_value('insert into letter_cred(j_id,jl_id)
values($1,$2) returning lc_id',array($j_id2,$jl_id));
- }
+ $second = $this->db->get_value('select j_debit from jrnx where
j_id=$1', array($j_id2));
+ if ($this->db->count() == 0)
+ throw new Exception('Opération non existante');
+ $sql_already = "select distinct(jl_id)
+ from jnt_letter
+ left outer join letter_deb using (jl_id)
+ left outer join letter_cred using (jl_id)
+ where
+ letter_deb.j_id = $1 or letter_cred.j_id=$1";
+ $let1 = 0;
+ $let2 = 0;
+ $already = $this->db->get_array($sql_already, array($j_id1));
+ if (count($already) > 0)
+ {
+ if (count($already) == 1)
+ {
+ // retrieve the letter
+ $let1 = $this->db->get_value("select
distinct(jl_id)
+
from jnt_letter
+
left outer join letter_deb using (jl_id)
+
left outer join letter_cred using (jl_id)
+
where
+
letter_deb.j_id = $1 or letter_cred.j_id=$1", array($j_id1));
+ }
+ else
+ {
+ return;
+ }
+ }
- }
+ $already = $this->db->get_array($sql_already, array($j_id2));
+ if (count($already) > 0)
+ {
+ if (count($already) == 1)
+ {
+ // retrieve the letter
+ $let2 = $this->db->get_value("select
distinct(jl_id)
+
from jnt_letter
+
left outer join letter_deb using (jl_id)
+
left outer join letter_cred using (jl_id)
+
where
+
letter_deb.j_id = $1 or letter_cred.j_id=$1", array($j_id2));
+ }
+ else
+ {
+ return;
+ }
+ }
+ $jl_id = 0;
+ // already linked together
+ if ($let1 != 0 && $let1 == $let2)
+ return;
+
+ // already linked
+ if ($let1 != 0 && $let2 != 0 && $let1 != $let2)
+ return;
+
+ // none is linked
+ if ($let1 == 0 && $let2 == 0)
+ {
+ $jl_id =
$this->db->get_next_seq("jnt_letter_jl_id_seq");
+ $this->db->exec_sql('insert into jnt_letter(jl_id)
values($1)', array($jl_id));
+ }
+ // one is linked but not the other
+ if ($let1 == 0 && $let2 != 0)
+ $jl_id = $let2;
+ if ($let1 != 0 && $let2 == 0)
+ $jl_id = $let1;
+
+ /* insert */
+ if ($first == 't')
+ {
+ // save into letter_deb
+ $ld_id = $this->db->get_value('insert into
letter_deb(j_id,jl_id) values($1,$2) returning ld_id', array($j_id1, $jl_id));
+ }
+ else
+ {
+ $lc_id = $this->db->get_value('insert into
letter_cred(j_id,jl_id) values($1,$2) returning lc_id', array($j_id1, $jl_id));
+ }
+ if ($second == 't')
+ {
+ // save into letter_deb
+ $ld_id = $this->db->get_value('insert into
letter_deb(j_id,jl_id) values($1,$2) returning ld_id', array($j_id2, $jl_id));
+ }
+ else
+ {
+ $lc_id = $this->db->get_value('insert into
letter_cred(j_id,jl_id) values($1,$2) returning lc_id', array($j_id2, $jl_id));
+ }
+ }
public function get_info()
{
return var_export(self::$variable,true);
@@ -128,7 +192,7 @@
address@hidden $p_array
@code
'gDossier' => string '13' (length=2)
- 'letter_j_id' =>
+ 'letter_j_id' =>
array
0 => string '5' (length=1)
1 => string '23' (length=2)
@@ -229,7 +293,7 @@
return $r;
}
/**
- *show only the lettered records from jrnx
+ *show only the lettered records from jrnx
*it fills the array $this->content
*/
protected function show_lettered()
@@ -243,7 +307,7 @@
return $r;
}
/**
- *show only the not lettered records from jrnx
+ *show only the not lettered records from jrnx
*it fills the array $this->content
*/
protected function show_not_lettered()
Modified: phpcompta/tags/rel560_syndic/include/template/ledger_detail_fin.php
===================================================================
--- phpcompta/tags/rel560_syndic/include/template/ledger_detail_fin.php
2011-12-17 23:59:32 UTC (rev 4617)
+++ phpcompta/tags/rel560_syndic/include/template/ledger_detail_fin.php
2011-12-18 00:22:29 UTC (rev 4618)
@@ -19,7 +19,7 @@
$date=new IDate('p_date');
$date->value=format_date($obj->det->jr_date);
echo td('Date').td($date->input());
-
+
?>
</tr>
@@ -35,7 +35,7 @@
</tr>
<tr>
<?
-
+
$bk=new Fiche($cn,$obj->det->array[0]['qf_other']);
$view_history= sprintf('<A class="detail"
HREF="javascript:view_history_card(\'%s\',\'%s\')" >%s</A>',
$bk->id, $gDossier, $bk->get_quick_code());
@@ -45,7 +45,7 @@
</tr>
<tr>
-<?
+<?
$itext=new IText('lib');
$itext->value=$obj->det->jr_comment;
$itext->size=40;
@@ -58,7 +58,7 @@
<? echo td('montant').td($obj->det->array[0]['qf_amount'],' class="inum"');?>
</tr>
<tr>
-<?
+<?
$itext=new IText('npj');
$itext->value=$obj->det->jr_pj_number;
echo td(_('Pièce')).td($itext->input());
@@ -93,7 +93,7 @@
<fieldset>
<legend>
<?=_('Détail')?>
-<?
+<?
$detail=new Acc_Misc($cn,$obj->jr_id);
$detail->get();
?>
@@ -132,8 +132,11 @@
else
$view_history='';
$row.=td($view_history);
- if ( $q[$e]['j_qcode'] !='') {
- // nom de la fiche
+ if ( $q[$e]['j_text']!='')
+ {
+ $row.=td(h($q[$e]['j_text']));
+ }else if ( $q[$e]['j_qcode'] !='') {
+ // nom de la fiche
$ff=new Fiche($cn);
$ff->get_by_qcode( $q[$e]['j_qcode']);
$row.=td($ff->strAttribut(h(ATTR_DEF_NAME)));
@@ -149,13 +152,13 @@
if ( $owner->MY_ANALYTIC != "nu" && $div == 'popup')
{
$poste=$fiche->strAttribut(ATTR_DEF_ACCOUNT);
- if ( preg_match('/^(6|7)/',$q[$e]['j_poste']))
+ if ( preg_match('/^(6|7)/',$q[$e]['j_poste']))
{
$anc_op=new Anc_Operation($cn);
$anc_op->j_id=$q[$e]['j_id'];
$row.= HtmlInput::hidden('op[]',$anc_op->j_id);
$row.=$anc_op->display_table(1,$q[$e]['j_montant'],$div);
-
+
} else {
$row.=td('');
}
Modified: phpcompta/tags/rel560_syndic/include/template/ledger_detail_misc.php
===================================================================
--- phpcompta/tags/rel560_syndic/include/template/ledger_detail_misc.php
2011-12-17 23:59:32 UTC (rev 4617)
+++ phpcompta/tags/rel560_syndic/include/template/ledger_detail_misc.php
2011-12-18 00:22:29 UTC (rev 4618)
@@ -1,11 +1,11 @@
-<?
-require_once('template/ledger_detail_top.php');
+<?
+require_once('template/ledger_detail_top.php');
require_once('class_anc_operation.php');
require_once('class_anc_plan.php');
?>
-<?
-require_once('class_own.php');
+<?
+require_once('class_own.php');
require_once ('class_anc_plan.php');
?>
<div class="content" style="padding:0">
@@ -22,31 +22,31 @@
$date=new
IDate('p_date');
$date->value=format_date($obj->det->jr_date);
echo
td('Date').td($date->input());
-
+
?>
</td>
</tr>
-
+
<tr><td>
- <?
+ <?
$itext=new
IText('lib');
$itext->value=$obj->det->jr_comment;
$itext->size=40;
echo
td(_('Libellé')).td($itext->input());
-
-
+
+
?>
</td></tr>
<tr><td>
<? echo
td('montant').td(nbm($obj->det->jr_montant),' class="inum"');?>
</td></tr>
<tr><td>
- <?
+ <?
$itext=new
IText('npj');
$itext->value=$obj->det->jr_pj_number;
echo
td(_('Pièce')).td($itext->input());
?>
-
+
</td></tr>
</table>
</td><td>
@@ -64,7 +64,7 @@
$inote->value=$obj->det->note;
echo $inote->input();
?>
-
+
</td>
</tr>
</table>
@@ -98,7 +98,7 @@
/* add hidden variables pa[] to hold the value of pa_id */
echo Anc_Plan::hidden($a_anc);
}
-echo '</tr>';
+echo '</tr>';
for ($e=0;$e<count($obj->det->array);$e++) {
$row=''; $q=$obj->det->array;
$view_history= sprintf('<A class="detail"
style="text-decoration:underline"
HREF="javascript:view_history_account(\'%s\',\'%s\')" >%s</A>',
@@ -114,9 +114,12 @@
else
$view_history='';
$row.=td($view_history);
-
+ if ( $q[$e]['j_text']!='')
+ {
+ $row.=td(h($q[$e]['j_text']));
+ }else
if ( $q[$e]['j_qcode'] !='') {
- // nom de la fiche
+ // nom de la fiche
$ff=new Fiche($cn);
$ff->get_by_qcode( $q[$e]['j_qcode']);
$row.=td(h($ff->strAttribut(ATTR_DEF_NAME)));
@@ -131,13 +134,13 @@
/* Analytic accountancy */
if ( $owner->MY_ANALYTIC != "nu" && $div=='popup'){
if ( preg_match('/^(6|7)/',$q[$e]['j_poste'])) {
-
+
$anc_op=new Anc_Operation($cn);
$anc_op->j_id=$q[$e]['j_id'];
echo HtmlInput::hidden('op[]',$anc_op->j_id);
$row.=$anc_op->display_table(1,$q[$e]['j_montant'],$div);
-
+
} else {
$row.=td('');
}
Modified: phpcompta/tags/rel560_syndic/release-note
===================================================================
--- phpcompta/tags/rel560_syndic/release-note 2011-12-17 23:59:32 UTC (rev
4617)
+++ phpcompta/tags/rel560_syndic/release-note 2011-12-18 00:22:29 UTC (rev
4618)
@@ -1,40 +1 @@
-1. Ajout balance par catégorie de fiche
-2. DONE3. changer le code pour ajouter de la CA ou la modifier dans un DIV
HTML, le fichier jrn.php devient inutile (deprecated)
-3. DONE16 Détail opération dans DIV HTML
-4. Dans les détails d'opérations, on a aussi des liens vers les historiques
par fiche ou par poste comptable
-5. Depuis les impressions -> balances et impression -> poste, on a les détails
des opérations
- TODO15 Ajoutez les détails pour l'impression en PDF pour impression poste /
fiche
-6. TODO5 bug IE : les DIV HTML n'ont pas la bonne taille
-7. DONE4 Ajout d'un lien sur les postes et client pour accèder avec un DIV
contenant l'historique (au moins une partie / présentation par slice)/ bouton
suivant-précédent )
-8. TODO18 Acc_Account_Ledger::HtmlTable et Fiche::HtmlTable, il manque la
sécurité pour filtrer les journaux
-9. Ajout d'une FK TODO1 réecriture de quant_* la liaison avec la jrn se fait
à travers jr_id et non pas jr_internal qui n'est pas indexé.
-Conséquence : réécriture de code, correction modop, ...
-10. TODO2 Object pour extourner proprement une operation, le fichier
annulation.php devient inutile (deprecated) depend de TODO1 TODO10
-11. TODO17 extourne depuis DIV HTML dépend de TODO16
-12. TODO10 Enlever le bouton enlever dans les listes d'opération et le mettre
dans le DIV HTML qui présente les détails de l'op
-13. Pour les balances, on peut choisir les journaux : adapté à ceux en ayant
vraiment beaucoup
-14. Depuis les lettrages, on peut aussi accèder aux détails d'une opération
-15. TODO9 - dépend de TODO4 TODO2 - dans impressions, on peut avoir les
détails de toutes les opérations
-16. TODO19 Le menu Grand Livre devient recherche
-17. TODO20 Ajouter d'attribut avec type : text, nombre ou date; ajouter le
javascript équivalent pour la saisie, le numéro de séquence
-commence à 10000, afin de ne pas mélanger les attributs que je créé avec ceux
des utilisateurs. A ajouter dans la doc comme exemple pour la gestion d'abonnés
dont on peut tirer un CSV par impression -> catégorie -> résume
-18. Impression - Rapprochement
-19. TODO21 Dans DIV HTML donner le code de la TVA dans les détails VEN et ACH
-20. TODO20 DIV HTML dans le tableau de bord
-21. TODO14 confirmation quand effacement d'un PA (comptabilité analytique ->
Plan Analytique)
-22. TODO19 Pour les fiches,suivant le type d'attributs, on peut utiliser le
javascript pour les dates
-23. On peut ajouter aux modèles de fiches, des détails qui sont soit du texte
soit des nombres soit une date, soit une zone. La longueur peut-être définie
mais limitée à 22 caractères, sauf les dates et les zones dont les tailles sont
fixes
-24. TODO27 : Déplacement de fiche : les attributs manquant sont ajoutés !
-25 TODO24 : Dans impression -> poste , il faut avoir l'impression des détails
des opérations
-26. TODO28 : dans jrnx ajouter les f_id, le qcode n'est là que pour
accèlèrer; constraint fk on update cascade on delete restrict
-27. TODO25 : dans recherche de liste, utilisez des tableaux !
-28. Dans les balances, on peut choisir plusieurs journaux ou plusieurs cat. de
journal. Les données sont filtrées en plus d'après la sécurité
-29. Dans impression -> poste, on peut filtrer les opérations suivant qu'elles
sont lettrées ou non.
-30. Après avoir sauvé une opération, vous pouvez avoir le détail de
l'opération en cliquant sur le numéro interne qui s'affiche
-31. Les journaux FIN doivent être attachés à un compte en banque et uniquement
un A propos du mode de paiement : on ne change rien mais il faut que dans la
doc, il est précisé qu'il faut paramètrer le mdp comme le journal FIN
-32. Rapprochement doivent avoir les journaux + sécurité
-33. ajout bouton "ajoutez ligne" pour les OD en CA
-34. ajout bouton "ajoutez ligne" pour les prévisions
-35. Ajout l'impression pour les lettrages par poste comptables
-36. Les historiques des fiches et postes comptables (impression->poste) ont un
solde progressif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpcompta-dev] r4618 - in phpcompta/tags/rel560_syndic: . html html/admin/sql/patch include include/template,
phpcompta-dev <=