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

Diff of /phpcompta/include/user_action_ven.php

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

revision 1.18 by sparkyx, Sun Mar 6 18:30:13 2005 UTC revision 1.19 by stanpinte, Mon Jul 4 17:58:51 2005 UTC
# Line 38  if ( $action == 'insert_vente' ) { Line 38  if ( $action == 'insert_vente' ) {
38        $nb_number=$_POST["nb_item"];        $nb_number=$_POST["nb_item"];
39        $nb_number++;        $nb_number++;
40    
41        $form=FormVente($cn,$_SESSION['g_jrn'],$_SESSION['g_user'],$HTTP_POST_VARS,false,$nb_number);        $form=FormVente($cn,$_GET['p_jrn'],$_SESSION['g_user'],$HTTP_POST_VARS,false,$nb_number);
42        echo '<div class="u_redcontent">';        echo '<div class="u_redcontent">';
43        echo     "here".    $form;        echo     "here".    $form;
44        echo '</div>';        echo '</div>';
# Line 48  if ( $action == 'insert_vente' ) { Line 48  if ( $action == 'insert_vente' ) {
48      // We want to see the encoded invoice      // We want to see the encoded invoice
49      if ( isset ($_POST["view_invoice"])) {      if ( isset ($_POST["view_invoice"])) {
50        $nb_number=$_POST["nb_item"];        $nb_number=$_POST["nb_item"];
51        $form=FormVenteView($cn,$_SESSION['g_jrn'],$_SESSION['g_user'],$HTTP_POST_VARS,$nb_number);        $form=FormVenteView($cn,$_GET['p_jrn'],$_SESSION['g_user'],$HTTP_POST_VARS,$nb_number);
52            // Check failed : invalid date or quantity            // Check failed : invalid date or quantity
53            if ( $form== null) {            if ( $form== null) {
54                    echo_error("Cannot validate ");                    echo_error("Cannot validate ");
55                    $form=FormVente($cn,$_SESSION['g_jrn'],$_SESSION['g_user'],$HTTP_POST_VARS,false,$nb_number);                    $form=FormVente($cn,$_GET['p_jrn'],$_SESSION['g_user'],$HTTP_POST_VARS,false,$nb_number);
56           }           }
57        echo '<div class="u_redcontent">';        echo '<div class="u_redcontent">';
58        echo         $form;        echo         $form;
# Line 65  if ( $action == 'insert_vente' ) { Line 65  if ( $action == 'insert_vente' ) {
65        {        {
66        echo_debug(__FILE__,__LINE__,"Blank form");        echo_debug(__FILE__,__LINE__,"Blank form");
67        // Show an empty form of invoice        // Show an empty form of invoice
68        $form=FormVente($cn,$_SESSION['g_jrn'],$_SESSION['g_user'],null,false);        $form=FormVente($cn,$_GET['p_jrn'],$_SESSION['g_user'],null,false);
69        echo '<div class="u_redcontent">';        echo '<div class="u_redcontent">';
70        echo $form;        echo $form;
71        echo '</div>';        echo '</div>';
# Line 77  if ( $action == 'insert_vente' ) { Line 77  if ( $action == 'insert_vente' ) {
77      // Save the invoice      // Save the invoice
78  if ( isset($_POST["record_invoice"])) {  if ( isset($_POST["record_invoice"])) {
79    // Check privilege    // Check privilege
80    if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_SESSION['g_jrn']) != 2 )    {    if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) != 2 )    {
81      NoAccess();      NoAccess();
82      exit -1;      exit -1;
83    }    }
84    
85    // echo "RECORD INVOICE";    // echo "RECORD INVOICE";
86     RecordInvoice($cn,$HTTP_POST_VARS,$_SESSION['g_user'],$_SESSION['g_jrn']);     RecordInvoice($cn,$HTTP_POST_VARS,$_SESSION['g_user'],$_GET['p_jrn']);
87  }  }
88  if (isset ($_POST['correct_new_invoice'])) {  if (isset ($_POST['correct_new_invoice'])) {
89    // Check privilege    // Check privilege
90    if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_SESSION['g_jrn']) != 2 )    {    if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) != 2 )    {
91      NoAccess();      NoAccess();
92      exit -1;      exit -1;
93    }    }
94        
95    $nb=$_POST['nb_item'];    $nb=$_POST['nb_item'];
96    $form=FormVente($cn,$_SESSION['g_jrn'],$_SESSION['g_user'],$HTTP_POST_VARS,false,$nb);    $form=FormVente($cn,$_GET['p_jrn'],$_SESSION['g_user'],$HTTP_POST_VARS,false,$nb);
97    echo '<div class="u_redcontent">';    echo '<div class="u_redcontent">';
98    echo $form;    echo $form;
99    echo '</div>';    echo '</div>';
# Line 101  if (isset ($_POST['correct_new_invoice'] Line 101  if (isset ($_POST['correct_new_invoice']
101  // Save and print the invoice  // Save and print the invoice
102  if ( isset($_POST["record_and_print_invoice"])) {  if ( isset($_POST["record_and_print_invoice"])) {
103    // Check privilege    // Check privilege
104    if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_SESSION['g_jrn']) != 2 )    {    if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) != 2 )    {
105      NoAccess();      NoAccess();
106      exit -1;      exit -1;
107    }    }
108        
109    //  echo "RECORD AND PRINT INVOICE";    //  echo "RECORD AND PRINT INVOICE";
110    
111    $comment=RecordInvoice($cn,$HTTP_POST_VARS,$_SESSION['g_user'],$_SESSION['g_jrn']);    $comment=RecordInvoice($cn,$HTTP_POST_VARS,$_SESSION['g_user'],$_GET['p_jrn']);
112    
113    $nb_number=$_POST["nb_item"];    $nb_number=$_POST["nb_item"];
114    $form=FormVenteView($cn,$g_jrn,$g_user,$HTTP_POST_VARS,$nb_number,'noform',$comment);    $form=FormVenteView($cn,$p_jrn,$g_user,$HTTP_POST_VARS,$nb_number,'noform',$comment);
115        
116    echo '<div class="u_redcontent">';    echo '<div class="u_redcontent">';
117    echo $form;    echo $form;
# Line 121  if ( isset($_POST["record_and_print_invo Line 121  if ( isset($_POST["record_and_print_invo
121    
122   if ( $action == 'voir_jrn' ) {   if ( $action == 'voir_jrn' ) {
123     // Check privilege     // Check privilege
124     if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_SESSION['g_jrn']) < 1 )    {     if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) < 1 )    {
125       NoAccess();       NoAccess();
126       exit -1;       exit -1;
127     }     }
# Line 142  echo 'Période  '.$w->IOValue("p_periode" Line 142  echo 'Période  '.$w->IOValue("p_periode"
142  <?  <?
143   // Show list of sell   // Show list of sell
144   // Date - date of payment - Customer - amount   // Date - date of payment - Customer - amount
145     $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'] ;
146     $list=ListJrn($cn,$_SESSION['g_jrn'],$sql);     $list=ListJrn($cn,$_GET['p_jrn'],$sql);
147     echo $list;     echo $list;
148     echo '</div>';     echo '</div>';
149  }  }
150  if ( $action == 'voir_jrn_non_paye' ) {  if ( $action == 'voir_jrn_non_paye' ) {
151     // Check privilege     // Check privilege
152     if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_SESSION['g_jrn']) < 1 )    {     if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) < 1 )    {
153       NoAccess();       NoAccess();
154       exit -1;       exit -1;
155     }     }
156    
157  // Show list of unpaid sell  // Show list of unpaid sell
158  // Date - date of payment - Customer - amount  // Date - date of payment - Customer - amount
159    $sql=SQL_LIST_UNPAID_INVOICE_DATE_LIMIT." and jr_def_id=".$_SESSION['g_jrn'] ;    $sql=SQL_LIST_UNPAID_INVOICE_DATE_LIMIT." and jr_def_id=".$_GET['p_jrn'] ;
160    $list=ListJrn($cn,$_SESSION['g_jrn'],$sql);    $list=ListJrn($cn,$_GET['p_jrn'],$sql);
161    $sql=SQL_LIST_UNPAID_INVOICE." and jr_def_id=".$_SESSION['g_jrn'] ;    $sql=SQL_LIST_UNPAID_INVOICE." and jr_def_id=".$_GET['p_jrn'] ;
162    $list2=ListJrn($cn,$_SESSION['g_jrn'],$sql);    $list2=ListJrn($cn,$_GET['p_jrn'],$sql);
163      echo '<div class="u_redcontent">';      echo '<div class="u_redcontent">';
164      echo '<h2 class="info"> Echeance dépassée </h2>';      echo '<h2 class="info"> Echeance dépassée </h2>';
165      echo $list;      echo $list;
# Line 174  if ( $action == 'voir_jrn_non_paye' ) { Line 174  if ( $action == 'voir_jrn_non_paye' ) {
174  //Search  //Search
175  // if ( $action == 'search' ) {  // if ( $action == 'search' ) {
176  //    // Check privilege  //    // Check privilege
177  //    if ( CheckJrn($g_dossier,$g_user,$g_jrn) < 1 )    {  //    if ( CheckJrn($g_dossier,$g_user,$p_jrn) < 1 )    {
178  //      NoAccess();  //      NoAccess();
179  //      exit -1;  //      exit -1;
180  //    }  //    }
# Line 184  if ( $action == 'voir_jrn_non_paye' ) { Line 184  if ( $action == 'voir_jrn_non_paye' ) {
184    
185    
186  // // display a search box  // // display a search box
187  //   $search_box=u_ShowMenuRecherche($cn,$g_jrn,$sessid,$HTTP_POST_VARS);  //   $search_box=u_ShowMenuRecherche($cn,$p_jrn,$sessid,$HTTP_POST_VARS);
188  //   echo '<DIV class="u_redcontent">';  //   echo '<DIV class="u_redcontent">';
189  //   echo $search_box;  //   echo $search_box;
190  //   // if nofirst is set then show result  //   // if nofirst is set then show result
191  //   if ( isset ($_GET['nofirst'] ) ) {  //   if ( isset ($_GET['nofirst'] ) ) {
192  //     $a=ListJrn($cn,$g_jrn,"",$HTTP_POST_VARS);  //     $a=ListJrn($cn,$p_jrn,"",$HTTP_POST_VARS);
193  //     echo $a;  //     echo $a;
194  //   }  //   }
195  //   echo '</DIV>';  //   echo '</DIV>';

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

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