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

V3.3: Update to changed VM invoice creation check

parent dce9cf3a
Branches
Tags V3.3
No related merge requests found
BASE=ordernumber BASE=ordernumber
PLUGINTYPE=vmshopper PLUGINTYPE=vmshopper
VERSION=3.2 VERSION=3.3
PLUGINFILES=$(BASE).php $(BASE).script.php $(BASE).xml index.html $(BASE)/ PLUGINFILES=$(BASE).php $(BASE).script.php $(BASE).xml index.html $(BASE)/
......
...@@ -488,7 +488,8 @@ class plgVmShopperOrdernumber extends vmShopperPlugin { ...@@ -488,7 +488,8 @@ class plgVmShopperOrdernumber extends vmShopperPlugin {
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 = JFactory::getApplication()->input->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 ){ $invoice_pass = isset($orderDetails['order_create_invoice_pass']) ? $orderDetails['order_create_invoice_pass'] : 1;
if ( in_array($orderDetails['order_status'],$orderstatusForInvoice) or $pdfInvoice==1 or $force_create_invoice==$invoice_pass ){
$invoicenr = $this->assignNumber((object)$orderDetails, 'invoice_number', "#"); $invoicenr = $this->assignNumber((object)$orderDetails, 'invoice_number', "#");
if ($invoicenr !== false) { if ($invoicenr !== false) {
// TODO: Check if ordernr already exists // TODO: Check if ordernr already exists
......
...@@ -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-2015 Reinhold Kainhofer. All rights reserved.</copyright> <copyright>Copyright (C) 2012-2015 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>3.2</version> <version>3.3</version>
<releaseDate>2015-05-23</releaseDate> <releaseDate>2015-05-23</releaseDate>
<releaseType>Minor update</releaseType> <releaseType>Minor update</releaseType>
<downloadUrl>http://open-tools.net/virtuemart/advanced-ordernumbers.html</downloadUrl> <downloadUrl>http://open-tools.net/virtuemart/advanced-ordernumbers.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