diff --git a/include/compta_ach.inc.php b/include/compta_ach.inc.php index fd2b9a6b4..2bc3b33a8 100644 --- a/include/compta_ach.inc.php +++ b/include/compta_ach.inc.php @@ -43,7 +43,7 @@ if (isset($_REQUEST['p_jrn'])) NoAccess(); exit - 1; } - +$p_msg=""; /* if a new invoice is encoded, we display a form for confirmation */ if (isset($_POST['view_invoice'])) { @@ -55,6 +55,7 @@ if (isset($_POST['view_invoice'])) catch (Exception $e) { alert($e->getMessage()); + $p_msg=$e->getMessage(); $correct = 1; } // if correct is not set it means it is correct @@ -97,6 +98,7 @@ if (isset($_POST['record'])) catch (Exception $e) { alert($e->getMessage()); + $p_msg=$e->getMessage(); $correct = 1; } // record the invoice @@ -186,6 +188,7 @@ echo ''; echo ''; echo '
'; +echo '

'.$p_msg.'

'; echo "
"; /* request for a predefined operation */ if ( isset($_REQUEST['pre_def']) && !isset($_POST['correct'])) diff --git a/include/compta_fin.inc.php b/include/compta_fin.inc.php index d53be9505..af32c1db0 100644 --- a/include/compta_fin.inc.php +++ b/include/compta_fin.inc.php @@ -57,7 +57,7 @@ if ( isset($_REQUEST['p_jrn']) && ( $jrn_priv == 'X')) NoAccess(); exit -1; } - +$p_msg=""; //---------------------------------------- // Confirm the operations //---------------------------------------- @@ -70,13 +70,14 @@ if ( isset($_POST['save'])) catch (Exception $e) { alert($e->getMessage()); + $p_msg=$e->getMessage(); $correct=1; } if ( ! isset ($correct )) { echo '
'; - echo h1('Confirmation',''); - echo_warning("Attention, cette opération n'est pas encore sauvée : vous devez encore confirmer"); + echo h1(_('Confirmation'),''); + echo_warning(_("Attention, cette opération n'est pas encore sauvée : vous devez encore confirmer")); echo ''; echo HtmlInput::hidden('ac',$_REQUEST['ac']); echo $Ledger->confirm($_POST); @@ -101,6 +102,7 @@ if ( isset($_POST['confirm'])) catch (Exception $e) { alert($e->getMessage()); + $p_msg=$e->getMessage(); $correct=1; } if ( !isset($correct)) @@ -131,6 +133,7 @@ if ( isset($_POST['correct'])) //---------------------------------------- echo '
'; +echo '

'.$p_msg.'

'; echo ''; echo HtmlInput::hidden('ledger_type','fin'); diff --git a/include/compta_ods.inc.php b/include/compta_ods.inc.php index 1f1d1da2f..0af21c0cd 100644 --- a/include/compta_ods.inc.php +++ b/include/compta_ods.inc.php @@ -61,6 +61,7 @@ if ($g_user->check_jrn($ledger->id) == 'X') NoAccess(); exit - 1; } +$p_msg=""; if (!isset($_POST['summary']) && !isset($_POST['save'])) { require('operation_ods_new.inc.php'); @@ -74,6 +75,7 @@ elseif (isset($_POST['summary'])) } catch (Exception $e) { echo alert($e->getMessage()); + $p_msg=$e->getMessage(); require('operation_ods_new.inc.php'); } @@ -103,6 +105,7 @@ elseif (isset($_POST['save'])) { require('operation_ods_new.inc.php'); alert($e->getMessage()); + $p_msg=$e->getMessage(); } return; } diff --git a/include/compta_ven.inc.php b/include/compta_ven.inc.php index 7a334b378..81c674054 100644 --- a/include/compta_ven.inc.php +++ b/include/compta_ven.inc.php @@ -36,7 +36,7 @@ $cn=new Database(dossier::id()); $str_dossier=dossier::get(); $ac="ac=".$_REQUEST['ac']; global $g_parameter; - +$p_msg=""; //---------------------------------------------------------------------- // Encode a new invoice // empty form for encoding @@ -64,14 +64,15 @@ global $g_parameter; catch (Exception $e) { alert($e->getMessage()); + $p_msg=$e->getMessage(); $correct=1; } // if correct is not set it means it is correct if ( ! isset($correct)) { echo '
'; - echo h1('Confirmation',''); - echo_warning("Attention, cette opération n'est pas encore sauvée : vous devez encore confirmer"); + echo h1(_("Confirmation"),''); + echo_warning(_("Attention, cette opération n'est pas encore sauvée : vous devez encore confirmer")); echo ''; @@ -187,6 +188,7 @@ echo '
'; echo '
'; echo '
'; + echo '

'.$p_msg.'

'; echo ""; /* request for a predefined operation */ if ( isset($_REQUEST['pre_def']) && ! isset($_POST['correct']) ) @@ -234,6 +236,8 @@ echo '
'; echo ''; } echo '
'; + + echo HtmlInput::button('act',_('Actualiser'),'onClick="compute_all_ledger();"'); echo HtmlInput::submit("view_invoice",_("Enregistrer")); echo HtmlInput::reset(_('Effacer ')); diff --git a/include/operation_ods_new.inc.php b/include/operation_ods_new.inc.php index ce1e9a40f..b65257a79 100644 --- a/include/operation_ods_new.inc.php +++ b/include/operation_ods_new.inc.php @@ -40,7 +40,7 @@ $ledger->id = ($ledger->id == -1) ? $first_ledger['jrn_def_id'] : $id_ledger; // check if we can write in the ledger if ( $g_user->check_jrn($ledger->id)=='X') { - alert("Vous ne pouvez pas écrire dans ce journal, contacter votre administrateur"); + alert(_("Vous ne pouvez pas écrire dans ce journal, contacter votre administrateur")); return; } echo '
'; @@ -76,7 +76,7 @@ if ( isset ($_GET['action']) && ! isset($_POST['correct'])) } } - +print '

'.$p_msg.'

'; echo ''; echo dossier::hidden(); echo HtmlInput::request_to_hidden(array('ac'));