Skip to main content

Probation period completion intimation in advance

This is the option to get the confirmation mail to the selected user for confirming employee probation   prior to completion of his probation.

Run the stored procedure in the database.

Procedure:

Create
PROCEDURE pPay_SendProbationAlert
(
    
@xmlIn AS XML = NULL
    
,@xmlOut AS XML = NULL OUT
    
)
AS
BEGIN
    
SET NOCOUNT ON;
    
SET @xmlOut = @xmlIn

   
DECLARE @Key AS VARCHAR(50)='iTransId'
     DECLARE @InEmployeeIds as NVARCHAR(max)=''
    
DECLARE @OutEmployeeIds as NVARCHAR(max)=''

   
--Retriving Employee Id
     select top 1 @InEmployeeIds = v.value('Value[1]', 'varchar(max)')
    
FROM @xmlIn.nodes('/ArrayOfKeyValuePair/KeyValuePair') x(v)

SELECT @OutEmployeeIds = isnull(STUFF((
            
SELECT ',' + convert(VARCHAR(20), mPay_Employee.iMasterId)
            
FROM muPay_Employee
            
INNER JOIN mPay_Employee ON muPay_Employee.iMasterId = mPay_Employee.iMasterId
            
WHERE DATEDIFF(dd, getdate(), DATEADD(mm, fProbationPeriod, dbo.IntToDate(dDateofJoining))) + 1 = 7
                
AND iEmployeeStatus = 70
            
FOR XML PATH('')),1,1,''),0)

   
SET @xmlOut.modify('replace value of(ArrayOfKeyValuePair/KeyValuePair[Key = sql:variable("@Key")]/Value/text())[1] with sql:variable("@OutEmployeeIds")'
)

END

Create Work flow after executing the procedure.

Settings>>Approval>>Work Flow

image_thumb2

Enter the stored procedure name against Formula field for work flow definition.

Under Actions tab, select Email and add Probation – Employee master under Template field.

image_thumb6

Select recipient type as per the requirement from the below list. Also select the recipient. In the above screen, recipient type is reporting to and recipient is level 1. Means the reporting manager of the employee will get the mail for his confirmation.

image_thumb11

In the above example, the flow is defined as, 7days prior to the completion of probation confirmation, a mail will be triggered to the reporting manager for his confirmation.

Ex: Lets say Employee joined on 17-10-2018, and the probation period is 3 months. So as per the procedure, the reporting manager will get a mail on 11-01-2019 for confirmation which is 7 days prior to the probation period completion.

Comments

Popular posts from this blog

TDS details in Payslip

TDS variables are added in the payslip to display the tax details for employees. These variables will give a clear idea to the employee of what is the taxable income, total tax per year to be deducted, tax deducted till date and the balance tax which he needs to pay. Follow the steps below. 1. Create the payroll components as mentioned below under Deductions. TDS_TotalTaxableIncome TDS_TotalTax TDS_PrevEmployerTDS TDS_TaxDeductedYTD TDS_BalanceTax 2. Go to deduction preferences, and add the TDS variable exactly with the same name under formula. Below is the screen shot for reference. 3. The values of TDS variables will be displayed in the payroll preview screen. The same will be displayed in the payslip, once these variables are mapped to the payslip. Note: 1. Priority Order: TDS variables should be placed after TDS component. Sample Payslip with TDS variable:

Advance Leave Encashment

This option is for leave encashment for advance leaves. There are two scenarios here: 1. If payment type is selected as continuous in leave encashment screen, then the leave encashment salary will be credited through the payroll. 2. If payment type is selected as advance in leave encashment screen, then the leave encashment salary will not be credited through payroll but in the print layout, encash amount can be viewed. Settings>>Customization>>Leaves>>Leave Encashment>>Print layout Note: Employee Account and Salary Account should be mapped in the Employee master Follow the below steps for FA posting: 1. Create two account master fields in leave encashment screen as shown in the below screen. In the above two screens, two accounts are created. One is Company account in the first screen and Emp account in the second screen. Employee account is created to credit the encash amount and add these two fields in page layout of leave encashment. 2. Run below stored pro...

Using Stored Procedure in the Earning/Deduction Formulas

Naming Convention : Stored Procedure Name : pPay_GetData1 Variable to use above stored procedure : fPay1 Advantages: we can assign multiple earning/deduction values using single stored procedure Eg : CREATE PROCEDURE pPay_GetData1 (      @xmlIn AS XML = NULL      ,@xmlOut AS XML = NULL OUT      ,@Result AS DECIMAL(18, 4) OUT      ) AS BEGIN      SET NOCOUNT ON;      SET @xmlOut = @xmlIn     DECLARE @EmpId AS VARCHAR(max),@PayrollRefType AS VARCHAR(100)      declare @ToDate as int=0     declare @BonusFromDate as int=0,@BonusToDate as int=0     --Retriving Employee Id      SELECT @EmpId = v.value('iEmpId[1]', 'varchar(max)')      FROM @xmlIn.nodes('/PayrollData') x(v)     --Retriving Payroll Date      SELECT @ToDate = v.value('...