fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [13004] s_agreement.edit.js


From: Saul
Subject: [Fmsystem-commits] [13004] s_agreement.edit.js
Date: Mon, 13 Apr 2015 21:15:11 +0000

Revision: 13004
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13004
Author:   psaul
Date:     2015-04-13 21:15:11 +0000 (Mon, 13 Apr 2015)
Log Message:
-----------
s_agreement.edit.js

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

Modified: branches/dev-syncromind/property/js/portico/s_agreement.edit.js
===================================================================
--- branches/dev-syncromind/property/js/portico/s_agreement.edit.js     
2015-04-13 21:14:37 UTC (rev 13003)
+++ branches/dev-syncromind/property/js/portico/s_agreement.edit.js     
2015-04-13 21:15:11 UTC (rev 13004)
@@ -74,7 +74,7 @@
     }
     
     var ids = [];
-    var mcost = {}; var wcost = {}; var tcost = {}; var icoun = {};
+    var mcost = {}; var icoun = {};
     for ( var n = 0; n < selected.length; ++n )
     {
         var aData = selected[n];
@@ -97,3 +97,63 @@
     });
 }
 
+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 omcost = $("#mcostul").val(); //1118
+    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 icoun = {};
+    ids.push(oSelid);mcost[oSelid] = omcost; icoun[oSelid] = oindex;
+    
+     $.ajax({
+            type: 'POST',
+            dataType: 'json',
+            url: ""+ sUrl_agreement +"&phpgw_return_as=json",
+            
data:{id:id,ids:ids,mcost:mcost,icoun:icoun,type:type,date:oDate,index:oIndex},
+            success: function(data) {
+                obj = JSON.parse(data);
+                var newstr = obj.replace("&amp;", "&","gi");
+                JqueryPortico.updateinlineTableHelper(oTable0, newstr);
+                $('#values_date').val('');
+                $('#new_index').val('');
+            }
+        }); 
+}
+
+onActionsClickDeleteLastIndex=function(type){
+    
+    var id = $('#agreementid').val();
+    
+    //obteniendo el ultimo registro de edit_item
+    var oSelid = $("#selidsul").val(); //1118
+
+    $.ajax({
+            type: 'POST',
+            dataType: 'json',
+            url: ""+ sUrl_agreement +"&phpgw_return_as=json",
+            data:{ids:oSelid,type:type,id:id},
+            success: function(data) {
+                 obj = JSON.parse(data);
+                var newstr = obj.replace("&amp;", "&","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]