dolibarr 21.0.0-beta
card_edit.tpl.php
1<?php
2/* Copyright (C) 2010 Regis Houssin <regis.houssin@inodbox.com>
3 * Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
28// Protection to avoid direct call of template
29if (empty($conf) || !is_object($conf)) {
30 print "Error, template page can't be called as URL";
31 exit(1);
32}
33
34$contact = $GLOBALS['objcanvas']->control->object;
35
36?>
37
38<!-- BEGIN PHP TEMPLATE CARD_EDIT.TPL.PHP COMPANY -->
39
40<?php echo $this->control->tpl['title']; ?>
41
42<?php echo $this->control->tpl['error']; ?>
43
44<?php echo $this->control->tpl['ajax_selectcountry']; ?>
45<?php if ($this->control->tpl['js_checkVatPopup']) {
46 echo $this->control->tpl['js_checkVatPopup'];
47} ?>
48
49<form action="<?php echo $_SERVER["PHP_SELF"].'?socid='.$this->control->tpl['id']; ?>" method="POST" name="formsoc">
50<input type="hidden" name="canvas" value="<?php echo $canvas ?>">
51<input type="hidden" name="action" value="update">
52<input type="hidden" name="token" value="<?php echo newToken(); ?>">
53<input type="hidden" name="socid" value="<?php echo $this->control->tpl['id']; ?>">
54<?php if ($this->control->tpl['auto_customercode'] || $this->control->tpl['auto_suppliercode']) { ?>
55<input type="hidden" name="code_auto" value="1">
56<?php } ?>
57
58<table class="border allwidth">
59
60<tr>
61 <td><span class="fieldrequired"><?php echo $langs->trans('ThirdPartyName'); ?></span></td>
62 <td colspan="3"><input type="text" size="40" maxlength="60" name="nom" value="<?php echo $this->control->tpl['nom']; ?>"></td>
63</tr>
64
65<?php if (getDolGlobalString('SOCIETE_USEPREFIX')) { ?>
66<tr>
67 <td><?php echo $langs->trans("Prefix"); ?></td>
68 <td colspan="3">
69 <?php if (($this->control->tpl['prefix_customercode'] || $this->control->tpl['prefix_suppliercode']) && $this->control->tpl['prefix_comm']) { ?>
70 <input type="hidden" name="prefix_comm" value="<?php echo $this->control->tpl['prefix_comm']; ?>">
71 <?php echo $this->control->tpl['prefix_comm']; ?>
72 <?php } else { ?>
73 <input type="text" size="5" maxlength="5" name="prefix_comm" value="<?php echo $this->control->tpl['prefix_comm']; ?>">
74 <?php } ?>
75 </td>
76</tr>
77<?php } ?>
78
79<tr>
80 <td width="25%"><span class="fieldrequired"><?php echo $langs->trans('ProspectCustomer'); ?></span></td>
81 <td width="25%"><?php echo $this->control->tpl['select_customertype']; ?></td>
82 <td width="25%"><?php echo $langs->trans('CustomerCode'); ?></td>
83 <td width="25%">
84 <table class="nobordernopadding">
85 <tr>
86 <td>
87 <?php if ($this->control->tpl['ismodifiable_customercode']) { ?>
88 <input type="text" name="code_client" size="16" value="<?php echo $this->control->tpl['customercode']; ?>" maxlength="24">
89 <?php } else { ?>
90 <?php echo $this->control->tpl['customercode']; ?>
91 <input type="hidden" name="code_client" value="<?php echo $this->control->tpl['customercode']; ?>">
92 <?php } ?>
93 </td>
94 <td><?php echo $this->tpl['help_customercode']; ?></td>
95 </tr>
96 </table>
97 </td>
98</tr>
99
100<tr>
101 <td><span class="fieldrequired"><?php echo $langs->trans('Supplier'); ?></span></td>
102 <td><?php echo $this->control->tpl['yn_supplier']; ?></td>
103 <td><?php echo $langs->trans('SupplierCode'); ?></td>
104 <td>
105 <table class="nobordernopadding">
106 <tr>
107 <td>
108 <?php if ($this->control->tpl['ismodifiable_suppliercode']) { ?>
109 <input type="text" name="code_fournisseur" size="16" value="<?php echo $this->control->tpl['suppliercode']; ?>" maxlength="24">
110 <?php } else { ?>
111 <?php echo $this->control->tpl['suppliercode']; ?>
112 <input type="hidden" name="code_fournisseur" value="<?php echo $this->control->tpl['suppliercode']; ?>">
113 <?php } ?>
114 </td>
115 <td><?php echo $this->control->tpl['help_suppliercode']; ?></td>
116 </tr>
117 </table>
118 </td>
119</tr>
120
121<?php
122if ($this->control->tpl['fournisseur']) {
123 if (count($this->control->tpl['suppliercategory']) > 0) { ?>
124<tr>
125 <td><?php echo $langs->trans('SupplierCategory'); ?></td>
126 <td colspan="3"><?php echo $this->control->tpl['select_suppliercategory']; ?></td>
127</tr>
128 <?php
129 }
130}
131
132if (isModEnabled('barcode')) { ?>
133<tr>
134 <td><?php echo $langs->trans('Gencod'); ?></td>
135 <td colspan="3"><input type="text" name="barcode" value="<?php echo $this->control->tpl['barcode']; ?>"></td>
136</tr>
137<?php } ?>
138
139<tr>
140 <td class="tdtop"><?php echo $langs->trans('Address'); ?></td>
141 <td colspan="3"><textarea name="address" cols="40" rows="3"><?php echo $this->control->tpl['address']; ?></textarea></td>
142</tr>
143
144<tr>
145 <td><?php echo $langs->trans('Zip'); ?></td>
146 <td><?php echo $this->control->tpl['select_zip']; ?></td>
147 <td><?php echo $langs->trans('Town'); ?></td>
148 <td><?php echo $this->control->tpl['select_town']; ?></td>
149</tr>
150
151<tr>
152 <td width="25%"><?php echo $langs->trans('Country'); ?></td>
153 <td colspan="3"><?php echo $this->control->tpl['select_country']; echo $this->control->tpl['info_admin']; ?></td>
154</tr>
155
156<tr>
157 <td><?php echo $langs->trans('State'); ?></td>
158 <td colspan="3"><?php echo $this->control->tpl['select_state']; ?></td>
159</tr>
160
161<tr>
162 <td><?php echo $langs->trans('Phone'); ?></td>
163 <td><input type="text" name="phone" value="<?php echo $this->control->tpl['phone']; ?>"></td>
164 <td><?php echo $langs->trans('PhoneMobile'); ?></td>
165 <td><input type="text" name="phone_mobile" value="<?php echo $this->control->tpl['phone_mobile']; ?>"></td>
166 <td><?php echo $langs->trans('Fax'); ?></td>
167 <td><input type="text" name="fax" value="<?php echo $this->control->tpl['fax']; ?>"></td>
168</tr>
169
170<tr>
171 <td><?php echo $langs->trans('EMail').($conf->global->SOCIETE_EMAIL_MANDATORY ? '*' : ''); ?></td>
172 <td><input type="text" name="email" size="32" value="<?php echo $this->control->tpl['email']; ?>"></td>
173 <td><?php echo $langs->trans('Web'); ?></td>
174 <td><input type="text" name="url" size="32" value="<?php echo $this->control->tpl['url']; ?>"></td>
175</tr>
176
177<?php
178for ($i = 1; $i <= 4; $i++) {
179 if ($this->control->tpl['langprofid'.$i] != '-') {
180 if ($i == 1 || $i == 3) {
181 echo '<tr>';
182 }
183 echo '<td>'.$this->control->tpl['langprofid'.$i].'</td>';
184 echo '<td>'.$this->control->tpl['showprofid'.$i].'</td>';
185 if ($i == 2 || $i == 4) {
186 echo '</tr>';
187 }
188 } else {
189 if ($i == 1 || $i == 3) {
190 echo '<tr>';
191 }
192 echo '<td>&nbsp;</td>';
193 echo '<td>&nbsp;</td>';
194 if ($i == 2 || $i == 4) {
195 echo '</tr>';
196 }
197 }
198}
199?>
200
201<tr>
202 <td><?php echo $langs->trans('VATIsUsed'); ?></td>
203 <td><?php echo $this->control->tpl['yn_assujtva']; ?></td>
204 <td class="nowrap"><?php echo $langs->trans('VATIntra'); ?></td>
205 <td class="nowrap"><?php echo $this->control->tpl['tva_intra']; ?></td>
206</tr>
207
208<tr>
209 <td><?php echo $langs->trans('Capital'); ?></td>
210 <td colspan="3"><input type="text" name="capital" size="10" value="<?php echo $this->control->tpl['capital']; ?>"> <?php echo $langs->trans("Currency".$conf->currency); ?></td>
211</tr>
212
213<tr>
214 <td><?php echo $langs->trans('JuridicalStatus'); ?></td>
215 <td colspan="3"><?php echo $this->control->tpl['select_juridicalstatus']; ?></td>
216</tr>
217
218<tr>
219 <td><?php echo $langs->trans("ThirdPartyType"); ?></td>
220 <td><?php echo $this->control->tpl['select_companytype']; echo $this->control->tpl['info_admin']; ?></td>
221 <td><?php echo $langs->trans("Staff"); ?></td>
222 <td><?php echo $this->control->tpl['select_workforce']; echo $this->control->tpl['info_admin']; ?></td>
223</tr>
224
225<?php if (getDolGlobalInt('MAIN_MULTILANGS')) { ?>
226<tr>
227 <td><?php echo $langs->trans("DefaultLang"); ?></td>
228 <td colspan="3"><?php echo $this->control->tpl['select_lang']; ?></td>
229</tr>
230<?php }
231
232if (!empty($this->control->tpl['localtax'])) {
233 echo $this->control->tpl['localtax'];
234} ?>
235
236</table>
237<br>
238
239<div class="center">
240<input type="submit" class="button button-save" name="save" value="<?php echo $langs->trans("Save"); ?>">
241&nbsp; &nbsp;
242<input type="submit" class="button button-cancel" name="cancel" value="<?php echo $langs->trans("Cancel"); ?>">
243</div>
244
245</form>
246
247<!-- END PHP TEMPLATE -->
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
treeview li table
No Email.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
Definition repair.php:149
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:152