Show Tax in Article Edit View. Fixes #48 #49
@ -1,15 +1,5 @@
 | 
			
		||||
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.Category;
 | 
			
		||||
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.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
 | 
			
		||||
@RequestMapping("intern/articles")
 | 
			
		||||
public class InternArticleController {
 | 
			
		||||
@ -243,6 +243,7 @@ public class InternArticleController {
 | 
			
		||||
		public boolean shouldReorder;
 | 
			
		||||
		public String warehouseUnitsPerSlot;
 | 
			
		||||
		public String description;
 | 
			
		||||
		public int vatPercent;
 | 
			
		||||
 | 
			
		||||
		public String getImgPath() {
 | 
			
		||||
			return imgPath;
 | 
			
		||||
@ -268,6 +269,10 @@ public class InternArticleController {
 | 
			
		||||
			this.price = price;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		public int getVatPercent() {
 | 
			
		||||
			return vatPercent;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		public String getPrice_netto() {
 | 
			
		||||
			return price_netto;
 | 
			
		||||
		}
 | 
			
		||||
@ -363,6 +368,7 @@ public class InternArticleController {
 | 
			
		||||
			this.shouldReorder = article.shouldReorder;
 | 
			
		||||
			this.warehouseUnitsPerSlot = String.valueOf(article.warehouseUnitsPerSlot);
 | 
			
		||||
			this.description = article.description;
 | 
			
		||||
			this.vatPercent = article.related.vatPercent;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -47,8 +47,9 @@
 | 
			
		||||
               <div class="s">
 | 
			
		||||
                  <p>
 | 
			
		||||
                     <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/>
 | 
			
		||||
                     (19% Mwst.)
 | 
			
		||||
                     <input class="" type="number" id="price" step="0.01" name="price_netto" required
 | 
			
		||||
                            th:value="${ArticleID.price_netto}"/> EUR <br/>
 | 
			
		||||
                     (<span th:text="${ArticleID.vatPercent}"></span>% Mwst.)
 | 
			
		||||
                     <!-- Info von article ref--> <br/>
 | 
			
		||||
                     = <span th:text="${ArticleID.price}"></span> EUR Brutto
 | 
			
		||||
                  </p>
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user