noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 78/119: Fix FollowUp : price Purchase or Sale


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 78/119: Fix FollowUp : price Purchase or Sale
Date: Mon, 26 Oct 2020 18:27:28 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 464567ec31bb116069de6feae70499ae24a344cd
Author: Dany De Bontridder <danydb@noalyss.eu>
AuthorDate: Sun Oct 11 17:35:55 2020 +0200

    Fix FollowUp : price Purchase or Sale
---
 include/class/follow_up_detail.class.php      | 11 +++--------
 include/template/follow_up_detail_display.php |  9 +++++++--
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/include/class/follow_up_detail.class.php 
b/include/class/follow_up_detail.class.php
index 0967d99..2cdd338 100644
--- a/include/class/follow_up_detail.class.php
+++ b/include/class/follow_up_detail.class.php
@@ -236,16 +236,11 @@ class Follow_Up_Detail
     
     public static function display(Follow_Up $p_follow_up,$p_view)
     {
+        $option=$p_follow_up->db->get_value("select do_option from 
document_option "
+                . "  where document_type_id=$1 and 
do_code='detail_operation'",[$p_follow_up->dt_id]);
+        
          require NOALYSS_TEMPLATE."/follow_up_detail_display.php";
     }
-    /*!\brief
-     *\param
-     *\return
-     *\note
-     *\see
-     */
-    static function test_me()
-{}
 
 }
 
diff --git a/include/template/follow_up_detail_display.php 
b/include/template/follow_up_detail_display.php
index a86a2e8..0b3946f 100644
--- a/include/template/follow_up_detail_display.php
+++ b/include/template/follow_up_detail_display.php
@@ -88,8 +88,13 @@ $menu=new Default_Menu();
             $icard->javascript=sprintf(' 
onchange="fill_data_onchange(\'%s\');" ', $icard->name);
             // name of the field to update with the name of the card
             $icard->set_attribute('label', 'e_march' . $i . '_label');
-            // name of the field with the price
-            $icard->set_attribute('price', 'e_march' . $i . '_price');
+            // name of the field with the price autocomplete 
+            if ( $option == 'ACH'){
+             $icard->set_attribute('purchase', 'e_march' . $i . '_price');
+            } else {
+             $icard->set_attribute('price','e_march'.$i.'_price'); 
+            }
+            
             // name of the field with the TVA_ID
             $icard->set_attribute('tvaid', 'e_march' . $i . '_tva_id');
            $icard->amount_from_type=$option_detail;



reply via email to

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