mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 09:38:23 +01:00
Merge remote-tracking branch 'origin/3.3' into develop
Conflicts: htdocs/core/boxes/box_activity.php
This commit is contained in:
@@ -708,20 +708,20 @@ function dol_format_address($object)
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Format a string.
|
||||
/**
|
||||
* Format a string.
|
||||
*
|
||||
* @param string $fmt Format of strftime function (http://php.net/manual/fr/function.strftime.php)
|
||||
* @param int $ts Timesamp (If is_gmt is true, timestamp is already includes timezone and daylight saving offset, if is_gmt is false, timestamp is a GMT timestamp and we must compensate with server PHP TZ)
|
||||
* @param int $is_gmt See comment of timestamp parameter
|
||||
* @return string A formatted string
|
||||
*/
|
||||
function dol_strftime($fmt, $ts=false, $is_gmt=false)
|
||||
{
|
||||
if ((abs($ts) <= 0x7FFFFFFF)) { // check if number in 32-bit signed range
|
||||
return ($is_gmt)? @gmstrftime($fmt,$ts): @strftime($fmt,$ts);
|
||||
*/
|
||||
function dol_strftime($fmt, $ts=false, $is_gmt=false)
|
||||
{
|
||||
if ((abs($ts) <= 0x7FFFFFFF)) { // check if number in 32-bit signed range
|
||||
return ($is_gmt)? @gmstrftime($fmt,$ts): @strftime($fmt,$ts);
|
||||
}
|
||||
else return 'Error date into a not supported range';
|
||||
else return 'Error date into a not supported range';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2938,18 +2938,18 @@ function get_default_tva($thirdparty_seller, $thirdparty_buyer, $idprod=0, $idpr
|
||||
|
||||
dol_syslog("get_default_tva: seller use vat=".$thirdparty_seller->tva_assuj.", seller country=".$thirdparty_seller->country_code.", seller in cee=".$thirdparty_seller->isInEEC().", buyer country=".$thirdparty_buyer->country_code.", buyer in cee=".$thirdparty_buyer->isInEEC().", idprod=".$idprod.", idprodfournprice=".$idprodfournprice.", SERVICE_ARE_ECOMMERCE_200238EC=".(! empty($conf->global->SERVICES_ARE_ECOMMERCE_200238EC)?$conf->global->SERVICES_ARE_ECOMMERCE_200238EC:''));
|
||||
|
||||
// If services are eServices according to EU Council Directive 2002/38/EC (http://ec.europa.eu/taxation_customs/taxation/vat/traders/e-commerce/article_1610_en.htm)
|
||||
// we use the buyer VAT.
|
||||
if (! empty($conf->global->SERVICE_ARE_ECOMMERCE_200238EC))
|
||||
{
|
||||
//print "eee".$thirdparty_buyer->isACompany();exit;
|
||||
if (! $thirdparty_seller->isInEEC() && $thirdparty_buyer->isInEEC() && ! $thirdparty_buyer->isACompany())
|
||||
{
|
||||
//print 'VATRULE 6';
|
||||
return get_product_vat_for_country($idprod,$thirdparty_buyer,$idprodfournprice);
|
||||
}
|
||||
}
|
||||
|
||||
// If services are eServices according to EU Council Directive 2002/38/EC (http://ec.europa.eu/taxation_customs/taxation/vat/traders/e-commerce/article_1610_en.htm)
|
||||
// we use the buyer VAT.
|
||||
if (! empty($conf->global->SERVICE_ARE_ECOMMERCE_200238EC))
|
||||
{
|
||||
//print "eee".$thirdparty_buyer->isACompany();exit;
|
||||
if (! $thirdparty_seller->isInEEC() && $thirdparty_buyer->isInEEC() && ! $thirdparty_buyer->isACompany())
|
||||
{
|
||||
//print 'VATRULE 6';
|
||||
return get_product_vat_for_country($idprod,$thirdparty_buyer,$idprodfournprice);
|
||||
}
|
||||
}
|
||||
|
||||
// Si vendeur non assujeti a TVA (tva_assuj vaut 0/1 ou franchise/reel)
|
||||
if (is_numeric($thirdparty_seller->tva_assuj) && ! $thirdparty_seller->tva_assuj)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user