Skip to content
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

Bug Fixes & Enhancements in Payroll Application #527

Open
unreal0901 opened this issue Feb 25, 2025 · 1 comment
Open

Bug Fixes & Enhancements in Payroll Application #527

unreal0901 opened this issue Feb 25, 2025 · 1 comment

Comments

@unreal0901
Copy link
Contributor

unreal0901 commented Feb 25, 2025

Fixed Issues:

  1. 302 Redirect Issue on Sending Payslip:
    • When clicking "Send Mail" multiple times, the request GET /payroll/send-slip?id=1 resulted in a 302 redirect to filter-slip, .
    • This led to automatic hiding of table columns due to the filter request sometimes.
    • Fix: Appended view=table to the request to ensure the correct view state is maintained and columns remain visible.
    • Implementation:
      hx-get="{% url 'send-slip' %}?id={{payslip.id}}&view=table"
    • Note: Unsure if this is the best approach, but it prevents automatic column hiding.

After clicking send button 2-3 times, empty filter request is being set which is hiding the columns.
filters_are_resetting

Also why this red dot is coming on top?
red_dot_coming

  1. Grammar Correction in Confirmation Message:
    • Fixed "sent""send" for better clarity in:
      hx-confirm="{% trans 'Do you want to send the payslip by mail?' %}"

grammar_mistake

  1. Fallback to Personal Email if Work Email is Absent:
    • Ensures that the employee's personal email is used if their work email is missing.
    • Updated method:
      def get_mail(self):
          """
          Returns the employee's email, preferring the work info email if available.
          """
          work_info = getattr(self, "employee_work_info", None)
          work_email = getattr(work_info, "email", None)
          
          return work_email if work_email is not None else self.email
  • wkhtmltopdf Requirement for PDF Generation:
    • Need to confirm whether wkhtmltopdf executable should be installed for generating PDF payslips.

Testing & Validation Steps:

  1. Click "Send Mail" multiple times and verify that table columns remain visible.
  2. Check that the fallback email logic works as expected.
  3. Validate the grammar correction in the confirmation message.
  4. Confirm if PDF generation works correctly after installing wkhtmltopdf.
@horilla-opensource
Copy link
Owner

Hi @unreal0901 ,

Thank you for reporting this issue and for providing detailed insights!.

We'll test these fixes thoroughly and update accordingly.

Thanks again for your valuable contribution! 🚀

Best Regards,
Team Horilla

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

No branches or pull requests

2 participants