<?php
	session_start();
	$ruta="../../../";
	include_once($ruta."class/credito.php");
	$credito=new credito;ito;
	include_once($ruta."class/dominio.php");
	$dominio=new dominio;
	extract($_POST);
	$fecha=date("Y-m-d");
	$valcredito=array(
		"saldoCCH"=>"'$monto'",
 	);
	if($credito->actualizar($valcredito,$idcredito)){

		?>
			<script type="text/javascript">
			swal({
				title: "Listo",
				text: "Cobro cerrado correctamente",
				type: "success",
				showCancelButton: false,
				confirmButtonColor: "#28e29e",
				confirmButtonText: "OK",
				closeOnConfirm: false
	          }, function () {
				location.reload();
	          });
			</script>
		<?php
	}else{
		?>
			<script type="text/javascript">
			swal("Ocurrio algun error actualize la pagina");
			</script>
		<?php
	}

?>