476 lines
11 KiB
HTML
476 lines
11 KiB
HTML
<!-- title: Leave Allocation -->
|
|
|
|
|
|
|
|
|
|
|
|
<div class="dev-header">
|
|
|
|
<a class="btn btn-default btn-sm" disabled style="margin-bottom: 10px;">
|
|
Version 6.7.3</a>
|
|
|
|
|
|
<a class="btn btn-default btn-sm" href="https://github.com/frappe/erpnext/tree/develop/erpnext/hr/doctype/leave_allocation"
|
|
target="_blank" style="margin-left: 10px; margin-bottom: 10px;"><i class="octicon octicon-mark-github"></i> Source</a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<p><b>Table Name:</b> <code>tabLeave Allocation</code></p>
|
|
|
|
|
|
|
|
|
|
<h3>Fields</h3>
|
|
|
|
<table class="table table-bordered" style="table-layout: fixed;">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 5%">Sr</th>
|
|
<th style="width: 25%">Fieldname</th>
|
|
<th style="width: 20%">Type</th>
|
|
<th style="width: 25%">Label</th>
|
|
<th style="width: 25%">Options</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<tr >
|
|
<td>1</td>
|
|
<td ><code>column_break0</code></td>
|
|
<td class="info">
|
|
Column Break</td>
|
|
<td >
|
|
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>2</td>
|
|
<td class="danger" title="Mandatory"><code>employee</code></td>
|
|
<td >
|
|
Link</td>
|
|
<td >
|
|
Employee
|
|
|
|
</td>
|
|
<td>
|
|
|
|
|
|
|
|
|
|
<a href="https://frappe.github.io/erpnext/current/models/hr/employee">Employee</a>
|
|
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>3</td>
|
|
<td ><code>employee_name</code></td>
|
|
<td >
|
|
Data</td>
|
|
<td >
|
|
Employee Name
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>4</td>
|
|
<td ><code>column_break1</code></td>
|
|
<td class="info">
|
|
Column Break</td>
|
|
<td >
|
|
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>5</td>
|
|
<td ><code>description</code></td>
|
|
<td >
|
|
Small Text</td>
|
|
<td >
|
|
Description
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr class="info">
|
|
<td>6</td>
|
|
<td ><code>section_break_6</code></td>
|
|
<td >
|
|
Section Break</td>
|
|
<td >
|
|
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>7</td>
|
|
<td class="danger" title="Mandatory"><code>leave_type</code></td>
|
|
<td >
|
|
Link</td>
|
|
<td >
|
|
Leave Type
|
|
|
|
</td>
|
|
<td>
|
|
|
|
|
|
|
|
|
|
<a href="https://frappe.github.io/erpnext/current/models/hr/leave_type">Leave Type</a>
|
|
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>8</td>
|
|
<td class="danger" title="Mandatory"><code>from_date</code></td>
|
|
<td >
|
|
Date</td>
|
|
<td >
|
|
From Date
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>9</td>
|
|
<td class="danger" title="Mandatory"><code>to_date</code></td>
|
|
<td >
|
|
Date</td>
|
|
<td >
|
|
To Date
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>10</td>
|
|
<td ><code>column_break_10</code></td>
|
|
<td class="info">
|
|
Column Break</td>
|
|
<td >
|
|
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>11</td>
|
|
<td ><code>new_leaves_allocated</code></td>
|
|
<td >
|
|
Float</td>
|
|
<td >
|
|
New Leaves Allocated
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>12</td>
|
|
<td ><code>carry_forward</code></td>
|
|
<td >
|
|
Check</td>
|
|
<td >
|
|
Add unused leaves from previous allocations
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>13</td>
|
|
<td ><code>carry_forwarded_leaves</code></td>
|
|
<td >
|
|
Float</td>
|
|
<td >
|
|
Unused leaves
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>14</td>
|
|
<td class="danger" title="Mandatory"><code>total_leaves_allocated</code></td>
|
|
<td >
|
|
Float</td>
|
|
<td >
|
|
Total Leaves Allocated
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>15</td>
|
|
<td ><code>amended_from</code></td>
|
|
<td >
|
|
Link</td>
|
|
<td >
|
|
Amended From
|
|
|
|
</td>
|
|
<td>
|
|
|
|
|
|
|
|
|
|
<a href="https://frappe.github.io/erpnext/current/models/hr/leave_allocation">Leave Allocation</a>
|
|
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
<hr>
|
|
<h3>Controller</h3>
|
|
<h4>erpnext.hr.doctype.leave_allocation.leave_allocation</h4>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 style="font-weight: normal;">Class <b>LeaveAllocation</b></h3>
|
|
|
|
<p style="padding-left: 30px;"><i>Inherits from frappe.model.document.Document</i></h4>
|
|
|
|
<div class="docs-attr-desc"><p></p>
|
|
</div>
|
|
<div style="padding-left: 30px;">
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="allow_carry_forward" href="#allow_carry_forward" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>allow_carry_forward</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>check whether carry forward is allowed or not for this leave type</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="check_existing_leave_allocation" href="#check_existing_leave_allocation" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>check_existing_leave_allocation</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>check whether leave for same type is already allocated or not</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="get_carry_forwarded_leaves" href="#get_carry_forwarded_leaves" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>get_carry_forwarded_leaves</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="get_leave_bal" href="#get_leave_bal" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>get_leave_bal</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="get_leaves_allocated" href="#get_leaves_allocated" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>get_leaves_allocated</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="get_leaves_applied" href="#get_leaves_applied" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>get_leaves_applied</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="get_total_allocated_leaves" href="#get_total_allocated_leaves" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>get_total_allocated_leaves</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="on_update" href="#on_update" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>on_update</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="on_update_after_submit" href="#on_update_after_submit" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>on_update_after_submit</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="validate" href="#validate" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>validate</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="validate_new_leaves_allocated_value" href="#validate_new_leaves_allocated_value" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>validate_new_leaves_allocated_value</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>validate that leave allocation is in multiples of 0.5</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="validate_period" href="#validate_period" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>validate_period</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="validate_total_leaves_allocated" href="#validate_total_leaves_allocated" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>validate_total_leaves_allocated</b>
|
|
<i class="text-muted">(self, leave_det)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
</div>
|
|
<hr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h4>Linked In:</h4>
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
|
|
<a href="https://frappe.github.io/erpnext/current/models/hr/leave_allocation">Leave Allocation</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<!-- autodoc -->
|
|
<!-- jinja -->
|
|
<!-- static --> |