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