| 1 |
lars |
1 |
<script>
|
|
|
2 |
function killkomma(w) {
|
|
|
3 |
return w.replace(/,/,'.');
|
|
|
4 |
}
|
|
|
5 |
</script>
|
|
|
6 |
|
|
|
7 |
|
|
|
8 |
{if $error_msg}
|
|
|
9 |
<br /><b style="color:#ff0000;">{$error_msg}</b>
|
|
|
10 |
{/if}
|
|
|
11 |
{if $succ_msg}
|
|
|
12 |
<br /><b style="color:#00ff00;">{$succ_msg}</b>
|
|
|
13 |
{/if}
|
|
|
14 |
<form action="{$smarty.server.SCRIPT_NAME}" method="post">
|
|
|
15 |
<input type="hidden" name="gs_id" value="{$gutschein.id}">
|
|
|
16 |
<table>
|
|
|
17 |
<tr class="links">
|
|
|
18 |
<td colspan="2">Gutschein bearbeiten</td>
|
|
|
19 |
</tr>
|
|
|
20 |
<tr>
|
|
|
21 |
<td class="links">
|
|
|
22 |
<label for="gs_id">Gutschein ID:</label>
|
|
|
23 |
</td>
|
|
|
24 |
<td class="rechts">
|
|
|
25 |
<input readonly="readonly" type="text" name="gs_id" value="{$gutschein.id}" id="gs_id" disabled="disabled">
|
|
|
26 |
</td>
|
|
|
27 |
</tr>
|
|
|
28 |
<tr>
|
|
|
29 |
<td class="links">
|
|
|
30 |
<label for="gs_shop">Shop:</label>
|
|
|
31 |
</td>
|
|
|
32 |
<td class="rechts">
|
|
|
33 |
{if $all_shops}
|
|
|
34 |
<select name="gs_shop" id="gs_shop">
|
|
|
35 |
<option value="0" label="alle">alle</option>
|
|
|
36 |
{section loop=$all_shops name=s_ind}
|
|
|
37 |
<option value="{$all_shops[s_ind].ID}" label="{$all_shops[s_ind].Name}">{$all_shops[s_ind].Name}</option>
|
|
|
38 |
{/section}
|
|
|
39 |
</select>
|
|
|
40 |
{else}
|
|
|
41 |
alle
|
|
|
42 |
<input type="hidden" name="gs_shop" value="{$gutschein.shops_id}">
|
|
|
43 |
{/if}
|
|
|
44 |
</td>
|
|
|
45 |
</tr>
|
|
|
46 |
<tr>
|
|
|
47 |
<td class="links">
|
|
|
48 |
<label for="gs_name">Gutschein Name:</label>
|
|
|
49 |
</td>
|
|
|
50 |
<td class="rechts">
|
|
|
51 |
<input type="text" name="gs_name" value="{$gutschein.name}" id="gs_name">
|
|
|
52 |
</td>
|
|
|
53 |
</tr>
|
|
|
54 |
<tr>
|
|
|
55 |
<td class="links">
|
|
|
56 |
<label for="gs_empfaenger">Name des Empfaengers:</label>
|
|
|
57 |
</td>
|
|
|
58 |
<td class="rechts">
|
|
|
59 |
<input type="text" name="gs_empfaenger" value="{$gutschein.empfaenger}" id="gs_empfaenger">
|
|
|
60 |
</td>
|
|
|
61 |
</tr>
|
|
|
62 |
<tr>
|
|
|
63 |
<td class="links">
|
|
|
64 |
<label for="gs_anfangswert">Wert des Gutscheins/EUR:</label>
|
|
|
65 |
</td>
|
|
|
66 |
<td class="rechts">
|
|
|
67 |
{if $gutschein.anfangswert < 0}
|
|
|
68 |
<input type="text" name="gs_anfangswert" value="{$gutschein.anfangswert*-1}%" id="gs_anfangswert" disabled="disabled">
|
|
|
69 |
{else}
|
|
|
70 |
<input type="text" name="gs_anfangswert" value="{$gutschein.anfangswert}" id="gs_anfangswert" disabled="disabled">
|
|
|
71 |
{/if}
|
|
|
72 |
<input type="hidden" name="gs_anfangswert" value="{$gutschein.anfangswert}">
|
|
|
73 |
</td>
|
|
|
74 |
</tr>
|
|
|
75 |
<tr>
|
|
|
76 |
<td class="links">
|
|
|
77 |
<label for="gs_minbestwert">Mindestbestellwert/EUR:</label>
|
|
|
78 |
</td>
|
|
|
79 |
<td class="rechts">
|
|
|
80 |
<input onkeyup="this.value=killkomma(this.value);" type="text" name="gs_minbestwert" value="{$gutschein.minbestwert}" id="gs_minbestwert">
|
|
|
81 |
</td>
|
|
|
82 |
</tr>
|
|
|
83 |
<tr>
|
|
|
84 |
<td class="links">
|
|
|
85 |
<label for="gs_restwert">Restwert/EUR:</label>
|
|
|
86 |
</td>
|
|
|
87 |
<td class="rechts">
|
|
|
88 |
{if $gutschein.restwert < 0}
|
|
|
89 |
<input type="text" name="gs_restwert" value="{$gutschein.restwert*-1}%" id="gs_restwert" disabled="disabled">
|
|
|
90 |
{else}
|
|
|
91 |
<input type="text" name="gs_restwert" value="{$gutschein.restwert}" id="gs_restwert" disabled="disabled">
|
|
|
92 |
{/if}
|
|
|
93 |
<input type="hidden" name="gs_restwert" value="{$gutschein.restwert}">
|
|
|
94 |
</td>
|
|
|
95 |
</tr>
|
|
|
96 |
<tr>
|
|
|
97 |
<td class="links">
|
|
|
98 |
<label for="gs_gueltig_bis">gültig von:</label>
|
|
|
99 |
</td>
|
|
|
100 |
<td class="rechts">
|
|
|
101 |
<input onfocus="current_value=this.value;if (this.value=='') { this.value=today() };this.select();" onchange="this.value=check_Date(this.value)" type="text" name="gs_gueltig_von" value="{$gutschein.gueltig_von|date_format:"d.m.Y"}" id="gs_gueltig_von">
|
|
|
102 |
</td>
|
|
|
103 |
</tr>
|
|
|
104 |
<tr>
|
|
|
105 |
<td class="links">
|
|
|
106 |
<label for="gs_gueltig_bis">gültig bis:</label>
|
|
|
107 |
</td>
|
|
|
108 |
<td class="rechts">
|
|
|
109 |
<input onfocus="current_value=this.value;if (this.value=='') { this.value=today(3,'Jahr') };this.select();" onchange="this.value=check_Date(this.value)" type="text" name="gs_gueltig_bis" value="{$gutschein.gueltig_bis|date_format:"d.m.Y"}" id="gs_gueltig_bis">
|
|
|
110 |
</td>
|
|
|
111 |
</tr>
|
|
|
112 |
<tr>
|
|
|
113 |
<td class="links">
|
|
|
114 |
<label for="gs_status">aktueller Status:</label>
|
|
|
115 |
</td>
|
|
|
116 |
<td class="rechts">
|
|
|
117 |
<select name="gs_status" id="gs_status">
|
|
|
118 |
<option value="1"{if $gutschein.status==1} selected="selected"{/if}>gültig</option>
|
|
|
119 |
<option value="0"{if $gutschein.status==0} selected="selected"{/if}>ungültig</option>
|
|
|
120 |
</select>
|
|
|
121 |
</td>
|
|
|
122 |
</tr>
|
|
|
123 |
<tr>
|
|
|
124 |
<td class="links">
|
|
|
125 |
<label for="gs_code">Code:</label>
|
|
|
126 |
</td>
|
|
|
127 |
<td class="rechts">
|
|
|
128 |
<input readonly="readonly" type="text" name="gs_code" value="{$gutschein.code}" id="gs_code" disabled="disabled">
|
|
|
129 |
</td>
|
|
|
130 |
</tr>
|
|
|
131 |
<tr>
|
|
|
132 |
<td colspan="2" class="links">
|
|
|
133 |
<input type="hidden" name="action" value="update">
|
|
|
134 |
<br>
|
|
|
135 |
<input type="submit" name="submit" value="Gutschein speichern">
|
|
|
136 |
<input onclick="window.open('{$SCRIPT_NAME}?gs_id={$gutschein.id}&action=genpdf')" type="button" name="pdf" value="Gutschein drucken (pdf)" />
|
|
|
137 |
</td>
|
|
|
138 |
</tr>
|
|
|
139 |
{if isset($user_rechte.Warenwirtschaft.bestellung.dokument_read)}
|
|
|
140 |
{section loop=$daten.dokumente name=d_ind}
|
|
|
141 |
<tr>
|
|
|
142 |
<td class="links noprint">Dokument {$daten.dokumente[d_ind].nr}</td>
|
|
|
143 |
<td class="rechts" {$d_colspan}>
|
|
|
144 |
<table width="100%">
|
|
|
145 |
<tr class="links">
|
|
|
146 |
<td width="58%">
|
|
|
147 |
{html_image file=$daten.dokumente[d_ind].icon alt="Dateityp: {$daten.dokumente[d_ind].type}"}
|
|
|
148 |
<a href="{$daten.dokPath}{$daten.dokumente[d_ind].name}" target="_blank">
|
|
|
149 |
{$daten.dokumente[d_ind].name} ({$daten.dokumente[d_ind].size|fsize_format:'':2:',':'.'})
|
|
|
150 |
</a>
|
|
|
151 |
</td>
|
|
|
152 |
<td width="3%">
|
|
|
153 |
{if isset($user_rechte.Warenwirtschaft.bestellung.dokument_delete) && $daten.dokumente[d_ind].deleteable}
|
|
|
154 |
{html_image file="../dokumente/gfx/delete_record.gif" onclick="{$daten.dokumente[d_ind].del_document}" border="0" style="cursor:pointer"}
|
|
|
155 |
{/if}
|
|
|
156 |
</td>
|
|
|
157 |
<td width="3%">
|
|
|
158 |
{if isset($user_rechte.Warenwirtschaft.bestellung.dokument_add)}
|
|
|
159 |
{html_image file="../dokumente/gfx/add.gif" onclick="{$daten.dokumente[d_ind].add_document}" border="0" style="cursor:pointer"}
|
|
|
160 |
{/if}
|
|
|
161 |
</td>
|
|
|
162 |
<td width="23%">
|
|
|
163 |
{$daten.dokumente[d_ind].date|date_format:"d.m.Y"} um: {$daten.dokumente[d_ind].date|date_format:"H:i:s"}
|
|
|
164 |
</td>
|
|
|
165 |
<td width="13%">
|
|
|
166 |
{$daten.dokumente[d_ind].author|default:" "}
|
|
|
167 |
</td>
|
|
|
168 |
</tr>
|
|
|
169 |
</table>
|
|
|
170 |
</td>
|
|
|
171 |
</tr>
|
|
|
172 |
{sectionelse}
|
|
|
173 |
{if isset($user_rechte.Warenwirtschaft.bestellung.dokument_add)}
|
|
|
174 |
<tr class="noprint">
|
|
|
175 |
<td class="links">Dokument</td>
|
|
|
176 |
<td class="rechts" {$d_colspan}>
|
|
|
177 |
<a onclick="{$daten.add_document}" style="cursor:pointer;" href="#">
|
|
|
178 |
{html_image file="../dokumente/gfx/add.gif" onclick="{$daten.add_document}" border="0" style="cursor:pointer"}Datei anhängen
|
|
|
179 |
</a>
|
|
|
180 |
</td>
|
|
|
181 |
</tr>
|
|
|
182 |
{/if}
|
|
|
183 |
{/section}
|
|
|
184 |
{/if}
|
|
|
185 |
</table>
|
|
|
186 |
</form>
|