?>
</td>
      <td width="123" height="23" align="left"><?php 
    echo $cheque->RetornaDados('recebidode');
    ?>
</td>
      <td width="123" height="23" align="left"><?php 
    echo $cheque->RetornaDados('encaminhadopara');
    ?>
</td>
      <td width="123" height="23" align="left"><?php 
    echo converte_data($cheque->RetornaDados('compensacao'), 2);
    ?>
</td>
      <td width="80" height="23" align="right"><?php 
    echo $LANG['general']['currency'] . '' . money_form($cheque->RetornaDados('valor'));
    ?>
</td>
      <td width="66" align="center"><a href="javascript:Ajax('cheques/incluir', 'conteudo', 'codigo=<?php 
    echo $cheque->RetornaDados('codigo');
    ?>
&acao=editar')"><img src="imagens/icones/editar.gif" alt="" width="16" height="18" border="0"></a></td>
      <td width="66" align="center"><a href="javascript:Ajax('cheques/gerenciar', 'conteudo', 'codigo=<?php 
    echo $cheque->RetornaDados('codigo');
    ?>
" onclick="return confirmLink(this)"><img src="imagens/icones/excluir.gif" alt="" width="19" height="19" border="0"></a></td>
    </tr>
<?php 
}
?>
  </table>
echo $LANG['cash_flow']['total'];
?>
</b></td>
      <td width="13%" align="right"><b><?php 
echo $LANG['general']['currency'] . ' ' . money_form($saldod);
?>
</b></td>
      <td width="13%" align="right"><b><?php 
echo $LANG['general']['currency'] . ' ' . money_form($saldoc);
?>
</b></td>
      <td width="13%" align="right"><font color="#<?php 
echo $cor;
?>
"><b><?php 
echo $LANG['general']['currency'] . ' ' . money_form($saldo);
?>
</b></form></td>
      <td width="10%" align="center"></td>
    </tr>
  </table><br />
  <table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr bgcolor="#<?php 
echo $odev;
?>
" onmouseout="style.background='#<?php 
echo $odev;
?>
'" onmouseover="style.background='#DDE1E6'">
      <td width="20%">
      </td>
Beispiel #3
0
    ?>
</td>
        <td align="right"><?php 
    echo $LANG['general']['currency'] . ' ' . money_form($row_parcelas['valor']);
    ?>
</td>
      </tr>
<?php 
    $i++;
}
?>
      <tr>
        <td colspan="3" align="center"><b><?php 
echo $LANG['reports']['total'];
?>
:</b></td>
        <td align="right"><b><?php 
echo $LANG['reports']['currency'] . ' ' . money_form($total);
?>
</b></td>
      </tr>
    </table></td>
  </tr>
</table>
<?php 
include "../timbre_foot.php";
?>
<script>
window.print();
</script>
    ?>
">
          <td width="15%">Orçamento <?php 
    echo $i + 1;
    ?>
</td>
          <td width="34%"><?php 
    echo $dentista->RetornaDados('titulo') . ' ' . $nome;
    ?>
</td>
          <td width="13%"><?php 
    echo converte_data($row[data], 2);
    ?>
</td>
          <td width="14%" align="right">R$ <?php 
    echo money_form($row[valortotal] - $row[valortotal] * ($row[desconto] / 100));
    ?>
</td>
          <td width="11%"><div align="center"><a href="javascript:Ajax('pacientes/orcamentofechar', 'conteudo', 'codigo=<?php 
    echo $_GET[codigo];
    ?>
&indice_orc=<?php 
    echo $i + 1;
    ?>
&acao=editar&subacao=editar&codigo_orc=<?php 
    echo $row[codigo];
    ?>
')"><img src="imagens/icones/editar.gif" border="0" alt="Editar" width="16" height="18" /></div></td>
          <td width="14%"><div align="center"><?php 
    echo $row['confirmado'] == 'Não' ? '' : '<img src="imagens/icones/ok.gif" border="0" alt="Confirmado" width="19" height="19" />';
    ?>
 *
 */
include "../lib/config.inc.php";
include "../lib/func.inc.php";
include "../lib/classes.inc.php";
require_once '../lang/' . $idioma . '.php';
header("Content-type: text/html; charset=ISO-8859-1", true);
if (!checklog()) {
    echo '<script>Ajax("wallpapers/index", "conteudo", "");</script>';
    die;
}
if (isset($_POST['Salvar'])) {
    $row = mysql_fetch_array(mysql_query("SELECT * FROM v_orcamento WHERE pago = 'Não' AND codigo_parcela = " . $_POST['parcela']));
    mysql_query("UPDATE parcelas_orcamento SET pago = 'Sim', datapgto = '" . date('Y-m-d') . "', valor = '" . $_POST['valor'] . "' WHERE codigo = " . $_POST['parcela']);
    mysql_query("INSERT INTO caixa (data, dc, valor, descricao) VALUES ('" . date('Y-m-d') . "', '+', '" . $_POST['valor'] . "', 'Pagamento da parcela " . $row['codigo_parcela'] . " - Paciente: " . $row['paciente'] . " - Dentista: " . $row['dentista'] . "')");
    echo '<script>if(confirm("' . $LANG['payment']['payment_successfully_done'] . '\\n\\n' . $LANG['payment']['patient'] . ': ' . $row['paciente'] . '\\n\\n' . $LANG['payment']['professional'] . ': ' . ($row['sexo_dentista'] == 'Masculino' ? 'Dr. ' : 'Dra. ') . $row['dentista'] . '\\n\\n' . $LANG['payment']['total_to_pay'] . ': ' . $LANG['general']['currency'] . ' ' . money_form($_POST['valor']) . '\\n\\n' . $LANG['payment']['deadline'] . ': ' . converte_data($row['data'], 2) . '\\n\\n' . $LANG['payment']['payment_date'] . ': ' . date('d/m/Y') . '\\n\\n' . $LANG['payment']['do_you_wish_to_print_the_receipt'] . '")) { window.open("relatorios/recibo.php?codigo_parcela=' . $_POST['parcela'] . '", "' . $LANG['payment']['receipt'] . '",  "height=350,width=320,status=yes,toolbar=no,menubar=no,location=no") }</script>';
}
?>
<div class="conteudo" id="conteudo_central">
  <table width="100%" border="0" cellpadding="0" cellspacing="0" class="conteudo">
    <tr>
      <td width="56%">&nbsp;&nbsp;&nbsp;<img src="pagamentos/img/parcelas.png" alt="<?php 
echo $LANG['payment']['payment'];
?>
"> <span class="h3"><?php 
echo $LANG['payment']['payment'];
?>
 </span></td>
      <td width="6%" valign="bottom"></td>
      <td width="36%" valign="bottom" align="right">&nbsp;</td>
      <td width="2%" valign="bottom">&nbsp;</td>
Beispiel #6
0
: <b><?php 
echo $row['paciente'];
?>
</b><br />
&nbsp;&nbsp;<?php 
echo $LANG['reports']['professional'];
?>
: <b><?php 
echo ($row['sexo_dentista'] == 'Masculino' ? 'Dr. ' : 'Dra. ') . $row['dentista'];
?>
</b><br />
&nbsp;&nbsp;<?php 
echo $LANG['reports']['value'];
?>
: <b><?php 
echo $LANG['general']['currency'] . ' ' . money_form($row['valor']);
?>
</b><br />
&nbsp;&nbsp;<?php 
echo $LANG['reports']['due_date'];
?>
: <b><?php 
echo converte_data($row['data'], 2);
?>
</b><br />
&nbsp;&nbsp;<?php 
echo $LANG['reports']['payment_date'];
?>
: <b><?php 
echo converte_data($row['datapgto'], 2);
?>
        onblur="if(this.value=='') { this.value='0' }; javascript:atualiza_valor()" />
      </td>
    </tr>
    <tr align="left">
      <td>
        <?php 
    echo $LANG['payment']['total_to_pay'];
    ?>
:
      </td>
      <td>
        <b><div id="valor_total"><?php 
    echo $LANG['general']['currency'];
    ?>
 <?php 
    echo money_form($row['valor']);
    ?>
</div></b>
        <input type="hidden" name="valor" id="valor" value="<?php 
    echo $row['valor'];
    ?>
">
      </td>
    </tr>
<?php 
}
?>
    <tr align="left">
      <td>
        <?php 
echo $LANG['payment']['date'];
			  <td colspan="2">&nbsp;
			    
			  </td>
			</tr>
  			<tr>
              <td align="left"><input <?php 
echo $disable;
?>
 type="checkbox" <?php 
echo $row['confirmado'] == 'Sim' ? 'checked' : '';
?>
 name="confirmed" id="confirmed" value="Sim"><label for="confirmed"> Orçamento confirmado</label></td>
    		  <td align="right"><strong>VALOR FINAL:</strong></td>
    		  <td><div align="center">
      		    <font size="2"><b>R$ <?php 
echo money_form($total_final);
?>
</b>
    		    </div></td>
  			</tr>
		</table>
        <br />
        <div align="center">
          <p>
            <input <?php 
echo $disable;
?>
 name="Salvar222" type="submit" class="forms" value="Salvar Or&ccedil;amento" />
          </p>

      </form>
echo $disable;
?>
 type="checkbox" <?php 
echo $row['confirmado'] == 'Sim' ? 'checked' : '';
?>
 name="confirmed" id="confirmed" value="Sim"><label for="confirmed"> <?php 
echo $LANG['patients']['confirmed_budget'];
?>
</label></td>
    		  <td align="right"><strong><?php 
echo $LANG['patients']['final_value'];
?>
:</strong></td>
    		  <td><div align="center">
      		    <font size="2"><b><?php 
echo $LANG['general']['currency'] . ' ' . money_form($total_final);
?>
</b>
    		    </div></td>
  			</tr>
		</table>
        <br />
        <div align="center">
          <p>
            <input <?php 
echo $disable;
?>
 name="Salvar222" type="submit" class="forms" value="<?php 
echo $LANG['patients']['save_budget'];
?>
" />
$lista = $caixa->ListCaixa("SELECT * FROM `caixa` ORDER BY `data` DESC,  `codigo` DESC LIMIT 9");
$par = "F0F0F0";
$impar = "F8F8F8";
for ($i = 0; $i < 9; $i++) {
    if ($lista[$i][dc] != '') {
        if ($i % 2 == 0) {
            $odev = $par;
        } else {
            $odev = $impar;
        }
        if ($lista[$i][dc] == "-") {
            $debito = $LANG['general']['currency'] . ' ' . money_form($lista[$i][valor]);
            $credito = '';
        } else {
            $debito = '';
            $credito = $LANG['general']['currency'] . ' ' . money_form($lista[$i][valor]);
        }
        $saldo = $caixa->SaldoTotal();
        for ($j = $i - 1; $j >= 0; $j--) {
            if ($lista[$j][dc] == '-') {
                $saldo += $lista[$j][valor];
            } else {
                $saldo -= $lista[$j][valor];
            }
        }
        ?>
    <tr bgcolor="#<?php 
        echo $odev;
        ?>
" onmouseout="style.background='#<?php 
        echo $odev;
    echo $LANG['patients']['budget'];
    ?>
 <?php 
    echo $i + 1;
    ?>
</td>
          <td width="34%"><?php 
    echo $dentista->RetornaDados('titulo') . ' ' . $nome;
    ?>
</td>
          <td width="13%"><?php 
    echo converte_data($row[data], 2);
    ?>
</td>
          <td width="14%" align="right"><?php 
    echo $LANG['general']['currency'] . ' ' . money_form($row[valortotal] - $row[valortotal] * ($row[desconto] / 100));
    ?>
</td>
          <td width="11%"><div align="center"><a href="javascript:Ajax('pacientes/orcamentofechar', 'conteudo', 'codigo=<?php 
    echo $_GET[codigo];
    ?>
&indice_orc=<?php 
    echo $i + 1;
    ?>
&acao=editar&subacao=editar&codigo_orc=<?php 
    echo $row[codigo];
    ?>
')"><img src="imagens/icones/editar.gif" border="0" alt="Editar" width="16" height="18" /></div></td>
          <td width="14%"><div align="center"><?php 
    echo $row['confirmado'] == 'Não' ? '' : '<img src="imagens/icones/ok.gif" border="0" alt="Confirmado" width="19" height="19" /> ' . (mysql_num_rows(mysql_query("SELECT * FROM parcelas_orcamento WHERE codigo_orcamento = " . $row['codigo'] . " AND pago = 'Não'")) > 0 ? $LANG['patients']['open'] : $LANG['patients']['paid']);
    ?>