Perpustakaan Unika
GAMBAR IV.21 – FORM LOGIN
Perpustakaan Unika
LAMPIRAN 1 – KODE FORM LOGIN Private Sub cmdcancel_Click() End Sub Private Sub cmdexit_Click() End End Sub Private Sub cmdlogin_Click() If password.Text = "THANIA" Then formmenu.Show Unload Me Else perhatian = MsgBox("Password Salah!", vbCritical + vbOKOnly, "Warning!") password.Text = "" password.SetFocus End If End Sub Private Sub cmdok_Click() End Sub
Perpustakaan Unika
GAMBAR IV.22 – FORM MENU
Perpustakaan Unika
LAMPIRAN 2 – KODE FORM MENU Private Sub customer_Click() formdtcust.Show End Sub Private Sub formulir_Click() formdtpesanan.Show End Sub Private Sub inventory_Click() formdtinventory.Show End Sub Private Sub keluar_Click() End End Sub Private Sub pakaiinventory_Click() formpakaiinventory.Show End Sub Private Sub pegawai_Click() formdtpegawai.Show End Sub Private Sub stmakanan_Click() formstandarisasimakanan.Show End Sub
Perpustakaan Unika
GAMBAR IV.23 – FORM DATA CUSTOMER
GAMBAR IV.24 – FORM EXCEL DATA CUSTOMER Katering IDA Jl. Agung VII - 3 Gajah Mungkur, Candi baru, Semarang - 50232 ( 024-8316637 - 8414625 Fax. 8447575 No Customer 001
Nama Customer Freska
Alamat Jl. Pamularsih
Kota Semarang
No Telepon 078963432
Perpustakaan Unika
LAMPIRAN 3 – KODE FORM DATA CUSTOMER Sub Cari() On Error Resume Next koneksi.RecordSource = "select * from dtcustomer where nama='" & txtcari.Text & "'" koneksi.Refresh 'jika ada maka If koneksi.Recordset.RecordCount > 0 Then txtnrc.Text = koneksi.Recordset("nrc") txtnama.Text = koneksi.Recordset("nama") txtalamat.Text = koneksi.Recordset("alamat") txtkota.Text = koneksi.Recordset("kota") txtnotelp.Text = koneksi.Recordset("notelp") Else perhatian = MsgBox("Nama Customer Belum Ada !", vbInformation + vbOKOnly, "Informasi !") End If txtcari.Text = "" End Sub Sub bersih() txtnrc.Text = "" txtnama.Text = "" txtalamat.Text = "" txtkota.Text = "" txtnotelp.Text = "" End Sub Sub tampilan() tampil.RecordSource = "select * from dtcustomer" tampil.Refresh End Sub Private Sub cmdcari_Click() Cari End Sub Private Sub cmdcetak_Click() 'membuat aplikasi excell Set excel_app = CreateObject("Excel.Application") ' memperlihatkan excell excel_app.Visible = True ' membuka file excell excel_app.Workbooks.Open FileName:=App.Path & "\ctkdtcustomer.xls"
Perpustakaan Unika
' cek versi excell If Val(excel_app.Application.Version) >= 8 Then Set excel_sheet = excel_app.ActiveSheet Else Set excel_sheet = excel_app End If 'membuka database koneksi.RecordSource = "select * from dtcustomer" koneksi.Refresh 'Column judul excel_sheet.Cells(5, 1) = "No Customer" excel_sheet.Cells(5, 2) = "Nama Customer" excel_sheet.Cells(5, 3) = "Alamat" excel_sheet.Cells(5, 4) = "Kota" excel_sheet.Cells(5, 5) = "No Telepon" 'isi data ke excel i=6 While Not koneksi.Recordset.EOF excel_sheet.Cells(i, 1) = koneksi.Recordset("nrc") excel_sheet.Cells(i, 2) = koneksi.Recordset("nama") excel_sheet.Cells(i, 3) = koneksi.Recordset("alamat") excel_sheet.Cells(i, 4) = koneksi.Recordset("kota") excel_sheet.Cells(i, 5) = koneksi.Recordset("notelp") i=i+1 koneksi.Recordset.MoveNext Wend 'membuat font judul tebal excel_sheet.Rows(1).Font.Bold = True 'besar columns sesuai panjang data koneksi.Recordset.Close End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdhapus_Click() tampil.RecordSource = "select * from dtcustomer"
Perpustakaan Unika
tampil.Recordset.Delete tampil.Refresh tampilan End Sub Private Sub cmdsimpan_Click() koneksi.RecordSource = "select * from dtcustomer" koneksi.Refresh koneksi.Recordset.AddNew koneksi.Recordset("nrc") = txtnrc.Text koneksi.Recordset("nama") = txtnama.Text koneksi.Recordset("alamat") = txtalamat.Text koneksi.Recordset("kota") = txtkota.Text koneksi.Recordset("notelp") = txtnotelp.Text koneksi.Recordset.Update koneksi.Recordset.Close koneksi.Refresh bersih tampilan End Sub Private Sub Form_Activate() tampilan End Sub Private Sub Form_Load() koneksi.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\IDA.mdb" tampil.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\IDA.mdb" End Sub Private Sub keluar_Click() End Sub
Perpustakaan Unika
GAMBAR IV.25 – FORM DATA PEGAWAI
GAMBAR IV. 26 – FORM EXCEL DATA PEGAWAI Katering IDA Jl. Agung VII - 3 Gajah Mungkur, Candi baru, Semarang - 50232 ( 024-8316637 - 8414625 Fax. 8447575 No Pegawai 001
Nama Pegawai Freska
Alamat Jl. Pamularsih
Jabatan Semarang
Gaji Pokok 78963432
Perpustakaan Unika
LAMPIRAN 4 – KODE FORM DATA PEGAWAI Sub Cari() On Error Resume Next koneksi.RecordSource = "select * from dtpegawai where nama='" & txtcari.Text & "'" koneksi.Refresh 'jika ada maka If koneksi.Recordset.RecordCount > 0 Then txtnrp.Text = koneksi.Recordset("nrp") txtnama.Text = koneksi.Recordset("nama") txtalamat.Text = koneksi.Recordset("alamat") txtjabatan.Text = koneksi.Recordset("jabatan") txtgp.Text = koneksi.Recordset("gp") Else perhatian = MsgBox("Nama Pegawai Belum Ada !", vbInformation + vbOKOnly, "Informasi !") End If txtcari.Text = "" End Sub Sub bersih() txtnrp.Text = "" txtnama.Text = "" txtalamat.Text = "" txtjabatan.Text = "" txtgp.Text = "" End Sub Sub tampilan() tampil.RecordSource = "select * from dtpegawai" tampil.Refresh End Sub Private Sub cmdcari_Click() Cari End Sub Private Sub cmdcetak_Click() 'membuat aplikasi excell Set excel_app = CreateObject("Excel.Application") ' memperlihatkan excell excel_app.Visible = True ' membuka file excell excel_app.Workbooks.Open FileName:=App.Path & "\ctkdtpegawai.xls"
Perpustakaan Unika
' cek versi excell If Val(excel_app.Application.Version) >= 8 Then Set excel_sheet = excel_app.ActiveSheet Else Set excel_sheet = excel_app End If 'membuka database koneksi.RecordSource = "select * from dtpegawai" koneksi.Refresh 'Column judul excel_sheet.Cells(5, 1) = "No Pegawai" excel_sheet.Cells(5, 2) = "Nama Pegawai" excel_sheet.Cells(5, 3) = "Alamat" excel_sheet.Cells(5, 4) = "Jabatan" excel_sheet.Cells(5, 5) = "Gaji Pokok" 'isi data ke excel i=6 While Not koneksi.Recordset.EOF excel_sheet.Cells(i, 1) = koneksi.Recordset("nrp") excel_sheet.Cells(i, 2) = koneksi.Recordset("nama") excel_sheet.Cells(i, 3) = koneksi.Recordset("alamat") excel_sheet.Cells(i, 4) = koneksi.Recordset("jabatan") excel_sheet.Cells(i, 5) = koneksi.Recordset("gp") i=i+1 koneksi.Recordset.MoveNext Wend 'membuat font judul tebal excel_sheet.Rows(1).Font.Bold = True koneksi.Recordset.Close End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdhapus_Click() tampil.RecordSource = "select * from dtpegawai" tampil.Recordset.Delete
Perpustakaan Unika
tampil.Refresh tampilan End Sub Private Sub cmdsimpan_Click() koneksi.RecordSource = "select * from dtpegawai" koneksi.Refresh koneksi.Recordset.AddNew koneksi.Recordset("nrp") = txtnrp.Text koneksi.Recordset("nama") = txtnama.Text koneksi.Recordset("alamat") = txtalamat.Text koneksi.Recordset("jabatan") = txtjabatan.Text koneksi.Recordset("gp") = txtgp.Text koneksi.Recordset.Update koneksi.Recordset.Close koneksi.Refresh bersih tampilan End Sub Private Sub Form_Activate() tampilan End Sub Private Sub Form_Load() koneksi.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\IDA.mdb" tampil.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\IDA.mdb" End Sub
Perpustakaan Unika
GAMBAR IV.27 – FORM DATA INVENTORY
GAMBAR IV.28 – FORM EXCEL DATA INVENTORY Katering IDA Jl. Agung VII - 3 Gajah Mungkur, Candi baru, Semarang - 50232 ( 024-8316637 - 8414625 Fax. 8447575 Kode Barang B01 B02
Kode Bahan Baku BRS GL
Jumlah Barang Awal
100 200
Jumlah Barang Akhir
100 200
Tanggal Pembelian Barang
38995 38995
Tanggal Pembelian Bahan Baku 38995 38995
Perpustakaan Unika
LAMPIRAN 5 – KODE FORM DATA INVENTORY Sub Cari() On Error Resume Next koneksi.RecordSource = "select * from dtinventory where kodebarang=' "& txtcari.Text & "'" koneksi.Refresh 'jika ada maka If koneksi.Recordset.RecordCount > 0 Then txtkdbarang.Text = koneksi.Recordset("kodebarang") txtkdbaku.Text = koneksi.Recordset("kodebahanbaku") txtjmlbrgawal.Text = koneksi.Recordset("jmlawal") txtjmlbrgakhir.Text = koneksi.Recordset("jmlakhir") tglblbrg.Value = koneksi.Recordset("tglbelibarang") tglblbaku.Value = koneksi.Recordset("tglbelibahan") Else perhatian = MsgBox("Kode Barang Belum Ada !", vbInformation + vbOKOnly, "Informasi !") End If txtcari.Text = "" End Sub Sub bersih() txtkdbarang.Text = "" txtkdbaku.Text = "" txtket.Text = "" txtjmlbrgawal.Text = "" txtjmlbrgakhir.Text = "" End Sub Sub tampilan() tampil.RecordSource = "select * from dtinventory" tampil.Refresh End Sub Private Sub cmdcari_Click() Cari End Sub Private Sub cmdcetak_Click() 'membuat aplikasi excell Set excel_app = CreateObject("Excel.Application") ' memperlihatkan excell excel_app.Visible = True ' membuka file excell
Perpustakaan Unika
excel_app.Workbooks.Open FileName:=App.Path & "\ctkdtinventory.xls" ' cek versi excell If Val(excel_app.Application.Version) >= 8 Then Set excel_sheet = excel_app.ActiveSheet Else Set excel_sheet = excel_app End If 'membuka database koneksi.RecordSource = "select * from dtinventory" koneksi.Refresh 'Column judul excel_sheet.Cells(5, 1) = "Kode Barang" excel_sheet.Cells(5, 2) = "Kode Bahan Baku" excel_sheet.Cells(5, 3) = "Jumlah Barang Awal" excel_sheet.Cells(5, 4) = "Jumlah Barang Akhir" excel_sheet.Cells(5, 5) = "Tanggal Pembelian Barang" excel_sheet.Cells(5, 6) = "Tanggal Pembelian Bahan Baku" 'isi data ke exc el i=6 While Not koneksi.Recordset.EOF excel_sheet.Cells(i, 1) = koneksi.Recordset("kodebarang") excel_sheet.Cells(i, 2) = koneksi.Recordset("kodebahanbaku") excel_sheet.Cells(i, 3) = koneksi.Recordset("jmlawal") excel_sheet.Cells(i, 4) = koneksi.Recordset("jmlakhir") excel_sheet.Cells(i, 5) = koneksi.Recordset("tglbelibarang") excel_sheet.Cells(i, 6) = koneksi.Recordset("tglbelibahan") i=i+1 koneksi.Recordset.MoveNext Wend ' membuat font judul tebal excel_sheet.Rows(1).Font.Bold = True 'besar columns sesuai panjang data excel_sheet.Range(excel_sheet.Cells(1, 1), excel_sheet.Cells(i, 7)).Select excel_app.Selection.Columns.AutoFit koneksi.Recordset.Close End Sub Private Sub cmdexit_Click() Unload Me End Sub
Perpustakaan Unika
Private Sub cmdhapus_Click() tampil.RecordSource = "select * from dtinventory" tampil.Recordset.Delete tampil.Refresh tampilan End Sub Private Sub cmdsimpan_Click() koneksi.RecordSource = "select * from dtinventory" koneksi.Refresh koneksi.Recordset.AddNew koneksi.Recordset("kodebarang") = txtkdbarang.Text koneksi.Recordset("kodebahanbaku") = txtkdbaku.Text koneksi.Recordset("keterangan") = txtket.Text koneksi.Recordset("jmlawal") = txtjmlbrgawal.Text koneksi.Recordset("jmlakhir") = txtjmlbrgakhir.Text koneksi.Recordset("tglbelibarang") = tglblbrg.Value koneksi.Recordset("tglbelibahan") = tglblbaku.Value koneksi.Recordset.Update koneksi.Recordset.Close koneksi.Refresh bersih tampilan End Sub Private Sub Form_Activate() tampilan End Sub Private Sub Form_Load() koneksi.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\IDA.mdb" tampil.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\IDA.mdb" End Sub
Perpustakaan Unika
GAMBAR IV.29 – FORM STANDARISASI MAKANAN
GAMBAR IV.30 – FORM EXCEL STANDARISASI MAKANAN Katering IDA Jl. Agung VII - 3 Gajah Mungkur, Candi baru, Semarang - 50232 ( 024-8316637 - 8414625 Fax. 8447575 Kode Menu M01 M02
Nama Menu Nasi Putih Wedang Jahe
Kode Bahan Baku BRS GL
Harga Bruto 5000 3000
Tax 3 5
Harga Netto 5150 3150
Perpustakaan Unika
LAMPIRAN 6 – KODE FORM DATA STANDARISASI MAKANAN Sub Cari() On Error Resume Next koneksi.RecordSource = "select * from dtstmakanan where kodemenu='" & txtcari.Text & "'" koneksi.Refresh 'jika ada maka If koneksi.Recordset.RecordCount > 0 Then txtkdmenu.Text = koneksi.Recordset("kodemenu") txtnamamenu.Text = koneksi.Recordset("namamenu") cbokdbaku.Text = koneksi.Recordset("kodebahanbaku") txtbruto.Text = koneksi.Recordset("hrgbruto") txttax.Text = koneksi.Recordset("tax") txtnetto.Text = koneksi.Recordset("hrgnetto") Else perhatian = MsgBox("Kode Menu Belum Ada !", vbInformation + vbOKOnly, "Informasi !") End If txtcari.Text = "" End Sub Sub bersih() txtkdmenu.Text = "" txtnamamenu.Text = "" cbokdbaku.Text = "" txtbruto.Text = "" txttax.Text = "" txtnetto.Text = "" txtket.Text = "" End Sub Sub tampilan() tampil.RecordSource = "select * from dtstmakanan" tampil.Refresh End Sub Private Sub cbokdbaku_Click() koneksi.RecordSource = "select * from dtinventory where kodebahanbaku='" & Trim(cbokdbaku.Text) & "'" koneksi.Refresh txtket.Text = koneksi.Recordset("keterangan") End Sub Private Sub cmdcari_Click() Cari
Perpustakaan Unika
End Sub Private Sub cmdcetak_Click() 'membuat aplikasi excell Set excel_app = CreateObject("Excel.Application") ' memperlihatkan ex cell excel_app.Visible = True ' membuka file excell excel_app.Workbooks.Open FileName:=App.Path & "\ctkstmakanan.xls" ' cek versi excell If Val(excel_app.Application.Version) >= 8 Then Set excel_sheet = excel_app.ActiveSheet Else Set excel_sheet = excel_app End If 'membuka database koneksi.RecordSource = "select * from dtstmakanan" koneksi.Refresh 'Column judul excel_sheet.Cells(5, 1) = "Kode Menu" excel_sheet.Cells(5, 2) = "Nama Menu" excel_sheet.Cells(5, 3) = "Kode Bahan Baku" excel_sheet.Cells(5, 4) = "Harga Bruto" excel_sheet.Cells(5, 5) = "Tax" excel_sheet.Cells(5, 6) = "Harga Netto" 'isi data ke excel i=6 While Not koneksi.Recordset.EOF excel_sheet.Cells(i, 1) = koneksi.Recordset("kodemenu") excel_sheet.Cells(i, 2) = koneksi.Recordset("namamenu") excel_sheet.Cells(i, 3) = koneksi.Recordset("kodebahanbaku") excel_sheet.Cells(i, 4) = koneksi.Recordset("hrgbruto") excel_sheet.Cells(i, 5) = koneksi.Recordset("tax") excel_sheet.Cells(i, 6) = koneksi.Recordset("hrgnetto") i=i+1 koneksi.Recordset.MoveNext Wend 'membuat font judul tebal excel_sheet.Rows(1).Font.Bold = True
Perpustakaan Unika
koneksi.Recordset.Close End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdhapus_Click() tampil.RecordSource = "select * from dtstmakanan" tampil.Recordset.Delete tampil.Refresh tampilan End Sub Private Sub cmdsimpan_Click() koneksi.RecordSource = "select * from dtstmakanan" koneksi.Refresh koneksi.Recordset.AddNew koneksi.Recordset("kodemenu") = txtkdmenu.Text koneksi.Recordset("namamenu") = txtnamamenu.Text koneksi.Recordset("kodebahanbaku") = cbokdbaku.Text koneksi.Recordset("hrgbruto") = txtbruto.Text koneksi.Recordset("tax") = txttax.Text koneksi.Recordset("hrgnetto") = txtnetto.Text koneksi.Recordset.Update koneksi.Recordset.Close koneksi.Refresh bersih tampilan End Sub Private Sub Form_Activate() tampilan End Sub Private Sub Form_Load() koneksi.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\IDA.mdb" tampil.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\IDA.mdb" With cbokdbaku koneksi.RecordSource = "select * from dtinventory" koneksi.Refresh While Not koneksi.Recordset.EOF .AddItem (koneksi.Recordset("kodebahanbaku")) koneksi.Recordset.MoveNext
Perpustakaan Unika
Wend End With End Sub Private Sub txtnetto_GotFocus() tax = (txttax.Text / 100) * txtbruto.Text txtnetto.Text = Val(txtbruto.Text) + Val(tax) End Sub
Perpustakaan Unika
GAMBAR IV.31 – FORM DATA PEMAKAIAN INVENTORY
GAMBAR IV.32 – FORM EXCEL DATA PEMAKAIAN INVENTORY Katering IDA Jl. Agung VII - 3 Gajah Mungkur, Candi baru, Semarang - 50232 ( 024-8316637 - 8414625 Fax. 8447575 Nama Customer Freska
Alamat Jl. Pamularsih
Jenis Pesanan Prasmanan
Tanggal Acara 38995
Tempat Acara
Biaya
Nama Pegawai
Jl. Mugas
1345000
Freska
Perpustakaan Unika
LAMPIRAN 7 – KODE FORM DATA PEMAKAIAN INVENTORY Sub bersih() cbokdcust.Text = "" txtnama.Text = "" txtalamat.Text = "" txtnotelp.Text = "" cbonrp.Text = "" cbokdpesanan.Text = "" txtjenispesanan.Text = "" txttempatacara.Text = "" txtbiaya.Text = "" cbokdbarang.Text = "" txtketbarang.Text = "" cbokdbaku.Text = "" txtketbaku.Text = "" End Sub Sub tampilan() tampil.RecordSource = "select * from dtpakaiinventory" tampil.Refresh End Sub Private Sub cbokdbaku_Click() koneksi.RecordSource = "select * from dtinventory where kodebahanbaku='" & Trim(cbokdbaku.Text) & "'" koneksi.Refresh txtketbaku.Text = koneksi.Recordset("keterangan") End Sub Private Sub cbokdcust_Click() koneksi.RecordSource = "select * from dtcustomer where nrc='" & Trim(cbokdcust.Text) & "'" koneksi.Refresh txtnama.Text = koneksi.Recordset("nama") txtalamat.Text = koneksi.Recordset("alamat") txtnotelp.Text = koneksi.Recordset("notelp") End Sub Private Sub cbokdpesanan_Click() koneksi.RecordSource = "select * from dtpesanan where kdpesanan=' "& Trim(cbokdpesanan.Text) & "'" koneksi.Refresh txtjenispesanan.Text = koneksi.Recordset("jenispesanan") txttglacara.Value = koneksi.Recordset("tglacara") txttempatacara.Text = koneksi.Recordset("tempatacara")
Perpustakaan Unika
txtbiaya.Text = koneksi.Recordset("totalbayar") End Sub Private Sub cbonrp_Click() koneksi.RecordSource = "select * from dtpegawai where nrp='" & Trim(cbonrp.Text) & "'" koneksi.Refresh txtnamapegawai.Text = koneksi.Recordset("nama") End Sub Private Sub cmdcetak_Click() 'membuat aplikasi excell Set excel_app = CreateObject("Excel.Application") ' memperlihatkan excell excel_app.Visible = True ' membuka file excell excel_app.Workbooks.Open FileName:=App.Path & "\ctkpakaiinventory.xls" ' cek versi excell If Val(excel_app.Application.Version) >= 8 Then Set excel_sheet = excel_app.ActiveSheet Else Set excel_sheet = excel_app End If 'membuka database koneksi.RecordSource = "select * from dtpakaiinventory" koneksi.Refresh 'Column judul excel_sheet.Cells(5, 1) = "Nama Customer" excel_sheet.Cells(5, 2) = "Alamat" excel_sheet.Cells(5, 3) = "Jenis Pesanan" excel_sheet.Cells(5, 4) = "Tanggal Acara" excel_sheet.Cells(5, 5) = "Tempat Acara" excel_sheet.Cells(5, 6) = "Biaya" excel_sheet.Cells(5, 7) = "Nama Pegawai" 'isi data ke excel i=6 While Not koneksi.Recordset.EOF excel_sheet.Cells(i, 1) = koneksi.Recordset("namacust") excel_sheet.Cells(i, 2) = koneksi.Recordset("alamat") excel_sheet.Cells(i, 3) = koneksi.Recordset("jenispesanan")
Perpustakaan Unika
excel_sheet.Cells(i, 4) = koneksi.Recordset("tglacara") excel_sheet.Cells(i, 5) = koneksi.Recordset("tempatacara") excel_sheet.Cells(i, 6) = koneksi.Recordset("biaya") excel_sheet.Cells(i, 7) = koneksi.Recordset("namapegawai") i=i+1 koneksi.Recordset.MoveNext Wend 'membuat font judul tebal excel_sheet.Rows(1).Font.Bold = True 'besar columns sesuai panjang data excel_sheet.Range(excel_sheet.Cells(1, 1), excel_sheet.Cells(i, 7)).Select excel_app.Selection.Columns.AutoFit koneksi.Recordset.Close End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdhapus_Click() tampil.RecordSource = "select * from dtpakaiinventory" tampil.Recordset.Delete tampil.Refresh tampilan End Sub Private Sub cmdsimpan_Click() koneksi.RecordSource = "select * from dtpakaiinventory" koneksi.Refresh koneksi.Recordset.AddNew koneksi.Recordset("namacust") = txtnama.Text koneksi.Recordset("alamat") = txtalamat.Text koneksi.Recordset("namapegawai") = txtnamapegawai.Text koneksi.Recordset("kodepesanan") = cbokdpesanan.Text koneksi.Recordset("jenispesanan") = txtjenispesanan.Text koneksi.Recordset("tglacara") = txttglacara.Value koneksi.Recordset("tempatacara") = txttempatacara.Text koneksi.Recordset("biaya") = txtbiaya.Text koneksi.Recordset("kodebarang") = cbokdbarang.Text koneksi.Recordset("kodebahanbaku") = cbokdbaku.Text koneksi.Recordset.Update koneksi.Recordset.Close koneksi.Refresh bersih
Perpustakaan Unika
tampilan End Sub Private Sub Form_Activate() tampilan End Sub Private Sub Form_Load() koneksi.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\IDA.mdb" tampil.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\IDA.mdb" With cbokdcust koneksi.RecordSource = "select * from dtcustomer" koneksi.Refresh While Not koneksi.Recordset.EOF .AddItem (koneksi.Recordset("nrc")) koneksi.Recordset.MoveNext Wend End With With cbokdbarang koneksi.RecordSource = "select * from dtinventory" koneksi.Refresh While Not koneksi.Recordset.EOF .AddItem (koneksi.Recordset("kodebarang")) koneksi.Recordset.MoveNext Wend End With With cbonrp koneksi.RecordSource = "select * from dtpegawai" koneksi.Refresh While Not koneksi.Recordset.EOF .AddItem (koneksi.Recordset("nrp")) koneksi.Recordset.MoveNext Wend End With With cbokdpesanan koneksi.RecordSource = "select * from dtpesanan" koneksi.Refresh While Not koneksi.Recordset.EOF .AddItem (koneksi.Recordset("kdpesanan")) koneksi.Recordset.MoveNext
Perpustakaan Unika
Wend End With With cbokdbaku koneksi.RecordSource = "select * from dtinventory" koneksi.Refresh While Not koneksi.Recordset.EOF .AddItem (koneksi.Recordset("kodebahanbaku")) koneksi.Recordset.MoveNext Wend End With End Sub
Private Sub txtnetto_GotFocus() txtnetto.Text = Val(txtbruto.Text) + Val(txttax.Text) End Sub
Perpustakaan Unika
GAMBAR IV.33 – FORM DATA PESANAN
GAMBAR IV.34 – FORM NOTA PESANAN
Perpustakaan Unika
GAMBAR IV.35 – FORM EXCEL NOTA PESANAN
LAMPIRAN 8 – KODE FORM DATA PESANAN Sub Cari() On Error Resume Next koneksi.RecordSource = "select * from dtcustomer where nama='" & txtcari.Text & "'" koneksi.Refresh 'jika ada maka If koneksi.Recordset.RecordCount > 0 Then cbokdcust.Text = koneksi.Recordset("nrc") txtnama.Text = koneksi.Recordset("nama") txtalamat.Text = koneksi.Recordset("alamat") txtkota.Text = koneksi.Recordset("kota") txtnotelp.Text = koneksi.Recordset("notelp") cust = koneksi.Recordset("nrc") koneksi.Recordset.Close koneksi1.RecordSource = "select * from dtpesanan where nrc='" & cust & "'" koneksi1.Refresh If koneksi1.Recordset.RecordCount > 0 Then txtkdpesanan.Text = koneksi1.Recordset("kdpesanan") txtjenispesanan.Text = koneksi1.Recordset("jenispesanan") txtjenisacara.Text = koneksi1.Recordset("jenisacara") txttempatacara.Text = koneksi1.Recordset("tempatacara")
Perpustakaan Unika
txtjenisbayar.Text = koneksi1.Recordset("jenisbayar") txtjumlahbayar.Text = koneksi1.Recordset("jumlahbayar") txttglacara.Value = koneksi1.Recordset("tglacara") txttglpesan.Value = koneksi1.Recordset("tglpesan") End If Else perhatian = MsgBox("Nama Customer Belum Ada !", vbInformation + vbOKOnly, "Informasi !") End If txtcari.Text = "" End Sub Sub bersih() cbokdcust.Text = "" txtnama.Text = "" txtalamat.Text = "" txtnotelp.Text = "" txtkdpesanan.Text = "" txtjenispesanan.Text = "" txttempatacara.Text = "" txtjenisbayar.Text = "" txtjmlbayar.Text = "" txtjenisacara.Text = "" End Sub Sub bersihitem() cbokdmenu.Text = "" txtnamamenu.Text = "" txtharga.Text = "" txtjmlorang.Text = "" End Sub Sub tampilan() tampil.RecordSource = "select kdpesanan,kdmenu,jmlorang,subtotal from dtpesanitem, dtstmakanan where dtpesanitem.kdmenu=dtstmakanan.kodemenu and dtpesanitem.kdpesanan='" & txtkdpesanan.Text & "'" tampil.Refresh End Sub Private Sub cbokdcust_Click() koneksi.RecordSource = "select * from dtcustomer where nrc='" & Trim(cbokdcust.Text) & "'" koneksi.Refresh txtnama.Text = koneksi.Recordset("nama") txtalamat.Text = koneksi.Recordset("alamat") txtnotelp.Text = koneksi.Recordset("notelp") txtkdpesanan.SetFocus End Sub
Perpustakaan Unika
Private Sub cbokdmenu_Click() koneksi.RecordSource = "select * from dtstmakanan where kodemenu='" & Trim(cbokdmenu.Text) & "'" koneksi.Refresh txtnamamenu.Text = koneksi.Recordset("namamenu") txtharga.Text = koneksi.Recordset("hrgnetto") End Sub Private Sub cmdcetak_Click() 'membuat aplikasi excell Set excel_app = CreateObject("Excel.Application") ' memperlihatkan excell excel_app.Visible = True ' membuka file excell excel_app.Workbooks.Open FileName:=App.Path & "\ctkstmakanan.xls" ' cek versi excell If Val(excel_app.Application.Version) >= 8 Then Set excel_sheet = excel_app.ActiveSheet Else Set excel_sheet = excel_app End If 'membuka database koneksi.RecordSource = "select * from dtstmakanan" koneksi.Refresh 'Column judul excel_sheet.Cells(1, 1) = "Kode Menu" excel_sheet.Cells(1, 2) = "Nama Menu" excel_sheet.Cells(1, 3) = "Kode Bahan Baku" excel_sheet.Cells(1, 4) = "Harga Bruto" excel_sheet.Cells(1, 5) = "Tax" excel_sheet.Cells(1, 6) = "Harga Netto" 'isi data ke excel i=3 While Not koneksi.Recordset.EOF excel_sheet.Cells(i, 1) = koneksi.Recordset("kodemenu") excel_sheet.Cells(i, 2) = koneksi.Recordset("namamenu") excel_sheet.Cells(i, 3) = koneksi.Recordset("kodebahanbaku") excel_sheet.Cells(i, 4) = koneksi.Recordset("hrgbruto") excel_sheet.Cells(i, 5) = koneksi.Recordset("tax")
Perpustakaan Unika
excel_sheet.Cells(i, 6) = koneksi.Recordset("hrgnetto") i=i+1 koneksi.Recordset.MoveNext Wend 'membuat font judul tebal excel_sheet.Rows(1).Font.Bold = True 'besar columns sesuai panjang data excel_sheet.Range(excel_sheet.Cells(1, 1), excel_sheet.Cells(i, 7)).Select excel_app.Selection.Columns.AutoFit koneksi.Recordset.Close End Sub Private Sub cmdcari_Click() Cari End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdhapus_Click() tampil.RecordSource = "select * from dtstmakanan" tampil.Recordset.Delete tampil.Refresh tampilan End Sub Private Sub cmdpreview_Click() Unload Me formcetak.Show End Sub Private Sub cmdproses_Click() ST = txttotal.Text 'simpan ke pesan item koneksi.RecordSource = "select * from dtpesanitem" koneksi.Refresh koneksi.Recordset.AddNew koneksi.Recordset("kdpesanan") = txtkdpesanan.Text koneksi.Recordset("kdmenu") = cbokdmenu.Text koneksi.Recordset("jmlorang") = txtjmlorang.Text koneksi.Recordset("subtotal") = txtsubtotal.Text koneksi.Recordset.Update koneksi.Recordset.Close
Perpustakaan Unika
koneksi.Refresh subtot = Val(ST) + Val(txtsubtotal) txttotal.Text = subtot 'simpan ke cetaknota koneksi.RecordSource = "select * from ctknota" koneksi.Refresh koneksi.Recordset.AddNew koneksi.Recordset("namacust") = txtnama.Text koneksi.Recordset("alamat") = txtalamat.Text koneksi.Recordset("notelp") = txtnotelp.Text koneksi.Recordset("jenispesanan") = txtjenispesanan.Text koneksi.Recordset("tglacara") = txttglacara.Value koneksi.Recordset("jenisacara") = txtjenisacara.Text koneksi.Recordset("tempatacara") = txttempatacara.Text koneksi.Recordset("jmlorang") = txtjmlorang.Text koneksi.Recordset("namamenu") = txtnamamenu.Text koneksi.Recordset("Harga") = txtharga.Text koneksi.Recordset("Total") = txtsubtotal.Text koneksi.Recordset("jmlbayar") = txtjmlbayar.Text koneksi.Recordset.Update koneksi.Recordset.Close koneksi.Refresh subtot = Val(ST) + Val(txtsubtotal) txttotal.Text = subtot bersihitem tampilan End Sub Private Sub cmdsimpan_Click() koneksi.RecordSource = "select * from dtpesanan" koneksi.Refresh tanggal = Date n=0 If Len(tanggal) < 10 Then If Mid(tanggal, 2, 1) = "/" Then bl = n + Left(tanggal, 1) If Mid(tanggal, 4, 1) = "/" Then tg = n + Mid(tanggal, 3, 1) Else tg = Mid(tanggal, 3, 2) End If Else bl = Left(tanggal, 2) If Mid(tanggal, 5, 1) = "/" Then
Perpustakaan Unika
tg = n + Mid(tanggal, 4, 1) Else tg = Mid(tanggal, 4, 2) End If End If Else bl = Left(tanggal, 2) tg = Mid(tanggal, 4, 2) End If th = Right(tanggal, 4) If bl = 1 Then bln = "Januari" ElseIf bl = 2 Then bln = "Februari" ElseIf bl = 3 Then bln = "Maret" ElseIf bl = 4 Then bln = "April" ElseIf bl = 5 Then bln = "Mei" ElseIf bl = 6 Then bln = "Juni" ElseIf bl = 7 Then bln = "Juli" ElseIf bl = 8 Then bln = "Agustus" ElseIf bl = 9 Then bln = "September" ElseIf bl = 10 Then bln = "Oktober" ElseIf bl = 11 Then bln = "November" Else bln = "Desember" End If koneksi.Recordset.AddNew koneksi.Recordset("nrc") = cbokdcust.Text koneksi.Recordset("kdpesanan") = txtkdpesanan.Text koneksi.Recordset("jenispesanan") = txtjenispesanan.Text koneksi.Recordset("tglpesan") = txttglpesan.Value koneksi.Recordset("tglacara") = txttglacara.Value koneksi.Recordset("jenisacara") = txtjenisacara.Text koneksi.Recordset("tempatacara") = txttempatacara.Text koneksi.Recordset("jenisbayar") = txtjenisbayar.Text
Perpustakaan Unika
koneksi.Recordset("jumlahbayar") = txtjmlbayar.Text koneksi.Recordset("totalbayar") = txttotal.Text koneksi.Recordset("bulan") = bln koneksi.Recordset("tahun") = th koneksi.Recordset.Update koneksi.Recordset.Close koneksi.Refresh bersih 'Mencetak Invoice 'memb uat aplikasi excell Set excel_app = CreateObject("Excel.Application") ' memperlihatkan excell excel_app.Visible = True ' membuka file excell excel_app.Workbooks.Open FileName:=App.Path & "\ctkdtpesanan.xls" ' cek versi exc ell If Val(excel_app.Application.Version) >= 8 Then Set excel_sheet = excel_app.ActiveSheet Else Set excel_sheet = excel_app End If 'membuka database koneksi.RecordSource = "select * from ctknota" koneksi.Refresh 'Column judul excel_sheet.Cells(7, 2) = koneksi.Recordset("namacust") excel_sheet.Cells(8, 2) = koneksi.Recordset("alamat") excel_sheet.Cells(9, 2) = koneksi.Recordset("notelp") excel_sheet.Cells(7, 4) = koneksi.Recordset("tglacara") excel_sheet.Cells(8, 4) = koneksi.Recordset("tempatacara") 'besar columns sesuai panjang data i = 12 ST = koneksi.Recordset("total") jmlbayar = koneksi.Recordset("jmlbayar") While Not koneksi.Recordset.EOF excel_sheet.Cells(i, 2) = koneksi.Recordset("namamenu") excel_sheet.Cells(i, 3) = koneksi.Recordset("jmlorang") excel_sheet.Cells(i, 4) = koneksi.Recordset("harga") subtot = Val(ST) + Val(koneksi.Recordset("total"))
Perpustakaan Unika
tot = subtot i=i+1 koneksi.Recordset.MoveNext Wend i=i+1 If tot > jmlbayar Then kurang = jmlbayar - tot excel_sheet.Cells(i, 3) = "Total Bayar" excel_sheet.Cells(i, 4) = tot excel_sheet.Cells(i + 1, 3) = "Jumlah Bayar" excel_sheet.Cells(i + 1, 4) = jmlbayar excel_sheet.Cells(i + 2, 3) = "Kurang" excel_sheet.Cells(i + 2, 4) = kurang Else Sisa = tot - jmlbayar excel_sheet.Cells(i, 3) = "Total Bayar" excel_sheet.Cells(i, 4) = tot excel_sheet.Cells(i + 1, 3) = "Jumlah Bayar" excel_sheet.Cells(i + 1, 4) = jmlbayar excel_sheet.Cells(i + 2, 3) = "Sisa" excel_sheet.Cells(i + 2, 4) = Sisa End If excel_sheet.Cells(i + 4, 3) = "Semarang,.................." koneksi.Recordset.Close koneksi.Refresh End Sub Private Sub Form_Activate() tampilan End Sub Private Sub Form_Load() koneksi.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\IDA.mdb" tampil.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\IDA.mdb" koneksi1.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\IDA.mdb" With cbokdcust koneksi.RecordSource = "select * from dtcustomer" koneksi.Refresh While Not koneksi.Recordset.EOF .AddItem (koneksi.Recordset("nrc")) koneksi.Recordset.MoveNext
Perpustakaan Unika
Wend End With With txtjenispesanan .AddItem ("Prasmanan") .AddItem ("Foodstal") .AddItem ("Lunch Box") .AddItem ("Snack Box") .AddItem ("Round Table") End With With txtjenisacara .AddItem ("Midodareni") .AddItem ("Rapat") .AddItem ("Arisan") .AddItem ("Ultah") .AddItem ("Mitoni") .AddItem ("Tedak Siten") .AddItem ("Selamatan") .AddItem ("Resepsi") .AddItem ("Akad Nikah") .AddItem ("Lainnya") End With With cbokdmenu koneksi.RecordSource = "select * from dtstmakanan" koneksi.Refresh While Not koneksi.Recordset.EOF .AddItem (koneksi.Recordset("kodemenu")) koneksi.Recordset.MoveNext Wend End With End Sub
Private Sub txtnetto_GotFocus() txtnetto.Text = Val(txtbruto.Text) + Val(txttax.Text) End Sub Private Sub txtjmlorang_lostfocus() txtsubtotal.Text = txtjmlorang.Text * txtharga.Text End Sub
Perpustakaan Unika
LAMPIRAN 9 – CONTOH KWITANSI PEMBAYARAN
Perpustakaan Unika
LAMPIRAN 10 – CONTOH MEMO PESANAN
LAMPIRAN 11 – BROSUR MENU IDA KATERING
Perpustakaan Unika
LAMPIRAN 12 – CONTOH FORMULIR PESANAN
Perpustakaan Unika
Perpustakaan Unika
GAMBAR IV.11 – DEKOMPOSISI SISTEM 0 Sistem Informasi Administrasi dan Pesanan
Top level
1
2
3
4
Pencatatan Data Customer
Pencatatan Data Pesanan
Pencatatan Data Inventory
Pencatatan Data Penghitungan Standarisasi Makanan
Level 0
1.1
1.2
2.1
2.2
3.1
3.2
4.1
4.2
Input Data customer
Edit Data customer
Input Data Pesanan
Edit Data Pesanan
Input Data Inventory
Edit Data Inventory
Input Data Penghitungan Standarisasi Makanan
Edit Data Penghitungan Standarisasi Makanan
Sambung di halaman selanjutnya
Level 1
Perpustakaan Unika
5
6
Pencatatan Data Pegawai
Pembuatan Laporan
Level 0
5.1
5.2
6.1
6.2
6.3
6.4
6.5
Input Data Pegawai
Edit Data Pegawai
Laporan Data Customer
Laporan Data Pesanan
Laporan Data Inventory
Laporan Data Pegawai
Laporan R/L tiap event
Level 1