| Server IP : 65.108.144.40 / Your IP : 216.73.217.165 Web Server : Apache/2.4.52 (Ubuntu) System : Linux ubuntu-8gb-hel1-1 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64 User : dev ( 1000) PHP Version : 8.2.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/erp/payroll/methods/__pycache__/ |
Upload File : |
o
hͦh� � @ s d Z ddlmZ dd� ZdS )zK
deductions.py
This module is used to compute the deductions of employees
� )� Deductionc
C s� t jj|| d�j|d�j|d�}g }|}|D ]8}|jr|jnd} |j}
|
r+||
d } |t| � }d}td|j�r@| |j d }|� |j
|j| |j|d�� q|| }|||d�S )z�
This method is used to update the basic or gross pay
Args:
compensation_amount (_type_): Gross pay or Basic pay or employee
)�update_compensation�specific_employees)�one_time_date__lt)�one_time_date__gtr �d )�deduction_id�title�amount�employer_contribution_rate�employer_contribution_amount)�compensation_amount�
deductions�difference_amount)r �objects�filter�excluder
�rate�float�max�
employer_rate�append�idr )
�employeer
�compensation_type�
start_date�end_date�deduction_headsr �temp� deductionr
�
employee_rater r � r! �*/var/www/erp/payroll/methods/deductions.py�update_compensation_deduction
s@
������
�r# N)�__doc__�payroll.models.modelsr r# r! r! r! r"