@extends('layouts.app') @section('title', __('report.summary_by_locations_report')) @section('content')

{{ __('report.summary_by_locations_report')}}

@foreach($locations as $location)
@component('components.widget') @slot('title')

{{ $location->name }}

@if($location->landmark)
{{ $location->landmark }}
@endif
@endslot

{{ __('report.sales_summary') }}

{{ __('report.summary') }}
{{ __('report.total_sell') }}: @format_currency($location_data[$location->id]['total_sell_exc_tax'])
{{ __('lang_v1.total_sales_return') }}: -@format_currency($location_data[$location->id]['total_sell_return_exc_tax'])
{{ __('report.net_sales') }}: @format_currency($location_data[$location->id]['total_sell'])

{{ __('lang_v1.payments') }}

{{ __('report.transactions') }}
{{ __('lang_v1.total_payments_transaction') }}: @format_currency($location_data[$location->id]['total_payments'])
@if(isset($location_data[$location->id]['payments_by_method']) && !empty($location_data[$location->id]['payments_by_method'])) @foreach($location_data[$location->id]['payments_by_method'] as $method => $amount) @if($amount > 0)
{{ __('lang_v1.total_payments_transaction_from') }} {{ __('lang_v1.' . $method) }}: @format_currency($amount['total_payments'])
@endif @endforeach @endif
{{ __('lang_v1.total_credit') }} @format_currency($location_data[$location->id]['total_due'])
@if(auth()->user()->can('profit_loss_report.view'))

{{ __('lang_v1.profit_summary') }}

{{ __('lang_v1.gross_profit') }}
د.ع {{ number_format($location_data[$location->id]['gross_profit'], 2, '.', ',') }}
@endif
{{ __('report.total_expense') }}: @format_currency($location_data[$location->id]['total_sr_expenses'])
{{ __('lang_v1.total_payments_transaction') }} - {{ __('report.total_expense') }} = @format_currency($location_data[$location->id]['total_sr_expenses_minus_total_payments'])
@endcomponent
@endforeach
@endsection @section('javascript') @endsection