]> git.nbdom.net Git - nb.git/commitdiff
rent_yead
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 16 May 2016 16:04:03 +0000 (18:04 +0200)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 16 May 2016 16:04:03 +0000 (18:04 +0200)
etc/dbs/rent.php

index e3311b1932f6dc15a74cc094860e36a04b58d522..b2bcaa3bbf5de2be6d2c3f6e9a07d290fac62c12 100644 (file)
@@ -24,10 +24,13 @@ $CONF['_rent'] = array (
         #extra: "rent * (1 + ( strftime('%m',end)+12*strftime('%Y',end) ) -  ( strftime('%m',start)+12*strftime('%Y',start) ))"
         #$r['rent_year'] = $r['rent'] * (1 + ( date('m',strtotime($r['end']))+12
         $r['Total'] = $r['rent'] + $r['charge'];
-        if (1) $r['rent_year'] = sprintf('%.2f',$r['rent'] * (1 +
-          ( date('m',strtotime($r['end'])) + 12 * date('Y',strtotime($r['end'])) )
-          - 
-          ( date('m',strtotime($r['start'])) + 12 * date('Y',strtotime($r['start'])) )
+# NB 16.05.16         if (1) $r['rent_year'] = sprintf('%.2f',$r['rent'] * (1 +
+# NB 16.05.16           ( date('m',strtotime($r['end'])) + 12 * date('Y',strtotime($r['end'])) )
+# 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']))
         ));
       },