• Tidak ada hasil yang ditemukan

Perancangan Sistem Penjualan Tunai dan Kredit Berbasis Komputer Di CV.NS Mobilindo Bandung.

N/A
N/A
Protected

Academic year: 2017

Membagikan "Perancangan Sistem Penjualan Tunai dan Kredit Berbasis Komputer Di CV.NS Mobilindo Bandung."

Copied!
139
0
0

Teks penuh

(1)

v Universitas Kristen Maranatha Disusun Oleh :

Nama : Dion Oktavian Nrp : 0727018

Jurusan Sistem Komputer, Fakultas Teknik, Universitas Kristen Maranatha, Jl. Prof. drg. Surya Sumantri, MPH no.65, Bandung, Indonesia.

ABSTRAK

Proses penjualan Tunai dan Kredit Mobil di CV. NS Mobilindo masih dilakukan dengan cara mencatat transaksi pada Buku Penjualan dan pada bukti transaksi. Untuk informasi mengenai mobil yang dibutuhkan oleh customer dilakukan dengan mencari data pada Buku Daftar Mobil, sehingga untuk pembuatan laporan harus dilakukan pencatatan ulang.

Teknologi informasi yang berkembang pesat dewasa ini sangat memberi dukungan bagi pengembangan sistem informasi di sebuah perusahaan, terutama dengan pemanfaatan teknologi informasi yang berbasis komputer atau yang lebih dikenal dengan Computer-Based Information System, karena dengan penggunaan teknologi komputer di dalam sebuah sistem informasi akan dapat mengolah data Penjualan Tunai dan Kredit Mobil dengan mengurangi tingkat kesalahan yang dapat terjadi, menghemat tenaga dan waktu, serta mempermudah dalam pembuatan laporan dan pencarian data.

(2)

vi Universitas Kristen Maranatha

Name: Dion Oktavian Nrp: 0727018

Computer Engineering, Maranatha Christian University, Jl. Prof.Drg.Suria Sumantri, MPH no.65, Bandung, Indonesia.

ABSTRACT

Cash and credit sales car process in cv NS mobilindo in still doing by write transaction in sales book and proof of transaction.For more information about cash which in needed by customer, is doing by searching the data in cash list book, so that to make a report we have to rewrite.

Information technology which in growing so fast this time is rally give support for the information system development in accompany, especially in utilization of the computerization of the information technology or more known as computer – based information system, because by using computer technology in system information it cas procced the cash sales data cash and credit to decrease error level which cas happen, to save power and time, and to make easir in reporting and data searching.

(3)

vii Universitas Kristen Maranatha

Halaman

JUDUL ... i

LEMBAR PENGESAHAN ... ii

PERNYATAAN ORISINALITAS LAPORAN ... iii

LEMBAR PERNYATAAN PERSETUJUAN PUBLIKASI ... iv

ABSTRAK ... v

ABSTRACT ... vi

KATA PENGANTAR ... vii

DAFTAR ISI ... ix

DAFTAR GAMBAR ... xii

DAFTAR TABEL ... xiv

BAB I PENDAHULUAN ... 1

1.1 Latar Belakang Masalah ... 1

1.2 Identifikasi Masalah ... 1

1.3 Batasan Masalah ... 2

1.4 Tujuan Pembuatan Perancangan Sistem ... 2

1.5 Sistematika Penulisan ... 3

BAB II TEORI PENDAHULUAN ... 4

2.1 Pengertian Sistem ... 4

2.2 Karakteristik Sistem ... 5

2.3 Klasifikasi Sistem ... 6

2.4 Pengertian Informasi ... 7

2.5 Pengertian Sistem Informasi ... 8

2.6 Pengertian Penjualan ... 8

1. Penjualan Tunai... 9

2. Penjualan Kredit ... 9

(4)

viii Universitas Kristen Maranatha

2. Sejarah Singkat SQL Server 2000 ... 20

BAB III PERANCANGAN ... 22

3.1 Perancangan Sistem ... 22

3.2.1 Prosedur Sistem Berjalan ... 22

3.2.2 Flowchar ... 24

3.2.3 Data Flow Diagram (DFD) ... 27

3.2 Realisasi Sistem ... 30

3.2.1 Input Kendaraan ... 30

3.2.2 Input Leasing ... 30

3.2.3 Cari Mobil ... 30

3.2.4 Penjualan Tunai ... 31

3.2.5 Penjualan Kredit ... 31

3.2.6 Cetak Bukti Pembayaran ... 32

3.2.7 Pembayaran Leasing ... 32

3.2.8 Cetak Laporan Penjualan ... 32

3.2.9 Perhitungan Kredit ... 33

BAB IV DATA PENGAMATAN ... 34

4.1 Struktur Sistem Komputer ... 34

4.2 Rancangan Database ... 35

1. Skema Database Relational ... 35

2. Penjelasan Table ... 36

4.3 Pengamatan Aplikasi ... 39

IV.3.1Struktur Menu ... 39

IV.3.2Format Dokumen Output ... 40

IV.3.3Dialog Screen ... 41

(5)

ix Universitas Kristen Maranatha

DAFTAR PUSTAKA ... 63

(6)

x Universitas Kristen Maranatha

GAMBAR Halaman

2.1 Baris Menu ... 12

2.2 Toolbar ... 13

2.3 Form ... 14

2.4 Windows Kode ... 15

2.5 Toolbox ... 15

2.6 Project Explorer ... 16

2.7 Windows Propertis ... 17

2.8 Windows Form Layout ... 18

2.9 Windows Intermadiate ... 18

2.10 Metoda ... 19

2.11 Event ... 19

3.1 Flowchart Sistem Penjualan Tunai dan Kredit ... 24

3.2 Flowchart Sistem Penjualan Tunai dan Kredit... 25

3.3 Flowchart Sistem Penjualan Tunai dan Kredit... 26

3.4 Flowchart Sistem Penjualan Tunai dan Kredit... 27

3.5 Context Diagram Sistem Penjualan Tunai dan Kredit ... 27

3.6 DFD Level 0 SIstem Penjualan Tunai dan Kredit ... 28

3.7 DFD Level 1 Sistem Penjualan Tunai dan Kredit Proses Periksa Kendara ... 28

3.8 DFD Level 2 Sistem Penjualan Tunai dan Kredit Proses Transaksi Penjualan ... 29

3.9 DFD Level 3 Sistem Penjualan Tunai dan Kredit Proses Proses Laporan ... 29

4.1 Struktur Komputer Topologi Star Sistem Penjualan Tunai dan Kredit ... 34

4.2 Skema Table Relational Sistem Penjualan Tunai dan Kredit Mobil ... 35

(7)

xi Universitas Kristen Maranatha

4.7 Message Box Data Leasing Tidak Lengkap ... 43

4.8 Message Box Data Leasing Telah Tersimpan ... 43

4.9 Message Box data Leasing Telah Terupdate ... 44

4.10 Message Box Untuk Keluar Dari Form Input Leasing ... 44

4.11 Form Cari Kendaraan ... 45

4.12 Form Input Customer ... 46

4.13 Message Box Data Customer Telah Tersimpan ... 47

4.14 Message Box Pembatalan Penyimpanan Data Customer ... 47

4.15 Message Box Data Customer Telah Dirubah ... 48

4.16 Message Box Data Customer Telah Dihapus ... 48

4.17 Message Box Untuk Keluar Dari Form Input Customer ... 48

4.18 Form Input Penjualan ... 49

4.19 Message Box Data Penjualan Telah Tersimpan ... 50

4.20 Message Box Pembatalan Penyimpanan Data Penjualan ... 50

4.21 Message Box Untuk Keluar Dari Form Input Customer ... 51

4.22 Form Input Kendaraan ... 51

4.23 Message Box Data Kendaraan Telah Tersimpan ... 52

4.24 Message Box Pembatalan Penyimpanan Data Kendaraan .... 52

4.25 Message Box Data Kendaraan Telah Dirubah ... 53

4.26 Message Box Data Kendaraan Telah Dihapus ... 53

4.27 Message Box Untuk Keluar Dari Form Input Kendaraan ... 53

4.28 Form Bayar Leasing ... 54

4.29 Message Box Data Sisa Bayar Leasing Telah Dirubah ... 54

4.30 Message Box Data Sisa Bayar Leasing Telah Dicetak... 55

4.31 Form Laporan Penjualan ... 55

4.32 Message Box Untuk Keluar Dari Form Laporan Penjualan .. 56

4.33 Form Hitungan Kredit ... 57

(8)

xii Universitas Kristen Maranatha

4.1 Master Kendaraan ... 35

4.2 Master Leasing ... 36

4.3 Master Customer... 36

4.4 Head Jual ... 37

(9)

1. Dialog Screen Input Customer

Nama Dialog Screen : Form Input Customer

Fungsi : Untuk menginput data kendaraan untuk disimpan dalam database

Bentuk :

Private Sub Combo1_Change() On Error Resume Next Text7 = ""

Text9 = "" Text10 = ""

If Combo1.Text = "" And Combo2.Text = "" Then tampil

Else

If Combo1.Text = "" Then tampil4

Else

If Combo2.Text = "" Then tampil5

(10)

Private Sub Combo1_Click() On Error Resume Next Text7 = ""

Text9 = ""

If Combo1.Text = "" And Combo2.Text = "" Then tampil

Else

If Combo1.Text = "" Then tampil4

Else

If Combo2.Text = "" Then tampil5

Else tampil3 End If End If End If End Sub

Private Sub Combo2_Change() On Error Resume Next Text7 = ""

Text9 = "" Text10 = ""

If Combo1.Text = "" And Combo2.Text = "" Then tampil

Else

If Combo1.Text = "" Then tampil4

Else

If Combo2.Text = "" Then tampil5

(11)

Private Sub Combo2_Click() On Error Resume Next Text7 = ""

Text9 = ""

If Combo1.Text = "" And Combo2.Text = "" Then tampil

Else

If Combo1.Text = "" Then tampil4

Else

If Combo2.Text = "" Then tampil5

Else tampil3 End If End If End If End Sub

Private Sub Command1_Click() On Error Resume Next

Bukakunci Me non_aktif

data1.Enabled = True 'auto1

(12)

Private Sub Command2_Click() On Error Resume Next

If Text3 = "" Or Text2 = "" Or Text4 = "" Or Text1 = "" Or Text5 = "" Or Text8 = "" Then MsgBox "lengkapi data sebelum disimpan", vbInformation, "NS Mobilindo"

Else

con.Execute ("exec Sp_Simpan_Customer '" & Text2 & "','" & Text1 & "','" & Text5 & "','" & Text8 & "','" & Text3 & "','" & Text4 & "'")

MsgBox "Data Telah tersimpan", vbInformation, "NS Mobilindo" tampil

sih

Kunci Me

Text7.Locked = False Text9.Locked = False Text10.Locked = Fals Combo1.Locked = False Combo2.Locked = False aktif

data1.Enabled = False End If

End Sub

Private Sub Command2_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then

If Text3 = "" Or Text2 = "" Or Text4 = "" Or Text1 = "" Or Text5 = "" Or Text8 = "" Then MsgBox "lengkapi data sebelum disimpan", vbInformation, "NS Mobilindo"

Else

con.Execute ("exec Sp_Simpan_Customer '" & Text2 & "','" & Text1 & "','" & Text5 & "','" & Text8 & "','" & Text3 & "','" & Text4 & "'")

MsgBox "Data Telah tersimpan", vbInformation, "NS Mobilindo" tampil

Bersih Me Kunci Me

Combo1.Locked = False Combo2.Locked = False aktif

data1.Enabled = False End If

(13)

Private Sub Command3_Click() On Error Resume Next

If MsgBox("yakin anda akan membatalkan nya", vbYesNo) = vbYes Then sih

Kunci Me

Text7.Locked = False Text9.Locked = False Text10.Locked = Fals aktif

data1.Enabled = False Command1.SetFocus Else

Command3.SetFocus End If

Combo1.Locked = False Combo2.Locked = False End Sub

Private Sub Command4_Click() On Error Resume Next

con.Execute ("update customer set Nama='" & Text2 & "',Tempat_Lahir='" & Text1 & "',Tanggal_Lahir='" & Text5 & "',Agama = '" & Text8 & "',Alamat='" & Text3 & "',Tlpn='" & Text4 & "' where Kode_Customer='" & Text6 & "'")

MsgBox "data telah dirubah", vbInformation, "NS Mobilindo" tampil

sih

Kunci Me

Text7.Locked = False Text9.Locked = False Text10.Locked = Fals Combo1.Locked = False Combo2.Locked = False aktif

(14)

Private Sub Command5_Click() On Error Resume Next

con.Execute ("exec Sp_Hapus_Customer '" & Text6 & "'") MsgBox "data telah terhapus"

tampil sih

Kunci Me

Text7.Locked = False Text9.Locked = False Text10.Locked = Fals Combo1.Locked = False Combo2.Locked = False aktif

data1.Enabled = False End Sub

Private Sub Command6_Click() On Error Resume Next

If MsgBox("yakin anda akan keluar dari form ini", vbYesNo) = vbYes Then sink Me

Unload Me Else

Command1.SetFocus End If

End Sub

Private Sub data1_Change() On Error Resume Next

Text5 = Year(data1) & "-" & Month(data1) & "-" & Day(data1) Text5.SetFocus

(15)

Private Sub DataGrid1_Click() On Error Resume Next

Text6 = DataGrid1.Columns(0) Text2 = DataGrid1.Columns(1) Text1 = DataGrid1.Columns(2) Text5 = DataGrid1.Columns(3) Text8 = DataGrid1.Columns(4) Text3 = DataGrid1.Columns(5) Text4 = DataGrid1.Columns(6) Bukakunci Me

non_aktif

Command2.Enabled = False Command3.Enabled = True Command4.Enabled = True Command5.Enabled = True End Sub

Private Sub DataGrid1_DblClick() On Error Resume Next

If Text11 = "" Then Text2.SetFocus Exit Sub End If

Frm_Jual.Text2 = DataGrid1.Columns(0) Frm_Jual.Text26 = DataGrid1.Columns(1) Frm_Jual.Text29 = DataGrid1.Columns(5) Frm_Jual.Text23 = DataGrid1.Columns(6) Frm_Jual.Text26.SetFocus

Frm_Jual.Text26.Locked = True Frm_Jual.Option3.Enabled = True Frm_Jual.Option4.Enabled = True Frm_Jual.Show

(16)

Private Sub DataGrid1_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then If Text11 = "" Then Text2.SetFocus Exit Sub End If

Frm_Jual.Show

Frm_Jual.Text2 = DataGrid1.Columns(0) Frm_Jual.Text26 = DataGrid1.Columns(1) Frm_Jual.Text29 = DataGrid1.Columns(5) Frm_Jual.Text23 = DataGrid1.Columns(6) Frm_Jual.Text26.SetFocus

Frm_Jual.Text26.Locked = True Frm_Jual.Option3.Enabled = True Frm_Jual.Option4.Enabled = True Text11 = ""

Form1.Visible = False End If

End Sub

Private Sub Form_Load() On Error Resume Next BukaDB

sih

Text11 = "" Kunci Me

Text7.Locked = False Text9.Locked = False Text10.Locked = False tampil

aktif

data1.Enabled = False Form1.Left = 2685 Form1.Top = 1500 'Form1.Width = 9045 Form1.Height = 7620 Form1.ScaleHeight = 7170 Form1.ScaleWidth = 9675 For I = 1 To 31

(17)

Combo1.Text = Day(Date) For I = 1 To 12

Combo2.AddItem I Next I

Combo2.Text = Month(Date) Combo1.Text = ""

Combo2.Text = "" Combo1.Locked = False Combo2.Locked = False

If Combo1.Text = "" And Combo2.Text = "" Then tampil

Else tampil3 End If End Sub

Private Sub tampil() On Error Resume Next

Dim rstampil As New ADODB.Recordset If rstampil.State = 1 Then rstampil.Close

rstampil.Open "select * from customer order by Kode_Customer Desc ", con, 3, 2 Set DataGrid1.DataSource = rstampil.DataSource

DataGrid1.Refresh End Sub

Private Sub aktif()

On Error Resume Next Command1.Enabled = True Command2.Enabled = False Command3.Enabled = False Command4.Enabled = False Command5.Enabled = False Command6.Enabled = True End Sub

Private Sub non_aktif() On Error Resume Next Command1.Enabled = False Command2.Enabled = True Text2.SetFocus

(18)

Private Sub Text1_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then Text5.SetFocus

End If End Sub

Private Sub Text10_Change() Text9 = ""

Text7 = "" Combo1 = "" Combo2 = "" tampil6 End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then Text3.SetFocus

Exit Sub End If

If Not (KeyAscii >= Asc("a") & Chr(13) _ And KeyAscii <= Asc("z") & Chr(13) _ Or (KeyAscii >= Asc("A") & Chr(13) _ And KeyAscii <= Asc("Z") & Chr(13) _ Or KeyAscii = vbKeyBack _

Or KeyAscii = vbKeyDelete _ Or KeyAscii = vbKeySpace)) Then Beep

KeyAscii = 0 End If

End Sub

Private Sub Text3_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then Text1.SetFocus

(19)

Private Sub Text4_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then Command2.SetFocus Exit Sub

End If

If Not (KeyAscii >= Asc("0") & Chr(13) And KeyAscii <= Asc(9) & Chr(13) Or KeyAscii = vbKeyBack Or KeyAscii = vbKeyDelete Or KeyAscii = vbKeySpace) Then

Beep

KeyAscii = 0

ElseIf KeyAscii = 13 Then Text12.SetFocus

End If End Sub Sub tampil13()

On Error Resume Next

Dim rstampil2 As New ADODB.Recordset If rstampil2.State = 1 Then rstampil2.Close

rstampil2.Open "select * from customer where Alamat like '%" & Text9.Text & "%'", con, 3, 2

Set DataGrid1.DataSource = rstampil2.DataSource DataGrid1.Refresh

End Sub Sub tampil6()

On Error Resume Next

Dim rstampil2 As New ADODB.Recordset If rstampil2.State = 1 Then rstampil2.Close

rstampil2.Open "select * from customer where Kode_Customer like '%" & Text10.Text & "%'", con, 3, 2

Set DataGrid1.DataSource = rstampil2.DataSource DataGrid1.Refresh

End Sub Sub tampil2()

On Error Resume Next

Dim rstampil2 As New ADODB.Recordset If rstampil2.State = 1 Then rstampil2.Close

rstampil2.Open "select * from customer where Nama like '%" & Text7.Text & "%'", con, 3, 2

Set DataGrid1.DataSource = rstampil2.DataSource DataGrid1.Refresh

(20)

Private Sub Text5_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then Text8.SetFocus

End If End Sub

Private Sub Text7_Change() On Error Resume Next Text9 = ""

Text10 = "" Combo1 = "" Combo2 = "" tampil2 End Sub

Private Sub Text9_Change() On Error Resume Next Text7 = ""

Text10 = "" Combo1 = "" Combo2 = "" tampil13 End Sub Sub tampil3()

On Error Resume Next

Dim Rstampil3 As New ADODB.Recordset If Rstampil3.State = 1 Then Rstampil3.Close

Rstampil3.Open "select * from customer where Month(Tanggal_Lahir)= '" & (Combo2) & "' and Day(Tanggal_Lahir)= '" & (Combo1) & "' ", con, 3, 2

Set DataGrid1.DataSource = Rstampil3.DataSource DataGrid1.Refresh

End Sub Sub tampil4()

On Error Resume Next

Dim Rstampil4 As New ADODB.Recordset If Rstampil4.State = 1 Then Rstampil4.Close

Rstampil4.Open "select * from customer where Month(Tanggal_Lahir)= '" & (Combo2) & "'", con, 3, 2

Set DataGrid1.DataSource = Rstampil4.DataSource DataGrid1.Refresh

(21)

Sub tampil5()

On Error Resume Next

Dim Rstampil5 As New ADODB.Recordset If Rstampil5.State = 1 Then Rstampil5.Close

Rstampil5.Open "select * from customer where day(Tanggal_Lahir)= '" & (Combo1) & "'", con, 3, 2

Set DataGrid1.DataSource = Rstampil5.DataSource DataGrid1.Refresh

End Sub

Private Sub Text8_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then Text4.SetFocus

(22)

2. Dialog Screen Cari Kendaraan

Nama Dialog Screen : Form Cari Kendaraan

Fungsi : Untuk Mencari data kendaraan yang

dibutuhkan oleh konsumen

Bentuk :

Private Sub Check1_Click() On Error Resume Next

If Check1.Value = Checked Then Text3.Text = "Ada"

cetak_listview ("Select * from Kendaraan where Merk like '%" & Text1.Text & "%'and Type like '%" & Text2.Text & "%'and Status like '%" & Text3.Text & "%'")

Else

Text3.Text = ""

cetak_listview ("Select * from Kendaraan where Merk like '%" & Text1.Text & "%'and Type like '%" & Text2.Text & "%'and Status like '%" & Text3.Text & "%'")

(23)

Private Sub Command2_Click() On Error Resume Next

If MsgBox("Anda Yakin Akan Keluar Dari Aplikasi InI....?", vbYesNo, "admin") = vbYes Then

sink Me Unload Me MDIForm1.Show Else

Frm_Cari.Show End If

End Sub

Private Sub Form_Load() On Error Resume Next BukaDB

add

Frm_Cari.Left = 2500 Frm_Cari.Top = 900 Frm_Cari.Height = 6975 Frm_Cari.Width = 8595 Text1.SetFocus

End Sub Sub add()

On Error Resume Next With ListView1 .View = lvwReport .ColumnHeaders.Clear

.ColumnHeaders.add , , "No Polisi", 1200 .ColumnHeaders.add , , "Merk", 1500 .ColumnHeaders.add , , "Type", 1000 .ColumnHeaders.add , , "Tahun", 900 .ColumnHeaders.add , , "Warna", 900 .ColumnHeaders.add , , "Status", 1000 .ColumnHeaders.add , , "Harga", 2000 End With

cetak_listview ("SELECT

No_Polisi,Merk,Type,Tahun,Warna,No_Rangka,No_Mesn,No_BPKB,An_BPKB,Harga_Ju al,Status from Kendaraan")

(24)

Function cetak_listview(Str As String) On Error Resume Next

ListView1.ListItems.Clear If rec.State Then rec.Close

rec.Open Str, con, adOpenDynamic, adLockOptimistic Do While Not rec.EOF

Set ditem = ListView1.ListItems.add() With rec

ditem.Text = rec!No_Polisi ditem.SubItems(1) = rec!Merk ditem.SubItems(2) = rec!Type ditem.SubItems(3) = rec!Tahun ditem.SubItems(4) = rec!Warna ditem.SubItems(5) = rec!Status a = rec!Harga_Jual

a = Format(a, "Rp" + " " + "###,##0.00") a.SelStart = Len(a) - 3

ditem.SubItems(6) = a .MoveNext

End With Loop

End Function

Private Sub ListView1_DblClick() On Error Resume Next

If ListView1.ListItems.Count <> 0 Then If rec.State = 1 Then rec.Close

rec.Open "select * from Kendaraan where No_Polisi='" & ListView1.SelectedItem & "'", con, 3, 3

If Not rec.EOF Then

Frm_Cek.Text1 = rec!No_Polisi End If

If rec.State = 1 Then rec.Close

rec.Open "select * from Kendaraan where No_Polisi='" & Frm_Cek.Text1 & "'", con, 3, 3 If Not rec.EOF Then

(25)

Frm_Cek.Text6 = rec!No_Mesn Frm_Cek.Text7 = rec!No_BPKB Frm_Cek.Text8 = rec!An_BPKB Frm_Cek.Text12 = rec!STNK a = rec!Harga_Jual

a = Format(a, "Rp" + " " + "###,##0.00") a.SelStart = Len(a) - 3

Frm_Cek.Text9 = a

Frm_Cek.Text10 = rec!Status Frm_Cek.Text13 = rec!KM

Frm_Cek.Text15 = rec!Keterangan Frm_Cek.Text14 = rec!Posisi_Kendaraan End If

Unload Me Frm_Cek.Show End If

End Sub

Private Sub Text1_Change() On Error Resume Next Text30 = ""

cetak_listview ("Select * from Kendaraan where Merk like '%" & Text1.Text & "%'and Type like '%" & Text2.Text & "%' and Status like '%" & Text3.Text & "%' ")

End Sub

Private Sub Text2_Change() On Error Resume Next Text30 = ""

cetak_listview ("Select * from Kendaraan where Merk like '%" & Text1.Text & "%'and Type like '%" & Text2.Text & "%'and Status like '%" & Text3.Text & "%'")

End Sub

Private Sub Text30_Change() On Error Resume Next Text1 = ""

Text2 = ""

cetak_listview ("Select * from Kendaraan where No_Polisi like '%" & Text30.Text & "%' and Status like '%" & Text3.Text & "%' ")

(26)

3. Dialog Screen Input Leasing

Nama Dialog Screen : Form Input Leasing

Fungsi : Untuk menginput data Leasing pada database

Bentuk :

Private Sub Command1_Click() On Error Resume Next

If Text2 = "" Or Text1 = "" Or Text3 = "" Then MsgBox "Lengkapi data", vbCritical, "Admin" ElseIf Command1.Caption = "&Simpan" Then

con.Execute ("exec Sp_Simpan_Leasing '" & Text5.Text & "', '" & Text1.Text & "','" & Text2.Text & "','" & Text3.Text & "'")

MsgBox "Data telah tersimpan", vbInformation, "Admin" tampil

hapus awal

ElseIf Command1.Caption = "&Perbaharui" Then

con.Execute ("exec Sp_Update_Leasing @Perusahaan='" & Text5.Text & "', @Nama='" & Text1.Text & "',@Alamat='" & Text2.Text & "',@tlp='" & Text3.Text & "', @Id='" & Text4.Text & "'")

MsgBox "Data Telah TerUpdate", vbInformation, "Admin" tampil

hapus

(27)

Label4.Visible = False Text4.Visible = False End If

End Sub

Private Sub Command2_Click() On Error Resume Next Bukakunci Me

If Command2.Value = True Then Command1.Enabled = True Command6.Enabled = False Command3.Enabled = False Command2.Enabled = False Command1.SetFocus End If

End Sub

Private Sub Command3_Click() On Error Resume Next

If MsgBox("Anda yakin menghapus data ini...", vbYesNo, "Admin") = vbYes Then con.Execute ("exec Sp_Hapus_Leasing '" & Text4 & "'")

tampil hapus awal End If End Sub

Private Sub Command4_Click() On Error Resume Next

Command1.Caption = "&Simpan" awal

hapus Kunci Me

Text4.Visible = False Label4.Visible = False DataGrid1.Enabled = True End Sub

Private Sub Command5_Click() On Error Resume Next

If MsgBox("Anda Yakin keluar dari aplikasi ini....", vbYesNo, "admin") = vbYes Then sink Me

(28)

Else

Frm_Leasing.Show End If

End Sub

Private Sub Command6_Click() On Error Resume Next Text4.Visible = False Label4.Visible = False hapus

If Command6.Value = True Then Command6.Enabled = False Command1.Enabled = True Command2.Enabled = False Command3.Enabled = False Command4.Enabled = True Command5.Enabled = False End If

Bukakunci Me Text5.SetFocus

DataGrid1.Enabled = False End Sub

Private Sub DataGrid1_Click() On Error Resume Next

Command1.Caption = "&Perbaharui" aktif

Dim RsPindah2 As New ADODB.Recordset If RsPindah2.State = 1 Then RsPindah2.Close

RsPindah2.Open "select * from Leasing where Id_Leasing = '" & DataGrid1.Columns(0) & "'", con, 3, 2

If RsPindah2.RecordCount > 0 Then With RsPindah2

Text5 = !Nama_Perusahaan Text1 = !Nama_Leasing Text2 = !Alamat

Text3 = !No_Tlp Text4 = !Id_Leasing End With

Kunci Me End If

(29)

Private Sub DataGrid1_DblClick() On Error Resume Next

If Text6 = "" Then Text5.SetFocus Exit Sub End If

Frm_Jual.Show

Frm_Jual.Text7 = DataGrid1.Columns(0) Frm_Jual.Text16 = DataGrid1.Columns(1) Frm_Jual.Text21 = DataGrid1.Columns(2) Frm_Jual.Combo2.SetFocus

Frm_Jual.Text16.Locked = True Frm_Jual.Text21.Locked = True Text6 = ""

Unload Me End Sub

Private Sub DataGrid1_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then If Text6 = "" Then Text5.SetFocus Exit Sub End If

Frm_Jual.Show

Frm_Jual.Text7 = DataGrid1.Columns(0) Frm_Jual.Text16 = DataGrid1.Columns(1) Frm_Jual.Text21 = DataGrid1.Columns(2) Frm_Jual.Combo2.SetFocus

Frm_Jual.Text16.Locked = True Frm_Jual.Text21.Locked = True Text6 = ""

Frm_Leasing.Visible = False End If

End Sub

Private Sub Form_Load() On Error Resume Next BukaDB

Kunci Me awal tampil

(30)

Frm_Leasing.Width = 9045 Frm_Leasing.Height = 8625 Text4.Visible = False Label4.Visible = False Text6 = ""

End Sub Sub tampil()

On Error Resume Next

If rec.State = 1 Then rec.Close

rec.Open ("select Id_Leasing,Nama_Perusahaan,Nama_Leasing,Alamat,No_Tlp from Leasing"), con, 3, 3

Set DataGrid1.DataSource = rec.DataSource End Sub

Sub awal()

On Error Resume Next Command1.Enabled = False Command2.Enabled = False Command3.Enabled = False Command4.Enabled = False Command5.Enabled = True 'Command5.SetFocus Command6.Enabled = True End Sub

Sub aktif()

On Error Resume Next Command1.Enabled = True Command2.Enabled = True Command3.Enabled = True Command4.Enabled = True Command5.Enabled = False Command6.Enabled = False End Sub

Sub hapus()

On Error Resume Next Text1.Text = ""

(31)

Private Sub Text1_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then Text2.SetFocus

End If End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then Text3.SetFocus

End If End Sub

Private Sub Text4_Change() On Error Resume Next

If Text4.Text = "kosong " Then MsgBox "asfasfasf", vbCritical hapus

End If End Sub

Private Sub Text5_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then Text1.SetFocus

(32)

4. Dialog Screen Input Kendaraan

Nama Dialog Screen : Form Input Kendaraan

Fungsi : untuk melakukan penginputan data

kendaraan yang kemudian disimpan dalam database kendaraan

Bentuk :

Private Sub Check1_Click() On Error Resume Next Text12 = ""

Text13 = "" Text14 = ""

If Check1.Value = Unchecked Then tampil6

(33)

Private Sub Combo2_Click()

Text16 = Combo3 + " " + "-" + " " + Combo2 End Sub

Private Sub Combo3_Click()

Text16 = Combo3 + " " + "-" + " " + Combo2 End Sub

Private Sub Command1_Click() On Error Resume Next Bukakunci Me

non_aktif

Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True Text11.Enabled = True Text15.Enabled = True Combo1.Enabled = True Text19.Enabled = True Command7.SetFocus End Sub

Private Sub Command2_Click() On Error Resume Next Bersih Me

Kunci Me

Text12.Locked = False Text13.Locked = False Text14.Locked = False aktif

Command7.Caption = "&Simpan" End Sub

Private Sub Command4_Click() On Error Resume Next

If rec.State = 1 Then rec.Close

(34)

MsgBox "Data Telah Terhapus", vbCritical Bersih Me

Kunci Me

Text12.Locked = False Text13.Locked = False Text14.Locked = False tampil6

aktif End Sub

Private Sub Command6_Click() On Error Resume Next non_aktif

Command7.Enabled = False Text1.Enabled = True Text1.SetFocus Bukakunci Me

DataGrid1.Enabled = True End Sub

Private Sub Command7_Click() On Error Resume Next DataGrid1.Enabled = True If Text19 = "" Then Text19 = "-" End If

If Text2 = "" Or Text1 = "" Or Text3 = "" Or Text4 = "" Or Text5 = "" Or Text6 = "" Or Text7 = "" Or Text8 = "" Or Text9 = "" Or Text10 = "" Or Text16 = "" Or Combo1.Text = "" Then

MsgBox "Lengkapi data", vbCritical, "Admin" Else

con.Execute ("exec sp_Update_Kendaraan @mrk='" & Text2 & "',@Typ='" & Text11 & "',@Th='" & Text3 & "',@Wrn='" & Text4 & "',@NR='" & Text5 & "',@NM='" & Text6 & "',@NB='" & Text7 & "',@AB='" & Text8 & "',@HB='" & Text9 & "',@HJ='" & Text10 & "',@Sts='" & Combo1.Text & "',@BO='" & Text15 & "', @STNK='" & Text16 &

"',@KM='" & Text18 & "',@Ktr='" & Text17 & "',@PK='" & Text19 & "',@NP='" & Text1 & "'")

MsgBox "Data Telah TerUpdate", vbInformation, "Admin" Bersih Me

Kunci Me

(35)

tampil6

Command7.Caption = "&Simpan" aktif

End If

Check1.Value = Unchecked Text12.Text = ""

End Sub

Private Sub Command5_Click() On Error Resume Next

If MsgBox("Anda Yakin Akan Keluar Dari Aplikasi Ini...", vbYesNo, "admin") = vbYes Then

sink Me Unload Me Else

Frm_Kendaraan.Show End If

End Sub

Private Sub DataGrid1_DblClick() On Error Resume Next

(36)

Command7.Enabled = False Command1.SetFocus Text1.Enabled = False Text2.Enabled = False Text3.Enabled = False Text4.Enabled = False Text5.Enabled = False Text6.Enabled = False Text7.Enabled = False Text8.Enabled = False Text9.Enabled = False Text10.Enabled = False Text11.Enabled = False Text15.Enabled = False Text16.Enabled = False Combo1.Enabled = False Text19.Enabled = False End Sub

Private Sub DataGrid1_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then

Text1 = DataGrid1.Columns(0) Text2 = DataGrid1.Columns(1) Text11 = DataGrid1.Columns(2) Text3 = DataGrid1.Columns(3) Text4 = DataGrid1.Columns(4) Text5 = DataGrid1.Columns(5) Text6 = DataGrid1.Columns(6) Text7 = DataGrid1.Columns(7) Text8 = DataGrid1.Columns(8) Text9 = DataGrid1.Columns(9) Text15 = DataGrid1.Columns(10) Text10 = DataGrid1.Columns(11) Combo1.Text = DataGrid1.Columns(12) Command6.Enabled = False

(37)

Command1.SetFocus Text1.Enabled = False Text2.Enabled = False Text3.Enabled = False Text4.Enabled = False Text5.Enabled = False Text6.Enabled = False Text7.Enabled = False Text8.Enabled = False Text9.Enabled = False Text10.Enabled = False Text11.Enabled = False Text16.Enabled = False Combo1.Enabled = False Text19.Enabled = False End If

End Sub

Private Sub Form_Load() On Error Resume Next BukaDB

Kunci Me

Text12.Locked = False Text13.Locked = False Text14.Locked = False aktif

tampil6

Frm_Kendaraan.ScaleWidth = 12315 Frm_Kendaraan.Left = 1300

Frm_Kendaraan.Top = 300 Frm_Kendaraan.Height = 9240 Frm_Kendaraan.Width = 12405 Combo1.Locked = True

For I = 1 To 31 Combo3.AddItem I Next I

(38)

Sub non_aktif()

On Error Resume Next Command7.Enabled = True Command2.Enabled = True Command1.Enabled = False Command4.Enabled = False Command5.Enabled = False End Sub

Sub aktif()

On Error Resume Next Command7.Enabled = False Command2.Enabled = False Command1.Enabled = False Command4.Enabled = False Command5.Enabled = True End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then Text2.SetFocus

End If End Sub

Private Sub Text10_KeyPress(KeyAscii As Integer) On Error Resume Next

Const Number = "0123456789"

If KeyAscii <> 8 And KeyAscii <> 13 Then If InStr(Number, Chr(KeyAscii)) = 0 Then KeyAscii = 0

Exit Sub End If End If

If KeyAscii = 13 Then Text16.SetFocus End If

(39)

Private Sub Text11_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then Text3.SetFocus

End If End Sub

Private Sub Text12_Change() On Error Resume Next Text14 = ""

Check1.Value = Unchecked

Dim rsCari1 As New ADODB.Recordset With rsCari1

If .State = 1 Then .Close .Open "select

No_Polisi,Merk,Type,Tahun,Warna,No_Rangka,no_Mesn,No_BPKB,An_BPKB,STNK,K M,Harga_Beli,Biaya_Operasional,Harga_Jual,Status,Keterangan from Kendaraan where Merk like '%" & Text12.Text & "%' and Type like '%" & Text13.Text & "%'", con, 3, 2 If .RecordCount > 0 Then

Set DataGrid1.DataSource = rsCari1.DataSource End If

End With End Sub

Private Sub tampil7() On Error Resume Next

Dim Rstampil4 As New ADODB.Recordset If Rstampil4.State = 1 Then Rstampil4.Close Rstampil4.Open "Select

No_Polisi,Merk,Type,Tahun,Warna,No_Rangka,no_Mesn,No_BPKB,An_BPKB,Harga_Bel i,Harga_Jual,Status from Kendaraan where Status = '" & "Ada" & "' ", con, 3, 2

Set DataGrid1.DataSource = Rstampil4.DataSource DataGrid1.Refresh

(40)

Private Sub tampil6() On Error Resume Next

Dim Rstampil4 As New ADODB.Recordset If Rstampil4.State = 1 Then Rstampil4.Close Rstampil4.Open "Select

No_Polisi,Merk,Type,Tahun,Warna,No_Rangka,no_Mesn,No_BPKB,An_BPKB,STNK,K M,Harga_Beli,Biaya_Operasional,Harga_Jual,Status,Keterangan from Kendaraan ", con, 3, 2

Set DataGrid1.DataSource = Rstampil4.DataSource DataGrid1.Refresh

End Sub

Private Sub Text13_Change() On Error Resume Next Text14 = ""

Check1.Value = Unchecked

Dim rsCari1 As New ADODB.Recordset With rsCari1

If .State = 1 Then .Close .Open "select

No_Polisi,Merk,Type,Tahun,Warna,No_Rangka,no_Mesn,No_BPKB,An_BPKB,STNK,K M,Harga_Beli,Biaya_Operasional,Harga_Jual,Status,Keterangan from Kendaraan where Merk like '%" & Text12.Text & "%' and Type like '%" & Text13.Text & "%'", con, 3, 2 If .RecordCount > 0 Then

Set DataGrid1.DataSource = rsCari1.DataSource End If

End With End Sub

Private Sub Text14_Change() On Error Resume Next Text12 = ""

Text13 = ""

Check1.Value = Unchecked

Dim rsCari1 As New ADODB.Recordset With rsCari1

If .State = 1 Then .Close .Open "select

No_Polisi,Merk,Type,Tahun,Warna,No_Rangka,no_Mesn,No_BPKB,An_BPKB,STNK,K M,Harga_Beli,Biaya_Operasional,Harga_Jual,Status,Keterangan from Kendaraan where No_Polisi like '%" & Text14.Text & "%' ", con, 3, 2

(41)

Set DataGrid1.DataSource = rsCari1.DataSource End If

End With End Sub

Private Sub Text15_KeyPress(KeyAscii As Integer) On Error Resume Next

Const Number = "0123456789"

If KeyAscii <> 8 And KeyAscii <> 13 Then If InStr(Number, Chr(KeyAscii)) = 0 Then KeyAscii = 0

Exit Sub End If End If

If KeyAscii = 13 Then Text10.SetFocus End If

End Sub

Private Sub Text16_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then Combo1.SetFocus End If

End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then Text11.SetFocus End If

End Sub

Private Sub Text3_KeyPress(KeyAscii As Integer) On Error Resume Next

Const Number = "0123456789"

(42)

KeyAscii = 0 Exit Sub End If End If

If KeyAscii = 13 Then Text4.SetFocus

End If End Sub

Private Sub Text4_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then Text5.SetFocus

Exit Sub End If

If Not (KeyAscii >= Asc("a") & Chr(13) _ And KeyAscii <= Asc("z") & Chr(13) _ Or (KeyAscii >= Asc("A") & Chr(13) _ And KeyAscii <= Asc("Z") & Chr(13) _ Or KeyAscii = vbKeyBack _

Or KeyAscii = vbKeyDelete _ Or KeyAscii = vbKeySpace)) Then Beep

KeyAscii = 0 End If

End Sub

Private Sub Text5_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then Text6.SetFocus

End If End Sub

Private Sub Text6_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then Text7.SetFocus

(43)

Private Sub Text7_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then Text8.SetFocus

End If End Sub

Private Sub Text8_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then Text9.SetFocus

Exit Sub End If

If Not (KeyAscii >= Asc("a") & Chr(13) _ And KeyAscii <= Asc("z") & Chr(13) _ Or (KeyAscii >= Asc("A") & Chr(13) _ And KeyAscii <= Asc("Z") & Chr(13) _ Or KeyAscii = vbKeyBack _

Or KeyAscii = vbKeyDelete _ Or KeyAscii = vbKeySpace)) Then Beep

KeyAscii = 0 End If

End Sub

Private Sub Text9_KeyPress(KeyAscii As Integer) On Error Resume Next

Const Number = "0123456789"

If KeyAscii <> 8 And KeyAscii <> 13 Then If InStr(Number, Chr(KeyAscii)) = 0 Then KeyAscii = 0

Exit Sub End If End If

If KeyAscii = 13 Then Text15.SetFocus End If

(44)

5. Dialog Screen Input Penjualan

Nama Dialog Screen : Form Input Penjualan

Fungsi : untuk melakukan pendataan penjualan

dennga cara melakukan penginputan pada setiap ada transaksi baik Tunai maupun kredit

Bentuk :

Private Sub Check1_Click() On Error Resume Next

If Check1.Value = Checked Then Text22 = "Masuk"

Else

Text22 = "" End If End Sub

Private Sub Combo1_Click() On Error Resume Next Text25 = ""

(45)

Private Sub Combo2_Click() On Error Resume Next Text15.Locked = False Text15.SetFocus Text15.Locked = False Text9.Locked = False Text13.Locked = False Text10.Locked = False Text11.Locked = False Text12.Locked = False Text25 = ""

Text25 = Combo2 + " " + "-" + " " + Combo1 End Sub

Private Sub Command1_Click() 'On Error Resume Next If Text31 = "" Then Text31 = "-" End If

If Text18 = "" Or Text2 = "" Or Text3 = "" Or Text19 = "" Or Text20 = "" Or Text4 = "" Then

MsgBox "lengkapi data penjuaslan", vbCritical, "NS Mobilindo" Exit Sub

Else

If Option3.Value = True And Option1.Value = True Then

con.Execute ("exec Sp_Simpan_Hed_Jual '" & DataGrid1.Columns(0) & "','" & Text2 & "','" & Text3 & "','" & "Tunai" & "','" & "Cash" & "','" & "-" & "'," & "0" & ",'" & "-" & "','" & Text4 & "','" & "-" & "','" & "-" & "','" & "-" & "','" & "-" & "','" & "-" & "','" & "-" & "','" & "-" & "','" & Text28 & "','" & "-" & "','" & "-" & "','" & Text22 & "','" & "0" & "','" & Text31 & "'")

MsgBox "data telah tersimpan"

ElseIf Option3.Value = True And Option2.Value = True Then If Text8 = "" Then

MsgBox "Isi terlebih dahulu keterangan BG/CEK", vbCritical Exit Sub

Text8.SetFocus Else

con.Execute ("exec Sp_Simpan_Hed_Jual '" & DataGrid1.Columns(0) & "','" & Text2 & "','" & Text3 & "','" & "Tunai" & "','" & "BG/CEK" & "','" & Text8.Text & "'," & "0" & ",'" & "-" & "','" & Text4 & "','" & "-" & "','" & "-" & "','" & "-" & "','" & "-" & "','" & "-" & "','" & "-" & "','" & "-" & "','" & Text28 & "','" & "-" & "','" & "-" & "','" & Text22 & "','" & "0" & "','" & Text31 & "'")

(46)

End If

MsgBox "Data transaksi Kredit Belum Lengkap", vbInformation, "NS Mobilindo" Exit Sub

Else

con.Execute ("exec Sp_Simpan_Hed_Jual '" & DataGrid1.Columns(0) & "','" & Text2 & "'," & Text3 & ",'" & "Kredit" & "','" & "Cash" & "','" & "-" & "'," & Text1 & ",'" & Text7 & "','" & Text4 & "','" & Text25.Text & "','" & Text15 & "','" & Text9 & "','" & Text13 & "','" & Text10 & "','" & Text11 & "','" & Text12 & "','" & Text28 & "','" & "Belum" & "','" & "0" & "','" & Text22 & "','" & Text24 & "','" & Text31 & "'")

MsgBox "data telah tersimpan"

MsgBox "Data transaksi Kredit Belum Lengkap", vbInformation, "NS Mobilindo" Exit Sub

con.Execute ("exec Sp_Simpan_Hed_Jual '" & DataGrid1.Columns(0) & "','" & Text2 & "'," & Text3 & ",'" & "Kredit" & "','" & "BG/CEK" & "','" & Text8.Text & "'," & Text1 & ",'" & Text7 & "','" & Text4 & "','" & Text25.Text & "','" & Text15 & "','" & Text9 & "','" & Text13 & "','" & Text10 & "','" & Text11 & "','" & Text12 & "','" & Text28 & "','" &

(47)

tayang cetak2 cetak3 non_aktif

Text18.Locked = True Text30.Locked = False Command7.Enabled = True Command7.SetFocus Command1.Enabled = False Command2.Enabled = False Command4.Enabled = True Command8.Enabled = False DataGrid1.Enabled = False DataGrid1.Refresh

Frame4.Enabled = False ListView1.ListItems.Clear Bersih Me

Text4 = Format(Date, "yyyy" & "-" & "mm" & "-" & "dd") Kunci Me

Text30.Locked = False Text17.Locked = False Text27.Locked = False Check1.Value = Unchecked Check1.Enabled = False Text5 = ""

End Sub Sub tayang()

On Error Resume Next

Dim tayang As New ADODB.Recordset If tayang.State = 1 Then tayang.Close

tayang.Open "select No_Faktur from Hed_Jual WHERE (No_Faktur =(SELECT MAX(no_faktur)FROM Hed_Jual))", con, 3, 2

If Not tayang.EOF Then Text6 = tayang!No_Faktur End If

End Sub

Private Sub Command2_Click() On Error Resume Next

If MsgBox("yakin anda akan membatalkan transaksi ini???", vbYesNo) = vbYes Then Frame2.Visible = False

(48)

Kunci Me Bersih Me

Frame4.Enabled = False Text17.Locked = False Text27.Locked = False Text30.Locked = False Text18.Locked = True non_aktif

Frm_Jual.Option1.Value = False Frm_Jual.Option2.Value = False Frm_Jual.Option3.Value = False Frm_Jual.Option4.Value = False Bersih Me

Text4 = Format(Date, "yyyy" & "-" & "mm" & "-" & "dd") Command7.Enabled = True

Command7.SetFocus Command1.Enabled = False Command2.Enabled = False Command4.Enabled = True Command8.Enabled = False DataGrid1.Enabled = False ListView1.ListItems.Clear

Text4 = Format(Date, "yyyy" & "-" & "mm" & "-" & "dd") Check1.Value = Unchecked

Check1.Enabled = False Else

Command2.SetFocus End If

End Sub

Private Sub Command4_Click() On Error Resume Next

If MsgBox("Yakin Anda Akan Keluar Dari Transaksi Ini??", vbYesNo) = vbYes Then sink Me

Unload Me End If End Sub

Private Sub Command5_Click() On Error Resume Next

Set Rslap2 = New ADODB.Recordset Rslap2.CursorLocation = adUseClient

(49)

Kendaraan.No_BPKB, Kendaraan.An_BPKB, Hed_Jual.Jumlah_Bayar,

Hed_Jual.Kode_Customer, Hed_Jual.Cara_Bayar, Hed_Jual.Jenis_Pembayaran,

Hed_Jual.Ket_BG_CEK, Hed_Jual.Tanggal_Jual, Customer.Nama FROM Hed_Jual INNER JOIN Kendaraan ON Hed_Jual.No_Polisi = Kendaraan.No_Polisi INNER JOIN Customer ON Hed_Jual.Kode_Customer = Customer.Kode_Customer where Hed_Jual.No_Faktur= '" & Text25.Text & "'", con, 3, 2

DataEnvironment1.Commands(1).CommandText = "" Set DataEnvironment1.rsCommand1.DataSource = Rslap2 DataReport1.Show

End Sub

Private Sub Command6_Click() On Error Resume Next Frame2.Visible = False End Sub

Private Sub Command7_Click() On Error Resume Next Combo3.Locked = False Command7.Enabled = False Text18.Locked = False Command1.Enabled = True Command2.Enabled = True Command4.Enabled = False Command8.Enabled = True DataGrid1.Enabled = True DataGrid1.SetFocus

Check1.Value = Unchecked Check1.Enabled = True End Sub

Private Sub Command8_Click() On Error Resume Next If Text18 = "" Then

MsgBox " Pilih Mobil terdahulu untuk melakukan proses berikutnya", vbInformation, "NS Mobilindo"

Else

Form1.Show

Form1.Text11 = "Bisa" End If

(50)

Private Sub Command9_Click() On Error Resume Next Frm_Leasing.Show

Frm_Leasing.Text6 = "Bisa" End Sub

Private Sub DataGrid1_DblClick() On Error Resume Next

Text18 = DataGrid1.Columns(0) Text28 = DataGrid1.Columns(9) Text3.Locked = False

Text18.Locked = True Text28.Locked = False Text2.SetFocus

tampilkenjual End Sub

Private Sub DataGrid1_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then

Text18 = DataGrid1.Columns(0) Text28 = DataGrid1.Columns(9) Text3.Locked = False

Text18.Locked = True Text28.Locked = False Text2.SetFocus

tampilkenjual End If

End Sub

Private Sub DataGrid2_Click() On Error Resume Next

Text25 = DataGrid2.Columns(0) Text24 = DataGrid2.Columns(1) Text23 = DataGrid2.Columns(2) Text22 = DataGrid2.Columns(4) End Sub

Private Sub Form_Activate() On Error Resume Next

(51)

DataGrid1.Columns(4).Locked = True DataGrid1.Columns(5).Locked = True DataGrid1.Columns(6).Locked = True DataGrid1.Columns(7).Locked = True DataGrid1.Columns(8).Locked = True

Text4 = Format(Date, "yyyy" & "-" & "mm" & "-" & "dd") Text3.Enabled = False

Text18.Enabled = False End Sub

Private Sub Form_Load() On Error Resume Next BukaDB

Kunci Me

Text18.Locked = True Text17.Locked = False Text27.Locked = False Text30.Locked = False Option3.Enabled = False Option4.Enabled = False Option1.Enabled = False Option2.Enabled = False Frm_Jual.Left = 1920 Frm_Jual.Top = 300 Frm_Jual.Height = 9375 Frm_Jual.Width = 12375 tampil6

DataGrid1.Enabled = False Check1.Value = Unchecked Check1.Enabled = False Frame4.Enabled = False Command1.Enabled = False Command2.Enabled = False Command4.Enabled = True Command8.Enabled = False Command7.Enabled = True Command7.SetFocus For I = 1 To 12 Combo2.AddItem I Next I

(52)

Private Sub Option1_Click() On Error Resume Next

If Option1.Value = True Then Text8 = ""

Text8.Enabled = False Text20.Text = "Cash"

ElseIf Option2.Value = True Then Text8.Enabled = True

Text20.Text = "CEK" End If

End Sub

Private Sub Option2_Click() On Error Resume Next

If Option2.Value = True Then Text20.Text = "CEK" Text8.Enabled = True Text8.Locked = False Text8.SetFocus

ElseIf Option1.Value = True Then Text8.Enabled = False

Text20.Text = "Cash" End If

End Sub

Private Sub Option3_Click() On Error Resume Next hapus

Text1 = ""

Frame4.Enabled = False Text19.Text = "Tunai" Option1.Enabled = True Option1.Value = False Option2.Enabled = True Option2.Value = False Text8 = ""

Text3.Locked = False Text3 = ""

Option4.Value = False Text31.Locked = False

If Text28 = "" Or Text28 = "0" Then

MsgBox "Isi terlebih dahulu Harga Jadi untuk poroses berikutnya", vbInformation, "NS Mobilindo"

(53)

Text5 = ""

Frame4.Enabled = False Option3.Value = False Else

Text3.Enabled = True Text3.SetFocus Text3 = Val(Text28) Exit Sub

End If

If Option3.Value = True And Option1.Value = True Then Text8.Text = " "

Text8.Locked = True

ElseIf Option3.Value = True And Option2.Value = True Then Text8.Locked = False

Text8.SetFocus End If

End Sub

Private Sub Option4_Click() On Error Resume Next Frame4.Enabled = True Text7.SetFocus

Text19.Text = "Kredit" aktif

Option1.Enabled = True Option1.Value = False Option2.Enabled = True Option2.Value = False Text8 = ""

Text3 = ""

Option3.Value = False Combo1.Locked = False Combo2.Locked = False Text31.Locked = False

If Text28 = "" Or Text28 = "0" Then

MsgBox "Isi terlebih dahulu Harga Jadi untuk proses berikutnya", vbInformation, "NS Mobilindo"

Text28.SetFocus Text15 = ""

Frame4.Enabled = False Option4.Value = False Else

(54)

Exit Sub End If

If Option4.Value = True Then Combo1.Visible = True Combo1.SetFocus Label8.Visible = True Text3 = ""

Text3.Locked = True

ElseIf Option3.Value = True Then Combo1.Visible = False

Label8.Visible = False Text3.Locked = False Text3 = ""

End If End Sub

Private Sub Text10_Change()

Text3 = Val(Text15) + Val(Text9) + Val(Text10) + Val(Text11) + Val(Text12) Text5.Text = Terbilang(Text3) + "Rupiah"

Text1 = Val(Text28) - Val(Text3) End Sub

Private Sub Text10_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then Text11.SetFocus End If

End Sub

Private Sub Text11_Change()

Text3 = Val(Text15) + Val(Text9) + Val(Text10) + Val(Text11) + Val(Text12) Text5.Text = Terbilang(Text3) + "Rupiah"

(55)

Private Sub Text11_KeyPress(KeyAscii As Integer) On Error Resume Next

Const Number = "0123456789"

If KeyAscii <> 8 And KeyAscii <> 13 Then If InStr(Number, Chr(KeyAscii)) = 0 Then KeyAscii = 0

Exit Sub End If End If

If KeyAscii = 13 Then Text12.SetFocus End If

End Sub

Private Sub Text12_Change() On Error Resume Next

Text3 = Val(Text15) + Val(Text9) + Val(Text10) + Val(Text11) + Val(Text12) Text5.Text = Terbilang(Text3) + "Rupiah"

Text1 = Val(Text28) - Val(Text3) End Sub

Private Sub Text12_Click() On Error Resume Next Text12.Locked = False Text12.SetFocus End Sub

Private Sub Text12_KeyPress(KeyAscii As Integer) On Error Resume Next

Const Number = "0123456789"

If KeyAscii <> 8 And KeyAscii <> 13 Then If InStr(Number, Chr(KeyAscii)) = 0 Then KeyAscii = 0

Exit Sub End If End If

If KeyAscii = 13 Then Text3.SetFocus End If

(56)

Private Sub Text13_Click() On Error Resume Next Text13.Locked = False Text13.SetFocus End Sub

Private Sub text13_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then Text24.SetFocus End If

End Sub

Private Sub Text15_Change() On Error Resume Next

Text3 = Val(Text15) + Val(Text9) + Val(Text10) + Val(Text11) + Val(Text12) Text5.Text = Terbilang(Text3) + "Rupiah"

Text1 = Val(Text28) - Val(Text3) End Sub

Private Sub Text15_KeyPress(KeyAscii As Integer) On Error Resume Next

Const Number = "0123456789"

If KeyAscii <> 8 And KeyAscii <> 13 Then If InStr(Number, Chr(KeyAscii)) = 0 Then KeyAscii = 0

Exit Sub End If End If

If KeyAscii = 13 Then Text9.SetFocus End If

End Sub

Private Sub Text15_LostFocus() On Error Resume Next

(57)

Private Sub Text17_Change() On Error Resume Next Text30 = ""

Dim rsCari1 As New ADODB.Recordset With rsCari1

If .State = 1 Then .Close .Open "select

No_Polisi,Merk,Type,Tahun,Warna,No_Rangka,no_Mesn,No_BPKB,An_BPKB,Harga_Jua l,Status from Kendaraan where Merk like '%" & Text17.Text & "%'and Type like '%" & Text27.Text & "%'and Status = 'Ada'", con, 3, 2

If .RecordCount > 0 Then

Set DataGrid1.DataSource = rsCari1.DataSource End If

End With End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then If Text18 = "" Then

MsgBox " Pilih Mobil terdahulu untuk melakukan proses berikutnya", vbInformation, "NS Mobilindo"

Else

Form1.Show

Form1.Text11 = "Bisa" End If

End If End Sub

Private Sub Text24_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then Text10.SetFocus End If

End Sub

(58)

Dim rsCari1 As New ADODB.Recordset With rsCari1

If .State = 1 Then .Close .Open "select

No_Polisi,Merk,Type,Tahun,Warna,No_Rangka,no_Mesn,No_BPKB,An_BPKB,Harga_Jua l,Status from Kendaraan where Merk like '%" & Text17.Text & "%'and Type like '%" & Text27.Text & "%'and Status = 'Ada'", con, 3, 2

If .RecordCount > 0 Then

Set DataGrid1.DataSource = rsCari1.DataSource End If

End With End Sub

Private Sub Text28_KeyPress(KeyAscii As Integer) On Error Resume Next

If Not (KeyAscii >= Asc("0") & Chr(13) And KeyAscii <= Asc(9) & Chr(13) Or KeyAscii = vbKeyBack Or KeyAscii = vbKeyDelete Or KeyAscii = vbKeySpace) Then

Beep

KeyAscii = 0 End If

End Sub

Private Sub Text3_KeyPress(KeyAscii As Integer) On Error Resume Next

Const Number = "0123456789"

If KeyAscii <> 8 And KeyAscii <> 13 Then If InStr(Number, Chr(KeyAscii)) = 0 Then KeyAscii = 0

Exit Sub End If End If

If KeyAscii = 13 Then If Text3 = "" Then

Text5.Text = Terbilang(0) + "Rupiah" Else

Text5.Text = Terbilang(Text3) + "Rupiah" DataGrid1.Columns(8) = Text3

(59)

Private Sub Text30_Change() On Error Resume Next Text27 = ""

Text17 = ""

Dim rsCari1 As New ADODB.Recordset With rsCari1

If .State = 1 Then .Close .Open "select

No_Polisi,Merk,Type,Tahun,Warna,No_Rangka,no_Mesn,No_BPKB,An_BPKB,Harga_Jua l,Status from Kendaraan where No_Polisi like '%" & Text30.Text & "%'and Status = 'Ada'", con, 3, 2

If .RecordCount > 0 Then

Set DataGrid1.DataSource = rsCari1.DataSource End If

End With End Sub

Private Sub Text6_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then

Text5.Text = Terbilang(Text3) + "Rupiah" End If

End Sub

Private Sub Text3_Change() On Error Resume Next If Text3 = "" Then

Text5.Text = Terbilang(0) + "Rupiah" Else

Text5.Text = Terbilang(Text3) + "Rupiah" End If

End Sub

Private Sub Text7_KeyPress(KeyAscii As Integer) On Error Resume Next

If KeyAscii = 13 Then Frm_Leasing.Show

Frm_Leasing.Text6 = "Bisa" End If

(60)

Private Sub Text9_Change() On Error Resume Next

Text3 = Val(Text15) + Val(Text9) + Val(Text10) + Val(Text11) + Val(Text12) Text5.Text = Terbilang(Text3) + "Rupiah"

Text1 = Val(Text28) - Val(Text3) End Sub

Private Sub Text9_KeyPress(KeyAscii As Integer) On Error Resume Next

Const Number = "0123456789"

If KeyAscii <> 8 And KeyAscii <> 13 Then If InStr(Number, Chr(KeyAscii)) = 0 Then KeyAscii = 0

Exit Sub End If End If

If KeyAscii = 13 Then Text13.SetFocus End If

End Sub

Private Sub tampil6() On Error Resume Next

Dim Rstampil4 As New ADODB.Recordset If Rstampil4.State = 1 Then Rstampil4.Close Rstampil4.Open "Select

No_Polisi,Merk,Type,Tahun,Warna,No_Rangka,no_Mesn,No_BPKB,An_BPKB,Harga_Jua l,Status from Kendaraan where Status = 'Ada' ", con, 3, 2

Set DataGrid1.DataSource = Rstampil4.DataSource DataGrid1.Refresh

(61)

Sub aktif()

Combo2.Locked = False Combo1.Locked = False Text15.Locked = False Text9.Locked = False Text13.Locked = False Text24.Locked = False Text10.Locked = False Text11.Locked = False Text12.Locked = False End Sub

Sub hapus()

On Error Resume Next Text24 = ""

Text7 = "" Text1 = "" Text15 = "" Text9 = "" Text13 = "" Text16 = "" Text10 = "" Text11 = "" Text12 = "" Text21 = "" Combo2.Text = "" Combo1.Text = "" End Sub

Sub non_aktif()

(62)

Sub tampilkenjual() On Error Resume Next ListView1.ListItems.Clear

With ListView1.ListItems.add(, , Me.DataGrid1.Columns(0)) Call .ListSubItems.add(, , Me.DataGrid1.Columns(1)) Call .ListSubItems.add(, , Me.DataGrid1.Columns(2)) Call .ListSubItems.add(, , Me.DataGrid1.Columns(3)) Call .ListSubItems.add(, , Me.DataGrid1.Columns(4)) Call .ListSubItems.add(, , Me.DataGrid1.Columns(5)) Call .ListSubItems.add(, , Me.DataGrid1.Columns(6)) Call .ListSubItems.add(, , Me.DataGrid1.Columns(7)) Call .ListSubItems.add(, , Me.DataGrid1.Columns(8)) End With

End Sub Sub cetak2()

On Error Resume Next Dim I As Integer

'***** cetak detail ***** If isprinted = True Then Exel.Application.Quit End If

Screen.MousePointer = vbHourglass Exel.DisplayAlerts = False

Exel.Application.Visible = True

Exel.Workbooks.Open App.Path & "\FakPenjualan.xls" Exel.Cells(1, 1).Value = "CV.NS mobilindo"

Exel.Cells(2, 1).Value = "Jl. Ibu Inggit Garnasih (Ciateul) No. 88, Telp (022) 5202079, 5209880 Bandung 40252"

Exel.Cells(3, 1).Value = "Jual Beli - Tukar Tambah - Cash & Kredit Mobil Bekas & Baru" Exel.Cells(4, 2).Value = Text6.Text

Exel.Cells(5, 2).Value = Text26.Text Exel.Cells(6, 2).Value = Text5.Text Exel.Cells(22, 1).Value = Text26.Text

Exel.Cells(13, 2).Value = "Rp" + " " + Text3.Text Exel.Cells(14, 2).Value = Text19.Text

Exel.Cells(15, 2).Value = Text20.Text + " " + "-" + " " + Text8.Text Exel.Cells(16, 2).Value = Text31

(63)

For I = 1 To ListView1.ListItems.Count

Exel.Cells(10, 2).Value = ListView1.ListItems(I).Text 'No Polisi Exel.Cells(8, 2).Value = ListView1.ListItems(I).ListSubItems(1) + "-" + ListView1.ListItems(I).ListSubItems(2) 'merk

Exel.Cells(9, 2).Value = ListView1.ListItems(I).ListSubItems(3) 'Tahun Exel.Cells(11, 2).Value = ListView1.ListItems(I).ListSubItems(4) 'Warna Exel.Cells(8, 6).Value = ListView1.ListItems(I).ListSubItems(5) 'No rangka Exel.Cells(9, 6).Value = ListView1.ListItems(I).ListSubItems(6) 'No Mesin Exel.Cells(10, 6).Value = ListView1.ListItems(I).ListSubItems(7) 'No BPKB Exel.Cells(11, 6).Value = ListView1.ListItems(I).ListSubItems(8) 'An BPKB

Next I

Exel.ActiveWorkbook.PrintPreview Screen.MousePointer = Me.MousePointer End Sub

Sub cetak3()

On Error Resume Next Dim I As Integer

'***** cetak detail ***** If isprinted = True Then Exel.Application.Quit End If

Screen.MousePointer = vbHourglass Exel.DisplayAlerts = False

Exel.Application.Visible = True

Exel.Workbooks.Open App.Path & "\PenjualanBPB.xls" Exel.Cells(1, 1).Value = "CV.NS mobilindo"

Exel.Cells(2, 1).Value = "Jl. Ibu Inggit Garnasih (Ciateul) No. 88, Telp (022) 5202079, 5209880 Bandung 40252"

Exel.Cells(3, 1).Value = "Jual Beli - Tukar Tambah - Cash & Kredit Mobil Bekas & Baru" Exel.Cells(6, 1).Value = "Yth" + " " + Text26.Text

Exel.Cells(7, 1).Value = "Alamat :" + " " + Text29.Text + " " + " / " + "Tlpn :" + " " + Text23

Exel.Cells(24, 1).Value = Text26.Text

(64)

Exel.Cells(11, 2).Value = ListView1.ListItems(I).Text 'No Polisi Exel.Cells(9, 2).Value = ListView1.ListItems(I).ListSubItems(1) + "-" + ListView1.ListItems(I).ListSubItems(2) 'merk

Exel.Cells(10, 2).Value = ListView1.ListItems(I).ListSubItems(3) 'Tahun Exel.Cells(12, 2).Value = ListView1.ListItems(I).ListSubItems(4) 'Warna Exel.Cells(9, 6).Value = ListView1.ListItems(I).ListSubItems(5) 'No rangka Exel.Cells(10, 6).Value = ListView1.ListItems(I).ListSubItems(6) 'No Mesin Exel.Cells(11, 6).Value = ListView1.ListItems(I).ListSubItems(7) 'No BPKB Exel.Cells(12, 6).Value = ListView1.ListItems(I).ListSubItems(8) 'An BPKB

Next I

(65)

6. Dialog Screen Pembayaran Leasing

Nama Dialog Screen : Form Bayar Leasing

Fungsi : Untuk melakukan pembayaran kepada

leasing dengan data penjualan yang sebelumnya telah diinput

Bentuk :

Private Sub Check1_Click()

If Check1.Value = Checked Then Check2.Value = Unchecked bayar

Text22 = ""

Text22.Visible = True Text21.Visible = False Else

(66)

Private Sub Check2_Click()

If Check2.Value = Checked Then Check1.Value = Unchecked Belum

Text21 = ""

Text21.Visible = True Text22.Visible = False Else

tampil2 End If End Sub

Private Sub Command1_Click() On Error Resume Next

If Text4 = "" Or Text8 = "" Then MsgBox ("Lengakapi data"), vbCritical Else

'con.Execute ("Update Hed_Jual set No_Polisi='" & Text2 & "' ,Nama_Pembeli='" & Text3 & "' ,Jumlah_Bayar= '" & Text4 & "' ,Jenis_Pembayaran= '" & Text5 & "' ,Cara_Bayar= '" & Text6 & "' ,Ket_BG_CEK= '" & Text7 & "' ,Sisa_Bayar= '" & Text8 & "' ,Id_Leasing= '" & Text9 & "',Tanggal_Jual= '" & Text10 & "' where No_Faktur= '" & Text1 & "'")

con.Execute ("Update Hed_Jual set Jumlah_Bayar= '" & Text4 & "' ,Sisa_Bayar= '" & Text8 & "',Uang_Muka= '" & Text12 & "',Angsuran_Pertama= '" & Text13 &

"',Harga_Jadi='" & Text11 & "',Biaya_ADM='" & Text15 & "',Biaya_Provisi='" & Text16 & "',Perusahaan_Asuransi='" & Text23 & "' where No_Faktur= '" & Text1 & "'")

MsgBox "Data Telah Berhasil Dirubah" Bersih Me

Text18 = Format(Date) tampil2

Command1.Enabled = False Command3.Enabled = False Command4.Enabled = False Command5.Enabled = True DataGrid1.SetFocus

'Kunci Me End If End Sub

Private Sub Command2_Click() cetak2

End Sub

Gambar

Gambar Struktur Menu .........................................................

Referensi

Dokumen terkait

Hal ini menunjukkan bahwa dengan menggunakan bahan ajar berbasis game edukasi yang telah dikembangakan dapat mempengaruhi hasil belajar siswa serta sudah dianggap

Penelitian ini dilakukan untuk mengetahui pengaruh media pop up terhadap hasil belajar siswa pada mata pelajaran matematika materi volume kubus dan balok kelas

Beberapa saran yang dapat diajukan peneliti untuk mengoptimalkan pemanfaatan model project based learning berbantuan media virtual yaitu: (1) kemampuan awal hendaknya

Penelitian ini juga dapat sebagai masukan para praktisi lapangan karena adanya daftar nilai korelasi antara CBR rendaman dengan parameter fisis tanah

Yang bertanda tangan di bawah ini saya SONYA MAHANANI, menyatakan bahwa skipsi dengan judul : “Analisis Pengaruh Kualitas Pelayanan Terhadap Kepuasan Pelanggan

PenelitianRamlugun (2016) menjelaskan adanya hubungan antara pendidikan terhadap penerapan akuntansi rumah tangga, hal ini dikarenakan dengan tingkat pendidikan yang

Agar sistem manometer digital bekerja dengan akurat dan terkendali, maka di dalam komputer PC digunakan software pengendali DA (Data Acquisition) yang dikembangkan

Pendapatan dan Belanja Daerah dan Rancangan Peraturan Kepala Daerah tentang Penjabaran Anggaran Pendapatan dan Belanja Daerah sebagaimana telah diubah dengan Peraturan Menteri