From 30e08b05e01bb089836582b5b467727dba822a13 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 25 Jan 2018 20:57:41 +0000 Subject: [PATCH] Made recent invoice remembered in session. --- WEB-INF/templates/footer.tpl | 2 +- report.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 5d533bef..6c89a367 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.5.3786 | Copyright © Anuko | +  Anuko Time Tracker 1.17.5.3787 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/report.php b/report.php index cdfc69af..6cec0379 100644 --- a/report.php +++ b/report.php @@ -47,6 +47,8 @@ if ($user->isPluginEnabled('ps')) { if ($user->isPluginEnabled('iv')) { $cl_assign_invoice_select_option = $request->getParameter('assign_invoice_select_options', ($request->isPost() ? null : @$_SESSION['assign_invoice_select_option'])); $_SESSION['assign_invoice_select_option'] = $cl_assign_invoice_select_option; + $cl_recent_invoice_option = $request->getParameter('recent_invoice', ($request->isPost() ? null : @$_SESSION['recent_invoice_option'])); + $_SESSION['recent_invoice_option'] = $cl_recent_invoice_option; } // Use custom fields plugin if it is enabled. @@ -98,6 +100,7 @@ if ($client_id && $bean->getAttribute('chinvoice') && ('no_grouping' == $bean->g 'name'=>'recent_invoice', 'data'=>$recent_invoices, 'datakeys'=>array('id','name'), + 'value'=>$cl_recent_invoice_option, 'empty'=>array(''=>$i18n->getKey('dropdown.select_invoice')))); $form->addInput(array('type'=>'submit','name'=>'btn_assign','value'=>$i18n->getKey('button.submit'))); $smarty->assign('use_assign_to_invoice', true); -- 2.20.1