![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/medad.corals.io/Corals/modules/Medad/resources/views/quotations/ |
{!! CoralsForm::openForm($quotation,['files' => true, 'data-table' => '#QuotationsDataTable',]) !!} <div class="row"> <div class="col-md-4"> @if (\Medad::getCurrentCompanyType() == 'customer') {!! CoralsForm::select('customer_company_id','Medad::attributes.branch.customer_company',[$customerBranch->parent_id=>$customerBranch->company->name], true, $customerBranch->parent_id,[ 'readOnly'=>true]) !!} {!! CoralsForm::select('customer_branch_id','Medad::attributes.branch.customer_branch', \Medad::getCompanyBranches($customerCompany), true, optional($customerBranch)->id,['data-selected_value'=>optional($customerBranch)->id, 'class'=>'dependent-select', 'data'=> [ 'dependency-field'=>'project_id', 'dependency-ajax-url'=> url('medad/company/projects-list'), ]],'select2') !!} @else {!! CoralsForm::select('customer_company_id','Medad::attributes.branch.customer_company',\Medad::getCompanyCustomers($supplierBranch) , true,$customerCompany->id, [ 'class'=>'dependent-select', 'data'=> [ 'dependency-field'=>'customer_branch_id', 'dependency-ajax-url'=> url('medad/company/branches-list'), ] ], 'select2') !!} {!! CoralsForm::select('customer_branch_id','Medad::attributes.branch.customer_branch', [], true, optional($customerBranch)->id, ['data-selected_value'=>optional($customerBranch)->id, 'class'=>'dependent-select', 'data'=> [ 'dependency-field'=>'project_id', 'dependency-ajax-url'=> url('medad/company/projects-list'), ]],'select2') !!} @endif {!! CoralsForm::select('project_id','Medad::module.project.title_singular',[], false,null,['data-selected_value'=>$quotation->project_id], 'select2') !!} <div class="row"> <div class="col-md-6"> {!! CoralsForm::number('types_count', 'Medad::attributes.types_count',true,null,['min'=>0]) !!} </div> <div class="col-md-6"> {!! CoralsForm::number('total_quantity', 'Medad::attributes.total_quantity',true,null,['step'=>0.01,'min'=>0]) !!} </div> </div> </div> <div class="col-md-4"> @if (\Medad::getCurrentCompanyType() == 'customer') {!! CoralsForm::select('supplier_company_id','Medad::attributes.branch.supplier_company',\Medad::getCompanySuppliers($customerBranch), true, $supplierCompany->id, [ 'id'=>'suppliers', 'class'=>'dependent-select', 'data'=> [ 'dependency-field'=>'supplier_branch_id', 'dependency-ajax-url'=> url('medad/company/branches-list'), ] ],'select2') !!} {!! CoralsForm::select('supplier_branch_id','Medad::attributes.branch.supplier_branch', [], true, optional($supplierBranch)->id, ['data-selected_value'=> optional($supplierBranch)->id],'select2') !!} @else {!! CoralsForm::select('supplier_company_id','Medad::attributes.branch.supplier_company', [$supplierBranch->parent_id=>$supplierBranch->company->name], true, $supplierBranch->parent_id, ['readOnly'=>true,]) !!} {!! CoralsForm::select('supplier_branch_id','Medad::attributes.branch.supplier_branch', \Medad::getCompanyBranches($supplierCompany), true, optional($supplierBranch)->id, [],'select2') !!} @endif {!! CoralsForm::select('quotation_request_id','Medad::attributes.quotation.quotation_request', [], false, null, [ 'class'=>'select2-ajax', 'data'=>[ 'model'=> \Corals\Modules\Medad\Models\QuotationRequest::class, 'columns'=> json_encode(['code']), 'selected'=> json_encode([optional($quotation)->quotation_request_id]), 'scopes' => json_encode([\Corals\Modules\Medad\DataTables\Scopes\CompanyListingScope::class]), 'where' => json_encode([['field'=>'status','operation'=>'=','value'=>'open'], ]) ], ], 'select2') !!} {!! CoralsForm::number('amount', 'Medad::attributes.amount', true,null,['step'=>0.01,'min'=>0]) !!} </div> <div class="col-md-4"> {!! CoralsForm::text('code', 'Medad::attributes.code', false,null,['help_text'=>'Medad::attributes.code_help' ]) !!} {!! CoralsForm::select('owner_id', 'Medad::attributes.owner', \Medad::getCompanyUsers(),true,\Auth::user()->id, [],'select2') !!} {!! CoralsForm::date('expiration_date', 'Medad::attributes.quotation.expiration_date' ,false) !!} </div> </div> {!! CoralsForm::textarea('notes','Medad::attributes.notes', false, null,['class'=>'ckeditor-simple']) !!} @include('Media::attachments_section',[ 'hasForm'=> false, 'object'=>$quotation, ]) {!! CoralsForm::customFields($quotation) !!} {!! CoralsForm::formButtons('',[],['show_cancel'=>false],[[ 'label'=>trans('Medad::attributes.save_and_open'), 'type'=>'submit', 'attributes'=>['name'=>'status-with-submit','value'=>'open','class'=>'btn btn-primary mr-3'], ]]) !!} {!! CoralsForm::closeForm($quotation) !!} <script> $(document).ready(function () { $('.dependent-select').trigger('change'); }); $('#quotation_request_id').on('change', function () { let quotation_request_id = $(this).val(); $.ajax({ url: '{{url($supplierBranch->getShowURL().'/get-quotation-request-values')}}', type: 'get', data: {'id': quotation_request_id}, dataType: 'json', success: function (data) { $('#types_count').val(data.types_count); $('#total_quantity').val(data.total_quantity); }, error: function () { } }); }); </script>