{% extends '_include/base.html.twig' %} {% block title %}Quotations ยท ERP Starz{% endblock %} {% block stylesheets %} {{ parent() }} {% endblock %} {% block breadcrumbs %} {% endblock %} {% block page_title %}Quotations{% endblock %} {% block page_actions %} New Quotation {% endblock %} {% block content %} {% include 'quotation/_summary_cards.html.twig' with { stats: quotationSummary|default({ total: 0, valid: 0, expired: 0 }) } only %}
{% for quotation in quotations %} {% set statusLabel = 'Na' %} {% if quotation.validity != 'Na' %} {% set originalDateTime = quotation.createdAt ? quotation.createdAt|date('Y-m-d') : 'now'|date('Y-m-d') %} {% set newDateTime = originalDateTime|date_modify(quotation.validity) %} {% if newDateTime|date('Y-m-d') < "now"|date('Y-m-d') %} {% set statusLabel = 'Expired' %} {% else %} {% set statusLabel = 'Valid' %} {% endif %} {% endif %} {% endfor %}
Company Offer ID Created On Created By Validity Shipping Term Payment Term Lead Time MOQ Customer Actions
{{ quotation.company ? quotation.company.name : '--' }} {{ quotation.offerId ?? '--' }} {{ quotation.createdAt ? quotation.createdAt|date('Y-m-d') : '--' }} {{ quotation.createdBy ? quotation.createdBy.name : '--' }} {{ statusLabel }} {{ quotation.shippingTerm ?? '--' }} {{ quotation.payTerm ?? '--' }} {{ quotation.leadtime ?? '--' }} {{ quotation.minOrderQty ?? '--' }} {{ quotation.customer ? quotation.customer.name : '--' }}
{% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}