import validation fixed create and edit action on invoice, bill, revenue, payment.

refs #392
This commit is contained in:
cuneytsenturk
2018-06-25 17:53:43 +03:00
parent 409f83ae54
commit 55ac8447fc
16 changed files with 154 additions and 136 deletions

View File

@@ -120,6 +120,15 @@
{{ Form::recurring('edit', $invoice) }}
{{ Form::fileGroup('attachment', trans('general.attachment')) }}
{{ Form::hidden('customer_name', null, ['id' => 'customer_name']) }}
{{ Form::hidden('customer_email', null, ['id' => 'customer_email']) }}
{{ Form::hidden('customer_tax_number', null, ['id' => 'customer_tax_number']) }}
{{ Form::hidden('customer_phone', null, ['id' => 'customer_phone']) }}
{{ Form::hidden('customer_address', null, ['id' => 'customer_address']) }}
{{ Form::hidden('currency_rate', null, ['id' => 'currency_rate']) }}
{{ Form::hidden('invoice_status_code', null, ['id' => 'invoice_status_code']) }}
{{ Form::hidden('amount', null, ['id' => 'amount']) }}
</div>
<!-- /.box-body -->
@@ -359,7 +368,13 @@
dataType: 'JSON',
data: 'customer_id=' + $(this).val(),
success: function(data) {
$('#customer_name').val(data.name);
$('#customer_email').val(data.email);
$('#customer_tax_number').val(data.tax_number);
$('#customer_phone').val(data.phone);
$('#customer_address').val(data.address);
$('#currency_code').val(data.currency_code);
$('#currency_rate').val(data.currency_rate);
// This event Select2 Stylesheet
$('#currency_code').trigger('change');