code cleanup
This commit is contained in:
parent
c1b9588189
commit
e138476d76
|
@ -62,16 +62,12 @@ public class InternArticleController {
|
||||||
|
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public String internListedArticlesId(Model model, @PathVariable String id) {
|
public String internListedArticlesId(Model model, @PathVariable String id) {
|
||||||
|
|
||||||
int articleid = Integer.parseInt(id);
|
int articleid = Integer.parseInt(id);
|
||||||
|
|
||||||
UImodelArticle total = new UImodelArticle();
|
UImodelArticle total = new UImodelArticle();
|
||||||
|
|
||||||
total.addArticle(articleRepository.findArticleById(articleid),
|
total.addArticle(articleRepository.findArticleById(articleid),
|
||||||
warehouseEntryRepository.getArticleStock(articleid).orElse(0));
|
warehouseEntryRepository.getArticleStock(articleid).orElse(0));
|
||||||
|
|
||||||
model.addAttribute("ArticleID", total);
|
model.addAttribute("ArticleID", total);
|
||||||
|
|
||||||
return "intern/listedArticles/id";
|
return "intern/listedArticles/id";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,25 +188,18 @@ public class InternArticleController {
|
||||||
public static class UImodelArticles {
|
public static class UImodelArticles {
|
||||||
|
|
||||||
public String imgPath;
|
public String imgPath;
|
||||||
|
|
||||||
public String title;
|
public String title;
|
||||||
|
|
||||||
public String price;
|
public String price;
|
||||||
|
public String priceNet;
|
||||||
public String price_netto;
|
|
||||||
|
|
||||||
public String categorie;
|
public String categorie;
|
||||||
|
|
||||||
public int stock;
|
public int stock;
|
||||||
|
public long offerID;
|
||||||
public long offer_id;
|
|
||||||
|
|
||||||
public long id;
|
public long id;
|
||||||
|
|
||||||
void addListedArticle(Article article, int stock) {
|
void addListedArticle(Article article, int stock) {
|
||||||
this.imgPath = article.image.path;
|
this.imgPath = article.image.path;
|
||||||
this.title = article.title;
|
this.title = article.title;
|
||||||
this.price_netto = String.format("%.2f", ((float) article.shopPricePerUnitNetCent / 100));
|
this.priceNet = String.format("%.2f", ((float) article.shopPricePerUnitNetCent / 100));
|
||||||
this.price = String.format("%.2f", ((float) article.getPriceGross() / 100));
|
this.price = String.format("%.2f", ((float) article.getPriceGross() / 100));
|
||||||
|
|
||||||
StringBuilder result = new StringBuilder();
|
StringBuilder result = new StringBuilder();
|
||||||
|
@ -221,7 +210,7 @@ public class InternArticleController {
|
||||||
this.categorie = result.toString();
|
this.categorie = result.toString();
|
||||||
|
|
||||||
this.stock = stock;
|
this.stock = stock;
|
||||||
this.offer_id = article.related.id;
|
this.offerID = article.related.id;
|
||||||
this.id = article.id;
|
this.id = article.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -231,116 +220,28 @@ public class InternArticleController {
|
||||||
public String imgPath;
|
public String imgPath;
|
||||||
public String title;
|
public String title;
|
||||||
public String price;
|
public String price;
|
||||||
public String price_netto;
|
public String priceNet;
|
||||||
public String reorderMaxPrice;
|
public String reorderMaxPrice;
|
||||||
public String categorie;
|
public String categorie;
|
||||||
public int stock;
|
public int stock;
|
||||||
public long offer_id;
|
public long offerID;
|
||||||
public long id;
|
public long id;
|
||||||
public boolean shouldReorder;
|
public boolean shouldReorder;
|
||||||
public String warehouseUnitsPerSlot;
|
public String warehouseUnitsPerSlot;
|
||||||
public String description;
|
public String description;
|
||||||
|
|
||||||
public String getImgPath() {
|
|
||||||
return imgPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setImgPath(String imgPath) {
|
|
||||||
this.imgPath = imgPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTitle() {
|
|
||||||
return title;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTitle(String title) {
|
|
||||||
this.title = title;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPrice() {
|
|
||||||
return price;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPrice(String price) {
|
|
||||||
this.price = price;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPrice_netto() {
|
|
||||||
return price_netto;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPrice_netto(String price_netto) {
|
|
||||||
this.price_netto = price_netto;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getReorderMaxPrice() {
|
|
||||||
return reorderMaxPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setReorderMaxPrice(String reorderMaxPrice) {
|
|
||||||
this.reorderMaxPrice = reorderMaxPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCategorie() {
|
public String getCategorie() {
|
||||||
return categorie;
|
return categorie;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCategorie(String categorie) {
|
|
||||||
this.categorie = categorie;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getStock() {
|
|
||||||
return stock;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStock(int stock) {
|
|
||||||
this.stock = stock;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getOffer_id() {
|
|
||||||
return offer_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOffer_id(long offer_id) {
|
|
||||||
this.offer_id = offer_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(long id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isShouldReorder() {
|
|
||||||
return shouldReorder;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setShouldReorder(boolean shouldReorder) {
|
|
||||||
this.shouldReorder = shouldReorder;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getWarehouseUnitsPerSlot() {
|
|
||||||
return warehouseUnitsPerSlot;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setWarehouseUnitsPerSlot(String warehouseUnitsPerSlot) {
|
|
||||||
this.warehouseUnitsPerSlot = warehouseUnitsPerSlot;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return description;
|
return description;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDescription(String description) {
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
|
|
||||||
void addArticle(Article article, int stock) {
|
void addArticle(Article article, int stock) {
|
||||||
this.imgPath = article.image.path;
|
this.imgPath = article.image.path;
|
||||||
this.title = article.title;
|
this.title = article.title;
|
||||||
this.price_netto = String.format("%.2f", ((float) article.shopPricePerUnitNetCent / 100));
|
this.priceNet = String.format("%.2f", ((float) article.shopPricePerUnitNetCent / 100));
|
||||||
this.price = String.format("%.2f", ((float) article.getPriceGross() / 100));
|
this.price = String.format("%.2f", ((float) article.getPriceGross() / 100));
|
||||||
|
|
||||||
StringBuilder result = new StringBuilder();
|
StringBuilder result = new StringBuilder();
|
||||||
|
@ -352,7 +253,7 @@ public class InternArticleController {
|
||||||
this.categorie = result.toString();
|
this.categorie = result.toString();
|
||||||
|
|
||||||
this.stock = stock;
|
this.stock = stock;
|
||||||
this.offer_id = article.related.id;
|
this.offerID = article.related.id;
|
||||||
this.id = article.id;
|
this.id = article.id;
|
||||||
this.reorderMaxPrice = String.format("%.2f", ((float) article.reorderMaxPrice / 100));
|
this.reorderMaxPrice = String.format("%.2f", ((float) article.reorderMaxPrice / 100));
|
||||||
this.shouldReorder = article.shouldReorder;
|
this.shouldReorder = article.shouldReorder;
|
||||||
|
|
|
@ -19,9 +19,7 @@ import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.servlet.view.RedirectView;
|
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/intern/")
|
@RequestMapping("/intern/")
|
||||||
|
@ -86,26 +84,9 @@ public class SupplierIndexController {
|
||||||
return "intern/suppliers/id";
|
return "intern/suppliers/id";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class UImodelSuppliers {
|
public class UImodelSuppliers {
|
||||||
long id;
|
public long id;
|
||||||
String name;
|
public String name;
|
||||||
|
|
||||||
public long getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(long id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public UImodelSuppliers(long id, String name) {
|
public UImodelSuppliers(long id, String name) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
@ -116,42 +97,10 @@ public class SupplierIndexController {
|
||||||
|
|
||||||
public class UImodelSupplierDetail {
|
public class UImodelSupplierDetail {
|
||||||
|
|
||||||
String name;
|
public String name;
|
||||||
String balance;
|
public String balance;
|
||||||
List<UImodelSupplierDetailOrders> orders;
|
public List<UImodelSupplierDetailOrders> orders;
|
||||||
List<UImodelSupplierDetailBookings> bookings;
|
public List<UImodelSupplierDetailBookings> bookings;
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBalance() {
|
|
||||||
return balance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBalance(String balance) {
|
|
||||||
this.balance = balance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<UImodelSupplierDetailOrders> getOrders() {
|
|
||||||
return orders;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOrders(List<UImodelSupplierDetailOrders> orders) {
|
|
||||||
this.orders = orders;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<UImodelSupplierDetailBookings> getBookings() {
|
|
||||||
return bookings;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBookings(List<UImodelSupplierDetailBookings> bookings) {
|
|
||||||
this.bookings = bookings;
|
|
||||||
}
|
|
||||||
|
|
||||||
public UImodelSupplierDetail(String name, String balance, List<UImodelSupplierDetailOrders> orders,
|
public UImodelSupplierDetail(String name, String balance, List<UImodelSupplierDetailOrders> orders,
|
||||||
List<UImodelSupplierDetailBookings> bookings) {
|
List<UImodelSupplierDetailBookings> bookings) {
|
||||||
|
@ -164,86 +113,22 @@ public class SupplierIndexController {
|
||||||
}
|
}
|
||||||
|
|
||||||
public class UImodelSupplierDetailOrders {
|
public class UImodelSupplierDetailOrders {
|
||||||
long id;
|
public long id;
|
||||||
String dateOrder;
|
public String dateOrder;
|
||||||
String articleName;
|
public String articleName;
|
||||||
long articleId;
|
public long articleId;
|
||||||
String priceNetto;
|
public String priceNet;
|
||||||
String quantity;
|
public String quantity;
|
||||||
String price_total;
|
public String priceTotal;
|
||||||
boolean arrived;
|
public boolean arrived;
|
||||||
|
|
||||||
public long getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(long id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDateOrder() {
|
|
||||||
return dateOrder;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDateOrder(String dateOrder) {
|
|
||||||
this.dateOrder = dateOrder;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getArticleName() {
|
|
||||||
return articleName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setArticleName(String articleName) {
|
|
||||||
this.articleName = articleName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPriceNetto() {
|
|
||||||
return priceNetto;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPriceNetto(String priceNetto) {
|
|
||||||
this.priceNetto = priceNetto;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getQuantity() {
|
|
||||||
return quantity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setQuantity(String quantity) {
|
|
||||||
this.quantity = quantity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPrice_total() {
|
|
||||||
return price_total;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPrice_total(String price_total) {
|
|
||||||
this.price_total = price_total;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getArticleId() {
|
|
||||||
return articleId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setArticleId(long articleId) {
|
|
||||||
this.articleId = articleId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isArrived() {
|
|
||||||
return arrived;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setArrived(boolean arrived) {
|
|
||||||
this.arrived = arrived;
|
|
||||||
}
|
|
||||||
|
|
||||||
public UImodelSupplierDetailOrders(SupplierOrder order) {
|
public UImodelSupplierDetailOrders(SupplierOrder order) {
|
||||||
this.id = order.id;
|
this.id = order.id;
|
||||||
this.articleName = order.ordered.title;
|
this.articleName = order.ordered.title;
|
||||||
this.articleId = order.ordered.id;
|
this.articleId = order.ordered.id;
|
||||||
this.priceNetto = String.format("%.2f", ((float) order.pricePerUnitNetCent / 100));
|
this.priceNet = String.format("%.2f", ((float) order.pricePerUnitNetCent / 100));
|
||||||
this.quantity = String.valueOf(order.numberOfUnits);
|
this.quantity = String.valueOf(order.numberOfUnits);
|
||||||
this.price_total = String.format("%.2f", ((float) order.totalPriceNet / 100));
|
this.priceTotal = String.format("%.2f", ((float) order.totalPriceNet / 100));
|
||||||
|
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
date.setTime(order.created.getTime());
|
date.setTime(order.created.getTime());
|
||||||
|
@ -259,60 +144,12 @@ public class SupplierIndexController {
|
||||||
|
|
||||||
public class UImodelSupplierDetailBookings {
|
public class UImodelSupplierDetailBookings {
|
||||||
|
|
||||||
String dateBooking;
|
public String dateBooking;
|
||||||
String price;
|
public String price;
|
||||||
String srcName;
|
public String srcName;
|
||||||
String balance;
|
public String balance;
|
||||||
String reason;
|
public String reason;
|
||||||
long orderID;
|
public long orderID;
|
||||||
|
|
||||||
public String getDateBooking() {
|
|
||||||
return dateBooking;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDateBooking(String dateBooking) {
|
|
||||||
this.dateBooking = dateBooking;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPrice() {
|
|
||||||
return price;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPrice(String price) {
|
|
||||||
this.price = price;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSrcName() {
|
|
||||||
return srcName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSrcName(String srcName) {
|
|
||||||
this.srcName = srcName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBalance() {
|
|
||||||
return balance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBalance(String balance) {
|
|
||||||
this.balance = balance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getReason() {
|
|
||||||
return reason;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setReason(String reason) {
|
|
||||||
this.reason = reason;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getOrderID() {
|
|
||||||
return orderID;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOrderID(long orderID) {
|
|
||||||
this.orderID = orderID;
|
|
||||||
}
|
|
||||||
|
|
||||||
public UImodelSupplierDetailBookings(Booking booking) {
|
public UImodelSupplierDetailBookings(Booking booking) {
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
|
|
|
@ -40,94 +40,22 @@ public class SupplierOfferController {
|
||||||
|
|
||||||
public class UImodelOfferedArticle {
|
public class UImodelOfferedArticle {
|
||||||
|
|
||||||
long offer_id;
|
public long offerId;
|
||||||
String title;
|
public String title;
|
||||||
String manufacturer;
|
public String manufacturer;
|
||||||
String articlenumber;
|
public String articleNumber;
|
||||||
String supplierName;
|
public String supplierName;
|
||||||
String price;
|
public String price;
|
||||||
String ads;
|
public String ads;
|
||||||
int listedArticleId;
|
public int listedArticleId;
|
||||||
boolean offerIsListed; // true --> offered article is listed
|
public boolean offerIsListed; // true --> offered article is listed
|
||||||
|
|
||||||
public long getOffer_id() {
|
|
||||||
return offer_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOffer_id(long offer_id) {
|
|
||||||
this.offer_id = offer_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isOfferIsListed() {
|
|
||||||
return offerIsListed;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOfferIsListed(boolean offerIsListed) {
|
|
||||||
this.offerIsListed = offerIsListed;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTitle() {
|
|
||||||
return title;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTitle(String title) {
|
|
||||||
this.title = title;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getManufacturer() {
|
|
||||||
return manufacturer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setManufacturer(String manufacturer) {
|
|
||||||
this.manufacturer = manufacturer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getArticlenumber() {
|
|
||||||
return articlenumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setArticlenumber(String articlenumber) {
|
|
||||||
this.articlenumber = articlenumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSupplierName() {
|
|
||||||
return supplierName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSupplierName(String supplierName) {
|
|
||||||
this.supplierName = supplierName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPrice() {
|
|
||||||
return price;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPrice(String price) {
|
|
||||||
this.price = price;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAds() {
|
|
||||||
return ads;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAds(String ads) {
|
|
||||||
this.ads = ads;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getListedArticleId() {
|
|
||||||
return listedArticleId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setListedArticleId(int listedArticleId) {
|
|
||||||
this.listedArticleId = listedArticleId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addData(ArticleOffer article, Optional<Integer> listedArticleId) {
|
public void addData(ArticleOffer article, Optional<Integer> listedArticleId) {
|
||||||
|
|
||||||
this.offer_id = article.id;
|
this.offerId = article.id;
|
||||||
this.title = article.title;
|
this.title = article.title;
|
||||||
this.manufacturer = article.manufacturer;
|
this.manufacturer = article.manufacturer;
|
||||||
this.articlenumber = article.articleNumber;
|
this.articleNumber = article.articleNumber;
|
||||||
this.supplierName = article.cheapestSupplier.name;
|
this.supplierName = article.cheapestSupplier.name;
|
||||||
this.price = String.format("%.2f", ((float) article.pricePerUnitNet / 100));
|
this.price = String.format("%.2f", ((float) article.pricePerUnitNet / 100));
|
||||||
this.ads = (article.shouldBeAdvertised) ? "Ja" : "Nein";
|
this.ads = (article.shouldBeAdvertised) ? "Ja" : "Nein";
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class SupplierOrderController {
|
||||||
Optional<SupplierOrder> order = supplierOrderRepository.findById(supplierOrderID);
|
Optional<SupplierOrder> order = supplierOrderRepository.findById(supplierOrderID);
|
||||||
|
|
||||||
if (order.isPresent()) {
|
if (order.isPresent()) {
|
||||||
//TODO call action
|
// TODO call action
|
||||||
|
|
||||||
System.out.println("Order is present\n");
|
System.out.println("Order is present\n");
|
||||||
|
|
||||||
|
@ -56,96 +56,24 @@ public class SupplierOrderController {
|
||||||
}
|
}
|
||||||
|
|
||||||
public class UImodelSupplierOrder {
|
public class UImodelSupplierOrder {
|
||||||
long id;
|
public long id;
|
||||||
String dateOrder;
|
public String dateOrder;
|
||||||
String supplierName;
|
public String supplierName;
|
||||||
String articleName;
|
public String articleName;
|
||||||
long articleId;
|
public long articleId;
|
||||||
String priceNetto;
|
public String priceNet;
|
||||||
String quantity;
|
public String quantity;
|
||||||
String price_total;
|
public String priceTotal;
|
||||||
boolean arrived;
|
public boolean arrived;
|
||||||
|
|
||||||
public long getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(long id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDateOrder() {
|
|
||||||
return dateOrder;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDateOrder(String dateOrder) {
|
|
||||||
this.dateOrder = dateOrder;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getArticleName() {
|
|
||||||
return articleName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setArticleName(String articleName) {
|
|
||||||
this.articleName = articleName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPriceNetto() {
|
|
||||||
return priceNetto;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPriceNetto(String priceNetto) {
|
|
||||||
this.priceNetto = priceNetto;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getQuantity() {
|
|
||||||
return quantity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setQuantity(String quantity) {
|
|
||||||
this.quantity = quantity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPrice_total() {
|
|
||||||
return price_total;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPrice_total(String price_total) {
|
|
||||||
this.price_total = price_total;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getArticleId() {
|
|
||||||
return articleId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setArticleId(long articleId) {
|
|
||||||
this.articleId = articleId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isArrived() {
|
|
||||||
return arrived;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setArrived(boolean arrived) {
|
|
||||||
this.arrived = arrived;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSupplierName() {
|
|
||||||
return supplierName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSupplierName(String supplierName) {
|
|
||||||
this.supplierName = supplierName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public UImodelSupplierOrder(SupplierOrder order) {
|
public UImodelSupplierOrder(SupplierOrder order) {
|
||||||
this.id = order.id;
|
this.id = order.id;
|
||||||
this.supplierName = order.supplier.name;
|
this.supplierName = order.supplier.name;
|
||||||
this.articleName = order.ordered.title;
|
this.articleName = order.ordered.title;
|
||||||
this.articleId = order.ordered.id;
|
this.articleId = order.ordered.id;
|
||||||
this.priceNetto = String.format("%.2f", ((float) order.pricePerUnitNetCent / 100));
|
this.priceNet = String.format("%.2f", ((float) order.pricePerUnitNetCent / 100));
|
||||||
this.quantity = String.valueOf(order.numberOfUnits);
|
this.quantity = String.valueOf(order.numberOfUnits);
|
||||||
this.price_total = String.format("%.2f", ((float) order.totalPriceNet / 100));
|
this.priceTotal = String.format("%.2f", ((float) order.totalPriceNet / 100));
|
||||||
|
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
date.setTime(order.created.getTime());
|
date.setTime(order.created.getTime());
|
||||||
|
|
|
@ -28,9 +28,9 @@
|
||||||
</p>
|
</p>
|
||||||
<p class="s">
|
<p class="s">
|
||||||
<label for="ref_disabled">Refernzierter Artikel</label>
|
<label for="ref_disabled">Refernzierter Artikel</label>
|
||||||
<input class="" type="text" id="ref_disabled" th:value="${ArticleID.offer_id}" disabled/>
|
<input class="" type="text" id="ref_disabled" th:value="${ArticleID.offerID}" disabled/>
|
||||||
|
|
||||||
<input type="hidden" id="ref_hidden" th:value="${ArticleID.offer_id}" name="ref-article" />
|
<input type="hidden" id="ref_hidden" th:value="${ArticleID.offerID}" name="ref-article" />
|
||||||
|
|
||||||
<a th:href="${'/intern/supplierOffers/#q=' + ArticleID.id}">Details</a>
|
<a th:href="${'/intern/supplierOffers/#q=' + ArticleID.id}">Details</a>
|
||||||
</p>
|
</p>
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
<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 th:value="${ArticleID.priceNet}"/> EUR <br/>
|
||||||
(19% Mwst.)
|
(19% 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
|
||||||
|
|
|
@ -50,10 +50,10 @@
|
||||||
<td><img th:src="@{/shop/articles/{id}/image.jpg(id=${article.id})}" class="s"/></td>
|
<td><img th:src="@{/shop/articles/{id}/image.jpg(id=${article.id})}" class="s"/></td>
|
||||||
<td><span th:text="${article.title}"></span></td>
|
<td><span th:text="${article.title}"></span></td>
|
||||||
<td><span th:text="${article.price}"></span> €</td>
|
<td><span th:text="${article.price}"></span> €</td>
|
||||||
<td><span th:text="${article.price_netto}"></span> €</td>
|
<td><span th:text="${article.priceNet}"></span> €</td>
|
||||||
<td><span th:text="${article.categorie}"></span></td>
|
<td><span th:text="${article.categorie}"></span></td>
|
||||||
<td><span th:text="${article.stock}"></span></td>
|
<td><span th:text="${article.stock}"></span></td>
|
||||||
<td><a th:href="${'/intern/supplierOffers/#q=' + article.title}" th:text="${article.offer_id}"></a></td>
|
<td><a th:href="${'/intern/supplierOffers/#q=' + article.title}" th:text="${article.offerID}"></a></td>
|
||||||
<td><a th:href="@{/intern/articles/{id}(id = ${article.id})}" th:text="${article.id}"></a></td>
|
<td><a th:href="@{/intern/articles/{id}(id = ${article.id})}" th:text="${article.id}"></a></td>
|
||||||
<td>
|
<td>
|
||||||
<form th:action="@{/intern/articles/{id}(id = ${article.id})}"><input class="button smaller" type="submit" value="Bearbeiten" /></form>
|
<form th:action="@{/intern/articles/{id}(id = ${article.id})}"><input class="button smaller" type="submit" value="Bearbeiten" /></form>
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
<tr th:each="article : ${OfferedArticles}">
|
<tr th:each="article : ${OfferedArticles}">
|
||||||
<td><span th:text="${article.title}"></span></td>
|
<td><span th:text="${article.title}"></span></td>
|
||||||
<td><span th:text="${article.manufacturer}"></span></td>
|
<td><span th:text="${article.manufacturer}"></span></td>
|
||||||
<td><span th:text="${article.articlenumber}"></span></td>
|
<td><span th:text="${article.articleNumber}"></span></td>
|
||||||
<td><a th:href="${'/intern/suppliers/#q=' + article.supplierName}" th:text="${article.supplierName}"></a></td>
|
<td><a th:href="${'/intern/suppliers/#q=' + article.supplierName}" th:text="${article.supplierName}"></a></td>
|
||||||
<td><span th:text="${article.price}"></span> €</td>
|
<td><span th:text="${article.price}"></span> €</td>
|
||||||
<td><span th:text="${article.ads}"></span></td>
|
<td><span th:text="${article.ads}"></span></td>
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- ELSE -->
|
<!-- ELSE -->
|
||||||
<div th:unless="${article.offerIsListed}">
|
<div th:unless="${article.offerIsListed}">
|
||||||
<form class="detailgrid" action="#" th:action="@{/intern/articles/addArticle/{id}(id = ${article.offer_id})}" method="POST">
|
<form class="detailgrid" action="#" th:action="@{/intern/articles/addArticle/{id}(id = ${article.offerId})}" method="POST">
|
||||||
<input class="button smaller" type="submit" value="Hinzufügen" />
|
<input class="button smaller" type="submit" value="Hinzufügen" />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -48,9 +48,9 @@
|
||||||
<td><span th:text="${order.dateOrder}"></span></td>
|
<td><span th:text="${order.dateOrder}"></span></td>
|
||||||
<td><span th:text="${order.supplierName}"></span></td>
|
<td><span th:text="${order.supplierName}"></span></td>
|
||||||
<td><a th:href="@{/intern/articles/{id}(id = ${order.articleId})}" class="button smaller" th:text="${order.articleName}"></a></td>
|
<td><a th:href="@{/intern/articles/{id}(id = ${order.articleId})}" class="button smaller" th:text="${order.articleName}"></a></td>
|
||||||
<td><span th:text="${order.priceNetto}"></span> €</td>
|
<td><span th:text="${order.priceNet}"></span> €</td>
|
||||||
<td><span th:text="${order.quantity}"></span></td>
|
<td><span th:text="${order.quantity}"></span></td>
|
||||||
<td><span th:text="${order.price_total}"></span> €</td>
|
<td><span th:text="${order.priceTotal}"></span> €</td>
|
||||||
<td>
|
<td>
|
||||||
<div th:if="${order.arrived}">
|
<div th:if="${order.arrived}">
|
||||||
Angekommen
|
Angekommen
|
||||||
|
|
|
@ -45,9 +45,9 @@
|
||||||
<td><span th:text="${order.id}"></span></td>
|
<td><span th:text="${order.id}"></span></td>
|
||||||
<td><span th:text="${order.dateOrder}"></span></td>
|
<td><span th:text="${order.dateOrder}"></span></td>
|
||||||
<td><a th:href="@{/intern/articles/{id}(id = ${order.articleId})}" class="button smaller" th:text="${order.articleName}"></a></td>
|
<td><a th:href="@{/intern/articles/{id}(id = ${order.articleId})}" class="button smaller" th:text="${order.articleName}"></a></td>
|
||||||
<td><span th:text="${order.priceNetto}"></span> €</td>
|
<td><span th:text="${order.priceNet}"></span> €</td>
|
||||||
<td><span th:text="${order.quantity}"></span></td>
|
<td><span th:text="${order.quantity}"></span></td>
|
||||||
<td><span th:text="${order.price_total}"></span> €</td>
|
<td><span th:text="${order.priceTotal}"></span> €</td>
|
||||||
<td>
|
<td>
|
||||||
<div th:if="${order.arrived}">
|
<div th:if="${order.arrived}">
|
||||||
Angekommen
|
Angekommen
|
||||||
|
|
Reference in New Issue