diff --git a/include/function_javascript.php b/include/function_javascript.php index def0b2907..95f393fd9 100644 --- a/include/function_javascript.php +++ b/include/function_javascript.php @@ -20,7 +20,7 @@ function js_include($p_string) { alert("Erreur js/$p_string n existe pas"); $script=''; // debug - echo "insert js $p_string "; + return $script; } diff --git a/include/template/ledger_detail_ach.php b/include/template/ledger_detail_ach.php index f25f71bc8..9ba8f9730 100644 --- a/include/template/ledger_detail_ach.php +++ b/include/template/ledger_detail_ach.php @@ -19,10 +19,7 @@ det->array[0]['qp_supplier']); echo td(_('Client')); -/** - *@file - *@todo Ajouter une clef unique sur quant_fin.jr_id, quant_purchase.j_id et quant_sold.j_id - */ + $view_history= sprintf('%s', $bk->id, $gDossier, $bk->get_quick_code()); echo td(h($bk->getName())).td($view_history);; @@ -54,14 +51,19 @@ echo td(_('Libellé')).td($itext->input(),' colspan="2" '); $total_htva=0;$total_tvac=0; echo th(_('Quick Code')); echo th(_('Description')); -if ( $owner->MY_TVA_USE == 'Y') +if ( $owner->MY_TVA_USE == 'Y') { echo th(_('Taux TVA'), 'style="text-align:right"'); +} else { + echo th(''); +} echo th(_('P.Unit.'), 'style="text-align:right"'); echo th(_('Quantité'), 'style="text-align:right"'); if ( $owner->MY_TVA_USE == 'Y') { echo th(_('HTVA'), 'style="text-align:right"'); echo th(_('TVAC'), 'style="text-align:right"'); -} +}else + echo th(_('Total'), 'style="text-align:right"'); + if ($owner->MY_ANALYTIC != 'nu'){ $anc=new Anc_Plan($cn); $a_anc=$anc->get_list(); @@ -80,10 +82,16 @@ echo ''; $view_history= sprintf('%s', $fiche->id, $gDossier, $fiche->strAttribut(ATTR_DEF_QUICKCODE)); - $row=td($view_history); - + $row=td($view_history); + $sym_tva='noe'; + if ( $owner->MY_TVA_USE=='Y') { + /* retrieve TVA symbol */ + $tva=new Acc_Tva($cn,$q['qp_vat_code']); + $tva->load(); + $sym_tva=h($tva->get_parameter('label')); + } $row.=td($fiche->strAttribut(ATTR_DEF_NAME)); - $row.=td($q['qp_vat_code'],'class="num"'); + $row.=td($sym_tva,'style="text-align:center"'); $row.=td(sprintf("%.2f",$q['qp_price']),'class="num"'); $row.=td(sprintf("%.2f",$q['qp_quantite']),'class="num"'); $htva=bcmul($q['qp_price'],$q['qp_quantite']); diff --git a/include/template/ledger_detail_ven.php b/include/template/ledger_detail_ven.php index 9f3edb77f..aa6dd54ed 100644 --- a/include/template/ledger_detail_ven.php +++ b/include/template/ledger_detail_ven.php @@ -19,10 +19,7 @@ det->array[0]['qs_client']); echo td(_('Client')); -/** - *@file - *@todo Ajouter une clef unique sur quant_fin.jr_id, quant_purchase.j_id et quant_sold.j_id - */ + $view_history= sprintf('%s', $bk->id, $gDossier, $bk->get_quick_code()); echo td(h($bk->getName())).td($view_history);; @@ -56,12 +53,16 @@ echo td(_('Libellé')).td($itext->input(),' colspan="2" '); echo th(_('Description')); if ( $owner->MY_TVA_USE == 'Y') echo th(_('Taux TVA'), 'style="text-align:right"'); +else + echo th(''); echo th(_('P.Unit.'), 'style="text-align:right"'); echo th(_('Quantité'), 'style="text-align:right"'); if ( $owner->MY_TVA_USE == 'Y') { echo th(_('HTVA'), 'style="text-align:right"'); echo th(_('TVAC'), 'style="text-align:right"'); -} +} else + echo th(_('Total'), 'style="text-align:right"'); + if ($owner->MY_ANALYTIC != 'nu'){ $anc=new Anc_Plan($cn); $a_anc=$anc->get_list(); @@ -82,7 +83,16 @@ echo ''; $row=td($view_history); $row.=td($fiche->strAttribut(ATTR_DEF_NAME)); - $row.=td($q['qs_vat_code'],'class="num"'); + $sym_tva=''; + if ( $owner->MY_TVA_USE=='Y') { + /* retrieve TVA symbol */ + $tva=new Acc_Tva($cn,$q['qs_vat_code']); + $tva->load(); + $sym_tva=(h($tva->get_parameter('label'))); + // $sym_tva=$sym + } + + $row.=td($sym_tva,'style="text-align:center"'); $row.=td(sprintf("%.2f",$q['qs_price']),'class="num"'); $row.=td(sprintf("%.2f",$q['qs_quantite']),'class="num"'); $htva=bcmul($q['qs_price'],$q['qs_quantite']); diff --git a/release-note b/release-note index 25799f46e..d2b4ba10b 100644 --- a/release-note +++ b/release-note @@ -16,6 +16,9 @@ Conséquence : réécriture de code, correction modop, ... 14. Depuis les lettrages, on peut aussi accèder aux détails d'une opération 15. TODO9 - dépend de TODO4 TODO2 - dans impressions, on peut avoir les détails de toutes les opérations 16. TODO19 Le menu Grand Livre devient recherche +17. TODO20 Ajouter d'attribut avec type : text, nombre ou date; ajouter le javascript équivalent pour la saisie, le numéro de séquence +commence à 10000, afin de ne pas mélanger les attributs que je créé avec ceux des utilisateurs. A ajouter dans la doc comme exemple pour la gestion d'abonnés dont on peut tirer un CSV par impression -> catégorie -> résume + IDEE6, categorie de fiche, changer la présentation @@ -37,7 +40,5 @@ IDEE1 Pièce attachée uniquement depuis détail opération ? -TODO20 Ajouter d'attribut avec type : text, nombre ou date; ajouter le javascript équivalent pour la saisie, le numéro de séquence -commence à 10000, afin de ne pas mélanger les attributs que je créé avec ceux des utilisateurs. A ajouter dans la doc comme exemple pour la gestion d'abonnés dont on peut tirer un CSV par impression -> catégorie -> résume TODO21 Dans DIV HTML donner le code de la TVA dans les détails VEN et ACH