1092 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* Template für die Rechnungsmodulansicht innerhalb der Bestellansicht
|
|
|
5 |
*/
|
|
|
6 |
|
|
|
7 |
?>
|
8010 |
daniel |
8 |
|
|
|
9 |
<div id="wpsg_mod_rechnungen_order_view">
|
|
|
10 |
|
|
|
11 |
<?php echo wpsg_drawForm_AdminboxStart(__('Rechnungen', 'wpsg')); ?>
|
|
|
12 |
|
|
|
13 |
<?php if (sizeof($this->view['mod_rechnungen']['arRechnungen']) == 0 && sizeof($this->view['mod_rechnungen']['arRechnungen_storno']) == 0) { ?>
|
|
|
14 |
|
5720 |
daniel |
15 |
<p><?php echo __('Bisher keine Rechnungen geschrieben.', 'wpsg'); ?></p>
|
8010 |
daniel |
16 |
|
|
|
17 |
<?php } else { ?>
|
|
|
18 |
|
|
|
19 |
<div class="grid">
|
|
|
20 |
|
|
|
21 |
<?php foreach ($this->view['mod_rechnungen']['arRechnungen_gesamt'] as $r) {
|
|
|
22 |
|
|
|
23 |
$oInvoice = \wpsg\wpsg_invoice::getInstance($r['id']);
|
|
|
24 |
|
5720 |
daniel |
25 |
?>
|
8010 |
daniel |
26 |
|
|
|
27 |
<div>
|
|
|
28 |
<?php echo $oInvoice->getDate(true); ?>
|
5720 |
daniel |
29 |
</div>
|
8010 |
daniel |
30 |
<div>
|
|
|
31 |
<?php echo $oInvoice->getNr(true); ?>
|
|
|
32 |
</div>
|
8369 |
daniel |
33 |
<div style="text-align:right; white-space:nowrap;">
|
8370 |
daniel |
34 |
|
|
|
35 |
<?php /*
|
8369 |
daniel |
36 |
<a target="_blank" href="<?php
|
|
|
37 |
|
|
|
38 |
echo wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&mod=wpsg_mod_rechnungen&noheader=1&action=ajax&edit_id='.$_REQUEST['edit_id'].'&r_id='.$r['id'].'&do=rebuildadmin', 'wpsg-mod_invoice-order_ajax-rebuildadmin-'.$_REQUEST['edit_id']);
|
|
|
39 |
|
|
|
40 |
?>" style="color:red;"><?php echo __('Neu erstellen', 'wpsg'); ?></a>
|
8370 |
daniel |
41 |
*/ ?>
|
8369 |
daniel |
42 |
|
8010 |
daniel |
43 |
<a target="_blank" onclick="if (!confirm('<?php echo __('Sind Sie sicher, dass Sie eine Kopie dieser Rechnung/Rechnungskorrektur erneut an den Kunden senden möchten?', 'wpsg'); ?>')) return false;" href="<?php
|
|
|
44 |
|
8255 |
karl |
45 |
if ($r['o_id'] == '0') {
|
8130 |
karl |
46 |
// Multirechnung
|
8255 |
karl |
47 |
$r_o_ids = array_map('intval', explode(',', $r['o_ids']));
|
8369 |
daniel |
48 |
echo wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&mod=wpsg_mod_rechnungen&noheader=1&action=ajax&edit_id='.$_REQUEST['edit_id'].'&r_id='.$r['id'].'&do=copy', 'wpsg-mod_invoice-order_ajax-copy-'.$_REQUEST['edit_id']);
|
8130 |
karl |
49 |
} else {
|
|
|
50 |
// normale Rechnung
|
8369 |
daniel |
51 |
echo wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&mod=wpsg_mod_rechnungen&noheader=1&action=ajax&edit_id='.$_REQUEST['edit_id'].'&r_id='.$r['id'].'&do=copy', 'wpsg-mod_invoice-order_ajax-copy-'.$_REQUEST['edit_id']);
|
8130 |
karl |
52 |
}
|
|
|
53 |
|
8010 |
daniel |
54 |
?>"><?php echo ' '.__("Kopie senden", "wpsg"); ?></a>
|
|
|
55 |
|
|
|
56 |
</div>
|
|
|
57 |
|
|
|
58 |
<?php } ?>
|
|
|
59 |
|
5720 |
daniel |
60 |
</div>
|
8010 |
daniel |
61 |
|
|
|
62 |
<?php } ?>
|
|
|
63 |
|
|
|
64 |
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
|
|
|
65 |
|
|
|
66 |
</div>
|
|
|
67 |
|
|
|
68 |
<style>
|
|
|
69 |
|
8369 |
daniel |
70 |
#wpsg_mod_rechnungen_order_view .grid { display:grid; width:100%; grid-template-columns:150px 1fr 250px; row-gap:0.25rem; column-gap:1rem; }
|
8010 |
daniel |
71 |
|
|
|
72 |
</style>
|