Skip to content

Commit

Permalink
Merge pull request #6760 from hmislk/issue#6427
Browse files Browse the repository at this point in the history
Issue#6427 Closes #6427
  • Loading branch information
DeshaniPubudu authored Aug 7, 2024
2 parents 0b86d87 + 19b1dcb commit a2a24ac
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ public class PettyCashBillSearch implements Serializable {
private WebUserController webUserController;
@Inject
PettyCashBillController pettyCashBillController;

@Inject
ConfigOptionApplicationController configOptionApplicationController;
@EJB
Expand Down
127 changes: 73 additions & 54 deletions src/main/webapp/cashier/fund_transfer_bills_for_me_to_receive.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -11,64 +11,83 @@
<ui:composition template="./index.xhtml">
<ui:define name="subcontent">
<h:form>
<div style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center;">
<h:panelGroup rendered="#{financialTransactionController.nonClosedShiftStartFundBill eq null}" style="text-align: center; width: 100%; height: 100%;">
<div class="mt-5">
<div>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" style="width: 128px; height: 128px;">
<path fill="red" d="M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"/>
</svg>
<div style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center;">
<h:panelGroup rendered="#{financialTransactionController.nonClosedShiftStartFundBill eq null}" style="text-align: center; width: 100%; height: 100%;">
<div class="mt-5">
<div>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" style="width: 128px; height: 128px;">
<path fill="red" d="M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"/>
</svg>
</div>
<div style="font-size: 2em">
No Start Fund Bill Available to Receive Funds
</div>
</div>
<div style="font-size: 2em">
No Start Fund Bill Available to Receive Funds
</div>
</div>
</h:panelGroup>
</div>
<p:panel rendered="#{financialTransactionController.nonClosedShiftStartFundBill ne null}" >
<p:panel header="Funds" >
<p:commandButton
value="To Receive"
action="#{financialTransactionController.navigateToReceiveNewFundTransferBill()}"
ajax="false"
class="my-2 ui-button-success"
>

</p:commandButton>


<p:dataTable
id="tblbill"
value="#{financialTransactionController.fundTransferBillsToReceive}"
var="bp"
rowKey="#{bp.id}"
selectionMode="single"
selection="#{financialTransactionController.selectedBill}">
<p:column headerText="Staff" >
<h:outputText value="#{bp.staff.person.nameWithTitle}" ></h:outputText>
</p:column>
<p:column headerText="Created At" >
<h:outputText value="#{bp.createdAt}" ></h:outputText>
</p:column>
<p:column headerText="Payment Method" >
<h:outputText value="#{bp.paymentMethod.label}" ></h:outputText>
</p:column>
<p:column headerText="Total" >
<h:outputText value="#{bp.total}" ></h:outputText>
</p:column>
<p:column headerText="Net Total" >
<h:outputText value="#{bp.netTotal}" ></h:outputText>
</p:column>
<p:column headerText="payments" >
<h:outputText value="#{bp.payments.size()}" ></h:outputText>
</p:column>
</p:dataTable>
</h:panelGroup>
</div>
<p:panel rendered="#{financialTransactionController.nonClosedShiftStartFundBill ne null}" >
<p:panel header="Funds" >
<p:commandButton
value="To Receive"
action="#{financialTransactionController.navigateToReceiveNewFundTransferBill()}"
ajax="false"
class="my-2 ui-button-success"
>

</p:panel>
</p:commandButton>


<p:dataTable
id="tblbill"
value="#{financialTransactionController.fundTransferBillsToReceive}"
var="bp"
rowKey="#{bp.id}"
selectionMode="single"
selection="#{financialTransactionController.selectedBill}">

<p:column headerText="Staff">
<h:outputText value="#{bp.staff.person.nameWithTitle}" />
</p:column>

<p:column headerText="Created At">
<h:outputText value="#{bp.createdAt}" />
</p:column>

<p:column headerText="Payment Method">
<h:outputText value="#{bp.paymentMethod}" />
</p:column>

<p:column headerText="Net Total">
<h:outputText value="#{bp.netTotal}" />
</p:column>

<!-- Subtable Column -->
<p:column headerText="Payments">
<p:dataTable
id="subTblbill"
value="#{bp.payments}"
var="payment"
rowKey="#{payment.id}">
<p:column headerText="Payment Method">
<h:outputText value="#{payment.paymentMethod}" />
</p:column>
<p:column headerText="Paid Value">
<h:outputText value="#{payment.paidValue}" />
</p:column>

</p:panel>
</h:form>
<!-- Add more columns for payment details if needed -->

</p:dataTable>
</p:column>

</p:dataTable>


</p:panel>


</p:panel>
</h:form>
</ui:define>
</ui:composition>

Expand Down

0 comments on commit a2a24ac

Please sign in to comment.