diff --git a/src/modules/Entities/components/create-occurrence/script.js b/src/modules/Entities/components/create-occurrence/script.js index 5db0c08cb0..1a35fdda20 100644 --- a/src/modules/Entities/components/create-occurrence/script.js +++ b/src/modules/Entities/components/create-occurrence/script.js @@ -184,6 +184,11 @@ app.component('create-occurrence', { let floatNum = intNum.slice(0, -2) + "." + intNum.slice(-2); this.price = this.moneyMask(floatNum); }, + checkPrice() { + if(this.price == "R$ 0,00") + return null; + return this.price; + }, // Criação da ocorrência create(modal) { @@ -235,7 +240,7 @@ app.component('create-occurrence', { } this.newOccurrence['description'] = this.description ?? ''; - this.newOccurrence['price'] = this.free ? __('Gratuito', 'create-occurrence') : this.price; + this.newOccurrence['price'] = this.free ? __('Gratuito', 'create-occurrence') : this.checkPrice(); this.newOccurrence['priceInfo'] = this.priceInfo ?? ''; this.newOccurrence.save().then(() => {