| 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/forms/__pycache__/ |
Upload File : |
o
hͦh� � @ s� d Z ddlZddlmZ ddlmZ ddlmZ ddl m
Z
ddlmZ ddl
mZ dd lmZ dd
lmZ G dd� dej�ZG d
d� de�ZG dd� de�ZdS )a{
Forms for handling payroll-related operations.
This module provides Django ModelForms for creating and managing payroll-related data,
including filing status, tax brackets, and federal tax records.
The forms in this module inherit from the Django `forms.ModelForm` class and customize
the widget attributes to enhance the user interface and provide a better user experience.
� N)�date)�forms)�gettext_lazy)�reload_queryset)�horilla_middlewares)�federal_tax)�FilingStatus)�
TaxBracketc s e Zd ZdZ� fdd�Z� ZS )� ModelFormz1Custom ModelForm with enhanced widget attributes.c s� t � j|i |�� ttjdd �}t| j� | j�� D ]�\}}|j}t |t
j�r,t�
� |_t |t
jt
jt
jf�rFt|j�}|j�d|d�� nYt |t
jf�rud}|jd urYt|j�}ttd��j|d�|_| j| jj�dt�� dd �� n*t |t
j�r�t|j�� �}|j�d|d
dd�� nt |t
jt
jf�r�|j�d
di� z
|j j!| jd _W n Y z|j j!j"| jd _W q Y qd S )N�requestzoh-input w-100)�class�placeholder� z---Choose {label}---)�labelzoh-select oh-select-2 w-100zheight:50px;border-radius:0;)r �id�style� �( )r r
�rows�colsr zoh-switch__checkbox�employee_id�
company_id)#�super�__init__�getattrr �_thread_localsr �fields�items�widget�
isinstancer � DateInputr �today�initial�NumberInput�
EmailInput� TextInput�_r �attrs�update�Select�str�format�empty_label�uuid�uuid4�Textarea�title�
CheckboxInput�CheckboxSelectMultiple�user�employee_get�get_company)�self�args�kwargsr �
field_name�field�input_widgetr �� __class__� �'/var/www/erp/payroll/forms/tax_forms.pyr sf
�
�
��������zModelForm.__init__)�__name__�
__module__�__qualname__�__doc__r �
__classcell__r>