dolibarr 20.0.0
card_create.tpl.php
1<?php
2/* Copyright (C) 2010-2018 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['object'];
26
27$statutarray = array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell"));
28?>
29
30<!-- BEGIN PHP TEMPLATE CREATE.TPL -->
31
32<?php
33print load_fiche_titre($langs->trans("NewService"), '', 'service');
34print dol_get_fiche_head('');
35?>
36
37<?php dol_htmloutput_errors($this->control->tpl['error'], $this->control->tpl['errors']); ?>
38
39<?php dol_htmloutput_errors($GLOBALS['mesg'], $GLOBALS['mesgs']); ?>
40
41<form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post">
42<input type="hidden" name="token" value="<?php echo newToken(); ?>">
43<input type="hidden" name="action" value="add">
44<input type="hidden" name="type" value="1">
45<input type="hidden" name="canvas" value="<?php echo $canvas; ?>">
46
47<table class="border allwidth">
48
49<tr>
50<td class="fieldrequired" width="20%"><?php echo $langs->trans("Ref"); ?></td>
51<td><input name="ref" size="40" maxlength="32" value="<?php echo $object->ref; ?>">
52<?php if ($refalreadyexists == 1) {
53 echo $langs->trans("RefAlreadyExists");
54} ?>
55</td></tr>
56
57<tr>
58<td class="fieldrequired"><?php echo $langs->trans("Label"); ?></td>
59<td><input name="label" size="40" value="<?php echo $object->label; ?>"></td>
60</tr>
61
62<tr>
63<td class="fieldrequired"><?php echo $langs->trans("Status").' ('.$langs->trans("Sell").')'; ?></td>
64<td><?php echo $form->selectarray('statut', $statutarray, $object->status); ?></td>
65</tr>
66
67<tr>
68<td class="fieldrequired"><?php echo $langs->trans("Status").' ('.$langs->trans("Buy").')'; ?></td>
69<td><?php echo $form->selectarray('statut_buy', $statutarray, $object->status_buy); ?></td>
70</tr>
71
72<tr><td><?php echo $langs->trans("Duration"); ?></td>
73<td><input name="duration_value" size="6" maxlength="5" value="<?php echo $object->duration_value; ?>"> &nbsp;
74<?php echo $object->duration_unit; ?>
75</td></tr>
76
77<tr><td class="tdtop"><?php echo $langs->trans("NoteNotVisibleOnBill"); ?></td><td>
78<?php echo $object->textarea_note; ?>
79</td></tr>
80</table>
81
82<br>
83
84<?php if (!$conf->global->PRODUIT_MULTIPRICES) { ?>
85<table class="border allwidth">
86
87<tr><td><?php echo $langs->trans("SellingPrice"); ?></td>
88<td><input name="price" size="10" value="<?php echo $object->price; ?>">
89 <?php echo $object->price_base_type; ?>
90</td></tr>
91
92<tr><td><?php echo $langs->trans("MinPrice"); ?></td>
93<td><input name="price_min" size="10" value="<?php echo $object->price_min; ?>">
94</td></tr>
95
96<tr><td width="20%"><?php echo $langs->trans("VATRate"); ?></td><td>
97 <?php echo $object->tva_tx; ?>
98</td></tr>
99
100</table>
101
102<br>
103<?php } ?>
104
105<div align="center"><input type="submit" class="button" value="<?php echo $langs->trans("Create"); ?>"></div>
106
107</form>
108
109<!-- END PHP TEMPLATE -->
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:58
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
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_htmloutput_errors($mesgstring='', $mesgarray=array(), $keepembedded=0)
Print formatted error messages to output (Used to show messages on html output).
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