Fix: The prof id was not always visible and not at correct place for

some countries.
This commit is contained in:
Laurent Destailleur 2012-04-05 20:33:40 +02:00
parent 03cfec7904
commit 00a1e999f4
4 changed files with 92 additions and 134 deletions

View File

@ -105,16 +105,19 @@ ProfId2AR=Prof Id 2 (Revenu brutes)
ProfId3AR=-
ProfId4AR=-
ProfId5AR=-
ProfId6AR=-
ProfId1AU=Prof Id 1 (ABN)
ProfId2AU=-
ProfId3AU=-
ProfId4AU=-
ProfId5AU=-
ProfId6AU=-
ProfId1BE=Prof Id 1 (Professional number)
ProfId2BE=-
ProfId3BE=-
ProfId4BE=-
ProfId5BE=-
ProfId6BE=-
ProfId1BR=CNPJ
ProfId2BR=IE (Inscricao Estadual)
ProfId3BR=IM (Inscricao Municipal)
@ -126,26 +129,31 @@ ProfId2CH=-
ProfId3CH=Prof Id 1 (Federal number)
ProfId4CH=Prof Id 2 (Commercial Record number)
ProfId5CH=-
ProfId6CH=-
ProfId1CL=Prof Id 1 (R.U.T.)
ProfId2CL=-
ProfId3CL=-
ProfId4CL=-
ProfId5CL=-
ProfId6CL=-
ProfId1CO=Prof Id 1 (R.U.T.)
ProfId2CO=-
ProfId3CO=-
ProfId4CO=-
ProfId5CO=-
ProfId6CO=-
ProfId1DE=Prof Id 1 (USt.-IdNr)
ProfId2DE=Prof Id 2 (USt.-Nr)
ProfId3DE=Prof Id 3 (Handelsregister-Nr.)
ProfId4DE=-
ProfId5DE=-
ProfId6DE=-
ProfId1ES=Prof Id 1 (CIF/NIF)
ProfId2ES=Prof Id 2 (Social security number)
ProfId3ES=Prof Id 3 (CNAE)
ProfId4ES=Prof Id 4 (Collegiate number)
ProfId5ES=-
ProfId6ES=-
ProfId1FR=Prof Id 1 (SIREN)
ProfId2FR=Prof Id 2 (SIRET)
ProfId3FR=Prof Id 3 (NAF, old APE)
@ -157,51 +165,61 @@ ProfId2GB=-
ProfId3GB=SIC
ProfId4GB=-
ProfId5GB=-
ProfId6GB=-
ProfId1HN=Id prof. 1 (RTN)
ProfId2HN=-
ProfId3HN=-
ProfId4HN=-
ProfId5HN=-
ProfId6HN=-
ProfId1IN=Prof Id 1 (TIN)
ProfId2IN=Prof Id 2 (PAN)
ProfId3IN=Prof Id 3 (SRVC TAX)
ProfId4IN=Prof Id 4
ProfId5IN=Prof Id 5
ProfId6IN=-
ProfId1MA=Id prof. 1 (R.C.)
ProfId2MA=Id prof. 2 (Patente)
ProfId3MA=Id prof. 3 (I.F.)
ProfId4MA=Id prof. 4 (C.N.S.S.)
ProfId5MA=-
ProfId6MA=-
ProfId1MX=Prof Id 1 (R.F.C).
ProfId2MX=Prof Id 2 (R..P. IMSS)
ProfId3MX=Prof Id 3 (Profesional Charter)
ProfId4MX=-
ProfId5MX=-
ProfId6MX=-
ProfId1NL=KVK nummer
ProfId2NL=-
ProfId3NL=-
ProfId4NL=-
ProfId4NL=Burgerservicenummer (BSN)
ProfId5NL=-
ProfId6NL=-
ProfId1PT=Prof Id 1 (NIPC)
ProfId2PT=Prof Id 2 (Social security number)
ProfId3PT=Prof Id 3 (Commercial Record number)
ProfId4PT=Prof Id 4 (Conservatory)
ProfId5PT=-
ProfId6PT=-
ProfId1SN=RC
ProfId2SN=NINEA
ProfId3SN=-
ProfId4SN=-
ProfId5SN=-
ProfId6SN=-
ProfId1TN=Prof Id 1 (RC)
ProfId2TN=Prof Id 2 (Fiscal matricule)
ProfId3TN=Prof Id 3 (Douane code)
ProfId4TN=Prof Id 4 (BAN)
ProfId5TN=-
ProfId6TN=-
ProfId1RU=Prof Id 1 (OGRN)
ProfId2RU=Prof Id 2 (INN)
ProfId3RU=Prof Id 3 (KPP)
ProfId4RU=Prof Id 4 (OKPO)
ProfId5RU=-
ProfId6RU=-
VATIntra=VAT number
VATIntraShort=VAT number
VATIntraVeryShort=VAT

View File

@ -107,16 +107,19 @@ ProfId2AR=Id prof. 2 (Revenu brutes)
ProfId3AR=-
ProfId4AR=-
ProfId5AR=-
ProfId6AR=-
ProfId1AU=Id prof. 1 (ABN)
ProfId2AU=-
ProfId3AU=-
ProfId4AU=-
ProfId5AU=-
ProfId6AU=-
ProfId1BE=Id prof. 1 (N° professionnel)
ProfId2BE=-
ProfId3BE=-
ProfId4BE=-
ProfId5BE=-
ProfId6BE=-
ProfId1BR=CNPJ
ProfId2BR=IE (Inscricao Estadual)
ProfId3BR=IM (Inscricao Municipal)
@ -128,26 +131,31 @@ ProfId2CH=-
ProfId3CH=Numéro fédéral
ProfId4CH=Num registre du commerce
ProfId5CH=-
ProfId6CH=-
ProfId1CL=Prof Id 1 (R.U.T.)
ProfId2CL=-
ProfId3CL=-
ProfId4CL=-
ProfId5CL=-
ProfId6CL=-
ProfId1CO=Prof Id 1 (R.U.T.)
ProfId2CO=-
ProfId3CO=-
ProfId4CO=-
ProfId5CO=-
ProfId6CO=-
ProfId1DE=Id prof. 1 (USt.-IdNr)
ProfId2DE=Id prof. 2 (USt.-Nr)
ProfId3DE=Id prof. 3 (Handelsregister-Nr.)
ProfId4DE=-
ProfId5DE=-
ProfId6DE=-
ProfId1ES=Id prof. 1 (CIF/NIF)
ProfId2ES=Id prof. 2 (Num sécurité social)
ProfId3ES=Id prof. 3 (CNAE)
ProfId4ES=Id prof. 4 (Num Collégiale)
ProfId5ES=-
ProfId6ES=-
ProfId1FR=Id prof. 1 (SIREN)
ProfId2FR=Id prof. 2 (SIRET)
ProfId3FR=Id prof. 3 (NAF, ex APE)
@ -159,51 +167,61 @@ ProfId2GB=-
ProfId3GB=SIC
ProfId4GB=-
ProfId5GB=-
ProfId6GB=-
ProfId1HN=Id prof. 1 (RTN)
ProfId2HN=-
ProfId3HN=-
ProfId4HN=-
ProfId5HN=-
ProfId6HN=-
ProfId1IN=Id prof. 1 (TIN)
ProfId2IN=Id prof. 2 (PAN)
ProfId3IN=Id prof. 3 (SRVC TAX)
ProfId4IN=Id prof. 4
ProfId5IN=Id prof. 5
ProfId6IN=-
ProfId1MA=Id prof. 1 (R.C.)
ProfId2MA=Id prof. 2 (Patente)
ProfId3MA=Id prof. 3 (I.F.)
ProfId4MA=Id prof. 4 (C.N.S.S.)
ProfId5MA=-
ProfId6MA=-
ProfId1MX=Prof Id 1 (R.F.C).
ProfId2MX=Prof Id 2 (R..P. IMSS)
ProfId3MX=Prof Id 3 (Charte Profesional)
ProfId4MX=-
ProfId5MX=-
ProfId6MX=-
ProfId1NL=KVK nummer
ProfId2NL=-
ProfId3NL=-
ProfId4NL=-
ProfId4NL=Burgerservicenummer (BSN)
ProfId5NL=-
ProfId6NL=-
ProfId1PT=Id prof. 1 (NIPC)
ProfId2PT=Id prof. 2 (Num sécurité social)
ProfId3PT=Id prof. 3 (Num enreg. commercial)
ProfId4PT=Id prof. 4 (Conservatory)
ProfId5PT=Id prof. 5
ProfId6PT=-
ProfId1RU=Id prof.1 (OGRN)
ProfId2RU=Id prof.2 (INN)
ProfId3RU=Id prof.3 (KPP)
ProfId4RU=Id prof.4 (OKPO)
ProfId5RU=-
ProfId6RU=-
ProfId1SN=RC
ProfId2SN=NINEA
ProfId3SN=-
ProfId4SN=-
ProfId5SN=-
ProfId6SN=-
ProfId1TN=Id prof. 1 (RC)
ProfId2TN=Id prof. 2 (Matricule fiscal)
ProfId3TN=Id prof. 3 (Code en douane)
ProfId4TN=Id prof. 4 (BAN)
ProfId5TN=-
ProfId6TN=-
VATIntra=Numéro de TVA
VATIntraShort=Num TVA
VATIntraVeryShort=N° TVA

View File

@ -128,7 +128,7 @@ ProfId4MA = Id prof. 4 (C.N.S.S.)
ProfId1NL = KVK nummer
ProfId2NL =
ProfId3NL =
ProfId4NL = Burgerservicenummer
ProfId4NL = Burgerservicenummer (BSN)
ProfId1PT = Prof. id 1 (NIPC)
ProfId2PT = Prof. id 2 (Social security number)
ProfId3PT = Prof. Id 3 (Commercial Record aantal)

View File

@ -803,46 +803,24 @@ else
print '<tr><td>'.$langs->trans('EMail').($conf->global->SOCIETE_MAIL_REQUIRED?'*':'').'</td><td><input type="text" name="email" size="32" value="'.$object->email.'"></td>';
print '<td>'.$langs->trans('Web').'</td><td><input type="text" name="url" size="32" value="'.$object->url.'"></td></tr>';
print '<tr>';
// IdProf1 (SIREN for France)
$idprof=$langs->transcountry('ProfId1',$object->country_code);
if ($idprof!='-')
// Prof ids
$i=1; $j=0;
while ($i <= 6)
{
print '<td>'.$idprof.'</td><td>';
print $formcompany->get_input_id_prof(1,'idprof1',$object->idprof1,$object->country_code);
print '</td>';
$idprof=$langs->transcountry('ProfId'.$i,$object->country_code);
if ($idprof!='-')
{
if (($j % 2) == 0) print '<tr>';
print '<td>'.$idprof.'</td><td>';
$key='idprof'.$i;
print $formcompany->get_input_id_prof($i,'idprof'.$i,$object->$key,$object->country_code);
print '</td>';
if (($j % 2) == 1) print '</tr>';
$j++;
}
$i++;
}
else print '<td>&nbsp;</td><td>&nbsp;</td>';
// IdProf2 (SIRET for France)
$idprof=$langs->transcountry('ProfId2',$object->country_code);
if ($idprof!='-')
{
print '<td>'.$idprof.'</td><td>';
print $formcompany->get_input_id_prof(2,'idprof2',$object->idprof2,$object->country_code);
print '</td>';
}
else print '<td>&nbsp;</td><td>&nbsp;</td>';
print '</tr>';
print '<tr>';
// IdProf3 (APE for France)
$idprof=$langs->transcountry('ProfId3',$object->country_code);
if ($idprof!='-')
{
print '<td>'.$idprof.'</td><td>';
print $formcompany->get_input_id_prof(3,'idprof3',$object->idprof3,$object->country_code);
print '</td>';
}
else print '<td>&nbsp;</td><td>&nbsp;</td>';
// IdProf4 (NU for France)
$idprof=$langs->transcountry('ProfId4',$object->country_code);
if ($idprof!='-')
{
print '<td>'.$idprof.'</td><td>';
print $formcompany->get_input_id_prof(4,'idprof4',$object->idprof4,$object->country_code);
print '</td>';
}
else print '<td>&nbsp;</td><td>&nbsp;</td>';
print '</tr>';
if ($j % 2 == 1) print '<td colspan="2"></td></tr>';
// Assujeti TVA
$form = new Form($db);
@ -985,7 +963,7 @@ else
/*
* Edition
*/
//print_fiche_titre($langs->trans("EditCompany"));
if ($socid)
@ -998,7 +976,7 @@ else
$head = societe_prepare_head($object);
dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company');
@ -1265,46 +1243,24 @@ else
print '<tr><td>'.$langs->trans('EMail').($conf->global->SOCIETE_MAIL_REQUIRED?'*':'').'</td><td><input type="text" name="email" size="32" value="'.$object->email.'"></td>';
print '<td>'.$langs->trans('Web').'</td><td><input type="text" name="url" size="32" value="'.$object->url.'"></td></tr>';
print '<tr>';
// IdProf1 (SIREN for France)
$idprof=$langs->transcountry('ProfId1',$object->country_code);
if ($idprof!='-')
// Prof ids
$i=1; $j=0;
while ($i <= 6)
{
print '<td>'.$idprof.'</td><td>';
print $formcompany->get_input_id_prof(1,'idprof1',$object->idprof1,$object->country_code);
print '</td>';
$idprof=$langs->transcountry('ProfId'.$i,$object->country_code);
if ($idprof!='-')
{
if (($j % 2) == 0) print '<tr>';
print '<td>'.$idprof.'</td><td>';
$key='idprof'.$i;
print $formcompany->get_input_id_prof($i,'idprof'.$i,$object->$key,$object->country_code);
print '</td>';
if (($j % 2) == 1) print '</tr>';
$j++;
}
$i++;
}
else print '<td>&nbsp;</td><td>&nbsp;</td>';
// IdProf2 (SIRET for France)
$idprof=$langs->transcountry('ProfId2',$object->country_code);
if ($idprof!='-')
{
print '<td>'.$idprof.'</td><td>';
print $formcompany->get_input_id_prof(2,'idprof2',$object->idprof2,$object->country_code);
print '</td>';
}
else print '<td>&nbsp;</td><td>&nbsp;</td>';
print '</tr>';
print '<tr>';
// IdProf3 (APE for France)
$idprof=$langs->transcountry('ProfId3',$object->country_code);
if ($idprof!='-')
{
print '<td>'.$idprof.'</td><td>';
print $formcompany->get_input_id_prof(3,'idprof3',$object->idprof3,$object->country_code);
print '</td>';
}
else print '<td>&nbsp;</td><td>&nbsp;</td>';
// IdProf4 (NU for France)
$idprof=$langs->transcountry('ProfId4',$object->country_code);
if ($idprof!='-')
{
print '<td>'.$idprof.'</td><td>';
print $formcompany->get_input_id_prof(4,'idprof4',$object->idprof4,$object->country_code);
print '</td>';
}
else print '<td>&nbsp;</td><td>&nbsp;</td>';
print '</tr>';
if ($j % 2 == 1) print '<td colspan="2"></td></tr>';
// VAT payers
print '<tr><td>'.$langs->trans('VATIsUsed').'</td><td>';
@ -1585,63 +1541,29 @@ else
print dol_print_url($object->url);
print '</td></tr>';
// ProfId1 (SIREN for France)
$profid=$langs->transcountry('ProfId1',$object->country_code);
if ($profid!='-')
// Prof ids
$i=1; $j=0;
while ($i <= 6)
{
print '<tr><td>'.$profid.'</td><td>';
print $object->idprof1;
if ($object->idprof1)
$idprof=$langs->transcountry('ProfId'.$i,$object->country_code);
if ($idprof!='-')
{
if ($object->id_prof_check(1,$object) > 0) print ' &nbsp; '.$object->id_prof_url(1,$object);
else print ' <font class="error">('.$langs->trans("ErrorWrongValue").')</font>';
if (($j % 2) == 0) print '<tr>';
print '<td>'.$idprof.'</td><td>';
$key='idprof'.$i;
print $object->$key;
if ($object->$key)
{
if ($object->id_prof_check($i,$object) > 0) print ' &nbsp; '.$object->id_prof_url($i,$object);
else print ' <font class="error">('.$langs->trans("ErrorWrongValue").')</font>';
}
print '</td>';
if (($j % 2) == 1) print '</tr>';
$j++;
}
print '</td>';
$i++;
}
else print '<tr><td>&nbsp;</td><td>&nbsp;</td>';
// ProfId2 (SIRET for France)
$profid=$langs->transcountry('ProfId2',$object->country_code);
if ($profid!='-')
{
print '<td>'.$profid.'</td><td>';
print $object->idprof2;
if ($object->idprof2)
{
if ($object->id_prof_check(2,$object) > 0) print ' &nbsp; '.$object->id_prof_url(2,$object);
else print ' <font class="error">('.$langs->trans("ErrorWrongValue").')</font>';
}
print '</td></tr>';
}
else print '<td>&nbsp;</td><td>&nbsp;</td></tr>';
// ProfId3 (APE for France)
$profid=$langs->transcountry('ProfId3',$object->country_code);
if ($profid!='-')
{
print '<tr><td>'.$profid.'</td><td>';
print $object->idprof3;
if ($object->idprof3)
{
if ($object->id_prof_check(3,$object) > 0) print ' &nbsp; '.$object->id_prof_url(3,$object);
else print ' <font class="error">('.$langs->trans("ErrorWrongValue").')</font>';
}
print '</td>';
}
else print '<tr><td>&nbsp;</td><td>&nbsp;</td>';
// ProfId4 (NU for France)
$profid=$langs->transcountry('ProfId4',$object->country_code);
if ($profid!='-')
{
print '<td>'.$profid.'</td><td>';
print $object->idprof4;
if ($object->idprof4)
{
if ($object->id_prof_check(4,$object) > 0) print ' &nbsp; '.$object->id_prof_url(4,$object);
else print ' <font class="error">('.$langs->trans("ErrorWrongValue").')</font>';
}
print '</td></tr>';
}
else print '<td>&nbsp;</td><td>&nbsp;</td></tr>';
if ($j % 2 == 1) print '<td colspan="2"></td></tr>';
// VAT payers
$form = new Form($db);