noalyss Version-9
operation_exercice-list_draft.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 11/01/24
20/*!
21 * \file
22 * \brief display draft OPERATION_EXERCICE
23 */
26$a_operation = $cn->get_array("select oe_id
27 ,to_char(oe_date,'DD.MM.YY') str_date
28 ,to_char(oe_transfer_date,'DD.MM.YY') str_transfer_date
29 ,to_char(tech_date,'DD.MM.YY HH24:MI') draft_date
30 ,jr_internal
31 ,tech_user
32 ,oe_text
33 ,oe_type
34 from operation_exercice order by oe_id desc");
35
36$aUrl = ["ac" => $http->request("ac"), "gDossier" => Dossier::id()];
37$checkbox=new ICheckBox("operation_list[]");
38$checkbox->set_range("operation_range");
39?>
40<h2><?=_("Liste des opérations")?></h2>
41<form method="POST">
42 <?php
43 echo \HtmlInput::array_to_hidden(["gDossier", "sa"], $_REQUEST);
44 echo \HtmlInput::hidden("sa", "remove");
45 ?>
46<table class="result">
47 <tr>
48 <th>
49 <?= _("Date brouillon") ?>
50 </th>
51 <th>
52 <?= _("Date opération") ?>
53 </th>
54 <th>
55 <?= _("Description") ?>
56 </th>
57 <th>
58 <?= _("Utilisateur") ?>
59 </th>
60 <th>
61
62 <?= _("Date transfert") ?>
63 </th>
64 <th><?=_("opération")?></th>
65 <th>
66
67 </th>
68 </tr>
69 <?php
70 foreach ($a_operation as $operation) {
71 $aUrl['operation_exercice_id'] = $operation['oe_id'];
72 $aUrl['sa'] = $operation['oe_type'];
73 $url = NOALYSS_URL . "/do.php?" . http_build_query($aUrl);
74 $checkbox->value=$operation['oe_id'];
75 $detail="";
76 if ( ! empty ($operation['jr_internal'])) {
77 $jr_id=$cn->get_value("select jr_id from jrn where jr_internal =$1",[$operation['jr_internal']]);
78 if (!empty($jr_id))
80 }
81 ?>
82<tr>
83 <td class=""><?=$operation['draft_date']?></td>
84 <td class=""><?=$operation['str_date']?></td>
85 <td class=""><?=$operation['oe_text']?></td>
86 <td class=""><?=$operation['tech_user']?></td>
87 <td class=""><?=$operation['str_transfer_date']?></td>
88 <td class=""><?=$detail?></td>
89 <td class=""><?=\Icon_Action::detail_anchor(uniqid(), $url)?></td>
90 <td><?=$checkbox->input()?></td>
91</tr>
92 <?php
93 }
94
95 ?>
96</table>
97 <?=\HtmlInput::submit("remove",_("Efface la sélection"))?>
98</form>
99<?php
100echo ICheckBox::javascript_set_range("operation_range");
101
h2($p_string, $p_class="", $raw="")
Definition: ac_common.php:68
th($p_string, $p_extra='', $raw='')
Definition: ac_common.php:58
tr($p_string, $p_extra='')
Definition: ac_common.php:88
td($p_string='', $p_extra='')
surround the string with td
Definition: ac_common.php:83
$url
$jr_id
Definition: ajax_ledger.php:44
$_REQUEST['ac']
static id()
return the 'gDossier' value after a check
static connect()
static detail_op($p_jr_id, $p_mesg)
return a string containing the html code for calling the modifyOperation
static submit($p_name, $p_value, $p_javascript="", $p_class="smallbutton")
manage the http input (get , post, request) and extract from an array
Html Input.
static javascript_set_range($p_name)
Before calling this function , you must set a range with the function set_range.
static detail_anchor($p_id, $url)
$all table