noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 02/04: Bug #1007 - Historique : icone documen


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 02/04: Bug #1007 - Historique : icone document Task #1007 - Historique : icone document
Date: Fri, 27 Jun 2014 19:24:53 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit f3f58f06fef3cf43cf253a1516e12b05bb016e86
Author: Dany De Bontridder <address@hidden>
Date:   Fri Jun 27 21:10:38 2014 +0200

    Bug #1007 - Historique : icone document
    Task #1007 - Historique : icone document
---
 html/image/documents.png     |  Bin 0 -> 11918 bytes
 include/class_acc_ledger.php |    4 +---
 include/class_html_input.php |   20 ++++++++++++++++++++
 3 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/html/image/documents.png b/html/image/documents.png
new file mode 100644
index 0000000..61d9f0f
Binary files /dev/null and b/html/image/documents.png differ
diff --git a/include/class_acc_ledger.php b/include/class_acc_ledger.php
index cfef504..8b9281d 100644
--- a/include/class_acc_ledger.php
+++ b/include/class_acc_ledger.php
@@ -995,9 +995,7 @@ class Acc_Ledger extends jrn_def_sql
                        //document
                        if ($row['jr_pj_name'] != "")
                        {
-                               $image = '<IMG SRC="image/insert_table.gif" 
title="' . $row['jr_pj_name'] . '" border="0">';
-                               $r.="<TD>" . sprintf('<A class="detail" 
HREF="show_pj.php?jrn=%s&jr_grpt_id=%s&%s">%s</A>', $row['jrn_def_id'], 
$row['jr_grpt_id'], $str_dossier, $image)
-                                               . "</TD>";
+                            
$r.='<td>'.HtmlInput::show_receipt_document($row['jr_id']).'</td>';
                        }
                        else
                                $r.="<TD></TD>";
diff --git a/include/class_html_input.php b/include/class_html_input.php
index a31949a..d359588 100755
--- a/include/class_html_input.php
+++ b/include/class_html_input.php
@@ -822,5 +822,25 @@ class HtmlInput
             echo $hid_jrn;
             echo '</span>';
         }
+        /**
+         * Returns HTML code for displaying a icon with a link to a receipt 
document from
+         * the ledger 
+         * @global $cn database connx
+         * @param $p_jr_id jrn.jr_id
+         * @return nothing or HTML Code for a link to the document
+         */
+        static function show_receipt_document($p_jr_id)
+        {
+            global $cn;
+            
+            $array=$cn->get_array('select jr_def_id,jr_pj_name,jr_grpt_id from 
jrn where jr_id=$1',array($p_jr_id));
+            if (count($array)==0) return "";
+            if ($array[0]['jr_pj_name'] == "") return "";
+            $str_dossier=Dossier::get();
+            $image='<IMG style="width:24px;height:24px;border:0px" 
SRC="image/documents.png" title="' . $array[0]['jr_pj_name'] . '" >';
+            $r=sprintf('<A class="detail" 
HREF="show_pj.php?jrn=%s&jr_grpt_id=%s&%s">%s</A>', $array[0]['jr_def_id'], 
$array[0]['jr_grpt_id'], $str_dossier, $image);
+            return $r;
+            
+        }
 
 }



reply via email to

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