add product id
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user