Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kohinos-tav
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
agplv3
kohinos-tav
Commits
83263ff2
Commit
83263ff2
authored
Dec 21, 2023
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
as caissier exclude reconversions from prestataire total transactions calculation
parent
f8d3edff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
PrestatairesController.php
src/Controller/PrestatairesController.php
+6
-2
caissier_get_last_transactions.html.twig
...ohinos/tav/block/caissier_get_last_transactions.html.twig
+1
-1
No files found.
src/Controller/PrestatairesController.php
View file @
83263ff2
...
@@ -148,7 +148,8 @@ class PrestatairesController extends FrontController
...
@@ -148,7 +148,8 @@ class PrestatairesController extends FrontController
}
}
/**
/**
* Get the total transactions amount towards the Prestataire since the last time it was fetched
* Get the total transactions amount towards the Prestataire since the last time it was fetched.
* Exclude Reconversions from calculation.
*
*
* @Route("/prestataires/get_last_transactions", name="get_presta_last_transactions")
* @Route("/prestataires/get_last_transactions", name="get_presta_last_transactions")
* @IsGranted({"ROLE_CAISSIER", "ROLE_PRESTATAIRE"})
* @IsGranted({"ROLE_CAISSIER", "ROLE_PRESTATAIRE"})
...
@@ -177,7 +178,10 @@ class PrestatairesController extends FrontController
...
@@ -177,7 +178,10 @@ class PrestatairesController extends FrontController
$total_amount
=
0
;
$total_amount
=
0
;
foreach
(
$flux
as
$flux_item
)
{
foreach
(
$flux
as
$flux_item
)
{
$total_amount
+=
$flux_item
->
getMontant
();
// Exclude reconversions from calculation
if
(
$flux_item
->
getType
()
!=
"reconversion_prestataire"
)
{
$total_amount
+=
$flux_item
->
getMontant
();
}
}
}
// Set now as this presta last export date
// Set now as this presta last export date
...
...
templates/themes/kohinos/tav/block/caissier_get_last_transactions.html.twig
View file @
83263ff2
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
{%
block
blockcontent
%}
{%
block
blockcontent
%}
{%
set
datetime_last_export
=
getPrestaLastTransactionsExportDate
()
%}
{%
set
datetime_last_export
=
getPrestaLastTransactionsExportDate
()
%}
<p>
Récupérer le montant total des transactions depuis le
<b>
{{
datetime_last_export
}}
</b></p>
<p>
Récupérer le montant total des transactions
(hors reconversions)
depuis le
<b>
{{
datetime_last_export
}}
</b></p>
<a
class=
'btn btn-xs btn-primary mt-2'
href=
'
{{
path
(
'get_presta_last_transactions'
)
}}
'
>
<a
class=
'btn btn-xs btn-primary mt-2'
href=
'
{{
path
(
'get_presta_last_transactions'
)
}}
'
>
{{
'Exporter'
|
trans
}}
{{
'Exporter'
|
trans
}}
</a>
</a>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment