0% found this document useful (0 votes)
2 views1 page

HTML Input (2)

The document is a Python script that generates a salary slip PDF for an employee named Muhammad Harish Ghani, who works as a Consultant & Event Planner. It includes details such as the payment period, basic salary, allowances, total income, deductions, and net salary, along with the payment date and company name. The PDF is saved with a specific filename indicating the employee's name and the payment month and year.

Uploaded by

harishghani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

HTML Input (2)

The document is a Python script that generates a salary slip PDF for an employee named Muhammad Harish Ghani, who works as a Consultant & Event Planner. It includes details such as the payment period, basic salary, allowances, total income, deductions, and net salary, along with the payment date and company name. The PDF is saved with a specific filename indicating the employee's name and the payment month and year.

Uploaded by

harishghani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

from fpdf import FPDF # Data slip gaji data = { "nama_karyawan": "Muhammad Harish Ghani", "jabatan": "Consultan &

Event Planner", "periode": "April 2025", "gaji_pokok": "Rp. 3.496.190", "tunjangan": "Rp. 12.750.000", "total_pendapatan": "Rp. 16.246.190", "potongan": "Rp. 3.000.000",
"gaji_bersih": "Rp. 13.246.190", "tanggal_pembayaran": "10 April 2025", "perusahaan": "CV. VABINENDRA PRODUCTION (VABINENDRA EVENT ORGANIZER)" } # Buat PDF pdf = FPDF() pdf.add_page() pdf.set_font("Arial", 'B', 14) pdf.cell(200, 10, "SLIP GAJI KARYAWAN",
ln=True, align="C") pdf.set_font("Arial", '', 12) pdf.cell(200, 10, data["perusahaan"], ln=True, align="C") pdf.ln(10) # Informasi Umum pdf.set_font("Arial", '', 12) pdf.cell(100, 10, f"Nama Karyawan: {data['nama_karyawan']}", ln=True) pdf.cell(100, 10, f"Jabatan: {data['jabatan']}", ln=True)
pdf.cell(100, 10, f"Periode: {data['periode']}", ln=True) pdf.cell(100, 10, f"Tanggal Pembayaran: {data['tanggal_pembayaran']}", ln=True) pdf.ln(5) # Rincian Gaji pdf.set_font("Arial", 'B', 12) pdf.cell(100, 10, "Rincian Gaji:", ln=True) pdf.set_font("Arial", '', 12) pdf.cell(100, 10, f"Gaji Pokok:
{data['gaji_pokok']}", ln=True) pdf.cell(100, 10, f"Tunjangan Fee Event: {data['tunjangan']}", ln=True) pdf.cell(100, 10, f"Total Pendapatan: {data['total_pendapatan']}", ln=True) pdf.ln(5) # Potongan pdf.set_font("Arial", 'B', 12) pdf.cell(100, 10, "Potongan:", ln=True) pdf.set_font("Arial", '', 12)
pdf.cell(100, 10, f"Kasbon: {data['potongan']}", ln=True) pdf.cell(100, 10, f"Total Potongan: {data['potongan']}", ln=True) pdf.ln(5) # Gaji Bersih pdf.set_font("Arial", 'B', 12) pdf.cell(100, 10, f"Gaji Bersih Diterima: {data['gaji_bersih']}", ln=True) # Simpan PDF pdf_filename =
"Slip_Gaji_Muhammad_Harish_Ghani_April_2025.pdf" pdf.output(pdf_filename) pdf_filename

You might also like