Przeglądaj źródła

Désactivation des boutons Payer/Rembourser lors du clic

Il était possible de double cliquer sur le bouton "Payer" lors du paiement des commandes par l'administrateur. Ce qui avait pour effet de payer deux fois la commande.
prodstable
Guillaume Bourgeois 6 lat temu
rodzic
commit
b426237960
1 zmienionych plików z 11 dodań i 10 usunięć
  1. +11
    -10
      backend/web/js/lechatdesnoisettes.js

+ 11
- 10
backend/web/js/lechatdesnoisettes.js Wyświetl plik

@@ -596,16 +596,17 @@ function chat_index_commandes_affiche_commande(id_pv, id_commande) {
function chat_index_commandes_boutons_paiement(id_pv, id_commande) {
// boutons paiement/remboursement
$('#point-vente-'+id_pv+' .payer, #point-vente-'+id_pv+' .rembourser').click(function() {
$.get(UrlManager.getBaseUrl()+'commande/paiement',{
id_commande: id_commande,
type: $(this).data('type'),
montant: $(this).data('montant')
}, function(data) {
$('#point-vente-'+id_pv+' .bloc-commande .td-paiement').html(data.html_statut_paiement) ;
$('#point-vente-'+id_pv+' a[data-id-commande='+id_commande+']').attr('data-commande',data.json_commande) ;
chat_index_commandes_affiche_commande(id_pv, id_commande) ;
chat_index_commandes_boutons_paiement(id_pv, id_commande) ;
}, 'json') ;
$(this).attr('disabled','disabled') ;
$.get(UrlManager.getBaseUrl()+'commande/paiement',{
id_commande: id_commande,
type: $(this).data('type'),
montant: $(this).data('montant')
}, function(data) {
$('#point-vente-'+id_pv+' .bloc-commande .td-paiement').html(data.html_statut_paiement) ;
$('#point-vente-'+id_pv+' a[data-id-commande='+id_commande+']').attr('data-commande',data.json_commande) ;
chat_index_commandes_affiche_commande(id_pv, id_commande) ;
chat_index_commandes_boutons_paiement(id_pv, id_commande) ;
}, 'json') ;
}) ;
}


Ładowanie…
Anuluj
Zapisz