Subversion-Projekte lars-tiefland.webanos.marine-sales.de

Revision

Revision 553 | Revision 565 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 553 Revision 554
Zeile 3... Zeile 3...
3
        <td class="links">
3
        <td class="links">
4
            <b>Preise</b>
4
            <b>Preise</b>
5
        </td>
5
        </td>
6
        <td>
6
        <td>
7
            {assign var=Feld value="preise"}
7
            {assign var=Feld value="preise"}
-
 
8
            <link rel="stylesheet" type="text/css" href="{$smarty.session.jquery_style}"/>
-
 
9
            <link rel="stylesheet" type="text/css" href="redaktion.css"/>
-
 
10
            <style>
-
 
11
                body
-
 
12
                {
-
 
13
                    font-family: verdana, Helvetica, sans-serif;
-
 
14
                    font-size: 10pt;
-
 
15
                }
-
 
16
            </style>
-
 
17
            {for $i=1;$i<$preis_anz;$i++}
-
 
18
                <div id="reiter{$i}" class="reiter">
-
 
19
                    <ul>
-
 
20
                        <li>
-
 
21
                            {assign var="preisLabel" value=";"|explode: $preise[$i]}
-
 
22
                            <a href="#preis{$i}">{$preisLabel[0]|default:"Preis {$i}"}</a>
-
 
23
                        </li>
-
 
24
                        {if isset($web_rechte.online_shop.artikel.preisstaffel)}
-
 
25
                            <li>
-
 
26
                                <a href="#staffel{$i}">Staffel {$preisLabel[0]|default:"Preis {$i}"}</a>
-
 
27
                            </li>
-
 
28
                        {/if}
-
 
29
                    </ul>
-
 
30
                    <div id="preis{$i}">
-
 
31
                        <table>
-
 
32
                            <tr>
-
 
33
                                <td>{$preisLabel[0]}:</td>
-
 
34
                                <td>neuer Preis:</td>
-
 
35
                                <td>neuer Preis g&uuml;ltig ab:</td>
-
 
36
                                <td>neuer Preis g&uuml;ltig bis:</td>
-
 
37
                            </tr>
-
 
38
                            <tr>
-
 
39
                                <td>
-
 
40
                                    {if !in_array("preise",$gesperrte_felder) || !$zeile.mutter}
-
 
41
                                        <input type="text" {if $cfg[$i]["Brutto_Netto_Rechner"]==1}class="Brutto_Netto_Rechner_Basis"{/if} id="staffel_{$i}_preis_0" name="staffel[{$i}][preis][0]" value="{$preis[$i].preis[0]}" data-calc-preis="{$preis[$i].preis_calc[0]}" />
-
 
42
                                        <input type="hidden" name="staffel[{$i}][menge][0]" value="0" />
-
 
43
                                    {else}
-
 
44
                                        <div {if $cfg[$i]["Brutto_Netto_Rechner"]==1}class="Brutto_Netto_Rechner_Basis"{/if} id="staffel_{$i}_preis_0" data-calc-preis="{$preis[$i].preis_calc[0]}">{$preis[$i].preis[0]}</div>
-
 
45
                                    {/if}
-
 
46
                                    {if $cfg[$i]["Preiskalkulation"]==1}
-
 
47
                                        <a id="calc" data-preis-index="{$i}"></a>
-
 
48
                                    {/if}
-
 
49
                                    {if $cfg[$i]["Brutto_Netto_Rechner"]==1}
-
 
50
                                        <br />Nettopreis:
-
 
51
                                        <span class="veraenderter_Brutto_Netto_Rechner_staffel_{$i}_preis_0">&nbsp;</span>
-
 
52
                                    {/if}
-
 
53
                                </td>
-
 
54
                                <td>
-
 
55
                                    {if !in_array("preise",$gesperrte_felder) || !$zeile.mutter}
-
 
56
                                        <input type="text" id="staffel_{$i}_preisneu_0" name="staffel[{$i}][preisneu][0]" value="{$preis[$i].preisneu[0]}" />
-
 
57
                                    {else}
-
 
58
                                        <div>{$preis[$i].preisneu[0]}</div>
-
 
59
                                    {/if}
-
 
60
                                </td>
-
 
61
                                <td>
-
 
62
                                    {if !in_array("preise",$gesperrte_felder) || !$zeile.mutter}
-
 
63
                                        <input class="datefrom" type="date" id="staffel_{$i}_datefrom_0" name="staffel[{$i}][datefrom][0]" value="{$preis[$i].datefrom[0]}" data-default="{$smarty.session["artikel.php"].datefrom[0]}" />
-
 
64
                                    {else}
-
 
65
                                        <div>{$preis[$i].datefrom[0]}</div>
-
 
66
                                    {/if}
-
 
67
                                </td>
-
 
68
                                <td>
-
 
69
                                    {if !in_array("preise",$gesperrte_felder) || !$zeile.mutter}
-
 
70
                                        <input type="date" id="staffel_{$i}_dateto_0" name="staffel[{$i}][dateto][0]" value="{$preis[$i].dateto[0]}" />
-
 
71
                                    {else}
-
 
72
                                        <div>{$preis[$i].dateto[0]}</div>
-
 
73
                                    {/if}
-
 
74
                                </td>
-
 
75
                            </tr>
-
 
76
                        </table>
-
 
77
                        {if $preis[$i].geaendert_am}
-
 
78
                            <br />
-
 
79
                            geändert: {$preis[$i].geaendert_am|date_format:"d.m.Y H:i:s"}
-
 
80
                        {/if}
-
 
81
                    </div>
-
 
82
                    {if isset($web_rechte.online_shop.artikel.preisstaffel)}
-
 
83
                        <div id="staffel{$i}" class="staffel">
-
 
84
                            <table id="table_staffel_{$i}">
-
 
85
                                {foreach $preis[$i].menge as $nr => $wert}
-
 
86
                                    {if $nr ne 0}
-
 
87
                                        <tr id="tr_staffel_{$i}_{$nr}" class="tr_staffel_{$i}">
-
 
88
                                            <td>
-
 
89
                                                ab:
-
 
90
                                                <input type="text" name="staffel[{$i}][menge][]" value="{$wert}"/>
-
 
91
                                            </td>
-
 
92
                                            <td>
-
 
93
                                                Preis:
-
 
94
                                                <input type="text" name="staffel[{$i}][preis][]" value="{$preis[$i].preis[$nr]}" />
-
 
95
                                            </td>
-
 
96
                                            <td>
-
 
97
                                                neuer Preis:
-
 
98
                                                <input type="text" name="staffel[{$i}][preisneu][]" value="{$preis[$i].preisneu[$nr]}" />
-
 
99
                                            </td>
-
 
100
                                            <td>
-
 
101
                                                neuer Preis g&uuml;ltig ab:
-
 
102
                                                <input class="datefrom" type="date" name="staffel[{$i}][datefrom][]" value="{$preis[$i].datefrom[$nr]}" data-default="{$smarty.session["artikel.php"].datefrom[0]}" />
-
 
103
                                            </td>
-
 
104
                                            <td>
-
 
105
                                                neuer Preis g&uuml;ltig bis:
-
 
106
                                                <input type="date" name="staffel[{$i}][dateto][]" value="{$preis[$i].dateto[$nr]}" />
-
 
107
                                            </td>
-
 
108
                                            <td>
-
 
109
                                                <img src="../dokumente/gfx/delete_record.gif" style="cursor:pointer" id="del_staffel_{$i}_{$nr}" class="delete"/>
-
 
110
                                            </td>
-
 
111
                                        </tr>
-
 
112
                                    {/if}
-
 
113
                                {/foreach}
-
 
114
                            </table>
-
 
115
                            <span>
-
 
116
            <img src="../dokumente/gfx/add.gif" style="cursor:pointer" id="new_staffel_{$i}"/>
-
 
117
        </span>
-
 
118
                        </div>
-
 
119
                    {/if}
-
 
120
                </div>
-
 
121
            {/for}
-
 
122
            <script>
-
 
123
                $(function()
-
 
124
                {
-
 
125
                    {for $i=1;$i<$preis_anz;$i++}
-
 
126
                    $('#reiter'+{$i}).tabs();
-
 
127
                    $('#new_staffel_'+{$i}).click(add_staffel);
-
 
128
                    $('.delete').click(del_staffel);
-
 
129
                    {if $cfg[$i]["Brutto_Netto_Rechner"]==1}
-
 
130
                    $('#staffel_{$i}_preis_0').change(Brutto_Netto_Rechner_Single);
-
 
131
                    {/if}
-
 
132
                    {/for}
-
 
133
                    $('#tax1').change(Brutto_Netto_Rechner).change();
-
 
134
                });
-
 
135
                function add_staffel()
-
 
136
                {
-
 
137
                    arr=this.id.split('_');
-
 
138
                    nr=arr[2];
-
 
139
                    elems=$('.tr_staffel_'+nr).length;
-
 
140
                    next_id=Math.abs(elems+1);
-
 
141
                    arr[0]="table";
-
 
142
                    table_id=arr.join('_');
-
 
143
                    del_id='del_staffel_'+nr+'_'+next_id;
8
            {include file="preisstaffel/page.tpl"}
144
                    r_html='<tr id="tr_staffel_'+nr+'_'+next_id+'" class="tr_staffel_'+nr+'"><td>ab: <input type="text" name="staffel['+nr+'][menge][]" value=""></td><td>Preis: <input type="text" name="staffel['+nr+'][preis][]" value="" onkeyup="killkomma_neu(this);" onblur="this.value=killkomma(this.value);"></td><td>neuer Preis: <input type="text" name="staffel['+nr+'][preisneu][]" value="" onkeyup="killkomma_neu(this);" onblur="this.value=killkomma(this.value);"></td><td>neuer Preis g&uml;ltig ab:<input type="date" name="staffel['+nr+'][datefrom][]" value="" /></td><td>neuer Preis g&uml;ltig bis:<input type="date" name="staffel['+nr+'][dateto][]" value="" /></td><td><img src="../dokumente/gfx/delete_record.gif" style="cursor:pointer" id="'+del_id+'" class="delete"></td></tr>';
-
 
145
                    $('#'+table_id).append(r_html);
-
 
146
                    $('#'+del_id).click(del_staffel);
-
 
147
                }
-
 
148
 
-
 
149
                function del_staffel()
-
 
150
                {
-
 
151
                    arr=this.id.split('_');
-
 
152
                    arr[0]="tr";
-
 
153
                    tr_id=arr.join('_');
-
 
154
                    $('#'+tr_id).remove();
-
 
155
                }
-
 
156
                function Brutto_Netto_Rechner(){
-
 
157
                    $(".Brutto_Netto_Rechner_Basis").each(Brutto_Netto_Rechner_Single);
-
 
158
                }
-
 
159
 
-
 
160
                function Brutto_Netto_Rechner_Single()
-
 
161
                {
-
 
162
                    mwstString=$("#tax1 :selected").text();
-
 
163
                    var mwst;
-
 
164
                    if(mwstString.toString().indexOf("%") != -1){
-
 
165
                        mwst = mwstString.split("%");
-
 
166
                        mwst = mwst[0];
-
 
167
                    }else{
-
 
168
                        mwst = mwstString;
-
 
169
                    }
-
 
170
                    mwst = mwst.trim();
-
 
171
                    name = $(this).attr("id");
-
 
172
                    value = $(this).val();
-
 
173
 
-
 
174
                    className="veraenderter_Brutto_Netto_Rechner_"+name;
-
 
175
                    url="/Online-Shop/errechneNettoPreis.php?preis="+value+"&mwst="+mwst;
-
 
176
                    $.ajax({
-
 
177
                        "async" :false,
-
 
178
                        "url":url,
-
 
179
                        "success":function(html){
-
 
180
                            $('.'+className).html(html);
-
 
181
                        },
-
 
182
                    });
-
 
183
                }
-
 
184
            </script>
9
            {assign var=Feld2 value= "tax1"}
185
            {assign var=Feld2 value= "tax1"}
10
            {if ( isset( $user_rechte[$smarty.const.modul_name][$smarty.const.tool_name][$Feld2] ) )}
186
            {if ( isset( $user_rechte[$smarty.const.modul_name][$smarty.const.tool_name][$Feld2] ) )}
11
            <br />
187
            <br />
12
            Steuersatz:
188
            Steuersatz:
13
            {if in_array( strtolower( $Feld ), $gesperrte_felder ) && $zeile["mutter"]}
189
            {if in_array( strtolower( $Feld ), $gesperrte_felder ) && $zeile["mutter"]}
Zeile 16... Zeile 192...
16
            {html_options name="tax1" options=$taxArr selected=$zeile.tax1 id="tax1"}
192
            {html_options name="tax1" options=$taxArr selected=$zeile.tax1 id="tax1"}
17
            {/if}
193
            {/if}
18
            {/if}
194
            {/if}
19
        </td>
195
        </td>
20
    </tr>
196
    </tr>
-
 
197
<script>
-
 
198
    $(function(){
-
 
199
        $('#calc').button({
-
 
200
            icons:{
-
 
201
                primary:"ui-icon-calculator"
-
 
202
            }
-
 
203
        }).click(show_min_price_dlg);
-
 
204
        $('.datefrom').focus(function(){
-
 
205
            if(!$(this).val())
-
 
206
            {
-
 
207
                $(this).val($(this).attr("data-default"));
-
 
208
            }
-
 
209
        })
-
 
210
        $('#min_price_dlg').dialog({
-
 
211
            autoOpen:false,
-
 
212
            modal:true,
-
 
213
            resizable:false,
-
 
214
            width:400,
-
 
215
            buttons:[
-
 
216
                {
-
 
217
                    text:"berchnen",
-
 
218
                    icons: {
-
 
219
                        primary: "ui-icon-calculator"
-
 
220
                    },
-
 
221
                    click:function()
-
 
222
                    {
-
 
223
                        calc_min_price();
-
 
224
                    }
-
 
225
                },
-
 
226
                {
-
 
227
                    text:"speichern",
-
 
228
                    icons: {
-
 
229
                        primary: "ui-icon-check"
-
 
230
                    },
-
 
231
                    click:function()
-
 
232
                    {
-
 
233
                        daten={
-
 
234
                            minPreis:$('#mindestpreis').val(),
-
 
235
                            artikel:$('#a_id').val(),
-
 
236
                            pIndex:$('#pIndex').val()
-
 
237
                        }
-
 
238
                        $.post("save_min_price.php",daten);
-
 
239
                        document.location.href="artikel.php?action=edit&ID="+$('#a_id').val();
-
 
240
                        $(this).dialog("close");
-
 
241
                    }
-
 
242
                },
-
 
243
                {
-
 
244
                    text:"verwerfen",
-
 
245
                    icons:{
-
 
246
                        primary:"ui-icon-close"
-
 
247
                    },
-
 
248
                    click:function()
-
 
249
                    {
-
 
250
                        $(this).dialog("close");
-
 
251
                    }
-
 
252
                }]
-
 
253
 
-
 
254
        })
-
 
255
    })
-
 
256
 
-
 
257
    function calc_min_price()
-
 
258
    {
-
 
259
        daten={
-
 
260
            ek:$('#ek').val(),
-
 
261
            nachlass1:$('#nachlass1').val(),
-
 
262
            nachlass2:$('#nachlass2').val(),
-
 
263
            nachlass3:$('#nachlass3').val(),
-
 
264
            skonto:$('#skonto').val(),
-
 
265
            zuschlag:$('#zuschlag').val()
-
 
266
        }
-
 
267
        $.post("calc_min_price.php",daten,function(html)
-
 
268
        {
-
 
269
            $('#mindestpreis').val(html);
-
 
270
        });
-
 
271
    }
-
 
272
 
-
 
273
    function show_min_price_dlg()
-
 
274
    {
-
 
275
        pId=$(this).attr("data-preis-index");
-
 
276
        $('#pIndex').val(pId)
-
 
277
        $('#min_price_dlg').dialog("open");
-
 
278
    }
-
 
279
</script>
-
 
280
<div id="min_price_dlg" title="Mininmalpreis berechnen">
-
 
281
    <table>
-
 
282
        <tr>
-
 
283
            <td>Einkaufspreis (netto)</td>
-
 
284
            <td>
-
 
285
                <input type="text" id="ek" />
-
 
286
            </td>
-
 
287
        </tr>
-
 
288
        <tr>
-
 
289
            <td>Nachlass 1 (%)</td>
-
 
290
            <td>
-
 
291
                <input type="number" id="nachlass1" min="0" max="100" class="input" />
-
 
292
            </td>
-
 
293
        </tr>
-
 
294
        <tr>
-
 
295
            <td>Nachlass 2 (%)</td>
-
 
296
            <td>
-
 
297
                <input type="number" id="nachlass2" value="" min="0" max="100" class="input" />
-
 
298
            </td>
-
 
299
        </tr>
-
 
300
        <tr>
-
 
301
            <td>Nachlass 3 (%)</td>
-
 
302
            <td>
-
 
303
                <input type="number" id="nachlass3" value="" min="0" max="100" class="input" />
-
 
304
            </td>
-
 
305
        </tr>
-
 
306
        <tr>
-
 
307
            <td>Skonto (%)</td>
-
 
308
            <td>
-
 
309
                <input type="number" id="skonto" value="" min="0" max="100" class="input" />
-
 
310
            </td>
-
 
311
        </tr>
-
 
312
        <tr>
-
 
313
            <td>Zuschlag (%)</td>
-
 
314
            <td>
-
 
315
                <input type="number" value="" id="zuschlag" min="0" max="100" class="input" />
-
 
316
            </td>
-
 
317
        </tr>
-
 
318
        <tr>
-
 
319
            <td>Ergebnis</td>
-
 
320
            <td>
-
 
321
                <input type="text" id="mindestpreis" value="" readonly="readonly" disabled="disabled" />
-
 
322
            </td>
-
 
323
        </tr>
-
 
324
    </table>
-
 
325
    <input type="hidden" id="pIndex" />
-
 
326
</div>
21
<!-- $Id: artikel_preise.tpl 1093 2021-04-29 13:50:56Z tiefland $ END -->
327
<!-- $Id: artikel_preise.tpl 1093 2021-04-29 13:50:56Z tiefland $ END -->