@extends('layout.main') @section('content')

Edit Deal

@include('includes.errors') @include('includes.success')
Deal Summary

Profit

Live Sales ${{($deal_summary['customer_sum']['actual_cost'] ? $deal_summary['customer_sum']['actual_cost'] : "0") }}
Live Cost ${{($deal_summary['vendor_sum']['actual_cost'] ? $deal_summary['vendor_sum']['actual_cost'] : "0") }}
Live Profit ${{($deal_summary['customer_sum']['actual_cost'] ? number_format(str_replace(',','',$deal_summary['customer_sum']['actual_cost']) - str_replace(',','',$deal_summary['vendor_sum']['actual_cost']) , 6 , '.' , ',') : "0")}}

Customer

@foreach($deal_summary['customer_sum'] as $index => $data_total) @endforeach
{{ucfirst(str_replace('_',' ',$index)) }} {{$data_total}}
% {{($deal_summary['customer_sum']['planned_cost'] ? number_format((int)$deal_summary['customer_sum']['actual_cost']/$deal_summary['customer_sum']['planned_cost'] , 6 , '.' , '') : "0") *100}}%

Vendor

@foreach($deal_summary['vendor_sum'] as $index => $data_total) @endforeach
{{ucfirst(str_replace('_',' ',$index)) }} {{$data_total}}
% {{($deal_summary['vendor_sum']['planned_cost'] ? number_format((int)$deal_summary['vendor_sum']['actual_cost']/$deal_summary['vendor_sum']['planned_cost'] , 6 , '.' , '') : "0") *100}}%

Summary

@foreach($deal_summary as $deal_detail_id => $deal_detail) @if(isset($deal_detail['detail'])) @endif @endforeach
Type Destination Destination Break Prefix Trunk Revenue/Cost Deal Rate Actual Rate Actual Revenue/Cost Actual Minutes %
{{$deal_detail_row->Type}} {{$deal_detail_row->DestinationCountryID ? $Countries[$deal_detail_row->DestinationCountryID] : ''}} {{$deal_detail_row->DestinationBreak}} {{$deal_detail_row->Prefix}} @if($deal_detail_row->TrunkID != 0) {{$Trunks[$deal_detail_row->TrunkID]}} @endif {{number_format($deal_detail_row->Revenue , 6 , '.' , ',')}} {{number_format($deal_detail_row->SalePrice , 6 , '.' , ',')}} {{number_format($deal_detail_row->BuyPrice , 6 , '.' , ',')}} {{number_format($deal_detail_data['TotalCharges'] , 6 , '.' , ',')}} {{number_format($deal_detail_data['TotalBilledDuration'] , 0 , '' , ',')}} {{number_format($deal_percentage , 6 , '.' , '')}}%
{{$deal_percentage}}% Complete

Close


@if($DealDetails != false && count($DealDetails) > 0) {{Form::select('DealType',Deal::$TypeDropDown, $Deal->DealType,array("class"=>"select2", "disabled" => "disabled"))}} @else {{Form::select('DealType',Deal::$TypeDropDown, $Deal->DealType,array("class"=>"select2"))}} @endif
{{Form::select('AccountID',$Accounts, $Deal->AccountID,array("class"=>"select2"))}}
@if($DealDetails != false && count($DealDetails) > 0) {{Form::select('CodedeckID',$codedecklist,$Deal->CodedeckID,array("class"=>"select2", "disabled" => "disabled"))}} @else {{Form::select('CodedeckID',$codedecklist,$Deal->CodedeckID,array("class"=>"select2"))}} @endif
{{Form::select('Status',Deal::$StatusDropDown, $Deal->Status,array("class"=>"select2"))}}
{{ Form::text('StartDate', date("Y-m-d", strtotime($Deal->StartDate)), array("class"=>"form-control small-date-input datepicker", 'id' => 'StartDate', "data-date-format"=>"yyyy-mm-dd" ,"data-enddate"=>date('Y-m-d'))) }}
{{ Form::text('EndDate', date("Y-m-d", strtotime($Deal->EndDate)), array("class"=>"form-control small-date-input datepicker", 'id' => 'EndDate',"data-date-format"=>"yyyy-mm-dd" ,"data-enddate"=>date('Y-m-d'))) }}
Deal Detail
@foreach($DealDetails as $dealDetail) @endforeach
Type Destination Destination Break Prefix Trunk Revenue/Cost Deal Rate Actual Rate (Profit/Loss) per min Minutes Profit/Loss Action
Type Destination Destination Break Prefix Trunk Minutes Deal Rate Actual Rate (Profit/Loss) per min Revenue/Cost Profit/Loss Action
{{Form::select('Destination[]', $Countries, $dealDetail->DestinationCountryID, array("class"=>"select2 destination"))}} {{Form::select('DestinationBreak[]', $destinationBreaks, $dealDetail->DestinationBreak,array("class"=>"select2 destinationBreaks"))}} {{ Form::select('Trunk[]', $Trunks, $dealDetail->TrunkID, array("class"=>"select2")) }} @if($Deal->DealType == "Revenue") @else @endif @if($Deal->DealType == "Revenue") @else @endif
Total 0
Total 0 0
Notes
@foreach($DealNotes as $dealNote) @endforeach
Note Created By Created At Action
{{ $dealNote->CreatedBy }} {{ date("Y-m-d", strtotime($dealNote->created_at)) }}
@include('dealmanagement.add_edit_script') @include('includes.ajax_submit_script', array('formID'=>'deal-from' , 'url' => "dealmanagement/$id/update" )) @stop @section('footer_ext') @parent @stop