noalyss Version-9
action_document_type_mtable_input.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-2019) 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 called from p_id already set,
27 * @see action_document_type_mtable::input
28 * @see
29 */
30// SQL Object Document_Type
31$table=$this->get_table();
32// db connx
34?>
35
36<?php echo _('Prochain numéro') ?>
37<p class="info" style="display:inline">
38 (
39<?php echo _('numéro actuel') ?>
40<?php
41$last=0;
42if ( $table->dt_id > 0) {
43 $ret=$cn->get_array("select last_value,is_called from seq_doc_type_".$table->dt_id);
44
45 $last=$ret[0]['last_value'];
46 /* !
47 * \note With PSQL sequence , the last_value column is 1 when before AND after the first call, to make the difference between them
48 * I have to check whether the sequence has been already called or not */
49 if ($ret[0]['is_called']=='f')
50 $last--;
51}
52echo $last;
53?>
54 )
55</p>
56
57<?php
58echo
60?>
61<?php
62$seq=new INum('seq', 0);
63echo $seq->input();
64?>
65<div>
66 <h3 class="info" sytle="margin-block: 4px"><?php echo _("Détail") ?></h3>
67 <ul class="tab_row" style="padding-top: 0px">
68 <li>
69<?php
70$i=new ICheckBox("detail_operation",1);
71if ( Document_Option::is_enable_operation_detail($table->dt_id)) $i->set_check(1);else $i->set_check(0);
72echo $i->input();
73echo _("Détail opération");
74$select_detail_operation=new ISelect("select_option_operation");
75$select_detail_operation->value=array(["value"=>"VEN","label"=>_("Prix vente")],
76 ["value"=>"ACH","label"=>_("Prix achat")]);
78echo $select_detail_operation->input();
79?>
80 </li>
81 <li>
82<?php
83$i=new ICheckBox("det_contact_mul",1);
84if ( Document_Option::is_enable_contact_multiple($table->dt_id)) $i->set_check(1); else $i->set_check(0);
85echo $i->input();
86echo _("Autres fiches");
87?>
88 </li>
89 <li>
90<?php
91$i=new ICheckBox("make_invoice",1);
92if ( Document_Option::is_enable_make_invoice($table->dt_id)) $i->set_check(1); else $i->set_check(0);
93echo $i->input();
94echo _("Création de facture");
95?>
96 </li>
97 <li>
98<?php
99$i=new ICheckBox("make_feenote",1);
100if ( Document_Option::is_enable_make_feenote($table->dt_id)) $i->set_check(1); else $i->set_check(0);
101echo $i->input();
102echo _("Création de note de frais ou facture Achat");
103?>
104 </li>
105
106 <li>
107 <?php
108 $description=new ICheckBox("editable_description",1);
110 else $description->set_check(0);
111
112 echo $description->input();
113 echo _("Description modifiable");
114 ?>
115 </li>
116 <li>
117<?php
118$i=new ICheckBox("followup_comment",1);
119if ( Document_Option::is_enable_comment($table->dt_id)) $i->set_check(1); else $i->set_check(0);
120echo $i->input();
121echo _("Commentaire");
122$select_comment_type=new ISelect("select_comment");
123$select_comment_type->value=array(["value"=>"ONE_EDIT","label"=>_("Unique")],
124 ["value"=>"SOME_FIXED","label"=>_("Multiples")]);
126echo $select_comment_type->input();
127?>
128 </li>
129 <li>
130 <?php
131 $i=new ICheckBox("videoconf_server",1);
133 $i->set_check($checked);
134
135 echo $i->input();
136 echo _("Serveur de videoconf");
137 $itVideoconfServer=new IText("videoconf_server_url");
139 echo $itVideoconfServer->input();
140 ?>
141 </li>
142 </ul>
143</div>
144<div>
145 <h3 class="info" sytle="margin-block: 4px"><?php echo _("Options contact") ?></h3>
146 <ul class="tab_row" style="padding-top: 0px">
147<?php
148
149$nb_option=count($aOption);
150for ($i=0;$i<$nb_option;$i++)
151{
152 echo '<li>';
153
154 echo HtmlInput::hidden("cor_id[]", $aOption[$i]["cor_id"]);
155 $is=new ICheckBox("contact_option$i",1);
156 if ($aOption[$i]['jdoc_enable'] ==1 ) {
157 $is->set_check(1);
158 } else {
159 $is->set_check(0);
160 }
161 echo $is->input();
162 echo "&nbsp;&nbsp;&nbsp;"._($aOption[$i]['cor_label']);
163 echo '</li>';
164}
165?>
166</ul>
167</div>
p($p_string)
Definition: ac_common.php:39
$opd_description style
if(! empty( $error)) for($i=0;$i< count($error);$i++)( $last !=$error[$i]) $last
static is_enable_make_feenote($p_document_type)
returns true if the operation_detail is enable, otherwise false
static is_enable_editable_description($p_document_type)
returns true if it is possible to edit the description , otherwise false
static is_enable_make_invoice($p_document_type)
returns true if the operation_detail is enable, otherwise false
static option_video_conf($p_document_type)
returns the videoconf server
static is_enable_video_conf($p_document_type)
returns true there is a videoconf enable
static is_enable_contact_multiple($p_document_type)
returns true if the operation_detail is enable, otherwise false
static option_operation_detail($p_document_type)
returns option from the operation_detail
static option_comment($p_document_type)
returns option from the operation_detail
static is_enable_comment($p_document_type)
returns true if comment are available otherwise false
static is_enable_operation_detail($p_document_type)
returns true if the operation_detail is enable, otherwise false
static hidden($p_name, $p_value, $p_id="")
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 , create a tag <SELECT> ... </SELECT> if readonly == true then display the label correspon...
Html Input.
Definition: itext.class.php:30
static infobulle($p_comment)
Display a info in a bubble, text is in message_javascript.
for($i=0;$i< $nb;$i++) $aOption