19-06-2020, Friday-15:42:25
Wenn das alles von vorne bis hinten aufgehen soll, dann werden wir um ein tageweise oder anderen festen Intervall Buchen nicht herum kommen.
Dann sind wir recht nahe an meinem ursprünglichen Patch.
Dann muss das Buchen in eine eigene Routine.
und an geeigneter Stelle dann der Aufruf
Dann sind wir recht nahe an meinem ursprünglichen Patch.
Dann muss das Buchen in eine eigene Routine.
Zitat:/**
* convoi add there fixed cost per month per day / per syncpoint
*/
void convoi_t::add_fixed_cost()
{ part_of_fixed_cost = sum_fixed_costs / wie oft "add_fixed_cost" pro Monat aufgerufen wird;
jahresgewinn += part_of_fixed_cost;
waytype_t wtyp = ignore_wt;
if(schedule_t* s = get_schedule())
{
wtyp = s->get_waytype();
}
else
{
wtyp = fahr[0]->get_waytype();
}
get_owner()->book_running_costs( part_of_fixed_cost, wtyp);
book( part_of_fixed_cost, CONVOI_OPERATIONS );
book( part_of_fixed_cost, CONVOI_PROFIT );
}
und an geeigneter Stelle dann der Aufruf
Zitat:// call book monthly fixed cost for convois
FOR(vector_tpl<convoihandle_t>, const cnv, convoi_array) {
cnv->add_fixed_cost();
}