Cosmetic and Ergonomy
This commit is contained in:
parent
0e43f60267
commit
8da3f5db5d
6 changed files with 26 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 ");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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']))
|
||||
|
|
|
|||
|
|
@ -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'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue