Skip to content

Commit

Permalink
Use db.exec instead db.one and resolve the bug when the payment perio…
Browse files Browse the repository at this point in the history
…d selected during setting of pay envelope
  • Loading branch information
lomamech committed Mar 4, 2024
1 parent 55f1eca commit bc9267f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ function MultiPayrollIndiceParamModalController(Notify, MultiplePayroll, Instanc
vm.onSelectPayrollPeriod = (payrollConfig) => {
vm.param.payroll_configuration_id = payrollConfig.id;
MultiplePayroll.parameters.read(payrollConfig.id).then(parameter => {
vm.param = parameter;
if (parameter.length) {
const [param] = parameter;
vm.param = param;
}
});
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function detail(req, res, next) {
WHERE payroll_configuration_id = ?
`;
const id = req.params.payroll_config_id;
db.one(sql, id)
db.exec(sql, id)
.then(param => {
res.status(200).json(param);
})
Expand Down

0 comments on commit bc9267f

Please sign in to comment.