From baf8958cd2460a854920540fa8783190d96cf84d Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 7 Dec 2014 04:16:51 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20d'un=20bouton=20pour=20revenir=20=C3=A0?= =?UTF-8?q?=20l'encodage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/class_acc_ledger.php | 10 ++++++++++ include/compta_ach.inc.php | 2 +- include/compta_fin.inc.php | 2 ++ include/compta_ods.inc.php | 2 ++ include/compta_ven.inc.php | 1 + 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/include/class_acc_ledger.php b/include/class_acc_ledger.php index 68b1e9e83..8b000f49f 100644 --- a/include/class_acc_ledger.php +++ b/include/class_acc_ledger.php @@ -3887,6 +3887,16 @@ class Acc_Ledger extends jrn_def_sql return $r; } + /** + * Create a button to encode a new operation into the same ledger + * @return string + */ + function button_new_operation() + { + $url=http_build_query(array('ac'=>$_REQUEST['ac'],'gDossier'=>$_REQUEST['gDossier'],'p_jrn'=>$_REQUEST['p_jrn'])); + $button = HtmlInput::button_anchor(_("Nouvelle opération"), 'do.php?'.$url); + return $button; + } } ?> \ No newline at end of file diff --git a/include/compta_ach.inc.php b/include/compta_ach.inc.php index de12e278a..ec307d1f1 100644 --- a/include/compta_ach.inc.php +++ b/include/compta_ach.inc.php @@ -157,7 +157,7 @@ if (isset($_POST['record'])) echo '

Document

'; echo $Ledger->doc; } - + echo $Ledger->button_new_operation(); echo ''; return; } diff --git a/include/compta_fin.inc.php b/include/compta_fin.inc.php index 379771951..dd6e7b655 100644 --- a/include/compta_fin.inc.php +++ b/include/compta_fin.inc.php @@ -117,7 +117,9 @@ if ( isset($_POST['confirm'])) echo '
'; echo $a; echo '
'; + echo ''; + echo $Ledger->button_new_operation(); return; } } diff --git a/include/compta_ods.inc.php b/include/compta_ods.inc.php index 70e6269e1..8c3d44963 100644 --- a/include/compta_ods.inc.php +++ b/include/compta_ods.inc.php @@ -100,6 +100,8 @@ elseif (isset($_POST['save'])) // show feedback echo '
'; echo '

' . $ledger->get_name() . '

'; echo '
'; echo $ledger->confirm($_POST, true); + echo $ledger->button_new_operation(); + } catch (Exception $e) { diff --git a/include/compta_ven.inc.php b/include/compta_ven.inc.php index 52c48f70f..ebed9af51 100644 --- a/include/compta_ven.inc.php +++ b/include/compta_ven.inc.php @@ -170,6 +170,7 @@ $p_msg=""; $obj=new Acc_Ledger_Info($cn); $obj->save_extra($Ledger->jr_id,$_POST); + echo $Ledger->button_new_operation(); echo ''; return;