T0 Lampiran Institutional Repository | Satya Wacana Christian University: Sistem Informasi Laporan Penagihan Piutang Berbasis Macro Excel PT CocaCoca Amatil Indonesia Central Java
Lampiran 1 : Struktur organisasi Coca-Cola Amatil Indonesia.
General Manager
Technical
Operation &
Logistic
Manager
Human
Resources
Manager
Finance
Manager
Business
Services
Manager
General Sales
Manager
Public Relation
Manager
PR Officer
Plant Adm Officer
PR Supervisor
DOP Manager
WH & Trans
Manager
Maint, Man System
Spv
QA Manager
Prev. Maint.
Electric Spv
ME Manager
Prev. Maint.
Mechanical. Spv
Prod. Manager
Prev. Maint. Utility
Spv
QMS Officer
M&E Shift Spv Line
(3,4,5, & 8) 3 Shift
Lampiran 2: Sub Struktur Organisasi Coca-Cola Amatil Indonesia.
STRUKTUR ORGANISASI BAGIAN ACCOUNTS RECEIVABLE
Account Receivable
Support Manager
(Lutvi Satria Putra)
Account Receivable
Admin Supervisor
(Timtim Mei Heti Diliana)
Account Receivable
Collector Solo Sale
Office
Account Receivable
Collectorr Solo Sale
Office
Account Receivable
Collector Jogja Sale
Office
Account Receivable
Collector Jogja Sale
Office
Account Receivable
Collector Semarang
Barat Sale Office
Account Receivable
Collector Semarang
Timur Sale Office
Account Receivable
Collector Purwokerto
Sale Office
(Susmanto)
(Mujiyanto)
(Sigit Prabowo)
(M. Sholeh Alsatta)
(Tri Novitarini)
(Arie Priyono)
(Heru Setiyawan)
Lampiran 3 : Coding untuk menjalankan Form Input
' deklarasi variabel
Dim namaPT, namaOutlet, nokuitansi, nofak, nofakpajak As String
Private Sub btkeluar_Click()
Call sort_insert
End
End Sub
Private Sub btsimpan_Click()
buatkui
namaPT = txtpt.Value
namaOutlet = txtoutlet.Value
nokuitansi = txtkuitansi.Value
'input ke excel untuk sheet sesuai nomor kuitansi
Worksheets(Left(txtkuitansi.Value, 3)).Activate
Range("A1:G1").Select
Call font1
Range("A1:G1").HorizontalAlignment = xlCenter
Selection.Merge
Range("A1:G1").Value = namaPT
Range("A2:G2").Select
Call font1
Range("A2:G2").HorizontalAlignment = xlCenter
Selection.Merge
Range("A2:G2").Value = "Daftar Tagihan " & namaOutlet
Range("A3:G3").Select
Call font1
Range("A3:G3").HorizontalAlignment = xlCenter
Selection.Merge
Range("A3:G3").Value = "No. Kwitansi : " & nokuitansi
'membuat judul tabel
Range("A4:G4").Select
Call font2
Call border_tebal
Range("A4").Value = "No"
Range("B4").Value = "Sales Center"
Range("C4").Value = "Nomor Outlet"
Range("D4").Value = "Nomor Faktur"
Range("E4").Value = "Tanggal Faktur"
Range("F4").Value = "No. Faktur Pajak"
Range("G4").Value = "Total"
Columns("A:A").ColumnWidth = 2.71
Columns("B:B").ColumnWidth = 12.57
Columns("C:C").ColumnWidth = 13.29
Columns("D:D").ColumnWidth = 13.43
Columns("E:E").ColumnWidth = 14.43
Columns("F:F").ColumnWidth = 17.15
Columns("G:G").ColumnWidth = 14.57
Worksheets("Rumus").Activate
btinvoice.Enabled = True
End Sub
Sub buatkui()
nokuitansi = Left(txtkuitansi.Value, 3)
'buat sheet baru
Worksheets.Add.Name = nokuitansi
Worksheets(nokuitansi).Move Before:=Sheets("Rumus")
End Sub
Sub Macro4()
Form_input.Hide
nokuitansi = txtkuitansi.Value
nofak = InputBox("Isikan dengan Nomor Faktur Penjualan yang akan kita cari")
'pesan jika inputbox nomor faktur penjualan kosong
If nofak = Empty Then
MsgBox "Silahkan masukkan Nomor Faktur Penjualan "
Else
ActiveCell.Cells(1, 1).Select
Cells.find(What:=nofak, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
nofak = ActiveCell.Cells.Value
ActiveCell.Cells.Activate
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.color = 65535
.TintAndShade = 0
.PatternTintAndShade = 0
End With
nofakpajak = InputBox("Isikan dengan Nomor Faktur Pajak")
'menuju ke kolom terakhir, tanya apakah ada nokuitasi?
ActiveCell.Offset(0, 9).Range("A1").Select
If IsEmpty(ActiveCell.Value) Then
ActiveCell.Value = nokuitansi
Else
pil = MsgBox("Sudah Ada Nomor kwitansi, Mau tetap lanjut?", vbYesNo, "Add Data")
If pil = vbYes Then
Macro4
Else
Exit Sub
End If
End If
'menuju ke cell nomor kuitansi
n = ActiveCell.Address(rowabsolute:=False, columnabsolute:=fasle)
'ambil nominal
ActiveCell.Offset(0, -1).Range("A1").Select
Nominal = ActiveCell.Value
' ambil tanggal
ActiveCell.Offset(0, -7).Range("A1").Select
tgl = ActiveCell.Value
ActiveCell.NumberFormat = "DD-MMM-YY"
' ambil kota outlet
ActiveCell.Offset(0, -3).Range("A1").Select
kode = ActiveCell.Value
Worksheets("SO").Activate
ActiveCell.Cells(1, 1).Select
Cells.find(What:=kode, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
kota = ActiveCell.Offset(0, 1).Value
'kembali ke sheet rumus
Worksheets("Rumus").Activate
n = ActiveCell.Address(rowabsolute:=False, columnabsolute:=fasle)
' ambil nomor outlet
ActiveCell.Offset(0, -1).Range("A1").Select
no = ActiveCell.Value
'Cari tau baris terakhir yang kosong pada sheet sesuai nomor kuitansi
With Worksheets(Left(txtkuitansi.Value, 3))
baristerakhir
=
Worksheets(Left(txtkuitansi.Value,
3)).Cells(.Rows.Count,
2).End(xlUp).Row
End With
Worksheets(Left(txtkuitansi.Value, 3)).Activate
r = baristerakhir + 1
c = 1
no_urut = baristerakhir - 3
Cells(r, c).Select
'mengisi halaman sesuai nomor kuitansi
Cells(r, c).Value = no_urut
Cells(r, c + 1).Value = kota
Cells(r, c + 2).Value = no
Cells(r, c + 3).Value = nofak
Cells(r, c + 4).Value = tgl
Cells(r, c + 5).Value = nofakpajak
Cells(r, c + 6).Value = Nominal
Columns("G:G").Style = "COMMA [0]"
Range("A5:G5000").Select
With Selection.Font
.Name = "Bookman Old Style"
.Size = 9
End With
' beri border
Range(Cells(r, c), Cells(r, c + 6)).Select
Call border
End If
Form_input.Show
End Sub
Private Sub btinvoice_Click()
Worksheets("Rumus").Activate
btsimpan.Enabled = False
txtpt.Enabled = False
txtoutlet.Enabled = False
txtkuitansi.Enabled = False
Macro4
End Sub
Sub sort_insert()
' mengetahui berapa jumlah baris
Range("b5").Select
Selection.End(xlDown).Select
r2 = ActiveCell.Row
ActiveCell.Offset(0, 5).Select
R22 = ActiveCell.Address(0, 0, xlA1)
Selection.End(xlUp).Select
r1 = ActiveCell.Row
r3 = r2 - r1
‘mengurutkan daftar berdasarkan kota outlet
Range("B5:" + R22).Select
ActiveWorkbook.Worksheets(Left(txtkuitansi.Value, 3)).sort.SortFields.Clear
ActiveWorkbook.Worksheets(Left(txtkuitansi.Value,
3)).sort.SortFields.Add
Key:=Range("B5:B22"), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets(Left(txtkuitansi.Value, 3)).sort
.SetRange Range("B5:" + R22)
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("B5").Activate
For a = 1 To r3
' tanya apakah nomor faktur penjualan sama dengan baris dibawanya atau tidak
Data1 = ActiveCell.Value
ActiveCell.Offset(0, 5).Select
grandtot = grandtot + ActiveCell.Value
tot = tot + ActiveCell.Value
ActiveCell.Offset(1, -5).Select
Data2 = ActiveCell.Value
If Data1 = Data2 Then
Else
' menyisipkan baris
Selection.EntireRow.insert , CopyOrigin:=xlFormatFromLeftOrAbove
ActiveCell.Offset(0, 2).Value = "T o t a l "
‘,mengisi total
ActiveCell.Offset(0, 5).Select
r25 = ActiveCell.Address(0, 0, xlA1)
ActiveCell.Value = tot
With Selection.Font
.Name = "Bookman Old Style"
.Size = 9
.Bold = True
End With
ActiveCell.Offset(0, -2).Select
rakh = ActiveCell.Address(0, 0, xlA1)
ActiveCell.Offset(0, -1).Select
rawl = ActiveCell.Address(0, 0, xlA1)
ActiveCell.Offset(0, -3).Select
r24 = ActiveCell.Address(0, 0, xlA1)
'memberi border khusus total
Range(r24 + ":" + r25).Select
Call border_tebal2
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.color = 13408767
.TintAndShade = 0
.PatternTintAndShade = 0
End With
'marge cell khusus total
Range(rawl + ":" + rakh).Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.Merge
With Selection.Font
.Name = "Bookman Old Style"
.Size = 9
.Bold = True
.Italic = True
End With
'membuat total menjadi nol
tot = 0
ActiveCell.Offset(1, -2).Select
End If
Next a
'mengisi grantotal
ActiveCell.Offset(0, 2).Value = "GRAND TOTAL"
With Selection.Font
.Name = "Bookman Old Style"
.Bold = True
.Italic = True
.color = -65536
.Size = 10
End With
ActiveCell.Offset(0, 5).Select
ActiveCell.Value = grandtot
With Selection.Font
.Name = "Bookman Old Style"
.Bold = True
.color = -65536
.Size = 10
End With
ActiveCell.Offset(0, -3).Select
With Selection.Font
.Name = "Bookman Old Style"
.Bold = True
.Italic = True
.color = -65536
.Size = 10
End With
ActiveCell.Offset(0, -3).Select
r27 = ActiveCell.Address(0, 0, xlA1)
ActiveCell.Offset(0, 3).Select
awl = ActiveCell.Address(0, 0, xlA1)
ActiveCell.Offset(0, 1).Select
akh = ActiveCell.Address(0, 0, xlA1)
ActiveCell.Offset(0, 2).Select
r26 = ActiveCell.Address
Range(r26 + ":" + r27).Select
Call border_tebal2
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.color = 10079487
.TintAndShade = 0
.PatternTintAndShade = 0
End With
'marge cell khusus grandtotal
Range(awl + ":" + akh).Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.Merge
ActiveCell.Offset(1, 2).FormulaR1C1 = "=NOW()"
End Sub
Sub font1()
With Selection.Font
.Name = "Bookman Old Style"
.Bold = True
.Size = 10
End With
End Sub
Sub font2()
With Selection.Font
.Name = "Bookman Old Style"
.Bold = True
.Size = 9
.color = -16776961
End With
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.color = 10092543
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
End Sub
Sub border_tebal()
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlMedium
End With
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlMedium
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
End Sub
Sub border_tebal2()
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlMedium
End With
End Sub
Sub border()
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
End Sub
Sub Button7_Click()
‘memunculkan form input
Form_input.Show
End
Sub
Lampiran 4 : Coding untuk fungsi terbilang pada kwitansi
Function Terbilang(n As Long) As String 'max 2.147.483.647
Dim satuan As Variant, Minus As Boolean
On Error GoTo terbilang_error
satuan
=
Array("",
"Satu",
"Dua",
"Tiga",
"Empat",
"Lima",
"Enam",
"Tujuh",
"Delapan", "Sembilan", "Sepuluh", "Sebelas")
If n < 0 Then
Minus = True
n = n * -1
End If
Select Case n
Case 0 To 11
Terbilang = " " + satuan(Fix(n))
Case 12 To 19
Terbilang = Terbilang(n Mod 10) + " Belas"
Case 20 To 99
Terbilang = Terbilang(Fix(n / 10)) + " Puluh" + Terbilang(n Mod 10)
Case 100 To 199
Terbilang = " Seratus" + Terbilang(n - 100)
Case 200 To 999
Terbilang = Terbilang(Fix(n / 100)) + " Ratus" + Terbilang(n Mod 100)
Case 1000 To 1999
Terbilang = " Seribu" + Terbilang(n - 1000)
Case 2000 To 999999
Terbilang = Terbilang(Fix(n / 1000)) + " Ribu" + Terbilang(n Mod 1000)
Case 1000000 To 999999999
Terbilang = Terbilang(Fix(n / 1000000)) + " Juta" + Terbilang(n Mod 1000000)
Case Else
Terbilang
=
Terbilang(Fix(n
/
1000000000))
+
"
Milyar"
+
Terbilang(n
Mod
1000000000)
End Select
If Minus = True Then
Terbilang = "Minus" + Terbilang
End If
Exit Function
terbilang_error:
MsgBox Err.Description, vbCritical, "Terbilang Error"
End
Function
Lampiran 5 : Faktur Penjualan dan Laporan Penerimaan Barang
Lampiran 6 : Faktur Pajak
Lampiran 7 : Invoice Barcode
Lampiran 8 : Rekapitulasi Kehadiran Kerja Praktek
Lampiran 9 : Jurnal Kerja Praktek
Lampiran 10 : Jurnal Bimbingan Tugas Akhir
Lampiran 11 : Surat Keterangan Kerja Praktek
General Manager
Technical
Operation &
Logistic
Manager
Human
Resources
Manager
Finance
Manager
Business
Services
Manager
General Sales
Manager
Public Relation
Manager
PR Officer
Plant Adm Officer
PR Supervisor
DOP Manager
WH & Trans
Manager
Maint, Man System
Spv
QA Manager
Prev. Maint.
Electric Spv
ME Manager
Prev. Maint.
Mechanical. Spv
Prod. Manager
Prev. Maint. Utility
Spv
QMS Officer
M&E Shift Spv Line
(3,4,5, & 8) 3 Shift
Lampiran 2: Sub Struktur Organisasi Coca-Cola Amatil Indonesia.
STRUKTUR ORGANISASI BAGIAN ACCOUNTS RECEIVABLE
Account Receivable
Support Manager
(Lutvi Satria Putra)
Account Receivable
Admin Supervisor
(Timtim Mei Heti Diliana)
Account Receivable
Collector Solo Sale
Office
Account Receivable
Collectorr Solo Sale
Office
Account Receivable
Collector Jogja Sale
Office
Account Receivable
Collector Jogja Sale
Office
Account Receivable
Collector Semarang
Barat Sale Office
Account Receivable
Collector Semarang
Timur Sale Office
Account Receivable
Collector Purwokerto
Sale Office
(Susmanto)
(Mujiyanto)
(Sigit Prabowo)
(M. Sholeh Alsatta)
(Tri Novitarini)
(Arie Priyono)
(Heru Setiyawan)
Lampiran 3 : Coding untuk menjalankan Form Input
' deklarasi variabel
Dim namaPT, namaOutlet, nokuitansi, nofak, nofakpajak As String
Private Sub btkeluar_Click()
Call sort_insert
End
End Sub
Private Sub btsimpan_Click()
buatkui
namaPT = txtpt.Value
namaOutlet = txtoutlet.Value
nokuitansi = txtkuitansi.Value
'input ke excel untuk sheet sesuai nomor kuitansi
Worksheets(Left(txtkuitansi.Value, 3)).Activate
Range("A1:G1").Select
Call font1
Range("A1:G1").HorizontalAlignment = xlCenter
Selection.Merge
Range("A1:G1").Value = namaPT
Range("A2:G2").Select
Call font1
Range("A2:G2").HorizontalAlignment = xlCenter
Selection.Merge
Range("A2:G2").Value = "Daftar Tagihan " & namaOutlet
Range("A3:G3").Select
Call font1
Range("A3:G3").HorizontalAlignment = xlCenter
Selection.Merge
Range("A3:G3").Value = "No. Kwitansi : " & nokuitansi
'membuat judul tabel
Range("A4:G4").Select
Call font2
Call border_tebal
Range("A4").Value = "No"
Range("B4").Value = "Sales Center"
Range("C4").Value = "Nomor Outlet"
Range("D4").Value = "Nomor Faktur"
Range("E4").Value = "Tanggal Faktur"
Range("F4").Value = "No. Faktur Pajak"
Range("G4").Value = "Total"
Columns("A:A").ColumnWidth = 2.71
Columns("B:B").ColumnWidth = 12.57
Columns("C:C").ColumnWidth = 13.29
Columns("D:D").ColumnWidth = 13.43
Columns("E:E").ColumnWidth = 14.43
Columns("F:F").ColumnWidth = 17.15
Columns("G:G").ColumnWidth = 14.57
Worksheets("Rumus").Activate
btinvoice.Enabled = True
End Sub
Sub buatkui()
nokuitansi = Left(txtkuitansi.Value, 3)
'buat sheet baru
Worksheets.Add.Name = nokuitansi
Worksheets(nokuitansi).Move Before:=Sheets("Rumus")
End Sub
Sub Macro4()
Form_input.Hide
nokuitansi = txtkuitansi.Value
nofak = InputBox("Isikan dengan Nomor Faktur Penjualan yang akan kita cari")
'pesan jika inputbox nomor faktur penjualan kosong
If nofak = Empty Then
MsgBox "Silahkan masukkan Nomor Faktur Penjualan "
Else
ActiveCell.Cells(1, 1).Select
Cells.find(What:=nofak, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
nofak = ActiveCell.Cells.Value
ActiveCell.Cells.Activate
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.color = 65535
.TintAndShade = 0
.PatternTintAndShade = 0
End With
nofakpajak = InputBox("Isikan dengan Nomor Faktur Pajak")
'menuju ke kolom terakhir, tanya apakah ada nokuitasi?
ActiveCell.Offset(0, 9).Range("A1").Select
If IsEmpty(ActiveCell.Value) Then
ActiveCell.Value = nokuitansi
Else
pil = MsgBox("Sudah Ada Nomor kwitansi, Mau tetap lanjut?", vbYesNo, "Add Data")
If pil = vbYes Then
Macro4
Else
Exit Sub
End If
End If
'menuju ke cell nomor kuitansi
n = ActiveCell.Address(rowabsolute:=False, columnabsolute:=fasle)
'ambil nominal
ActiveCell.Offset(0, -1).Range("A1").Select
Nominal = ActiveCell.Value
' ambil tanggal
ActiveCell.Offset(0, -7).Range("A1").Select
tgl = ActiveCell.Value
ActiveCell.NumberFormat = "DD-MMM-YY"
' ambil kota outlet
ActiveCell.Offset(0, -3).Range("A1").Select
kode = ActiveCell.Value
Worksheets("SO").Activate
ActiveCell.Cells(1, 1).Select
Cells.find(What:=kode, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
kota = ActiveCell.Offset(0, 1).Value
'kembali ke sheet rumus
Worksheets("Rumus").Activate
n = ActiveCell.Address(rowabsolute:=False, columnabsolute:=fasle)
' ambil nomor outlet
ActiveCell.Offset(0, -1).Range("A1").Select
no = ActiveCell.Value
'Cari tau baris terakhir yang kosong pada sheet sesuai nomor kuitansi
With Worksheets(Left(txtkuitansi.Value, 3))
baristerakhir
=
Worksheets(Left(txtkuitansi.Value,
3)).Cells(.Rows.Count,
2).End(xlUp).Row
End With
Worksheets(Left(txtkuitansi.Value, 3)).Activate
r = baristerakhir + 1
c = 1
no_urut = baristerakhir - 3
Cells(r, c).Select
'mengisi halaman sesuai nomor kuitansi
Cells(r, c).Value = no_urut
Cells(r, c + 1).Value = kota
Cells(r, c + 2).Value = no
Cells(r, c + 3).Value = nofak
Cells(r, c + 4).Value = tgl
Cells(r, c + 5).Value = nofakpajak
Cells(r, c + 6).Value = Nominal
Columns("G:G").Style = "COMMA [0]"
Range("A5:G5000").Select
With Selection.Font
.Name = "Bookman Old Style"
.Size = 9
End With
' beri border
Range(Cells(r, c), Cells(r, c + 6)).Select
Call border
End If
Form_input.Show
End Sub
Private Sub btinvoice_Click()
Worksheets("Rumus").Activate
btsimpan.Enabled = False
txtpt.Enabled = False
txtoutlet.Enabled = False
txtkuitansi.Enabled = False
Macro4
End Sub
Sub sort_insert()
' mengetahui berapa jumlah baris
Range("b5").Select
Selection.End(xlDown).Select
r2 = ActiveCell.Row
ActiveCell.Offset(0, 5).Select
R22 = ActiveCell.Address(0, 0, xlA1)
Selection.End(xlUp).Select
r1 = ActiveCell.Row
r3 = r2 - r1
‘mengurutkan daftar berdasarkan kota outlet
Range("B5:" + R22).Select
ActiveWorkbook.Worksheets(Left(txtkuitansi.Value, 3)).sort.SortFields.Clear
ActiveWorkbook.Worksheets(Left(txtkuitansi.Value,
3)).sort.SortFields.Add
Key:=Range("B5:B22"), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets(Left(txtkuitansi.Value, 3)).sort
.SetRange Range("B5:" + R22)
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("B5").Activate
For a = 1 To r3
' tanya apakah nomor faktur penjualan sama dengan baris dibawanya atau tidak
Data1 = ActiveCell.Value
ActiveCell.Offset(0, 5).Select
grandtot = grandtot + ActiveCell.Value
tot = tot + ActiveCell.Value
ActiveCell.Offset(1, -5).Select
Data2 = ActiveCell.Value
If Data1 = Data2 Then
Else
' menyisipkan baris
Selection.EntireRow.insert , CopyOrigin:=xlFormatFromLeftOrAbove
ActiveCell.Offset(0, 2).Value = "T o t a l "
‘,mengisi total
ActiveCell.Offset(0, 5).Select
r25 = ActiveCell.Address(0, 0, xlA1)
ActiveCell.Value = tot
With Selection.Font
.Name = "Bookman Old Style"
.Size = 9
.Bold = True
End With
ActiveCell.Offset(0, -2).Select
rakh = ActiveCell.Address(0, 0, xlA1)
ActiveCell.Offset(0, -1).Select
rawl = ActiveCell.Address(0, 0, xlA1)
ActiveCell.Offset(0, -3).Select
r24 = ActiveCell.Address(0, 0, xlA1)
'memberi border khusus total
Range(r24 + ":" + r25).Select
Call border_tebal2
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.color = 13408767
.TintAndShade = 0
.PatternTintAndShade = 0
End With
'marge cell khusus total
Range(rawl + ":" + rakh).Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.Merge
With Selection.Font
.Name = "Bookman Old Style"
.Size = 9
.Bold = True
.Italic = True
End With
'membuat total menjadi nol
tot = 0
ActiveCell.Offset(1, -2).Select
End If
Next a
'mengisi grantotal
ActiveCell.Offset(0, 2).Value = "GRAND TOTAL"
With Selection.Font
.Name = "Bookman Old Style"
.Bold = True
.Italic = True
.color = -65536
.Size = 10
End With
ActiveCell.Offset(0, 5).Select
ActiveCell.Value = grandtot
With Selection.Font
.Name = "Bookman Old Style"
.Bold = True
.color = -65536
.Size = 10
End With
ActiveCell.Offset(0, -3).Select
With Selection.Font
.Name = "Bookman Old Style"
.Bold = True
.Italic = True
.color = -65536
.Size = 10
End With
ActiveCell.Offset(0, -3).Select
r27 = ActiveCell.Address(0, 0, xlA1)
ActiveCell.Offset(0, 3).Select
awl = ActiveCell.Address(0, 0, xlA1)
ActiveCell.Offset(0, 1).Select
akh = ActiveCell.Address(0, 0, xlA1)
ActiveCell.Offset(0, 2).Select
r26 = ActiveCell.Address
Range(r26 + ":" + r27).Select
Call border_tebal2
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.color = 10079487
.TintAndShade = 0
.PatternTintAndShade = 0
End With
'marge cell khusus grandtotal
Range(awl + ":" + akh).Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.Merge
ActiveCell.Offset(1, 2).FormulaR1C1 = "=NOW()"
End Sub
Sub font1()
With Selection.Font
.Name = "Bookman Old Style"
.Bold = True
.Size = 10
End With
End Sub
Sub font2()
With Selection.Font
.Name = "Bookman Old Style"
.Bold = True
.Size = 9
.color = -16776961
End With
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.color = 10092543
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
End Sub
Sub border_tebal()
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlMedium
End With
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlMedium
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
End Sub
Sub border_tebal2()
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlMedium
End With
End Sub
Sub border()
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
End Sub
Sub Button7_Click()
‘memunculkan form input
Form_input.Show
End
Sub
Lampiran 4 : Coding untuk fungsi terbilang pada kwitansi
Function Terbilang(n As Long) As String 'max 2.147.483.647
Dim satuan As Variant, Minus As Boolean
On Error GoTo terbilang_error
satuan
=
Array("",
"Satu",
"Dua",
"Tiga",
"Empat",
"Lima",
"Enam",
"Tujuh",
"Delapan", "Sembilan", "Sepuluh", "Sebelas")
If n < 0 Then
Minus = True
n = n * -1
End If
Select Case n
Case 0 To 11
Terbilang = " " + satuan(Fix(n))
Case 12 To 19
Terbilang = Terbilang(n Mod 10) + " Belas"
Case 20 To 99
Terbilang = Terbilang(Fix(n / 10)) + " Puluh" + Terbilang(n Mod 10)
Case 100 To 199
Terbilang = " Seratus" + Terbilang(n - 100)
Case 200 To 999
Terbilang = Terbilang(Fix(n / 100)) + " Ratus" + Terbilang(n Mod 100)
Case 1000 To 1999
Terbilang = " Seribu" + Terbilang(n - 1000)
Case 2000 To 999999
Terbilang = Terbilang(Fix(n / 1000)) + " Ribu" + Terbilang(n Mod 1000)
Case 1000000 To 999999999
Terbilang = Terbilang(Fix(n / 1000000)) + " Juta" + Terbilang(n Mod 1000000)
Case Else
Terbilang
=
Terbilang(Fix(n
/
1000000000))
+
"
Milyar"
+
Terbilang(n
Mod
1000000000)
End Select
If Minus = True Then
Terbilang = "Minus" + Terbilang
End If
Exit Function
terbilang_error:
MsgBox Err.Description, vbCritical, "Terbilang Error"
End
Function
Lampiran 5 : Faktur Penjualan dan Laporan Penerimaan Barang
Lampiran 6 : Faktur Pajak
Lampiran 7 : Invoice Barcode
Lampiran 8 : Rekapitulasi Kehadiran Kerja Praktek
Lampiran 9 : Jurnal Kerja Praktek
Lampiran 10 : Jurnal Bimbingan Tugas Akhir
Lampiran 11 : Surat Keterangan Kerja Praktek