thoemel / veloboerse

Velos annehmen und verkaufen. Von Privaten und Händlern. Für die Velobörse der Pro Velo Bern.
MIT License
1 stars 0 forks source link

Cash Mgmt: Max. Betrag für Auszahlung #61

Closed thoemel closed 9 years ago

thoemel commented 9 years ago

Beim Cash Management interessiert auch, wie viel Geld wir brauchen würden, wenn alle Privatvelos verkauft würden.

SELECT sum(preis) / 5 FROM velos WHERE haendler_id < 1 OR haendler_id is null group by preis Oder in PHP mit korrekter Provision rechnen.

thoemel commented 9 years ago

Die Query ist inkorrekt (group by) und reicht nicht aus. SELECT sum(preis) FROM velos WHERE (haendler_id < 1 OR haendler_id is null) AND ausbezahlt = 'no'

Ausserdem noch Hochrechnung entsprechend dem bisherigen Verhältnis Bar / Karte

thoemel commented 9 years ago

War Duplikat