import React from 'react' import { Head } from '@inertiajs/react' import AuthenticatedLayout from '@/Layouts/AuthenticatedLayout' import { formatDate, formatIDR } from '@/utils' export default function Sale(props) { const { sale, auth } = props return (
Date : {formatDate(sale.date)}
Customer : {sale.customer?.name}
Total : {formatIDR(sale.total)}
{sale?.items?.map((item) => ( ))}
Produk Harga Jumlah Subtotal
{item.product.name} ( {item.product.code}) {formatIDR(item.price)} {formatIDR(item.quantity)} {formatIDR( item.quantity * item.price )}
) }