fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [17150] property: calculate tax refund on paid invoic


From: sigurdne
Subject: [Fmsystem-commits] [17150] property: calculate tax refund on paid invoices
Date: Tue, 10 Oct 2017 08:16:44 -0400 (EDT)

Revision: 17150
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17150
Author:   sigurdne
Date:     2017-10-10 08:16:43 -0400 (Tue, 10 Oct 2017)
Log Message:
-----------
property: calculate tax refund on paid invoices

Modified Paths:
--------------
    trunk/property/inc/class.uiinvoice.inc.php
    trunk/property/js/portico/invoice.consume.js

Modified: trunk/property/inc/class.uiinvoice.inc.php
===================================================================
--- trunk/property/inc/class.uiinvoice.inc.php  2017-10-10 12:05:37 UTC (rev 
17149)
+++ trunk/property/inc/class.uiinvoice.inc.php  2017-10-10 12:16:43 UTC (rev 
17150)
@@ -2097,9 +2097,11 @@
                        $content = $this->bo->read_consume($start_date, 
$end_date, $vendor_id, $loc1, $workorder_id, $b_account_class, $district_id, 
$ecodimb);
 
                        $sum = 0;
+                       $sum_refund = 0;
                        foreach ($content as &$entry)
                        {
                                $sum = $sum + $entry['consume'];
+                               $sum_refund = $sum_refund + $entry['refund'];
                                $entry['link_voucher'] = 
urldecode($GLOBALS['phpgw']->link('/index.php', array
                                                (
                                                'menuaction' => 
'property.uiinvoice.index',
@@ -2112,6 +2114,7 @@
                                                )
                                ));
                                $entry['consume'] = 
number_format($entry['consume'], 0, ',', ' ');
+                               $entry['refund'] = 
number_format($entry['refund'], 0, ',', ' ');
                        }
 
                        $result_data = array('results' => $content);
@@ -2118,6 +2121,7 @@
                        $result_data['total_records'] = count($content);
                        $result_data['draw'] = $draw;
                        $result_data['sum'] = number_format($sum, 0, ',', ' ');
+                       $result_data['sum_refund'] = number_format($sum_refund, 
0, ',', ' ');
 
                        return $this->jquery_results($result_data);
                }

Modified: trunk/property/js/portico/invoice.consume.js
===================================================================
--- trunk/property/js/portico/invoice.consume.js        2017-10-10 12:05:37 UTC 
(rev 17149)
+++ trunk/property/js/portico/invoice.consume.js        2017-10-10 12:16:43 UTC 
(rev 17150)
@@ -19,6 +19,12 @@
                                        nCells[i].innerHTML = data.sum;
                                }
                                break;
+                       case 'refund':
+                               if (typeof (nCells[i]) !== 'undefined')
+                               {
+                                       nCells[i].innerHTML = data.sum_refund;
+                               }
+                               break;
                }
        }
 };
\ No newline at end of file




reply via email to

[Prev in Thread] Current Thread [Next in Thread]