diff --git a/html/install.php b/html/install.php index b56adf76c..6ac3d2be3 100644 --- a/html/install.php +++ b/html/install.php @@ -161,6 +161,8 @@ content[205]=""; content[206]=""; content[207]=""; content[208]=""; +content[209]=""; +content[210]=""; @@ -181,7 +183,7 @@ if ( strpos($inc_path,";") != 0 ) { $new_path=$inc_path.':../../include:addon'; $os=1; /* $os is 1 for unix */ } -// Retrieve informations from the very screen +// Retrieve informations from the screen // $http=new HttpInput(); $db_user=$http->request("cuser","string", ""); @@ -194,6 +196,7 @@ $ctmp=$http->request("ctmp","string", "/tmp"); $cpath=$http->request("cpath","string", "/usr/bin"); $db_name=$http->request("cdbname", "string",""); $cadmin=$http->request("cadmin","string", "admin"); +$cpassword_admin=$http->request("cpassword_admin","string", "phpcompta"); $cadmin=strtolower($cadmin); //------------------------------------------------------------------------- // warn only if we can not write in include @@ -213,6 +216,36 @@ if ( is_writable ('install.php') == false ) { if (isset($_POST['save_config'])) { require_once NOALYSS_INCLUDE.'/lib/config_file.php'; + $err=0; + // check password and admin not empty + // + if ( strlen(trim($cpassword_admin))== 0 || + strlen(trim($cadmin))== 0 + ) { + echo '

'; + echo _('Le mot de passe du super admin et le login ne peuvent être vides'); + echo '

'; + $err++; + + } + + // check password and admin not containing quote or double quote + // + if ( strpos($cpassword_admin,'"') !== false + || strpos($cadmin,'"') !== false + || strpos($cpassword_admin,"'") !== false + || strpos($cadmin,"'") !== false + || strpos($cpassword_admin," ") !== false + || strpos($cadmin," ") !== false + || strpos($cadmin,"@mobile") !== false + ) { + echo '

'; + echo _('Le mot de passe du super admin et le superadmin ne peut pas contenir des guillemets ou espaces, ni @mobile'); + echo '

'; + $err++; + + } + // Try to connect , if it doesn't work that do not create the config file if ($multi=="N") { $cnx = new DatabaseCore($db_user, $db_password,'template1', $db_host, $db_port); @@ -222,13 +255,14 @@ if (isset($_POST['save_config'])) { // ----- // If conx successfull save the file or display it // ----- - if ( $cnx !== false ) { + if ( $err == 0 && $cnx !== false ) { echo '

'._('Important').'

'; - echo '

',_("Voici l'utilisateur et mot de passe de l'utilisateur administrateur de Noalyss , il a tous les droits et a accès à tout." + echo '

',_("Voici l'utilisateur et mot de passe de l'utilisateur administrateur de Noalyss , " + . " il a tous les droits et a accès à tout." . " Connectez-vous avec ses identifiants et changer le mot de passe dans préférence (en haut à droit)"), "

"; echo '

'._('Utilisateur administrateur'),' ',' ',$cadmin,'','

'; - echo '

',_('Mot de passe'),' phpcompta ','

'; + echo '

',_('Mot de passe'),' '.$cpassword_admin.' ','

'; // Create the db if (is_writable(NOALYSS_INCLUDE)) { $url=config_file_create($_POST,1,$os); @@ -256,7 +290,7 @@ if (isset($_POST['save_config'])) { echo ''; return; } - } else { + } elseif ($err == 0 && $cnx == false) { echo '

'; echo _('Impossible de se connecter à Postgresql, vérifiez les informations de connection'); echo '

'; @@ -270,6 +304,7 @@ if (isset($_POST['save_config'])) { // //------------------------------------------------------------------------ if ( ! file_exists(NOALYSS_INCLUDE.'/config.inc.php')) { + echo '

'._('Entrez les informations nécessaires à noalyss').'

'; echo '
'; require_once NOALYSS_INCLUDE.'/lib/config_file.php'; @@ -294,6 +329,7 @@ if ( ! file_exists(NOALYSS_INCLUDE.'/config.inc.php')) { // magic_quotes_runtime = Off // magic_quotes_sybase = Off // include_path +require_once NOALYSS_INCLUDE.'/config.inc.php'; require_once NOALYSS_INCLUDE.'/lib/config_file.php'; require_once NOALYSS_INCLUDE.'/class/database.class.php'; @@ -365,7 +401,7 @@ for ($m=0;$m<$nb_need_module;$m++) if ( ini_get("max_execution_time") < 60 ) { echo "
  • "; echo _('Avertissement').' : '.$failed; - echo ' ', + echo ' ', _("max_execution_time devrait être de 60 minimum"), ''; echo "
  • "; @@ -522,8 +558,9 @@ if ($account == 0 ) { $cn->execute_script(NOALYSS_INCLUDE."/sql/account_repository/constraint.sql"); /* update name administrator */ $cadmin=NOALYSS_ADMINISTRATOR; - $cn->exec_sql("update ac_users set use_login=$1,use_active=1 where use_id=1", - array(strtolower($cadmin))); + $cpassword_admin=NOALYSS_ADMIN_PASSWORD; + $cn->exec_sql("update ac_users set use_login=$1,use_pass=md5($2),use_active=1 where use_id=1", + array(strtolower($cadmin),$cpassword_admin)); $cn->commit($cn); @@ -617,11 +654,11 @@ if (defined("MULTI") && MULTI == 0) } } - $db->exec_sql("update ac_users set use_login=$1 where use_id=1", - array(strtolower(NOALYSS_ADMINISTRATOR))); + $db->exec_sql("update ac_users set use_login=$1,use_pass=2 where use_id=1", + array(strtolower(NOALYSS_ADMINISTRATOR),NOALYSS_ADMIN_PASSWORD)); echo '

    '._('Important').'

    '; echo '

    '._('Utilisateur administrateur'),' ',NOALYSS_ADMINISTRATOR,'

    '; - echo '

    ',_('Mot de passe par défaut à l\'installation'),' phpcompta','

    '; + echo "

    "; printf (" VOUS DEVEZ EFFACER CE FICHIER %s",__FILE__); echo "

    "; @@ -640,9 +677,12 @@ define ('ALLOWED',1); define ('ALLOWED_ADMIN',1); $rep=new Database(); -if (defined(NOALYSS_ADMINISTRATOR)) +if (defined("NOALYSS_ADMINISTRATOR") && defined ("NOALYSS_ADMIN_PASSWORD")) { - $rep->exec_sql("update ac_users set use_login=$1 where use_id=1", array(strtolower(NOALYSS_ADMINISTRATOR))); + $rep->exec_sql("update ac_users set use_login=$1 ,use_pass=md5($2) + where use_id=1", + array(strtolower(NOALYSS_ADMINISTRATOR), + NOALYSS_ADMIN_PASSWORD)); } Dossier::upgrade(); echo '

    '._('Important').'

    '; diff --git a/html/js/scripts.js b/html/js/scripts.js index ae36f0445..c3133e7e0 100644 --- a/html/js/scripts.js +++ b/html/js/scripts.js @@ -2193,6 +2193,9 @@ function filter_list(phrase, _id) { for (var r = 0; r < l_list.childNodes.length; r++) { var found = 0; + if (l_list.childNodes[r].nodeType != 1 ){ + continue; + } if (l_list.childNodes[r].childElementCount == 0) { ele = l_list.childNodes[r].innerHTML; diff --git a/include/class/acc_bilan.class.php b/include/class/acc_bilan.class.php index 76ec7b8bf..398a3eb81 100644 --- a/include/class/acc_bilan.class.php +++ b/include/class/acc_bilan.class.php @@ -258,9 +258,10 @@ class Acc_Bilan */ function get_request_get() { - $this->b_id=(isset($_GET['b_id']))?$_GET['b_id']:""; - $this->from=( isset ($_GET['from_periode']))?$_GET['from_periode']:-1; - $this->to=( isset ($_GET['to_periode']))?$_GET['to_periode']:-1; + $http=new \HttpInput(); + $this->b_id=$http->get("b_id","number",""); + $this->from=$http->get("from_periode","number",-1); + $this->to=$http->get("to_periode","number",-1); } /*!\brief load from the database the document data */ function load() @@ -501,7 +502,10 @@ class Acc_Bilan } $header_txt=header_txt($this->db); - + + if ($this->b_type == "rtf") { + $header_txt=convert_to_rtf($header_txt); + } while ( !feof($p_file) ) { $line_rtf=fgets($p_file); @@ -537,7 +541,8 @@ class Acc_Bilan if($ret[0]['acct_name']) { /* for rtf we have the string to put it in latin1 */ - $a = utf8_decode($ret[0]['acct_name']); + if ( $this->b_type != "rtf") { $a = utf8_decode($ret[0]['acct_name']);} + if ( $this->b_type == "rtf") { $a =convert_to_rtf($ret[0]['acct_name']);} } } } diff --git a/include/class/database.class.php b/include/class/database.class.php index 71dce9ccc..216d3f400 100644 --- a/include/class/database.class.php +++ b/include/class/database.class.php @@ -113,8 +113,11 @@ class Database extends DatabaseCore } /** - * \brief loop to apply all the path to a folder or - * a template + * \brief loop to apply all the path to a folder or a template + * Upgrade check if the folder $p_name needs to be upgrade thanks the variable DBVERSION + * and run all the SQL script named upgradeX.sql from the folder noalyss/include/sql/patch + * until X equal DBVERSION-1 + * * \param $p_name database name * */ @@ -142,8 +145,7 @@ class Database extends DatabaseCore echo "
  • Patching " . $p_name . " from the version " . $this->get_version() . " to $to "; - $this->execute_script(NOALYSS_INCLUDE . '/sql/patch/upgrade' . $i . '.sql'); - echo $succeed; + if (!DEBUG) ob_start(); @@ -214,9 +216,17 @@ class Database extends DatabaseCore $country = $this->get_value("select pr_value from parameter where pr_id='MY_COUNTRY'"); $this->execute_script(NOALYSS_INCLUDE . "/sql/patch/upgrade61." . $country . ".sql"); } + /** + * Bug in parm_code for FRANCE + */ + if ($i == 141 ) { + $country = $this->get_value("select pr_value from parameter where pr_id='MY_COUNTRY'"); + $this->execute_script(NOALYSS_INCLUDE . "/sql/patch/upgrade141." . $country . ".sql"); + } if (!DEBUG) ob_end_clean(); + } } echo ''; diff --git a/include/class/document_type.class.php b/include/class/document_type.class.php index 1a8357e20..92ffc823b 100644 --- a/include/class/document_type.class.php +++ b/include/class/document_type.class.php @@ -48,7 +48,7 @@ class Document_type { $sql = "select * from document_type where dt_id=$1"; $R = $this->db->exec_sql($sql, array($this->dt_id)); - if (count($R) == 0) return 1; + if ($this->db->count($R) == 0) return 1; $r = Database::fetch_array($R, 0); $this->dt_id = $r['dt_id']; $this->dt_value = $r['dt_value']; diff --git a/include/class/dossier.class.php b/include/class/dossier.class.php index 23705b168..ecd439e1a 100644 --- a/include/class/dossier.class.php +++ b/include/class/dossier.class.php @@ -330,7 +330,13 @@ class Dossier $cn->rollback(); } } - + /** + * Upgrade check if the folder ACCOUNT_REPOSITORY needs to be upgrade thanks the variable DBVERSIONREPO + * and run all the SQL script named ac-upgradeX.sql from the folder noalyss/include/sql/patch + * until X equal DBVERSIONREPO-1 + * After it will call the function apply_patch, remove_inexistant_user and clean_orphan_log for each folder + * + */ static function upgrade() { $rep=new Database(); @@ -405,5 +411,16 @@ class Dossier } } } + + /** + * Set the current dossier to $p_dossier + * @param numeric $p_dossier + */ + static function set_current($p_dossier) { + + put_global(["gDossier"=>$p_dossier]); + self::check(); + + } } diff --git a/include/class/periode.class.php b/include/class/periode.class.php index 734cdba41..16ca96d80 100644 --- a/include/class/periode.class.php +++ b/include/class/periode.class.php @@ -272,6 +272,7 @@ class Periode } catch (Exception $e) { + record_log($e->getMessage()." - ".$e->getCode()); record_log($e->getTraceAsString()); $this->cn->rollback(); throw $e; diff --git a/include/constant.php b/include/constant.php index e0330010b..a10f5bb39 100644 --- a/include/constant.php +++ b/include/constant.php @@ -85,7 +85,6 @@ $g_succeed=""; define ('SMALLX','ⵝ'); define ('BUTTONADD',"✚"); - define ('SVNINFO',NOALYSS_VERSION); if ( ! defined ('DEBUG')) { define ("DEBUG",false); @@ -108,7 +107,7 @@ if ( !defined ("NOALYSS_PACKAGE_REPOSITORY")) { if ( ! defined ("SYSINFO_DISPLAY")) { define ("SYSINFO_DISPLAY",TRUE); } -define ("DBVERSION",141); +define ("DBVERSION",143); define ("MONO_DATABASE",25); define ("DBVERSIONREPO",18); define ('NOTFOUND','--not found--'); diff --git a/include/contact.inc.php b/include/contact.inc.php index 06f76b540..f22661800 100644 --- a/include/contact.inc.php +++ b/include/contact.inc.php @@ -73,8 +73,8 @@ if ($low_action == "list") get("query","string",""); + echo _("Cherche ").HtmlInput::filter_table_form("contact_tb", '0,1,2,3,4,5,6', 1,"query",$a); $sel_card = new ISelect('cat'); $sel_card->value = $cn->make_array('select fd_id, fd_label from fiche_def ' . diff --git a/include/customer.inc.php b/include/customer.inc.php index 0bbc7c5c1..d42e835bf 100644 --- a/include/customer.inc.php +++ b/include/customer.inc.php @@ -77,7 +77,7 @@ if ($low_action == "list") $a=$http->get("query","string",""); echo _("Cherche ").HtmlInput::filter_table_form("tiers_tb", '0,1,2', 1,"query",$a); - $choice_cat=$http->request("choice_cat", "",1); + $choice_cat=$http->request("choice_cat", "string",1); if ( $choice_cat == 1 ) { diff --git a/include/impress_bilan.inc.php b/include/impress_bilan.inc.php index bde62b64b..89cca0051 100644 --- a/include/impress_bilan.inc.php +++ b/include/impress_bilan.inc.php @@ -36,51 +36,55 @@ global $g_user; //----------------------------------------------------- // Form //----------------------------------------------------- - +$http=new \HttpInput(); $bilan=new Acc_Bilan($cn); $bilan->get_request_get(); echo '
    '; -$exercice=(isset($_GET['exercice']))?$_GET['exercice']:$g_user->get_exercice(); +$exercice=$http->get("exercice","number",$g_user->get_exercice()); +//---------------------------------------------------------------- +// Verification +//---------------------------------------------------------------- if ( ! isset ($_GET['verif'])) { -/* - * Let you change the exercice - */ -echo '
    '._('Exercice').'';; -echo ''; -echo _('Choisissez un autre exercice'); -$ex=new Exercice($cn); -$wex=$ex->select('exercice',$exercice,' onchange="submit(this)"'); -echo $wex->input(); -echo dossier::hidden(); -echo HtmlInput::get_to_hidden(array('ac','type')); -echo ''; -echo '
    '; + /* + * Let you change the exercice + */ + echo '
    '._('Exercice').'';; + echo '
    '; + echo _('Choisissez un autre exercice'); + $ex=new Exercice($cn); + $wex=$ex->select('exercice',$exercice,' onchange="submit(this)"'); + echo $wex->input(); + echo dossier::hidden(); + echo HtmlInput::get_to_hidden(array('ac','type')); + echo '
    '; + echo '
    '; -$filter_year=" where p_exercice='".sql_string($exercice)."'"; -echo '
    '; -echo HtmlInput::hidden('type','bilan'); -echo dossier::hidden(); + $filter_year=" where p_exercice='".sql_string($exercice)."'"; + echo ''; + echo HtmlInput::hidden('type','bilan'); + echo dossier::hidden(); -// By default , show last day of exercice -if ($bilan->to == -1 ){ - $t_periode=new Periode($cn); - list($per_max,$per_min)=$t_periode->get_limit($exercice); - $bilan->to=$per_min->p_id; + // By default , show last day of exercice + if ($bilan->to == -1 ){ + $t_periode=new Periode($cn); + list($per_max,$per_min)=$t_periode->get_limit($exercice); + $bilan->to=$per_min->p_id; + } + echo $bilan->display_form ($filter_year); + echo ' '._('Attention : si le bilan n\'est pas équilibré.
    Vérifiez
      +
    • L\'affectation du résultat est fait
    • +
    • Vos comptes actifs ont un solde débiteur (sauf les comptes dit inversés)
    • +
    • les comptes passifs ont un solde créditeur (sauf les comptes dit inversés)
    • +
    + Utilisez la balance des comptes pour vérifier.').'
    '; + echo HtmlInput::submit('verif',_('Verification comptabilite')); + echo HtmlInput::get_to_hidden(array('ac','exercice')); + echo '
    '; } -echo $bilan->display_form ($filter_year); -echo ' '._('Attention : si le bilan n\'est pas équilibré.
    Vérifiez
      -
    • L\'affectation du résultat est fait
    • -
    • Vos comptes actifs ont un solde débiteur (sauf les comptes dit inversés)
    • -
    • les comptes passifs ont un solde créditeur (sauf les comptes dit inversés)
    • -
    - Utilisez la balance des comptes pour vérifier.').'
    '; -echo HtmlInput::submit('verif',_('Verification comptabilite')); -echo HtmlInput::get_to_hidden(array('ac','exercice')); -echo ''; -} - - +//---------------------------------------------------------------- +// Print +//---------------------------------------------------------------- if ( isset($_GET['verif'])) { $periode=new Periode($cn); @@ -95,7 +99,7 @@ if ( isset($_GET['verif'])) echo '
    '; echo dossier::hidden(); echo HtmlInput::get_to_hidden(array('exercice')); - echo HtmlInput::hidden('b_id',$_GET['b_id']); + echo HtmlInput::hidden('b_id',$bilan->b_id); echo HtmlInput::hidden('act','OTH:Bilan'); echo HtmlInput::hidden('from_periode',$bilan->from); @@ -107,4 +111,4 @@ if ( isset($_GET['verif'])) echo '
    '; echo '
    '; -?> + diff --git a/include/lib/ac_common.php b/include/lib/ac_common.php index d93463fc7..df4ae72e8 100644 --- a/include/lib/ac_common.php +++ b/include/lib/ac_common.php @@ -1347,4 +1347,22 @@ if(!function_exists('tracedebug')) { file_put_contents($tmp_file, $output, FILE_APPEND); } } -?> +/** + * encode the string for RTF, return a stringu + * @param $p_string string to convert + * @return string + */ +function convert_to_rtf($p_string) +{ + $result=""; + $p_string2=utf8_decode($p_string); + $nb_result=strlen($p_string2); + for ($i = 0 ; $i < $nb_result ; $i++ ){ + if (ord($p_string[$i]) < 127 ) { + $result.=$p_string[$i]; + } else { + $result.='\u'.ord($p_string[$i]).chr(92).chr(39).'3f'; + } + } + return $result; +} \ No newline at end of file diff --git a/include/lib/config_file.php b/include/lib/config_file.php index fcdb6021d..42587f287 100644 --- a/include/lib/config_file.php +++ b/include/lib/config_file.php @@ -105,6 +105,10 @@ function config_file_form($p_array=null) } $icdbname=new IText('cdbname'); $icdbname->value=$cdbname; + + $icpassword_admin=new IText('cpassword_admin'); + $icpassword_admin->value=$cpassword_admin; + require NOALYSS_TEMPLATE.'/template_config_form.php'; } /** @@ -156,6 +160,12 @@ function display_file_config($p_array,$from_setup=1,$p_os=1) print ("\r\n"); print ( 'define ("NOALYSS_ADMINISTRATOR","'.$cadmin.'");'); print ("\r\n"); + print ("// For changing the password of admin, go to preference or update in db"); + print ("\r\n"); + print ("// this password is only used when executing install.php "); + print ("\r\n"); + print ( 'define ("NOALYSS_ADMIN_PASSWORD","'.$cpassword_admin.'");'); + print ("\r\n"); print ( 'define ("LOCALE",'.$clocale.');'); print ("\r\n"); diff --git a/include/lib/html_input.class.php b/include/lib/html_input.class.php index 15156277d..f79048b58 100755 --- a/include/lib/html_input.class.php +++ b/include/lib/html_input.class.php @@ -950,25 +950,43 @@ class HtmlInput return $sel; } } - + /** + * + * * filter the rows in a table and keep the colored row in alternance + * @param dom_id $p_table_id table + * @param string $p_col , column to search example 0,1,2 + * @param int $start_row row to always keep (header) + * @param string $p_name name of the input field + * @param string $p_old_value search value sent by $_GET (or $_REQUEST) + * @return string HTML + */ static function filter_table_form($p_table_id, $p_col, $start_row, $p_name, $p_old_value) { $r=" - + + "; $r.=' '; return $r; } - + /** + * filter the rows in a table and keep the colored row in alternance + * @param dom_id $p_table_id table + * @param string $p_col , column to search example 0,1,2 + * @param int $start_row row to always keep (header) + * @return string HTML + */ static function filter_table($p_table_id, $p_col, $start_row) { $r=" - + + + "; @@ -984,8 +1002,8 @@ class HtmlInput { $r=""; $r.=''; - $r.=sprintf('', - $p_list_id,$p_list_id,$p_list_id); + $r.=sprintf('', + $p_list_id,$p_list_id,_("Recherche"),$p_list_id); $r.=sprintf('',$p_list_id,$p_list_id,$p_list_id); $r.=''; diff --git a/include/lib/icon_action.class.php b/include/lib/icon_action.class.php index 90cca74b5..9e4dedece 100644 --- a/include/lib/icon_action.class.php +++ b/include/lib/icon_action.class.php @@ -342,4 +342,18 @@ class Icon_Action $lock_cur); return $r; } + + /** + * Display a icon ON is $p_value == 1 otherwise OFF + * @param string $p_div id of element + * @param string $p_javascript + * @param string $p_style optionnal HTML code + * @param integer 0 or 1 , 0 means OFF and 1 means ON + * @return html string + */ + static function icon_onoff($p_id,$p_javascript,$p_style,$p_value) + { + if ( $p_value == 1 ) { return \Icon_Action::iconon($p_id, $p_javascript,$p_style);} + if ( $p_value == 0 ) { return \Icon_Action::iconoff($p_id, $p_javascript,$p_style);} + } } diff --git a/include/sql/patch/upgrade141.BE.sql b/include/sql/patch/upgrade141.BE.sql new file mode 100644 index 000000000..34478623e --- /dev/null +++ b/include/sql/patch/upgrade141.BE.sql @@ -0,0 +1,3 @@ +begin; +insert into version (val,v_description) values (142,'Bug dans PARM_POSTE'); +commit ; diff --git a/include/sql/patch/upgrade141.FR.sql b/include/sql/patch/upgrade141.FR.sql new file mode 100644 index 000000000..54ad59f50 --- /dev/null +++ b/include/sql/patch/upgrade141.FR.sql @@ -0,0 +1,5 @@ +begin; +update parm_poste set p_type='PAS' where p_value='40'; +update tmp_pcmn set pcm_type='PAS' where pcm_val like '40%'; +insert into version (val,v_description) values (142,'Bug dans PARM_POSTE'); +commit ; diff --git a/include/sql/patch/upgrade141.sql b/include/sql/patch/upgrade141.sql new file mode 100644 index 000000000..e69de29bb diff --git a/include/sql/patch/upgrade142.sql b/include/sql/patch/upgrade142.sql new file mode 100644 index 000000000..3afaed6c0 --- /dev/null +++ b/include/sql/patch/upgrade142.sql @@ -0,0 +1,43 @@ +begin; + +CREATE OR REPLACE FUNCTION comptaproc.find_pcm_type(pp_value account_type) + RETURNS text +AS $function$ +declare + str_type parm_poste.p_type%TYPE; + str_value parm_poste.p_type%TYPE; + nLength integer; +begin + str_value:=pp_value; + nLength:=length(str_value::text); + + while nLength > 0 loop + select p_type into str_type from parm_poste where p_value=str_value; + if FOUND then + raise info 'Type of %s is %s',str_value,str_type; + return str_type; + end if; + nLength:=nLength-1; + str_value:=substring(str_value::text from 1 for nLength)::account_type; + end loop; +-- Si non trouvé dans PARM_POSTE, prend le type du premier parent trouvé +-- + str_value := pp_value; + nLength:=length(str_value::text); + str_value:=substring(str_value::text from 1 for nLength)::account_type; + while nLength > 0 loop + select pcm_type into str_type from tmp_pcmn tp where pcm_val=str_value; + if FOUND then + raise info 'Type of %s is %s',str_value,str_type; + return str_type; + end if; + nLength:=nLength-1; + str_value:=substring(str_value::text from 1 for nLength)::account_type; + end loop; +-- si ni parent ou parm_poste alors return CON +return 'CON'; +end; +$function$ + LANGUAGE plpgsql; +insert into version (val,v_description) values (143,'Corrige function find_pcm_type'); +commit ; diff --git a/include/template/template_config_form.php b/include/template/template_config_form.php index 2e98740f9..455e9ff7f 100644 --- a/include/template/template_config_form.php +++ b/include/template/template_config_form.php @@ -26,6 +26,7 @@ * @brief * */ + ?>
    @@ -56,7 +57,16 @@ + + + + diff --git a/unit-test/create-dossier-test.sh b/unit-test/create-dossier-test.sh index 74eb39ac5..372e87440 100755 --- a/unit-test/create-dossier-test.sh +++ b/unit-test/create-dossier-test.sh @@ -1,9 +1,9 @@ #!/bin/bash DOSSIER_TEST=rel70dossier25 -FILE_TEST=dossiertest191124-2109.bin +FILE_TEST=dossiertest200318-1402.sql dropdb $DOSSIER_TEST createdb $DOSSIER_TEST -pg_restore -Fc --no-owner --no-privilege --verbose -d $DOSSIER_TEST db/$FILE_TEST +psql -X $DOSSIER_TEST < db/$FILE_TEST
    - input();?> + input();echo Icon_Action::infobulle(210)?> +
    + + + input();?> +