showBill.xhtml
8.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:composite="http://java.sun.com/jsf/composite"
xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:tools="http://java.sun.com/jsf/composite/tools">
<composite:interface>
<composite:attribute name="bill" required="true" />
</composite:interface>
<composite:implementation>
<h:panelGrid columns="2" columnClasses="topalign,topalign" styleClass="#{cc.attrs.bill.expired ? 'expired' : null}">
<h:panelGrid columns="2" columnClasses="topalign,topalign">
<h:outputLabel for="billnr" value="#{i18n['bill.billNumber']}:" />
<h:outputText id="billnr" value="#{cc.attrs.bill.billNumber}" />
<h:outputLabel rendered="{!cc.attrs.bill.expired and sessionHandler.isEventBoolProperty('ALLOW_BILLING') }" for="refnr" value="#{i18n['bill.referencenumber']}" />
<h:outputText rendered="{!cc.attrs.bill.expired and sessionHandler.isEventBoolProperty('ALLOW_BILLING') }" id="refnr" value="#{cc.attrs.bill.referenceNumber}" />
<h:outputLabel for="billAmount" value="#{i18n['bill.billAmount']}" />
<h:outputText id="billAmount" value="#{cc.attrs.bill.totalPrice()}">
<f:convertNumber maxFractionDigits="2" minFractionDigits="2" />
</h:outputText>
<h:outputLabel for="billVat" value="#{i18n['bill.vat']}" />
<h:outputText id="billVat" value="#{cc.attrs.bill.totalVat()}">
<f:convertNumber maxFractionDigits="2" minFractionDigits="2" />
</h:outputText>
<h:outputLabel for="sentDate" value="#{i18n['bill.sentDate']}:" />
<h:outputText id="sentDate" value="#{cc.attrs.bill.sentDate}">
<f:convertDateTime pattern="#{sessionHandler.datetimeFormat}" timeZone="#{sessionHandler.timezone}" />
</h:outputText>
<h:outputLabel for="paymenttime" rendered=" #{sessionHandler.isEventBoolProperty('ALLOW_BILLING')}" value="#{i18n['bill.paymentTime']}:" />
<h:outputText id="paymenttime" rendered=" #{sessionHandler.isEventBoolProperty('ALLOW_BILLING')}" value="#{cc.attrs.bill.paymentTime eq 0 ? i18n['bill.paymentTime.now'] : cc.attrs.bill.paymentTime}" />
<h:outputLabel rendered="{!cc.attrs.bill.expired and sessionHandler.isEventBoolProperty('ALLOW_BILLING') }" for="noticetime" value="#{i18n['bill.noticetime']}:" />
<h:outputText rendered="{!cc.attrs.bill.expired and sessionHandler.isEventBoolProperty('ALLOW_BILLING')}" id="noticetime" value="#{cc.attrs.bill.noticetime}" />
<h:outputLabel rendered="#{cc.attrs.bill != null}" for="expires" value="#{i18n['bill.expires']}:" />
<h:outputText rendered="#{cc.attrs.bill != null}" id="expires" value="#{cc.attrs.bill.expires}">
<f:convertDateTime pattern="#{sessionHandler.datetimeFormat}" timeZone="#{sessionHandler.timezone}" />
</h:outputText>
<h:outputText rendered="#{cc.attrs.bill.expired}" id="expired" value="#{i18n['bill.isExpired']}" />
</h:panelGrid>
<h:panelGrid columns="2" columnClasses="topalign,topalign">
<h:outputLabel for="address" value="#{i18n['bill.address']}:" />
<h:panelGroup id="address">
<h:outputText id="addr1" value="#{cc.attrs.bill.addr1}" />
<h:outputText rendered="#{!empty cc.attrs.bill.addr2}" value="<br />" escape="false" />
<h:outputText id="addr2" value="#{cc.attrs.bill.addr2}" />
<h:outputText rendered="#{!empty cc.attrs.bill.addr3}" value="<br />" escape="false" />
<h:outputText id="addr3" value="#{cc.attrs.bill.addr3}" />
<h:outputText rendered="#{!empty cc.attrs.bill.addr4}" value="<br />" escape="false" />
<h:outputText id="addr4" value="#{cc.attrs.bill.addr4}" />
<h:outputText rendered="#{!empty cc.attrs.bill.addr5}" value="<br />" escape="false" />
<h:outputText id="addr5" value="#{cc.attrs.bill.addr5}" />
</h:panelGroup>
<h:outputLabel for="receiver" value="#{i18n['bill.receiverAddress']}:" />
<h:panelGroup id="receiver">
<h:outputText id="recAddr1" value="#{cc.attrs.bill.event.organiser.billAddress1}" />
<h:outputText rendered="#{!empty cc.attrs.bill.event.organiser.billAddress2}" value="<br />" escape="false" />
<h:outputText id="recAddr2" value="#{cc.attrs.bill.event.organiser.billAddress2}" />
<h:outputText rendered="#{!empty cc.attrs.bill.event.organiser.billAddress3}" value="<br />" escape="false" />
<h:outputText id="recAddr3" value="#{cc.attrs.bill.event.organiser.billAddress3}" />
<h:outputText rendered="#{!empty cc.attrs.bill.event.organiser.billAddress4}" value="<br />" escape="false" />
<h:outputText id="recAddr4" value="#{cc.attrs.bill.event.organiser.billAddress4}" />
</h:panelGroup>
<h:outputLabel rendered="#{!cc.attrs.bill.expired and (sessionHandler.isEventBoolProperty('ALLOW_BILLING')) and !empty cc.attrs.bill.event.organiser.bankName1}" for="bankname1" value="#{i18n['eventorg.bankName1']}" />
<h:outputText rendered="#{!cc.attrs.bill.expired and (sessionHandler.isEventBoolProperty('ALLOW_BILLING')) and !empty cc.attrs.bill.event.organiser.bankName1}" id="bankname1" value="#{cc.attrs.bill.event.organiser.bankName1}" />
<h:outputLabel rendered="#{!cc.attrs.bill.expired and (sessionHandler.isEventBoolProperty('ALLOW_BILLING')) and !empty cc.attrs.bill.event.organiser.bankNumber1}" for="banknumber1" value="#{i18n['eventorg.bankNumber1']}" />
<h:outputText rendered="#{!cc.attrs.bill.expired and (sessionHandler.isEventBoolProperty('ALLOW_BILLING')) and !empty cc.attrs.bill.event.organiser.bankNumber1}" id="banknumber1" value="#{cc.attrs.bill.event.organiser.bankNumber1}" />
<h:outputLabel rendered="#{!cc.attrs.bill.expired and (sessionHandler.isEventBoolProperty('ALLOW_BILLING')) and !empty cc.attrs.bill.event.organiser.bankName2}" for="bankname2" value="#{i18n['eventorg.bankName2']}" />
<h:outputText rendered="#{!cc.attrs.bill.expired and (sessionHandler.isEventBoolProperty('ALLOW_BILLING')) and !empty cc.attrs.bill.event.organiser.bankName2}" id="bankname2" value="#{cc.attrs.bill.event.organiser.bankName2}" />
<h:outputLabel rendered="#{!cc.attrs.bill.expired and (sessionHandler.isEventBoolProperty('ALLOW_BILLING')) and !empty cc.attrs.bill.event.organiser.bankNumber2}" for="banknumber2" value="#{i18n['eventorg.bankNumber2']}" />
<h:outputText rendered="#{!cc.attrs.bill.expired and (sessionHandler.isEventBoolProperty('ALLOW_BILLING')) and !empty cc.attrs.bill.event.organiser.bankNumber2}" id="banknumber2" value="#{cc.attrs.bill.event.organiser.bankNumber2}" />
</h:panelGrid>
</h:panelGrid>
<h2>#{i18n['bill.billLines']}</h2>
<h:dataTable styleClass="border" border="1" value="#{cc.attrs.bill.billLines}" var="line">
<h:column>
<f:facet name="header">
<h:outputText value="#{i18n['billine.name']}" />
</f:facet>
<h:outputText value="#{line.name}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{i18n['billine.quantity']}" />
</f:facet>
<h:outputText value="#{line.quantity}">
<f:convertNumber minFractionDigits="2" maxFractionDigits="2" />
</h:outputText>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{i18n['billine.unitName']}" />
</f:facet>
<h:outputText value="#{line.unitName}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{i18n['billine.unitPrice']}" />
</f:facet>
<h:outputText value="#{line.unitPrice}">
<f:convertNumber minFractionDigits="2" maxFractionDigits="2" />
</h:outputText>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{i18n['billine.vatp']}" />
</f:facet>
<h:outputText value="#{line.vat}">
<f:convertNumber type="percent" />
</h:outputText>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{i18n['billine.vat']}" />
</f:facet>
<h:outputText value="#{line.lineVat}">
<f:convertNumber minFractionDigits="2" maxFractionDigits="2" />
</h:outputText>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{i18n['billine.linePrice']}" />
</f:facet>
<h:outputText value="#{line.linePrice}">
<f:convertNumber minFractionDigits="2" maxFractionDigits="2" />
</h:outputText>
</h:column>
</h:dataTable>
</composite:implementation>
</html>