Ejemplo n.º 1
0
class AddSchema(colander.Schema):
    moneywidget = widget.MoneyInputWidget(size=20,
                                          options={
                                              'allowZero': True,
                                              'precision': 0
                                          })

    unit_id = colander.SchemaNode(
        colander.Integer(),
        widget=widget.HiddenWidget(),
        oid="unit_id",
        title="OPD",
    )
    unit_nm = colander.SchemaNode(colander.String(),
                                  widget=auto_unit_nm,
                                  title="OPD",
                                  oid="unit_nm")
    wajibpajak_id = colander.SchemaNode(colander.Integer(),
                                        widget=widget.HiddenWidget(),
                                        title="Penyetor",
                                        oid="wajibpajak_id")
    wajibpajak_nm = colander.SchemaNode(colander.String(),
                                        widget=auto_wp_nm,
                                        title="Penyetor",
                                        oid="wajibpajak_nm")
    wp_nama = colander.SchemaNode(colander.String(),
                                  title="Nama Lain",
                                  oid="wp_nama")
    wp_alamat_1 = colander.SchemaNode(colander.String(),
                                      title="Alamat Subjek",
                                      oid="wp_alamat_1")

    wp_alamat_2 = colander.SchemaNode(colander.String(),
                                      title="Alamat Subjek",
                                      oid="wp_alamat_2")

    objekpajak_id = colander.SchemaNode(colander.Integer(),
                                        title="Objek",
                                        widget=widget.HiddenWidget(),
                                        oid="objekpajak_id")

    objekpajak_nm = colander.SchemaNode(colander.String(),
                                        widget=auto_op_nm,
                                        title="Objek",
                                        oid="objekpajak_nm")

    op_nama = colander.SchemaNode(colander.String(),
                                  title="Nama OP Lainnya",
                                  oid="op_nama")
    op_alamat_1 = colander.SchemaNode(colander.String(),
                                      title="Alamat Objek",
                                      oid="op_alamat_1")

    op_alamat_2 = colander.SchemaNode(colander.String(),
                                      title="Alamat Objek",
                                      oid="op_alamat_2")

    # rekening_id = colander.SchemaNode(
    # colander.String(),
    # #widget=widget.HiddenWidget(),
    # title="Rekening ID",
    # oid = "rekening_id"
    # )

    # rekening_nm = colander.SchemaNode(
    # colander.String(),
    # title="Rekening",
    # oid = "rekening_nm"
    # )

    kode = colander.SchemaNode(
        colander.String(),
        title="Kode",
        missing=colander.drop,
    )

    periode_1 = colander.SchemaNode(colander.Date(),
                                    title="Periode 1",
                                    widget=widget.DateInputWidget())
    periode_2 = colander.SchemaNode(colander.Date(), title="Periode 2")
    tgl_terima = colander.SchemaNode(colander.Date(), )
    jatuh_tempo = colander.SchemaNode(colander.Date(), )
    dasar = colander.SchemaNode(colander.Integer(),
                                default=0,
                                widget=moneywidget,
                                oid="dasar")
    tarif = colander.SchemaNode(colander.Integer(),
                                default=0,
                                widget=moneywidget,
                                oid="tarif",
                                missing=colander.drop,
                                title="Tarif (%)")
    pokok = colander.SchemaNode(colander.Integer(),
                                default=0,
                                widget=moneywidget,
                                missing=colander.drop,
                                oid="pokok")
    penambah = colander.SchemaNode(colander.Integer(),
                                   default=0,
                                   widget=moneywidget,
                                   oid="penambah",
                                   missing=colander.drop)
    pengurang = colander.SchemaNode(colander.Integer(),
                                    default=0,
                                    widget=moneywidget,
                                    oid="pengurang",
                                    missing=colander.drop)
    terutang = colander.SchemaNode(colander.Integer(),
                                   default=0,
                                   widget=moneywidget,
                                   oid="terutang")
    denda = colander.SchemaNode(colander.Integer(),
                                default=0,
                                widget=moneywidget,
                                oid="denda")
    bunga = colander.SchemaNode(colander.Integer(),
                                default=0,
                                widget=moneywidget,
                                oid="bunga")
    jumlah = colander.SchemaNode(colander.Integer(),
                                 default=0,
                                 widget=moneywidget,
                                 missing=colander.drop,
                                 oid="jumlah")
Ejemplo n.º 2
0
class AddSchema(colander.Schema):
    moneywidget = widget.MoneyInputWidget(size=20,
                                          options={
                                              'allowZero': True,
                                              'precision': 0
                                          })

    unit_id = colander.SchemaNode(
        colander.Integer(),
        widget=widget.HiddenWidget(),
        oid="unit_id",
        title="OPD",
    )
    unit_nm = colander.SchemaNode(colander.String(),
                                  title="OPD",
                                  oid="unit_nm")
    wilayah_id = colander.SchemaNode(colander.Integer(),
                                     widget=deferred_wilayah,
                                     title="Wilayah")
    wp_kode = colander.SchemaNode(colander.String(),
                                  title="Kode Penyetor",
                                  oid="wp_kode")
    wp_nama = colander.SchemaNode(colander.String(),
                                  title="Nama Penyetor",
                                  oid="wp_nama")
    wp_alamat_1 = colander.SchemaNode(colander.String(),
                                      title="Alamat",
                                      oid="wp_alamat_1")
    wp_alamat_2 = colander.SchemaNode(
        colander.String(),
        title="Alamat lain",
        oid="wp_alamat_2",
        missing=colander.drop,
    )
    pajak_id = colander.SchemaNode(
        colander.String(),
        widget=widget.HiddenWidget(),
        oid="pajak_id",
    )

    pajak_nm = colander.SchemaNode(colander.String(),
                                   title="Rekening",
                                   oid="pajak_nm")

    kode = colander.SchemaNode(
        colander.String(),
        title="Kode Bayar",
        missing=colander.drop,
    )

    periode_1 = colander.SchemaNode(colander.Date(),
                                    title="Periode 1",
                                    widget=widget.DateInputWidget())
    periode_2 = colander.SchemaNode(colander.Date(), title="Periode 2")
    tgl_tetap = colander.SchemaNode(colander.Date(), )
    jatuh_tempo = colander.SchemaNode(colander.Date(), )
    dasar = colander.SchemaNode(colander.Integer(),
                                default=0,
                                widget=moneywidget,
                                oid="dasar")
    tarif = colander.SchemaNode(colander.Integer(),
                                default=0,
                                widget=moneywidget,
                                oid="tarif",
                                missing=colander.drop)
    pokok = colander.SchemaNode(colander.Integer(),
                                default=0,
                                widget=moneywidget,
                                missing=colander.drop,
                                oid="pokok")
    denda = colander.SchemaNode(colander.Integer(),
                                default=0,
                                widget=moneywidget,
                                oid="denda")
    bunga = colander.SchemaNode(colander.Integer(),
                                default=0,
                                widget=moneywidget,
                                oid="bunga")
    jumlah = colander.SchemaNode(colander.Integer(),
                                 default=0,
                                 widget=moneywidget,
                                 missing=colander.drop,
                                 oid="jumlah")
Ejemplo n.º 3
0
class AddSchema(colander.Schema):
    moneywidget = widget.MoneyInputWidget(size=20,
                                          options={
                                              'allowZero': True,
                                              'precision': 0
                                          })
    kode = colander.SchemaNode(colander.String(),
                               title="Kode Bayar",
                               widget=widget.TextInputWidget(
                                   mask='9999-9.99.99-999999',
                                   mask_placeholder='#',
                               ))

    arinvoice_id = colander.SchemaNode(
        colander.Integer(),
        oid="arinvoice_id",
        widget=widget.HiddenWidget(readonly=True),
        missing=colander.drop,
        default=0)

    unit_nama = colander.SchemaNode(
        colander.String(),
        title="OPD",
        #title="SKPD",
        oid="unit_nama",
        missing=colander.drop)

    wp_nama = colander.SchemaNode(
        colander.String(),
        title="Subjek",
        oid="wp_nama",
        missing=colander.drop,
    )

    rek_nama = colander.SchemaNode(
        colander.String(),
        title="Rekening",
        oid="rek_nama",
        missing=colander.drop,
    )

    op_nama = colander.SchemaNode(colander.String(),
                                  title="Objek",
                                  missing=colander.drop,
                                  oid="op_nama")
    bank_id = colander.SchemaNode(
        colander.String(),
        title="Bank",
        oid="bank_id",
        missing=colander.drop,
    )
    channel_id = colander.SchemaNode(colander.String(),
                                     oid="channel_id",
                                     missing=colander.drop)
    ntb = colander.SchemaNode(
        colander.String(),
        title="NTB",
        oid="ntb",
        missing=colander.drop,
    )
    ntp = colander.SchemaNode(colander.String(),
                              oid="ntp",
                              missing=colander.drop)

    periode_1 = colander.SchemaNode(
        colander.String(),
        title="Periode 1",
        oid="periode_1",
        missing=colander.drop,
    )
    periode_2 = colander.SchemaNode(colander.String(),
                                    title="Periode 2",
                                    oid="periode_2",
                                    missing=colander.drop)
    tgl_tetap = colander.SchemaNode(
        colander.String(),
        oid="tgl_tetap",
    )
    jatuh_tempo = colander.SchemaNode(
        colander.String(),
        oid="jatuh_tempo",
        missing=colander.drop,
    )
    terutang = colander.SchemaNode(
        colander.Integer(),
        default=0,
        widget=moneywidget,
        oid="terutang",
        missing=colander.drop,
    )
    denda = colander.SchemaNode(
        colander.Integer(),
        default=0,
        widget=moneywidget,
        oid="denda",
        missing=colander.drop,
    )
    bunga_awal = colander.SchemaNode(
        colander.Integer(),
        default=0,
        oid="bunga_awal",
        widget=moneywidget,
        missing=colander.drop,
    )

    jumlah = colander.SchemaNode(
        colander.Integer(),
        default=0,
        widget=moneywidget,
        oid="jumlah",
        missing=colander.drop,
    )

    bunga = colander.SchemaNode(
        colander.Integer(),
        default=0,
        widget=moneywidget,
        oid="bunga",
        missing=colander.drop,
    )
    bayar = colander.SchemaNode(
        colander.Integer(),
        default=0,
        widget=moneywidget,
        oid="bayar",
        missing=colander.drop,
    )
    tgl_bayar = colander.SchemaNode(colander.Date(),
                                    widget=widget.DateInputWidget(),
                                    missing=colander.drop)
Ejemplo n.º 4
0
class AddSchema(colander.Schema):
    moneywidget = widget.MoneyInputWidget(
            size=20, options={'allowZero':True,
                              'precision':0
                              })
            
    unit_id = colander.SchemaNode(
                    colander.Integer(),
                    widget=widget.HiddenWidget(),
                    oid="unit_id",
                    title="OPD",
                    )
    unit_nm = colander.SchemaNode(
                    colander.String(),
                    title="OPD",
                    oid="unit_nm"
                    )
    wajibpajak_id = colander.SchemaNode(
                    colander.Integer(),
                    widget=widget.HiddenWidget(),
                    title="Penyetor",
                    oid = "wajibpajak_id"
                    )
    wajibpajak_nm = colander.SchemaNode(
                    colander.String(),
                    widget=auto_wp_nm4,
                    title="Penyetor",
                    oid = "wajibpajak_nm"
                    )
    wajib_pajak_us = colander.SchemaNode(
                    colander.Integer(),
                    widget=widget.HiddenWidget(),
                    oid = "wajib_pajak_us"
                    )
    wajib_pajak_un = colander.SchemaNode(
                    colander.Integer(),
                    widget=widget.HiddenWidget(),
                    oid = "wajib_pajak_un"
                    )
    objekpajak_id = colander.SchemaNode(
                    colander.Integer(),
                    title="Objek",
                    widget=widget.HiddenWidget(),
                    oid = "objekpajak_id"
                    )
    objekpajak_nm = colander.SchemaNode(
                    colander.String(),
                    widget=auto_op_nm,
                    title="Objek",
                    oid = "objekpajak_nm"
                    )
                    
    kode   = colander.SchemaNode(
                    colander.String(),
                    title="Kode Bayar",
                    missing = colander.drop,
                    )
                    
    periode_1 = colander.SchemaNode(
                    colander.Date(),
                    title="Periode 1",
                    widget = widget.DateInputWidget()
                    )
    periode_2 = colander.SchemaNode(
                    colander.Date(),
                    title="Periode 2"
                    )
    tgl_tetap = colander.SchemaNode(
                    colander.Date(),
                    )
    jatuh_tempo = colander.SchemaNode(
                    colander.Date(),
                    )
    dasar = colander.SchemaNode(
                    colander.Integer(),
                    default = 0,
                    widget = moneywidget,
                    oid = "dasar"
                    )
    tarif = colander.SchemaNode(
                    colander.Integer(),
                    default = 0,
                    widget = moneywidget,
                    oid = "tarif",
                    missing=colander.drop
                    )
    pokok = colander.SchemaNode(
                    colander.Integer(),
                    default = 0,
                    widget = moneywidget,
                    missing=colander.drop,
                    oid = "pokok"
                    )
    denda = colander.SchemaNode(
                    colander.Integer(),
                    default = 0,
                    widget = moneywidget,
                    oid = "denda"
                    )
    bunga = colander.SchemaNode(
                    colander.Integer(),
                    default = 0,
                    widget = moneywidget,
                    oid = "bunga"
                    )
    jumlah = colander.SchemaNode(
                    colander.Integer(),
                    default = 0,
                    widget = moneywidget,
                    missing=colander.drop,
                    oid = "jumlah"
                    )
Ejemplo n.º 5
0
class EditRequestSchema(colander.Schema):
    #   cybeTimestamp
    couTimestamp = colander.SchemaNode(
        colander.DateTime(),
        title='Security and Acceptable Use Policy Acceptance',
        description='date',
        widget=widget.DateInputWidget(),
        oid='couTimestamp'
    )

    givenName = colander.SchemaNode(
        colander.String(),
        title='Given/First name',
        description='Your given or first name',
        validator=colander.Length(min=1, max=64),
        widget=widget.TextInputWidget(),
        oid='givenName'
    )

    middleName = colander.SchemaNode(
        colander.String(),
        title='Middle name/initial',
        description='Middle name or initial',
        validator=colander.Length(min=0, max=64),
        widget=widget.TextInputWidget(),
        missing=unicode(''),
        oid='middleName'
    )

    sn = colander.SchemaNode(
        colander.String(),
        title='Family/Last Name',
        description='family Name / Last Name',
        validator=colander.Length(min=1, max=64),
        widget=widget.TextInputWidget(),
        oid='sn'
    )

    suffix = colander.SchemaNode(
        colander.String(),
        title='Suffix',
        description='(Sr. Jr. IV, etc.)',
        validator=colander.Length(min=0, max=32),
        widget=widget.TextInputWidget(),
        missing=unicode(''),
        oid='suffix'
    )

    cn = colander.SchemaNode(
        colander.String(),
        title='Common or Nick Name',
        description='Your full name. How you want to be addressed.',
        validator=colander.Length(min=3, max=64),
        widget=widget.TextInputWidget(),
        missing=unicode(''),
        oid='cn'
    )

    street = colander.SchemaNode(
        colander.String(),
        title='Street Address',
        description='',
        validator=colander.Length(min=0, max=200),
        widget=widget.TextInputWidget(),
        oid='street'
    )

    lcity = colander.SchemaNode(
        colander.String(),
        title='City',
        description='',
        validator=colander.Length(min=1, max=128),
        widget=widget.TextInputWidget(),
        oid='lcity'
    )

    st = colander.SchemaNode(
        colander.String(),
        title='State/Province',
        description='',
        validator=colander.Length(min=1, max=128),
        widget=widget.TextInputWidget(),
        oid='l'
    )

    postalCode = colander.SchemaNode(
        colander.String(),
        title='Post/ZIP Code',
        description='',
        validator=colander.Length(min=2, max=64),
        widget=widget.TextInputWidget(),
        oid='postalCode'
    )

    country = colander.SchemaNode(
        colander.String(),
        title='Country',
        description='',
        widget=widget.TextInputWidget(values=country_codes),
        validator=valid_country,
        oid='country'
    )

    mail = colander.SchemaNode(
        colander.String(),
        title='EMail',
        description='Your primary email account',
        widget=widget.TextInputWidget(),
        oid='mail'
    )
    #
    # mailPreferred = colander.SchemaNode(
    #     colander.String(),
    #     title='Preferred EMail',
    #     description='optional preferred email account',
    #     missing=unicode(''),
    #     widget=widget.TextInputWidget(),
    #     oid='mail'
    # )

    phone = colander.SchemaNode(
        colander.String(),
        title='Phone number',
        description='Please provide your primary telephone number',
        validator=phone_validator,
        widget=widget.TextInputWidget(),
        oid='phone'
    )

    cell = colander.SchemaNode(
        colander.String(),
        title='Cell phone number',
        description='For contact and verification',
        validator=phone_validator,
        missing=unicode(''),
        widget=widget.TextInputWidget(),
        oid='cell'
    )

    employerType = colander.SchemaNode(
        colander.String(),
        # validator=colander.OneOf([x[0] for x in employer_types]),
        validator=colander.OneOf([x[0] for x in employer_types]),
        widget=deform.widget.RadioChoiceWidget(values=employer_types),
        title='Employer Type',
        description='',
        oid="employerType"
    )

    employerName = colander.SchemaNode(
        colander.String(),
        title='Employer/Institution/Sponsor',
        description='Provided employer or institution name',
        validator=colander.Length(min=3, max=128),
        widget=widget.TextInputWidget(),
        oid='employerName'
    )

    citizenStatus = colander.SchemaNode(
        colander.String(),
        title='Citizenship Status',
        description='Select one of the following options '
                    'that best describes your U.S. citizenship status',
        validator=colander.OneOf([x[0] for x in citizen_types]),
        widget=widget.RadioChoiceWidget(values=citizen_types),
        oid='citizenStatus'
    )

    citizenships = colander.SchemaNode(
        colander.Set(),
        title='Citizenships',
        description='Please select your country or countries of citizenship',
        # validator=valid_countries,
        default=deferred_citz_default,
        widget=deferred_citizenships_widget,
        oid='citizenships',
    )

    birthCountry = colander.SchemaNode(
        colander.String(),
        title='Country of birth',
        description='Please enter/select your country of birth',
        validator=valid_country,
        # widget=widget.Select2Widget(values=country_codes),
        widget=widget.TextInputWidget(),
        oid='birthCountry',
    )

    nrelUserID = colander.SchemaNode(
        colander.String(),
        title='Your Existing NREL HPC UserID',
        description='If you have --or previously had-- an NREL UserID, '
                    'enter it here.',
        validator=colander.Length(min=1, max=16),
        widget=widget.TextInputWidget(),
        missing=unicode(''),
        oid='nrelUserID'
    )

    justification = colander.SchemaNode(
        colander.String(),
        title='Justification',
        widget=widget.TextAreaWidget(),
        missing=unicode(''),
        validator=colander.Length(max=1000),
        description="The provided justification/comments for new account.",
        oid='comments'
    )

    preferredUID = colander.SchemaNode(
        colander.String(),
        title='Requested UserID',
        description="The userid the user would prefer",
        validator=colander.Length(min=3, max=16),
        widget=widget.TextInputWidget(),
        missing=unicode(''),
        oid='preferredUID'
    )

    comments = colander.SchemaNode(
        colander.String(),
        title='Additional Notes or Comments',
        widget=widget.TextAreaWidget(),
        missing=unicode(''),
        validator=colander.Length(max=1000),
        description='Additional information',
        oid='comments'
    )

    UserID = colander.SchemaNode(
        colander.String(),
        title='Assigned Permanent HPC UserID',
        description='Determined by Center Operations.'
                    ' This MUST match what is in IDM.',
        validator=colander.Length(min=1, max=16),
        widget=widget.TextInputWidget(),
        default=None,
        missing=unicode(''),
        oid='UserID'
    )

    approvalStatus = colander.SchemaNode(
        colander.Integer(),
        title='Approval Status',
        description='The current status of the request\'s review process',
        validator=colander.OneOf([x[0] for x in approval_status]),
        default=0,
        widget=widget.RadioChoiceWidget(values=approval_status),
        oid='approvalStatus'
    )