All deduction is depend on Monthly Gross pay not earning gross pay

When employees have to leave without pay. In that case, it’s not working on earning gross. In ERPNext all deduction depends on Monthly Gross pay not earning gross pay. not calculated on earning gross calculated only on Monthly gross base
Eg.
Monthly gross=40000
Leave WithoutPay=2
Earning gross=38000(i need to apply above formulas on earning gross but formula work only on Monthly Gross(40000))