[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r281 - in trunk/coprop: . include include/template
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r281 - in trunk/coprop: . include include/template |
Date: |
Thu, 12 Jan 2012 11:56:54 +0100 (CET) |
Author: danydb
Date: 2012-01-12 11:56:54 +0100 (Thu, 12 Jan 2012)
New Revision: 281
Modified:
trunk/coprop/coprop-javascript.js
trunk/coprop/include/appel_fond.inc.php
trunk/coprop/include/template/appel_fond.php
Log:
Appel de fond : ?\195?\169cran
Modified: trunk/coprop/coprop-javascript.js
===================================================================
--- trunk/coprop/coprop-javascript.js 2012-01-12 10:43:13 UTC (rev 280)
+++ trunk/coprop/coprop-javascript.js 2012-01-12 10:56:54 UTC (rev 281)
@@ -381,4 +381,35 @@
{
alert(e.message);
}
+}
+
+function appel_fond_show()
+{
+ try
+ {
+ var aft=$('aft');
+ var choice=aft.options[aft.selectedIndex].value;
+ if ( choice == -1 )
+ {
+ $('appel_fond_budget').hide();
+ $('appel_fond_amount').hide();
+ return;
+ }
+ if ( choice == 1 )
+ {
+ $('appel_fond_budget').show();
+ $('appel_fond_amount').hide();
+ return;
+ }
+ if ( choice == 2 )
+ {
+ $('appel_fond_budget').hide();
+ $('appel_fond_amount').show();
+ return;
+ }
+ } catch(e)
+ {
+ alert(e.message);
+ }
+
}
\ No newline at end of file
Modified: trunk/coprop/include/appel_fond.inc.php
===================================================================
--- trunk/coprop/include/appel_fond.inc.php 2012-01-12 10:43:13 UTC (rev
280)
+++ trunk/coprop/include/appel_fond.inc.php 2012-01-12 10:56:54 UTC (rev
281)
@@ -83,7 +83,25 @@
$filter = $g_copro_parameter->categorie_appel;
$f_add_button->javascript = "
this.filter='$filter';this.jrn=-1;select_card_type(this);";
$str_add_appel = $f_add_button->input();
-
+
+ // Budget
+ $budget_sel=new ISelect("b_id");
+ $budget_sel->value=$cn->make_arrak("select b_id,b_name from coprop.budget
order by b_name");
+
+ // pourcentage
+ $budget_pct=new INum("bud_pct",0);
+
+ // select between budget or amount
+ $appel_fond_type=new ISelect("aft");
+ $appel_fond_type->value=array(
+ array("value"=>-1,'Faites votre choix'),
+ array("value"=>1,'appel de fond d\'budget'),
+ array("value"=>2,'Appel de fond par montant')
+ );
+ $onchange=" onchange=\"appel_fond_show() \"";
+ $appel_fond_type->javascript=$onchange;
+
+
require_once 'template/appel_fond.php';
}
?>
Modified: trunk/coprop/include/template/appel_fond.php
===================================================================
--- trunk/coprop/include/template/appel_fond.php 2012-01-12 10:43:13 UTC
(rev 280)
+++ trunk/coprop/include/template/appel_fond.php 2012-01-12 10:56:54 UTC
(rev 281)
@@ -1,5 +1,4 @@
<?php
-
/*
* This file is part of PhpCompta.
*
@@ -50,6 +49,27 @@
<?=$date->input()?>
</td>
</tr>
+</table>
+appel de fond par <?=$appel_fond_type->input()?>
+<table id="appel_fond_budget">
+ <tr >
+
+ <td>
+ Budget à utiliser
+ </td>
+ <td>
+ <?=$budget_sel->input()?>
+ </td>
+
+ <td>
+ Pourcentage du budget
+ </td>
+ <td>
+ <?=$budget_pct->input()?>
+ </td>
+ </tr>
+</table>
+<table id="appel_fond_amount">
<tr>
<td>
@@ -58,8 +78,6 @@
<td>
<?=$amount->input()?>
</td>
- </tr>
- <tr>
<td>
Clef de répartiton à utiliser
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpcompta-dev] r281 - in trunk/coprop: . include include/template,
phpcompta-dev <=