Plugins  LAST
 All Data Structures Files Functions Variables Pages
operation.inc.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 $ledger=new Acc_Ledger($cn,0);
6 $search_box=$ledger->search_form('ALL',1);
7 echo '<div class="content">';
8 
9 echo '<form method="GET">';
10 echo $search_box;
11 echo HtmlInput::submit("viewsearch",_("Recherche"));
12 echo HtmlInput::extension();
13 echo HtmlInput::hidden('sa',$_REQUEST['sa']);
14 echo HtmlInput::hidden('ac',$_REQUEST['ac']);
15 echo '</form>';
16 
17 /*
18  * Change accounting
19  */
20 if (isset($_POST['chg_poste']))
21  {
23  }
24 /*
25  * Change card
26  */
27 if (isset($_POST['chg_card']))
28  {
30  }
31 /*
32  * Change ledger
33  */
34 if (isset($_POST['chg_ledger']))
35  {
37  }
38 /*
39  * Change ledger
40  */
41 if (isset($_POST['chg_card_account']))
42  {
44  }
45 
46 //-----------------------------------------------------
47 // Display search result
48 //-----------------------------------------------------
49 if ( isset ($_GET['viewsearch']))
50 {
51 
52  if (count ($_GET) == 0)
53  $array=null;
54  else
55  $array=$_GET;
56  $array['p_action']='ALL';
57  list($sql,$where)=$ledger->build_search_sql($array);
58 
59  // order
60  $sql.=' order by jr_date_order asc,substring(jr_pj_number,\'[0-9]+$\')::numeric asc ';
61 
62  // Count nb of line
63  $max_line=$cn->count_sql($sql);
64 echo HtmlInput::button('accounting_bt','Changer poste comptable','onclick="$(\'div_poste\').show();$(\'div_card\').hide();$(\'div_ledger\').hide();$(\'div_card_account\').hide();"');
65 
66 echo HtmlInput::button('card_bt','Changer fiche','onclick="$(\'div_poste\').hide();$(\'div_card\').show();$(\'div_ledger\').hide();$(\'div_card_account\').hide();"');
67 
68 echo HtmlInput::button('ledger_bt','Déplacement dans Journal','onclick="$(\'div_poste\').hide();$(\'div_card\').hide();$(\'div_ledger\').show();$(\'div_card_account\').hide();"');
69 echo HtmlInput::button('card_acc_bt','Poste > fiche','onclick="$(\'div_poste\').hide();$(\'div_card\').hide();;$(\'div_card_account\').show();$(\'div_ledger\').hide()"');
70 
71  require_once('template/search_view.php');
72 
73 }
74 
75 echo '</div>';
76 
77 
78 ?>
change_card(&$cn)
change the accounting and card in the selected operations
$ledger
if(isset($_POST['remove'])) $array
change_accounting(&$cn)
change the accounting in the selected operation
change_ledger(&$cn)
change the ledger for the selected operation
$_REQUEST['sb']
Definition: am_print.php:39
$sql
$search_box
change_card_account(&$cn)
change the accounting in the selected operation by a card (with a possible different accounting ...
global $cn