<div class="card">
    <input type="hidden" name="proHasSizeColor" id="proHasSizeColor" value="{$proHasSizeColor}">
    <div class="row table-responsive">
        <h4 style="margin-right: 29px;">معادلات الانتاج</h4>

        <div class="table-responsive" style="display: inline-block;width:49%;float: right;margin-right: 15px;">
            <table class="table billtable table-bordered table-black ">
                {assign var=i value=1}
                {foreach $allProductEquations as $eq}
                {if $i % 2 == 1}
                <tr>
                    <td class="eqName">{$eq->name}</td>
                    <td>
                        <input type="text" class="form-control userQuantityOfEq" name="userQuantityOfEq{$i}" id="userQuantityOfEq{$i}" data-itr="{$i}" placeholder="الكمية" value="">
                        <input type="hidden" name="pRateId{$i}" id="pRateId{$i}" value="{$eq->productionRateId}">
                        <input type="hidden" name="finalId{$i}" id="finalId{$i}" value="{$eq->productId}">
                        <input type="hidden" name="finalName{$i}" id="finalName{$i}" value="{$eq->productName}">
                        <input type="hidden" name="finalPrices{$i}" id="finalPrices{$i}" value="{$eq->productSellAllPrice},{$eq->productSellHalfPrice},{$eq->productSellUnitPrice}">

                        {assign var=j value=1}
                        {foreach $eq->productionRateProducts as $ratePro}
                        <input type="hidden" id="pRateProId{$i}_{$j}" value="{$ratePro->productId}">
                        <input type="hidden" id="pRateProName{$i}_{$j}" value="{$ratePro->productName}">
                        <input type="hidden" id="pRateUnitid{$i}_{$j}" value="{$ratePro->unitId}">
                        <input type="hidden" id="pRateUnitName{$i}_{$j}" value="{$ratePro->unitName}">
                        <input type="hidden" id="pRateProductNumber{$i}_{$j}" value="{$ratePro->productnumber}">
                        <input type="hidden" id="pRateQty{$i}_{$j}" value="{$ratePro->quantity}">
                        <input type="hidden" id="pRateBuyPrice{$i}_{$j}" value="{$ratePro->productBuyPrice}">
                        {assign var=j value=$j+1}
                        {/foreach}
                        <input type="hidden" id="proItr{$i}" value="{$j}">

                    </td>
                </tr>
                {/if}
                {assign var=i value=$i+1}
                {/foreach}
            </table>
        </div>
        <div class="table-responsive" style="display: inline-block; width: 48%; float: left; margin-left: 14px;">
            <table class="table billtable table-bordered table-black ">
                {assign var=i value=1}
                {foreach $allProductEquations as $eq}
                {if $i % 2 == 0}
                <tr>
                    <td class="eqName">{$eq->name}</td>
                    <td>
                        <input type="text" class="form-control userQuantityOfEq" name="userQuantityOfEq{$i}" id="userQuantityOfEq{$i}" data-itr="{$i}" placeholder="الكمية" value="">
                        <input type="hidden" name="pRateId{$i}" id="pRateId{$i}" value="{$eq->productionRateId}">
                        <input type="hidden" name="finalId{$i}" id="finalId{$i}" value="{$eq->productId}">
                        <input type="hidden" name="finalName{$i}" id="finalName{$i}" value="{$eq->productName}">
                        <input type="hidden" name="finalPrices{$i}" id="finalPrices{$i}" value="{$eq->productSellAllPrice},{$eq->productSellHalfPrice},{$eq->productSellUnitPrice}">

                        {assign var=j value=1}
                        {foreach $eq->productionRateProducts as $ratePro}
                        <input type="hidden" id="pRateProId{$i}_{$j}" value="{$ratePro->productId}">
                        <input type="hidden" id="pRateProName{$i}_{$j}" value="{$ratePro->productName}">
                        <input type="hidden" id="pRateUnitid{$i}_{$j}" value="{$ratePro->unitId}">
                        <input type="hidden" id="pRateUnitName{$i}_{$j}" value="{$ratePro->unitName}">
                        <input type="hidden" id="pRateProductNumber{$i}_{$j}" value="{$ratePro->productnumber}">
                        <input type="hidden" id="pRateQty{$i}_{$j}" value="{$ratePro->quantity}">
                        <input type="hidden" id="pRateBuyPrice{$i}_{$j}" value="{$ratePro->productBuyPrice}">
                        {assign var=j value=$j+1}
                        {/foreach}
                        <input type="hidden" id="proItr{$i}" value="{$j}">

                    </td>
                </tr>
                {/if}
                {assign var=i value=$i+1}
                {/foreach}
            </table>
        </div>
    </div>
    <input type="hidden" name="pRateItr" id="pRateItr" value="{$i}">
</div>


<input type="hidden" id="allowedit" value="{$allowedit}"/>