Пример #1
0
class MateraiForm(ModelForm):
    coa1 = chosenforms.ChosenModelChoiceField(label ="Kas Gerai",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa2= chosenforms.ChosenModelChoiceField(label ="Persediaan Materai",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa3 = chosenforms.ChosenModelChoiceField(label ="Biaya Materai",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa4 = chosenforms.ChosenModelChoiceField(label ="Uang Muka",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    class Meta:
        model = MateraiMapper
Пример #2
0
class GeraiPenjualanMapperForm(forms.ModelForm):
    cabang = chosenforms.ChosenModelChoiceField(label = "Cabang",queryset=Tbl_Cabang.objects.all(),required = False)    
    coa1 = chosenforms.ChosenModelChoiceField(label = "Coa Satu",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa2 = chosenforms.ChosenModelChoiceField(label = "Coa Dua",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa3 = chosenforms.ChosenModelChoiceField(label = "Coa Tiga",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    class Meta:
        model = GeraiPenjualanMapper
Пример #3
0
class MateraiPusatForm(ModelForm):
    coa1 = chosenforms.ChosenModelChoiceField(label ="Kas Gerai",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa2= chosenforms.ChosenModelChoiceField(label ="Persediaan Materai",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)    
    coa_cabang_debet = chosenforms.ChosenModelChoiceField(queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa_cabang_kredit= chosenforms.ChosenModelChoiceField(queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    class Meta:
        model = MateraiPusatMapper
Пример #4
0
class UangMukaForm(ModelForm):
    debet_pengembalian_uk = chosenforms.ChosenModelChoiceField(queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    kredit_pengembalian_uk = chosenforms.ChosenModelChoiceField(queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    debet_pengambilan_uk = chosenforms.ChosenModelChoiceField(queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    kredit_pengambilan_uk = chosenforms.ChosenModelChoiceField(queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)

    class Meta:
        model = UangMukaGeraiMapper
Пример #5
0
class BiayaMapperForm(forms.ModelForm):
    item = forms.ChoiceField( widget = forms.Select(), choices = ITEM_JURNAL)
    cabang = chosenforms.ChosenModelChoiceField(label = "Gerai",queryset=Tbl_Cabang.objects.all(),required = False)
    coa = chosenforms.ChosenModelChoiceField(label = "Kode Account",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
 
    
    class Meta:
        model = BiayaMapper
Пример #6
0
class PenKasBankMapperForm(forms.ModelForm):
    item = forms.ChoiceField( widget = forms.Select(), choices = ITEM_JURNAL)
    jenis = forms.ChoiceField( widget = forms.Select(), choices = JENIS_PENAMBAHAN)
    cabang = chosenforms.ChosenModelChoiceField(label = "Gerai",queryset=Tbl_Cabang.objects.all(),required = False)
    ke_cabang = chosenforms.ChosenModelChoiceField(label = "Gerai Dituju",queryset=Tbl_Cabang.objects.all(),required = False)
    coa = chosenforms.ChosenModelChoiceField(label = "Kode Account Debet",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa_kredit = chosenforms.ChosenModelChoiceField(label = "Kode Account Kredit ",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)

    class Meta:
        model = BiayaMapper
        fields =  ['item','jenis','coa','coa_kredit','cabang','ke_cabang']
Пример #7
0
class BiayasForm(forms.Form):
    #gerai = forms.ModelChoiceField(queryset=Tbl_Cabang.objects.all())
    tanggal = forms.DateField(initial = datetime.date.today,widget=forms.widgets.DateInput(attrs={'readonly':'true'}, format="%d-%m-%Y"))
    penambahan_saldo = forms.IntegerField(widget=forms.TextInput(attrs={'alt': 'integer', 'class': 'uang','value':0,'size':10}),required = False)
    ket_penambahan_saldo = forms.CharField( widget=forms.TextInput(attrs={'size':25,'placeholder':'Keterangan'}),required = False)
    pengembalian_saldo = forms.IntegerField(widget=forms.TextInput(attrs={'alt': 'integer', 'class': 'uang','value':0,'size':10}))
    ket_pengembalian_saldo = forms.CharField( widget=forms.TextInput(attrs={'size':25,'placeholder':'Keterangan'}),required = False)
    antar_gerai =chosenforms.ChosenModelChoiceField(queryset=Tbl_Cabang.objects.all(),required = False)
    js_trans = forms.ChoiceField(widget=forms.Select(),choices=JS_TRANSAKSI,required = False)
    antar_gerai_kembali = chosenforms.ChosenModelChoiceField(queryset=Tbl_Cabang.objects.all(),required = False)
    js_trans_kembali = forms.ChoiceField(widget=forms.Select(),choices=JS_TRANSAKSI,required = False)
Пример #8
0
class KasirPencairanBankForm(ModelForm):
    tanggal = forms.DateField(initial = datetime.date.today,widget=forms.widgets.DateInput(attrs={'size': 12}, format="%d-%m-%Y"))
    cabang = chosenforms.ChosenModelChoiceField(queryset=Tbl_Cabang.objects.all(),\
        widget=chosenforms.ChosenMultipleChoiceField({'class': 'kode_account'}))
    coa_debet = chosenforms.ChosenModelChoiceField(label='Coa Debet',queryset=Tbl_Akun.objects.all(),\
        widget=chosenforms.ChosenMultipleChoiceField({'class': 'kode_account'}),required = False)
    coa_debet_satu = chosenforms.ChosenModelChoiceField(label='Coa Debet Beban',queryset=Tbl_Akun.objects.all(),\
        widget=chosenforms.ChosenMultipleChoiceField({'class': 'kode_account'}),required = False)
    coa_kredit = chosenforms.ChosenModelChoiceField(label='Coa Kredit',queryset=Tbl_Akun.objects.all(),\
        widget=chosenforms.ChosenMultipleChoiceField({'class': 'kode_account'}),required = False)
    coa_kredit_satu = chosenforms.ChosenModelChoiceField(label='Coa Kredit',queryset=Tbl_Akun.objects.all(),\
        widget=chosenforms.ChosenMultipleChoiceField({'class': 'kode_account'}),required = False)

    class Meta:
        model = KasirPencairanBankMapper
Пример #9
0
class PencarianSopForm(forms.Form):
    cari = chosenforms.ChosenModelChoiceField(
        queryset=Master_Sop.objects.filter(status_sop=2),
        widget=chosenforms.ChosenMultipleChoiceField({
            'class': 'kode_barang',
            'size': 22,
        }))
Пример #10
0
class TbTransForm(forms.ModelForm):
    debet = forms.IntegerField(label="Debet",initial = 0,widget=forms.TextInput(attrs={'alt': 'integer', 'class': 'uang','readonly':'True'}))
    kredit = forms.IntegerField(label="Kredit",initial = 0,widget=forms.TextInput(attrs={'alt': 'integer', 'class': 'uang','readonly':'True'}))
    saldo = forms.IntegerField(label="SALDO",widget=forms.TextInput(attrs={'alt': 'integer', 'class': 'uang'}))
    tgl_trans = forms.DateField(initial = datetime.date.today,widget=forms.widgets.DateInput(attrs={'size': 12}, format="%d-%m-%Y"))
    id_coa = chosenforms.ChosenModelChoiceField(label = "COA",queryset=Tbl_Akun.objects.all(),widget=chosenforms.ChosenMultipleChoiceField({'class': 'kode_account'}))
    id_unit = forms.IntegerField(label="ID Unit",initial = 0,widget=forms.TextInput(attrs={'alt': 'integer', 'class': 'uang','readonly':'True'}))
    id_product = forms.IntegerField(label="ID Product",initial = 300,widget=forms.TextInput(attrs={'alt': 'integer', 'class': 'uang','readonly':'True'}))    
    status_jurnal = forms.IntegerField(label="Status Jurnal",initial = 2,widget=forms.TextInput(attrs={'alt': 'integer', 'class': 'uang','readonly':'True'}))
    jenis = forms.CharField(max_length=35,widget=forms.TextInput(attrs={'placeholder':'jenis','readonly':'True'}),initial ='SALDOKASGERAI')
    jurnal = chosenforms.ChosenModelChoiceField(queryset=JurnalKeuangan.objects.all(),widget=chosenforms.ChosenMultipleChoiceField({'class': 'kode_account'}))
    class Meta:
        model=Tbl_Transaksi
        widgets = {
            'deskripsi': forms.HiddenInput(),'id_cabang_tuju': forms.HiddenInput(),'status_posting': forms.HiddenInput(),'no_trans': forms.HiddenInput(),
        }
Пример #11
0
class EntityForm(forms.Form):
    """ this form is used only to display the field, input
        is handled by the client
    """
    entity = chosenforms.ChosenModelChoiceField(
        queryset=Entity.objects.filter(division__index=3),
        label=_('Move to'),
        required=False)
Пример #12
0
class KasirPelunasanRakMapperForm(forms.ModelForm):
    item = forms.ChoiceField( widget = forms.Select(), choices = JENIS_RAK)
    jenis = forms.ChoiceField( widget = forms.Select(), choices = JENIS_TRANS)
    cabang = chosenforms.ChosenModelChoiceField(label = "Cabang",queryset=Tbl_Cabang.objects.all(),required = False)    
    ke_cabang = chosenforms.ChosenModelChoiceField(label = "Ke Cabang",queryset=Tbl_Cabang.objects.all(),required = False)    
    coa_2 = chosenforms.ChosenModelChoiceField(label = "Bank / Kas",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa_3 = chosenforms.ChosenModelChoiceField(label = "Pendapatan Lainnya",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa_4 = chosenforms.ChosenModelChoiceField(label = "Beban Lainnya",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    debet_rak_cabang = chosenforms.ChosenModelChoiceField(label = "RAK Cabang",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    kredit_rak_pusat = chosenforms.ChosenModelChoiceField(label = "RAK Ke Cabang",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)   
    coa_1 = chosenforms.ChosenModelChoiceField(label = "Titipan Pelunasan",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    rak_debet_pusat1 = chosenforms.ChosenModelChoiceField(label = "RAK Debet Pusat",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    rak_kredit_pusat2 = chosenforms.ChosenModelChoiceField(label = "RAK Kredit Pusat",queryset=Tbl_Akun.objects.all().\
        order_by('coa'),required = False)
    class Meta:
        model = KasirPelunasanRakMapper
        fields = ('item','jenis','cabang','ke_cabang','coa_2','coa_3','coa_4','debet_rak_cabang','kredit_rak_pusat','coa_1','rak_debet_pusat1',\
            'rak_kredit_pusat2')
Пример #13
0
class EntityChoiceForm(forms.Form):
    """ this form is used only to display the field, input
        is handled by the client
    """
    entity = chosenforms.ChosenModelChoiceField(
            queryset=Entity.objects.exclude(candidatelist__isnull=True).filter(division__index=3),
            label= "",
            empty_label=_("Choose a Place"),
            required=False)
Пример #14
0
class PnkbMapperForm(forms.ModelForm):
    cabang = chosenforms.ChosenModelChoiceField(label = "Cabang",queryset=Tbl_Cabang.objects.all(),required = False)
    ke_cabang = chosenforms.ChosenModelChoiceField(label = "Ke Cabang",queryset=Tbl_Cabang.objects.all(),required = False)
    coa = chosenforms.ChosenModelChoiceField(label = "Coa Debet",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa_kredit = chosenforms.ChosenModelChoiceField(label = "Coa Kredit",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa_lawan = chosenforms.ChosenModelChoiceField(label = "Coa Debet Lawan",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa_kredit_lawan = chosenforms.ChosenModelChoiceField(label = "Coa Kredit Lawan",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    debet_rak_cabang = chosenforms.ChosenModelChoiceField(label = "Debet Rak Cabang",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    kredit_rak_pusat = chosenforms.ChosenModelChoiceField(label = "Kredit Rak Cabang",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    class Meta:
        model = PenKasBankMapper
Пример #15
0
class AdmGadaiUlangForm(forms.ModelForm):
    item = forms.ChoiceField( widget = forms.Select(), choices = AKADBARANGSAMA_ADM)
    coa = chosenforms.ChosenModelChoiceField(label = "Non Anggota/Anggota",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa_1 = chosenforms.ChosenModelChoiceField(label = "Titipan Pencairan",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa_2 = chosenforms.ChosenModelChoiceField(label = "Jasa",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa_3 = chosenforms.ChosenModelChoiceField(label = "Adm",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa_4 = chosenforms.ChosenModelChoiceField(label = "Bea simpan",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa_5 = chosenforms.ChosenModelChoiceField(label = "Titipan Pelunasan",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa_6 = chosenforms.ChosenModelChoiceField(label = "Denda",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa_7 = chosenforms.ChosenModelChoiceField(label = "Materai",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    class Meta:
        model = AdmGadaiUlangMapper
Пример #16
0
    def __init__(self, *args, **kwargs):
        super(ChosenTermMixin, self).__init__(*args, **kwargs)

        # For fields which reference a QuerySet that must be evaluated (i.e,
        # hits the database and isn't "lazy"), create fields in the __init__ to
        # avoid database errors in Django's test runner
        self.fields['term'] = chosen_forms.ChosenModelChoiceField(
            queryset=Term.objects.get_terms(include_future=False,
                                            include_summer=True,
                                            reverse=True),
            initial=Term.objects.get_current_term())
Пример #17
0
class AkunForm(ModelForm):  
    header_parent=chosenforms.ChosenModelChoiceField(label = "Header Parent",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    tanggal = forms.DateField(initial = datetime.date.today,widget=forms.widgets.DateInput(attrs={'size': 12}, format="%d-%m-%Y"))
    class Meta:
        model = Tbl_Akun
        widgets = {
            'saldo_mf' : forms.HiddenInput(),
            'saldo_pjb' : forms.HiddenInput(),
            'saldo_krs' : forms.HiddenInput(),
            'saldo_akhir_pjb' : forms.HiddenInput(),
        }
Пример #18
0
class Tbl_TransForm(forms.Form):
    tgl_trans = forms.DateField(initial = datetime.date.today,widget=forms.widgets.DateInput(attrs={'size': 12}, format="%d-%m-%Y"))
    diskripsi = chosenforms.ChosenChoiceField(widget=forms.Select(), choices=JENIS_DESKRIPSI,required = False) 
    #kode_cabang = chosenforms.ChosenChoiceField(widget=forms.Select(), choices=GERAI_PILIH,required = False,initial='300')    
    kode_cabang = chosenforms.ChosenModelChoiceField(label = "Kode Cabang",queryset=Tbl_Cabang.objects.filter(status_aktif = 1),widget=chosenforms.ChosenMultipleChoiceField(),required = False,initial='300')

    id_coa = chosenforms.ChosenModelChoiceField(label = "COA",queryset=Tbl_Akun.objects.all(),widget=chosenforms.ChosenMultipleChoiceField({'class': 'kode_account'}))
    jenis = chosenforms.ChosenChoiceField(widget=forms.Select(), choices=JENIS_DESKRIPSI,required = False)
    debet = forms.IntegerField(label="Debet",initial = 0,widget=forms.TextInput(attrs={'alt': 'integer', 'class': 'uang','readonly':'True'}))
    kredit = forms.IntegerField(label="Kredit",initial = 0,widget=forms.TextInput(attrs={'alt': 'integer', 'class': 'uang','readonly':'True'}))
    id_unit = forms.IntegerField(label="ID Unit",initial = 300,widget=forms.TextInput(attrs={'alt': 'integer', 'class': 'uang','readonly':'True'}))
    id_product = forms.IntegerField(label="ID Product",initial = 0,widget=forms.TextInput(attrs={'alt': 'integer', 'class': 'uang','readonly':'True'}))    
    status_jurnal = forms.IntegerField(label="Status Jurnal",initial = 2,widget=forms.TextInput(attrs={'alt': 'integer', 'class': 'uang','readonly':'True'}))
    saldo = forms.IntegerField(label="SALDO",widget=forms.TextInput(attrs={'size':'16','alt': 'integer', 'class': 'uang'}))
    class Meta:
        widgets = {
            'nobukti' : forms.HiddenInput(),'no_akad' : forms.HiddenInput(),'object_id' : forms.HiddenInput(),
            'no_trans' : forms.HiddenInput(),'id_cabang' : forms.HiddenInput(),'id_cabang_tuju' : forms.HiddenInput(),
            'status_posting' : forms.HiddenInput(),'deskripsi': forms.HiddenInput(),
        }
Пример #19
0
class BiayaPusatGeraiForm(forms.Form):
    jenis_transaksi_telepon	= chosenforms.ChosenChoiceField(widget=forms.Select(), choices=JS_TRANSAKSI,required = False)
    ket_telpon = forms.CharField( widget=forms.TextInput(attrs={'size':25,'placeholder':'Keterangan'}),required = False)
    telpon_gerai= chosenforms.ChosenModelChoiceField(queryset=Tbl_Cabang.objects.all(),required = False)
    telpon = forms.IntegerField(widget=forms.TextInput(attrs={'alt': 'integer', 'class': 'uang','value':0,'size':10}))
	
    jenis_transaksi_bbm	= chosenforms.ChosenChoiceField(widget=forms.Select(), choices=JS_TRANSAKSI,required = False)
    ket_bbm = forms.CharField( widget=forms.TextInput(attrs={'size':25,'placeholder':'Keterangan'}),required = False)
    bbm_gerai= chosenforms.ChosenModelChoiceField(queryset=Tbl_Cabang.objects.all(),required = False)
    bbm = forms.IntegerField(widget=forms.TextInput(attrs={'alt': 'integer', 'class': 'uang','value':0,'size':10}))

    jenis_transaksi_sumbangan	= chosenforms.ChosenChoiceField(widget=forms.Select(), choices=JS_TRANSAKSI,required = False)
    ket_sumbangan = forms.CharField( widget=forms.TextInput(attrs={'size':25,'placeholder':'Keterangan'}),required = False)
    sumbangan_gerai= chosenforms.ChosenModelChoiceField(queryset=Tbl_Cabang.objects.all(),required = False)
    sumbangan = forms.IntegerField(widget=forms.TextInput(attrs={'alt': 'integer', 'class': 'uang','value':0,'size':10}))
    ##ACAN
    jenis_transaksi_listrik	= chosenforms.ChosenChoiceField(widget=forms.Select(), choices=JS_TRANSAKSI,required = False)
    ket_listrik = forms.CharField( widget=forms.TextInput(attrs={'size':25,'placeholder':'Keterangan'}),required = False)
    listrik_gerai= chosenforms.ChosenModelChoiceField(queryset=Tbl_Cabang.objects.all(),required = False)
    listrik = forms.IntegerField(widget=forms.TextInput(attrs={'alt': 'integer', 'class': 'uang','value':0,'size':10}))

    jenis_transaksi_pdam = chosenforms.ChosenChoiceField(widget=forms.Select(), choices=JS_TRANSAKSI,required = False)
    ket_pdam = forms.CharField( widget=forms.TextInput(attrs={'size':25,'placeholder':'Keterangan'}),required = False)
    pdam_gerai= chosenforms.ChosenModelChoiceField(queryset=Tbl_Cabang.objects.all(),required = False)
    pdam = forms.IntegerField(widget=forms.TextInput(attrs={'alt': 'integer', 'class': 'uang','value':0,'size':10}))

    jenis_transaksi_transport = chosenforms.ChosenChoiceField(widget=forms.Select(), choices=JS_TRANSAKSI,required = False)
    ket_transport = forms.CharField( widget=forms.TextInput(attrs={'size':25,'placeholder':'Keterangan'}),required = False)
    transport_gerai= chosenforms.ChosenModelChoiceField(queryset=Tbl_Cabang.objects.all(),required = False)
    transport = forms.IntegerField(widget=forms.TextInput(attrs={'alt': 'integer', 'class': 'uang','value':0,'size':10}))
Пример #20
0
class CompanyRepCreationForm(UserCreationForm):
    """Form for creating a user account for a company representative.

    This form creates a user account and an associated CompanyRep object, tying
    the rep to a particular company.

    This form should be used by website administrators. Representatives should
    not create accounts for themselves.
    """
    company = chosen_forms.ChosenModelChoiceField(
        queryset=Company.objects.all())
    confirm_email = forms.EmailField(label='Confirm email', required=True)

    class Meta(UserCreationForm.Meta):
        fields = ('company', 'username', 'first_name', 'last_name', 'email',
                  'confirm_email')
        widgets = {
            'expiration_date': SelectDateWidget()
        }

    def __init__(self, *args, **kwargs):
        super(CompanyRepCreationForm, self).__init__(*args, **kwargs)
        self.fields['email'].help_text = (
            'Please ensure that this address is correct! After this form is '
            'submitted, the company representative will receive an email at '
            'this address, which will allow them to set their account password.'
        )

        # Take out the password fields from the superclass form, since we set
        # an unusable password for the user in the save method, due to the fact
        # that this form is for someone creating an account for another person.
        del self.fields['password1']
        del self.fields['password2']

    def clean(self):
        cleaned_data = super(CompanyRepCreationForm, self).clean()
        email = cleaned_data.get('email')
        confirm_email = cleaned_data.get('confirm_email')
        if email != confirm_email:
            raise ValidationError('Emails do not match.')
        return cleaned_data

    @transaction.atomic
    def save(self, *args, **kwargs):
        """Save a CompanyRep object along with the new user account."""
        # Set password1 in the cleanded_data to None so that the user is given
        # an unusable password in the superclass save() method
        self.cleaned_data['password1'] = None
        rep_user = super(CompanyRepCreationForm, self).save(*args, **kwargs)
        rep_company = self.cleaned_data['company']
        CompanyRep(user=rep_user, company=rep_company).save()
        return rep_user
Пример #21
0
class AdmPelunasanForm(ModelForm):
    item = forms.ChoiceField( widget = forms.Select(), choices = PELUNASAN_ADM)
    coa_1 = chosenforms.ChosenModelChoiceField(label = "Titipan Pelunasan",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False) 
    coa_2 = chosenforms.ChosenModelChoiceField(label = "Pinjaman Anggota/None Anggota",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False) 
    coa_3 = chosenforms.ChosenModelChoiceField(label = "Denda",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa_4 = chosenforms.ChosenModelChoiceField(label = "Pendapatan Jasa",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa_5 = chosenforms.ChosenModelChoiceField(label = "PPAP",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa_6 = chosenforms.ChosenModelChoiceField(label = "Pend Ops Lainnya",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa_7 = chosenforms.ChosenModelChoiceField(label = "Beban Ops Lainnya",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)  
    class Meta:
        model = AdmPelunasanMapper
Пример #22
0
class BiayaPusatMapperForm(forms.ModelForm):
    item = forms.ChoiceField( widget = forms.Select(), choices = ITEM_JURNAL)
    cabang = chosenforms.ChosenModelChoiceField(label = "Gerai",queryset=Tbl_Cabang.objects.all(),required = False)
    cabang_tuju = chosenforms.ChosenModelChoiceField(label = "Gerai Tuju",queryset=Tbl_Cabang.objects.all(),required = False)
    coa_debet = chosenforms.ChosenModelChoiceField(label = "Coa Debet",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa = chosenforms.ChosenModelChoiceField(label = "Coa Kredit",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa_uk = chosenforms.ChosenModelChoiceField(label = "Coa Uangmuka",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa_debet_tuju = chosenforms.ChosenModelChoiceField(label = "Coa Debet Tuju",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa_kredit_tuju = chosenforms.ChosenModelChoiceField(label = "Coa Kredit Tuju",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    class Meta:
        model = BiayaPusatMapper
Пример #23
0
class CPBRemitoDetalleForm(forms.ModelForm):
    producto = chosenforms.ChosenModelChoiceField(
        queryset=prod_productos.objects.filter(baja=False,
                                               mostrar_en__in=(2, 3)),
        required=False)
    cpb_comprobante = forms.IntegerField(widget=forms.HiddenInput(),
                                         required=False)
    detalle = forms.CharField(label='Detalle',
                              widget=forms.Textarea(attrs={
                                  'class': 'form-control',
                                  'rows': 1
                              }),
                              required=False)
    cantidad = forms.DecimalField(initial=1, decimal_places=2)
    unidad = forms.CharField(
        required=False,
        widget=forms.TextInput(attrs={
            'class': 'form-control unidades',
            'readonly': 'readonly'
        }),
        initial='u.')

    class Meta:
        model = cpb_comprobante_detalle
        exclude = ['id', 'fecha_creacion', 'coef_iva', 'tasa_iva']

    def __init__(self, *args, **kwargs):
        request = kwargs.pop('request', None)
        super(CPBRemitoDetalleForm, self).__init__(*args, **kwargs)
        try:
            empresa = empresa_actual(request)
            self.fields['producto'].queryset = prod_productos.objects.filter(
                baja=False,
                mostrar_en__in=(2, 3),
                empresa__id__in=empresas_habilitadas(request)).order_by(
                    'nombre')
            self.fields[
                'lista_precios'].queryset = prod_lista_precios.objects.filter(
                    baja=False, empresa__id__in=empresas_habilitadas(request))
            self.fields[
                'origen_destino'].queryset = prod_ubicacion.objects.filter(
                    baja=False, empresa__id__in=empresas_habilitadas(request))
        except:
            empresa = None

    def clean_entidad(self):
        producto = self.cleaned_data['producto']
        if not producto:
            raise forms.ValidationError(u"Debe seleccionar un Producto.")
        return producto
Пример #24
0
class AkadForm(forms.Form):

    agnasabah = forms.ModelChoiceField(
        label="NAMA NASABAH",
        queryset=Nasabah.objects.filter(id__isnull=False))
    tanggal = forms.DateTimeField(
        initial=datetime.date.today,
        widget=forms.DateTimeInput(attrs={'readonly': 'true'}))
    gerai = forms.ModelChoiceField(queryset=Tbl_Cabang.objects.all(),
                                   empty_label="--- PILIH ---")
    jangka_waktu = forms.ChoiceField(widget=forms.Select(),
                                     choices=JANGKA_WAKTU)
    nilai = forms.IntegerField(label="Nilai Taksir",
                               widget=forms.TextInput(attrs={
                                   'alt': 'integer',
                                   'class': 'uang'
                               }))
    taksir = chosenforms.ChosenModelChoiceField(
        label="Data Taksir",
        queryset=Taksir.objects.filter(status=2),
        widget=chosenforms.ChosenMultipleChoiceField({'class':
                                                      'kode_account'}))
    bea_materai = forms.IntegerField(widget=forms.TextInput(attrs={
        'alt': 'integer',
        'class': 'uang'
    }))
    barang = chosenforms.ChosenModelChoiceField(
        queryset=Barang.objects.all(),
        widget=chosenforms.ChosenMultipleChoiceField({'class': 'kode_barang'}))
    jenis_transaksi = forms.ChoiceField(
        choices=CHOICES_JENIS_TRANSAKSI,
        widget=forms.RadioSelect(attrs={'class': 'rad'}))
    jenis_kendaraan = forms.ChoiceField(widget=forms.Select(),
                                        choices=JENIS_KENDARAAN)
    ###KENDARAAN
    jangka_waktu_kendaraan = forms.ChoiceField(widget=forms.Select(),
                                               choices=JANGKA_WAKTU_KENDARAAN)
Пример #25
0
class AdmPencairanForm(ModelForm):  
    item = forms.ChoiceField( widget = forms.Select(), choices = ITEM_ADM_JURNAL)  
    tanggal = forms.DateField(initial = datetime.date.today,widget=forms.widgets.DateInput(attrs={'size': 12}, format="%d-%m-%Y"))
    cabang = chosenforms.ChosenModelChoiceField(required = False,queryset=Tbl_Cabang.objects.all(),\
        widget=chosenforms.ChosenMultipleChoiceField({'class': 'kode_account'}))
    coa1 = chosenforms.ChosenModelChoiceField(label = "Titipan Pencairan",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa2 = chosenforms.ChosenModelChoiceField(label = "Pinjaman Non Anggota/Anggota",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa3 = chosenforms.ChosenModelChoiceField(label = "Adm",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa4 = chosenforms.ChosenModelChoiceField(label = "Jasa",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)    
    coa5 = chosenforms.ChosenModelChoiceField(label = "Bea Simpan",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)    
    coa6 = chosenforms.ChosenModelChoiceField(label = "Materai",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)            
    class Meta:
        model = PencairanAdmMapper
Пример #26
0
class KasirPelunasanMapperForm(forms.ModelForm):
    item = forms.ChoiceField( widget = forms.Select(), choices = PELUNASAN_KASIR)
    jenis = forms.ChoiceField( widget = forms.Select(), choices = JENIS_TRANS)
    cabang = chosenforms.ChosenModelChoiceField(label = "Cabang",queryset=Tbl_Cabang.objects.all(),required = False)    
    ke_cabang = chosenforms.ChosenModelChoiceField(label = "Ke Cabang",queryset=Tbl_Cabang.objects.all(),required = False)    
    coa_1 = chosenforms.ChosenModelChoiceField(label = "Titipan Pelunasan",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa_2 = chosenforms.ChosenModelChoiceField(label = "Bank / Kas",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa_3 = chosenforms.ChosenModelChoiceField(label = "Pendapatan Lainnya",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa_4 = chosenforms.ChosenModelChoiceField(label = "Beban Lainnya",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    coa_5 = chosenforms.ChosenModelChoiceField(label = "Titipan Kelebihan",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    #debet_rak_cabang = chosenforms.ChosenModelChoiceField(label = "RAK Cabang",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    #kredit_rak_pusat = chosenforms.ChosenModelChoiceField(label = "RAK Pusat",queryset=Tbl_Akun.objects.all().order_by('coa'),required = False)
    #tanggal = forms.DateField(initial = datetime.date.today,widget=forms.widgets.DateInput(attrs={'size': 12}, format="%d-%m-%Y"))
    class Meta:
        model = KasirPelunasanMapper
Пример #27
0
class SearchForm(forms.Form):
    start_date = forms.DateField(initial=datetime.date.today,
                                 widget=forms.widgets.DateInput(
                                     attrs={
                                         'size': 12,
                                     }, format="%Y-%m-%d"))
    end_date = forms.DateField(initial=datetime.date.today,
                               widget=forms.widgets.DateInput(
                                   attrs={
                                       'size': 12,
                                   }, format="%Y-%m-%d"))
    id_cabang = chosenforms.ChosenChoiceField(widget=forms.Select(),
                                              choices=DATACABANG,
                                              initial='0',
                                              required=False)
    id_coa = chosenforms.ChosenModelChoiceField(
        label="Kode Account", queryset=Tbl_Akun.objects.all())
    jenis = forms.ChoiceField(widget=forms.RadioSelect(
        renderer=HorizRadioRenderer, attrs={'class': 'id_pilih'}),
                              choices=JENIS_DATA)
Пример #28
0
class ConsultaCtaCteProv(forms.Form):
    entidad = chosenforms.ChosenModelChoiceField(
        label='Proveedor',
        queryset=egr_entidad.objects.filter(tipo_entidad=2, baja=False),
        empty_label=None,
        required=True)
    fdesde = forms.DateField(
        label='Fecha Desde',
        widget=forms.DateInput(attrs={
            'class': 'form-control datepicker',
            'autocomplete': 'off'
        }),
        initial=inicioMes(),
        required=True)
    fhasta = forms.DateField(
        label='Fecha Hasta',
        widget=forms.DateInput(attrs={
            'class': 'form-control datepicker',
            'autocomplete': 'off'
        }),
        initial=hoy(),
        required=True)
    estado = forms.ChoiceField(label='Estado',
                               choices=ESTADO_,
                               required=False,
                               initial=0)

    def __init__(self, *args, **kwargs):
        empresa = kwargs.pop('empresa', None)
        request = kwargs.pop('request', None)
        id = kwargs.pop('id', None)
        super(ConsultaCtaCteProv, self).__init__(*args, **kwargs)
        self.fields['entidad'].queryset = egr_entidad.objects.filter(
            tipo_entidad=2,
            baja=False,
            empresa__id__in=empresas_habilitadas(request)).order_by(
                'apellido_y_nombre')
        if id:
            self.fields['entidad'].initial = id
            self.fields['estado'].initial = 0
Пример #29
0
class GadaiUlangForm(ModelForm):    
    tanggal = forms.DateField(initial = datetime.date.today,widget=forms.widgets.DateInput(attrs={'size': 12}, format="%d-%m-%Y"))
    cabang = chosenforms.ChosenModelChoiceField(queryset=Tbl_Cabang.objects.all(),\
        widget=chosenforms.ChosenMultipleChoiceField({'class': 'kode_account'}))
    coa_titipan_pelunasan = chosenforms.ChosenModelChoiceField(label='Coa Titipan',queryset=Tbl_Akun.objects.all(),\
        widget=chosenforms.ChosenMultipleChoiceField({'class': 'kode_account'}))
    coa_kas = chosenforms.ChosenModelChoiceField(label='Coa Kas/ Bank',queryset=Tbl_Akun.objects.all(),\
        widget=chosenforms.ChosenMultipleChoiceField({'class': 'kode_account'}),required = False)
    coa_pendapatan_lainnya = chosenforms.ChosenModelChoiceField(label='Coa Pendapatan',queryset=Tbl_Akun.objects.all(),\
        widget=chosenforms.ChosenMultipleChoiceField({'class': 'kode_account'}),required = False)
    coa_beban = chosenforms.ChosenModelChoiceField(label='Coa Beban',queryset=Tbl_Akun.objects.all(),\
        widget=chosenforms.ChosenMultipleChoiceField({'class': 'kode_account'}),required = False)
    coa_titipan_kelebihan = chosenforms.ChosenModelChoiceField(label='Coa Titipan Kelebihan',queryset=Tbl_Akun.objects.all(),\
        widget=chosenforms.ChosenMultipleChoiceField({'class': 'kode_account'}),required = False)
    class Meta:
        model = GadaiUlangMapper
Пример #30
0
class ConsultaLPreciosProductos(forms.Form):
    lista = chosenforms.ChosenModelChoiceField(
        label='Lista',
        queryset=prod_lista_precios.objects.filter(baja=False),
        empty_label=label_todos,
        required=False)

    def __init__(self, *args, **kwargs):
        empresa = kwargs.pop('empresa', None)
        super(ConsultaLPreciosProductos, self).__init__(*args, **kwargs)
        self.fields['lista'].queryset = prod_lista_precios.objects.filter(
            baja=False,
            empresa__id__in=empresas_habilitadas(request)).order_by('nombre')


# class UserForm(UserCreationForm):
#     username = forms.CharField(label=u'Usuario',required = True)
#     password1 = forms.CharField(widget=forms.PasswordInput(render_value = True),max_length=10,label='Contraseña')
#     password2 = forms.CharField(widget=forms.PasswordInput(render_value = True),max_length=10,label='Confirmar Contraseña')
#     class Meta:
#         model = User
#         fields = ('username', 'password1', 'password2')