Exemplo n.º 1
0
        public string contenidoAperturaCaja(int idCaja)
        {
            DataTable datosApertura = MailTR.datosApertura(idCaja, General.getComputerName());
            string    data          = @"<html>
	                    <head>
		                    <title>Apertura de Caja Punto de Venta</title>
	                    </head>
	                    <body style='font-family:Helvetica, sans-serif; color:black;'>
		                    <div style='width:100%; float:left; padding-bottom:30px;'>
			                    <img style='float:left; margin-right:30px;' src='' alt='Logo Contífico' title='Contífico' width='160' height='50'/>
		                    </div>

		                    Estimado(a), se ha realizado la apertura de caja n° "         + idCaja + @" del punto de venta de " + datosApertura.Rows[0]["direccion"].ToString() + @".
		                    <br/>
                            <br/>
		                    <table>
			                    <tr>
				                    <td style='font-weight:bold;'>Fecha:</td>
				                    <td>"                 + datosApertura.Rows[0]["fecha"].ToString() + @"</td>
			                    </tr>
			                    <tr>
				                    <td style='font-weight:bold;'>Cajero:</td>
				                    <td>"                 + datosApertura.Rows[0]["cajero"].ToString() + @"</td>
			                    </tr>
			                    <tr>
				                    <td style='font-weight:bold;'>Monto:</td>
				                    <td>"                 + datosApertura.Rows[0]["monto"].ToString() + @"</td>
			                    </tr>
		                    </table></body></html>
                           ";

            return(data);
        }
Exemplo n.º 2
0
        public string contenidoCierreCaja(int idCaja, bool cierreManual)
        {
            DataTable datosAdicionales = MailTR.datosAdicionales(idCaja, General.getComputerName(), Global.idEmpleado);
            DataTable resumenGeneral   = MailTR.resumenGeneral(idCaja);
            DataTable ventasCategoria  = MailTR.ventaCategoria(idCaja);
            DataTable resumenCobros    = MailTR.resumenCobros(idCaja);
            DataTable redesCobro       = MailTR.resumenRedesCobro(idCaja);

            string data = @"<html>
	                    <head>
		                    <title>Cierre de Caja Punto de Venta</title>
	                    </head>
	                    <body style='font-family:Helvetica, sans-serif; color:black;'>

		                    <div style='width:100%; float:left; padding-bottom:30px;'>
			                    <img style='float:left; margin-right:30px;' src='' alt='Logo Contífico' title='Contífico' width='160' height='50'/>
			
			                    <div style='text-align:center; min-width:160px; float:left; border-style:solid; border-width:1px; margin-left:30px;'>
				                    <div style='font-size:10px; padding:5px; color:white; background-color:green;'><b>Total cobrado en el año</b></div>
				                    <div style='font-size:14px; padding:0px 10px 0px 10px;'>
					                    <b style='font-size:16px;'>$</b><span>"                     + datosAdicionales.Rows[0]["ventasAnio"].ToString() + @"</span>
				                    </div>
			                    </div>
			
			                    <div style='text-align:center; min-width:160px; float:left; border-style:solid; border-width:1px; margin-left:10px;'>
				                    <div style='font-size:10px; padding:5px; color:white; background-color:green;'><b>Igual fecha año pasado</b></div>
				                    <div style='font-size:14px; padding:0px 10px 0px 10px;'>
					                    <b style='font-size:16px;'>$</b><span>"                     + datosAdicionales.Rows[0]["ventasAnioPasado"].ToString() + @"</span>
				                    </div>
			                    </div>
		                    </div>

		                    Estimado(a), se detalla a continuación el cierre de caja n° "         + idCaja + @" del punto de venta de " + datosAdicionales.Rows[0]["direccion"].ToString() + @".
		                    </br>
		                    </br>

		                    <table>
			                    <tr>
				                    <td style='font-weight:bold;'>Fecha:</td>
				                    <td>"                 + DateTime.Now.ToString() + @"</td>
			                    </tr>
			                    <tr>
				                    <td style='font-weight:bold;'>Cajero:</td>
				                    <td>"                 + datosAdicionales.Rows[0]["cajero"].ToString() + @"</td>
			                    </tr>
		                    </table>
		                    <br/>
                            <div>
                                <div style='float:left; padding-right:20px;'>" + this.resumenGeneral(resumenGeneral) + @"</div>
                                <div>" + this.resumenCobros(resumenCobros) + @"</div>
                            </div>" + this.resumenManual(resumenCobros, cierreManual) + @"
                            <h3 style='font-size:20px; margin-bottom:2; margin-top:20px;'>Ventas por Categor&iacute;a</h3>
		                    <table style='border-collapse:collapse;' border='1'>
			                    <tr style='background-color:#79A8BE;color:white;'>
				                    <th style='width:180px;'>Categor&iacute;a</td>
				                    <th style='width:100px;'>Subtotal</td>
				                    <th style='width:100px;'>Descuento</td>
				                    <th style='width:100px;'>IVA</td>
				                    <th style='width:100px;'>Total</td>
			                    </tr>"            ;

            foreach (DataRow fila in ventasCategoria.Rows)
            {
                data += @"<tr align='center'>
				                            <td align='left' style='width:180px;font-weight:bold;'>"                 + fila["nombre"] + @"</td>
				                            <td>$"                 + fila["subtotal"] + @"</td>
				                            <td>$"                 + fila["descuento"] + @"</td>
				                            <td>$"                 + fila["iva"] + @"</td>
				                            <td>$"                 + fila["total"] + @"</td>
			                            </tr>"            ;
            }

            data += @"
		                    </table>
                             <h3 style='font-size:20px; margin-bottom:2; margin-top:20px;'>Redes de Cobro</h3>
		                    <table style='border-collapse:collapse;' border='1'>
			                    <tr style='background-color:#79A8BE;color:white;'>
				                    <th style='width:180px;'>Red</td>
				                    <th style='width:100px;'>Subtotal0</td>
                                    <th style='width:100px;'>Subtotal12</td>
				                    <th style='width:100px;'>Descuento</td>
				                    <th style='width:100px;'>IVA</td>
                                    <th style='width:100px;'>Servicio</td>
				                    <th style='width:100px;'>Total</td>
                                    <th style='width:100px;'>Propina</td>
			                    </tr>"            ;

            foreach (DataRow fila in redesCobro.Rows)
            {
                data += @"<tr align='center'>
				                            <td align='left' style='font-weight:bold;'>"                 + fila["red"] + @"</td>
				                            <td>$"                 + fila["subtotal0"] + @"</td>
				                            <td>$"                 + fila["subtotal12"] + @"</td>
				                            <td>$"                 + fila["descuento"] + @"</td>
				                            <td>$"                 + fila["iva"] + @"</td>
                                            <td>$" + fila["Servicio"] + @"</td>
                                            <td>$" + fila["Total"] + @"</td>
                                            <td>$" + fila["Propina"] + @"</td>
			                            </tr>"            ;
            }

            data += @"
		                    </table><br/>"         + this.datosAdicionales(datosAdicionales) +
                    @"</body>
                    </html>";
            return(data);
        }