Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Set Date Italian
- Set Hours To 24
- vtanggal = tmp_absen.tgl
- vjam_masuk = Alltrim(tmp_absen.msk)
- nkiri_masuk = Val(Left(vjam_masuk,2))
- nkanan_masuk = Val(Right(vjam_masuk,2))
- vjam_keluar = Alltrim(This.Value)
- nkiri_keluar = Val(Left(vjam_keluar,2))
- nkanan_keluar = Val(Right(vjam_keluar,2))
- vatur_masuk = Alltrim(tmp_absen.j_msk)
- nkiri_atur_masuk = Val(Left(vatur_masuk,2))
- nkanan_atur_masuk = Val(Right(vatur_masuk,2))
- vatur_keluar = Alltrim(tmp_absen.j_klr)
- nkiri_atur_keluar = Val(Left(vatur_keluar,2))
- nkanan_atur_keluar = Val(Right(vatur_keluar,2))
- ** Tgl chkin: 2014-11-25 07:00
- today_chkin=Datetime(Year(vtanggal), Month(vtanggal), Day(vtanggal), nkiri_masuk, nkanan_masuk, 0)
- ** Tgl chkout: 2014-11-26 17:00
- today_chkout=Datetime(Year(today_chkin), Month(today_chkin), Day(today_chkin), nkiri_keluar, nkanan_keluar, 0)
- ** aturan jam masuk: 2014-11-25 08:00
- rule_chkin=Datetime(Year(today_chkin), Month(today_chkin), Day(today_chkin), nkiri_atur_masuk, nkanan_atur_masuk, 0)
- ** aturan jam pulang: 2014-11-25 16:30
- rule_chkout=Datetime(Year(today_chkin), Month(today_chkin), Day(today_chkin), nkiri_atur_keluar, nkanan_atur_keluar, 0)
- _hour = ((rule_chkout-today_chkout)/3600) * Iif(rule_chkout-today_chkout<0, -1, 1)
- _min = Str(((rule_chkout-today_chkout)/3600*60) * Iif(rule_chkout-today_chkout<0,-1,1),99)
- _sec = Str(((rule_chkout-today_chkout)/3600*60*60) * Iif(rule_chkout-today_chkout<0,-1,1),99)
- mlbh = Iif(today_chkout-rule_chkout <= 0, 1, 2)
- If mlbh = 2
- vovertime = Transform(_hour,"99999.9999")
- Else
- vovertime = ''
- Endif
- If mlbh = 2
- xovertime = Strtran(Transform(Int(_hour),"99") + ":" + ;
- TRANSFORM(Mod(Val(_min),60),"99") + ":" + ;
- TRANSFORM(Mod(Val(_sec),60),"99"), ;
- " ", "0")
- Else
- xovertime = ''
- Endif
- && Isi OverTime
- Replace lbh_jam With xoverti
- ** Tgl chkin: 2014-11-25 07:00
- today_chkin=Datetime(Year(vtanggal), Month(vtanggal), Day(vtanggal), nkiri_masuk, nkanan_masuk, 0)
- ** Tgl chkout: 2014-11-26 17:00
- today_chkout=Datetime(Year(today_chkin), Month(today_chkin), Day(today_chkin), nkiri_keluar, nkanan_keluar, 0)
- ** aturan jam masuk: 2014-11-25 08:00
- rule_chkin=Datetime(Year(today_chkin), Month(today_chkin), Day(today_chkin), nkiri_atur_masuk, nkanan_atur_masuk, 0)
- ** aturan jam pulang: 2014-11-25 16:30
- rule_chkout=Datetime(Year(today_chkin), Month(today_chkin), Day(today_chkin), nkiri_atur_keluar, nkanan_atur_keluar, 0)
- _hour = ((rule_chkout-today_chkout)/3600) * Iif(rule_chkout-today_chkout<0, -1, 1)
- _min = Str(((rule_chkout-today_chkout)/3600*60) * Iif(rule_chkout-today_chkout<0,-1,1),99)
- _sec = Str(((rule_chkout-today_chkout)/3600*60*60) * Iif(rule_chkout-today_chkout<0,-1,1),99)
- mlbh = Iif(today_chkout-rule_chkout <= 0, 1, 2)
- If mlbh = 2
- vovertime = Transform(_hour,"99999.9999")
- Else
- vovertime = ''
- Endif
- If mlbh = 2
- xovertime = Strtran(Transform(Int(_hour),"99") + ":" + ;
- TRANSFORM(Mod(Val(_min),60),"99") + ":" + ;
- TRANSFORM(Mod(Val(_sec),60),"99"), ;
- " ", "0")
- Else
- xovertime = ''
- Endif
- && Isi OverTime
- Replace lbh_jam With xoverti
- ** Tgl chkout: 2014-11-26 17:00
- today_chkout=Datetime(Year(today_chkin), Month(today_chkin), Day(today_chkin), nkiri_keluar, nkanan_keluar, 0)
- ** aturan jam masuk: 2014-11-25 08:00
- rule_chkin=Datetime(Year(today_chkin), Month(today_chkin), Day(today_chkin), nkiri_atur_masuk, nkanan_atur_masuk, 0)
- ** aturan jam pulang: 2014-11-25 16:30
- rule_chkout=Datetime(Year(today_chkin), Month(today_chkin), Day(today_chkin), nkiri_atur_keluar, nkanan_atur_keluar, 0)
- _hour = ((rule_chkout-today_chkout)/3600) * Iif(rule_chkout-today_chkout<0, -1, 1)
- _min = Str(((rule_chkout-today_chkout)/3600*60) * Iif(rule_chkout-today_chkout<0,-1,1),99)
- _sec = Str(((rule_chkout-today_chkout)/3600*60*60) * Iif(rule_chkout-today_chkout<0,-1,1),99)
- mlbh = Iif(today_chkout-rule_chkout <= 0, 1, 2)
- If mlbh = 2
- vovertime = Transform(_hour,"99999.9999")
- Else
- vovertime = ''
- Endif
- If mlbh = 2
- xovertime = Strtran(Transform(Int(_hour),"99") + ":" + ;
- TRANSFORM(Mod(Val(_min),60),"99") + ":" + ;
- TRANSFORM(Mod(Val(_sec),60),"99"), ;
- " ", "0")
- Else
- xovertime = ''
- Endif
- && Isi OverTime
- Replace lbh_jam With xoverti
- ** aturan jam masuk: 2014-11-25 08:00
- rule_chkin=Datetime(Year(today_chkin), Month(today_chkin), Day(today_chkin), nkiri_atur_masuk, nkanan_atur_masuk, 0)
- ** aturan jam pulang: 2014-11-25 16:30
- rule_chkout=Datetime(Year(today_chkin), Month(today_chkin), Day(today_chkin), nkiri_atur_keluar, nkanan_atur_keluar, 0)
- _hour = ((rule_chkout-today_chkout)/3600) * Iif(rule_chkout-today_chkout<0, -1, 1)
- _min = Str(((rule_chkout-today_chkout)/3600*60) * Iif(rule_chkout-today_chkout<0,-1,1),99)
- _sec = Str(((rule_chkout-today_chkout)/3600*60*60) * Iif(rule_chkout-today_chkout<0,-1,1),99)
- mlbh = Iif(today_chkout-rule_chkout <= 0, 1, 2)
- If mlbh = 2
- vovertime = Transform(_hour,"99999.9999")
- Else
- vovertime = ''
- Endif
- If mlbh = 2
- xovertime = Strtran(Transform(Int(_hour),"99") + ":" + ;
- TRANSFORM(Mod(Val(_min),60),"99") + ":" + ;
- TRANSFORM(Mod(Val(_sec),60),"99"), ;
- " ", "0")
- Else
- xovertime = ''
- Endif
- && Isi OverTime
- Replace lbh_jam With xoverti
- ** aturan jam pulang: 2014-11-25 16:30
- rule_chkout=Datetime(Year(today_chkin), Month(today_chkin), Day(today_chkin), nkiri_atur_keluar, nkanan_atur_keluar, 0)
- _hour = ((rule_chkout-today_chkout)/3600) * Iif(rule_chkout-today_chkout<0, -1, 1)
- _min = Str(((rule_chkout-today_chkout)/3600*60) * Iif(rule_chkout-today_chkout<0,-1,1),99)
- _sec = Str(((rule_chkout-today_chkout)/3600*60*60) * Iif(rule_chkout-today_chkout<0,-1,1),99)
- mlbh = Iif(today_chkout-rule_chkout <= 0, 1, 2)
- If mlbh = 2
- vovertime = Transform(_hour,"99999.9999")
- Else
- vovertime = ''
- Endif
- If mlbh = 2
- xovertime = Strtran(Transform(Int(_hour),"99") + ":" + ;
- TRANSFORM(Mod(Val(_min),60),"99") + ":" + ;
- TRANSFORM(Mod(Val(_sec),60),"99"), ;
- " ", "0")
- Else
- xovertime = ''
- Endif
- && Isi OverTime
- Replace lbh_jam With xovertime
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement