/[dolibarr]/dolibarr/htdocs/soc.php
ViewVC logotype

Diff of /dolibarr/htdocs/soc.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.121 by eldy, Wed Aug 31 20:53:16 2005 UTC revision 1.122 by eldy, Wed Sep 7 20:27:32 2005 UTC
# Line 413  elseif ($_GET["action"] == 'edit') Line 413  elseif ($_GET["action"] == 'edit')
413    
414          print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3"><input type="text" name="url" size="40" value="'.$soc->url.'"></td></tr>';          print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3"><input type="text" name="url" size="40" value="'.$soc->url.'"></td></tr>';
415    
416          print '<tr><td>'.$langs->transcountry('ProfId1',$soc->pays_code).'</td><td><input type="text" name="siren" size="10" maxlength="9" value="'.$soc->siren.'"></td>';          print '<tr>';
417          print '<td>'.$langs->transcountry('ProfId2',$soc->pays_code).'</td><td><input type="text" name="siret" size="15" maxlength="14" value="'.$soc->siret.'"></td></tr>';          // IdProf1
418          print '<tr><td>'.$langs->transcountry('ProfId3',$soc->pays_code).'</td><td><input type="text" name="ape" size="5" maxlength="4" value="'.$soc->ape.'"></td><td colspan="2">&nbsp;</td></tr>';          $idprof=$langs->transcountry('ProfId1',$soc->pays_code);
419            if ($idprof!='-')
420            {
421                print '<td>'.$idprof.'</td><td>';
422                $form->id_prof(1,$soc,'siren',$soc->siren);
423                print '</td>';
424            }
425            else print '<td>&nbsp;</td><td>&nbsp;</td>';
426            // IdProf2
427            $idprof=$langs->transcountry('ProfId2',$soc->pays_code);
428            if ($idprof!='-')
429            {
430                print '<td>'.$idprof.'</td><td>';
431                $form->id_prof(2,$soc,'siret',$soc->siret);
432                print '</td>';
433            }
434            else print '<td>&nbsp;</td><td>&nbsp;</td>';
435            print '</tr>';
436            print '<tr>';
437            // IdProf3
438            $idprof=$langs->transcountry('ProfId3',$soc->pays_code);
439            if ($idprof!='-')
440            {
441                print '<td>'.$idprof.'</td><td>';
442                $form->id_prof(3,$soc,'ape',$soc->ape);
443                print '</td>';
444            }
445            else print '<td>&nbsp;</td><td>&nbsp;</td>';
446            // IdProf4
447            //        $idprof=$langs->transcountry('ProfId4',$soc->pays_code);
448            $idprof='-';    // L'identifiant 4 n'est pas encore géré
449            if ($idprof!='-')
450            {
451                print '<td>'.$idprof.'</td><td>';
452                $form->id_prof(4,$soc,'rcs',$soc->rcs);
453                print '</td>';
454            }
455            else print '<td>&nbsp;</td><td>&nbsp;</td>';
456            print '</tr>';
457    
458          print '<tr><td nowrap>'.$langs->trans('VATIntraShort').'</td><td colspan="3">';          print '<tr><td nowrap>'.$langs->trans('VATIntraShort').'</td><td colspan="3">';
459          print '<input type="text" name="tva_intra_code" size="3" maxlength="2" value="'.$soc->tva_intra_code.'">';          print '<input type="text" name="tva_intra_code" size="3" maxlength="2" value="'.$soc->tva_intra_code.'">';
# Line 556  else Line 594  else
594      if ($soc->url) { print '<a href="http://'.$soc->url.'">http://'.$soc->url.'</a>'; }      if ($soc->url) { print '<a href="http://'.$soc->url.'">http://'.$soc->url.'</a>'; }
595      print '</td></tr>';      print '</td></tr>';
596    
597      print '<tr><td>'.$langs->transcountry('ProfId1',$soc->pays_code).'</td><td>';      // ProfId1
598      // Si société FR et siren fourni, on le vérifie      $profid=$langs->transcountry('ProfId1',$soc->pays_code);
599      if ($soc->pays_code == "FR" && $soc->siren) {      if ($profid!='-')
600          if ($soc->check_siren() == 0)      {
601            print '<tr><td>'.$profid.'</td><td>';
602            print $soc->siren;
603            if ($soc->siren)
604          {          {
605              print '<a target="_blank" href="http://www.societe.com/cgi-bin/recherche?rncs='.$soc->siren.'">'.$soc->siren.'</a>&nbsp;';              if ($soc->id_prof_check(1,$soc) > 0) print ' &nbsp; '.$soc->id_prof_url(1,$soc);
606                else print ' <font class="error">('.$langs->trans("ErrorWrongValue").')</font>';
607          }          }
608          else          print '</td>';
609        }
610        else print '<tr><td>&nbsp;</td><td>&nbsp;</td>';
611        // ProfId2
612        $profid=$langs->transcountry('ProfId2',$soc->pays_code);
613        if ($profid!='-')
614        {
615            print '<td>'.$profid.'</td><td>';
616            print $soc->siret;
617            if ($soc->siret)
618          {          {
619              print '<a class="error">'.$soc->siren;              if ($soc->id_prof_check(2,$soc) > 0) print ' &nbsp; '.$soc->id_prof_url(2,$soc);
620              // Siren invalide              else print ' <font class="error">('.$langs->trans("ErrorWrongValue").')</font>';
             print "&nbsp;Code Siren Invalide !</a>";  
621          }          }
622            print '</td></tr>';
623      }      }
624      else {      else print '<td>&nbsp;</td><td>&nbsp;</td></tr>';
         print $soc->siren;  
     }  
     print '</td>';  
     print '<td>'.$langs->transcountry('ProfId2',$soc->pays_code).'</td><td>'.$soc->siret.'</td></tr>';  
625    
626      print '<tr><td>'.$langs->transcountry('ProfId3',$soc->pays_code).'</td><td>'.$soc->ape.'</td><td colspan="2">&nbsp;</td></tr>';      // ProfId3
627        $profid=$langs->transcountry('ProfId3',$soc->pays_code);
628        if ($profid!='-')
629        {
630            print '<tr><td>'.$profid.'</td><td>';
631            print $soc->ape;
632            if ($soc->ape)
633            {
634                if ($soc->id_prof_check(3,$soc) > 0) print ' &nbsp; '.$soc->id_prof_url(3,$soc);
635                else print ' <font class="error">('.$langs->trans("ErrorWrongValue").')</font>';
636            }
637            print '</td>';
638        }
639        else print '<tr><td>&nbsp;</td><td>&nbsp;</td>';
640        // ProfId4
641        //    $profid=$langs->transcountry('ProfId4',$soc->pays_code);
642        $profid='-';    // L'identifiant 4 n'est pas encore géré
643        if ($profid!='-')
644        {
645            print '<td>'.$profid.'</td><td>';
646            print $soc->rcs;
647            if ($soc->rcs)
648            {
649                if ($soc->id_prof_check(4,$soc) > 0) print ' &nbsp; '.$soc->id_prof_url(4,$soc);
650                else print ' <font class="error">('.$langs->trans("ErrorWrongValue").')</font>';
651            }
652            print '</td></tr>';
653        }
654        else print '<td>&nbsp;</td><td>&nbsp;</td></tr>';
655    
656        // TVA
657      print '<tr><td nowrap>'.$langs->trans('VATIntraShort').'</td><td colspan="3">';      print '<tr><td nowrap>'.$langs->trans('VATIntraShort').'</td><td colspan="3">';
658      print $soc->tva_intra;      print $soc->tva_intra;
659      print '</td></tr>';      print '</td></tr>';

Legend:
Removed from v.1.121  
changed lines
  Added in v.1.122

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26