8000 Credit paid cancel bill #12577 by KithminiOKD · Pull Request #12605 · hmislk/hmis · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 1 commit into from
May 29, 2025

Conversation

KithminiOKD
Copy link
Collaborator
@KithminiOKD KithminiOKD commented May 29, 2025

#12577

Summary by CodeRabbit

  • New Features

    • Added a print button to allow printing of the bill preview panel from the "Credit Settlement Cancel Bill" page.
  • Style

    • Improved layout and formatting for better readability and consistent appearance.

Copy link
Contributor
coderabbitai bot commented May 29, 2025

Walkthrough

The 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

File Change Summary
src/main/webapp/resources/bill/CreditReceiveBill.xhtml Reformatted layout and structure; added PrimeFaces panel, header, and print button; no 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
Loading

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor
@coderabbitai coderabbitai bot left a 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 inline width: 95%!important; into CSS to avoid inline styles.


160-162: DataTable Wrapper & Fetch Logic
Using <h:dataTable> to render billBeanController.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

📥 Commits

Reviewing files that changed from the base of the PR and between be550d2 and d3f25c5.

📒 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 of telephone2 alongside telephone1 is accurate. Ensure both phone numbers render cleanly when present.


56-57: Fax Conditional Rendering
Rendering Fax : #{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 for cancelledBill.paymentMethod vs. bill.paymentMethod ensure the correct value is shown. Logic is sound.


110-118: Date Field with Converter
Switching between cancelledBill.billDate and bill.billDate as needed and applying <f:convertDateTime> is correct. The binding to sessionController.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 either b.patientEncounter.bhtNo or b.referenceBill.deptId is correct. No changes needed.


180-189: Patient Name Column
Correctly toggles between referenceBill.patient.person.name and patientEncounter.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 via cc.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.

@ImeshRanawellaSG ImeshRanawellaSG merged commit 3885257 into development May 29, 2025
3 checks passed
@ImeshRanawellaSG ImeshRanawellaSG deleted the Credit-paid-cancel-bill-#12577 branch May 29, 2025 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0