/[phpcompta]/phpcompta/include/user_action_fin.php
ViewVC logotype

Diff of /phpcompta/include/user_action_fin.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.20 by sparkyx, Fri Jun 17 10:43:42 2005 UTC revision 1.21 by stanpinte, Mon Jul 4 17:58:51 2005 UTC
# Line 36  $action=(isset($_GET['action']))?$_GET[' Line 36  $action=(isset($_GET['action']))?$_GET['
36  //////////////////////////////////////////////////////////////////////  //////////////////////////////////////////////////////////////////////
37  if ( $action == 'new' ) {  if ( $action == 'new' ) {
38    // Check privilege    // Check privilege
39    if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_SESSION['g_jrn']) != 2 )    {    if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) != 2 )    {
40         NoAccess();         NoAccess();
41         exit -1;         exit -1;
42    }    }
# Line 49  if ( $action == 'new' ) { Line 49  if ( $action == 'new' ) {
49            // add a one-line calculator            // add a one-line calculator
50    
51    
52            $r=FormFin($cn,$_SESSION['g_jrn'],$_SESSION['g_user'],$submit,null,false);            $r=FormFin($cn,$_GET['p_jrn'],$_SESSION['g_user'],$submit,null,false);
53            echo '<div class="u_redcontent">';            echo '<div class="u_redcontent">';
54            echo $r;            echo $r;
55            echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."</div>";            echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."</div>";
# Line 69  if ( $action == 'new' ) { Line 69  if ( $action == 'new' ) {
69            $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout article">            $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout article">
70                      <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';                      <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';
71    
72            $r=FormFin($cn,$_SESSION['g_jrn'],$_SESSION['g_user'],$submit,$HTTP_POST_VARS,false,  $nb_number);            $r=FormFin($cn,$_GET['p_jrn'],$_SESSION['g_user'],$submit,$HTTP_POST_VARS,false,  $nb_number);
73            echo '<div class="u_redcontent">';            echo '<div class="u_redcontent">';
74            echo $r;            echo $r;
75            echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."</div>";            echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."</div>";
# Line 85  if ( $action == 'new' ) { Line 85  if ( $action == 'new' ) {
85            $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout article">            $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout article">
86                      <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';                      <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';
87    
88            $r=FormFin($cn,$_SESSION['g_jrn'],$_SESSION['g_user'],$submit,$HTTP_POST_VARS,false,  $nb_number);            $r=FormFin($cn,$_GET['p_jrn'],$_SESSION['g_user'],$submit,$HTTP_POST_VARS,false,  $nb_number);
89            echo '<div class="u_redcontent">';            echo '<div class="u_redcontent">';
90            echo $r;            echo $r;
91            echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."</div>";            echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."</div>";
# Line 100  if ( $action == 'new' ) { Line 100  if ( $action == 'new' ) {
100          $submit='<INPUT TYPE="SUBMIT" name="save" value="Confirmer">';          $submit='<INPUT TYPE="SUBMIT" name="save" value="Confirmer">';
101          $submit.='<INPUT TYPE="SUBMIT" name="correct" value="Corriger">';          $submit.='<INPUT TYPE="SUBMIT" name="correct" value="Corriger">';
102    
103          $r=FormFin($cn,$_SESSION['g_jrn'],$_SESSION['g_user'],$submit,$HTTP_POST_VARS,true,$nb_number);          $r=FormFin($cn,$_GET['p_jrn'],$_SESSION['g_user'],$submit,$HTTP_POST_VARS,true,$nb_number);
104    
105          // if something goes wrong correct it          // if something goes wrong correct it
106          if ( $r == null ) {          if ( $r == null ) {
# Line 108  if ( $action == 'new' ) { Line 108  if ( $action == 'new' ) {
108            $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout article">            $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout article">
109                      <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';                      <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';
110    
111            $r=FormFin($cn,$_SESSION['g_jrn'],$_SESSION['g_user'],$submit,$HTTP_POST_VARS,false,  $nb_number);            $r=FormFin($cn,$_GET['p_jrn'],$_SESSION['g_user'],$submit,$HTTP_POST_VARS,false,  $nb_number);
112          }          }
113    
114          echo '<div class="u_redcontent">';          echo '<div class="u_redcontent">';
# Line 118  if ( $action == 'new' ) { Line 118  if ( $action == 'new' ) {
118          }          }
119          // Save the charge into database          // Save the charge into database
120          if ( isset($_POST['save'] )) {          if ( isset($_POST['save'] )) {
121            $r=RecordFin($cn,$HTTP_POST_VARS,$_SESSION['g_user'],$_SESSION['g_jrn']);            $r=RecordFin($cn,$HTTP_POST_VARS,$_SESSION['g_user'],$_GET['p_jrn']);
122            // Get number of  lines            // Get number of  lines
123            $nb_number=$_POST["nb_item"];            $nb_number=$_POST["nb_item"];
124    
125            // submit button in the form            // submit button in the form
126            $submit='<h2 class="info">Recorded</h2>';            $submit='<h2 class="info">Recorded</h2>';
127    
128            $r.=FormFin($cn,$_SESSION['g_jrn'],$_SESSION['g_user'],$submit,$HTTP_POST_VARS,true,  $nb_number,true);            $r.=FormFin($cn,$_GET['p_jrn'],$_SESSION['g_user'],$submit,$HTTP_POST_VARS,true,  $nb_number,true);
129            echo '<div class="u_redcontent">';            echo '<div class="u_redcontent">';
130            echo $r;            echo $r;
131            echo "</div>";            echo "</div>";
# Line 139  if ( $action == 'new' ) { Line 139  if ( $action == 'new' ) {
139  //////////////////////////////////////////////////////////////////////  //////////////////////////////////////////////////////////////////////
140  if ( $action == 'voir_jrn' ) {  if ( $action == 'voir_jrn' ) {
141    // Check privilege    // Check privilege
142    if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_SESSION['g_jrn']) < 1 )    {    if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) < 1 )    {
143         NoAccess();         NoAccess();
144         exit -1;         exit -1;
145    }    }
146  ?>  ?>
147  <div class="u_redcontent">  <div class="u_redcontent">
148  <form method="post" action="user_jrn.php?action=voir_jrn">  <form method="post" action="user_jrn.php?action=voir_jrn&p_jrn=hop">
149  <?  <?
150  $w=new widget("select");  $w=new widget("select");
151    
# Line 162  echo 'Période  '.$w->IOValue("p_periode" Line 162  echo 'Période  '.$w->IOValue("p_periode"
162   // Show list of sell   // Show list of sell
163    echo_debug ("user_action_jrn.php");    echo_debug ("user_action_jrn.php");
164   // Date - date of payment - Customer - amount   // Date - date of payment - Customer - amount
165     $sql=SQL_LIST_ALL_INVOICE." and jr_tech_per=".$current." and jr_def_id=".$_SESSION['g_jrn'];     $sql=SQL_LIST_ALL_INVOICE." and jr_tech_per=".$current." and jr_def_id=".$_GET['p_jrn'];
166     $list=ListJrn($cn,$_SESSION['g_jrn'],$sql);     $list=ListJrn($cn,$_GET['p_jrn'],$sql);
167     echo $list;     echo $list;
168     echo '</div>';     echo '</div>';
169  }  }

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26