Skip to content
Snippets Groups Projects
Commit ef7c8b02 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

V1.11: Fix wrong use of JInput in invoice number generation

parent f835021d
Branches
Tags V1.11
No related merge requests found
BASE=ordernumber BASE=ordernumber
PLUGINTYPE=vmshopper PLUGINTYPE=vmshopper
VERSION=1.10 VERSION=1.11
PLUGINFILES=$(BASE).php $(BASE).script.php $(BASE).xml index.html PLUGINFILES=$(BASE).php $(BASE).script.php $(BASE).xml index.html
......
...@@ -187,7 +187,7 @@ class plgVmShopperOrdernumber extends vmShopperPlugin { ...@@ -187,7 +187,7 @@ class plgVmShopperOrdernumber extends vmShopperPlugin {
$orderstatusForInvoice = VmConfig::get('inv_os',array()); $orderstatusForInvoice = VmConfig::get('inv_os',array());
if(!is_array($orderstatusForInvoice)) $orderstatusForInvoice = array($orderstatusForInvoice); //for backward compatibility 2.0.8e if(!is_array($orderstatusForInvoice)) $orderstatusForInvoice = array($orderstatusForInvoice); //for backward compatibility 2.0.8e
$pdfInvoice = (int)VmConfig::get('pdf_invoice', 0); // backwards compatible $pdfInvoice = (int)VmConfig::get('pdf_invoice', 0); // backwards compatible
$force_create_invoice=JInput::getInt('create_invoice', 0); $force_create_invoice = JFactory::getApplication()->input->getInt('create_invoice', 0);
if ( in_array($orderDetails['order_status'],$orderstatusForInvoice) or $pdfInvoice==1 or $force_create_invoice==1 ){ if ( in_array($orderDetails['order_status'],$orderstatusForInvoice) or $pdfInvoice==1 or $force_create_invoice==1 ){
$nrtype = 1; /*invoice-nr*/ $nrtype = 1; /*invoice-nr*/
$fmt = $this->params->get ('invoice_number_format', "#"); $fmt = $this->params->get ('invoice_number_format', "#");
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<authorUrl>http://www.open-tools.net/</authorUrl> <authorUrl>http://www.open-tools.net/</authorUrl>
<copyright>Copyright (C) 2012-2014 Reinhold Kainhofer. All rights reserved.</copyright> <copyright>Copyright (C) 2012-2014 Reinhold Kainhofer. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-3.0.html GNU/GPLv3</license> <license>http://www.gnu.org/licenses/gpl-3.0.html GNU/GPLv3</license>
<version>1.10</version> <version>1.11</version>
<releaseDate>2014-08-31</releaseDate> <releaseDate>2014-08-31</releaseDate>
<releaseType>Minor update</releaseType> <releaseType>Minor update</releaseType>
<downloadUrl>http://www.open-tools.net/virtuemart-2-extensions/vm2-ordernumber-plugin.html</downloadUrl> <downloadUrl>http://www.open-tools.net/virtuemart-2-extensions/vm2-ordernumber-plugin.html</downloadUrl>
......
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment