Skip to content

Commit

Permalink
Closes #6372
Browse files Browse the repository at this point in the history
Signed-off-by: Dr M H B Ariyaratne <[email protected]>
  • Loading branch information
buddhika75 committed Aug 15, 2024
1 parent b618302 commit c4d8089
Showing 1 changed file with 18 additions and 203 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,220 +113,35 @@
</div>

<p:spacer height="10" width="100%" />
<h:panelGroup rendered="#{cc.attrs.bill.billComponents ne null}">
<table class="table table-bordered">
<h:panelGroup layout="block" rendered="#{cc.attrs.bill.billComponents ne null}" class="p-3">
<table class="w-100 m-2 p-2" style="font-size: 8pt;">
<thead>
<tr>
<th>Component Name</th>
<th>Component Value</th>
<th>Name</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<ui:repeat value="#{cc.attrs.bill.billComponents}" var="component">
<tr>
<td>
<h:outputText value="#{component.name}" />
</td>
<td align="right">
<h:outputText value="#{component.componentValue}">
<f:convertNumber pattern="#,##0.00" />
</h:outputText>
</td>
</tr>
<ui:repeat value="#{cc.attrs.bill.billComponents}" var="bcomponent">
<h:panelGroup rendered="#{bcomponent.componentValue ne 0.0}" >
<tr>
<td>
<h:outputText value="#{bcomponent.name}" />
</td>
<td align="right">
<h:outputText value="#{bcomponent.componentValue}">
<f:convertNumber pattern="#,##0.00" />
</h:outputText>
</td>
</tr>
</h:panelGroup>
</ui:repeat>
</tbody>
</table>
</h:panelGroup>


<div class="itemHeadingsFiveFive" >

<table width="100%" style="width: 100%;" >
<tr>
<td colspan="2" style="text-align: center;" class="billline">
<hr/>
</td>
</tr>

<h:panelGroup rendered="#{cc.attrs.bill.margin > 0? 'false':'true'}">
<tr>
<td style="overflow: visible; font-size: 14pt">
<h:outputLabel class="itemsBlockRightFiveFive" value="Shift Start Funds" style="text-transform: capitalize!important;" >
</h:outputLabel>
</td>
<td style="text-align: right;" >
<p:spacer />
</td>
</tr>
<tr>
<td style="overflow: visible;">
<h:outputLabel class="itemsBlockRightFiveFive" value="Start Funds" style="text-transform: capitalize!important;" >
</h:outputLabel>
</td>
<td style="text-align: right;" >
<h:outputLabel class="itemsBlockRightFiveFive" value="#{cc.attrs.startbill.netTotal}" >
<f:convertNumber pattern="#,##0.00" />
</h:outputLabel>
</td>
</tr>
<tr>
<td style="overflow: visible; font-size: 14pt">
<h:outputLabel class="itemsBlockRightFiveFive" value="Additions (+)" style="text-transform: capitalize!important;" >
</h:outputLabel>
</td>
<td style="text-align: right;" >
<p:spacer />
</td>
</tr>
<tr>
<td style="overflow: visible;">
<h:outputLabel class="itemsBlockRightFiveFive" value="Total Additions" style="text-transform: capitalize!important;" >
</h:outputLabel>
</td>
<td style="text-align: right;" >
<h:outputLabel class="itemsBlockRightFiveFive" value="#{cc.attrs.additions}" >
<f:convertNumber pattern=" #,###.00" />
</h:outputLabel>
</td>
</tr>
<tr>
<td style="overflow: visible; font-size: 14pt">
<h:outputLabel class="itemsBlockRightFiveFive" value="Deductions (-)" style="text-transform: capitalize!important;" >
</h:outputLabel>
</td>
<td style="text-align: right;" >
<p:spacer />
</td>
</tr>
<tr>
<td style="overflow: visible;">
<h:outputLabel class="itemsBlockRightFiveFive" value="Total Deductions" style="text-transform: capitalize!important;" >
</h:outputLabel>
</td>
<td style="text-align: right;" >
<h:outputLabel class="itemsBlockRightFiveFive" value="#{cc.attrs.deductions}" >
<f:convertNumber pattern=" #,###.00" />
</h:outputLabel>
</td>
</tr>

</h:panelGroup>

<h:panelGroup rendered="#{cc.attrs.bill.margin ne 0.0}">
<ui:repeat value="#{cc.attrs.bill.billItems}" var="bip" >
<tr>
<td style="overflow: visible;">
<h:outputLabel class="itemsBlockRightFiveFive" value="#{bip.item.name}" style="text-transform: capitalize!important;" >
</h:outputLabel>
</td>
<td>
<h:outputLabel class="itemsBlockRightFiveFive" value="#{bip.qty}" style="text-align: right;" >
<f:convertNumber integerOnly="true" />
</h:outputLabel>
</td>
<td style="text-align: right;" >
<h:outputLabel class="itemsBlockRightFiveFive" value="#{bip.rate}">
<f:convertNumber pattern="#,##0.00" />
</h:outputLabel>
</td>

<td style="text-align: right;" >
<h:outputLabel class="itemsBlockRightFiveFive" value="#{bip.grossValue}" >
<f:convertNumber pattern="#,##0.00" />
</h:outputLabel>
</td>

</tr>
</ui:repeat>
</h:panelGroup>




</table>


</div>

<div class="billline">
<hr/>
</div>


<div >

<table style="width: 100%;">

<h:panelGroup rendered="#{cc.attrs.bill.margin > 0? 'false':'true'}">
<tr>
<td class="totalsBlock" style="text-align: left; width: 60%;">
<h:outputLabel value="Total" />
</td>
<td class="totalsBlock" style="text-align: right!important; width: 40%; padding-right: 30px;">
<h:outputLabel value="#{(cc.attrs.startbill.netTotal+cc.attrs.additions)-cc.attrs.deductions}" >
<f:convertNumber pattern="#,##0.00" />
</h:outputLabel>
</td>
</tr>
</h:panelGroup>

<h:panelGroup rendered="#{cc.attrs.bill.margin ne 0.0}">
<tr>
<td class="totalsBlock" style="text-align: left; width: 60%;">
<h:outputLabel value="Total" />
</td>
<td class="totalsBlock" style="text-align: right!important; width: 40%; padding-right: 30px;">
<h:outputLabel value="#{cc.attrs.bill.total}" >
<f:convertNumber pattern="#,##0.00" />
</h:outputLabel>
</td>
</tr>
</h:panelGroup>

<h:panelGroup rendered="#{cc.attrs.bill.discount ne 0.0}">
<tr>
<td class="totalsBlock" style="text-align: left;">
<h:outputLabel rendered="#{cc.attrs.bill.discount ne 0.0}" value="Discount " style="font-weight: bolder!important;"/>
</td>
<td class="totalsBlock" style="text-align: right!important; ; padding-right: 30px;">
<h:outputLabel rendered="#{cc.attrs.bill.discount ne 0.0}" value="#{-cc.attrs.bill.discount}" style="font-weight: bolder!important;" >
<f:convertNumber pattern="#,##0.00" />
</h:outputLabel>
</td>
</tr>
</h:panelGroup>

<tr>
<td class="totalsBlock" style="text-align: left;">
<h:outputLabel rendered="#{cc.attrs.bill.discount ne 0.0}" value="Net Total" />
</td>
<td class="totalsBlock" style="text-align: right!important;font-weight: bold; ; padding-right: 30px; ">
<h:outputLabel rendered="#{cc.attrs.bill.discount ne 0.0}" value="#{cc.attrs.bill.netTotal}">
<f:convertNumber pattern="#,##0.00" />
</h:outputLabel>
</td>
</tr>

<tr>
<td class="totalsBlock" style="text-align: left;">
<h:outputLabel rendered="#{cc.attrs.bill.discount ne 0.0}" value="VAT" />
</td>
<td class="totalsBlock" style="text-align: right!important;font-weight: bold; ; padding-right: 30px; ">
<h:outputLabel rendered="#{cc.attrs.bill.discount ne 0.0}" value="#{cc.attrs.bill.vat}">
<f:convertNumber pattern="#,##0.00" />
</h:outputLabel>
</td>
</tr>


</table>

</div>
<div class="footer" style="text-align: center;">
<br/>
<h:outputLabel value="#{sessionController.userPreference.pharmacyBillFooter}"/>
<br/>
</div>




Expand Down

0 comments on commit c4d8089

Please sign in to comment.