<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-10">
        <h2><?= print_lang($app_lang,'mod_turnover_edit_title'); ?></h2>
        <ol class="breadcrumb">
            <li>
                <a class="url-elem" href="<?php echo url('/dashboard'); ?>"><?= print_lang($app_lang,'home'); ?></a>
            </li>
            <li>
                <a class="url-elem" href="<?php echo url('/turnover'); ?>"><?= print_lang($app_lang,'mod_turnover_sidebar_main_menu'); ?></a>
            </li>
            <li class="active">
                <strong><?= print_lang($app_lang,'mod_turnover_edit_title'); ?></strong>
            </li>
        </ol>
    </div>
    <div class="col-lg-2">
    </div>
</div>


<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox-title">
        <h5><?= print_lang($app_lang,'fields_with'); ?> <strong class="text-danger">*</strong> <?= print_lang($app_lang,'are_mandatory'); ?></h5>
    </div>
    <div class="ibox-content">
        <!-- spinner -->
        <div class="sk-spinner sk-spinner-three-bounce">
            <div class="sk-bounce1"></div>
            <div class="sk-bounce2"></div>
            <div class="sk-bounce3"></div>
        </div>
        <!-- spinner -->

       

        <div class="row">
            <div class="col-sm-12 b-r">
                <form role="form" id="turnover-form" action="<?php echo url('/turnover/update').'/'.$editing_data['uid']; ?>">

                    <div class="row extra-mar-botm">
                        <div class="col-md-12">
                            <div class="table-responsive">
                                <table class="table" style="width: 100%;">
                                    <thead>
                                        <tr>
                                            <th colspan="3" style="border: 1px solid #000 !important; padding: 3px; background: #2b9c1b !important; font-size: 18px; font-style: italic; text-decoration: underline; color: #fff !important; font-size: 18px !important; vertical-align: middle;"><?= print_lang($app_lang,'financial_income_statement_title'); ?></th>
                                        </tr>

                                        <tr>
                                            <td style="width: 10%;"></td>
                                            <th colspan="2" style="border: 1px solid #000 !important; padding: 3px; background: #2b9c1b !important; font-size: 16px; font-style: italic; text-decoration: underline; color: #fff !important; font-size: 16px !important; vertical-align: middle;"><?= print_lang($app_lang,'financial_income_statement_title_date_range'); ?></th>
                                        </tr>

                                        <tr>
                                            <td style="width: 10%; padding: 3px;"></td>
                                            <td style="width: 60%; padding: 3px; color: #000; font-size: 15px;"><?= print_lang($app_lang,'financial_income_statement_title_begining_date'); ?></td>
                                            <td style="width: 30%; padding: 3px; color: #000; font-size: 15px; <?php if($app_direction == 'rtl'){echo 'text-align: left;';}else{echo 'text-align: right;';}?>">
                                                <input type="hidden" name="from_date" value="<?= date('Y/m/d',strtotime($editing_data['from'])); ?>">
                                                <?php
                                                    if(!empty($editing_data['from']))
                                                    {
                                                        echo date('Y/m/d',strtotime($editing_data['from']));
                                                    }

                                                ?>
                                            </td>

                                        </tr>

                                        <tr>
                                            <td style="width: 10%; padding: 3px;"></td>
                                            <td style="width: 60%; padding: 3px; color: #000; font-size: 15px;"><?= print_lang($app_lang,'financial_income_statement_title_end_date'); ?></td>
                                            <td style="width: 30%; padding: 3px; color: #000; font-size: 15px; <?php if($app_direction == 'rtl'){echo 'text-align: left;';}else{echo 'text-align: right;';}?>">
                                                <input type="hidden" name="to_date" value="<?= date('Y/m/d',strtotime($editing_data['to'])); ?>">
                                                <?php
                                                    if(!empty($editing_data['to']))
                                                    {
                                                        echo date('Y/m/d',strtotime($editing_data['to']));
                                                    }
                                                ?>
                                            </td>
                                        </tr>

                                        <tr>
                                            <td style="width: 10%; padding: 3px;"></td>
                                            <td style="width: 60%; padding: 3px; color: #000; font-size: 15px;"><?= print_lang($app_lang,'financial_income_statement_title_currency'); ?></td>
                                            <td style="width: 30%; padding: 3px; color: #000; font-size: 15px; <?php if($app_direction == 'rtl'){echo 'text-align: left;';}else{echo 'text-align: right;';}?>">
                                                <?php
                                                    if(!empty($editing_data['currency_symbol']))
                                                    {
                                                        echo isset($editing_data['currency_symbol']) ? $editing_data['currency_symbol'] : null;
                                                    }
                                                ?>
                                            </td>
                                        </tr>

                                        <tr>
                                            <td style="width: 10%;"></td>
                                            <th colspan="2" style="border: 1px solid #000 !important; padding: 3px; background: #2b9c1b !important; font-size: 16px;; font-style: italic; text-decoration: underline; color: #fff !important; font-size: 16px; !important; vertical-align: middle;"><?= print_lang($app_lang,'financial_income_statement_title_revenue'); ?></th>
                                            <input type="hidden" name="currency" value="<?= $editing_data['currency']; ?>">
                                        </tr>

                                        <tr>
                                            <td style="width: 10%; padding: 3px;"></td>
                                            <td style="width: 60%; padding: 3px; color: #000; font-size: 15px;"><?= print_lang($app_lang,'financial_income_statement_title_sales_income'); ?></td>
                                            <td style="width: 30%; padding: 3px; color: #000; font-size: 15px; <?php if($app_direction == 'rtl'){echo 'text-align: left;';}else{echo 'text-align: right;';}?>">
                                                <?php
                                                    echo $editing_data['currency_symbol'].' '.amount_number_format($editing_data['sales_income']);
                                                ?>
                                                <input type="hidden" name="sales_income" value="<?= $editing_data['sales_income']; ?>">
                                            </td>
                                        </tr>

                                        <tr>
                                            <td style="width: 10%; padding: 3px;"></td>
                                            <td style="width: 60%; padding: 3px; color: #000; font-size: 15px;"><?= print_lang($app_lang,'financial_income_statement_title_services_income'); ?></td>
                                            <td style="width: 30%; padding: 3px; color: #000; font-size: 15px; <?php if($app_direction == 'rtl'){echo 'text-align: left;';}else{echo 'text-align: right;';}?>">
                                                <?php
                                                    echo $editing_data['currency_symbol'].' '.amount_number_format($editing_data['services_income']);
                                                ?>
                                                <input type="hidden" name="services_income" value="<?= $editing_data['services_income']; ?>">
                                            </td>
                                        </tr>

                                        <tr>
                                            <td style="width: 10%; padding: 3px;"></td>
                                            <td style="width: 60%; padding: 3px; color: #000; font-size: 15px;"><?= print_lang($app_lang,'financial_income_statement_title_other_income'); ?></td>
                                            <td style="width: 30%; padding: 3px; color: #000; font-size: 15px; <?php if($app_direction == 'rtl'){echo 'text-align: left;';}else{echo 'text-align: right;';}?>">
                                                <?php
                                                    echo $editing_data['currency_symbol'].' '.amount_number_format($editing_data['other_income']);
                                                ?>
                                                <input type="hidden" name="other_income" value="<?= $editing_data['other_income']; ?>">
                                            </td>
                                        </tr>

                                        <tr>
                                            <td style="width: 10%; padding: 3px;"></td>
                                            <td style="width: 60%; padding: 3px; color: #000; font-size: 15px; background: #efefef;"><?= print_lang($app_lang,'financial_income_statement_title_net_income'); ?></td>
                                            <td style="width: 30%; padding: 3px; color: #000; font-size: 15px; background: #efefef; <?php if($app_direction == 'rtl'){echo 'text-align: left;';}else{echo 'text-align: right;';}?>">
                                                <?php
                                                    echo $editing_data['currency_symbol'].' '.amount_number_format($editing_data['total_revenue']);
                                                ?>
                                                <input type="hidden" name="total_revenue" value="<?= $editing_data['total_revenue']; ?>">
                                            </td>
                                        </tr>

                                        <tr>
                                            <td style="width: 10%;"></td>
                                            <th colspan="2" style="border: 1px solid #000 !important; padding: 3px; background: #2b9c1b !important; font-size: 16px;; font-style: italic; text-decoration: underline; color: #fff !important; font-size: 16px; !important; vertical-align: middle;"><?= print_lang($app_lang,'financial_income_statement_title_operating_expenses'); ?></th>
                                        </tr>

                                        <tr>
                                            <td style="width: 10%; padding: 3px;"></td>
                                            <td style="width: 60%; padding: 3px; color: #000; font-size: 15px;"><?= print_lang($app_lang,'financial_income_statement_title_cost_of_goods'); ?></td>
                                            <td style="width: 30%; padding: 3px; color: #000; font-size: 15px; <?php if($app_direction == 'rtl'){echo 'text-align: left;';}else{echo 'text-align: right;';}?>">
                                                <?php
                                                    echo $editing_data['currency_symbol'].' '.amount_number_format($editing_data['costs_of_goods_sold']);
                                                ?>
                                                <input type="hidden" name="costs_of_goods_sold" value="<?= $editing_data['costs_of_goods_sold']; ?>">
                                            </td>
                                        </tr>

                                        <tr>
                                            <td style="width: 10%; padding: 3px;"></td>
                                            <td style="width: 60%; padding: 3px; color: #000; font-size: 15px;"><?= print_lang($app_lang,'financial_income_statement_title_salaries'); ?></td>
                                            <td style="width: 30%; padding: 3px; color: #000; font-size: 15px; <?php if($app_direction == 'rtl'){echo 'text-align: left;';}else{echo 'text-align: right;';}?>">
                                                <?php
                                                    echo $editing_data['currency_symbol'].' '.amount_number_format($editing_data['salaries']);
                                                ?>
                                                <input type="hidden" name="salaries" value="<?= $editing_data['salaries']; ?>">
                                            </td>
                                        </tr>

                                        <tr>
                                            <td style="width: 10%; padding: 3px;"></td>
                                            <td style="width: 60%; padding: 3px; color: #000; font-size: 15px;"><?= print_lang($app_lang,'financial_income_statement_title_expenses'); ?></td>
                                            <td style="width: 30%; padding: 3px; color: #000; font-size: 15px; <?php if($app_direction == 'rtl'){echo 'text-align: left;';}else{echo 'text-align: right;';}?>">
                                                <?php
                                                    echo $editing_data['currency_symbol'].' '.amount_number_format($editing_data['expenses']);
                                                ?>
                                                <input type="hidden" name="expenses" value="<?= $editing_data['expenses']; ?>">
                                            </td>
                                        </tr>

                                        <tr>
                                            <td style="width: 10%; padding: 3px;"></td>
                                            <td style="width: 60%; padding: 3px; color: #000; font-size: 15px;"><?= print_lang($app_lang,'financial_income_statement_title_assets'); ?></td>
                                            <td style="width: 30%; padding: 3px; color: #000; font-size: 15px; <?php if($app_direction == 'rtl'){echo 'text-align: left;';}else{echo 'text-align: right;';}?>">
                                                <?php
                                                    echo $editing_data['currency_symbol'].' '.amount_number_format($editing_data['assets']);
                                                ?>
                                                <input type="hidden" name="assets" value="<?= $editing_data['assets']; ?>">
                                            </td>
                                        </tr>

                                        <tr>
                                            <td style="width: 10%; padding: 3px;"></td>
                                            <td style="width: 60%; padding: 3px; color: #000; font-size: 15px; background: #efefef;"><?= print_lang($app_lang,'financial_income_statement_title_total_expenses'); ?></td>
                                            <td style="width: 30%; padding: 3px; color: #000; font-size: 15px; background: #efefef; <?php if($app_direction == 'rtl'){echo 'text-align: left;';}else{echo 'text-align: right;';}?>">
                                                <?php
                                                    echo $editing_data['currency_symbol'].' '.amount_number_format($editing_data['total_expenses']);
                                                ?>
                                                <input type="hidden" name="total_expenses" value="<?= $editing_data['total_expenses']; ?>">
                                            </td>
                                        </tr>

                                        <tr>
                                            <td colspan="2" style="border: 1px solid #000 !important; padding: 3px; background: #2b9c1b !important; font-size: 18px; font-style: italic; text-decoration: underline; color: #fff !important; font-size: 18px !important; vertical-align: middle;"><?= print_lang($app_lang,'financial_income_statement_title_net_profit'); ?></td>
                                            <td style="border: 1px solid #000 !important; padding: 3px; background: #2b9c1b !important; font-size: 18px; font-style: italic; text-decoration: underline; color: #fff !important; font-size: 18px !important; vertical-align: middle; <?php if($app_direction == 'rtl'){echo 'text-align: left;';}else{echo 'text-align: right;';}?>">
                                                <?php
                                                    echo $editing_data['currency_symbol'].' '.amount_number_format($editing_data['net_income']);
                                                ?>
                                                <input type="hidden" name="net_income" value="<?= $editing_data['net_income']; ?>">
                                            </td>
                                        </tr>

                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>

                    <div class="row extra-mar-botm">
                        <div class="col-md-12 text-right">
                            <a class="btn btn-w-m btn-outline btn-danger url-elem" href="<?php echo url('/turnover'); ?>"><?= print_lang($app_lang,'cancel'); ?></a>
                            <button class="btn btn-w-m btn-primary" type="submit"><?= print_lang($app_lang,'update'); ?></button>
                        </div>
                    </div>

                </form>
            </div>
        </div>
    </div>

</div>
