Merge branch 'develop' into adiDev
This commit is contained in:
commit
64c9fb4c0e
3 changed files with 324 additions and 174 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -2118,6 +2118,7 @@ export class SalaryPeriodController extends Controller {
|
|||
salaryProfileNew.isNext = salaryOld == null ? false : salaryOld.isNext;
|
||||
salaryProfileNew.isSpecial = salaryOld == null ? false : salaryOld.isSpecial;
|
||||
salaryProfileNew.isReserve = salaryOld == null ? false : salaryOld.isReserve;
|
||||
salaryProfileNew.isRetired = salaryOld == null ? false : salaryOld.isRetired;
|
||||
}
|
||||
await this.salaryProfileRepository.save(salaryProfileNew);
|
||||
}
|
||||
|
|
@ -2163,6 +2164,7 @@ export class SalaryPeriodController extends Controller {
|
|||
salaryProfileNew.isNext = salaryOld == null ? false : salaryOld.isNext;
|
||||
salaryProfileNew.isSpecial = salaryOld == null ? false : salaryOld.isSpecial;
|
||||
salaryProfileNew.isReserve = salaryOld == null ? false : salaryOld.isReserve;
|
||||
salaryProfileNew.isRetired = salaryOld == null ? false : salaryOld.isRetired;
|
||||
}
|
||||
await this.salaryProfileEmployeeRepository.save(salaryProfileNew);
|
||||
}
|
||||
|
|
@ -2606,8 +2608,9 @@ export class SalaryPeriodController extends Controller {
|
|||
salaryProfileNew.positionSalaryAmount =
|
||||
salaryOld == null ? 0 : salaryOld.positionSalaryAmount;
|
||||
salaryProfileNew.isNext = salaryOld == null ? false : salaryOld.isNext;
|
||||
salaryProfileNew.type = salaryOld == null ? false : salaryOld.isSpecial;
|
||||
salaryProfileNew.isSpecial = salaryOld == null ? false : salaryOld.isSpecial;
|
||||
salaryProfileNew.isReserve = salaryOld == null ? false : salaryOld.isReserve;
|
||||
salaryProfileNew.isRetired = salaryOld == null ? false : salaryOld.isRetired;
|
||||
}
|
||||
await this.salaryProfileRepository.save(salaryProfileNew);
|
||||
}
|
||||
|
|
@ -2651,8 +2654,9 @@ export class SalaryPeriodController extends Controller {
|
|||
salaryProfileNew.positionSalaryAmount =
|
||||
salaryOld == null ? 0 : salaryOld.positionSalaryAmount;
|
||||
salaryProfileNew.isNext = salaryOld == null ? false : salaryOld.isNext;
|
||||
salaryProfileNew.type = salaryOld == null ? false : salaryOld.isSpecial;
|
||||
salaryProfileNew.isSpecial = salaryOld == null ? false : salaryOld.isSpecial;
|
||||
salaryProfileNew.isReserve = salaryOld == null ? false : salaryOld.isReserve;
|
||||
salaryProfileNew.isRetired = salaryOld == null ? false : salaryOld.isRetired;
|
||||
}
|
||||
await this.salaryProfileEmployeeRepository.save(salaryProfileNew);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,6 +30,37 @@ class Extension {
|
|||
}
|
||||
}
|
||||
|
||||
public static ToThaiShortMonth(value: number) {
|
||||
switch (value) {
|
||||
case 1:
|
||||
return "ม.ค.";
|
||||
case 2:
|
||||
return "ก.พ.";
|
||||
case 3:
|
||||
return "มี.ค.";
|
||||
case 4:
|
||||
return "เม.ย.";
|
||||
case 5:
|
||||
return "พ.ค.";
|
||||
case 6:
|
||||
return "มิ.ย.";
|
||||
case 7:
|
||||
return "ก.ค.";
|
||||
case 8:
|
||||
return "ส.ค.";
|
||||
case 9:
|
||||
return "ก.ย.";
|
||||
case 10:
|
||||
return "ต.ค.";
|
||||
case 11:
|
||||
return "พ.ย.";
|
||||
case 12:
|
||||
return "ธ.ค.";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public static ToThaiYear(value: number) {
|
||||
if (value < 2400) return value + 543;
|
||||
else return value;
|
||||
|
|
@ -67,6 +98,18 @@ class Extension {
|
|||
);
|
||||
}
|
||||
|
||||
public static ToThaiShortDate(value: Date) {
|
||||
let yy = value.getFullYear() < 2400 ? value.getFullYear() + 543 : value.getFullYear();
|
||||
return (
|
||||
"วันที่ " +
|
||||
value.getDate() +
|
||||
" " +
|
||||
Extension.ToThaiShortMonth(value.getMonth() + 1) +
|
||||
" " +
|
||||
yy.toString().slice(-2)
|
||||
);
|
||||
}
|
||||
|
||||
public static sumObjectValues(array: any, propertyName: any) {
|
||||
let sum = 0;
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue