main
Lukas Klipfel 2025-12-15 02:28:53 +01:00
parent 4d2251af0f
commit dd2f5440af
3 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,5 @@
package backend; package backend;
import java.util.ArrayList;
public class Produkt { public class Produkt {
public int id; public int id;

View File

@ -36,7 +36,7 @@ public class Warenkorb {
public int NettoVersandkosten(){ public int NettoVersandkosten(){
int ret = 0; int ret = 0;
for(int i = 0; i < this.inhalt.size(); i++) { for(int i = 0; i < this.inhalt.size(); i++) {
ret += BruttoVersandkosten()-(((this.inhalt.get(i).netto*this.anzahl.get(i))/NettoPreis())*BruttoVersandkosten())/(1+this.inhalt.get(i).mwStSatz); ret += (((this.inhalt.get(i).netto*this.anzahl.get(i))/NettoPreis())*BruttoVersandkosten())/(1+((double)this.inhalt.get(i).mwStSatz/100));
} }
return ret; return ret;
}; };

View File

@ -153,9 +153,10 @@ public class ShopTUI {
shop.UpdateKundeInWarenkorb(name, addr); shop.UpdateKundeInWarenkorb(name, addr);
}; };
private static void Bestellen() { private static void Bestellen() {
ShowWarenkorb();
shop.AddBestellung(); shop.AddBestellung();
}; };
private static void ShowBestellungen(){}; private static void ShowBestellungen(){ };
private static ArrayList<String> readFile(String path) throws FileNotFoundException { private static ArrayList<String> readFile(String path) throws FileNotFoundException {