# Path: payway/accounts/models.py
# MAX_MONEY_DIGITS = 20
# 
# MAX_MONEY_PLACES = 2
# 
# Path: payway/orders/conf/settings.py
# ORDER_MIN_SUM = getattr(settings, 'ORDERS_ORDER_MIN_SUM', 5)


from django import forms
from django.forms.util import ErrorList
from django.utils.translation import ugettext_lazy as _
from django_simptools.models import RandomUIDAbstractModel
from payway.accounts.models import MAX_MONEY_DIGITS, MAX_MONEY_PLACES
from payway.orders.conf.settings import ORDER_MIN_SUM
# -*- coding: UTF-8 -*-


__author__ = 'Razzhivin Alexander'
__email__ = 'admin@httpbots.com'


class OrderForm(forms.Form):

    uid = forms.IntegerField(
        label=_('order number'),
        min_value=0,
        max_value=RandomUIDAbstractModel.MAX_UID,
        widget=forms.TextInput(attrs={'readonly':'readonly'}),
    )

    sum = forms.DecimalField(
        label=_('order sum'),

# Path: payway/accounts/models.py
# MAX_MONEY_DIGITS = 20
# 
# MAX_MONEY_PLACES = 2
# 
# Path: payway/orders/conf/settings.py
# ORDER_MIN_SUM = getattr(settings, 'ORDERS_ORDER_MIN_SUM', 5)


# Path: payway/orders/forms.py
from django import forms
from django.forms.util import ErrorList
from django.utils.translation import ugettext_lazy as _
from django_simptools.models import RandomUIDAbstractModel
from payway.accounts.models import MAX_MONEY_DIGITS, MAX_MONEY_PLACES
from payway.orders.conf.settings import ORDER_MIN_SUM

# -*- coding: UTF-8 -*-


__author__ = 'Razzhivin Alexander'
__email__ = 'admin@httpbots.com'


class OrderForm(forms.Form):

    uid = forms.IntegerField(
        label=_('order number'),
        min_value=0,
        max_value=RandomUIDAbstractModel.MAX_UID,
        widget=forms.TextInput(attrs={'readonly':'readonly'}),
    )

    sum = forms.DecimalField(
        label=_('order sum'),

        max_digits=MAX_MONEY_DIGITS,