Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Advanced Ordernumbers for VirtueMart
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VirtueMart
Advanced Ordernumbers for VirtueMart
Commits
755234ac
Commit
755234ac
authored
9 years ago
by
Reinhold Kainhofer
Browse files
Options
Downloads
Patches
Plain Diff
V3.5: Fix invoice creation (VM core changed...)
parent
5d6bafdf
Branches
Branches containing commit
Tags
V3.5
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Makefile
+1
-1
1 addition, 1 deletion
Makefile
ordernumber.php
+10
-3
10 additions, 3 deletions
ordernumber.php
ordernumber.xml
+1
-1
1 addition, 1 deletion
ordernumber.xml
releases/plg_vmshopper_ordernumber_v3.5.zip
+0
-0
0 additions, 0 deletions
releases/plg_vmshopper_ordernumber_v3.5.zip
with
12 additions
and
5 deletions
Makefile
+
1
−
1
View file @
755234ac
BASE
=
ordernumber
BASE
=
ordernumber
PLUGINTYPE
=
vmshopper
PLUGINTYPE
=
vmshopper
VERSION
=
3.
4
VERSION
=
3.
5
PLUGINFILES
=
$(
BASE
)
.php
$(
BASE
)
.script.php
$(
BASE
)
.xml index.html
$(
BASE
)
/
PLUGINFILES
=
$(
BASE
)
.php
$(
BASE
)
.script.php
$(
BASE
)
.xml index.html
$(
BASE
)
/
...
...
This diff is collapsed.
Click to expand it.
ordernumber.php
+
10
−
3
View file @
755234ac
...
@@ -484,11 +484,18 @@ class plgVmShopperOrdernumber extends vmShopperPlugin {
...
@@ -484,11 +484,18 @@ class plgVmShopperOrdernumber extends vmShopperPlugin {
// Is order number customization enabled?
// Is order number customization enabled?
if
(
$this
->
params
->
get
(
'customize_invoice_number'
))
{
if
(
$this
->
params
->
get
(
'customize_invoice_number'
))
{
// check the default configuration
// check the default configuration
$orderstatusForInvoice
=
VmConfig
::
get
(
'inv_os'
,
array
());
$orderstatusForInvoice
=
VmConfig
::
get
(
'inv_os'
,
array
(
'C'
));
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
);
// For VM<3.0.12, the URL parameter is an int, for VM>=3.0.12, the URL param is a string/cmd
$invoice_pass
=
isset
(
$orderDetails
[
'order_create_invoice_pass'
])
?
$orderDetails
[
'order_create_invoice_pass'
]
:
1
;
$force_create_invoice
=
JFactory
::
getApplication
()
->
input
->
getCmd
(
'create_invoice'
,
-
1
);
if
(
is_numeric
(
$force_create_invoice
))
{
// numeric means we have the old behavor pre-3.0.12 => No invoice_pass to check
$invoice_pass
=
1
;
}
else
{
$invoice_pass
=
isset
(
$orderDetails
[
'order_create_invoice_pass'
])
?
$orderDetails
[
'order_create_invoice_pass'
]
:
'DO_NOT_CREATE_INVOICE'
;
}
if
(
in_array
(
$orderDetails
[
'order_status'
],
$orderstatusForInvoice
)
or
$pdfInvoice
==
1
or
$force_create_invoice
==
$invoice_pass
){
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
)
{
...
...
This diff is collapsed.
Click to expand it.
ordernumber.xml
+
1
−
1
View file @
755234ac
...
@@ -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.
4
</version>
<version>
3.
5
</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>
...
...
This diff is collapsed.
Click to expand it.
releases/plg_vmshopper_ordernumber_v3.5.zip
0 → 100644
+
0
−
0
View file @
755234ac
File added
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment