Fix: Error message as not visible
This commit is contained in:
parent
5ad665e633
commit
8655c29d09
@ -214,6 +214,8 @@ if ($_GET['action'] == 'create' || $_POST['action'] == 'confirm_paiement' || $_P
|
||||
if ($facture->type == 2) $title.=$langs->trans("EnterPaymentDueToCustomer");
|
||||
print_fiche_titre($title);
|
||||
|
||||
if ($errmsg) dol_htmloutput_errors($errmsg);
|
||||
|
||||
// Bouchon
|
||||
if ($facture->type == 2)
|
||||
{
|
||||
|
||||
@ -172,7 +172,7 @@ if ($_GET['action'] == 'new')
|
||||
$hselected = $h;
|
||||
$h++;
|
||||
|
||||
dol_fiche_head($head, $hselected, $langs->trans("Cheques"));
|
||||
print_fiche_titre($langs->trans("Cheques"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -423,7 +423,7 @@ else
|
||||
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
if ($_GET['action'] == 'new') dol_fiche_end();
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -143,7 +143,7 @@ class Paiement
|
||||
$this->total = price2num($this->total);
|
||||
|
||||
// Check parameters
|
||||
if ($this->total == 0) return -1; // On accepte les montants negatifs pour les rejets de prelevement
|
||||
if ($this->total == 0) return -1; // On accepte les montants negatifs pour les rejets de prelevement mais pas null
|
||||
|
||||
|
||||
$this->db->begin();
|
||||
@ -194,17 +194,12 @@ class Paiement
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->error();
|
||||
$this->error=$this->db->lasterror();
|
||||
dol_syslog(get_class($this).'::Create insert paiement error='.$this->error, LOG_ERR);
|
||||
$error++;
|
||||
}
|
||||
|
||||
// If option to add link to bank account is on
|
||||
|
||||
|
||||
|
||||
|
||||
if (! $error) // On accepte les montants negatifs
|
||||
if (! $error)
|
||||
{
|
||||
$this->db->commit();
|
||||
return $this->id;
|
||||
@ -325,6 +320,8 @@ class Paiement
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php');
|
||||
|
||||
dol_syslog("$user->id,$mode,$label,$accountid,$emetteur_nom,$emetteur_banque");
|
||||
|
||||
$acc = new Account($this->db);
|
||||
$acc->fetch($accountid);
|
||||
|
||||
|
||||
@ -84,7 +84,7 @@ function dol_include_once($relpath)
|
||||
function dol_require_once($relpath)
|
||||
{
|
||||
$res=false;
|
||||
|
||||
|
||||
// Forced to use file_exists otherwise there is a blank page
|
||||
//$res=@require_once(DOL_DOCUMENT_ROOT.$relpath);
|
||||
//if (! $res && defined('DOL_DOCUMENT_ROOT_ALT')) $res=@require_once(DOL_DOCUMENT_ROOT_ALT.$relpath);
|
||||
@ -127,7 +127,7 @@ function dol_buildpath($path,$mode=0)
|
||||
if (! file_exists(DOL_DOCUMENT_ROOT.$path)) $res = DOL_URL_ROOT_ALT.$path;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
@ -2060,6 +2060,7 @@ function dolibarr_print_error($db='',$error='')
|
||||
* renvoyer leur erreur par l'intermediaire de leur propriete "error".
|
||||
* @param db Database handler
|
||||
* @param error String or array of errors strings to show
|
||||
* @see dol_htmloutput_errors
|
||||
*/
|
||||
function dol_print_error($db='',$error='')
|
||||
{
|
||||
@ -3453,6 +3454,7 @@ function monthArrayOrSelected($selected=0)
|
||||
* @param mesgstring Error message
|
||||
* @param mesgarray Error messages array
|
||||
* @return html Return html output
|
||||
* @see dol_print_error
|
||||
*/
|
||||
function dol_htmloutput_errors($mesgstring='',$mesgarray='')
|
||||
{
|
||||
@ -3475,7 +3477,7 @@ function dol_htmloutput_errors($mesgstring='',$mesgarray='')
|
||||
{
|
||||
$ret++;
|
||||
print '<div class="error">';
|
||||
print $mesgstring;
|
||||
print $langs->trans($mesgstring);
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user