Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fromStringArray removing PayTemplate.LeaveLines (+ SuperLines) #841

Open
alys-dext opened this issue Jan 27, 2022 · 1 comment
Open

fromStringArray removing PayTemplate.LeaveLines (+ SuperLines) #841

alys-dext opened this issue Jan 27, 2022 · 1 comment

Comments

@alys-dext
Copy link

When calling loadByGUID() the LeaveLines are always empty.

I can see that in the original API response within loadByGUID(), the LeaveLines and SuperLines are populated, and it's just after being passed through fromStringArray() that they are removed.

For example, $request->getResponse()->getElements() returns:

[
    {
    ...
        "PayTemplate":{
            "EarningsLines":[
                {
                    "EarningsRateID":"6c4ff208-d143-421f-9721-89c00ee9cc07",
                    "CalculationType":"ENTEREARNINGSRATE",
                    "RatePerUnit":"21.000000",
                    "NormalNumberOfUnits":"35.0000"
                }
            ],
            "DeductionLines":"",
            "SuperLines":[
                {
                    "SuperMembershipID":"b7a7deda-1355-4de0-bba3-ce30b6266e4b",
                    "ContributionType":"SGC",
                    "CalculationType":"PERCENTAGEOFEARNINGS",
                    "MinimumMonthlyEarnings":"450.00",
                    "ExpenseAccountCode":"478",
                    "LiabilityAccountCode":"826",
                    "Percentage":"9.0000"
                }
            ],
            "ReimbursementLines":"",
            "LeaveLines":[
                {
                    "LeaveTypeID":"4538a804-a23f-4b5a-a77b-943a9ea57829",
                    "CalculationType":"BASEDONORDINARYEARNINGS",
                    "AnnualNumberOfUnits":"152.0000",
                    "FullTimeNumberOfUnitsPerPeriod":"76.0000"
                },
                {
                    "LeaveTypeID":"930a0778-b753-4e97-8357-e299d73192ea",
                    "CalculationType":"FIXEDAMOUNTEACHPERIOD",
                    "AnnualNumberOfUnits":"75.0000",
                    "EntitlementFinalPayPayoutType":"NOTPAIDOUT"
                },
                {
                    "LeaveTypeID":"fca4a2aa-60df-4d79-96fc-abbb8b9f1933",
                    "CalculationType":"FIXEDAMOUNTEACHPERIOD",
                    "AnnualNumberOfUnits":"24.0000",
                    "EntitlementFinalPayPayoutType":"NOTPAIDOUT"
                },
                {
                    "LeaveTypeID":"c4a02ceb-b044-4a63-8cf5-380402e9533a",
                    "CalculationType":"FIXEDAMOUNTEACHPERIOD",
                    "AnnualNumberOfUnits":"23.0000",
                    "EntitlementFinalPayPayoutType":"NOTPAIDOUT"
                }
            ]
        },
    ...
    }
]

VS what is returned from loadByGUID():

{
...
    "PayTemplate":{
        "EarningsLines":[
            {
                "EarningsRateID":"6c4ff208-d143-421f-9721-89c00ee9cc07",
                "CalculationType":"ENTEREARNINGSRATE",
                "RatePerUnit":"21",
                "NormalNumberOfUnits":"35"
            }
        ],
        "SuperLines":[
            
        ],
        "LeaveLines":[
            
        ]
    },
...
}

I haven't managed to drill down into it and figure out exactly what's going wrong, is this something you're able to look into?

@calcinai
Copy link
Owner

@alys-dext I suspect it relates to the code around Remote/Model.php#L215, but I haven't got an easy way to test this at the moment.

Which payroll country are you using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants