phpcompta-dev
[Top][All Lists]
Advanced

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

[Phpcompta-dev] r4566 - in phpcompta/trunk/include: . template


From: phpcompta-dev
Subject: [Phpcompta-dev] r4566 - in phpcompta/trunk/include: . template
Date: Tue, 6 Dec 2011 22:53:54 +0100 (CET)

Author: danydb
Date: 2011-12-06 22:53:52 +0100 (Tue, 06 Dec 2011)
New Revision: 4566

Modified:
   phpcompta/trunk/include/class_acc_ledger_purchase.php
   phpcompta/trunk/include/class_acc_ledger_sold.php
   phpcompta/trunk/include/template/ledger_detail_ven.php
Log:
0000485: Ecran de confirmation vente
Correction des d?\195?\169tails vente quand on devient assujetti

Modified: phpcompta/trunk/include/class_acc_ledger_purchase.php
===================================================================
--- phpcompta/trunk/include/class_acc_ledger_purchase.php       2011-12-05 
21:51:27 UTC (rev 4565)
+++ phpcompta/trunk/include/class_acc_ledger_purchase.php       2011-12-06 
21:53:52 UTC (rev 4566)
@@ -1281,7 +1281,7 @@
             $r.="<th style=\"text-align:right\">tva</th>";
             $r.='<th style="text-align:right"> '._('Montant TVA').'</th>';
             $r.='<th style="text-align:right">'._('Montant HTVA').'</th>';
-            $r.='<th style="text-align:right">'._('Totaux').'</th>';
+            $r.='<th style="text-align:right">'._('Montant TVAC').'</th>';
         }
         else
         {

Modified: phpcompta/trunk/include/class_acc_ledger_sold.php
===================================================================
--- phpcompta/trunk/include/class_acc_ledger_sold.php   2011-12-05 21:51:27 UTC 
(rev 4565)
+++ phpcompta/trunk/include/class_acc_ledger_sold.php   2011-12-06 21:53:52 UTC 
(rev 4566)
@@ -616,7 +616,9 @@
     /address@hidden show the summary of the operation and propose to save it
      address@hidden array contains normally $_POST. It proposes also to save
      * the Analytic accountancy
+        address@hidden $p_summary false for the feedback, true to show the 
summary
      address@hidden string
+        *
      */
     function confirm($p_array,$p_summary=false)
     {
@@ -676,14 +678,19 @@
         $r.="<th>"._('Dénomination')."</th>";
         $r.="<th style=\"text-align:right\">"._('prix')."</th>";
         $r.="<th style=\"text-align:right\">"._('quantité')."</th>";
-        $r.="<th style=\"text-align:right\">"._('tva')."</th>";
 
 
         if ( $g_parameter->MY_TVA_USE=='Y')
         {
+                       $r.="<th style=\"text-align:right\">"._('tva')."</th>";
             $r.='<th style="text-align:right"> '._('Montant TVA').'</th>';
             $r.='<th style="text-align:right">'._('Montant HTVA').'</th>';
+            $r.='<th style="text-align:right">'._('Montant TVAC').'</th>';
         }
+               else
+               {
+                       $r.='<th 
style="text-align:right">'._('Montant').'</th>';
+               }
         /* if we use the AC */
         if ($g_parameter->MY_ANALYTIC!='nu')
         {
@@ -751,20 +758,29 @@
                 $r.=$oTva->get_parameter('label');
                 $r.='</td>';
                 $r.='<td class="num">';
-                $r.=nbm($tva_item);
                 /* warning if tva_computed and given are not the
                    same */
                 if ( bcsub($tva_item,$tva_computed) != 0)
                 {
-                    echo _("Attention Différence");
+                    $r.='<a href="#" class="error" style="display:inline" 
title="'. _("Attention Différence entre TVA calculée et donnée").'">'
+                                                       .nbm($tva_item).'<a>';
                 }
+                               else
+                                       $r.=nbm($tva_item);
                 $r.='</td>';
+                               $r.='<td class="num">';
+                               $r.=nbm($amount);
+                               $r.='</td>';
+                               $tot_row=bcadd($tva_item,$amount);
+                               $r.=td(nbm($tot_row),'class="num"');
             }
-            $r.='<td class="num">';
-            $r.=nbm($amount);
-            $r.='</td>';
-
-            // encode the pa
+                       else
+                       {
+                               $r.='<td class="num">';
+                               $r.=nbm($amount);
+                               $r.='</td>';
+                       }
+                       // encode the pa
             if ( $g_parameter->MY_ANALYTIC!='nu') // use of AA
             {
                 // show form

Modified: phpcompta/trunk/include/template/ledger_detail_ven.php
===================================================================
--- phpcompta/trunk/include/template/ledger_detail_ven.php      2011-12-05 
21:51:27 UTC (rev 4565)
+++ phpcompta/trunk/include/template/ledger_detail_ven.php      2011-12-06 
21:53:52 UTC (rev 4566)
@@ -144,7 +144,8 @@
        $pu=bcdiv($q['qs_price'],$q['qs_quantite']);
     $row.=td(nbm($pu),'class="num"');
     $row.=td(nbm($q['qs_quantite']),'class="num"');
-   if ( $owner->MY_TVA_USE=='Y') {
+       $sym_tva='';
+   if ( $owner->MY_TVA_USE=='Y' && $q['qs_vat_code'] != '') {
      /* retrieve TVA symbol */
      $tva=new Acc_Tva($cn,$q['qs_vat_code']);
      $tva->load();




reply via email to

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