Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
ce15103e
Commit
ce15103e
authored
8 years ago
by
Florian Azizian
Browse files
Options
Downloads
Patches
Plain Diff
FIX #5326 "visa instead of" is not write in history
parent
f759a47e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/manage_action.php
+6
-2
6 additions, 2 deletions
core/manage_action.php
modules/visa/visa_workflow.php
+17
-7
17 additions, 7 deletions
modules/visa/visa_workflow.php
with
23 additions
and
9 deletions
core/manage_action.php
+
6
−
2
View file @
ce15103e
...
@@ -393,6 +393,10 @@ else if(empty($_POST['values']) || !isset($_POST['action_id']) || empty($_POST['
...
@@ -393,6 +393,10 @@ else if(empty($_POST['values']) || !isset($_POST['action_id']) || empty($_POST['
require_once
(
"core"
.
DIRECTORY_SEPARATOR
.
"class"
.
DIRECTORY_SEPARATOR
.
"class_history.php"
);
require_once
(
"core"
.
DIRECTORY_SEPARATOR
.
"class"
.
DIRECTORY_SEPARATOR
.
"class_history.php"
);
$hist
=
new
history
();
$hist
=
new
history
();
$arr_res
=
explode
(
'#'
,
$res_action
[
'result'
]);
$arr_res
=
explode
(
'#'
,
$res_action
[
'result'
]);
if
(
!
is_array
(
$res_action
[
'history_msg'
])){
$res_action
[
'history_msg'
]
=
[
$res_action
[
'history_msg'
]];
}
for
(
$i
=
0
;
$i
<
count
(
$arr_res
);
$i
++
)
for
(
$i
=
0
;
$i
<
count
(
$arr_res
);
$i
++
)
{
{
if
(
!
empty
(
$arr_res
[
$i
]))
if
(
!
empty
(
$arr_res
[
$i
]))
...
@@ -407,9 +411,9 @@ else if(empty($_POST['values']) || !isset($_POST['action_id']) || empty($_POST['
...
@@ -407,9 +411,9 @@ else if(empty($_POST['values']) || !isset($_POST['action_id']) || empty($_POST['
}
}
//$what .= $label_action.'('._NUM.$arr_res[$i].') ';
//$what .= $label_action.'('._NUM.$arr_res[$i].') ';
$what
.
=
$label_action
;
$what
.
=
$label_action
;
if
(
isset
(
$res_action
[
'history_msg'
])
&&
!
empty
(
$res_action
[
'history_msg'
]))
if
(
isset
(
$res_action
[
'history_msg'
]
[
$i
]
)
&&
!
empty
(
$res_action
[
'history_msg'
]
[
$i
]
))
{
{
$what
.
=
$res_action
[
'history_msg'
];
$what
.
=
$res_action
[
'history_msg'
]
[
$i
]
;
}
}
$_SESSION
[
'info'
]
=
$what
.
' '
;
$_SESSION
[
'info'
]
=
$what
.
' '
;
$_SESSION
[
'cpt_info_basket'
]
=
0
;
$_SESSION
[
'cpt_info_basket'
]
=
0
;
...
...
This diff is collapsed.
Click to expand it.
modules/visa/visa_workflow.php
100644 → 100755
+
17
−
7
View file @
ce15103e
...
@@ -54,7 +54,7 @@ require_once "modules/visa/class/class_modules_tools.php";
...
@@ -54,7 +54,7 @@ require_once "modules/visa/class/class_modules_tools.php";
function
manage_empty_error
(
$arr_id
,
$history
,
$id_action
,
$label_action
,
$status
)
function
manage_empty_error
(
$arr_id
,
$history
,
$id_action
,
$label_action
,
$status
)
{
{
$db
=
new
Database
();
$db
=
new
Database
();
$result
=
''
;
$result
=
''
;
if
(
!
empty
(
$_SESSION
[
'stockCheckbox'
]))
{
if
(
!
empty
(
$_SESSION
[
'stockCheckbox'
]))
{
...
@@ -74,19 +74,29 @@ function manage_empty_error($arr_id, $history, $id_action, $label_action, $statu
...
@@ -74,19 +74,29 @@ function manage_empty_error($arr_id, $history, $id_action, $label_action, $statu
$sequence
=
$circuit_visa
->
getCurrentStep
(
$res_id
,
$coll_id
,
'VISA_CIRCUIT'
);
$sequence
=
$circuit_visa
->
getCurrentStep
(
$res_id
,
$coll_id
,
'VISA_CIRCUIT'
);
$stepDetails
=
array
();
$stepDetails
=
array
();
$stepDetails
=
$circuit_visa
->
getStepDetails
(
$res_id
,
$coll_id
,
'VISA_CIRCUIT'
,
$sequence
);
$stepDetails
=
$circuit_visa
->
getStepDetails
(
$res_id
,
$coll_id
,
'VISA_CIRCUIT'
,
$sequence
);
$message
=
''
;
$message
=
[]
;
//enables to process the visa if i am not the item_id
//enables to process the visa if i am not the item_id
if
(
$stepDetails
[
'item_id'
]
<>
$_SESSION
[
'user'
][
'UserId'
])
{
if
(
$stepDetails
[
'item_id'
]
<>
$_SESSION
[
'user'
][
'UserId'
])
{
$stmt
=
$db
->
query
(
"UPDATE listinstance SET process_date = CURRENT_TIMESTAMP "
$stmt
=
$db
->
query
(
"UPDATE listinstance SET process_date = CURRENT_TIMESTAMP "
.
" WHERE listinstance_id = ? AND item_mode = ? AND res_id = ? AND item_id = ? AND difflist_type = ?"
.
" WHERE listinstance_id = ? AND item_mode = ? AND res_id = ? AND item_id = ? AND difflist_type = ?"
,
array
(
$stepDetails
[
'listinstance_id'
],
$stepDetails
[
'item_mode'
],
$res_id
,
$stepDetails
[
'item_id'
],
'VISA_CIRCUIT'
));
,
array
(
$stepDetails
[
'listinstance_id'
],
$stepDetails
[
'item_mode'
],
$res_id
,
$stepDetails
[
'item_id'
],
'VISA_CIRCUIT'
));
$message
=
_VISA_BY
.
" "
.
$_SESSION
[
'user'
][
'UserId'
]
.
" "
.
_INSTEAD_OF
.
" "
.
$stepDetails
[
'item_id'
];
$stmt
=
$db
->
query
(
"SELECT firstname, lastname, user_id FROM users WHERE user_id IN (?)"
,
array
([
$_SESSION
[
'user'
][
'UserId'
],
$stepDetails
[
'item_id'
]]));
foreach
(
$stmt
as
$value
)
{
if
(
$value
[
'user_id'
]
==
$_SESSION
[
'user'
][
'UserId'
]){
$user1
=
$value
[
'firstname'
]
.
' '
.
$value
[
'lastname'
];
}
else
{
$user2
=
$value
[
'firstname'
]
.
' '
.
$value
[
'lastname'
];
}
}
$message
[]
=
" "
.
_VISA_BY
.
" "
.
$user1
.
" "
.
_INSTEAD_OF
.
" "
.
$user2
;
}
else
{
}
else
{
$stmt
=
$db
->
query
(
"UPDATE listinstance SET process_date = CURRENT_TIMESTAMP "
$stmt
=
$db
->
query
(
"UPDATE listinstance SET process_date = CURRENT_TIMESTAMP "
.
" WHERE listinstance_id = ? AND item_mode = ? AND res_id = ? AND item_id = ? AND difflist_type = ?"
.
" WHERE listinstance_id = ? AND item_mode = ? AND res_id = ? AND item_id = ? AND difflist_type = ?"
,
array
(
$stepDetails
[
'listinstance_id'
],
$stepDetails
[
'item_mode'
],
$res_id
,
$_SESSION
[
'user'
][
'UserId'
],
'VISA_CIRCUIT'
));
,
array
(
$stepDetails
[
'listinstance_id'
],
$stepDetails
[
'item_mode'
],
$res_id
,
$_SESSION
[
'user'
][
'UserId'
],
'VISA_CIRCUIT'
));
$message
[]
=
""
;
}
}
if
(
$circuit_visa
->
getCurrentStep
(
$res_id
,
$coll_id
,
'VISA_CIRCUIT'
)
==
$circuit_visa
->
nbVisa
(
$res_id
,
$coll_id
))
{
if
(
$circuit_visa
->
getCurrentStep
(
$res_id
,
$coll_id
,
'VISA_CIRCUIT'
)
==
$circuit_visa
->
nbVisa
(
$res_id
,
$coll_id
))
{
...
@@ -96,5 +106,5 @@ function manage_empty_error($arr_id, $history, $id_action, $label_action, $statu
...
@@ -96,5 +106,5 @@ function manage_empty_error($arr_id, $history, $id_action, $label_action, $statu
$result
.
=
$arr_id
[
$i
]
.
'#'
;
$result
.
=
$arr_id
[
$i
]
.
'#'
;
}
}
return
array
(
'result'
=>
$result
,
'history_msg'
=>
''
);
return
array
(
'result'
=>
$result
,
'history_msg'
=>
$message
);
}
}
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