summaryrefslogtreecommitdiff
path: root/app/modules/orders/forms.py
blob: 66ab47b008ae4cfaf7f86aeddbe84d5aff377437 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from flask_wtf import FlaskForm
from wtforms import (
    SubmitField,
    SelectField,
    HiddenField,
    StringField,
    PasswordField,
    IntegerField,
    FloatField,
    BooleanField,
    DateTimeField,
)
from wtforms.validators import InputRequired, Length, NumberRange


class AddOrder(FlaskForm):  # TODO
    name = StringField("Product name", validators=[InputRequired()])
    code_accounting = StringField("Accounting code", default=0)
    unit_weight = FloatField("Unit weight", default=0)
    price_net = FloatField("Price (net)", default=0)
    price_gross = FloatField("Price (gross)", default=0)
    tax_rate = FloatField("Tax rate", default=0)
    submit = SubmitField("Add/Update Product")


class AddInvoice(FlaskForm):
    invoice_id_alt = StringField("Alternative invoice ID")
    customer_id = StringField("Customer ID")
    customer_reference = StringField("Customer reference")
    date_billed = StringField("Date billed")
    date_due = StringField("Date due")
    amount_net = FloatField("Amount without tax", default=0)
    amount_gross = FloatField("Amount with tax", default=0)
    amount_tax = FloatField("Amount of tax", default=0)
    submit = SubmitField("Add new Invoice")
Copyright 2019--2024 Marius PETER