File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 57
57
<span class =" text-gray-800 text-base font-semibold leading-6" >
58
58
{{
59
59
formatCurrency(
60
- summary.data?.total_rejected_amount,
60
+ summary.data?.total_rejected_amount +
61
+ (summary.data?.total_claimed_in_approved - summary.data?.total_approved_amount),
61
62
company_currency
62
63
)
63
64
}}
@@ -79,7 +80,7 @@ import { formatCurrency } from "@/utils/formatters"
79
80
const total_claimed_amount = computed (() => {
80
81
return (
81
82
summary .data ? .total_pending_amount +
82
- summary .data ? .total_approved_amount +
83
+ summary .data ? .total_claimed_in_approved +
83
84
summary .data ? .total_rejected_amount
84
85
)
85
86
})
Original file line number Diff line number Diff line change @@ -543,6 +543,11 @@ def get_expense_claim_summary(employee: str) -> dict:
543
543
)
544
544
sum_approved_claims = Sum (approved_claims_case ).as_ ("total_approved_amount" )
545
545
546
+ approved_total_claimed_case = (
547
+ frappe .qb .terms .Case ().when (Claim .approval_status == "Approved" , Claim .total_claimed_amount ).else_ (0 )
548
+ )
549
+ sum_approved_total_claimed = Sum (approved_total_claimed_case ).as_ ("total_claimed_in_approved" )
550
+
546
551
rejected_claims_case = (
547
552
frappe .qb .terms .Case ().when (Claim .approval_status == "Rejected" , Claim .total_claimed_amount ).else_ (0 )
548
553
)
@@ -554,6 +559,7 @@ def get_expense_claim_summary(employee: str) -> dict:
554
559
sum_pending_claims ,
555
560
sum_approved_claims ,
556
561
sum_rejected_claims ,
562
+ sum_approved_total_claimed ,
557
563
Claim .company ,
558
564
)
559
565
.where ((Claim .docstatus != 2 ) & (Claim .employee == employee ))
You can’t perform that action at this time.
0 commit comments