Merge pull request #480 from 1day2die/decimals
decimals in server price and tax
This commit is contained in:
commit
c18d5d6dfe
32
database/migrations/2022_07_12_051152_decimals-in-price.php
Normal file
32
database/migrations/2022_07_12_051152_decimals-in-price.php
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class DecimalsInPrice extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('products', function (Blueprint $table) {
|
||||||
|
$table->decimal('price',['11','2'])->change();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('products', function (Blueprint $table) {
|
||||||
|
$table->integer('price')->change();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -64,7 +64,7 @@
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="price">{{__('Price in')}} {{CREDITS_DISPLAY_NAME}}</label>
|
<label for="price">{{__('Price in')}} {{CREDITS_DISPLAY_NAME}}</label>
|
||||||
<input value="{{$product->price ?? old('price')}}" id="price" name="price"
|
<input value="{{$product->price ?? old('price')}}" id="price" name="price" step=".01"
|
||||||
type="number"
|
type="number"
|
||||||
class="form-control @error('price') is-invalid @enderror"
|
class="form-control @error('price') is-invalid @enderror"
|
||||||
required="required">
|
required="required">
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="price">{{__('Price in')}} {{ CREDITS_DISPLAY_NAME }}</label>
|
<label for="price">{{__('Price in')}} {{ CREDITS_DISPLAY_NAME }}</label>
|
||||||
<input value="{{ $product->price }}" id="price" name="price" type="number"
|
<input value="{{ $product->price }}" id="price" name="price" type="number" step=".01"
|
||||||
class="form-control @error('price') is-invalid @enderror"
|
class="form-control @error('price') is-invalid @enderror"
|
||||||
required="required">
|
required="required">
|
||||||
@error('price')
|
@error('price')
|
||||||
|
|
|
@ -130,7 +130,7 @@
|
||||||
data-content="Tax Value that will be added to the total price of the order. <br><br> Example: 19 results in (19%)"
|
data-content="Tax Value that will be added to the total price of the order. <br><br> Example: 19 results in (19%)"
|
||||||
class="fas fa-info-circle"></i>
|
class="fas fa-info-circle"></i>
|
||||||
</div>
|
</div>
|
||||||
<input x-model="sales-tax" id="sales-tax" name="sales-tax" type="number"
|
<input x-model="sales-tax" id="sales-tax" name="sales-tax" type="number" step=".01"
|
||||||
value="{{ config('SETTINGS::PAYMENTS:SALES_TAX') }}"
|
value="{{ config('SETTINGS::PAYMENTS:SALES_TAX') }}"
|
||||||
class="form-control @error('sales-tax') is-invalid @enderror">
|
class="form-control @error('sales-tax') is-invalid @enderror">
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue