
<?php echo $header; ?>
   
<div id="content">
    <div class="breadcrumb">
        <?php foreach ($breadcrumbs as $breadcrumb) { ?>
          <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
        <?php } ?>
    </div>

 <?php if ($error) { ?>
    <div class="warning">
        <?php foreach ($errors as $erro) { ?>
          <?php echo $erro; ?><br>
        <?php } ?>
    </div>
 <?php } ?>

<div class="box">
    <div class="heading">
        <h1><img src="view/image/payment.png" alt=""/> <?php echo $heading_title ?></h1>
        <div class="buttons">
            <a onclick="$('#form').submit();" class="button"> <?php echo $button_save; ?> </a>
            <a href="<?php echo $cancel; ?>" class="button"> <?php echo $button_cancel;  ?> </a>
            <a href="<?php echo $logs; ?>" class="button"> <?php echo $button_logs;  ?> </a>
            <a href="<?php echo $risk; ?>" class="button"> <?php echo $button_risk;  ?> </a>
        </div>
    </div>

    <div class="content">
        
        <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
            <table class="form">
                
                <tr>
                    <td>
                        <b> <?php echo $enable_module; ?> </b> <br/>
                        <?php echo $text_module; ?>
                    </td>
                    <td>
                        <?php if( $erede_status) { ?>
                            <input type="radio" name="erede_status" value="1" checked="checked" /> <?php echo $text_yes; ?>  
                            <input type="radio" name="erede_status" value="" /> <?php echo $text_no; ?>
                        <?php } else { ?>
                             <input type="radio" name="erede_status" value="1" /> <?php echo $text_yes; ?>  
                            <input type="radio" name="erede_status" value="" checked="checked"  /> <?php echo $text_no; ?>
                        <?php } ?>
                    </td>
                </tr>
                <tr>
                    <td>
                        <b> <?php echo $title_numero_estabelecimento; ?> </b> <br/>
                        <?php echo $text_numero_estabelecimento; ?>
                    </td>
                    <td>
                        <input type="text" name="numero_estabelecimento" value="<?php echo $numero_estabelecimento;  ?>" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <b> <?php echo $title_cidade_estabelecimento; ?> </b> <br/>
                    </td>
                    <td>
                        <input type="text" name="cidade_estabelecimento" value="<?php echo $cidade_estabelecimento;  ?>" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <b> <?php echo $title_url_webservice; ?> </b> <br/>
                        <?php echo $text_url_webservice; ?>
                    </td>
                    <td>
                        <input type="text" name="url_webservice" value="<?php echo $url_webservice;  ?>" size="35" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <b> <?php echo $title_url_post; ?> </b> <br/>
                        <?php echo $text_url_post; ?>
                    </td>
                    <td>
                        <input type="text" name="url_post" value="<?php echo $url_post;  ?>" size="35" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <b> <?php echo $title_url_retorno; ?> </b> <br/>
                        <?php echo $text_url_retorno; ?>
                    </td>
                    <td>
                        <input type="text" name="url_retorno" value="<?php echo $url_retorno;  ?>" size="35" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <b> <?php echo $title_status_pedido; ?> </b> <br/>
                    </td>
                    <td>
                        <select name="status_pedido" class="" id="status_pedido">
                        	<option value="1" selected="selected"><?php echo $title_status_pedido_pendente;?></option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>
                        <b> <?php echo $title_servicos; ?> </b> <br/>
                    </td>
                    <td>
                        	<input type="checkbox" name="servicos_Credito" id="servicos_Credito" <?php if( $servicos_Credito) { ?>checked="checked" <?php } ?>>
							<label for="servicos_Credito"><strong><?php echo $title_servicosCredito; ?></strong></label><br>
							<input type="checkbox" name="servicos_Debito" id="servicos_Debito" <?php if( $servicos_Debito) { ?>checked="checked" <?php } ?>>
							<label for="servicos_Debito"><strong><?php echo $title_servicosDebito; ?></strong></label><br>
							<input type="checkbox" name="servicos_Boleto" id="servicos_Boleto" <?php if( $servicos_Boleto) { ?>checked="checked" <?php } ?>>
							<label for="servicos_Boleto"><strong><?php echo $title_servicosBoleto; ?></strong></label><br>
							<input type="checkbox" name="servicos_Analise" id="servicos_Analise" <?php if( $servicos_Analise) { ?>checked="checked" <?php } ?>>
							<label for="servicos_Analise"><strong><?php echo $title_servicosAnalise; ?></strong></label><br>
                    </td>
                </tr>
                <tr>
                    <td>
                        <b> <?php echo $title_qtd_parcelas; ?> </b> <br/>
                    </td>
                    <td>
                    	<select name="qtd_parcelas" class="" id="qtd_parcelas">
                        	<?php
                        		for ($i = 1; $i <=12; $i++)
						        {
						        	if ($i==1)
						        	{
						        		$valor = 0;
						        		$texto = $text_a_vista;
						        	}
						        	else
						        	{
						        		$valor = $i;
						        		$texto = $i."x";
						        	}
						        		
						            ?>
						            <option value="<?php echo $valor;?>" <?php if( $i == $qtd_parcelas) { ?>selected="selected"<?php } ?>><?php echo $texto;?></option>
						            <?php
						        }
                        	?>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>
                        <b> <?php echo $title_parcela_minima; ?> </b> <br/>
                        <?php echo $text_parcela_minima; ?>
                    </td>
                    <td>
                        <input type="text" name="parcela_minima" value="<?php echo $parcela_minima;  ?>" size="20" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <b> <?php echo $title_banco_cedente; ?> </b>
                    </td>
                    <td>
                    	<select name="banco_cedente" class="" id="banco_cedente">
                        <?php

                        	$arrayBancoCedente = array(
					          array('id_option' => '','name' => 'Selecione'),
					          array('id_option' => 11,'name' => 'Itaú'),
					          array('id_option' => 12,'name' => 'Bradesco'),
					          array('id_option' => 13,'name' => 'Banco do Brasil'),
					          array('id_option' => 14,'name' => 'HSBC'),
					          array('id_option' => 15,'name' => 'Santander'),
					          array('id_option' => 16,'name' => 'Caixa'),
					        );

					        $len = count($arrayBancoCedente);

                    		for ($i = 0; $i <$len; $i++)
					        {
					            ?>
					            <option value="<?php echo $arrayBancoCedente[$i]['id_option'];?>" <?php if( $arrayBancoCedente[$i]['id_option'] == $banco_cedente) { ?>selected="selected"<?php } ?>><?php echo $arrayBancoCedente[$i]['name'];?></option>
					            <?php
					        }
                    	?>
                    </select>
                    </td>
                </tr>
                <tr>
                    <td>
                        <b> <?php echo $title_qtd_dias_vencimento; ?> </b>
                    </td>
                    <td>
                        <input type="text" name="qtd_dias_vencimento" value="<?php echo $qtd_dias_vencimento;  ?>" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <b> <?php echo $title_multa_atraso; ?> </b>
                    </td>
                    <td>
                        <input type="text" name="multa_atraso" value="<?php echo $multa_atraso;  ?>" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <b> <?php echo $title_juros_por_dia; ?> </b>
                    </td>
                    <td>
                        <input type="text" name="juros_por_dia" value="<?php echo $juros_por_dia;  ?>" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <b> <?php echo $title_instrucoes_pagamento; ?> </b> <br/>
                    </td>
                    <td>
                        <textarea name="instrucoes_pagamento" rows="5" cols="60"><?php echo $instrucoes_pagamento;  ?></textarea>
                    </td>
                </tr>
                <tr>
                    <td>
                        <b> <?php echo $title_notas_pagamento; ?> </b> <br/>
                    </td>
                    <td>
                        <textarea name="notas_pagamento" rows="5" cols="60"><?php echo $notas_pagamento;  ?></textarea>
                    </td>
                </tr>
            </table>
               
        </form>
        
        
    </div>
    
    </div>
</div>

<?php echo $footer; ?>