| 1 |
lars |
1 |
<?
|
|
|
2 |
require_once "../Online-Shop/connect2.php";
|
|
|
3 |
|
|
|
4 |
$time=microtime_float();
|
|
|
5 |
|
|
|
6 |
require_once "includes/bestellungen/system/getBestellungLieferscheinStatus.php";
|
|
|
7 |
require_once "includes/bestellungen/system/getBestellungRechnungStatus.php";
|
|
|
8 |
require_once "includes/bestellungen/system/getBestellungStatus.php";
|
|
|
9 |
require_once "includes/bestellungen/system/getBestellungSumme.php";
|
|
|
10 |
require_once "includes/bestellungen/system/mysql_query_logged.php";
|
|
|
11 |
require_once "includes/bestellungen/system/artikelDatabase.php";
|
|
|
12 |
require_once "includes/bestellungen/system/bestellung_puffern.php";
|
|
|
13 |
require_once "includes/bestellungen/system/getVersandItems.php";
|
|
|
14 |
require_once "includes/best_manu/system/getShops.php";
|
|
|
15 |
|
|
|
16 |
$s_id=intval((isset($_GET["id"]))?$_GET["id"]:0);
|
|
|
17 |
$b_id=intval((isset($_GET["best_id"]))?$_GET["best_id"]:0);
|
|
|
18 |
$l=getShops();
|
|
|
19 |
// Beim Eintritt in die Seite puffern.
|
|
|
20 |
|
|
|
21 |
$query="
|
|
|
22 |
select
|
|
|
23 |
Bestellung.*,
|
|
|
24 |
Logins.Status,
|
|
|
25 |
Logins.user,
|
|
|
26 |
Logins.passwd,
|
|
|
27 |
Logins.Anrede,
|
|
|
28 |
Logins.Vorname,
|
|
|
29 |
Logins.Name1,
|
|
|
30 |
Logins.Name2,
|
|
|
31 |
Logins.Strasse,
|
|
|
32 |
Logins.Hausnummer,
|
|
|
33 |
Logins.PLZ,
|
|
|
34 |
Logins.ORT,
|
|
|
35 |
Logins.Telefon,
|
|
|
36 |
Logins.Fax,
|
|
|
37 |
Logins.E_Mail,
|
|
|
38 |
Logins.Land,
|
|
|
39 |
Logins.AP_Name,
|
|
|
40 |
Logins.AP_Handy,
|
|
|
41 |
Logins.AP_Bemerkung
|
|
|
42 |
from
|
|
|
43 |
Bestellung,
|
|
|
44 |
Logins
|
|
|
45 |
where
|
|
|
46 |
Bestellung.ID = $best_id
|
|
|
47 |
and
|
|
|
48 |
Logins.ID = Bestellung.Login
|
|
|
49 |
";
|
|
|
50 |
$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>".nl2br($query)."<hr>");
|
|
|
51 |
$zeile=mysql_fetch_array($result);
|
|
|
52 |
$BestellData = $zeile;
|
|
|
53 |
?>
|
|
|
54 |
<script language="JavaScript" src="../systemtermine/systemtermine.js.php"></script>
|
|
|
55 |
<script language="JavaScript" src="kundenauftrag_drucken.js.php"></script>
|
|
|
56 |
<table width="650" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#FFFFFF" bordercolordark="#999999">
|
|
|
57 |
<tr>
|
|
|
58 |
<td colspan="2" class="links">Bestellung: Bearbeiten</td>
|
|
|
59 |
</tr>
|
|
|
60 |
<tr>
|
|
|
61 |
<td class="links">Bestellnummer:</td>
|
|
|
62 |
<?
|
|
|
63 |
/* if (isset($user_rechte["Warenwirtschaft"]["bestellung"]["shopChange"]))
|
|
|
64 |
{*/
|
|
|
65 |
?>
|
|
|
66 |
<td>
|
|
|
67 |
<?
|
|
|
68 |
/* }
|
|
|
69 |
else
|
|
|
70 |
{*/
|
|
|
71 |
?>
|
|
|
72 |
<!-- <td> -->
|
|
|
73 |
<?
|
|
|
74 |
//}
|
|
|
75 |
?>
|
|
|
76 |
<? echo $zeile[ID] ?>
|
|
|
77 |
-
|
|
|
78 |
<? echo $zeile[Language] ?>
|
|
|
79 |
- Shop:
|
|
|
80 |
<?
|
|
|
81 |
echo $_SESSION[shops][$zeile[shops_ID]][Name];
|
|
|
82 |
echo "<a href='editshop.php?id=".$zeile["shops_ID"]."&best_id=".$_GET["Bestellung"]."'>(?)</a>"
|
|
|
83 |
?>
|
|
|
84 |
</td>
|
|
|
85 |
</tr>
|
|
|
86 |
<tr>
|
|
|
87 |
<td valign="top" class="links"><a href="../logins/logins.php?action=edit&ID=<? echo $zeile[Login] ?>">Kunde:</a><br>
|
|
|
88 |
Userlevel:
|
|
|
89 |
<? echo $zeile[Status] ?>
|
|
|
90 |
</td>
|
|
|
91 |
<td class="rechts">
|
|
|
92 |
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFF00">
|
|
|
93 |
<tr>
|
|
|
94 |
<td height="24">
|
|
|
95 |
<? if ($zeile[Anrede]) { echo ($zeile[Anrede]." "); } ?>
|
|
|
96 |
<? if ($zeile[Vorname]) { echo ($zeile[Vorname]." "); } ?><? echo $zeile[Name1] ?>
|
|
|
97 |
</td>
|
|
|
98 |
<td>
|
|
|
99 |
<? echo $zeile[Strasse] ?> <? echo $zeile[Hausnummer] ?>
|
|
|
100 |
</td>
|
|
|
101 |
<td><a style="text-decoration:none" href="dial:<? echo $zeile[Telefon] ?>">
|
|
|
102 |
<? echo $zeile[Telefon] ?>
|
|
|
103 |
<img src="../images/Online-Shop/telefon.gif" border="0"></a> </td>
|
|
|
104 |
<td>
|
|
|
105 |
<? echo $zeile[Fax] ?>
|
|
|
106 |
</td>
|
|
|
107 |
</tr>
|
|
|
108 |
<tr>
|
|
|
109 |
<td height="41">
|
|
|
110 |
<? if ($zeile[Name2] != '') { ?>
|
|
|
111 |
<strong>Firma / Organisation</strong><br>
|
|
|
112 |
<? } ?>
|
|
|
113 |
<? echo $zeile[Name2] ?>
|
|
|
114 |
</td>
|
|
|
115 |
<td>
|
|
|
116 |
<? echo $zeile[PLZ] ?> <? echo $zeile[ORT] ?>
|
|
|
117 |
</td>
|
|
|
118 |
<td>
|
|
|
119 |
<? if ($zeile[E_Mail]) { ?>
|
|
|
120 |
<a href="mailto:<? echo $zeile[E_Mail] ?>">
|
|
|
121 |
<? echo $zeile[E_Mail] ?>
|
|
|
122 |
</a>
|
|
|
123 |
<? }?>
|
|
|
124 |
</td>
|
|
|
125 |
<td>
|
|
|
126 |
<? echo $zeile[Land] ?>
|
|
|
127 |
</td>
|
|
|
128 |
</tr>
|
|
|
129 |
</table>
|
|
|
130 |
<? if ($zeile[liefer_Strasse] != '') { ?>
|
|
|
131 |
<br>
|
|
|
132 |
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFF00">
|
|
|
133 |
<tr>
|
|
|
134 |
<td height="24"><strong>Lieferadresse:</strong></td>
|
|
|
135 |
<td>Name:<br>
|
|
|
136 |
<?
|
|
|
137 |
echo
|
|
|
138 |
$zeile[liefer_Anrede]." ".
|
|
|
139 |
$zeile[liefer_Vorname]." ".
|
|
|
140 |
$zeile[liefer_Name];
|
|
|
141 |
?>
|
|
|
142 |
</td>
|
|
|
143 |
<td>
|
|
|
144 |
<? if ($zeile[liefer_Firma] != '') { ?>
|
|
|
145 |
Firma / Organisation:<br>
|
|
|
146 |
<? } ?>
|
|
|
147 |
<? echo $zeile[liefer_Firma] ?>
|
|
|
148 |
</td>
|
|
|
149 |
</tr>
|
|
|
150 |
<tr>
|
|
|
151 |
<td height="41">
|
|
|
152 |
<? echo $zeile[liefer_Strasse] ?> <? echo $zeile[liefer_Str_Nr] ?>
|
|
|
153 |
</td>
|
|
|
154 |
<td>
|
|
|
155 |
<? echo $zeile[liefer_PLZ] ?> <? echo $zeile[liefer_Ort] ?>
|
|
|
156 |
</td>
|
|
|
157 |
<td>
|
|
|
158 |
<? echo $zeile[liefer_Land] ?>
|
|
|
159 |
</td>
|
|
|
160 |
</tr>
|
|
|
161 |
</table>
|
|
|
162 |
<? } ?>
|
|
|
163 |
</td>
|
|
|
164 |
</tr>
|
|
|
165 |
<tr>
|
|
|
166 |
<td valign="top" class="links"><p>Artikel:</p>
|
|
|
167 |
</td>
|
|
|
168 |
<td align="right" class="rechts">
|
|
|
169 |
<table width="100%" border="0" cellspacing="2" cellpadding="2">
|
|
|
170 |
<?
|
|
|
171 |
$summe=0;$runner=0;
|
|
|
172 |
|
|
|
173 |
$cmd_buttons=array
|
|
|
174 |
(
|
|
|
175 |
array('O', 'offen', 'status_red', 'artikelStatus', 0),
|
|
|
176 |
array('B', 'in Bearbeitung', 'status_yellow', 'artikelStatus', 0),
|
|
|
177 |
array('R', 'reserviert', 'status_blue', 'artikelStatus', 0),
|
|
|
178 |
array('E', 'erledigt', 'status_green', 'artikelStatus', 0),
|
|
|
179 |
array('A', 'abgeschlossen', 'status_white', 'artikelStatus', 0),
|
|
|
180 |
str_repeat(" ", 3),
|
|
|
181 |
array('S', 'schreiben', 'status_red', 'rechnungStatus', 6),
|
|
|
182 |
array('G', 'geschrieben', 'status_yellow', 'rechnungStatus', 6),
|
|
|
183 |
array('B', 'bezahlt', 'status_green', 'rechnungStatus', 6),
|
|
|
184 |
str_repeat(" ", 3),
|
|
|
185 |
array('S', 'schreiben', 'status_yellow', 'lieferscheinStatus', 0),
|
|
|
186 |
array('G', 'geschrieben', 'status_green', 'lieferscheinStatus', 0)
|
|
|
187 |
array('O', 'offen', 'status_red', 'lieferscheinStatus', 0)
|
|
|
188 |
);
|
|
|
189 |
|
|
|
190 |
$user_rechte[modul_name][tool_name][artikelStatus]=&$user_rechte[modul_name][tool_name][status];
|
|
|
191 |
|
|
|
192 |
|
|
|
193 |
foreach(array_keys($cmd_buttons) as $buttonIndex)
|
|
|
194 |
{
|
|
|
195 |
if
|
|
|
196 |
(
|
|
|
197 |
(!isset($user_rechte[modul_name][tool_name][$cmd_buttons[$buttonIndex][3]]))
|
|
|
198 |
and
|
|
|
199 |
(is_array($cmd_buttons[$buttonIndex]))
|
|
|
200 |
)
|
|
|
201 |
{
|
|
|
202 |
unset($cmd_buttons[$buttonIndex]);
|
|
|
203 |
}
|
|
|
204 |
}
|
|
|
205 |
|
|
|
206 |
if ($filter[shops_ID] != "alle")
|
|
|
207 |
{
|
|
|
208 |
$shopsIDaddOn=" and shops.ID = ".$filter[shops_ID];
|
|
|
209 |
}
|
|
|
210 |
|
|
|
211 |
$query_artikel="
|
|
|
212 |
select
|
|
|
213 |
artikel_to_Bestellung.ID,
|
|
|
214 |
artikel_to_Bestellung.status as artikelStatus,
|
|
|
215 |
artikel_to_Bestellung.Preis_pro_Stueck,
|
|
|
216 |
artikel_to_Bestellung.Menge,
|
|
|
217 |
artikel_to_Bestellung.Bezeichnung,
|
|
|
218 |
artikel_to_Bestellung.Bestellung,
|
|
|
219 |
artikel_to_Bestellung.rechnungStatus,
|
|
|
220 |
artikel_to_Bestellung.lieferscheinStatus,
|
|
|
221 |
".artikelDatabase($zeile[shops_ID]).".*,
|
|
|
222 |
ifnull(".artikelDatabase($zeile[shops_ID]).".Father, 1) as Father,
|
|
|
223 |
ifnull(artikel_to_Bestellung.Bezeichnung, ".artikelDatabase($zeile[shops_ID]).".kurzbezeichnung) as kurzbezeichnung
|
|
|
224 |
from
|
|
|
225 |
artikel_to_Bestellung,
|
|
|
226 |
Bestellung,
|
|
|
227 |
shops
|
|
|
228 |
left join
|
|
|
229 |
".artikelDatabase($zeile[shops_ID])."
|
|
|
230 |
on
|
|
|
231 |
artikel_to_Bestellung.artikel=".artikelDatabase($zeile[shops_ID]).".ID
|
|
|
232 |
and
|
|
|
233 |
".artikelDatabase($zeile[shops_ID]).".language=Bestellung.Language
|
|
|
234 |
where
|
|
|
235 |
Bestellung.ID = ".$zeile[ID]."
|
|
|
236 |
and
|
|
|
237 |
artikel_to_Bestellung.Bestellung = Bestellung.ID
|
|
|
238 |
and
|
|
|
239 |
shops.ID = Bestellung.shops_ID
|
|
|
240 |
order by
|
|
|
241 |
Father desc,
|
|
|
242 |
".artikelDatabase($zeile[shops_ID]).".Kennung
|
|
|
243 |
";
|
|
|
244 |
//echo $query_artikel;
|
|
|
245 |
|
|
|
246 |
$itemList=array();
|
|
|
247 |
unset($Versand_Artikel);
|
|
|
248 |
$result_artikel = mysql_query ($query_artikel) or die (mysql_errno().": ".mysql_error()."<hr>".nl2br($query_artikel)."<hr>");
|
|
|
249 |
while($zeile_artikel=mysql_fetch_array($result_artikel))
|
|
|
250 |
{
|
|
|
251 |
if ($zeile_artikel[artikelStatus] != "storniert")
|
|
|
252 |
{
|
|
|
253 |
$summe+=$zeile_artikel[2]*$zeile_artikel[Menge];
|
|
|
254 |
}
|
|
|
255 |
/*
|
|
|
256 |
ein artikel ist kein versand, wenn
|
|
|
257 |
er einen vater > 3 hat
|
|
|
258 |
ODER KEINEN VATER hat
|
|
|
259 |
und der Status != versand
|
|
|
260 |
*/
|
|
|
261 |
if (
|
|
|
262 |
(($zeile_artikel[Father] > -3) or ($zeile_artikel[Father] == ""))
|
|
|
263 |
and
|
|
|
264 |
($zeile_artikel[artikelStatus] != 'versand')
|
|
|
265 |
)
|
|
|
266 |
{
|
|
|
267 |
$itemList[]=$zeile_artikel[0];
|
|
|
268 |
?>
|
|
|
269 |
<tr class="<? if ($runner++ % 2 != 0) {?>lightgray<? } else { ?>darkgray<? } ?>">
|
|
|
270 |
<td width="5%" valign="top">
|
|
|
271 |
<?
|
|
|
272 |
if($zeile_artikel[artikelStatus] == 'storniert'){echo '<strike>';}
|
|
|
273 |
echo $zeile_artikel[kennung];
|
|
|
274 |
if($zeile_artikel[artikelStatus] == 'storniert'){echo '</strike>';}
|
|
|
275 |
?>
|
|
|
276 |
</td>
|
|
|
277 |
<td width="90%">
|
|
|
278 |
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
|
|
|
279 |
<tr>
|
|
|
280 |
<td align="right" valign="top" nowrap>
|
|
|
281 |
<? if ($_GET[edit] == $zeile_artikel[0]) { ?>
|
|
|
282 |
<input type="text" name="cmd[artikel_to_Bestellung][<?=$zeile_artikel[0];?>][Menge]" size="2" value="<? echo $zeile_artikel[Menge] ?>">
|
|
|
283 |
<? } else {
|
|
|
284 |
if($zeile_artikel[artikelStatus] == 'storniert'){echo '<strike>';}
|
|
|
285 |
echo $zeile_artikel[Menge];
|
|
|
286 |
if($zeile_artikel[artikelStatus] == 'storniert'){echo '<strike>';}
|
|
|
287 |
} ?>
|
|
|
288 |
x </td>
|
|
|
289 |
<td width="100%" onDblClick="location.href='<?=$self?>?Bestellung=<?=$_GET[Bestellung];?><? if ($_GET[edit] != $zeile_artikel[0]) { ?>&edit=<?=$zeile_artikel[0];?><? } ?>'">
|
|
|
290 |
<?
|
|
|
291 |
if ($zeile_artikel[Bezeichnung])
|
|
|
292 |
{
|
|
|
293 |
$zeile_artikel[kurzbezeichnung]=$zeile_artikel[Bezeichnung];
|
|
|
294 |
}
|
|
|
295 |
if($zeile_artikel[artikelStatus] == 'storniert')
|
|
|
296 |
{
|
|
|
297 |
echo '<strike>';
|
|
|
298 |
}
|
|
|
299 |
if ($zeile_artikel[hersteller])
|
|
|
300 |
{
|
|
|
301 |
echo $zeile_artikel[hersteller]." ";
|
|
|
302 |
}
|
|
|
303 |
|
|
|
304 |
if ($_GET[edit] == $zeile_artikel[0])
|
|
|
305 |
{
|
|
|
306 |
?><input type="text" name="cmd[artikel_to_Bestellung][<?=$zeile_artikel[0];?>][Bezeichnung]" size="45" value="<? echo $zeile_artikel[kurzbezeichnung] ?>"><?
|
|
|
307 |
}
|
|
|
308 |
else
|
|
|
309 |
{
|
|
|
310 |
echo strip_tags($zeile_artikel[kurzbezeichnung]);
|
|
|
311 |
}
|
|
|
312 |
|
|
|
313 |
|
|
|
314 |
if($zeile_artikel[artikelStatus] == 'storniert'){echo '</strike>';}
|
|
|
315 |
?>
|
|
|
316 |
<? if ($zeile_artikel[ID]) {?><a href="/Online-Shop/artikel.php?action=edit&ID=<? echo $zeile_artikel[ID]; ?>" target="_blank">(?)</a><? } ?>
|
|
|
317 |
<?
|
|
|
318 |
// Sonderausgaben wenn shop = eBay-shop - Nw 02.09.2004
|
|
|
319 |
if ($_SESSION[shops][$zeile[shops_ID]][ebay] == '1') { ?>
|
|
|
320 |
<? if($zeile_artikel[artikelStatus] == 'storniert'){echo '<strike>';} ?>
|
|
|
321 |
(eBay-Auktion
|
|
|
322 |
<?
|
|
|
323 |
$query_ebayartikel="
|
|
|
324 |
select
|
|
|
325 |
eBay_Auktionen.*
|
|
|
326 |
from
|
|
|
327 |
Bestellung,
|
|
|
328 |
eBay_Bestellung,
|
|
|
329 |
eBay_Auktionen
|
|
|
330 |
where
|
|
|
331 |
Bestellung.ID=$zeile_artikel[Bestellung]
|
|
|
332 |
and
|
|
|
333 |
Bestellung.ID=eBay_Bestellung.Bestellung_ID
|
|
|
334 |
and
|
|
|
335 |
eBay_Bestellung.eBay_Auktionen_ID=eBay_Auktionen.ID
|
|
|
336 |
";
|
|
|
337 |
$result_ebayartikel = mysql_query ($query_ebayartikel) or die (mysql_errno().": ".mysql_error());
|
|
|
338 |
$zeile_ebayartikel = mysql_fetch_array($result_ebayartikel);
|
|
|
339 |
?>
|
|
|
340 |
<a href="http://cgi.ebay.de/ws/eBayISAPI.dll?ViewItem&rd=1&item=<? echo $zeile_ebayartikel[eBay_Id]; ?>">
|
|
|
341 |
<? echo $zeile_ebayartikel[eBay_Id]; ?> </a>)
|
|
|
342 |
<? if($zeile_artikel[artikelStatus] == 'storniert'){echo '</strike>';} ?>
|
|
|
343 |
<? } ?>
|
|
|
344 |
</td>
|
|
|
345 |
<td align="right" nowrap valign="top">
|
|
|
346 |
<? if ($_GET[edit] == $zeile_artikel[0]) { ?>
|
|
|
347 |
<input type="text" name="cmd[artikel_to_Bestellung][<?=$zeile_artikel[0];?>][Preis_pro_Stueck]" size="3" value="<? echo $zeile_artikel[2] ?>" onChange="this.value=killkomma(this.value);">
|
|
|
348 |
<? } else {
|
|
|
349 |
if($zeile_artikel[artikelStatus] == 'storniert'){echo '<strike>';}
|
|
|
350 |
echo number_format($zeile_artikel[2],2,',','.');
|
|
|
351 |
if($zeile_artikel[artikelStatus] == 'storniert'){echo '</strike>';}
|
|
|
352 |
} ?>
|
|
|
353 |
€ </td>
|
|
|
354 |
<td align="right" nowrap valign="top">
|
|
|
355 |
<?
|
|
|
356 |
// Storno- Button
|
|
|
357 |
if ($_GET[edit] == $zeile_artikel[0]) {
|
|
|
358 |
echo '<a href="'.$self.'?Bestellung='.$zeile[ID].'&artikelStatus['.$zeile_artikel[0].']=S">X</a>';
|
|
|
359 |
}
|
|
|
360 |
?>
|
|
|
361 |
</td>
|
|
|
362 |
</tr>
|
|
|
363 |
</table>
|
|
|
364 |
</td>
|
|
|
365 |
<td colspan=9 bgcolor="#FFFF00">
|
|
|
366 |
<table border="0" cellspacing="2" cellpadding="2">
|
|
|
367 |
<tr>
|
|
|
368 |
<?
|
|
|
369 |
$my_buttons=$cmd_buttons;
|
|
|
370 |
|
|
|
371 |
foreach(array("artikelStatus","rechnungStatus","lieferscheinStatus") as $wr_index)
|
|
|
372 |
{
|
|
|
373 |
$wr = &$web_rechte[modul_name][tool_name][$wr_index];
|
|
|
374 |
$wr = explode(";",$wr);
|
|
|
375 |
|
|
|
376 |
foreach($wr as $wr_key => $wr_value)
|
|
|
377 |
{
|
|
|
378 |
$wr[$wr_key] = explode("#",$wr[$wr_key]);
|
|
|
379 |
}
|
|
|
380 |
}
|
|
|
381 |
|
|
|
382 |
foreach($my_buttons as $my_buttons_index => $my_buttons_value)
|
|
|
383 |
{
|
|
|
384 |
if (!isset($user_rechte[modul_name][tool_name][rechnungStatus]))
|
|
|
385 |
{
|
|
|
386 |
if ($my_buttons_value[3] == "rechnungStatus")
|
|
|
387 |
{
|
|
|
388 |
$my_buttons[$my_buttons_index] = "";
|
|
|
389 |
}
|
|
|
390 |
|
|
|
391 |
}
|
|
|
392 |
}
|
|
|
393 |
unset($wr);
|
|
|
394 |
|
|
|
395 |
foreach($my_buttons as $my_button_index => $button)
|
|
|
396 |
{
|
|
|
397 |
echo "<td valign=top nowrap";
|
|
|
398 |
if (is_array($button))
|
|
|
399 |
{
|
|
|
400 |
echo " class=darkgray>";
|
|
|
401 |
echo "<a href=\"$self?Bestellung=$Bestellung&".$button[3]."[".$zeile_artikel[0]."]=".$button[0]."\" style=\"text-decoration:none;\"";
|
|
|
402 |
|
|
|
403 |
if ($zeile_artikel[$button[3]] == $button[1])
|
|
|
404 |
{
|
|
|
405 |
echo "class=".$button[2];
|
|
|
406 |
}
|
|
|
407 |
else
|
|
|
408 |
{
|
|
|
409 |
echo "class=status_off";
|
|
|
410 |
}
|
|
|
411 |
|
|
|
412 |
echo "> ";
|
|
|
413 |
|
|
|
414 |
//$my_output = &$web_rechte[modul_name][tool_name][$button[3]][$my_button_index-$button[4]][0];
|
|
|
415 |
if (empty($my_output)) { echo $button[0]; } else { echo $my_output; }
|
|
|
416 |
|
|
|
417 |
echo " </a>";
|
|
|
418 |
}
|
|
|
419 |
else
|
|
|
420 |
{
|
|
|
421 |
echo ">".$button;
|
|
|
422 |
}
|
|
|
423 |
echo "</td>";
|
|
|
424 |
}
|
|
|
425 |
?>
|
|
|
426 |
</tr>
|
|
|
427 |
</table>
|
|
|
428 |
</td>
|
|
|
429 |
</tr>
|
|
|
430 |
<?
|
|
|
431 |
}
|
|
|
432 |
else
|
|
|
433 |
{
|
|
|
434 |
$Versand_Artikel=$zeile_artikel;
|
|
|
435 |
?>
|
|
|
436 |
<tr class="<? if ($runner++ % 2 != 0) {?>lightgray<? } else { ?>darkgray<? } ?>">
|
|
|
437 |
<td width="5%" valign="top"> </td>
|
|
|
438 |
<td width="90%">
|
|
|
439 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
440 |
<tr>
|
|
|
441 |
<td nowrap valign="top" onDblClick="location.href='<?=$self?>?Bestellung=<?=$_GET[Bestellung];?><? if ($_GET[edit] != $zeile_artikel[0]) { ?>&edit=<?=$zeile_artikel[0];?><? } ?>'"> Versand:
|
|
|
442 |
<?
|
|
|
443 |
if ($zeile_artikel[Bezeichnung])
|
|
|
444 |
{
|
|
|
445 |
$zeile_artikel[kurzbezeichnung]=$zeile_artikel[Bezeichnung];
|
|
|
446 |
}
|
|
|
447 |
|
|
|
448 |
|
|
|
449 |
if ($_GET[edit] == $zeile_artikel[0]) { ?>
|
|
|
450 |
<input type="text" name="cmd[artikel_to_Bestellung][<?=$zeile_artikel[0];?>][Bezeichnung]" size="20" value="<? echo $zeile_artikel[kurzbezeichnung] ?>">
|
|
|
451 |
<? } else {
|
|
|
452 |
echo strip_tags($zeile_artikel[kurzbezeichnung]);
|
|
|
453 |
} ?>
|
|
|
454 |
</td>
|
|
|
455 |
<td align="right" nowrap valign="top" onDblClick="location.href='<?=$self?>?Bestellung=<?=$_GET[Bestellung];?><? if ($_GET[edit] != $zeile_artikel[0]) { ?>&edit=<?=$zeile_artikel[0];?><? } ?>'">
|
|
|
456 |
|
|
|
457 |
<? if ($_GET[edit] == $zeile_artikel[0]) { ?>
|
|
|
458 |
<input type="text" name="cmd[artikel_to_Bestellung][<?=$zeile_artikel[0];?>][Preis_pro_Stueck]" size="3" value="<? echo $zeile_artikel[2] ?>" onChange="this.value=killkomma(this.value);">
|
|
|
459 |
<? } else {
|
|
|
460 |
echo number_format($zeile_artikel[2],2,',','.');
|
|
|
461 |
} ?>
|
|
|
462 |
|
|
|
463 |
€ </td>
|
|
|
464 |
</tr>
|
|
|
465 |
</table>
|
|
|
466 |
</td>
|
|
|
467 |
<td colspan=9 align="center"> </td>
|
|
|
468 |
</tr>
|
|
|
469 |
<?
|
|
|
470 |
}
|
|
|
471 |
}
|
|
|
472 |
if (!$Versand_Artikel)
|
|
|
473 |
{
|
|
|
474 |
$bufferLand = $BestellData[liefer_Land];
|
|
|
475 |
if (empty($bufferLand)) { $bufferLand = $BestellData[Land]; }
|
|
|
476 |
|
|
|
477 |
$versandItems = getVersandItems
|
|
|
478 |
(
|
|
|
479 |
$BestellData[shops_ID],
|
|
|
480 |
$_SESSION[shops][$BestellData["shops_ID"]]["Language"],
|
|
|
481 |
$bufferLand
|
|
|
482 |
);
|
|
|
483 |
|
|
|
484 |
if ($versandItems != array())
|
|
|
485 |
{
|
|
|
486 |
?>
|
|
|
487 |
<tr class="<? if ($runner++ % 2 != 0) {?>lightgray<? } else { ?>darkgray<? } ?>">
|
|
|
488 |
<td width="5%" valign="top"> </td>
|
|
|
489 |
<td width="90%">
|
|
|
490 |
<select name="versandItem">
|
|
|
491 |
<option></option>
|
|
|
492 |
<?
|
|
|
493 |
foreach($versandItems as $versandOption)
|
|
|
494 |
{
|
|
|
495 |
?><option value="<?=base64_encode(serialize($versandOption))?>"><?
|
|
|
496 |
echo $versandOption[kurz];
|
|
|
497 |
?></option><?
|
|
|
498 |
}
|
|
|
499 |
?>
|
|
|
500 |
</select><input type="submit" name="enterVersand" value="OK" />
|
|
|
501 |
</td>
|
|
|
502 |
<td colspan=9 align="center"> </td>
|
|
|
503 |
</tr>
|
|
|
504 |
<?
|
|
|
505 |
}
|
|
|
506 |
}
|
|
|
507 |
?>
|
|
|
508 |
<tr>
|
|
|
509 |
<td width="5%" valign="top"> </td>
|
|
|
510 |
<td> </td>
|
|
|
511 |
<td>
|
|
|
512 |
<?
|
|
|
513 |
//if ($web_rechte[modul_name][tool_name]["massen_schalter"])
|
|
|
514 |
{
|
|
|
515 |
?><table border="0" cellspacing="2" cellpadding="2"><tr><?
|
|
|
516 |
$my_buttons=$cmd_buttons;
|
|
|
517 |
|
|
|
518 |
foreach(array("artikelStatus","rechnungStatus") as $wr_index)
|
|
|
519 |
{
|
|
|
520 |
$wr = &$web_rechte[modul_name][tool_name][$wr_index];
|
|
|
521 |
$wr = explode(";",$wr);
|
|
|
522 |
|
|
|
523 |
foreach($wr as $wr_key => $wr_value)
|
|
|
524 |
{
|
|
|
525 |
$wr[$wr_key] = explode("#",$wr[$wr_key]);
|
|
|
526 |
}
|
|
|
527 |
}
|
|
|
528 |
|
|
|
529 |
foreach($my_buttons as $my_buttons_index => $my_buttons_value)
|
|
|
530 |
{
|
|
|
531 |
if (!isset($user_rechte[modul_name][tool_name][rechnungStatus]))
|
|
|
532 |
{
|
|
|
533 |
if ($my_buttons_value[3] == "rechnungStatus")
|
|
|
534 |
{
|
|
|
535 |
$my_buttons[$my_buttons_index] = "";
|
|
|
536 |
}
|
|
|
537 |
}
|
|
|
538 |
}
|
|
|
539 |
unset($wr);
|
|
|
540 |
|
|
|
541 |
foreach($my_buttons as $my_button_index => $button)
|
|
|
542 |
{
|
|
|
543 |
echo "<td valign=top nowrap";
|
|
|
544 |
if (is_array($button))
|
|
|
545 |
{
|
|
|
546 |
echo " class=darkgray>";
|
|
|
547 |
echo "<a href=\"$self?Bestellung=$Bestellung";
|
|
|
548 |
foreach($itemList as $id)
|
|
|
549 |
{
|
|
|
550 |
echo "&".$button[3]."[".$id."]=".$button[0];
|
|
|
551 |
}
|
|
|
552 |
echo "\" style=\"text-decoration:none;\"";
|
|
|
553 |
echo "class=".$button[2];
|
|
|
554 |
echo "> ";
|
|
|
555 |
|
|
|
556 |
if (empty($my_output)) { echo "∑"; } else { echo $my_output; }
|
|
|
557 |
|
|
|
558 |
echo " </a>";
|
|
|
559 |
}
|
|
|
560 |
else
|
|
|
561 |
{
|
|
|
562 |
echo ">".$button;
|
|
|
563 |
}
|
|
|
564 |
echo "</td>";
|
|
|
565 |
}
|
|
|
566 |
?></tr></table><?
|
|
|
567 |
}
|
|
|
568 |
?>
|
|
|
569 |
</td>
|
|
|
570 |
</tr>
|
|
|
571 |
<tr>
|
|
|
572 |
<td width="5%" valign="top"> </td>
|
|
|
573 |
<td align="right"> Bestellwert:
|
|
|
574 |
<? echo number_format($summe, 2, ',', '.') ?>
|
|
|
575 |
€ </td>
|
|
|
576 |
<td colspan="9"><input type="button" name="manu" value="Neuen Artikel anlegen" onClick="fenster=window.open('bestellung_liste_manu.php?Bestellung=<? echo $_GET['Bestellung']; ?>', 'fenster','toolbar=no,status=no,menubar=no,scrollbars=yes')"></td>
|
|
|
577 |
</tr>
|
|
|
578 |
<?
|
|
|
579 |
if ($Versand_Artikel)
|
|
|
580 |
{
|
|
|
581 |
?>
|
|
|
582 |
<tr>
|
|
|
583 |
<td valign="top"> </td>
|
|
|
584 |
<td nowrap> Versandstatus (O=offen; F=freigegeben; V=versand)</td>
|
|
|
585 |
<td colspan=9 align="center" bgcolor="#FFFF00">
|
|
|
586 |
<table border="0" cellspacing="2" cellpadding="2">
|
|
|
587 |
<tr>
|
|
|
588 |
<td align="center" valign="top" nowrap class=darkgray><a href="<? echo $self ?>?Bestellung=<? echo $Bestellung ?>&artikelStatus[<? echo $Versand_Artikel[0] ?>]=O" style="text-decoration:none;" <? if ($Versand_Artikel[1] == 'offen') { ?>class="status_red"<? } else { ?>class="status_off"<? } ?>> O </a></td>
|
|
|
589 |
<td align="center" valign="top" nowrap class=darkgray><a href="<? echo $self ?>?Bestellung=<? echo $Bestellung ?>&artikelStatus[<? echo $Versand_Artikel[0] ?>]=F" style="text-decoration:none;" <? if ($Versand_Artikel[1] == 'freigegeben') { ?>class="status_yellow"<? } else { ?>class="status_off"<? } ?>> F </a></td>
|
|
|
590 |
<td align="center" valign="top" nowrap class=darkgray><a href="<? echo $self ?>?Bestellung=<? echo $Bestellung ?>&artikelStatus[<? echo $Versand_Artikel[0] ?>]=V" style="text-decoration:none" <? if ($Versand_Artikel[1] == 'versand') { ?>class="status_green"<? } else { ?>class="status_off"<? } ?>> V </a></td>
|
|
|
591 |
</tr>
|
|
|
592 |
</table>
|
|
|
593 |
</td>
|
|
|
594 |
</tr>
|
|
|
595 |
<?
|
|
|
596 |
}
|
|
|
597 |
?>
|
|
|
598 |
</table>
|
|
|
599 |
<table cellspacing=3 cellpadding=2 class=darkgray>
|
|
|
600 |
<tr>
|
|
|
601 |
<?
|
|
|
602 |
foreach($my_buttons as $my_button_index => $button)
|
|
|
603 |
{
|
|
|
604 |
if (is_array($button))
|
|
|
605 |
{
|
|
|
606 |
?><td align="center" nowrap class="<?=$button[2];?>"><?
|
|
|
607 |
$my_output = &$web_rechte[modul_name][tool_name][$button[3]][$my_button_index-$button[4]][1];
|
|
|
608 |
if (empty($my_output)) { echo $button[1]; } else { echo $my_output; }
|
|
|
609 |
?></td><?
|
|
|
610 |
}
|
|
|
611 |
else
|
|
|
612 |
{
|
|
|
613 |
echo "</tr></table><table cellspacing=3 cellpadding=2 class=darkgray><tr>";
|
|
|
614 |
}
|
|
|
615 |
}
|
|
|
616 |
?>
|
|
|
617 |
</tr>
|
|
|
618 |
</table>
|
|
|
619 |
</td>
|
|
|
620 |
</tr>
|
|
|
621 |
<tr>
|
|
|
622 |
<td valign="top" class="links">Bemerkung:</td>
|
|
|
623 |
<td class="rechts">
|
|
|
624 |
<textarea name="Bemerkung" cols="70" rows="8"><? echo $zeile[Bemerkung] ?></textarea>
|
|
|
625 |
</td>
|
|
|
626 |
</tr>
|
|
|
627 |
<?
|
|
|
628 |
$Feld="Bemerkung_extern";
|
|
|
629 |
if (isset($user_rechte[modul_name][tool_name][$Feld]))
|
|
|
630 |
{
|
|
|
631 |
|
|
|
632 |
?>
|
|
|
633 |
<tr>
|
|
|
634 |
<td valign="top" class="links">Bemerkung extern:</td>
|
|
|
635 |
<td class="rechts">
|
|
|
636 |
<textarea name="Bemerkung_extern" cols="70" rows="8"><? echo $zeile["Bemerkung_extern"] ?></textarea>
|
|
|
637 |
</td>
|
|
|
638 |
</tr>
|
|
|
639 |
<? } ?>
|
|
|
640 |
<tr>
|
|
|
641 |
<td class="links">Bestellt: </td>
|
|
|
642 |
<td class="rechts">am:
|
|
|
643 |
<? $erstellt_am=datetime2human($zeile[erstellt_am]); ?>
|
|
|
644 |
<? echo $erstellt_am[Datum] ?>
|
|
|
645 |
um:
|
|
|
646 |
<? echo $erstellt_am[Zeit] ?>
|
|
|
647 |
</td>
|
|
|
648 |
</tr>
|
|
|
649 |
<? if ($zeile[erstellt_von]) { ?>
|
|
|
650 |
<tr>
|
|
|
651 |
<td nowrap class="links">Erstbearbeiter:</td>
|
|
|
652 |
<td class="rechts">
|
|
|
653 |
<? echo $zeile[erstellt_von] ?>
|
|
|
654 |
</td>
|
|
|
655 |
</tr>
|
|
|
656 |
<? } ?>
|
|
|
657 |
<tr>
|
|
|
658 |
<td nowrap class="links">letzte Änderung: </td>
|
|
|
659 |
<td class="rechts">am:
|
|
|
660 |
<?
|
|
|
661 |
if (strpos ($zeile[letzte_Aenderung_am], " "))
|
|
|
662 |
{
|
|
|
663 |
$letzte_Aenderung_am=datetime2human($zeile[letzte_Aenderung_am]);
|
|
|
664 |
}
|
|
|
665 |
else
|
|
|
666 |
{
|
|
|
667 |
$letzte_Aenderung_am=timestamp2human($zeile[letzte_Aenderung_am]);
|
|
|
668 |
}
|
|
|
669 |
?>
|
|
|
670 |
<? echo $letzte_Aenderung_am[Datum] ?>
|
|
|
671 |
um:
|
|
|
672 |
<? echo $letzte_Aenderung_am[Zeit] ?>
|
|
|
673 |
von:
|
|
|
674 |
<? echo $zeile[letzte_Aenderung_von] ?>
|
|
|
675 |
</td>
|
|
|
676 |
</tr>
|
|
|
677 |
<tr>
|
|
|
678 |
<td align="right" colspan="3" class="links">
|
|
|
679 |
<?
|
|
|
680 |
//$web_settings übersetzen
|
|
|
681 |
$Userdata=$zeile;
|
|
|
682 |
$Datum=$erstellt_am[Datum];
|
|
|
683 |
$Zeit=$erstellt_am[Zeit];
|
|
|
684 |
$Username=$PHP_AUTH_USER;
|
|
|
685 |
$Heute=date("d.m.Y");
|
|
|
686 |
$jetzt=date("H:i");
|
|
|
687 |
|
|
|
688 |
$shops_ID=$zeile[shops_ID];
|
|
|
689 |
if (is_array($web_settings[$shops_ID]))
|
|
|
690 |
{
|
|
|
691 |
foreach(array_keys($web_settings[$shops_ID]) as $wsID)
|
|
|
692 |
{
|
|
|
693 |
$buffer=$web_settings[$shops_ID][$wsID];
|
|
|
694 |
eval ("\$web_settings[".$shops_ID."][".$wsID."]=\"$buffer\";");
|
|
|
695 |
$web_settings[$zeile[shops_ID]][$wsID]=rawurlencode($web_settings[$zeile[shops_ID]][$wsID]);
|
|
|
696 |
}
|
|
|
697 |
}
|
|
|
698 |
|
|
|
699 |
for ($i=1; $i<=5; $i++)
|
|
|
700 |
{
|
|
|
701 |
$Felddaten = explode(";", $web_rechte[modul_name][tool_name]["button".$i]);
|
|
|
702 |
if (isset($user_rechte[modul_name][tool_name]["button".$i]))
|
|
|
703 |
{
|
|
|
704 |
?>
|
|
|
705 |
<input
|
|
|
706 |
name="update[]"
|
|
|
707 |
type="submit"
|
|
|
708 |
class="status_red"
|
|
|
709 |
value="<?=$Felddaten[0];?>"
|
|
|
710 |
onClick="MM_goToURL('parent','mailto:<? echo $zeile[E_Mail] ?>?subject=<?=$web_settings[$zeile[shops_ID]][$Felddaten[1]];?>&body=<?=$web_settings[$zeile[shops_ID]][$Felddaten[2]];?>'); inTextfeld('<?=rawurldecode($web_settings[$zeile[shops_ID]][$Felddaten[3]]);?> \n')"
|
|
|
711 |
>
|
|
|
712 |
<?
|
|
|
713 |
}
|
|
|
714 |
}
|
|
|
715 |
?>
|
|
|
716 |
<p>
|
|
|
717 |
<input type="hidden" name="Bestellung" value="<? echo $zeile[ID] ?>">
|
|
|
718 |
<? if (isset($user_rechte[modul_name][tool_name][loeschen2])) { ?>
|
|
|
719 |
<input type="submit" name="delete2" value="Nur Bestellung löschen" onClick="return confirm('Wollen sie diese Bestellung wirklich löschen?')">
|
|
|
720 |
<? } ?>
|
|
|
721 |
<? if (isset($user_rechte[modul_name][tool_name][loeschen])) { ?>
|
|
|
722 |
<input type="submit" name="delete" value="Bestellung + Kundendaten löschen" onClick="return confirm('Wollen sie diese Bestellung und die dazugehörigen Kundendaten wirklich löschen?')">
|
|
|
723 |
<? } ?>
|
|
|
724 |
|
|
|
725 |
<fieldset style="float:right; padding:0px; border:none;">
|
|
|
726 |
<legend>Speichern und...</legend>
|
|
|
727 |
<input type="submit" name="update[prev]" value="...zurück">
|
|
|
728 |
<input type="submit" name="update[current]" value="...nur Speichern">
|
|
|
729 |
<input type="submit" name="update[list]" value="...zur Übersicht">
|
|
|
730 |
<input type="submit" name="update[next]" value="...weiter">
|
|
|
731 |
</fieldset>
|
|
|
732 |
|
|
|
733 |
<div style="clear:both;">
|
|
|
734 |
<input type="reset" value="Zurücksetzen">
|
|
|
735 |
</div>
|
|
|
736 |
<?
|
|
|
737 |
// Termintaste
|
|
|
738 |
$Feld="termin";
|
|
|
739 |
if (isset($user_rechte[modul_name][tool_name][$Feld]))
|
|
|
740 |
{
|
|
|
741 |
?><input name="button" type="button" onClick="systemtermin('Bestellung <? echo $zeile[ID] ?> vom <? echo $erstellt_am[Datum] ?>')" value="Termin"><?
|
|
|
742 |
}
|
|
|
743 |
?>
|
|
|
744 |
<?
|
|
|
745 |
// Auftrag drucken Taste
|
|
|
746 |
|
|
|
747 |
if (isset($user_rechte[modul_name]["best_manu"]["kundenauftrag_drucken"]))
|
|
|
748 |
{
|
|
|
749 |
?><input name="button" type="button" onClick="kundenauftrag_drucken(<?=$zeile[ID];?>);" value="Auftrag drucken"><?
|
|
|
750 |
|
|
|
751 |
}
|
|
|
752 |
|
|
|
753 |
|
|
|
754 |
?>
|
|
|
755 |
</p>
|
|
|
756 |
</td>
|
|
|
757 |
</tr>
|
|
|
758 |
</table>
|
|
|
759 |
|
|
|
760 |
?>
|