@cospin18 wrote:
Github Issue: https://github.com/frappe/erpnext/issues/19413
When using a variable whose value is affected by “Depends on Payment Days (DPD)” in the formula of any other component, it takes the total value and not the value affected by “Depends on Payment Days”.
Output of bench version
erpnext 12.1.7
frappe 12.0.17Steps to reproduce the issue
- Create a new Salary Structure
- Add a new Salary Component for example Basic Salary (
BS
) with a formula value as:base
, and set Depends on Payment Days (DPD) as enabled.- Add a new Salary Component for example Basic Salary Two (
BS2
) with a formula value as:BS
, and with Depends on Payment Days (DPD) disabled.- Test the Salary Structure with an employee that has less Payment Days than Working Days
Example configuration
Working Days: 30
Payment Days: 15
base
: 1.000Basic Salary (
BS
) =base
Basic Salary Two (BS2
) =BS
Observed result
BS
= 500 (Correct as it’s affected by DPD, he only worked half month)
BS2
= 1.000 (Incorrect asBS
has a value of 500, it should be also 500)Expected result
BS
= 500
BS2
= 500My scenario is as follows:
I need to calculate other components, taking into account the
BS
(affected by DPD), but adding another variable that should not be affected by DPD, example:
BS
=base
= 1.000 = (with DPD) = 500
X
= 5.000 (Fixed value that should not be affected by DPD)
BS2
=BS
+X
= 5.500 (But right know it displays 6.000 incorrectly as it takes BS as 1.000)
Posts: 1
Participants: 1