Fix: vat rate for supplier order or invoice if supplier is in europe but country differ from user.
This commit is contained in:
parent
c2811ffa52
commit
a59aca5b8c
@ -129,6 +129,8 @@ llxHeader('',$langs->trans('CustomerCard'));
|
||||
$contactstatic = new Contact($db);
|
||||
$userstatic=new User($db);
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
if ($socid > 0)
|
||||
{
|
||||
// On recupere les donnees societes par l'objet
|
||||
@ -178,9 +180,11 @@ if ($socid > 0)
|
||||
|
||||
print '<tr><td>'.$langs->trans('Zip').'</td><td>'.$objsoc->cp."</td>";
|
||||
print '<td>'.$langs->trans('Town').'</td><td>'.$objsoc->ville."</td></tr>";
|
||||
if ($objsoc->pays) {
|
||||
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">'.$objsoc->pays.'</td></tr>';
|
||||
}
|
||||
|
||||
// Country
|
||||
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="3">';
|
||||
if ($objsoc->isInEEC()) print $form->textwithhelp($objsoc->pays,$langs->trans("CountryIsInEEC"),1,0);
|
||||
print '</td></tr>';
|
||||
|
||||
// Phone
|
||||
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dolibarr_print_phone($objsoc->tel,$objsoc->pays_code).'</td>';
|
||||
|
||||
@ -99,7 +99,11 @@ if ($socid > 0)
|
||||
print '<tr><td valign="top">'.$langs->trans("Address").'</td><td colspan="3">'.nl2br($societe->adresse)."</td></tr>";
|
||||
|
||||
print '<tr><td>'.$langs->trans('Zip').' / '.$langs->trans('Town').'</td><td colspan="3">'.$societe->cp." ".$societe->ville.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">'.$societe->pays.'</td></tr>';
|
||||
|
||||
// Country
|
||||
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="3">';
|
||||
if ($societe->isInEEC()) print $form->textwithhelp($societe->pays,$langs->trans("CountryIsInEEC"),1,0);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Phone").'</td><td>'.dolibarr_print_phone($societe->tel,$societe->pays_code).'</td><td>Fax</td><td>'.dolibarr_print_phone($societe->fax,$societe->pays_code).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Web")."</td><td colspan=\"3\"><a href=\"http://$societe->url\">$societe->url</a></td></tr>";
|
||||
|
||||
@ -78,6 +78,7 @@ llxHeader();
|
||||
|
||||
$facturestatic=new Facture($db);
|
||||
$contactstatic = new Contact($db);
|
||||
$form = new Form($db);
|
||||
|
||||
if ($socid > 0)
|
||||
{
|
||||
@ -133,7 +134,10 @@ if ($socid > 0)
|
||||
print '<tr><td>'.$langs->trans('Zip').'</td><td>'.$societe->cp.'</td>';
|
||||
print '<td>'.$langs->trans('Town').'</td><td>'.$societe->ville.'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">'.$societe->pays.'</td></tr>';
|
||||
// Country
|
||||
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">';
|
||||
if ($societe->isInEEC()) print $form->textwithhelp($societe->pays,$langs->trans("CountryIsInEEC"),1,0);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Phone").'</td><td>'.dolibarr_print_phone($societe->tel,$societe->pays_code).' </td><td>'.$langs->trans("Fax").'</td><td>'.dolibarr_print_phone($societe->fax,$societe->pays_code).' </td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Web")."</td><td colspan=\"3\"><a href=\"http://$societe->url\" target=\"_blank\">$societe->url</a> </td></tr>";
|
||||
|
||||
@ -44,10 +44,11 @@ $result = restrictedArea($user, 'societe',$socid,'');
|
||||
|
||||
|
||||
/*
|
||||
* Mode fiche
|
||||
* View
|
||||
*/
|
||||
$societe = new Fournisseur($db);
|
||||
$contactstatic = new Contact($db);
|
||||
$form = new Form($db);
|
||||
|
||||
if ( $societe->fetch($socid) )
|
||||
{
|
||||
@ -85,7 +86,12 @@ if ( $societe->fetch($socid) )
|
||||
|
||||
print '<tr><td>'.$langs->trans("Zip").'</td><td>'.$societe->cp.'</td>';
|
||||
print '<td>'.$langs->trans("Town").'</td><td>'.$societe->ville.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="3">'.$societe->pays.'</td></tr>';
|
||||
|
||||
// Country
|
||||
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="3">';
|
||||
if ($societe->isInEEC()) print $form->textwithhelp($societe->pays,$langs->trans("CountryIsInEEC"),1,0);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Phone").'</td><td>'.dolibarr_print_phone($societe->tel,$societe->pays_code).' </td><td>'.$langs->trans("Fax").'</td><td>'.dolibarr_print_phone($societe->fax,$societe->pays_code).' </td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Web")."</td><td colspan=\"3\"><a href=\"http://$societe->url\">$societe->url</a> </td></tr>";
|
||||
|
||||
|
||||
@ -23,6 +23,7 @@ IdContact=Contact Id
|
||||
Company=Company
|
||||
CompanyName=Company name
|
||||
Companies=Companies
|
||||
CountryIsInEEC=Country is inside European Economic Community
|
||||
ThirdParty=Third party
|
||||
ThirdParties=Third parties
|
||||
ThirdPartyAll=Third parties (all)
|
||||
|
||||
@ -23,6 +23,7 @@ IdContact=Id contact
|
||||
Company=Société
|
||||
CompanyName=Raison sociale
|
||||
Companies=Sociétés
|
||||
CountryIsInEEC=Pays de la Communauté Economique Européenne
|
||||
ThirdParty=Tiers
|
||||
ThirdParties=Tiers
|
||||
ThirdPartyAll=Tiers (tous)
|
||||
|
||||
@ -962,8 +962,10 @@ else
|
||||
print '<tr><td width="25%">'.$langs->trans('Zip').'</td><td width="25%">'.$soc->cp."</td>";
|
||||
print '<td width="25%">'.$langs->trans('Town').'</td><td width="25%">'.$soc->ville."</td></tr>";
|
||||
|
||||
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">'.$soc->pays.'</td>';
|
||||
print '</td></tr>';
|
||||
// Country
|
||||
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="3">';
|
||||
if ($soc->isInEEC()) print $form->textwithhelp($soc->pays,$langs->trans("CountryIsInEEC"),1,0);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('State').'</td><td colspan="3">'.$soc->departement.'</td>';
|
||||
|
||||
|
||||
@ -1248,19 +1248,7 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (10
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (105,10, '15','0','TVA 12% Majoré à 25% (15%)',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (106,10, '22.5','0','VAT 18% Majoré à 25% (22.5%)',1);
|
||||
|
||||
|
||||
-- GUADELOUPE (id 105)
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 111, 105, '8.5','0','VAT Rate 8.5',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 112, 105, '8.5','1','VAT Rate 8.5 non perçu par le vendeur mais récupérable par l\'acheteur',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 113, 105, '0','0','VAT Rate 0 ou non applicable',1);
|
||||
-- MARTINIQUE (id 150)
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 121, 150, '8.5','0','VAT Rate 8.5',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 122, 150, '8.5','1','VAT Rate 8.5 non perçu par le vendeur mais récupérable par l\'acheteur',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 123, 150, '0','0','VAT Rate 0 ou non applicable',1);
|
||||
-- REUNION (id 187)
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 131, 187, '8.5','0','VAT Rate 8.5',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 132, 187, '8.5','1','VAT Rate 8.5 non perçu par le vendeur mais récupérable par l\'acheteur',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 133, 187, '0','0','VAT Rate 0 ou non applicable',1);
|
||||
-- Pour les DOM-TOM, il faut utiliser le pays FRANCE (Sinon pb avec regles de TVA et autres regles propres aux pays et europe)
|
||||
|
||||
|
||||
--
|
||||
|
||||
Loading…
Reference in New Issue
Block a user