Compare commits
6 Commits
1d58361f02
...
a4108e671d
Author | SHA1 | Date | |
---|---|---|---|
a4108e671d | |||
5a2c621b6e | |||
47fa8110b5 | |||
5935a91c45 | |||
7884bbdd46 | |||
45283d8aa2 |
|
@ -24,7 +24,7 @@ namespace HRM.DA
|
||||||
oSystemInformation.factoryAddress = oReader.GetString("FACTORYADDRESS");
|
oSystemInformation.factoryAddress = oReader.GetString("FACTORYADDRESS");
|
||||||
oSystemInformation.TelephoneNo = oReader.GetString("TELEPHONE");
|
oSystemInformation.TelephoneNo = oReader.GetString("TELEPHONE");
|
||||||
oSystemInformation.email = oReader.GetString("EMAIL");
|
oSystemInformation.email = oReader.GetString("EMAIL");
|
||||||
oSystemInformation.webAddress = oReader.GetString("WEBADDRESS");
|
//oSystemInformation.webAddress = oReader.GetString("WEBADDRESS");
|
||||||
oSystemInformation.systemStartDate = oReader.GetDateTime("SYSTEMSTARTDATE").Value;
|
oSystemInformation.systemStartDate = oReader.GetDateTime("SYSTEMSTARTDATE").Value;
|
||||||
oSystemInformation.TaxYearEndDate = oReader.GetDateTime("TAXYEARENDDATE").Value;
|
oSystemInformation.TaxYearEndDate = oReader.GetDateTime("TAXYEARENDDATE").Value;
|
||||||
oSystemInformation.NextPayProcessDate = oReader.GetDateTime("NEXTPAYPROCESSDATE").Value;
|
oSystemInformation.NextPayProcessDate = oReader.GetDateTime("NEXTPAYPROCESSDATE").Value;
|
||||||
|
|
|
@ -642,10 +642,12 @@ namespace HRM.DA
|
||||||
_oProdBonusProcess.ProdBonusProcessEmps = new List<ProdBonusProcessEmp>();
|
_oProdBonusProcess.ProdBonusProcessEmps = new List<ProdBonusProcessEmp>();
|
||||||
List<ProdBonusAttn> prodAttn = null;
|
List<ProdBonusAttn> prodAttn = null;
|
||||||
List<ProdBonusProcessEmp> oProcessEmps = new List<ProdBonusProcessEmp>();
|
List<ProdBonusProcessEmp> oProcessEmps = new List<ProdBonusProcessEmp>();
|
||||||
List<Shift> oShifts = new ShiftService().GetAllShift();
|
//List<Shift> oShifts = new ShiftService().GetAllShift();
|
||||||
Shift oShift = null;
|
Shift oShift = null;
|
||||||
ProdBonusProcessEmp oProcessEmp = null;
|
ProdBonusProcessEmp oProcessEmp = null;
|
||||||
int setupID = 21;
|
int setupID = 21;
|
||||||
|
DateTime? bonusIntime = DateTime.MinValue;
|
||||||
|
DateTime? bonusOuttime = DateTime.MinValue;
|
||||||
ADParameter _ADParam = new ADParameterService().Get(setupID, payrollTypeId);
|
ADParameter _ADParam = new ADParameterService().Get(setupID, payrollTypeId);
|
||||||
|
|
||||||
List<ProdBonusAttn> prodAttns = new ProdBonusAttnService().GetBySetupIDs(_oProductionBonusSetups.CommaSeparatedIDs());
|
List<ProdBonusAttn> prodAttns = new ProdBonusAttnService().GetBySetupIDs(_oProductionBonusSetups.CommaSeparatedIDs());
|
||||||
|
@ -660,11 +662,13 @@ namespace HRM.DA
|
||||||
|
|
||||||
foreach (ProductionBonusSetup oProductionBonusSetup in _oProductionBonusSetups)
|
foreach (ProductionBonusSetup oProductionBonusSetup in _oProductionBonusSetups)
|
||||||
{
|
{
|
||||||
if(oProductionBonusSetup.ID == 10302)
|
if (oProductionBonusSetup.DesignNo == "C 24 16-30 Sep P A-Com" || oProductionBonusSetup.DesignNo == "C 24 16-30 Sep P B-Com")
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
prodAttn = prodAttns.Where(x => x.ProdBonusSetupID == oProductionBonusSetup.ID).ToList();//ToObjectsTemplate();
|
else
|
||||||
|
{ continue; }
|
||||||
|
|
||||||
|
prodAttn = prodAttns.Where(x => x.ProdBonusSetupID == oProductionBonusSetup.ID).ToList();//ToObjectsTemplate();
|
||||||
ProdBonusProcessItem oProcessItem = null;
|
ProdBonusProcessItem oProcessItem = null;
|
||||||
foreach (ProdBonusLine oLine in oProductionBonusSetup.ProductionBonusLinesNew)
|
foreach (ProdBonusLine oLine in oProductionBonusSetup.ProductionBonusLinesNew)
|
||||||
{
|
{
|
||||||
|
@ -687,16 +691,6 @@ namespace HRM.DA
|
||||||
foreach (DataRow dr in foundRows)
|
foreach (DataRow dr in foundRows)
|
||||||
{
|
{
|
||||||
basicSal = Convert.ToDouble(dr["BASICSALARY"]);
|
basicSal = Convert.ToDouble(dr["BASICSALARY"]);
|
||||||
//
|
|
||||||
int empidtest = Convert.ToInt32(dr["EMPLOYEEID"]);
|
|
||||||
if(oProductionBonusSetup.SalaryMonth == new DateTime(2023, 10, 31))
|
|
||||||
{
|
|
||||||
|
|
||||||
if (empidtest == 27620)
|
|
||||||
{
|
|
||||||
basicSal = 5145;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -705,10 +699,10 @@ namespace HRM.DA
|
||||||
bool isSuperVisor = allProdBonusSupervisors.FindIndex(x => x.EmployeeID == item.Key
|
bool isSuperVisor = allProdBonusSupervisors.FindIndex(x => x.EmployeeID == item.Key
|
||||||
&& x.ProdBonusLineID == oLine.ID) == -1 ? false : true;
|
&& x.ProdBonusLineID == oLine.ID) == -1 ? false : true;
|
||||||
List<DailyAttnProcess> dailyAttm = alldailyAttm.FindAll(x => x.EmployeeID == item.Key);
|
List<DailyAttnProcess> dailyAttm = alldailyAttm.FindAll(x => x.EmployeeID == item.Key);
|
||||||
//if (oProcessItem.EmployeeID == 36901)
|
if (item.Key == 65088)
|
||||||
//{
|
{
|
||||||
|
|
||||||
//}
|
}
|
||||||
if (isSuperVisor == false)
|
if (isSuperVisor == false)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -717,19 +711,26 @@ namespace HRM.DA
|
||||||
{
|
{
|
||||||
DailyAttnProcess dailyAtt = dailyAttm.FirstOrDefault(o => o.AttnDate.Date == tAtt.InTime.Date);
|
DailyAttnProcess dailyAtt = dailyAttm.FirstOrDefault(o => o.AttnDate.Date == tAtt.InTime.Date);
|
||||||
double wh = 0;
|
double wh = 0;
|
||||||
|
|
||||||
if (dailyAtt != null)
|
if (dailyAtt != null)
|
||||||
{
|
{
|
||||||
|
bonusIntime = dailyAtt.InTime;
|
||||||
|
bonusOuttime = dailyAtt.OutTime;
|
||||||
if (dailyAtt.OutTime != DateTime.MinValue && dailyAtt.InTime != DateTime.MinValue)
|
if (dailyAtt.OutTime != DateTime.MinValue && dailyAtt.InTime != DateTime.MinValue)
|
||||||
{
|
{
|
||||||
oShift = oShifts.FirstOrDefault(x => x.ID == dailyAtt.ShiftID);
|
// oShift = oShifts.FirstOrDefault(x => x.ID == dailyAtt.ShiftID);
|
||||||
if (oProductionBonusSetup.FromDate.Date == dailyAtt.AttnDate.Date)
|
if (oProductionBonusSetup.FromDate.Date == dailyAtt.AttnDate.Date)
|
||||||
dailyAtt.InTime = oProductionBonusSetup.FromDate > dailyAtt.InTime ? oProductionBonusSetup.FromDate : dailyAtt.InTime;
|
bonusIntime = oProductionBonusSetup.FromDate > dailyAtt.InTime ? oProductionBonusSetup.FromDate : dailyAtt.InTime;
|
||||||
else if (oProductionBonusSetup.ToDate.Date == dailyAtt.AttnDate.Date)
|
else if (dailyAtt.InTime.GetValueOrDefault().TimeOfDay < tAtt.InTime.TimeOfDay)
|
||||||
dailyAtt.OutTime = oProductionBonusSetup.ToDate < dailyAtt.OutTime ? oProductionBonusSetup.ToDate : dailyAtt.OutTime;
|
bonusIntime = dailyAtt.InTime.GetValueOrDefault().Date.AddHours(tAtt.InTime.Hour).AddMinutes(tAtt.InTime.Minute);
|
||||||
else if (oShift != null && dailyAtt.InTime.GetValueOrDefault().TimeOfDay < oShift.InTime.TimeOfDay)
|
if (oProductionBonusSetup.ToDate.Date == dailyAtt.AttnDate.Date)
|
||||||
dailyAtt.InTime = dailyAtt.InTime.GetValueOrDefault().Date.AddHours(oShift.InTime.Hour).AddMinutes(oShift.InTime.Minute);
|
bonusOuttime = oProductionBonusSetup.ToDate < dailyAtt.OutTime ? oProductionBonusSetup.ToDate : dailyAtt.OutTime;
|
||||||
|
else if (dailyAtt.OutTime.GetValueOrDefault().TimeOfDay > tAtt.OutTime.TimeOfDay)
|
||||||
|
bonusOuttime = dailyAtt.OutTime.GetValueOrDefault().Date.AddHours(tAtt.OutTime.Hour).AddMinutes(tAtt.OutTime.Minute);
|
||||||
|
//else if (oShift != null && dailyAtt.InTime.GetValueOrDefault().TimeOfDay < oShift.InTime.TimeOfDay)
|
||||||
|
// bonusIntime = dailyAtt.InTime.GetValueOrDefault().Date.AddHours(oShift.InTime.Hour).AddMinutes(oShift.InTime.Minute);
|
||||||
|
|
||||||
TimeSpan ts = (TimeSpan)(dailyAtt.OutTime - dailyAtt.InTime);
|
TimeSpan ts = (TimeSpan)(bonusOuttime - bonusIntime);
|
||||||
if (ts.Minutes < 16 && ts.Hours < 5)
|
if (ts.Minutes < 16 && ts.Hours < 5)
|
||||||
wh = ts.Hours;
|
wh = ts.Hours;
|
||||||
else if (ts.Minutes < 16)
|
else if (ts.Minutes < 16)
|
||||||
|
@ -749,22 +750,8 @@ namespace HRM.DA
|
||||||
oProcessItem = new ProdBonusProcessItem();
|
oProcessItem = new ProdBonusProcessItem();
|
||||||
oProcessItem.EmployeeID = item.Key;
|
oProcessItem.EmployeeID = item.Key;
|
||||||
oProcessItem.OTHour = oth;
|
oProcessItem.OTHour = oth;
|
||||||
if(oProcessItem.EmployeeID == 283)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
//Amount mismatch hude ammount
|
|
||||||
if (oProcessItem.EmployeeID == 27620 || oProcessItem.EmployeeID == 27620 || oProcessItem.EmployeeID == 31161 || oProcessItem.EmployeeID == 1822
|
|
||||||
|| oProcessItem.EmployeeID == 36901 || oProcessItem.EmployeeID == 37542 || oProcessItem.EmployeeID == 41160 || oProcessItem.EmployeeID == 44495
|
|
||||||
|| oProcessItem.EmployeeID == 44495 || oProcessItem.EmployeeID == 46607 || oProcessItem.EmployeeID == 49783 || oProcessItem.EmployeeID == 55041
|
|
||||||
|| oProcessItem.EmployeeID == 55155 || oProcessItem.EmployeeID == 55388)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
if (oProcessItem.EmployeeID == 27620)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
oProcessItem.Amount = Math.Round(((double)basicSal / 208 * oth) * 2, 2);
|
oProcessItem.Amount = Math.Round(((double)basicSal / 208 * oth) * 2, 2);
|
||||||
//if(oProcessItem.EmployeeID == 55388)
|
//if(oProcessItem.EmployeeID == 55388)
|
||||||
//{
|
//{
|
||||||
|
@ -791,16 +778,22 @@ namespace HRM.DA
|
||||||
{
|
{
|
||||||
if (dailyAtt.OutTime != DateTime.MinValue && dailyAtt.InTime != DateTime.MinValue)
|
if (dailyAtt.OutTime != DateTime.MinValue && dailyAtt.InTime != DateTime.MinValue)
|
||||||
{
|
{
|
||||||
oShift = oShifts.FirstOrDefault(x => x.ID == dailyAtt.ShiftID);
|
bonusIntime = dailyAtt.InTime;
|
||||||
|
bonusOuttime = dailyAtt.OutTime;
|
||||||
|
//oShift = oShifts.FirstOrDefault(x => x.ID == dailyAtt.ShiftID);
|
||||||
|
|
||||||
if (oProductionBonusSetup.FromDate.Date == dailyAtt.AttnDate.Date)
|
if (oProductionBonusSetup.FromDate.Date == dailyAtt.AttnDate.Date)
|
||||||
dailyAtt.InTime = oProductionBonusSetup.FromDate > dailyAtt.InTime ? oProductionBonusSetup.FromDate : dailyAtt.InTime;
|
bonusIntime = oProductionBonusSetup.FromDate > dailyAtt.InTime ? oProductionBonusSetup.FromDate : dailyAtt.InTime;
|
||||||
else if (oProductionBonusSetup.ToDate.Date == dailyAtt.AttnDate.Date)
|
else if (dailyAtt.InTime.GetValueOrDefault().TimeOfDay < tAtt.InTime.TimeOfDay)
|
||||||
dailyAtt.OutTime = oProductionBonusSetup.ToDate < dailyAtt.OutTime ? oProductionBonusSetup.ToDate : dailyAtt.OutTime;
|
bonusIntime = dailyAtt.InTime.GetValueOrDefault().Date.AddHours(tAtt.InTime.Hour).AddMinutes(tAtt.InTime.Minute);
|
||||||
else if (oShift != null && dailyAtt.InTime.GetValueOrDefault().TimeOfDay < oShift.InTime.TimeOfDay)
|
if (oProductionBonusSetup.ToDate.Date == dailyAtt.AttnDate.Date)
|
||||||
dailyAtt.InTime = dailyAtt.InTime.GetValueOrDefault().Date.AddHours(oShift.InTime.Hour).AddMinutes(oShift.InTime.Minute);
|
bonusOuttime = oProductionBonusSetup.ToDate < dailyAtt.OutTime ? oProductionBonusSetup.ToDate : dailyAtt.OutTime;
|
||||||
|
else if (dailyAtt.OutTime.GetValueOrDefault().TimeOfDay > tAtt.OutTime.TimeOfDay)
|
||||||
|
bonusOuttime = dailyAtt.OutTime.GetValueOrDefault().Date.AddHours(tAtt.OutTime.Hour).AddMinutes(tAtt.OutTime.Minute);
|
||||||
|
//else if (oShift != null && dailyAtt.InTime.GetValueOrDefault().TimeOfDay < oShift.InTime.TimeOfDay)
|
||||||
|
// bonusIntime = dailyAtt.InTime.GetValueOrDefault().Date.AddHours(oShift.InTime.Hour).AddMinutes(oShift.InTime.Minute);
|
||||||
|
|
||||||
TimeSpan ts = (TimeSpan)(dailyAtt.OutTime - dailyAtt.InTime);
|
TimeSpan ts = (TimeSpan)(bonusOuttime - bonusIntime);
|
||||||
if (ts.Minutes < 16 && ts.Hours < 5)
|
if (ts.Minutes < 16 && ts.Hours < 5)
|
||||||
wh = ts.Hours;
|
wh = ts.Hours;
|
||||||
else if (ts.Minutes < 16)
|
else if (ts.Minutes < 16)
|
||||||
|
@ -827,17 +820,17 @@ namespace HRM.DA
|
||||||
oLine.ProdBonusSupervisors = allProdBonusSupervisors.FindAll(x => x.ProdBonusSetupID == oProductionBonusSetup.ID
|
oLine.ProdBonusSupervisors = allProdBonusSupervisors.FindAll(x => x.ProdBonusSetupID == oProductionBonusSetup.ID
|
||||||
&& x.ProdBonusLineID == oLine.ID);
|
&& x.ProdBonusLineID == oLine.ID);
|
||||||
//Amount mismatch hude ammount
|
//Amount mismatch hude ammount
|
||||||
if (oProcessItem.EmployeeID == 27388 || oProcessItem.EmployeeID == 27620 || oProcessItem.EmployeeID == 31161 || oProcessItem.EmployeeID == 1822
|
//if (oProcessItem.EmployeeID == 27388 || oProcessItem.EmployeeID == 27620 || oProcessItem.EmployeeID == 31161 || oProcessItem.EmployeeID == 1822
|
||||||
|| oProcessItem.EmployeeID == 36901 || oProcessItem.EmployeeID == 37542 || oProcessItem.EmployeeID == 41160 || oProcessItem.EmployeeID == 44495
|
// || oProcessItem.EmployeeID == 36901 || oProcessItem.EmployeeID == 37542 || oProcessItem.EmployeeID == 41160 || oProcessItem.EmployeeID == 44495
|
||||||
|| oProcessItem.EmployeeID == 44495 || oProcessItem.EmployeeID == 46607 || oProcessItem.EmployeeID == 49783 || oProcessItem.EmployeeID == 55041
|
// || oProcessItem.EmployeeID == 44495 || oProcessItem.EmployeeID == 46607 || oProcessItem.EmployeeID == 49783 || oProcessItem.EmployeeID == 55041
|
||||||
|| oProcessItem.EmployeeID == 55155 || oProcessItem.EmployeeID == 55388)
|
// || oProcessItem.EmployeeID == 55155 || oProcessItem.EmployeeID == 55388)
|
||||||
{
|
//{
|
||||||
|
|
||||||
}
|
//}
|
||||||
if(oProcessItem.EmployeeID == 27620)
|
//if(oProcessItem.EmployeeID == 27620)
|
||||||
{
|
//{
|
||||||
double x = ((double)oLine.ProdBonusSupervisors.First(o => o.EmployeeID == item.Key).BonusPercent / 100);
|
// double x = ((double)oLine.ProdBonusSupervisors.First(o => o.EmployeeID == item.Key).BonusPercent / 100);
|
||||||
}
|
//}
|
||||||
oProcessItem.Amount = Math.Round(((double)basicSal / 208 * (double)oth *
|
oProcessItem.Amount = Math.Round(((double)basicSal / 208 * (double)oth *
|
||||||
((double)oLine.ProdBonusSupervisors.First(o => o.EmployeeID == item.Key).BonusPercent / 100)) * 2, 2);
|
((double)oLine.ProdBonusSupervisors.First(o => o.EmployeeID == item.Key).BonusPercent / 100)) * 2, 2);
|
||||||
oProcessItem.AchievePercent = 0;
|
oProcessItem.AchievePercent = 0;
|
||||||
|
@ -872,17 +865,7 @@ namespace HRM.DA
|
||||||
oProcessEmp = new ProdBonusProcessEmp();
|
oProcessEmp = new ProdBonusProcessEmp();
|
||||||
oProcessEmp.EmployeeID = item.EmployeeID;
|
oProcessEmp.EmployeeID = item.EmployeeID;
|
||||||
//Amount mismatch hude ammount
|
//Amount mismatch hude ammount
|
||||||
if (oProcessEmp.EmployeeID == 27388 || oProcessEmp.EmployeeID == 27620 || oProcessEmp.EmployeeID == 31161 || oProcessEmp.EmployeeID == 1822
|
|
||||||
|| oProcessEmp.EmployeeID == 36901 || oProcessEmp.EmployeeID == 37542 || oProcessEmp.EmployeeID == 41160 || oProcessEmp.EmployeeID == 44495
|
|
||||||
|| oProcessEmp.EmployeeID == 44495 || oProcessEmp.EmployeeID == 46607 || oProcessEmp.EmployeeID == 49783 || oProcessEmp.EmployeeID == 55041
|
|
||||||
|| oProcessEmp.EmployeeID == 55155 || oProcessEmp.EmployeeID == 55388)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
if (oProcessEmp.EmployeeID == 27620)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
oProcessEmp.Amount = Math.Round((double)item.Amount, 2);
|
oProcessEmp.Amount = Math.Round((double)item.Amount, 2);
|
||||||
oProcessEmp.Description = item.Description;
|
oProcessEmp.Description = item.Description;
|
||||||
_oProdBonusProcess.ProdBonusProcessEmps.Add(oProcessEmp);
|
_oProdBonusProcess.ProdBonusProcessEmps.Add(oProcessEmp);
|
||||||
|
|
|
@ -1,55 +1,55 @@
|
||||||
<app-loading-panel></app-loading-panel>
|
<app-loading-panel></app-loading-panel>
|
||||||
<div class="p-grid card">
|
<div class="p-grid card">
|
||||||
<div class="p-col-1 label-ailgn">
|
<div class="p-col-6 p-md-1 label-ailgn">
|
||||||
<label>Design Date</label>
|
<label>Design Date</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-2">
|
<div class="p-col-6 p-md-2">
|
||||||
<kendo-datepicker [(ngModel)]="selectedSalaryDate" [format]="'dd MMMM yyyy'"
|
<kendo-datepicker [(ngModel)]="selectedSalaryDate" [format]="'dd MMMM yyyy'"
|
||||||
style="width:100%"></kendo-datepicker>
|
style="width:100%"></kendo-datepicker>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-1">
|
<div class="p-col-12 p-md-1" align="right">
|
||||||
<button icon="refresh" kendoButton [primary]="true" style="width:100%" (click)="Loadlayout()">Refresh</button>
|
<button icon="refresh" kendoButton [primary]="true" style="width:fit-content" (click)="Loadlayout()">Refresh</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-1 label-ailgn" align="right">
|
<div class="p-col-6 p-md-1 label-ailgn">
|
||||||
<label>Design</label>
|
<label>Design</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-3">
|
<div class="p-col-6 p-md-3">
|
||||||
<!-- <app-dynamic-picker [dynamicPickerView]="_departmentPicker"
|
<!-- <app-dynamic-picker [dynamicPickerView]="_departmentPicker"
|
||||||
(onSelectCompleted)="SetFromDescription()"></app-dynamic-picker> -->
|
(onSelectCompleted)="SetFromDescription()"></app-dynamic-picker> -->
|
||||||
<kendo-dropdownlist [data]="filteredProdBSdata" [(ngModel)]="selectedProdBSdata" [filterable]="true"
|
<kendo-dropdownlist [data]="filteredProdBSdata" [(ngModel)]="selectedProdBSdata" [filterable]="true"
|
||||||
textField="design" valueField="id" style="width:95%" (filterChange)="handleFilter($event)"
|
textField="design" valueField="id" style="width:100%" (filterChange)="handleFilter($event)"
|
||||||
[defaultItem]="{ design: 'Select layout no..'}" (valueChange)="loadLines($event)">
|
[defaultItem]="{ design: 'Select layout no..'}" (valueChange)="loadLines($event)">
|
||||||
</kendo-dropdownlist>
|
</kendo-dropdownlist>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="p-col-2">
|
<!-- <div class="p-col-6 p-md-2">
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="p-col-1 label-ailgn" align="right">
|
<div class="p-col-6 p-md-1 label-ailgn">
|
||||||
<label>Line Name</label>
|
<label>Line Name</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="p-col-3">
|
<div class="p-col-6 p-md-3">
|
||||||
<kendo-dropdownlist [data]="productionBonusSetup.productionBonusLines" [(ngModel)]="selectedLine"
|
<kendo-dropdownlist [data]="productionBonusSetup.productionBonusLines" [(ngModel)]="selectedLine"
|
||||||
textField="lineName" valueField="id" [defaultItem]="{ lineName: 'Select Line..'}" style="width:100%">
|
textField="lineName" valueField="id" [defaultItem]="{ lineName: 'Select Line..'}" style="width:100%">
|
||||||
</kendo-dropdownlist>
|
</kendo-dropdownlist>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="p-col-6 label-ailgn" *ngIf="showScheduleDate">
|
<div class="p-col-12 p-md-3 label-ailgn" *ngIf="showScheduleDate">
|
||||||
<!-- <div class="p-grid">
|
<!-- <div class="p-grid">
|
||||||
<div class="p-col-3 label-ailgn">
|
<div class="p-col-6 p-md-3 label-ailgn">
|
||||||
<label>Schedule Date From</label>
|
<label>Schedule Date From</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-4">
|
<div class="p-col-6 p-md-4">
|
||||||
<kendo-datepicker [(ngModel)]="productionBonusSetup.fromDate" [format]="'dd MMMM yyyy'"
|
<kendo-datepicker [(ngModel)]="productionBonusSetup.fromDate" [format]="'dd MMMM yyyy'"
|
||||||
style="width:100%" [readonly]="true"></kendo-datepicker>
|
style="width:100%" [readonly]="true"></kendo-datepicker>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-1 label-ailgn">
|
<div class="p-col-6 p-md-1 label-ailgn">
|
||||||
<label>Upto</label>
|
<label>Upto</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-4">
|
<div class="p-col-6 p-md-4">
|
||||||
<kendo-datepicker [(ngModel)]="productionBonusSetup.toDate" [format]="'dd MMMM yyyy'" style="width:100%"
|
<kendo-datepicker [(ngModel)]="productionBonusSetup.toDate" [format]="'dd MMMM yyyy'" style="width:100%"
|
||||||
[readonly]="true"></kendo-datepicker>
|
[readonly]="true"></kendo-datepicker>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 label-ailgn"></div>
|
<div class="p-col-6 p-md-12 label-ailgn"></div>
|
||||||
</div> -->
|
</div> -->
|
||||||
<p style="color: red; font-style: italic;">Select Schedule Date Betweeen {{productionBonusSetup.fromDate | date:
|
<p style="color: red; font-style: italic;">Select Schedule Date Betweeen {{productionBonusSetup.fromDate | date:
|
||||||
'dd MMMM yyyy'}} and
|
'dd MMMM yyyy'}} and
|
||||||
|
@ -58,18 +58,33 @@
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<!--
|
||||||
|
<div class="p-col-6 p-md-6" *ngIf="!showScheduleDate">
|
||||||
|
</div> -->
|
||||||
|
|
||||||
<div class="p-col-6" *ngIf="!showScheduleDate">
|
<div class="p-col-6 p-md-1 label-ailgn">
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="p-col-2 label-ailgn" align="right">
|
|
||||||
<label>Schedule Date</label>
|
<label>Schedule Date</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-2">
|
<div class="p-col-6 p-md-2">
|
||||||
<kendo-datepicker [(ngModel)]="selectedDate" [format]="'dd MMMM yyyy'" style="width:100%"></kendo-datepicker>
|
<kendo-datepicker [(ngModel)]="selectedDate" [format]="'dd MMMM yyyy'" style="width:100%"></kendo-datepicker>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-2" align="right">
|
|
||||||
<button icon="refresh" kendoButton [primary]="true" style="width:80%" (click)="onClickRefresh()"
|
<div class="p-col-6 p-md-1 label-ailgn">
|
||||||
|
<label>In Time</label>
|
||||||
|
</div>
|
||||||
|
<div class="p-col-6 p-md-2">
|
||||||
|
<kendo-timepicker [(ngModel)]="startTime" style="width:100%"></kendo-timepicker>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="p-col-6 p-md-1 label-ailgn">
|
||||||
|
<label>Out Time</label>
|
||||||
|
</div>
|
||||||
|
<div class="p-col-6 p-md-2">
|
||||||
|
<kendo-timepicker [(ngModel)]="endTime" style="width:100%"></kendo-timepicker>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="p-col-12" align="right">
|
||||||
|
<button icon="refresh" kendoButton [primary]="true" style="width: fit-content" (click)="onClickRefresh()"
|
||||||
[disabled]="selectedProdBSdata===undefined||selectedLine===undefined||selectedDate===undefined">Refresh</button>
|
[disabled]="selectedProdBSdata===undefined||selectedLine===undefined||selectedDate===undefined">Refresh</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12">
|
<div class="p-col-12">
|
||||||
|
@ -110,8 +125,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-4">
|
<div class="p-col-4">
|
||||||
<app-employee-picker (ItemSelected)="GetSelectedEmployee($event)"
|
<app-employee-picker (ItemSelected)="GetSelectedEmployee($event)"
|
||||||
[MultiSelect]="employeeSelection==='commonEmployee'"></app-employee-picker>
|
[MultiSelect]="false"></app-employee-picker>
|
||||||
<!-- [setSelectedEmp]="_pickerSelecteEmp" [isActive]="empPickerActive" -->
|
<!-- [MultiSelect]="employeeSelection==='commonEmployee'"></app-employee-picker> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-2"></div>
|
<div class="p-col-2"></div>
|
||||||
<div class="p-col-2" align="right">
|
<div class="p-col-2" align="right">
|
||||||
|
|
|
@ -44,6 +44,9 @@ export class ProductionBonusAttendanceComponent implements OnInit {
|
||||||
|
|
||||||
selectedDate: Date = new Date;
|
selectedDate: Date = new Date;
|
||||||
|
|
||||||
|
startTime: Date;
|
||||||
|
endTime: Date;
|
||||||
|
|
||||||
selectedSalaryDate: Date = new Date();
|
selectedSalaryDate: Date = new Date();
|
||||||
|
|
||||||
showScheduleDate: boolean;
|
showScheduleDate: boolean;
|
||||||
|
@ -343,8 +346,27 @@ export class ProductionBonusAttendanceComponent implements OnInit {
|
||||||
// );
|
// );
|
||||||
// }
|
// }
|
||||||
onClickSubmit() {
|
onClickSubmit() {
|
||||||
console.log(this.prodBonusAttn);
|
// console.log(this.prodBonusAttn);
|
||||||
debugger;
|
debugger;
|
||||||
|
if (this.startTime == undefined || this.endTime == undefined) {
|
||||||
|
this.notificationService.showWarning('Please Select In/Out Time');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.prodBonusAttn.forEach(element => {
|
||||||
|
let inTime = new Date(element.inTime);
|
||||||
|
inTime.setHours(this.startTime.getHours());
|
||||||
|
inTime.setMinutes(this.startTime.getMinutes());
|
||||||
|
inTime.setSeconds(this.startTime.getSeconds());
|
||||||
|
element.inTime = inTime;
|
||||||
|
|
||||||
|
let outTime = new Date(element.outTime);
|
||||||
|
outTime.setHours(this.endTime.getHours());
|
||||||
|
outTime.setMinutes(this.endTime.getMinutes());
|
||||||
|
outTime.setSeconds(this.endTime.getSeconds());
|
||||||
|
element.outTime = outTime;
|
||||||
|
});
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
prodBonusAttn: this.prodBonusAttn,
|
prodBonusAttn: this.prodBonusAttn,
|
||||||
setupId: this.productionBonusSetup.id,
|
setupId: this.productionBonusSetup.id,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user