dolibarr 20.0.0
card_view.tpl.php
1<?php
2/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@inodbox.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
18// Protection to avoid direct call of template
19if (empty($conf) || !is_object($conf)) {
20 print "Error, template page can't be called as URL";
21 exit(1);
22}
23
24
25$object = $GLOBALS['objcanvas']->control->object;
26
27
28print "<!-- BEGIN PHP TEMPLATE CARD_VIEW.TPL.PHP INDIVIDUAL -->\n";
29
30$head = societe_prepare_head($object);
31
32print dol_get_fiche_head($head, 'card', $langs->trans("ThirdParty"), 0, 'company');
33
34if ($this->control->tpl['error']) {
35 echo $this->control->tpl['error'];
36}
37if ($this->control->tpl['action_delete']) {
38 echo $this->control->tpl['action_delete'];
39} ?>
40
41<table class="border allwidth">
42
43<tr>
44 <td width="20%"><?php echo $langs->trans('Name'); ?></td>
45 <td colspan="3"><?php echo $this->control->tpl['showrefnav']; ?></td>
46</tr>
47
48<?php if (getDolGlobalString('SOCIETE_USEPREFIX')) { ?>
49<tr>
50 <td><?php echo $langs->trans('Prefix'); ?></td>
51 <td colspan="3"><?php echo $this->control->tpl['prefix_comm']; ?></td>
52</tr>
53<?php } ?>
54
55<?php if ($this->control->tpl['client']) { ?>
56<tr>
57 <td><?php echo $langs->trans('CustomerCode'); ?></td>
58 <td colspan="3"><?php echo $this->control->tpl['code_client']; ?>
59 <?php if ($this->control->tpl['checkcustomercode'] != 0) { ?>
60 <span class="error">(<?php echo $langs->trans("WrongCustomerCode"); ?>)</span>
61 <?php } ?>
62 </td>
63</tr>
64<?php } ?>
65
66<?php if ($this->control->tpl['fournisseur']) { ?>
67<tr>
68 <td><?php echo $langs->trans('SupplierCode'); ?></td>
69 <td colspan="3"><?php echo $this->control->tpl['code_fournisseur']; ?>
70 <?php if ($this->control->tpl['checksuppliercode'] != 0) { ?>
71 <span class="error">(<?php echo $langs->trans("WrongSupplierCode"); ?>)</span>
72 <?php } ?>
73 </td>
74</tr>
75<?php } ?>
76
77<?php if (isModEnabled('barcode')) { ?>
78<tr>
79 <td><?php echo $langs->trans('Gencod'); ?></td>
80 <td colspan="3"><?php echo $this->control->tpl['barcode']; ?></td>
81</tr>
82<?php } ?>
83
84<tr>
85 <td class="tdtop"><?php echo $langs->trans('Address'); ?></td>
86 <td colspan="3"><?php echo $this->control->tpl['address']; ?></td>
87</tr>
88
89<tr>
90 <td width="25%"><?php echo $langs->trans('Zip'); ?></td>
91 <td width="25%"><?php echo $this->control->tpl['zip']; ?></td>
92 <td width="25%"><?php echo $langs->trans('Town'); ?></td>
93 <td width="25%"><?php echo $this->control->tpl['town']; ?></td>
94</tr>
95
96<tr>
97 <td><?php echo $langs->trans("Country"); ?></td>
98 <td colspan="3" class="nowrap"><?php echo $this->control->tpl['country']; ?></td>
99</tr>
100
101<tr>
102 <td><?php echo $langs->trans('State'); ?></td>
103 <td colspan="3"><?php echo $this->control->tpl['departement']; ?></td>
104</tr>
105
106<tr>
107 <td><?php echo $langs->trans('Phone'); ?></td>
108 <td><?php echo $this->control->tpl['phone']; ?></td>
109 <td><?php echo $langs->trans('PhoneMobile'); ?></td>
110 <td><?php echo $this->control->tpl['phone_mobile']; ?></td>
111 <td><?php echo $langs->trans('Fax'); ?></td>
112 <td><?php echo $this->control->tpl['fax']; ?></td>
113</tr>
114
115<tr>
116 <td><?php echo $langs->trans('EMail'); ?></td>
117 <td><?php echo $this->control->tpl['email']; ?></td>
118 <td><?php echo $langs->trans('Web'); ?></td>
119 <td><?php echo $this->control->tpl['url']; ?></td>
120</tr>
121
122<tr>
123 <td><?php echo $langs->trans('VATIsUsed'); ?></td>
124 <td colspan="3"><?php echo $this->control->tpl['tva_assuj']; ?></td>
125</tr>
126
127<?php if (!empty($this->control->tpl['localtax'])) {
128 echo $this->control->tpl['localtax'];
129} ?>
130
131<tr>
132 <td><?php echo $langs->trans("Type"); ?></td>
133 <td colspan="3"><?php echo $this->control->tpl['typent']; ?></td>
134</tr>
135
136<?php if (getDolGlobalInt('MAIN_MULTILANGS')) { ?>
137<tr>
138 <td><?php echo $langs->trans("DefaultLang"); ?></td>
139 <td colspan="3"><?php echo $this->control->tpl['default_lang']; ?></td>
140</tr>
141<?php } ?>
142
143<tr>
144 <td>
145 <table class="nobordernopadding allwidth">
146 <tr>
147 <td><?php echo $langs->trans('RIB'); ?></td>
148 <td class="right">
149 <?php if ($user->hasRight('societe', 'creer')) { ?>
150 <a href="<?php echo DOL_URL_ROOT.'/societe/paymentmodes.php?socid='.$this->control->tpl['id']; ?>"><?php echo $this->control->tpl['image_edit']; ?></a>
151 <?php } else { ?>
152 &nbsp;
153 <?php } ?>
154 </td>
155 </tr>
156 </table>
157 </td>
158 <td colspan="3"><?php echo $this->control->tpl['display_rib']; ?></td>
159</tr>
160
161<tr>
162 <td>
163 <table class="nobordernopadding allwidth">
164 <tr>
165 <td><?php echo $langs->trans('SalesRepresentatives'); ?></td>
166 <td class="right">
167 <?php if ($user->hasRight('societe', 'creer')) { ?>
168 <a href="<?php echo DOL_URL_ROOT.'/societe/commerciaux.php?socid='.$this->control->tpl['id']; ?>"><?php echo $this->control->tpl['image_edit']; ?></a>
169 <?php } else { ?>
170 &nbsp;
171 <?php } ?>
172 </td>
173 </tr>
174 </table>
175 </td>
176 <td colspan="3"><?php echo $this->control->tpl['sales_representatives']; ?></td>
177</tr>
178
179<?php if (isModEnabled('member')) { ?>
180<tr>
181 <td width="25%" valign="top"><?php echo $langs->trans("LinkedToDolibarrMember"); ?></td>
182 <td colspan="3"><?php echo $this->control->tpl['linked_member']; ?></td>
183</tr>
184<?php } ?>
185
186</table>
187
188<?php print dol_get_fiche_end(); ?>
189
190<div class="tabsAction">
191<?php if ($user->hasRight('societe', 'creer')) { ?>
192<a class="butAction" href="<?php echo $_SERVER["PHP_SELF"].'?socid='.$this->control->tpl['id'].'&action=edit&token='.newToken().'&canvas='.urlencode($canvas); ?>"><?php echo $langs->trans("Modify"); ?></a>
193<?php } ?>
194
195<?php if ($user->hasRight('societe', 'supprimer')) { ?>
196 <?php if ($conf->use_javascript_ajax) { ?>
197 <span id="action-delete" class="butActionDelete"><?php echo $langs->trans('Delete'); ?></span>
198 <?php } else { ?>
199 <a class="butActionDelete" href="<?php echo $_SERVER["PHP_SELF"].'?socid='.$this->control->tpl['id'].'&action=delete&token='.newToken().'&canvas='.urlencode($canvas); ?>"><?php echo $langs->trans('Delete'); ?></a>
200 <?php } ?>
201<?php } ?>
202</div>
203
204<br>
205
206<table class="allwidth"><tr><td valign="top" width="50%">
207<div id="builddoc"></div>
208<?php
209/*
210 * Generated documents
211 */
212$filedir = $conf->societe->multidir_output[$this->control->tpl['entity']].'/'.$socid;
213$urlsource = $_SERVER["PHP_SELF"]."?socid=".$socid;
214$genallowed = $user->hasRight('societe', 'lire');
215$delallowed = $user->hasRight('societe', 'creer');
216
217print $formfile->showdocuments('company', $socid, $filedir, $urlsource, $genallowed, $delallowed, '', 0, 0, 0, 28, 0, '', 0, '', $objcanvas->control->object->default_lang);
218?>
219
220</td>
221<td></td>
222</tr>
223</table>
224
225<br>
226
227<?php
228// Subsidiaries list
229$result = show_subsidiaries($conf, $langs, $db, $object);
230
231// Contacts list
232$result = show_contacts($conf, $langs, $db, $object);
233
234// Projects list
235$result = show_projects($conf, $langs, $db, $object);
236
237print "<!-- END PHP TEMPLATE -->\n";
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:58
show_projects($conf, $langs, $db, $object, $backtopage='', $nocreatelink=0, $morehtmlright='')
Show html area for list of projects.
show_contacts($conf, $langs, $db, $object, $backtopage='', $showuserlogin=0)
Show html area for list of contacts.
show_subsidiaries($conf, $langs, $db, $object)
Show html area for list of subsidiaries.
societe_prepare_head(Societe $object)
Return array of tabs to used on pages for third parties cards.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
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.