Setel input harga diskon menjadi readonly
- Menambahkan atribut `readonly` pada input `harga_diskon` dan `harga_diskon_pembanding` untuk mencegah pengeditan langsung. - Menghapus pembatas nilai maksimum 100 pada event listener input diskon pembanding.
This commit is contained in:
@@ -451,11 +451,11 @@
|
||||
<tr>
|
||||
<td class="px-4 py-2">Harga Setelah Diskon</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="harga_diskon" class="input currency-format"
|
||||
<input type="text" name="harga_diskon" class="input currency-format" readonly
|
||||
value="{{ $inspectionData['asset']['harga_diskon'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="harga_diskon_pembanding[]"
|
||||
<input type="text" name="harga_diskon_pembanding[]" readonly
|
||||
class="input currency-format">
|
||||
</td>
|
||||
</tr>
|
||||
@@ -777,7 +777,6 @@
|
||||
if (input.name.includes('diskon_pembanding')) {
|
||||
input.addEventListener('input', function() {
|
||||
let value = parseFloat(this.value.replace(/[^\d]/g, '') || '0');
|
||||
value = Math.min(value, 100);
|
||||
this.value = formatCurrency(value.toString());
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user