feat: allow negative taxes

This commit is contained in:
Daniel Rodríguez
2024-02-08 19:19:32 +01:00
parent 36424bbf05
commit b819440e76
2 changed files with 33 additions and 1 deletions

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class TaxesAmountAsSigned extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('taxes', function (Blueprint $table) {
$table->bigInteger('amount')->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('taxes', function (Blueprint $table) {
$table->unsignedBigInteger('amount')->change();
});
}
}

View File

@@ -169,7 +169,7 @@ const rules = computed(() => {
required: helpers.withMessage(t('validation.required'), required), required: helpers.withMessage(t('validation.required'), required),
between: helpers.withMessage( between: helpers.withMessage(
t('validation.enter_valid_tax_rate'), t('validation.enter_valid_tax_rate'),
between(0, 100) between(-100, 100)
), ),
}, },
description: { description: {