calculate and compound fields added
This commit is contained in:
parent
bd94e8374a
commit
2cb61e2a70
34
database/migrations/2018_11_05_000000_add_tax_columns.php
Normal file
34
database/migrations/2018_11_05_000000_add_tax_columns.php
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class AddTaxColumns extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('taxes', function ($table) {
|
||||||
|
$table->boolean('calculate')->default(0);
|
||||||
|
$table->boolean('compound')->default(0);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('taxes', function ($table) {
|
||||||
|
$table->dropColumn([
|
||||||
|
'calculate',
|
||||||
|
'compound',
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -4,5 +4,7 @@ return [
|
|||||||
|
|
||||||
'rate' => 'Rate',
|
'rate' => 'Rate',
|
||||||
'rate_percent' => 'Rate (%)',
|
'rate_percent' => 'Rate (%)',
|
||||||
|
'calculate' => 'Calculate as VAT/GST',
|
||||||
|
'compound' => 'Compound',
|
||||||
|
|
||||||
];
|
];
|
||||||
|
@ -12,6 +12,10 @@
|
|||||||
|
|
||||||
{{ Form::textGroup('rate', trans('taxes.rate'), 'percent') }}
|
{{ Form::textGroup('rate', trans('taxes.rate'), 'percent') }}
|
||||||
|
|
||||||
|
{{ Form::selectGroup('calculate', trans('taxes.calculate'), 'calculator', ['0' => trans('general.no'), '1' => trans('general.yes')], null, []) }}
|
||||||
|
|
||||||
|
{{ Form::selectGroup('compound', trans('taxes.compound'), 'plus', ['0' => trans('general.no'), '1' => trans('general.yes')], null, []) }}
|
||||||
|
|
||||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||||
</div>
|
</div>
|
||||||
<!-- /.box-body -->
|
<!-- /.box-body -->
|
||||||
@ -34,6 +38,14 @@
|
|||||||
$('#enabled_1').trigger('click');
|
$('#enabled_1').trigger('click');
|
||||||
|
|
||||||
$('#name').focus();
|
$('#name').focus();
|
||||||
|
|
||||||
|
$("#calculate").select2({
|
||||||
|
placeholder: "{{ trans('general.form.select.field', ['field' => trans('taxes.calculate')]) }}"
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#compound").select2({
|
||||||
|
placeholder: "{{ trans('general.form.select.field', ['field' => trans('taxes.compound')]) }}"
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
|
@ -17,6 +17,10 @@
|
|||||||
|
|
||||||
{{ Form::textGroup('rate', trans('taxes.rate'), 'percent') }}
|
{{ Form::textGroup('rate', trans('taxes.rate'), 'percent') }}
|
||||||
|
|
||||||
|
{{ Form::selectGroup('calculate', trans('taxes.calculate'), 'calculator', ['0' => trans('general.no'), '1' => trans('general.yes')], null, []) }}
|
||||||
|
|
||||||
|
{{ Form::selectGroup('compound', trans('taxes.compound'), 'plus', ['0' => trans('general.no'), '1' => trans('general.yes')], null, []) }}
|
||||||
|
|
||||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||||
</div>
|
</div>
|
||||||
<!-- /.box-body -->
|
<!-- /.box-body -->
|
||||||
@ -36,5 +40,17 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var text_yes = '{{ trans('general.yes') }}';
|
var text_yes = '{{ trans('general.yes') }}';
|
||||||
var text_no = '{{ trans('general.no') }}';
|
var text_no = '{{ trans('general.no') }}';
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#name').focus();
|
||||||
|
|
||||||
|
$("#calculate").select2({
|
||||||
|
placeholder: "{{ trans('general.form.select.field', ['field' => trans('taxes.calculate')]) }}"
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#compound").select2({
|
||||||
|
placeholder: "{{ trans('general.form.select.field', ['field' => trans('taxes.compound')]) }}"
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
|
Loading…
x
Reference in New Issue
Block a user