added invoice and order collection
This commit is contained in:
@@ -246,20 +246,50 @@ public class ConsoleLib {
|
||||
String[] foodPlanParts = Database.select("food_plan", new String[]{"date"}, new String[]{date}).get(0).split(":");
|
||||
food_selectionData[1] = foodPlanParts[0];
|
||||
System.out.println("Hauptspeisen: ");
|
||||
System.out.println(Database.select("food",new String[]{"food"},new String[]{foodPlanParts[2]}).get(0));
|
||||
System.out.println(Database.select("food",new String[]{"food"},new String[]{foodPlanParts[3]}).get(0));
|
||||
System.out.println(Database.select("food",new String[]{"id"},new String[]{foodPlanParts[2]}).get(0));
|
||||
System.out.println(Database.select("food",new String[]{"id"},new String[]{foodPlanParts[3]}).get(0));
|
||||
System.out.print("Id: ");
|
||||
food_selectionData[2] = sc.nextLine();
|
||||
if(FoodMgr.createFood_selection(food_selectionData) < 1){
|
||||
System.out.println("Fehler");
|
||||
}
|
||||
System.out.println("Nachspeisen: ");
|
||||
System.out.println(Database.select("food",new String[]{"food"},new String[]{foodPlanParts[4]}).get(0));
|
||||
System.out.println(Database.select("food",new String[]{"food"},new String[]{foodPlanParts[5]}).get(0));
|
||||
System.out.println(Database.select("food",new String[]{"id"},new String[]{foodPlanParts[4]}).get(0));
|
||||
System.out.println(Database.select("food",new String[]{"id"},new String[]{foodPlanParts[5]}).get(0));
|
||||
System.out.print("Id: ");
|
||||
food_selectionData[2] = sc.nextLine();
|
||||
if(FoodMgr.createFood_selection(food_selectionData) < 1){
|
||||
System.out.println("Fehler");
|
||||
}
|
||||
}
|
||||
|
||||
public static void dayOrderPrompt(){
|
||||
System.out.println("Zusammenfassung des Tages");
|
||||
System.out.print("Datum eingeben: ");
|
||||
Scanner sc = new Scanner(System.in);
|
||||
String date = sc.nextLine();
|
||||
List<String> dayOrder = FoodMgr.getDayOrder(date);
|
||||
for (String food : dayOrder) {
|
||||
System.out.println(food);
|
||||
}
|
||||
}
|
||||
|
||||
public static void invoicePrompt(){
|
||||
System.out.println("Monatsabrechnung");
|
||||
System.out.print("Monat(YYYY-MM): ");
|
||||
Scanner sc = new Scanner(System.in);
|
||||
String date = sc.nextLine();
|
||||
System.out.print("ID des Kindes: ");
|
||||
String id = sc.nextLine();
|
||||
List<String> invoice = AccountMgr.getInvoice(date,id);
|
||||
printConsole(invoice);
|
||||
}
|
||||
|
||||
public static void changePricePrompt(){
|
||||
System.out.print("Neuer Preis: ");
|
||||
Scanner sc = new Scanner(System.in);
|
||||
double price = sc.nextDouble();
|
||||
sc.nextLine();
|
||||
AccountMgr.price = price;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user