Plugins  LAST
 All Data Structures Files Functions Variables Pages
ajax_modify_param_detail.php
Go to the documentation of this file.
1 <?php
2 //This file is part of NOALYSS and is under GPL
3 //see licence.txt
4 
5 // require_once '.php';
6 require_once 'include/class_formulaire_param_detail.php';
7 $errcode = 0;
8 $fp_id = HtmlInput::default_value_get('fp_id', -1);
9 $title="none";$comment="";$tab='none';
10 if ($fp_id != -1)
11 {
12  $str="";
14  switch ($obj->type_detail)
15  {
16  // --- Formula
17  case 1:
18  $obj = new Rapav_Formula($fp_id);
19  $title = "Formule";
20  $comment='
21  <p>
22  Entrez une formule avec des postes comptables, la syntaxe est la même que celle des "rapports"
23  </p>
24  <p>
25  Exemple : [70%]*0.25+[71%]
26  </p>';
27  $tab='formula';
28  break;
29  // -- Poste comptable et code
30  case 2:
32  $title = "Poste Comptable et code TVA";
33  $tab='account_tva';
34  $comment='<p>
35  Entrez un poste comptable et un code de TVA
36  </p>';
37  break;
38  // -- Calcul sur formulaire
39  case 3:
40  $obj = new RAPAV_Compute($fp_id);
41  $title = "Compute";
42  $tab='compute_id';
43  $comment='<p>
44  Entrez une formule avec des codes utilisés dans ce formulaire
45  </p>';
46  break;
47  // -- Poste comptable
48  case 4:
49  $obj = new RAPAV_Account($fp_id);
50  $comment="";
51  $tab='new_account_id';
52  $title = "Poste comptable";
53  break;
54  // Account with children
55  case 6:
56  $obj = new RAPAV_Account($fp_id);
57  $comment="";
58  $tab='new_account_id';
59  $title = "Poste comptable";
60  $str=HtmlInput::hidden("child", 1);
61  break;
62  // -- operation reconciliee
63  case 5:
64  $comment='';
66  $title = "Opérations rapprochées";
67  $tab="new_reconcile_id";
68  break;
69  default:
70  $errcode = 1;
71  echo HtmlInput::title_box('Erreur', 'param_detail_div');
72  echo "Erreur type formule inconnu";
73  break;
74  }
75 } else
76 {
77  $errcode = 2;
78  echo HtmlInput::title_box('Erreur', 'param_detail_div');
79  echo _('Paramètre invalide');
80 }
81 
82 if ($errcode == 0)
83 {
84  echo HtmlInput::title_box($title, 'param_detail_div');
85  echo '<div class="content" style="padding:10px">';
86  echo '<span class="notice" id="param_detail_info_div"></span>';
87  echo $comment;
88  echo '<form method="post" onsubmit="save_param_detail(\'modify_param_detail_frm\');return false;" id="modify_param_detail_frm">';
89  $obj->input();
90  echo HtmlInput::hidden('p_id',$obj->p_id);
91  echo $str;
92  echo HtmlInput::hidden('tab',$tab);
93  echo HtmlInput::hidden('fp_id',$obj->fp_id);
94  echo HtmlInput::hidden('ac',$_REQUEST['ac']);
95  echo HtmlInput::hidden('plugin_code',$_REQUEST['plugin_code']);
96  echo Dossier::hidden();
97  echo HtmlInput::submit('save_modify_param_detail','Sauve');
98  echo '</form>';
99  echo '</div>';
100 }
101 ?>
poste comptable utilisé avec le poste comptable, choix entre diff crédit - debit, diff débit-crédit...
poste comptable utilisé avec le poste comptable, choix entre diff crédit - debit, diff débit-crédit...
$str
Definition: index.php:29
$_REQUEST['sb']
Definition: am_print.php:39