Skip to content

Commit

Permalink
#824 [Backoffice] Create Product require select "tax class" even not …
Browse files Browse the repository at this point in the history
…tick "tax included" checkbox (#846)

* #824 Tax included setting should be set globally, not at individual product.
  • Loading branch information
nashtech-tuannguyenhuu1 authored Aug 9, 2024
1 parent e548461 commit 970ded4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const ProductGeneralInformation = ({ register, errors, setValue }: Props) => {
getProduct(+id)
.then((data) => {
setProduct(data);
setValue('taxClassId', data.taxClassId ?? '');
setLoading(false);
})
.catch((error) => {
Expand Down Expand Up @@ -174,13 +175,6 @@ const ProductGeneralInformation = ({ register, errors, setValue }: Props) => {
register={register}
defaultChecked={product?.stockTrackingEnabled}
/>

<CheckBox
labelText="Tax Included"
field="taxIncluded"
register={register}
defaultChecked={product?.taxIncluded}
/>
<OptionSelect
labelText="Tax Class"
field="taxClassId"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ public ProductGetDetailVm createProduct(ProductPostVm productPostVm) {
.isFeatured(productPostVm.isFeatured())
.isVisibleIndividually(productPostVm.isVisibleIndividually())
.stockTrackingEnabled(productPostVm.stockTrackingEnabled())
.taxIncluded(productPostVm.taxIncluded())
.metaTitle(productPostVm.metaTitle())
.metaKeyword(productPostVm.metaKeyword())
.metaDescription(productPostVm.description())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ public record ProductPostVm(
Boolean isFeatured,
Boolean isVisibleIndividually,
Boolean stockTrackingEnabled,

Boolean taxIncluded,
String metaTitle,
String metaKeyword,
String metaDescription,
Expand Down

0 comments on commit 970ded4

Please sign in to comment.