noalyss
Version-9
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
include
template
forecast_item_mtable-input.php
Go to the documentation of this file.
1
<?php
2
/*
3
* This file is part of NOALYSS.
4
*
5
* NOALYSS is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
9
*
10
* NOALYSS is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with NOALYSS; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
*/
19
20
// Copyright Author Dany De Bontridder danydb@noalyss.eu
21
22
/**
23
* \file
24
* \brief display, add, delete and modify forecast_item, All rows are in $a_row
25
* \see Forecast_Item_MTable::input
26
*/
27
28
$cn
=
$object
->cn;
29
$forecast
=
new
Forecast_SQL
(
$cn
, $this->get_forecast_id());
30
$forecast
->load();
31
$str_name
=
$forecast
->getp(
'f_name'
);
32
$str_start
=
$forecast
->getp(
'f_start_date'
);
33
$str_end
=
$forecast
->getp(
'f_end_date'
);
34
35
$aPeriode
=
$cn
->make_array(
"select p_id,to_char(p_start,'MM.YYYY') as label from parm_periode
36
where p_start >= (select p_start from parm_periode where p_id=$str_start)
37
and p_end <= (select p_end from parm_periode where p_id=$str_end)
38
order by p_start"
);
39
$aPeriode
[] = array(
'value'
=> 0,
'label'
=>
'Mensuel'
);
40
$category
=
new
ISelect
(
"fc_id"
);
41
$category
->value =
$cn
->make_array(
"select fc_id,fc_desc from
42
forecast_category
43
where f_id=$1 order by 2"
,
44
0, [$this->get_forecast_id()]);
45
$category
->selected =
$object
->getp(
"fc_id"
);
46
47
$amount
=
new
INum
(
"fi_amount"
);
48
$amount
->value =
$object
->getp(
"fi_amount"
);
49
$amount
->value=(
$amount
->value==
""
)?0:
$amount
->
value
;
50
51
$forecast_text
=
new
IText
(
"fi_text"
);
52
$forecast_text
->value =
$object
->getp(
"fi_text"
);
53
54
/* Accounting*/
55
$account
=
new
ITextarea
(
'fi_account'
);
56
$account
->value=
$object
->getp(
"fi_account"
);
57
$account
->id=uniqid(
"fi_account"
);
58
$account
->nb_row=3;
59
$account
->extra=
' style = "margin-left:0px;width:100%;" class="input_text"'
;
60
$account
->size=
"80rem"
;
61
62
$isPeriode
=
new
ISelect
(
'fi_pid'
);
63
$isPeriode
->value =
$aPeriode
;
64
$isPeriode
->selected =
$object
->getp(
"fi_pid"
);
65
66
$amount_initial
=
new
INum
(
"fi_amount_initial"
);
67
$amount_initial
->value=
$object
->getp(
"fi_amount_initial"
);
68
$amount_initial
->value=(
$amount_initial
->value==
''
)?0:
$amount_initial
->
value
;
69
70
?>
71
<
table
style
=
"width:50rem"
>
72
<
tr
>
73
<
td
><?=
_
(
"Categorie"
) ?></
td
>
74
<
td
><?=
$category
->input(); ?></
td
>
75
</
tr
>
76
77
<
tr
>
78
<
td
>
79
<?=
_
(
"Periode"
) ?>
80
</
td
>
81
<
td
>
82
<?=
$isPeriode
->input() ?>
83
</
td
>
84
</
tr
>
85
86
<
tr
>
87
<
td
><?=$this->show_error(
"fi_text"
)?> <?=
_
(
"Intitulé"
) ?></
td
>
88
<
td
><?=
$forecast_text
->input(); ?></
td
>
89
</
tr
>
90
91
<
tr
>
92
<
td
>
93
<?=$this->show_error(
"fi_account"
)?>
94
<?=
_
(
"Formule"
) ?>
95
( <a href=
"https://wiki.noalyss.eu/doku.php?id=tutoriaux:les_rapports#un_mot_d_explication"
target=
"_blank"
>
96
Aide</a> )
97
98
</
td
>
99
<
td
>
100
<?=
$account
->input() ?>
101
<?= HtmlInput::button_action(
_
(
"Cherche poste, fiche , analytique"
),
102
sprintf(
'search_account_card({gDossier:%s,target:\'%s\'})'
,Dossier::id(),
103
$account
->id))
104
?>
105
</
td
>
106
</
tr
>
107
<
tr
>
108
<
td
><?=
_
(
"Montant"
) ?></
td
>
109
<
td
><?=
$amount
->input(); ?></
td
>
110
</
tr
>
111
<
tr
>
112
<
td
>
113
<?=
_
(
"Montant initial"
)?>
114
</
td
>
115
<
td
>
116
<?=
$amount_initial
->input()?>
117
</
td
>
118
</
tr
>
119
120
</
table
>
tr
tr($p_string, $p_extra='')
Definition
ac_common.php:88
td
td($p_string='', $p_extra='')
surround the string with td
Definition
ac_common.php:83
value
$q value
Definition
ajax_add_concerned_card.php:59
$cn
$cn
Definition
ajax_anc_accounting.php:30
$amount
$amount
Definition
ajax_anc_key_compute.php:40
$object
catch(Exception $e) $object
Definition
ajax_mobile_device_menu.php:45
style
$opd_description style
Definition
ajax_mod_predf_op.php:52
$amount_initial
for($h=0;$h< count($aPeriode);$h++) $amount_initial
Definition
anticipation-display.php:42
_
_("actif, passif,charge,...")
Definition
balance.inc.php:195
Forecast_SQL
ORM abstract of the table public.forecast.
Definition
forecast_sql.class.php:34
INum
This class handles only the numeric input, the input will call a javascript to change comma to period...
Definition
inum.class.php:42
ISelect
Html Input , create a tag <SELECT> ... </SELECT> if readonly == true then display the label correspon...
Definition
iselect.class.php:40
IText
Html Input.
Definition
itext.class.php:30
ITextarea
Manage the TEXTAREA html element.
Definition
itextarea.class.php:31
table
$all table
Definition
company.inc.php:142
$str_end
$str_end
Definition
fiche.inc.php:57
$str_start
$str_start
Definition
fiche.inc.php:56
$aPeriode
$aPeriode
Definition
forecast_item_mtable-input.php:35
$category
$category
Definition
forecast_item_mtable-input.php:40
$account
$account
Definition
forecast_item_mtable-input.php:55
$forecast_text
$forecast_text
Definition
forecast_item_mtable-input.php:51
$isPeriode
$isPeriode
Definition
forecast_item_mtable-input.php:62
$str_name
$str_name
Definition
forecast_item_mtable-input.php:31
$forecast
$forecast
Definition
forecast_item_mtable-input.php:29
Generated on Wed Jun 25 2025 09:57:48 for noalyss by
1.13.2