phpcompta-dev
[Top][All Lists]
Advanced

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

[Phpcompta-dev] r690 - in trunk/transform: . include include/template un


From: phpcompta-dev
Subject: [Phpcompta-dev] r690 - in trunk/transform: . include include/template unit-test
Date: Fri, 7 Feb 2014 21:01:58 +0100 (CET)

Author: danydb
Date: 2014-02-07 21:01:57 +0100 (Fri, 07 Feb 2014)
New Revision: 690

Modified:
   trunk/transform/ajax_modify_intervat_assujetti.php
   trunk/transform/ajax_save_intervat_assujetti.php
   trunk/transform/include/class_transform_declarant.php
   trunk/transform/include/class_transform_intervat.php
   trunk/transform/include/class_transform_representative.php
   trunk/transform/include/intervat_listing_assujetti.inc.php
   trunk/transform/include/intervat_listing_assujetti_step_1.inc.php
   trunk/transform/include/intervat_listing_assujetti_step_2.inc.php
   trunk/transform/include/intervat_listing_assujetti_step_3.inc.php
   trunk/transform/include/template/listing_assujetti_declarant.php
   trunk/transform/include/template/listing_assujetti_representative.php
   trunk/transform/include/template/listing_client_display.php
   trunk/transform/raw.php
   trunk/transform/transform_javascript.js
   trunk/transform/unit-test/valide-xml.php
Log:
Test with INTERVAT successfull

Modified: trunk/transform/ajax_modify_intervat_assujetti.php
===================================================================
--- trunk/transform/ajax_modify_intervat_assujetti.php  2014-02-05 19:54:22 UTC 
(rev 689)
+++ trunk/transform/ajax_modify_intervat_assujetti.php  2014-02-07 20:01:57 UTC 
(rev 690)
@@ -71,7 +71,7 @@
                 <?php echo _('Commentaire'); ?>
             </td>
             <td id="modify_intervat_assujetti_div_comment">
-                <?php echo $client->c_comment; ?>
+                <span class="notice"> <?php echo $client->c_comment; ?></span>
             </td>
         </tr>
     </table>

Modified: trunk/transform/ajax_save_intervat_assujetti.php
===================================================================
--- trunk/transform/ajax_save_intervat_assujetti.php    2014-02-05 19:54:22 UTC 
(rev 689)
+++ trunk/transform/ajax_save_intervat_assujetti.php    2014-02-07 20:01:57 UTC 
(rev 690)
@@ -30,6 +30,7 @@
     $client = new Transform_Client($id);
     if ($act == 0)
     {
+        global $g_failed,$g_succeed;
         $action = "UPD";
         $client->c_amount_novat = 
HtmlInput::default_value_get('c_amount_novat', $client->c_amount_novat);
         $client->c_name = HtmlInput::default_value_get('c_name', 
$client->c_name);
@@ -54,14 +55,14 @@
             <?php echo h($client->c_amount_vat) ?>
             </td>
             <td>
-            <?php echo h($client->c_comment) ?>
+            <?php echo $g_succeed.h($client->c_comment) ?>
             </td>
             <td>
                 <a class="line" href="javascript:void(0)" onclick="<?php echo 
$js; ?>"><?php echo _('Modifier') ?></a>
             </td>
             <?php
             else:
-                echo $client->c_comment;
+                echo $g_failed.$client->c_comment;
         endif;
     } else
     {

Modified: trunk/transform/include/class_transform_declarant.php
===================================================================
--- trunk/transform/include/class_transform_declarant.php       2014-02-05 
19:54:22 UTC (rev 689)
+++ trunk/transform/include/class_transform_declarant.php       2014-02-07 
20:01:57 UTC (rev 690)
@@ -98,7 +98,7 @@
         $this->year=HtmlInput::default_value_post('p_year',null);
     }
 
-    function input()
+    function input($error=0,$errmsg="")
     {
         $h_name = new IText('p_dec_name', $this->name);
         $h_name->readOnly=$this->readOnly;
@@ -160,17 +160,17 @@
         /* -- email must be valide */
         if (!preg_match( 
'/^[_a-z0-9-]+(\.[_a-z0-9-]+)address@hidden(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/',$this->email))
         {
-            throw new Exception(_('Email incorrect'),20);
+            throw new Exception(_('Email incorrect'),24);
         }
         if ($this->countrycode != 'BE') {
-            throw new Exception(_('Code Pays incorrect'),21);
+            throw new Exception(_('Code Pays incorrect'),25);
         }
         
         if ( ! preg_match('/^[0-9]+/',$this->phone)) {
-            throw new Exception(_('Numéro de téléphone incorrect'),22);
+            throw new Exception(_('Numéro de téléphone incorrect'),26);
         }
         if ( ! preg_match('/^[0-9]+/',$this->vatnumber)) {
-            throw new Exception(_('Numéro de TVA incorrect'),23);
+            throw new Exception(_('Numéro de TVA incorrect'),27);
         }
     }
 }

Modified: trunk/transform/include/class_transform_intervat.php
===================================================================
--- trunk/transform/include/class_transform_intervat.php        2014-02-05 
19:54:22 UTC (rev 689)
+++ trunk/transform/include/class_transform_intervat.php        2014-02-07 
20:01:57 UTC (rev 690)
@@ -130,8 +130,8 @@
         $commentaire="";
 
         $decl = $this->domdoc->createElementNS($this->ns, "ns2:ClientListing");
-        $ai = $decl->setAttribute('VATAmountSum', $vat_amount_sum);
-        $ai = $decl->setAttribute('TurnOverSum', $turnoversum);
+        $ai = $decl->setAttribute('VATAmountSum', 
sprintf('%8.2f',$vat_amount_sum));
+        $ai = $decl->setAttribute('TurnOverSum', 
sprintf("%8.2f",$turnoversum));
         $ai = $decl->setAttribute('ClientsNbr', $clientnb);
         $ai = $decl->setAttribute('SequenceNumber', $seqnb);
 
@@ -219,8 +219,8 @@
             $de_vat_number = 
$this->domdoc->createTextNode($client['c_vatnumber']);
             $company->appendChild($de_vat_number);
             $dom_client->appendChild($company);
-            
$dom_client->appendChild($this->domdoc->createElementNS($this->ns,"ns2:TurnOver",
 $client['c_amount_novat']));
-            
$dom_client->appendChild($this->domdoc->createElementNS($this->ns,"ns2:VATAmount",
 $client['c_amount_vat']));
+            
$dom_client->appendChild($this->domdoc->createElementNS($this->ns,"ns2:TurnOver",
 sprintf("%8.2f",$client['c_amount_novat'])));
+            
$dom_client->appendChild($this->domdoc->createElementNS($this->ns,"ns2:VATAmount",
 sprintf("%8.2f",$client['c_amount_vat'])));
             $p_dom->appendChild($dom_client);
         }
         

Modified: trunk/transform/include/class_transform_representative.php
===================================================================
--- trunk/transform/include/class_transform_representative.php  2014-02-05 
19:54:22 UTC (rev 689)
+++ trunk/transform/include/class_transform_representative.php  2014-02-07 
20:01:57 UTC (rev 690)
@@ -119,7 +119,7 @@
         $this->issued = HtmlInput::default_value_post("p_issued", null);
     }
 
-    function input()
+    function input($error=0,$errmsg="")
     {
         $h_type = new ISelect('p_type');
         $h_type->value = array(
@@ -153,6 +153,7 @@
     function insert()
     {
         $this->verify();
+        $this->issued="BE";
         $this->data->rp_listing_id = $this->id;
         $this->data->rp_issued = $this->issued;
         $this->data->rp_type = $this->type;
@@ -162,7 +163,7 @@
         $this->data->rp_countrycode = $this->countrycode;
         $this->data->rp_email = $this->email;
         $this->data->rp_phone = $this->phone;
-
+        $this->data->rp_city=$this->city;
         $this->data->insert();
     }
 
@@ -186,6 +187,7 @@
         $this->countrycode = $this->data->rp_countrycode;
         $this->email = $this->data->rp_email;
         $this->phone = $this->data->rp_phone;
+        $this->city=$this->data->rp_city;
     }
     function verify()
     {

Modified: trunk/transform/include/intervat_listing_assujetti.inc.php
===================================================================
--- trunk/transform/include/intervat_listing_assujetti.inc.php  2014-02-05 
19:54:22 UTC (rev 689)
+++ trunk/transform/include/intervat_listing_assujetti.inc.php  2014-02-07 
20:01:57 UTC (rev 690)
@@ -19,10 +19,11 @@
 
 // Copyright Author Dany De Bontridder address@hidden
 ?>
+<div style="margin-left:10%;width: 80%;margin-right: 10%">
 <h1>Listing Assujetti Intervat </h1>
 <?php
 $step = HtmlInput::default_value_request('st_transf', 0);
-
+$error=0;$errmsg="";
 if ($step == 0)
 {
     require 'intervat_listing_assujetti_step_1.inc.php';
@@ -34,6 +35,8 @@
         require 'intervat_listing_assujetti_step_2.inc.php';
     } catch (Exception $e)
     {
+        $error=$e->getCode();
+        $errmsg=$e->getMessage();
         echo '<p class="notice">' . $e->getMessage() . '</p>';
         if ($e->getCode() != 3)
         {
@@ -52,4 +55,5 @@
         require 'intervat_listing_assujetti_step_1.inc.php';
     }
 }
-?>
\ No newline at end of file
+?>
+</div>
\ No newline at end of file

Modified: trunk/transform/include/intervat_listing_assujetti_step_1.inc.php
===================================================================
--- trunk/transform/include/intervat_listing_assujetti_step_1.inc.php   
2014-02-05 19:54:22 UTC (rev 689)
+++ trunk/transform/include/intervat_listing_assujetti_step_1.inc.php   
2014-02-07 20:01:57 UTC (rev 690)
@@ -16,7 +16,6 @@
  *   along with NOALYSS; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-
 // Copyright Author Dany De Bontridder address@hidden
 
 require_once 'class_transform_representative.php';
@@ -28,7 +27,7 @@
 $radio = new IRadio('p_inputtype');
 $h_tva = new ICheckBox('h_tva[]');
 $h_year = new INum('p_year');
-$h_year->value=HtmlInput::default_value_post('p_year',$declarant->year);
+$h_year->value = HtmlInput::default_value_post('p_year', $declarant->year);
 $h_year->prec = 0;
 $h_tva_compute_date = new ISelect('p_compute_date');
 $h_tva_compute_date->value = array(
@@ -36,33 +35,47 @@
     array('value' => 2, 'label' => _('Par date opération'))
 );
 $start_date = new IDate('p_start_date');
-$start_date->id="p_start_date_id";
+$start_date->id = "p_start_date_id";
 $start_date->value = HtmlInput::default_value_post('p_start_date', '');
 $end_date = new IDate('p_end_date');
 $end_date->value = HtmlInput::default_value_post('p_end_date', '');
-$end_date->id="p_end_date_id";
-
+$end_date->id = "p_end_date_id";
+$inputtype = HtmlInput::default_value_post('p_inputtype', -1);
 ?>
 <h2> <?php echo _('Etape 1/3') ?></h2>
 <form method="post" enctype="multipart/form-data" onsubmit="return 
check_form()">
+    <div style="width:45%;padding: 15px;float:left">
+    
     <h3><?php echo _('Mandataire'); ?></h3>
     <?php
-    $representative->input();
+    $representative->input($error, $errmsg);
     ?>
+    </div>
+    <div style="width:45%;padding: 15px;float:left">
     <h3><?php echo _('Déclarant'); ?></h3>
     <?php
-    $declarant->input();
+    $declarant->input($error, $errmsg);
     ?>
+    </div>
+    <div style="clear:both;"></div>
     <p>
         <?php echo _('Période'), $h_year->input(); ?>
+        <span class="notice"><?php
+        if ($error == 6)
+        {
+            echo $errmsg;
+        }
+        ?></span>
     </p>
 
     <p>
-        <input type="radio" name="p_inputtype" id="file_radio" value="1" 
onclick="show_file();">
+        <?php $checked=($inputtype==2)?' checked ':""; ?>
+        <input type="radio" name="p_inputtype" id="file_radio"  <?php echo 
$checked; ?>  value="1" onclick="show_file();">
         <?php
-            echo  _('Par fichier');
+        echo _('Par fichier');
+        $display = ( $inputtype == 1) ? 'block' : 'none';
         ?>
-        <span id="sp_file" style="display:none">
+        <span id="sp_file" style="display:<?php echo $display; ?>">
             <?php
             $file = new IFile('client_assujetti');
             echo $file->input();
@@ -70,45 +83,50 @@
         </span>
     </p>
     <p>
-        <input type="radio" name="p_inputtype" id="calc_radio" value="2" 
onclick="show_calc()">
         <?php
-        echo  _('Par calcul');
+        $checked=($inputtype==2)?' checked ':""; ?>
+        <input type="radio" name="p_inputtype" <?php echo $checked; ?> 
id="calc_radio" value="2" onclick="show_calc()">
+        <?php
+        echo _('Par calcul');
+        $display = ( $inputtype == 2) ? 'block' : 'none';
         ?>
-        <div id="sp_calcul" style="display:none">
-            <p style="margin-left:30px">
-                <?php printf(_('Entre les date %s et %s'), 
$start_date->input(), $end_date->input()); ?>
-            </p>
+    <div id="sp_calcul" style="display:<?php echo $display; ?>">
+        <p style="margin-left:30px">
+        <?php printf(_('Entre les date %s et %s'), $start_date->input(), 
$end_date->input()); ?>
+            <span class="notice"><?php if ($error==9|| $error ==9.1) {echo 
$errmsg;}?></span>
+        </p>
+        <?php
+        $atva = $cn->get_array('select tva_id,tva_rate,tva_comment from 
tva_rate order by 2');
+        $count_atva = count($atva);
+        ?>
+        <span class="notice"><?php if ($error==5|| $error ==5.1) {echo 
$errmsg;}?></span>
+        <ul style="list-style: none">
             <?php
-            $atva = $cn->get_array('select tva_id,tva_rate,tva_comment from 
tva_rate order by 2');
-            $count_atva = count($atva);
+            for ($i = 0; $i < $count_atva; $i++):
+                ?>
+                <li>
+                    <?php
+                    $h_tva->value = $atva[$i]['tva_id'];
+                    echo $h_tva->input() . h($atva[$i]['tva_rate']) . " " . 
h($atva[$i]['tva_comment']);
+                    ?>
+                </li>
+                <?php
+            endfor;
             ?>
-            <ul style="list-style: none">
-                <?php
-                for ($i = 0; $i < $count_atva; $i++):
-                    ?>
-                    <li>
-                        <?php
-                        $h_tva->value = $atva[$i]['tva_id'];
-                        echo $h_tva->input() . h($atva[$i]['tva_rate']) . " " 
. h($atva[$i]['tva_comment']);
-                        ?>
-                    </li>
-                    <?php
-                endfor;
-                ?>
-            </ul>
-            
-            <span style="margin-left:30px">
-                <?php echo _('Opération de vente'), 
$h_tva_compute_date->input(); ?>
-            </span>
-        </div>
-    </p>    
-    <p>
-        <?php
-        echo HtmlInput::request_to_hidden(array('gDossier', 'ac', 
'plugin_code', 'sa'));
-        echo HtmlInput::hidden('st_transf', 1);
-        echo HtmlInput::submit('send_list', 'Valider');
-        ?>
-    </p>
+        </ul>
+
+        <span style="margin-left:30px">
+<?php echo _('Opération de vente'), $h_tva_compute_date->input(); ?>
+        </span>
+    </div>
+</p>    
+<p>
+    <?php
+    echo HtmlInput::request_to_hidden(array('gDossier', 'ac', 'plugin_code', 
'sa'));
+    echo HtmlInput::hidden('st_transf', 1);
+    echo HtmlInput::submit('send_list', 'Valider');
+    ?>
+</p>
 </form>    
 <script>
     function show_file() {
@@ -121,22 +139,22 @@
     }
     function check_form()
     {
-        if ($('p_year').value=="") {
+        if ($('p_year').value == "") {
             alert('Vous avez oublié la période');
-            $('p_year').style.borderColor="red";
+            $('p_year').style.borderColor = "red";
             return false;
         }
-        if ( $('p_start_date_id').value=="" && $('calc_radio').checked) {
+        if ($('p_start_date_id').value == "" && $('calc_radio').checked) {
             alert('Date incorrect');
-            $('p_start_date_id').style.borderColor="red";
+            $('p_start_date_id').style.borderColor = "red";
             return false;
         }
-        if (  $('p_end_date_id').value=="" && $('calc_radio').checked) {
+        if ($('p_end_date_id').value == "" && $('calc_radio').checked) {
             alert('Date incorrect');
-            $('p_end_date_id').style.borderColor="red";
+            $('p_end_date_id').style.borderColor = "red";
             return false;
         }
-        if ( ! $('calc_radio').checked && ! $('file_radio').checked ) {
+        if (!$('calc_radio').checked && !$('file_radio').checked) {
             alert('Vous devez choisir par fichier ou par calcul');
             return false
         }

Modified: trunk/transform/include/intervat_listing_assujetti_step_2.inc.php
===================================================================
--- trunk/transform/include/intervat_listing_assujetti_step_2.inc.php   
2014-02-05 19:54:22 UTC (rev 689)
+++ trunk/transform/include/intervat_listing_assujetti_step_2.inc.php   
2014-02-07 20:01:57 UTC (rev 690)
@@ -18,7 +18,6 @@
  */
 
 // Copyright Author Dany De Bontridder address@hidden
-var_dump($_POST);
 /**
  * save data into db and display them before creating the XML
  */
@@ -41,27 +40,28 @@
 {
     throw new Exception(_('Vous devez choisir par fichier ou par calcul'), 4);
 }
-if ($start_date == null || $end_date == null)
+if ($year == null)
 {
-    throw new Exception(_('La date donnée est invalide'), 9);
+    throw new Exception(_("Vous devez donner la période"), 6);
 }
-if (isDate($start_date) == null || isDate($end_date) == null)
-{
-    throw new Exception(_('La date donnée est invalide'), 9);
-}
 
 // if inputtype is by computing (=2) then year must existe as exercice 
 // and tva_id must not be empty
 if ($inputtype == 2)
 {
+    if ($start_date == null || isDate($start_date) == null)
+    {
+        throw new Exception(_('La date donnée est invalide'), 9);
+    }
+    if ($end_date == null || isDate($end_date) == null)
+    {
+        throw new Exception(_('La date donnée est invalide'), 9.1);
+    }
     if ($atva == null)
     {
         throw new Exception(_('Vous devez choisir au moins un taux TVA'), 5);
     }
-    if ($year == null)
-    {
-        throw new Exception(_("Vous devez donner l'année"), 6);
-    }
+
     if ($compute_date == null || isNumber($compute_date) == 0)
     {
         throw new Exception(_("Date de calcul incorrect"), 7);
@@ -74,7 +74,7 @@
     {
         if (isNumber($tva) == 0)
         {
-            throw new Exception(_("ID Tva incorrect: [$tva]"), 9);
+            throw new Exception(_("ID Tva incorrect: [$tva]"), 5.1);
         }
     }
 }
@@ -156,7 +156,6 @@
 
//******************************************************************************
 if ($inputtype == 2)
 {
-    var_dump($atva);
     $ltva = "(" . implode(',', $atva) . ")";
     //------ Operation date ----------------
     if ($compute_date == 1)
@@ -273,6 +272,23 @@
     $ret = $a_listing->seek(' where d_id = $1', array($declarant->data->d_id));
     require 'template/listing_client_display.php';
     ?>
+    <?php
+    if ($inputtype == 1) :
+        ?>
+<h3><?php echo _('Rejeté')?></h3>
+    <ol>
+        <?php
+        for ($i = 0; $i < count($rejected); $i++):
+            ?>        
+            <li>
+                <?php echo $rejected[$i]; ?>
+            </li>
+        <?php endfor; ?>
+    </ol>
+    <?php
+endif;
+?>
+
 <form method="POST">
     <?php echo HtmlInput::hidden('r_id', $request->r_id); ?>
     <?php

Modified: trunk/transform/include/intervat_listing_assujetti_step_3.inc.php
===================================================================
--- trunk/transform/include/intervat_listing_assujetti_step_3.inc.php   
2014-02-05 19:54:22 UTC (rev 689)
+++ trunk/transform/include/intervat_listing_assujetti_step_3.inc.php   
2014-02-07 20:01:57 UTC (rev 690)
@@ -1,5 +1,4 @@
 <?php
-
 /*
  *   This file is part of NOALYSS.
  *
@@ -16,26 +15,33 @@
  *   You should have received a copy of the GNU General Public License
  *   along with NOALYSS; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*/
+ */
 
 // Copyright Author Dany De Bontridder address@hidden
 
+global $cn;
+$request_id = HtmlInput::default_value_post('r_id', null);
 
-$request_id=HtmlInput::default_value_post('r_id',null);
-
 if ($request_id == null)
 {
     throw new Exception(_('Accès directe incorrecte'), 15);
 }
-
-
+$invalide = $cn->get_value("select count(*) 
+        from transform.intervat_client 
+        join transform.intervat_declarant using (d_id) 
+        where c_comment <>'' and r_id=$1", array($request_id));
 ?>
 <h2> <?php echo _('Etape 3/3') ?></h2>
+<?php if ($invalide != 0): ?>
+    <p class="error">
+    <?php printf(_('Attention : il y a %d enregistrements incorrects '), 
$invalide); ?>
+    </p>
+    <?php endif; ?>
 <form method="get" action="extension.raw.php">
-    
-    <?php
-    echo 
HtmlInput::post_to_hidden(array('r_id','ac','gDossier','plugin_code'));
-    echo HtmlInput::hidden('act','listing_assujetti');
-    echo HtmlInput::submit('get','Fichier XML');
-    ?>
+
+<?php
+echo HtmlInput::post_to_hidden(array('r_id', 'ac', 'gDossier', 'plugin_code'));
+echo HtmlInput::hidden('act', 'listing_assujetti');
+echo HtmlInput::submit('get', 'Fichier XML');
+?>
 </form>

Modified: trunk/transform/include/template/listing_assujetti_declarant.php
===================================================================
--- trunk/transform/include/template/listing_assujetti_declarant.php    
2014-02-05 19:54:22 UTC (rev 689)
+++ trunk/transform/include/template/listing_assujetti_declarant.php    
2014-02-07 20:01:57 UTC (rev 690)
@@ -1,5 +1,4 @@
 <?php
-
 /*
  *   This file is part of NOALYSS.
  *
@@ -16,53 +15,71 @@
  *   You should have received a copy of the GNU General Public License
  *   along with NOALYSS; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*/
+ */
 
 // Copyright Author Dany De Bontridder address@hidden
-
 ?>
 <table>
     <tr>
         <td>
-            <?php echo _('Nom') . "</td><td>" . $h_name->input(); ?>
+<?php echo _('Nom') . "</td><td>" . $h_name->input(); ?>
         </td>
     <tr>
     <tr>
         <td>
-            <?php echo _('Rue') . "</td><td>" . $h_street->input(); ?>
+<?php echo _('Rue') . "</td><td>" . $h_street->input(); ?>
         </td>
     <tr>
     <tr>
         <td>
-            <?php echo _('Code postal') . "</td><td>" . $h_postcode->input(); 
?>
+<?php echo _('Code postal') . "</td><td>" . $h_postcode->input(); ?>
         </td>
     <tr>
     <tr>
         <td>
-            <?php echo _('Ville') . "</td><td>" . $h_city->input(); ?>
+<?php echo _('Ville') . "</td><td>" . $h_city->input(); ?>
         </td>
     <tr>
     <tr>
         <td>
-            <?php echo _('Code Pays') . "</td><td>" . $h_countrycode->input(); 
?>
+<?php echo _('Code Pays') . "</td><td>" . $h_countrycode->input(); ?>
+            <span class="notice"><?php if ($error == 25)
+{
+    echo $errmsg;
+} ?></span>
         </td>
     <tr>
     <tr>
         <td>
-            <?php echo _('email') . "</td><td>" . $h_email->input(); ?>
+<?php echo _('email') . "</td><td>" . $h_email->input(); ?>
+            <span class="notice"><?php if ($error == 24)
+{
+    echo $errmsg;
+} ?></span>
+
         </td>
     <tr>
     <tr>
         <td>
-            <?php echo _('Téléphone') . "</td><td>" . $h_phone->input(); ?>
+<?php echo _('Téléphone') . "</td><td>" . $h_phone->input(); ?>
+            <span class="notice"><?php if ($error == 26)
+{
+    echo $errmsg;
+} ?></span>
+
         </td>
     <tr>
     <tr>
         <td>
-            <?php echo _('N° TVA') . "</td><td>" . $h_vatnumber->input(); ?>
+<?php echo _('N° TVA') . "</td><td>" . $h_vatnumber->input(); ?>
+            <span class="notice"><?php if ($error == 27)
+{
+    echo $errmsg;
+} ?></span>
+
         </td>
     <tr>
-    
 
+
 </table>
 

Modified: trunk/transform/include/template/listing_assujetti_representative.php
===================================================================
--- trunk/transform/include/template/listing_assujetti_representative.php       
2014-02-05 19:54:22 UTC (rev 689)
+++ trunk/transform/include/template/listing_assujetti_representative.php       
2014-02-07 20:01:57 UTC (rev 690)
@@ -43,16 +43,19 @@
     <tr>
         <td>
             <?php echo _('Code Pays') . "</td><td>" . $h_countrycode->input(); 
?>
+            <span class="notice"><?php if ($error==21) {echo $errmsg;}?></span>
         </td>
     <tr>
     <tr>
         <td>
             <?php echo _('email') . "</td><td>" . $h_email->input(); ?>
+            <span class="notice"><?php if ($error==20) {echo $errmsg;}?></span>
         </td>
     <tr>
     <tr>
         <td>
             <?php echo _('Téléphone') . "</td><td>" . $h_phone->input(); ?>
+            <span class="notice"><?php if ($error==22) {echo $errmsg;}?></span>
         </td>
     <tr>
     <tr>

Modified: trunk/transform/include/template/listing_client_display.php
===================================================================
--- trunk/transform/include/template/listing_client_display.php 2014-02-05 
19:54:22 UTC (rev 689)
+++ trunk/transform/include/template/listing_client_display.php 2014-02-07 
20:01:57 UTC (rev 690)
@@ -24,9 +24,10 @@
  * parameters are $ret (return of seek) and $a_listing  (Intervat_Client_SQL )
  @see intervat_listing_assujetti_step_2.inc.php
  */
+global $g_succeed,$g_failed;
 $nb=Database::num_row($ret);
 ?>
-<table>
+<table class="result">
     <tr>
         <th>
             <?php echo _('Nom'); ?>
@@ -52,8 +53,9 @@
         $data=$a_listing->next($ret,$i);
         $js=sprintf('modify_intervat_assujetti(\'%s\',\'%s\',\'%s\',\'%s\')',
                 
$_REQUEST['gDossier'],$_REQUEST['ac'],$_REQUEST['plugin_code'],$data->c_id);
+        $class=($i%2==0)?'odd':'even';
 ?>
-    <tr id="tr_<?php echo $data->c_id?>">
+    <tr id="tr_<?php echo $data->c_id?>" class="<?php echo $class; ?>">
         <td>
             <?php 
             echo h($data->c_name);
@@ -76,7 +78,8 @@
         </td>
         <td>
             <?php 
-            echo h($data->c_comment);
+            $code= ($data->c_comment=="")?$g_succeed:$g_failed;
+            echo $code.h($data->c_comment);
             ?>
         </td>
         <td>

Modified: trunk/transform/raw.php
===================================================================
--- trunk/transform/raw.php     2014-02-05 19:54:22 UTC (rev 689)
+++ trunk/transform/raw.php     2014-02-07 20:01:57 UTC (rev 690)
@@ -43,6 +43,7 @@
         $xml = new Transform_Intervat;
 
         $xml->append_root();
+        $xml->append_representative($representative);
         $xml->append_client_listing($declarant);
         $file = "listing_assujetti" . date('d.m.y.hi') . ".xml";
         $ref = $_ENV['TMP'] . "/" . $file;

Modified: trunk/transform/transform_javascript.js
===================================================================
--- trunk/transform/transform_javascript.js     2014-02-05 19:54:22 UTC (rev 
689)
+++ trunk/transform/transform_javascript.js     2014-02-07 20:01:57 UTC (rev 
690)
@@ -34,7 +34,7 @@
                         var answer = req.responseText;
                         var position = fixed_position(451, 217);
                         add_div({'id': 'modify_intervat_assujetti_div',
-                            'cssclass': 'inner_box', 'drag': 1, 'style': 
position});
+                            'cssclass': 'inner_box', 'drag': 1, 'style': 
'min-width:25%;'+position});
 
                         $('modify_intervat_assujetti_div').innerHTML = answer;
                         answer.evalScripts();

Modified: trunk/transform/unit-test/valide-xml.php
===================================================================
--- trunk/transform/unit-test/valide-xml.php    2014-02-05 19:54:22 UTC (rev 
689)
+++ trunk/transform/unit-test/valide-xml.php    2014-02-07 20:01:57 UTC (rev 
690)
@@ -44,7 +44,7 @@
 libxml_use_internal_errors(true); 
 
 //$file = "valide-exemple-listing.xml";
-$file = "listing_assujetti04.02.14.1158.xml";
+$file = "listing_assujetti07.02.14.0759.xml";
 $schema = "xsd/NewLK-in_v0_7.xsd";
 
 // Instanciation d’un DOMDocument



---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu



reply via email to

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