Break hour
This commit is contained in:
parent
ae83442f57
commit
b2b8f09506
|
@ -16,6 +16,7 @@ namespace HRM.BO
|
||||||
_oTHour = 0;
|
_oTHour = 0;
|
||||||
_salaryMonth = DateTime.MinValue;
|
_salaryMonth = DateTime.MinValue;
|
||||||
_designNo = string.Empty;
|
_designNo = string.Empty;
|
||||||
|
_breakHour = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -46,6 +47,18 @@ namespace HRM.BO
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region BreakHour : double
|
||||||
|
|
||||||
|
private double _breakHour;
|
||||||
|
|
||||||
|
public double BreakHour
|
||||||
|
{
|
||||||
|
get { return _breakHour; }
|
||||||
|
set { _breakHour = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region SalaryMonth : string
|
#region SalaryMonth : string
|
||||||
|
|
||||||
private DateTime _salaryMonth;
|
private DateTime _salaryMonth;
|
||||||
|
|
|
@ -23,8 +23,8 @@ namespace HRM.DA
|
||||||
internal static void Insert(TransactionContext tc, ProductionBonusSetup item)
|
internal static void Insert(TransactionContext tc, ProductionBonusSetup item)
|
||||||
{
|
{
|
||||||
string sql = SQLParser.MakeSQL(
|
string sql = SQLParser.MakeSQL(
|
||||||
"INSERT INTO ProductionBonusSetup(ProductionBonusSetupID, ProgramName, AchivedPercent, OTHour, SalaryMonth, DesignNo, FromDate, ToDate, MaxPerson, CreatedBy, CreationDate, Status,ProductionBonusType)" +
|
"INSERT INTO ProductionBonusSetup(ProductionBonusSetupID, ProgramName, AchivedPercent,BreakHour, OTHour, SalaryMonth, DesignNo, FromDate, ToDate, MaxPerson, CreatedBy, CreationDate, Status,ProductionBonusType)" +
|
||||||
" VALUES(%n, %s, %n, %n, %d, %s, %d, %d, %n, %n, %d, %n,%n)", item.ID, item.ProgramName, item.AchivedPercent, item.OTHour,
|
" VALUES(%n, %s, %n, %n,%n, %d, %s, %d, %d, %n, %n, %d, %n,%n)", item.ID, item.ProgramName, item.AchivedPercent, item.BreakHour, item.OTHour,
|
||||||
item.SalaryMonth, item.DesignNo, item.FromDate, item.ToDate, item.MaxPerson, item.CreatedBy, item.CreatedDate,
|
item.SalaryMonth, item.DesignNo, item.FromDate, item.ToDate, item.MaxPerson, item.CreatedBy, item.CreatedDate,
|
||||||
item.Status, (int)item.ProductionBonusType);
|
item.Status, (int)item.ProductionBonusType);
|
||||||
tc.ExecuteNonQuery(sql);
|
tc.ExecuteNonQuery(sql);
|
||||||
|
@ -37,8 +37,8 @@ namespace HRM.DA
|
||||||
internal static void Update(TransactionContext tc, ProductionBonusSetup item)
|
internal static void Update(TransactionContext tc, ProductionBonusSetup item)
|
||||||
{
|
{
|
||||||
tc.ExecuteNonQuery(
|
tc.ExecuteNonQuery(
|
||||||
"UPDATE ProductionBonusSetup SET ProgramName=%s, AchivedPercent=%n, OTHour=%n, SalaryMonth=%d, DesignNo=%s, FromDate=%d, ToDate=%d, MaxPerson=%n, Status=%n,ProductionBonusType=%n " +
|
"UPDATE ProductionBonusSetup SET ProgramName=%s, AchivedPercent=%n,BreakHour=%n, OTHour=%n, SalaryMonth=%d, DesignNo=%s, FromDate=%d, ToDate=%d, MaxPerson=%n, Status=%n,ProductionBonusType=%n " +
|
||||||
" WHERE ProductionBonusSetupID=%n", item.ProgramName, item.AchivedPercent, item.OTHour, item.SalaryMonth, item.DesignNo,
|
" WHERE ProductionBonusSetupID=%n", item.ProgramName, item.AchivedPercent, item.BreakHour, item.OTHour, item.SalaryMonth, item.DesignNo,
|
||||||
item.FromDate, item.ToDate, item.MaxPerson, item.Status,(int)item.ProductionBonusType, item.ID);
|
item.FromDate, item.ToDate, item.MaxPerson, item.Status,(int)item.ProductionBonusType, item.ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -728,11 +728,11 @@ namespace HRM.DA
|
||||||
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)
|
||||||
wh = ts.Hours - 1;
|
wh = ts.Hours - oProductionBonusSetup.BreakHour;
|
||||||
else if (ts.TotalHours < 5)
|
else if (ts.TotalHours < 5)
|
||||||
wh = ts.TotalHours;
|
wh = ts.TotalHours;
|
||||||
else
|
else
|
||||||
wh = ts.TotalHours - 1;
|
wh = ts.TotalHours - oProductionBonusSetup.BreakHour;
|
||||||
|
|
||||||
hour += wh < 0 ? 0 : wh;
|
hour += wh < 0 ? 0 : wh;
|
||||||
}
|
}
|
||||||
|
@ -791,11 +791,11 @@ namespace HRM.DA
|
||||||
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)
|
||||||
wh = ts.Hours - 1;
|
wh = ts.Hours - oProductionBonusSetup.BreakHour;
|
||||||
else if (ts.TotalHours < 5)
|
else if (ts.TotalHours < 5)
|
||||||
wh = ts.TotalHours;
|
wh = ts.TotalHours;
|
||||||
else
|
else
|
||||||
wh = ts.TotalHours - 1;
|
wh = ts.TotalHours - oProductionBonusSetup.BreakHour;
|
||||||
|
|
||||||
// hour += ts.Hours < 0 ? 0 : ts.Hours;
|
// hour += ts.Hours < 0 ? 0 : ts.Hours;
|
||||||
hour += wh < 0 ? 0 : wh;
|
hour += wh < 0 ? 0 : wh;
|
||||||
|
|
|
@ -7,6 +7,7 @@ using System.Collections.Generic;
|
||||||
using Ease.Core.Utility;
|
using Ease.Core.Utility;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using HRM.BO;
|
using HRM.BO;
|
||||||
|
using static iTextSharp.text.pdf.AcroFields;
|
||||||
|
|
||||||
namespace HRM.DA
|
namespace HRM.DA
|
||||||
{
|
{
|
||||||
|
@ -26,6 +27,7 @@ namespace HRM.DA
|
||||||
oProductionBonusSetup.DesignNo = oReader.GetString("DesignNo");
|
oProductionBonusSetup.DesignNo = oReader.GetString("DesignNo");
|
||||||
oProductionBonusSetup.ProgramName = oReader.GetString("ProgramName");
|
oProductionBonusSetup.ProgramName = oReader.GetString("ProgramName");
|
||||||
oProductionBonusSetup.AchivedPercent = oReader.GetDouble("AchivedPercent").GetValueOrDefault();
|
oProductionBonusSetup.AchivedPercent = oReader.GetDouble("AchivedPercent").GetValueOrDefault();
|
||||||
|
oProductionBonusSetup.BreakHour = oReader.GetDouble("BreakHour").GetValueOrDefault();
|
||||||
oProductionBonusSetup.OTHour = oReader.GetDouble("OTHour").GetValueOrDefault();
|
oProductionBonusSetup.OTHour = oReader.GetDouble("OTHour").GetValueOrDefault();
|
||||||
oProductionBonusSetup.FromDate = oReader.GetDateTime("FromDate").Value;
|
oProductionBonusSetup.FromDate = oReader.GetDateTime("FromDate").Value;
|
||||||
oProductionBonusSetup.ToDate = oReader.GetDateTime("ToDate").Value;
|
oProductionBonusSetup.ToDate = oReader.GetDateTime("ToDate").Value;
|
||||||
|
|
|
@ -405,11 +405,11 @@ namespace HRM.Report
|
||||||
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)
|
||||||
wh = ts.Hours - 1;
|
wh = ts.Hours - design.BreakHour;
|
||||||
else if (ts.TotalHours < 5)
|
else if (ts.TotalHours < 5)
|
||||||
wh = ts.TotalHours;
|
wh = ts.TotalHours;
|
||||||
else
|
else
|
||||||
wh = ts.TotalHours - 1;
|
wh = ts.TotalHours - design.BreakHour;
|
||||||
|
|
||||||
// hour += ts.Hours < 0 ? 0 : ts.Hours;
|
// hour += ts.Hours < 0 ? 0 : ts.Hours;
|
||||||
hour = wh < 0 ? 0 : wh;
|
hour = wh < 0 ? 0 : wh;
|
||||||
|
|
|
@ -8,6 +8,7 @@ var ProductionBonusSetup = /** @class */ (function () {
|
||||||
this.achivedPercent = 0;
|
this.achivedPercent = 0;
|
||||||
this.otHour = 0;
|
this.otHour = 0;
|
||||||
this.maxPerson = 0;
|
this.maxPerson = 0;
|
||||||
|
this.breakHour = 1;
|
||||||
// this.salaryMonth = null;
|
// this.salaryMonth = null;
|
||||||
this.designNo = '';
|
this.designNo = '';
|
||||||
this.programName = '';
|
this.programName = '';
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"productionBonusSetup.js","sourceRoot":"","sources":["productionBonusSetup.ts"],"names":[],"mappings":";;;AAAA,qCAAuE;AAKvE;IAgBE;QACE,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;QACZ,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC;QACxB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACnB,2BAA2B;QAC3B,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,wBAAwB;QACxB,sBAAsB;QACtB,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC;QAChC,IAAI,CAAC,MAAM,GAAG,uBAAe,CAAC,IAAI,CAAC;QACnC,IAAI,CAAC,sBAAsB,GAAG,EAAE,CAAC;QACjC,IAAI,CAAC,oBAAoB,GAAG,EAAE,CAAC;QAC/B,IAAI,CAAC,uBAAuB,GAAG,EAAE,CAAC;QAClC,6DAA6D;IAE/D,CAAC;IACH,2BAAC;AAAD,CAAC,AAlCD,IAkCC;AAlCY,oDAAoB"}
|
{"version":3,"file":"productionBonusSetup.js","sourceRoot":"","sources":["productionBonusSetup.ts"],"names":[],"mappings":";;;AAAA,qCAAuE;AAKvE;IAiBE;QACE,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;QACZ,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC;QACxB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QACd,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACnB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACrB,2BAA2B;QAC3B,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,wBAAwB;QACxB,sBAAsB;QACtB,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC;QAChC,IAAI,CAAC,MAAM,GAAG,uBAAe,CAAC,IAAI,CAAC;QACnC,IAAI,CAAC,sBAAsB,GAAG,EAAE,CAAC;QACjC,IAAI,CAAC,oBAAoB,GAAG,EAAE,CAAC;QAC/B,IAAI,CAAC,uBAAuB,GAAG,EAAE,CAAC;QAClC,6DAA6D;IAE/D,CAAC;IACH,2BAAC;AAAD,CAAC,AApCD,IAoCC;AApCY,oDAAoB"}
|
|
@ -6,6 +6,7 @@ import { ProdBonusWorkSchedule } from "./prodBonusWorkSchedule";
|
||||||
export class ProductionBonusSetup {
|
export class ProductionBonusSetup {
|
||||||
id: number;
|
id: number;
|
||||||
achivedPercent: number;
|
achivedPercent: number;
|
||||||
|
breakHour: number;
|
||||||
otHour: number;
|
otHour: number;
|
||||||
maxPerson: number;
|
maxPerson: number;
|
||||||
salaryMonth: Date;
|
salaryMonth: Date;
|
||||||
|
@ -23,7 +24,8 @@ export class ProductionBonusSetup {
|
||||||
this.id = 0;
|
this.id = 0;
|
||||||
this.achivedPercent = 0;
|
this.achivedPercent = 0;
|
||||||
this.otHour = 0;
|
this.otHour = 0;
|
||||||
this.maxPerson = 0;
|
this.maxPerson = 0;
|
||||||
|
this.breakHour = 1;
|
||||||
// this.salaryMonth = null;
|
// this.salaryMonth = null;
|
||||||
this.designNo = '';
|
this.designNo = '';
|
||||||
this.programName = '';
|
this.programName = '';
|
||||||
|
|
|
@ -39,29 +39,36 @@
|
||||||
<div class="p-col-12 p-lg-1 label-ailgn">
|
<div class="p-col-12 p-lg-1 label-ailgn">
|
||||||
<label>Program Name</label>
|
<label>Program Name</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-lg-3">
|
<div class="p-col-12 p-lg-2">
|
||||||
<input [(ngModel)]="productionBonusSetup.programName" style="width:100%" type="text" pInputText>
|
<input [(ngModel)]="productionBonusSetup.programName" style="width:100%" type="text" pInputText>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-lg-1 label-ailgn">
|
<div class="p-col-12 p-lg-1 label-ailgn">
|
||||||
<label>Max Persons</label>
|
<label>Max Persons</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-lg-3">
|
<div class="p-col-12 p-lg-2">
|
||||||
<kendo-numerictextbox [(ngModel)]="productionBonusSetup.maxPerson" [decimals]="0"
|
<kendo-numerictextbox [(ngModel)]="productionBonusSetup.maxPerson" [decimals]="0"
|
||||||
style="width:100%"></kendo-numerictextbox>
|
style="width:100%"></kendo-numerictextbox>
|
||||||
|
</div>
|
||||||
|
<div class="p-col-12 p-lg-1 label-ailgn">
|
||||||
|
<label>Break Hour</label>
|
||||||
|
</div>
|
||||||
|
<div class="p-col-12 p-lg-2">
|
||||||
|
<kendo-numerictextbox [(ngModel)]="productionBonusSetup.breakHour" [decimals]="2"
|
||||||
|
style="width:100%"></kendo-numerictextbox>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-lg-1 label-ailgn">
|
<div class="p-col-12 p-lg-1 label-ailgn">
|
||||||
<label>Achieved %</label>
|
<label>Achieved %</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-lg-3">
|
<div class="p-col-12 p-lg-2">
|
||||||
<kendo-numerictextbox [(ngModel)]="productionBonusSetup.achivedPercent" [decimals]="2"
|
<kendo-numerictextbox [(ngModel)]="productionBonusSetup.achivedPercent" [decimals]="2"
|
||||||
style="width:100%"></kendo-numerictextbox>
|
style="width:100%"></kendo-numerictextbox>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-lg-1 label-ailgn">
|
<div class="p-col-12 p-lg-1 label-ailgn">
|
||||||
<label>Bonus Type</label>
|
<label>Bonus Type</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-lg-2">
|
<div class="p-col-12 p-lg-2">
|
||||||
<kendo-dropdownlist [data]="bonusType" [(ngModel)]="selectedBonusType" [textField]="'label'"
|
<kendo-dropdownlist [data]="bonusType" [(ngModel)]="selectedBonusType" [textField]="'label'"
|
||||||
[defaultItem]="{ label: 'Select Bonus Type...', value: null }" [valueField]="'value'" style="width:100%">
|
[defaultItem]="{ label: 'Select Bonus Type...', value: null }" [valueField]="'value'" style="width:100%">
|
||||||
</kendo-dropdownlist>
|
</kendo-dropdownlist>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-lg-1 label-ailgn">
|
<div class="p-col-12 p-lg-1 label-ailgn">
|
||||||
|
@ -69,7 +76,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-lg-2">
|
<div class="p-col-12 p-lg-2">
|
||||||
<kendo-datepicker [(ngModel)]="productionBonusSetup.fromDate" [format]="'dd MMMM yyyy'"
|
<kendo-datepicker [(ngModel)]="productionBonusSetup.fromDate" [format]="'dd MMMM yyyy'"
|
||||||
style="width:100%"></kendo-datepicker>
|
style="width:100%"></kendo-datepicker>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="p-col-12 p-lg-1 label-ailgn">
|
<div class="p-col-12 p-lg-1 label-ailgn">
|
||||||
|
@ -77,14 +84,14 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-lg-2">
|
<div class="p-col-12 p-lg-2">
|
||||||
<kendo-datepicker [(ngModel)]="productionBonusSetup.toDate" [format]="'dd MMMM yyyy'"
|
<kendo-datepicker [(ngModel)]="productionBonusSetup.toDate" [format]="'dd MMMM yyyy'"
|
||||||
style="width:100%"></kendo-datepicker>
|
style="width:100%"></kendo-datepicker>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-lg-1 label-ailgn">
|
<div class="p-col-12 p-lg-1 label-ailgn">
|
||||||
<label>Bonus Hours</label>
|
<label>Bonus Hours</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-lg-2">
|
<div class="p-col-12 p-lg-2">
|
||||||
<kendo-numerictextbox [(ngModel)]="productionBonusSetup.otHour" [decimals]="2"
|
<kendo-numerictextbox [(ngModel)]="productionBonusSetup.otHour" [decimals]="2"
|
||||||
style="width:100%"></kendo-numerictextbox>
|
style="width:100%"></kendo-numerictextbox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</kendo-card>
|
</kendo-card>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user