Plugins  LAST
 All Data Structures Files Functions Variables Pages
Functions
bank_js.js File Reference

Go to the source code of this file.

Functions

function reconcilie (target, dossier_id, p_id, plugin_code, tiers)
 
function save_bank_info (obj)
 When we save a reconcile dialog box with info. More...
 
function success_bank_info (req, json)
 Handle the ajax from save_bank_info. More...
 
function impb_check_item (p_dossier, p_plugin_code, p_row_id)
 if a row is checked or unchecked, save it into the table temp_bank.is_checked More...
 
function selected_set_tiers (p_form_id)
 Select the same tiers for several rows. More...
 
function display_suggest (p_dossier, p_plugin_code, p_id)
 Display the suggest when several are found. More...
 
function select_suggest (p_dossier, p_plugin_code, temp_bank_id, suggest_bank_id)
 

Function Documentation

function display_suggest (   p_dossier,
  p_plugin_code,
  p_id 
)

Display the suggest when several are found.

Parameters
{type}p_dossier
{type}p_plugin_code
{type}p_id
Returns
{undefined}

Definition at line 133 of file bank_js.js.

References p_id, and style.

133  {
134  waiting_box();
135  new Ajax.Request(
136  'ajax.php',
137  {
138  method:'get',
139  parameters:{
140  "plugin_code":p_plugin_code,
141  "gDossier":p_dossier,
142  "id":p_id,
143  "act":"display_suggest"
144 
145  },
146  onSuccess:function(p_xml,p_json) {
147  removeDiv('display_suggest_box');
148  var style=fixed_position(150,200)+";width:50%";
149  add_div({"id":"display_suggest_box","cssclass":"inner_box","style":style,"html":p_xml.responseText});
150  remove_waiting_box();
151  }
152 
153  })
154 
155 }
$note style
$oPeriode p_id
function impb_check_item (   p_dossier,
  p_plugin_code,
  p_row_id 
)

if a row is checked or unchecked, save it into the table temp_bank.is_checked

Parameters
p_dossier
p_plugin_code
p_row_idtemp_bank.id

Definition at line 74 of file bank_js.js.

75 {
76  var name_checkbox='temp_bank';
77  var status=($(name_checkbox+p_row_id).checked)?1:0;
78  waiting_box();
79  new Ajax.Request('ajax.php', {
80  method:'get',
81  parameters : {'gDossier':p_dossier,
82  'plugin_code':p_plugin_code,
83  'act' : 'save_check',
84  'row_id':p_row_id,
85  'state':status
86 
87  },
88  onSuccess:function(req) {
89  remove_waiting_box();
90  }
91 
92  });
93 }
function reconcilie (   target,
  dossier_id,
  p_id,
  plugin_code,
  tiers 
)

Definition at line 2 of file bank_js.js.

References p_id, and style.

3 {
4  var qs="gDossier="+dossier_id+'&plugin_code='+plugin_code+'&act=show&id='+p_id+'&ctl='+target+"&target="+tiers;
5 
6  var action=new Ajax.Request ( 'ajax.php',
7  {
8  method:'get',
9  parameters:qs,
10  onFailure:error_box,
11  onSuccess:success_box
12  }
13  );
14  if ( $(target))
15  {
16  removeDiv(target);
17  }
18  var sx=calcy(120);
19 
20  var str_style="top:"+sx+"px;";
21 
22  var div={id:target, cssclass:'inner_box',style:str_style,html:loading(),drag:1};
23 
24  add_div(div);
25 }
$note style
$oPeriode p_id
function save_bank_info (   obj)

When we save a reconcile dialog box with info.

Parameters
{type}obj
Returns
{Boolean}

Definition at line 31 of file bank_js.js.

References success_bank_info().

32 {
33  var query_string=obj.serialize();
34  var action=new Ajax.Request ( 'ajax.php',
35  {
36  method:'get',
37  parameters:query_string,
38  onFailure:error_box,
39  onSuccess:success_bank_info
40  });
41 
42  return false;
43 }
function success_bank_info(req, json)
Handle the ajax from save_bank_info.
Definition: bank_js.js:50
function select_suggest (   p_dossier,
  p_plugin_code,
  temp_bank_id,
  suggest_bank_id 
)

Definition at line 156 of file bank_js.js.

157 {
158  waiting_box();
159  try {
160  new Ajax.Request(
161  'ajax.php',
162  {
163  method:'get',
164  parameters:{'act':'set_suggest','id':temp_bank_id, 'suggest_id':suggest_bank_id,'gDossier':p_dossier,'plugin_code':p_plugin_code},
165  onSuccess:function(req,json) {
166  try {
167  remove_waiting_box();
168  removeDiv('display_suggest_box');
169  var json=req.responseText.evalJSON();
170  $('tiers'+temp_bank_id).innerHTML=json.tiers;
171  $('concop'+temp_bank_id).innerHTML=json.concop;
172  $('st'+temp_bank_id).innerHTML=json.status;
173  }catch (x) {
174  alert_box("select_suggest.function_ajax"+e.message);
175  }
176  }
177  });
178  }catch (e) {
179  alert_box("select_suggest"+e.message);
180  }
181 }
function selected_set_tiers (   p_form_id)

Select the same tiers for several rows.

The information import_id .. are in the form

Parameters
{type}p_form_id string id of the form
Returns
{undefined}

Definition at line 100 of file bank_js.js.

References value.

100  {
101 try {
102  smoke.confirm('Confirmez',
103  function(e) {
104  if (e) {
105  $(p_form_id).submit();
106  new Ajax.Request('ajax.php',
107  {
108  method:'get',
109  parameters: {
110  'gDossier':$(p_form_id)['gDossier'].value,
111  'act':'set_tiers',
112  'import_id':$(p_form_id)['import_id'].value,
113  'plugin_code':$(p_form_id)['plugin_code'].value,
114  'ac':$(p_form_id)['ac'].value,
115  'fiche':$(p_form_id)['fiche1000'].value
116  }
117  });
118  }
119 
120  });
121 } catch (e) {
122 alert(e.message);
123 }
124 return false;
125  }
$p_year value
function success_bank_info (   req,
  json 
)

Handle the ajax from save_bank_info.

Parameters
{type}req
{type}json
Returns
{undefined}

Definition at line 50 of file bank_js.js.

Referenced by save_bank_info().

51 {
52  try {
53  var answer=req.responseXML;
54  var a=answer.getElementsByTagName('extra');
55  var name_ctl=a[0].firstChild.nodeValue;
56  var ob=name_ctl.evalJSON(true);
57  $('st'+ob.id).innerHTML=unescape_xml(ob.msg);
58  if (ob.tiers) { $('tiers'+ob.id).innerHTML=unescape_xml(ob.tiers);}
59  if (ob.concop){$('concop'+ob.id).innerHTML=unescape_xml(ob.concop);}
60  var div=answer.getElementsByTagName('ctl');
61  var div_ctl=div[0].firstChild.nodeValue;
62  removeDiv(div_ctl);
63  }
64  catch(e) {
65  alert_box('Erreur success_bank_info '+e.message);
66  }
67 }