| 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/__pycache__/ |
Upload File : |
o
hͦh� � @ sL d Z ddlmZ ddlmZ ddlmZ dd� Zdd� Z d d
� Z
dd� Zd
S )zJ
context_processor.py
This module is used to register context processor`
� )�Employee)�
tax_models)� Deductionc C s` t jj�� du rt �� }d|_|�� t jj�� j}t jj�� j}| j�d|�| j�d|�d�S )z.
This method will return the currency
N�$�currency�position)r r ) �models�PayrollSettings�objects�first�currency_symbol�saver �session�get)�request�settings�symbolr � r �*/var/www/erp/payroll/context_processors.py�default_currency s �r c C s | � � rdnd}| �� |d�S )z*
This method will return the host
�https�http)�host�protocol)� is_secure�get_host)r r r r r r s r c C s t jjddd�}d|iS )�2
This method used to return the deduction
Fr )�only_show_under_employee�employer_rate__gt�get_deductions)r r
�filter)r �
deductionsr r r r $ s �r c C s t jjdddd��� }d|iS )r TF)� is_active�contract_set__isnull�payslip__isnull�get_active_employees)r r
r �distinct)r � employeesr r r r% . s ��r% N)�__doc__�employee.modelsr �payroll.modelsr r �payroll.models.modelsr r r r r% r r r r �<module> s