diff options
| author | Daniel Schmitzer <noreply@maennchen1.de> | 2023-01-30 06:06:46 +0000 |
|---|---|---|
| committer | Daniel Schmitzer <noreply@maennchen1.de> | 2023-01-30 06:06:46 +0000 |
| commit | 512c9c7dad71f3f36969ea13ef45b49106412c5b (patch) | |
| tree | 92c18d05cb55ab09f1c6590ee37a19ec9c975b95 /views/mods/mod_kundenverwaltung | |
| parent | f962f206bfd5fce78003385b1917291acb1c8da3 (diff) | |
- Feature: Suche nach Rechnungen in Bestellverwaltung durch Datenbankänderung angepasst
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@8214 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/mods/mod_kundenverwaltung')
| -rw-r--r-- | views/mods/mod_kundenverwaltung/order.phtml | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/views/mods/mod_kundenverwaltung/order.phtml b/views/mods/mod_kundenverwaltung/order.phtml index 5b3bc9a..d47b4d2 100644 --- a/views/mods/mod_kundenverwaltung/order.phtml +++ b/views/mods/mod_kundenverwaltung/order.phtml @@ -22,14 +22,26 @@ <div class="wpsg_inner wpsg_order_<?php echo $order['id']; ?>">
<strong><?php echo __('Bestellstatus', 'wpsg'); ?>:</strong>
<?php echo $this->arStatus[$order['status']]; ?>
- <?php if ($this->hasMod('wpsg_mod_rechnungen')) { ?>
-
- <?php if ($r = $this->callMod('wpsg_mod_rechnungen', 'getOrderInvoice', array($order['id']))) { ?>
- <a href="<?php echo $this->callMod('wpsg_mod_rechnungen', 'getFrontendLink', array($r['id'])); ?>"><?php echo wpsg_translate(__('Rechnung #1#', 'wpsg'), $r['rnr']); ?></a>
- <?php } else if ($r = $this->callMod('wpsg_mod_rechnungen', 'getOrderCredit', array($order['id']))) { ?>
- <a href="<?php echo $this->callMod('wpsg_mod_rechnungen', 'getFrontendLink', array($r['id'])); ?>"><?php echo wpsg_translate(__('Rechnungskorrektur #1#', 'wpsg'), $r['gnr']); ?></a>
- <?php } ?>
-
+ <?php if ($this->hasMod('wpsg_mod_rechnungen')) {
+
+ $arInvoice = \wpsg\wpsg_invoice::findByOrderId(intval($order['id']));
+
+ ?>
+
+ <?php foreach ($arInvoice as $oInvoice) { ?>
+
+ <?php if ($oInvoice->isInvoice()) { ?>
+
+ <a href="<?php echo $this->callMod('wpsg_mod_rechnungen', 'getFrontendLink', [$oInvoice->getId()]); ?>"><?php echo wpsg_translate(__('Rechnung #1#', 'wpsg'), $oInvoice->getNr()); ?></a>
+
+ <?php } else if ($oInvoice->isStorno()) { ?>
+
+ <a href="<?php echo $this->callMod('wpsg_mod_rechnungen', 'getFrontendLink', [$oInvoice->getId()]); ?>"><?php echo wpsg_translate(__('Rechnungskorrektur #1#', 'wpsg'), $oInvoice->getNr()); ?></a>
+
+ <?php } ?>
+
+ <?php } ?>
+
<?php } ?>
<br />
<strong><?php echo __('Rechnungsbetrag', 'wpsg'); ?>:</strong> <?php echo wpsg_ff($order['price_gesamt'], $this->get_option('wpsg_currency')); ?><br />
|
