This commit is contained in:
@@ -1618,7 +1618,7 @@ Public Class ClsCompras
|
|||||||
|
|
||||||
#Region "F A C T U R A S "
|
#Region "F A C T U R A S "
|
||||||
|
|
||||||
Public Function GetFacturas(CveFactura As Integer, Folio As String, FechaFacturaI As Date, FechaFacturaF As Date, RFC As String, Proveedor As String, FueValidado As Integer, CveResponsable As Integer, CveProveedorClasificacion As Integer, CveTipoProveedor As Integer, CveEmpresa As Integer) As Boolean
|
Public Function GetFacturas(CveFactura As Integer, Folio As String, FechaFacturaI As Date, FechaFacturaF As Date, RFC As String, Proveedor As String, FueValidado As Integer, CveResponsable As Integer, CveProveedorClasificacion As Integer, CveTipoProveedor As Integer, TipoComprobante As String, CveEmpresa As Integer) As Boolean
|
||||||
Dim OnError As Boolean = False
|
Dim OnError As Boolean = False
|
||||||
|
|
||||||
'StrSQL.Clear()
|
'StrSQL.Clear()
|
||||||
@@ -1653,6 +1653,7 @@ Public Class ClsCompras
|
|||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@CveProveedorClasificacion", SqlDbType.Int).Value = CveProveedorClasificacion
|
.Add("@CveProveedorClasificacion", SqlDbType.Int).Value = CveProveedorClasificacion
|
||||||
.Add("@CveTipoProveedor", SqlDbType.Int).Value = CveTipoProveedor
|
.Add("@CveTipoProveedor", SqlDbType.Int).Value = CveTipoProveedor
|
||||||
|
.Add("@TipoComprobante", SqlDbType.VarChar).Value = TipoComprobante
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -2078,6 +2078,11 @@ Public Class Timbrado
|
|||||||
|
|
||||||
cfdi.EscribirXML(cfdi.Xml, RutaArchivo, NombreArchivoXML)
|
cfdi.EscribirXML(cfdi.Xml, RutaArchivo, NombreArchivoXML)
|
||||||
|
|
||||||
|
sw.Stop()
|
||||||
|
swTiempo.AppendFormat("Guardado: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds)
|
||||||
|
swmili = sw.ElapsedMilliseconds
|
||||||
|
sw.Start()
|
||||||
|
|
||||||
If ObjCFDITimbre.Comprobante.TipoComprobante <> "P" Then
|
If ObjCFDITimbre.Comprobante.TipoComprobante <> "P" Then
|
||||||
|
|
||||||
'Actualiza Estatus Factura
|
'Actualiza Estatus Factura
|
||||||
|
|||||||
Binary file not shown.
@@ -17,6 +17,8 @@ Public Class SIGGPS : Implements IHttpHandler, IRequiresSessionState
|
|||||||
Select Case context.Request("metodo")
|
Select Case context.Request("metodo")
|
||||||
Case "getimginstalacion"
|
Case "getimginstalacion"
|
||||||
GetImgInstalacion(context)
|
GetImgInstalacion(context)
|
||||||
|
Case "EjecutarNotificaciones"
|
||||||
|
EjecutarNotificaciones(context)
|
||||||
End Select
|
End Select
|
||||||
ElseIf context.Request.InputStream IsNot Nothing Then
|
ElseIf context.Request.InputStream IsNot Nothing Then
|
||||||
Using reader As New StreamReader(context.Request.InputStream)
|
Using reader As New StreamReader(context.Request.InputStream)
|
||||||
@@ -64,6 +66,14 @@ Public Class SIGGPS : Implements IHttpHandler, IRequiresSessionState
|
|||||||
Return URLParametros
|
Return URLParametros
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Sub EjecutarNotificaciones(ByVal context As HttpContext)
|
||||||
|
Dim Retorno As String = "[]"
|
||||||
|
Using ObjGPS As New ClsSisNotificaciones
|
||||||
|
ObjGPS.ObtenerNotificaciones()
|
||||||
|
End Using
|
||||||
|
context.Response.Write(Retorno)
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub GetImgInstalacion(ByVal context As HttpContext)
|
Private Sub GetImgInstalacion(ByVal context As HttpContext)
|
||||||
Dim params As String = Decripta(context.Request("r").ToString)
|
Dim params As String = Decripta(context.Request("r").ToString)
|
||||||
Dim Parametros = Me.Parametros(params)
|
Dim Parametros = Me.Parametros(params)
|
||||||
|
|||||||
@@ -1,193 +0,0 @@
|
|||||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="SigFoxDecodeExample.aspx.vb" Inherits="Ashx_SigFoxDecodeExample" %>
|
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
|
||||||
<script type="text/javascript">
|
|
||||||
|
|
||||||
//e.g. parseSigFox('10b67dcc0006efda3d9816c2')
|
|
||||||
|
|
||||||
//In an attempt to make the code clearer, I will not be using ArrayBuffer
|
|
||||||
function hex2Bytes(val) {
|
|
||||||
|
|
||||||
if (!val) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
val = val.trim();
|
|
||||||
|
|
||||||
if (val.startsWith('0x')) {
|
|
||||||
val = val.substring(2); //get rid of starting '0x'
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
var numBytes = val.length / 2;
|
|
||||||
var bytes = [];
|
|
||||||
|
|
||||||
|
|
||||||
for (var i = 0; i < numBytes; i++) {
|
|
||||||
bytes.push(parseInt(val.substring(i * 2, (i * 2) + 2), 16));
|
|
||||||
}
|
|
||||||
|
|
||||||
return bytes;
|
|
||||||
}
|
|
||||||
|
|
||||||
function parseLittleEndianInt32(buffer, offset) {
|
|
||||||
return (buffer[offset + 3] << 24) +
|
|
||||||
(buffer[offset + 2] << 16) +
|
|
||||||
(buffer[offset + 1] << 8) +
|
|
||||||
(buffer[offset]);
|
|
||||||
}
|
|
||||||
|
|
||||||
function parseLittleEndianInt16(buffer, offset) {
|
|
||||||
return (buffer[offset + 1] << 8) +
|
|
||||||
(buffer[offset]);
|
|
||||||
}
|
|
||||||
|
|
||||||
function parseLittleEndianInt16Bits(buffer, offset, bitOffset, bitLength) {
|
|
||||||
var temp = parseLittleEndianInt16(buffer, offset);
|
|
||||||
temp = temp >> bitOffset;
|
|
||||||
var mask = 0xffff >> (16 - bitLength);
|
|
||||||
return temp & mask;
|
|
||||||
}
|
|
||||||
|
|
||||||
//e.g. 10b67dcc0006efda3d9816c2
|
|
||||||
function parseSigFox(data) {
|
|
||||||
var buffer = hex2Bytes(data);
|
|
||||||
|
|
||||||
if (!buffer) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
var recordType = buffer[0] & 0x0f;
|
|
||||||
|
|
||||||
switch (recordType) {
|
|
||||||
case 0: //positional data
|
|
||||||
return parsePositionalData(buffer);
|
|
||||||
|
|
||||||
case 1: //downlink ACK
|
|
||||||
return parseDownlinkAck(buffer);
|
|
||||||
|
|
||||||
case 2: //device data
|
|
||||||
return parseDeviceStats(buffer);
|
|
||||||
|
|
||||||
case 3: //extended positional data
|
|
||||||
return parseExtendedData(buffer);
|
|
||||||
|
|
||||||
default:
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function parsePositionalData(buffer) {
|
|
||||||
var flags = buffer[0] & 0xF0;
|
|
||||||
var inTrip = (flags & 0x10) > 0;
|
|
||||||
var lastFixFailed = (flags & 0x20) > 0;
|
|
||||||
|
|
||||||
var latitudeRaw = parseLittleEndianInt32(buffer, 1);
|
|
||||||
var longitudeRaw = parseLittleEndianInt32(buffer, 5);
|
|
||||||
var headingRaw = buffer[9];
|
|
||||||
var speedRaw = buffer[10];
|
|
||||||
var batteryRaw = buffer[11];
|
|
||||||
|
|
||||||
return {
|
|
||||||
MessageType: 0,
|
|
||||||
InTrip: inTrip,
|
|
||||||
LastFixFailed: lastFixFailed,
|
|
||||||
Latitude: latitudeRaw * 1e-7,
|
|
||||||
Longitude: longitudeRaw * 1e-7,
|
|
||||||
Heading: headingRaw * 2,
|
|
||||||
SpeedKmH: speedRaw,
|
|
||||||
BatteryVoltage: (batteryRaw * 25) / 1000.0
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function parseDownlinkAck(buffer) {
|
|
||||||
var flags = buffer[0] & 0xF0;
|
|
||||||
var downlinkAccepted = (flags & 0x10) > 0;
|
|
||||||
|
|
||||||
var firmwareMajor = buffer[2];
|
|
||||||
var firmwareMinor = buffer[3];
|
|
||||||
|
|
||||||
var data = [];
|
|
||||||
for (var i = 0; i < 8; i++) {
|
|
||||||
data.push(i + 4);
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
MessageType: 1,
|
|
||||||
DownlinkAccepted: downlinkAccepted,
|
|
||||||
FirmwareVersion: firmwareMajor + '.' + firmwareMinor,
|
|
||||||
DownlinkData: data
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function parseDeviceStats(buffer) {
|
|
||||||
var uptimeWeeks = parseLittleEndianInt16Bits(buffer, 0, 4, 9/*bits*/);
|
|
||||||
var txCountRaw = parseLittleEndianInt16Bits(buffer, 1, 5, 11 /*bits*/);
|
|
||||||
var rxCountRaw = buffer[3];
|
|
||||||
var tripCountRaw = parseLittleEndianInt16Bits(buffer, 4, 0, 13 /*bits*/);
|
|
||||||
var gpsSuccessRaw = parseLittleEndianInt16Bits(buffer, 5, 5, 10 /*bits*/);
|
|
||||||
var gpsFailuresRaw = parseLittleEndianInt16Bits(buffer, 6, 7, 8 /*bits*/);
|
|
||||||
var averageFixTime = parseLittleEndianInt16Bits(buffer, 7, 7, 9/*bits*/);
|
|
||||||
var averageFailTime = parseLittleEndianInt16Bits(buffer, 9, 0, 9/*bits*/);
|
|
||||||
var averageFreshenTime = parseLittleEndianInt16Bits(buffer, 10, 1, 8/*bits*/);
|
|
||||||
var wakeupsPerTrip = buffer[11] >> 1;
|
|
||||||
|
|
||||||
return {
|
|
||||||
MessageType: 2,
|
|
||||||
UptimeWeeks: uptimeWeeks,
|
|
||||||
TxCount: txCountRaw * 32,
|
|
||||||
RxCount: rxCountRaw * 32,
|
|
||||||
TripCount: tripCountRaw,
|
|
||||||
GpsSuccessCount: gpsSuccessRaw * 32,
|
|
||||||
GpsFailureCount: gpsFailuresRaw * 32,
|
|
||||||
AverageFixTimeSeconds: averageFixTime,
|
|
||||||
AverageFailTimeSeconds: averageFailTime,
|
|
||||||
AverageFreshenTimeSeconds: averageFreshenTime,
|
|
||||||
WakeUpsPerTrip: wakeupsPerTrip
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function parseExtendedData(buffer) {
|
|
||||||
var headingRaw = buffer[0] >> 4;
|
|
||||||
var latitudeRaw = buffer[1] + buffer[2] * 256 + buffer[3] * 65536;
|
|
||||||
if (latitudeRaw >= 0x800000) // 2^23
|
|
||||||
latitudeRaw -= 0x1000000; // 2^24
|
|
||||||
var longitudeRaw = buffer[4] + buffer[5] * 256 + buffer[6] * 65536;
|
|
||||||
if (longitudeRaw >= 0x800000) // 2^23
|
|
||||||
longitudeRaw -= 0x1000000; // 2^24
|
|
||||||
var posAccRaw = buffer[7];
|
|
||||||
var batteryRaw = buffer[8];
|
|
||||||
var speedRaw = buffer[9] & 0x3F;
|
|
||||||
var inTrip = (buffer[9] & 0x40) > 0;
|
|
||||||
var lastFixFailed = (buffer[9] & 0x80) > 0;
|
|
||||||
|
|
||||||
return {
|
|
||||||
MessageType: 3,
|
|
||||||
Heading: headingRaw * 22.5,
|
|
||||||
Latitude: (latitudeRaw * 256) / 1e7,
|
|
||||||
Longitude: (longitudeRaw * 256) / 1e7,
|
|
||||||
PosAccM: posAccRaw * 1,
|
|
||||||
BatteryVoltage: (batteryRaw * 25) / 1000.0,
|
|
||||||
SpeedKmH: speedRaw * 2.5,
|
|
||||||
InTrip: inTrip,
|
|
||||||
LastFixFailed: lastFixFailed
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</asp:Content>
|
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
Imports System.Collections
|
|
||||||
Partial Class Ashx_SigFoxDecodeExample
|
|
||||||
Inherits System.Web.UI.Page
|
|
||||||
|
|
||||||
Public Sub Page_Load() Handles Me.Load
|
|
||||||
Dim ObjNotificaciones As New ClsSisNotificaciones
|
|
||||||
ObjNotificaciones.ObtenerNotificaciones()
|
|
||||||
ObjNotificaciones.Dispose()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -310,9 +310,9 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ViewState("CveCuentaRetISR") = 0
|
ViewState("CveCuentaRetISR") = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(1, 4, 5, 7, 11, 12, 72, 80, 126, 119, 122) Then
|
'If UsuarioActual.CveEmpresa.Contiene(1, 4, 5, 7, 11, 12, 72, 80, 126, 119, 122,145) Then
|
||||||
rowComisiones.Visible = True
|
' rowComisiones.Visible = True
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
IdCuenta = 0
|
IdCuenta = 0
|
||||||
CveCuentaB = 0
|
CveCuentaB = 0
|
||||||
@@ -1506,16 +1506,16 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
'funcionalidad que toma el 100% del pago para acreditamiento de iva
|
'funcionalidad que toma el 100% del pago para acreditamiento de iva
|
||||||
If TotalImporte = gvr.DataKey("Saldo").ToDecimal Then
|
If TotalImporte = gvr.DataKey("Saldo").ToDecimal Then
|
||||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||||
importeMX = ImporteMovimiento
|
importeMX = ImporteMovimiento
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||||
importeMX = gvr.DataKey("IVADeducible").ToDecimal * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = gvr.DataKey("IVA").ToDecimal * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
End If
|
End If
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||||
@@ -1528,79 +1528,16 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagarDeducible").ToDecimal - (gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagarDeducible").ToDecimal, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago)
|
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVA").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento
|
importeMX = ImporteMovimiento
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagarDeducible").ToDecimal - (gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagarDeducible").ToDecimal, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago)
|
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVA").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagarDeducible").ToDecimal - (gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagarDeducible").ToDecimal, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago)
|
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVA").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagarDeducible").ToDecimal - (gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagarDeducible").ToDecimal, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago)
|
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVA").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
|
||||||
End If
|
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
|
||||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
|
||||||
|
|
||||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
|
||||||
End If
|
|
||||||
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
|
||||||
|
|
||||||
PorcentajeImpuesto = gvr.DataKey("PorcentajeIVA").ToDecimal
|
|
||||||
Dim IdCtaIVAXAcreditar As Integer = 0
|
|
||||||
Dim IdCtaIVAAcreditable As Integer = 0
|
|
||||||
|
|
||||||
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
|
|
||||||
IdCtaIVAXAcreditar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
|
|
||||||
IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
|
|
||||||
End If
|
|
||||||
IdCtaContable = If(IdCtaIVAAcreditable > 0, IdCtaIVAAcreditable, 0)
|
|
||||||
|
|
||||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
|
||||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
|
||||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero
|
|
||||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditableSIG").ToString.ToEntero
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Case 280 'Iva Acreditado No Deducible
|
|
||||||
Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
|
||||||
'funcionalidad que toma el 100% del pago para acreditamiento de iva
|
|
||||||
If TotalImporte = gvr.DataKey("Saldo").ToDecimal Then
|
|
||||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
|
||||||
ImporteMovimiento = gvr.DataKey("IVANoDeducible").ToDecimal
|
|
||||||
importeMX = ImporteMovimiento
|
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
ImporteMovimiento = gvr.DataKey("IVANoDeducible").ToDecimal
|
|
||||||
importeMX = gvr.DataKey("IVANoDeducible").ToDecimal * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
|
||||||
ImporteMovimiento = gvr.DataKey("IVANoDeducible").ToDecimal
|
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
ImporteMovimiento = gvr.DataKey("IVANoDeducible").ToDecimal
|
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
|
||||||
End If
|
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
|
||||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
|
||||||
|
|
||||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
|
||||||
Else
|
|
||||||
ImporteMovimiento = 0
|
|
||||||
importeMX = 0
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
|
||||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal - (gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal, gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago)
|
|
||||||
importeMX = ImporteMovimiento
|
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal - (gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal, gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago)
|
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
|
||||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal - (gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal, gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago)
|
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal - (gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal, gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago)
|
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
End If
|
End If
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||||
|
|||||||
155
ClsTSoft.vb
155
ClsTSoft.vb
@@ -1,155 +0,0 @@
|
|||||||
Imports Microsoft.VisualBasic
|
|
||||||
Imports System.Collections.Generic
|
|
||||||
Imports System.Linq
|
|
||||||
Imports System.Web
|
|
||||||
Imports System.Data
|
|
||||||
Imports System.Text
|
|
||||||
Imports Extensiones
|
|
||||||
|
|
||||||
Public Class ClsTSoft
|
|
||||||
Inherits ClsClaseBase
|
|
||||||
|
|
||||||
Public Sub New()'(Optional adsObj As ClsClaseBase = Nothing)
|
|
||||||
'MyBase.New(adsObj)
|
|
||||||
End Sub
|
|
||||||
#Region "CRUD_Remisiones"
|
|
||||||
Public Function AddRemisiones(FolioRemision As String, NoEconomico As String, CveEstatus As Integer, GeoInicio As String, GeoFin As String, Fecha As Date) As Boolean
|
|
||||||
Dim Retorno As Boolean = False
|
|
||||||
|
|
||||||
SqlDataAdapter("PA_GPS_RemisionesAdd")
|
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
|
||||||
.Add("@FolioRemision", SqlDbType.VarChar).Value = FolioRemision
|
|
||||||
.Add("@NoEconomico", SqlDbType.VarChar).Value = NoEconomico
|
|
||||||
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
|
|
||||||
.Add("@GeoInicio", SqlDbType.VarChar).Value = GeoInicio
|
|
||||||
.Add("@GeoFin", SqlDbType.VarChar).Value = GeoFin
|
|
||||||
.Add("@Fecha", SqlDbType.Date).Value = Fecha
|
|
||||||
End With
|
|
||||||
|
|
||||||
Try
|
|
||||||
SqlAdapter.Fill(Data)
|
|
||||||
Retorno = True
|
|
||||||
Catch ex As Exception
|
|
||||||
OnError("Ocurrió un Error al agregar la Remision.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
|
||||||
End Try
|
|
||||||
|
|
||||||
Return Retorno
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Function UpdateEstatusRemisiones(CveRemision As Integer, CveEstatus As Integer) As Boolean
|
|
||||||
Dim Retorno As Boolean = False
|
|
||||||
|
|
||||||
SqlDataAdapter("PA_GPS_RemisionesEstatusUpdate")
|
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
|
||||||
.Add("@CveRemision", SqlDbType.Int).Value = CveRemision
|
|
||||||
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
|
|
||||||
End With
|
|
||||||
|
|
||||||
Try
|
|
||||||
SqlAdapter.Fill(Data)
|
|
||||||
Retorno = True
|
|
||||||
Catch ex As Exception
|
|
||||||
OnError("Ocurrió un Error al agregar la Remision.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
|
||||||
End Try
|
|
||||||
|
|
||||||
Return Retorno
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Function GetRemisiones(CveCliente As Integer) As Boolean
|
|
||||||
Dim Retorno As Boolean = False
|
|
||||||
|
|
||||||
SqlDataAdapter("PA_GPS_RemisionesGet")
|
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
|
||||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
|
||||||
End With
|
|
||||||
|
|
||||||
Try
|
|
||||||
SqlAdapter.Fill(Data)
|
|
||||||
Retorno = True
|
|
||||||
Catch ex As Exception
|
|
||||||
OnError("Ocurrió un Error al agregar la Remision.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
|
||||||
End Try
|
|
||||||
|
|
||||||
Return Retorno
|
|
||||||
End Function
|
|
||||||
|
|
||||||
'Public Function UpRemisiones(CveRemision As Integer, FolioRemision As String, CveDispositivo As Integer, CveEstatus As Integer, GeoInicio As String, GeoFin As String,
|
|
||||||
' Lat As String, Lon As String) As Boolean
|
|
||||||
' Dim strSQL As New StringBuilder()
|
|
||||||
' Dim retorno As Boolean = False
|
|
||||||
' strSQL.Append(" UPDATE TSoft_Remisiones Set ")
|
|
||||||
' strSQL.Append(" FolioRemision=@FolioRemision")
|
|
||||||
' strSQL.Append(", CveDispositivo =@CveDispositivo")
|
|
||||||
' strSQL.Append(", CveEstatus =@CveEstatus")
|
|
||||||
' strSQL.Append(", GeoInicio =@GeoInicio")
|
|
||||||
' strSQL.Append(", GeoFin =@GeoFin")
|
|
||||||
' strSQL.Append(", Lat =@Lat")
|
|
||||||
' strSQL.Append(", Lon =@Lon")
|
|
||||||
' strSQL.Append(" WHERE [CveRemision]=@CveRemision ")
|
|
||||||
' DataAdapter(strSQL.ToString())
|
|
||||||
' addParameters("@CveRemision", SqlDbType.Int, CveRemision)
|
|
||||||
' addParameters("@FolioRemision", SqlDbType.VarChar, FolioRemision)
|
|
||||||
' addParameters("@CveDispositivo", SqlDbType.Int, CveDispositivo)
|
|
||||||
' addParameters("@CveEstatus", SqlDbType.Int, CveEstatus)
|
|
||||||
' addParameters("@GeoInicio", SqlDbType.VarChar, GeoInicio)
|
|
||||||
' addParameters("@GeoFin", SqlDbType.VarChar, GeoFin)
|
|
||||||
' addParameters("@Lat", SqlDbType.VarChar, Lat)
|
|
||||||
' addParameters("@Lon", SqlDbType.VarChar, Lon)
|
|
||||||
|
|
||||||
' retorno = RunQuery("Ocurrió un error al actualizar el Remisiones.")
|
|
||||||
' strSQL.Clear()
|
|
||||||
' Return retorno
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
Public Function RemoveRemisiones(CveRemision As Integer) As Boolean
|
|
||||||
Dim strSQL As New StringBuilder()
|
|
||||||
Dim retorno As Boolean = False
|
|
||||||
strSQL.Append(" DELETE FROM TSoft_Remisiones ")
|
|
||||||
strSQL.Append(" WHERE [CveRemision]=@CveRemision ")
|
|
||||||
DataAdapter(strSQL.ToString())
|
|
||||||
addParameters("@CveRemision", SqlDbType.Int, CveRemision)
|
|
||||||
retorno = RunQuery("Ocurrió un error al eliminar el Remisiones.")
|
|
||||||
strSQL.Clear()
|
|
||||||
Return retorno
|
|
||||||
End Function
|
|
||||||
#End Region
|
|
||||||
#Region "Otros"
|
|
||||||
|
|
||||||
Public Function UpEstatusRemision(FolioRemision As String, CveEstatus As Integer) As Boolean
|
|
||||||
Dim strSQL As New StringBuilder()
|
|
||||||
Dim retorno As Boolean = False
|
|
||||||
strSQL.AppendLine(" BEGIN")
|
|
||||||
strSQL.AppendLine(" DECLARE @Lat AS VARCHAR(20)=''")
|
|
||||||
strSQL.AppendLine(" DECLARE @Lon AS VARCHAR(20)=''")
|
|
||||||
strSQL.AppendLine(" DECLARE @CveRemision AS INT =(SELECT TOP 1 REM.CveRemision FROM TSoft_Remisiones REM WHERE FolioRemision= @FolioRemision)")
|
|
||||||
strSQL.AppendLine(" Declare @CveDispositivo AS INT=( SELECT TOP 1 REM.CveDispositivo FROM TSoft_Remisiones REM WHERE CveRemision=@CveRemision)")
|
|
||||||
strSQL.AppendLine(" SELECT Top 1 @Lat= Geom.Lat ,@Lon=Geom.Long FROM GPS_Posiciones WHERE CveDispositivo=@CveDispositivo ORDER BY FechaTrama")
|
|
||||||
strSQL.AppendLine(" UPDATE TSoft_Remisiones SET CveEstatus=@CveEstatus WHERE CveRemision=@CveRemision")
|
|
||||||
strSQL.AppendLine(" INSERT INTO [TSoft_RemisionesHistorial] ([CveRemisison], [CveEstatus], [Lat], [Lon]) VALUES (@CveRemision, @CveEstatus, @Lat, @Lon)")
|
|
||||||
strSQL.AppendLine(" END")
|
|
||||||
DataAdapter(strSQL.ToString())
|
|
||||||
addParameters("@FolioRemision", SqlDbType.VarChar, FolioRemision)
|
|
||||||
addParameters("@CveEstatus", SqlDbType.Int, CveEstatus)
|
|
||||||
retorno = RunQuery("Ocurrió un error al agregar el Remisiones.")
|
|
||||||
strSQL.Clear()
|
|
||||||
Return retorno
|
|
||||||
End Function
|
|
||||||
Public Function GETRemisionesHistorial(FolioRemision As String, NoEconomico As String) As Boolean
|
|
||||||
Dim strSQL As New StringBuilder()
|
|
||||||
Dim retorno As Boolean = False
|
|
||||||
strSQL.AppendLine(" Declare @CveDispositivo AS INT=(SELECT S_Di.CveDispositivo FROM GPS_Dispositivos AS S_Di WHERE NoEconomico=@NoEconomico AND CveCliente=183798)")
|
|
||||||
strSQL.AppendLine(" SELECT @NoEconomico AS NoEconomico, REMHIST.Fecha,REMHIST.Lat,REMHIST.Lon,REM.FolioRemision,REMHIST.CveEstatus FROM TSoft_Remisiones REM")
|
|
||||||
strSQL.AppendLine(" INNER JOIN TSoft_RemisionesHistorial REMHIST ON REMHIST.CveRemisison=REM.CveRemision")
|
|
||||||
strSQL.AppendLine(" WHERE CveDispositivo=@CveDispositivo AND FolioRemision= @FolioRemision ORDER BY REMHIST.Fecha DESC")
|
|
||||||
DataAdapter(strSQL.ToString())
|
|
||||||
addParameters("@FolioRemision", SqlDbType.VarChar, FolioRemision)
|
|
||||||
addParameters("@NoEconomico", SqlDbType.VarChar, NoEconomico)
|
|
||||||
retorno = RunQuery("Ocurrió un error al agregar el Remisiones.")
|
|
||||||
strSQL.Clear()
|
|
||||||
Return retorno
|
|
||||||
End Function
|
|
||||||
#End Region
|
|
||||||
End Class
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Web;
|
|
||||||
using System.Web.UI;
|
|
||||||
using System.Web.UI.WebControls;
|
|
||||||
|
|
||||||
public partial class Compras_Default : ClsPaginas
|
|
||||||
{
|
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
Alert(UsuarioActual.Nombre);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1618,7 +1618,7 @@ Partial Class Compras_Compras
|
|||||||
Private Function CargaFactura(CveFactura As Integer) As String
|
Private Function CargaFactura(CveFactura As Integer) As String
|
||||||
Dim ObjeFacturas As New ClsCompras
|
Dim ObjeFacturas As New ClsCompras
|
||||||
Dim RFC As String = ""
|
Dim RFC As String = ""
|
||||||
If ObjeFacturas.GetFacturas(CveFactura, "-1", Now.AddYears(-3), Now, "-1", "-1", -1, -1, -1, -1, UsuarioActual.CveEmpresa) AndAlso ObjeFacturas.DtResultados.Rows.Count > 0 Then
|
If ObjeFacturas.GetFacturas(CveFactura, "-1", Now.AddYears(-3), Now, "-1", "-1", -1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa) AndAlso ObjeFacturas.DtResultados.Rows.Count > 0 Then
|
||||||
Dim dr As DataRow = ObjeFacturas.DtResultados.Rows(0) ' no toma la cero, porque es el totalizador
|
Dim dr As DataRow = ObjeFacturas.DtResultados.Rows(0) ' no toma la cero, porque es el totalizador
|
||||||
|
|
||||||
Dim XMLDoc As New XmlDocument
|
Dim XMLDoc As New XmlDocument
|
||||||
@@ -3729,6 +3729,20 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'Si se marcó No Deducible en el encabezado mínimo se debe registrar un No Deducible en el Detalle
|
||||||
|
Dim GuardaNoDeducibles As Boolean = False
|
||||||
|
If ChkEsNoDeducible.Checked Then
|
||||||
|
For Each Row As DataRow In TmpDT.Rows
|
||||||
|
If Row("NoDeducible").ToString = "True" Then
|
||||||
|
GuardaNoDeducibles = True
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If GuardaNoDeducibles = False Then
|
||||||
|
Alert("Si la compra es No Deducible, mínimo se debe registrar un producto No Deducible", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If CierrePeriodo Then
|
If CierrePeriodo Then
|
||||||
Alert("El periodo de la compra actual ya se encuentra cerrado. No podra registrar la compra.", TipoMensaje.MsgAdvertencia)
|
Alert("El periodo de la compra actual ya se encuentra cerrado. No podra registrar la compra.", TipoMensaje.MsgAdvertencia)
|
||||||
@@ -7596,6 +7610,8 @@ Partial Class Compras_Compras
|
|||||||
Else
|
Else
|
||||||
MsgAccionAceptar = "if (window.opener){window.opener.location.href = window.opener.location.href; window.close();}"
|
MsgAccionAceptar = "if (window.opener){window.opener.location.href = window.opener.location.href; window.close();}"
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
MsgAccionAceptar = "location.href =""Compras.aspx"""
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Simplificacion de PrePolizas
|
'Simplificacion de PrePolizas
|
||||||
|
|||||||
Binary file not shown.
@@ -484,7 +484,7 @@ Partial Class Compras_Proveedores
|
|||||||
Private Function CargadeFactura(CveFactura As Integer) As Integer
|
Private Function CargadeFactura(CveFactura As Integer) As Integer
|
||||||
|
|
||||||
Dim ObjeFacturas As New ClsCompras
|
Dim ObjeFacturas As New ClsCompras
|
||||||
If ObjeFacturas.GetFacturas(CveFactura, "-1", Now.AddYears(-2), Now, "-1", "-1", -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
If ObjeFacturas.GetFacturas(CveFactura, "-1", Now.AddYears(-2), Now, "-1", "-1", -1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa) Then
|
||||||
Dim XMLDoc As New XmlDocument
|
Dim XMLDoc As New XmlDocument
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -658,6 +658,7 @@ Partial Class Compras_eFacturas
|
|||||||
Folio = If(TxtFolio.Text.Trim.Length > 0, String.Format("%{0}%", TxtFolio.Text.Trim.ToUpper), "-1")
|
Folio = If(TxtFolio.Text.Trim.Length > 0, String.Format("%{0}%", TxtFolio.Text.Trim.ToUpper), "-1")
|
||||||
RFC = "-1" 'If(TxtRFC.Text.Trim.Length > 0, TxtRFC.Text.Trim, "-1")
|
RFC = "-1" 'If(TxtRFC.Text.Trim.Length > 0, TxtRFC.Text.Trim, "-1")
|
||||||
Proveedor = If(TxtProveedor.Text.Trim.Length > 0, String.Format("%{0}%", TxtProveedor.Text.Trim.ToUpper.Replace(" ", "%")), "-1")
|
Proveedor = If(TxtProveedor.Text.Trim.Length > 0, String.Format("%{0}%", TxtProveedor.Text.Trim.ToUpper.Replace(" ", "%")), "-1")
|
||||||
|
Dim TipoComprobante As String = "-1"
|
||||||
|
|
||||||
UsuarioActual.Sesion("eFact-Proveedor") = TxtProveedor.Text.Trim
|
UsuarioActual.Sesion("eFact-Proveedor") = TxtProveedor.Text.Trim
|
||||||
If Folio = "" Then UsuarioActual.Sesion("eFact-FI") = txtFechaI.Text
|
If Folio = "" Then UsuarioActual.Sesion("eFact-FI") = txtFechaI.Text
|
||||||
@@ -673,7 +674,7 @@ Partial Class Compras_eFacturas
|
|||||||
End If
|
End If
|
||||||
Dim DtPagos As DataTable = Nothing
|
Dim DtPagos As DataTable = Nothing
|
||||||
Dim ObjDatos As New ClsCompras
|
Dim ObjDatos As New ClsCompras
|
||||||
If ObjDatos.GetFacturas(-1, Folio, FechaI, FechaF, RFC, Proveedor, DdlValidado.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, DdlClasificacionProv.SelectedValue.ToEntero, DdlCveTipoProveedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
If ObjDatos.GetFacturas(-1, Folio, FechaI, FechaF, RFC, Proveedor, DdlValidado.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, DdlClasificacionProv.SelectedValue.ToEntero, DdlCveTipoProveedor.SelectedValue.ToEntero, TipoComprobante, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjDatos.DtResultados.Rows.Count > 0 Then
|
If ObjDatos.DtResultados.Rows.Count > 0 Then
|
||||||
GvD.DataSource = ObjDatos.DtResultados.FiltraParametros("TipoComprobante <> 'P'") '.AsEnumerable().Take(100).CopyToDataTable()
|
GvD.DataSource = ObjDatos.DtResultados.FiltraParametros("TipoComprobante <> 'P'") '.AsEnumerable().Take(100).CopyToDataTable()
|
||||||
DtPagos = ObjDatos.DtResultados.FiltraParametros("TipoComprobante = 'P'")
|
DtPagos = ObjDatos.DtResultados.FiltraParametros("TipoComprobante = 'P'")
|
||||||
@@ -1246,7 +1247,7 @@ Partial Class Compras_eFacturas
|
|||||||
Dim Folio = If(TxtFolio.Text.Trim.Length > 0, String.Format("%{0}%", TxtFolio.Text.Trim.ToUpper), "-1")
|
Dim Folio = If(TxtFolio.Text.Trim.Length > 0, String.Format("%{0}%", TxtFolio.Text.Trim.ToUpper), "-1")
|
||||||
Dim Proveedor = If(TxtProveedor.Text.Trim.Length > 0, String.Format("%{0}%", TxtProveedor.Text.Trim.ToUpper.Replace(" ", "%")), "-1")
|
Dim Proveedor = If(TxtProveedor.Text.Trim.Length > 0, String.Format("%{0}%", TxtProveedor.Text.Trim.ToUpper.Replace(" ", "%")), "-1")
|
||||||
|
|
||||||
If ObjDatos.GetFacturas(-1, Folio, txtFechaI.Text.Trim.ToDate, txtFechaF.Text.Trim.ToDate, "-1", Proveedor, DdlValidado.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, DdlClasificacionProv.SelectedValue.ToEntero, DdlCveTipoProveedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
If ObjDatos.GetFacturas(-1, Folio, txtFechaI.Text.Trim.ToDate, txtFechaF.Text.Trim.ToDate, "-1", Proveedor, DdlValidado.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, DdlClasificacionProv.SelectedValue.ToEntero, DdlCveTipoProveedor.SelectedValue.ToEntero, "-1", UsuarioActual.CveEmpresa) Then
|
||||||
|
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
|
|||||||
@@ -117,6 +117,7 @@
|
|||||||
<asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" HeaderText="Folio" ControlStyle-Width="85px" />
|
<asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" HeaderText="Folio" ControlStyle-Width="85px" />
|
||||||
<asp:BoundField HeaderText="SubTotal" DataField="SubTotal" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="SubTotal" DataField="SubTotal" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="%IVA" DataField="PorcentajeIVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="IEPS" DataField="IEPS" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="IEPS" DataField="IEPS" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="RetIVA" DataField="RetIVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="RetIVA" DataField="RetIVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="RetISR" DataField="RetISR" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="RetISR" DataField="RetISR" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
|||||||
@@ -1137,7 +1137,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value> Por éste pagare prometo (emos) pagar incondicionalmente a la orden de Soluciones en Telemedición JAR SA de CV, a su vencimiento el </Value>
|
<Value> Por éste pagare prometo (emos) pagar incondicionalmente a la orden de PAOLA CASTILLO VALENZUELA, a su vencimiento el </Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontStyle>Normal</FontStyle>
|
<FontStyle>Normal</FontStyle>
|
||||||
<FontFamily>calibri</FontFamily>
|
<FontFamily>calibri</FontFamily>
|
||||||
|
|||||||
@@ -203,7 +203,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>www.adsistemas.mx|facturacion@adsistemas.mx</Value>
|
<Value>www.adsistemas.mx|facturacion@adssistemas.mx</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontStyle>Normal</FontStyle>
|
<FontStyle>Normal</FontStyle>
|
||||||
<FontFamily>Calibri</FontFamily>
|
<FontFamily>Calibri</FontFamily>
|
||||||
@@ -534,6 +534,7 @@
|
|||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Nombre</Value>
|
<Value>Nombre</Value>
|
||||||
<Style>
|
<Style>
|
||||||
|
<FontFamily>calibri</FontFamily>
|
||||||
<FontSize>9pt</FontSize>
|
<FontSize>9pt</FontSize>
|
||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
@@ -702,7 +703,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Cuidad</Value>
|
<Value>Ciudad</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>Calibri</FontFamily>
|
<FontFamily>Calibri</FontFamily>
|
||||||
<FontSize>9pt</FontSize>
|
<FontSize>9pt</FontSize>
|
||||||
|
|||||||
@@ -3,116 +3,175 @@
|
|||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
<style>
|
||||||
|
.Widthall {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_scrollHeadInner {
|
||||||
|
width: 100% !important;
|
||||||
|
background-color: #dddddd;
|
||||||
|
padding-left: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_scrollFoot {
|
||||||
|
display: none;
|
||||||
|
position: static;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-scrollable {
|
||||||
|
margin: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_scroll {
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table.dataTable {
|
||||||
|
margin-top: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_scrollBody table th {
|
||||||
|
padding: 0px !important;
|
||||||
|
padding-right: 4px !important;
|
||||||
|
padding-left: 4px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sinlink td a {
|
||||||
|
pointer-events: none;
|
||||||
|
cursor: default;
|
||||||
|
color: black;
|
||||||
|
font-size: small;
|
||||||
|
}
|
||||||
|
|
||||||
|
.white a {
|
||||||
|
color: white !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
|
||||||
Catálogo de Tipos de Ordenes de Servicio
|
Catálogo de Tipos de Ordenes de Servicio
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
</asp:Content>
|
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
|
||||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<table class="table table-striped table-advance table-hover">
|
<li>
|
||||||
<thead>
|
<asp:LinkButton runat="server" ID="BtnAgregarTiposOS" data-toggle="tooltip" data-placement="left" Text="<i class='fa fa-plus'></i> Agregar Tipo de OS"></asp:LinkButton>
|
||||||
<tr class="Titulos">
|
</li>
|
||||||
<th width="250px">
|
|
||||||
<asp:LinkButton ID="LbTipoOrdenServicio" runat="server" CausesValidation="false" Text="" CommandArgument="TipoOrdenServicio" OnClick="LbOrden_Click">
|
|
||||||
Tipo de Orden de Servicio
|
|
||||||
<asp:Literal ID="ImgTipoOrdenServicio" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
|
||||||
</asp:LinkButton>
|
|
||||||
</th>
|
|
||||||
<th width="100px">
|
|
||||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus" OnClick="LbOrden_Click">
|
|
||||||
Estatus
|
|
||||||
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
|
||||||
</asp:LinkButton>
|
|
||||||
</th>
|
|
||||||
<th width="100px">
|
|
||||||
<asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng" OnClick="LbOrden_Click">
|
|
||||||
Fecha Ing.
|
|
||||||
<asp:Literal ID="ImgFechaIng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
|
||||||
</asp:LinkButton>
|
|
||||||
</th>
|
|
||||||
<th width="100px">
|
|
||||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario" OnClick="LbOrden_Click">
|
|
||||||
Usuario
|
|
||||||
<asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
|
||||||
</asp:LinkButton>
|
|
||||||
</th>
|
|
||||||
<th width="161px">Comandos</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tr>
|
|
||||||
<td style="text-align: center">
|
|
||||||
<asp:TextBox ID="TxtTipoOrdenServicio" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="234px"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVTipoOrdenServicio" runat="server" ControlToValidate="TxtTipoOrdenServicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Orden de Servicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCTipoOrdenServicio" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoOrdenServicio" Width="300px"></ajax:ValidatorCalloutExtender>
|
|
||||||
</td>
|
|
||||||
<td> </td>
|
|
||||||
<td> </td>
|
|
||||||
<td> </td>
|
|
||||||
<td style="text-align: center">
|
|
||||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveOrdenServicioTipo" EmptyDataText="No se encontraron Tipos de Orden Servicios Registrados" ToolTip="Listado de Tipos de Ordenes de Servicios" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px;" GridLines="None">
|
|
||||||
<Columns>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlTipoOrdenServicio" runat="server" Text='<%# Eval("OrdenServicioTipo", "{0}") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
<EditItemTemplate>
|
|
||||||
<asp:TextBox ID="TxtTipoOrdenServicio" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("OrdenServicioTipo") %>' ValidationGroup="GrpGV" Width="234px"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVTipoOrdenServicio" runat="server" ControlToValidate="TxtTipoOrdenServicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Orden de Servicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCTipoOrdenServicio" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoOrdenServicio" Width="300px"></ajax:ValidatorCalloutExtender>
|
|
||||||
</EditItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
<EditItemTemplate>
|
|
||||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
|
||||||
</EditItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="Editar">
|
|
||||||
<EditItemTemplate>
|
|
||||||
<center>
|
|
||||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
|
||||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
|
||||||
</center>
|
|
||||||
</EditItemTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="Eliminar">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
</Columns>
|
|
||||||
<RowStyle CssClass="Texto" />
|
|
||||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
|
||||||
</asp:GridView>
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
<asp:UpdatePanel ID="UpGral" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="Widthall" style="text-align: right!important; margin-top: 20px!important; margin-bottom: 2px!important">
|
||||||
|
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvTiposOS.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvTiposOS.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row" style="margin:5px">
|
||||||
|
<asp:UpdatePanel ID="UPGvTiposOS" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<asp:GridView ID="GvTiposOS" runat="server" AutoGenerateColumns="False"
|
||||||
|
DataKeyNames="CveOrdenServicioTipo, OrdenServicioTipo, Estatus"
|
||||||
|
EmptyDataText="No se encontraron registros"
|
||||||
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||||
|
data-sort="true"
|
||||||
|
data-freezerows="1"
|
||||||
|
GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField HeaderText="Tipo de Orden de Servicio">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LblTiposOS" runat="server" Text='<%# Eval("OrdenServicioTipo") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="150px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LblPuntos" runat="server" Text='<%# Eval("Estatus")%>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center" ItemStyle-Width="150px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="lblFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField ItemStyle-Width="300px" HeaderText="Usuario">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="lblUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="80px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="ImgE" OnClick="Edit_ClickTiposOS" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||||
|
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="40px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="imgD" OnClick="Remove_ClickTiposOS" runat="server" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<div id="DivAgregarTiposOS" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog" style="width: 450px;">
|
||||||
|
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposOS" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">
|
||||||
|
<asp:Literal ID="LtlTituloModalTiposOS" runat="server">Agregar Tipo Defecto</asp:Literal></h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtTiposOS" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvTxtTiposOS" runat="server" ControlToValidate="TxtTiposOS" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposOS"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= TxtTiposOS.ClientID.ToString()%>">Tipo:</label>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div ID="DivEstatus" runat="server" class="form-group form-md-line-input input-iconright" Visible="false">
|
||||||
|
<label for="<%= ChkEstatus.ClientID.ToString()%>">Activo:</label>
|
||||||
|
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:Button ID="BtnAgregarTiposOSModal" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposOS" />
|
||||||
|
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content9" ContentPlaceHolderID="JS" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
@@ -6,179 +6,165 @@ Imports System.Linq
|
|||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
|
||||||
Partial Class OS_CatTiposOrdenesServicios
|
Partial Class OS_CatTiposOrdenesServicios
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
Public Property PuedeEditar As Boolean
|
Private Property CveOrdenServicioTipo As Integer
|
||||||
Get
|
Get
|
||||||
Return CBool(ViewState("PuedeEditar"))
|
If Not ViewState("CveOrdenServicioTipo") Is Nothing Then
|
||||||
End Get
|
Return ViewState("CveOrdenServicioTipo").ToString.ToEntero
|
||||||
Set(value As Boolean)
|
Else
|
||||||
ViewState("PuedeEditar") = value
|
Return -1
|
||||||
End Set
|
End If
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property PuedeEliminar As Boolean
|
End Get
|
||||||
Get
|
Set(value As Integer)
|
||||||
Return CBool(ViewState("PuedeEditar"))
|
ViewState("CveOrdenServicioTipo") = value
|
||||||
End Get
|
End Set
|
||||||
Set(value As Boolean)
|
|
||||||
ViewState("PuedeEditar") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
End Property
|
||||||
If Not Page.IsPostBack Then
|
|
||||||
ViewState("Orden") = ""
|
|
||||||
CargaDatos()
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Sub CargaDatos()
|
Private Property Actualizar As Boolean
|
||||||
Dim ObjSubTipoOrdenServicios As New ClsOS
|
Get
|
||||||
|
If Not ViewState("Actualizar") Is Nothing Then
|
||||||
|
Return DirectCast(ViewState("Actualizar"), Boolean)
|
||||||
|
Else
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
ViewState("Actualizar") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
|
|
||||||
|
If Not Page.IsPostBack Then
|
||||||
|
CargadatosGvTiposOS()
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargadatosGvTiposOS()
|
||||||
|
|
||||||
|
Dim ObjSubTipoOrdenServicios As New ClsOS
|
||||||
If ObjSubTipoOrdenServicios.GetTipoOrdenesServicios(-1) Then
|
If ObjSubTipoOrdenServicios.GetTipoOrdenesServicios(-1) Then
|
||||||
ViewState("DTTipoOrdenServicios") = ObjSubTipoOrdenServicios.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
GvTiposOS.DataSource = ObjSubTipoOrdenServicios.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
GlobalDTSubTipoOrdenServicios = ObjSubTipoOrdenServicios.DtResultados
|
GlobalDTSubTipoOrdenServicios = ObjSubTipoOrdenServicios.DtResultados
|
||||||
Else
|
Else
|
||||||
Me.GvDatos.DataSource = Nothing
|
GvTiposOS.DataSource = Nothing
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjSubTipoOrdenServicios.Dispose()
|
ObjSubTipoOrdenServicios.Dispose()
|
||||||
|
|
||||||
If ViewState("Orden").ToString() <> String.Empty Then
|
GvTiposOS.DataBind()
|
||||||
CargaGrid(ViewState("Orden").ToString())
|
UpGral.Update()
|
||||||
Else
|
|
||||||
CargaGrid("")
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
End Sub
|
||||||
Dim ObjTipoOrdenServicios As New ClsOS
|
|
||||||
If ObjTipoOrdenServicios.AddTipoOrdenServicio(TxtTipoOrdenServicio.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
|
||||||
TxtTipoOrdenServicio.Text = ""
|
|
||||||
Alert("El nuevo Tipo de Orden de Servicio se guardó correctamente.", TipoMensaje.MsgInformacion)
|
|
||||||
UpTitulos.Update()
|
|
||||||
ViewState("DTTipoOrdenServicios") = ObjTipoOrdenServicios.DtResultados '.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
|
||||||
'GlobalDTTipoOrdenServicios(-1) = ObjTipoOrdenServicios.DtResultados
|
|
||||||
|
|
||||||
If ViewState("Orden").ToString() <> String.Empty Then
|
Protected Sub BtnAgregarTiposOS_Click(sender As Object, e As EventArgs) Handles BtnAgregarTiposOS.Click
|
||||||
CargaGrid(ViewState("Orden").ToString())
|
LtlTituloModalTiposOS.Text = "Agregar Tipo de Orden de Servicio"
|
||||||
Else
|
BtnAgregarTiposOSModal.Text = "Agregar"
|
||||||
CargaGrid("")
|
DivEstatus.Visible = False
|
||||||
End If
|
|
||||||
End If
|
|
||||||
ObjTipoOrdenServicios.Dispose()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#Region "G V D A T O S"
|
TxtTiposOS.Text = ""
|
||||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
Actualizar = False
|
||||||
If e.Row.RowIndex = 0 Then
|
UpGral.Update()
|
||||||
e.Row.Cells(0).Width = Unit.Pixel(250)
|
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposOS"))
|
||||||
e.Row.Cells(1).Width = Unit.Pixel(100)
|
|
||||||
e.Row.Cells(2).Width = Unit.Pixel(100)
|
End Sub
|
||||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
|
||||||
e.Row.Cells(4).Width = Unit.Pixel(100)
|
Protected Sub BtnAgregarTiposOSModal_Click(sender As Object, e As EventArgs) Handles BtnAgregarTiposOSModal.Click
|
||||||
e.Row.Cells(5).Width = Unit.Pixel(61)
|
|
||||||
|
Dim ObjTipoOrdenServicios As New ClsOS
|
||||||
|
|
||||||
|
If Not Actualizar Then
|
||||||
|
If ObjTipoOrdenServicios.AddTipoOrdenServicio(TxtTiposOS.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
|
|
||||||
|
TxtTiposOS.Text = ""
|
||||||
|
ChkEstatus.Checked = True
|
||||||
|
|
||||||
|
CargadatosGvTiposOS()
|
||||||
|
|
||||||
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposOS"), "jsHideModalTiposOS")
|
||||||
|
'GeneraGlobalDT()
|
||||||
|
UpGral.Update()
|
||||||
|
|
||||||
|
Alert("Tipo de Orden de Servicio Agregado Correctamente", TipoMensaje.MsgInformacion)
|
||||||
|
Else
|
||||||
|
Alert("Ocurrio un error al guardar el Tipo de Orden de Servicio", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
|
||||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
|
|
||||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Center
|
|
||||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center
|
|
||||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
|
||||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
|
||||||
Dim ObjTipoOrdenServicios As New ClsOS
|
|
||||||
If ObjTipoOrdenServicios.RemoveTipoOrdenServicio(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
|
||||||
GvDatos.EditIndex = -1
|
|
||||||
ViewState("DTTipoOrdenServicios") = ObjTipoOrdenServicios.DtResultados '.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
|
||||||
'GlobalDTTipoOrdenServicios(-1) = ObjTipoOrdenServicios.DtResultados
|
|
||||||
Alert("El Tipo de Orden de Servicio se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
|
||||||
End If
|
|
||||||
ObjTipoOrdenServicios.Dispose()
|
|
||||||
If ViewState("Orden").ToString() <> String.Empty Then
|
|
||||||
CargaGrid(ViewState("Orden").ToString())
|
|
||||||
Else
|
Else
|
||||||
CargaGrid("")
|
If ObjTipoOrdenServicios.UpdateTipoOrdenServicio(TxtTiposOS.Text.Trim, False, ChkEstatus.Checked, CveOrdenServicioTipo) Then
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
|
TxtTiposOS.Text = ""
|
||||||
GvDatos.EditIndex = -1
|
ChkEstatus.Checked = True
|
||||||
If ViewState("Orden").ToString() <> String.Empty Then
|
|
||||||
CargaGrid(ViewState("Orden").ToString())
|
|
||||||
Else
|
|
||||||
CargaGrid("")
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
CargadatosGvTiposOS()
|
||||||
Dim ObjTipoOrdenServicios As New ClsOS
|
'GeneraGlobalDT()
|
||||||
Dim TipoOrdenServicio As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtTipoOrdenServicio"), TextBox).Text.Trim
|
UpModalTiposOS.Update()
|
||||||
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
|
||||||
Dim CveTipoOrdenServicio As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
|
||||||
|
|
||||||
If ObjTipoOrdenServicios.UpdateTipoOrdenServicio(TipoOrdenServicio, False, Estatus, CveTipoOrdenServicio) Then
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposOS"), "jsHideModalTiposOS")
|
||||||
GvDatos.EditIndex = -1
|
|
||||||
ViewState("DTTipoOrdenServicios") = ObjTipoOrdenServicios.DtResultados '.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
UpGral.Update()
|
||||||
'GlobalDTTipoOrdenServicios(-1) = ObjTipoOrdenServicios.DtResultados
|
Alert("Tipo de Orden de Servicio Actualizado Correctamente", TipoMensaje.MsgInformacion)
|
||||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
Else
|
||||||
|
Alert("Ocurrio un error al Actualizar el Tipo de Orden de Servicio", TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
CveOrdenServicioTipo = -1
|
||||||
|
Actualizar = False
|
||||||
|
|
||||||
ObjTipoOrdenServicios.Dispose()
|
ObjTipoOrdenServicios.Dispose()
|
||||||
|
|
||||||
If ViewState("Orden").ToString() <> String.Empty Then
|
|
||||||
CargaGrid(ViewState("Orden").ToString())
|
|
||||||
Else
|
|
||||||
CargaGrid("")
|
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
Public Sub Remove_ClickTiposOS(sender As Object, e As EventArgs)
|
||||||
GvDatos.EditIndex = e.NewEditIndex
|
|
||||||
If ViewState("Orden").ToString() <> String.Empty Then
|
Dim ObjTipoOrdenServicios As New ClsOS
|
||||||
CargaGrid(ViewState("Orden").ToString())
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
|
Dim activo As Boolean = False
|
||||||
|
CveOrdenServicioTipo = GvRow.DataKey("CveOrdenServicioTipo").ToEntero
|
||||||
|
|
||||||
|
If ObjTipoOrdenServicios.RemoveTipoOrdenServicio(CveOrdenServicioTipo) Then
|
||||||
|
CargadatosGvTiposOS()
|
||||||
|
'GeneraGlobalDT()
|
||||||
|
|
||||||
|
Alert("El Tipo de Orden de Servicio se eliminó Correctamente ", TipoMensaje.MsgInformacion)
|
||||||
Else
|
Else
|
||||||
CargaGrid("")
|
Alert("Ocurrio un error al Eliminar el Tipo de Orden de Servicio", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
End Sub
|
|
||||||
#End Region
|
|
||||||
|
|
||||||
#Region "O R D E N A M I E N T O"
|
ObjTipoOrdenServicios.Dispose()
|
||||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
|
||||||
Dim Orden As String = ""
|
|
||||||
Dim Campo As String = ""
|
|
||||||
Dim Literal As Literal = Nothing
|
|
||||||
Const OrdenInicial As String = ""
|
|
||||||
Dim Arg(2) As String
|
|
||||||
|
|
||||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
CargadatosGvTiposOS()
|
||||||
Campo = Arg(0)
|
|
||||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
CveOrdenServicioTipo = -1
|
||||||
|
|
||||||
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
|
||||||
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} ASC", Campo)
|
|
||||||
Literal.Text = String.Format("<i class='fa fa-sort-asc' style='color:#999' ></i>")
|
|
||||||
Else
|
|
||||||
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} DESC", Campo)
|
|
||||||
Literal.Text = String.Format("<i class='fa fa-sort-desc' style='color:#999' ></i>")
|
|
||||||
End If
|
|
||||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
|
||||||
ViewState("Orden") = Orden
|
|
||||||
CargaGrid(Orden)
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaGrid(Orden As String)
|
Public Sub Edit_ClickTiposOS(sender As Object, e As EventArgs)
|
||||||
If Orden <> String.Empty Then
|
|
||||||
Dim DV As New DataView(CType(ViewState("DTTipoOrdenServicios"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
GvDatos.DataSource = DV.ToTable()
|
Dim activo As Boolean = False
|
||||||
DV.Dispose()
|
|
||||||
Else
|
LtlTituloModalTiposOS.Text = "Editar Tipo de Orden de Servicio"
|
||||||
GvDatos.DataSource = CType(ViewState("DTTipoOrdenServicios"), DataTable)
|
Actualizar = True
|
||||||
End If
|
DivEstatus.Visible = True
|
||||||
GvDatos.DataBind()
|
|
||||||
UpDatos.Update()
|
CveOrdenServicioTipo = GvRow.DataKey("CveOrdenServicioTipo").ToEntero
|
||||||
|
|
||||||
|
TxtTiposOS.Text = GvRow.DataKey("OrdenServicioTipo")
|
||||||
|
ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False)
|
||||||
|
|
||||||
|
BtnAgregarTiposOSModal.Text = "Actualizar"
|
||||||
|
|
||||||
|
UpModalTiposOS.Update()
|
||||||
|
|
||||||
|
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposOS"))
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
|
||||||
End Class
|
End Class
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<asp:Label ID="LblCliente" runat="server"></asp:Label>
|
<asp:Label ID="LblCliente" runat="server"></asp:Label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<b>Fecha Recibido:</b>
|
<b>Fecha Recibido:</b>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
@@ -152,6 +152,8 @@
|
|||||||
<div class="col-md-3" style="margin-top: 5px;">
|
<div class="col-md-3" style="margin-top: 5px;">
|
||||||
<asp:DropDownList ID="DdlTipoOrdenOS" CssClass="form-control input-sm select2me" runat="server" DataTextField="OrdenServicioTipo" DataValueField="CveOrdenServicioTipo" Width="100%" Height="30px">
|
<asp:DropDownList ID="DdlTipoOrdenOS" CssClass="form-control input-sm select2me" runat="server" DataTextField="OrdenServicioTipo" DataValueField="CveOrdenServicioTipo" Width="100%" Height="30px">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVTipoOS" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlTipoOrdenOS" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Orden''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCETipoOS" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoOS" Width="100px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,350 +0,0 @@
|
|||||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Clientes2.aspx.vb" Inherits="PRESENTACIONES_Clientes2" %>
|
|
||||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" Runat="Server">
|
|
||||||
<img id="ImgAddVenta" runat="server" alt="Registrar Nueva Venta" style="cursor: pointer;" src="/Imagenes/Nota.gif" width="20" height="25" />
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" Runat="Server">
|
|
||||||
<asp:Literal ID="LtlTitulo" runat="server" Text="Registro de Clientes"></asp:Literal> <asp:Literal ID="LtlCliente" runat="server"></asp:Literal>
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" Runat="Server">
|
|
||||||
|
|
||||||
<%--<script language="javascript" type="text/javascript">
|
|
||||||
|
|
||||||
function SetText(ObjFrom, ObjTo) {
|
|
||||||
ObjTo.innerText = ObjFrom.value;
|
|
||||||
}
|
|
||||||
|
|
||||||
function SetText2(ObjTo, Value) {
|
|
||||||
ObjTo.innerText = Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getSelectedText(Obj, IfIsNull) {
|
|
||||||
if (Obj.selectedIndex == -1)
|
|
||||||
return IfIsNull;
|
|
||||||
else
|
|
||||||
return Obj.options[Obj.selectedIndex].text;
|
|
||||||
}
|
|
||||||
|
|
||||||
//this pageLoad will only works if you are using ASP.Net AJAX
|
|
||||||
//if you're not, you can use the other way.
|
|
||||||
function pageLoad() {
|
|
||||||
var grid = document.getElementById('<%=GvCxC.ClientID %>');
|
|
||||||
var grid2 = document.getElementById('<%=GvCxCHistorial.ClientID %>');
|
|
||||||
|
|
||||||
var firstRowHeaderClone = null;
|
|
||||||
|
|
||||||
if (grid && grid2 && grid.cells && grid2.cells) {
|
|
||||||
if (grid && grid.cells.length > 1) {
|
|
||||||
firstRowHeaderClone = grid.tBodies[0].rows[0].cloneNode(true);
|
|
||||||
grid.tBodies[0].insertBefore(firstRowHeaderClone, grid.tBodies[0].rows[0]);
|
|
||||||
|
|
||||||
var Row1 = grid.tBodies[0].rows[0];
|
|
||||||
var Row2 = grid.tBodies[0].rows[1];
|
|
||||||
|
|
||||||
if (Row1.cells.length > 1 && Row2.cells.length > 1) {
|
|
||||||
Row2.deleteCell(0);
|
|
||||||
Row2.deleteCell(0);
|
|
||||||
Row2.deleteCell(0);
|
|
||||||
Row2.deleteCell(0);
|
|
||||||
Row2.deleteCell(0);
|
|
||||||
|
|
||||||
Row1.cells[0].rowSpan = 2;
|
|
||||||
Row1.cells[1].rowSpan = 2;
|
|
||||||
Row1.cells[2].rowSpan = 2;
|
|
||||||
Row1.cells[3].rowSpan = 2;
|
|
||||||
Row1.cells[4].rowSpan = 2;
|
|
||||||
|
|
||||||
Row1.deleteCell(6);
|
|
||||||
Row1.deleteCell(7);
|
|
||||||
|
|
||||||
Row1.cells[5].colSpan = 2;
|
|
||||||
Row1.cells[6].colSpan = 2;
|
|
||||||
|
|
||||||
|
|
||||||
Row2.deleteCell(4);
|
|
||||||
Row2.deleteCell(4);
|
|
||||||
|
|
||||||
|
|
||||||
Row1.cells[7].rowSpan = 2;
|
|
||||||
Row1.cells[8].rowSpan = 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var firstRowHeaderClone2 = null;
|
|
||||||
if (grid2 && grid2.cells.length > 1) {
|
|
||||||
firstRowHeaderClone2 = grid2.tBodies[0].rows[0].cloneNode(true);
|
|
||||||
grid2.tBodies[0].insertBefore(firstRowHeaderClone2, grid2.tBodies[0].rows[0]);
|
|
||||||
|
|
||||||
var Row12 = grid2.tBodies[0].rows[0];
|
|
||||||
var Row22 = grid2.tBodies[0].rows[1];
|
|
||||||
|
|
||||||
if (Row12.cells.length > 1 && Row22.cells.length > 1) {
|
|
||||||
Row22.deleteCell(0);
|
|
||||||
Row22.deleteCell(0);
|
|
||||||
Row22.deleteCell(0);
|
|
||||||
Row22.deleteCell(0);
|
|
||||||
Row22.deleteCell(0);
|
|
||||||
|
|
||||||
Row12.cells[0].rowSpan = 2;
|
|
||||||
Row12.cells[1].rowSpan = 2;
|
|
||||||
Row12.cells[2].rowSpan = 2;
|
|
||||||
Row12.cells[3].rowSpan = 2;
|
|
||||||
Row12.cells[4].rowSpan = 2;
|
|
||||||
|
|
||||||
Row12.deleteCell(6);
|
|
||||||
Row12.deleteCell(7);
|
|
||||||
|
|
||||||
Row12.cells[5].colSpan = 2;
|
|
||||||
Row12.cells[6].colSpan = 2;
|
|
||||||
|
|
||||||
Row22.deleteCell(4);
|
|
||||||
Row22.deleteCell(4);
|
|
||||||
|
|
||||||
Row12.cells[7].rowSpan = 2;
|
|
||||||
Row12.cells[8].rowSpan = 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>--%>
|
|
||||||
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="padding-top:20px;">
|
|
||||||
<tr>
|
|
||||||
<td align="left">
|
|
||||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="0" Width="100%">
|
|
||||||
<ajax:TabPanel ID="TabAlta" runat="server" HeaderText="Información del Cliente">
|
|
||||||
<ContentTemplate>
|
|
||||||
<table border="0" class="contenido">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<div>
|
|
||||||
<fieldset>
|
|
||||||
<legend><b>Datos del Cliente</b></legend>
|
|
||||||
<table border="0">
|
|
||||||
<tr>
|
|
||||||
<td>Nombre:</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtNombre" runat="server" MaxLength="96" Width="400px"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVNombre" runat="server" ControlToValidate="TxtNombre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre del Cliente''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCallOutExtender ID="VCENombre" runat="server" HighlightCssClass="vco" TargetControlID="RFVNombre" Width="300px"></ajax:ValidatorCallOutExtender>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Dirección:</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtDireccion" runat="server" MaxLength="90" Width="400px"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVDireccion" runat="server" ControlToValidate="TxtDireccion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Direccion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCallOutExtender ID="VCEDireccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVDireccion" Width="300px"></ajax:ValidatorCallOutExtender>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>No. Ext.</td>
|
|
||||||
<td>
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtNoExt" runat="server" MaxLength="10" Width="40px"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
<td> No. Int.</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtNoInt" runat="server" MaxLength="10" Width="40px"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Colonia:</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtColonia" runat="server" MaxLength="50" Width="200px"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVColonia" runat="server" ControlToValidate="TxtColonia" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Colonia''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCallOutExtender ID="VCOColonia" runat="server" HighlightCssClass="vco" TargetControlID="RFVColonia" Width="300px"></ajax:ValidatorCallOutExtender>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Localidad:</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtLocalidad" runat="server" MaxLength="50" Width="200px"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVLocalidad" runat="server" ControlToValidate="TxtLocalidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Localidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCallOutExtender ID="VCOLocalidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVLocalidad" Width="300px"></ajax:ValidatorCallOutExtender>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Ciudad:</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtCiudad" runat="server" MaxLength="40" Width="200px"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVCiudad" runat="server" ControlToValidate="TxtCiudad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ciudad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCallOutExtender ID="VCECiudad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCiudad" Width="300px"></ajax:ValidatorCallOutExtender>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Estado:</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtEstado" runat="server" MaxLength="25" Width="200px"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVEstado" runat="server" ControlToValidate="TxtEstado" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCallOutExtender ID="VCEEstado" runat="server" HighlightCssClass="vco" TargetControlID="RFVEstado" Width="300px"></ajax:ValidatorCallOutExtender>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>RFC:</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtRFC" runat="server" MaxLength="13" Width="200px"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVRFC" runat="server" ControlToValidate="TxtRFC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RFC''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCallOutExtender ID="VCERFC" runat="server" HighlightCssClass="vco" TargetControlID="RFVRFC" Width="300px"></ajax:ValidatorCallOutExtender>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Código Postal:</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtCP" runat="server" MaxLength="5" Width="40px"></asp:TextBox>
|
|
||||||
<asp:CompareValidator ID="CVCP" runat="server" ControlToValidate="TxtCP" Display="None" ErrorMessage="El campo <b>''Codigo Postal''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Integer" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
|
||||||
<ajax:ValidatorCallOutExtender ID="VCOCP" runat="server" HighlightCssClass="vco" TargetControlID="CVCP" Width="300px"></ajax:ValidatorCallOutExtender>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Teléfono:</td>
|
|
||||||
<td><asp:TextBox ID="TxtTelefono" runat="server" MaxLength="15" Width="100px" ValidationGroup="GrpGuardar"></asp:TextBox></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Contacto:</td>
|
|
||||||
<td><asp:TextBox ID="TxtContacto" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Email:</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtEmail" runat="server" MaxLength="50" Width="200px"></asp:TextBox>
|
|
||||||
<asp:RegularExpressionValidator ID="REVEmail" runat="server" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ControlToValidate="TxtEmail" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Email''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardar"></asp:RegularExpressionValidator>
|
|
||||||
<ajax:ValidatorCallOutExtender ID="VCOMail" runat="server" HighlightCssClass="vco" TargetControlID="REVEmail" Width="300px"></ajax:ValidatorCallOutExtender>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>ConfirmarnContraseña de Acceso:</td>
|
|
||||||
<td><asp:TextBox ID="TxtConfirmarContraseñaAcceso" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</ContentTemplate>
|
|
||||||
</ajax:TabPanel>
|
|
||||||
</ajax:TabContainer>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="center">
|
|
||||||
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" />
|
|
||||||
<asp:Button ID="BtnEliminar" runat="server" Text="Eliminar" />
|
|
||||||
<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />
|
|
||||||
<asp:Button ID="BtnCancelar" runat="server" Text="Cancelar" OnClientClick="javascript:window.location.href='/Ventas/CatClientes.aspx'; return false;" />
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<div id ="DivMail" style="width:350px; background-color:White; border:solid 1px black; color:Black; display:none; position:fixed; z-index: 1500">
|
|
||||||
<asp:UpdatePanel ID="UpSendMail" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<asp:HiddenField ID="HdnCveVenta" runat="server" ClientIDMode="Static" Value="-1" />
|
|
||||||
<asp:HiddenField ID="HdnFolioVenta" runat="server" ClientIDMode="Static" Value="-1" />
|
|
||||||
<asp:HiddenField ID="HdnTipoDocto" runat="server" ClientIDMode="Static" Value="-1" />
|
|
||||||
<table border="1" rules="all" style="border-collapse: collapse; width: 350px">
|
|
||||||
<tr align="left">
|
|
||||||
<td width="150">Para:</td>
|
|
||||||
<td width="200">
|
|
||||||
<asp:TextBox ID="TxtParaMail" runat="server" ClientIDMode="Static" Width="194px" ReadOnly="true"></asp:TextBox>
|
|
||||||
<asp:RegularExpressionValidator ID="REVParaMail" runat="server" Display="None" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ControlToValidate="TxtParaMail" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Para (Mail)''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardar"></asp:RegularExpressionValidator>
|
|
||||||
<ajax:ValidatorCallOutExtender ID="VCOParaMail" runat="server" HighlightCssClass="vco" TargetControlID="REVParaMail" Width="300px"></ajax:ValidatorCallOutExtender>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr align="left">
|
|
||||||
<td>
|
|
||||||
Con copia para:<br />
|
|
||||||
(Separar con: ;)
|
|
||||||
</td>
|
|
||||||
<td><asp:TextBox ID="TxtCC" runat="server" TextMode="MultiLine" Columns="3" Rows="3" Width="194px"></asp:TextBox></td>
|
|
||||||
</tr>
|
|
||||||
<tr align="left">
|
|
||||||
<td>Texto Adicional:</td>
|
|
||||||
<td><asp:TextBox ID="TxtBody" runat="server" TextMode="MultiLine" Columns="3" Rows="3" Width="194px"></asp:TextBox></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="center" colspan="2"><asp:Button ID="BtnSendMail" runat="server" OnClientClick="javascript:$get('DivMail').style.display='none';" Text="Enviar" /> <input type="button" value="Cancelar" onclick="javascript:$get('DivMail').style.display='none';" /></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
<div id ="DivAddPago" style="width:350px; background-color:White; border:solid 1px black; color:Black; display:none; position:fixed; z-index: 1500">
|
|
||||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<asp:HiddenField ID="HdnCveVentaAbono" runat="server" ClientIDMode="Static" Value="-1" />
|
|
||||||
<table border="1" rules="all" style="border-collapse: collapse; width: 350px">
|
|
||||||
<tr align="left">
|
|
||||||
<td width="150">Cantidad:</td>
|
|
||||||
<td width="200">
|
|
||||||
<asp:TextBox ID="TxtCantidad" runat="server" ClientIDMode="Static" ValidationGroup="GpoGuardarAbonar" Width="80px"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVCantidad" runat="server" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GpoGuardarAbonar"></asp:RequiredFieldValidator>
|
|
||||||
<asp:CompareValidator ID="CVCantidadAbonar" runat="server" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> no tiene el formato correcto, por favor corrija." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GpoGuardarAbonar"></asp:CompareValidator>
|
|
||||||
<ajax:ValidatorCallOutExtender ID="VCOCantidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCallOutExtender>
|
|
||||||
<ajax:ValidatorCallOutExtender ID="VCOCantidad2" runat="server" HighlightCssClass="vco" TargetControlID="CVCantidadAbonar" Width="300px"></ajax:ValidatorCallOutExtender>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<td><b>Fecha:</b> </td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtFechaPago" runat="server" BorderStyle="None" CausesValidation="true" MaxLength="10" ValidationGroup="GpoGuardarAbonar"></asp:TextBox>
|
|
||||||
<asp:ImageButton runat="server" ID="ImgFechaPago" Visible="false" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
|
||||||
<ajax:MaskedEditExtender ID="MEEFechaPago" runat="server" TargetControlID="TxtFechaPago" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
|
||||||
<ajax:CalendarExtender runat="server" ID="CEFechaPago" TargetControlID="TxtFechaPago" PopupButtonID="ImgFechaPago" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVFechaPago" runat="server" ControlToValidate="TxtFechaPago" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GpoGuardarAbonar"></asp:RequiredFieldValidator>
|
|
||||||
<asp:CompareValidator ID="CVFechaPago" runat="server" ControlToValidate="TxtFechaPago" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GpoGuardarAbonar"></asp:CompareValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaPago1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaPago" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaPago2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaPago" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
||||||
</td>
|
|
||||||
<tr>
|
|
||||||
<td>Referencia:</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtReferencia" runat="server" ClientIDMode="Static" ValidationGroup="GpoGuardarAbonar" Width="80px"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVReferencia" runat="server" ControlToValidate="TxtReferencia" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Referencia''</b> es necesario, por favor ingréselo." ValidationGroup="GpoGuardarAbonar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCallOutExtender ID="VCOReferencia" runat="server" HighlightCssClass="vco" TargetControlID="RFVReferencia" Width="300px"></ajax:ValidatorCallOutExtender>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="center" colspan="2"><asp:Button ID="BtnAbonar" runat="server" Text="Abonar" ValidationGroup="GpoGuardarAbonar" /> <input type="button" value="Cancelar" onclick="javascript:$get('DivAddPago').style.display='none';" /></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<asp:UpdateProgress ID="upProgress" runat="server" DisplayAfter="0">
|
|
||||||
<ProgressTemplate>
|
|
||||||
<div id="overlay">
|
|
||||||
<div id="modalprogress">
|
|
||||||
<div id="theprogress">
|
|
||||||
<center>
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0">
|
|
||||||
<tr>
|
|
||||||
<td>La información se está procesando...</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><img src="/Imagenes/Cargando.gif" style="border-width: 0px;" alt="" /></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</center>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ProgressTemplate>
|
|
||||||
</asp:UpdateProgress>
|
|
||||||
</asp:Content>
|
|
||||||
|
|
||||||
@@ -1,118 +0,0 @@
|
|||||||
Option Explicit On
|
|
||||||
Option Strict On
|
|
||||||
|
|
||||||
Imports Extensiones
|
|
||||||
Imports System.Runtime.InteropServices
|
|
||||||
Imports System.IO
|
|
||||||
Imports System.Data
|
|
||||||
|
|
||||||
Partial Class PRESENTACIONES_Clientes2
|
|
||||||
Inherits ClsPaginas
|
|
||||||
|
|
||||||
'Configuración
|
|
||||||
Private ReadOnly Property CveCliente As Integer
|
|
||||||
Get
|
|
||||||
Return ViewState("CveCliente").ToString.ToEntero
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
|
||||||
If Not IsPostBack Then
|
|
||||||
|
|
||||||
SetValues()
|
|
||||||
SetPermisos()
|
|
||||||
|
|
||||||
If Request("CveCliente") IsNot Nothing AndAlso IsNumeric(Request("CveCliente")) AndAlso Request("CveCliente").ToEntero > 0 Then
|
|
||||||
ViewState("CveCliente") = Request("CveCliente")
|
|
||||||
CargaDatos()
|
|
||||||
'Configuración de Modalidad Update
|
|
||||||
BtnGuardar.Text = "Guardar Cambios"
|
|
||||||
LtlTitulo.Text = "Consulta del Cliente:"
|
|
||||||
'ImgAddVenta
|
|
||||||
ImgAddVenta.Attributes.Add("OnClick", "window.location = '/Ventas/Ventas.aspx?CveCliente=" & CveCliente & "'")
|
|
||||||
If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then TAB.ActiveTabIndex = Request("Opt").ToEntero
|
|
||||||
Else
|
|
||||||
'Configuración de Modalidad Insert
|
|
||||||
ViewState("CveCliente") = -1
|
|
||||||
BtnEliminar.Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub SetValues()
|
|
||||||
ViewState("Orden") = ""
|
|
||||||
ViewState("OSucursalCliente") = "SucursalCliente DESC"
|
|
||||||
ViewState("OEstado") = "Estado DESC"
|
|
||||||
ViewState("OFecha") = "Fecha DESC"
|
|
||||||
ViewState("OUsuario") = "Usuario DESC"
|
|
||||||
TxtFechaPago.Text = Now.ToShortDateString
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub SetPermisos()
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CargaDatos()
|
|
||||||
Dim ObjClientes As New ClsClientes()
|
|
||||||
If ObjClientes.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
|
|
||||||
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
|
||||||
'Campos para Modificación
|
|
||||||
LtlCliente.Text = ObjClientes.Nombre
|
|
||||||
TxtNombre.Text = ObjClientes.Nombre
|
|
||||||
TxtDireccion.Text = ObjClientes.Direccion
|
|
||||||
TxtNoExt.Text = ObjClientes.NoExt
|
|
||||||
TxtNoInt.Text = ObjClientes.NoInt
|
|
||||||
TxtColonia.Text = ObjClientes.Colonia
|
|
||||||
TxtLocalidad.Text = ObjClientes.Localidad
|
|
||||||
TxtCiudad.Text = ObjClientes.Ciudad
|
|
||||||
TxtEstado.Text = ObjClientes.Estado
|
|
||||||
TxtRFC.Text = ObjClientes.RFC
|
|
||||||
TxtCP.Text = ObjClientes.CP.ToString
|
|
||||||
TxtTelefono.Text = ObjClientes.Telefono
|
|
||||||
TxtContacto.Text = ObjClientes.Contacto
|
|
||||||
TxtEmail.Text = ObjClientes.Mail
|
|
||||||
TxtParaMail.Text = ObjClientes.Mail
|
|
||||||
Else
|
|
||||||
Alert("El Cliente Solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia)
|
|
||||||
BtnGuardar.Enabled = False
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
ObjClientes.Dispose()
|
|
||||||
End Sub
|
|
||||||
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
|
|
||||||
|
|
||||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
|
||||||
SendMail()
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
'Protected Sub BtnEliminar_Click(sender As Object, e As System.EventArgs) Handles BtnEliminar.Click
|
|
||||||
' Dim ObjClientes As New ClsClientes()
|
|
||||||
' If ObjClientes.RemoveCliente(CveCliente) Then
|
|
||||||
' Alert("El Cliente se Eliminó correctamente.", TipoMensaje.MsgInformacion, "document.location.href=""/Ventas/CatClientes.aspx""")
|
|
||||||
' End If
|
|
||||||
' ObjClientes.Dispose()
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
Protected Sub SendMail()
|
|
||||||
Dim ObjMail As New ClsSisMail()
|
|
||||||
If ObjMail.Mandacorreo(UsuarioActual.Empresa.SendMail, UsuarioActual.Empresa.SendMailPassword, "JULIAN@adsistemas.mx", "Acceso AIMMG", "Acceso a AIMMG <table><tr><td>ADSISTEMAS.NO-IP/PRESENTACIONES/LOGIN2.ASPX</td></tr><tr><td>" & TxtEmail.Text.Trim & ", " & TxtConfirmarContraseñaAcceso.Text.Trim & " </td></tr></table>") Then
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
'Protected Sub BtnAbonar_Click(sender As Object, e As System.EventArgs) Handles BtnAbonar.Click
|
|
||||||
' Dim ObjMovtos As New ClsMovimientos()
|
|
||||||
' If ObjMovtos.AddMovimiento(2, "Cli", CveCliente.ToString, HdnCveVentaAbono.Value, 0, TxtCantidad.Text.Trim.ToDouble, TxtFechaPago.Text.ToDate, TxtReferencia.Text.Trim, DdlCtaContableClientes.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
|
||||||
' Alert("El abono se guardó correctamente", TipoMensaje.MsgInformacion, "$get(""DivAddPago"").style.display=""none"";")
|
|
||||||
|
|
||||||
' TxtCantidad.Text = ""
|
|
||||||
' TxtReferencia.Text = ""
|
|
||||||
' UpDatos.Update()
|
|
||||||
' End If
|
|
||||||
' ObjMovtos.Dispose()
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,618 +0,0 @@
|
|||||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Clientes3.aspx.vb" Inherits="PRESENTACIONES_Clientes3" %>
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" Runat="Server">
|
|
||||||
<img id="ImgAddVenta" runat="server" alt="Registrar Nueva Venta" style="cursor: pointer;" src="/Imagenes/Nota.gif" width="20" height="25" />
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" Runat="Server">
|
|
||||||
<asp:Literal ID="LtlTitulo" runat="server" Text="Registro de Clientes"></asp:Literal> <asp:Literal ID="LtlCliente" runat="server"></asp:Literal>
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" Runat="Server">
|
|
||||||
|
|
||||||
<script language="javascript" type="text/javascript">
|
|
||||||
|
|
||||||
function SetText(ObjFrom, ObjTo) {
|
|
||||||
ObjTo.innerText = ObjFrom.value;
|
|
||||||
}
|
|
||||||
|
|
||||||
function SetText2(ObjTo, Value) {
|
|
||||||
ObjTo.innerText = Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getSelectedText(Obj, IfIsNull) {
|
|
||||||
if (Obj.selectedIndex == -1)
|
|
||||||
return IfIsNull;
|
|
||||||
else
|
|
||||||
return Obj.options[Obj.selectedIndex].text;
|
|
||||||
}
|
|
||||||
|
|
||||||
//this pageLoad will only works if you are using ASP.Net AJAX
|
|
||||||
//if you're not, you can use the other way.
|
|
||||||
function pageLoad() {
|
|
||||||
var grid = document.getElementById('<%=GvCxC.ClientID %>');
|
|
||||||
var grid2 = document.getElementById('<%=GvCxCHistorial.ClientID %>');
|
|
||||||
|
|
||||||
var firstRowHeaderClone = null;
|
|
||||||
|
|
||||||
if (grid && grid2 && grid.cells && grid2.cells) {
|
|
||||||
if (grid && grid.cells.length > 1) {
|
|
||||||
firstRowHeaderClone = grid.tBodies[0].rows[0].cloneNode(true);
|
|
||||||
grid.tBodies[0].insertBefore(firstRowHeaderClone, grid.tBodies[0].rows[0]);
|
|
||||||
|
|
||||||
var Row1 = grid.tBodies[0].rows[0];
|
|
||||||
var Row2 = grid.tBodies[0].rows[1];
|
|
||||||
|
|
||||||
if (Row1.cells.length > 1 && Row2.cells.length > 1) {
|
|
||||||
Row2.deleteCell(0);
|
|
||||||
Row2.deleteCell(0);
|
|
||||||
Row2.deleteCell(0);
|
|
||||||
Row2.deleteCell(0);
|
|
||||||
Row2.deleteCell(0);
|
|
||||||
|
|
||||||
Row1.cells[0].rowSpan = 2;
|
|
||||||
Row1.cells[1].rowSpan = 2;
|
|
||||||
Row1.cells[2].rowSpan = 2;
|
|
||||||
Row1.cells[3].rowSpan = 2;
|
|
||||||
Row1.cells[4].rowSpan = 2;
|
|
||||||
|
|
||||||
Row1.deleteCell(6);
|
|
||||||
Row1.deleteCell(7);
|
|
||||||
|
|
||||||
Row1.cells[5].colSpan = 2;
|
|
||||||
Row1.cells[6].colSpan = 2;
|
|
||||||
|
|
||||||
|
|
||||||
Row2.deleteCell(4);
|
|
||||||
Row2.deleteCell(4);
|
|
||||||
|
|
||||||
|
|
||||||
Row1.cells[7].rowSpan = 2;
|
|
||||||
Row1.cells[8].rowSpan = 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var firstRowHeaderClone2 = null;
|
|
||||||
if (grid2 && grid2.cells.length > 1) {
|
|
||||||
firstRowHeaderClone2 = grid2.tBodies[0].rows[0].cloneNode(true);
|
|
||||||
grid2.tBodies[0].insertBefore(firstRowHeaderClone2, grid2.tBodies[0].rows[0]);
|
|
||||||
|
|
||||||
var Row12 = grid2.tBodies[0].rows[0];
|
|
||||||
var Row22 = grid2.tBodies[0].rows[1];
|
|
||||||
|
|
||||||
if (Row12.cells.length > 1 && Row22.cells.length > 1) {
|
|
||||||
Row22.deleteCell(0);
|
|
||||||
Row22.deleteCell(0);
|
|
||||||
Row22.deleteCell(0);
|
|
||||||
Row22.deleteCell(0);
|
|
||||||
Row22.deleteCell(0);
|
|
||||||
|
|
||||||
Row12.cells[0].rowSpan = 2;
|
|
||||||
Row12.cells[1].rowSpan = 2;
|
|
||||||
Row12.cells[2].rowSpan = 2;
|
|
||||||
Row12.cells[3].rowSpan = 2;
|
|
||||||
Row12.cells[4].rowSpan = 2;
|
|
||||||
|
|
||||||
Row12.deleteCell(6);
|
|
||||||
Row12.deleteCell(7);
|
|
||||||
|
|
||||||
Row12.cells[5].colSpan = 2;
|
|
||||||
Row12.cells[6].colSpan = 2;
|
|
||||||
|
|
||||||
Row22.deleteCell(4);
|
|
||||||
Row22.deleteCell(4);
|
|
||||||
|
|
||||||
Row12.cells[7].rowSpan = 2;
|
|
||||||
Row12.cells[8].rowSpan = 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="padding-top:20px;">
|
|
||||||
<tr>
|
|
||||||
<td align="left">
|
|
||||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="0" Width="100%">
|
|
||||||
<ajax:TabPanel ID="TabAlta" runat="server" HeaderText="Información del Cliente">
|
|
||||||
<ContentTemplate>
|
|
||||||
<table border="0" class="contenido">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<div>
|
|
||||||
<fieldset>
|
|
||||||
<legend><b>Datos del Cliente</b></legend>
|
|
||||||
<table border="0">
|
|
||||||
<tr>
|
|
||||||
<td>Nombre:</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtNombre" runat="server" MaxLength="96" Width="400px"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVNombre" runat="server" ControlToValidate="TxtNombre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre del Cliente''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCallOutExtender ID="VCENombre" runat="server" HighlightCssClass="vco" TargetControlID="RFVNombre" Width="300px"></ajax:ValidatorCallOutExtender>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Dirección:</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtDireccion" runat="server" MaxLength="90" Width="400px"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVDireccion" runat="server" ControlToValidate="TxtDireccion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Direccion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCallOutExtender ID="VCEDireccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVDireccion" Width="300px"></ajax:ValidatorCallOutExtender>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>No. Ext.</td>
|
|
||||||
<td>
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtNoExt" runat="server" MaxLength="10" Width="40px"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
<td> No. Int.</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtNoInt" runat="server" MaxLength="10" Width="40px"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Colonia:</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtColonia" runat="server" MaxLength="50" Width="200px"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVColonia" runat="server" ControlToValidate="TxtColonia" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Colonia''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCallOutExtender ID="VCOColonia" runat="server" HighlightCssClass="vco" TargetControlID="RFVColonia" Width="300px"></ajax:ValidatorCallOutExtender>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Localidad:</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtLocalidad" runat="server" MaxLength="50" Width="200px"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVLocalidad" runat="server" ControlToValidate="TxtLocalidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Localidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCallOutExtender ID="VCOLocalidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVLocalidad" Width="300px"></ajax:ValidatorCallOutExtender>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Ciudad:</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtCiudad" runat="server" MaxLength="40" Width="200px"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVCiudad" runat="server" ControlToValidate="TxtCiudad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ciudad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCallOutExtender ID="VCECiudad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCiudad" Width="300px"></ajax:ValidatorCallOutExtender>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Estado:</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtEstado" runat="server" MaxLength="25" Width="200px"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVEstado" runat="server" ControlToValidate="TxtEstado" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCallOutExtender ID="VCEEstado" runat="server" HighlightCssClass="vco" TargetControlID="RFVEstado" Width="300px"></ajax:ValidatorCallOutExtender>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>RFC:</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtRFC" runat="server" MaxLength="13" Width="200px"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVRFC" runat="server" ControlToValidate="TxtRFC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RFC''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCallOutExtender ID="VCERFC" runat="server" HighlightCssClass="vco" TargetControlID="RFVRFC" Width="300px"></ajax:ValidatorCallOutExtender>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Código Postal:</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtCP" runat="server" MaxLength="5" Width="40px"></asp:TextBox>
|
|
||||||
<asp:CompareValidator ID="CVCP" runat="server" ControlToValidate="TxtCP" Display="None" ErrorMessage="El campo <b>''Codigo Postal''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Integer" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
|
||||||
<ajax:ValidatorCallOutExtender ID="VCOCP" runat="server" HighlightCssClass="vco" TargetControlID="CVCP" Width="300px"></ajax:ValidatorCallOutExtender>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Teléfono:</td>
|
|
||||||
<td><asp:TextBox ID="TxtTelefono" runat="server" MaxLength="15" Width="100px" ValidationGroup="GrpGuardar"></asp:TextBox></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Contacto:</td>
|
|
||||||
<td><asp:TextBox ID="TxtContacto" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Email:</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtEmail" runat="server" MaxLength="50" Width="200px"></asp:TextBox>
|
|
||||||
<asp:RegularExpressionValidator ID="REVEmail" runat="server" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ControlToValidate="TxtEmail" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Email''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardar"></asp:RegularExpressionValidator>
|
|
||||||
<ajax:ValidatorCallOutExtender ID="VCOMail" runat="server" HighlightCssClass="vco" TargetControlID="REVEmail" Width="300px"></ajax:ValidatorCallOutExtender>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>ConfirmarnContraseña de Acceso:</td>
|
|
||||||
<td><asp:TextBox ID="TxtConfirmarContraseñaAcceso" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</ContentTemplate>
|
|
||||||
</ajax:TabPanel>
|
|
||||||
<ajax:TabPanel ID="TabHistorial" runat="server" HeaderText="Historial de Ventas">
|
|
||||||
<ContentTemplate>
|
|
||||||
<table border="0" class="contenido">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<div>
|
|
||||||
<fieldset>
|
|
||||||
<legend><b>Historial de Ventas</b></legend>
|
|
||||||
<table border="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:UpdatePanel ID="UpnHistorial" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<asp:GridView ID="GVHistorial" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas en el Cliente" ToolTip="Listado de Historial de Ventas">
|
|
||||||
<Columns>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Factura</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlFactura" runat="server"></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Fecha</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Sub Total</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlSubTotal" runat="server" Text='<%# If (CDbl(Eval("SubTotal")) = 0, "", Eval("SubTotal", "{0:N2}")) %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Descuento</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlDescuento" runat="server" Text='<%# If (CDbl(Eval("Descuento")) = 0, "", Eval("Descuento", "{0:N2}")) %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Amortización</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlAmort" runat="server" Text='<%# If (CDbl(Eval("Amortizacion")) = 0, "", Eval("Amortizacion", "{0:N2}")) %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Total</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlTotal" runat="server" Text='<%# If (CDbl(Eval("Total")) = 0, "", Eval("Total", "{0:N2}")) %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Estatus</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("EstatusFactura") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Se Timbró</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlTimbro" runat="server" Text='<%# Eval("SeTimbro") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Envío Mail</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlEnvioMail" runat="server" Text='<%# Eval("EnvioMail") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Reenviar</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<a id="HLSendMail" runat="server" class="Texto"><img alt="Reenviar Mail" style="border: 0px none white" src="/Imagenes/SendMail.jpg" height="25px" width="30px" /></a>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
</Columns>
|
|
||||||
<RowStyle CssClass="Texto" />
|
|
||||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
|
||||||
<HeaderStyle CssClass="Titulos" />
|
|
||||||
</asp:GridView>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</ContentTemplate>
|
|
||||||
</ajax:TabPanel>
|
|
||||||
<ajax:TabPanel ID="TabCxC" runat="server" HeaderText="Cuentas x Cobrar">
|
|
||||||
<ContentTemplate>
|
|
||||||
<table border="0" class="contenido">
|
|
||||||
<tr>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<div>
|
|
||||||
<fieldset>
|
|
||||||
<legend><b>CxC Activas</b></legend>
|
|
||||||
<table border="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:GridView ID="GvCxC" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas X Cobrar Pendientes" ToolTip="Listado de CxC">
|
|
||||||
<Columns>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Factura</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlFactura" runat="server"></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Fecha Venta</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Fecha Vencimiento</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlFechaVenci" runat="server" Text='<%# Eval("FechaVencimiento", "{0:d}") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Días Vencidos</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlDiasVencido" runat="server" Text='<%# Eval("DiasVencidos", "{0}") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Monto Venta (Saldo Orig)</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlSaldoOriginal" runat="server" Text='<%# Eval("Original", "{0:N2}") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Abonado</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlAbonado" runat="server" Text='<%# Eval("Abonado", "{0:N2}") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>% Recuperado</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlPorRecuperado" runat="server" Text='<%# Eval("PorRecuperado", "{0:N2}%") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Saldo</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>% A Recuperar</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlPorXRecuperar" runat="server" Text='<%# Eval("PorXRecuperar", "{0:N2}%") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Auxiliar</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlAux" runat="server"></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Abonar</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Image ID="ImgAbonar" runat="server" ImageUrl="~/Imagenes/Money_add.png" AlternateText="Registrar Pago/Abono" Style="cursor:pointer;" />
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
</Columns>
|
|
||||||
<RowStyle CssClass="Texto" />
|
|
||||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
|
||||||
<HeaderStyle CssClass="Titulos" />
|
|
||||||
</asp:GridView>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<div>
|
|
||||||
<fieldset>
|
|
||||||
<legend><b>Historial de CxC</b></legend>
|
|
||||||
<table border="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:GridView ID="GvCxCHistorial" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró Historial de Cuentas X Cobrar" ToolTip="Listado de Historia CxC">
|
|
||||||
<Columns>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Factura</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlFactura" runat="server"></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Fecha Venta</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Fecha Vencimiento</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlFechaVenci" runat="server" Text='<%# Eval("FechaVencimiento", "{0:d}") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Días Vencidos</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlDiasVencido" runat="server" Text='<%# Eval("DiasVencidos", "{0}") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Monto Venta (Saldo Orig)</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlSaldoOriginal" runat="server" Text='<%# Eval("Original", "{0:N2}") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Abonado</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlAbonado" runat="server" Text='<%# Eval("Abonado", "{0:N2}") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>% Recuperado</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlPorRecuperado" runat="server" Text='<%# Eval("PorRecuperado", "{0:N2}%") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Saldo</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2};") %>'></asp:Literal> 
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>% A Recuperar</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlPorXRecuperar" runat="server" Text='<%# Eval("PorXRecuperar", "{0:N2}%") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Auxiliar</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlAux" runat="server"></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Abonar</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Image ID="ImgAbonar" runat="server" ImageUrl="~/Imagenes/Money_add.png" AlternateText="Registrar Pago/Abono" Style="cursor:pointer;" />
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
</Columns>
|
|
||||||
<RowStyle CssClass="Texto" />
|
|
||||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
|
||||||
<HeaderStyle CssClass="Titulos" />
|
|
||||||
</asp:GridView>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</ContentTemplate>
|
|
||||||
</ajax:TabPanel>
|
|
||||||
</ajax:TabContainer>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</table>
|
|
||||||
<div id ="DivMail" style="width:350px; background-color:White; border:solid 1px black; color:Black; display:none; position:fixed; z-index: 1500">
|
|
||||||
<asp:UpdatePanel ID="UpSendMail" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<asp:HiddenField ID="HdnCveVenta" runat="server" ClientIDMode="Static" Value="-1" />
|
|
||||||
<asp:HiddenField ID="HdnFolioVenta" runat="server" ClientIDMode="Static" Value="-1" />
|
|
||||||
<asp:HiddenField ID="HdnTipoDocto" runat="server" ClientIDMode="Static" Value="-1" />
|
|
||||||
<table border="1" rules="all" style="border-collapse: collapse; width: 350px">
|
|
||||||
<tr align="left">
|
|
||||||
<td width="150">Para:</td>
|
|
||||||
<td width="200">
|
|
||||||
<asp:TextBox ID="TxtParaMail" runat="server" ClientIDMode="Static" Width="194px" ReadOnly="true"></asp:TextBox>
|
|
||||||
<asp:RegularExpressionValidator ID="REVParaMail" runat="server" Display="None" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ControlToValidate="TxtParaMail" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Para (Mail)''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardar"></asp:RegularExpressionValidator>
|
|
||||||
<ajax:ValidatorCallOutExtender ID="VCOParaMail" runat="server" HighlightCssClass="vco" TargetControlID="REVParaMail" Width="300px"></ajax:ValidatorCallOutExtender>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr align="left">
|
|
||||||
<td>
|
|
||||||
Con copia para:<br />
|
|
||||||
(Separar con: ;)
|
|
||||||
</td>
|
|
||||||
<td><asp:TextBox ID="TxtCC" runat="server" TextMode="MultiLine" Columns="3" Rows="3" Width="194px"></asp:TextBox></td>
|
|
||||||
</tr>
|
|
||||||
<tr align="left">
|
|
||||||
<td>Texto Adicional:</td>
|
|
||||||
<td><asp:TextBox ID="TxtBody" runat="server" TextMode="MultiLine" Columns="3" Rows="3" Width="194px"></asp:TextBox></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="center" colspan="2"><asp:Button ID="BtnSendMail" runat="server" OnClientClick="javascript:$get('DivMail').style.display='none';" Text="Enviar" /> <input type="button" value="Cancelar" onclick="javascript:$get('DivMail').style.display='none';" /></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
<div id ="DivAddPago" style="width:350px; background-color:White; border:solid 1px black; color:Black; display:none; position:fixed; z-index: 1500">
|
|
||||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<asp:HiddenField ID="HdnCveVentaAbono" runat="server" ClientIDMode="Static" Value="-1" />
|
|
||||||
<table border="1" rules="all" style="border-collapse: collapse; width: 350px">
|
|
||||||
<tr align="left">
|
|
||||||
<td width="150">Cantidad:</td>
|
|
||||||
<td width="200">
|
|
||||||
<asp:TextBox ID="TxtCantidad" runat="server" ClientIDMode="Static" ValidationGroup="GpoGuardarAbonar" Width="80px"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVCantidad" runat="server" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GpoGuardarAbonar"></asp:RequiredFieldValidator>
|
|
||||||
<asp:CompareValidator ID="CVCantidadAbonar" runat="server" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> no tiene el formato correcto, por favor corrija." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GpoGuardarAbonar"></asp:CompareValidator>
|
|
||||||
<ajax:ValidatorCallOutExtender ID="VCOCantidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCallOutExtender>
|
|
||||||
<ajax:ValidatorCallOutExtender ID="VCOCantidad2" runat="server" HighlightCssClass="vco" TargetControlID="CVCantidadAbonar" Width="300px"></ajax:ValidatorCallOutExtender>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<td><b>Fecha:</b> </td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtFechaPago" runat="server" BorderStyle="None" CausesValidation="true" MaxLength="10" ValidationGroup="GpoGuardarAbonar"></asp:TextBox>
|
|
||||||
<asp:ImageButton runat="server" ID="ImgFechaPago" Visible="false" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
|
||||||
<ajax:MaskedEditExtender ID="MEEFechaPago" runat="server" TargetControlID="TxtFechaPago" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
|
||||||
<ajax:CalendarExtender runat="server" ID="CEFechaPago" TargetControlID="TxtFechaPago" PopupButtonID="ImgFechaPago" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVFechaPago" runat="server" ControlToValidate="TxtFechaPago" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GpoGuardarAbonar"></asp:RequiredFieldValidator>
|
|
||||||
<asp:CompareValidator ID="CVFechaPago" runat="server" ControlToValidate="TxtFechaPago" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GpoGuardarAbonar"></asp:CompareValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaPago1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaPago" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaPago2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaPago" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
||||||
</td>
|
|
||||||
<tr>
|
|
||||||
<td>Referencia:</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtReferencia" runat="server" ClientIDMode="Static" ValidationGroup="GpoGuardarAbonar" Width="80px"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVReferencia" runat="server" ControlToValidate="TxtReferencia" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Referencia''</b> es necesario, por favor ingréselo." ValidationGroup="GpoGuardarAbonar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCallOutExtender ID="VCOReferencia" runat="server" HighlightCssClass="vco" TargetControlID="RFVReferencia" Width="300px"></ajax:ValidatorCallOutExtender>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="center" colspan="2"><asp:Button ID="BtnAbonar" runat="server" Text="Abonar" ValidationGroup="GpoGuardarAbonar" /> <input type="button" value="Cancelar" onclick="javascript:$get('DivAddPago').style.display='none';" /></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<asp:UpdateProgress ID="upProgress" runat="server" DisplayAfter="0">
|
|
||||||
<ProgressTemplate>
|
|
||||||
<div id="overlay">
|
|
||||||
<div id="modalprogress">
|
|
||||||
<div id="theprogress">
|
|
||||||
<center>
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0">
|
|
||||||
<tr>
|
|
||||||
<td>La información se está procesando...</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><img src="/Imagenes/Cargando.gif" style="border-width: 0px;" alt="" /></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</center>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ProgressTemplate>
|
|
||||||
</asp:UpdateProgress>
|
|
||||||
</asp:Content>
|
|
||||||
|
|
||||||
@@ -1,314 +0,0 @@
|
|||||||
Option Explicit On
|
|
||||||
Option Strict On
|
|
||||||
|
|
||||||
Imports Extensiones
|
|
||||||
Imports System.Runtime.InteropServices
|
|
||||||
Imports System.IO
|
|
||||||
Imports System.Data
|
|
||||||
|
|
||||||
Partial Class PRESENTACIONES_Clientes3
|
|
||||||
Inherits ClsPaginas
|
|
||||||
|
|
||||||
'Configuración
|
|
||||||
Private ReadOnly Property CveCliente As Integer
|
|
||||||
Get
|
|
||||||
Return ViewState("CveCliente").ToString.ToEntero
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
|
||||||
If Not IsPostBack Then
|
|
||||||
|
|
||||||
SetValues()
|
|
||||||
SetPermisos()
|
|
||||||
|
|
||||||
If Request("CveCliente") IsNot Nothing AndAlso IsNumeric(Request("CveCliente")) AndAlso Request("CveCliente").ToEntero > 0 Then
|
|
||||||
ViewState("CveCliente") = Request("CveCliente")
|
|
||||||
CargaDatos()
|
|
||||||
CargaHistorial()
|
|
||||||
CargaCxC()
|
|
||||||
'Configuración de Modalidad Update
|
|
||||||
LtlTitulo.Text = "Consulta del Cliente:"
|
|
||||||
'ImgAddVenta
|
|
||||||
ImgAddVenta.Attributes.Add("OnClick", "window.location = '/Ventas/Ventas.aspx?CveCliente=" & CveCliente & "'")
|
|
||||||
If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then Tab.ActiveTabIndex = Request("Opt").ToEntero
|
|
||||||
Else
|
|
||||||
'Configuración de Modalidad Insert
|
|
||||||
ViewState("CveCliente") = -1
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub SetValues()
|
|
||||||
ViewState("Orden") = ""
|
|
||||||
ViewState("OSucursalCliente") = "SucursalCliente DESC"
|
|
||||||
ViewState("OEstado") = "Estado DESC"
|
|
||||||
ViewState("OFecha") = "Fecha DESC"
|
|
||||||
ViewState("OUsuario") = "Usuario DESC"
|
|
||||||
TxtFechaPago.Text = Now.ToShortDateString
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub SetPermisos()
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
|
|
||||||
Private Sub CargaDatos()
|
|
||||||
Dim ObjClientes As New ClsClientes()
|
|
||||||
If ObjClientes.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
|
|
||||||
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
|
||||||
'Campos para Modificación
|
|
||||||
LtlCliente.Text = ObjClientes.Nombre
|
|
||||||
TxtNombre.Text = ObjClientes.Nombre
|
|
||||||
TxtDireccion.Text = ObjClientes.Direccion
|
|
||||||
TxtNoExt.Text = ObjClientes.NoExt
|
|
||||||
TxtNoInt.Text = ObjClientes.NoInt
|
|
||||||
TxtColonia.Text = ObjClientes.Colonia
|
|
||||||
TxtLocalidad.Text = ObjClientes.Localidad
|
|
||||||
TxtCiudad.Text = ObjClientes.Ciudad
|
|
||||||
TxtEstado.Text = ObjClientes.Estado
|
|
||||||
TxtRFC.Text = ObjClientes.RFC
|
|
||||||
TxtCP.Text = ObjClientes.CP.ToString
|
|
||||||
TxtTelefono.Text = ObjClientes.Telefono
|
|
||||||
TxtContacto.Text = ObjClientes.Contacto
|
|
||||||
TxtEmail.Text = ObjClientes.Mail
|
|
||||||
Else
|
|
||||||
Alert("El Cliente Solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
ObjClientes.Dispose()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Private Sub CargaHistorial()
|
|
||||||
Dim ObjClientes As New ClsClientes()
|
|
||||||
If ObjClientes.GetHistorialVentas(CveCliente) Then
|
|
||||||
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
|
||||||
'Carga Generales
|
|
||||||
'Carga Grid
|
|
||||||
GVHistorial.DataSource = ObjClientes.DtResultados
|
|
||||||
Else
|
|
||||||
GVHistorial.DataSource = Nothing
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
GVHistorial.DataSource = Nothing
|
|
||||||
End If
|
|
||||||
ObjClientes.Dispose()
|
|
||||||
GVHistorial.DataBind()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CargaCxC()
|
|
||||||
Dim ObjMovtos As New ClsMovimientos()
|
|
||||||
'CxC Activas
|
|
||||||
If ObjMovtos.GetCxCCliente(CveCliente) Then
|
|
||||||
GvCxC.DataSource = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'")
|
|
||||||
GvCxCHistorial.DataSource = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Hist'")
|
|
||||||
Else
|
|
||||||
GvCxC.DataSource = Nothing
|
|
||||||
GvCxCHistorial.DataSource = Nothing
|
|
||||||
End If
|
|
||||||
|
|
||||||
ObjMovtos.Dispose()
|
|
||||||
GvCxC.DataBind()
|
|
||||||
GvCxCHistorial.DataBind()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Protected Sub GVHistorial_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVHistorial.RowDataBound
|
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
|
||||||
If e.Row.RowIndex = 0 Then
|
|
||||||
e.Row.BackColor = Drawing.Color.LightGray
|
|
||||||
DirectCast(e.Row.FindControl("HLSendMail"), HtmlAnchor).Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim Liga As String = String.Format("<a class=""Texto"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">", e.Row.DBCampo("CveVenta"))
|
|
||||||
e.Row.FCLiteral("LtlFactura").Text = Liga & e.Row.DBCampo("Folio") & "</a>"
|
|
||||||
|
|
||||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Right
|
|
||||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Right
|
|
||||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Right
|
|
||||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Right
|
|
||||||
DirectCast(e.Row.FindControl("HLSendMail"), HtmlAnchor).HRef = "javascript:$get('HdnTipoDocto').value='Fact';$get('HdnCveVenta').value='" & e.Row.DBCampo("CveVenta") & "';$get('HdnFolioVenta').value='" & e.Row.DBCampo("folio") & "';$('#DivMail').show(1000);PosicionaObjeto('" & DirectCast(e.Row.FindControl("HLSendMail"), HtmlAnchor).ClientID & "', 'DivMail');"
|
|
||||||
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub GvCxC_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCxC.RowDataBound, GvCxCHistorial.RowDataBound
|
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
|
||||||
If e.Row.RowIndex = 0 Then
|
|
||||||
e.Row.Cells(0).ColumnSpan = 4
|
|
||||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Right
|
|
||||||
e.Row.FCLiteral("LtlFactura").Text = "Total" & " "
|
|
||||||
e.Row.Cells(1).Visible = False
|
|
||||||
e.Row.Cells(2).Visible = False
|
|
||||||
e.Row.Cells(3).Visible = False
|
|
||||||
e.Row.Cells(9).ColumnSpan = 2
|
|
||||||
e.Row.Cells(10).Visible = False
|
|
||||||
e.Row.BackColor = Drawing.Color.LightGray
|
|
||||||
e.Row.FCImage("ImgAbonar").Visible = False
|
|
||||||
End If
|
|
||||||
If e.Row.RowIndex = 1 Then
|
|
||||||
e.Row.Cells(0).Width = Unit.Pixel(60)
|
|
||||||
e.Row.Cells(1).Width = Unit.Pixel(70)
|
|
||||||
e.Row.Cells(2).Width = Unit.Pixel(80)
|
|
||||||
e.Row.Cells(3).Width = Unit.Pixel(80)
|
|
||||||
e.Row.Cells(4).Width = Unit.Pixel(90)
|
|
||||||
e.Row.Cells(5).Width = Unit.Pixel(90)
|
|
||||||
e.Row.Cells(6).Width = Unit.Pixel(105)
|
|
||||||
e.Row.Cells(7).Width = Unit.Pixel(90)
|
|
||||||
e.Row.Cells(8).Width = Unit.Pixel(105)
|
|
||||||
e.Row.Cells(9).Width = Unit.Pixel(70)
|
|
||||||
e.Row.Cells(10).Width = Unit.Pixel(70)
|
|
||||||
End If
|
|
||||||
|
|
||||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Right
|
|
||||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Right
|
|
||||||
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Right
|
|
||||||
e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Right
|
|
||||||
e.Row.Cells(8).HorizontalAlign = HorizontalAlign.Right
|
|
||||||
|
|
||||||
If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(5).ForeColor = Drawing.Color.Red
|
|
||||||
If e.Row.DBCampo("DiasVencidos").ToDouble > 0 AndAlso CType(sender, GridView).ID = "GvCxC" Then e.Row.Cells(3).ForeColor = Drawing.Color.Red
|
|
||||||
If e.Row.DBCampo("Original").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlSaldoOriginal"), Literal).Text = ""
|
|
||||||
If e.Row.DBCampo("Abonado").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlAbonado"), Literal).Text = ""
|
|
||||||
If e.Row.DBCampo("PorRecuperado").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlPorRecuperado"), Literal).Text = ""
|
|
||||||
If e.Row.DBCampo("Saldo").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlSaldo"), Literal).Text = ""
|
|
||||||
If e.Row.DBCampo("PorXRecuperar").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlPorXRecuperar"), Literal).Text = ""
|
|
||||||
|
|
||||||
If e.Row.DBCampo("Folio") = "N/D" Then
|
|
||||||
e.Row.FCLiteral("LtlFactura").Text = e.Row.DBCampo("Folio")
|
|
||||||
Else
|
|
||||||
Dim Liga As String = String.Format("<a class=""Texto"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">", e.Row.DBCampo("CveVenta"))
|
|
||||||
e.Row.FCLiteral("LtlFactura").Text = Liga & e.Row.DBCampo("Folio") & "</a>"
|
|
||||||
|
|
||||||
End If
|
|
||||||
If e.Row.RowIndex > 0 Then e.Row.FCLiteral("LtlAux").Text = "<a class=""Texto thickbox"" href=""/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente=" & CveCliente & "&CveVenta=" & e.Row.DBCampo("CveVenta") & "&TB_iframe=true&height=370&width=900"" />Ir</a>"
|
|
||||||
DirectCast(e.Row.FindControl("ImgAbonar"), Image).Attributes.Add("onclick", "$get('HdnCveVenta').value='" & e.Row.DBCampo("CveVenta") & "';$get('HdnCveVentaAbono').value='" & e.Row.DBCampo("CveVenta") & "';$('#DivAddPago').show(1000);PosicionaObjeto('" & DirectCast(e.Row.FindControl("ImgAbonar"), Image).ClientID & "', 'DivAddPago');")
|
|
||||||
|
|
||||||
If CType(sender, GridView).ID = "GvCxCHistorial" Then
|
|
||||||
DirectCast(e.Row.FindControl("ImgAbonar"), Image).Visible = False
|
|
||||||
DirectCast(e.Row.FindControl("LtlDiasVencido"), Literal).Text = ""
|
|
||||||
Else
|
|
||||||
e.Row.Cells(7).Font.Bold = True
|
|
||||||
e.Row.Cells(8).Font.Bold = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Protected Sub BtnSendMail_Click(sender As Object, e As System.EventArgs) Handles BtnSendMail.Click
|
|
||||||
Try
|
|
||||||
|
|
||||||
If HdnCveVenta.Value <> "-1" AndAlso HdnFolioVenta.Value <> "-1" Then
|
|
||||||
'Dim ObjEmprea As New ClsEmpresas()
|
|
||||||
'If ObjEmprea.GetEmpresas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1") Then
|
|
||||||
Dim ObjMail As New ClsSisMail()
|
|
||||||
Dim Ruta As String = AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\"
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.TipoFacturacion = "CFDi" AndAlso HdnTipoDocto.Value = "Fact" Then
|
|
||||||
If File.Exists(Ruta & "PDF\" & HdnFolioVenta.Value & ".pdf") AndAlso File.Exists(Ruta & "XML\" & HdnFolioVenta.Value & ".xml") Then
|
|
||||||
Dim PDF As String = Ruta & "PDF\" & HdnFolioVenta.Value & ".pdf"
|
|
||||||
Dim XML As String = Ruta & "XML\" & HdnFolioVenta.Value & ".xml"
|
|
||||||
Dim ArrayCC() As String = TxtCC.Text.Trim.Split(Convert.ToChar(";"))
|
|
||||||
|
|
||||||
Dim ResultadoMail As Integer = 0
|
|
||||||
If ObjMail.Mandacorreo(UsuarioActual.Empresa.SendMail, UsuarioActual.Empresa.SendMailPassword, TxtParaMail.Text.Trim, "Entrega de Factura", PDF, XML, ArrayCC, TxtBody.Text.Trim) Then
|
|
||||||
ResultadoMail = 1
|
|
||||||
TxtCC.Text = ""
|
|
||||||
TxtBody.Text = ""
|
|
||||||
Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion)
|
|
||||||
CargaHistorial()
|
|
||||||
UpnHistorial.Update()
|
|
||||||
Else
|
|
||||||
ResultadoMail = 3
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim ObjVentas As New ClsVentas
|
|
||||||
ObjVentas.UpdateVentaMail(ResultadoMail, HdnCveVenta.Value.ToEntero)
|
|
||||||
ObjVentas.Dispose()
|
|
||||||
Else
|
|
||||||
Alert("No se pudo adjuntar el correo electrónica.", TipoMensaje.MsgAdvertencia)
|
|
||||||
End If
|
|
||||||
ElseIf UsuarioActual.Empresa.TipoFacturacion = "CBB" AndAlso HdnTipoDocto.Value = "Fact" Then
|
|
||||||
If File.Exists(Ruta & "PDF\" & HdnFolioVenta.Value & ".pdf") Then
|
|
||||||
Dim PDF As String = Ruta & "PDF\" & HdnFolioVenta.Value & ".pdf"
|
|
||||||
Dim ArrayCC() As String = TxtCC.Text.Trim.Split(Convert.ToChar(";"))
|
|
||||||
|
|
||||||
Dim ResultadoMail As Integer = 0
|
|
||||||
If ObjMail.Mandacorreo(UsuarioActual.Empresa.SendMail, UsuarioActual.Empresa.SendMailPassword, TxtParaMail.Text.Trim, "Entrega de Factura", PDF, "", ArrayCC, TxtBody.Text.Trim) Then
|
|
||||||
ResultadoMail = 1
|
|
||||||
TxtCC.Text = ""
|
|
||||||
TxtBody.Text = ""
|
|
||||||
Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion)
|
|
||||||
CargaHistorial()
|
|
||||||
UpnHistorial.Update()
|
|
||||||
Else
|
|
||||||
ResultadoMail = 3
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim ObjVentas As New ClsVentas
|
|
||||||
ObjVentas.UpdateVentaMail(ResultadoMail, HdnCveVenta.Value.ToEntero)
|
|
||||||
ObjVentas.Dispose()
|
|
||||||
Else
|
|
||||||
Alert("No se pudo adjuntar el correo electrónica.", TipoMensaje.MsgAdvertencia)
|
|
||||||
End If
|
|
||||||
ElseIf HdnTipoDocto.Value = "Cot" Then
|
|
||||||
If File.Exists(Ruta & "PDF\Cotizacion_" & HdnFolioVenta.Value & ".pdf") Then
|
|
||||||
Dim PDF As String = Ruta & "PDF\Cotizacion_" & HdnFolioVenta.Value & ".pdf"
|
|
||||||
Dim ArrayCC() As String = TxtCC.Text.Trim.Split(Convert.ToChar(";"))
|
|
||||||
|
|
||||||
Dim ResultadoMail As Integer = 0
|
|
||||||
If ObjMail.Mandacorreo(UsuarioActual.Empresa.SendMail, UsuarioActual.Empresa.SendMailPassword, TxtParaMail.Text.Trim, "Entrega de Cotización", PDF, "", ArrayCC, TxtBody.Text.Trim) Then
|
|
||||||
ResultadoMail = 1
|
|
||||||
TxtCC.Text = ""
|
|
||||||
TxtBody.Text = ""
|
|
||||||
Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion)
|
|
||||||
CargaHistorial()
|
|
||||||
UpnHistorial.Update()
|
|
||||||
Else
|
|
||||||
ResultadoMail = 3
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim ObjVentas As New ClsVentas
|
|
||||||
ObjVentas.UpdateVentaMail(ResultadoMail, HdnCveVenta.Value.ToEntero)
|
|
||||||
ObjVentas.Dispose()
|
|
||||||
Else
|
|
||||||
Alert("No se pudo adjuntar el correo electrónica.", TipoMensaje.MsgAdvertencia)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'End If
|
|
||||||
'ObjEmprea.Dispose()
|
|
||||||
Else
|
|
||||||
Alert("No se seleccionó ninguna factura para envíar.", TipoMensaje.MsgAdvertencia)
|
|
||||||
End If
|
|
||||||
Catch ex As Exception
|
|
||||||
OnError("Ocurrió error al mandar MAIL", ex)
|
|
||||||
Dim ObjVentas As New ClsVentas
|
|
||||||
ObjVentas.UpdateVentaMail(3, HdnCveVenta.Value.ToEntero)
|
|
||||||
ObjVentas.Dispose()
|
|
||||||
End Try
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
'Protected Sub BtnAbonar_Click(sender As Object, e As System.EventArgs) Handles BtnAbonar.Click
|
|
||||||
' Dim ObjMovtos As New ClsMovimientos()
|
|
||||||
' If ObjMovtos.AddMovimiento(2, "Cli", CveCliente.ToString, HdnCveVentaAbono.Value, 0, TxtCantidad.Text.Trim.ToDouble, TxtFechaPago.Text.ToDate, TxtReferencia.Text.Trim, DdlCtaContableClientes.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
|
||||||
' Alert("El abono se guardó correctamente", TipoMensaje.MsgInformacion, "$get(""DivAddPago"").style.display=""none"";")
|
|
||||||
' CargaCxC()
|
|
||||||
' TxtCantidad.Text = ""
|
|
||||||
' TxtReferencia.Text = ""
|
|
||||||
' UpDatos.Update()
|
|
||||||
' End If
|
|
||||||
' ObjMovtos.Dispose()
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 60 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 931 B |
Binary file not shown.
|
Before Width: | Height: | Size: 175 KiB |
@@ -1,225 +0,0 @@
|
|||||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CapturaIncidencias.aspx.vb" Inherits="PRESENTACIONES_SeguridadPublica_CapturaIncidencias" %>
|
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" Runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" Runat="Server">
|
|
||||||
Captura de Incidencias
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" Runat="Server">
|
|
||||||
<table width="100%" align="center" style="text-align: center">
|
|
||||||
<tr>
|
|
||||||
<td>Portal: Captura de incidencias</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Seguridad Pública</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Soporte Técnico TECNOLOGÍAS DE LA INFORMACIÓN</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<br />
|
|
||||||
<table width="100%">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label1" runat="server" Text="0007727/13N" Font-Bold="True"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label2" runat="server" Text="Zona" Font-Bold="True"></asp:Label><br />
|
|
||||||
<asp:DropDownList ID="DropDownList1" runat="server"><asp:ListItem>Norte</asp:ListItem></asp:DropDownList>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label3" runat="server" Text="Fecha" Font-Bold="True"></asp:Label>
|
|
||||||
<asp:Label ID="Label6" runat="server" Text="dd/mm/aaaa" Font-Size="Smaller"></asp:Label><br />
|
|
||||||
<asp:TextBox ID="TextBox1" runat="server" Width="100px">05/11/2013</asp:TextBox>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label4" runat="server" Text="Hora" Font-Bold="True" Width="52px"></asp:Label> <asp:Label ID="Label7" runat="server" Text="Min" Font-Bold="True"></asp:Label><br />
|
|
||||||
|
|
||||||
<asp:DropDownList ID="DropDownList2" runat="server"><asp:ListItem>02</asp:ListItem></asp:DropDownList>
|
|
||||||
<asp:Label ID="Label5" runat="server" Text=":" ></asp:Label>
|
|
||||||
<asp:TextBox ID="TextBox2" runat="server" Width="17px">10</asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<br />
|
|
||||||
<table width="90%" >
|
|
||||||
<tr>
|
|
||||||
<td style="width: 169px">
|
|
||||||
<asp:Label ID="Label8" runat="server" Text="Autoridad"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:DropDownList ID="DropDownList3" runat="server" Width="100%">
|
|
||||||
<asp:ListItem></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td style="width: 169px">
|
|
||||||
<asp:Label ID="Label9" runat="server" Text="Puesto:"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TextBox3" runat="server" Width="100%"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td style="width: 169px">
|
|
||||||
<asp:Label ID="Label10" runat="server" Text="Dirección:"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TextBox4" runat="server" Width="100%"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td style="width: 169px">
|
|
||||||
<asp:Label ID="Label11" runat="server" Text="Descripción Breve del Suceso"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TextBox5" runat="server" TextMode="MultiLine" Width="100%"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td style="width: 169px">
|
|
||||||
<asp:Label ID="Label12" runat="server" Text="Nombre del Detenido:"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TextBox6" runat="server" Width="100%"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td style="width: 169px">
|
|
||||||
<asp:Label ID="Label13" runat="server" Text="Alias:"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TextBox7" runat="server" Width="100%"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td style="width: 169px">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label14" runat="server" Text="Edad:"></asp:Label>
|
|
||||||
<asp:TextBox ID="TextBox8" runat="server"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label18" runat="server" Text="Sexo:"></asp:Label>
|
|
||||||
<asp:DropDownList ID="DropDownList4" runat="server"><asp:ListItem>Femenino</asp:ListItem></asp:DropDownList>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label19" runat="server" Text="Boleta de Entrada:"></asp:Label>
|
|
||||||
<asp:TextBox ID="TextBox10" runat="server"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td style="width: 169px">
|
|
||||||
<asp:Label ID="Label15" runat="server" Text="Motivo"></asp:Label>
|
|
||||||
:</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TextBox11" runat="server" TextMode="MultiLine" Width="100%"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="center" colspan="4">
|
|
||||||
<asp:Button ID="Button1" runat="server" Text="Agregar Detenido" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="4">
|
|
||||||
<table width="100%" border="1">
|
|
||||||
<tr bgcolor="#999999" style="text-align: center; font-weight: bold;">
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label16" runat="server" Text="Nombre del Detenido"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label17" runat="server" Text="Edad"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label20" runat="server" Text="Borrar"></asp:Label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr align="center">
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label21" runat="server" Text="-"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label22" runat="server" Text="-"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td align="center">
|
|
||||||
<asp:Image ID="Image1" runat="server" ImageUrl="~/Imagenes/Basura1.png" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<br />
|
|
||||||
<tr><td style="width: 169px">
|
|
||||||
<asp:Label ID="Label23" runat="server" Text="Nombre del Perjudicado:"></asp:Label></td><td>
|
|
||||||
<asp:TextBox ID="TextBox12" runat="server" Width="100%"></asp:TextBox>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td style="width: 169px"></td>
|
|
||||||
<td>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label24" runat="server" Text="Edad:"></asp:Label>
|
|
||||||
<asp:TextBox ID="TextBox9" runat="server"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label25" runat="server" Text="Sexo:"></asp:Label>
|
|
||||||
<asp:DropDownList ID="DropDownList5" runat="server"><asp:ListItem>Femenino</asp:ListItem></asp:DropDownList>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td></tr>
|
|
||||||
<tr>
|
|
||||||
<td style="width: 169px">
|
|
||||||
<asp:Label ID="Label26" runat="server" Text="Observaciones:"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TextBox13" runat="server" TextMode="MultiLine" Width="100%"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td align="center" colspan="4">
|
|
||||||
<asp:Button ID="Button2" runat="server" Text="Agregar Perjudicado" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="4">
|
|
||||||
<table width="100%" border="1">
|
|
||||||
<tr bgcolor="#999999" style="text-align: center; font-weight: bold;">
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label27" runat="server" Text="Nombre del Detenido"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label28" runat="server" Text="Edad"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label29" runat="server" Text="Borrar"></asp:Label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr align="center">
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label30" runat="server" Text="-"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label31" runat="server" Text="-"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td align="center">
|
|
||||||
<asp:Image ID="Image2" runat="server" ImageUrl="~/Imagenes/Basura1.png" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</asp:Content>
|
|
||||||
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
|
|
||||||
Partial Class PRESENTACIONES_SeguridadPublica_CapturaIncidencias
|
|
||||||
Inherits System.Web.UI.Page
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,457 +0,0 @@
|
|||||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CapturaIncidenciasTransito.aspx.vb" Inherits="PRESENTACIONES_SeguridadPublica_CapturaIncidenciasTransito" %>
|
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
|
||||||
Captura de Incidencias de Tránsito
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
|
||||||
<table width="100%" class="Titulos">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label1" runat="server" Text="JEFATURA DE POLICIA PREVENTIVA Y TRÁNSITO MUNICIPAL"></asp:Label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:DropDownList ID="DropDownList1" runat="server">
|
|
||||||
<asp:ListItem>Reporte de Choque</asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label2" runat="server" Text="H. AYUNTAMIENTO DE HERMOSILLO - Folio = 000270/12N_1"></asp:Label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<table width="100%" border="1" style="border-right: 1; border: thin solid #C0C0C0;">
|
|
||||||
<tr>
|
|
||||||
<td class="Titulos" width="5%">
|
|
||||||
<asp:Label ID="Label3" runat="server" Text="1"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<table width="100%" border="1" style="border-right: 1; border: thin solid #C0C0C0;">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label13" runat="server" Text="Fecha(dd/mm/aaaa)"></asp:Label><br />
|
|
||||||
<asp:TextBox ID="TextBox1" runat="server" Width="115px"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label14" runat="server" Text="Hora : Minutos "></asp:Label><br />
|
|
||||||
<asp:DropDownList ID="DropDownList2" runat="server">
|
|
||||||
<asp:ListItem>13</asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
:
|
|
||||||
<asp:TextBox ID="TextBox2" runat="server" Width="16px">00</asp:TextBox>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label15" runat="server" Text="ZONA"></asp:Label><br />
|
|
||||||
<asp:DropDownList ID="DropDownList3" runat="server">
|
|
||||||
<asp:ListItem>Norte</asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label16" runat="server" Text="Horario"></asp:Label><br />
|
|
||||||
<asp:DropDownList ID="DropDownList4" runat="server">
|
|
||||||
<asp:ListItem>A</asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="Titulos" width="5%">
|
|
||||||
<asp:Label ID="Label4" runat="server" Text="2"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<table width="100%" border="1" style="border-right: 1; border: thin solid #C0C0C0;">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label17" runat="server" Text="Unidades "></asp:Label>
|
|
||||||
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label18" runat="server" Text="Lesionados "></asp:Label>
|
|
||||||
<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label19" runat="server" Text="Muertos "></asp:Label>
|
|
||||||
<asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label20" runat="server" Text="Daños en $ "></asp:Label>
|
|
||||||
<asp:TextBox ID="TextBox6" runat="server"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="Titulos" width="5%">
|
|
||||||
<asp:Label ID="Label5" runat="server" Text="3"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<table width="100%" border="1" style="border-right: 1; border: thin solid #C0C0C0;">
|
|
||||||
<tr>
|
|
||||||
<td width="10%">
|
|
||||||
<asp:Label ID="Label21" runat="server" Text="Localización"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td width="20%" align="right">
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label22" runat="server" Text="Vía"></asp:Label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label23" runat="server" Text="Con"></asp:Label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label24" runat="server" Text="Entre"></asp:Label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label25" runat="server" Text="Colonia"></asp:Label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
<td width="70%" align="left">
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TextBox7" runat="server" Width="220px"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TextBox8" runat="server" Width="220px"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TextBox9" runat="server" Width="220px"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:DropDownList ID="DropDownList5" runat="server" Width="220px">
|
|
||||||
<asp:ListItem>Carmen Serdán</asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="Titulos" width="5%">
|
|
||||||
<asp:Label ID="Label6" runat="server" Text="4"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<table border="1" style="border-right: 1; border: thin solid #C0C0C0;">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:DropDownList ID="DropDownList6" runat="server">
|
|
||||||
<asp:ListItem>A</asp:ListItem>
|
|
||||||
</asp:DropDownList><br />
|
|
||||||
<asp:Label ID="Label26" runat="server" Text="Unidad Móvil"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<table border="1" style="border-right: 1; border: thin solid #C0C0C0;">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label27" runat="server" Text="Licencia"></asp:Label><br />
|
|
||||||
<asp:TextBox ID="TextBox11" runat="server"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label28" runat="server" Text="Razón Social"></asp:Label><br />
|
|
||||||
<asp:TextBox ID="TextBox10" runat="server"></asp:TextBox><br /><br />
|
|
||||||
<asp:Label ID="Label29" runat="server" Text="Cinturón"></asp:Label><br />
|
|
||||||
<asp:CheckBox ID="CheckBox1" runat="server" />
|
|
||||||
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label30" runat="server" Text="Mismo Cond."></asp:Label><br />
|
|
||||||
<asp:CheckBox ID="CheckBox2" runat="server" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label31" runat="server" Text="Marca"></asp:Label><br />
|
|
||||||
<asp:DropDownList ID="DropDownList7" runat="server" Width="115px">
|
|
||||||
<asp:ListItem>Marca</asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label32" runat="server" Text="Capacidad"></asp:Label><br />
|
|
||||||
<asp:DropDownList ID="DropDownList8" runat="server" Width="115px">
|
|
||||||
<asp:ListItem>Capacidad</asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
<td><table border="1" style="border-right: 1; border: thin solid #C0C0C0;">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label33" runat="server" Text="Tipo"></asp:Label><br />
|
|
||||||
<asp:TextBox ID="TextBox12" runat="server"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label34" runat="server" Text="Daños"></asp:Label><br />
|
|
||||||
<asp:TextBox ID="TextBox13" runat="server"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:RadioButtonList ID="RadioButtonList1" runat="server">
|
|
||||||
<asp:ListItem>Conductor</asp:ListItem>
|
|
||||||
<asp:ListItem>Peaton</asp:ListItem>
|
|
||||||
<asp:ListItem>Ciclista</asp:ListItem>
|
|
||||||
</asp:RadioButtonList>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label35" runat="server" Text="Nombre del Propietario"></asp:Label><br />
|
|
||||||
<asp:TextBox ID="TextBox14" runat="server"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label36" runat="server" Text="Modelo"></asp:Label><br />
|
|
||||||
<asp:DropDownList ID="DropDownList9" runat="server" Width="115">
|
|
||||||
<asp:ListItem>Modelo</asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label37" runat="server" Text="Número ECO"></asp:Label><br />
|
|
||||||
<asp:TextBox ID="TextBox15" runat="server"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
<td><table border="1" style="border-right: 1; border: thin solid #C0C0C0;">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<table><tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label38" runat="server" Text="Estado"></asp:Label><br />
|
|
||||||
<asp:TextBox ID="TextBox16" runat="server"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label39" runat="server" Text="Vigencia"></asp:Label><br />
|
|
||||||
<asp:TextBox ID="TextBox17" runat="server"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr></table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label40" runat="server" Text="Nombre"></asp:Label><br /></br>
|
|
||||||
<asp:TextBox ID="TextBox18" runat="server"></asp:TextBox></br>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label41" runat="server" Text="Dirección"></asp:Label><br /></br>
|
|
||||||
<asp:TextBox ID="TextBox19" runat="server"></asp:TextBox></br>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<table border="1" style="border-right: 1; border: thin solid #C0C0C0;">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label42" runat="server" Text="Placas"></asp:Label><br /></br>
|
|
||||||
<asp:TextBox ID="TextBox20" runat="server"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<table border="1" style="border-right: 1; border: thin solid #C0C0C0;">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label43" runat="server" Text="Estado"></asp:Label><br /></br>
|
|
||||||
<asp:TextBox ID="TextBox21" runat="server"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label44" runat="server" Text="Año"></asp:Label><br /></br>
|
|
||||||
<asp:TextBox ID="TextBox22" runat="server"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<table width="100%" border="1" style="border-right: 1; border: thin solid #C0C0C0;"><tr><td><asp:Label ID="Label45" runat="server" Text="Color"></asp:Label><br />
|
|
||||||
<asp:DropDownList ID="DropDownList10" runat="server">
|
|
||||||
<asp:ListItem>Color</asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label46" runat="server" Text="Infracción y Artículos"></asp:Label><br />
|
|
||||||
<asp:TextBox ID="TextBox23" runat="server"></asp:TextBox><br />
|
|
||||||
<asp:DropDownList ID="DropDownList11" runat="server">
|
|
||||||
<asp:ListItem>Infracción No.</asp:ListItem>
|
|
||||||
</asp:DropDownList></td></tr></table>
|
|
||||||
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
<td><table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
<td><table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="Titulos" width="5%">
|
|
||||||
<asp:Label ID="Label7" runat="server" Text="5"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="Titulos" width="5%">
|
|
||||||
<asp:Label ID="Label8" runat="server" Text="6"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="Titulos" width="5%">
|
|
||||||
<asp:Label ID="Label9" runat="server" Text="7"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="Titulos" width="5%">
|
|
||||||
<asp:Label ID="Label10" runat="server" Text="8"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="Titulos" width="5%">
|
|
||||||
<asp:Label ID="Label11" runat="server" Text="9"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="Titulos" width="5%">
|
|
||||||
<asp:Label ID="Label12" runat="server" Text="10"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</asp:Content>
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
|
|
||||||
Partial Class PRESENTACIONES_SeguridadPublica_CapturaIncidenciasTransito
|
|
||||||
Inherits System.Web.UI.Page
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,172 +0,0 @@
|
|||||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RegistroEmergencias.aspx.vb" Inherits="PRESENTACIONES_SeguridadPublica_RegistroEmergencias" %>
|
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
|
||||||
Registro de Emergencias
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
|
||||||
<table>
|
|
||||||
<tr><td>
|
|
||||||
<asp:Label ID="Label15" runat="server" Text="Módulo:"></asp:Label><asp:TextBox ID="TextBox21" runat="server" Enabled="False"></asp:TextBox></td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label16" runat="server" Text="Usuario:"></asp:Label><asp:TextBox ID="TextBox22" runat="server" Enabled="False"></asp:TextBox></td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label17" runat="server" Text="Fecha/Hora:"></asp:Label><asp:TextBox ID="TextBox23" runat="server" Enabled="False"></asp:TextBox></td></tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<fieldset>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label1" runat="server" Text="Descripción del Evento:"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TextBox7" runat="server" TextMode="MultiLine"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label2" runat="server" Text="Lugar de la Detención:"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TextBox8" runat="server" TextMode="MultiLine"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label3" runat="server" Text="Colonia:"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TextBox9" runat="server"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label4" runat="server" Text="Ciudad:"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TextBox10" runat="server"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</fieldset>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<fieldset>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td align="right">
|
|
||||||
<asp:Label ID="Label11" runat="server" Text="Corporación:"></asp:Label>
|
|
||||||
</td>
|
|
||||||
<td colspan="3">
|
|
||||||
<asp:TextBox ID="TextBox11" runat="server" Width="400px"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label12" runat="server" Text="Unidades Involucradas"></asp:Label><br />
|
|
||||||
<asp:TextBox ID="TextBox12" runat="server"></asp:TextBox><br />
|
|
||||||
<asp:TextBox ID="TextBox13" runat="server"></asp:TextBox><br />
|
|
||||||
<asp:TextBox ID="TextBox14" runat="server"></asp:TextBox><br />
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label13" runat="server" Text="Clave"></asp:Label><br />
|
|
||||||
<asp:TextBox ID="TextBox15" runat="server" Width="50px"></asp:TextBox><br />
|
|
||||||
<asp:TextBox ID="TextBox16" runat="server" Width="50px"></asp:TextBox><br />
|
|
||||||
<asp:TextBox ID="TextBox17" runat="server" Width="50px"></asp:TextBox><br />
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label14" runat="server" Text="Nombre del Responsable"></asp:Label><br />
|
|
||||||
<asp:TextBox ID="TextBox18" runat="server" Width="345px"></asp:TextBox><br />
|
|
||||||
<asp:TextBox ID="TextBox19" runat="server" Width="345px"></asp:TextBox><br />
|
|
||||||
<asp:TextBox ID="TextBox20" runat="server" Width="345px"></asp:TextBox><br />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="3">
|
|
||||||
<asp:CheckBox ID="CheckBox1" runat="server" />Catálogo de Responsables de Unidad
|
|
||||||
|
|
||||||
<asp:Button ID="Button4" runat="server" Text="Guardar Evento" />
|
|
||||||
<asp:Button ID="Button7" runat="server" Text="Cancelar Evento" /></td></tr>
|
|
||||||
|
|
||||||
</table>
|
|
||||||
</fieldset>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<table border="0" width="100%" >
|
|
||||||
<tr>
|
|
||||||
<td width="80%">
|
|
||||||
<fieldset>
|
|
||||||
<legend><b>Datos del Detenido</b></legend>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label5" runat="server" Text="Nombre:"></asp:Label><br />
|
|
||||||
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label8" runat="server" Text="Alias:"></asp:Label><br />
|
|
||||||
<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label6" runat="server" Text="Apellido Paterno:"></asp:Label><br />
|
|
||||||
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label9" runat="server" Text="Fecha de Nacimiento:"></asp:Label><br />
|
|
||||||
<asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label7" runat="server" Text="Apellido Materno:"></asp:Label><br />
|
|
||||||
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="Label10" runat="server" Text="Edad:"></asp:Label><br />
|
|
||||||
<asp:TextBox ID="TextBox6" runat="server"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td align="center">
|
|
||||||
<asp:Button ID="Button3" runat="server" Text="Generales" /><br />
|
|
||||||
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Imagenes/buscar.gif" />
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:Button ID="Button5" runat="server" Text="Filiación" /><br />
|
|
||||||
<asp:Button ID="Button6" runat="server" Text="Motivos" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</fieldset>
|
|
||||||
</td>
|
|
||||||
<td width="20%">
|
|
||||||
<fieldset>
|
|
||||||
<legend><b>¿Registrar?</b></legend><br /><br /><br />
|
|
||||||
<asp:Button ID="Button1" runat="server" Text="Otro Detenido" /><br />
|
|
||||||
<asp:Button ID="Button2" runat="server" Text="OtroEvento" /><br /><br /><br />
|
|
||||||
</fieldset>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</asp:Content>
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
|
|
||||||
Partial Class PRESENTACIONES_SeguridadPublica_RegistroEmergencias
|
|
||||||
Inherits System.Web.UI.Page
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Sonidito.aspx.vb" Inherits="PruebasOrlando_Sonidito" %>
|
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
|
||||||
<asp:UpdatePanel runat="server" ID="up" UpdateMode="conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<asp:linkbutton runat="server" OnClick="LBPlaySonidito_Click" ID="LBPlaySonidito" text="<i class='fa fa-print' aria-hidden='true'></i>" CssClass="btn btn-sm btn-circle grey "></asp:linkbutton>
|
|
||||||
<asp:linkbutton runat="server" ID="lnkFacturas" text="<i class='fa fa-download' aria-hidden='true'></i>" CssClass="btn btn-sm btn-circle grey "></asp:linkbutton>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
|
||||||
<script type="text/javascript">
|
|
||||||
function playsonidito() {
|
|
||||||
var snd = new Audio("/Sonidos/142608__autistic-lucario__error.wav");
|
|
||||||
snd.play();
|
|
||||||
snd.currentTime = 0;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</asp:Content>
|
|
||||||
|
|
||||||
@@ -1,75 +0,0 @@
|
|||||||
Imports Extensiones
|
|
||||||
Imports System.Data
|
|
||||||
Imports System.Diagnostics
|
|
||||||
Imports System.IO
|
|
||||||
Imports Microsoft.Reporting.WebForms
|
|
||||||
Imports System.Security
|
|
||||||
|
|
||||||
Partial Class PruebasOrlando_Sonidito
|
|
||||||
Inherits System.Web.UI.Page
|
|
||||||
|
|
||||||
Protected Sub LBPlaySonidito_Click(sender As Object, e As EventArgs)
|
|
||||||
Dim ruta = "C:\inetpub\wwwroot\ADSistemas\Sonidos\142608__autistic-lucario__error.wav"
|
|
||||||
RegistraScript("playsonidito();")
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Function VerificaCorreo() As Boolean Handles lnkFacturas.Click
|
|
||||||
Dim Retorno As Boolean = False
|
|
||||||
|
|
||||||
AbreComoSistema()
|
|
||||||
|
|
||||||
Return Retorno
|
|
||||||
End Function
|
|
||||||
|
|
||||||
|
|
||||||
Public Sub AbreComoSistema()
|
|
||||||
Dim Retorno As Boolean = False
|
|
||||||
|
|
||||||
Dim ObjProcess As Process = Nothing
|
|
||||||
Dim Mensajes As String = ""
|
|
||||||
Dim Ejecutable = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Utilerias\UtileriasAD.exe")
|
|
||||||
Dim Folder = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Empresas\")
|
|
||||||
Dim error1 As Boolean = False
|
|
||||||
Try
|
|
||||||
ObjProcess = New Process()
|
|
||||||
ObjProcess.StartInfo.RedirectStandardOutput = True
|
|
||||||
ObjProcess.StartInfo.FileName = Ejecutable
|
|
||||||
' ObjProcess.StartInfo.UserName = "Orlando"
|
|
||||||
' ObjProcess.StartInfo.Password = ToSecureString("memy")
|
|
||||||
' ObjProcess.StartInfo.Verb = "runas"
|
|
||||||
ObjProcess.StartInfo.Arguments = $"2 {Folder}"
|
|
||||||
ObjProcess.StartInfo.UseShellExecute = False
|
|
||||||
ObjProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal
|
|
||||||
ObjProcess.Start()
|
|
||||||
|
|
||||||
|
|
||||||
ObjProcess.WaitForExit()
|
|
||||||
ObjProcess.Close()
|
|
||||||
Catch ex As Exception
|
|
||||||
error1 = True
|
|
||||||
OnError("Ocurrió un error al ejecutar el actualizador.", ex)
|
|
||||||
End Try
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Function ToSecureString(Source As String) As SecureString
|
|
||||||
If (String.IsNullOrWhiteSpace(Source)) Then
|
|
||||||
Return Nothing
|
|
||||||
Else
|
|
||||||
Dim Result As SecureString = New SecureString()
|
|
||||||
For Each c As Char In Source.ToCharArray()
|
|
||||||
Result.AppendChar(c)
|
|
||||||
Next
|
|
||||||
Return Result
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
End Function
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Soniditos.aspx.cs" Inherits="PruebasOrlando_Soniditos" %>
|
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
|
||||||
<asp:linkbutton runat="server" OnClick="Unnamed_Click" ID="LBPlaySonidito" text="+" CssClass="btn btn-sm btn-circle green"></asp:linkbutton>
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
|
||||||
|
|
||||||
|
|
||||||
</asp:Content>
|
|
||||||
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Web;
|
|
||||||
using System.Web.UI;
|
|
||||||
using System.Web.UI.WebControls;
|
|
||||||
|
|
||||||
public partial class PruebasOrlando_Soniditos : System.Web.UI.Page
|
|
||||||
{
|
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void Unnamed_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
26
Rene.aspx
26
Rene.aspx
@@ -1,26 +0,0 @@
|
|||||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Rene.aspx.vb" Inherits="Rene" %>
|
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
|
||||||
CP
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
|
||||||
E
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
|
||||||
HB
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
|
||||||
H
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
|
||||||
HA
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
|
||||||
C
|
|
||||||
<asp:TextBox ID="Txt" runat="server" TextMode="MultiLine" Height="200px" Width="500px"></asp:TextBox>
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
|
|
||||||
88
Rene.aspx.vb
88
Rene.aspx.vb
@@ -1,88 +0,0 @@
|
|||||||
|
|
||||||
Imports System.Net
|
|
||||||
Imports System.Net.NetworkInformation
|
|
||||||
|
|
||||||
Partial Class Rene
|
|
||||||
Inherits System.Web.UI.Page
|
|
||||||
|
|
||||||
Private Sub Rene_Load(sender As Object, e As EventArgs) Handles Me.Load
|
|
||||||
|
|
||||||
'Dim Correo As New ClsSisMail
|
|
||||||
|
|
||||||
If Not IsPostBack Then
|
|
||||||
IpAddress()
|
|
||||||
End If
|
|
||||||
|
|
||||||
'Correo.SendMail(Nothing, "rene.molina@adsistemas.mx", "asunto", "Body", CCP:="rene.molina@adsistemas.mx;julian@adsistemas.mx;rene.molina@adsistemas.mx;julian@adsistemas.mx;paola@adsistemas.mx;")
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub IpAddress()
|
|
||||||
Dim ClientIP As String = String.Empty
|
|
||||||
Dim Tipo As String = String.Empty
|
|
||||||
Dim HTML As String = String.Empty
|
|
||||||
Dim IP As String = String.Empty
|
|
||||||
|
|
||||||
IP = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
|
|
||||||
If Not String.IsNullOrEmpty(IP) Then
|
|
||||||
Dim ipRange As String() = IP.Trim().Split(","c)
|
|
||||||
Dim le As Integer = ipRange.Length - 1
|
|
||||||
ClientIP = ipRange(le)
|
|
||||||
Tipo = "1: "
|
|
||||||
End If
|
|
||||||
HTML &= (ClientIP)
|
|
||||||
HTML &= ("<br>")
|
|
||||||
HTML &= (Tipo)
|
|
||||||
|
|
||||||
IP = Request.ServerVariables("HTTP_X_CLUSTER_CLIENT_IP")
|
|
||||||
If Not String.IsNullOrEmpty(IP) Then
|
|
||||||
ClientIP = IP
|
|
||||||
Tipo = "2: "
|
|
||||||
End If
|
|
||||||
HTML &= (ClientIP)
|
|
||||||
HTML &= ("<br>")
|
|
||||||
HTML &= (Tipo)
|
|
||||||
|
|
||||||
If IP = Request.ServerVariables("REMOTE_ADDR") Then
|
|
||||||
ClientIP = Request.ServerVariables("REMOTE_ADDR")
|
|
||||||
Tipo = "3: "
|
|
||||||
End If
|
|
||||||
HTML &= (ClientIP)
|
|
||||||
HTML &= ("<br>")
|
|
||||||
HTML &= (Tipo)
|
|
||||||
|
|
||||||
HTML &= ("<br>Tipo 4: ")
|
|
||||||
HTML &= (System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName()).AddressList.GetValue(0).ToString())
|
|
||||||
|
|
||||||
HTML &= ("<br>Tipo 5: ")
|
|
||||||
HTML &= (HttpContext.Current.Request.Params("HTTP_CLIENT_IP"))
|
|
||||||
|
|
||||||
HTML &= ("<br>Tipo 6: ")
|
|
||||||
HTML &= (HttpContext.Current.Request.UserHostAddress)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim nics As NetworkInterface() = NetworkInterface.GetAllNetworkInterfaces()
|
|
||||||
Dim sMacAddress As String = String.Empty
|
|
||||||
Dim ipv4 As String = String.Empty
|
|
||||||
For Each adapter As NetworkInterface In nics
|
|
||||||
If sMacAddress = String.Empty Then
|
|
||||||
' only return MAC Address from first card
|
|
||||||
Dim properties As IPInterfaceProperties = adapter.GetIPProperties()
|
|
||||||
sMacAddress = adapter.GetPhysicalAddress().ToString()
|
|
||||||
ipv4 = adapter.GetIPv4Statistics().ToString
|
|
||||||
HTML &= ("<br>Tipo 7: " & sMacAddress & " - " & ipv4)
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
' To Get IP Address
|
|
||||||
|
|
||||||
HTML &= ("<br>Tipo 8: ")
|
|
||||||
Dim IPHost As String = Dns.GetHostName()
|
|
||||||
Dim IP2 As String = Dns.GetHostByName(IPHost).AddressList(0).ToString()
|
|
||||||
|
|
||||||
HTML &= IPHost & " - " & IP2
|
|
||||||
|
|
||||||
Txt.Text = HTML
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
End Class
|
|
||||||
@@ -2104,23 +2104,23 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
' iva
|
' iva
|
||||||
Dim PorcentajeImpuesto As Decimal = gr.DataKey("PorcentajeIVA").ToDecimal
|
Dim PorcentajeImpuesto As Decimal = gr.DataKey("PorcentajeIVA").ToDecimal
|
||||||
|
|
||||||
Dim IdCtaIVATrasladado As Integer = 0
|
Dim IdCtaIVAXTrasladar As Integer = 0
|
||||||
Dim CveCuentaIVATrasladado As Integer = 0
|
Dim CveCuentaIVAxTrasladar As Integer = 0
|
||||||
|
|
||||||
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
|
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
|
||||||
IdCtaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVATrasladado").ToString.ToEntero
|
IdCtaIVAXTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXTrasladar").ToString.ToEntero
|
||||||
CveCuentaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("CveCuentaIVATrasladado").ToString.ToEntero
|
CveCuentaIVAxTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("CveCuentaIVAxTrasladar").ToString.ToEntero
|
||||||
End If
|
End If
|
||||||
|
|
||||||
IdCtaContable = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
|
IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
|
||||||
CveCuenta = If(CveCuentaIVATrasladado > 0, CveCuentaIVATrasladado, UsuarioActual.Empresa.CveCuentaIVATrasladado)
|
CveCuenta = If(CveCuentaIVAxTrasladar > 0, CveCuentaIVAxTrasladar, UsuarioActual.Empresa.CveCuentaIVAxTrasladar)
|
||||||
If IVA > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IVA, gr.DataKey("SerieFolio").ToString, 61, TxtObsSaldarIncobrable.Text.Trim, TxtFechaIncobrable.Text.ToDate, IdCtaContable, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, IVA, IVA * TCVenta), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
If IVA > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IVA, gr.DataKey("SerieFolio").ToString, 13, TxtObsSaldarIncobrable.Text.Trim, TxtFechaIncobrable.Text.ToDate, IdCtaContable, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, IVA, IVA * TCVenta), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSTrasladado
|
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar
|
||||||
CveCuenta = UsuarioActual.Empresa.CveCuentaIEPSTrasladado
|
CveCuenta = UsuarioActual.Empresa.CveCuentaIEPSxTrasladar
|
||||||
If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IEPS, gr.DataKey("SerieFolio").ToString, 39, TxtObsSaldarIncobrable.Text.Trim, TxtFechaIncobrable.Text.ToDate, IdCtaContable, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, IEPS, IEPS * TCVenta), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IEPS, gr.DataKey("SerieFolio").ToString, 38, TxtObsSaldarIncobrable.Text.Trim, TxtFechaIncobrable.Text.ToDate, IdCtaContable, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, IEPS, IEPS * TCVenta), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ Partial Class Ventas_RepVentasUtilidad
|
|||||||
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||||
If EsWS Then
|
If EsWS Then
|
||||||
DdlClientes.setEsWebService(True)
|
DdlClientes.setEsWebService(True)
|
||||||
|
DdlClientes.SelectedValue = "-1"
|
||||||
|
DdlClientes.SelectedText = "Todos"
|
||||||
Else
|
Else
|
||||||
DdlClientes.setEsWebService(False)
|
DdlClientes.setEsWebService(False)
|
||||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||||
|
|||||||
@@ -260,6 +260,16 @@
|
|||||||
<asp:Label ID="LbSubTotalDolares" Visible="false" runat="server" Text="SubTotal"></asp:Label>
|
<asp:Label ID="LbSubTotalDolares" Visible="false" runat="server" Text="SubTotal"></asp:Label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr align="left">
|
||||||
|
<td><b>Dias Emision:</b> </td>
|
||||||
|
<td>
|
||||||
|
<asp:Label ID="LblDiasEmision" runat="server" Text="Dias Emision"></asp:Label>
|
||||||
|
</td>
|
||||||
|
<td><b>Dias Vencimiento:</b> </td>
|
||||||
|
<td>
|
||||||
|
<asp:Label ID="LblDiasVencimiento" runat="server" Text="Dias Vencimiento"></asp:Label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -181,6 +181,8 @@ Partial Class Ventas_RepVentasUtilidadDetalle
|
|||||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||||
CveMovimiento = ObjVentas.DtResultados.Rows(1)("CveMovimiento").ToString.ToEntero
|
CveMovimiento = ObjVentas.DtResultados.Rows(1)("CveMovimiento").ToString.ToEntero
|
||||||
|
|
||||||
|
LblDiasVencimiento.Text = ObjVentas.DtResultados.Rows(1)("DiasVencimiento").ToString
|
||||||
|
LblDiasEmision.Text = ObjVentas.DtResultados.Rows(1)("DiasEmision").ToString
|
||||||
LblCostoFecha.Text = "$" + ObjVentas.Costo.ToString("N2")
|
LblCostoFecha.Text = "$" + ObjVentas.Costo.ToString("N2")
|
||||||
HLCostoFolio.Text = ObjVentas.FolioCosto
|
HLCostoFolio.Text = ObjVentas.FolioCosto
|
||||||
LblFechaSalid.Text = ObjVentas.FechaSalidaCosto.ToDate.ToShortDateString
|
LblFechaSalid.Text = ObjVentas.FechaSalidaCosto.ToDate.ToShortDateString
|
||||||
|
|||||||
@@ -44,8 +44,10 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
|||||||
txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
|
txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
|
||||||
|
|
||||||
'Carga Clientes
|
'Carga Clientes
|
||||||
If UsuarioActual.CveEmpresa = 119 Then
|
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1" Then
|
||||||
DdlClientesWS.setEsWebService(True)
|
DdlClientesWS.setEsWebService(True)
|
||||||
|
DdlClientesWS.SelectedValue = "-1"
|
||||||
|
DdlClientesWS.SelectedText = "Todos"
|
||||||
Else
|
Else
|
||||||
DdlClientesWS.setEsWebService(False)
|
DdlClientesWS.setEsWebService(False)
|
||||||
DdlClientesWS.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
DdlClientesWS.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||||
|
|||||||
@@ -5105,8 +5105,10 @@ Partial Class Ventas
|
|||||||
If CveVenta <= 0 Then
|
If CveVenta <= 0 Then
|
||||||
CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString.ToEntero
|
CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString.ToEntero
|
||||||
|
|
||||||
DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString)
|
|
||||||
DdlMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString)
|
DdlMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString)
|
||||||
|
DdlMetodoPago33_SelectedIndexChanged(DdlMetodoPago33, EventArgs.Empty)
|
||||||
|
|
||||||
|
DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString)
|
||||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString)
|
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -5133,8 +5135,10 @@ Partial Class Ventas
|
|||||||
If CveVenta <= 0 Then
|
If CveVenta <= 0 Then
|
||||||
CveMetodoPagoCliente = ObjCliente.CveMetodoPago
|
CveMetodoPagoCliente = ObjCliente.CveMetodoPago
|
||||||
|
|
||||||
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33)
|
|
||||||
DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33)
|
DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33)
|
||||||
|
DdlMetodoPago33_SelectedIndexChanged(DdlMetodoPago33, EventArgs.Empty)
|
||||||
|
|
||||||
|
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33)
|
||||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI)
|
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -6150,6 +6154,10 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If GvInv.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("cbInv").Checked) > 0 AndAlso ddlAlmacen.SelectedValue.ToEntero() <= 0 Then
|
||||||
|
Alert("Tiene que seleccionar un almacen", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
EmitirImprimirNew()
|
EmitirImprimirNew()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -8981,25 +8989,6 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ElseIf AplicarVentaFacturada Then
|
|
||||||
'25/11/2017 SE VA A ELIMINAR, DIJO EL IPP
|
|
||||||
|
|
||||||
'If Not ObjVentas.UpdateVentaRemision(CveVenta, ObjFactura.CveVenta) Then
|
|
||||||
' ErrorList.Add("Ocurrió un error al actualizar la remisión")
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'If Not ObjConta.TraspasarSaldosPrePolizas(CveVenta, ObjFactura.CveVenta, -1, ObjFactura.CvePrePoliza, 2) Then
|
|
||||||
' ErrorList.Add("Ocurrió un error al traspasar los saldos de la remisión")
|
|
||||||
'End If
|
|
||||||
|
|
||||||
''If Not ObjConta.CancelarPrePolizas(-1, CveVenta) Then
|
|
||||||
'' ErrorList.Add("Ocurrió un error al cancelar los saldos de la remisión")
|
|
||||||
''End If
|
|
||||||
|
|
||||||
'If Not TraspasoAlmacen(ObjInventario, CveVenta, ObjConta, True, 9) Then
|
|
||||||
' ErrorList.Add("Ocurrió un error al traspasar el almacen")
|
|
||||||
'End If
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -10251,147 +10240,152 @@ Partial Class Ventas
|
|||||||
End Function
|
End Function
|
||||||
Private Function GuardarVentaInventarios(ObjInventario As ClsInventarios, ObjConta As ClsContabilidad, factura As Modelos.Factura) As Boolean
|
Private Function GuardarVentaInventarios(ObjInventario As ClsInventarios, ObjConta As ClsContabilidad, factura As Modelos.Factura) As Boolean
|
||||||
Dim OcurrioError As Boolean = False
|
Dim OcurrioError As Boolean = False
|
||||||
|
Try
|
||||||
|
|
||||||
If UsuarioActual.Empresa.UsaInventarios AndAlso factura.TipoDocto.Contiene("Ing", "Egs", "Rem") Then
|
If UsuarioActual.Empresa.UsaInventarios AndAlso factura.TipoDocto.Contiene("Ing", "Egs", "Rem") Then
|
||||||
|
|
||||||
If GvInv.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("cbInv").Checked) > 0 Then
|
If RemisionesLista.Count > 0 Then
|
||||||
|
For Each CveRemision As Integer In RemisionesLista
|
||||||
|
'El almacen general es el Primer Almacen de Material en la Sucursal
|
||||||
|
If Not TraspasoAlmacen(ObjInventario, CveRemision, ObjConta, True, 9) Then
|
||||||
|
OcurrioError = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
Dim CveAlmacen = ddlAlmacen.SelectedValue.ToEntero
|
If GvInv.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("cbInv").Checked) > 0 Then
|
||||||
Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, 3, factura.CveMoneda, factura.Fecha, -1, factura.CveUsuario, factura.CveEmpresa, -1, factura.CveVenta, -1, -1)
|
|
||||||
|
|
||||||
If CveMovimientoInventario <= 0 Then
|
Dim CveAlmacen = ddlAlmacen.SelectedValue.ToEntero
|
||||||
OcurrioError = True
|
Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, 3, factura.CveMoneda, factura.Fecha, -1, factura.CveUsuario, factura.CveEmpresa, -1, factura.CveVenta, -1, -1)
|
||||||
ErrorList.Add("Ocurrió un error al agregar los Movimientos de salida al Inventario.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
|
||||||
Else
|
|
||||||
Dim Mensaje As String = ""
|
|
||||||
Dim i As Integer = 0
|
|
||||||
Dim Cantidad As Double
|
|
||||||
Dim CveUnidad As Integer
|
|
||||||
Dim CveProducto As Integer
|
|
||||||
Dim Existencia As Double
|
|
||||||
'Dim Pu As Double
|
|
||||||
'DtInv.Clone()
|
|
||||||
|
|
||||||
Dim DtEquivalencias As DataTable
|
If CveMovimientoInventario <= 0 Then
|
||||||
|
OcurrioError = True
|
||||||
|
ErrorList.Add("Ocurrió un error al agregar los Movimientos de salida al Inventario.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||||
|
Else
|
||||||
|
Dim Mensaje As String = ""
|
||||||
|
Dim i As Integer = 0
|
||||||
|
Dim Cantidad As Double
|
||||||
|
Dim CveUnidad As Integer
|
||||||
|
Dim CveProducto As Integer
|
||||||
|
Dim Existencia As Double
|
||||||
|
'Dim Pu As Double
|
||||||
|
'DtInv.Clone()
|
||||||
|
|
||||||
For Each Dr As DataRow In DtInv.Rows
|
Dim DtEquivalencias As DataTable
|
||||||
If GvInv.Rows(i).FCCheckBox("cbInv").Checked Then
|
|
||||||
|
|
||||||
CveProducto = Dr("CvePS").ToString.ToEntero
|
For Each Dr As DataRow In DtInv.Rows
|
||||||
CveUnidad = Dr("CveUM").ToString.ToEntero
|
If GvInv.Rows(i).FCCheckBox("cbInv").Checked Then
|
||||||
Cantidad = Dr("Cantidad").ToString.ToDouble
|
|
||||||
|
|
||||||
If Dr("CveTipoInvPS").ToString.ToEntero = 5 And Dr("SerieLote").ToString = "" Then
|
CveProducto = Dr("CvePS").ToString.ToEntero
|
||||||
OcurrioError = True
|
CveUnidad = Dr("CveUM").ToString.ToEntero
|
||||||
ErrorList.Add("Se deben especificar las Series de los productos de almacén")
|
Cantidad = Dr("Cantidad").ToString.ToDouble
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119}) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing") Then
|
If Dr("CveTipoInvPS").ToString.ToEntero = 5 And Dr("SerieLote").ToString = "" Then
|
||||||
Existencia = ObjInventario.GetExistenciasPS(CveProducto, CveUnidad, UsuarioActual.CveEmpresa, CveAlmacen, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, RestringirAlmacenes:=1, ExcluyeApartados:=1)
|
|
||||||
If Existencia < Cantidad Then
|
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
ErrorList.Add($"No cuenta con la cantidad suficiente en inventario del producto {Dr("CodigoPS")} .Cuenta con {Existencia.FormatoNumero(2)}.")
|
ErrorList.Add("Se deben especificar las Series de los productos de almacén")
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 1 Then
|
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119}) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing") Then
|
||||||
DtEquivalencias = New DataTable
|
Existencia = ObjInventario.GetExistenciasPS(CveProducto, CveUnidad, UsuarioActual.CveEmpresa, CveAlmacen, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, RestringirAlmacenes:=1, ExcluyeApartados:=1)
|
||||||
DtEquivalencias = GlobalDTProductosServiciosEquivalencias(CveProducto, -1)
|
If Existencia < Cantidad Then
|
||||||
Dim CveUnidadBase As Integer = DtEquivalencias.FiltroPrimeroValor("CveUM", "UnidadBase = 'True'").ToEntero
|
OcurrioError = True
|
||||||
Dim drUMBase As DataRow = DtEquivalencias.FiltroPrimero("UnidadBase = 'True'")
|
ErrorList.Add($"No cuenta con la cantidad suficiente en inventario del producto {Dr("CodigoPS")} .Cuenta con {Existencia.FormatoNumero(2)}.")
|
||||||
|
Exit For
|
||||||
'SI LA UNIDAD ACTUAL NO ES LA BASE SACA PROPORCION (EQUIVALENTE)
|
End If
|
||||||
If CveUnidadBase <> CveUnidad Then
|
|
||||||
' LO QUE PUSE LO QUE VALE UNIDAD BASE LO QUE VALE UNIDAD SELECCIONADA
|
|
||||||
Cantidad = Dr("Cantidad").ToString.ToDouble * drUMBase("Cantidad").ToString.ToDouble / DtEquivalencias.FiltraParametros(String.Format("CveUM = {0}", CveUnidad)).Rows(0)("Cantidad").ToString.ToDouble
|
|
||||||
CveUnidad = CveUnidadBase
|
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
If CveProducto > 0 Then
|
If UsuarioActual.CveEmpresa = 1 Then
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, 0, -1, SerieLote:=Dr("SerieLote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then
|
DtEquivalencias = New DataTable
|
||||||
|
DtEquivalencias = GlobalDTProductosServiciosEquivalencias(CveProducto, -1)
|
||||||
|
Dim CveUnidadBase As Integer = DtEquivalencias.FiltroPrimeroValor("CveUM", "UnidadBase = 'True'").ToEntero
|
||||||
|
Dim drUMBase As DataRow = DtEquivalencias.FiltroPrimero("UnidadBase = 'True'")
|
||||||
|
|
||||||
|
'SI LA UNIDAD ACTUAL NO ES LA BASE SACA PROPORCION (EQUIVALENTE)
|
||||||
|
If CveUnidadBase <> CveUnidad Then
|
||||||
|
' LO QUE PUSE LO QUE VALE UNIDAD BASE LO QUE VALE UNIDAD SELECCIONADA
|
||||||
|
Cantidad = Dr("Cantidad").ToString.ToDouble * drUMBase("Cantidad").ToString.ToDouble / DtEquivalencias.FiltraParametros(String.Format("CveUM = {0}", CveUnidad)).Rows(0)("Cantidad").ToString.ToDouble
|
||||||
|
CveUnidad = CveUnidadBase
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CveProducto > 0 Then
|
||||||
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, 0, -1, SerieLote:=Dr("SerieLote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then
|
||||||
|
OcurrioError = True
|
||||||
|
ErrorList.Add("Ocurrió un error al agregar los Movimientos de salida al Inventario.<br />")
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Else
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
ErrorList.Add("Ocurrió un error al agregar los Movimientos de salida al Inventario.<br />")
|
ErrorList.Add("Ocurrió un error al agregar los Movimientos de salida al Inventario.<br />")
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Else
|
|
||||||
OcurrioError = True
|
|
||||||
ErrorList.Add("Ocurrió un error al agregar los Movimientos de salida al Inventario.<br />")
|
|
||||||
Exit For
|
|
||||||
End If
|
End If
|
||||||
|
i = i + 1
|
||||||
|
Next
|
||||||
|
|
||||||
End If
|
'REGISTRO LA PREPOLIZA DE COSTO VS ALMACEN
|
||||||
i = i + 1
|
If Not OcurrioError Then
|
||||||
Next
|
Dim DtCostos As DataTable = Nothing
|
||||||
|
Dim ValorInventario As Decimal = 0
|
||||||
|
Dim TotalCosto As Decimal = 0
|
||||||
|
If ObjInventario.GetMovimientosDetalle(CveMovimientoInventario, UsuarioActual.CveEmpresa) Then
|
||||||
|
DtCostos = ObjInventario.DtResultados
|
||||||
|
TotalCosto = DtCostos.SUMD("Total").RoundSQL
|
||||||
|
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
|
||||||
|
Dim IdCtaContable As Integer = 0
|
||||||
|
Dim CveCuenta As Integer = 0
|
||||||
|
If tmpCostos.Rows.Count > 0 Then
|
||||||
|
Dim TotalCostoAcumulado As Decimal = 0
|
||||||
|
Dim cont As Integer = 1
|
||||||
|
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||||
|
For Each RowInv As DataRow In tmpCostos.Rows
|
||||||
|
ValorInventario = DtCostos.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").RoundSQL
|
||||||
|
TotalCostoAcumulado += ValorInventario
|
||||||
|
|
||||||
'REGISTRO LA PREPOLIZA DE COSTO VS ALMACEN
|
'cuando es el último movimiento y hay diferencias en los importes
|
||||||
If Not OcurrioError Then
|
If cont = tmpCostos.Rows.Count AndAlso TotalCosto <> TotalCostoAcumulado Then
|
||||||
Dim DtCostos As DataTable = Nothing
|
ValorInventario = ValorInventario + (TotalCosto - TotalCostoAcumulado)
|
||||||
Dim ValorInventario As Decimal = 0
|
|
||||||
Dim TotalCosto As Decimal = 0
|
|
||||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoInventario, UsuarioActual.CveEmpresa) Then
|
|
||||||
DtCostos = ObjInventario.DtResultados
|
|
||||||
TotalCosto = DtCostos.SUMD("Total").RoundSQL
|
|
||||||
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
|
|
||||||
Dim IdCtaContable As Integer = 0
|
|
||||||
Dim CveCuenta As Integer = 0
|
|
||||||
If tmpCostos.Rows.Count > 0 Then
|
|
||||||
Dim TotalCostoAcumulado As Decimal = 0
|
|
||||||
Dim cont As Integer = 1
|
|
||||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
|
||||||
For Each RowInv As DataRow In tmpCostos.Rows
|
|
||||||
ValorInventario = DtCostos.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").RoundSQL
|
|
||||||
TotalCostoAcumulado += ValorInventario
|
|
||||||
|
|
||||||
'cuando es el último movimiento y hay diferencias en los importes
|
|
||||||
If cont = tmpCostos.Rows.Count AndAlso TotalCosto <> TotalCostoAcumulado Then
|
|
||||||
ValorInventario = ValorInventario + (TotalCosto - TotalCostoAcumulado)
|
|
||||||
End If
|
|
||||||
|
|
||||||
'Concepto = String.Format("{0} - {1}", Row2("Clasificacion").ToString, Row2("SubProyecto").ToString)
|
|
||||||
IdCtaContable = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
|
|
||||||
CveCuenta = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
|
|
||||||
If ValorInventario <> 0 Then
|
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, False, ValorInventario, factura.SerieFolio, 69, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta) Then
|
|
||||||
OcurrioError = True
|
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
cont += 1
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero
|
|
||||||
|
|
||||||
If TotalCosto <> 0 Then
|
'Concepto = String.Format("{0} - {1}", Row2("Clasificacion").ToString, Row2("SubProyecto").ToString)
|
||||||
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, True, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=factura.CveSubProyecto) Then
|
IdCtaContable = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
|
||||||
OcurrioError = True
|
CveCuenta = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
|
||||||
|
If ValorInventario <> 0 Then
|
||||||
|
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, False, ValorInventario, factura.SerieFolio, 69, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta) Then
|
||||||
|
OcurrioError = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
cont += 1
|
||||||
|
Next
|
||||||
End If
|
End If
|
||||||
|
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero
|
||||||
|
|
||||||
|
If TotalCosto <> 0 Then
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, True, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=factura.CveSubProyecto) Then
|
||||||
|
OcurrioError = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
factura.Inv_CveMovimiento = CveMovimientoInventario
|
||||||
|
factura.Inv_ValorInventario = ValorInventario
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
factura.Inv_CveMovimiento = CveMovimientoInventario
|
|
||||||
factura.Inv_ValorInventario = ValorInventario
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If RemisionesLista.Count > 0 Then
|
Catch ex As Exception
|
||||||
For Each CveRemision As Integer In RemisionesLista
|
OcurrioError = True
|
||||||
'El almacen general es el Primer Almacen de Material en la Sucursal
|
OnError("Ocurrió un error al guardar el inventario", ex)
|
||||||
If Not TraspasoAlmacen(ObjInventario, CveRemision, ObjConta, True, 9) Then
|
End Try
|
||||||
OcurrioError = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
Return OcurrioError
|
Return OcurrioError
|
||||||
End Function
|
End Function
|
||||||
@@ -12498,221 +12492,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Return Not ErrorCancelar
|
Return Not ErrorCancelar
|
||||||
End Function
|
End Function
|
||||||
'Protected Sub ImgGuardaEstatus_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgGuardaEstatus.Click
|
|
||||||
|
|
||||||
' 'La validacion de saldos cuando es refacturacion se hace antes asi que si es refacturacion ignoramos esta condicion, si es Anticipo verifica que no esté aplicado
|
|
||||||
' If DdlTipoComprobante.SelectedValue = "Ant" AndAlso (HdnPagado.Value.ToDecimal > 0 Or GvAntNC.Rows.Count > 0) Then
|
|
||||||
' Alert("La factura no se puede cancelar debido a que tiene pagos vinculados.", TipoMensaje.MsgAdvertencia)
|
|
||||||
' Exit Sub
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' 'La validacion de saldos cuando es refacturacion se hace antes asi que si es refacturacion ignoramos esta condicion
|
|
||||||
' If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") AndAlso HdnPagado.Value.ToDecimal > 0 Then
|
|
||||||
' Alert("La factura no se puede cancelar debido a que tiene pagos vinculados.", TipoMensaje.MsgAdvertencia)
|
|
||||||
' Exit Sub
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' ' si tiene movimientos en almacen, y sigue sin ser marcado como devuelto
|
|
||||||
' If (GvInv.Rows.Count > 0 AndAlso DevolucionAlmacen.Contiene(0, 1)) AndAlso DdlTipoComprobante.SelectedValue <> "Rem" Then
|
|
||||||
' Alert("La factura no se puede cancelar debido a que tiene movimientos de inventario.", TipoMensaje.MsgAdvertencia)
|
|
||||||
' Exit Sub
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' 'Si la remision esta facturada no se puede cancelar
|
|
||||||
' If DdlTipoComprobante.SelectedValue = "Rem" Then
|
|
||||||
' Dim ObjV As New ClsVentas
|
|
||||||
' If ObjV.VerificarRemisionFacturada(CveVenta) Then
|
|
||||||
' If ObjV.DtResultados.Rows.Count > 0 Then
|
|
||||||
' Alert("La remisión no se puede cancelar debido a que ya esta vinculada a una factura.", TipoMensaje.MsgAdvertencia)
|
|
||||||
' Exit Sub
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
' ObjV.Dispose()
|
|
||||||
' End If
|
|
||||||
|
|
||||||
|
|
||||||
' Dim ObjVentas As New ClsVentas() : ObjVentas.IniciaTransacSQL()
|
|
||||||
' Dim ObjAC As ClsContPAQi = Nothing
|
|
||||||
' Dim ObjConta As New ClsContabilidad(ObjVentas.IniciaTransacSQL())
|
|
||||||
' Dim ObjBancos As New ClsBancos(ObjVentas.IniciaTransacSQL())
|
|
||||||
' Dim ObjInventario As New ClsInventarios(ObjVentas.IniciaTransacSQL())
|
|
||||||
' Dim ObjContratos As New ClsContratos(ObjVentas.IniciaTransacSQL())
|
|
||||||
|
|
||||||
' Dim IDPoliza As Integer = -1
|
|
||||||
' Dim CvePrePoliza As Integer
|
|
||||||
' Dim CvePlantillaPoliza As Integer
|
|
||||||
|
|
||||||
' Dim ErrorCancelar As Boolean = False
|
|
||||||
' Dim Mensaje As String = ""
|
|
||||||
|
|
||||||
' CreaObjetosVenta()
|
|
||||||
' If UsuarioActual.Empresa.UsaAC Then
|
|
||||||
' ObjAC = New ClsContPAQi(UsuarioActual.Empresa) : ObjAC.IniciaTransacSQL()
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' If GvInv.Rows.Count > 0 AndAlso DdlTipoComprobante.SelectedValue = "Rem" Then
|
|
||||||
' If CveAlmacenTransitorio > 0 Then
|
|
||||||
' ErrorCancelar = Not TraspasoAlmacen(ObjInventario, CveVenta, ObjConta, False, 9)
|
|
||||||
' Else
|
|
||||||
' ErrorCancelar = Not SalidaEntradaAlmacen(ObjInventario, CveVenta, ObjConta)
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
|
|
||||||
' CvePlantillaPoliza = 7
|
|
||||||
' ElseIf ObjFactura.TipoDocto.Contiene("Ing", "Rem", "Ant") Then
|
|
||||||
' CvePlantillaPoliza = 4
|
|
||||||
' Else
|
|
||||||
' CvePlantillaPoliza = 4
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' ObjFactura.CveVenta = CveVenta
|
|
||||||
|
|
||||||
' If HplSaldoAuxiliar.Text.ToDecimal > 0 Then
|
|
||||||
' CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardaEstatus", CvePlantillaPoliza, TxtTotal.Text.ToDouble, TxtTotal.Text.Replace(",", "").ToDouble, DdlMoneda.SelectedValue.ToEntero, Now, NombreCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
|
||||||
' ObjFactura.CvePrePoliza = CvePrePoliza
|
|
||||||
|
|
||||||
' If Not ErrorCancelar Then
|
|
||||||
' ErrorCancelar = ProcesoPrepolizas(ObjConta, ObjFactura, -1, TmpDT, ObjAC, -1, ObjBancos, ObjVentas)
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' If Not ErrorCancelar Then
|
|
||||||
' ErrorCancelar = GuardarVentaImpuestosLocales(ObjVentas, ObjConta, ObjFactura, -1)
|
|
||||||
' Else
|
|
||||||
' Exit Sub
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' 'Desvincular Remisiones
|
|
||||||
' '[IPP] COMENTADO PORQUE UNA REMISION USADA SE QUEMA - DETALLES CON INV - 30/ENERO/2018
|
|
||||||
' 'If DdlTipoComprobante.SelectedValue = "Ing" Then
|
|
||||||
' ' If Not ObjVentas.LiberarRemisionesFacturadas(CveVenta) Then
|
|
||||||
' ' ErrorCancelar = True
|
|
||||||
' ' Mensaje = "Ocurrió un error al desvincular las remisiones"
|
|
||||||
' ' End If
|
|
||||||
' 'End If
|
|
||||||
|
|
||||||
' 'Contratos
|
|
||||||
' ErrorList = New List(Of String)
|
|
||||||
' If ObjFactura.CveContrato > 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant") Then
|
|
||||||
' GuardarContratoAvanceEstimaciones(ObjContratos, ObjFactura, ErrorList, -1, True)
|
|
||||||
' If ErrorList.Count > 0 Then : ErrorCancelar = True : End If
|
|
||||||
' ElseIf ObjFactura.CveContrato > 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Egs", "Dev") Then
|
|
||||||
' GuardarContratoAvanceEstimaciones(ObjContratos, ObjFactura, ErrorList, 1, True)
|
|
||||||
' If ErrorList.Count > 0 Then : ErrorCancelar = True : End If
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' If DdlEstatus.SelectedValue = "4" Then
|
|
||||||
|
|
||||||
' If ObjVentas.UpdateEstatusFactura(DdlEstatus.SelectedValue.ToEntero, FolioFiscal, "", Now, CveVenta, IDPoliza) Then
|
|
||||||
' Mensaje = "El nuevo estatus se guardó correctamente"
|
|
||||||
' Else
|
|
||||||
' ErrorCancelar = True
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' 'Si se está mandando a Cancelada SAT
|
|
||||||
' ElseIf DdlEstatus.SelectedValue = "5" Then
|
|
||||||
' Try
|
|
||||||
' Dim DT As DataTable = Nothing
|
|
||||||
|
|
||||||
' If FolioFiscal = "" Then
|
|
||||||
' Dim XmlDoc As New XmlDocument
|
|
||||||
' XmlDoc.Load(Ruta & "XML\" & DdlTipoComprobante.SelectedValue & "\" & VentaFolio & ".xml")
|
|
||||||
' ViewState("FolioFiscal") = XmlDoc.DocumentElement("cfdi:Complemento").FirstChild.Attributes("UUID").InnerText
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' 'Si es cancelar en el SAT:
|
|
||||||
|
|
||||||
' 'Dim xmlDoc As New System.Xml.XmlDocument()
|
|
||||||
' 'xmlDoc.LoadXml(Encoding.UTF8.GetString(Convert.FromBase64String("PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/Pgo8QWN1c2UgRmVjaGE9IjIwMTYtMTItMzBUMTg6Mjk6MjAuNTExOTg1NSIgUmZjRW1pc29yPSJNT1FKODUxMjE0SEs0IiB4bWxuczpuczI9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkveG1sZHNpZyMiIHhtbG5zOm5zMz0iaHR0cDovL2NhbmNlbGFjZmQuc2F0LmdvYi5teCI+CiAgICA8bnMzOkZvbGlvcz4KICAgICAgICA8bnMzOlVVSUQ+NjNBOEQxN0UtRDMxQi00QjVFLTkzMEEtMzdDNDJDRTFBM0M4PC9uczM6VVVJRD4KICAgICAgICA8bnMzOkVzdGF0dXNVVUlEPjIwMTwvbnMzOkVzdGF0dXNVVUlEPgogICAgPC9uczM6Rm9saW9zPgogICAgPG5zMjpTaWduYXR1cmUgSWQ9IlNlbGxvU0FUIj4KICAgICAgICA8bnMyOlNpZ25lZEluZm8+CiAgICAgICAgICAgIDxuczI6Q2Fub25pY2FsaXphdGlvbk1ldGhvZCBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnL1RSLzIwMDEvUkVDLXhtbC1jMTRuLTIwMDEwMzE1Ii8+CiAgICAgICAgICAgIDxuczI6U2lnbmF0dXJlTWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS8wNC94bWxkc2lnLW1vcmUjaG1hYy1zaGE1MTIiLz4KICAgICAgICAgICAgPG5zMjpSZWZlcmVuY2UgVVJJPSIiPgogICAgICAgICAgICAgICAgPG5zMjpUcmFuc2Zvcm1zPgogICAgICAgICAgICAgICAgICAgIDxuczI6VHJhbnNmb3JtIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvVFIvMTk5OS9SRUMteHBhdGgtMTk5OTExMTYiPgogICAgICAgICAgICAgICAgICAgICAgICA8bnMyOlhQYXRoPm5vdChhbmNlc3Rvci1vci1zZWxmOjoqW2xvY2FsLW5hbWUoKT0nU2lnbmF0dXJlJ10pPC9uczI6WFBhdGg+CiAgICAgICAgICAgICAgICAgICAgPC9uczI6VHJhbnNmb3JtPgogICAgICAgICAgICAgICAgPC9uczI6VHJhbnNmb3Jtcz4KICAgICAgICAgICAgICAgIDxuczI6RGlnZXN0TWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS8wNC94bWxlbmMjc2hhNTEyIi8+CiAgICAgICAgICAgICAgICA8bnMyOkRpZ2VzdFZhbHVlPk8zNzJtbWlEMFZWWUdkcGE4WjJ5K3VPQXVVcTdZb3JURldicER3K2xnVG9CUng3c2RrREtlNDZKRjRaM01hZHZ2djh6bG9vZTYwRGtZUGZyRGNZMUZ3PT08L25zMjpEaWdlc3RWYWx1ZT4KICAgICAgICAgICAgPC9uczI6UmVmZXJlbmNlPgogICAgICAgIDwvbnMyOlNpZ25lZEluZm8+CiAgICAgICAgPG5zMjpTaWduYXR1cmVWYWx1ZT5IbEJVbHplZlZFKzFXNS9QKzRuVk9YbEFuOVZLQUladm0vK2tuSldSb2plTVI4Ung5bHBpTUdIOXBVZG5iVWtObTloOTZQSXQ4QzBFd0Z2UVptRjlCZz09PC9uczI6U2lnbmF0dXJlVmFsdWU+CiAgICAgICAgPG5zMjpLZXlJbmZvPgogICAgICAgICAgICA8bnMyOktleU5hbWU+MDAwMDEwODg4ODg4MDAwMDAwMTY8L25zMjpLZXlOYW1lPgogICAgICAgICAgICA8bnMyOktleVZhbHVlPgogICAgICAgICAgICAgICAgPG5zMjpSU0FLZXlWYWx1ZT4KICAgICAgICAgICAgICAgICAgICA8bnMyOk1vZHVsdXM+eG5MMnpEUHRINWpEc0FaRFRJZk1xYktHcnZlK0F0OEt5eDJFWnZiZlhicEs5dVZFeFdTODc0b01lbEZ6TnE2OS9ZcVNSZVQzSTdJOHdyK2pveTVPN291WkgrNEtXZElHcDRTaTZsSGUwa250eHpObXV1S3lPUGtKOXRNY250bkZtUTRiZnhGeGxnL1VkMmhDdHVveTNqMnhZa0lYdTVPNHBHTTk4Tno4cEFNPTwvbnMyOk1vZHVsdXM+CiAgICAgICAgICAgICAgICAgICAgPG5zMjpFeHBvbmVudD5BUUFCPC9uczI6RXhwb25lbnQ+CiAgICAgICAgICAgICAgICA8L25zMjpSU0FLZXlWYWx1ZT4KICAgICAgICAgICAgPC9uczI6S2V5VmFsdWU+CiAgICAgICAgPC9uczI6S2V5SW5mbz4KICAgIDwvbnMyOlNpZ25hdHVyZT4KPC9BY3VzZT4K")))
|
|
||||||
|
|
||||||
' Dim ObjCancelacion As New Timbrado
|
|
||||||
' Dim TotalT As Decimal = TxtTotal.Text.ToDecimal
|
|
||||||
' Dim RFCReceptor As String = LblRFC.Text.Trim
|
|
||||||
' Dim CvePACCancelacion As Integer = UsuarioActual.Empresa.CvePAC
|
|
||||||
' ImprimeCancelacion(CveVenta)
|
|
||||||
|
|
||||||
' If ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, TotalT, RFCReceptor, UsuarioActual.Empresa.RFC, CvePACCancelacion) Then
|
|
||||||
' 'Generamos el acuse y mandamos mail de con el acuse de cancelación - DF 13/01/2017
|
|
||||||
' ' ImprimeCancelacion(CveVenta)
|
|
||||||
|
|
||||||
' If UsuarioActual.Empresa.UsaAC Then
|
|
||||||
' IDPoliza = GenerarPolizaAC(ObjAC, True)
|
|
||||||
' If IDPoliza <= 0 Then
|
|
||||||
' Mensaje = "No se pudo generar la poliza"
|
|
||||||
' ErrorCancelar = True
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' If Not ErrorCancelar Then
|
|
||||||
' If ObjVentas.UpdateEstatusFactura(DdlEstatus.SelectedValue.ToEntero, FolioFiscal, ObjCancelacion.CancelacionAcuse, ObjCancelacion.CancelacionFecha, CveVenta, IDPoliza, CvePAC:=CvePACCancelacion) Then
|
|
||||||
' Mensaje = "El nuevo estatus se guardó correctamente"
|
|
||||||
|
|
||||||
' Else
|
|
||||||
' ErrorCancelar = True
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' Catch ex As Exception
|
|
||||||
' Mensaje = "Ocurrio un error al Cancelar la factura"
|
|
||||||
' GuardaLog($"{ex.Message}")
|
|
||||||
' End Try
|
|
||||||
|
|
||||||
' ElseIf DdlEstatus.SelectedValue = "9" Then
|
|
||||||
|
|
||||||
' If UsuarioActual.Empresa.UsaAC Then
|
|
||||||
' IDPoliza = GenerarPolizaAC(ObjAC, True)
|
|
||||||
|
|
||||||
' If IDPoliza > 0 Then
|
|
||||||
' Mensaje = "Se canceló exitosamente el compromiso."
|
|
||||||
' Else
|
|
||||||
' Mensaje = "No se pudo generar la poliza de cancelación"
|
|
||||||
' ErrorCancelar = True
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' If Not ErrorCancelar Then
|
|
||||||
' If Not ObjVentas.UpdateEstatusFactura(DdlEstatus.SelectedValue.ToEntero, "", "", TxtFecha.Text.ToDate, CveVenta, IDPoliza) Then
|
|
||||||
' ErrorCancelar = True
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' ElseIf DdlEstatus.SelectedValue = "12" Then
|
|
||||||
' If ObjVentas.UpdateEstatusFactura(DdlEstatus.SelectedValue.ToEntero, FolioFiscal, "", Now, CveVenta, IDPoliza) Then
|
|
||||||
' Mensaje = "Se canceló exitosamente la Remisión"
|
|
||||||
' Else
|
|
||||||
' ErrorCancelar = True
|
|
||||||
' End If
|
|
||||||
' Else
|
|
||||||
' If ObjVentas.UpdateEstatusFactura(DdlEstatus.SelectedValue.ToEntero, FolioFiscal, "", Now, CveVenta, IDPoliza) Then
|
|
||||||
' 'Alert("El nuevo estatus se guardó correctamente", TipoMensaje.MsgInformacion, "document.location.href=""/Ventas/Ventas.aspx?CveVenta=" & CveVenta & """;")
|
|
||||||
' Mensaje = "El nuevo estatus se guardó correctamente"
|
|
||||||
' Else
|
|
||||||
' ErrorCancelar = True
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
|
|
||||||
|
|
||||||
' If Not ErrorCancelar Then
|
|
||||||
' Alert(Mensaje, TipoMensaje.MsgInformacion, "document.location.href=""/Ventas/Ventas.aspx?CveVenta=" & CveVenta & """;")
|
|
||||||
' ObjVentas.Commit()
|
|
||||||
' If ObjAC IsNot Nothing Then ObjAC.Commit()
|
|
||||||
' Else
|
|
||||||
' Alert(Mensaje, TipoMensaje.MsgError)
|
|
||||||
' ObjVentas.RollBack()
|
|
||||||
' If ObjAC IsNot Nothing Then ObjAC.RollBack()
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' ObjVentas.Dispose()
|
|
||||||
' ObjContratos.Dispose()
|
|
||||||
' ObjConta.Dispose()
|
|
||||||
' ObjBancos.Dispose()
|
|
||||||
' ObjInventario.Dispose()
|
|
||||||
' If ObjAC IsNot Nothing Then ObjAC.Dispose()
|
|
||||||
|
|
||||||
'End Sub
|
|
||||||
Protected Sub ImgBtnAddC_Click(sender As Object, e As ImageClickEventArgs) Handles ImgBtnAddC.Click
|
Protected Sub ImgBtnAddC_Click(sender As Object, e As ImageClickEventArgs) Handles ImgBtnAddC.Click
|
||||||
Dim Row As DataRow = Nothing
|
Dim Row As DataRow = Nothing
|
||||||
Row = DTmpC.NewRow
|
Row = DTmpC.NewRow
|
||||||
@@ -14841,106 +14621,120 @@ Partial Class Ventas
|
|||||||
End Sub
|
End Sub
|
||||||
Private Function TraspasoAlmacen(ByRef ObjInventario As ClsInventarios, CveRemision As Integer, ByRef ObjConta As ClsContabilidad, ConSalida As Boolean, ConceptoMovimiento As Integer) As Boolean
|
Private Function TraspasoAlmacen(ByRef ObjInventario As ClsInventarios, CveRemision As Integer, ByRef ObjConta As ClsContabilidad, ConSalida As Boolean, ConceptoMovimiento As Integer) As Boolean
|
||||||
Dim OcurrioError As Boolean = False
|
Dim OcurrioError As Boolean = False
|
||||||
Dim DtMovimientos As DataTable
|
Try
|
||||||
Dim DtMovimientosDetalles As DataTable
|
Dim DtMovimientos As DataTable
|
||||||
DtRemConceptosSurtidos = Nothing
|
Dim DtMovimientosDetalles As DataTable
|
||||||
|
DtRemConceptosSurtidos = Nothing
|
||||||
|
|
||||||
'Obtenemos los movimientos detalle
|
'Obtenemos los movimientos detalle
|
||||||
If ObjInventario.GetInv_Mov(CveRemision, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetInv_Mov(CveRemision, UsuarioActual.CveEmpresa) Then
|
||||||
|
|
||||||
If ObjInventario.DtResultados.Rows.Count > 0 Then
|
If ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||||
|
|
||||||
DtMovimientos = ObjInventario.DtResultados.FiltraParametros("", DistinctColumns:={"CveMovimiento"})
|
DtMovimientos = ObjInventario.DtResultados.FiltraParametros("", DistinctColumns:={"CveMovimiento"})
|
||||||
|
|
||||||
'Si estamos facturando remisiones ajustamos por ventadetalle
|
'Si estamos facturando remisiones ajustamos por ventadetalle
|
||||||
If RemisionesLista.Count > 0 Then
|
If RemisionesLista.Count > 0 Then
|
||||||
Dim resultados = From DtRemisiones In DtRemisionesTmpDT
|
Dim resultados = From DtRemisiones In DtRemisionesTmpDT
|
||||||
Join DtMovDet In ObjInventario.DtResultados.FiltraParametros("CvePS > 0") On DtRemisiones("CveVentaDetalleRemision").ToString.ToEntero Equals DtMovDet("CveVentaDetalle").ToString.ToEntero
|
Join DtMovDet In ObjInventario.DtResultados.FiltraParametros("CvePS > 0") On DtRemisiones("CveVentaDetalleRemision").ToString.ToEntero Equals DtMovDet("CveVentaDetalle").ToString.ToEntero
|
||||||
Select DtMovDet
|
Select DtMovDet
|
||||||
Try
|
Try
|
||||||
DtMovimientosDetalles = resultados.CopyToDataTable
|
DtMovimientosDetalles = resultados.CopyToDataTable
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
GuardaLog($"LOG IPP: Ventas LN: 10033. - DtRemisionesTmpDT.Rows.Count: {DtRemisionesTmpDT.Rows.Count} - ObjInventario.DtResultados.FiltraParametros('CvePS > 0').Rows.Count: {ObjInventario.DtResultados.FiltraParametros("CvePS > 0").Rows.Count}")
|
GuardaLog($"LOG IPP: Ventas LN: 10033. - DtRemisionesTmpDT.Rows.Count: {DtRemisionesTmpDT.Rows.Count} - ObjInventario.DtResultados.FiltraParametros('CvePS > 0').Rows.Count: {ObjInventario.DtResultados.FiltraParametros("CvePS > 0").Rows.Count}")
|
||||||
DtMovimientosDetalles = New DataTable
|
DtMovimientosDetalles = New DataTable
|
||||||
End Try
|
End Try
|
||||||
Else
|
Else
|
||||||
DtMovimientosDetalles = ObjInventario.DtResultados.FiltraParametros("CvePS > 0")
|
DtMovimientosDetalles = ObjInventario.DtResultados.FiltraParametros("CvePS > 0")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
For Each dr As DataRow In DtMovimientos.Rows
|
If DtMovimientos.Rows.Count > 0 Then
|
||||||
|
Dim GeneroMovimientoAlmacen As Boolean = False
|
||||||
|
|
||||||
'Obtenemos los Movimientos de salida
|
For Each dr As DataRow In DtMovimientos.Rows
|
||||||
If ObjInventario.GetMovimientos(dr("CveMovimiento").ToString.ToEntero, ConceptoMovimiento, -1, UsuarioActual.CveEmpresa) Then
|
|
||||||
|
|
||||||
If ObjInventario.DtResultados.Rows.Count > 0 AndAlso DtMovimientosDetalles.Rows.Count > 0 Then
|
'Obtenemos los Movimientos de salida
|
||||||
|
If ObjInventario.GetMovimientos(dr("CveMovimiento").ToString.ToEntero, ConceptoMovimiento, -1, UsuarioActual.CveEmpresa) Then
|
||||||
|
|
||||||
Dim CveAlmacenSalida As Integer = ObjInventario.DtResultados(0)("CveAlmacen").ToString.ToEntero
|
If ObjInventario.DtResultados.Rows.Count > 0 AndAlso DtMovimientosDetalles.Rows.Count > 0 Then
|
||||||
Dim CveAlmacenEntrada As Integer = ObjInventario.DtResultados(0)("CveAlmacenRelacionado").ToString.ToEntero
|
Dim RowMovimiento As DataRow = ObjInventario.DtResultados(0)
|
||||||
Dim CveMoneda As Integer = ObjInventario.DtResultados(0)("CveMoneda").ToString.ToEntero
|
|
||||||
Dim CveTipoAlmacen As Integer = ObjInventario.DtResultados(0)("CveTipoAlmacen").ToString.ToEntero
|
|
||||||
|
|
||||||
If (CveAlmacenEntrada > 0 AndAlso CveTipoAlmacen <> 1) Or RemisionesLista.Count = 0 Then 'Con remisiones parciales ignoramos las surtidas ya realizadas
|
Dim CveAlmacenSalida As Integer = RowMovimiento("CveAlmacen").ToString.ToEntero()
|
||||||
|
Dim CveAlmacenEntrada As Integer = RowMovimiento("CveAlmacenRelacionado").ToString.ToEntero()
|
||||||
|
Dim CveMoneda As Integer = RowMovimiento("CveMoneda").ToString.ToEntero()
|
||||||
|
Dim CveTipoAlmacen As Integer = RowMovimiento("CveTipoAlmacen").ToString.ToEntero()
|
||||||
|
|
||||||
Dim MovDetalle As New DataTable
|
If (CveAlmacenEntrada > 0 AndAlso CveTipoAlmacen <> 1) Or RemisionesLista.Count = 0 Then 'Con remisiones parciales ignoramos las surtidas ya realizadas
|
||||||
If RemisionesLista.Count > 0 Then
|
|
||||||
MovDetalle = CuadrarFacturaMovimientos(DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")} AND TieneSalidaxFactura IS NULL"))
|
|
||||||
Else
|
|
||||||
MovDetalle = DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")}")
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ErrorList.Count = 0 Then
|
Dim MovDetalle As New DataTable
|
||||||
If MovDetalle.Rows.Count > 0 Then
|
|
||||||
Dim CveMovimientoSalidaPorTraspaso = -1
|
|
||||||
|
|
||||||
'Le damos salida de apartado por traspaso
|
If RemisionesLista.Count > 0 Then
|
||||||
CveMovimientoSalidaPorTraspaso = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenSalida, 8, CveMoneda, CveRemision)
|
MovDetalle = CuadrarFacturaMovimientos(DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")} AND TieneSalidaxFactura IS NULL"))
|
||||||
If Not CveMovimientoSalidaPorTraspaso > 0 Then
|
Else
|
||||||
OcurrioError = True
|
MovDetalle = DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")}")
|
||||||
Exit For
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Le damos entrada al general por traspaso
|
If ErrorList.Count = 0 AndAlso MovDetalle.Rows.Count > 0 Then
|
||||||
If Not OcurrioError Then
|
Dim CveMovimientoSalidaPorTraspaso As Integer = -1
|
||||||
If Not GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenEntrada, 9, CveMoneda, CveRemision, CveMovimientoRelacionado:=CveMovimientoSalidaPorTraspaso) > 0 Then
|
|
||||||
|
'Le damos salida de apartado por traspaso
|
||||||
|
CveMovimientoSalidaPorTraspaso = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenSalida, 8, CveMoneda, CveRemision)
|
||||||
|
|
||||||
|
If Not CveMovimientoSalidaPorTraspaso > 0 Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
If Not OcurrioError Then
|
'Le damos entrada al general por traspaso
|
||||||
If ConSalida Then
|
If Not OcurrioError Then
|
||||||
'Le damos salida normal
|
GeneroMovimientoAlmacen = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenEntrada, 9, CveMoneda, CveRemision, CveMovimientoRelacionado:=CveMovimientoSalidaPorTraspaso) > 0
|
||||||
If Not GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenEntrada, 3, CveMoneda, ObjFactura.CveVenta, MovimientoPrePoliza:=True, ObjConta:=ObjConta) > 0 Then
|
|
||||||
|
If Not GeneroMovimientoAlmacen Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'Le damos salida normal
|
||||||
|
If ConSalida AndAlso Not OcurrioError Then
|
||||||
|
GeneroMovimientoAlmacen = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenEntrada, 3, CveMoneda, ObjFactura.CveVenta, MovimientoPrePoliza:=True, ObjConta:=ObjConta) > 0
|
||||||
|
|
||||||
|
If Not GeneroMovimientoAlmacen Then
|
||||||
|
OcurrioError = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
MovDetalle.Dispose()
|
||||||
End If
|
End If
|
||||||
Else
|
|
||||||
OcurrioError = True
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
MovDetalle.Dispose()
|
ElseIf ObjInventario.GetMovimientos(dr("CveMovimiento").ToString.ToEntero, 3, -1, UsuarioActual.CveEmpresa) Then
|
||||||
|
'Esquema viejo, evitamos que aparezca por surtir
|
||||||
|
If Not ObjInventario.ActualizarEsDevolucionVenta(ObjFactura.CveVenta, 2) Then
|
||||||
|
OcurrioError = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
End If
|
OcurrioError = Not GeneroMovimientoAlmacen
|
||||||
|
|
||||||
ElseIf ObjInventario.GetMovimientos(dr("CveMovimiento").ToString.ToEntero, 3, -1, UsuarioActual.CveEmpresa) Then
|
|
||||||
|
|
||||||
'Esquema viejo, evitamos que aparezca por surtir
|
|
||||||
If Not ObjInventario.ActualizarEsDevolucionVenta(ObjFactura.CveVenta, 2) Then
|
|
||||||
OcurrioError = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Next
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
Catch ex As Exception
|
||||||
|
OcurrioError = True
|
||||||
|
OnError("Ocurrió un error al realizar el traspaso", ex)
|
||||||
|
End Try
|
||||||
Return Not OcurrioError
|
Return Not OcurrioError
|
||||||
End Function
|
End Function
|
||||||
Private Function CuadrarFacturaMovimientos(MovDetalle As DataTable) As DataTable
|
Private Function CuadrarFacturaMovimientos(MovDetalle As DataTable) As DataTable
|
||||||
@@ -15737,7 +15531,6 @@ Partial Class Ventas
|
|||||||
Row("Descuento") = Math.Round(Row("Descuento").ToString.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
Row("Descuento") = Math.Round(Row("Descuento").ToString.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
||||||
Row("ImporteIEPS") = Math.Round(Row("ImporteIEPS").ToString.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
Row("ImporteIEPS") = Math.Round(Row("ImporteIEPS").ToString.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
||||||
Row("ImporteIVA") = Math.Round(Row("ImporteIVA").ToString.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
Row("ImporteIVA") = Math.Round(Row("ImporteIVA").ToString.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
||||||
Row("ImporteIEPS") = Math.Round(Row("ImporteIEPS").ToString.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
|
||||||
Row("ImporteRetIVA") = Math.Round(Row("ImporteRetIVA").ToString.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
Row("ImporteRetIVA") = Math.Round(Row("ImporteRetIVA").ToString.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
||||||
Row("ImporteRetISR") = Math.Round(Row("ImporteRetISR").ToString.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
Row("ImporteRetISR") = Math.Round(Row("ImporteRetISR").ToString.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
||||||
Next
|
Next
|
||||||
@@ -18836,8 +18629,6 @@ Partial Class Ventas
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Region "D E V O L U C I O N D E P E D I D O "
|
#Region "D E V O L U C I O N D E P E D I D O "
|
||||||
Private Sub CargaFacturaDevolucionPedido()
|
Private Sub CargaFacturaDevolucionPedido()
|
||||||
Dim CveVenta As Integer = Me.CveVenta
|
Dim CveVenta As Integer = Me.CveVenta
|
||||||
@@ -23480,9 +23271,4 @@ Partial Class Ventas
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 69 KiB |
Reference in New Issue
Block a user