[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 03/05: Cosmetic and Ergonomy
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 03/05: Cosmetic and Ergonomy |
Date: |
Thu, 12 Aug 2021 17:11:21 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 8da3f5db5d88ab987ad8d3818884365603042162
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Thu Aug 12 16:13:14 2021 +0200
Cosmetic and Ergonomy
---
html/css/style-classic7.css | 7 ++++++-
include/class/acc_account_ledger.class.php | 1 +
include/class/acc_ledger.class.php | 2 +-
include/class/periode.class.php | 4 ++--
include/compta_ods.inc.php | 13 +++++++++----
include/operation_ods_new.inc.php | 8 +++++++-
6 files changed, 26 insertions(+), 9 deletions(-)
diff --git a/html/css/style-classic7.css b/html/css/style-classic7.css
index 3a882bf..8a1fcc8 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 8f34325..d19a1e2 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 1a1a79d..7f3fa72 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 3ad1250..316ca6c 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 4f5f090..83952b5 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( '<span class="warning">'.
+ _('Pas de journal disponible').
+ '</span>');
}
$ledger->id = ($ledger->id == -1) ? $first_ledger['jrn_def_id'] : $id_ledger;
@@ -95,12 +97,15 @@ elseif (isset($_POST['save']))
echo '<h2>'._("Opération enregistrée")._("Piece") .
h($ledger->pj) . '</h2>';
if (strcmp($ledger->pj, $_POST['e_pj']) != 0)
{
- echo '<h3 class="notice">' . _('Attention numéro pièce
existante, elle a du être adaptée') . '</h3>';
+ echo '<h3 class="notice">' . _('Attention numéro pièce
existante, elle a du être adaptée') .
+ '</h3>';
}
- printf('<a class="detail" style="display:inline"
href="javascript:modifyOperation(%d,%d)">%s</a><hr>', $jr_id, dossier::id(),
$ledger->internal);
+ printf('<a class="detail" style="display:inline"
href="javascript:modifyOperation(%d,%d)">%s</a><hr>',
+ $jr_id, dossier::id(), $ledger->internal);
// show feedback
- echo '<div id="jrn_name_div">'; echo '<h1 id="jrn_name"
style="display:inline">' . $ledger->get_name() . '</h1>'; echo '</div>';
+ echo '<div id="jrn_name_div">'; echo '<h1 id="jrn_name"
style="display:inline">' .
+ $ledger->get_name() . '</h1>'; echo '</div>';
echo $ledger->confirm($_POST, true);
// extourne
if (isset($_POST['reverse_ck']))
diff --git a/include/operation_ods_new.inc.php
b/include/operation_ods_new.inc.php
index aff4ab2..06d0ef5 100644
--- a/include/operation_ods_new.inc.php
+++ b/include/operation_ods_new.inc.php
@@ -41,6 +41,9 @@ $ledger->id = ($ledger->id == -1) ?
$first_ledger['jrn_def_id'] : $id_ledger;
if ( $g_user->check_jrn($ledger->id)=='X')
{
alert(_("Vous ne pouvez pas écrire dans ce journal, contactez votre
administrateur"));
+ echo '<span class="warning">'.
+ _("Vous ne pouvez pas écrire dans ce journal, contactez votre
administrateur").
+ '</span>';
return;
}
echo '<div class="content">';
@@ -68,7 +71,10 @@ if ( isset ($_GET['action']) && ! isset($_POST['correct'])
&& ! isset($correct)
}
}
$p_msg=(isset($p_msg))?$p_msg:"";
-print '<p class="notice">'.$p_msg.'</p>';
+if ( !empty ($p_msg))
+{
+ print '<span class="warning">'.$p_msg.'</span>';
+}
echo '<form method="post" class="print" onsubmit="return controleBalance();"
>';
echo dossier::hidden();
echo HtmlInput::request_to_hidden(array('ac','jr_optype'));
- [Noalyss-commit] [noalyss] branch master updated (07fedf5 -> c7bf320), Dany De Bontridder, 2021/08/12
- [Noalyss-commit] [noalyss] 03/05: Cosmetic and Ergonomy,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 01/05: Documentation, Dany De Bontridder, 2021/08/12
- [Noalyss-commit] [noalyss] 05/05: Purchase & Sale : check the payment date and improve tests for not deductible fee or VAT, Dany De Bontridder, 2021/08/12
- [Noalyss-commit] [noalyss] 04/05: Fix bug when searching for an accounting in a card, Dany De Bontridder, 2021/08/12
- [Noalyss-commit] [noalyss] 02/05: Bug : cannot add card , improve test, Dany De Bontridder, 2021/08/12