dolibarr 21.0.0-alpha
card_create.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?>
26
27<!-- BEGIN PHP TEMPLATE CARD_CREATE.TPL.PHP COMPANY -->
28
29<?php echo $this->control->tpl['title']; ?>
30
31<?php echo $this->control->tpl['error']; ?>
32
33<?php if ($conf->use_javascript_ajax) { ?>
34 <?php echo $this->control->tpl['ajax_selecttype']; ?>
35<br>
36 <?php echo $langs->trans("ThirdPartyType") ?>: &nbsp;
37<input type="radio" id="radiocompany" class="flat" name="private" value="0" checked>
38 <?php echo $langs->trans("CompanyFoundation"); ?> &nbsp; &nbsp;
39<input type="radio" id="radioprivate" class="flat" name="private" value="1"> <?php echo $langs->trans("Individual"); ?> (<?php echo $langs->trans("ToCreateContactWithSameName") ?>)
40<br>
41<br>
42 <?php echo $this->control->tpl['ajax_selectcountry']; ?>
43<?php } ?>
44
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"]; ?>" method="POST" name="formsoc">
50
51<input type="hidden" name="canvas" value="<?php echo $canvas ?>">
52<input type="hidden" name="action" value="add">
53<input type="hidden" name="token" value="<?php echo newToken(); ?>">
54<input type="hidden" name="private" value="<?php echo $this->control->tpl['particulier']; ?>">
55<?php if ($this->control->tpl['auto_customercode'] || $this->control->tpl['auto_suppliercode']) { ?>
56<input type="hidden" name="code_auto" value="1">
57<?php } ?>
58
59<table class="border allwidth">
60
61<tr>
62 <td><span class="fieldrequired"><?php echo $langs->trans('ThirdPartyName'); ?></span></td>
63 <td><input type="text" size="30" maxlength="60" name="nom" value="<?php echo $this->control->tpl['nom']; ?>"></td>
64 <?php if (getDolGlobalString('SOCIETE_USEPREFIX')) { ?>
65 <td><?php echo $langs->trans('Prefix'); ?></td>
66 <td><input type="text" size="5" maxlength="5" name="prefix_comm" value="<?php echo $this->control->tpl['prefix_comm']; ?>"></td>
67 <?php } ?>
68</tr>
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
74 <td width="25%"><?php echo $langs->trans('CustomerCode'); ?></td>
75 <td width="25%">
76 <table class="nobordernopadding">
77 <tr>
78 <td><input type="text" name="code_client" size="16" value="<?php echo $this->control->tpl['customercode']; ?>" maxlength="24"></td>
79 <td><?php echo $this->control->tpl['help_customercode']; ?></td>
80 </tr>
81 </table>
82 </td>
83</tr>
84
85<?php if ($this->control->tpl['supplier_enabled']) { ?>
86<tr>
87 <td><span class="fieldrequired"><?php echo $langs->trans('Supplier'); ?></span></td>
88 <td><?php echo $this->control->tpl['yn_supplier']; ?></td>
89 <td><?php echo $langs->trans('SupplierCode'); ?></td>
90 <td>
91 <table class="nobordernopadding">
92 <tr>
93 <td><input type="text" name="code_fournisseur" size="16" value="<?php echo $this->control->tpl['suppliercode']; ?>" maxlength="24"></td>
94 <td><?php echo $this->control->tpl['help_suppliercode']; ?></td>
95 </tr>
96 </table>
97 </td>
98</tr>
99
100 <?php if (count($this->control->tpl['suppliercategory']) > 0) { ?>
101<tr>
102 <td><?php echo $langs->trans('SupplierCategory'); ?></td>
103 <td colspan="3"><?php echo $this->control->tpl['select_suppliercategory']; ?></td>
104</tr>
105 <?php }
106}
107
108if (isModEnabled('barcode')) { ?>
109<tr>
110 <td><?php echo $langs->trans('Gencod'); ?></td>
111 <td colspan="3"><input type="text" name="barcode" value="<?php echo $this->control->tpl['barcode']; ?>"></td>
112</tr>
113<?php } ?>
114
115<tr>
116 <td class="tdtop"><?php echo $langs->trans('Address'); ?></td>
117 <td colspan="3"><textarea name="address" cols="40" rows="3"><?php echo $this->control->tpl['address']; ?></textarea></td>
118</tr>
119
120<tr>
121 <td><?php echo $langs->trans('Zip'); ?></td>
122 <td><?php echo $this->control->tpl['select_zip']; ?></td>
123 <td><?php echo $langs->trans('Town'); ?></td>
124 <td><?php echo $this->control->tpl['select_town']; ?></td>
125</tr>
126
127<tr>
128 <td width="25%"><?php echo $langs->trans('Country'); ?></td>
129 <td colspan="3"><?php echo $this->control->tpl['select_country']; echo $this->control->tpl['info_admin']; ?></td>
130</tr>
131
132<tr>
133 <td><?php echo $langs->trans('State'); ?></td>
134 <td colspan="3"><?php echo $this->control->tpl['select_state']; ?></td>
135</tr>
136
137<tr>
138 <td><?php echo $langs->trans('Phone'); ?></td>
139 <td><input type="text" name="phone" value="<?php echo $this->control->tpl['phone']; ?>"></td>
140 <td><?php echo $langs->trans('PhoneMobile'); ?></td>
141 <td><input type="text" name="phone_mobile" value="<?php echo $this->control->tpl['phone_mobile']; ?>"></td>
142 <td><?php echo $langs->trans('Fax'); ?></td>
143 <td><input type="text" name="fax" value="<?php echo $this->control->tpl['fax']; ?>"></td>
144</tr>
145
146<tr>
147 <td><?php echo $langs->trans('EMail').($conf->global->SOCIETE_EMAIL_MANDATORY ? '*' : ''); ?></td>
148 <td><input type="text" name="email" size="32" value="<?php echo $this->control->tpl['email']; ?>"></td>
149 <td><?php echo $langs->trans('Web'); ?></td>
150 <td><input type="text" name="url" size="32" value="<?php echo $this->control->tpl['url']; ?>"></td>
151</tr>
152
153<tr>
154 <td><?php echo $langs->trans('Capital'); ?></td>
155 <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>
156</tr>
157
158<?php
159for ($i = 1; $i <= 4; $i++) {
160 if ($this->control->tpl['langprofid'.$i] != '-') {
161 if ($i == 1 || $i == 3) {
162 echo '<tr>';
163 }
164 echo '<td>'.$this->control->tpl['langprofid'.$i].'</td>';
165 echo '<td>'.$this->control->tpl['showprofid'.$i].'</td>';
166 if ($i == 2 || $i == 4) {
167 echo '</tr>';
168 }
169 } else {
170 if ($i == 1 || $i == 3) {
171 echo '<tr>';
172 }
173 echo '<td>&nbsp;</td>';
174 echo '<td>&nbsp;</td>';
175 if ($i == 2 || $i == 4) {
176 echo '</tr>';
177 }
178 }
179}
180?>
181
182<tr>
183 <td><?php echo $langs->trans('JuridicalStatus'); ?></td>
184 <td colspan="3"><?php echo $this->control->tpl['select_juridicalstatus']; ?></td>
185</tr>
186
187<tr>
188 <td><?php echo $langs->trans("ThirdPartyType"); ?></td>
189 <td><?php echo $this->control->tpl['select_companytype']; echo $this->control->tpl['info_admin']; ?></td>
190 <td><?php echo $langs->trans("Staff"); ?></td>
191 <td><?php echo $this->control->tpl['select_workforce']; echo $this->control->tpl['info_admin']; ?></td>
192</tr>
193
194<?php if (getDolGlobalInt('MAIN_MULTILANGS')) { ?>
195<tr>
196 <td><?php echo $langs->trans("DefaultLang"); ?></td>
197 <td colspan="3"><?php echo $this->control->tpl['select_lang']; ?></td>
198</tr>
199<?php } ?>
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<?php if (!empty($this->control->tpl['localtax'])) {
209 echo $this->control->tpl['localtax'];
210} ?>
211
212<?php if ($user->hasRight('societe', 'client', 'voir')) { ?>
213<tr>
214 <td><?php echo $langs->trans("AllocateCommercial"); ?></td>
215 <td colspan="3"><?php echo $this->control->tpl['select_users']; ?></td>
216</tr>
217<?php } ?>
218
219<tr>
220 <td colspan="4" class="center"><input type="submit" class="button" value="<?php echo $langs->trans('AddThirdParty'); ?>"></td>
221</tr>
222
223</table>
224</form>
225
226<!-- 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.
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
Definition repair.php:137
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:140