Lampiran 1 : Struktur organisasi
Coca-Cola Amatil
Indonesia.
General Manager
Technical
Operation &
Logistic
Manager
Finance
Manager
Human
Resources
Manager
General Sales
Manager
Business
Services
Manager
Public Relation
Manager
Plant Adm Officer
PR Officer
PR Supervisor
DOP Manager
WH & Trans
Manager
QA Manager
ME Manager
Prod. Manager
QMS Officer
Maint, Man System
Spv
Prev. Maint.
Electric Spv
Prev. Maint.
Mechanical. Spv
Prev. Maint. Utility
Spv
Lampiran 2: Sub Struktur Organisasi
Coca-Cola Amatil
Indonesia.
Account Receivable
Support Manager
(Lutvi Satria Putra)
Account Receivable
Admin Supervisor
(Timtim Mei Heti Diliana)
Account Receivable
Collector Solo Sale
Office
(Susmanto)
Account Receivable
Collectorr Solo Sale
Office
(Mujiyanto)
Account Receivable
Collector Jogja Sale
Office
(Sigit Prabowo)
Account Receivable
Collector Jogja Sale
Office
(M. Sholeh Alsatta)
Account Receivable
Collector Semarang
Barat Sale Office
(Tri Novitarini)
Account Receivable
Collector Semarang
Timur Sale Office
(Arie Priyono)
Account Receivable
Collector Purwokerto
Sale Office
(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
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
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
'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
'mengisi halaman sesuai nomor kuitansi Cells(r, c).Value = no_urut
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
' 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)
' 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
r25 = ActiveCell.Address(0, 0, xlA1) 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
'marge cell khusus total Range(rawl + ":" + rakh).Select With Selection
'membuat total menjadi nol tot = 0
ActiveCell.Offset(1, -2).Select End If
Next a
'mengisi grantotal
.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
ActiveCell.Offset(1, 2).FormulaR1C1 = "=NOW()" End Sub
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
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
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"