The app I want is When filling out leave information and select the number of leave with leave type let it automatically deduct
such as
I have a vacation of 10 days.
Code 10101 Mr. Mai Date of leave 12/12/2021 End date 13/12/2021 Number of leave 2 days Type of vacation
When the key is finished, vacation for 10 days must be deducted for 2 days on leave, leaving 2.
I am entitled to 30 days of sick leave.
2) Code 10101 Mr. Mai Date of leave 13/12/2021 End date 13/12/2021 Number of leave 1 day Type of sick leave
When the key is finished, 30 days of sick leave must be deducted for 1 day of leave, leaving 29 left.
want to subtract Subtract the number of days followed by categorizing the number of sick leave days in this employee code, how many days are left.
This is leave information.
Main table, name, main employee (has a duty to show the code, name-surname of each person to show who’s information of it) But when adding data, add it to the secondary table only)
Secondary table, name of employee leave work (secondary table will refer to the main table)
But the table of employee leave information There will only be a page to show the number of rights that have been left. and balance
example
I got 10 vacation days.
I take 1 day leave from 12-12-2021. My vacation must be 9 days left.
But since there are many types of leave I want to calculate per status of leave type. If the leave is vacation, then the vacation is deducted, if the leave is sick leave, then the sick leave is deducted.
It’s not exactly clear to me the way you want to perform it, but you will probably need to combine various expressions:
Here is an example of what you may want to produce. This expression will calculate the remaining days, based on 10 days for Sick leave.
You may want to make a summary “per leave type” ?