2006-08-12 17:32:57 +02:00
< ? php
2019-06-04 02:15:52 +02:00
/* Copyright ( C ) 2001 - 2007 Rodolphe Quiedeville < rodolphe @ quiedeville . org >
* Copyright ( C ) 2004 - 2019 Laurent Destailleur < eldy @ users . sourceforge . net >
2018-10-27 14:43:12 +02:00
* Copyright ( C ) 2005 - 2017 Regis Houssin < regis . houssin @ inodbox . com >
2014-07-03 17:39:31 +02:00
* Copyright ( C ) 2010 - 2014 Juanjo Menent < jmenent @ 2 byte . es >
2017-04-24 16:36:58 +02:00
* Copyright ( C ) 2011 - 2017 Philippe Grand < philippe . grand @ atoo - net . com >
2019-01-28 21:39:22 +01:00
* Copyright ( C ) 2015 Alexandre Spangaro < aspangaro @ open - dsi . fr >
2017-09-20 13:30:59 +02:00
* Copyright ( C ) 2017 Rui Strecht < rui . strecht @ aliartalentos . com >
2023-09-12 00:02:35 +02:00
* Copyright ( C ) 2023 Nick Fragoulis
2025-02-19 20:09:01 +01:00
* Copyright ( C ) 2024 - 2025 Frédéric France < frederic . france @ free . fr >
2024-09-18 03:27:25 +02:00
* Copyright ( C ) 2024 MDW < mdeweerd @ users . noreply . github . com >
2006-08-12 17:32:57 +02:00
*
* This program is free software ; you can redistribute it and / or modify
* it under the terms of the GNU General Public License as published by
2013-01-16 15:36:08 +01:00
* the Free Software Foundation ; either version 3 of the License , or
2006-08-12 17:32:57 +02:00
* ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
2019-09-23 21:55:30 +02:00
* along with this program . If not , see < https :// www . gnu . org / licenses />.
2006-08-12 17:32:57 +02:00
*/
/**
2008-11-16 02:54:33 +01:00
* \file htdocs / admin / company . php
* \ingroup company
2010-07-14 17:59:38 +02:00
* \brief Setup page to configure company / foundation
2008-11-16 02:54:33 +01:00
*/
2006-08-12 17:32:57 +02:00
2022-09-07 20:08:59 +02:00
// Load Dolibarr environment
2012-08-22 23:24:21 +02:00
require '../main.inc.php' ;
2012-08-22 23:11:24 +02:00
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php' ;
require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php' ;
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php' ;
require_once DOL_DOCUMENT_ROOT . '/core/lib/images.lib.php' ;
2017-03-31 11:39:12 +02:00
require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php' ;
2012-08-22 23:11:24 +02:00
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php' ;
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php' ;
2024-11-04 13:56:05 +01:00
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php' ;
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php' ;
2006-08-12 17:32:57 +02:00
2019-11-14 12:09:15 +01:00
$action = GETPOST ( 'action' , 'aZ09' );
2023-12-04 11:41:14 +01:00
$contextpage = GETPOST ( 'contextpage' , 'aZ' ) ? GETPOST ( 'contextpage' , 'aZ' ) : 'admincompany' ; // To manage different context of search
2023-12-11 10:00:24 +01:00
$page_y = GETPOSTINT ( 'page_y' );
2012-03-23 00:51:38 +01:00
2024-11-04 23:53:20 +01:00
/**
* @ var Conf $conf
* @ var DoliDB $db
* @ var HookManager $hookmanager
* @ var Societe $mysoc
* @ var Translate $langs
* @ var User $user
*/
2018-05-26 18:41:16 +02:00
// Load translation files required by the page
2020-04-07 14:06:08 +02:00
$langs -> loadLangs ( array ( 'admin' , 'companies' , 'bills' ));
2006-08-12 17:32:57 +02:00
2021-02-26 22:04:03 +01:00
if ( ! $user -> admin ) {
accessforbidden ();
}
2012-07-09 12:54:27 +02:00
2019-11-14 12:09:15 +01:00
$error = 0 ;
2010-01-13 14:11:32 +01:00
2023-11-23 17:45:59 +01:00
$tmparraysize = getDefaultImageSizes ();
$maxwidthsmall = $tmparraysize [ 'maxwidthsmall' ];
$maxheightsmall = $tmparraysize [ 'maxheightsmall' ];
$maxwidthmini = $tmparraysize [ 'maxwidthmini' ];
$maxheightmini = $tmparraysize [ 'maxheightmini' ];
$quality = $tmparraysize [ 'quality' ];
2024-06-30 21:02:50 +02:00
// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
2019-11-14 12:09:15 +01:00
$hookmanager -> initHooks ( array ( 'admincompany' , 'globaladmin' ));
2017-10-06 08:45:59 +02:00
2018-09-09 12:53:30 +02:00
2010-01-13 14:11:32 +01:00
/*
* Actions
*/
2008-04-05 16:18:13 +02:00
2019-11-14 12:09:15 +01:00
$parameters = array ();
$reshook = $hookmanager -> executeHooks ( 'doActions' , $parameters , $object , $action ); // Note that $action and $object may have been modified by some hooks
2021-02-26 22:04:03 +01:00
if ( $reshook < 0 ) {
setEventMessages ( $hookmanager -> error , $hookmanager -> errors , 'errors' );
}
2017-10-06 08:45:59 +02:00
2019-11-14 12:09:15 +01:00
if (( $action == 'update' && ! GETPOST ( " cancel " , 'alpha' ))
2021-02-26 22:04:03 +01:00
|| ( $action == 'updateedit' )) {
2023-12-17 22:51:13 +01:00
$tmparray = getCountry ( GETPOSTINT ( 'country_id' ), 'all' , $db , $langs , 0 );
2021-02-26 22:04:03 +01:00
if ( ! empty ( $tmparray [ 'id' ])) {
2023-12-17 22:51:13 +01:00
if ( $tmparray [ 'code' ] == 'FR' && $tmparray [ 'id' ] != $mysoc -> country_id ) {
// For FR, default value of option to show profid SIREN is on by default
$res = dolibarr_set_const ( $db , " MAIN_PROFID1_IN_ADDRESS " , 1 , 'chaine' , 0 , '' , $conf -> entity );
}
2019-11-14 12:09:15 +01:00
$mysoc -> country_id = $tmparray [ 'id' ];
$mysoc -> country_code = $tmparray [ 'code' ];
$mysoc -> country_label = $tmparray [ 'label' ];
2015-06-29 06:28:04 +02:00
2019-11-14 12:09:15 +01:00
$s = $mysoc -> country_id . ':' . $mysoc -> country_code . ':' . $mysoc -> country_label ;
2019-01-27 11:55:16 +01:00
dolibarr_set_const ( $db , " MAIN_INFO_SOCIETE_COUNTRY " , $s , 'chaine' , 0 , '' , $conf -> entity );
2017-12-08 16:15:41 +01:00
activateModulesRequiredByCountry ( $mysoc -> country_code );
2015-06-29 06:28:04 +02:00
}
2024-07-03 02:30:53 +02:00
$tmparray = getState ( GETPOSTINT ( 'state_id' ), 'all' , $db , 0 , $langs , 0 );
2021-02-26 22:04:03 +01:00
if ( ! empty ( $tmparray [ 'id' ])) {
2019-11-14 12:09:15 +01:00
$mysoc -> state_id = $tmparray [ 'id' ];
$mysoc -> state_code = $tmparray [ 'code' ];
$mysoc -> state_label = $tmparray [ 'label' ];
2019-03-28 00:09:59 +01:00
2019-11-14 12:09:15 +01:00
$s = $mysoc -> state_id . ':' . $mysoc -> state_code . ':' . $mysoc -> state_label ;
2019-06-22 14:47:46 +02:00
dolibarr_set_const ( $db , " MAIN_INFO_SOCIETE_STATE " , $s , 'chaine' , 0 , '' , $conf -> entity );
2020-05-21 09:35:30 +02:00
} else {
2019-06-22 14:47:46 +02:00
dolibarr_del_const ( $db , " MAIN_INFO_SOCIETE_STATE " , $conf -> entity );
2019-03-28 00:09:59 +01:00
}
2020-10-27 19:46:07 +01:00
$db -> begin ();
2019-06-22 11:22:04 +02:00
2024-02-25 22:09:50 +01:00
dolibarr_set_const ( $db , " MAIN_INFO_SOCIETE_NOM " , GETPOST ( " name " , 'alphanohtml' ), 'chaine' , 0 , '' , $conf -> entity );
2022-06-13 10:44:20 +02:00
dolibarr_set_const ( $db , " MAIN_INFO_SOCIETE_ADDRESS " , GETPOST ( " MAIN_INFO_SOCIETE_ADDRESS " , 'alphanohtml' ), 'chaine' , 0 , '' , $conf -> entity );
dolibarr_set_const ( $db , " MAIN_INFO_SOCIETE_TOWN " , GETPOST ( " MAIN_INFO_SOCIETE_TOWN " , 'alphanohtml' ), 'chaine' , 0 , '' , $conf -> entity );
2020-02-02 15:01:57 +01:00
dolibarr_set_const ( $db , " MAIN_INFO_SOCIETE_ZIP " , GETPOST ( " MAIN_INFO_SOCIETE_ZIP " , 'alphanohtml' ), 'chaine' , 0 , '' , $conf -> entity );
dolibarr_set_const ( $db , " MAIN_INFO_SOCIETE_REGION " , GETPOST ( " region_code " , 'alphanohtml' ), 'chaine' , 0 , '' , $conf -> entity );
2019-06-23 19:32:29 +02:00
dolibarr_set_const ( $db , " MAIN_MONNAIE " , GETPOST ( " currency " , 'aZ09' ), 'chaine' , 0 , '' , $conf -> entity );
2024-02-25 22:09:50 +01:00
dolibarr_set_const ( $db , " MAIN_INFO_SOCIETE_TEL " , GETPOST ( " phone " , 'alphanohtml' ), 'chaine' , 0 , '' , $conf -> entity );
dolibarr_set_const ( $db , " MAIN_INFO_SOCIETE_MOBILE " , GETPOST ( " phone_mobile " , 'alphanohtml' ), 'chaine' , 0 , '' , $conf -> entity );
2020-02-02 15:01:57 +01:00
dolibarr_set_const ( $db , " MAIN_INFO_SOCIETE_FAX " , GETPOST ( " fax " , 'alphanohtml' ), 'chaine' , 0 , '' , $conf -> entity );
dolibarr_set_const ( $db , " MAIN_INFO_SOCIETE_MAIL " , GETPOST ( " mail " , 'alphanohtml' ), 'chaine' , 0 , '' , $conf -> entity );
dolibarr_set_const ( $db , " MAIN_INFO_SOCIETE_WEB " , GETPOST ( " web " , 'alphanohtml' ), 'chaine' , 0 , '' , $conf -> entity );
2020-09-18 01:29:17 +02:00
dolibarr_set_const ( $db , " MAIN_INFO_SOCIETE_NOTE " , GETPOST ( " note " , 'restricthtml' ), 'chaine' , 0 , '' , $conf -> entity );
2020-02-02 15:01:57 +01:00
dolibarr_set_const ( $db , " MAIN_INFO_SOCIETE_GENCOD " , GETPOST ( " barcode " , 'alphanohtml' ), 'chaine' , 0 , '' , $conf -> entity );
2017-09-06 11:39:30 +02:00
2019-11-14 12:09:15 +01:00
$dirforimage = $conf -> mycompany -> dir_output . '/logos/' ;
2019-10-11 11:27:05 +02:00
$arrayofimages = array ( 'logo' , 'logo_squarred' );
2022-09-27 19:21:29 +02:00
//var_dump($_FILES); exit;
2021-02-26 22:04:03 +01:00
foreach ( $arrayofimages as $varforimage ) {
2020-09-07 10:18:17 +02:00
if ( $_FILES [ $varforimage ][ " name " ] && ! preg_match ( '/(\.jpeg|\.jpg|\.png)$/i' , $_FILES [ $varforimage ][ " name " ])) { // Logo can be used on a lot of different places. Only jpg and png can be supported.
2020-08-06 17:37:00 +02:00
$langs -> load ( " errors " );
setEventMessages ( $langs -> trans ( " ErrorBadImageFormat " ), null , 'errors' );
break ;
}
2022-09-27 19:21:29 +02:00
// Remove to check file size to large
/*if ($_FILES[$varforimage]["tmp_name"]) {*/
2023-05-22 15:59:48 +02:00
$reg = array ();
2022-09-27 19:31:22 +02:00
if ( preg_match ( '/([^\\/:]+)$/i' , $_FILES [ $varforimage ][ " name " ], $reg )) {
$original_file = $reg [ 1 ];
$isimage = image_format_supported ( $original_file );
if ( $isimage >= 0 ) {
dol_syslog ( " Move file " . $_FILES [ $varforimage ][ " tmp_name " ] . " to " . $dirforimage . $original_file );
if ( ! is_dir ( $dirforimage )) {
dol_mkdir ( $dirforimage );
}
$result = dol_move_uploaded_file ( $_FILES [ $varforimage ][ " tmp_name " ], $dirforimage . $original_file , 1 , 0 , $_FILES [ $varforimage ][ 'error' ]);
2023-12-11 10:00:24 +01:00
if ( is_numeric ( $result ) && $result > 0 ) {
2022-09-27 19:31:22 +02:00
$constant = " MAIN_INFO_SOCIETE_LOGO " ;
if ( $varforimage == 'logo_squarred' ) {
$constant = " MAIN_INFO_SOCIETE_LOGO_SQUARRED " ;
2019-10-11 11:27:05 +02:00
}
2022-09-27 19:31:22 +02:00
dolibarr_set_const ( $db , $constant , $original_file , 'chaine' , 0 , '' , $conf -> entity );
// Create thumbs of logo (Note that PDF use original file and not thumbs)
if ( $isimage > 0 ) {
// Create thumbs
//$object->addThumbs($newfile); // We can't use addThumbs here yet because we need name of generated thumbs to add them into constants. TODO Check if need such constants. We should be able to retrieve value with get...
2023-11-23 17:45:59 +01:00
2022-09-27 19:31:22 +02:00
// Create small thumb, Used on logon for example
$imgThumbSmall = vignette ( $dirforimage . $original_file , $maxwidthsmall , $maxheightsmall , '_small' , $quality );
if ( image_format_supported ( $imgThumbSmall ) >= 0 && preg_match ( '/([^\\/:]+)$/i' , $imgThumbSmall , $reg )) {
$imgThumbSmall = $reg [ 1 ]; // Save only basename
dolibarr_set_const ( $db , $constant . " _SMALL " , $imgThumbSmall , 'chaine' , 0 , '' , $conf -> entity );
} else {
dol_syslog ( $imgThumbSmall );
2021-02-26 22:04:03 +01:00
}
2017-09-06 11:39:30 +02:00
2022-09-27 19:31:22 +02:00
// Create mini thumb, Used on menu or for setup page for example
$imgThumbMini = vignette ( $dirforimage . $original_file , $maxwidthmini , $maxheightmini , '_mini' , $quality );
if ( image_format_supported ( $imgThumbMini ) >= 0 && preg_match ( '/([^\\/:]+)$/i' , $imgThumbMini , $reg )) {
$imgThumbMini = $reg [ 1 ]; // Save only basename
dolibarr_set_const ( $db , $constant . " _MINI " , $imgThumbMini , 'chaine' , 0 , '' , $conf -> entity );
2021-02-26 22:04:03 +01:00
} else {
2022-09-27 19:31:22 +02:00
dol_syslog ( $imgThumbMini );
2021-02-26 22:04:03 +01:00
}
2020-05-21 09:35:30 +02:00
} else {
2022-09-27 19:31:22 +02:00
dol_syslog ( " ErrorImageFormatNotSupported " , LOG_WARNING );
2015-06-29 06:28:04 +02:00
}
2022-09-27 19:31:22 +02:00
} elseif ( preg_match ( '/^ErrorFileIsInfectedWithAVirus/' , $result )) {
2015-06-29 06:28:04 +02:00
$error ++ ;
2019-10-11 11:27:05 +02:00
$langs -> load ( " errors " );
2022-09-27 19:31:22 +02:00
$tmparray = explode ( ':' , $result );
setEventMessages ( $langs -> trans ( 'ErrorFileIsInfectedWithAVirus' , $tmparray [ 1 ]), null , 'errors' );
} elseif ( preg_match ( '/^ErrorFileSizeTooLarge/' , $result )) {
$error ++ ;
setEventMessages ( $langs -> trans ( " ErrorFileSizeTooLarge " ), null , 'errors' );
} else {
$error ++ ;
setEventMessages ( $langs -> trans ( " ErrorFailedToSaveFile " ), null , 'errors' );
2015-06-29 06:28:04 +02:00
}
2022-09-27 19:31:22 +02:00
} else {
$error ++ ;
$langs -> load ( " errors " );
setEventMessages ( $langs -> trans ( " ErrorBadImageFormat " ), null , 'errors' );
2015-06-29 06:28:04 +02:00
}
}
2022-09-27 19:21:29 +02:00
/*}*/
2015-06-29 06:28:04 +02:00
}
2022-06-13 10:44:20 +02:00
dolibarr_set_const ( $db , " MAIN_INFO_SOCIETE_MANAGERS " , GETPOST ( " MAIN_INFO_SOCIETE_MANAGERS " , 'alphanohtml' ), 'chaine' , 0 , '' , $conf -> entity );
dolibarr_set_const ( $db , " MAIN_INFO_GDPR " , GETPOST ( " MAIN_INFO_GDPR " , 'alphanohtml' ), 'chaine' , 0 , '' , $conf -> entity );
dolibarr_set_const ( $db , " MAIN_INFO_CAPITAL " , GETPOST ( " capital " , 'alphanohtml' ), 'chaine' , 0 , '' , $conf -> entity );
dolibarr_set_const ( $db , " MAIN_INFO_SOCIETE_FORME_JURIDIQUE " , GETPOST ( " forme_juridique_code " , 'alphanohtml' ), 'chaine' , 0 , '' , $conf -> entity );
dolibarr_set_const ( $db , " MAIN_INFO_SIREN " , GETPOST ( " siren " , 'alphanohtml' ), 'chaine' , 0 , '' , $conf -> entity );
dolibarr_set_const ( $db , " MAIN_INFO_SIRET " , GETPOST ( " siret " , 'alphanohtml' ), 'chaine' , 0 , '' , $conf -> entity );
dolibarr_set_const ( $db , " MAIN_INFO_APE " , GETPOST ( " ape " , 'alphanohtml' ), 'chaine' , 0 , '' , $conf -> entity );
dolibarr_set_const ( $db , " MAIN_INFO_RCS " , GETPOST ( " rcs " , 'alphanohtml' ), 'chaine' , 0 , '' , $conf -> entity );
dolibarr_set_const ( $db , " MAIN_INFO_PROFID5 " , GETPOST ( " MAIN_INFO_PROFID5 " , 'alphanohtml' ), 'chaine' , 0 , '' , $conf -> entity );
dolibarr_set_const ( $db , " MAIN_INFO_PROFID6 " , GETPOST ( " MAIN_INFO_PROFID6 " , 'alphanohtml' ), 'chaine' , 0 , '' , $conf -> entity );
2023-10-12 17:44:08 +02:00
dolibarr_set_const ( $db , " MAIN_INFO_PROFID7 " , GETPOST ( " MAIN_INFO_PROFID7 " , 'alphanohtml' ), 'chaine' , 0 , '' , $conf -> entity );
dolibarr_set_const ( $db , " MAIN_INFO_PROFID8 " , GETPOST ( " MAIN_INFO_PROFID8 " , 'alphanohtml' ), 'chaine' , 0 , '' , $conf -> entity );
dolibarr_set_const ( $db , " MAIN_INFO_PROFID9 " , GETPOST ( " MAIN_INFO_PROFID9 " , 'alphanohtml' ), 'chaine' , 0 , '' , $conf -> entity );
dolibarr_set_const ( $db , " MAIN_INFO_PROFID10 " , GETPOST ( " MAIN_INFO_PROFID10 " , 'alphanohtml' ), 'chaine' , 0 , '' , $conf -> entity );
2018-04-06 19:12:13 +02:00
2022-06-13 10:44:20 +02:00
dolibarr_set_const ( $db , " MAIN_INFO_TVAINTRA " , GETPOST ( " tva " , 'alphanohtml' ), 'chaine' , 0 , '' , $conf -> entity );
2023-01-30 13:57:11 +01:00
dolibarr_set_const ( $db , " MAIN_INFO_SOCIETE_OBJECT " , GETPOST ( " socialobject " , 'alphanohtml' ), 'chaine' , 0 , '' , $conf -> entity );
2011-06-24 21:57:45 +02:00
Fix: GETPOST(...,'int') to GETPOSTINT(...) (#28448)
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: Update spelling exceptions
* Qual: Ignore Phan Notice
2024-02-27 14:05:53 +01:00
dolibarr_set_const ( $db , " SOCIETE_FISCAL_MONTH_START " , GETPOSTINT ( " SOCIETE_FISCAL_MONTH_START " ), 'chaine' , 0 , '' , $conf -> entity );
2015-06-29 06:28:04 +02:00
2018-10-25 14:39:54 +02:00
// Sale tax options
2019-01-27 11:55:16 +01:00
$usevat = GETPOST ( " optiontva " , 'aZ09' );
$uselocaltax1 = GETPOST ( " optionlocaltax1 " , 'aZ09' );
$uselocaltax2 = GETPOST ( " optionlocaltax2 " , 'aZ09' );
2021-02-26 22:04:03 +01:00
if ( $uselocaltax1 == 'localtax1on' && ! $usevat ) {
2018-10-25 14:39:54 +02:00
setEventMessages ( $langs -> trans ( " IfYouUseASecondTaxYouMustSetYouUseTheMainTax " ), null , 'errors' );
$error ++ ;
}
2021-02-26 22:04:03 +01:00
if ( $uselocaltax2 == 'localtax2on' && ! $usevat ) {
2018-10-25 14:39:54 +02:00
setEventMessages ( $langs -> trans ( " IfYouUseAThirdTaxYouMustSetYouUseTheMainTax " ), null , 'errors' );
$error ++ ;
}
2015-06-29 06:28:04 +02:00
2019-01-27 11:55:16 +01:00
dolibarr_set_const ( $db , " FACTURE_TVAOPTION " , $usevat , 'chaine' , 0 , '' , $conf -> entity );
dolibarr_set_const ( $db , " FACTURE_LOCAL_TAX1_OPTION " , $uselocaltax1 , 'chaine' , 0 , '' , $conf -> entity );
dolibarr_set_const ( $db , " FACTURE_LOCAL_TAX2_OPTION " , $uselocaltax2 , 'chaine' , 0 , '' , $conf -> entity );
2015-06-29 06:28:04 +02:00
2021-03-25 16:59:47 +01:00
if ( GETPOST ( " optionlocaltax1 " ) == " localtax1on " ) {
2021-02-08 22:12:12 +01:00
if ( ! GETPOSTISSET ( 'lt1' )) {
2019-01-27 11:55:16 +01:00
dolibarr_set_const ( $db , " MAIN_INFO_VALUE_LOCALTAX1 " , 0 , 'chaine' , 0 , '' , $conf -> entity );
2020-05-21 09:35:30 +02:00
} else {
2019-01-27 11:55:16 +01:00
dolibarr_set_const ( $db , " MAIN_INFO_VALUE_LOCALTAX1 " , GETPOST ( 'lt1' , 'aZ09' ), 'chaine' , 0 , '' , $conf -> entity );
2015-06-29 06:28:04 +02:00
}
2019-01-27 11:55:16 +01:00
dolibarr_set_const ( $db , " MAIN_INFO_LOCALTAX_CALC1 " , GETPOST ( " clt1 " , 'aZ09' ), 'chaine' , 0 , '' , $conf -> entity );
2015-06-29 06:28:04 +02:00
}
2021-03-25 16:59:47 +01:00
if ( GETPOST ( " optionlocaltax2 " ) == " localtax2on " ) {
2021-02-08 22:12:12 +01:00
if ( ! GETPOSTISSET ( 'lt2' )) {
2019-01-27 11:55:16 +01:00
dolibarr_set_const ( $db , " MAIN_INFO_VALUE_LOCALTAX2 " , 0 , 'chaine' , 0 , '' , $conf -> entity );
2020-05-21 09:35:30 +02:00
} else {
2019-01-27 11:55:16 +01:00
dolibarr_set_const ( $db , " MAIN_INFO_VALUE_LOCALTAX2 " , GETPOST ( 'lt2' , 'aZ09' ), 'chaine' , 0 , '' , $conf -> entity );
2015-06-29 06:28:04 +02:00
}
2019-01-27 11:55:16 +01:00
dolibarr_set_const ( $db , " MAIN_INFO_LOCALTAX_CALC2 " , GETPOST ( " clt2 " , 'aZ09' ), 'chaine' , 0 , '' , $conf -> entity );
2015-06-29 06:28:04 +02:00
}
2023-09-12 19:25:17 +02:00
// Credentials for AADE webservices, applicable only for Greece
2023-09-12 00:02:35 +02:00
if ( $mysoc -> country_code == 'GR' ) {
2023-09-12 19:25:17 +02:00
dolibarr_set_const ( $db , " MYDATA_AADE_USER " , GETPOST ( " MYDATA_AADE_USER " , 'alpha' ), 'chaine' , 0 , '' , $conf -> entity );
dolibarr_set_const ( $db , " MYDATA_AADE_KEY " , GETPOST ( " MYDATA_AADE_KEY " , 'alpha' ), 'chaine' , 0 , '' , $conf -> entity );
dolibarr_set_const ( $db , " AADE_WEBSERVICE_USER " , GETPOST ( " AADE_WEBSERVICE_USER " , 'alpha' ), 'chaine' , 0 , '' , $conf -> entity );
dolibarr_set_const ( $db , " AADE_WEBSERVICE_KEY " , GETPOST ( " AADE_WEBSERVICE_KEY " , 'alpha' ), 'chaine' , 0 , '' , $conf -> entity );
2023-09-12 00:02:35 +02:00
}
2023-09-12 19:25:17 +02:00
2023-06-22 15:54:44 +02:00
// Remove constant MAIN_INFO_SOCIETE_SETUP_TODO_WARNING
dolibarr_del_const ( $db , " MAIN_INFO_SOCIETE_SETUP_TODO_WARNING " , $conf -> entity );
2021-02-26 22:04:03 +01:00
if ( ! $error ) {
2021-02-08 22:12:12 +01:00
if ( GETPOST ( 'save' )) { // To avoid to show message when we juste switch the country that resubmit the form.
setEventMessages ( $langs -> trans ( " SetupSaved " ), null , 'mesgs' );
}
2018-10-25 14:39:54 +02:00
$db -> commit ();
2020-05-21 09:35:30 +02:00
} else {
2018-10-25 14:39:54 +02:00
$db -> rollback ();
}
2021-02-26 22:04:03 +01:00
if ( $action != 'updateedit' && ! $error ) {
2023-12-11 10:00:24 +01:00
header ( " Location: " . $_SERVER [ " PHP_SELF " ] . ( $page_y ? '?page_y=' . $page_y : '' ));
2015-06-29 06:28:04 +02:00
exit ;
}
2006-08-12 17:32:57 +02:00
}
2021-02-26 22:04:03 +01:00
if ( $action == 'addthumb' || $action == 'addthumbsquarred' ) { // Regenerate thumbs
2024-03-28 17:10:22 +01:00
if ( file_exists ( $conf -> mycompany -> dir_output . '/logos/' . GETPOST ( " file " ))) {
$isimage = image_format_supported ( GETPOST ( " file " ));
2015-06-29 06:28:04 +02:00
// Create thumbs of logo
2021-02-26 22:04:03 +01:00
if ( $isimage > 0 ) {
2019-10-11 11:27:05 +02:00
$constant = " MAIN_INFO_SOCIETE_LOGO " ;
2021-02-26 22:04:03 +01:00
if ( $action == 'addthumbsquarred' ) {
$constant = " MAIN_INFO_SOCIETE_LOGO_SQUARRED " ;
}
2019-10-11 11:27:05 +02:00
$reg = array ();
2020-10-27 19:46:07 +01:00
// Create thumbs
2020-10-23 20:08:35 +02:00
//$object->addThumbs($newfile); // We can't use addThumbs here yet because we need name of generated thumbs to add them into constants. TODO Check if need such constants. We should be able to retrieve value with get...
2016-04-09 14:12:21 +02:00
2017-03-31 11:39:12 +02:00
// Create small thumb. Used on logon for example
2024-03-28 17:10:22 +01:00
$imgThumbSmall = vignette ( $conf -> mycompany -> dir_output . '/logos/' . GETPOST ( " file " ), $maxwidthsmall , $maxheightsmall , '_small' , $quality );
2021-02-26 22:04:03 +01:00
if ( image_format_supported ( $imgThumbSmall ) >= 0 && preg_match ( '/([^\\/:]+)$/i' , $imgThumbSmall , $reg )) {
2019-11-14 12:09:15 +01:00
$imgThumbSmall = $reg [ 1 ]; // Save only basename
2019-10-11 11:27:05 +02:00
dolibarr_set_const ( $db , $constant . " _SMALL " , $imgThumbSmall , 'chaine' , 0 , '' , $conf -> entity );
2021-02-26 22:04:03 +01:00
} else {
dol_syslog ( $imgThumbSmall );
}
2015-06-29 06:28:04 +02:00
2017-03-31 11:39:12 +02:00
// Create mini thumbs. Used on menu or for setup page for example
2024-03-28 17:10:22 +01:00
$imgThumbMini = vignette ( $conf -> mycompany -> dir_output . '/logos/' . GETPOST ( " file " ), $maxwidthmini , $maxheightmini , '_mini' , $quality );
2021-02-26 22:04:03 +01:00
if ( image_format_supported ( $imgThumbSmall ) >= 0 && preg_match ( '/([^\\/:]+)$/i' , $imgThumbMini , $reg )) {
2019-11-14 12:09:15 +01:00
$imgThumbMini = $reg [ 1 ]; // Save only basename
2019-10-11 11:27:05 +02:00
dolibarr_set_const ( $db , $constant . " _MINI " , $imgThumbMini , 'chaine' , 0 , '' , $conf -> entity );
2021-02-26 22:04:03 +01:00
} else {
dol_syslog ( $imgThumbMini );
}
2015-06-29 06:28:04 +02:00
header ( " Location: " . $_SERVER [ " PHP_SELF " ]);
exit ;
2020-05-21 09:35:30 +02:00
} else {
2015-06-29 06:28:04 +02:00
$error ++ ;
$langs -> load ( " errors " );
2015-10-23 12:58:30 +02:00
setEventMessages ( $langs -> trans ( " ErrorBadImageFormat " ), null , 'errors' );
2019-05-10 20:09:41 +02:00
dol_syslog ( $langs -> transnoentities ( " ErrorBadImageFormat " ), LOG_INFO );
2015-06-29 06:28:04 +02:00
}
2020-05-21 09:35:30 +02:00
} else {
2015-06-29 06:28:04 +02:00
$error ++ ;
$langs -> load ( " errors " );
2021-03-31 12:41:44 +02:00
setEventMessages ( $langs -> trans ( " ErrorFileDoesNotExists " , GETPOST ( " file " )), null , 'errors' );
dol_syslog ( $langs -> transnoentities ( " ErrorFileDoesNotExists " , GETPOST ( " file " )), LOG_WARNING );
2015-06-29 06:28:04 +02:00
}
2007-08-09 20:22:39 +02:00
}
2015-06-29 06:28:04 +02:00
2024-11-04 13:56:05 +01:00
if ( $action == 'removelogo' || $action == 'removelogo_squarred' ) {
2019-10-11 11:27:05 +02:00
$constant = " MAIN_INFO_SOCIETE_LOGO " ;
2024-11-04 13:56:05 +01:00
if ( $action == 'removelogo_squarred' ) {
2021-02-26 22:04:03 +01:00
$constant = " MAIN_INFO_SOCIETE_LOGO_SQUARRED " ;
}
2015-06-29 06:28:04 +02:00
2019-10-11 11:27:05 +02:00
require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php' ;
2015-06-29 06:28:04 +02:00
2019-10-11 11:27:05 +02:00
$logofilename = $mysoc -> logo ;
2019-10-11 11:38:49 +02:00
$logofilenamebis = $mysoc -> logo_squarred ;
2024-11-04 13:56:05 +01:00
if ( $action == 'removelogo_squarred' ) {
2019-10-11 11:38:49 +02:00
$logofilename = $mysoc -> logo_squarred ;
$logofilenamebis = $mysoc -> logo ;
}
2019-11-14 12:09:15 +01:00
$logofile = $conf -> mycompany -> dir_output . '/logos/' . $logofilename ;
2021-02-26 22:04:03 +01:00
if ( $logofilename != '' && $logofilename != $logofilenamebis ) {
dol_delete_file ( $logofile );
}
2019-10-11 11:27:05 +02:00
dolibarr_del_const ( $db , $constant , $conf -> entity );
2024-11-04 13:56:05 +01:00
if ( $action == 'removelogo_squarred' ) {
2021-02-26 22:04:03 +01:00
$mysoc -> logo_squarred = '' ;
} else {
$mysoc -> logo = '' ;
}
2019-10-11 11:27:05 +02:00
$logofilename = $mysoc -> logo_small ;
2019-10-11 11:38:49 +02:00
$logofilenamebis = $mysoc -> logo_squarred_small ;
2024-11-04 13:56:05 +01:00
if ( $action == 'removelogo_squarred' ) {
2019-10-11 11:38:49 +02:00
$logofilename = $mysoc -> logo_squarred_small ;
$logofilenamebis = $mysoc -> logo_small ;
}
2019-11-14 12:09:15 +01:00
$logosmallfile = $conf -> mycompany -> dir_output . '/logos/thumbs/' . $logofilename ;
2021-02-26 22:04:03 +01:00
if ( $logofilename != '' && $logofilename != $logofilenamebis ) {
dol_delete_file ( $logosmallfile );
}
2019-10-11 11:27:05 +02:00
dolibarr_del_const ( $db , $constant . " _SMALL " , $conf -> entity );
2024-11-04 13:56:05 +01:00
if ( $action == 'removelogo_squarred' ) {
2021-02-26 22:04:03 +01:00
$mysoc -> logo_squarred_small = '' ;
} else {
$mysoc -> logo_small = '' ;
}
2019-10-11 11:27:05 +02:00
$logofilename = $mysoc -> logo_mini ;
2019-10-11 11:38:49 +02:00
$logofilenamebis = $mysoc -> logo_squarred_mini ;
2024-11-04 13:56:05 +01:00
if ( $action == 'removelogo_squarred' ) {
2019-10-11 11:38:49 +02:00
$logofilename = $mysoc -> logo_squarred_mini ;
$logofilenamebis = $mysoc -> logo_mini ;
}
2019-11-14 12:09:15 +01:00
$logominifile = $conf -> mycompany -> dir_output . '/logos/thumbs/' . $logofilename ;
2021-02-26 22:04:03 +01:00
if ( $logofilename != '' && $logofilename != $logofilenamebis ) {
dol_delete_file ( $logominifile );
}
2019-10-11 11:27:05 +02:00
dolibarr_del_const ( $db , $constant . " _MINI " , $conf -> entity );
2024-11-04 13:56:05 +01:00
if ( $action == 'removelogo_squarred' ) {
2021-02-26 22:04:03 +01:00
$mysoc -> logo_squarred_mini = '' ;
} else {
$mysoc -> logo_mini = '' ;
}
2006-08-12 17:32:57 +02:00
}
2010-08-21 17:30:17 +02:00
2006-08-12 17:32:57 +02:00
/*
2010-08-21 17:30:17 +02:00
* View
2006-08-12 17:32:57 +02:00
*/
2019-11-14 12:09:15 +01:00
$wikihelp = 'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones' ;
2024-06-08 14:53:14 +02:00
llxHeader ( '' , $langs -> trans ( " Setup " ), $wikihelp , '' , 0 , 0 , '' , '' , '' , 'mod-admin page-company' );
2006-08-12 17:32:57 +02:00
2019-11-14 12:09:15 +01:00
$form = new Form ( $db );
$formother = new FormOther ( $db );
$formcompany = new FormCompany ( $db );
2024-11-04 13:56:05 +01:00
$formfile = new FormFile ( $db );
2008-11-16 02:54:33 +01:00
2022-03-31 16:55:48 +02:00
$countrynotdefined = '<span class="error">' . $langs -> trans ( " ErrorSetACountryFirst " ) . ' <a href="#trzipbeforecountry">(' . $langs -> trans ( " SeeAbove " ) . ')</a></span>' ;
2006-08-12 17:32:57 +02:00
2019-01-27 11:55:16 +01:00
print load_fiche_titre ( $langs -> trans ( " CompanyFoundation " ), '' , 'title_setup' );
2006-08-12 17:32:57 +02:00
2018-03-18 06:09:50 +01:00
$head = company_admin_prepare_head ();
2022-02-07 14:25:20 +01:00
print dol_get_fiche_head ( $head , 'company' , '' , - 1 , '' );
2018-03-18 06:09:50 +01:00
2019-10-11 14:09:26 +02:00
print '<span class="opacitymedium">' . $langs -> trans ( " CompanyFundationDesc " , $langs -> transnoentities ( " Save " )) . " </span><br> \n " ;
2021-10-18 15:25:56 +02:00
print " <br><br> \n " ;
2006-08-12 17:32:57 +02:00
2015-06-29 06:28:04 +02:00
2021-12-10 14:50:20 +01:00
// Edit parameters
2021-07-11 01:12:52 +02:00
if ( ! empty ( $conf -> use_javascript_ajax )) {
2021-11-29 15:09:18 +01:00
print " \n " . '<script type="text/javascript">' ;
2021-07-11 01:12:52 +02:00
print ' $ ( document ) . ready ( function () {
2019-10-11 14:09:26 +02:00
$ ( " #selectcountry_id " ) . change ( function () {
2024-10-01 14:27:45 +02:00
console . log ( " selectcountry_id change " );
2019-10-11 14:09:26 +02:00
document . form_index . action . value = " updateedit " ;
document . form_index . submit ();
});
}); ' ;
2021-07-11 01:12:52 +02:00
print '</script>' . " \n " ;
}
2015-06-29 06:28:04 +02:00
2019-10-11 14:09:26 +02:00
print '<form enctype="multipart/form-data" method="POST" action="' . $_SERVER [ " PHP_SELF " ] . '" name="form_index">' ;
2019-12-18 23:12:31 +01:00
print '<input type="hidden" name="token" value="' . newToken () . '">' ;
2019-10-11 14:09:26 +02:00
print '<input type="hidden" name="action" value="update">' ;
2023-12-11 10:00:24 +01:00
print '<input type="hidden" name="page_y" value="">' ;
2017-09-06 11:39:30 +02:00
2020-04-08 16:13:29 +02:00
print '<table class="noborder centpercent editmode">' ;
2023-04-26 18:46:27 +02:00
print '<tr class="liste_titre"><th class="titlefieldcreate wordbreak">' . $langs -> trans ( " CompanyInfo " ) . '</th><th></th></tr>' . " \n " ;
2015-06-29 06:28:04 +02:00
2024-06-23 13:24:26 +02:00
// Company name
2020-02-27 16:33:24 +01:00
print '<tr class="oddeven"><td class="fieldrequired wordbreak"><label for="name">' . $langs -> trans ( " CompanyName " ) . '</label></td><td>' ;
2024-06-23 13:24:26 +02:00
print '<input name="name" id="name" maxlength="' . $mysoc -> fields [ 'nom' ][ 'length' ] . '" class="minwidth250" value="' . dol_escape_htmltag (( GETPOSTISSET ( 'name' ) ? GETPOST ( 'name' , 'alphanohtml' ) : ( getDolGlobalString ( 'MAIN_INFO_SOCIETE_NOM' )))) . '"' . ( ! getDolGlobalString ( 'MAIN_INFO_SOCIETE_NOM' ) ? ' autofocus="autofocus"' : '' ) . '></td></tr>' . " \n " ;
2017-09-06 11:39:30 +02:00
2024-12-27 16:22:13 +01:00
// Main currency
print '<tr class="oddeven"><td class="fieldrequired"><label for="currency">' . $langs -> trans ( " CompanyCurrency " ) . '</label></td><td>' ;
print img_picto ( '' , 'multicurrency' , 'class="pictofixedwidth"' );
print $form -> selectCurrency ( $conf -> currency , " currency " );
print '</td></tr>' . " \n " ;
// Country
print '<tr class="oddeven"><td class="fieldrequired"><label for="selectcountry_id">' . $langs -> trans ( " Country " ) . '</label></td><td>' ;
print img_picto ( '' , 'globe-americas' , 'class="pictofixedwidth"' );
print $form -> select_country ( $mysoc -> country_id , 'country_id' , '' , 0 );
2025-02-19 20:09:01 +01:00
print info_admin ( $langs -> trans ( " YouCanChangeValuesForThisListFromDictionarySetup " ), 1 );
2024-12-27 16:22:13 +01:00
print '</td></tr>' . " \n " ;
2019-12-30 21:17:41 +01:00
// Address
2019-10-11 14:09:26 +02:00
print '<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_ADDRESS">' . $langs -> trans ( " CompanyAddress " ) . '</label></td><td>' ;
2024-02-25 22:09:50 +01:00
print '<textarea name="MAIN_INFO_SOCIETE_ADDRESS" id="MAIN_INFO_SOCIETE_ADDRESS" class="quatrevingtpercent" rows="' . ROWS_3 . '">' . ( GETPOSTISSET ( 'MAIN_INFO_SOCIETE_ADDRESS' ) ? GETPOST ( 'MAIN_INFO_SOCIETE_ADDRESS' , 'alphanohtml' ) : ( getDolGlobalString ( 'MAIN_INFO_SOCIETE_ADDRESS' ))) . '</textarea></td></tr>' . " \n " ;
2017-09-06 11:39:30 +02:00
2020-11-29 16:02:39 +01:00
// Zip
2022-03-31 16:55:48 +02:00
print '<tr class="oddeven" id="trzipbeforecountry"><td><label for="MAIN_INFO_SOCIETE_ZIP">' . $langs -> trans ( " CompanyZip " ) . '</label></td><td>' ;
2024-02-25 22:09:50 +01:00
print '<input class="width100" name="MAIN_INFO_SOCIETE_ZIP" id="MAIN_INFO_SOCIETE_ZIP" value="' . dol_escape_htmltag (( GETPOSTISSET ( 'MAIN_INFO_SOCIETE_ZIP' ) ? GETPOST ( 'MAIN_INFO_SOCIETE_ZIP' , 'alphanohtml' ) : ( getDolGlobalString ( 'MAIN_INFO_SOCIETE_ZIP' )))) . '"></td></tr>' . " \n " ;
2015-06-29 06:28:04 +02:00
2022-03-31 16:55:48 +02:00
print '<tr class="oddeven" id="trtownbeforecountry"><td><label for="MAIN_INFO_SOCIETE_TOWN">' . $langs -> trans ( " CompanyTown " ) . '</label></td><td>' ;
2024-02-25 22:09:50 +01:00
print '<input name="MAIN_INFO_SOCIETE_TOWN" class="minwidth200" id="MAIN_INFO_SOCIETE_TOWN" value="' . dol_escape_htmltag (( GETPOSTISSET ( 'MAIN_INFO_SOCIETE_TOWN' ) ? GETPOST ( 'MAIN_INFO_SOCIETE_TOWN' , 'alphanohtml' ) : ( getDolGlobalString ( 'MAIN_INFO_SOCIETE_TOWN' )))) . '"></td></tr>' . " \n " ;
2015-06-29 06:28:04 +02:00
2024-12-27 16:22:13 +01:00
// State
2021-12-10 16:02:42 +01:00
print '<tr class="oddeven"><td class="wordbreak"><label for="state_id">' . $langs -> trans ( " State " ) . '</label></td><td>' ;
2019-11-14 12:09:15 +01:00
$state_id = 0 ;
2023-10-24 17:00:13 +02:00
if ( getDolGlobalString ( 'MAIN_INFO_SOCIETE_STATE' )) {
2023-12-13 15:20:53 +01:00
$tmp = explode ( ':' , getDolGlobalString ( 'MAIN_INFO_SOCIETE_STATE' ));
2019-11-14 12:09:15 +01:00
$state_id = $tmp [ 0 ];
2019-10-11 14:09:26 +02:00
}
2021-07-04 19:23:04 +02:00
print img_picto ( '' , 'state' , 'class="pictofixedwidth"' );
2021-12-10 15:57:10 +01:00
print $formcompany -> select_state ( $state_id , $mysoc -> country_code , 'state_id' , 'maxwidth200onsmartphone minwidth300' );
2019-10-11 14:09:26 +02:00
print '</td></tr>' . " \n " ;
2015-06-29 06:28:04 +02:00
2019-12-30 21:17:41 +01:00
// Phone
2019-10-11 14:09:26 +02:00
print '<tr class="oddeven"><td><label for="phone">' . $langs -> trans ( " Phone " ) . '</label></td><td>' ;
2024-09-25 22:21:31 +02:00
print img_picto ( '' , 'object_phoning' , '' , 0 , 0 , 0 , '' , 'pictofixedwidth' );
2024-02-25 22:09:50 +01:00
print '<input class="maxwidth150 widthcentpercentminusx" name="phone" id="phone" value="' . dol_escape_htmltag (( GETPOSTISSET ( 'phone' ) ? GETPOST ( 'phone' , 'alphanohtml' ) : ( getDolGlobalString ( 'MAIN_INFO_SOCIETE_TEL' )))) . '"></td></tr>' ;
print '</td></tr>' . " \n " ;
// Phone mobile
print '<tr class="oddeven"><td><label for="phone">' . $langs -> trans ( " PhoneMobile " ) . '</label></td><td>' ;
2024-09-25 22:21:31 +02:00
print img_picto ( '' , 'object_phoning_mobile' , '' , 0 , 0 , 0 , '' , 'pictofixedwidth' );
2024-02-25 22:09:50 +01:00
print '<input class="maxwidth150 widthcentpercentminusx" name="phone_mobile" id="phone_mobile" value="' . dol_escape_htmltag (( GETPOSTISSET ( 'phone_mobile' ) ? GETPOST ( 'phone_mobile' , 'alphanohtml' ) : ( getDolGlobalString ( 'MAIN_INFO_SOCIETE_MOBILE' )))) . '"></td></tr>' ;
2019-10-11 14:09:26 +02:00
print '</td></tr>' . " \n " ;
2015-06-29 06:28:04 +02:00
2019-12-30 21:17:41 +01:00
// Fax
2019-10-11 14:09:26 +02:00
print '<tr class="oddeven"><td><label for="fax">' . $langs -> trans ( " Fax " ) . '</label></td><td>' ;
2024-09-25 22:21:31 +02:00
print img_picto ( '' , 'object_phoning_fax' , '' , 0 , 0 , 0 , '' , 'pictofixedwidth' );
2024-02-25 22:09:50 +01:00
print '<input class="maxwidth150" name="fax" id="fax" value="' . dol_escape_htmltag (( GETPOSTISSET ( 'fax' ) ? GETPOST ( 'fax' , 'alphanohtml' ) : ( getDolGlobalString ( 'MAIN_INFO_SOCIETE_FAX' )))) . '"></td></tr>' ;
2019-10-11 14:09:26 +02:00
print '</td></tr>' . " \n " ;
2015-06-29 06:28:04 +02:00
2019-12-30 21:17:41 +01:00
// Email
2019-10-11 14:09:26 +02:00
print '<tr class="oddeven"><td><label for="email">' . $langs -> trans ( " EMail " ) . '</label></td><td>' ;
2024-09-25 22:21:31 +02:00
print img_picto ( '' , 'object_email' , '' , 0 , 0 , 0 , '' , 'pictofixedwidth' );
2023-10-24 17:00:13 +02:00
print '<input class="minwidth300 maxwidth500 widthcentpercentminusx" name="mail" id="email" value="' . dol_escape_htmltag (( GETPOSTISSET ( 'mail' ) ? GETPOST ( 'mail' , 'alphanohtml' ) : ( getDolGlobalString ( 'MAIN_INFO_SOCIETE_MAIL' ) ? $conf -> global -> MAIN_INFO_SOCIETE_MAIL : '' ))) . '"></td></tr>' ;
2019-10-11 14:09:26 +02:00
print '</td></tr>' . " \n " ;
2017-09-06 11:39:30 +02:00
2019-10-11 14:09:26 +02:00
// Web
print '<tr class="oddeven"><td><label for="web">' . $langs -> trans ( " Web " ) . '</label></td><td>' ;
2024-09-25 22:21:31 +02:00
print img_picto ( '' , 'globe' , '' , 0 , 0 , 0 , '' , 'pictofixedwidth' );
2023-10-24 17:00:13 +02:00
print '<input class="maxwidth300 widthcentpercentminusx" name="web" id="web" value="' . dol_escape_htmltag (( GETPOSTISSET ( 'web' ) ? GETPOST ( 'web' , 'alphanohtml' ) : ( getDolGlobalString ( 'MAIN_INFO_SOCIETE_WEB' ) ? $conf -> global -> MAIN_INFO_SOCIETE_WEB : '' ))) . '"></td></tr>' ;
2019-10-11 14:09:26 +02:00
print '</td></tr>' . " \n " ;
2015-06-29 06:28:04 +02:00
2019-10-11 14:09:26 +02:00
// Barcode
2022-08-19 18:07:21 +02:00
if ( isModEnabled ( 'barcode' )) {
2020-03-28 13:38:25 +01:00
print '<tr class="oddeven"><td>' ;
print '<label for="barcode">' . $langs -> trans ( " Gencod " ) . '</label></td><td>' ;
2021-07-04 19:23:04 +02:00
print '<span class="fa fa-barcode pictofixedwidth"></span>' ;
2023-12-11 10:09:43 +01:00
print '<input name="barcode" id="barcode" class="minwidth150 widthcentpercentminusx maxwidth300" value="' . dol_escape_htmltag ( GETPOSTISSET ( 'barcode' ) ? GETPOST ( 'barcode' , 'alphanohtml' ) : getDolGlobalString ( 'MAIN_INFO_SOCIETE_GENCOD' , '' )) . '"></td></tr>' ;
2019-10-11 11:27:05 +02:00
print '</td></tr>' ;
2019-10-11 14:09:26 +02:00
}
2019-10-11 11:27:05 +02:00
2022-09-25 21:30:15 +02:00
// Tooltip for both Logo and LogSquarred
2024-11-04 16:38:11 +01:00
$maxfilesizearray = getMaxFileSizeArray ();
$maxmin = $maxfilesizearray [ 'maxmin' ];
2022-09-25 21:30:15 +02:00
$tooltiplogo = $langs -> trans ( 'AvailableFormats' ) . ' : png, jpg, jpeg' ;
2022-09-28 21:00:43 +02:00
$tooltiplogo .= ( $maxmin > 0 ) ? '<br>' . $langs -> trans ( 'MaxSize' ) . ' : ' . $maxmin . ' ' . $langs -> trans ( 'Kb' ) : '' ;
2022-09-25 21:30:15 +02:00
// Logo
print '<tr class="oddeven"><td><label for="logo">' . $form -> textwithpicto ( $langs -> trans ( " Logo " ), $tooltiplogo ) . '</label></td><td>' ;
2024-11-04 13:56:05 +01:00
$modulepart = 'mycompany' ;
$dirformainimage = $conf -> mycompany -> dir_output ;
$subdirformainimage = 'logos/' ;
$fileformainimage = $mysoc -> logo ;
print $formfile -> showImageToEdit ( 'logo' , $modulepart , $dirformainimage , $subdirformainimage , $fileformainimage );
2019-10-11 14:09:26 +02:00
print '</td></tr>' ;
// Logo (squarred)
2022-09-25 21:30:15 +02:00
print '<tr class="oddeven"><td><label for="logo_squarred">' . $form -> textwithpicto ( $langs -> trans ( " LogoSquarred " ), $tooltiplogo ) . '</label></td><td>' ;
2024-11-04 13:56:05 +01:00
$modulepart = 'mycompany' ;
$dirformainimage = $conf -> mycompany -> dir_output ;
$subdirformainimage = 'logos/' ;
$fileformainimage = $mysoc -> logo_squarred ;
print $formfile -> showImageToEdit ( 'logo_squarred' , $modulepart , $dirformainimage , $subdirformainimage , $fileformainimage );
2019-10-11 14:09:26 +02:00
print '</td></tr>' ;
2015-06-29 06:28:04 +02:00
2019-10-11 14:09:26 +02:00
// Note
print '<tr class="oddeven"><td class="tdtop"><label for="note">' . $langs -> trans ( " Note " ) . '</label></td><td>' ;
2023-10-24 17:00:13 +02:00
print '<textarea class="flat quatrevingtpercent" name="note" id="note" rows="' . ROWS_5 . '">' . ( GETPOSTISSET ( 'note' ) ? GETPOST ( 'note' , 'restricthtml' ) : ( getDolGlobalString ( 'MAIN_INFO_SOCIETE_NOTE' ) ? $conf -> global -> MAIN_INFO_SOCIETE_NOTE : '' )) . '</textarea></td></tr>' ;
2019-10-11 14:09:26 +02:00
print '</td></tr>' ;
2018-05-15 11:50:42 +02:00
2019-10-11 14:09:26 +02:00
print '</table>' ;
2018-05-15 11:50:42 +02:00
2023-12-11 10:00:24 +01:00
print $form -> buttonsSaveCancel ( " Save " , '' , array (), false , 'reposition' );
2023-04-26 18:46:27 +02:00
2023-12-11 10:00:24 +01:00
print '<br><br>' ;
2017-09-06 11:39:30 +02:00
2023-04-26 18:46:27 +02:00
2019-10-11 14:09:26 +02:00
// IDs of the company (country-specific)
2021-06-15 01:18:17 +02:00
print '<div class="div-table-responsive-no-min">' ;
2020-04-08 16:13:29 +02:00
print '<table class="noborder centpercent editmode">' ;
2023-04-26 18:46:27 +02:00
print '<tr class="liste_titre"><td class="titlefieldcreate wordbreak">' . $langs -> trans ( " CompanyIds " ) . '</td><td></td></tr>' ;
2015-06-29 06:28:04 +02:00
2019-10-11 14:09:26 +02:00
$langs -> load ( " companies " );
2017-09-06 11:39:30 +02:00
2019-10-11 14:09:26 +02:00
// Managing Director(s)
print '<tr class="oddeven"><td><label for="director">' . $langs -> trans ( " ManagingDirectors " ) . '</label></td><td>' ;
2023-10-24 17:00:13 +02:00
print '<input name="MAIN_INFO_SOCIETE_MANAGERS" id="directors" class="minwidth300" value="' . dol_escape_htmltag (( GETPOSTISSET ( 'MAIN_INFO_SOCIETE_MANAGERS' ) ? GETPOST ( 'MAIN_INFO_SOCIETE_MANAGERS' , 'alphanohtml' ) : ( getDolGlobalString ( 'MAIN_INFO_SOCIETE_MANAGERS' ) ? $conf -> global -> MAIN_INFO_SOCIETE_MANAGERS : '' ))) . '"></td></tr>' ;
2017-09-06 11:39:30 +02:00
2019-10-11 14:09:26 +02:00
// GDPR contact
print '<tr class="oddeven"><td>' ;
print $form -> textwithpicto ( $langs -> trans ( " GDPRContact " ), $langs -> trans ( " GDPRContactDesc " ));
print '</td><td>' ;
2023-10-24 17:00:13 +02:00
print '<input name="MAIN_INFO_GDPR" id="infodirector" class="minwidth300" value="' . dol_escape_htmltag (( GETPOSTISSET ( " MAIN_INFO_GDPR " ) ? GETPOST ( " MAIN_INFO_GDPR " , 'alphanohtml' ) : ( getDolGlobalString ( 'MAIN_INFO_GDPR' ) ? $conf -> global -> MAIN_INFO_GDPR : '' ))) . '"></td></tr>' ;
2017-09-06 11:39:30 +02:00
2019-10-11 14:09:26 +02:00
// Capital
print '<tr class="oddeven"><td><label for="capital">' . $langs -> trans ( " Capital " ) . '</label></td><td>' ;
2023-10-24 17:00:13 +02:00
print '<input name="capital" id="capital" class="maxwidth100" value="' . dol_escape_htmltag (( GETPOSTISSET ( 'capital' ) ? GETPOST ( 'capital' , 'alphanohtml' ) : ( getDolGlobalString ( 'MAIN_INFO_CAPITAL' ) ? $conf -> global -> MAIN_INFO_CAPITAL : '' ))) . '"></td></tr>' ;
2017-09-06 11:39:30 +02:00
2019-10-11 14:09:26 +02:00
// Juridical Status
print '<tr class="oddeven"><td><label for="forme_juridique_code">' . $langs -> trans ( " JuridicalStatus " ) . '</label></td><td>' ;
if ( $mysoc -> country_code ) {
2024-03-29 12:28:55 +01:00
print $formcompany -> select_juridicalstatus ( getDolGlobalString ( 'MAIN_INFO_SOCIETE_FORME_JURIDIQUE' ), $mysoc -> country_code , '' , 'forme_juridique_code' );
2019-10-11 14:09:26 +02:00
} else {
print $countrynotdefined ;
}
print '</td></tr>' ;
2017-09-06 11:39:30 +02:00
2024-12-27 16:22:13 +01:00
// Object of the company
print '<tr class="oddeven"><td><label for="socialobject">' . $langs -> trans ( " CompanyObject " ) . '</label></td><td>' ;
print '<textarea class="flat quatrevingtpercent" name="socialobject" id="socialobject" rows="' . ROWS_3 . '">' . ( getDolGlobalString ( 'MAIN_INFO_SOCIETE_OBJECT' )) . '</textarea></td></tr>' ;
print '</td></tr>' ;
// Tax ID Intra-community VAT number
print '<tr class="oddeven"><td><label for="intra_vat">' . $langs -> trans ( " VATIntra " ) . '</label></td><td>' ;
print '<input name="tva" id="intra_vat" class="minwidth200" value="' . dol_escape_htmltag ( getDolGlobalString ( 'MAIN_INFO_TVAINTRA' )) . '">' ;
print '</td></tr>' ;
2019-12-30 21:17:41 +01:00
// ProfId1
2021-02-26 22:04:03 +01:00
if ( $langs -> transcountry ( " ProfId1 " , $mysoc -> country_code ) != '-' ) {
2019-10-11 14:09:26 +02:00
print '<tr class="oddeven"><td><label for="profid1">' . $langs -> transcountry ( " ProfId1 " , $mysoc -> country_code ) . '</label></td><td>' ;
2021-02-26 22:04:03 +01:00
if ( ! empty ( $mysoc -> country_code )) {
2024-03-23 16:01:41 +01:00
print '<input name="siren" id="profid1" class="minwidth200" value="' . dol_escape_htmltag ( getDolGlobalString ( 'MAIN_INFO_SIREN' )) . '">' ;
2020-05-21 09:35:30 +02:00
} else {
2019-10-11 14:09:26 +02:00
print $countrynotdefined ;
2015-06-29 06:28:04 +02:00
}
print '</td></tr>' ;
2019-10-11 14:09:26 +02:00
}
2017-09-06 11:39:30 +02:00
2019-10-11 14:09:26 +02:00
// ProfId2
2021-02-26 22:04:03 +01:00
if ( $langs -> transcountry ( " ProfId2 " , $mysoc -> country_code ) != '-' ) {
2019-10-11 14:09:26 +02:00
print '<tr class="oddeven"><td><label for="profid2">' . $langs -> transcountry ( " ProfId2 " , $mysoc -> country_code ) . '</label></td><td>' ;
2021-02-26 22:04:03 +01:00
if ( ! empty ( $mysoc -> country_code )) {
2024-03-23 16:01:41 +01:00
print '<input name="siret" id="profid2" class="minwidth200" value="' . dol_escape_htmltag ( getDolGlobalString ( 'MAIN_INFO_SIRET' )) . '">' ;
2020-05-21 09:35:30 +02:00
} else {
2019-10-11 14:09:26 +02:00
print $countrynotdefined ;
2012-11-27 13:05:21 +01:00
}
2015-06-29 06:28:04 +02:00
print '</td></tr>' ;
2019-10-11 14:09:26 +02:00
}
2015-06-29 06:28:04 +02:00
2019-10-11 14:09:26 +02:00
// ProfId3
2021-02-26 22:04:03 +01:00
if ( $langs -> transcountry ( " ProfId3 " , $mysoc -> country_code ) != '-' ) {
2019-10-11 14:09:26 +02:00
print '<tr class="oddeven"><td><label for="profid3">' . $langs -> transcountry ( " ProfId3 " , $mysoc -> country_code ) . '</label></td><td>' ;
2021-02-26 22:04:03 +01:00
if ( ! empty ( $mysoc -> country_code )) {
2024-03-23 16:01:41 +01:00
print '<input name="ape" id="profid3" class="minwidth200" value="' . dol_escape_htmltag ( getDolGlobalString ( 'MAIN_INFO_APE' )) . '">' ;
2020-05-21 09:35:30 +02:00
} else {
2019-10-11 14:09:26 +02:00
print $countrynotdefined ;
2019-06-22 14:47:46 +02:00
}
2015-06-29 06:28:04 +02:00
print '</td></tr>' ;
2019-10-11 14:09:26 +02:00
}
2015-06-29 06:28:04 +02:00
2019-10-11 14:09:26 +02:00
// ProfId4
2021-02-26 22:04:03 +01:00
if ( $langs -> transcountry ( " ProfId4 " , $mysoc -> country_code ) != '-' ) {
2019-10-11 14:09:26 +02:00
print '<tr class="oddeven"><td><label for="profid4">' . $langs -> transcountry ( " ProfId4 " , $mysoc -> country_code ) . '</label></td><td>' ;
2021-02-26 22:04:03 +01:00
if ( ! empty ( $mysoc -> country_code )) {
2024-03-23 16:01:41 +01:00
print '<input name="rcs" id="profid4" class="minwidth200" value="' . dol_escape_htmltag ( getDolGlobalString ( 'MAIN_INFO_RCS' )) . '">' ;
2020-05-21 09:35:30 +02:00
} else {
2019-10-11 14:09:26 +02:00
print $countrynotdefined ;
2015-06-29 06:28:04 +02:00
}
2019-10-11 14:09:26 +02:00
print '</td></tr>' ;
}
2015-06-29 06:28:04 +02:00
2019-10-11 14:09:26 +02:00
// ProfId5
2021-02-26 22:04:03 +01:00
if ( $langs -> transcountry ( " ProfId5 " , $mysoc -> country_code ) != '-' ) {
2019-10-11 14:09:26 +02:00
print '<tr class="oddeven"><td><label for="profid5">' . $langs -> transcountry ( " ProfId5 " , $mysoc -> country_code ) . '</label></td><td>' ;
2021-02-26 22:04:03 +01:00
if ( ! empty ( $mysoc -> country_code )) {
2024-03-23 16:01:41 +01:00
print '<input name="MAIN_INFO_PROFID5" id="profid5" class="minwidth200" value="' . dol_escape_htmltag ( getDolGlobalString ( 'MAIN_INFO_PROFID5' )) . '">' ;
2020-05-21 09:35:30 +02:00
} else {
2019-10-11 14:09:26 +02:00
print $countrynotdefined ;
2015-06-29 06:28:04 +02:00
}
print '</td></tr>' ;
2019-10-11 14:09:26 +02:00
}
2015-06-29 06:28:04 +02:00
2019-10-11 14:09:26 +02:00
// ProfId6
2021-02-26 22:04:03 +01:00
if ( $langs -> transcountry ( " ProfId6 " , $mysoc -> country_code ) != '-' ) {
2019-10-11 14:09:26 +02:00
print '<tr class="oddeven"><td><label for="profid6">' . $langs -> transcountry ( " ProfId6 " , $mysoc -> country_code ) . '</label></td><td>' ;
2021-02-26 22:04:03 +01:00
if ( ! empty ( $mysoc -> country_code )) {
2024-03-23 16:01:41 +01:00
print '<input name="MAIN_INFO_PROFID6" id="profid6" class="minwidth200" value="' . dol_escape_htmltag ( getDolGlobalString ( 'MAIN_INFO_PROFID6' )) . '">' ;
2020-05-21 09:35:30 +02:00
} else {
2023-10-12 17:44:08 +02:00
print $countrynotdefined ;
}
print '</td></tr>' ;
}
// ProfId7
if ( $langs -> transcountry ( " ProfId7 " , $mysoc -> country_code ) != '-' ) {
2024-03-23 16:01:41 +01:00
print '<tr class="oddeven"><td><label for="profid7">' . $langs -> transcountry ( " ProfId7 " , $mysoc -> country_code ) . '</label></td><td>' ;
2023-10-12 17:44:08 +02:00
if ( ! empty ( $mysoc -> country_code )) {
2024-03-23 16:01:41 +01:00
print '<input name="MAIN_INFO_PROFID7" id="profid7" class="minwidth200" value="' . dol_escape_htmltag ( getDolGlobalString ( 'MAIN_INFO_PROFID7' )) . '">' ;
2023-10-12 17:44:08 +02:00
} else {
print $countrynotdefined ;
}
print '</td></tr>' ;
}
// ProfId8
if ( $langs -> transcountry ( " ProfId8 " , $mysoc -> country_code ) != '-' ) {
2024-03-23 16:01:41 +01:00
print '<tr class="oddeven"><td><label for="profid8">' . $langs -> transcountry ( " ProfId8 " , $mysoc -> country_code ) . '</label></td><td>' ;
2023-10-12 17:44:08 +02:00
if ( ! empty ( $mysoc -> country_code )) {
2024-03-23 16:01:41 +01:00
print '<input name="MAIN_INFO_PROFID8" id="profid8" class="minwidth200" value="' . dol_escape_htmltag ( getDolGlobalString ( 'MAIN_INFO_PROFID8' )) . '">' ;
2023-10-12 17:44:08 +02:00
} else {
print $countrynotdefined ;
}
print '</td></tr>' ;
}
// ProfId9
if ( $langs -> transcountry ( " ProfId9 " , $mysoc -> country_code ) != '-' ) {
2024-03-23 16:01:41 +01:00
print '<tr class="oddeven"><td><label for="profid9">' . $langs -> transcountry ( " ProfId9 " , $mysoc -> country_code ) . '</label></td><td>' ;
2023-10-12 17:44:08 +02:00
if ( ! empty ( $mysoc -> country_code )) {
2024-03-23 16:01:41 +01:00
print '<input name="MAIN_INFO_PROFID9" id="profid9" class="minwidth200" value="' . dol_escape_htmltag ( getDolGlobalString ( 'MAIN_INFO_PROFID9' )) . '">' ;
2023-10-12 17:44:08 +02:00
} else {
print $countrynotdefined ;
}
print '</td></tr>' ;
}
// ProfId10
if ( $langs -> transcountry ( " ProfId10 " , $mysoc -> country_code ) != '-' ) {
2024-03-23 16:01:41 +01:00
print '<tr class="oddeven"><td><label for="profid10">' . $langs -> transcountry ( " ProfId10 " , $mysoc -> country_code ) . '</label></td><td>' ;
2023-10-12 17:44:08 +02:00
if ( ! empty ( $mysoc -> country_code )) {
2024-03-23 16:01:41 +01:00
print '<input name="MAIN_INFO_PROFID10" id="profid10" class="minwidth200" value="' . dol_escape_htmltag ( getDolGlobalString ( 'MAIN_INFO_PROFID10' )) . '">' ;
2023-10-12 17:44:08 +02:00
} else {
2019-10-11 14:09:26 +02:00
print $countrynotdefined ;
2019-10-11 11:27:05 +02:00
}
print '</td></tr>' ;
2019-10-11 14:09:26 +02:00
}
2019-10-11 11:27:05 +02:00
2019-10-11 14:09:26 +02:00
print '</table>' ;
2021-06-15 01:18:17 +02:00
print '</div>' ;
2017-09-06 11:39:30 +02:00
2015-06-29 06:28:04 +02:00
2019-10-11 14:09:26 +02:00
// Fiscal year start
print '<br>' ;
2020-04-08 16:13:29 +02:00
print '<table class="noborder centpercent editmode">' ;
2019-10-11 14:09:26 +02:00
print '<tr class="liste_titre">' ;
2023-04-26 18:46:27 +02:00
print '<td class="titlefieldcreate">' . $langs -> trans ( " FiscalYearInformation " ) . '</td><td></td>' ;
2019-10-11 14:09:26 +02:00
print " </tr> \n " ;
2017-09-06 11:39:30 +02:00
2019-10-11 14:09:26 +02:00
print '<tr class="oddeven"><td><label for="SOCIETE_FISCAL_MONTH_START">' . $langs -> trans ( " FiscalMonthStart " ) . '</label></td><td>' ;
2023-12-12 01:40:26 +01:00
print $formother -> select_month ( getDolGlobalInt ( 'SOCIETE_FISCAL_MONTH_START' ) ? $conf -> global -> SOCIETE_FISCAL_MONTH_START : '' , 'SOCIETE_FISCAL_MONTH_START' , 0 , 1 , 'maxwidth100' ) . '</td></tr>' ;
2015-06-29 06:28:04 +02:00
2019-10-11 14:09:26 +02:00
print " </table> " ;
2023-12-11 10:00:24 +01:00
print $form -> buttonsSaveCancel ( " Save " , '' , array (), false , 'reposition' );
2020-04-07 14:06:08 +02:00
print '<br>' ;
2017-09-06 11:39:30 +02:00
2015-06-29 06:28:04 +02:00
2020-04-07 14:06:08 +02:00
// Sales taxes (VAT, IRPF, ...)
2020-05-06 03:47:28 +02:00
print load_fiche_titre ( $langs -> trans ( " TypeOfSaleTaxes " ), '' , 'object_payment' );
2020-04-07 14:06:08 +02:00
2020-04-08 16:13:29 +02:00
print '<table class="noborder centpercent editmode">' ;
2019-10-11 14:09:26 +02:00
print '<tr class="liste_titre">' ;
2023-04-26 18:46:27 +02:00
print '<td class="titlefieldcreate">' . $langs -> trans ( " VATManagement " ) . '</td><td></td>' ;
2019-10-11 14:09:26 +02:00
print '<td class="right"> </td>' ;
print " </tr> \n " ;
2017-09-06 11:39:30 +02:00
2020-04-07 14:06:08 +02:00
// Main tax
2023-10-24 17:00:13 +02:00
print '<tr class="oddeven"><td><label><input type="radio" name="optiontva" id="use_vat" value="1"' . ( ! getDolGlobalString ( 'FACTURE_TVAOPTION' ) ? " " : " checked " ) . " > " . $langs -> trans ( " VATIsUsed " ) . " </label></td> " ;
2019-10-11 14:09:26 +02:00
print '<td colspan="2">' ;
2024-06-10 13:05:50 +02:00
$tooltiphelp = $langs -> trans ( " VATIsUsedDesc " );
2021-02-26 22:04:03 +01:00
if ( $mysoc -> country_code == 'FR' ) {
2024-06-10 13:05:50 +02:00
$tooltiphelp .= '<br><br><i>' . $langs -> trans ( " Example " ) . ': ' . $langs -> trans ( " VATIsUsedExampleFR " ) . " </i> " ;
2021-02-26 22:04:03 +01:00
}
2024-06-10 13:05:50 +02:00
print '<label for="use_vat">' . $form -> textwithpicto ( $langs -> trans ( " VATIsUsedStandard " ), $tooltiphelp ) . " </label> " ;
2019-10-11 14:09:26 +02:00
print " </td></tr> \n " ;
2017-09-06 11:39:30 +02:00
2015-06-29 06:28:04 +02:00
2023-10-24 17:00:13 +02:00
print '<tr class="oddeven"><td width="140"><label><input type="radio" name="optiontva" id="no_vat" value="0"' . ( ! getDolGlobalString ( 'FACTURE_TVAOPTION' ) ? " checked " : " " ) . " > " . $langs -> trans ( " VATIsNotUsed " ) . " </label></td> " ;
2019-10-11 14:09:26 +02:00
print '<td colspan="2">' ;
2020-03-28 15:20:26 +01:00
$tooltiphelp = '' ;
2021-02-26 22:04:03 +01:00
if ( $mysoc -> country_code == 'FR' ) {
$tooltiphelp = " <i> " . $langs -> trans ( " Example " ) . ': ' . $langs -> trans ( " VATIsNotUsedExampleFR " ) . " </i> \n " ;
}
2021-09-06 18:41:04 +02:00
print '<label for="no_vat">' . $form -> textwithpicto ( $langs -> trans ( " VATIsNotUsedDesc " ), $tooltiphelp ) . " </label> " ;
2019-10-11 14:09:26 +02:00
print " </td></tr> \n " ;
2018-03-06 11:54:05 +01:00
2019-10-11 14:09:26 +02:00
print " </table> " ;
2015-06-29 06:28:04 +02:00
2020-04-07 14:06:08 +02:00
// Second tax
print '<br>' ;
2020-04-08 16:13:29 +02:00
print '<table class="noborder centpercent editmode">' ;
2020-04-07 14:06:08 +02:00
print '<tr class="liste_titre">' ;
2023-04-26 18:46:27 +02:00
print '<td class="titlefieldcreate">' . $form -> textwithpicto ( $langs -> transcountry ( " LocalTax1Management " , $mysoc -> country_code ), $langs -> transcountry ( " LocalTax1IsUsedDesc " , $mysoc -> country_code )) . '</td><td></td>' ;
2020-04-07 14:06:08 +02:00
print '<td class="right"> </td>' ;
print " </tr> \n " ;
2021-02-26 22:04:03 +01:00
if ( $mysoc -> useLocalTax ( 1 )) {
2019-10-11 14:09:26 +02:00
// Note: When option is not set, it must not appears as set on on, because there is no default value for this option
2023-10-08 23:19:49 +02:00
print '<tr class="oddeven"><td><input type="radio" name="optionlocaltax1" id="lt1" value="localtax1on"' . (( getDolGlobalString ( 'FACTURE_LOCAL_TAX1_OPTION' ) == '1' || getDolGlobalString ( 'FACTURE_LOCAL_TAX1_OPTION' ) == " localtax1on " ) ? " checked " : " " ) . '> <label for="lt1">' . $langs -> transcountry ( " LocalTax1IsUsed " , $mysoc -> country_code ) . " </label></td> " ;
2019-10-11 14:09:26 +02:00
print '<td colspan="2">' ;
2020-03-28 15:20:26 +01:00
print '<div class="nobordernopadding">' ;
$tooltiphelp = $langs -> transcountry ( " LocalTax1IsUsedExample " , $mysoc -> country_code );
$tooltiphelp = ( $tooltiphelp != " LocalTax1IsUsedExample " ? " <i> " . $langs -> trans ( " Example " ) . ': ' . $langs -> transcountry ( " LocalTax1IsUsedExample " , $mysoc -> country_code ) . " </i> \n " : " " );
2021-09-06 18:41:04 +02:00
print $form -> textwithpicto ( $langs -> transcountry ( " LocalTax1IsUsedDesc " , $mysoc -> country_code ), $tooltiphelp );
2021-02-26 22:04:03 +01:00
if ( ! isOnlyOneLocalTax ( 1 )) {
2020-03-28 15:20:26 +01:00
print '<br><label for="lt1">' . $langs -> trans ( " LTRate " ) . '</label>: ' ;
2019-10-11 14:09:26 +02:00
$formcompany -> select_localtax ( 1 , $conf -> global -> MAIN_INFO_VALUE_LOCALTAX1 , " lt1 " );
}
2017-09-06 11:39:30 +02:00
2024-09-18 03:27:25 +02:00
$options = array ( $langs -> trans ( " CalcLocaltax1 " ) . ' ' . $langs -> trans ( " CalcLocaltax1Desc " ), $langs -> trans ( " CalcLocaltax2 " ) . ' - ' . $langs -> trans ( " CalcLocaltax2Desc " ), $langs -> trans ( " CalcLocaltax3 " ) . ' - ' . $langs -> trans ( " CalcLocaltax3Desc " ));
2015-06-29 06:28:04 +02:00
2020-03-28 15:20:26 +01:00
print '<br><label for="clt1">' . $langs -> trans ( " CalcLocaltax " ) . '</label>: ' ;
2024-09-18 03:27:25 +02:00
print $form -> selectarray ( " clt1 " , $options , getDolGlobalString ( 'MAIN_INFO_LOCALTAX_CALC1' ));
2020-03-28 15:20:26 +01:00
print " </div> " ;
2019-10-11 14:09:26 +02:00
print " </td></tr> \n " ;
2023-10-24 17:00:13 +02:00
print '<tr class="oddeven"><td><input type="radio" name="optionlocaltax1" id="nolt1" value="localtax1off"' . (( ! getDolGlobalString ( 'FACTURE_LOCAL_TAX1_OPTION' ) || getDolGlobalString ( 'FACTURE_LOCAL_TAX1_OPTION' ) == " localtax1off " ) ? " checked " : " " ) . '> <label for="nolt1">' . $langs -> transcountry ( " LocalTax1IsNotUsed " , $mysoc -> country_code ) . " </label></td> " ;
2019-10-11 14:09:26 +02:00
print '<td colspan="2">' ;
2020-03-28 15:20:26 +01:00
$tooltiphelp = $langs -> transcountry ( " LocalTax1IsNotUsedExample " , $mysoc -> country_code );
$tooltiphelp = ( $tooltiphelp != " LocalTax1IsNotUsedExample " ? " <i> " . $langs -> trans ( " Example " ) . ': ' . $langs -> transcountry ( " LocalTax1IsNotUsedExample " , $mysoc -> country_code ) . " </i> \n " : " " );
2021-09-06 18:41:04 +02:00
print $form -> textwithpicto ( $langs -> transcountry ( " LocalTax1IsNotUsedDesc " , $mysoc -> country_code ), $tooltiphelp );
2019-10-11 14:09:26 +02:00
print " </td></tr> \n " ;
2020-04-07 14:06:08 +02:00
} else {
2021-02-26 22:04:03 +01:00
if ( empty ( $mysoc -> country_code )) {
2024-08-17 02:02:32 +02:00
print '<tr class="oddeven nohover"><td class="" colspan="3">' . $countrynotdefined . '</td></tr>' ;
2020-04-07 14:06:08 +02:00
} else {
2021-07-12 10:45:18 +02:00
print '<tr class="oddeven nohover"><td class="" colspan="3"><span class="opacitymedium">' . $langs -> trans ( " NoLocalTaxXForThisCountry " , $langs -> transnoentitiesnoconv ( " Setup " ), $langs -> transnoentitiesnoconv ( " Dictionaries " ), $langs -> transnoentitiesnoconv ( " DictionaryVAT " ), $langs -> transnoentitiesnoconv ( " LocalTax1Management " )) . '</span></td></tr>' ;
2020-04-07 14:06:08 +02:00
}
2019-10-11 14:09:26 +02:00
}
2020-04-07 14:06:08 +02:00
print " </table> " ;
// Third tax system
print '<br>' ;
2020-04-08 16:13:29 +02:00
print '<table class="noborder centpercent editmode">' ;
2020-04-07 14:06:08 +02:00
print '<tr class="liste_titre">' ;
2023-04-26 18:46:27 +02:00
print '<td class="titlefieldcreate">' . $form -> textwithpicto ( $langs -> transcountry ( " LocalTax2Management " , $mysoc -> country_code ), $langs -> transcountry ( " LocalTax2IsUsedDesc " , $mysoc -> country_code )) . '</td><td></td>' ;
2020-04-07 14:06:08 +02:00
print '<td class="right"> </td>' ;
print " </tr> \n " ;
2021-02-26 22:04:03 +01:00
if ( $mysoc -> useLocalTax ( 2 )) {
2019-10-11 14:09:26 +02:00
// Note: When option is not set, it must not appears as set on on, because there is no default value for this option
2023-10-08 23:19:49 +02:00
print '<tr class="oddeven"><td><input type="radio" name="optionlocaltax2" id="lt2" value="localtax2on"' . (( getDolGlobalString ( 'FACTURE_LOCAL_TAX2_OPTION' ) == '1' || getDolGlobalString ( 'FACTURE_LOCAL_TAX2_OPTION' ) == " localtax2on " ) ? " checked " : " " ) . '> <label for="lt2">' . $langs -> transcountry ( " LocalTax2IsUsed " , $mysoc -> country_code ) . " </label></td> " ;
2015-06-29 06:28:04 +02:00
print '<td colspan="2">' ;
2020-03-28 15:20:26 +01:00
print '<div class="nobordernopadding">' ;
2020-12-05 14:46:29 +01:00
print '<label for="lt2">' . $langs -> transcountry ( " LocalTax2IsUsedDesc " , $mysoc -> country_code ) . " </label> " ;
2020-03-28 15:20:26 +01:00
$tooltiphelp = $langs -> transcountry ( " LocalTax2IsUsedExample " , $mysoc -> country_code );
$tooltiphelp = ( $tooltiphelp != " LocalTax2IsUsedExample " ? " <i> " . $langs -> trans ( " Example " ) . ': ' . $langs -> transcountry ( " LocalTax2IsUsedExample " , $mysoc -> country_code ) . " </i> \n " : " " );
2021-02-26 22:04:03 +01:00
if ( ! isOnlyOneLocalTax ( 2 )) {
2020-10-27 19:46:07 +01:00
print '<br><label for="lt2">' . $langs -> trans ( " LTRate " ) . '</label>: ' ;
2024-03-29 12:28:55 +01:00
$formcompany -> select_localtax ( 2 , getDolGlobalString ( 'MAIN_INFO_VALUE_LOCALTAX2' ), " lt2 " );
2019-10-11 14:09:26 +02:00
}
2024-09-18 03:27:25 +02:00
$options = array ( $langs -> trans ( " CalcLocaltax1 " ) . ' ' . $langs -> trans ( " CalcLocaltax1Desc " ), $langs -> trans ( " CalcLocaltax2 " ) . ' - ' . $langs -> trans ( " CalcLocaltax2Desc " ), $langs -> trans ( " CalcLocaltax3 " ) . ' - ' . $langs -> trans ( " CalcLocaltax3Desc " ));
2020-03-28 15:20:26 +01:00
print '<br><label for="clt2">' . $langs -> trans ( " CalcLocaltax " ) . '</label>: ' ;
2024-09-18 03:27:25 +02:00
print $form -> selectarray ( " clt2 " , $options , getDolGlobalString ( 'MAIN_INFO_LOCALTAX_CALC2' ));
2020-03-28 15:20:26 +01:00
print " </div> " ;
2015-06-29 06:28:04 +02:00
print " </td></tr> \n " ;
2023-10-24 17:00:13 +02:00
print '<tr class="oddeven"><td><input type="radio" name="optionlocaltax2" id="nolt2" value="localtax2off"' . (( ! getDolGlobalString ( 'FACTURE_LOCAL_TAX2_OPTION' ) || getDolGlobalString ( 'FACTURE_LOCAL_TAX2_OPTION' ) == " localtax2off " ) ? " checked " : " " ) . '> <label for="nolt2">' . $langs -> transcountry ( " LocalTax2IsNotUsed " , $mysoc -> country_code ) . " </label></td> " ;
2015-06-29 06:28:04 +02:00
print '<td colspan="2">' ;
2020-03-28 15:20:26 +01:00
print " <div> " ;
$tooltiphelp = $langs -> transcountry ( " LocalTax2IsNotUsedExample " , $mysoc -> country_code );
$tooltiphelp = ( $tooltiphelp != " LocalTax2IsNotUsedExample " ? " <i> " . $langs -> trans ( " Example " ) . ': ' . $langs -> transcountry ( " LocalTax2IsNotUsedExample " , $mysoc -> country_code ) . " </i> \n " : " " );
print " <label for= \" nolt2 \" > " . $form -> textwithpicto ( $langs -> transcountry ( " LocalTax2IsNotUsedDesc " , $mysoc -> country_code ), $tooltiphelp ) . " </label> " ;
print " </div> " ;
2015-06-29 06:28:04 +02:00
print " </td></tr> \n " ;
2020-04-07 14:06:08 +02:00
} else {
2021-02-26 22:04:03 +01:00
if ( empty ( $mysoc -> country_code )) {
2024-08-17 02:02:32 +02:00
print '<tr class="oddeven nohover"><td class="" colspan="3">' . $countrynotdefined . '</td></tr>' ;
2020-04-07 14:06:08 +02:00
} else {
2021-07-12 10:45:18 +02:00
print '<tr class="oddeven nohover"><td class="" colspan="3"><span class="opacitymedium">' . $langs -> trans ( " NoLocalTaxXForThisCountry " , $langs -> transnoentitiesnoconv ( " Setup " ), $langs -> transnoentitiesnoconv ( " Dictionaries " ), $langs -> transnoentitiesnoconv ( " DictionaryVAT " ), $langs -> transnoentitiesnoconv ( " LocalTax2Management " )) . '</span></td></tr>' ;
2020-04-07 14:06:08 +02:00
}
}
print " </table> " ;
2020-04-08 16:13:29 +02:00
// Tax stamp
2020-04-07 14:06:08 +02:00
print '<br>' ;
2020-04-08 16:13:29 +02:00
print '<table class="noborder centpercent editmode">' ;
2020-04-07 14:06:08 +02:00
print '<tr class="liste_titre">' ;
2023-04-26 18:46:27 +02:00
print '<td>' . $form -> textwithpicto ( $langs -> trans ( " RevenueStamp " ), $langs -> trans ( " RevenueStampDesc " )) . '</td><td></td>' ;
2020-04-07 14:06:08 +02:00
print '<td class="right"> </td>' ;
print " </tr> \n " ;
2021-02-26 22:04:03 +01:00
if ( $mysoc -> useRevenueStamp ()) {
2020-04-07 14:06:08 +02:00
// Note: When option is not set, it must not appears as set on on, because there is no default value for this option
2020-04-08 16:13:29 +02:00
print '<tr class="oddeven"><td>' ;
2020-04-07 14:06:08 +02:00
print $langs -> trans ( " UseRevenueStamp " );
print " </td> " ;
print '<td colspan="2">' ;
print $langs -> trans ( " UseRevenueStampExample " , $langs -> transnoentitiesnoconv ( " Setup " ), $langs -> transnoentitiesnoconv ( " Dictionaries " ), $langs -> transnoentitiesnoconv ( " DictionaryRevenueStamp " ));
print " </td></tr> \n " ;
} else {
2021-02-26 22:04:03 +01:00
if ( empty ( $mysoc -> country_code )) {
2024-08-17 02:02:32 +02:00
print '<tr class="oddeven nohover"><td class="" colspan="3">' . $countrynotdefined . '</td></tr>' ;
2020-04-07 14:06:08 +02:00
} else {
2021-07-12 10:45:18 +02:00
print '<tr class="oddeven nohover"><td class="" colspan="3"><span class="opacitymedium">' . $langs -> trans ( " NoLocalTaxXForThisCountry " , $langs -> transnoentitiesnoconv ( " Setup " ), $langs -> transnoentitiesnoconv ( " Dictionaries " ), $langs -> transnoentitiesnoconv ( " DictionaryRevenueStamp " ), $langs -> transnoentitiesnoconv ( " RevenueStamp " )) . '</span></td></tr>' ;
2020-04-07 14:06:08 +02:00
}
2019-10-11 14:09:26 +02:00
}
2017-09-06 11:39:30 +02:00
2020-04-07 14:06:08 +02:00
print " </table> " ;
2023-09-12 19:25:17 +02:00
// AADE webservices credentials, applicable only for Greece
2023-09-12 00:02:35 +02:00
if ( $mysoc -> country_code == 'GR' ) {
2023-09-13 11:29:28 +02:00
print load_fiche_titre ( $langs -> trans ( " AADEWebserviceCredentials " ), '' , '' );
2023-09-12 19:25:17 +02:00
print '<table class="noborder centpercent editmode">' ;
print '<tr class="liste_titre">' ;
print '<td>' . $langs -> trans ( " AccountParameter " ) . '</td>' ;
2025-01-24 13:12:48 +01:00
print '<td></td>' ;
2023-09-12 19:25:17 +02:00
print '<td></td>' ;
print " </tr> \n " ;
print '<tr class="oddeven"><td>' ;
print '<span class="titlefield fieldrequired">' . $langs -> trans ( " MYDATA_AADE_USER " ) . '</span></td><td>' ;
2023-09-13 11:29:28 +02:00
print '<input class="minwidth300" type="text" name="MYDATA_AADE_USER" value="' . getDolGlobalString ( 'MYDATA_AADE_USER' ) . '"' ;
2023-09-12 19:25:17 +02:00
print '</td><td></td></tr>' ;
print '<tr class="oddeven"><td>' ;
print '<span class="titlefield fieldrequired">' . $langs -> trans ( " MYDATA_AADE_KEY " ) . '</span></td><td>' ;
2023-10-23 19:17:34 +02:00
print '<input class="minwidth300" type="text" name="MYDATA_AADE_KEY" value="' . getDolGlobalString ( 'MYDATA_AADE_KEY' ) . '"' ;
2023-09-12 19:25:17 +02:00
print '</td><td></td></tr>' ;
print '<tr class="oddeven"><td>' ;
print '<span class="titlefield fieldrequired">' . $langs -> trans ( " AADE_WEBSERVICE_USER " ) . '</span></td><td>' ;
2023-09-13 11:29:28 +02:00
print '<input class="minwidth300" type="text" name="AADE_WEBSERVICE_USER" value="' . getDolGlobalString ( 'AADE_WEBSERVICE_USER' ) . '"' ;
2023-09-12 19:25:17 +02:00
print '</td><td></td></tr>' ;
print '<tr class="oddeven"><td>' ;
print '<span class="titlefield fieldrequired">' . $langs -> trans ( " AADE_WEBSERVICE_KEY " ) . '</span></td><td>' ;
2023-09-13 11:29:28 +02:00
print '<input class="minwidth300" type="text" name="AADE_WEBSERVICE_KEY" value="' . getDolGlobalString ( 'AADE_WEBSERVICE_KEY' ) . '"' ;
2023-09-12 19:25:17 +02:00
print '</td><td></td></tr>' ;
print '<br>' ;
print " </table> " ;
2023-09-12 00:02:35 +02:00
}
2023-12-11 10:00:24 +01:00
print $form -> buttonsSaveCancel ( " Save " , '' , array (), false , 'reposition' );
2015-06-29 06:28:04 +02:00
2019-10-11 14:09:26 +02:00
print '</form>' ;
2015-06-29 06:28:04 +02:00
2006-08-12 17:32:57 +02:00
2018-07-28 17:26:56 +02:00
// End of page
2011-08-27 16:24:16 +02:00
llxFooter ();
2012-03-23 00:51:38 +01:00
$db -> close ();