{% extends 'template.html.twig' %}
{% block title %}Sales Offer List - {{ parent() }} {% endblock %}
{% block body %}
<!-- Title Start -->
<div class="app-page-title">
<div class="page-title-wrapper">
<div class="page-title-heading">
<div class="page-title-icon">
<i class="metismenu-icon pe-7s-diamond text-success">
</i>
</div>
<div><h3>Sales Offer</h3>
</div>
</div>
<div class="page-title-actions">
<div class="d-inline-block dropdown">
<nav class="" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="active breadcrumb-item" aria-current="page">Sales Offer List</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
{% for message in app.flashes('notice') %}
<div class="alert alert-info alert-dismissible">
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
<strong>{{ message }}</strong>
</div>
{% endfor %}
<ul class="body-tabs body-tabs-layout tabs-animated body-tabs-animated nav">
<li class="nav-item">
<a role="tab" class="nav-link active" href="{{ path('app_sales_offer_new') }}">
<span><i class="fa fa-plus"> Add Sales Offer</i></span>
</a>
</li>
</ul> <!-- Title End -->
<!-- Tab Start -->
<div class="tab-content">
<!-- Table Tab Start -->
<div class="tab-pane tabs-animation fade show active" id="tab-content-0" role="tabpanel">
<div class="main-card mb-3 card">
<div class="card-body">
<div class="search-wrapper pull-right">
<div class="input-holder">
{{ form_start(form ) }}
{{ form_widget(form) }}
{{ form_end(form) }}
<button type="submit" class="search-icon" data-toggle="tooltip" data-placement="top" title="Search by any fields"><span></span></button>
</div>
<button class="close"></button>
</div>
<div class="table table-bordered table-responsive table-striped table-hover" style="margin-top: 51px;">
<table class="mb-0 table">
<thead>
<tr>
<th>#</th>
<th>Customer</th>
<th>Designation</th>
<th>Address</th>
<th>Courier</th>
<th><i class="fa fa-cogs" aria-hidden="true"></i> Actions</th>
</tr>
</thead>
<tbody>
{% set pageUrl = app.request.requesturi|split('/') %}
{% set pageNo = pageUrl|last %}
{% if pageNo matches '/^\\d+$/' %}
{% set counter = (pageNo-1) * 15 %}
{% else %}
{% set counter = 0 %}
{% endif %}
{% for sales_offer in sales_offers %}
{% set counter = counter + 1 %}
<tr>
<td>{{ counter }}</td>
<td>
{% if sales_offer.finalCustomer is null %}
{# <a href="{{ path('app_sales_offer_edit', {'id': sales_offer.id}) }}" data-toggle="tooltip" data-placement="top" title="Update Customer First Before adding Customer-wise Rate."> {{ sales_offer.customer }}</a> #}
<a class="modalSalesOfferBtn" data-toggle="modal" data-id="{{ sales_offer.id }}" data-target="#offerCustomerUpdateModal" style="cursor: pointer; color: #3f6ad8; text-decoration: underline;" > {{ sales_offer.customer }}</a>
{% else %}
{% if sales_offer.zoneRateFlag == 1 %}
{{ sales_offer.customer }}
{% else %}
<a href="{{ path('app_zone_wise_sales_rate_auto_autoNewFromSalesOffer', {'id': sales_offer.id}) }}" data-toggle="tooltip" data-placement="bottom" title="Customer Rate Entry" onclick="return confirm('Are you sure want to enter the rate?')">{{ sales_offer.customer }}</a>
{% endif %}
{% endif %}
</td>
<td>{{ sales_offer.designation }}</td>
<td>{{ sales_offer.address }}</td>
<td>
{% if sales_offer.courier.id == 3 %}
{% if sales_offer.finalCustomer is null %}
<a href="{{ path('app_sales_offer_edit', {'id': sales_offer.id}) }}" data-toggle="tooltip" data-placement="bottom" title="Update Customer First Before adding Customer-wise Rate."> {{ sales_offer.courier.name }}</a>
{% else %}
{% if sales_offer.countryRateFlag == 1 %}
{{ sales_offer.courier.name }}
{% else %}
<a href="{{ path('app_country_wise_sales_rate_auto_autoNewFromSalesOffer', {'id': sales_offer.id}) }}" data-toggle="tooltip" data-placement="bottom" title="Customer wise country Rate Entry Based on this Offer" onclick="return confirm('Are you sure want to enter the rate?')">{{ sales_offer.courier.name }}</a>
{% endif %}
{% endif %}
{% else %}
{{ sales_offer.courier.name }}
{% endif %}
</td>
<td>
{# <a href="{{ path('app_sales_offer_show', {'id': sales_offer.id}) }}" class="btn btn-success btn-sm" data-toggle="tooltip" data-placement="top" title="Details"><i class="fa fa-eye"></i></a> #}
<a href="{{ path('app_sales_offer_edit', {'id': sales_offer.id}) }}" class="btn btn-primary btn-sm" data-toggle="tooltip" data-placement="bottom" title="Edit"><i class="fa fa-edit"></i></a>
{# <a href="{{ path('app_sales_offer_duplicate', {'id': sales_offer.id}) }}" class="btn btn-success btn-sm" data-toggle="tooltip" data-placement="top" title="Duplicate Offer Create for Other Courier"><i class="fa fa-clone"></i></a> #}
<a href="{{ path('app_sales_offer_offerPreview', {'id': sales_offer.id}) }}" target="_blank" class="btn btn-info btn-sm" data-toggle="tooltip" data-placement="bottom" title="Sales Offer With Zone Wise"><i class="fa fa-print"></i></a>
{% if sales_offer.courier.id == 3 %}
<a href="{{ path('app_sales_offer_countryWiseRatePreview', {'id': sales_offer.id}) }}" target="_blank" class="btn btn-alternate btn-sm" data-toggle="tooltip" data-placement="bottom" title="Only Country Wise Rate Preview"><i class="fa fa-print"></i></a>
{% endif %}
<a href="{{ path('app_sales_offer_only_zone_rate', {'id': sales_offer.id}) }}" target="_blank" class="btn btn-primary btn-sm" data-toggle="tooltip" data-placement="bottom" title="Only Zone Wise Rate Preview"><i class="fa fa-print"></i></a>
{#<a href="{{ path('app_sales_offer_calculated_bdt_rate', {'id': sales_offer.id}) }}" target="_blank" class="btn btn-primary btn-sm" data-toggle="tooltip" data-placement="bottom" title="Calculated BDT Rate"><i class="fa fa-print"></i></a>#}
</td>
</tr>
{% else %}
<tr>
<td colspan="6">No records found</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% if sales_offers.haveToPaginate %}
<div class="pagination justify-content-center">
{{ pagerfanta(sales_offers, 'twitter_bootstrap4', {routeName: 'app_sales_offer_index',
routeParams: app.request.query.all }) }}
</div>
{% endif %}
</div>
</div>
</div> <!-- Table Tab End -->
</div> <!-- Tab End -->
{% endblock %}
{# {% extends 'base.html.twig' %}
{% block title %}SalesOffer index{% endblock %}
{% block body %}
<h1>SalesOffer index</h1>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Designation</th>
<th>Customer</th>
<th>Address</th>
<th>Subject</th>
<th>CoverLetterOne</th>
<th>CoverLetterTwo</th>
<th>CoverLetterThree</th>
<th>FedexCovid</th>
<th>DhlCovid</th>
<th>UpsCovid</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for sales_offer in sales_offers %}
<tr>
<td>{{ sales_offer.id }}</td>
<td>{{ sales_offer.designation }}</td>
<td>{{ sales_offer.address }}</td>
<td>{{ sales_offer.subject }}</td>
<td>{{ sales_offer.coverLetterOne }}</td>
<td>{{ sales_offer.coverLetterTwo }}</td>
<td>{{ sales_offer.coverLetterThree }}</td>
<td>{{ sales_offer.fedexCovid }}</td>
<td>{{ sales_offer.dhlCovid }}</td>
<td>{{ sales_offer.upsCovid }}</td>
<td>
<a href="{{ path('app_sales_offer_show', {'id': sales_offer.id}) }}">show</a>
<a href="{{ path('app_sales_offer_edit', {'id': sales_offer.id}) }}">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="12">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_sales_offer_new') }}">Create new</a>
{% endblock %} #}