'.$p_msg.'
'; +if ( !empty ($p_msg)) +{ + print ''.$p_msg.''; +} echo 'diff --git a/html/css/style-classic7.css b/html/css/style-classic7.css index 3a882bf8c..8a1fcc8e6 100644 --- a/html/css/style-classic7.css +++ b/html/css/style-classic7.css @@ -2592,11 +2592,16 @@ div.progressbar { * Warning */ span.warning { - color:red; + color:white; font-style: normal; font-weight: bold; background-color: #eddadd; padding:10px; + margin:2px; + animation-name: error_h2; + animation-duration: 4s; + animation-iteration-count: infinite; + display: block; } /**********************************************************************************************************************/ /* LI as list diff --git a/include/class/acc_account_ledger.class.php b/include/class/acc_account_ledger.class.php index 8f34325b6..d19a1e21a 100644 --- a/include/class/acc_account_ledger.class.php +++ b/include/class/acc_account_ledger.class.php @@ -677,6 +677,7 @@ class Acc_Account_Ledger { $l=new Acc_Ledger($this->db,$p_jrn); $row=$l->get_propertie(); + if ($l->get_type() != 'ODS') { return [];} if ( $row == null || strlen(trim($row['jrn_def_class_deb'])) == 0 ) return array(); $valid_account=explode(" ",$row['jrn_def_class_deb']); return $valid_account; diff --git a/include/class/acc_ledger.class.php b/include/class/acc_ledger.class.php index 1a1a79d58..7f3fa723e 100644 --- a/include/class/acc_ledger.class.php +++ b/include/class/acc_ledger.class.php @@ -254,7 +254,7 @@ class Acc_Ledger extends jrn_def_sql if ($per->is_open()==0) { - throw new Exception(_('PERIODE FERMEE')); + throw new Exception(_('PERIODE FERMEE')." $p_date "); } diff --git a/include/class/periode.class.php b/include/class/periode.class.php index 3ad125037..316ca6cef 100644 --- a/include/class/periode.class.php +++ b/include/class/periode.class.php @@ -397,9 +397,9 @@ class Periode $ret=$this->cn->exec_sql($sql, array($p_date)); $nb_periode=Database::num_row($ret); if ($nb_periode==0) - throw (new Exception('Aucune période trouvée', 101)); + throw (new Exception(_('Aucune période trouvée')." $p_date ", 101)); if ($nb_periode>1) - throw (new Exception("Trop de périodes trouvées $nb_periode pour $p_date", + throw (new Exception(sprintf(_("Trop de périodes trouvées %s pour %s"),$nb_periode,$p_date), 100)); $per=Database::fetch_result($ret, 0); $this->p_id=$per; diff --git a/include/compta_ods.inc.php b/include/compta_ods.inc.php index 4f5f0908e..83952b504 100644 --- a/include/compta_ods.inc.php +++ b/include/compta_ods.inc.php @@ -43,7 +43,9 @@ $ledger = new Acc_Ledger($cn, $id_ledger); $first_ledger = $ledger->get_first('ODS'); if ( empty ($first_ledger)) { - exit(_('Pas de journal disponible')); + exit( ''. + _('Pas de journal disponible'). + ''); } $ledger->id = ($ledger->id == -1) ? $first_ledger['jrn_def_id'] : $id_ledger; @@ -95,12 +97,15 @@ elseif (isset($_POST['save'])) echo '
'.$p_msg.'
'; +if ( !empty ($p_msg)) +{ + print ''.$p_msg.''; +} echo '