noalyss Version-9
forecast-new.php
Go to the documentation of this file.
1<?php
2/*
3 * This file is part of NOALYSS.
4 *
5 * PhpCompta 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 * PhpCompta 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 PhpCompta; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19// Copyright (2002-2020) Author Dany De Bontridder <danydb@noalyss.eu>
20
21if (!defined('ALLOWED'))
22 die('Appel direct ne sont pas permis');
23
24/**
25 * @file
26 * @brief form to enter a new Forecast
27 */
29global $g_user;
30$exercice=$g_user->get_exercice();
32list($per_max, $per_min)=$t_periode->get_limit($exercice);
33
34
35$fc_name=new IText("f_name");
36$fc_name->id="fc_name";
37$is_start=new ISelect("p_start");
38$is_start->value=$cn->make_array("select p_id,p_start from parm_periode order by p_start");
39$is_start->selected=$per_max->p_id;
40$is_end=new ISelect("p_end");
41$is_end->selected=$per_min->p_id;
42$is_end->value=$cn->make_array("select p_id,p_end from parm_periode order by p_end");
43?>
44<div id="forecast_new_div" class="inner_box" style="display: none;width:30rem;">
45
46 <?= HtmlInput::title_box(_("Nouvelle prévision"), "forecast_new_div", "hide") ?>
47 <form method="POST" style="padding:0px">
48 <?php
49 echo HtmlInput::hidden("sa", "new");
50 echo HtmlInput::array_to_hidden(['f_id', 'ac', 'gDossier'], $_REQUEST);
51 ?>
52
53 <div class="form-group row">
54 <div class="col">
55
56 <label for="fc_name" class="form-group"><?= _("Nom") ?></label>
57 </div>
58 <div class="col">
59 <input type="text" class="input_text" name="f_name" placeholder="<?= _("Nom") ?>">
60 </div>
61
62 </div>
63
64 <div class="form-group row">
65 <div class="col">
66
67 <label for="p_start" class="form-group"><?= _("Début") ?></label>
68 </div>
69 <div class="col">
70
71 <?= $is_start->input(); ?>
72
73 </div>
74 </div>
75
76 <div class="form-group row">
77 <div class="col">
78
79 <label for="p_end" class="form-group"><?= _("Fin") ?></label>
80 </div>
81 <div class="col">
82
83 <?= $is_end->input() ?>
84 </div>
85 </div>
86 <input type="submit" class="smallbutton" value="<?= _("Sauver") ?>">
87 <?= HtmlInput::button_hide("forecast_new_div") ?>
88
89 </form>
90</div>
$ret label
$opd_description style
$_REQUEST['ac']
$from_poste name
$input_from type
Definition: balance.inc.php:65
static connect()
static button_hide($div_name)
Hide the HTML popup.
static hidden($p_name, $p_value, $p_id="")
static title_box($p_name, $p_div, $p_mod="close", $p_js="", $p_draggable="n", $p_enlarge='n')
Title for boxes, you can customize the symbol thanks symbol with the mode "custom".
static array_to_hidden($array, $global_array)
transform request data to hidden
Html Input , create a tag <SELECT> ... </SELECT> if readonly == true then display the label correspon...
Html Input.
Definition: itext.class.php:30
For the periode tables parm_periode and jrn_periode.
$anc_filter placeholder
$cn
global $g_user
$is_start value
$t_periode
$fc_name
$is_end
$exercice
$is_start