from django import forms
from .models import CashierSession

class CashierSessionStartForm(forms.ModelForm):
    class Meta:
        model = CashierSession
        fields = ['opening_balance', 'notes']
        widgets = {
            'opening_balance': forms.NumberInput(attrs={'class': 'form-control', 'step': '0.001'}),
            'notes': forms.Textarea(attrs={'class': 'form-control', 'rows': 3}),
        }

class CashierSessionCloseForm(forms.ModelForm):
    class Meta:
        model = CashierSession
        fields = ['closing_balance', 'notes']
        widgets = {
            'closing_balance': forms.NumberInput(attrs={'class': 'form-control', 'step': '0.001'}),
            'notes': forms.Textarea(attrs={'class': 'form-control', 'rows': 3}),
        }
