made product quantity decimal

This commit is contained in:
saparatayev 2022-06-08 17:13:51 +05:00
parent f1c84e2d63
commit 1c8bc655eb
3 changed files with 27 additions and 1 deletions

View File

@ -29,7 +29,7 @@
<div class="post_input"> <div class="post_input">
<label for="good-count">{{'page.prod_amount_2'|_}} <span>*</span> </label> <label for="good-count">{{'page.prod_amount_2'|_}} <span>*</span> </label>
<input type="number" name="quantity" placeholder="{{'page.example'|_}}: {{'account.quantity_example'|_}}" id="good-count" <input type="number" step="0.01" name="quantity" placeholder="{{'page.example'|_}}: {{'account.quantity_example'|_}}" id="good-count"
value="{{ product.quantity }}"> value="{{ product.quantity }}">
<span class="error_txt" data-validate-for="quantity"></span> <span class="error_txt" data-validate-for="quantity"></span>
</div> </div>

View File

@ -0,0 +1,23 @@
<?php namespace TPS\Birzha\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableUpdateTpsBirzhaProducts26 extends Migration
{
public function up()
{
Schema::table('tps_birzha_products', function($table)
{
$table->decimal('quantity', 10, 2)->nullable()->unsigned(false)->default(null)->change();
});
}
public function down()
{
Schema::table('tps_birzha_products', function($table)
{
$table->integer('quantity')->nullable()->unsigned(false)->default(null)->change();
});
}
}

View File

@ -296,3 +296,6 @@
1.0.105: 1.0.105:
- 'Updated table tps_birzha_docs_one' - 'Updated table tps_birzha_docs_one'
- builder_table_update_tps_birzha_docs_one.php - builder_table_update_tps_birzha_docs_one.php
1.0.106:
- 'Updated table tps_birzha_products'
- builder_table_update_tps_birzha_products_26.php