public function update(Cheque $cheque) { $query = $this->_db->prepare(' UPDATE t_cheque SET dateCheque=:dateCheque,numero=:numero,designationSociete=:designationSociete,designationPersonne=:designationPersonne,montant=:montant,statut=:statut,idProjet=:idProjet WHERE id=:id') or die(print_r($this->_db->errorInfo())); $query->bindValue(':id', $cheque->id()); $query->bindValue(':dateCheque', $cheque->dateCheque()); $query->bindValue(':numero', $cheque->numero()); $query->bindValue(':designationSociete', $cheque->designationSociete()); $query->bindValue(':designationPersonne', $cheque->designationPersonne()); $query->bindValue(':montant', $cheque->montant()); $query->bindValue(':statut', $cheque->statut()); //$query->bindValue(':url', $cheque->url()); $query->bindValue(':idProjet', $cheque->idProjet()); $query->execute(); $query->closeCursor(); }
include "tupi.inicializar.php"; $codTemplate = "relatorioHorizontal"; include "tupi.template.inicializar.php"; $codAcesso = 36; include "tupi.seguranca.php"; //titulo do relatorio $tpl->TITULO = "Relatório Geral por período"; $tpl->DATA_RELATORIO = "Data/Hora:" . date("d/m/Y h:i:s"); //declara as classes $om = new Moeda(); $oP = new Pagamento(); $oTP = new TipoPagamento(); $oTT = new TipoTransferencia(); $oG = new Grupo(); $oPartic = new Participante(); $oC = new Cheque(); //TOTAIS GERAL $custoDollarTotal = 0; $recebimentoDollarTotal = 0; $recebimentoRealTotal = 0; $valorEspecieTotal = 0; $valorCartaoTotal = 0; $valorDebitoTotal = 0; $valorChequeTotal = 0; $valorTEDTotal = 0; $valorDOCTotal = 0; $valorTransfTotal = 0; $valorDepositoTotal = 0; $valorCreditoClienteTotal = 0; $dataRelatorio = $om->convdata($_REQUEST['dataInicio'], "ntm"); $dataFimRelatorio = $om->convdata($_REQUEST['dataFim'], "ntm");
redirect_to('../index.php'); } if (isset($_GET['tid']) && !empty($_GET['tid'])) { $tenant_id = (int) $_GET['tid']; if (!is_int($tenant_id)) { $mesg = "Cheque payments from user could not be displayed. An invalid value was sent through the URL"; $session->message($mesg); redirect_to('tenants.php'); } else { $tenant = Tenant::findById($tenant_id); if (is_null($tenant)) { $mesg = "Tenant could not be found in the system"; $session->message($mesg); redirect_to("tenants.php"); } $cheques = Cheque::findByTenantId($tenant_id); if (empty($cheques)) { $mesg = "No corresponding cheque payments found"; $session->message($mesg); redirect_to("tenant.php?tid={$tenant_id}"); } } } include_layout_template('admin_header.php'); ?> <div id="container"> <h3>Actions</h3> <div id="side-bar"> <?php $actions = array("tenants" => "Tenants", "tenant_search" => "Search Tenant", "tenants_old" => "Previous Tenants");
$total; foreach ((array) $objVenta as $key) { foreach ($key as $key2) { $total = $key2['SUM(ven_valor_neto)']; } } $objCheque = new Cheque(); $objCheque->selectTotalCheque($fecha); $totalCheque; foreach ((array) $objCheque as $key) { foreach ($key as $key2) { $totalCheque = $key2['SUM(che_monto)']; } } $selectNumeroCheque; $objNuCheque = new Cheque(); $objNuCheque->selectNumeroCheque($fecha); $totalCheque; foreach ((array) $objNuCheque as $key) { foreach ($key as $key2) { $selectNumeroCheque = $key2['COUNT(che_monto)']; } } $pdf->Cell(95, 10, utf8_decode('Fecha'), 1, 0, 'C'); $pdf->Cell(95, 10, utf8_decode($fecha), 1, 0, 'C'); $pdf->Ln(40); $pdf->Cell(95, 10, utf8_decode('Monto Efectivo'), 1, 0, 'C'); $pdf->Cell(95, 10, utf8_decode(number_format($total - $totalCheque, 0, ',', '.')), 1, 0, 'C'); $pdf->Ln(10); $pdf->Cell(95, 10, utf8_decode('Monto Cheque'), 1, 0, 'C'); $pdf->Cell(95, 10, utf8_decode(number_format($totalCheque, 0, ',', '.')), 1, 0, 'C');
<?php include "tupi.inicializar.php"; $codTemplate = "relatorioHorizontal"; include "tupi.template.inicializar.php"; $codAcesso = 35; include "tupi.seguranca.php"; //titulo do relatorio $tpl->TITULO = "Relatório Por Período de Cheques Pré-datados"; $tpl->DATA_RELATORIO = "Data/Hora:" . date("d/m/Y h:i:s"); $oStatus = new StatusCheque(); $rsstatus = $oStatus->getRows(); $om = new Moeda(); $oC = new Cheque(); $dataRelatorio = $_REQUEST['dataInicio'] != "" ? $oC->convdata($_REQUEST['dataInicio'], "ntm") : ""; $dataFimRelatorio = $_REQUEST['dataFim'] != "" ? $oC->convdata($_REQUEST['dataFim'], "ntm") : ""; $rs = $oC->pesquisa($dataRelatorio, $dataFimRelatorio, $_REQUEST['numero'], $_REQUEST['status']); $total = 0; foreach ($rs as $key => $cheque) { $tpl->ID_PARTICIPANTE = $cheque->pagamento->participante->id; $tpl->NOME_PARTICIPANTE = $cheque->pagamento->participante->cliente->nomeCompleto; $tpl->EMISSOR = $cheque->emissor->nomeCompleto; $tpl->ID_CLIENTE_HASH = $om->md5_encrypt($cheque->emissor->id); $tpl->GRUPO = $cheque->pagamento->participante->grupo->nomePacote; $tpl->BANCO = $cheque->pagamento->banco->sigla; $tpl->NUMERO = $cheque->numeroCheque; $tpl->DATA = $oC->convData($cheque->dataCompensacao, "mtn"); $tpl->VALOR = $oC->money($cheque->valor, "atb"); $tpl->STATUS = $cheque->status->descricao; $total += $cheque->valor; $tpl->IDCHEQUE = $cheque->id;
* DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <*****@*****.**> * @copyright 2007-2011 PrestaShop SA * @version Release: $Revision: 7734 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ include dirname(__FILE__) . '/../../config/config.inc.php'; include dirname(__FILE__) . '/../../header.php'; include dirname(__FILE__) . '/cheque.php'; $cheque = new Cheque(); if ($cart->id_customer == 0 or $cart->id_address_delivery == 0 or $cart->id_address_invoice == 0 or !$cheque->active) { Tools::redirectLink(__PS_BASE_URI__ . 'order.php?step=1'); } // Check that this payment option is still available in case the customer changed his address just before the end of the checkout process $authorized = false; foreach (Module::getPaymentModules() as $module) { if ($module['name'] == 'cheque') { $authorized = true; break; } } if (!$authorized) { die(Tools::displayError('This payment method is not available.')); } $customer = new Customer((int) $cart->id_customer);
require_once '../model/classCheque.php'; $objVenta = new Venta(); $objVenta->selectVenta(); $numVenta = 0; foreach ((array) $objVenta as $key) { foreach ($key as $value) { $numVenta = $value['MAX(ven_id)'] + 1; } } $json['success'] = true; $objVenta->insertVenta($numVenta, $_POST['fecha'], $_POST['valor'], $_POST['cliId']); if ($objVenta) { $json['msg'] = 'Venta creada.'; } $objTipo = new Venta(); $cheque = new Cheque(); if ($_POST['cheque'] != 0) { $objTipo->insertTipo($_POST['fecha'], $numVenta); foreach ($_POST['array'] as $key => $value) { $numero = $value['numero']; $banco = $value['banco']; $fechaCheque = $value['fechaCheque']; $titular = $value['titular']; $monto = $value['monto']; $cheque->insertCheque($numero, $banco, $fechaCheque, $titular, $monto, $numVenta); } } session_start(); $objProducto = new Venta(); require_once '../model/classCarrito.php'; $carrito->get_content();
<?php include "tupi.inicializar.php"; $codTemplate = "relatorio"; include "tupi.template.inicializar.php"; $codAcesso = 13; include "tupi.seguranca.php"; $pag = new Pagamento(); $cheque = new Cheque(); $moeda = new Moeda(); $pag->getById($pag->md5_decrypt($_REQUEST['idPagamento'])); $cliente = $pag->participante->cliente; $grupo = $pag->participante->grupo; $moeda = $pag->moeda; $oTipoP = new TipoPagamento(); if ($cliente->sexo == "F") { $tpl->ARTIGO = "a"; $tpl->SENHOR = "Sra."; } else { $tpl->ARTIGO = "o"; $tpl->SENHOR = "Sr."; } $tpl->NUMERO = str_pad($pag->id, 6, "0", STR_PAD_LEFT); $tpl->NOME_COMPLETO = $cliente->nomeCompleto; $tpl->VALOR = $pag->money($pag->CALCULA_REAL(), "atb"); //$velhos = array("Reais", "REAIS", "REAL", "Real"); //$novos = array($moeda->plural, strtoupper($moeda->plural), strtoupper($moeda->descricao),$moeda->descricao); $extenso = $pag->extenso($pag->money($pag->CALCULA_REAL(), "atb"), true); $tpl->VALOR_EXTENSO = $extenso; $tpl->REFERENTE = $pag->obs; $tpl->FINALIDADE = $pag->finalidade->descricao;
} } $selectNumeroCheque; $pdf->Cell(95, 10, utf8_decode('Fecha'), 1, 0, 'C'); $pdf->Cell(95, 10, utf8_decode($fecha1), 1, 0, 'C'); $pdf->Ln(20); $pdf->Cell(95, 10, utf8_decode('Monto Efectivo'), 1, 0, 'C'); $pdf->Cell(95, 10, utf8_decode(number_format($total - $totalCheque, 0, ',', '.')), 1, 0, 'C'); $pdf->Ln(10); $pdf->Cell(95, 10, utf8_decode('Monto Cheque'), 1, 0, 'C'); $pdf->Cell(95, 10, utf8_decode(number_format($totalCheque, 0, ',', '.')), 1, 0, 'C'); $pdf->Ln(20); $pdf->Cell(95, 10, utf8_decode('Total Diario'), 1, 0, 'C'); $pdf->Cell(95, 10, utf8_decode(number_format($total, 0, ',', '.')), 1, 0, 'C'); $pdf->Ln(20); $objCheques = new Cheque(); $objCheques->listChequeMes($fecha1, $fecha2); foreach ((array) $objCheques as $key) { $pdf->Cell(50, 10, utf8_decode('Cantidad de cheques: ' . count($key))); $pdf->Ln(10); $pdf->Cell(20, 10, utf8_decode('Número'), 1, 0, 'C'); $pdf->Cell(25, 10, utf8_decode('Fecha'), 1, 0, 'C'); $pdf->Cell(40, 10, utf8_decode('Banco'), 1, 0, 'C'); $pdf->Cell(50, 10, utf8_decode('Titular'), 1, 0, 'C'); $pdf->Cell(25, 10, utf8_decode('Fecha pago'), 1, 0, 'C'); $pdf->Cell(30, 10, utf8_decode('Monto'), 1, 0, 'C'); $pdf->Ln(10); foreach ($key as $key2) { $pdf->Cell(20, 10, utf8_decode($key2['che_numero']), 1, 0, 'C'); $pdf->Cell(25, 10, utf8_decode($key2['tip_fecha']), 1, 0, 'C'); $pdf->Cell(40, 10, utf8_decode($key2['che_banco']), 1, 0, 'C');
<?php include dirname(__FILE__) . '/../../config/config.inc.php'; include dirname(__FILE__) . '/../../header.php'; include dirname(__FILE__) . '/cheque.php'; $currency = new Currency(intval(isset($_POST['currency_payement']) ? $_POST['currency_payement'] : $cookie->id_currency)); $total = floatval(number_format($cart->getOrderTotal(true, 3), 2, '.', '')); $mailVars = array('{cheque_name}' => Configuration::get('CHEQUE_NAME'), '{cheque_address}' => Configuration::get('CHEQUE_ADDRESS'), '{cheque_address_html}' => nl2br(Configuration::get('CHEQUE_ADDRESS'))); $cheque = new Cheque(); $cheque->validateOrder($cart->id, _PS_OS_CHEQUE_, $total, $cheque->displayName, NULL, $mailVars, $currency->id); $order = new Order($cheque->currentOrder); Tools::redirectLink(__PS_BASE_URI__ . 'order-confirmation.php?id_cart=' . $cart->id . '&id_module=' . $cheque->id . '&id_order=' . $cheque->currentOrder . '&key=' . $order->secure_key);
<? include("../tupi.inicializar.php"); include("../tupi.template.inicializar.php"); $oSC = new StatusCheque(); $oC = new Cheque(); $oC->getById($_REQUEST['idCheque']); $oSC->getById($_REQUEST['status']); $oC->status = $oSC; $oC->save(); $tpl->STATUS = $oSC->descricao; $tpl->IDCHEQUE = $oC->id; $rsstatus = $oSC->getRows(); foreach ($rsstatus as $key => $status){ $tpl->ID_STATUS = $status->id; $tpl->LABEL_STATUS = $status->descricao; $tpl->block("BLOCK_STATUS"); } include("../tupi.template.finalizar.php"); ?>
///////////////////////////////////////////////////////////////// ///////////////////////// PROCESS SUBMIT //////////////////////// ///////////////////////////////////////////////////////////////// if (isset($_POST['submit'])) { $tenant_id = $_GET['tid']; $cheque_no = $_POST['cheque_no']; $bank = $_POST['bank']; $branch = $_POST['branch']; $drawer = $_POST['drawer']; $start = $_POST['start_date']; $end = $_POST['end_date']; $type = $session->sessionVar('type'); if (empty($cheque_no) || empty($bank) || empty($branch) || empty($drawer) || empty($start) || empty($end)) { $err = "Form fields marked with an asterix are required"; } else { $cheque = new Cheque(); $cheque->setTenantId($tenant_id); $cheque->setChequeNo($cheque_no); $cheque->setBank($bank); $cheque->setBranch($branch); $cheque->setDrawer($drawer); $cheque->setStartPeriod($start); $cheque->setEndPeriod($end); $cheque->setDatePaid(); $cheque->setPaymentType($type); /*echo var_dump($cheque); echo var_dump($session->sessionVar("type"));*/ if ($cheque->save()) { $mesg = "Payment posted"; $session->message($mesg); redirect_to("receipt.php?tid={$tenant_id}&id={$last_id}&type={$type}");
<?php require_once '../model/classVenta.php'; require_once '../model/classCheque.php'; $fecha = $_SESSION['date']; $objVenta = new Venta(); $objVenta->selectTotal($fecha); $total; foreach ((array) $objVenta as $key) { foreach ($key as $key2) { $total = $key2['SUM(ven_valor_neto)']; } } $objCheque = new Cheque(); $objCheque->selectTotalCheque($fecha); $totalCheque; foreach ((array) $objCheque as $key) { foreach ($key as $key2) { $totalCheque = $key2['SUM(che_monto)']; } } ?> <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label"> <input class="mdl-textfield__input" type="text" pattern="[0-9]*" id="closingCashMoneySis" value="<?php echo $total - $totalCheque; ?> " disabled="disabled"> <label for="closingCashMoneySis">Efectivo</label> <span class="mdl-textfield__error">Ingresar solo números</span> </div>
function incluirPagamento() { $oPartic = new Participante(); $oPartic->getById($this->md5_decrypt($_REQUEST['idParticipante'])); $oTipoP = new TipoPagamento(); $oFin = new FinalidadePagamento(); $oFin->id = $_REQUEST['finalidade']; $oTipoP->getById($_REQUEST['tipo']); $om = new Moeda(); $om->getById($_REQUEST['moeda']); $this->dataPagamento = $this->convdata($_REQUEST['dataPagamento'], "ntm"); $this->obs = $_REQUEST['obs']; $this->abatimentoAutomatico = isset($_REQUEST['abatimentoAutomatico']) ? 1 : 0; $this->moeda = $om; $this->participante = $oPartic; $this->tipo = $oTipoP; $this->finalidade = $oFin; $this->cancelado = 0; $this->devolucao = $_REQUEST['dev']; $this->valorParcela = 0; switch ($_REQUEST['tipo']) { case $oTipoP->DINHEIRO(): $this->valorPagamento = $this->money($_REQUEST['valorPagamento'], "bta"); $this->cotacaoMoedaReal = isset($_REQUEST['cotacaoMoedaReal']) ? $_REQUEST['cotacaoMoedaReal'] != "" ? $this->money($_REQUEST['cotacaoMoedaReal'], "bta") : 0 : 0; $this->cotacaoReal = $this->money($_REQUEST['cotacaoReal'], "bta"); $this->parcela = 1; break; case $oTipoP->CARTAO(): $this->valorPagamento = $this->money($_REQUEST['valorPagamento'], "bta"); $this->valorParcela = $this->money($_REQUEST['valorParcela'], "bta"); $this->cotacaoMoedaReal = 0; $this->cotacaoReal = $this->money($_REQUEST['cotacaoReal'], "bta"); $this->codAutorizacao = isset($_REQUEST['codAutorizacao']) ? $_REQUEST['codAutorizacao'] : ""; $this->parcela = $_REQUEST['parcelaCartao']; $oband = new BandeiraCartao(); $oband->id = $_REQUEST['bandeira']; $this->bandeira = $oband; break; case $oTipoP->DEBITO(): $this->cotacaoMoedaReal = 0; $this->codAutorizacao = isset($_REQUEST['codAutorizacao']) ? $_REQUEST['codAutorizacao'] : ""; $this->valorPagamento = $this->money($_REQUEST['valorPagamento'], "bta"); $this->cotacaoReal = $this->money($_REQUEST['cotacaoReal'], "bta"); $this->parcela = 1; $oband = new BandeiraCartao(); $oband->id = $_REQUEST['bandeira']; $this->bandeira = $oband; break; case $oTipoP->CHEQUE(): $ob = new Banco(); $ob->id = $_REQUEST['banco']; $this->banco = $ob; $Status = new StatusCheque(); $Status->id = 1; $oclienteEmissor = new Cliente(); $arrayEmissor = explode("-", $_REQUEST['nomeEmissor']); if (count($arrayEmissor) > 1) { $oclienteEmissor->id = $arrayEmissor[1]; } else { $oec = new EstadoCivil(); $oec->id = 1; $oclienteEmissor->nomeCompleto = $_REQUEST['nomeEmissor']; $oclienteEmissor->oclienteEmissor->cpf = ""; $oclienteEmissor->estadoCivil = $oec; $oclienteEmissor->dataNascimento = date("Y-m-d"); $oclienteEmissor->sexo = ""; $oclienteEmissor->endereco = ""; $oclienteEmissor->bairro = ""; $oclienteEmissor->cep = ""; $oclienteEmissor->telefoneResidencial = ""; $oclienteEmissor->telefoneComercial = ""; $oclienteEmissor->celular = ""; $oclienteEmissor->fax = ""; $oclienteEmissor->rg = ""; $oclienteEmissor->orgaoEmissorRg = ""; $oclienteEmissor->passaporte = ""; $oclienteEmissor->nomeCracha = ""; $oclienteEmissor->tamanhoCamisa = ""; $oclienteEmissor->problemasSaude = ""; $oclienteEmissor->restricaoAlimentar = ""; $oclienteEmissor->email = ""; $oclienteEmissor->nacionalidade = ""; $oclienteEmissor->cidadeEndereco = ""; $oclienteEmissor->estadoEndereco = ""; $oclienteEmissor->paisEndereco = ""; $oclienteEmissor->cidadeNascimento = ""; $oclienteEmissor->paisNascimento = ""; $oclienteEmissor->estadoNascimento = ""; $oclienteEmissor->preferencial = 0; $oclienteEmissor->enviaCorrespondencia = 0; $oclienteEmissor->save(); } $this->parcela = 1; $this->emissorCheque = $oclienteEmissor; $this->numeroCheque = isset($_REQUEST['numeroCheque1']) ? $_REQUEST['numeroCheque1'] : ""; $this->dataCompensacao = isset($_REQUEST['dataCompensacao1']) ? $this->convdata($_REQUEST['dataCompensacao1'], "ntm") : ''; $this->valorPagamento = $this->money($_REQUEST['valorCheque1'], "bta"); $this->cotacaoReal = $this->money($_REQUEST['cotacaoReal'], "bta"); $this->cotacaoMoedaReal = 0; break; case $oTipoP->BANCO(): $ott = new TipoTransferencia(); $ott->id = $_REQUEST['tipoTranferencia']; $this->tipoTransferencia = $ott; $this->valorPagamento = $this->money($_REQUEST['valorPagamento'], "bta"); $this->cotacaoReal = $this->money($_REQUEST['cotacaoReal'], "bta"); $this->cotacaoMoedaReal = 0; $this->parcela = 1; break; case $oTipoP->CREDITO(): //atualizar o credito para utilizado $oCredito = new Credito(); $oCredito->getById($_REQUEST['credito']); $oCredito->bitUtilizado = 1; $oCredito->save(); $this->valorPagamento = $oCredito->valor; $this->moeda = $oCredito->moeda; $this->creditoCliente = $oCredito; $this->cotacaoReal = $this->money($_REQUEST['cotacaoReal'], "bta"); $this->cotacaoMoedaReal = 0; $this->parcela = 1; break; case $oTipoP->CARNE(): $this->parcela = 1; $this->dataCompensacao = isset($_REQUEST['dataVencimento1']) ? $this->convdata($_REQUEST['dataVencimento1'], "ntm") : ''; $this->valorPagamento = $this->money($_REQUEST['valorCarne1'], "bta"); $this->cotacaoReal = $this->money($_REQUEST['cotacaoReal'], "bta"); $this->cotacaoMoedaReal = 0; break; } $idPagamento = $this->save(); //cheques if ($oTipoP->CHEQUE() == $_REQUEST['tipo']) { $parcelas = 0; $valorTotal = 0; for ($i = 1; $i <= 10; $i++) { if ($_REQUEST['dataCompensacao' . $i] != "" && $_REQUEST['numeroCheque' . $i] != "" && $_REQUEST['valorCheque' . $i] != "") { //inclui o cheque $parcelas++; $oCheque = new Cheque(); $oCheque->status = $Status; $oCheque->emissor = $oclienteEmissor; $oCheque->numeroCheque = $_REQUEST['numeroCheque' . $i]; $oCheque->valor = $ob->money($_REQUEST['valorCheque' . $i], "bta"); $oCheque->pagamento = $this; $oCheque->dataCompensacao = $ob->convdata($_REQUEST['dataCompensacao' . $i], "ntm"); $oCheque->parcela = $i; $oCheque->save(); $valorTotal += $oCheque->valor; } } $this->parcela = $parcelas; $this->emissorCheque = $oclienteEmissor; $this->numeroCheque = isset($_REQUEST['numeroCheque1']) ? $_REQUEST['numeroCheque1'] : ""; $this->dataCompensacao = isset($_REQUEST['dataCompensacao1']) ? $this->convdata($_REQUEST['dataCompensacao1'], "ntm") : ''; $this->cotacaoReal = $this->money($_REQUEST['cotacaoReal'], "bta"); $this->cotacaoMoedaReal = 0; $this->valorPagamento = $valorTotal; $this->save(); } //carnes if ($oTipoP->CARNE() == $_REQUEST['tipo']) { $parcelas = 0; $valorTotal = 0; for ($i = 1; $i <= $_REQUEST['parcelaCarne']; $i++) { if ($_REQUEST['dataVencimento' . $i] != "" && $_REQUEST['valorCarne' . $i] != "") { //inclui o cheque $parcelas++; $oCarne = new Carne(); $oCarne->valor = $oCarne->money($_REQUEST['valorCarne' . $i], "bta"); $oCarne->pagamento = $this; $oCarne->dataVencimento = $oCarne->convdata($_REQUEST['dataVencimento' . $i], "ntm"); $oCarne->parcela = $i; $oCarne->save(); $valorTotal += $oCarne->valor; } } $this->parcela = $parcelas; $this->dataCompensacao = isset($_REQUEST['dataVencimento1']) ? $this->convdata($_REQUEST['dataVencimento1'], "ntm") : ''; $this->cotacaoReal = $this->money($_REQUEST['cotacaoReal'], "bta"); $this->cotacaoMoedaReal = 0; $this->valorPagamento = $valorTotal; $this->save(); } //REALIZA O ABATIMENTO AUTOMATICO DO PARTICIPANTE if ($this->abatimentoAutomatico == 1) { if ($oTipoP->CARTAO() == $_REQUEST['tipo'] && $this->codAutorizacao != "" || $oTipoP->CARTAO() != $_REQUEST['tipo']) { $oG = new Grupo(); $oG->getById($this->md5_decrypt($_REQUEST['idGrupo'])); $oAbat = new Abatimento(); if ($oG->moeda->id == $om->DOLLAR()) { $oAbat->valor = $this->devolucao == 0 ? $this->CALCULA_DOLLAR() : -$this->CALCULA_DOLLAR(); } else { $oAbat->valor = $this->devolucao == 0 ? $this->CALCULA_REAL() : -$this->CALCULA_REAL(); } $oAbat->participante = $oPartic; $oAbat->pagamento = $this; $oAbat->save(); } } //FAZ A CONFERENCIA PARA MUDAR O STATUS DO PARTICIPANTE $oPartic->atualiza_status(); //grava log de pagamento $oLog = new LogUsuario(); $usuario = new Usuario(); $usuario->id = $_SESSION['ag_idUsuario']; $data = date("Y-m-d H:i:s"); $movimento = "INCLUIR PAGAMENTO<BR> MOEDA: " . $this->moeda->descricao . "<BR> VALOR: " . $this->money($this->valorPagamento, "atb") . "<BR> TIPO: " . $this->tipo->descricao . "<BR> CLIENTE: " . $this->participante->cliente->nomeCompleto . "<BR> GRUPO: " . $this->participante->grupo->nomePacote; $oLog->usuario = $usuario; $oLog->data = $data; $oLog->movimento = $movimento; $oLog->save(); //fim da log $_SESSION['tupi.mensagem'] = 36; return $idPagamento; }
private static function eliminarCheques($id_abono, $compra = null, $venta = null, $prestamo = null) { $resultados = null; $from = 0; //valida si el abono sera de compra, de venta o de prestamo //y se obtinen los cheques relacionados con dicho abono if ($compra) { $cheque_abono_compra = new ChequeAbonoCompra(); $cheque_abono_compra->setIdAbonoCompra($id_abono); $resultados = ChequeAbonoCompraDAO::search($cheque_abono_compra); $from = 1; } else { if ($venta) { $cheque_abono_venta = new ChequeAbonoVenta(); $cheque_abono_venta->setIdAbonoVenta($id_abono); $resultados = ChequeAbonoVentaDAO::search($cheque_abono_venta); $from = 2; } else { if ($prestamo) { $cheque_abono_prestamo = new ChequeAbonoPrestamo(); $cheque_abono_prestamo->setIdAbonoPrestamo($id_abono); $resultados = ChequeAbonoPrestamoDAO::search($cheque_abono_prestamo); $from = 3; } else { Logger::error("No se recibio si se eliminaran de una compra, una venta o un prestamo los cheques"); throw new Exception("No se recibio si los cheques se eliminaran de una compra, una venta o un prestamo"); } } } $cheque = new Cheque(); //Si no se han encontrado cheques, regresa if (is_null($resultados)) { return; } DAO::transBegin(); try { //Se eliminan todos los registros encontrados para dicho abono foreach ($resultados as $resultado) { $cheque->setIdCheque($resultado->getIdCheque()); ChequeDAO::delete($cheque); switch ($from) { case 1: ChequeAbonoCompraDAO::delete($resultado); break; case 2: ChequeAbonoVentaDAO::delete($resultado); break; case 3: ChequeAbonoPrestamoDAO::delete($resultado); } } } catch (Exception $e) { DAO::transRollback(); Logger::error("No se pudieron borrar los cheques: " . $e); throw new Exception("No se pudieron borrar los cheques"); } DAO::transEnd(); }
<?php include "tupi.inicializar.php"; $codTemplate = "relatorio"; include "tupi.template.inicializar.php"; $codAcesso = 34; include "tupi.seguranca.php"; //titulo do relatorio $tpl->TITULO = "Relatório Mensal de Forma de Pagamento"; $tpl->DATA_RELATORIO = "Data/Hora:" . date("d/m/Y h:i:s"); $oC = new Cheque(); $om = new Moeda(); $oP = new Pagamento(); $oTP = new TipoPagamento(); $oTT = new TipoTransferencia(); $dataRelatorio = $_REQUEST['ano'] . "-" . $_REQUEST['mes'] . "-01"; $dataFimRelatorio = $oP->ultimoDiaMes($dataRelatorio); $filtro = array("dataPagamento" => "between '" . $dataRelatorio . "' and '" . $dataFimRelatorio . "'", "cancelado" => "=0"); $rs = $oP->getRows(0, 9999, array(), $filtro); $rsCheques = $oC->pesquisa($dataRelatorio, $dataFimRelatorio, "", 0); //$tpl->DATA_ATUAL = date("d/m/Y"); $valorEspecie = 0; $valorCartao = 0; $valorCheque = 0; $valorTED = 0; $valorDOC = 0; $valorTransf = 0; $valorDeposito = 0; $valorDebito = 0; //dollar $valorEspecied = 0;
} } $selectNumeroCheque; $pdf->Cell(95, 10, utf8_decode('Fecha'), 1, 0, 'C'); $pdf->Cell(95, 10, utf8_decode($fecha), 1, 0, 'C'); $pdf->Ln(20); $pdf->Cell(95, 10, utf8_decode('Monto Efectivo'), 1, 0, 'C'); $pdf->Cell(95, 10, utf8_decode(number_format($total - $totalCheque, 0, ',', '.')), 1, 0, 'C'); $pdf->Ln(10); $pdf->Cell(95, 10, utf8_decode('Monto Cheque'), 1, 0, 'C'); $pdf->Cell(95, 10, utf8_decode(number_format($totalCheque, 0, ',', '.')), 1, 0, 'C'); $pdf->Ln(20); $pdf->Cell(95, 10, utf8_decode('Total Diario'), 1, 0, 'C'); $pdf->Cell(95, 10, utf8_decode(number_format($total, 0, ',', '.')), 1, 0, 'C'); $pdf->Ln(20); $objCheques = new Cheque(); $objCheques->listChequeFecha($fecha); foreach ((array) $objCheques as $key) { $pdf->Cell(50, 10, utf8_decode('Cantidad de cheques: ' . count($key))); $pdf->Ln(10); $pdf->Cell(30, 10, utf8_decode('Número'), 1, 0, 'C'); $pdf->Cell(40, 10, utf8_decode('Banco'), 1, 0, 'C'); $pdf->Cell(60, 10, utf8_decode('Titular'), 1, 0, 'C'); $pdf->Cell(30, 10, utf8_decode('Fecha'), 1, 0, 'C'); $pdf->Cell(30, 10, utf8_decode('Monto'), 1, 0, 'C'); $pdf->Ln(10); foreach ($key as $key2) { $pdf->Cell(30, 10, utf8_decode($key2['che_numero']), 1, 0, 'C'); $pdf->Cell(40, 10, utf8_decode($key2['che_banco']), 1, 0, 'C'); $pdf->Cell(60, 10, utf8_decode($key2['che_titular']), 1, 0, 'C'); $pdf->Cell(30, 10, utf8_decode($key2['che_fecha']), 1, 0, 'C');
* obtain it through the world-wide-web, please send an email * to license@prestashop.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <*****@*****.**> * @copyright 2007-2011 PrestaShop SA * @version Release: $Revision: 6935 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ include dirname(__FILE__) . '/../../config/config.inc.php'; include dirname(__FILE__) . '/../../header.php'; include dirname(__FILE__) . '/cheque.php'; $cheque = new Cheque(); if ($cart->id_customer == 0 or $cart->id_address_delivery == 0 or $cart->id_address_invoice == 0 or !$cheque->active) { Tools::redirectLink(__PS_BASE_URI__ . 'order.php?step=1'); } $customer = new Customer((int) $cart->id_customer); if (!Validate::isLoadedObject($customer)) { Tools::redirectLink(__PS_BASE_URI__ . 'order.php?step=1'); } $currency = new Currency((int) (Tools::isSubmit('currency_payement') ? Tools::getValue('currency_payement') : $cookie->id_currency)); $total = (double) $cart->getOrderTotal(true, Cart::BOTH); $mailVars = array('{cheque_name}' => Configuration::get('CHEQUE_NAME'), '{cheque_address}' => Configuration::get('CHEQUE_ADDRESS'), '{cheque_address_html}' => str_replace("\n", '<br />', Configuration::get('CHEQUE_ADDRESS'))); $cheque->validateOrder((int) $cart->id, _PS_OS_CHEQUE_, $total, $cheque->displayName, NULL, $mailVars, (int) $currency->id, false, $customer->secure_key); Tools::redirectLink(__PS_BASE_URI__ . 'order-confirmation.php?id_cart=' . (int) $cart->id . '&id_module=' . (int) $cheque->id . '&id_order=' . $cheque->currentOrder . '&key=' . $customer->secure_key);
<? include("../tupi.inicializar.php"); include("../tupi.template.inicializar.php"); $oTipoP = new TipoPagamento(); $oMoeda = new moeda(); $oBanco = new Banco(); $oTipot = new TipoTransferencia(); $oPag = new Pagamento(); $oCred = new Credito(); $oCliente = new Cliente(); $oCheque = new Cheque(); $oCarne = new Carne(); $oParticipante = new Participante(); $oParticipante->getById($_REQUEST['idParticipante']); $tpl->ID_PARTICIPANTE_REP = $_REQUEST['idParticipante']; $tpl->ID_TIPO = $_REQUEST['idTipo']; $idMoedaEdita = 0; $idBancoEdita = 0; $idBandeiraEdita = 0; $idTipoTransf = 0; $idCredito = 0; $tpl->CAMBIO_DOLLAR_REAL = 0; $tpl->COD_AUTORIZACAO = ""; $tpl->DATA_COMPENSACAO = ""; $tpl->NUMERO_CHEQUE = ""; $tpl->CAMBIO_MOEDA_REAL = 0; $tpl->NOME_EMISSOR = $oParticipante->cliente->nomeCompleto."-".$oParticipante->cliente->id; if(isset($_REQUEST['idPagamento']) && strlen($_REQUEST['idPagamento']) > 0){ $oPag->getById($_REQUEST['idPagamento']); $idMoedaEdita = $oPag->moeda->id;
<?php require_once '../model/classCheque.php'; $objCheque = new Cheque(); $objCheque->listCheque($_GET['client']); foreach ((array) $objCheque as $key) { foreach ($key as $value) { ?> <p> N°: <?php echo $value['che_numero']; ?> <?php echo $value['che_banco']; ?> Fecha: <?php echo $value['che_fecha']; ?> Monto: <?php echo $value['che_monto']; ?> </p> <?php } } ?>
* * @author PrestaShop SA <*****@*****.**> * @copyright 2007-2012 PrestaShop SA * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ /** * @deprecated 1.5.0 This file is deprecated, use moduleFrontController instead */ include dirname(__FILE__) . '/../../config/config.inc.php'; Tools::displayFileAsDeprecated(); include dirname(__FILE__) . '/../../header.php'; include dirname(__FILE__) . '/cheque.php'; $context = Context::getContext(); $cart = $context->cart; $cheque = new Cheque(); if ($cart->id_customer == 0 or $cart->id_address_delivery == 0 or $cart->id_address_invoice == 0 or !$cheque->active) { Tools::redirect('index.php?controller=order&step=1'); } // Check that this payment option is still available in case the customer changed his address just before the end of the checkout process $authorized = false; foreach (Module::getPaymentModules() as $module) { if ($module['name'] == 'cheque') { $authorized = true; break; } } if (!$authorized) { die($cheque->l('This payment method is not available.', 'validation')); } $customer = new Customer($cart->id_customer);
public static function NuevoCheque($nombre_banco, $monto, $numero, $expedido, $id_usuario = null) { Logger::log("creando cheque"); //Se validan los parametros obtenidos $validar = self::validarParametrosCheque(null, $nombre_banco, $monto, $numero, $expedido); if (is_string($validar)) { Logger::error($validar); throw new Exception($validar); } $cheque = new Cheque(); $cheque->setNombreBanco($nombre_banco); $cheque->setMonto($monto); $cheque->setNumero($numero); $cheque->setExpedido($expedido); if ($expedido) { $id_usuario = SesionController::getCurrentUser(); if (is_null($id_usuario)) { Logger::error("No se pudo obtener el usuario de la sesion, ya inicio sesion?"); throw new Exception("No se pudo obtener el usuario de la sesion, ya inicio sesion?"); } } $cheque->setIdUsuario($id_usuario); DAO::transBegin(); try { ChequeDAO::save($cheque); } catch (Exception $e) { DAO::transRollback(); Logger::error("No se pudo crear el cheque: " . $e); throw "No se pudo crear el cheque"; } DAO::transEnd(); Logger::log("Cheque creado exitosamente"); return $cheque->getIdCheque(); }
* This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@prestashop.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <*****@*****.**> * @copyright 2007-2012 PrestaShop SA * @version Release: $Revision: 14011 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ /* SSL Management */ $useSSL = true; include dirname(__FILE__) . '/../../config/config.inc.php'; include dirname(__FILE__) . '/../../header.php'; include dirname(__FILE__) . '/cheque.php'; if (!$cookie->isLogged(true)) { Tools::redirect('authentication.php?back=order.php'); } $cheque = new Cheque(); echo $cheque->execPayment($cart); include_once dirname(__FILE__) . '/../../footer.php';
<?php include "tupi.inicializar.php"; $codTemplate = "relatorioHorizontal"; include "tupi.template.inicializar.php"; $codAcesso = 38; include "tupi.seguranca.php"; set_time_limit(0); $oGrupo = new Grupo(); $oMoeda = new Moeda(); $oPagamento = new Pagamento(); $oAbatimento = new Abatimento(); $oTP = new TipoPagamento(); $oTT = new TipoTransferencia(); $oCheque = new Cheque(); $oGrupo->getById($oGrupo->md5_decrypt($_REQUEST['idGrupo'])); $tpl->COD_GRUPO = str_pad($oGrupo->id, 7, "0", STR_PAD_LEFT); $tpl->NOME_GRUPO = $oGrupo->nomePacote; $tpl->DATA_RELATORIO = "Data/Hora:" . date("d/m/Y h:i:s"); //recupera participantes aprovados $opartic = new Participante(); $rs = $opartic->participantesGrupo($oGrupo->id); $cont = 1; foreach ($rs as $key => $p) { $possuiCheques = 0; $tpl->ID = $cont; $tpl->PARTICIPANTE = $p->cliente->nomeCompleto; $tpl->STATUS = $p->status->descricao; //calcula custo: $custo = $p->custoTotal; $cotCustpo = $oGrupo->cotacaoCusto == 0 ? 1 : $oGrupo->cotacaoCusto;