fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [13085]


From: Nelson Guerra
Subject: [Fmsystem-commits] [13085]
Date: Thu, 23 Apr 2015 23:37:09 +0000

Revision: 13085
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13085
Author:   nelson224
Date:     2015-04-23 23:37:09 +0000 (Thu, 23 Apr 2015)
Log Message:
-----------


Modified Paths:
--------------
    branches/dev-syncromind/property/js/portico/invoice.list_sub.js

Modified: branches/dev-syncromind/property/js/portico/invoice.list_sub.js
===================================================================
--- branches/dev-syncromind/property/js/portico/invoice.list_sub.js     
2015-04-23 23:36:50 UTC (rev 13084)
+++ branches/dev-syncromind/property/js/portico/invoice.list_sub.js     
2015-04-23 23:37:09 UTC (rev 13085)
@@ -1,4 +1,26 @@
-       function onSave ()
+       this.local_DrawCallback1 = function()
+       {
+               var api = oTable0.api();
+               var data = api.ajax.json();
+
+               for(i=0;i < columns.length;i++)
+               {
+                       switch (columns[i]['data']) 
+                       {
+                               case 'approved_amount':
+                                       
+                                       if (typeof(api.column(i).footer()) !== 
'undefined') 
+                                       {
+                                               
$(api.column(i-1).footer()).html("<div align=\"right\">Sum:</div>");
+                                               
$(api.column(i).footer()).html("<div 
align=\"right\">"+data.sum_amount+"</div>");
+                                       }
+                       }
+               }
+               $("#vendorDiv").html(data.vendor);
+               $("#voucheridDiv").html(data.voucher_id);
+       };
+
+       function onSave ()
        {
                var api = oTable0.api();
 
@@ -64,10 +86,8 @@
                var data = {"values": values};
                JqueryPortico.execute_ajax(requestUrl, function(result){
                        //var msg = result.message;
-                       document.getElementById("message").innerHTML = '';
-                       $.each(result.message, function (k, v) {
-                               document.getElementById("message").innerHTML += 
v.msg + "<br/>";
-                       });
+                       document.getElementById("message").innerHTML = 
result.message[0].msg + "<br/>";
+
                        //var error = result.error;
                        if (typeof(result.error) !== 'undefined')
                        {




reply via email to

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