{if $showMore ==0}
<style>
    .showMoreStyle td{
        text-align: center;
        font-size: 12px;
        font-weight: bold;
        color: white !important;
        background-color: #6e6e6e;
        padding: 1px !important;
        cursor: pointer;
    }
</style>

<a class="btn btn-success" id="makeEmptyQuantityZero" style="float: left">ضع الكميةالجديدة الفارغة بصفر</a>
<table class="table table-black dataTableClass" id="productsTable">
    <thead>
        <tr>
            <th>إسم المنتج</th>
            <th class="{if {$Programsettingdata->parcode} eq 1} hidden {/if}">الباركود</th>
            <th>الكمية الحالية</th>
            <th>الكمية الجديدة</th>
            <th>المخزن</th>
            <th>تاريخ آخر إعادة جرد</th>
            <th></th>
        </tr>
    </thead>
    <tbody id="productsTBody">

        {assign var=i value=1}
        {foreach $productData as $pro}
        {*if $pro->productquantity neq '0'*}
        {if ($beforeAfter == 1 && $lastInventoryDate && $lastInventoryDate <  $pro->lastInventoryDate) || !$lastInventoryDate || ($beforeAfter == 2 && $lastInventoryDate && $lastInventoryDate >   $pro->lastInventoryDate)  || !$pro->lastInventoryDate}


        {if $pro->status eq 1}
        <tr class="success">
            {else}
        <tr>
            {/if}
            <td>{$pro->productName}</td>
            <td class="{if {$Programsettingdata->parcode} eq 1} hidden {/if}">{$pro->parcode}</td>
            <td>{$pro->productquantity}</td>
            <td>
                <input name="newQty{$i}" id="newQty{$i}" data-itr="{$i}" type="text" class="autosave"  onkeyup="checkdata({$i});"/>
                <input name="productId{$i}" id="productId{$i}" type="hidden" value="{$pro->productid}" />
                <input name="storedetailid{$i}" id="storedetailid{$i}" type="hidden" value="{$pro->storedetailid}" />
                <input name="oldQty{$i}" id="oldQty{$i}" type="hidden" value="{$pro->productquantity}" />
                <input name="storeid{$i}" id="storeid{$i}" type="hidden" value="{$pro->storeid}" />
            </td>
            <td>{$pro->storeName}</td>
            <td>{$pro->lastInventoryDate}</td>
            <td><input type="button" class="btn btn-success pull-left ft-nor getSerials" data-itr="{$i}" data-proid="{$pro->productid}" data-storeid="{$pro->storeid}" value="السيريالات"/></td>
        </tr>
        {*/if*}
        {*/if*}
        {/if}
        {capture assign=i}{$i+1}{/capture}
        {/foreach}

    </tbody>
    {if $showMoreSetting == 0}
    <tfoot>
        <tr class="showMore showMoreStyle" data-lid="{$i}" data-page="1"><td colspan="6"> عـــرض المزيـــد</td></tr>
    </tfoot>
    {/if}

</table>
<!--<input name="itr" id="itr" type="hidden" value="{count($productData)}" />-->

{elseif $showMore == 1}

{assign var=i value={$lastItr}}
{foreach $productData as $pro}
{*if $pro->productquantity neq '0'*}
{if ($beforeAfter == 1 && $lastInventoryDate && $lastInventoryDate <  $pro->lastInventoryDate) || !$lastInventoryDate || ($beforeAfter == 2 && $lastInventoryDate && $lastInventoryDate >   $pro->lastInventoryDate)  || !$pro->lastInventoryDate}


{if $pro->status eq 1}
<tr class="success">
    {else}
<tr>
    {/if}
    <td>{$pro->productName}</td>
    <td class="{if {$Programsettingdata->parcode} eq 1} hidden {/if}">{$pro->parcode}</td>
    <td>{$pro->productquantity}</td>
    <td>
        <input name="newQty{$i}" id="newQty{$i}" data-itr="{$i}" type="text" class="autosave"  onkeyup="checkdata({$i});"/>
        <input name="productId{$i}" id="productId{$i}" type="hidden" value="{$pro->productid}" />
        <input name="storedetailid{$i}" id="storedetailid{$i}" type="hidden" value="{$pro->storedetailid}" />
        <input name="oldQty{$i}" id="oldQty{$i}" type="hidden" value="{$pro->productquantity}" />
        <input name="storeid{$i}" id="storeid{$i}" type="hidden" value="{$pro->storeid}" />
    </td>
    <td>{$pro->storeName}</td>
    <td>{$pro->lastInventoryDate}</td>
    <td><input type="button" class="btn btn-success pull-left ft-nor getSerials" data-itr="{$i}" data-proid="{$pro->productid}" data-storeid="{$pro->storeid}" value="السيريالات"/></td>
</tr>
{*/if*}
{*/if*}
{/if}
{capture assign=i}{$i+1}{/capture}
{/foreach}

<input type="hidden" id="lid_temp" value="{$i}">
{/if}


