The exit settlement for a leaving employee: payable components such as salary to the last working day, leave encashment, gratuity and pending reimbursement, net of deductions such as notice recovery, loan recovery and TDS, all held as FullAndFinalSettlementLine children. Posting builds one journal - debit each payable line's expense GL, credit each deduction line's payable GL, credit Payroll Payable for the net - raises a Resource-keyed payable open item for the net, dates everything on the Last Working Day, and then closes the person out by setting the matching Employee to SettlementStatus Settled and EmploymentStatus Exited and filling Date Of Exit if empty. Posting refuses when the settlement is already posted, has no lines, has no Resource, or when recoveries exceed payables so the net would be negative. The Employee it closes is located by matching Employee.ResourceId, so a settlement raised against a Resource with no Employee row still posts but closes nobody.
Fields
| Field | Label | Type | Required | What it does |
BranchId | Branch | Lookup → Branch | | |
CreatedById | Created By | Lookup → UserAccount | Yes | |
CreatedDateTime | Created Date | DateAndTime | Yes | |
GLId | GL | Lookup → Journal | | Filled with the settlement's posting journal, and used as the already-posted guard: a settlement that already has a value here refuses to post again rather than duplicating the entries. |
Id | Id | Guid | Yes | |
Label | Label | Text | | |
LastWorkingDay | Last Working Day | Date | Yes | Doubles as the accounting date - the settlement journal and the payable open item it raises are both dated on it, falling back to today only when it is empty. It is also the value copied into the employee's Date Of Exit when that is still blank. |
ModifiedById | Modified By | Lookup → UserAccount | Yes | |
Name | Name | Text, unique | Yes | |
NetSettlement | Net Settlement | Currency | | |
OwnerId | Owner | Lookup → UserAccount | Yes | |
PartnerAccountId | Partner Account | Lookup → Account | Yes | |
PayrollPayableOpenTransactionId | Payroll Payable Open Transaction | Lookup → OpenTransaction | | The Resource-keyed payable open item raised for the net settlement amount, which the salary payment path later discharges. It stays empty when the net works out to exactly zero, because no open item is raised in that case. |
RecordTypeId | Record Type | Guid, hidden | | |
ResourceId | Resource | Lookup → Resource | Yes | The person being settled, keyed on Resource; posting refuses without it. The Employee record that gets closed out at the end is found by matching this against Employee.ResourceId, so a settlement for a Resource with no Employee row still posts but closes nobody. |
Status | Status | PickList | | The seeded list also offers Approved and In Progress, which no code path sets or reads. Values: Draft, Posted, Paid, Approved, In Progress. |
UIProps | UI Props | Text | | |
UpdatedDateTime | Modified Date | DateAndTime | Yes | |
Actions
| Action | Label | Type | What it does |
BulkDelete | Delete | Delete | Delete the selected records. |
Clone | Clone | ServerAction (Clone) | Create a copy of this record |
Delete | Delete | Delete | Delete this FullAndFinalSettlement. |
DeleteRecord | Delete | Delete | Delete |
Edit | Edit | Edit | Edit this FullAndFinalSettlement. |
EditInLine | Edit | EditInline | Edit |
EditRecord | Edit | Edit | Edit |
New | New | New | Create a FullAndFinalSettlement. |
PostSettlement | Post | ServerAction (PostSettlement) | Posts the settlement rather than merely approving it: it builds one payroll journal debiting each payable line's expense account, crediting each deduction line's payable account and crediting Payroll Payable for the net, dates it on the Last Working Day, raises a Resource-keyed payable open item for any positive net, sets Status to Posted and stores the net and the journal. It then closes the person out, setting the matching Employee to SettlementStatus Settled and EmploymentStatus Exited and filling Date Of Exit if empty. It refuses when the settlement is already posted, has no Resource, has no lines with a non-zero amount, has a line missing its required GL account, when no Payroll Payable control account is configured, or when deductions exceed payables. |
View | View | View | View this FullAndFinalSettlement. |
Lookup filters
| Filter | Lookup field | Notes |
| BranchFilter | BranchId | |
| PartnerAccountFilter | PartnerAccountId | |