Edit saveReport

This commit is contained in:
2026-05-21 20:04:58 +03:30
parent 50723fbed7
commit 6da56d771e
+4 -4
View File
@@ -88,10 +88,10 @@ public class ReportGenerator {
{
PrintWriter writer = new PrintWriter("report.txt");
writer.println("========= SALES REPORT =========");
writer.println("===== SALES REPORT =====");
writer.println("Total Quantity Sold: " + totalQuantity);
writer.println("Total Final Cost: " + totalFinalCost);
writer.println("Total Discount Value: " + totalDiscountValue);
writer.println("Total Final Cost: " + String.format("%.2f", totalFinalCost));
writer.println("Total Discount Value: " + String.format("%.2f", totalDiscountValue));
writer.println("Invalid Rows: " + totalInvalidLines);
writer.close();
@@ -100,7 +100,7 @@ public class ReportGenerator {
}
catch (IOException e)
{
System.err.println("Failed in writing the report!");
System.err.println("Failed to write the report!");
}
}
}