-
Notifications
You must be signed in to change notification settings - Fork 716
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
feat: add filter by fiscal year to Expense Claim Summary in PWA #1787
feat: add filter by fiscal year to Expense Claim Summary in PWA #1787
Conversation
{{ | ||
formatCurrency( | ||
summary.data?.total_pending_amount, | ||
company_currency | ||
) | ||
}} | ||
formatCurrency( | ||
summary.data?.total_pending_amount, | ||
company_currency | ||
) | ||
}} |
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.
hrms/api/__init__.py
Outdated
@@ -396,6 +396,52 @@ def get_expense_claim_summary(employee: str) -> dict: | |||
return summary | |||
|
|||
|
|||
@frappe.whitelist() | |||
def get_expense_claim_summary_for_payroll_period(employee: str, start_date: str, end_date: str) -> dict: |
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.
There is already an API above this. Just modify that to accept start and end dates. If dates aren't provided don't apply the filter. Avoid adding a duplicate API for this.
} | ||
) | ||
|
||
const payrollPeriods = createListResource({ |
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.
IMO, Expense claims should be based on the fiscal year and not the payroll period since its mostly settled using payment entries/journal entries and not via payroll.
<div | ||
class="flex flex-col gap-4 bg-white py-3 px-3.5 rounded-lg border-none" | ||
> | ||
<Autocomplete label="Payroll Period" class="w-full" placeholder="Select Payroll Period" |
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.
21459b6
to
760f237
Compare
1be07a0
to
5861e83
Compare
5861e83
to
07cb687
Compare
07cb687
to
a164386
Compare
Closing this as there are issues with design and code that would be better dealt with in a separate PR. |
Added filter component to select Payroll Period and fetch Expense Claim Summary of that period.