dolibarr 21.0.0-beta
card_create.tpl.php
1<?php
2/* Copyright (C) 2010-2018 Regis Houssin <regis.houssin@inodbox.com>
3 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
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 */
28// Protection to avoid direct call of template
29if (empty($conf) || !is_object($conf)) {
30 print "Error, template page can't be called as URL";
31 exit(1);
32}
33
34
35$object = $GLOBALS['object'];
38$statutarray = array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell"));
39?>
40
41<!-- BEGIN PHP TEMPLATE CREATE.TPL -->
42
43<?php
44print load_fiche_titre($langs->trans("NewService"), '', 'service');
45print dol_get_fiche_head([]);
46?>
47
48<?php dol_htmloutput_errors($this->control->tpl['error'], $this->control->tpl['errors']); ?>
49
50<?php dol_htmloutput_errors($GLOBALS['mesg'], $GLOBALS['mesgs']); ?>
51
52<form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post">
53<input type="hidden" name="token" value="<?php echo newToken(); ?>">
54<input type="hidden" name="action" value="add">
55<input type="hidden" name="type" value="1">
56<input type="hidden" name="canvas" value="<?php echo $canvas; ?>">
57
58<table class="border allwidth">
59
60<tr>
61<td class="fieldrequired" width="20%"><?php echo $langs->trans("Ref"); ?></td>
62<td><input name="ref" size="40" maxlength="32" value="<?php echo $object->ref; ?>">
63<?php if ($refalreadyexists == 1) {
64 echo $langs->trans("RefAlreadyExists");
65} ?>
66</td></tr>
67
68<tr>
69<td class="fieldrequired"><?php echo $langs->trans("Label"); ?></td>
70<td><input name="label" size="40" value="<?php echo $object->label; ?>"></td>
71</tr>
72
73<tr>
74<td class="fieldrequired"><?php echo $langs->trans("Status").' ('.$langs->trans("Sell").')'; ?></td>
75<td><?php echo $form->selectarray('statut', $statutarray, $object->status); ?></td>
76</tr>
77
78<tr>
79<td class="fieldrequired"><?php echo $langs->trans("Status").' ('.$langs->trans("Buy").')'; ?></td>
80<td><?php echo $form->selectarray('statut_buy', $statutarray, $object->status_buy); ?></td>
81</tr>
82
83<tr><td><?php echo $langs->trans("Duration"); ?></td>
84<td><input name="duration_value" size="6" maxlength="5" value="<?php echo $object->duration_value; ?>"> &nbsp;
85<?php echo $object->duration_unit; ?>
86</td></tr>
87
88<tr><td class="tdtop"><?php echo $langs->trans("NoteNotVisibleOnBill"); ?></td><td>
89<?php echo $object->textarea_note; ?>
90</td></tr>
91</table>
92
93<br>
94
95<?php if (!$conf->global->PRODUIT_MULTIPRICES) { ?>
96<table class="border allwidth">
97
98<tr><td><?php echo $langs->trans("SellingPrice"); ?></td>
99<td><input name="price" size="10" value="<?php echo $object->price; ?>">
100 <?php echo $object->price_base_type; ?>
101</td></tr>
102
103<tr><td><?php echo $langs->trans("MinPrice"); ?></td>
104<td><input name="price_min" size="10" value="<?php echo $object->price_min; ?>">
105</td></tr>
106
107<tr><td width="20%"><?php echo $langs->trans("VATRate"); ?></td><td>
108 <?php echo $object->tva_tx; ?>
109</td></tr>
110
111</table>
112
113<br>
114<?php } ?>
115
116<div align="center"><input type="submit" class="button" value="<?php echo $langs->trans("Create"); ?>"></div>
117
118</form>
119
120<!-- END PHP TEMPLATE -->
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:66
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.
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