Bläddra i källkod

[Boutique] Commande : correctif erreur cagnotte obligatoire

feature/rotating_product
Guillaume Bourgeois 6 månader sedan
förälder
incheckning
b3f51b7116
2 ändrade filer med 9 tillägg och 2 borttagningar
  1. +2
    -2
      producer/views/order/order.php
  2. +7
    -0
      producer/web/js/vuejs/order-order.js

+ 2
- 2
producer/views/order/order.php Visa fil

@@ -497,7 +497,7 @@ $this->setTitle('Commander');
</label>
</div>
<div class="col-md-4" v-if="isPaymentMethodCreditActive()">
<template v-if="user && (pointSaleActive.credit_functioning == 'mandatory' || (pointSaleActive.credit_functioning == 'user' && user.credit_active)) && !checkCreditLimit(order) ">
<template v-if="errorCreditMandatoryAndLimit()">
<div class="alert alert-danger">
<i class="bi bi-piggy-bank"></i>
Vous devez
@@ -608,7 +608,7 @@ $this->setTitle('Commander');
</div>
</div>
<div class="block-actions">
<button class="btn btn-primary" disabled="disabled" v-if="disableConfirmButton || !oneProductOrdered()">
<button class="btn btn-primary" disabled="disabled" v-if="disableConfirmButton || errorCreditMandatoryAndLimit() || !oneProductOrdered()">
<span v-if="disableConfirmButton" class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
Je confirme ma commande
</button>

+ 7
- 0
producer/web/js/vuejs/order-order.js Visa fil

@@ -579,6 +579,13 @@ var app = new Vue({
&& !this.isPaymentMethodCreditActiveFunctioningUser(true)
&& !this.isPaymentMethodCreditActiveFunctioningMandatory()
},
errorCreditMandatoryAndLimit: function() {
return this.user && (
this.pointSaleActive.credit_functioning == 'mandatory'
|| (this.pointSaleActive.credit_functioning == 'user' && user.credit_active)
)
&& !this.checkCreditLimit(this.order);
},
confirmClick: function() {

var app = this ;

Laddar…
Avbryt
Spara