<div class="app-header bg-header-1">
    <div class="layout-fixed full-h text-center">
        <div class="full-h v-bottom-i pdB15">
            <div class="app-content-header bg-header-1">
                <div class="text-name-header-1 nowrap">{{setCustomerName(customerDetail.company_name,customerDetail.first_name,customerDetail.last_name)}}</div>
                <div class="text-title-header-1 nowrap mgT10">Total In Store Credit : {{total_instorecredit}}</div>
            </div>
        </div>
    </div>
    <button class="popup-back-button bg-transparent pd0-i biger-3-time" type="button" ng-click="closeTarget('#popupInstoreCredit')"></button>
</div>
<div class="app-content">
    <div class="app-content-inner content-pd">
        <ion-scroll class="scroll-area" direction="y" has-bouncing="false" overflow-scroll="false" delegate-handle="scrollPopupInstore" on-scroll="scrollContent('scrollPopupInstore')">
            <ul class="lst-customers stripe-1 except-app-create-button">
                <li class="box-setting-4 form-field-container full-w-i" ng-repeat="item in dataInstoreCredit">
                    <div class="content content-in">
                        <div class="itm row-one-content">
                            <div class="layout-fixed">
                                <div class="v-top-i">
                                    <div class="name clr-black first-capitalize" ng-style="{ 'text-decoration': item.active == 0 ? 'line-through' : 'initial' } ">{{item.employee}}</div>
                                </div>
                                <div class="w50px clear v-top-i relative" ng-if="item.editable=='true' && item.active == 1">
                                    <button class="bg-transparent right biger-3-time" onclick="openQuickOption(this)">
                                        <svg class="h16px clr-symbol-clickable" viewBox="0 0 512 512"> <circle fill="#1075BB" cx="61.793" cy="256" r="61.793" /> <circle fill="#1075BB" cx="450.207" cy="256" r="61.793" /> <circle fill="#1075BB" cx="256" cy="256" r="61.793" /> </svg>
                                    </button>
                                    <div onclick="closeQuickOption(this)" class="quick-popup box-popup-1 display-top-right mgT20">
                                        <div class="popup-content w150px">
                                            <ul class="list-item-03">
                                                <li ng-click="editInstoreCredit(item.id)">
                                                    <div class="layout-fixed">
                                                        <div class="icon-area">
                                                            <svg class="h15px" viewBox="0 0 285 285"> <path d="M216.818,271.424H26.821V81.427h61.713c3.748,0,6.788-3.04,6.788-6.788V13.576h121.496v29.246    c0.3-0.037,0.591-0.115,0.903-0.127c1.753-0.068,5.165,0.019,9.708,1.237c0.909,0.235,1.917,0.572,2.965,0.934V6.788    c0-3.748-3.04-6.788-6.788-6.788H87.894c-1.8,0-3.532,0.714-4.803,1.985l-67.86,67.861c-1.271,1.271-1.985,2.993-1.985,4.793    v203.583c0,3.741,3.04,6.778,6.788,6.778h203.573c3.748,0,6.788-3.037,6.788-6.778V173.01c-3.68,3.612-8.554,5.592-13.576,5.765    L216.818,271.424L216.818,271.424z" fill="#FFF" /> <path d="M267.485,46.164c-4.305-4.305-7.768-4.289-8.139-4.268c-0.52,0.016-1.015,0.235-1.379,0.597l-15.422,15.422    c2.242,1.395,4.704,3.278,7.301,5.875c2.61,2.61,4.49,5.068,5.888,7.308L271.14,55.68c0.377-0.371,0.587-0.857,0.612-1.376    C271.771,53.917,271.783,50.469,267.485,46.164z" fill="#FFF" /> <path d="M254.571,110.462l-7.465,7.465l-4.966-4.96l13.347-13.347c1.15-1.15,1.831-2.703,1.905-4.323    c0.049-1.206,0.111-12.088-13.421-25.621c-13.529-13.539-24.412-13.467-25.621-13.427c-1.63,0.081-3.17,0.761-4.32,1.911    L98.851,173.325c-0.708,0.705-1.252,1.584-1.565,2.549l-16.124,48.372c-0.779,2.338-0.173,4.917,1.581,6.673    c1.735,1.744,4.32,2.345,6.655,1.565l48.384-16.131c0.959-0.321,1.818-0.865,2.533-1.552l97.032-97.035l4.958,4.96l-30.996,30.986    c-2.65,2.66-2.65,6.946,0,9.605c1.33,1.33,3.062,1.985,4.802,1.985c1.732,0,3.473-0.655,4.793-1.985l43.267-43.263    c2.647-2.647,2.647-6.939,0-9.593C261.517,107.809,257.218,107.809,254.571,110.462z" fill="#FFF" /> </svg>
                                                        </div>
                                                        <div class="name-area text-link-1">
                                                            Edit information
                                                        </div>
                                                    </div>
                                                </li>
                                                <li ng-click="confirmInstoreCredit(item.id)">
                                                    <div class="layout-fixed">
                                                        <div class="icon-area">
                                                            <svg class="h16px" viewBox="0 0 59 59"> <path d="M52.5,6H38.456c-0.11-1.25-0.495-3.358-1.813-4.711C35.809,0.434,34.751,0,33.499,0H23.5c-1.252,0-2.31,0.434-3.144,1.289   C19.038,2.642,18.653,4.75,18.543,6H6.5c-0.552,0-1,0.447-1,1s0.448,1,1,1h46c0.552,0,1-0.447,1-1S53.052,6,52.5,6z M20.553,6   c0.112-1.048,0.435-2.496,1.24-3.319C22.24,2.223,22.799,2,23.5,2h9.999c0.701,0,1.26,0.223,1.708,0.681   c0.805,0.823,1.128,2.271,1.24,3.319H20.553z" /> <path d="M10.456,54.021C10.493,55.743,11.565,59,15.364,59h28.272c3.799,0,4.871-3.257,4.907-4.958L50.376,10H8.624L10.456,54.021z    M17.5,42h24c0.552,0,1,0.447,1,1s-0.448,1-1,1h-24c-0.552,0-1-0.447-1-1S16.948,42,17.5,42z M17.5,47h24c0.552,0,1,0.447,1,1   s-0.448,1-1,1h-24c-0.552,0-1-0.447-1-1S16.948,47,17.5,47z M17.5,52h24c0.552,0,1,0.447,1,1s-0.448,1-1,1h-24   c-0.552,0-1-0.447-1-1S16.948,52,17.5,52z" /> </svg>
                                                        </div>
                                                        <div class="name-area text-link-1">
                                                            Delete
                                                        </div>
                                                    </div>
                                                </li>
                                            </ul>
                                        </div>
                                        <div class="popup-overlay"></div>
                                    </div>
                                </div>
                            </div>
                            <div class="layout-fixed mgT6">
                                <div class="pdR20">
                                    <div class="layout-fixed">
                                        <div class="text v-bottom-i">
                                            <div class="text-title-4 strong">Invoice#</div>
                                            <div class="text clr-blue" ng-repeat="order in item.orders"  ng-style="{ 'text-decoration': item.active == 0 ? 'line-through' : 'initial' } " ng-click="redirectTo('order.html#/board/order/' + item.customer_id + '/' + item.order_id + '/invoice/null/')">{{order.invoice_no}}</div>
                                        </div>
                                    </div>
                                </div>
                                <div>
                                    <div class="layout-fixed">
                                        <div class="text v-bottom-i">
                                            <div class="text-title-4 strong">Date</div>
                                            <div class="text" ng-style="{ 'text-decoration': item.active == 0 ? 'line-through' : 'initial' } ">{{item.created_date}}</div></div>
                                        </div>
                                    </div>
                                </div>

                                <div class="layout-fixed mgT6">
                                    <div class="pdR20">
                                        <div class="layout-fixed">
                                            <div class="text v-bottom-i">
                                                <div class="text-title-4 strong">Payment Info</div>
                                                <div class="text" ng-style="{ 'text-decoration': item.active == 0 ? 'line-through' : 'initial' } ">{{item.payment_info}}</div>
                                            </div>
                                        </div>
                                    </div>
                                    <div>
                                        <div class="layout-fixed">
                                            <div class="text v-bottom-i">
                                                <div class="text-title-4 strong">Payment Amount</div>
                                                <div class="text" ng-style="{ 'text-decoration': item.active == 0 ? 'line-through' : 'initial' } ">{{item.payment_amount | number : 2}}</div>
                                            </div>
                                        </div>
                                    </div>
                                </div>



                                <div class="layout-fixed mgT6">
                                    <div class="pdR20">
                                        <div class="layout-fixed">
                                            <div class="text v-bottom-i">
                                                <div class="text-title-4 strong">Note</div>
                                                <div class="text" ng-if="item.notes.length > 0" ng-style="{ 'text-decoration': item.active == 0 ? 'line-through' : 'initial' } ">{{item.notes}}</div>
                                                <div class="text" ng-if="!item.notes.length > 0">-</div>
                                            </div>
                                        </div>
                                    </div>
                                    <div>
                                        <div class="layout-fixed">
                                            <div class="text v-bottom-i">
                                                <div class="text-title-4 strong">In Store Credit</div>
                                                <div class="text" ng-style="{ 'text-decoration': item.active == 0 ? 'line-through' : 'initial' } ">{{item.amount | number : 2}}</div>
                                            </div>
                                        </div>
                                    </div>
                                </div>


                                <div class="layout-fixed mgT6">
                                    <div class="pdR20">
                                        <div class="layout-fixed">
                                            <div class="text v-bottom-i">
                                                <div class="text-title-4 strong">Type</div>
                                                <div class="text" ng-style="{ 'text-decoration': item.active == 0 ? 'line-through' : 'initial' } ">{{item.type}}</div>
                                            </div>
                                        </div>
                                    </div>
                                    <div>
                                        <div class="layout-fixed">
                                            <div class="text v-bottom-i">
                                                <div class="text-title-4 strong">Balance</div>
                                                <div class="text" ng-style="{ 'text-decoration': item.active == 0 ? 'line-through' : 'initial' } ">{{item.total_instore_credit | number : 2}}</div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </li>
                </ul>
            </ion-scroll>
        </div>
    </div>
    <div class="app-create-button show">
        <button class="button-add-plus-1 pd0-i w50px h50px" type="button" ng-click="openPopupAddInstoreCredit()"></button>
    </div>
