From 1d22b4349b8c7d1b5c62643ffd4146662cf0033e Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Fri, 3 Feb 2023 14:47:54 +0700 Subject: download invoice --- src/pages/my/invoice/[id].js | 18 ++++++++++++++++-- src/pages/shop/product/[slug].js | 2 +- src/styles/globals.css | 1 + 3 files changed, 18 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/pages/my/invoice/[id].js b/src/pages/my/invoice/[id].js index d13cf7a6..cc66fd22 100644 --- a/src/pages/my/invoice/[id].js +++ b/src/pages/my/invoice/[id].js @@ -47,7 +47,11 @@ export default function DetailInvoice() { }; const downloadTaxInvoice = () => { - window.open(`${process.env.ODOO_HOST}/api/v1/download/tax-invoice/${invoice.id}/${invoice.efaktur_token}`, '_blank') + window.open(`${process.env.ODOO_HOST}/api/v1/download/tax-invoice/${invoice.id}/${invoice.token}`, '_blank') + } + + const downloadInvoice = () => { + window.open(`${process.env.ODOO_HOST}/api/v1/download/invoice/${invoice.id}/${invoice.token}`, '_blank') } return ( @@ -85,13 +89,23 @@ export default function DetailInvoice() { { invoice?.invoice_date } +
+

Faktur Pembelian

+ +

Faktur Pajak

diff --git a/src/pages/shop/product/[slug].js b/src/pages/shop/product/[slug].js index 281f2bc2..03fac0be 100644 --- a/src/pages/shop/product/[slug].js +++ b/src/pages/shop/product/[slug].js @@ -190,7 +190,7 @@ export default function ProductDetail({ product }) { {product.lowest_price.discount_percentage > 0 ? (

{currencyFormat(activeVariant.price.price)}

- {activeVariant.price.discount_percentage}% + {activeVariant.price.discount_percentage}%
) : ''} diff --git a/src/styles/globals.css b/src/styles/globals.css index ec603157..0a1b7a3d 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -196,6 +196,7 @@ html, body { text-gray_r-1 disabled:text-gray_r-1 disabled:bg-red_r-8 + disabled:border-red_r-8 ; } -- cgit v1.2.3