import React from 'react' import { formatDate, formatIDR } from '@/utils' const Td = ({ children, colSpan, className }) => { return ( {children} ) } const Print = React.forwardRef((props, ref) => { const {user, date, employee, items, amount, cuts, bonus, total} = props return ( <>
{items?.map((item, index) => ( ))}
GAJIAN KONVEKSI
Nama Tukang {employee?.name} Nomer Telpon {employee?.whatsapp}
Tanggal Pembuatan {formatDate(date)} Dibuat Oleh {user?.name}
Detail Gajian
# Nama Barang Harga Jumlah Subtotal
{index + 1} {item?.name} {formatIDR(item?.price)} {formatIDR(item?.quantity)} {formatIDR(item?.quantity * item?.price)}
Total {formatIDR(amount)}
Potongan/Pinjaman {formatIDR(cuts)}
Bonus {formatIDR(bonus)}
Total Diterima {formatIDR(total)}
) }) export default Print