Browse Source

set tax to 0

master
azri 1 week ago
parent
commit
c2d4846ede
2 changed files with 4 additions and 4 deletions
  1. 2
    2
      src/components/SideCart/SideCart.jsx
  2. 2
    2
      src/pages/Cart.jsx

+ 2
- 2
src/components/SideCart/SideCart.jsx View File

194
                 <Typography variant="body1" sx={{ fontWeight: "400" }}>Taxes</Typography>
194
                 <Typography variant="body1" sx={{ fontWeight: "400" }}>Taxes</Typography>
195
                 <Typography variant="body1" sx={{ fontWeight: "400" }}>
195
                 <Typography variant="body1" sx={{ fontWeight: "400" }}>
196
                   {`
196
                   {`
197
-                    ${cart?.cost?.totalTaxAmount?.currencyCode} 
198
-                    ${parseFloat(cart?.cost?.totalTaxAmount?.amount).toFixed(2)}
197
+                    ${cart?.cost?.totalTaxAmount?.currencyCode || ""} 
198
+                    ${parseFloat(cart?.cost?.totalTaxAmount?.amount || 0).toFixed(2)}
199
                   `}
199
                   `}
200
                 </Typography>
200
                 </Typography>
201
               </Box>
201
               </Box>

+ 2
- 2
src/pages/Cart.jsx View File

207
               <Typography variant="body1" sx={{ fontWeight: "400" }}>Taxes</Typography>
207
               <Typography variant="body1" sx={{ fontWeight: "400" }}>Taxes</Typography>
208
               <Typography variant="body1" sx={{ fontWeight: "400" }}>
208
               <Typography variant="body1" sx={{ fontWeight: "400" }}>
209
                 {`
209
                 {`
210
-                  ${cart?.cost?.totalTaxAmount?.currencyCode} 
211
-                  ${parseFloat(cart?.cost?.totalTaxAmount?.amount).toFixed(2)}
210
+                  ${cart?.cost?.totalTaxAmount?.currencyCode || ""} 
211
+                  ${parseFloat(cart?.cost?.totalTaxAmount?.amount || 0).toFixed(2)}
212
                 `}
212
                 `}
213
               </Typography>
213
               </Typography>
214
             </Box>
214
             </Box>

Loading…
Cancel
Save