<div class="row">
    <div class="container">

        <ol class="breadcrumb">
            <li><a href="#">خصائص عامة</a></li>
            <li><a href="transferclientccountsController.php?do=show">العملاء</a></li>
            <li class="active">التحويل من حساب عميل إلى عميل آخر</li>
        </ol>


        <div class="panel panel-default panel-m">
            <div class="panel-heading">
                <h3 class="panel-title">تعديل تحويل من حساب عميل إلى عميل آخر</h3>
            </div>
            <div class="panel-body">

                <form id="myTranMnyform" class="form-horizontal" role="form"
                    action="transferclientccountsController.php?do=update" method="post">
                    <div class="form-group">
                        <label for=" clientidfrom" class="col-lg-2 control-label">من العميل</label>
                        <div class="col-lg-4">
                            <select class="select2 wdt100" name="clientidfrom" id="clientidfrom"
                                onChange="loadclientTo();">
                                <option value="-1">اختر عميل</option>
                                {foreach $clientsData as $client}
                                <option value="{$client->clientid}" {if $loadData->clientidfrom eq $client->clientid}
                                    selected="" {/if}>{$client->clientname}</option>
                                {/foreach}
                            </select>
                            <div id="fromError" style="display:none;"></div>
                        </div>
                    </div>
                    <!-- =================================================   -->
                    <div class="form-group">
                        <label for="clientcurrentvalue" class="col-lg-2 control-label">القيمة الحالية</label>
                        <div class="col-lg-4">
                            <div class="input-group">
                                <input type="text" name="clientcurrentvalue" id="clientcurrentvalue"
                                    class="form-control numberinput" value="{$clientidfromval->clientdebt}"
                                    readonly="readonly" />
                                <span class="input-group-addon currencyTextFrom">{$currency}</span>
                            </div>

                        </div>
                    </div>
                    <!-- =================================================   -->
                    <div class="form-group">
                        <label for="clientidto" class="col-lg-2 control-label">إلى العميل</label>
                        <div class="col-lg-4">
                            <div id="clientTo">
                                <select class="select2 wdt100" name="clientidto" id="clientidto">
                                    <option value="-1">اختر عميل</option>
                                    {foreach $clientsData as $client}
                                    <option value="{$client->clientid}" {if $loadData->clientidto eq $client->clientid}
                                        selected="" {/if}>{$client->clientname}</option>
                                    {/foreach}
                                </select>
                            </div>
                            <div id="toError" style="display:none;"></div>
                        </div>
                    </div>
                    <!-- =================================================   -->
                    <div class="form-group">
                        <label for="transfermoneyvalue" class="col-lg-2 control-label">القيمة المحولة</label>
                        <div class="col-lg-4">
                            <div class="input-group">
                                <input type="text" name="transfermoneyvalue" id="transfermoneyvalue"
                                    class="form-control positivefloat" value="{$loadData->transfervalue}" />
                                <span class="input-group-addon" id="currencyText">{$currency}</span>
                            </div>
                            <div id="valueError" style="display:none;"></div>

                        </div>
                    </div>

                    <div class="form-group mg-bt5">
                        <label class="col-lg-2 control-label"> التعليق </label>
                        <div class="col-lg-4">
                            <textarea name="comment" id="antherDetailes" class=" form-control" cols="45"
                                rows="5">{$loadData->comment}</textarea>
                        </div>
                    </div>
                    <input type="hidden" name="transferidold" value="{$loadData->transferid}">


                    <!-- =================================================   -->

                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                            <button type="button" id="clientTrnMnyBtn" class="btn btn-primary pull-left">حفظ
                                الامر</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{literal}
<script type="text/javascript">
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "real");
    var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1", { isRequired: false, invalidValue: "-1" });
</script>
{/literal}