dolibarr 21.0.0-beta
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 * 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
29// Protection to avoid direct call of template
30if (empty($conf) || !is_object($conf)) {
31 print "Error, template page can't be called as URL";
32 exit(1);
33}
34
35?>
36
37<!-- BEGIN PHP TEMPLATE CARD_CREATE.TPL.PHP COMPANY -->
38
39<?php echo $this->control->tpl['title']; ?>
40
41<?php echo $this->control->tpl['error']; ?>
42
43<?php if ($conf->use_javascript_ajax) { ?>
44 <?php echo $this->control->tpl['ajax_selecttype']; ?>
45<br>
46 <?php echo $langs->trans("ThirdPartyType") ?>: &nbsp;
47<input type="radio" id="radiocompany" class="flat" name="private" value="0" checked>
48 <?php echo $langs->trans("CompanyFoundation"); ?> &nbsp; &nbsp;
49<input type="radio" id="radioprivate" class="flat" name="private" value="1"> <?php echo $langs->trans("Individual"); ?> (<?php echo $langs->trans("ToCreateContactWithSameName") ?>)
50<br>
51<br>
52 <?php echo $this->control->tpl['ajax_selectcountry']; ?>
53<?php } ?>
54
55<?php if ($this->control->tpl['js_checkVatPopup']) {
56 echo $this->control->tpl['js_checkVatPopup'];
57} ?>
58
59<form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="POST" name="formsoc">
60
61<input type="hidden" name="canvas" value="<?php echo $canvas ?>">
62<input type="hidden" name="action" value="add">
63<input type="hidden" name="token" value="<?php echo newToken(); ?>">
64<input type="hidden" name="private" value="<?php echo $this->control->tpl['particulier']; ?>">
65<?php if ($this->control->tpl['auto_customercode'] || $this->control->tpl['auto_suppliercode']) { ?>
66<input type="hidden" name="code_auto" value="1">
67<?php } ?>
68
69<table class="border allwidth">
70
71<tr>
72 <td><span class="fieldrequired"><?php echo $langs->trans('ThirdPartyName'); ?></span></td>
73 <td><input type="text" size="30" maxlength="60" name="nom" value="<?php echo $this->control->tpl['nom']; ?>"></td>
74 <?php if (getDolGlobalString('SOCIETE_USEPREFIX')) { ?>
75 <td><?php echo $langs->trans('Prefix'); ?></td>
76 <td><input type="text" size="5" maxlength="5" name="prefix_comm" value="<?php echo $this->control->tpl['prefix_comm']; ?>"></td>
77 <?php } ?>
78</tr>
79
80<tr>
81 <td width="25%"><span class="fieldrequired"><?php echo $langs->trans('ProspectCustomer'); ?></span></td>
82 <td width="25%"><?php echo $this->control->tpl['select_customertype']; ?></td>
83
84 <td width="25%"><?php echo $langs->trans('CustomerCode'); ?></td>
85 <td width="25%">
86 <table class="nobordernopadding">
87 <tr>
88 <td><input type="text" name="code_client" size="16" value="<?php echo $this->control->tpl['customercode']; ?>" maxlength="24"></td>
89 <td><?php echo $this->control->tpl['help_customercode']; ?></td>
90 </tr>
91 </table>
92 </td>
93</tr>
94
95<?php if ($this->control->tpl['supplier_enabled']) { ?>
96<tr>
97 <td><span class="fieldrequired"><?php echo $langs->trans('Supplier'); ?></span></td>
98 <td><?php echo $this->control->tpl['yn_supplier']; ?></td>
99 <td><?php echo $langs->trans('SupplierCode'); ?></td>
100 <td>
101 <table class="nobordernopadding">
102 <tr>
103 <td><input type="text" name="code_fournisseur" size="16" value="<?php echo $this->control->tpl['suppliercode']; ?>" maxlength="24"></td>
104 <td><?php echo $this->control->tpl['help_suppliercode']; ?></td>
105 </tr>
106 </table>
107 </td>
108</tr>
109
110 <?php if (count($this->control->tpl['suppliercategory']) > 0) { ?>
111<tr>
112 <td><?php echo $langs->trans('SupplierCategory'); ?></td>
113 <td colspan="3"><?php echo $this->control->tpl['select_suppliercategory']; ?></td>
114</tr>
115 <?php }
116}
117
118if (isModEnabled('barcode')) { ?>
119<tr>
120 <td><?php echo $langs->trans('Gencod'); ?></td>
121 <td colspan="3"><input type="text" name="barcode" value="<?php echo $this->control->tpl['barcode']; ?>"></td>
122</tr>
123<?php } ?>
124
125<tr>
126 <td class="tdtop"><?php echo $langs->trans('Address'); ?></td>
127 <td colspan="3"><textarea name="address" cols="40" rows="3"><?php echo $this->control->tpl['address']; ?></textarea></td>
128</tr>
129
130<tr>
131 <td><?php echo $langs->trans('Zip'); ?></td>
132 <td><?php echo $this->control->tpl['select_zip']; ?></td>
133 <td><?php echo $langs->trans('Town'); ?></td>
134 <td><?php echo $this->control->tpl['select_town']; ?></td>
135</tr>
136
137<tr>
138 <td width="25%"><?php echo $langs->trans('Country'); ?></td>
139 <td colspan="3"><?php echo $this->control->tpl['select_country']; echo $this->control->tpl['info_admin']; ?></td>
140</tr>
141
142<tr>
143 <td><?php echo $langs->trans('State'); ?></td>
144 <td colspan="3"><?php echo $this->control->tpl['select_state']; ?></td>
145</tr>
146
147<tr>
148 <td><?php echo $langs->trans('Phone'); ?></td>
149 <td><input type="text" name="phone" value="<?php echo $this->control->tpl['phone']; ?>"></td>
150 <td><?php echo $langs->trans('PhoneMobile'); ?></td>
151 <td><input type="text" name="phone_mobile" value="<?php echo $this->control->tpl['phone_mobile']; ?>"></td>
152 <td><?php echo $langs->trans('Fax'); ?></td>
153 <td><input type="text" name="fax" value="<?php echo $this->control->tpl['fax']; ?>"></td>
154</tr>
155
156<tr>
157 <td><?php echo $langs->trans('EMail').($conf->global->SOCIETE_EMAIL_MANDATORY ? '*' : ''); ?></td>
158 <td><input type="text" name="email" size="32" value="<?php echo $this->control->tpl['email']; ?>"></td>
159 <td><?php echo $langs->trans('Web'); ?></td>
160 <td><input type="text" name="url" size="32" value="<?php echo $this->control->tpl['url']; ?>"></td>
161</tr>
162
163<tr>
164 <td><?php echo $langs->trans('Capital'); ?></td>
165 <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>
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('JuridicalStatus'); ?></td>
194 <td colspan="3"><?php echo $this->control->tpl['select_juridicalstatus']; ?></td>
195</tr>
196
197<tr>
198 <td><?php echo $langs->trans("ThirdPartyType"); ?></td>
199 <td><?php echo $this->control->tpl['select_companytype']; echo $this->control->tpl['info_admin']; ?></td>
200 <td><?php echo $langs->trans("Staff"); ?></td>
201 <td><?php echo $this->control->tpl['select_workforce']; echo $this->control->tpl['info_admin']; ?></td>
202</tr>
203
204<?php if (getDolGlobalInt('MAIN_MULTILANGS')) { ?>
205<tr>
206 <td><?php echo $langs->trans("DefaultLang"); ?></td>
207 <td colspan="3"><?php echo $this->control->tpl['select_lang']; ?></td>
208</tr>
209<?php } ?>
210
211<tr>
212 <td><?php echo $langs->trans('VATIsUsed'); ?></td>
213 <td><?php echo $this->control->tpl['yn_assujtva']; ?></td>
214 <td class="nowrap"><?php echo $langs->trans('VATIntra'); ?></td>
215 <td class="nowrap"><?php echo $this->control->tpl['tva_intra']; ?></td>
216</tr>
217
218<?php if (!empty($this->control->tpl['localtax'])) {
219 echo $this->control->tpl['localtax'];
220} ?>
221
222<?php if ($user->hasRight('societe', 'client', 'voir')) { ?>
223<tr>
224 <td><?php echo $langs->trans("AllocateCommercial"); ?></td>
225 <td colspan="3"><?php echo $this->control->tpl['select_users']; ?></td>
226</tr>
227<?php } ?>
228
229<tr>
230 <td colspan="4" class="center"><input type="submit" class="button" value="<?php echo $langs->trans('AddThirdParty'); ?>"></td>
231</tr>
232
233</table>
234</form>
235
236<!-- 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