diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 699a797f751..f8a0c9ea5a1 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -530,7 +530,7 @@ if ($action == 'edit' || $action == 'updateedit') $var=true; $var=!$var; - print ""; + print ""; print ''; print ""; print ""; @@ -539,7 +539,7 @@ if ($action == 'edit' || $action == 'updateedit') print "\n"; $var=!$var; - print ""; + print ""; print '
".$langs->trans("VATIsUsedDesc")."
'; print ""; print ""; @@ -913,7 +913,7 @@ else $var=true; $var=!$var; - print ""; + print ""; print '
".$langs->trans("VATIsNotUsedDesc")."
'; print ""; print ""; @@ -922,7 +922,7 @@ else print "\n"; $var=!$var; - print ""; + print ""; print '
".$langs->trans("VATIsUsedDesc")."
'; print ""; print ""; diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 7cc37e380f5..61ba7b062db 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -235,7 +235,15 @@ class Conf if (empty($this->global->MAIN_MENUFRONT_STANDARD)) $this->global->MAIN_MENUFRONT_STANDARD="eldy_menu.php"; if (empty($this->global->MAIN_MENU_SMARTPHONE)) $this->global->MAIN_MENU_SMARTPHONE="eldy_menu.php"; // Use eldy by default because smartphone does not work on all phones if (empty($this->global->MAIN_MENUFRONT_SMARTPHONE)) $this->global->MAIN_MENUFRONT_SMARTPHONE="eldy_menu.php"; // Use eldy by default because smartphone does not work on all phones - + // Clean var use vat for company + if (! isset($conf->global->FACTURE_TVAOPTION)) $conf->global->FACTURE_TVAOPTION=1; + else if (! empty($conf->global->FACTURE_TVAOPTION) && ! is_numeric($conf->global->FACTURE_TVAOPTION)) + { + // Old value of option, we clean to use new value (0 or 1) + if ($conf->global->FACTURE_TVAOPTION != "franchise") $conf->global->FACTURE_TVAOPTION=1; + else $conf->global->FACTURE_TVAOPTION=0; + } + // Variable globales LDAP if (empty($this->global->LDAP_FIELD_FULLNAME)) $this->global->LDAP_FIELD_FULLNAME=''; if (! isset($this->global->LDAP_KEY_USERS)) $this->global->LDAP_KEY_USERS=$this->global->LDAP_FIELD_FULLNAME; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index a8f6bbe8d56..e7a6fc4742d 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2575,8 +2575,8 @@ class Societe extends CommonObject $this->logo_small=empty($conf->global->MAIN_INFO_SOCIETE_LOGO_SMALL)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_SMALL; $this->logo_mini=empty($conf->global->MAIN_INFO_SOCIETE_LOGO_MINI)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI; - // Define if company use vat or not (Do not use conf->global->FACTURE_TVAOPTION anymore) - $this->tva_assuj=((isset($conf->global->FACTURE_TVAOPTION) && $conf->global->FACTURE_TVAOPTION=='franchise')?0:1); + // Define if company use vat or not + $this->tva_assuj=$conf->global->FACTURE_TVAOPTION; // Define if company use local taxes $this->localtax1_assuj=((isset($conf->global->FACTURE_LOCAL_TAX1_OPTION) && ($conf->global->FACTURE_LOCAL_TAX1_OPTION=='1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on'))?1:0);
".$langs->trans("VATIsNotUsedDesc")."