From bbf9fb1dd05b8c26e0ce2fc98705d252d20f4dae Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 16 Nov 2014 15:25:38 +0100 Subject: [PATCH] =?UTF-8?q?Task=20#1045=20-=20Am=C3=A9lioration=20apparenc?= =?UTF-8?q?e=20=20:=20D=C3=A9tail=20op=C3=A9ration=20:=20avec=20onglet=20+?= =?UTF-8?q?=20action=20li=C3=A9e=20(ajout=20+=20suppression)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/js/scripts.js | 41 ++++++ html/style-classic.css | 65 ++++++--- include/class_acc_ledger.php | 12 +- include/class_acc_ledger_sold.php | 2 +- include/template/ledger_detail_ach.php | 89 +------------ include/template/ledger_detail_bottom.php | 152 +++++++++++++++++++--- include/template/ledger_detail_file.php | 2 +- include/template/ledger_detail_fin.php | 39 +++--- include/template/ledger_detail_misc.php | 39 +++--- include/template/ledger_detail_ven.php | 99 ++------------ 10 files changed, 291 insertions(+), 249 deletions(-) diff --git a/html/js/scripts.js b/html/js/scripts.js index 5d555549f..4cc5cc3cf 100644 --- a/html/js/scripts.js +++ b/html/js/scripts.js @@ -2569,4 +2569,45 @@ function select_cat(x) old_class = old_select.className; $(old_select).className = "highlight"; $('fd_id').value = x; +} +/** + * Show the DIV and hide the other, the array of possible DIV are + * in a_tabs, + * @param {array} a_tabs name of possible tabs + * @param {strng} p_display_tab tab to display + */ +function show_tabs(a_tabs,p_display_tab) +{ + try + { + if ( a_tabs.length == 0 ) trow ('a_tabs in empty'); + var i=0; + for ( i=0;ibuild_search_sql($_GET); @@ -618,12 +618,12 @@ class Acc_Ledger extends jrn_def_sql // show nav bar echo $bar; - \endcode - * \see build_search_sql - * \see display_search_form - * \see search_form + @endcode + * @see build_search_sql + * @see display_search_form + * @see search_form - * \return HTML string + * @return HTML string */ public function list_operation_to_reconcile($sql) diff --git a/include/class_acc_ledger_sold.php b/include/class_acc_ledger_sold.php index 7242caf41..5d01d2b5d 100644 --- a/include/class_acc_ledger_sold.php +++ b/include/class_acc_ledger_sold.php @@ -871,7 +871,7 @@ class Acc_Ledger_Sold extends Acc_Ledger { $fname = new Fiche($this->db); $fname->get_by_qcode(${'e_mp_qcode_' . $e_mp}); $r.='

' . "Payé par " . ${'e_mp_qcode_' . $e_mp} . - " " . $fname->getName() . '

' . '

' . _('Déduction acompte ') . h($acompte) . '

' . + " " . $fname->getName() . ' ' . '

' . _('Déduction acompte ') . h($acompte) . '

' . _('Libellé :') . h($e_comm_paiement) ; $r.='
'; } diff --git a/include/template/ledger_detail_ach.php b/include/template/ledger_detail_ach.php index 96f8471ad..5752e8867 100644 --- a/include/template/ledger_detail_ach.php +++ b/include/template/ledger_detail_ach.php @@ -85,18 +85,18 @@ - - - - +
+ + + + -
Note
+ width = 25; - $inote->heigh = 5; + $inote->style=' class="itextarea" style="width:90%;height:100%;"'; $inote->value = strip_tags($obj->det->note); echo $inote->input(); ?> @@ -245,83 +245,8 @@ -
-

- label = 'Afficher'; - $ib->javascript = "g('detail_" . $div . "').style.display='block';g('a" . $div . "').style.display='none';"; - echo $ib->input(); - echo ' - diff --git a/include/template/ledger_detail_bottom.php b/include/template/ledger_detail_bottom.php index 9d259d2f3..c551d094f 100644 --- a/include/template/ledger_detail_bottom.php +++ b/include/template/ledger_detail_bottom.php @@ -1,9 +1,122 @@ +'writing_div'.$div,'label'=>_('Ecriture Comptable'),'display'=>'none'); +$a_tab['info_operation_div']=array('id'=>'info_operation_div'.$div,'label'=>_('Information'),'display'=>'none'); +$a_tab['linked_operation_div']=array('id'=>'linked_operation_div'.$div,'label'=>_('Opérations liées'),'display'=>'none'); +$a_tab['document_operation_div']=array('id'=>'document_operation_div'.$div,'label'=>_('Document'),'display'=>'block'); +$a_tab['linked_action_div']=array('id'=>'linked_action_div'.$div,'label'=>_('Actions liées'),'display'=>'none'); + +// show tabs +if ( $div != "popup") : + $a_tab['document_operation_div']['display']='block'; +?> +
    + $a_value): ?> + +
  • + + +
  • + +
+$a_value): + $a_tab[$idx]['display']='block'; + endforeach; +endif; +?> + + info->command); $other=new IText('OTHER',$obj->info->other); ?> -
-

+
+ +

+ + +
+ jr_id); + $detail->get(); + ?> + + + '; + for ($e = 0; $e < count($detail->det->array); $e++) + { + $row = ''; + $q = $detail->det->array; + $view_history = sprintf('%s', $q[$e]['j_poste'], $gDossier, $q[$e]['j_poste']); + + $row.=td($view_history); + if ($q[$e]['j_qcode'] != '') + { + $fiche = new Fiche($cn); + $fiche->get_by_qcode($q[$e]['j_qcode']); + $view_history = sprintf('%s', $fiche->id, $gDossier, $q[$e]['j_qcode']); + } else + $view_history = ''; + $row.=td($view_history); + + if ($q[$e]['j_text']=="") + { + if ($q[$e]['j_qcode'] != '') + { + // nom de la fiche + $ff = new Fiche($cn); + $ff->get_by_qcode($q[$e]['j_qcode']); + $row.=td($ff->strAttribut(h(ATTR_DEF_NAME))); + } else + { + // libellé du compte + $name = $cn->get_value('select pcm_lib from tmp_pcmn where pcm_val=$1', array($q[$e]['j_poste'])); + $row.=td(h($name)); + } + } + else + $row.=td(h($q[$e]['j_text'])); + + $montant = td(nbm($q[$e]['j_montant']), 'class="num"'); + $row.=($q[$e]['j_debit'] == 't') ? $montant : td(''); + $row.=($q[$e]['j_debit'] == 'f') ? $montant : td(''); + $class=($e%2==0)?' class="even"':'class="odd"'; + + echo tr($row,$class); + } + ?> +
+
+
+
+ +

+ @@ -13,10 +126,13 @@
: input(); ?>
-
-

- -

+
+ +

+ jr_id=$jr_id; @@ -62,32 +178,38 @@ if ( $access=='W') {
0) -{ ?> -
-

Actions liées

+
+ +

+ '; for ($i = 0; $i < count($array); $i++) { + $remove=''; + if ( $access=='W') $remove=HtmlInput::button_action_remove_operation($array[$i]['ago_id']); if ( $div == 'popup') { - echo '
  • '.HtmlInput::detail_action($array[$i]['ag_id'], h($array[$i]['ag_ref']." ".$array[$i]['ag_title']),0).'
  • '; + echo '
  • '.HtmlInput::detail_action($array[$i]['ag_id'], h($array[$i]['ag_ref']." ".$array[$i]['ag_title']),0).$remove.'
  • '; } else { - echo '
  • '.HtmlInput::detail_action($array[$i]['ag_id'], h($array[$i]['ag_ref']." ".$array[$i]['ag_title']),1).'
  • '; + echo '
  • '.HtmlInput::detail_action($array[$i]['ag_id'], h($array[$i]['ag_ref']." ".$array[$i]['ag_title']),1).$remove.'
  • '; } } echo ''; - + $related=new IRelated_Action('related'); + $related->id='related'.$div; + if ( $access=='W') echo $related->input(); echo '
    '; -} ?> -
    +
    \ No newline at end of file diff --git a/include/template/ledger_detail_fin.php b/include/template/ledger_detail_fin.php index 4ac66c11a..f541b7729 100644 --- a/include/template/ledger_detail_fin.php +++ b/include/template/ledger_detail_fin.php @@ -67,26 +67,27 @@ echo td(_('Pièce')).td($itext->input());
    -
    - - - - - + - - -
    - Note -
    -width=25; -$inote->heigh=5; -$inote->value=strip_tags($obj->det->note); -echo $inote->input(); -?> + + + + + + + +
    + Note +
    + style=' class="itextarea" style="width:90%;height:100%;"'; + $inote->value = strip_tags($obj->det->note); + echo $inote->input(); + ?> + +
    +
    -
    diff --git a/include/template/ledger_detail_misc.php b/include/template/ledger_detail_misc.php index b97b4a831..517f22753 100644 --- a/include/template/ledger_detail_misc.php +++ b/include/template/ledger_detail_misc.php @@ -53,27 +53,26 @@ require_once ('class_anc_plan.php'); - - - - - - - - - -
    - Note -
    - width=25; - $inote->heigh=5; - $inote->value=strip_tags($obj->det->note); - echo $inote->input(); - ?> + + + + + + + +
    + Note +
    + style=' class="itextarea" style="width:90%;height:100%;"'; + $inote->value = strip_tags($obj->det->note); + echo $inote->input(); + ?> + +
    +
    - diff --git a/include/template/ledger_detail_ven.php b/include/template/ledger_detail_ven.php index c4ec3370f..0d10c6d16 100644 --- a/include/template/ledger_detail_ven.php +++ b/include/template/ledger_detail_ven.php @@ -94,26 +94,26 @@ echo $ipaid->input(); - - - - +
    - + + + + -
    + Note
    -width = 25; -$inote->heigh = 5; -$inote->value = strip_tags($obj->det->note); -echo $inote->input(); -?> + + style=' class="itextarea" style="width:90%;height:100%;"'; + $inote->value = strip_tags($obj->det->note); + echo $inote->input(); + ?>
    @@ -248,78 +248,7 @@ echo $inote->input();
    -
    -

    - -

    - label = 'Afficher'; - $ib->javascript = "g('detail_" . $div . "').style.display='block';g('a" . $div . "').style.display='none';"; - echo $ib->input(); - echo ' + -