Subversion-Projekte lars-tiefland.content-management

Revision

Revision 1 | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

        {assign var=artikel_anzahl value=$daten.Bestellung.artikel|@count}
        <span class="noprint">
        {if isset($user_rechte.Warenwirtschaft.bestellung.preise_anzeigen)}
        <a href="javascript:drucken_ohne_preis();">Drucken ohne Preise</a>
        {/if}
        </span>
        <form method="post" action="{$SCRIPT_NAME}#{$daten.Bestellung.ID}" name="formname" enctype="multipart/form-data">
            <input type="hidden" name="Bestellung" value="{$daten.Bestellung.ID}" id="best_id">
            <table width="900" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#FFFFFF" bordercolordark="#999999">
                <tr> 
                    <td colspan="{if $d_colspan}3{else}2{/if}" class="links noprint">Bestellung: Bearbeiten
                    </td>
                </tr>
                <tr> 
                    <td class="links noprint">Bestellnummer:</td>
                    <td ondblclick="display_s_id();">{$daten.Bestellung.ID} &nbsp;-&nbsp; {$daten.Bestellung.Language} - Shop: {html_options options=$c_shops name="s_id" id="s_id" style="display:none" selected=$daten.Bestellung.shops_ID onchange="document.getElementById('s_changed').value=1"}<span id="s_name">{$daten.Bestellung.shop}</span>{if $bestellarten}, {if isset( $web_rechte.Warenwirtschaft.bestellung.bestellartChange)}{else}{$daten.Bestellung.Bestellart}{/if}{/if}
                    <input type="hidden" name="s_changed" id="s_changed" value="0">
                    </td>
                    {if $d_colspan}
                    <td width="200">
                        {if isset($user_rechte.Warenwirtschaft.bestellung.fremd_id)}
                        {if !$web_rechte.Warenwirtschaft.bestellung.fremd_id}
                            fremde Bestellnummer
                        {else}
                            {$web_rechte.Warenwirtschaft.bestellung.fremd_id|trim:":"}
                        {/if}: {$daten.Bestellung.fremd_id}
                        {else}
                        &nbsp;
                        {/if}
                    <!-- Bezahlstatus START -->
                    {if isset($web_rechte.Warenwirtschaft.bezahlstatus.bezahlstatus)}
                        <input type="hidden" name="bezahlt" value="{$daten.Bestellung.bezahlt}">
                        <script type="text/javascript">
                            function buildBezahltBox(divID,selID) {
                                optArr = new Array("nicht bezahlt","bezahlt");
                                
                                selectBox = "";
                                selectBox += "Bezahlstatus: <select name=\"bezahlt\">\n";
                                for(i=0;i<optArr.length;i++) {
                                    var selected="";    
                                    if(i==selID) {
                                        selected = " selected=\"selected\" ";
                                    }
                                    selectBox += "<option value=\""+i+"\" "+selected+">"+optArr[i]+"</option>";
                                }
                                selectBox += "</select>\n";
                                divID.innerHTML = selectBox;
                            }
                        </script>
                        <div style="cursor:pointer;float:right;" id="bezahltBox" ondblclick="buildBezahltBox(this,{$daten.Bestellung.bezahlt});"><div style="float:left;">Bezahlstatus:&nbsp;&nbsp;</div>
                        {if $daten.Bestellung.bezahlt==1}
                        <font style="font-weight:bold;color:#0f0">bezahlt</font>
                        {else}
                        <font style="font-weight:bold;color:#f00">nicht bezahlt</font>
                        {/if}
                        </div>                        
                    {/if}
                    <!-- Bezahlstatus ENDE -->    
                    </td>
                    {/if}
                </tr>
                {if isset($user_rechte.Warenwirtschaft.logistiker.logistiker)}
                <tr>
                    <td class="links">Logistiker: </td>
                    <td>
                        {html_options name="logistiker_id" options=$logistiker selected=$logistiker_sel}
                    </td>
                </tr>
                {/if}
                <tr> 
                    <td valign="top" class="links noprint">
                        <a href="../logins/logins.php?action=edit&ID={$daten.Bestellung.Login}">Kunde:</a> {$daten.Bestellung.Login}<br>
                        Userlevel: {$daten.Bestellung.Status}
                    </td>
                    <td class="rechts" {$d_colspan}> 
                        <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFF00">
                            <tr> 
                                <td height="24">
                                    {if $daten.Bestellung.Anrede}
                                        {$daten.Bestellung.Anrede} 
                                    {/if}
                                    {if $daten.Bestellung.Vorname}
                                        {$daten.Bestellung.Vorname} 
                                    {/if}
                                    {$daten.Bestellung.Name1}&nbsp;
                                </td>
                                <td>
                                    {$daten.Bestellung.Strasse}&nbsp;{$daten.Bestellung.Hausnummer}
                                </td>
                                <td>
                                    <a style="text-decoration:none" href="callto:{$daten.Bestellung.Telefon}"> 
                                        {$daten.Bestellung.Telefon}
                                        &nbsp;&nbsp;<img src="../images/Online-Shop/telefon.gif" border="0">
                                    </a>&nbsp;
                                </td>
                                <td>
                                    {$daten.Bestellung.Fax}&nbsp;
                                </td>
                            </tr>
                            <tr> 
                                <td height="41">
                                    {if $daten.Bestellung.Name2}
                                    <strong>Firma / Organisation</strong><br>
                                    {$daten.Bestellung.Name2}&nbsp;
                                    {/if}
                                    {if $daten.Bestellung.strasse2}
                                    <br>
                                    <strong>Abteilung</strong><br>
                                    {$daten.Bestellung.strasse2}
                                    {/if}
                                </td>
                                <td>
                                    {$daten.Bestellung.PLZ}&nbsp;{$daten.Bestellung.ORT}
                                </td>
                                <td>
                                    {if $daten.Bestellung.E_Mail}
                                    {if isset($user_rechte.Warenwirtschaft.bestellung.mail_client)}
                                    <input style="width:200px;" type="text" class="status_red noprint" value="{$daten.Bestellung.E_Mail}" />
                                    
                                    <input name="update[list]" type="button" class="status_red noprint" value="@" onclick="window.open('MailClient/index.php?id=0&Bestellung={$daten.Bestellung.ID}&shop={$daten.Bestellung.shops_ID}&button=Mailausgang', 'MailClient', 'status, menubar, height=600, width=900, scrollbars=yes');" />  
                                    
                                    {else}
                                    <a href="mailto:{$daten.Bestellung.E_Mail}" class="noprint">{$daten.Bestellung.E_Mail}</a>
                                    {/if}
                                    <span class="print">{$daten.Bestellung.E_Mail}</span>
                                    {/if}
                                    &nbsp;
                                </td>
                                <td>
                                    {$daten.Bestellung.Land}&nbsp;
                                </td>
                            </tr>
                            {if $daten.Bestellung.comment}
                            <tr>
                                <td colspan="4">
                                    {$daten.Bestellung.comment|nl2br}
                                </td>
                            </tr>
                            {/if}
                        </table>
                        {if $daten.Bestellung.liefer_Strasse}
                        <br>
                        <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFF00">
                            <tr> 
                                <td height="24" class="rechts">
                                    <strong>Lieferadresse:</strong>
                                </td>
                                <td class="rechts">
                                    Name:<br>
                                    {$daten.Bestellung.liefer_Anrede} {$daten.Bestellung.liefer_Vorname} {$daten.Bestellung.liefer_Name}
                                </td>
                                <td class="rechts">
                                {if $daten.Bestellung.liefer_Firma != ''}
                                    Firma / Organisation:<br>
                                    {$daten.Bestellung.liefer_Firma}&nbsp;
                                {/if}
                                {if $daten.Bestellung.liefer_strasse2}
                                    <br>
                                    <strong>Abteilung</strong><br>
                                    {$daten.Bestellung.liefer_strasse2}
                                {/if}
                                </td>
                            </tr>
                            <tr> 
                                <td height="41" class="rechts">
                                    {$daten.Bestellung.liefer_Strasse}&nbsp;{$daten.Bestellung.liefer_Str_Nr}
                                </td>
                                <td class="rechts">
                                    {$daten.Bestellung.liefer_PLZ}&nbsp;{$daten.Bestellung.liefer_Ort}
                                </td>
                                <td class="rechts">
                                    {$daten.Bestellung.liefer_Land}
                                </td>
                            </tr>
                            {if $daten.Bestellung.liefer_comment}
                            <tr>
                                <td colspan="4">
                                    {$daten.Bestellung.liefer_comment|nl2br}
                                </td>
                            </tr>
                            {/if}
                        </table>
                        {/if}
                        {if ( isset($user_rechte.Warenwirtschaft.bestellung.lieferadresse_aendern) )}
                        <input type="button" onclick="window.open('change_lieferadresse.php?b_id={$daten.Bestellung.ID}');" value="Lieferadresse {if $daten.Bestellung.liefer_Strasse !=
        ''}bearbeiten{else}anlegen{/if}" class="noprint">
                        {/if}
                    </td>
                </tr>
                {if $daten.paketdienst.nummern}
                <tr>
                    <td class="noprint links">
                    {if isset($user_rechte.Warenwirtschaft.bestellung.tracking)}
                        {$daten.paketdienst.name}
                    {elseif isset($user_rechte.Warenwirtschaft.logistiker.logistiker)}
                        Trackinglink:
                    {/if}
                    </td>
                    <td class="rechts" {$d_colspan}>
                        <table>
                            {section loop=$daten.paketdienst.nummern name=p_ind}
                            <tr>
                                <td>
                {if isset($user_rechte.Warenwirtschaft.bestellung.tracking)}
                                    <input class="noprint" type="button" value="{$daten.paketdienst.nummern[p_ind].nummer}" onclick="window.open('{$daten.paketdienst.url}{$daten.paketdienst.nummern[p_ind].nummer}');" /><div class="onprint">{$daten.paketdienst.name} {$daten.paketdienst.nummern[p_ind].nummer}&nbsp;</div> 
                {elseif isset($user_rechte.Warenwirtschaft.logistiker.logistiker)}
                                    {$daten.paketdienst.nummern[p_ind].name}:
                                    <input class="noprint" type="button" value="{$daten.paketdienst.nummern[p_ind].nummer}" onclick="window.open('{$daten.paketdienst.nummern[p_ind].url}{$daten.paketdienst.nummern[p_ind].nummer}');" /><span class="onprint"> {$daten.paketdienst.nummern[p_ind].nummer}&nbsp;</span> 
                {/if}
                                    vom {$daten.paketdienst.nummern[p_ind].datum|date_format:"%d.%m.%Y"}
                                                        
                                </td>
                            </tr>
                            {/section}
                        </table>
                    </td>
                </tr>
                {/if}
                <tr> 
                    <td valign="top" class="links noprint">
                        <p>Artikel:</p>
                    </td>
                    <td align="right" class="rechts" {$d_colspan}> 
                        <table width="100%" border="0" cellspacing="2" cellpadding="2">
                            <tr>
                                <td {$d_colspan}>&nbsp;&nbsp;&nbsp;</td>
                                <td>
                                    <table border="0">
                                        <tr>
                                            <td width="140" class="rechts" colspan="5">Artikelstatus</td>
                                            <td>&nbsp;&nbsp;&nbsp;</td>
                                            {if isset($user_rechte.Warenwirtschaft.bestellung.rechnungStatus)}
                                            <td width="80" class="rechts" colspan="3">Rechnung</td>
                                            {/if}
                                            <td>&nbsp;&nbsp;&nbsp;</td>
                                            {if isset($user_rechte.Warenwirtschaft.bestellung.lieferscheinStatus)}
                                            <td width="90" colspan="3" class="rechts">Lieferung</td>
                                            {else}
                                            <td width="90" colspan="3"></td>
                                            {/if}
                                            <td>&nbsp;&nbsp;&nbsp;</td>
                                            {if isset($user_rechte.Warenwirtschaft.bestellung.mahnungStatus)}
                                            <td colspan="3" class="rechts">Mahnung</td>
                                            {else}
                                            <td colspan="3"></td>
                                            {/if}
                                            <td>&nbsp;&nbsp;&nbsp;</td>
                                            {if isset($user_rechte.Warenwirtschaft.bestellung.garantieStatus)}
                                            <td {$d_colspan} class="rechts">Garantieantrag</td>
                                            {else}
                                            <td {$d_colspan}></td>
                                            {/if}
                                            <td></td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            {section loop=$daten.Bestellung.artikel name=a_ind}
                            {if $daten.Bestellung.artikel[a_ind].Father!=-3}
                            <tr class="{cycle values="darkgray,lightgray"}">
                                <td width="5%">
                                    {if $daten.Bestellung.artikel[a_ind].status=="storniert"}
                                        {$daten.Bestellung.artikel[a_ind].kennung|strike}
                                    {else}
                                        {$daten.Bestellung.artikel[a_ind].kennung}
                                    {/if}
                                </td>
                                <td width="90%" ondblclick="display_artikel({$daten.Bestellung.artikel[a_ind].ab_id},'');">
                                  
                                    <input type="hidden" id="artikel_{$daten.Bestellung.artikel[a_ind].ab_id}_changed" name="artikel_{$daten.Bestellung.artikel[a_ind].ab_id}_changed" value="0">
                                    <table width="100%" border="0" cellpadding="0" cellspacing="2">
                                        <tr> 
                                            <td align="right" valign="top" nowrap="nowrap">
                                                <span id="eingabe_menge_{$daten.Bestellung.artikel[a_ind].ab_id}" style="display:none;">
                                                    <input type="text" name="cmd[artikel_to_Bestellung][{$daten.Bestellung.artikel[a_ind].ab_id}][Menge]" size="2" value="{$daten.Bestellung.artikel[a_ind].Menge}">&nbsp;x&nbsp;
                                                </span>
                                                <span id="ausgabe_menge_{$daten.Bestellung.artikel[a_ind].ab_id}">
                                                {if $daten.Bestellung.artikel[a_ind].status=="storniert"}
                                                {$daten.Bestellung.artikel[a_ind].Menge|strike}<strike>&nbsp;x&nbsp;</strike>
                                                {else}
                                                {$daten.Bestellung.artikel[a_ind].Menge}&nbsp;x&nbsp;
                                                {/if}
                                                </span>
                                            </td>
                                            <td align="left">
                                                <span id="eingabe_bez_{$daten.Bestellung.artikel[a_ind].ab_id}" style="display:none;">
                                                    <input type="text" name="cmd[artikel_to_Bestellung][{$daten.Bestellung.artikel[a_ind].ab_id}][Bezeichnung]" size="45" value="{$daten.Bestellung.artikel[a_ind].Bezeichnung|htmlentities|default:$daten.Bestellung.artikel[a_ind].kurzbezeichnung|htmlentities}">
                                                </span>
                                                <span id="ausgabe_bez_{$daten.Bestellung.artikel[a_ind].ab_id}" class="bestandskennzeichnung" {if $daten.Bestellung.artikel[a_ind].bestandsmenge > 0}style="background-color: {$bestandskennzeichnungsfarbe};" {/if}>
                                                {if $daten.Bestellung.artikel[a_ind].status=="storniert"}
                                                {$daten.Bestellung.artikel[a_ind].hersteller|strike} {$daten.Bestellung.artikel[a_ind].Bezeichnung|default:$daten.Bestellung.artikel[a_ind].kurzbezeichnung|strike} {$daten.Bestellung.artikel[a_ind].option_eingabe|strike}
                                                {else}
                                                {$daten.Bestellung.artikel[a_ind].hersteller} {$daten.Bestellung.artikel[a_ind].Bezeichnung|default:$daten.Bestellung.artikel[a_ind].kurzbezeichnung} {$daten.Bestellung.artikel[a_ind].option_eingabe}
                                                {/if}
                                                </span>
                                                (
                                                {if $daten.Bestellung.artikel[a_ind].artikel}
                                                
                                                <a href="{if $d_shops[$daten.Bestellung.shops_ID].domain}http://redaktion.{$d_shops[$daten.Bestellung.shops_ID].domain}{/if}/Online-Shop/artikel.php?action=edit&ID={$daten.Bestellung.artikel[a_ind].artikel}" target="_blank" class="noprint">?</a>
                                                {if $d_shops[$daten.Bestellung.shops_ID].domain}
                                                &nbsp;|&nbsp;
                                                <a href="http://www.{$d_shops[$daten.Bestellung.shops_ID].domain}/index.php?item={$daten.Bestellung.artikel[a_ind].artikel}" target="_blank">S</a>
                                                {/if}
                                                {/if}
                                                {include file="ipad_edit.tpl" id=$daten.Bestellung.artikel[a_ind].ab_id art=""}
                                                {if ( isset( $user_rechte["Warenwirtschaft"]["bestellung"]["lieferantenbestellung"] ) )}
                                                {if $daten.Bestellung.artikel[a_ind].Preis_pro_Stueck > 0}
                                                | <a class="lager" id="lager_{$daten.Bestellung.artikel[a_ind].artikel}_{$daten.Bestellung.ID}_{$daten.Bestellung.shops_ID}" style="display:inline;">LB</a>
                                                {/if}
                                                {/if}
                                                )
                                                {if $daten.Bestellung.artikel[a_ind].ebay_art_id}
                                                {if $daten.Bestellung.artikel[a_ind].status=="storniert"}
                                                <strike>
                                                {/if}
                                                (<a href="http://cgi.ebay.de/ws/eBayISAPI.dll?ViewItem&rd=1&item={$daten.Bestellung.artikel[a_ind].ebay_art_id}" target="_blank">ebay-Auktion</a>)
                                                {if $daten.Bestellung.artikel[a_ind].status=="storniert"}
                                                </strike>
                                                {/if}
                                                {/if}
                                            </td>
                                            <td align="right" nowrap="nowrap" valign="top">
                                                {if $preise_anzeigen}
                                                <span id="eingabe_preis_{$daten.Bestellung.artikel[a_ind].ab_id}" style="display:none;">
                                                    <input type="text" name="cmd[artikel_to_Bestellung][{$daten.Bestellung.artikel[a_ind].ab_id}][Preis_pro_Stueck]" size="3" value="{$daten.Bestellung.artikel[a_ind].Preis_pro_Stueck}" onkeyup="this.value=killkomma(this.value);">&nbsp;&euro;&nbsp;
                                                    <a onclick="change_status('a',{$daten.Bestellung.ID},{$daten.Bestellung.artikel[a_ind].ab_id},'S','storniert');self.location.reload();" style="cursor:pointer">X</a>
                                                </span>
                                                <span id="ausgabe_preis_{$daten.Bestellung.artikel[a_ind].ab_id}" class="preise">
                                                {if $daten.Bestellung.artikel[a_ind].status=="storniert"}
                                                {$daten.Bestellung.artikel[a_ind].Preis_pro_Stueck|money_format_red:2:$daten.Bestellung.locale|strike}
                                                {else}
                                                {$daten.Bestellung.artikel[a_ind].Preis_pro_Stueck|money_format_red:2:$daten.Bestellung.locale}
                                                {/if}
                                                </span>
                                                {/if}
                                            </td>
                                            {if isset($web_rechte["Warenwirtschaft"]["bestellung"]["artikel_sortieren"])}
                                            <td class="noprint">
                                                {if $daten.Bestellung.artikel[a_ind].ab_Rang > 0}
                                                <a href="{$script_name}?Bestellung={$daten.Bestellung.ID}&dir=up&id={$daten.Bestellung.artikel[a_ind].ab_id}"><img src="../images/Online-Shop/directory/scroll_up.gif" alt="auf" border="0" width="11" /></a>
                                                {/if}
                                                {if $smarty.section.a_ind.index < $artikel_anzahl -1}
                                                <a href="{$script_name}?Bestellung={$daten.Bestellung.ID}&dir=down&id={$daten.Bestellung.artikel[a_ind].ab_id}"><img src="../images/Online-Shop/directory/scroll_down.gif" alt="auf" border="0" width="11" /></a>
                                                {/if}
                                            </td>
                                            {/if}
                                            <td align="right" nowrap="nowrap" valign="top">&nbsp;</td>
                                        </tr>
                                    </table>
                                </td>
                                <td colspan="21" bgcolor="#FFFF00">
                                    <input type="hidden" id="a_{$daten.Bestellung.artikel[a_ind].ab_id}_status_f" value="{$daten.Bestellung.artikel[a_ind].status}">
                                    {if isset($user_rechte.Warenwirtschaft.bestellung.rechnungStatus)}
                                    <input type="hidden" id="r_{$daten.Bestellung.artikel[a_ind].ab_id}_status_f" value="{$daten.Bestellung.artikel[a_ind].rechnungstatus}">
                                    {/if}
                                    {if isset($user_rechte.Warenwirtschaft.bestellung.lieferscheinStatus)}
                                    <input type="hidden" id="l_{$daten.Bestellung.artikel[a_ind].ab_id}_status_f" value="{$daten.Bestellung.artikel[a_ind].lieferscheinStatus}">
                                    {/if}
                                    {if isset($user_rechte.Warenwirtschaft.bestellung.mahnungStatus)}
                                    <input type="hidden" id="m_{$daten.Bestellung.artikel[a_ind].ab_id}_status_f" value="{$daten.Bestellung.artikel[a_ind].mahnungStatus}">
                                    {/if}
                                    {if isset($user_rechte.Warenwirtschaft.bestellung.garantieStatus)}
                                    <input type="hidden" id="m_{$daten.Bestellung.artikel[a_ind].ab_id}_status_f" value="{$daten.Bestellung.artikel[a_ind].garantieStatus}">
                                    {/if}
                                    <table border="0" cellspacing="2" cellpadding="2">
                                        <tr>
                                        {section loop=$daten.artikel_stati name=as_ind}
                                            {if $daten.Bestellung.artikel[a_ind].status==$daten.artikel_stati[as_ind].name}
                                                {assign var=class value=$daten.artikel_stati[as_ind].class}
                                            {else}
                                                {assign var=class value="status_off"}
                                            {/if}
                                            <td valign="top" nowrap="nowrap" {if $daten.artikel_stati[as_ind].name} class="darkgray"{/if}><a class="{$class}" onclick="change_status('a', {$daten.Bestellung.ID},{$daten.Bestellung.artikel[a_ind].ab_id},'{$daten.artikel_stati[as_ind].short}','{$daten.artikel_stati[as_ind].name}');return false;" style="cursor:pointer" id="a_{$daten.Bestellung.artikel[a_ind].ab_id}_{$daten.artikel_stati[as_ind].short}" title="{$daten.artikel_stati[as_ind].name}">&nbsp;{$daten.artikel_stati[as_ind].short}&nbsp;</a></td>
                                        {/section}
                                            <td valign="top" nowrap="nowrap">&nbsp;&nbsp;&nbsp;</td>
                                    {if isset($user_rechte.Warenwirtschaft.bestellung.rechnungStatus)}
                                        {section loop=$daten.rechnung_stati name=rs_ind}
                                            <td valign="top" nowrap="nowrap" {if $daten.rechnung_stati[rs_ind].name} class="darkgray"{/if}>
                                            {if $daten.Bestellung.artikel[a_ind].rechnungstatus==$daten.rechnung_stati[rs_ind].name}
                                                {assign var=class value=$daten.rechnung_stati[rs_ind].class}
                                            {else}
                                                {assign var=class value="status_off"}
                                            {/if}
                                                <a class="{$class}" onclick="change_status('r', {$daten.Bestellung.ID},{$daten.Bestellung.artikel[a_ind].ab_id},'{$daten.rechnung_stati[rs_ind].short}','{$daten.rechnung_stati[rs_ind].name}');return false;" style="cursor:pointer" id="r_{$daten.Bestellung.artikel[a_ind].ab_id}_{$daten.rechnung_stati[rs_ind].short}" title="{$daten.rechnung_stati[rs_ind].name}">&nbsp;{$daten.rechnung_stati[rs_ind].short}&nbsp;</a>
                                            </td>
                                        {/section}
                                    {/if}
                                            <td valign="top" nowrap="nowrap">&nbsp;&nbsp;&nbsp;</td>
                                        {section loop=$daten.lieferschein_stati name=ls_ind}
                                            {if isset($user_rechte.Warenwirtschaft.bestellung.lieferscheinStatus)}
                                            <td valign="top" nowrap="nowrap" {if $daten.lieferschein_stati[ls_ind].name} class="darkgray"{/if}>
                                            {if $daten.Bestellung.artikel[a_ind].lieferscheinStatus==$daten.lieferschein_stati[ls_ind].name}
                                                {assign var=class value=$daten.lieferschein_stati[ls_ind].class}
                                            {else}
                                                {assign var=class value="status_off"}
                                            {/if}
                                                <a class="{$class}" onclick="change_status('l', {$daten.Bestellung.ID},{$daten.Bestellung.artikel[a_ind].ab_id},'{$daten.lieferschein_stati[ls_ind].short}','{$daten.lieferschein_stati[ls_ind].name}');return false;" style="cursor:pointer" id="l_{$daten.Bestellung.artikel[a_ind].ab_id}_{$daten.lieferschein_stati[ls_ind].short}" title="{$daten.lieferschein_stati[ls_ind].name}">&nbsp;{$daten.lieferschein_stati[ls_ind].short}&nbsp;</a>
                                            </td>
                                        {else}
                                            <td></td>
                                        {/if}
                                        {/section}
                                            <td valign="top" nowrap="nowrap">&nbsp;&nbsp;&nbsp;</td>
                                        {section loop=$daten.mahnung_stati name=ms_ind}
                                            {if isset($user_rechte.Warenwirtschaft.bestellung.mahnungStatus)}
                                            <td valign="top" nowrap="nowrap" {if $daten.mahnung_stati[ms_ind].name} class="darkgray"{/if}>
                                            {if $daten.Bestellung.artikel[a_ind].mahnungStatus==$daten.mahnung_stati[ms_ind].name}
                                                {assign var=class value=$daten.mahnung_stati[ms_ind].class}
                                            {else}
                                                {assign var=class value="status_off"}
                                            {/if}
                                                <a class="{$class}" onclick="change_status('m', {$daten.Bestellung.ID},{$daten.Bestellung.artikel[a_ind].ab_id},'{$daten.mahnung_stati[ms_ind].short}','{$daten.mahnung_stati[ms_ind].name}');return false;" style="cursor:pointer" id="m_{$daten.Bestellung.artikel[a_ind].ab_id}_{$daten.mahnung_stati[ms_ind].short}" title="{$daten.mahnung_stati[ms_ind].name}">&nbsp;{$daten.mahnung_stati[ms_ind].short}&nbsp;</a>
                                             </td>
                                        {else}
                                            <td></td>
                                        {/if}
                                        {/section}
                                            <td valign="top" nowrap="nowrap">&nbsp;&nbsp;&nbsp;</td>
                                        {section loop=$daten.garantie_stati name=gs_ind}
                                            {if isset($user_rechte.Warenwirtschaft.bestellung.garantieStatus)}
                                            <td valign="top" nowrap="nowrap" {if $daten.garantie_stati[gs_ind].name} class="darkgray"{/if}>
                                            {if $daten.Bestellung.artikel[a_ind].garantiestatus==$daten.garantie_stati[gs_ind].name}
                                                {assign var=class value=$daten.garantie_stati[gs_ind].class}
                                            {else}
                                                {assign var=class value="status_off"}
                                            {/if}
                                                <a class="{$class}" onclick="change_status('g', {$daten.Bestellung.ID},{$daten.Bestellung.artikel[a_ind].ab_id},'{$daten.garantie_stati[gs_ind].short}','{$daten.garantie_stati[gs_ind].name}');return false;" style="cursor:pointer" id="g_{$daten.Bestellung.artikel[a_ind].ab_id}_{$daten.garantie_stati[gs_ind].short}" title="{$daten.garantie_stati[gs_ind].name}">&nbsp;{$daten.garantie_stati[gs_ind].short}&nbsp;</a>
                                            </td>
                                        {else}
                                            <td></td>
                                        {/if}
                                        {/section}
                                            <td valign="top" nowrap="nowrap">&nbsp;&nbsp;&nbsp;</td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            {else}
                            {assign var=versand_artikel value=$daten.Bestellung.artikel[a_ind].ab_id}
                            {assign var=versand_status value=$daten.Bestellung.artikel[a_ind].status}
                            {assign var=versand_name value=$daten.Bestellung.artikel[a_ind].short_line_1}
                            <tr class="{cycle values="darkgray,lightgray"}"> 
                                <td width="5%" valign="top">&nbsp; </td>
                                <td width="90%" ondblclick="display_artikel({$daten.Bestellung.artikel[a_ind].ab_id},'V')">
                                    <input type="hidden" id="a_{$daten.Bestellung.artikel[a_ind].ab_id}_status_f" value="{$daten.Bestellung.artikel[a_ind].status}">
                                    <input type="hidden" id="artikel_{$daten.Bestellung.artikel[a_ind].ab_id}_changed" name="artikel_{$daten.Bestellung.artikel[a_ind].ab_id}_changed" value="0">
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                        <tr> 
                                            <td nowrap="nowrap" align="left" valign="top">
                                            &nbsp; Versand:&nbsp;
                                                <span id="eingabe_bez_{$daten.Bestellung.artikel[a_ind].ab_id}" style="display:none;">
                                                    <input type="text" name="cmd[artikel_to_Bestellung][{$daten.Bestellung.artikel[a_ind].ab_id}][Bezeichnung]" size="45" value="{$daten.Bestellung.artikel[a_ind].Bezeichnung|default:$daten.Bestellung.artikel[a_ind].kurzbezeichnung}" onchange="document.getElementById('artikel_'+{$daten.Bestellung.artikel[a_ind].ab_id}+'_changed').value='1';">
                                                </span>
                                                <span id="ausgabe_bez_{$daten.Bestellung.artikel[a_ind].ab_id}">
                                                    {$daten.Bestellung.artikel[a_ind].Bezeichnung|default:$daten.Bestellung.artikel[a_ind].kurzbezeichnung}
                                                </span>
                                                {if $daten.Bestellung.artikel[a_ind].artikel}
                                                (
                                                {include file="ipad_edit.tpl" id=$daten.Bestellung.artikel[a_ind].ab_id art="V"}
                                                )
                                                {/if}
                                            </td>
                                            <td align="right" nowrap="nowrap" valign="top">
                                                <span id="eingabe_preis_{$daten.Bestellung.artikel[a_ind].ab_id}" style="display:none;">
                                                    <input type="text" name="cmd[artikel_to_Bestellung][{$daten.Bestellung.artikel[a_ind].ab_id}][Preis_pro_Stueck]" size="3" value="{$daten.Bestellung.artikel[a_ind].Preis_pro_Stueck}" onchange="document.getElementById('artikel_'+{$daten.Bestellung.artikel[a_ind].ab_id}+'_changed').value='1';" onkeyup="this.value=killkomma(this.value);">&nbsp;&euro;&nbsp;
                                                </span>
                                                <span id="ausgabe_preis_{$daten.Bestellung.artikel[a_ind].ab_id}" class="preise">
                                                {$daten.Bestellung.artikel[a_ind].Preis_pro_Stueck|money_format_red:2:$daten.Bestellung.locale}
                                                </span>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            {/if}
                            {/section}
                            {if !$versand_artikel}
                            <tr class="{cycle values="darkgray,lightgray"} noprint" align="left">
                                <td width="5%"></td>
                                <td width="90%">
                                {html_options options=$daten.Versand name="versandItem"}
                                <input type="submit" name="enterVersand" value="OK">
                                </td>
                                <td colspan="9" align="center">&nbsp;</td>
                            </tr>
                            {/if}
                            <tr class="noprint">
                                <td width="5%"></td>
                                <td width="90%"></td>
                                <td colspan="21">
                                    <table border="0" cellspacing="2" cellpadding="2">
                                        <tr>
                                        {section loop=$daten.artikel_stati name=as_ind}
                                            <td valign="top" nowrap="nowrap" {if $daten.artikel_stati[as_ind].name} class="darkgray"{/if}>
                                                {assign var=class value=$daten.artikel_stati[as_ind].class}
                                                <a class="{$class}" onclick="change_status('a', {$daten.Bestellung.ID},0,'{$daten.artikel_stati[as_ind].short}','{$daten.artikel_stati[as_ind].name}');return false;" style="cursor:pointer" title="{$daten.artikel_stati[as_ind].name}">&nbsp;&#x2211;&nbsp;</a>
                                            </td>
                                        {/section}
                                            <td valign="top" nowrap="nowrap">&nbsp;&nbsp;&nbsp;</td>
                                    {if isset($user_rechte.Warenwirtschaft.bestellung.rechnungStatus)}
                                        {section loop=$daten.rechnung_stati name=rs_ind}
                                            <td valign="top" nowrap="nowrap" {if $daten.rechnung_stati[rs_ind].name} class="darkgray"{/if}>
                                                {assign var=class value=$daten.rechnung_stati[rs_ind].class}
                                                <a class="{$class}" onclick="change_status('r', {$daten.Bestellung.ID},0,'{$daten.rechnung_stati[rs_ind].short}','{$daten.rechnung_stati[rs_ind].name}');return false;" style="cursor:pointer" title="{$daten.rechnung_stati[rs_ind].name}">&nbsp;&#x2211;&nbsp;</a>
                                            </td>
                                        {/section}
                                    {/if}
                                            <td valign="top" nowrap="nowrap">&nbsp;&nbsp;&nbsp;</td>
                                        {section loop=$daten.lieferschein_stati name=ls_ind}
                                            {if isset($user_rechte.Warenwirtschaft.bestellung.lieferscheinStatus)}
                                            <td valign="top" nowrap="nowrap" {if $daten.lieferschein_stati[ls_ind].name} class="darkgray"{/if}>
                                                {assign var=class value=$daten.lieferschein_stati[ls_ind].class}
                                                <a class="{$class}" onclick="change_status('l', {$daten.Bestellung.ID},0,'{$daten.lieferschein_stati[ls_ind].short}','{$daten.lieferschein_stati[ls_ind].name}');return false;" style="cursor:pointer" title="{$daten.lieferschein_stati[ls_ind].name}">&nbsp;&#x2211;&nbsp;</a>
                                            </td>
                                        {else}
                                            <td></td>
                                        {/if}
                                        {/section}
                                            <td valign="top" nowrap="nowrap">&nbsp;&nbsp;&nbsp;</td>
                                        {section loop=$daten.mahnung_stati name=ms_ind}
                                            {if isset($user_rechte.Warenwirtschaft.bestellung.mahnungStatus)}
                                            <td valign="top" nowrap="nowrap" {if $daten.mahnung_stati[ms_ind].name} class="darkgray"{/if}>
                                                {assign var=class value=$daten.mahnung_stati[ms_ind].class}
                                                <a class="{$class}" onclick="change_status('m', {$daten.Bestellung.ID},0,'{$daten.mahnung_stati[ms_ind].short}','{$daten.mahnung_stati[ms_ind].name}');return false;" style="cursor:pointer" title="{$daten.mahnung_stati[ms_ind].name}">&nbsp;&#x2211;&nbsp;</a>
                                             </td>
                                        {else}
                                            <td></td>
                                        {/if}
                                        {/section}
                                            <td valign="top" nowrap="nowrap">&nbsp;&nbsp;&nbsp;</td>
                                        {section loop=$daten.garantie_stati name=gs_ind}
                                            {if isset($user_rechte.Warenwirtschaft.bestellung.garantieStatus)}
                                            <td valign="top" nowrap="nowrap" {if $daten.garantie_stati[gs_ind].name} class="darkgray"{/if}>
                                                {assign var=class value=$daten.garantie_stati[gs_ind].class}
                                                <a class="{$class}" onclick="change_status('g', {$daten.Bestellung.ID},0,'{$daten.garantie_stati[gs_ind].short}','{$daten.garantie_stati[gs_ind].name}');return false;" style="cursor:pointer" title="{$daten.garantie_stati[gs_ind].name}">&nbsp;&#x2211;&nbsp;</a>
                                            </td>
                                        {else}
                                            <td></td>
                                        {/if}
                                        {/section}
                                            <td valign="top" nowrap="nowrap">&nbsp;&nbsp;&nbsp;</td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td width="5%"></td>
                                <td align="right" class="right">
                                    <span class="preise">
                                    Bestellwert: {$daten.Bestellung.gesamtsumme_buffer|money_format_red:2:$daten.Bestellung.locale}
                                    </span>
                                </td>
                                <td colspan="9" align="left" class="noprint">
                                    <input name="manu" value="Neuen Artikel anlegen" type="button" onclick="fenster=window.open('bestellung_liste_manu.php?Bestellung={$daten.Bestellung.ID}', 'fenster','width=800,toolbar=no,status=no,menubar=no,scrollbars=yes')">
                                </td>
                            </tr>
                            {if $versand_artikel}
                            <tr>
                                <td width="5%">&nbsp;</td>
                                <td width="90%" class="noprint">
                                    Versandstatus (O=offen; F=freigegeben; V=versand)
                                </td>
                                <td colspan="21" bgcolor="#FFFF00">
                                    <table border="0" cellspacing="2" cellpadding="2">
                                        <tr>
                                            <td class="darkgray" valign="top" nowrap="nowrap">
                                            {if $versand_status=="offen"}
                                                {assign var=class value="status_red"}
                                            {else}
                                                {assign var=class value="status_off"}
                                            {/if}
                                                <a class="{$class}" onclick="change_status('a', {$daten.Bestellung.ID},{$versand_artikel},'O','offen');return false;" style="cursor:pointer" id="a_{$versand_artikel}_O" title="offen">&nbsp;O&nbsp;</a>
                                            </td>
                                            <td class="darkgray" valign="top" nowrap="nowrap">
                                            {if $versand_status=="freigegeben"}
                                                {assign var=class value="status_yellow"}
                                            {else}
                                                {assign var=class value="status_off"}
                                            {/if}
                                                <a class="{$class}" onclick="change_status('a', {$daten.Bestellung.ID},{$versand_artikel},'F','freigegeben');return false;" style="cursor:pointer" id="a_{$versand_artikel}_F" title="freigegeben">&nbsp;F&nbsp;</a>
                                            </td>
                                            <td class="darkgray" valign="top" nowrap="nowrap">
                                            {if $versand_status=="versand"}
                                                {assign var=class value="status_green"}
                                            {else}
                                                {assign var=class value="status_off"}
                                            {/if}
                                                <a class="{$class}" onclick="change_status('a', {$daten.Bestellung.ID},{$versand_artikel},'V','versand');return false;" style="cursor:pointer" id="a_{$versand_artikel}_V" title="Versand">&nbsp;V&nbsp;</a>
                                            </td>
                                            <td valign="top" nowrap="nowrap">&nbsp;&nbsp;&nbsp;</td>
                                            <td valign="top" nowrap="nowrap">&nbsp;</td>
                                            <td valign="top" nowrap="nowrap">&nbsp;</td>
                                            <td valign="top" nowrap="nowrap">&nbsp;</td>
                                            <td valign="top" nowrap="nowrap">&nbsp;</td>
                                            <td valign="top" nowrap="nowrap">&nbsp;</td>
                                            <td valign="top" nowrap="nowrap">&nbsp;</td>
                                            <td valign="top" nowrap="nowrap">&nbsp;</td>
                                            <td valign="top" nowrap="nowrap">&nbsp;</td>
                                            <td valign="top" nowrap="nowrap">&nbsp;</td>
                                            <td valign="top" nowrap="nowrap">&nbsp;</td>
                                            <td valign="top" nowrap="nowrap">&nbsp;</td>
                                            <td valign="top" nowrap="nowrap">&nbsp;</td>
                                            <td valign="top" nowrap="nowrap">&nbsp;</td>
                                            <td valign="top" nowrap="nowrap">&nbsp;</td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            {/if}
                        </table>
                    </td>
                </tr>
                {if isset($user_rechte.Warenwirtschaft.bestellung.shortline1)}
                <tr>
                    <td valign="top" class="links noprint">{$daten.sl1.name}</td>
                    <td class="rechts" {$d_colspan}>
                        <span class="print">{$daten.sl1.name}</span>
                        <input type="text" name="shortline1" value="{$daten.Bestellung.shortline1}" size="{$daten.sl1.size}" maxlength="{$daten.sl1.size}">
                    </td>
                </tr>
                {/if}
                {if isset($user_rechte.Warenwirtschaft.bestellung.shortline2)}
                <tr>
                    <td valign="top" class="links">{$daten.sl2.name}</td>
                    <td class="rechts" {$d_colspan}>
                        <input type="text" name="shortline2" value="{$daten.Bestellung.shortline2}" size="{$daten.sl2.size}" maxlength="{$daten.sl2.size}">
                    </td>
                </tr>
                {/if}
                {if isset($user_rechte.Warenwirtschaft.bestellung.status1)}
                <tr>
                    <td valign="top" class="links">{$status1_name}</td>
                    <td class="rechts" {$d_colspan}>
                        {html_options options=$status1_options name="status1" selected=$daten.Bestellung.status1}
                    </td>
                </tr>
                {/if}
                <tr>
                    <td class="links noprint">Bemerkung:</td>
                    <td class="rechts" {$d_colspan}>
                        <div class="print">Bemerkung<br></div>
                        <textarea cols="70" rows="8" name="Bemerkung" id="bemerkung" class="noprint">{$daten.Bestellung.Bemerkung}</textarea>
                        <span class="print">{$daten.Bestellung.Bemerkung|nl2br}</span>
                    </td>
                </tr>
                {if isset($user_rechte.Warenwirtschaft.bestellung.Bemerkung_extern)}
                <tr>
                    <td class="links noprint">Bemerkung extern:</td>
                    <td class="rechts" {$d_colspan}>
                        <textarea cols="70" rows="8" name="Bemerkung_extern" class="noprint">{$daten.Bestellung.Bemerkung_extern}</textarea>
                        <span class="print">{$daten.Bestellung.Bemerkung_extern|nl2br}</span>
                    </td>
                </tr>
                {/if}
                {if isset($user_rechte.Warenwirtschaft.bestellung.dokument_read)}
                {section loop=$daten.dokumente name=d_ind}
                <tr>
                    <td class="links noprint">Dokument {$daten.dokumente[d_ind].nr}</td>
                    <td class="rechts" {$d_colspan}>
                        <table width="100%">
                            <tr class="links">
                                <td width="58%">
                                    {html_image file=$daten.dokumente[d_ind].icon alt="Dateityp: {$daten.dokumente[d_ind].type}"}
                                    <a href="{$daten.dokPath}{$daten.dokumente[d_ind].name}" target="_blank">
                                    {$daten.dokumente[d_ind].name} ({$daten.dokumente[d_ind].size|fsize_format:'':2:',':'.'})
                                    </a>
                                </td>
                                <td width="3%">
                                    {if isset($user_rechte.Warenwirtschaft.bestellung.dokument_delete) && $daten.dokumente[d_ind].deleteable}
                                    {html_image file="../dokumente/gfx/delete_record.gif" onclick="{$daten.dokumente[d_ind].del_document}" border="0" style="cursor:pointer"}
                                    {/if}
                                </td>
                                <td width="3%">
                                    {if isset($user_rechte.Warenwirtschaft.bestellung.dokument_add)}
                                    {html_image file="../dokumente/gfx/add.gif" onclick="{$daten.dokumente[d_ind].add_document}" border="0" style="cursor:pointer"}
                                    {/if}
                                </td>
                                <td width="23%">
                                    {$daten.dokumente[d_ind].date|date_format:"d.m.Y"}
                                    um: {$daten.dokumente[d_ind].date|date_format:"H:i:s"}
                                </td>
                                <td width="13%">
                                    {$daten.dokumente[d_ind].author|default:"&nbsp;"}
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                {sectionelse}
                {if isset($user_rechte.Warenwirtschaft.bestellung.dokument_add)}
                <tr class="noprint">
                    <td class="links">Dokument</td>
                    <td class="rechts" {$d_colspan}>
                        <a onclick="{$daten.add_document}" style="cursor:pointer;" href="#">
                        {html_image file="../dokumente/gfx/add.gif" onclick="{$daten.add_document}" border="0" style="cursor:pointer"}Datei anhängen
                        </a>
                    </td>
                </tr>
                {/if}
                {/section}
                {/if}
                <tr>
                    <td class="links noprint">Bestellt:</td>
                    <td class="rechts" {$d_colspan}>
                        <span class="print">Bestellt: </span>
                        {$daten.Bestellung.erstellt_am|date_format:"d.m.Y"}
                        um: {$daten.Bestellung.erstellt_am|date_format:"H:i:s"}
                    </td>
                </tr>
                
                <tr id="erstellt_von_row"{if !$daten.Bestellung.erstellt_von}style="display:none;"{/if}>
                    <td class="links noprint">Erstbearbeiter:</td>
                    <td class="rechts" id="erstellt_von" {$d_colspan}>
                        <span class="print">Erstbearbeiter: </span>
                        {$daten.Bestellung.erstellt_von}
                    </td>
                </tr>
                <tr>
                    <td class="links noprint">letzte Änderung:</td>
                    <td class="rechts" id="letzte_Aenderung" {$d_colspan}>
                        <span class="print">letzte Änderung: </span>
                        {$daten.Bestellung.letzte_Aenderung_am|date_format:"d.m.Y"}
                        um: {$daten.Bestellung.letzte_Aenderung_am|date_format:"H:i:s"} 
                        von: {$daten.Bestellung.letzte_Aenderung_von}
                    </td>
                </tr>
                {if isset($web_rechte.admin.toolbox.logbuch)}
                <tr class="noprint">
                    <td class="links">Änderungsprotokoll</td>
                    <td id="logbuch" class="rechts" {$d_colspan}>
                        <a href="/toolbox/logbuch.php?mode=bestellung&id={$daten.Bestellung.ID}" target="logbuch">anzeigen</a>
                    </td>
                </tr>
                {/if}
                <tr class="noprint">
                    <td class="links" colspan="3" align="right">
                    {foreach $daten.buttons as $button}
                        <input type="{$button.type}" value="{$button.value}" onclick="{$button.onClick}" class="{$button.class}">
                    {/foreach}
                    <div>&nbsp;</div>
                    <div>
                    {if isset($web_rechte.Warenwirtschaft.bestellung.online_retoure)}
                    {foreach $logistiker as $row}
                        {if $row.returnlink}
                            <button onclick="window.open('{$row.returnlink}');">{$row.kname} ONLINE Retoure</button>
                        {/if}
                    {/foreach}
                    {/if}
                    </div>
                    <fieldset style="float:right; padding:0px; border:none;">
                        <legend>Speichern und ...</legend>
                        <input type="submit" name="update[current]" value="... nur speichern">
                        <input type="submit" name="update[prev]" value="... zurück">
                        <input type="submit" name="update[list]" value="... zur Übersicht">
                        <input type="submit" name="update[next]" value="... weiter">
                    </fieldset>
                    <div style="clear:both;">
                        <input type="reset" value="Zur&uuml;cksetzen">
                    </div>
                    {if ( isset($user_rechte.Warenwirtschaft.bestellung.termin) )}
                        <input name="button" type="button" onclick="systemtermin('Bestellung {$daten.Bestellung.ID} vom {$daten.Bestellung.letzte_Aenderung_am|date_format:"d.m.Y"}')" value="Termin">
                    {/if}
                    <div><br></div>
                    {if isset($user_rechte.Warenwirtschaft.bestellung.rechnung)}
                        <input type="button" onclick="window.open('rechnung.php?b_id={$daten.Bestellung.ID}')" value="Rechnung drucken" >
                    {/if}
                    {if isset($user_rechte.Warenwirtschaft.bestellung.lieferschein)}
                        <input type="button" onclick="window.open('lieferschein.php?b_id={$daten.Bestellung.ID}')" value="Lieferschein drucken" >
                    {/if}
                    {if isset($user_rechte.Warenwirtschaft.bestellung.drucken)}
                        <input type="button" onclick="window.open('auftrag.php?b_id={$daten.Bestellung.ID}')" value="Auftrag drucken" >
                    {/if}
                    {if isset($user_rechte.Warenwirtschaft.bestellung.angebot)}
                        <input type="button" onclick="window.open('angebot.php?b_id={$daten.Bestellung.ID}')" value="Angebot drucken" >
                    {/if}
                    <div><br></div>
                    {if isset($user_rechte.Warenwirtschaft.bestellung.bestconect)}
                                <input type="hidden" name="b_id" value="{$daten.Bestellung.ID}">
                                <input type="text" name="b_id_neu" value="">
                                <input type="hidden" name="mode" value="combine">
                                <input name="button" type="submit" value="Bestellpositionen verschieben">
                    {/if}
                    <div><br></div>
                    {if isset($user_rechte.Warenwirtschaft.bestellung.loeschen2)}
                    <input type="submit" name="delete2" value="Nur Bestellung l&ouml;schen" onclick="return confirm('Wollen sie diese Bestellung wirklich l&ouml;schen?')">
                    {/if}
                    {if isset($user_rechte.Warenwirtschaft.bestellung.loeschen)}
                    <input type="submit" name="delete" value="Bestellung + Kundendaten l&ouml;schen" onclick="return confirm('Wollen sie diese Bestellung und die dazugeh&ouml;rigen Kundendaten wirklich l&ouml;schen?')">
                    {/if}
                    {assign var=kk value=false}
                    {assign var=rufname value=$versand_name|lower}
                    {assign var=status value=$daten.Bestellung.kk_info.status|lower}
                    {if $rufname == "kreditkarte" && $status == "offen"}
                        {assign var=kk value=true}
                    {/if}
                    {if isset($user_rechte.Warenwirtschaft.bestellung["kk-zahlung"])}
                    {if $kk}
                        <input type="hidden" name="shops_ID" value="{$daten.Bestellung.shops_ID}">
                    <div><br></div>
                    {if $web_settings[$daten.Bestellung.shops_ID][119] == "saferpay"}
                                        <input type="hidden" name="orderid" value="{$daten.Bestellung.ID}">
                                        <input type="hidden" name="kk_info" value="{$daten.Bestellung.kk_info.code}">
                    {elseif $web_settings[$daten.Bestellung.shops_ID][119] == "acceptance"}
                                        <input type="hidden" name="orderid" value="{$daten.Bestellung.ID}">
                                        <input type="hidden" name="amount" value="{$daten.Bestellung.kk_summe}">
                                        <input type="hidden" name="currency" value="EUR">
                                        <input type="hidden" name="language" value="de_DE">
                    {/if}
                                        <input type="hidden" name="operation" value="SAS">
                                        <input name="anfordern" type="submit" value="Zahlung anfordern">
                    {/if}
                    {/if}
                {if isset($user_rechte.Warenwirtschaft.bestellung.gutscheinbutton) && $gs}
                        <input type="button" value="Gutschein erstellen" id="gen_gutschein">
                    </td>
                {/if}
                </tr>
            </table>
            <br>
            <div id="gutschein_meldung"></div>
        </form>
        {if $gs}
        <div id="gutschein_dialog" title="Gutschein erstellen">
            <form id="gutschein_form">        
            <table>
                <tr>
                    <td>
                        <label for="gs_name">Name:</label>
                    </td>
                    <td>
                        <input type="text" name="gs_name" id="gs_name" value="{$gutschein.name}">
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="gs_gueltig_bis">gültig bis:</label>
                    </td>
                    <td>
                        <input type="text" name="gs_gueltig_bis" id="gs_gueltig_bis" value="{$gutschein.gueltig}">
                    </td>
                </tr>
            </table>
            <input type="hidden" name="gs_anfangswert" value="{$gutschein.anfangswert}">
            <input type="hidden" name="gs_restwert" value="{$gutschein.anfangswert}">
            <input type="hidden" name="gs_empfaenger" value="{$daten.Bestellung.Anrede} {$daten.Bestellung.Vorname} {$daten.Bestellung.Name1}">
            <input type="hidden" name="gs_status" value="1">
            <input type="hidden" name="gs_shop" value="0">
            <input type="hidden" name="b_id" value="{$daten.Bestellung.ID}">
            <input type="hidden" name="gs_artikel" id="gs_artikel" value="{$gutschein.gs_artikel}">
            <input type="hidden" name="gs_a_status" id="gs_status" value="{$gutschein.gs_a_status}">
            <input type="hidden" name="gs_a_status_k" id="gs_status_k" value="{$gutschein.gs_a_status_k}">
            <input type="hidden" name="action" value="insert">
            </form>
        </div>
        {/if}
        
{if ( isset( $user_rechte["Warenwirtschaft"]["bestellung"]["lieferantenbestellung"] ) )}
<div id="lagerbestand" title="Lagerbestand für <span id='a_name'></span> (<span id='a_id'></span>)">
</div>
{/if}