half day leave bug fixed

pull/15/head
Sultan khan 2 years ago
parent a2ed4e52f3
commit d4a795dda1

@ -1,6 +1,6 @@
class CalculateAbsenceDuration {
num? pABSENCEDAYS;
num? pABSENCEHOURS;
double? pABSENCEDAYS;
double? pABSENCEHOURS;
String? pRETURNMSG;
String? pRETURNSTATUS;

@ -40,7 +40,7 @@ class _AddLeaveBalanceScreenState extends State<AddLeaveBalanceScreen> {
GetAbsenceAttendanceTypesList? selectedAbsenceType;
DateTime? startDateTime;
DateTime? endDateTime;
int? totalDays;
double? totalDays;
String comment = "";
ReplacementList? selectedReplacementEmployee;
String? selectedEmp;
@ -90,7 +90,7 @@ class _AddLeaveBalanceScreenState extends State<AddLeaveBalanceScreen> {
Utils.showLoading(context);
CalculateAbsenceDuration duration = await LeaveBalanceApiClient()
.calculateAbsenceDuration(selectedAbsenceType!.aBSENCEATTENDANCETYPEID!, Utils.getMonthNamedFormat(startDateTime!), Utils.getMonthNamedFormat(endDateTime!), -999, empID: selectedEmp);
totalDays = duration.pABSENCEDAYS?.toInt();
totalDays = duration.pABSENCEDAYS?.toDouble();
Utils.hideLoading(context);
setState(() {});
} catch (ex) {
@ -232,7 +232,7 @@ class _AddLeaveBalanceScreenState extends State<AddLeaveBalanceScreen> {
isInputTypeNum: true,
isEnable: false,
onChange: (input) {
totalDays = int.parse(input);
totalDays = double.tryParse(input);
},
),
12.height,

Loading…
Cancel
Save