<!DOCTYPE html>
<html lang="en" class="h-100">


<head>
    <!-- meta and links start -->
    <%- include('templet/meta')-%>
</head>

<body>
        <%- include('templet/preloder_topbar_sidebar',{titel: accessdata?.topbardata?.name})-%>
        <!--********** Content body start **********-->

        <div class="content-body">

            <div class="container-fluid" style="min-height: 100vh;">
                <div class="row">
                    <div class="col-12">
                        <div class="card ">
                            <div class="card-header">
                                <h3 class="card-title">
                                    <%= language.Daily_Report %>
                                </h3>
                            </div>
                            <div class="d-none">
                                <input type="hiden" name="sym" value="<%= accessdata.symbol %>">
                                <input type="hiden" name="pls" value="<%= accessdata.plac %>">
                                <input type="hiden" name="thousands_separator"
                                    value="<%= accessdata.thousands_separator %>">
                            </div>
                            <div class="card-body">
                                <div class="row d-flex justify-content-between">
                                    <div class="col-md-5 col-12 mt-2">
                                        <label class="form-label">
                                            <%= language.Date %>
                                        </label>
                                        <% let new_date=new Date(date) %>
                                            <% let year=new_date.getFullYear() %>
                                                <% let new_day=(new_date.getDate() < 10 ? '0' : '' ) +
                                                    new_date.getDate() %>
                                                    <% let new_month=((new_date.getMonth()+1) < 10 ? '0' : '' ) +
                                                        (new_date.getMonth()+1) %>
                                                        <% let fullDate=`${year}-${new_month}-${new_day}` %>
                                                            <input type="date" class="form-control" name="date"
                                                                id="daily_report_date" value="<%= fullDate %>">
                                    </div>
                                    <div
                                        class="form-group col-md-5 col-12 mt-2 <%= accessdata.logas == 'master' && accessdata.mutibranch  ? '' :'d-none' %>">
                                        <label class="form-label">
                                            <%= language.Store_Name %>
                                        </label>
                                        <select class="default-select form-control wide mb-3" name="storeid"
                                            id="daily_report_store">
                                            <% storeList.forEach(function(x){ %>
                                                <option value="<%= x.id %>" <%=x.id==store ? 'selected' :'' %> ><%=
                                                        x.name %>
                                                </option>
                                                <% }) %>
                                        </select>

                                    </div>
                                </div>

                                <div class="row mt-4">

                                    <div class="table-responsive">
                                        <table class="table">
                                            <thead style="background-color: #D8D8D8; color: #1C1C1C;">
                                                <tr>
                                                    <th>
                                                        <%= language.Particulars %>
                                                    </th>
                                                    <th>
                                                        <%= language.Value %>
                                                    </th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <tr>
                                                    <td>
                                                        <%= language.Orders %>
                                                    </td>
                                                    <td style="color: #FFBF00; font-weight: 600;"
                                                        id="daily_report_orders">
                                                        <%=orders %>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <%= language.No_of_Orders_Delivered %>
                                                    </td>
                                                    <td style="color: #0000FF; font-weight: 600;"
                                                        id="daily_report_ordersdelivery">
                                                        <%=ordersdeliver %>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <%= language.Total_Sales %>
                                                    </td>
                                                    <td style="color: #04B404; font-weight: 600;" class="symbol"
                                                        id="daily_report_totalsale">
                                                        <%=orderstotalseal.toFixed(0) %>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <%= language.Total_Payment %>
                                                    </td>
                                                    <td style="color: #01A9DB; font-weight: 600;" class="symbol"
                                                        id="daily_report_payment">
                                                        <%=totalpay.toFixed(0) %>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <%= language.Total_Expence %>
                                                    </td>
                                                    <td style="color: #DF013A; font-weight: 600;" class="symbol"
                                                        id="daily_report_expence">
                                                        <%=expence.toFixed(0) %>
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>

                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>


        </div>

        <!--********** Content body end **********-->

        </div>
        <!--**********************************
            Footer start
        ***********************************-->
        <%- include('templet/footer')-%>

            <!--********************************** Footer end ***********************************-->

            </div>

            <!--********** Main wrapper end **********-->
            <%- include('templet/script')-%>



</body>


</html>