<?xml version="1.0" encoding="UTF-8"?>
<odoo>
    <!-- Tree View -->
    <record id="view_sos_sales_plan_target_tree" model="ir.ui.view">
        <field name="name">sos_sales_plan_target.tree</field>
        <field name="model">sos_sales_plan_target</field>
        <field name="arch" type="xml">
            <tree>
          
                  <field name="financial_year"/>
                  <field name="sales_executive"/>
                  <field name="total_annual_value"/>
           
                
            </tree>
        </field>
    </record>

    <!-- Form View -->
    <record id="view_sos_sales_plan_target_form" model="ir.ui.view">
        <field name="name">sos_sales_plan_target.form</field>
        <field name="model">sos_sales_plan_target</field>
        <field name="arch" type="xml">
            <form>
           <header>
<button class="btn btn-primary" type="object"
name="action_report_sales_plan_btn"><i class="fa fa-print"></i> Print Report</button>


</header>
                <sheet>
<h2 style="text-align: center;text-transform: uppercase;text-shadow: 1px 1p 1px #140718;color: #65407c;padding:5px;">Sales Target</h2><hr></hr><br></br>  

    <group>
    <group>
    <field name="sales_executive"/>
    </group>
    <group>
    <field name="financial_year"/>
    </group>
    </group>
    <br></br><br></br>
       <notebook>
                <page string="Region/Customer Details">
                <field name="line_ids" nolabel="1">
                <tree editable="bottom">
                <field name="region"/>
                <field name="customer_name"/>
                <field name="product"/>
                <field name="location"/>
                <field name="date_billed"/>
                </tree>
                </field>
                </page>
                <page string="Quarter I">
                <div style="display: flex;
                align-items: center;
                float: left;
                margin-bottom: 20px;
                border: solid 1px #ccc;
                padding: 5px;
                font-size: 13px;
                font-weight: bold;">
                <span>Note : Values Should be in Lakhs</span>


                </div>

                <field name="line_ids" nolabel="1">
                <tree editable="bottom" create="false">
                <field name="region"/>
                <field name="customer_name" readonly="1"/>
                <field name="product" readonly="1"/>
                <field name="apr_qty"/>
                <field name="apr_value" decoration-bf="apr_value > 0" decoration-success="apr_value > 0"/>
                <field name="may_qty"/>
                <field name="may_value" decoration-bf="may_value > 0" decoration-success="may_value > 0"/>
                <field name="jun_qty"/>
                <field name="jun_value" decoration-bf="jun_value > 0" decoration-success="jun_value > 0"/>

                </tree>
                </field>
                </page>
            <page string="Quarter II">
            <div style="display: flex;
            align-items: center;
            float: left;
            margin-bottom: 20px;
            border: solid 1px #ccc;
            padding: 5px;
            font-size: 13px;
            font-weight: bold;">
            <span>Note : Values Should be in Lakhs</span>


            </div>
            <field name="line_ids" nolabel="1">
            <tree editable="bottom" create="false">
            <field name="region"/>
            <field name="customer_name" readonly="1"/>
            <field name="product" readonly="1"/>
            <field name="jul_qty"/>
            <field name="jul_value" decoration-bf="jul_value > 0" decoration-success="jul_value > 0"/>
            <field name="aug_qty"/>
            <field name="aug_value" decoration-bf="aug_value > 0" decoration-success="aug_value > 0"/>
            <field name="sep_qty"/>
            <field name="sep_value" decoration-bf="sep_value > 0" decoration-success="sep_value > 0"/>
            </tree>
            </field>
            </page>
                <page string="Quarter III">
                <div style="display: flex;
                align-items: center;
                float: left;
                margin-bottom: 20px;
                border: solid 1px #ccc;
                padding: 5px;
                font-size: 13px;
                font-weight: bold;">
                <span>Note : Values Should be in Lakhs</span>


                </div>
                <field name="line_ids" nolabel="1">
                <tree editable="bottom" create="false">
                <field name="region"/>
                <field name="customer_name" readonly="1"/>
                <field name="product" readonly="1"/>
                <field name="oct_qty"/>
                <field name="oct_value" decoration-bf="oct_value > 0" decoration-success="oct_value > 0"/>
                <field name="nov_qty"/>
                <field name="nov_value" decoration-bf="nov_value > 0" decoration-success="nov_value > 0"/>
                <field name="dec_qty"/>
                <field name="dec_value" decoration-bf="dec_value > 0" decoration-success="dec_value > 0"/>
                </tree>
                </field>
                </page>
            <page string="Quarter IV">
            <div style="display: flex;
            align-items: center;
            float: left;
            margin-bottom: 20px;
            border: solid 1px #ccc;
            padding: 5px;
            font-size: 13px;
            font-weight: bold;">
            <span>Note : Values Should be in Lakhs</span>


            </div>
            <field name="line_ids" nolabel="1">
            <tree editable="bottom" create="false">
            <field name="region"/>
            <field name="customer_name" readonly="1"/>
            <field name="product" readonly="1"/>
            <field name="jan_qty"/>
            <field name="jan_value" decoration-bf="jan_value > 0" decoration-success="jan_value > 0"/>
            <field name="feb_qty"/>
            <field name="feb_value" decoration-bf="feb_value > 0" decoration-success="feb_value > 0"/>
            <field name="mar_qty"/>
            <field name="mar_value" decoration-bf="mar_value > 0" decoration-success="mar_value > 0"/>
            </tree>
            </field>
            </page>
                                <page string="Summary">
                                <br></br>
                                    <field name="product_summary" widget="html"/>
                                    <br></br>

                                <table class="table_custom"   style="box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 8px;">
 <thead><tr style="background-color: #635a99;"><td style="color:#fff" colspan="6"><b>Quarter Wise Target (Rupees In Lakhs)</b></td></tr></thead>
 <tr style="background-color: lavender;">
 <td class="column">Quarter</td>
 <td class="column">I</td>
 <td class="column">II</td>
 <td class="column">III</td>
 <td class="column">IV</td>
  <td class="column">Total</td>
 </tr>
  <tr>
  <td style="background-color: lavender;" class="column">Target</td>
 <td>₹ <field name="total_q1_value"/></td>
 <td>₹ <field name="total_q2_value"/></td>
 <td>₹ <field name="total_q3_value"/></td>
 <td>₹ <field name="total_q4_value"/></td>
 <td style="font-size:13px;font-size: 15px;background-color: lavender;
    font-weight: bold;">₹ <field name="total_annual_value" nolabel="1" /></td>
 </tr>
 </table>
 <br></br> <br></br>

    <table class="table_custom"   style="box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 8px;">
 <thead><tr style="background-color: #635a99;"><td style="color:#fff" colspan="14"><b>Month Wise Target (Rupees In Lakhs)</b></td></tr></thead>
    <tr style="background-color: lavender;">
    <td class="column">Month</td>
    <td class="column">April</td>
    <td class="column">May</td>
    <td class="column">June</td>
    <td class="column">July</td>
    <td class="column">August</td>
    <td class="column">September</td>
    <td class="column">October</td>
    <td class="column">November</td>
    <td class="column">December</td>
    <td class="column">January</td>
    <td class="column">February</td>
    <td class="column">March</td>
    <td class="column">Total</td>
    </tr>
    <tr>
    <td style="background-color: lavender;" class="column">Target</td>
    <td>₹ <field name="total_april_value"/></td>
    <td>₹ <field name="total_may_value"/></td>
    <td>₹ <field name="total_june_value"/></td>
    <td>₹ <field name="total_july_value"/></td>
    <td>₹ <field name="total_august_value"/></td>
    <td>₹ <field name="total_september_value"/></td>
    <td>₹ <field name="total_october_value"/></td>
    <td>₹ <field name="total_november_value"/></td>
    <td>₹ <field name="total_december_value"/></td>
    <td>₹ <field name="total_january_value"/></td>
    <td>₹ <field name="total_february_value"/></td>
    <td>₹ <field name="total_march_value"/></td>
    <td style="background-color: lavender;font-size:13px;font-size: 15px;
    font-weight: bold;">₹ <field name="total_annual_value" nolabel="1" /></td>
    </tr>
    </table>                           
    <!-- <table class="table_custom">
    <thead><tr><td colspan="4"> <div style="font-size: 22px;pointer-events: none;color: #793595;">
        Total Target : <field name="total_annual_value" nolabel="1" />
    </div></td></tr></thead>
    <tr><td class="column">April Target</td><td><field name="total_april_value"/></td><td class="column">May Target</td><td><field name="total_may_value"/></td></tr>
    <tr><td class="column">June Target</td><td><field name="total_june_value"/></td><td class="column">July Target</td><td><field name="total_july_value"/></td></tr>
    <tr><td class="column">August Target</td><td><field name="total_august_value"/></td><td class="column">September Target</td><td><field name="total_september_value"/></td></tr>
    <tr><td class="column">October Target</td><td><field name="total_october_value"/></td><td class="column">November Target</td><td><field name="total_november_value"/></td></tr>
    <tr><td class="column">December Target</td><td><field name="total_december_value"/></td><td class="column">January Target</td><td><field name="total_january_value"/></td></tr>
    <tr><td class="column">February Target</td><td><field name="total_february_value"/></td><td class="column">March Target</td><td><field name="total_march_value"/></td></tr>

    </table> -->
    


                                </page>
                         </notebook>
       
                  
                </sheet>
            </form>
        </field>
    </record>

    <!-- Action -->
    <record id="action_sos_sales_plan_target" model="ir.actions.act_window">
        <field name="name">Sales Target</field>
        <field name="res_model">sos_sales_plan_target</field>
        <field name="view_mode">tree,form</field>
    </record>

    <!-- Menu -->
    <menuitem id="menu_sos_sales_plan_target" name="SALES TARGET" sequence="7" parent="sos_sales_menu_root" action="action_sos_sales_plan_target" groups="sos_inventory.sos_finance_user,sos_inventory.sos_sales_user,sos_inventory.sos_management_user,sos_inventory.sos_ce_head,sos_inventory.sos_sales_reviewer,sos_inventory.sos_sales_sapl_user"/>
</odoo>
