Fix: Some bugs on withdrawal rejects
This commit is contained in:
parent
8a90598b23
commit
5fe70e0bee
@ -12,6 +12,7 @@ English Dolibarr ChangeLog
|
|||||||
- Fix: Can't reset payment due date
|
- Fix: Can't reset payment due date
|
||||||
- Fix: Orderstoinvoice didn't act as expected when no order was checked
|
- Fix: Orderstoinvoice didn't act as expected when no order was checked
|
||||||
- Fix: Bad link to all proposals into Third party card if customer is prospect
|
- Fix: Bad link to all proposals into Third party card if customer is prospect
|
||||||
|
- Fix: Some bugs on withdrawal rejects
|
||||||
- Fix: [ bug #774 ] Bug on creating event with box "all day" crossed
|
- Fix: [ bug #774 ] Bug on creating event with box "all day" crossed
|
||||||
- Fix: [ bug #787 ] Invoice supplier box incorrect tooltip when delay on payment
|
- Fix: [ bug #787 ] Invoice supplier box incorrect tooltip when delay on payment
|
||||||
- Fix: [ bug #789 ] VAT not being calculated in POS
|
- Fix: [ bug #789 ] VAT not being calculated in POS
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -50,7 +50,7 @@ class RejetPrelevement
|
|||||||
$this->motifs = array();
|
$this->motifs = array();
|
||||||
$this->facturer = array();
|
$this->facturer = array();
|
||||||
|
|
||||||
$this->motifs[0] = $langs->trans("StatusMotif0");
|
$this->motifs[0] = ""; //$langs->trans("StatusMotif0");
|
||||||
$this->motifs[1] = $langs->trans("StatusMotif1");
|
$this->motifs[1] = $langs->trans("StatusMotif1");
|
||||||
$this->motifs[2] = $langs->trans("StatusMotif2");
|
$this->motifs[2] = $langs->trans("StatusMotif2");
|
||||||
$this->motifs[3] = $langs->trans("StatusMotif3");
|
$this->motifs[3] = $langs->trans("StatusMotif3");
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -50,29 +50,49 @@ if ($action == 'confirm_rejet')
|
|||||||
{
|
{
|
||||||
if ( GETPOST("confirm") == 'yes')
|
if ( GETPOST("confirm") == 'yes')
|
||||||
{
|
{
|
||||||
$daterej = mktime(2, 0, 0, GETPOST('remonth','int'), GETPOST('reday','int'), GETPOST('reyear','int'));
|
if (GETPOST('remonth','int'))
|
||||||
|
|
||||||
$lipre = new LignePrelevement($db, $user);
|
|
||||||
|
|
||||||
if ($lipre->fetch($id) == 0)
|
|
||||||
{
|
{
|
||||||
|
$daterej = mktime(2, 0, 0, GETPOST('remonth','int'), GETPOST('reday','int'), GETPOST('reyear','int'));
|
||||||
|
}
|
||||||
|
|
||||||
if (GETPOST('motif','alpha') > 0 && $daterej < time())
|
if (empty($daterej))
|
||||||
|
{
|
||||||
|
$error++;
|
||||||
|
setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("Date")),'errors');
|
||||||
|
}
|
||||||
|
|
||||||
|
elseif ($daterej > dol_now())
|
||||||
|
{
|
||||||
|
$error++;
|
||||||
|
$langs->load("error");
|
||||||
|
setEventMessage($langs->transnoentities("ErrorDateMustBeBeforeToday"),'errors');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (GETPOST('motif','alpha') == 0)
|
||||||
|
{
|
||||||
|
$error++;
|
||||||
|
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("RefusedReason")),'errors');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! $error )
|
||||||
|
{
|
||||||
|
$lipre = new LignePrelevement($db, $user);
|
||||||
|
|
||||||
|
if ($lipre->fetch($id) == 0)
|
||||||
|
|
||||||
{
|
{
|
||||||
$rej = new RejetPrelevement($db, $user);
|
$rej = new RejetPrelevement($db, $user);
|
||||||
|
|
||||||
$rej->create($user, $id, GETPOST('motif','alpha'), $daterej, $lipre->bon_rowid, GETPOST('facturer','int'));
|
$rej->create($user, $id, GETPOST('motif','alpha'), $daterej, $lipre->bon_rowid, GETPOST('facturer','int'));
|
||||||
|
|
||||||
header("Location: ligne.php?id=".$id);
|
header("Location: ligne.php?id=".$id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
}
|
||||||
dol_syslog("Motif : ".GETPOST('motif','alpha'));
|
else
|
||||||
dol_syslog("$daterej $time ");
|
{
|
||||||
header("Location: ligne.php?id=".$id."&action=rejet");
|
$action="rejet";
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -173,13 +193,13 @@ if ($id)
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
//Date
|
//Date
|
||||||
print '<tr><td class="valid">'.$langs->trans("RefusedData").'</td>';
|
print '<tr><td class="fieldrequired" class="valid">'.$langs->trans("RefusedData").'</td>';
|
||||||
print '<td colspan="2" class="valid">';
|
print '<td colspan="2" class="valid">';
|
||||||
print $form->select_date('','','','','',"confirm_rejet");
|
print $form->select_date('','','','','',"confirm_rejet");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
//Reason
|
//Reason
|
||||||
print '<tr><td class="valid">'.$langs->trans("RefusedReason").'</td>';
|
print '<tr><td class="fieldrequired" class="valid">'.$langs->trans("RefusedReason").'</td>';
|
||||||
print '<td class="valid">';
|
print '<td class="valid">';
|
||||||
print $form->selectarray("motif", $rej->motifs);
|
print $form->selectarray("motif", $rej->motifs);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -303,8 +323,9 @@ if ($id)
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->close();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -112,6 +112,7 @@ ErrorPhpCurlNotInstalled=L'extensió PHP CURL no es troba instal·lada, és indi
|
|||||||
ErrorFailedToAddToMailmanList=S'ha produït un error en intentar afegir un registre a la llista Mailman o base de dades SPIP
|
ErrorFailedToAddToMailmanList=S'ha produït un error en intentar afegir un registre a la llista Mailman o base de dades SPIP
|
||||||
ErrorNewVaueCantMatchOldValue=El Nou valor no pot ser igual al antic
|
ErrorNewVaueCantMatchOldValue=El Nou valor no pot ser igual al antic
|
||||||
ErrorFailedToValidatePasswordReset=No s'ha pogut restablir la contrasenya. És possible que aquest enllaç ja s'hagi utilitzat (aquest enllaç només es pot utilitzar una vegada). Si no és el cas prova de reiniciar el procés de restabliment de contrasenya des del principi.
|
ErrorFailedToValidatePasswordReset=No s'ha pogut restablir la contrasenya. És possible que aquest enllaç ja s'hagi utilitzat (aquest enllaç només es pot utilitzar una vegada). Si no és el cas prova de reiniciar el procés de restabliment de contrasenya des del principi.
|
||||||
|
ErrorDateMustBeBeforeToday=La data no pot ser superior a avui
|
||||||
|
|
||||||
# Warnings
|
# Warnings
|
||||||
WarningSafeModeOnCheckExecDir=Atenció, està activada l'opció PHP <b>safe_mode</b>, la comanda ha d'estar dins d'un directori declarat dins del paràmetre php <b>safe_mode_exec_dir</b>.
|
WarningSafeModeOnCheckExecDir=Atenció, està activada l'opció PHP <b>safe_mode</b>, la comanda ha d'estar dins d'un directori declarat dins del paràmetre php <b>safe_mode_exec_dir</b>.
|
||||||
|
|||||||
@ -116,6 +116,7 @@ ErrorPhpCurlNotInstalled=The PHP CURL is not installed, this is essential to tal
|
|||||||
ErrorFailedToAddToMailmanList=Failed to add record to Mailman list or SPIP base
|
ErrorFailedToAddToMailmanList=Failed to add record to Mailman list or SPIP base
|
||||||
ErrorNewVaueCantMatchOldValue=New value can't be equal to old one
|
ErrorNewVaueCantMatchOldValue=New value can't be equal to old one
|
||||||
ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process.
|
ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process.
|
||||||
|
ErrorDateMustBeBeforeToday=The date can not be greater than today
|
||||||
|
|
||||||
# Warnings
|
# Warnings
|
||||||
WarningMandatorySetupNotComplete=Mandatory setup parameters are not yet defined
|
WarningMandatorySetupNotComplete=Mandatory setup parameters are not yet defined
|
||||||
|
|||||||
@ -113,6 +113,7 @@ ErrorPhpCurlNotInstalled=La extensión PHP CURL no se encuentra instalada, es in
|
|||||||
ErrorFailedToAddToMailmanList=Ha ocurrido un error al intentar añadir un registro a la lista Mailman o base de datos SPIP
|
ErrorFailedToAddToMailmanList=Ha ocurrido un error al intentar añadir un registro a la lista Mailman o base de datos SPIP
|
||||||
ErrorNewVaueCantMatchOldValue=El nuevo valor no puede ser igual al antiguo
|
ErrorNewVaueCantMatchOldValue=El nuevo valor no puede ser igual al antiguo
|
||||||
ErrorFailedToValidatePasswordReset=No se ha podido restablecer la contraseña. Es posible que este enlace ya se haya utilizado (este enlace sólo puede usarse una vez). Si no es el caso, trate de reiniciar el proceso de restablecimiento de contraseña desde el principio.
|
ErrorFailedToValidatePasswordReset=No se ha podido restablecer la contraseña. Es posible que este enlace ya se haya utilizado (este enlace sólo puede usarse una vez). Si no es el caso, trate de reiniciar el proceso de restablecimiento de contraseña desde el principio.
|
||||||
|
ErrorDateMustBeBeforeToday=La fecha no puede ser superior a hoy
|
||||||
|
|
||||||
# Warnings
|
# Warnings
|
||||||
WarningMandatorySetupNotComplete=Los parámetros obligatorios de configuración no están todavía definidos
|
WarningMandatorySetupNotComplete=Los parámetros obligatorios de configuración no están todavía definidos
|
||||||
|
|||||||
@ -117,6 +117,7 @@ ErrorPhpCurlNotInstalled=L'extension PHP CURL n'est pas installée, ceci est ind
|
|||||||
ErrorFailedToAddToMailmanList=Echec de l'ajout à une liste Mailman ou base SPIP
|
ErrorFailedToAddToMailmanList=Echec de l'ajout à une liste Mailman ou base SPIP
|
||||||
ErrorNewVaueCantMatchOldValue=La nouvelle valeur ne peut être égale à l'ancienne
|
ErrorNewVaueCantMatchOldValue=La nouvelle valeur ne peut être égale à l'ancienne
|
||||||
ErrorFailedToValidatePasswordReset=Echec de la réinitialisation du mot de passe. Il est possible que ce lien ait déjà été utilisé (l'utilisation de ce lien ne fonctionne qu'une fois). Si ce n'est pas le cas, essayer de recommencer le processus de réinit de mot de passe depuis le début.
|
ErrorFailedToValidatePasswordReset=Echec de la réinitialisation du mot de passe. Il est possible que ce lien ait déjà été utilisé (l'utilisation de ce lien ne fonctionne qu'une fois). Si ce n'est pas le cas, essayer de recommencer le processus de réinit de mot de passe depuis le début.
|
||||||
|
ErrorDateMustBeBeforeToday=La date ne peut pas être supérieure à aujourd'hui
|
||||||
|
|
||||||
# Warnings
|
# Warnings
|
||||||
WarningMandatorySetupNotComplete=Les informations de configuration obligatoire doivent être renseignées
|
WarningMandatorySetupNotComplete=Les informations de configuration obligatoire doivent être renseignées
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user