-
Notifications
You must be signed in to change notification settings - Fork 102
Credit paid cancel bill #12577 #12605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe CreditReceiveBill.xhtml file was reformatted for improved readability and structure. A PrimeFaces panel was added to wrap the main content, introducing a header with a label and a print button. All changes are presentational, affecting layout and print functionality, without altering data bindings or business logic. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UI (CreditReceiveBill.xhtml)
participant PrintDialog
User->>UI (CreditReceiveBill.xhtml): Clicks "Print" button
UI (CreditReceiveBill.xhtml)->>PrintDialog: Triggers print for bill preview panel
PrintDialog-->>User: Displays print dialog for bill
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (5)
src/main/webapp/resources/bill/CreditReceiveBill.xhtml (5)
19-22
: Remove Dead Code & Simplify Tag
The commented-out<div>
and verbose<h:outputStylesheet>
closing tag can be cleaned up:- <h:outputStylesheet library="css" name="inwardpayments.css"></h:outputStylesheet> + <h:outputStylesheet library="css" name="inwardpayments.css" /> - <!--<div class="a4bill" style="align-items: center; margin: 0; padding: 0; max-width: 210mm" >--> + <!-- legacy wrapper removed; p:panel now handles layout -->
68-77
: Duplicate/Cancelled Flags
The duplicated (**Duplicate**
) and cancelled (**Cancelled**
) labels render conditionally. For consistency and localization, consider moving these static strings into resource bundles.
85-93
: Bill Details Table Layout
The<div class="billDetailsFiveFive">
and table markup correctly lay out the bill metadata. You may want to extract the inlinewidth: 95%!important;
into CSS to avoid inline styles.
160-162
: DataTable Wrapper & Fetch Logic
Using<h:dataTable>
to renderbillBeanController.fetchBillItems(cc.attrs.bill)
works, but for feature parity (sorting, pagination), you might consider switching to<p:dataTable>
.
215-224
: Total Section Layout
Presenting the total in a styled two-cell table works, but consider extracting the inline font and padding styles into CSS classes for maintainability.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/main/webapp/resources/bill/CreditReceiveBill.xhtml
(7 hunks)
🔇 Additional comments (20)
src/main/webapp/resources/bill/CreditReceiveBill.xhtml (20)
2-3
: DOCTYPE Declaration Split – LGTM
Splitting the DOCTYPE across two lines improves readability and aligns with XHTML conventions.
12-17
: Composite Component Interface Formatting
The<cc:interface>
block is well-structured and attributes are clearly declared. No changes to signatures or bindings.
23-37
: Introduce PrimeFaces Panel for Layout
Wrapping the content in<p:panel>
with a header facet and print button is a solid approach for consistent theming and print support. Layout and binding logic remain intact.
38-39
: Bill Preview PanelGroup
The<h:panelGroup id="gpBillPreview">
and.a4bill1
wrapper set up the printable area correctly. No concerns here.
42-42
: Department Printing Name Output
Displaying#{cc.attrs.bill.department.printingName}
is correct and unchanged in logic.
44-53
: Contact Details – Phone & Secondary Phone
The conditional rendering oftelephone2
alongsidetelephone1
is accurate. Ensure both phone numbers render cleanly when present.
56-57
: Fax Conditional Rendering
RenderingFax : #{cc.attrs.bill.department.fax}
only when non-empty is appropriate.
60-60
: Email Display
Unconditional email output is correct. Consider escaping if any HTML allowed in the value.
92-93
: Bill ID Binding
#{cc.attrs.bill.deptId}
is the correct identifier to display. Binding and class usage look good.
101-106
: Payment Type Conditional Rendering
The two<h:outputLabel>
branches forcancelledBill.paymentMethod
vs.bill.paymentMethod
ensure the correct value is shown. Logic is sound.
110-118
: Date Field with Converter
Switching betweencancelledBill.billDate
andbill.billDate
as needed and applying<f:convertDateTime>
is correct. The binding tosessionController.applicationPreference.longDateFormat
maintains consistency across the app.Also applies to: 120-124
127-134
: Time Field with Converter
Similarly, conditional time values and<f:convertDateTime>
with timezone formatting are implemented correctly.Also applies to: 136-141
146-150
: Company Name Row
Displaying#{cc.attrs.bill.fromInstitution.name}
with capitalization style is correct.
164-170
: Blank Spacer Column
The first<p:column>
creates spacing. Implementation is fine.
171-178
: Bill No Column
Displaying eitherb.patientEncounter.bhtNo
orb.referenceBill.deptId
is correct. No changes needed.
180-189
: Patient Name Column
Correctly toggles betweenreferenceBill.patient.person.name
andpatientEncounter.patient.person.name
. Rendering logic is sound.
192-200
: Value Column & Number Conversion
The numeric formatting via<f:convertNumber pattern="#,##0.00"/>
is appropriate for currency values.
236-239
: Footer Cashier Label
Displaying the cashier’s name viacc.attrs.bill.creater.webUserPerson.name
is correct.
241-242
: Payment Received Banner
The "Payment Received" label is center-aligned and clearly visible. No concerns.
250-251
: Closing Panel & Implementation Tags
Properly closes<p:panel>
and<cc:implementation>
. Everything is balanced.
#12577
Summary by CodeRabbit
New Features
Style