Plugins  LAST
 All Data Structures Files Functions Variables Pages
modop_confirm.php
Go to the documentation of this file.
1 <?php
2 /*
3  * This file is part of NOALYSS.
4  *
5  * NOALYSS is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * NOALYSS is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with NOALYSS; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19 /* $Revision$ */
20 
21 // Copyright (c) 2002 Author Dany De Bontridder dany@alchimerys.be
22 
23 /*!\file
24  * \brief confirm operation before save it but verify first
25  */
26 require_once NOALYSS_INCLUDE.'/class/class_acc_ledger_purchase.php';
27 require_once NOALYSS_INCLUDE.'/class/class_acc_ledger_sold.php';
28 require_once 'class_modop_operation.php';
29 
31 $act->suspend_strict();
32 //----------------------------------------------------------------------
33 // ACH
34 if ( $_POST['jrn_type'] == 'ACH') {
35  $jrn=new Acc_Ledger_Purchase($cn,$_POST['p_jrn']);
36  try {
37  echo '<FORM enctype="multipart/form-data" METHOD="POST">';
38  echo HtmlInput::hidden('ac',$_REQUEST['ac']);
39  echo HtmlInput::extension().dossier::hidden();
40  echo HtmlInput::hidden('action','save');
41  echo HtmlInput::hidden('ext_jr_id',$_POST['ext_jr_id']);
42  echo HtmlInput::hidden('ext_jr_internal',
43  $_POST['ext_jr_internal']);
44  echo $jrn->confirm($_POST);
45  echo HtmlInput::hidden('bon_comm',$_POST['bon_comm']);
46  echo HtmlInput::hidden('other_info',$_POST['other_info']);
47 
48  echo HtmlInput::submit('save',_('Sauver'));
49  echo '</FORM>';
50  } catch (Exception $e) {
51  alert($e->getMessage());
52  }
53 }
54 //----------------------------------------------------------------------
55 // VEN
56 if ( $_POST['jrn_type'] == 'VEN') {
57  $jrn=new Acc_Ledger_Sold($cn,$_POST['p_jrn']);
58  try {
59  $a=$jrn->confirm($_POST);
60  echo '<FORM enctype="multipart/form-data" METHOD="POST">';
61  echo HtmlInput::hidden('ac',$_REQUEST['ac']);
62  echo HtmlInput::extension().dossier::hidden();
63  echo HtmlInput::hidden('action','save');
64  echo HtmlInput::hidden('ext_jr_id',$_POST['ext_jr_id']);
65  echo HtmlInput::hidden('ext_jr_internal',
66  $_POST['ext_jr_internal']);
67  echo HtmlInput::hidden('bon_comm',$_POST['bon_comm']);
68  echo HtmlInput::hidden('other_info',$_POST['other_info']);
69  echo $a;
70 
71  echo HtmlInput::submit('save',_('Sauver'));
72  echo '</FORM>';
73  } catch (Exception $e) {
74  alert($e->getMessage());
75  }
76 
77 }
78 //----------------------------------------------------------------------
79 // ODS
80 if ( $_POST['jrn_type'] == 'ODS') {
81  $jrn=new Acc_Ledger($cn,$_POST['p_jrn']);
82  $jrn->with_concerned=false;
83  try {
84  $jrn->verify($_POST);
85  $a= $jrn->input($_POST,1);
86  echo '<FORM enctype="multipart/form-data" METHOD="POST">';
87  echo HtmlInput::hidden('ac',$_REQUEST['ac']);
88  echo HtmlInput::extension().dossier::hidden();
89  echo HtmlInput::hidden('action','save');
90  echo HtmlInput::hidden('ext_jr_id',$_POST['ext_jr_id']);
91  echo HtmlInput::hidden('ext_jr_internal',
92  $_POST['ext_jr_internal']);
93  echo $a;
94 
95  echo HtmlInput::submit('save',_('Sauver'));
96  echo '</FORM>';
97  } catch (Exception $e) {
98  alert($e->getMessage());
99  }
100 
101 }
102 $act->activate_strict();
$_REQUEST['sb']
Definition: am_print.php:39
$act
global $cn