Unpaid invoice launch fusion PDF action even if it is only search (with

enter keyboard input instead of lens click)
This commit is contained in:
Florian HENRY 2014-08-01 15:21:29 +02:00
parent 139dfa5b80
commit 44f06bef22
3 changed files with 4 additions and 2 deletions

View File

@ -5,6 +5,7 @@ English Dolibarr ChangeLog
***** ChangeLog for 3.5.5 compared to 3.5.4 *****
Fix: [ bug #1523 ] suite bug #1334 : filtre et ordre de tri conjoints ne s'appliquent pas.
Fix: Fusion PDF button on unpaid invoice is no more displayed
Fix: Unpaid invoice launch fusion PDF action even if it is only search (with enter keyboard input instead of lens click)
***** ChangeLog for 3.5.4 compared to 3.5.3 *****
Fix: Hide title of event when agenda module disabled.

View File

@ -37,6 +37,7 @@ $langs->load("bills");
$id = (GETPOST('facid','int') ? GETPOST('facid','int') : GETPOST('id','int'));
$action = GETPOST('action','alpha');
$option = GETPOST('option');
$builddoc_generatebutton=GETPOST('builddoc_generatebutton');
// Security check
if ($user->societe_id) $socid=$user->societe_id;
@ -50,7 +51,7 @@ if (! $user->rights->societe->client->voir || $socid) $diroutputpdf.='/private/'
* Action
*/
if ($action == "builddoc" && $user->rights->facture->lire && ! GETPOST('button_search'))
if ($action == "builddoc" && $user->rights->facture->lire && ! GETPOST('button_search') && !empty($builddoc_generatebutton))
{
if (is_array($_POST['toGenerate']))
{

View File

@ -499,7 +499,7 @@ class FormFile
// Button
$addcolumforpicto=($delallowed || $printer || $morepicto);
$out.= '<th align="center" colspan="'.($addcolumforpicto?'2':'1').'" class="formdocbutton liste_titre">';
$genbutton = '<input class="button" id="'.$forname.'_generatebutton"';
$genbutton = '<input class="button" id="'.$forname.'_generatebutton" name="'.$forname.'_generatebutton"';
$genbutton.= ' type="submit" value="'.$buttonlabel.'"';
if (! $allowgenifempty && ! is_array($modellist) && empty($modellist)) $genbutton.= ' disabled="disabled"';
$genbutton.= '>';