diff --git a/include/class/follow_up_detail.class.php b/include/class/follow_up_detail.class.php index 0967d99ea..2cdd338cb 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 a86a2e844..0b3946f02 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;