| 1 |
lars |
1 |
<script>
|
|
|
2 |
$(function(){
|
|
|
3 |
$('.bestellen').button().click(order_item);
|
|
|
4 |
$('#lagerbestellung').dialog("destroy").dialog({
|
|
|
5 |
modal:true,
|
|
|
6 |
autoOpen:false,
|
|
|
7 |
width:600,
|
|
|
8 |
height:"auto",
|
|
|
9 |
resizable:false,
|
|
|
10 |
buttons:{
|
|
|
11 |
"bestellen": function (){
|
|
|
12 |
$(this).dialog("close");
|
|
|
13 |
$('#meldung').load("lagerbestellung.php",$('#bestellformular').serializeArray()).dialog("open");
|
|
|
14 |
}
|
|
|
15 |
}
|
|
|
16 |
});
|
|
|
17 |
$('#meldung').dialog("destroy").dialog({
|
|
|
18 |
autoOpen:false,
|
|
|
19 |
modal:true,
|
|
|
20 |
width:500,
|
|
|
21 |
height:"auto",
|
|
|
22 |
resizable:false,
|
|
|
23 |
buttons:{
|
|
|
24 |
"OK": function(){
|
|
|
25 |
$(this).dialog("close");
|
|
|
26 |
}
|
|
|
27 |
}
|
|
|
28 |
});
|
|
|
29 |
function order_item()
|
|
|
30 |
{
|
|
|
31 |
id=this.id.split("_");
|
|
|
32 |
lieferant=id[1];
|
|
|
33 |
lager=id[2];
|
|
|
34 |
item_id=id[3];
|
|
|
35 |
bestellung=id[4];
|
|
|
36 |
shop=id[5];
|
|
|
37 |
$('#lagerbestand').dialog("close");
|
|
|
38 |
$('#lagerbestellung').load("lagerbestellung.php",{
|
|
|
39 |
item:item_id,
|
|
|
40 |
order:bestellung,
|
|
|
41 |
lager:lager,
|
|
|
42 |
lieferant:lieferant,
|
|
|
43 |
shop:shop
|
|
|
44 |
}).dialog("open");
|
|
|
45 |
}
|
|
|
46 |
});
|
|
|
47 |
</script>
|
|
|
48 |
<table width="100%">
|
|
|
49 |
<tr>
|
|
|
50 |
<td width="100%">
|
|
|
51 |
<table width="100%">
|
|
|
52 |
<tr class="links">
|
|
|
53 |
<td>Lieferant</td>
|
|
|
54 |
<td>Lagername</td>
|
|
|
55 |
<td width="100" align="center">Verfügbarkeit</td>
|
|
|
56 |
<td width="120">EK-Preis</td>
|
|
|
57 |
<td width="120">VK-Preis</td>
|
|
|
58 |
{if $order_id && $shop_id}
|
|
|
59 |
<td width="100">Aktion</td>
|
|
|
60 |
{/if}
|
|
|
61 |
</tr>
|
|
|
62 |
{section loop=$lieferanten name=l_ind}
|
|
|
63 |
{section loop=$lieferanten[l_ind].lager name=lager_ind}
|
|
|
64 |
<tr class="{cycle values="rechts"}">
|
|
|
65 |
<td>{$lieferanten[l_ind].name}</td>
|
|
|
66 |
<td>{$lieferanten[l_ind].lager[lager_ind].name}</td>
|
|
|
67 |
<td align="center">
|
|
|
68 |
{if !is_null($lieferanten[l_ind].lager[lager_ind].bestand)}
|
|
|
69 |
{$lieferanten[l_ind].lager[lager_ind].bestand}
|
|
|
70 |
{else}
|
|
|
71 |
{if isset($lieferanten[l_ind].lager[lager_ind].verf_codes[$lieferanten[l_ind].lager[lager_ind].status])}
|
|
|
72 |
<img src="/images/lager/status_{$lieferanten[l_ind].lager[lager_ind].status.image}.gif" title="{$lieferanten[l_ind].lager[lager_ind].verf_codes[$lieferanten[l_ind].lager[lager_ind].status].name}">
|
|
|
73 |
{else}
|
|
|
74 |
{$lieferanten[l_ind].lager[lager_ind].status}
|
|
|
75 |
{/if}
|
|
|
76 |
{/if}
|
|
|
77 |
</td>
|
|
|
78 |
<td>{$lieferanten[l_ind].lager[lager_ind].ek_preis|money_format}</td>
|
|
|
79 |
<td>{$lieferanten[l_ind].lager[lager_ind].vk_preis|money_format}</td>
|
|
|
80 |
{if $order_id && $shop_id}
|
|
|
81 |
<td>
|
|
|
82 |
{if $lieferanten[l_ind].lager[lager_ind].bestellbar==1}
|
|
|
83 |
<button class="bestellen" id="bestellen_{$lieferanten[l_ind].id}_{$lieferanten[l_ind].lager[lager_ind].id}_{$item_id}_{$order_id}_{$shop_id}">bestellen</button>
|
|
|
84 |
{/if}
|
|
|
85 |
</td>
|
|
|
86 |
{/if}
|
|
|
87 |
</tr>
|
|
|
88 |
{/section}
|
|
|
89 |
{sectionelse}
|
|
|
90 |
<tr>
|
|
|
91 |
<td colspan="4">Keinen Lieferanten zu diesem Artikel gefunden!</td>
|
|
|
92 |
</tr>
|
|
|
93 |
{/section}
|
|
|
94 |
</table>
|
|
|
95 |
</td>
|
|
|
96 |
</tr>
|
|
|
97 |
</table>
|
|
|
98 |
|
|
|
99 |
<div id="lagerbestellung" title="Bestellung aufgeben">
|
|
|
100 |
</div>
|
|
|
101 |
|
|
|
102 |
<div id="meldung" title="Bestellung aufgegeben"></div>
|