# NB 16.05.16 -
# NB 16.05.16 ( date('m',strtotime($r['start'])) + 12 * date('Y',strtotime($r['start'])) )
# NB 16.05.16 ));
- $r['rent_year'] = sprintf('%.2f',$r['rent'] * (
- 1 + 12 - date('m',strtotime($r['start']))
- ));
+ $start_month = date('m',strtotime($r['start']));
+ $end_month = date('m',strtotime($r['end']));
+ if (date('Y',strtotime($r['end'])) > date('Y',strtotime($r['start']))) $end_month = 12;
+ $r['rent_year'] = sprintf('%.2f',$r['rent'] * (1 + $end_month - $start_month));
},
'row_parse_post' => ((empty($GLOBALS['Db']) or Db::php_cli()) ? null : function(&$r) {