79 lines
2.8 KiB
C#
79 lines
2.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace HRM.BO
|
|
{
|
|
#region LFA Payment Approval (not tables)
|
|
|
|
/// <summary>
|
|
/// LFA Payment Approval works exactly as Salary Approval: the Logic key lfaapproval/workflow decides
|
|
/// between Direct Approve ("No") and the approval workflow ("Yes"), whose approvers are set up for
|
|
/// WFTYPE 33 in Work Flow Setup and act from the Payment Approval page (/payment-approval/lfa).
|
|
/// </summary>
|
|
public static class LFAPaymentApproval
|
|
{
|
|
/// <summary>WFTYPE.WFTYPEID of LFA Payment (Salary 30, Bonus 31, Leave Encashment 32).</summary>
|
|
public const int WFTypeID = 33;
|
|
|
|
/// <summary>Logic configuration: lfaapproval / workflow = Yes | No.</summary>
|
|
public const string LogicParent = "lfaapproval";
|
|
public const string LogicChild = "workflow";
|
|
}
|
|
|
|
/// <summary>What the LFA Payment Approval page needs to know before it shows its buttons.</summary>
|
|
public class LFAApprovalInfo
|
|
{
|
|
/// <summary>lfaapproval/workflow = Yes: batches go through the approval workflow.</summary>
|
|
public bool IsWorkflowRequired { get; set; }
|
|
|
|
/// <summary>The login is linked with an employee (the workflow needs an initiator employee).</summary>
|
|
public bool HasEmployee { get; set; }
|
|
|
|
/// <summary>At least one approval rule is set up for LFA Payment in Work Flow Setup.</summary>
|
|
public bool HasWorkflowSetup { get; set; }
|
|
}
|
|
|
|
/// <summary>Approve (Direct) or Submit for approval one batch.</summary>
|
|
public class LFAApprovalRequest
|
|
{
|
|
public int LFAPaymentID { get; set; }
|
|
public string Remarks { get; set; }
|
|
}
|
|
|
|
/// <summary>An approver approves or reverts the workflow step (WFMovementTran) they received.</summary>
|
|
public class LFAApproverActionRequest
|
|
{
|
|
public int WFMovementTranID { get; set; }
|
|
public string Remarks { get; set; }
|
|
}
|
|
|
|
public class LFAApprovalResult
|
|
{
|
|
public bool Done { get; set; }
|
|
public string Message { get; set; }
|
|
|
|
/// <summary>True when the batch is now fully approved.</summary>
|
|
public bool Approved { get; set; }
|
|
}
|
|
|
|
/// <summary>The batch an approver opened from the Payment Approval page.</summary>
|
|
public class LFAApproverBatch
|
|
{
|
|
public LFAApproverBatch()
|
|
{
|
|
Employees = new List<LFAPaymentBatchEmployee>();
|
|
}
|
|
|
|
public LFAPaymentBatch Batch { get; set; }
|
|
public List<LFAPaymentBatchEmployee> Employees { get; set; }
|
|
|
|
/// <summary>The login is a pending approver of this step and may Approve or Revert it.</summary>
|
|
public bool CanAct { get; set; }
|
|
|
|
/// <summary>Why the login cannot act (already acted, not their step, batch undone ...).</summary>
|
|
public string Message { get; set; }
|
|
}
|
|
|
|
#endregion
|
|
}
|