dolibarr 19.0.3
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;
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="adress" 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('Fax'); ?></td>
141 <td><input type="text" name="fax" value="<?php echo $this->control->tpl['fax']; ?>"></td>
142</tr>
143
144<tr>
145 <td><?php echo $langs->trans('EMail').($conf->global->SOCIETE_EMAIL_MANDATORY ? '*' : ''); ?></td>
146 <td><input type="text" name="email" size="32" value="<?php echo $this->control->tpl['email']; ?>"></td>
147 <td><?php echo $langs->trans('Web'); ?></td>
148 <td><input type="text" name="url" size="32" value="<?php echo $this->control->tpl['url']; ?>"></td>
149</tr>
150
151<tr>
152 <td><?php echo $langs->trans('Capital'); ?></td>
153 <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>
154</tr>
155
156<?php
157for ($i = 1; $i <= 4; $i++) {
158 if ($this->control->tpl['langprofid'.$i] != '-') {
159 if ($i == 1 || $i == 3) {
160 echo '<tr>';
161 }
162 echo '<td>'.$this->control->tpl['langprofid'.$i].'</td>';
163 echo '<td>'.$this->control->tpl['showprofid'.$i].'</td>';
164 if ($i == 2 || $i == 4) {
165 echo '</tr>';
166 }
167 } else {
168 if ($i == 1 || $i == 3) {
169 echo '<tr>';
170 }
171 echo '<td>&nbsp;</td>';
172 echo '<td>&nbsp;</td>';
173 if ($i == 2 || $i == 4) {
174 echo '</tr>';
175 }
176 }
177}
178?>
179
180<tr>
181 <td><?php echo $langs->trans('JuridicalStatus'); ?></td>
182 <td colspan="3"><?php echo $this->control->tpl['select_juridicalstatus']; ?></td>
183</tr>
184
185<tr>
186 <td><?php echo $langs->trans("ThirdPartyType"); ?></td>
187 <td><?php echo $this->control->tpl['select_companytype']; echo $this->control->tpl['info_admin']; ?></td>
188 <td><?php echo $langs->trans("Staff"); ?></td>
189 <td><?php echo $this->control->tpl['select_workforce']; echo $this->control->tpl['info_admin']; ?></td>
190</tr>
191
192<?php if (getDolGlobalInt('MAIN_MULTILANGS')) { ?>
193<tr>
194 <td><?php echo $langs->trans("DefaultLang"); ?></td>
195 <td colspan="3"><?php echo $this->control->tpl['select_lang']; ?></td>
196</tr>
197<?php } ?>
198
199<tr>
200 <td><?php echo $langs->trans('VATIsUsed'); ?></td>
201 <td><?php echo $this->control->tpl['yn_assujtva']; ?></td>
202 <td class="nowrap"><?php echo $langs->trans('VATIntra'); ?></td>
203 <td class="nowrap"><?php echo $this->control->tpl['tva_intra']; ?></td>
204</tr>
205
206<?php if (!empty($this->control->tpl['localtax'])) {
207 echo $this->control->tpl['localtax'];
208} ?>
209
210<?php if ($user->hasRight('societe', 'client', 'voir')) { ?>
211<tr>
212 <td><?php echo $langs->trans("AllocateCommercial"); ?></td>
213 <td colspan="3"><?php echo $this->control->tpl['select_users']; ?></td>
214</tr>
215<?php } ?>
216
217<tr>
218 <td colspan="4" class="center"><input type="submit" class="button" value="<?php echo $langs->trans('AddThirdParty'); ?>"></td>
219</tr>
220
221</table>
222</form>
223
224<!-- END PHP TEMPLATE -->
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
Definition repair.php:121
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:124