Line 10... |
Line 10... |
10 |
/** @var wpsg_order_product $oOrderProduct */
|
10 |
/** @var wpsg_order_product $oOrderProduct */
|
11 |
$oOrderProduct = $this->view['wpsg_mod_rechnungen']['oOrderProduct'];
|
11 |
$oOrderProduct = $this->view['wpsg_mod_rechnungen']['oOrderProduct'];
|
12 |
|
12 |
|
13 |
$p = $this->view['wpsg_mod_rechnungen']['product'];
|
13 |
$p = $this->view['wpsg_mod_rechnungen']['product'];
|
14 |
$product_index = $this->view['wpsg_mod_rechnungen']['product']['product_index'];
|
14 |
$product_index = $this->view['wpsg_mod_rechnungen']['product']['product_index'];
|
15 |
|
15 |
|
- |
|
16 |
/** @var \wpsg\wpsg_invoice[] $arInvoice */
|
- |
|
17 |
$arInvoice = $this->callMod('wpsg_mod_rechnungen', 'getInvoiceToOrderProduct', [$oOrderProduct]);
|
- |
|
18 |
$arInvoiceInvoice = [];
|
- |
|
19 |
$arInvoiceStorno = [];
|
- |
|
20 |
|
- |
|
21 |
foreach ($arInvoice as $oInvoice) {
|
- |
|
22 |
|
- |
|
23 |
if ($oInvoice->isStorno()) $arInvoiceStorno[] = $oInvoice;
|
- |
|
24 |
else if ($oInvoice->isInvoice()) $arInvoiceInvoice[] = $oInvoice;
|
- |
|
25 |
|
- |
|
26 |
}
|
- |
|
27 |
|
16 |
?>
|
28 |
?>
|
17 |
<tr class="wpsg_<?php echo (($this->view['wpsg_mod_rechnungen']['i'] == 0)?'odd':'even'); ?>">
|
29 |
<tr class="wpsg_<?php echo (($this->view['wpsg_mod_rechnungen']['i'] == 0)?'odd':'even'); ?>">
|
18 |
<td colspan="<?php echo ((sizeof($this->view['arCalculation']['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'5':'4'); ?>">
|
30 |
<td colspan="<?php echo ((sizeof($this->view['arCalculation']['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'5':'4'); ?>">
|
- |
|
31 |
|
- |
|
32 |
<!-- Rechnungen -->
|
19 |
<div style="display:flex; flex-direction:row; margin-bottom:0px; gap:2rem;">
|
33 |
<label class="bg_invoice wpsg_mod_rechnungen_row" style="font-weight:normal;">
|
20 |
|
34 |
|
21 |
<?php if ($invoice_amount > 0) { ?>
|
35 |
<?php if ($invoice_amount > 0) { ?>
|
22 |
|
- |
|
23 |
<label style="display:flex; flex-direction:row; padding:5px; margin-left:-5px; gap:0.5rem; font-weight:normal; align-items:center;" class="bg_invoice">
|
36 |
<div style="display:flex; flex-direction:row; gap:0.5rem; font-weight:normal; align-items:center;">
|
- |
|
37 |
<span><?php echo __('Menge'); ?></span>
|
24 |
|
38 |
|
25 |
<input form="invoice_form" type="hidden" name="invoice_products[<?php echo $p['order_product_id']; ?>][set]" value="0" />
|
39 |
<input form="invoice_form" type="hidden" name="invoice_products[<?php echo $p['order_product_id']; ?>][set]" value="0" />
|
26 |
<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;" />
|
40 |
<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;" />
|
27 |
|
41 |
|
28 |
<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;" />
|
42 |
<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;" />
|
29 |
|
43 |
|
30 |
<span> <?php echo __('Stück auf Rechnung', 'wpsg'); ?></span>
|
44 |
<span> <?php echo __('auf Rechnung', 'wpsg'); ?></span>
|
31 |
|
- |
|
32 |
</label>
|
45 |
</div>
|
- |
|
46 |
<?php } ?>
|
33 |
|
47 |
|
- |
|
48 |
<?php if (sizeof($arInvoiceInvoice) > 0) { ?>
|
- |
|
49 |
<div class="invoice_wrap">
|
- |
|
50 |
<span><?php echo __('Rechnungen', 'wpsg'); ?>:</span>
|
- |
|
51 |
<?php foreach ($arInvoiceInvoice as $oInvoice) { ?>
|
- |
|
52 |
<?php echo $oInvoice->getNr(true, $oOrderProduct); ?>
|
- |
|
53 |
<?php } ?>
|
- |
|
54 |
</div>
|
34 |
<?php } ?>
|
55 |
<?php } ?>
|
35 |
|
56 |
|
- |
|
57 |
</label>
|
- |
|
58 |
|
36 |
<?php if ($storno_amount > 0) { ?>
|
59 |
<!-- Gutschriften -->
|
- |
|
60 |
<label class="bg_storno wpsg_mod_rechnungen_row" style="font-weight:normal;">
|
37 |
|
61 |
|
- |
|
62 |
<?php if ($storno_amount > 0) { ?>
|
38 |
<label style="display:flex; flex-direction:row; padding:5px; margin-left:-5px; gap:0.5rem; font-weight:normal; align-items:center;" class="bg_storno">
|
63 |
<div style="display:flex; flex-direction:row; gap:0.5rem; font-weight:normal; align-items:center;">
|
- |
|
64 |
<span><?php echo __('Menge'); ?></span>
|
39 |
|
65 |
|
40 |
<input form="storno_form" type="hidden" name="storno_products[<?php echo $p['order_product_id']; ?>][set]" value="0" />
|
66 |
<input form="storno_form" type="hidden" name="storno_products[<?php echo $p['order_product_id']; ?>][set]" value="0" />
|
41 |
<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;" />
|
67 |
<input form="storno_form" type="checkbox" class="wpsg_mod_deliverynote_product" name="storno_products[<?php echo $p['order_product_id']; ?>][set]" value="1" style="margin:0;" />
|
42 |
|
68 |
|
43 |
<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;" />
|
69 |
<input form="storno_form" oninput="event.target.previousElementSibling.checked = true;" onchange="event.target.previousElementSibling.checked = true;" 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;" />
|
44 |
|
70 |
|
45 |
<span> <?php echo __('Stück auf Gutschrift', 'wpsg'); ?></span>
|
71 |
<span> <?php echo __('Stück auf Gutschrift', 'wpsg'); ?></span>
|
46 |
|
- |
|
47 |
</label>
|
72 |
</div>
|
48 |
|
- |
|
49 |
<?php } ?>
|
73 |
<?php } ?>
|
50 |
|
74 |
|
51 |
</div>
|
- |
|
52 |
<?php /** @var \wpsg\wpsg_invoice[] $arInvoice */ $arInvoice = $this->callMod('wpsg_mod_rechnungen', 'getInvoiceToOrderProduct', [$oOrderProduct]); ?>
|
75 |
<?php if (sizeof($arInvoiceStorno) > 0) { ?>
|
53 |
<?php if (sizeof($arInvoice) > 0) { ?>
|
76 |
<div class="invoice_wrap">
|
54 |
<div style="display:flex; gap:0.5rem; justify-content:flex-start; flex-wrap:wrap;">
|
77 |
<span><?php echo __('Rechnungskorrekturen', 'wpsg'); ?>:</span>
|
55 |
<?php foreach ($arInvoice as $oInvoice) { ?>
|
78 |
<?php foreach ($arInvoiceStorno as $oInvoice) { ?>
|
56 |
<?php echo $oInvoice->getNr(true); ?>
|
79 |
<?php echo $oInvoice->getNr(true, $oOrderProduct); ?>
|
- |
|
80 |
<?php } ?>
|
- |
|
81 |
</div>
|
57 |
<?php } ?>
|
82 |
<?php } ?>
|
58 |
</div>
|
- |
|
- |
|
83 |
|
59 |
<?php } ?>
|
84 |
</label>
|
- |
|
85 |
|
60 |
</td>
|
86 |
</td>
|
61 |
</tr>
|
87 |
</tr>
|
62 |
|
88 |
|