[Flask] Simple ERP for a farm.
1
from flask_wtf import FlaskForm
2
from wtforms import (
3
SubmitField,
4
SelectField,
5
HiddenField,
6
StringField,
7
PasswordField,
8
IntegerField,
9
FloatField,
10
BooleanField,
11
DateTimeField,
12
)
13
from wtforms.validators import InputRequired, Length, NumberRange
14
15
16
classAddOrder(FlaskForm): # TODO
17
name = ("Product name",validators=[()])
18
code_accounting = ("Accounting code",default=0)
19
unit_weight = ("Unit weight",default=0)
20
price_net = ("Price (net)",default=0)
21
price_gross = ("Price (gross)",default=0)
22
tax_rate = ("Tax rate",default=0)
23
submit = ("Add/Update Product")
24
25
26
classAddInvoice(FlaskForm):
27
invoice_id_alt = ("Alternative invoice ID")
28
customer_id = ("Customer ID")
29
customer_reference = ("Customer reference")
30
date_billed = ("Date billed")
31
date_due = ("Date due")
32
amount_net = ("Amount without tax",default=0)
33
amount_gross = ("Amount with tax",default=0)
34
amount_tax = ("Amount of tax",default=0)
35
submit = ("Add new Invoice")
36