fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [12993] agreement.edit.js


From: Saul
Subject: [Fmsystem-commits] [12993] agreement.edit.js
Date: Fri, 10 Apr 2015 23:09:36 +0000

Revision: 12993
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=12993
Author:   psaul
Date:     2015-04-10 23:09:36 +0000 (Fri, 10 Apr 2015)
Log Message:
-----------
agreement.edit.js

Modified Paths:
--------------
    branches/dev-syncromind/property/js/portico/agreement.edit.js

Modified: branches/dev-syncromind/property/js/portico/agreement.edit.js
===================================================================
--- branches/dev-syncromind/property/js/portico/agreement.edit.js       
2015-04-10 23:08:00 UTC (rev 12992)
+++ branches/dev-syncromind/property/js/portico/agreement.edit.js       
2015-04-10 23:09:36 UTC (rev 12993)
@@ -97,4 +97,49 @@
                 $('#new_index').val('');
             }
     });
+}
+
+onUpdateClickItems = function(type){
+    
+    var oDate = $('#values_date').val();
+    var oIndex = $('#new_index').val();
+    var id = $('#agreementid').val();
+    
+    //obteniendo el ultimo registro de edit_item
+    var oSelid = $("#selidsul").val(); //1118
+    var otcost = $("#tcostul").val(); // 127.02
+    var owcost = $("#wcostul").val(); //0.00
+    var omcost = $("#mcostul").val(); //0.00
+    var oindex = $("#icountul").val();//3
+    
+    if(oDate == '' && oIndex == ''){
+        alert('None index and date');
+        return false;
+    }else if(oDate!='' && oIndex == ''){
+        alert('None Index');
+        return false;
+    }else if(oDate=='' && oIndex != ''){
+        alert('None Date');
+        return false;
+    }
+    var ids = []; var mcost = {}; var wcost = {}; var tcost = {}; var icoun = 
{};
+    
+        ids.push(oSelid);mcost[oSelid] = omcost; wcost[oSelid] = owcost; 
tcost[oSelid] = otcost; icoun[oSelid] = oindex;
+        
+         $.ajax({
+            type: 'POST',
+            dataType: 'json',
+            url: ""+ sUrl_agreement +"&phpgw_return_as=json",
+            
data:{id:id,ids:ids,mcost:mcost,wcost:wcost,tcost:tcost,icoun:icoun,type:type,date:oDate,index:oIndex},
+            success: function(data) {
+                obj = JSON.parse(data);
+                var newstr = obj.replace("&", "&","gi");
+                JqueryPortico.updateinlineTableHelper(oTable0, newstr);
+                $('#values_date').val('');
+                $('#new_index').val('');
+            }
+        });
+        
+        
+        
 }
\ No newline at end of file




reply via email to

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