PCR which you have placed is saying that generate "-7" hours as Public holiday, If it is a holiday and working period i.e DWS is 7 hours it is scenario A if public holiday falls on a working day, then if DWS is 7 hours per day, public holiday quota = 7 - 7 = 0 instead of "0" it is getting updated with -7 you wanted check it change HRS*-1 to HRS=0 then it works.
As far i understand you have to follow below steps.
1)Configure a Quota with Base entitlement as time type
2)write a rule like below
VARSTDAYTY
*
Leave
1
VARSTFREE
Y
HRS=S
ADDDBXXXX
N
LEAVE
Place time type XXXX in Base entitlement as day balance do not use UPDTQAPH over here.
This is similar to your requirement if public holiday falls on weekend then public holiday quota 7-0 = 7
And place it above Quota function before this one more thing you have to keep it in mind it is before 2015 holiday falls on weekend moved to Monday i.e we are not supposed to generate quota before 2015 that has to be considered for the same use Operation
HRS=BCURYR
HRS?2015
<
LEAVE
>
VARSTDAYTY
*
Leave
1
VARSTFREE
Y
HRS=S
ADDDBXXXX
N
LEAVE
Further any queries let us know.
Regards
Venkatesh