Show Tax in Article Edit View. Fixes #48
This commit is contained in:
parent
b38ffdea34
commit
2ef9eb29ac
|
@ -1,15 +1,5 @@
|
||||||
package org.hso.ecommerce.controller.intern;
|
package org.hso.ecommerce.controller.intern;
|
||||||
|
|
||||||
import java.awt.image.BufferedImage;
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.nio.file.Files;
|
|
||||||
import java.nio.file.Paths;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Optional;
|
|
||||||
import javax.imageio.ImageIO;
|
|
||||||
|
|
||||||
import org.hso.ecommerce.entities.shop.Article;
|
import org.hso.ecommerce.entities.shop.Article;
|
||||||
import org.hso.ecommerce.entities.shop.Category;
|
import org.hso.ecommerce.entities.shop.Category;
|
||||||
import org.hso.ecommerce.entities.shop.Image;
|
import org.hso.ecommerce.entities.shop.Image;
|
||||||
|
@ -27,6 +17,16 @@ import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.servlet.view.RedirectView;
|
import org.springframework.web.servlet.view.RedirectView;
|
||||||
|
|
||||||
|
import javax.imageio.ImageIO;
|
||||||
|
import java.awt.image.BufferedImage;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Paths;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("intern/articles")
|
@RequestMapping("intern/articles")
|
||||||
public class InternArticleController {
|
public class InternArticleController {
|
||||||
|
@ -243,6 +243,7 @@ public class InternArticleController {
|
||||||
public boolean shouldReorder;
|
public boolean shouldReorder;
|
||||||
public String warehouseUnitsPerSlot;
|
public String warehouseUnitsPerSlot;
|
||||||
public String description;
|
public String description;
|
||||||
|
public int vatPercent;
|
||||||
|
|
||||||
public String getImgPath() {
|
public String getImgPath() {
|
||||||
return imgPath;
|
return imgPath;
|
||||||
|
@ -268,6 +269,10 @@ public class InternArticleController {
|
||||||
this.price = price;
|
this.price = price;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getVatPercent() {
|
||||||
|
return vatPercent;
|
||||||
|
}
|
||||||
|
|
||||||
public String getPrice_netto() {
|
public String getPrice_netto() {
|
||||||
return price_netto;
|
return price_netto;
|
||||||
}
|
}
|
||||||
|
@ -363,6 +368,7 @@ public class InternArticleController {
|
||||||
this.shouldReorder = article.shouldReorder;
|
this.shouldReorder = article.shouldReorder;
|
||||||
this.warehouseUnitsPerSlot = String.valueOf(article.warehouseUnitsPerSlot);
|
this.warehouseUnitsPerSlot = String.valueOf(article.warehouseUnitsPerSlot);
|
||||||
this.description = article.description;
|
this.description = article.description;
|
||||||
|
this.vatPercent = article.related.vatPercent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,8 +47,9 @@
|
||||||
<div class="s">
|
<div class="s">
|
||||||
<p>
|
<p>
|
||||||
<label for="price">Preis (Netto)</label>
|
<label for="price">Preis (Netto)</label>
|
||||||
<input class="" type="number" id="price" step="0.01" name="price_netto" required th:value="${ArticleID.price_netto}"/> EUR <br/>
|
<input class="" type="number" id="price" step="0.01" name="price_netto" required
|
||||||
(19% Mwst.)
|
th:value="${ArticleID.price_netto}"/> EUR <br/>
|
||||||
|
(<span th:text="${ArticleID.vatPercent}"></span>% Mwst.)
|
||||||
<!-- Info von article ref--> <br/>
|
<!-- Info von article ref--> <br/>
|
||||||
= <span th:text="${ArticleID.price}"></span> EUR Brutto
|
= <span th:text="${ArticleID.price}"></span> EUR Brutto
|
||||||
</p>
|
</p>
|
||||||
|
|
Reference in New Issue