• Working days change

    By Dalia Mansour 2 decades ago

    I am currently testing the Vacation request for our office in Cairo/Egypt. Our weekend is Friday and Saturday and Lotus Notes client is setup that way. But this does not reflect on this application or on the annual leave allowance.

    How can I change the working days?

    Thanks

    • Change Weekend Days

      By Gary Cousins 2 decades ago

      Hello,



      You need to change the Duration field on the Leave Request form



      The current formula is:







      @If(@IsNewDoc; 1; @Success);



      tmpWeekEnd:= 1:7;



      REM {Get Public Holidays};

      tmpHolidays:= @DbLookup("":"NoCache";"";"Holidays";Country;2);



      REM {Create a textlist that contains all days in the period};

      tmpDatelist := @Text(@Explode(@TextToTime(@Text(StartDate)+" - "+@Text(Return))));



      REM {Remove the holidays};

      tmpNoHolidays := @TextToTime(@Trim(@Replace(tmpDatelist; @Text(tmpHolidays); "")));



      REM {Remove Weekends};

      tmpWeekdays := @If(@Text(tmpNoHolidays)="";"";@Text(@Weekday(tmpNoHolidays)));



      tmpWorkdays := @If(@Text(tmpWeekdays)="";"";@Trim(@Replace(tmpWeekdays; @Text(tmpWeekEnd); "")));



      @Elements(tmpWorkdays)







      1 is Sunday and 7 is Saturday.



      In your case 6 is Friday and 7 is Saturday so:







      @If(@IsNewDoc; 1; @Success);



      tmpWeekEnd:= 6:7;







      You should be able to work out the changes you need from the remarks (REM) in the above code.



      You will also need to edit the Lotusscript in the "Admin - Approve A/L" and "Admin - Revoke A/L" buttons.

      • thanks

        By Dalia Mansour 2 decades ago

        Thank you it worked.

      • Shift workers?

        By Pete McPhedran 2 decades ago

        Hi,



        Is there a simple way that this dB can be modified to allow for shiftworkers? We have people that work weekday and weekend days and they are unable to request a Saturday or Sunday off if they are scheduled to work those days.



        Thanks,



        –Pete