<? global $vis_language; ?>
<div class="modal-dialog">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal">&times;</button>
            <h4 class="modal-title"><? echo$vis_language['TXTREMOVECREDIT']; ?></h4>
        </div>
        <div class="modal-body">
            <div class="row">
                <div class="col-sm-12">
                    <form role="form" class="form-horizontal" name="vis_remove_credit_form" id="vis_remove_credit_form">
					<div class="form-group">	
						<label class="col-sm-3 control-label"><?= $vis_language['TXTAVAILABLECREDIT'].' ('.$client['currency'].')'; ?></label>
						<div class="col-sm-9">
							<input class="form-control input-sm" type="text" name="vis_available_credit" id="vis_available_credit" value="<?php echo $invoice['available_credit']; ?>" readonly>
						</div>	
					</div>
					<div class="form-group">	
						<label class="col-sm-3 control-label"><?= $vis_language['TXTCREDITAPPLIED'].' ('.$client['currency'].')'; ?></label>
						<div class="col-sm-9">
							<input class="form-control input-sm" type="text" name="remove_credit" id="remove_credit" value="<?php echo $invoice['remove_credit']; ?>" >
							<input type="hidden" name="vis_client_id" value="<? echo $operation['vis_client_id']; ?>" />
							<input type="hidden" name="vis_credit_applied" value="<? echo $invoice['remove_credit']; ?>" />
                            <?php if($invoice['vis_invoice_id']!=0) echo '<input type="hidden" name="vis_invoice_id" value="'.$operation['vis_invoice_id'].'" />'; ?>
						</div>	
					</div>
                    </form>
                </div>
            </div>
        </div>
        <div class="modal-footer">
			<a class="btn btn-default" data-dismiss="modal"><? echo $vis_language['TXTCANCEL']; ?></a>
            <a class="btn btn-primary" onclick="$(this).visExecution('submit_form',{'vis_module':'billing', 'vis_operation':'remove_credit', 'vis_form':'vis_remove_credit_form'});"><? echo $vis_language['TXTOK']; ?></a>
        </div>
    </div>
</div>