Commit 2ddf9592 by Julien Jorry

Update 2.4.1 : fix error in virement form when no donation is configured

parent 3d670cee
# Update v2.4.0 (2022-03-?)
# Update v2.4.1 (2022-05-06)
- Fix erreur en virement si don non paramétrer
- Fix config swiftmailer en dev (technical)
- Fix monnaie papier nantie : arrondir, pas de virgule possible
- Fix de l'installation du Kohinos qui renvoyait une erreur
- Fix Alertes email à chaque transaction ?
- HelloAsso : fix error in synchronisation
# Update v2.4.0 (2022-04-20)
- HELLOASSO MODULE
- Gestion de dons (pour las adherents et prestatataires, pour l'achat et la cotisation)
......
2.4.0
\ No newline at end of file
2.4.1
\ No newline at end of file
......@@ -130,7 +130,11 @@ function showConfirmTransactionModal(div, form, montant, don, destinataire = nul
// Set data in modal
message.find('.montant_transaction').text(montant)
message.find('.montant_don').text(don)
if (parseFloat(don) > 0) {
message.find('.montant_don').text(don)
} else {
message.find('.div_don').html('')
}
if (destinataire != null) {
message.find('.nom_destinataire').text(destinataire)
}
......@@ -207,7 +211,11 @@ jQuery(document).ready(function() {
mySlider.slider('setValue', this.value)
$("span.achat_monnaie_montant_choisi").text(this.value + ' €')
var valuetotal = parseFloat(this.value) + parseFloat($("input:text[name='formAchatMonnaieAdherent[don][montant]']").val().replace(",", "."))
if ($("input:text[name='formAchatMonnaieAdherent[don][montant]']").length) {
var valuetotal = parseFloat(this.value) + parseFloat($("input:text[name='formAchatMonnaieAdherent[don][montant]']").val().replace(",", "."))
} else {
var valuetotal = parseFloat(this.value)
}
$("span.achat_monnaie_montant_total").text(valuetotal + ' €')
});
$("input:radio[name='formAchatMonnaieAConfirmerAdherent[montantradio]']").change(function() {
......@@ -217,7 +225,11 @@ jQuery(document).ready(function() {
mySlider.slider('setValue', this.value)
$("span.achat_monnaie_montant_choisi").text(this.value + ' €')
var valuetotal = parseFloat(this.value) + parseFloat($("input:text[name='formAchatMonnaieAConfirmerAdherent[don][montant]']").val().replace(",", "."))
if ($("input:text[name='formAchatMonnaieAConfirmerAdherent[don][montant]']").length) {
var valuetotal = parseFloat(this.value) + parseFloat($("input:text[name='formAchatMonnaieAConfirmerAdherent[don][montant]']").val().replace(",", "."))
} else {
var valuetotal = parseFloat(this.value)
}
$("span.achat_monnaie_montant_total").text(valuetotal + ' €')
});
......@@ -225,7 +237,11 @@ jQuery(document).ready(function() {
var value = event.value.newValue;
$("span.achat_monnaie_montant_choisi").text(value + ' €')
var valuetotal = parseFloat(value) + parseFloat($("input:text[name='formAchatMonnaieAdherent[don][montant]']").val().replace(",", "."))
if ($("input:text[name='formAchatMonnaieAdherent[don][montant]']").length) {
var valuetotal = parseFloat(value) + parseFloat($("input:text[name='formAchatMonnaieAdherent[don][montant]']").val().replace(",", "."))
} else {
var valuetotal = parseFloat(value)
}
$("span.achat_monnaie_montant_total").text(valuetotal + ' €')
});
......@@ -233,8 +249,12 @@ jQuery(document).ready(function() {
var value = event.value.newValue;
$("span.achat_monnaie_montant_choisi").text(value + ' €')
var valuetotal = parseFloat(value) + parseFloat($("input:text[name='formAchatMonnaieAConfirmerAdherent[don][montant]']").val().replace(",", "."))
$("span.achat_monnaie_montant_total").text(valuetotal + ' €')
if ($("input:text[name='formAchatMonnaieAConfirmerAdherent[don][montant]']").length) {
var valuetotal = parseFloat(value) + parseFloat($("input:text[name='formAchatMonnaieAConfirmerAdherent[don][montant]']").val().replace(",", "."))
} else {
var valuetotal = parseFloat(value)
}
$("span.achat_monnaie_montant_total").text(valuetotal + ' €')
});
$("input:text[name='formAchatMonnaiePrestataire[don][montant]']").change(function() {
......@@ -252,7 +272,11 @@ jQuery(document).ready(function() {
mySlider.slider('setValue', this.value)
$("span.achat_monnaie_montant_choisi").text(this.value + ' €')
var valuetotal = parseFloat(this.value) + parseFloat($("input:text[name='formAchatMonnaiePrestataire[don][montant]']").val().replace(",", "."))
if ($("input:text[name='formAchatMonnaiePrestataire[don][montant]']").length) {
var valuetotal = parseFloat(this.value) + parseFloat($("input:text[name='formAchatMonnaiePrestataire[don][montant]']").val().replace(",", "."))
} else {
var valuetotal = parseFloat(this.value)
}
$("span.achat_monnaie_montant_total").text(valuetotal + ' €')
});
$("input:radio[name='formAchatMonnaieAConfirmerPrestataire[montantradio]']").change(function() {
......@@ -262,7 +286,11 @@ jQuery(document).ready(function() {
mySlider.slider('setValue', this.value)
$("span.achat_monnaie_montant_choisi").text(this.value + ' €')
var valuetotal = parseFloat(this.value) + parseFloat($("input:text[name='formAchatMonnaieAConfirmerPrestataire[don][montant]']").val().replace(",", "."))
if ($("input:text[name='formAchatMonnaieAConfirmerPrestataire[don][montant]']").length) {
var valuetotal = parseFloat(this.value) + parseFloat($("input:text[name='formAchatMonnaieAConfirmerPrestataire[don][montant]']").val().replace(",", "."))
} else {
var valuetotal = parseFloat(this.value)
}
$("span.achat_monnaie_montant_total").text(valuetotal + ' €')
});
......@@ -270,16 +298,24 @@ jQuery(document).ready(function() {
var value = event.value.newValue;
$("span.achat_monnaie_montant_choisi").text(value + ' €')
var valuetotal = parseFloat(value) + parseFloat($("input:text[name='formAchatMonnaiePrestataire[don][montant]']").val().replace(",", "."))
$("span.achat_monnaie_montant_total").text(valuetotal + ' €')
if ($("input:text[name='formAchatMonnaiePrestataire[don][montant]']").length) {
var valuetotal = parseFloat(value) + parseFloat($("input:text[name='formAchatMonnaiePrestataire[don][montant]']").val().replace(",", "."))
} else {
var valuetotal = parseFloat(value)
}
$("span.achat_monnaie_montant_total").text(valuetotal + ' €')
});
$("form[name='formAchatMonnaieAConfirmerPrestataire'] input.achatmonnaie-montant-slider").slider().on('change', function(event){
var value = event.value.newValue;
$("span.achat_monnaie_montant_choisi").text(value + ' €')
var valuetotal = parseFloat(value) + parseFloat($("input:text[name='formAchatMonnaieAConfirmerPrestataire[don][montant]']").val().replace(",", "."))
$("span.achat_monnaie_montant_total").text(valuetotal + ' €')
if ($("input:text[name='formAchatMonnaieAConfirmerPrestataire[don][montant]']").length) {
var valuetotal = parseFloat(value) + parseFloat($("input:text[name='formAchatMonnaieAConfirmerPrestataire[don][montant]']").val().replace(",", "."))
} else {
var valuetotal = parseFloat(value)
}
$("span.achat_monnaie_montant_total").text(valuetotal + ' €')
});
......@@ -307,8 +343,11 @@ jQuery(document).ready(function() {
var montant_value = montant_field.value
// Get don montant
var don_field = $('#' + form.name + '_don_montant')[0]
var don_value = don_field.value
var don_value = 0;
if ($('#' + form.name + '_don_montant').length) {
var don_field = $('#' + form.name + '_don_montant')[0]
var don_value = don_field.value
}
showConfirmTransactionModal(div, form, montant_value, don_value, destinataire_name)
} else {
......@@ -345,8 +384,11 @@ jQuery(document).ready(function() {
var montant_value = montant_field.value
// Get don montant
var don_field = $('#' + form.name + '_don_montant')[0]
var don_value = don_field.value
var don_value = 0;
if ($('#' + form.name + '_don_montant').length) {
var don_field = $('#' + form.name + '_don_montant')[0]
var don_value = don_field.value
}
showConfirmTransactionModal(div, form, montant_value, don_value)
} else {
......@@ -359,28 +401,36 @@ jQuery(document).ready(function() {
// Set form moyen
$('#' + form.name + '_moyen')[0].value = 'cb'
$('#' + form.name + '_don_moyen')[0].value = 'cb'
if ($('#' + form.name + '_don_moyen').length) {
$('#' + form.name + '_don_moyen')[0].value = 'cb'
}
});
$('.achatHelloAssoSubmit').on('click', function(e){
var form = this.closest('form')
// Set form moyen
$('#' + form.name + '_moyen')[0].value = 'helloasso'
$('#' + form.name + '_don_moyen')[0].value = 'helloasso'
if ($('#' + form.name + '_don_moyen').length) {
$('#' + form.name + '_don_moyen')[0].value = 'helloasso'
}
});
$('.cotisationCBSubmit').on('click', function(e){
var form = this.closest('form')
// Set form moyen
$('#' + form.name + '_moyen')[0].value = 'cb'
$('#' + form.name + '_don_moyen')[0].value = 'cb'
if ($('#' + form.name + '_don_moyen').length) {
$('#' + form.name + '_don_moyen')[0].value = 'cb'
}
});
$('.cotisationHelloAssoSubmit').on('click', function(e){
var form = this.closest('form')
// Set form moyen
$('#' + form.name + '_moyen')[0].value = 'helloasso'
$('#' + form.name + '_don_moyen')[0].value = 'helloasso'
if ($('#' + form.name + '_don_moyen').length) {
$('#' + form.name + '_don_moyen')[0].value = 'helloasso'
}
});
$("input:radio[name='formAchatMonnaieAConfirmerAdherent[moyen]']").change(function() {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -3,7 +3,7 @@
"app": {
"js": [
"/build/runtime.6ad5c9da.js",
"/build/app.6263aa91.js"
"/build/app.7a755b3c.js"
],
"css": [
"/build/app.1fb37df4.css"
......
{
"build/app.css": "/build/app.1fb37df4.css",
"build/app.js": "/build/app.6263aa91.js",
"build/app.js": "/build/app.7a755b3c.js",
"build/admin.css": "/build/admin.5dc0eea7.css",
"build/admin.js": "/build/admin.8a6adf4b.js",
"build/runtime.js": "/build/runtime.6ad5c9da.js",
......
......@@ -15,7 +15,7 @@
<div class="confirmCotisation" style="display:none;">
<p>{{ 'Vous vous apprêtez à cotiser.'|trans }}</p>
<p> {{ 'Montant de votre cotisation :'|trans }} <b><span class="montant_transaction"></span> e{{ KOH_MLC_SYMBOL|default('MLC') }}</b></p>
<p> {{ 'Montant de votre don :'|trans }} <b><span class="montant_don"></span> &euro;</b></p>
<p class='div_don'> {{ 'Montant de votre don :'|trans }} <b><span class="montant_don"></span> &euro;</b></p>
</div>
<p>{{ 'Voulez-vous continuer ?'|trans }}</p>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment