Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accounting #159

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Accounting #159

wants to merge 8 commits into from

Conversation

CmdrTMir
Copy link
Contributor

Siehe Issue #157 für eine Übersicht der abgeschlossenen und noch offenen Aufgaben.

('2024-07-09 11:00:00', '2024-07-09 11:30:00', 1, 3.50, 13.50),
('2024-06-07 20:30:00', '2024-06-07 21:30:00', 1, 3.50, 9),
('2024-05-05 10:30:00', '2024-05-05 12:00:00', 1, 3.50, 14),
('2024-01-01 22:30:00', '2024-01-01 23:00:00', 1, 3.50, 15.50),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Die Spalten "fare" und "fare_route" stellen Centbeträge dar -> ganzzahlig

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok, ich hatte mich schon gewundert, warum in der Datenbank Integer für diese Beträge drin steht.

{
for (let row of data.tours) {
if (
row.from.getMonth() == 0 ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Das Jahr wird nicht geprüft

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Das stimmt, das habe ich vergessen zu überprüfen.

if (fare == null || fare_route == null) {
return 0;
}
return (fare_route - fare) * 0.97;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.97 als Konstante mit aussagekräftigem Namen,
Preis kann negativ werden, ist das Absicht?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Da wir noch nicht wissen, wie genau die Kosten berechnet werden, habe ich das zum Testen so gelöst.
Siehe auch die offenen Fragen im Issue #157.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants