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