noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 129/151: #1380 : Duplication d'opérations


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 129/151: #1380 : Duplication d'opérations
Date: Sat, 4 Feb 2017 17:14:34 +0000 (UTC)

sparkyx pushed a commit to branch master
in repository noalyss.

commit e7485c51f6dbc6e659c7df931df8c9ccfb74113f
Author: Rachel <address@hidden>
Date:   Wed Jan 18 14:33:57 2017 +0100

    #1380 : Duplication d'opérations
    
    Signed-off-by: Dany De Bontridder <address@hidden>
---
 include/class/class_acc_ledger.php |   29 ++++++++++++++++++++++++++++-
 include/compta_ach.inc.php         |    1 +
 include/compta_ods.inc.php         |    4 ++--
 include/compta_ven.inc.php         |    2 +-
 4 files changed, 32 insertions(+), 4 deletions(-)

diff --git a/include/class/class_acc_ledger.php 
b/include/class/class_acc_ledger.php
index 192bc13..b1d8b05 100644
--- a/include/class/class_acc_ledger.php
+++ b/include/class/class_acc_ledger.php
@@ -3976,6 +3976,33 @@ class Acc_Ledger extends jrn_def_sql
             $button = HtmlInput::button_anchor(_("Nouvelle opération"), 
'do.php?'.$url);
             return '<p>'.$button.'</p>';
         }
-
+        /**
+         address@hidden Show a button to create an operation identical to the 
recorded
+         * one. It is a form POST since it is a limit with get
+         */
+        public function copy_information()
+        {
+            echo '<FORM METHOD="POST">';
+            echo HtmlInput::post_to_hidden(
+                array("gDossier","ac","p_jrn","e_client","nb_item")
+            );
+            echo HtmlInput::hidden("correct","copy");
+            // e_march
+            $nb=HtmlInput::default_value_post("nb_item",0);
+            for ( $i=0;$i<$nb;$i++)
+            {
+                echo HtmlInput::post_to_hidden(
+                    array(
+                        "e_march".$i,
+                        "e_march".$i."_price",
+                        "e_march".$i."_quant",
+                        "e_march".$i."_label",
+                        "e_march".$i."_tva_amount"
+                    ));
+            }
+            echo HtmlInput::submit("copy_operation",_("Même opération"));
+                    
+            echo '</FORM>';
+        }
 }
 ?>
\ No newline at end of file
diff --git a/include/compta_ach.inc.php b/include/compta_ach.inc.php
index b5a14ea..9d3ae24 100644
--- a/include/compta_ach.inc.php
+++ b/include/compta_ach.inc.php
@@ -199,6 +199,7 @@ if (isset($_POST['record']))
                     }
                 }
                 echo $Ledger->button_new_operation();
+                echo $Ledger->copy_operation();
                echo '</div>';
                return;
        }
diff --git a/include/compta_ods.inc.php b/include/compta_ods.inc.php
index 068c1e7..32ccd4b 100644
--- a/include/compta_ods.inc.php
+++ b/include/compta_ods.inc.php
@@ -130,13 +130,13 @@ elseif (isset($_POST['save']))
                 }
                 
                 echo $ledger->button_new_operation();
-
+                echo $Ledger->copy_operation();
        }
        catch (Exception $e)
        {
                require NOALYSS_INCLUDE.'/operation_ods_new.inc.php';
                alert($e->getMessage());
-                $p_msg=$e->getMessage();
+        $p_msg=$e->getMessage();
        }
         echo '</div>';
        return;
diff --git a/include/compta_ven.inc.php b/include/compta_ven.inc.php
index 4fe073a..aec0b24 100644
--- a/include/compta_ven.inc.php
+++ b/include/compta_ven.inc.php
@@ -216,7 +216,7 @@ show_tab(a_tab,'facturation_div_id');
             }
 
             echo $Ledger->button_new_operation();
-
+            echo $Ledger->copy_operation();
             echo '</div>';
             return;
         }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]