Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
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
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
bf51e343
Commit
bf51e343
authored
13 years ago
by
Jean Heimburger
Browse files
Options
Downloads
Patches
Plain Diff
Add trigger on order validate and cancel
parent
52c0678d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/commande/class/commande.class.php
+22
-2
22 additions, 2 deletions
htdocs/commande/class/commande.class.php
with
22 additions
and
2 deletions
htdocs/commande/class/commande.class.php
+
22
−
2
View file @
bf51e343
...
...
@@ -4,9 +4,10 @@
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011 Jean Heimburger <jean@tiaris.info>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU
*
General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
...
...
@@ -458,6 +459,15 @@ class Commande extends CommonObject
if
(
$this
->
db
->
query
(
$sql
))
{
// Appel des triggers
include_once
(
DOL_DOCUMENT_ROOT
.
"/core/class/interfaces.class.php"
);
$interface
=
new
Interfaces
(
$this
->
db
);
$result
=
$interface
->
run_triggers
(
'ORDER_CLOTURE'
,
$this
,
$user
,
$langs
,
$conf
);
if
(
$result
<
0
)
{
$error
++
;
$this
->
errors
=
$interface
->
errors
;
return
-
1
;
}
// Fin appel triggers
return
1
;
}
else
...
...
@@ -506,7 +516,17 @@ class Commande extends CommonObject
if
(
$result
<
0
)
{
$error
++
;
}
}
}
if
(
!
$error
)
{
// Appel des triggers
include_once
(
DOL_DOCUMENT_ROOT
.
"/core/class/interfaces.class.php"
);
$interface
=
new
Interfaces
(
$this
->
db
);
$result
=
$interface
->
run_triggers
(
'ORDER_CANCEL'
,
$this
,
$user
,
$langs
,
$conf
);
if
(
$result
<
0
)
{
$error
++
;
$this
->
errors
=
$interface
->
errors
;
}
// Fin appel triggers
}
if
(
!
$error
)
{
$this
->
statut
=-
1
;
...
...
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