first commit
This commit is contained in:
@@ -2,14 +2,16 @@ from django import forms
|
||||
from Movement import models
|
||||
from django.utils import timezone
|
||||
|
||||
class FormsExpense(forms.ModelForm):
|
||||
class FormsExpenseOrCredit(forms.ModelForm):
|
||||
class Meta:
|
||||
model = models.Expense
|
||||
model = models.ExpenseOrCredit
|
||||
fields = [
|
||||
'date',
|
||||
'chart_of_account',
|
||||
'bank',
|
||||
'firm',
|
||||
'debit',
|
||||
'prof',
|
||||
'professional',
|
||||
'gross_value',
|
||||
]
|
||||
@@ -19,7 +21,9 @@ class FormsExpense(forms.ModelForm):
|
||||
}),
|
||||
'chart_of_account': forms.Select({'class': 'form-select'}),
|
||||
'bank': forms.Select({'class': 'form-select'}),
|
||||
'debit': forms.CheckboxInput({'class': ''}),
|
||||
'firm': forms.CheckboxInput({'class': ''}),
|
||||
'prof': forms.CheckboxInput({'class': ''}),
|
||||
'professional': forms.Select({'class': 'form-select'}),
|
||||
'gross_value': forms.NumberInput(attrs={'step': 1}),
|
||||
|
||||
@@ -29,6 +33,8 @@ class FormsExpense(forms.ModelForm):
|
||||
'chart_of_account':'Plano de contas',
|
||||
'bank':'Banco',
|
||||
'firm':'Firma',
|
||||
'debit':'Debito',
|
||||
'prof':'Prof.',
|
||||
'gross_value':'Valor',
|
||||
'professional':'Profissional',
|
||||
}
|
||||
@@ -34,6 +34,6 @@ class FormsProduct(forms.ModelForm):
|
||||
'product':'Produto',
|
||||
'pay_method':'M. Pagamento',
|
||||
'professional':'Profissional',
|
||||
'quantity':'Quantiddade',
|
||||
'quantity':'Quantidade',
|
||||
# 'net_value':'Valor Liquido',
|
||||
}
|
||||
27
Movement/Forms/FormsTransition.py
Normal file
27
Movement/Forms/FormsTransition.py
Normal file
@@ -0,0 +1,27 @@
|
||||
from django import forms
|
||||
from Movement import models
|
||||
from django.utils import timezone
|
||||
|
||||
class FormsTransition(forms.ModelForm):
|
||||
class Meta:
|
||||
model = models.Transition
|
||||
fields = [
|
||||
'date',
|
||||
'bank_credit',
|
||||
'bank_debit',
|
||||
'gross_value',
|
||||
]
|
||||
widgets = {
|
||||
'date': forms.DateInput(format=('%Y-%m-%d'), attrs={'type': 'date', 'class':'',
|
||||
'value':timezone.localtime(timezone.now()).date()
|
||||
}),
|
||||
'bank_credit': forms.Select({'class': 'form-select'}),
|
||||
'bank_debit': forms.Select({'class': 'form-select'}),
|
||||
'gross_value': forms.NumberInput(attrs={'step': 1}),
|
||||
}
|
||||
labels={
|
||||
'date':'Data',
|
||||
'bank_credit':'Entrada',
|
||||
'bank_debit':'Saida',
|
||||
'gross_value':'Valor',
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
BIN
Movement/Forms/__pycache__/FormsExpenseOrCredit.cpython-312.pyc
Normal file
BIN
Movement/Forms/__pycache__/FormsExpenseOrCredit.cpython-312.pyc
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Movement/Forms/__pycache__/FormsTransition.cpython-312.pyc
Normal file
BIN
Movement/Forms/__pycache__/FormsTransition.cpython-312.pyc
Normal file
Binary file not shown.
Reference in New Issue
Block a user