% ' MyPAYE ' Module: GenericAEExportFormat.asp ' ' This software is the copyright of Mr T J Sheppard and may not be copied, duplicated or ' modified other than as permitted in the licence agreement. ' ' © 2012 - 2021 Mr T J Sheppard ' Lyndale House ' Church Street ' Bradwell ' Hope Valley ' S33 9HJ ' ' Tel 0845 643 5191 ' Email Support@MyPAYE.co.uk ' ' MyPAYE is a Registered Trademark of MyPAYE Ltd '------------------------------------------------------------------- ' ' Updated 09 April 2021 ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' ' Description - This module enables a user defined Generic AE export file format. ' ' Amendment Log '------------------------------------------------------------------------------------------ ' Date | Name | Vers. | Description '------------------------------------------------------------------------------------------ ' 21/03/16 | DC | 5.0.05 | Page added ' 17/06/15 | DC | 5.0.08 | Added Gross earnings ' 08/12/15 | DC | 5.0.17 | Added Taxable earnings ' 21/02/17 | DC | 5.0.17a| Added Non-Banded pens earnings, and added code to clear ' | | | text when checkbox cleared. ' | | | Fixed non-working LogOut. ' 10/10/17 | TJS | 5.1.10 | Corrected conflict where PSID param was used for both PaySlipID and PenSchID on new employee wizard ' 20/10/19 | TJS | 5.7.00 | Modified to use GetMainMenuParam to save having to read lots of parameters for each page build ' 25/02/20 | TJS | 5.7.04 | Modified to cater for Partner only reports on Multi Employer Overview ' 30/05/20 | TJS | 5.8.00 | Modified for new styling - added centered class on body and modified to replace stylesheet.css, mainmenu.css and buttons-css.asp with BodyAndMenu-css.asp ' 09/04/21 | TJS | 5.9.09 | Modified to use ASPDOTNET/LogOut.aspx and ASPDOTNET/AgencyCancel.aspx pages ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' PageID = 43183 NoBack = True if Request.ServerVariables("request_method") = "GET" then SessionID = request.querystring("ID") SessionVarsID = RemoveHTML(request.querystring("SV")) SourceFrame = RemoveHTML(request.querystring("S")) DestFrame = RemoveHTML(request.querystring("D")) EmployerID = CheckURLDBIDField(RemoveHTML(request.querystring("ER")), "EmployerID") AddNewEdit = RemoveHTML(request.querystring("ANE")) CancelPage = RemoveHTML(request.querystring("CPge")) else SessionID = request.form("ID") SessionVarsID = RemoveHTML(request.form("SV")) SourceFrame = RemoveHTML(request.form("S")) DestFrame = RemoveHTML(request.form("D")) EmployerID = CheckURLDBIDField(RemoveHTML(request.form("ER")), "EmployerID") AddNewEdit = RemoveHTML(request.form("ANE")) CancelPage = RemoveHTML(request.form("CPge")) end if %> <%GetSessionVarsIDRecord(SessionVarsID)%> <% if Request.ServerVariables("request_method") = "GET" then FailureFields = RemoveHTML(request.querystring("FFld")) FailureMessage = RemoveHTML(request.querystring("FMsg")) AlertMessage = RemoveHTML(request.querystring("AlMsg")) else FailureFields = RemoveHTML(request.form("FFld")) FailureMessage = RemoveHTML(request.form("FMsg")) AlertMessage = RemoveHTML(request.form("AlMsg")) end if Function CheckValidationFailure(FieldName) if instr(1, FailureFields, ":" & FieldName & ":") = 0 then ' no failure - set control to normal CheckValidationFailure = "" else ' validation failed - set control to red outline CheckValidationFailure = "-error" end if end Function ' get details for user who is logged in sql = "SELECT Employer_ID, " & UserTableMenuPermissionFields & " FROM " & DBSchema & "Users INNER JOIN " & DBSchema & "User_Permissions " sql = sql & "ON Users.User_ID = User_Permissions.User_ID AND (Employee_Employer_ID = '' OR Employee_Employer_ID = '" sql = sql & EncodeEmployerID(UserPermissionsTable, EmployerID) & "') WHERE Users.User_ID = " & GetSessionVar("UserID") sql = sql & " AND User_Permissions.Deleted = 0 ORDER BY Employee_Employer_ID DESC" set rsUser = OpenRecordset(objConn, sql) sql = "SELECT " & EmployerTableMenuOptionFields & " FROM " & DBSchema & "Employers WHERE Employer_ID = " & EmployerID set rsEmployer = OpenRecordset(objConn, sql) ReadMainMenuParams SessionVarsID, cBool(rsUser("User_Admin")), (cBool(rsUser("Run_Payroll")) or cBool(rsUser("Payroll_EOY")) or cBool(rsUser("CIS_Returns"))), _ cBool(rsUser("Run_Payroll")), rsUser("Support_User_ID") ' TJS 20/10/19 if AddNewEdit <> "Edit" then ReadOnly=" readonly" AllowChanges = false else ReadOnly="" AllowChanges = true end if response.Expires = -1500 response.Expiresabsolute = Now() - 2 response.AddHeader "pragma", "no-cache" response.AddHeader "cache-control", "no-store" response.CacheControl = "no-cache" %>