noalyss Version-9
operation_exercice-input_row.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// Copyright Author Dany De Bontridder danydb@aevalys.eu 7/01/24
20/*!
21 * \file
22 * \brief input data for one row of OPERATION_EXERCICE_DETAIL, inherited data $operation_detail_sql
23 *
24 * \see Operation_Exercice::input_row
25 */
27
28$data = $operation_detail_sql->to_array();
29
30if (DEBUGNOALYSS > 1) echo \Noalyss\Dbg::hidden_info("data", $data);
31
32$poste = new \IPoste("oe_poste");
33$poste->value = $data['oed_poste'];
34$poste->id = 'oe_poste';
35$poste->set_attribute('gDossier', Dossier::id());
36$poste->set_attribute('jrn', 0);
37$poste->set_attribute('account', 'oe_poste');
38$label_id= uniqid('label');
39$poste->set_attribute('label',$label_id);
40
41$poste->dbl_click_history();
42
43
44$card = new \ICard("qcode");
45$card->value = $data['oed_qcode'];
46$card->set_dblclick("fill_ipopcard(this);");
47$card->set_attribute('label', "label");
48$card->set_function('fill_data');
49$card->javascript=sprintf(' onchange="fill_data_onchange(\'%s\');" ', $card->name);
50
51$label = new IText("label", $data['oed_label']);
53$label->size = 80;
54
55$amount = new INum("amount", $data['oed_amount']);
56
57$checkbox = new ICheckBox("debit");
58
59$checkbox->value = 't';
60$checkbox->selected =($data['oed_debit'] == 't')?true:false;
61
62$checkbox->javascript='onclick="display_dcside(this)"';
63
64echo \HtmlInput::title_box("", "operation_exercice_bx");
65?>
66<div>
67 <form onsubmit="operation_exercice.save_row();return false;" id="operation_exercice_input_row_frm" method="POST">
68 <?php
69 echo Dossier::hidden();
70 echo HtmlInput::hidden("ac", "OPCL");
71 echo HtmlInput::hidden("row_id", $operation_detail_sql->oed_id);
72 echo HtmlInput::hidden("op", 'operation_exercice+save_row');
73 echo HtmlInput::hidden("oe_id", $operation_detail_sql->oe_id);
74 ?>
75 <div class="form-group">
76 <label for="oe_poste"><?= _("Poste") ?></label>
77 <?= $poste->input() ?>
78 </div>
79 <div class="form-group">
80 <label for="qcode"><?= _("Fiche") ?></label>
81 <?= $card->input() ?>
82 <?= $card->search() ?>
83 </div>
84 <div class="form-group">
85 <label for="oed_label"><?= _("Libellé") ?></label>
86 <?= $label->input() ?>
87 </div>
88 <div class="form-group">
89 <label for="amount"><?= _("Montant") ?></label>
90 <?= $amount->input() ?>
91
92 <?= $checkbox->input() ?>
93 <label for="debit">
94 <span id="txtdebit">
95 <?=($data['oed_debit']=="f")?_("Crédit"):_("Débit")?>
96 </span>
97
98 </label>
99 </div>
100 <ul class="aligned-block">
101 <li>
102 <?= \HtmlInput::submit("save", _("Sauve")) ?>
103 </li>
104 <li>
105 <?= \HtmlInput::button_close("operation_exercice_bx") ?>
106 </li>
107 <li>
108 <?=\HtmlInput::button_action(_("Effacer"), sprintf("operation_exercice.delete_row('%s')", $data['oed_id']))?>
109 </li>
110 </ul>
111
112 </form>
113</div>
114
span($p_string, $p_extra='')
Definition: ac_common.php:43
$ret label
static id()
return the 'gDossier' value after a check
static hidden()
return a string to set gDossier into a FORM
static button_close($div_name, $class='smallbutton')
close button for the HTML popup
static button_action($action, $javascript, $id=NULL, $p_class="button", $p_symbole="")
button Html with javascript
static hidden($p_name, $p_value, $p_id="")
static submit($p_name, $p_value, $p_javascript="", $p_class="smallbutton")
Html Input.
This class handles only the numeric input, the input will call a javascript to change comma to period...
Definition: inum.class.php:42
Html Input.
Definition: itext.class.php:30
static echo_file($msg, $print=true)
display the file
Definition: dbg.php:88