Subversion Repositories wpShopGermany4

Rev

Rev 8370 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8370 Rev 8453
Line 1... Line 1...
1
<?php
1
<?php
2
 
2
 
3
	/**
3
	/**
4
	 * Template für die Rechnungsmodulansicht innerhalb der Bestellansicht
4
	 * Template für die Rechnungsmodulansicht innerhalb der Bestellansicht
5
	 */
5
	 */
-
 
6
	use horstoeko\zugferd\ZugferdProfiles;
-
 
7
	use wpsg\mod_invoice\eInvoice;
6
 
8
 
7
?>
9
?>
8
 
10
 
9
<div id="wpsg_mod_rechnungen_order_view">
11
<div id="wpsg_mod_rechnungen_order_view">
10
    
12
    
Line 21... Line 23...
21
                <?php foreach ($this->view['mod_rechnungen']['arRechnungen_gesamt'] as $r) { 
23
                <?php foreach ($this->view['mod_rechnungen']['arRechnungen_gesamt'] as $r) { 
22
                    
24
                    
23
                    $oInvoice = \wpsg\wpsg_invoice::getInstance($r['id']);
25
                    $oInvoice = \wpsg\wpsg_invoice::getInstance($r['id']);
24
                    
26
                    
25
                    ?>
27
                    ?>
26
                    
28
											
27
                    <div>
29
                    <div>
28
                        <?php echo $oInvoice->getDate(true); ?>
30
                        <?php echo $oInvoice->getDate(true); ?>
29
                    </div>
31
                    </div>
30
                    <div>
32
                    <div>
31
                        <?php echo $oInvoice->getNr(true); ?>
33
                        <?php echo $oInvoice->getNr(true); ?>
32
                    </div>
34
                    </div>
-
 
35
					<div>
-
 
36
						<div id="e_invoice_app_<?php echo $oInvoice->getId(); ?>"></div>
-
 
37
						<script type="module">
-
 
38
					
-
 
39
							import { initEInvoiceApp } from '<?php echo wpsg_ShopController::getShop()->getRessourceURL('mods/mod_rechnungen/js/e_invoice_app.module.js'); ?>';
-
 
40
 
-
 
41
							initEInvoiceApp(document.getElementById('e_invoice_app_<?php echo $oInvoice->getId(); ?>'), {
-
 
42
								'invoice_id': <?php echo $oInvoice->getId(); ?>,
-
 
43
								'template_url': '<?php echo wpsg_ShopController::getShop()->getRessourceURL('mods/mod_rechnungen/html/e_invoice_app.html'); ?>',
-
 
44
								'default_profile': <?php echo intval(wpsg_ShopController::getShop()->get_option('wpsg_mod_rechnungen_einvoice')); ?>,
-
 
45
								'arProfile': <?php echo json_encode([
-
 
46
									100 + ZugferdProfiles::PROFILE_MINIMUM => ['label' => __('EN16931 Minimum', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_MINIMUM)],
-
 
47
									100 + ZugferdProfiles::PROFILE_BASIC => ['label' => __('EN16931 Basic', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_BASIC)],
-
 
48
									100 + ZugferdProfiles::PROFILE_BASICWL => ['label' => __('EN16931 Basic WL', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_BASICWL)],
-
 
49
									100 + ZugferdProfiles::PROFILE_EN16931 => ['label' => __('EN16931 Comfort', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_EN16931)],
-
 
50
									100 + ZugferdProfiles::PROFILE_EXTENDED => ['label' => __('EN16931 Extended', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_EXTENDED)],
-
 
51
									100 + ZugferdProfiles::PROFILE_XRECHNUNG => ['label' => __('EN16931 XRechnung 1', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_XRECHNUNG)],
-
 
52
									100 + ZugferdProfiles::PROFILE_XRECHNUNG_2 => ['label' => __('EN16931 XRechnung 2', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_XRECHNUNG_2)],
-
 
53
									100 + ZugferdProfiles::PROFILE_XRECHNUNG_2_1 => ['label' => __('EN16931 XRechnung 2.1', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_XRECHNUNG_2_1)],
-
 
54
									100 + ZugferdProfiles::PROFILE_XRECHNUNG_2_2 => ['label' => __('EN16931 XRechnung 2.2', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_XRECHNUNG_2_2)],
-
 
55
									100 + ZugferdProfiles::PROFILE_XRECHNUNG_2_3 => ['label' => __('EN16931 XRechnung 2.3', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_XRECHNUNG_2_3)],
-
 
56
									100 + ZugferdProfiles::PROFILE_XRECHNUNG_3 => ['label' => __('EN16931 XRechnung 3', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_XRECHNUNG_3)]
-
 
57
								]); ?>
-
 
58
							});
-
 
59
						
-
 
60
						</script>
-
 
61
					</div>
33
                    <div style="text-align:right; white-space:nowrap;">
62
                    <div style="text-align:right; white-space:nowrap;">
34
 
63
 
35
						<?php /*
64
						<?php /*
36
						<a target="_blank" href="<?php
65
						<a target="_blank" href="<?php
37
						
66
						
Line 54... Line 83...
54
                        ?>"><?php echo ' &nbsp;'.__("Kopie senden", "wpsg"); ?></a>&nbsp; 
83
                        ?>"><?php echo ' &nbsp;'.__("Kopie senden", "wpsg"); ?></a>&nbsp; 
55
                        
84
                        
56
                    </div>
85
                    </div>
57
                    
86
                    
58
                <?php } ?>
87
                <?php } ?>
-
 
88
				
-
 
89
				
59
                
90
                
60
            </div>
91
            </div>
61
              
92
              
62
        <?php } ?>
93
        <?php } ?>
63
     
94
     
Line 65... Line 96...
65
    
96
    
66
</div>
97
</div>
67
    
98
    
68
<style>
99
<style>
69
    
100
    
70
    #wpsg_mod_rechnungen_order_view .grid { display:grid; width:100%; grid-template-columns:150px 1fr 250px; row-gap:0.25rem; column-gap:1rem; }
101
    #wpsg_mod_rechnungen_order_view .grid { display:grid; width:100%; grid-template-columns:150px 1fr 250px 150px; row-gap:0.5rem; column-gap:1rem; align-items:center; }
71
    
102
    
-
 
103
	.e_invoice_app { position:relative; user-select:none;
-
 
104
		& > .handler { border:1px solid black; padding:0.25rem 0.5rem; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; width:100%; cursor:pointer; background-color:white; position:relative;
-
 
105
			&:after { width:0; height:0; border-top:5px solid transparent; border-bottom:5px solid transparent; border-left:5px solid #2c699e; content:' '; position:absolute; right:5px; top:50%; transform:translateY(-50%); transition:all 0.4s; }
-
 
106
		}
-
 
107
		& > .layer { position:absolute; max-height:0; overflow:hidden; width:100%; transition:all 0.4s; z-index:1;
-
 
108
			& > .inner { border:1px solid black; padding:0.25rem 0.5rem; margin-top:-1px; display:flex; flex-direction:column; gap:0.25rem; background-color:white;
-
 
109
				& > a:not(:last-child) { border-bottom:1px solid black; }
-
 
110
				& > a.default { font-weight:bold; }
-
 
111
			}
-
 
112
		}
-
 
113
		&.open {
-
 
114
			& > .layer { max-height:500px; }
-
 
115
			& > .handler:after { transform:translateY(-50%) rotate(90deg); }
-
 
116
		}
-
 
117
	}
-
 
118
	
72
</style>
119
</style>
73
120