add product id

This commit is contained in:
2026-05-29 16:34:59 +03:30
parent 9db796b8e1
commit fad1f2969a
3 changed files with 20 additions and 6 deletions
@@ -40,6 +40,12 @@ const InvoiceItemRow: FC<Props> = ({
const total = getItemLineTotal(item);
const subTotal = getItemSubTotal(item);
const isPercentDiscount = item.discountPercent != null;
const convertToOrderUrl = item.id
? `${Paths.convertToOrder}?${new URLSearchParams({
invoiceItemId: item.id,
productId: item.productId,
}).toString()}`
: "";
const handleProductChange = (e: ChangeEvent<HTMLSelectElement>) => {
onChange(index, "productId", e.target.value);
@@ -183,7 +189,7 @@ const InvoiceItemRow: FC<Props> = ({
</button>
)}
{item.id && (
<Link to={Paths.convertToOrder + '?invoiceItemId=' + item.id}>
<Link to={convertToOrderUrl}>
<button
type="button"
onClick={onConvertToOrder}