[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r240 - in trunk/coprop/include: . template
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r240 - in trunk/coprop/include: . template |
Date: |
Wed, 4 Jan 2012 16:42:40 +0100 (CET) |
Author: danydb
Date: 2012-01-04 16:42:40 +0100 (Wed, 04 Jan 2012)
New Revision: 240
Modified:
trunk/coprop/include/ajax_add_key.php
trunk/coprop/include/ajax_mod_key.php
trunk/coprop/include/class_copro_key.php
trunk/coprop/include/key.inc.php
trunk/coprop/include/template/key_detail.php
Log:
add total tantieme
Modified: trunk/coprop/include/ajax_add_key.php
===================================================================
--- trunk/coprop/include/ajax_add_key.php 2012-01-04 15:37:08 UTC (rev
239)
+++ trunk/coprop/include/ajax_add_key.php 2012-01-04 15:42:40 UTC (rev
240)
@@ -32,6 +32,10 @@
$note->style='style="border:solid blue 1px;vertical-align:text-top;" ';
$name=new IText('cr_name');
$name->size=60;
+$tantieme=new INum('cr_tantieme');
+$tantieme->javascript='onchange="format_number(this,0);"';
+$tantieme->value=0;
+
$str_message="Ajout d'une clef de répartition";
$alot=$cn->get_array("select f_id,vw_name as name,quick_code as qcode, 0 as
l_part
from vw_fiche_attr where
fd_id=$1",array($g_copro_parameter->categorie_lot));
Modified: trunk/coprop/include/ajax_mod_key.php
===================================================================
--- trunk/coprop/include/ajax_mod_key.php 2012-01-04 15:37:08 UTC (rev
239)
+++ trunk/coprop/include/ajax_mod_key.php 2012-01-04 15:42:40 UTC (rev
240)
@@ -26,7 +26,7 @@
* @brief modifie clef
*
*/
-$key=$cn->get_array("SELECT cr_name, cr_note
+$key=$cn->get_array("SELECT cr_name, cr_note,cr_tantieme
FROM coprop.clef_repartition where cr_id=$1",array($key_id));
$str_message="Modification ".h($key[0]['cr_name']);
@@ -42,6 +42,10 @@
$name->value=$key[0]['cr_name'];
$name->size=60;
+$tantieme=new INum('cr_tantieme');
+$tantieme->javascript='onchange="format_number(this,0);"';
+$tantieme->value=round($key[0]['cr_tantieme']);
+
$alot=$cn->get_array("select lot_fk as f_id,
(select ad_value from fiche_detail where f_id=lot_fk and ad_id=1) as
name,
(select ad_value from fiche_detail where f_id=lot_fk and ad_id=23) as
qcode,
Modified: trunk/coprop/include/class_copro_key.php
===================================================================
--- trunk/coprop/include/class_copro_key.php 2012-01-04 15:37:08 UTC (rev
239)
+++ trunk/coprop/include/class_copro_key.php 2012-01-04 15:42:40 UTC (rev
240)
@@ -51,8 +51,8 @@
{
$this->verify($p_array);
$cn->start();
- $this->cr_id = $cn->get_value("insert into
coprop.clef_repartition(cr_note,cr_name)
- values($1,$2) returning cr_id", array(
strip_tags($cr_note), strip_tags($cr_name)));
+ $this->cr_id = $cn->get_value("insert into
coprop.clef_repartition(cr_note,cr_name,cr_tantieme)
+ values($1,$2) returning cr_id", array(
strip_tags($cr_note), strip_tags($cr_name),$cr_tantieme));
for ($i = 0; $i < count($f_id); $i++)
{
if (${"part" . $f_id[$i]} == '')
@@ -77,9 +77,9 @@
$this->verify($p_array,false);
$cn->start();
$cn->exec_sql("update coprop.clef_repartition set
- cr_note=$1,cr_name=$2
- where cr_id=$3",
- array( strip_tags($cr_note),
strip_tags($cr_name),$this->cr_id));
+ cr_note=$1,cr_name=$2,cr_tantieme=$3
+ where cr_id=$4",
+ array( strip_tags($cr_note),
strip_tags($cr_name),$cr_tantieme,$this->cr_id));
$cn->exec_sql("delete from
coprop.clef_repartition_detail where cr_id=$1",array($this->cr_id));
for ($i = 0; $i < count($f_id); $i++)
{
Modified: trunk/coprop/include/key.inc.php
===================================================================
--- trunk/coprop/include/key.inc.php 2012-01-04 15:37:08 UTC (rev 239)
+++ trunk/coprop/include/key.inc.php 2012-01-04 15:42:40 UTC (rev 240)
@@ -45,7 +45,7 @@
}
-$sql="select cr_id,cr_name,cr_note,cr_start,cr_end from
coprop.clef_repartition ";
+$sql="select cr_id,cr_name,cr_note,cr_tantieme from coprop.clef_repartition ";
/**
* @todo ajouter tri
*/
@@ -60,6 +60,9 @@
<th>
Note
</th>
+ <th>
+ Tantième
+ </th>
<th></th>
</tr>
<?
@@ -80,6 +83,9 @@
echo HtmlInput::anchor("enlever","",$js);
?>
</td>
+ <td>
+ <?=round($a_key[$i]['cr_tantieme'])?>
+ </td>
</tr>
<?
endfor;
Modified: trunk/coprop/include/template/key_detail.php
===================================================================
--- trunk/coprop/include/template/key_detail.php 2012-01-04 15:37:08 UTC
(rev 239)
+++ trunk/coprop/include/template/key_detail.php 2012-01-04 15:42:40 UTC
(rev 240)
@@ -39,6 +39,14 @@
<td>
<?=$name->input()?>
</td>
+ </tr>
+ <tr>
+ <td>
+ Total tantième
+ </td>
+ <td>
+ <?=$tantieme->input()?>
+ </td>
</tr>
</table>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpcompta-dev] r240 - in trunk/coprop/include: . template,
phpcompta-dev <=