@php
$today = Carbon\Carbon::now()->format('d-m-Y');
$date = Carbon\Carbon::now()->format('Ymdhms');
$Year = Carbon\Carbon::now()->format('Y');
@endphp
@component('Components.MasterItem',['FullJoin'=>true,'oldValue'=>$xvpdtcode??null,'oldHD'=>$oldHD??null])
@endcomponent
@if(isset($xvpdtcode))
@php
$MasterItemsDetail = DB::table('tmstmproduct')
->where('xvpdtcode','=',$xvpdtcode)
->join("tmseason","tmstmproduct.XISeasonCode",".tmseason.XISeasonCode")
->join("tmforuse","tmstmproduct.XIForCode",".tmforuse.XIForCode")
->join("tmgenerate","tmstmproduct.XIGenerateCode",".tmgenerate.XIGenerateCode")
->join("tmshape","tmstmproduct.XIShapeCode",".tmshape.XIShapeCode")
->join("tmstmmaterial","tmstmproduct.xvmatcode",".tmstmmaterial.xvmatcode")
->first();
$MasterItemsDetail->mat2 = DB::table('tmstmmaterial')->where('xvmatcode','=',$MasterItemsDetail->XVMatCode2)->first();
@endphp
@component('Components.MasterItemDetailView',['oldValue'=>$MasterItemsDetail])
@endcomponent
@else
@component('Components.MasterItemDetailView')
@endcomponent
@endif