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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
769d1d42
Commit
769d1d42
authored
18 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Ajout gestion des triggers suivants:
ORDER_CREATE ORDER_SUPPLIER_CREATE ORDER_VALIDATE ORDER_SUPPLIER_VALIDATE
parent
ad6494eb
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/fourn/fournisseur.commande.class.php
+38
-30
38 additions, 30 deletions
htdocs/fourn/fournisseur.commande.class.php
with
38 additions
and
30 deletions
htdocs/fourn/fournisseur.commande.class.php
+
38
−
30
View file @
769d1d42
...
@@ -259,8 +259,9 @@ class CommandeFournisseur extends Commande
...
@@ -259,8 +259,9 @@ class CommandeFournisseur extends Commande
}
}
/**
/**
* Annule la commande
* \brief Annule la commande
* L'annulation se fait aprs la validation
* \param user Utilisateur qui demande annulation
* \remarks L'annulation se fait aprs la validation
*/
*/
function
Cancel
(
$user
)
function
Cancel
(
$user
)
{
{
...
@@ -268,7 +269,6 @@ class CommandeFournisseur extends Commande
...
@@ -268,7 +269,6 @@ class CommandeFournisseur extends Commande
$result
=
0
;
$result
=
0
;
if
(
$user
->
rights
->
fournisseur
->
commande
->
annuler
)
if
(
$user
->
rights
->
fournisseur
->
commande
->
annuler
)
{
{
$statut
=
6
;
$statut
=
6
;
$sql
=
"UPDATE "
.
MAIN_DB_PREFIX
.
"commande_fournisseur SET fk_statut = "
.
$statut
;
$sql
=
"UPDATE "
.
MAIN_DB_PREFIX
.
"commande_fournisseur SET fk_statut = "
.
$statut
;
...
@@ -278,18 +278,26 @@ class CommandeFournisseur extends Commande
...
@@ -278,18 +278,26 @@ class CommandeFournisseur extends Commande
{
{
$result
=
0
;
$result
=
0
;
$this
->
log
(
$user
,
$statut
,
time
());
$this
->
log
(
$user
,
$statut
,
time
());
// Appel des triggers
include_once
(
DOL_DOCUMENT_ROOT
.
"/interfaces.class.php"
);
$interface
=
new
Interfaces
(
$this
->
db
);
$result
=
$interface
->
run_triggers
(
'ORDER_SUPPLIER_VALIDATE'
,
$this
,
$user
,
$langs
,
$conf
);
// Fin appel triggers
return
1
;
}
}
else
else
{
{
dolibarr_syslog
(
"CommandeFournisseur::Cancel Error -1"
);
dolibarr_syslog
(
"CommandeFournisseur::Cancel Error -1"
);
$result
=
-
1
;
return
-
1
;
}
}
}
}
else
else
{
{
dolibarr_syslog
(
"CommandeFournisseur::Cancel Not Authorized"
);
dolibarr_syslog
(
"CommandeFournisseur::Cancel Not Authorized"
);
return
-
1
;
}
}
return
$result
;
}
}
...
...
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