refactor table holidayType and holidayDetail
gitea/salix/2040-update_view_holidays This commit looks good Details

This commit is contained in:
Bernat Exposito Domenech 2020-02-06 09:33:36 +01:00
parent 1e8059c9f5
commit 7bb5b19398
1 changed files with 3 additions and 3 deletions

View File

@ -23,11 +23,11 @@ module.exports = Self => {
beginningYear.setHours(0, 0, 0, 0);
let holidays = await Self.rawSql(
`SELECT lh.dated, lhl.description, lht.name, w.id
`SELECT lh.dated, chn.name, cht.name, w.id
FROM vn.holiday lh
JOIN vn.workCenter w ON w.id = lh.workcenterFk
LEFT JOIN vn.holidayDetail lhl ON lhl.id = lh.holidayDetailFk
LEFT JOIN vn.holidayType lht ON lht.id = lh.holidayTypeFk
LEFT JOIN vn.calendarHolidaysName chn ON chn.id = lh.holidayDetailFk
LEFT JOIN vn.calendarHolidaysType cht ON cht.id = lh.holidayTypeFk
WHERE w.warehouseFk = ? AND lh.dated >= ?`, [warehouseFk, beginningYear]);
return holidays.map(holiday => {