[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [13340]
From: |
Nelson Guerra |
Subject: |
[Fmsystem-commits] [13340] |
Date: |
Wed, 03 Jun 2015 22:58:29 +0000 |
Revision: 13340
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13340
Author: nelson224
Date: 2015-06-03 22:58:28 +0000 (Wed, 03 Jun 2015)
Log Message:
-----------
Added Paths:
-----------
branches/dev-syncromind/property/js/portico/pricebook.index.js
Copied: branches/dev-syncromind/property/js/portico/pricebook.index.js (from
rev 13334, branches/dev-syncromind/property/js/portico/investment.index.js)
===================================================================
--- branches/dev-syncromind/property/js/portico/pricebook.index.js
(rev 0)
+++ branches/dev-syncromind/property/js/portico/pricebook.index.js
2015-06-03 22:58:28 UTC (rev 13340)
@@ -0,0 +1,75 @@
+
+onclikUpdatePricebook = function(){
+
+ var oDate = $('#filter_start_date').val();
+ var oIndex = $('#txt_index').val();
+ var select_check = $('.select_check');
+
+ if (select_check.length == '0'){
+ alert('None selected');
+ return false;
+ }
+ if(oIndex == ''){
+ alert('None index');
+ return false;
+ }
+ if(oDate == ''){
+ alert('None Date');
+ return false;
+ }
+
+ var values = {};
+
+ values['activity_id'] = {};
+ values['vendor_id'] = {};
+ values['old_m_cost'] = {};
+ values['old_w_cost'] = {};
+ values['old_total_cost'] = {};
+ values['update'] = {};
+ values['new_index'] = oIndex;
+ values['date'] = oDate;
+ values['submit_update'] = 'Update';
+
+ var api = oTable.api();
+ api.data().each( function (d)
+ {
+ values['activity_id'][d.counter] = d.activity_id;
+ values['vendor_id'][d.counter] = d.vendor_id;
+ values['old_m_cost'][d.counter] = d.m_cost;
+ values['old_w_cost'][d.counter] = d.w_cost;
+ values['old_total_cost'][d.counter] = d.total_cost;
+ });
+
+ select_check.each(function(i, obj) {
+ if (obj.checked)
+ {
+ values['update'][obj.value] = obj.value;
+ }
+ });
+
+ var requestUrl = api.ajax.url();
+ var data = {"values": values};
+ JqueryPortico.execute_ajax(requestUrl, function(result){
+
+ $('#filter_start_date').val('');
+ $('#txt_index').val('');
+ document.getElementById("message").innerHTML = '';
+
+ if (typeof(result.message) !== 'undefined')
+ {
+ $.each(result.message, function (k, v) {
+ document.getElementById("message").innerHTML +=
v.msg + "<br/>";
+ });
+ }
+
+ if (typeof(result.error) !== 'undefined')
+ {
+ $.each(result.error, function (k, v) {
+ document.getElementById("message").innerHTML +=
v.msg + "<br/>";
+ });
+ }
+ oTable.fnDraw();
+
+ }, data, "POST", "JSON");
+}
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [13340],
Nelson Guerra <=