forked from Wavyzz/dolibarr
Dbut intgration rgle proposition tva par dfaut
This commit is contained in:
@@ -1654,26 +1654,29 @@ function price2num($amount)
|
||||
*/
|
||||
function get_default_tva($societe_vendeuse='', $societe_acheteuse='', $taux_produit='')
|
||||
{
|
||||
$tva=$taux_produit;
|
||||
// Si vendeur non assujeti <20> TVA
|
||||
if (! $societe_vendeuse->tva_assuj) return 0;
|
||||
|
||||
// Si le (pays vendeur = pays acheteur) alors la TVA par d<>faut=TVA du produit vendu. Fin de r<>gle.
|
||||
if ($societe_vendeuse->pays_id == $societe_acheteuse->pays_id)
|
||||
{
|
||||
return $taux_produit;
|
||||
}
|
||||
|
||||
// Si vendeur et acheteur dans Communaut<75> europ<6F>enne et bien vendu = moyen de transports neuf (auto, bateau, avion), TVA par d<>faut=0 (La TVA doit <20>tre pay<61> par l'acheteur au centre d'impots de son pays et non au vendeur). Fin de r<>gle.
|
||||
// Non g<>r<EFBFBD>
|
||||
|
||||
// Si vendeur et acheteur dans Communaut<75> europ<6F>enne et bien vendu autre que transport neuf alors la TVA par d<>faut=TVA du produit vendu. Fin de r<>gle.
|
||||
if ($societe_vendeuse->isInEEC() && $societe_vendeuse->isInEEC())
|
||||
{
|
||||
return $taux_produit;
|
||||
}
|
||||
|
||||
// \todo fonction a ecrire
|
||||
|
||||
return '';
|
||||
// Sinon la TVA propos<6F>e par d<>faut=0. Fin de r<>gle.
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
\brief Fonction qui calcule la tva
|
||||
\param euros somme en euro
|
||||
\param taux taux de tva
|
||||
*/
|
||||
function tva($euros, $taux=19.6)
|
||||
{
|
||||
$taux = $taux / 100 ;
|
||||
|
||||
return sprintf("%01.2f",($euros * $taux));
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Renvoie oui ou non dans la langue choisie
|
||||
\param yesno variable pour test si oui ou non
|
||||
|
||||
Reference in New Issue
Block a user