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

feat: add filter by fiscal year to Expense Claim Summary in PWA #1787

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

vinyselopal
Copy link
Contributor

@vinyselopal vinyselopal commented May 16, 2024

Added filter component to select Payroll Period and fetch Expense Claim Summary of that period.
expenseclaim

Comment on lines 25 to 30
{{
formatCurrency(
summary.data?.total_pending_amount,
company_currency
)
}}
formatCurrency(
summary.data?.total_pending_amount,
company_currency
)
}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The formatting of the existing code seems messed up
image

Avoid this. It gets harder to find and review the actual changes made in the PR 😅

Can you revert the unwanted changes first?

@@ -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:
Copy link
Member

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({
Copy link
Member

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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

This autocomplete doesn't look good on a gray background. Move it somewhere inside the card like how the salary slip dashboard does it.

@vinyselopal vinyselopal force-pushed the expense-claim-summary-filter branch 3 times, most recently from 21459b6 to 760f237 Compare May 23, 2024 10:07
@vinyselopal vinyselopal changed the title feat(expense claim filter): fetch expense claim summary for selected … Feat: add filter by fiscal year to Expense Claim Summary in PWA May 23, 2024
@vinyselopal vinyselopal force-pushed the expense-claim-summary-filter branch from 1be07a0 to 5861e83 Compare May 24, 2024 10:55
@vinyselopal vinyselopal changed the title Feat: add filter by fiscal year to Expense Claim Summary in PWA feat: add filter by fiscal year to Expense Claim Summary in PWA May 24, 2024
@vinyselopal vinyselopal force-pushed the expense-claim-summary-filter branch from 5861e83 to 07cb687 Compare May 24, 2024 10:59
@vinyselopal vinyselopal force-pushed the expense-claim-summary-filter branch from 07cb687 to a164386 Compare May 24, 2024 11:03
@vinyselopal vinyselopal marked this pull request as ready for review June 4, 2024 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants