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
5025e388
Commit
5025e388
authored
6 years ago
by
Florian Azizian
Browse files
Options
Downloads
Patches
Plain Diff
FEAT #8306 reinit visa workflow if external signatory book refused to sign
parent
1012f80f
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
modules/visa/batch/batch_tools.php
+23
-23
23 additions, 23 deletions
modules/visa/batch/batch_tools.php
with
23 additions
and
23 deletions
modules/visa/batch/batch_tools.php
+
23
−
23
View file @
5025e388
<?php
/*
* Copyright 2008-2015 Maarch
*
* This file is part of Maarch Framework.
*
* Maarch Framework is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Maarch Framework is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Maarch Framework. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* Copyright Maarch since 2008 under licence GPLv3.
* See LICENCE.txt file at the root folder for more details.
* This file is part of Maarch software.
*
*/
/**
* @brief API to manage batchs
*
* @file
* @author
Laurent Giovannoni
<dev@maarch.org>
* @author <dev@maarch.org>
* @date $date$
* @version $Revision$
* @ingroup sendmail
*/
/**
...
...
@@ -51,7 +38,8 @@ function Bt_doQuery($dbConn, $queryTxt, $param=array(), $transaction=false)
$dbConn
->
query
(
'ROLLBACK'
);
}
Bt_exitBatch
(
104
,
'SQL Query error:'
.
$queryTxt
104
,
'SQL Query error:'
.
$queryTxt
);
}
$GLOBALS
[
'logger'
]
->
write
(
'SQL query:'
.
$queryTxt
,
'DEBUG'
);
...
...
@@ -201,9 +189,21 @@ function Bt_createAttachment($aArgs = [])
function
Bt_refusedSignedMail
(
$aArgs
=
[])
{
if
(
!
empty
(
$aArgs
[
'noteContent'
]))
{
$GLOBALS
[
'db'
]
->
query
(
"INSERT INTO notes (identifier, tablename, user_id, date_note, note_text, coll_id) VALUES (?, 'res_letterbox', 'superadmin', CURRENT_TIMESTAMP, ?, 'letterbox_coll')"
,
[
$aArgs
[
'resIdMaster'
],
$aArgs
[
'noteContent'
]]);
$GLOBALS
[
'db'
]
->
query
(
"INSERT INTO notes (identifier, tablename, user_id, date_note, note_text, coll_id) VALUES (?, 'res_letterbox', 'superadmin', CURRENT_TIMESTAMP, ?, 'letterbox_coll')"
,
[
$aArgs
[
'resIdMaster'
],
$aArgs
[
'noteContent'
]]
);
}
$GLOBALS
[
'db'
]
->
query
(
"UPDATE "
.
$aArgs
[
'tableAttachment'
]
.
" SET status = 'A_TRA' WHERE res_id = ?"
,
[
$aArgs
[
'resIdAttachment'
]]);
$GLOBALS
[
'db'
]
->
query
(
'UPDATE listinstance SET process_date = NULL WHERE res_id = ? AND difflist_type = ?'
,
[
$aArgs
[
'resIdMaster'
],
'VISA_CIRCUIT'
]);
$GLOBALS
[
'db'
]
->
query
(
"UPDATE res_letterbox SET status = '"
.
$aArgs
[
'refusedStatus'
]
.
"' WHERE res_id = ?"
,
[
$aArgs
[
'resIdMaster'
]]);
}
function
Bt_getVisaWorkflow
(
$aArgs
=
[])
{
$req
=
"SELECT listinstance_id, item_id, process_date, process_comment, requested_signature FROM listinstance WHERE res_id = ? AND difflist_type = 'VISA_CIRCUIT'"
;
$stmt
=
$GLOBALS
[
'db'
]
->
query
(
$req
,
array
(
$aArgs
[
'resId'
]));
return
$stmt
;
}
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