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
157ff19b
Commit
157ff19b
authored
Dec 01, 2023
by
Damien Moulard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop'
parents
d3417d3c
f8d3edff
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
83 additions
and
50 deletions
+83
-50
services.yaml
config/services.yaml
+1
-1
5232-correction-pas-de-reversement-mona.sql
ext/scripts/5232-correction-pas-de-reversement-mona.sql
+24
-0
CRUDController.php
src/Controller/CRUD/CRUDController.php
+56
-47
encaisser_paiement.html.twig
...tes/themes/kohinos/tav/block/encaisser_paiement.html.twig
+1
-1
encaissement_page.html.twig
templates/themes/kohinos/tav/encaissement_page.html.twig
+1
-1
No files found.
config/services.yaml
View file @
157ff19b
...
...
@@ -460,7 +460,7 @@ services:
admin.flux.gerer
:
class
:
App\Admin\FluxAdmin
arguments
:
[
~
,
App\Entity\Flux
,
~
]
arguments
:
[
~
,
App\Entity\Flux
,
'
App\Controller\CRUD\CRUDController'
]
tags
:
-
name
:
sonata.admin
manager_type
:
orm
...
...
ext/scripts/5232-correction-pas-de-reversement-mona.sql
0 → 100644
View file @
157ff19b
--pour voir le compte de michel marques
select
aa
.
id
,
aa
.
balance
,
user
.
email
from
account_adherent
aa
join
user
on
user
.
email
=
'marques.michel1951@gmail.com'
where
user
.
adherent_id
=
aa
.
adherent_id
;
--permet de voir les derniers flux de typê reversement cotisation et vente emlc
select
type
,
montant
,
moyen
,
reference
,
role
,
adherent_id
,
cotisationinfos_id
,
user_id
,
created_at
from
flux
where
type
in
(
'vente_emlc_adherent'
,
'reversement_cotisation_adherent'
)
order
by
created_at
desc
limit
20
;
--idée :
--
-- Supprimer :
-- l'écriture de flux 22733fa2-fd02-427d-9cdd-36161157a9e9 (dernière étape)
-- l'operation_adherent associée à ce flux
-- l'operation_siege associée à ce flux
-- Enlever :
-- 5 mona sur la balance de account_siege
-- 5 mona sur la balance de Michel
delete
from
operation_adherent
where
flux_id
=
'22733fa2-fd02-427d-9cdd-36161157a9e9'
;
delete
from
operation_siege
where
flux_id
=
'22733fa2-fd02-427d-9cdd-36161157a9e9'
;
delete
from
flux
where
id
=
'22733fa2-fd02-427d-9cdd-36161157a9e9'
;
update
account_adherent
set
balance
=
balance
-
5
where
id
=
'3fe6e79a-1288-4fbd-ba33-0007b9c6de7f'
;
update
account_siege
set
balance
=
balance
-
5
where
currency
=
'emlc'
;
--Puis redéclencher le process de cotisation.
\ No newline at end of file
src/Controller/CRUD/CRUDController.php
View file @
157ff19b
...
...
@@ -7,6 +7,8 @@ use Sonata\AdminBundle\Datagrid\ProxyQueryInterface;
use
Symfony\Component\Form\FormRenderer
;
use
Symfony\Component\Form\FormView
;
use
Symfony\Component\HttpFoundation\RedirectResponse
;
use
Symfony\Component\HttpFoundation\Request
;
use
Symfony\Component\Security\Core\Exception\AccessDeniedException
;
class
CRUDController
extends
Controller
{
...
...
@@ -127,53 +129,60 @@ class CRUDController extends Controller
],
null
);
}
// /**
// * @inheritdoc
// */
// public function exportAction(Request $request)
// {
// $this->admin->checkAccess('export');
// $format = $request->get('format');
// // // NEXT_MAJOR: remove the check
// // if (!$this->has('sonata.admin.admin_exporter')) {
// // @trigger_error(
// // 'Not registering the exporter bundle is deprecated since version 3.14. You must register it to be able to use the export action in 4.0.',
// // \E_USER_DEPRECATED
// // );
// // $allowedExportFormats = (array) $this->admin->getExportFormats();
// // $class = (string) $this->admin->getClass();
// // $filename = sprintf(
// // 'export_%s_%s.%s',
// // strtolower((string) substr($class, strripos($class, '\\') + 1)),
// // date('Y_m_d_H_i_s', strtotime('now')),
// // $format
// // );
// // $exporter = $this->get('sonata.admin.exporter');
// // } else {
// $adminExporter = $this->get('sonata.admin.admin_exporter');
// $allowedExportFormats = $adminExporter->getAvailableFormats($this->admin);
// $filename = $adminExporter->getExportFilename($this->admin, $format);
// $exporter = $this->get('sonata.exporter.exporter');
// // }
// if (!\in_array($format, $allowedExportFormats, true)) {
// throw new \RuntimeException(sprintf(
// 'Export in format `%s` is not allowed for class: `%s`. Allowed formats are: `%s`',
// $format,
// $this->admin->getClass(),
// implode(', ', $allowedExportFormats)
// ));
// }
// return $exporter->getResponse(
// $format,
// $filename,
// $this->admin->getDataSourceIterator()
// );
// }
/**
* Export data to specified format.
*
* @throws AccessDeniedException If access is not granted
* @throws \RuntimeException If the export format is invalid
*
*/
public
function
exportAction
(
Request
$request
)
{
set_time_limit
(
300
);
//set php time limit to 5 minutes to make sure big exports can be done
$this
->
admin
->
checkAccess
(
'export'
);
$format
=
$request
->
get
(
'format'
);
// NEXT_MAJOR: remove the check
if
(
!
$this
->
has
(
'sonata.admin.admin_exporter'
))
{
@
trigger_error
(
'Not registering the exporter bundle is deprecated since version 3.14. You must register it to be able to use the export action in 4.0.'
,
\E_USER_DEPRECATED
);
$allowedExportFormats
=
(
array
)
$this
->
admin
->
getExportFormats
();
$class
=
(
string
)
$this
->
admin
->
getClass
();
$filename
=
sprintf
(
'export_%s_%s.%s'
,
strtolower
((
string
)
substr
(
$class
,
strripos
(
$class
,
'\\'
)
+
1
)),
date
(
'Y_m_d_H_i_s'
,
strtotime
(
'now'
)),
$format
);
$exporter
=
$this
->
get
(
'sonata.admin.exporter'
);
}
else
{
$adminExporter
=
$this
->
get
(
'sonata.admin.admin_exporter'
);
$allowedExportFormats
=
$adminExporter
->
getAvailableFormats
(
$this
->
admin
);
$filename
=
$adminExporter
->
getExportFilename
(
$this
->
admin
,
$format
);
$exporter
=
$this
->
get
(
'sonata.exporter.exporter'
);
}
if
(
!
\in_array
(
$format
,
$allowedExportFormats
,
true
))
{
throw
new
\RuntimeException
(
sprintf
(
'Export in format `%s` is not allowed for class: `%s`. Allowed formats are: `%s`'
,
$format
,
$this
->
admin
->
getClass
(),
implode
(
', '
,
$allowedExportFormats
)
));
}
return
$exporter
->
getResponse
(
$format
,
$filename
,
$this
->
admin
->
getDataSourceIterator
()
);
}
public
function
deleteAction
(
$id
)
{
...
...
templates/themes/kohinos/tav/block/encaisser_paiement.html.twig
View file @
157ff19b
{%
extends
'@kohinos/block/block_collapse.html.twig'
%}
{%
block
blocktitle
%}
<i
class=
"fa fa-shopping-basket mr-4"
></i>
{{
'Encaisser un paiement en Mon
naie Solidaire
'
|
trans
}}
<i
class=
"fa fa-shopping-basket mr-4"
></i>
{{
'Encaisser un paiement en Mon
A (Monnaie Alimentaire)
'
|
trans
}}
{%
endblock
blocktitle
%}
{%
block
blockcontent
%}
<a
class=
'btn btn-xs btn-primary mt-2'
href=
'
{{
path
(
'encaissement'
)
}}
'
>
...
...
templates/themes/kohinos/tav/encaissement_page.html.twig
View file @
157ff19b
...
...
@@ -14,7 +14,7 @@
<b>
{{
app.session.get
(
'_prestagere'
)
}}
</b>
</div>
<h2
class=
'text-center w-100 mt-4 mb-4'
>
{{
"Paiement en Mon
naie Solidaire
"
|
trans
}}
</h2>
<h2
class=
'text-center w-100 mt-4 mb-4'
>
{{
"Paiement en Mon
A
"
|
trans
}}
</h2>
{%
else
%}
<div
class=
"mt-3 payment-page-header"
>
<a
href=
'
{{
path
(
'encaissement'
)
}}
'
>
...
...
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