Browse Source

[Boutique] Commande : correctif erreur cagnotte obligatoire

feature/rotating_product
Guillaume Bourgeois 7 months ago
parent
commit
b3f51b7116
2 changed files with 9 additions and 2 deletions
  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 View File

@@ -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 View File

@@ -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 ;

Loading…
Cancel
Save