Subversion Repositories wpShopGermany4

Rev

Rev 7173 | Rev 8010 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php

        /**
         * Template für die Produktauswahl innerhalb der Bestellansicht
         */

    $storno_amount = $this->view['wpsg_mod_rechnungen']['storno_amount'];
    $invoice_amount = $this->view['wpsg_mod_rechnungen']['invoice_amount'];
  
    /** @var wpsg_order_product $oOrderProduct */
    $oOrderProduct = $this->view['wpsg_mod_rechnungen']['oOrderProduct'];
    
    $p = $this->view['wpsg_mod_rechnungen']['product'];
    $product_index = $this->view['wpsg_mod_rechnungen']['product']['product_index'];
  
?>
<tr class="wpsg_<?php echo (($this->view['wpsg_mod_rechnungen']['i'] == 0)?'odd':'even'); ?>">  
        <td colspan="<?php echo ((sizeof($this->view['arCalculation']['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'5':'4'); ?>">
                <div style="display:flex; flex-direction:row; margin-bottom:0px; gap:2rem;">            
            
            <?php if ($invoice_amount > 0) { ?>
             
                <label style="display:flex; flex-direction:row; padding:5px; margin-left:-5px; gap:0.5rem; font-weight:normal; align-items:center;" class="bg_invoice">   
                    
                    <input form="invoice_form" type="hidden" name="invoice_products[<?php echo $p['order_product_id']; ?>][set]" value="0" />
                    <input checked="checked" form="invoice_form" type="checkbox" class="wpsg_mod_deliverynote_product" name="invoice_products[<?php echo $p['order_product_id']; ?>][set]" value="1" style="margin:0;" />
                    
                    <input form="invoice_form" name="invoice_products[<?php echo $p['order_product_id']; ?>][amount]" type="number" max="<?php echo $invoice_amount; ?>" min="1" value="<?php echo min($invoice_amount, $p['amount']); ?>" style="padding:0; font-size:14px; line-height:22px; min-height:initial; height:22px; width:50px; text-indent:5px; border:1px solid black; margin:0;" />
                    
                    <span>&nbsp;<?php echo __('Stück auf Rechnung', 'wpsg'); ?></span>
                    
                </label>
            
            <?php } ?>
            
            <?php if ($storno_amount > 0) { ?>
            
                <label style="display:flex; flex-direction:row; padding:5px; margin-left:-5px; gap:0.5rem; font-weight:normal; align-items:center;" class="bg_storno">   
                    
                    <input form="storno_form" type="hidden" name="storno_products[<?php echo $p['order_product_id']; ?>][set]" value="0" />
                    <input form="storno_form" checked="checked" type="checkbox" class="wpsg_mod_deliverynote_product" name="storno_products[<?php echo $p['order_product_id']; ?>][set]" value="1" style="margin:0;" />
                    
                    <input form="storno_form" name="storno_products[<?php echo $p['order_product_id']; ?>][amount]" type="number" max="<?php echo $storno_amount; ?>" min="1" value="<?php echo min($storno_amount, $p['amount']); ?>" style="padding:0; font-size:14px; line-height:22px; min-height:initial; height:22px; width:50px; text-indent:5px; border:1px solid black; margin:0;" />
                    
                    <span>&nbsp;<?php echo __('Stück auf Gutschrift', 'wpsg'); ?></span>
                    
                </label>
            
            <?php } ?>
            
                </div>
        <?php /** @var \wpsg\wpsg_invoice[] $arInvoice */ $arInvoice = $this->callMod('wpsg_mod_rechnungen', 'getInvoiceToOrderProduct', [$oOrderProduct]); ?>
        <?php if (sizeof($arInvoice) > 0) { ?>
            <div style="display:flex; gap:0.5rem; justify-content:flex-start; flex-wrap:wrap;">
            <?php foreach ($arInvoice as $oInvoice) { ?>
                <?php echo $oInvoice->getNr(true); ?>
            <?php } ?>
            </div>
        <?php } ?>
        </td>
</tr>