This commit is contained in:
2022-04-19 21:41:56 -07:00
49 changed files with 5106 additions and 4598 deletions

View File

@@ -6708,6 +6708,53 @@ Public Class ClsContabilidad
End Function End Function
Public Function GetLibroMayorSIG(CveCuentaPadre As Integer, FechaInicio As Date, FechaFin As Date, CveMoneda As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_LibroMayorSIGGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCuentaPadre ", SqlDbType.Int).Value = CveCuentaPadre
.Add("@FechaI", SqlDbType.Date).Value = FechaInicio
.Add("@FechaF", SqlDbType.Date).Value = FechaFin
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el reporte de Libro Mayor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function GetLibroDiarioSIG(FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_LibroDiarioSIGGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaI", SqlDbType.Date).Value = FechaInicio
.Add("@FechaF", SqlDbType.Date).Value = FechaFin
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el reporte de Libro Diario.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
#Region "IDisposable Support" #Region "IDisposable Support"
' IDisposable ' IDisposable
Protected Overridable Sub Dispose(disposing As Boolean) Protected Overridable Sub Dispose(disposing As Boolean)

View File

@@ -152,53 +152,53 @@ Public Class ClsPV
End Function End Function
'Reporte de Compras 'Reporte de Compras
Public Function GetRepPVCompras(FechaI As String, FechaF As String, CveProveedor As Integer, CveUsuario As Integer, CveMoneda As Integer, CveEmpresa As Integer, Gpo As Integer) As Boolean 'Public Function GetRepPVCompras(FechaI As String, FechaF As String, CveProveedor As Integer, CveUsuario As Integer, CveMoneda As Integer, CveEmpresa As Integer, Gpo As Integer) As Boolean
Dim Retorno As Boolean = False ' Dim Retorno As Boolean = False
DataAdapter("PA_PV_ComprasGetRep") ' DataAdapter("PA_PV_ComprasGetRep")
With SqlAdapter.SelectCommand.Parameters ' With SqlAdapter.SelectCommand.Parameters
.Add("@FechaI", SqlDbType.VarChar).Value = FechaI ' .Add("@FechaI", SqlDbType.VarChar).Value = FechaI
.Add("@FechaF", SqlDbType.VarChar).Value = FechaF ' .Add("@FechaF", SqlDbType.VarChar).Value = FechaF
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor ' .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario ' .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda ' .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@GPO", SqlDbType.Int).Value = Gpo ' .Add("@GPO", SqlDbType.Int).Value = Gpo
End With ' End With
Try ' Try
SqlAdapter.Fill(Data) ' SqlAdapter.Fill(Data)
Retorno = True ' Retorno = True
Catch ex As Exception ' Catch ex As Exception
OnError("Ocurrió un error al obtener el Reporte de Compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) ' OnError("Ocurrió un error al obtener el Reporte de Compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try ' End Try
Return Retorno ' Return Retorno
End Function 'End Function
'Reporte de Ventas VS Compras 'Reporte de Ventas VS Compras
Public Function GetRepPVVentasCompras(FechaI As String, FechaF As String, CveSubProyecto As Integer, CveEmpresa As Integer, Gpo As Integer) As Boolean 'Public Function GetRepPVVentasCompras(FechaI As String, FechaF As String, CveSubProyecto As Integer, CveEmpresa As Integer, Gpo As Integer) As Boolean
Dim Retorno As Boolean = False ' Dim Retorno As Boolean = False
DataAdapter("PA_PV_VentasComprasGetRep") ' DataAdapter("PA_PV_VentasComprasGetRep")
With SqlAdapter.SelectCommand.Parameters ' With SqlAdapter.SelectCommand.Parameters
'.Add("@CveVenta", SqlDbType.Int).Value = CveVenta ' '.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
.Add("@FechaI", SqlDbType.VarChar).Value = FechaI ' .Add("@FechaI", SqlDbType.VarChar).Value = FechaI
.Add("@FechaF", SqlDbType.VarChar).Value = FechaF ' .Add("@FechaF", SqlDbType.VarChar).Value = FechaF
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto ' .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@GPO", SqlDbType.Int).Value = Gpo ' .Add("@GPO", SqlDbType.Int).Value = Gpo
End With ' End With
Try ' Try
SqlAdapter.Fill(Data) ' SqlAdapter.Fill(Data)
Retorno = True ' Retorno = True
Catch ex As Exception ' Catch ex As Exception
OnError("Ocurrió un error al obtener el Reporte de Ventas y Compras.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) ' OnError("Ocurrió un error al obtener el Reporte de Ventas y Compras.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try ' End Try
Return Retorno ' Return Retorno
End Function 'End Function
#Region "IDisposable Support" #Region "IDisposable Support"

View File

@@ -5538,9 +5538,9 @@ Public Class ClsPaginas
PaginaDict.Add("/Proveedores/LogInProveedores.aspx".ToUpper(), -1) PaginaDict.Add("/Proveedores/LogInProveedores.aspx".ToUpper(), -1)
'Punto de Venta 'Punto de Venta
PaginaDict.Add("/PV/PVRepVentas.aspx".ToUpper(), 270) 'PaginaDict.Add("/PV/PVRepVentas.aspx".ToUpper(), 270)
PaginaDict.Add("/PV/PVRepCompras.aspx".ToUpper(), 272) 'PaginaDict.Add("/PV/PVRepCompras.aspx".ToUpper(), 272)
PaginaDict.Add("/PV/PVRepVentasCompras.aspx".ToUpper(), 273) 'PaginaDict.Add("/PV/PVRepVentasCompras.aspx".ToUpper(), 273)
PaginaDict.Add("/Contratos/ContratoObra.aspx".ToUpper(), 911) PaginaDict.Add("/Contratos/ContratoObra.aspx".ToUpper(), 911)
PaginaDict.Add("/Contratos/RepContratosObraAvances.aspx".ToUpper(), 914) PaginaDict.Add("/Contratos/RepContratosObraAvances.aspx".ToUpper(), 914)
@@ -5999,7 +5999,7 @@ Public Class ClsPaginas
Dim bdir As String = If(RutaReporte.Contains("Empresas"), ModExtensiones.DirectorioBaseEmpresas, AppDomain.CurrentDomain.BaseDirectory) Dim bdir As String = If(RutaReporte.Contains("Empresas"), ModExtensiones.DirectorioBaseEmpresas, AppDomain.CurrentDomain.BaseDirectory)
'TOMAR LA RUTA BASE PARA EL DIRECTORIO DE LA EMPRESA 'TOMAR LA RUTA BASE PARA EL DIRECTORIO DE LA EMPRESA
If Not String.IsNullOrEmpty(RutaEmpresa) AndAlso Not RutaReporte.Contains("Grales") AndAlso Not RutaReporte.Contains("Contabilidad/Reportes/") Then If Not String.IsNullOrEmpty(RutaEmpresa) AndAlso Not RutaReporte.Contains("Grales") AndAlso Not RutaReporte.Contains("Contabilidad/Reportes/") AndAlso Not RutaReporte.Contains("AC/Reportes/") Then
bdir = RutaEmpresa.Replace($"{CveEmpresa}/", "") bdir = RutaEmpresa.Replace($"{CveEmpresa}/", "")
End If End If
@@ -6013,16 +6013,21 @@ Public Class ClsPaginas
Dim wsreport As New WSRDLC.WebServiceSoapClient Dim wsreport As New WSRDLC.WebServiceSoapClient
Dim params As New List(Of WSRDLC.ReportParameter) Dim params As New List(Of WSRDLC.ReportParameter)
Dim reportobjects As New List(Of WSRDLC.ReportObjects)
Dim ds As New DataSet Dim ds As New DataSet
For Each rpds As ReportDataSource In DataSource For Each rpds As ReportDataSource In DataSource
Dim dt As DataTable = DirectCast(rpds.Value, Data.DataTable) If rpds.Value.GetType().ToString() = "System.Data.DataTable" Then
If dt Is Nothing Then Dim dt As DataTable = DirectCast(rpds.Value, Data.DataTable)
dt = New DataTable()
Else
dt = dt.Copy() dt = dt.Copy()
dt.TableName = rpds.Name
ds.Tables.Add(dt)
Else
Dim ojext As New WSRDLC.ReportObjects
ojext.Name = rpds.Name
ojext.Value = rpds.Value
reportobjects.Add(ojext)
End If End If
dt.TableName = rpds.Name
ds.Tables.Add(dt)
Next Next
For Each rpds As ReportParameter In Parametros For Each rpds As ReportParameter In Parametros
Dim param As New WSRDLC.ReportParameter Dim param As New WSRDLC.ReportParameter
@@ -6030,7 +6035,7 @@ Public Class ClsPaginas
param.Values = {rpds.Values(0)} param.Values = {rpds.Values(0)}
params.Add(param) params.Add(param)
Next Next
Bytes = wsreport.StreamPDFBytes(RutaReporte, ds, params.ToArray(), NombreArchivo, Formato, CveEmpresa, CveUsuario) Bytes = wsreport.StreamNEWPDFBytes(RutaReporte, ds, reportobjects.ToArray(), params.ToArray(), NombreArchivo, Formato, CveEmpresa, CveUsuario)
wsreport = Nothing wsreport = Nothing
params = Nothing params = Nothing
ds.Dispose() : ds = Nothing ds.Dispose() : ds = Nothing

View File

@@ -5337,7 +5337,7 @@ Public Class ClsVentas
#End Region #End Region
Public Function AddAutorizacionLimite(CveEmpresa As Integer, CveCliente As Integer, CveVendedor As Integer, Importe As Decimal, CveEstatus As Integer, CveUsuario As Integer, TipoAutorizacion As Integer, TipoDocumento As String, Optional DiasVencidos As Integer = 0, Optional Motivo As String = "") As Boolean Public Function AddAutorizacionLimite(CveEmpresa As Integer, CveCliente As Integer, CveVendedor As Integer, Importe As Decimal, CveEstatus As Integer, CveUsuario As Integer, TipoAutorizacion As Integer, TipoDocumento As String, Optional DiasVencidos As Integer = 0, Optional Motivo As String = "", Optional PorcentajeDescuento As Decimal = 0) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_AutorizacionLimitesAdd") DataAdapter("PA_Vta_AutorizacionLimitesAdd")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
@@ -5350,6 +5350,7 @@ Public Class ClsVentas
.Add("@TipoAutorizacion", SqlDbType.Int).Value = TipoAutorizacion .Add("@TipoAutorizacion", SqlDbType.Int).Value = TipoAutorizacion
.Add("@TipoDocumento", SqlDbType.VarChar).Value = TipoDocumento .Add("@TipoDocumento", SqlDbType.VarChar).Value = TipoDocumento
.Add("@DiasVencidos", SqlDbType.Int).Value = DiasVencidos .Add("@DiasVencidos", SqlDbType.Int).Value = DiasVencidos
.Add("@PorcentajeDescuento", SqlDbType.Decimal).Value = PorcentajeDescuento
.Add("@Motivo", SqlDbType.VarChar).Value = Motivo .Add("@Motivo", SqlDbType.VarChar).Value = Motivo
End With End With
Try Try

View File

@@ -5736,7 +5736,7 @@ Namespace Modelos
Else Else
If Not ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, CancelacionAcuse, CancelacionFecha, CveVenta, IDPoliza, CvePAC:=CvePACCancelacion, CveEstatusRefacturacion:=CveEstatusRefacturacion, If Not ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, CancelacionAcuse, CancelacionFecha, CveVenta, IDPoliza, CvePAC:=CvePACCancelacion, CveEstatusRefacturacion:=CveEstatusRefacturacion,
CveUsuarioCambiaEstatus:=UsuarioActual.CveUsuario, FechaCambioEstatus:=Now.ToString("yyyy-MM-dd HH:mm:ss.mmm"), CveMotivoCancelacion:=CveMotivoCancelacion, CveUsuarioCambiaEstatus:=UsuarioActual.CveUsuario, FechaCambioEstatus:=Now.ToString("yyyy-MM-dd HH:mm:ss.mmm"), CveMotivoCancelacion:=CveMotivoCancelacion,
MotivoCancelacion:=MotivoCancelacion, EstadoCancelacion:=EstadoCancelacion, CveEstadoCancelacion:=CveEstadoCancelacion) Then MotivoCancelacion:=MotivoCancelacion, EstadoCancelacion:=EstadoCancelacion, CveEstadoCancelacion:=CveEstadoCancelacion, SelloSolicitudDigitalSAT:=SolicitudCancelacionAcuse) Then
ErrorCancelar = True ErrorCancelar = True
MensajeError = "Ocurrió un error al guardar el estatus de cancelación." MensajeError = "Ocurrió un error al guardar el estatus de cancelación."
End If End If

Binary file not shown.

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ReferenceGroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ID="3482481b-8443-4407-93cb-d3e86f1a86f2" xmlns="urn:schemas-microsoft-com:xml-wcfservicemap"> <ReferenceGroup xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ID="3482481b-8443-4407-93cb-d3e86f1a86f2" xmlns="urn:schemas-microsoft-com:xml-wcfservicemap">
<ClientOptions> <ClientOptions>
<GenerateAsynchronousMethods>false</GenerateAsynchronousMethods> <GenerateAsynchronousMethods>false</GenerateAsynchronousMethods>
<GenerateTaskBasedAsynchronousMethod>true</GenerateTaskBasedAsynchronousMethod> <GenerateTaskBasedAsynchronousMethod>true</GenerateTaskBasedAsynchronousMethod>
@@ -22,8 +22,8 @@
<MetadataSource Address="http://localhost:7999/WebService.asmx" Protocol="http" SourceId="1" /> <MetadataSource Address="http://localhost:7999/WebService.asmx" Protocol="http" SourceId="1" />
</MetadataSources> </MetadataSources>
<Metadata> <Metadata>
<MetadataFile FileName="WebService.disco" MetadataType="Disco" ID="88f9f2ea-e38b-4dfa-968b-c305ff10e146" SourceId="1" SourceUrl="http://localhost:7999/WebService.asmx?disco" />
<MetadataFile FileName="WebService.wsdl" MetadataType="Wsdl" ID="21ef4883-f54f-47da-857a-18c67053b062" SourceId="1" SourceUrl="http://localhost:7999/WebService.asmx?wsdl" /> <MetadataFile FileName="WebService.wsdl" MetadataType="Wsdl" ID="21ef4883-f54f-47da-857a-18c67053b062" SourceId="1" SourceUrl="http://localhost:7999/WebService.asmx?wsdl" />
<MetadataFile FileName="WebService.disco" MetadataType="Disco" ID="88f9f2ea-e38b-4dfa-968b-c305ff10e146" SourceId="1" SourceUrl="http://localhost:7999/WebService.asmx?disco" />
</Metadata> </Metadata>
<Extensions> <Extensions>
<ExtensionFile FileName="configuration91.svcinfo" Name="configuration91.svcinfo" /> <ExtensionFile FileName="configuration91.svcinfo" Name="configuration91.svcinfo" />

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/"> <discovery xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.xmlsoap.org/disco/">
<contractRef ref="http://localhost:7999/WebService.asmx?wsdl" docRef="http://localhost:7999/WebService.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" /> <contractRef ref="http://localhost:7999/WebService.asmx?wsdl" docRef="http://localhost:7999/WebService.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
<soap address="http://localhost:7999/WebService.asmx" xmlns:q1="http://tempuri.org/" binding="q1:WebServiceSoap" xmlns="http://schemas.xmlsoap.org/disco/soap/" /> <soap address="http://localhost:7999/WebService.asmx" xmlns:q1="http://tempuri.org/" binding="q1:WebServiceSoap" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
<soap address="http://localhost:7999/WebService.asmx" xmlns:q2="http://tempuri.org/" binding="q2:WebServiceSoap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" /> <soap address="http://localhost:7999/WebService.asmx" xmlns:q2="http://tempuri.org/" binding="q2:WebServiceSoap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" />

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> <wsdl:definitions xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:tns="http://tempuri.org/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types> <wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/"> <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
<s:element name="HelloWorld"> <s:element name="HelloWorld">
@@ -83,6 +83,73 @@
</s:sequence> </s:sequence>
</s:complexType> </s:complexType>
</s:element> </s:element>
<s:element name="StreamNEWPDF">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="RutaReporte" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="source">
<s:complexType>
<s:sequence>
<s:element ref="s:schema" />
<s:any />
</s:sequence>
</s:complexType>
</s:element>
<s:element minOccurs="0" maxOccurs="1" name="reportobjects" type="tns:ArrayOfReportObjects" />
<s:element minOccurs="0" maxOccurs="1" name="Parametros" type="tns:ArrayOfReportParameter" />
<s:element minOccurs="0" maxOccurs="1" name="NombreArchivo" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Formato" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="CveEmpresa" type="s:int" />
<s:element minOccurs="1" maxOccurs="1" name="CveUsuario" type="s:int" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="ArrayOfReportObjects">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="ReportObjects" nillable="true" type="tns:ReportObjects" />
</s:sequence>
</s:complexType>
<s:complexType name="ReportObjects">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Name" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Value" />
</s:sequence>
</s:complexType>
<s:element name="StreamNEWPDFResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="StreamNEWPDFResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="StreamNEWPDFBytes">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="RutaReporte" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="source">
<s:complexType>
<s:sequence>
<s:element ref="s:schema" />
<s:any />
</s:sequence>
</s:complexType>
</s:element>
<s:element minOccurs="0" maxOccurs="1" name="reportobjects" type="tns:ArrayOfReportObjects" />
<s:element minOccurs="0" maxOccurs="1" name="Parametros" type="tns:ArrayOfReportParameter" />
<s:element minOccurs="0" maxOccurs="1" name="NombreArchivo" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Formato" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="CveEmpresa" type="s:int" />
<s:element minOccurs="1" maxOccurs="1" name="CveUsuario" type="s:int" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="StreamNEWPDFBytesResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="StreamNEWPDFBytesResult" type="s:base64Binary" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema> </s:schema>
</wsdl:types> </wsdl:types>
<wsdl:message name="HelloWorldSoapIn"> <wsdl:message name="HelloWorldSoapIn">
@@ -103,6 +170,18 @@
<wsdl:message name="StreamPDFBytesSoapOut"> <wsdl:message name="StreamPDFBytesSoapOut">
<wsdl:part name="parameters" element="tns:StreamPDFBytesResponse" /> <wsdl:part name="parameters" element="tns:StreamPDFBytesResponse" />
</wsdl:message> </wsdl:message>
<wsdl:message name="StreamNEWPDFSoapIn">
<wsdl:part name="parameters" element="tns:StreamNEWPDF" />
</wsdl:message>
<wsdl:message name="StreamNEWPDFSoapOut">
<wsdl:part name="parameters" element="tns:StreamNEWPDFResponse" />
</wsdl:message>
<wsdl:message name="StreamNEWPDFBytesSoapIn">
<wsdl:part name="parameters" element="tns:StreamNEWPDFBytes" />
</wsdl:message>
<wsdl:message name="StreamNEWPDFBytesSoapOut">
<wsdl:part name="parameters" element="tns:StreamNEWPDFBytesResponse" />
</wsdl:message>
<wsdl:portType name="WebServiceSoap"> <wsdl:portType name="WebServiceSoap">
<wsdl:operation name="HelloWorld"> <wsdl:operation name="HelloWorld">
<wsdl:input message="tns:HelloWorldSoapIn" /> <wsdl:input message="tns:HelloWorldSoapIn" />
@@ -116,6 +195,14 @@
<wsdl:input message="tns:StreamPDFBytesSoapIn" /> <wsdl:input message="tns:StreamPDFBytesSoapIn" />
<wsdl:output message="tns:StreamPDFBytesSoapOut" /> <wsdl:output message="tns:StreamPDFBytesSoapOut" />
</wsdl:operation> </wsdl:operation>
<wsdl:operation name="StreamNEWPDF">
<wsdl:input message="tns:StreamNEWPDFSoapIn" />
<wsdl:output message="tns:StreamNEWPDFSoapOut" />
</wsdl:operation>
<wsdl:operation name="StreamNEWPDFBytes">
<wsdl:input message="tns:StreamNEWPDFBytesSoapIn" />
<wsdl:output message="tns:StreamNEWPDFBytesSoapOut" />
</wsdl:operation>
</wsdl:portType> </wsdl:portType>
<wsdl:binding name="WebServiceSoap" type="tns:WebServiceSoap"> <wsdl:binding name="WebServiceSoap" type="tns:WebServiceSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
@@ -146,6 +233,24 @@
<soap:body use="literal" /> <soap:body use="literal" />
</wsdl:output> </wsdl:output>
</wsdl:operation> </wsdl:operation>
<wsdl:operation name="StreamNEWPDF">
<soap:operation soapAction="http://tempuri.org/StreamNEWPDF" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="StreamNEWPDFBytes">
<soap:operation soapAction="http://tempuri.org/StreamNEWPDFBytes" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding> </wsdl:binding>
<wsdl:binding name="WebServiceSoap12" type="tns:WebServiceSoap"> <wsdl:binding name="WebServiceSoap12" type="tns:WebServiceSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
@@ -176,6 +281,24 @@
<soap12:body use="literal" /> <soap12:body use="literal" />
</wsdl:output> </wsdl:output>
</wsdl:operation> </wsdl:operation>
<wsdl:operation name="StreamNEWPDF">
<soap12:operation soapAction="http://tempuri.org/StreamNEWPDF" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="StreamNEWPDFBytes">
<soap12:operation soapAction="http://tempuri.org/StreamNEWPDFBytes" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding> </wsdl:binding>
<wsdl:service name="WebService"> <wsdl:service name="WebService">
<wsdl:port name="WebServiceSoap" binding="tns:WebServiceSoap"> <wsdl:port name="WebServiceSoap" binding="tns:WebServiceSoap">

View File

@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configurationSnapshot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:schemas-microsoft-com:xml-wcfconfigurationsnapshot"> <configurationSnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:schemas-microsoft-com:xml-wcfconfigurationsnapshot">
<behaviors /> <behaviors />
<bindings> <bindings>
<binding digest="System.ServiceModel.Configuration.BasicHttpBindingElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data name=&quot;WebServiceSoap&quot; /&gt;" bindingType="basicHttpBinding" name="WebServiceSoap" /> <binding digest="System.ServiceModel.Configuration.BasicHttpBindingElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data name=&quot;WebServiceSoap1&quot; /&gt;" bindingType="basicHttpBinding" name="WebServiceSoap1" />
</bindings> </bindings>
<endpoints> <endpoints>
<endpoint normalizedDigest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;http://localhost:7999/WebService.asmx&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;WebServiceSoap&quot; contract=&quot;WSRDLC.WebServiceSoap&quot; name=&quot;WebServiceSoap&quot; /&gt;" digest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;http://localhost:7999/WebService.asmx&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;WebServiceSoap&quot; contract=&quot;WSRDLC.WebServiceSoap&quot; name=&quot;WebServiceSoap&quot; /&gt;" contractName="WSRDLC.WebServiceSoap" name="WebServiceSoap" /> <endpoint normalizedDigest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;http://localhost:7999/WebService.asmx&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;WebServiceSoap1&quot; contract=&quot;WSRDLC.WebServiceSoap&quot; name=&quot;WebServiceSoap1&quot; /&gt;" digest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;http://localhost:7999/WebService.asmx&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;WebServiceSoap1&quot; contract=&quot;WSRDLC.WebServiceSoap&quot; name=&quot;WebServiceSoap1&quot; /&gt;" contractName="WSRDLC.WebServiceSoap" name="WebServiceSoap1" />
</endpoints> </endpoints>
</configurationSnapshot> </configurationSnapshot>

View File

@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum="J3l8dfyTP2yXDg07woasSqmbZaw="> <SavedWcfConfigurationInformation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="9.1" CheckSum="Ejgt26VwGnP0vzQRnoYFm96JNl+mnc4I7Uy+Cy9lVNQ=">
<bindingConfigurations> <bindingConfigurations>
<bindingConfiguration bindingType="basicHttpBinding" name="WebServiceSoap"> <bindingConfiguration bindingType="basicHttpBinding" name="WebServiceSoap1">
<properties> <properties>
<property path="/name" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <property path="/name" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>WebServiceSoap</serializedValue> <serializedValue>WebServiceSoap1</serializedValue>
</property> </property>
<property path="/closeTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <property path="/closeTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue /> <serializedValue />
@@ -112,7 +112,7 @@
</bindingConfiguration> </bindingConfiguration>
</bindingConfigurations> </bindingConfigurations>
<endpoints> <endpoints>
<endpoint name="WebServiceSoap" contract="WSRDLC.WebServiceSoap" bindingType="basicHttpBinding" address="http://localhost:7999/WebService.asmx" bindingConfiguration="WebServiceSoap"> <endpoint name="WebServiceSoap1" contract="WSRDLC.WebServiceSoap" bindingType="basicHttpBinding" address="http://localhost:7999/WebService.asmx" bindingConfiguration="WebServiceSoap1">
<properties> <properties>
<property path="/address" isComplexType="false" isExplicitlyDefined="true" clrType="System.Uri, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <property path="/address" isComplexType="false" isExplicitlyDefined="true" clrType="System.Uri, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>http://localhost:7999/WebService.asmx</serializedValue> <serializedValue>http://localhost:7999/WebService.asmx</serializedValue>
@@ -124,7 +124,7 @@
<serializedValue>basicHttpBinding</serializedValue> <serializedValue>basicHttpBinding</serializedValue>
</property> </property>
<property path="/bindingConfiguration" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <property path="/bindingConfiguration" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>WebServiceSoap</serializedValue> <serializedValue>WebServiceSoap1</serializedValue>
</property> </property>
<property path="/contract" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <property path="/contract" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>WSRDLC.WebServiceSoap</serializedValue> <serializedValue>WSRDLC.WebServiceSoap</serializedValue>
@@ -187,7 +187,7 @@
<serializedValue>False</serializedValue> <serializedValue>False</serializedValue>
</property> </property>
<property path="/name" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <property path="/name" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>WebServiceSoap</serializedValue> <serializedValue>WebServiceSoap1</serializedValue>
</property> </property>
<property path="/kind" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <property path="/kind" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue /> <serializedValue />

View File

@@ -360,10 +360,37 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("Cultivo", Cultivo)) params.Add(New ReportParameter("Cultivo", Cultivo))
params.Add(New ReportParameter("noPallet", noPallet)) params.Add(New ReportParameter("noPallet", noPallet))
params.Add(New ReportParameter("Variedad", Variedad)) params.Add(New ReportParameter("Variedad", Variedad))
Dim tablaReporte As New DataTable
Dim lrds As New List(Of ReportDataSource)
'img
Dim dtqr As New DataTable
Dim column As DataColumn = New DataColumn("ImagenByte")
column.DataType = System.Type.[GetType]("System.Byte[]")
column.AllowDBNull = True
column.Caption = "ImagenByte"
dtqr.Columns.Add(column)
Dim rowqr As DataRow = dtqr.NewRow()
Dim bcode As New BarcodeLib.Barcode()
Dim img = bcode.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", noPallet), 500, 100)
Dim barcodebyte As Byte()
Using ms = New MemoryStream()
img.Save(ms, System.Drawing.Imaging.ImageFormat.Png)
barcodebyte = ms.ToArray()
End Using
rowqr("ImagenByte") = barcodebyte
dtqr.Rows.Add(rowqr)
Dim rds2 As New ReportDataSource With {.Name = "dsImagenes", .Value = dtqr}
rds2.Name = "dsImagenes"
rds2.Value = dtqr
lrds.Add(rds2)
'endimg
'"Empresas/Grales/Formatos/EquiposGPS.rdlc" '"Empresas/Grales/Formatos/EquiposGPS.rdlc"
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc" '"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
ImprimirPDF("GPS/PalletEtiqueta2.rdlc", (New List(Of ReportDataSource)), params, "Pallet") ImprimirPDF("GPS/PalletEtiqueta2.rdlc", lrds, params, "Pallet")
End Sub End Sub
Private Sub imprimirpallet(cvePallet As Integer) Private Sub imprimirpallet(cvePallet As Integer)
Dim Envase As String = "" Dim Envase As String = ""
@@ -377,6 +404,8 @@ Partial Class PopUpVerFactura
Dim NoCajas As String = "" Dim NoCajas As String = ""
Dim NumberOfCode As String = "" Dim NumberOfCode As String = ""
Dim CvetypeImpresion As Integer Dim CvetypeImpresion As Integer
Dim NumberSmall As String = ""
Dim NumberBig As String = ""
'Envase = "1 1/9" 'Envase = "1 1/9"
'Tamano = "Small" 'Tamano = "Small"
'Cultivo = "Tomate" 'Cultivo = "Tomate"
@@ -394,8 +423,9 @@ Partial Class PopUpVerFactura
NoCajas = row("NoCajas").ToString() NoCajas = row("NoCajas").ToString()
Fecha = String.Format("{0:MMM dd}", row("Fecha")).Replace(".", "").ToUpper() Fecha = String.Format("{0:MMM dd}", row("Fecha")).Replace(".", "").ToUpper()
CvetypeImpresion = row("CvetypeImpresion").ToString().ToEntero() CvetypeImpresion = row("CvetypeImpresion").ToString().ToEntero()
NumberOfCode = String.Format("(01)00856977005186(13){1:ddMMyy}(10){0}01", Right(String.Format("0{0}", Regex.Match(row("Cuadro").ToString(), "\d+")), 2), row("Fecha")) NumberOfCode = String.Format("(00)00000000000000(00){1:ddMMyy}(00){0}00", Right(String.Format("0{0}", Regex.Match(row("Cuadro").ToString(), "\d+")), 2), row("Fecha"))
NumberSmall = String.Format("{0:00}", noPallet.ToEntero())
NumberBig = String.Format("{0:00}", row("Consecutivo").ToString().ToEntero()) ' String.Format("{0:dd}", row("Fecha"))
End If End If
End Using End Using
Dim params As New List(Of ReportParameter) Dim params As New List(Of ReportParameter)
@@ -405,11 +435,13 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("FormatoImpresion", FormatoImpresion)) params.Add(New ReportParameter("FormatoImpresion", FormatoImpresion))
params.Add(New ReportParameter("Consecutivo", Consecutivo)) params.Add(New ReportParameter("Consecutivo", Consecutivo))
params.Add(New ReportParameter("Fecha", Fecha)) params.Add(New ReportParameter("Fecha", Fecha))
params.Add(New ReportParameter("CveFormato", If(Cultivo.ToLower() = "tomate", "3", CvetypeImpresion.ToString()))) params.Add(New ReportParameter("CveFormato", If(Cultivo.ToLower().Contains("tomate"), "3", CvetypeImpresion.ToString())))
params.Add(New ReportParameter("NoCajas", NoCajas)) params.Add(New ReportParameter("NoCajas", NoCajas))
params.Add(New ReportParameter("NumberOfCode", NumberOfCode)) params.Add(New ReportParameter("NumberOfCode", NumberOfCode))
params.Add(New ReportParameter("Cultivo", If(CvetypeImpresion = 2, Cultivoingles, Cultivo))) params.Add(New ReportParameter("Cultivo", If(CvetypeImpresion = 2, Cultivoingles, Cultivo)))
params.Add(New ReportParameter("Envase", If(CvetypeImpresion = 2, "PLU 4062", Envase))) params.Add(New ReportParameter("Envase", If(CvetypeImpresion = 2, "PLU 4062", Envase)))
params.Add(New ReportParameter("NumberSmall", NumberSmall))
params.Add(New ReportParameter("NumberBig", NumberBig))
@@ -431,10 +463,10 @@ Partial Class PopUpVerFactura
Dim bcode As New BarcodeLib.Barcode() Dim bcode As New BarcodeLib.Barcode()
' Dim img = bcode.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", noPallet), 500, 100) Dim img = bcode.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", noPallet), 500, 100)
Dim barcodebyte As Byte() Dim barcodebyte As Byte()
Using ms = New MemoryStream() Using ms = New MemoryStream()
' img.Save(ms, System.Drawing.Imaging.ImageFormat.Png) img.Save(ms, System.Drawing.Imaging.ImageFormat.Png)
barcodebyte = ms.ToArray() barcodebyte = ms.ToArray()
End Using End Using
rowqr("ImagenByte") = barcodebyte rowqr("ImagenByte") = barcodebyte
@@ -807,15 +839,15 @@ Partial Class PopUpVerFactura
DtCortesVentasResumen = ObjVenta.DtResultados DtCortesVentasResumen = ObjVenta.DtResultados
End If End If
If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, UsuarioActual.CveEmpresa) Then 'If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, UsuarioActual.CveEmpresa) Then
DtCortesVentas = ObjPuntoVenta.DtResultados ' DtCortesVentas = ObjPuntoVenta.DtResultados
If DtCortesVentas.Rows.Count > 0 Then ' If DtCortesVentas.Rows.Count > 0 Then
Dim RowInfo As DataRow = DtCortesVentas.FiltroPrimero("CveVenta > 0") ' Dim RowInfo As DataRow = DtCortesVentas.FiltroPrimero("CveVenta > 0")
Fecha = RowInfo("FechaInicial").ToString ' Fecha = RowInfo("FechaInicial").ToString
Nombre = RowInfo("Nombre").ToString ' Nombre = RowInfo("Nombre").ToString
End If ' End If
End If 'End If
ObjVenta.Dispose() ObjVenta.Dispose()
ObjPuntoVenta.Dispose() ObjPuntoVenta.Dispose()
Dim FechaCorte As String = $"&emsp;<b>Fecha fin:</b> {Fecha}" Dim FechaCorte As String = $"&emsp;<b>Fecha fin:</b> {Fecha}"

View File

@@ -80,13 +80,29 @@ Partial Class Contabilidad_LibroDiario
'FechaInicio = New Date(2016, 1, 1) 'FechaInicio = New Date(2016, 1, 1)
'FechaFin = New Date(2016, 1, 31) 'FechaFin = New Date(2016, 1, 31)
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
If ObjConta.GetLibroDiario(FechaInicio, FechaFin) Then If UsuarioActual.Empresa.TipoContabilidad = 1 Then
DtDatos = ObjConta.DtResultados
Dim ObjConta As New ClsContabilidad
If ObjConta.GetLibroDiarioSIG(FechaInicio, FechaFin, UsuarioActual.CveEmpresa) Then
DtDatos = ObjConta.DtResultados
Else
DtDatos = Nothing
End If
ObjConta.Dispose()
Else Else
DtDatos = Nothing Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
If ObjConta.GetLibroDiario(FechaInicio, FechaFin) Then
DtDatos = ObjConta.DtResultados
Else
DtDatos = Nothing
End If
ObjConta.Dispose()
End If End If
ObjConta.Dispose()
If DtDatos IsNot Nothing Then If DtDatos IsNot Nothing Then
ImgExcel.Visible = True ImgExcel.Visible = True

View File

@@ -44,9 +44,17 @@ Partial Class Contabilidad_LibroMayor
If UsuarioActual.Empresa.UsaAC Then If UsuarioActual.Empresa.UsaAC Then
BtnConsultar.Enabled = True BtnConsultar.Enabled = True
Else Else
Alert("La empresa no usa Armonización Contable", TipoMensaje.MsgError)
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
BtnConsultar.Enabled = True
Else
Alert("La empresa no usa Armonización Contable", TipoMensaje.MsgError)
End If
End If End If
End If End If
End Sub End Sub
@@ -70,13 +78,32 @@ Partial Class Contabilidad_LibroMayor
FechaInicio = If(IsDate(TxtFechaDel.Text), TxtFechaDel.Text.ToDate, MinFecha) FechaInicio = If(IsDate(TxtFechaDel.Text), TxtFechaDel.Text.ToDate, MinFecha)
FechaFin = If(IsDate(TxtFechaAl.Text), TxtFechaAl.Text.ToDate, MaxFecha) FechaFin = If(IsDate(TxtFechaAl.Text), TxtFechaAl.Text.ToDate, MaxFecha)
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) '140
If ObjConta.GetLibroMayor(1, FechaInicio, FechaFin, 1) Then Dim CvecuentaPadre As Integer = 57416 '140
DtDatos = ObjConta.DtResultados
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
Dim ObjConta As New ClsContabilidad
If ObjConta.GetLibroMayorSIG(CvecuentaPadre, FechaInicio, FechaFin, 1, UsuarioActual.CveEmpresa) Then
DtDatos = ObjConta.DtResultados
Else
DtDatos = Nothing
End If
ObjConta.Dispose()
Else Else
DtDatos = Nothing Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
If ObjConta.GetLibroMayor(1, FechaInicio, FechaFin, 1) Then
DtDatos = ObjConta.DtResultados
Else
DtDatos = Nothing
End If
ObjConta.Dispose()
End If End If
ObjConta.Dispose()
If DtDatos IsNot Nothing Then If DtDatos IsNot Nothing Then
ImgExcel.Visible = True ImgExcel.Visible = True
@@ -159,6 +186,7 @@ Partial Class Contabilidad_LibroMayor
#Region " IMPRIMIR " #Region " IMPRIMIR "
#End Region #End Region
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)

View File

@@ -4,6 +4,9 @@
</asp:Content> </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server"> <asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style> <style>
tr.Titulos {
display: table-row !important;
}
.GvMov input, .GvMov td { .GvMov input, .GvMov td {
height: 20px !important; height: 20px !important;
} }
@@ -498,7 +501,7 @@
<asp:TemplateField> <asp:TemplateField>
<HeaderTemplate>Cargo</HeaderTemplate> <HeaderTemplate>Cargo</HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtCargo" CssClass="txtcargo" runat="server" Style="text-align: right" Width="65px" Visible="False"></asp:TextBox> <asp:TextBox ID="TxtCargo" CssClass="txtcargo" runat="server" Style="text-align: right" Width="65px" Visible="False" Text='<%# If(String.IsNullOrEmpty(Eval("Cargo").ToString), "", Eval("Cargo", "{0:0.00}")) %>'></asp:TextBox>
<div id="divCargoME" runat="server" Visible="False">ME:<asp:TextBox ID="TxtCargoME" CssClass="" runat="server" Style="text-align: right" Width="55px"></asp:TextBox> <div id="divCargoME" runat="server" Visible="False">ME:<asp:TextBox ID="TxtCargoME" CssClass="" runat="server" Style="text-align: right" Width="55px"></asp:TextBox>
TC:<asp:TextBox ID="TxtTC" CssClass="" runat="server" Style="text-align: right" Width="45px"></asp:TextBox> TC:<asp:TextBox ID="TxtTC" CssClass="" runat="server" Style="text-align: right" Width="45px"></asp:TextBox>
</div> </div>
@@ -508,7 +511,7 @@
<asp:TemplateField> <asp:TemplateField>
<HeaderTemplate>Abono</HeaderTemplate> <HeaderTemplate>Abono</HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtAbono" CssClass="txtabono" runat="server" Style="text-align: right" Width="65px" Visible="False"></asp:TextBox> <asp:TextBox ID="TxtAbono" CssClass="txtabono" runat="server" Style="text-align: right" Width="65px" Visible="False" Text='<%# If(String.IsNullOrEmpty(Eval("Abono").ToString), "", Eval("Abono", "{0:0.00}")) %>' ></asp:TextBox>
<div id="divAbonoME" runat="server" Visible="False">ME:<asp:TextBox ID="TxtAbonoME" CssClass="" runat="server" Style="text-align: right" Width="55px" ></asp:TextBox></div> <div id="divAbonoME" runat="server" Visible="False">ME:<asp:TextBox ID="TxtAbonoME" CssClass="" runat="server" Style="text-align: right" Width="55px" ></asp:TextBox></div>
</ItemTemplate> </ItemTemplate>
<ItemStyle HorizontalAlign="Right" /> <ItemStyle HorizontalAlign="Right" />

View File

@@ -381,9 +381,17 @@ Partial Class ContabilidadC_RegPrePolizaS
.Add("EsComplementaria", Type.GetType("System.Boolean")) .Add("EsComplementaria", Type.GetType("System.Boolean"))
.Add("TC", Type.GetType("System.Decimal")) .Add("TC", Type.GetType("System.Decimal"))
End With End With
If Not DtMovimientos.Columns.Contains("Cargo") Then
DtMovimientos.Columns.Add("Cargo", Type.GetType("System.Decimal"))
DtMovimientos.Columns.Add("Abono", Type.GetType("System.Decimal"))
End If
DtMovimientos.AcceptChanges()
End Sub End Sub
'Private Sub CargaNomina() 'Private Sub CargaNomina()
@@ -517,9 +525,16 @@ Partial Class ContabilidadC_RegPrePolizaS
DtMovimientos.Columns.Add("ContadoObservaciones", GetType(String)) DtMovimientos.Columns.Add("ContadoObservaciones", GetType(String))
DtMovimientos.Columns.Add("ContadoImporte", GetType(Decimal)) DtMovimientos.Columns.Add("ContadoImporte", GetType(Decimal))
End If End If
If Not DtMovimientos.Columns.Contains("Cargo") Then
DtMovimientos.Columns.Add("Cargo", GetType(Decimal))
DtMovimientos.Columns.Add("Abono", GetType(Decimal))
End If
GvPrePoliza.DataBind() GvPrePoliza.DataBind()
If UsuarioActual.CveRol = 1 AndAlso DtMovimientos.COUNT("TC", "TC > 1") > 0 Then If UsuarioActual.CveRol = 1 AndAlso DtMovimientos.COUNT("TC", "TC > 1") > 0 Then
@@ -1015,6 +1030,11 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim MsgError As String = "" Dim MsgError As String = ""
Dim CveIE As Integer Dim CveIE As Integer
Dim FolioIE As String = "" Dim FolioIE As String = ""
Dim ContRegInsertados As Integer = 0
Dim TmpCargo As Decimal = 0D
Dim TmpAbono As Decimal = 0D
Dim DifCargoAbono As Decimal = 0D
Try Try
@@ -1032,7 +1052,6 @@ Partial Class ContabilidadC_RegPrePolizaS
FolioPoliza = ObjMov.FolioPoliza FolioPoliza = ObjMov.FolioPoliza
'inserto las compras que voy a pagarDdlSaldos 'inserto las compras que voy a pagarDdlSaldos
For Each gvr As GridViewRow In GvMov.Rows For Each gvr As GridViewRow In GvMov.Rows
'If gvr.DataKey("IDCuenta").ToEntero > 0 Then 'If gvr.DataKey("IDCuenta").ToEntero > 0 Then
@@ -1056,20 +1075,28 @@ Partial Class ContabilidadC_RegPrePolizaS
ImporteME = 0 ImporteME = 0
TipoCambio = 1 TipoCambio = 1
If gvr.DataKey("TipoMovto").ToDouble > 0 Then If gvr.DataKey("TipoMovto").ToDouble > 0 Then
Importe = gvr.FCTextBox("TxtAbono").Text.ToDouble Importe = gvr.FCTextBox("TxtAbono").Text.ToDouble
TmpAbono = TmpAbono + Importe
TipoMovto = True TipoMovto = True
If gvr.DataKey("EsComplementaria") = "True" Then If gvr.DataKey("EsComplementaria") = "True" Then
ImporteME = gvr.FCTextBox("TxtAbonoME").Text.ToDecimal ImporteME = gvr.FCTextBox("TxtAbonoME").Text.ToDecimal
TipoCambio = gvr.FCTextBox("TipoCambio").Text.ToDecimal TipoCambio = gvr.FCTextBox("TipoCambio").Text.ToDecimal
End If End If
Else Else
Importe = gvr.FCTextBox("TxtCargo").Text.ToDouble Importe = gvr.FCTextBox("TxtCargo").Text.ToDouble
TmpCargo = TmpCargo + Importe
TipoMovto = False TipoMovto = False
If gvr.DataKey("EsComplementaria") = "True" Then If gvr.DataKey("EsComplementaria") = "True" Then
ImporteME = gvr.FCTextBox("TxtCargoME").Text.ToDecimal ImporteME = gvr.FCTextBox("TxtCargoME").Text.ToDecimal
TipoCambio = gvr.FCTextBox("TxtTC").Text.ToDecimal TipoCambio = gvr.FCTextBox("TxtTC").Text.ToDecimal
End If End If
End If End If
If Not gvr.DataKey("CveConcepto").Contiene("30", "10") Then ' 30-bancos, 10-anticipos proveedores If Not gvr.DataKey("CveConcepto").Contiene("30", "10") Then ' 30-bancos, 10-anticipos proveedores
@@ -1100,6 +1127,8 @@ Partial Class ContabilidadC_RegPrePolizaS
ImporteMX:=Importe, ImporteME:=ImporteME, TipoCambio:=TipoCambio, ImporteMX:=Importe, ImporteME:=ImporteME, TipoCambio:=TipoCambio,
CveTipoGasto:=gvr.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero, CveTipoGasto:=gvr.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero,
CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCuenta:=tCveCuenta) Then CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCuenta:=tCveCuenta) Then
ContRegInsertados = ContRegInsertados + 1
Else Else
MsgError = "No se pudo insertar el detalle de la póliza2" MsgError = "No se pudo insertar el detalle de la póliza2"
Exit For Exit For
@@ -1108,6 +1137,7 @@ Partial Class ContabilidadC_RegPrePolizaS
If CveIE > 0 AndAlso gvr.DataKey("CveConcepto").ToEntero = 30 Then If CveIE > 0 AndAlso gvr.DataKey("CveConcepto").ToEntero = 30 Then
MensajeAlert.AppendFormat("<br/><br/>Folio Bancario: <b><a href = ""/Bancos/IE.aspx?CveIE={0}"" class=""Texto"" target=""_blank"" >{1}</a></b>", CveIE, FolioIE) MensajeAlert.AppendFormat("<br/><br/>Folio Bancario: <b><a href = ""/Bancos/IE.aspx?CveIE={0}"" class=""Texto"" target=""_blank"" >{1}</a></b>", CveIE, FolioIE)
End If End If
Next Next
If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePolizaInsertada, 1) Then If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePolizaInsertada, 1) Then
@@ -1124,40 +1154,48 @@ Partial Class ContabilidadC_RegPrePolizaS
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
Catch ex As Exception Catch ex As Exception
MsgError = "Error" MsgError = $"Error {ex.Message}"
End Try End Try
If MsgError = "" Then
'MENSAJE IE
'If CveIE Then If ContRegInsertados = 0 Then
' Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion, "window.location.reload()") MsgError = $"No se insertaron registros (Revise que los importes de los registros contengan valores)"
'Else
' Alert(If(MensajeAlert.ToString = "", "Se registro con exito.", MensajeAlert.ToString), TipoMensaje.MsgInformacion, "window.location.reload()")
'End If
Alert(If(MensajeAlert.ToString = "", $"Se registro con exito <b>{If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")}</b>", $"Se registro con exito <b>{If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")} </b><br>" & MensajeAlert.ToString), TipoMensaje.MsgInformacion, $"window.location.href=""./RegPrePolizaS.aspx?CvePrePoliza={CvePrePolizaInsertada}""")
ObjIE.Commit()
If Conta IsNot Nothing Then Conta.Commit()
UPPDocumento.Update()
TxtConcepto.Text = ""
GvMov.DataBind()
TxtFechaDocumento.Text = ""
Else
Alert(MsgError.ToString, ModExtensiones.TipoMensaje.MsgError)
ObjIE.RollBack()
If Conta IsNot Nothing Then Conta.RollBack()
End If End If
ObjIE.Dispose()
ObjMov.Dispose() If MsgError = "" Then
If Conta IsNot Nothing Then Conta.Dispose() 'MENSAJE IE
End If
'If CveIE Then
' Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion, "window.location.reload()")
'Else
' Alert(If(MensajeAlert.ToString = "", "Se registro con exito.", MensajeAlert.ToString), TipoMensaje.MsgInformacion, "window.location.reload()")
'End If
Alert(If(MensajeAlert.ToString = "", $"Se registro con exito <b>{If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")}</b>", $"Se registro con exito <b>{If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")} </b><br>" & MensajeAlert.ToString), TipoMensaje.MsgInformacion, $"window.location.href=""./RegPrePolizaS.aspx?CvePrePoliza={CvePrePolizaInsertada}""")
ObjIE.Commit()
If Conta IsNot Nothing Then Conta.Commit()
UPPDocumento.Update()
TxtConcepto.Text = ""
'GvMov.DataBind()
DdlPlantilla_SelectedIndexChanged(Nothing, Nothing)
TxtFechaDocumento.Text = ""
Else
Alert(MsgError.ToString, ModExtensiones.TipoMensaje.MsgError)
ObjIE.RollBack()
If Conta IsNot Nothing Then Conta.RollBack()
End If
ObjIE.Dispose()
ObjMov.Dispose()
If Conta IsNot Nothing Then Conta.Dispose()
End If
End Sub End Sub
Private Sub ActualizarPrePoliza() Private Sub ActualizarPrePoliza()
@@ -2004,7 +2042,6 @@ Partial Class ContabilidadC_RegPrePolizaS
If Rows.Count > 0 Then If Rows.Count > 0 Then
Dim dr As DataRow = Rows(0) Dim dr As DataRow = Rows(0)
dr("ContadoTipoTransaccion") = DdlTipoTransaccion.SelectedValue.ToEntero dr("ContadoTipoTransaccion") = DdlTipoTransaccion.SelectedValue.ToEntero
dr("ContadoCuenta") = DdlCuenta.SelectedValue.ToEntero dr("ContadoCuenta") = DdlCuenta.SelectedValue.ToEntero
dr("ContadoNumeroFolio") = TxtDocumentoFolio.Text dr("ContadoNumeroFolio") = TxtDocumentoFolio.Text
@@ -2012,9 +2049,33 @@ Partial Class ContabilidadC_RegPrePolizaS
dr("ContadoBeneficiario") = TxtDocumentoBeneficiario.Text dr("ContadoBeneficiario") = TxtDocumentoBeneficiario.Text
dr("ContadoObservaciones") = TxtDocumentoObservaciones.Text dr("ContadoObservaciones") = TxtDocumentoObservaciones.Text
End If End If
DtMovimientos.AcceptChanges() DtMovimientos.AcceptChanges()
If Not DtMovimientos.Columns.Contains("Cargo") Then
DtMovimientos.Columns.Add("Cargo", GetType(Decimal))
DtMovimientos.Columns.Add("Abono", GetType(Decimal))
End If
Dim IndexX As Integer = 0
For Each PGvRow As GridViewRow In GvMov.Rows
If PGvRow.RowType = DataControlRowType.DataRow Then
DtMovimientos.Rows(IndexX)("Cargo") = PGvRow.FCTextBox("TxtCargo").Text.ToDecimal
DtMovimientos.Rows(IndexX)("Abono") = PGvRow.FCTextBox("TxtAbono").Text.ToDecimal
IndexX = IndexX + 1
End If
Next
GvMov.DataSource = DtMovimientos GvMov.DataSource = DtMovimientos
GvMov.DataBind() GvMov.DataBind()
'CveTipoTransaccion = DdlTipoTransaccion.SelectedValue.ToEntero 'CveTipoTransaccion = DdlTipoTransaccion.SelectedValue.ToEntero
'CveCuenta = DdlCuenta.SelectedValue.ToEntero 'CveCuenta = DdlCuenta.SelectedValue.ToEntero
'Folio = TxtDocumentoFolio.Text 'Folio = TxtDocumentoFolio.Text
@@ -2798,6 +2859,12 @@ Partial Class ContabilidadC_RegPrePolizaS
End If End If
If Not DtMovimientos.Columns.Contains("Cargo") Then
DtMovimientos.Columns.Add("Cargo", GetType(Decimal))
DtMovimientos.Columns.Add("Abono", GetType(Decimal))
End If
GvPrePoliza.DataSource = DtMovimientos GvPrePoliza.DataSource = DtMovimientos
GvPrePoliza.DataBind() GvPrePoliza.DataBind()

View File

@@ -235,6 +235,8 @@
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="CveCuenta"> <asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="CveCuenta">
<Columns> <Columns>
<asp:TemplateField HeaderText="Concepto"> <asp:TemplateField HeaderText="Concepto">
@@ -275,6 +277,52 @@
<RowStyle CssClass="Texto" /> <RowStyle CssClass="Texto" />
</asp:GridView> </asp:GridView>
<asp:GridView ID="GvOrigenAplicacionSIG" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="CveCuenta" Visible="false">
<Columns>
<asp:TemplateField HeaderText="Concepto">
<ItemTemplate>
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
</ItemTemplate>
<ItemStyle Width="400" HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="" Visible="false">
<ItemTemplate>
<asp:HyperLink ID="HLlImporteBase" runat="server" Text='<%# Eval("ImporteBase", "{0:N2}")%>' CssClass="Texto" Target="_blank" ></asp:HyperLink>
</ItemTemplate>
<ItemStyle Width="100" HorizontalAlign="Right" />
</asp:TemplateField>
<asp:TemplateField HeaderText="" Visible="false">
<ItemTemplate>
<asp:HyperLink ID="HLImporteActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank" ></asp:HyperLink>
</ItemTemplate>
<ItemStyle Width="100" HorizontalAlign="Right" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Origen">
<ItemTemplate>
<asp:HyperLink ID="HLOrigen" runat="server" Text='<%# Eval("Origen", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
</ItemTemplate>
<ItemStyle Width="100" HorizontalAlign="Right" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Aplicación">
<ItemTemplate>
<asp:HyperLink ID="HLAplicacion" runat="server" Text='<%# Eval("Aplicacion", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
</ItemTemplate>
<ItemStyle Width="100" HorizontalAlign="Right" />
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
</asp:GridView>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>

View File

@@ -84,11 +84,14 @@ Partial Class Contabilidad_RepOrigenAplicacion
If UsuarioActual.Empresa.TipoContabilidad = 1 Then If UsuarioActual.Empresa.TipoContabilidad = 1 Then
TabMensual.Enabled = False TabMensual.Visible = False
TabAnual.Enabled = False TabAnual.Visible = False
TdFI.Visible = False TdFI.Visible = False
tdTipoReporte.Visible = False tdTipoReporte.Visible = False
GvOrigenAplicacionSIG.Visible = True
GvDatos.Visible = False
End If End If
End If End If
@@ -162,25 +165,26 @@ Partial Class Contabilidad_RepOrigenAplicacion
Dim AnioAnteior As Integer = AnioActual - 1 Dim AnioAnteior As Integer = AnioActual - 1
GvDatos.Columns(1).Visible = True GvOrigenAplicacionSIG.Columns(1).Visible = True
GvDatos.Columns(2).Visible = True GvOrigenAplicacionSIG.Columns(2).Visible = True
GvDatos.Columns(1).HeaderText = AnioAnteior.ToString GvOrigenAplicacionSIG.Columns(1).HeaderText = AnioAnteior.ToString
GvDatos.Columns(2).HeaderText = AnioActual.ToString GvOrigenAplicacionSIG.Columns(2).HeaderText = AnioActual.ToString
Dim ObjConta As New ClsContabilidad Dim ObjConta As New ClsContabilidad
'GvOrigenAplicacionSIG
If ObjConta.GetRepOrigenAplicacion(TxtFechaAl.Text.ToDate, UsuarioActual.CveEmpresa) Then If ObjConta.GetRepOrigenAplicacion(TxtFechaAl.Text.ToDate, UsuarioActual.CveEmpresa) Then
GvDatos.DataSource = ObjConta.DtResultados GvOrigenAplicacionSIG.DataSource = ObjConta.DtResultados
If ObjConta.DtResultados.Rows.Count > 0 Then If ObjConta.DtResultados.Rows.Count > 0 Then
LnkExcel.Visible = True LnkExcel.Visible = True
End If End If
Else Else
GvDatos.DataSource = Nothing GvOrigenAplicacionSIG.DataSource = Nothing
End If End If
ObjConta.Dispose() ObjConta.Dispose()
GvDatos.DataBind() GvOrigenAplicacionSIG.DataBind()
Else Else
@@ -214,6 +218,31 @@ Partial Class Contabilidad_RepOrigenAplicacion
End Sub End Sub
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
'Titulo y Sumatoria de cambios
If e.Row.DBCampo("Orden3").ToString.ToEntero = 10 Or e.Row.DBCampo("Orden3").ToString.ToEntero = 30 Then
e.Row.FCLabel("LbNombre").Font.Bold = True
End If
'CUENTAS
If e.Row.DBCampo("Orden3").ToString.ToEntero = 20 Then
e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;")
End If
'TOTAL
If e.Row.DBCampo("Nombre").ToString.Trim = "" Then
e.Row.Attributes.Add("style", "border-top: 1px solid; margin-top:10px;")
e.Row.FCLabel("LbNombre").Font.Bold = True
e.Row.FCLabel("LbNombre").Font.Italic = True
e.Row.FCLabel("LbNombre").Text = "TOTAL"
End If
End If
End Sub
Protected Sub GvOrigenAplicacionSIG_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvOrigenAplicacionSIG.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
'Titulo y Sumatoria de cambios 'Titulo y Sumatoria de cambios
@@ -251,6 +280,12 @@ Partial Class Contabilidad_RepOrigenAplicacion
End If End If
End Sub End Sub
#End Region #End Region

View File

@@ -12,44 +12,50 @@
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server"> <asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultar" Text="Consultar" CssClass="btn btn-default" OnClick="BtnConsultar_Click" runat="server" Visible="false" />
</div>
<div class="titlefiltros caption">
<div class="row" runat="server" visible ="false" id="DvRowFiltrosContanSig1" >
<label class="col-md-1 truncate" style="width: 90px;">Ejercicio:</label>
<div class="col-md-2" style="width: 125px;">
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100px">
</asp:DropDownList>
</div>
<label class="col-md-1 truncate" style="width: 90px;">Periodo:</label>
<div class="col-md-2" style="width: 130px;">
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="100px" CssClass="select2me">
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
<asp:ListItem Text="Abril" Value="4"></asp:ListItem>
<asp:ListItem Text="Mayo" Value="5"></asp:ListItem>
<asp:ListItem Text="Junio" Value="6"></asp:ListItem>
<asp:ListItem Text="Julio" Value="7"></asp:ListItem>
<asp:ListItem Text="Agosto" Value="8"></asp:ListItem>
<asp:ListItem Text="Septiembre" Value="9"></asp:ListItem>
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
</asp:DropDownList>
</div>
<asp:UpdatePanel ID="UpFiltros" UpdateMode="Conditional" runat="server" >
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultar" Text="Consultar" CssClass="btn btn-default" OnClick="BtnConsultar_Click" runat="server" Visible="false" />
</div>
<div class="titlefiltros caption">
<div class="row" runat="server" visible ="false" id="DvRowFiltrosContanSig1" >
<label class="col-md-1 truncate" style="width: 90px;">Ejercicio:</label>
<div class="col-md-2" style="width: 125px;">
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100px">
</asp:DropDownList>
</div>
<label class="col-md-1 truncate" style="width: 90px;">Periodo:</label>
<div class="col-md-2" style="width: 130px;">
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="100px" CssClass="select2me">
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
<asp:ListItem Text="Abril" Value="4"></asp:ListItem>
<asp:ListItem Text="Mayo" Value="5"></asp:ListItem>
<asp:ListItem Text="Junio" Value="6"></asp:ListItem>
<asp:ListItem Text="Julio" Value="7"></asp:ListItem>
<asp:ListItem Text="Agosto" Value="8"></asp:ListItem>
<asp:ListItem Text="Septiembre" Value="9"></asp:ListItem>
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </ContentTemplate>
</div> </asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
@@ -87,7 +93,9 @@
<%-- FechaMovto Mensaje CveIE CveCompra CveVenta CvePrePoliza FolioPoliza--%> <%-- FechaMovto Mensaje CveIE CveCompra CveVenta CvePrePoliza FolioPoliza--%>
<asp:GridView ID="GvDatosSIG" CssClass="table table-advance table-striped table-hover Widthall" runat="server" AutoGenerateColumns="False" GridLines="None" Visible="false" > <asp:GridView ID="GvDatosSIG" CssClass="table table-advance table-striped table-hover Widthall" runat="server" AutoGenerateColumns="False" GridLines="None" Visible="false"
EmptyDataText="No se encontraron descuadres" ToolTip="Listado de descuadres"
>
<Columns> <Columns>
<asp:TemplateField HeaderText="Fecha"> <asp:TemplateField HeaderText="Fecha">

View File

@@ -1836,7 +1836,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
Next Next
Row.Item("Nombre") = "TOTAL INGRESOS " Row.Item("Nombre") = "TOTAL INGRESOS "
Row.Item("ImporteActual") = DtIngresosSubProyectoH.SUM("ImporteActual", "NOT CtaMayor in (3,4)") 'TotalActual.ToString Row.Item("ImporteActual") = DtIngresosSubProyectoH.SUM("ImporteActual", "NOT CtaMayor in (3,4)") 'TotalActual.ToString
Row.Item("PorcentajeActual") = "100.00" Row.Item("PorcentajeActual") = "100.00"
Row.Item("ImporteAcumulado") = DtIngresosSubProyectoH.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)") 'TotalAnterior.ToString Row.Item("ImporteAcumulado") = DtIngresosSubProyectoH.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)") 'TotalAnterior.ToString
Row.Item("PorcentajeAcumulado") = "100.00" Row.Item("PorcentajeAcumulado") = "100.00"

View File

@@ -931,7 +931,7 @@
<FontFamily>calibri</FontFamily> <FontFamily>calibri</FontFamily>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>
<FontWeight>Normal</FontWeight> <FontWeight>Normal</FontWeight>
<Format>#,0.00;(#,0.00);'-'</Format> <Format>#,0.00;(#,0.00)</Format>
</Style> </Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
@@ -951,7 +951,6 @@
<PaddingBottom>2pt</PaddingBottom> <PaddingBottom>2pt</PaddingBottom>
</Style> </Style>
</Textbox> </Textbox>
<rd:Selected>true</rd:Selected>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
<TablixCell> <TablixCell>
@@ -1811,31 +1810,28 @@
<FontWeight>Normal</FontWeight> <FontWeight>Normal</FontWeight>
</Style> </Style>
</TextRun> </TextRun>
</TextRuns>
<Style />
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun> <TextRun>
<Value xml:space="preserve"> </Value> <Value>Régimen:Régimen General de Ley Personas Morales</Value>
<Style> <Style>
<FontFamily>Calibri</FontFamily> <FontFamily>Calibri</FontFamily>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>
<FontWeight>Normal</FontWeight> <FontWeight>Normal</FontWeight>
</Style> </Style>
</TextRun> </TextRun>
<TextRun>
<Value>=Parameters!Fecha.Value</Value>
<Style>
<FontFamily>Calibri</FontFamily>
<FontSize>9pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
</TextRuns> </TextRuns>
<Style /> <Style />
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox4</rd:DefaultName> <rd:DefaultName>Textbox4</rd:DefaultName>
<Top>2.86594cm</Top> <Top>2.86594cm</Top>
<Left>10.06268cm</Left> <Left>10.09281cm</Left>
<Height>0.7927cm</Height> <Height>1.12078cm</Height>
<Width>9.71199cm</Width> <Width>10.9783cm</Width>
<ZIndex>11</ZIndex> <ZIndex>11</ZIndex>
<Style> <Style>
<Border> <Border>
@@ -2046,7 +2042,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox32</rd:DefaultName> <rd:DefaultName>Textbox32</rd:DefaultName>
<Top>3.98996cm</Top> <Top>4.05346cm</Top>
<Left>14.07729cm</Left> <Left>14.07729cm</Left>
<Height>0.57354cm</Height> <Height>0.57354cm</Height>
<Width>2.90753cm</Width> <Width>2.90753cm</Width>
@@ -2300,7 +2296,7 @@
<Source>Embedded</Source> <Source>Embedded</Source>
<Value>ID3</Value> <Value>ID3</Value>
<Sizing>FitProportional</Sizing> <Sizing>FitProportional</Sizing>
<Top>26.4128cm</Top> <Top>26.3493cm</Top>
<Left>0.28014cm</Left> <Left>0.28014cm</Left>
<Height>0.93046cm</Height> <Height>0.93046cm</Height>
<Width>5.37042cm</Width> <Width>5.37042cm</Width>
@@ -2332,7 +2328,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox60</rd:DefaultName> <rd:DefaultName>Textbox60</rd:DefaultName>
<Top>24.07802cm</Top> <Top>24.01452cm</Top>
<Left>0.28014cm</Left> <Left>0.28014cm</Left>
<Height>0.6882cm</Height> <Height>0.6882cm</Height>
<Width>20.71217cm</Width> <Width>20.71217cm</Width>
@@ -2385,7 +2381,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox32</rd:DefaultName> <rd:DefaultName>Textbox32</rd:DefaultName>
<Top>3.92322cm</Top> <Top>3.98672cm</Top>
<Left>17.11694cm</Left> <Left>17.11694cm</Left>
<Height>0.64028cm</Height> <Height>0.64028cm</Height>
<Width>3.90165cm</Width> <Width>3.90165cm</Width>
@@ -3081,7 +3077,7 @@
<Value>=System.Convert.FromBase64String(Parameters!QRDescarga.Value)</Value> <Value>=System.Convert.FromBase64String(Parameters!QRDescarga.Value)</Value>
<MIMEType>image/png</MIMEType> <MIMEType>image/png</MIMEType>
<Sizing>FitProportional</Sizing> <Sizing>FitProportional</Sizing>
<Top>10.0185in</Top> <Top>9.9935in</Top>
<Left>6.67743in</Left> <Left>6.67743in</Left>
<Height>0.6035in</Height> <Height>0.6035in</Height>
<Width>0.78275in</Width> <Width>0.78275in</Width>
@@ -3134,7 +3130,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox60</rd:DefaultName> <rd:DefaultName>Textbox60</rd:DefaultName>
<Top>24.5228cm</Top> <Top>24.4593cm</Top>
<Left>0.28014cm</Left> <Left>0.28014cm</Left>
<Height>1.49135cm</Height> <Height>1.49135cm</Height>
<Width>5.37042cm</Width> <Width>5.37042cm</Width>
@@ -3289,7 +3285,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox60</rd:DefaultName> <rd:DefaultName>Textbox60</rd:DefaultName>
<Top>24.5228cm</Top> <Top>24.4593cm</Top>
<Left>7.45145cm</Left> <Left>7.45145cm</Left>
<Height>2.45709cm</Height> <Height>2.45709cm</Height>
<Width>6.56105cm</Width> <Width>6.56105cm</Width>
@@ -3328,7 +3324,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox60</rd:DefaultName> <rd:DefaultName>Textbox60</rd:DefaultName>
<Top>24.51302cm</Top> <Top>24.44952cm</Top>
<Left>14.67145cm</Left> <Left>14.67145cm</Left>
<Height>1.46939cm</Height> <Height>1.46939cm</Height>
<Width>6.32076cm</Width> <Width>6.32076cm</Width>
@@ -3834,47 +3830,11 @@
</Border> </Border>
</Style> </Style>
</Tablix> </Tablix>
<Textbox Name="Textbox26">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>VERSION 3.3</Value>
<Style>
<FontFamily>MYRiad Pro</FontFamily>
<FontSize>9.16pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox5</rd:DefaultName>
<Top>2.32303cm</Top>
<Left>17.39754cm</Left>
<Height>0.6cm</Height>
<Width>3.32021cm</Width>
<ZIndex>4</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems> </ReportItems>
<KeepTogether>true</KeepTogether> <KeepTogether>true</KeepTogether>
<Top>20.92547cm</Top> <Top>20.92547cm</Top>
<Left>0.13424cm</Left> <Left>0.13424cm</Left>
<Height>2.97096cm</Height> <Height>2.25247cm</Height>
<Width>20.89818cm</Width> <Width>20.89818cm</Width>
<ZIndex>42</ZIndex> <ZIndex>42</ZIndex>
<Visibility> <Visibility>
@@ -3945,8 +3905,44 @@
</Border> </Border>
</Style> </Style>
</Image> </Image>
<Textbox Name="Textbox26">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>VERSION 3.3</Value>
<Style>
<FontFamily>MYRiad Pro</FontFamily>
<FontSize>9.16pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox5</rd:DefaultName>
<Top>23.28377cm</Top>
<Left>17.70088cm</Left>
<Height>0.6cm</Height>
<Width>3.32021cm</Width>
<ZIndex>45</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems> </ReportItems>
<Height>27.70336cm</Height> <Height>27.49699cm</Height>
<Style /> <Style />
</Body> </Body>
<Width>21.16666cm</Width> <Width>21.16666cm</Width>

View File

@@ -477,7 +477,7 @@
</Textbox> </Textbox>
</ReportItems> </ReportItems>
<KeepTogether>true</KeepTogether> <KeepTogether>true</KeepTogether>
<Top>4.65368in</Top> <Top>3.52868in</Top>
<Left>0.06752in</Left> <Left>0.06752in</Left>
<Height>1.41544in</Height> <Height>1.41544in</Height>
<Width>8.23953in</Width> <Width>8.23953in</Width>
@@ -1242,7 +1242,6 @@
<PaddingBottom>2pt</PaddingBottom> <PaddingBottom>2pt</PaddingBottom>
</Style> </Style>
</Textbox> </Textbox>
<rd:Selected>true</rd:Selected>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
</TablixCells> </TablixCells>
@@ -1284,37 +1283,6 @@
</Border> </Border>
</Style> </Style>
</Tablix> </Tablix>
<Textbox Name="Textbox7">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox5</rd:DefaultName>
<Top>6.29109cm</Top>
<Left>0.28014cm</Left>
<Height>0.05496cm</Height>
<Width>20.88652cm</Width>
<ZIndex>2</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>Black</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox4"> <Textbox Name="Textbox4">
<CanGrow>true</CanGrow> <CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether> <KeepTogether>true</KeepTogether>
@@ -1388,7 +1356,7 @@
<Left>4.18454cm</Left> <Left>4.18454cm</Left>
<Height>2.70968cm</Height> <Height>2.70968cm</Height>
<Width>9.58983cm</Width> <Width>9.58983cm</Width>
<ZIndex>3</ZIndex> <ZIndex>2</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -1468,7 +1436,7 @@
<Left>13.77437cm</Left> <Left>13.77437cm</Left>
<Height>2.70968cm</Height> <Height>2.70968cm</Height>
<Width>4.34463cm</Width> <Width>4.34463cm</Width>
<ZIndex>4</ZIndex> <ZIndex>3</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -1502,7 +1470,7 @@
<Left>18.23008cm</Left> <Left>18.23008cm</Left>
<Height>0.96018cm</Height> <Height>0.96018cm</Height>
<Width>2.79101cm</Width> <Width>2.79101cm</Width>
<ZIndex>5</ZIndex> <ZIndex>4</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>Solid</Style> <Style>Solid</Style>
@@ -1538,7 +1506,7 @@
<Left>18.23008cm</Left> <Left>18.23008cm</Left>
<Height>0.6cm</Height> <Height>0.6cm</Height>
<Width>2.79101cm</Width> <Width>2.79101cm</Width>
<ZIndex>6</ZIndex> <ZIndex>5</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>Solid</Style> <Style>Solid</Style>
@@ -1589,7 +1557,7 @@
<Left>18.23008cm</Left> <Left>18.23008cm</Left>
<Height>0.86903cm</Height> <Height>0.86903cm</Height>
<Width>2.79101cm</Width> <Width>2.79101cm</Width>
<ZIndex>7</ZIndex> <ZIndex>6</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>Solid</Style> <Style>Solid</Style>
@@ -1680,7 +1648,7 @@
<Left>0.28014cm</Left> <Left>0.28014cm</Left>
<Height>1.09007cm</Height> <Height>1.09007cm</Height>
<Width>9.71199cm</Width> <Width>9.71199cm</Width>
<ZIndex>8</ZIndex> <ZIndex>7</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -1760,7 +1728,7 @@
<Left>10.06268cm</Left> <Left>10.06268cm</Left>
<Height>0.7927cm</Height> <Height>0.7927cm</Height>
<Width>9.71199cm</Width> <Width>9.71199cm</Width>
<ZIndex>9</ZIndex> <ZIndex>8</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -1941,7 +1909,7 @@
<Left>0.25136cm</Left> <Left>0.25136cm</Left>
<Height>0.74611cm</Height> <Height>0.74611cm</Height>
<Width>13.82025cm</Width> <Width>13.82025cm</Width>
<ZIndex>10</ZIndex> <ZIndex>9</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -1974,7 +1942,7 @@
<Left>14.07729cm</Left> <Left>14.07729cm</Left>
<Height>0.57354cm</Height> <Height>0.57354cm</Height>
<Width>2.90753cm</Width> <Width>2.90753cm</Width>
<ZIndex>11</ZIndex> <ZIndex>10</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -2000,11 +1968,11 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox5</rd:DefaultName> <rd:DefaultName>Textbox5</rd:DefaultName>
<Top>8.98809cm</Top> <Top>6.13059cm</Top>
<Left>0.24983cm</Left> <Left>0.24983cm</Left>
<Height>0.05496cm</Height> <Height>0.05496cm</Height>
<Width>20.88652cm</Width> <Width>20.88652cm</Width>
<ZIndex>12</ZIndex> <ZIndex>11</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -2058,7 +2026,7 @@
<Left>17.09066cm</Left> <Left>17.09066cm</Left>
<Height>0.64028cm</Height> <Height>0.64028cm</Height>
<Width>3.90165cm</Width> <Width>3.90165cm</Width>
<ZIndex>13</ZIndex> <ZIndex>12</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -2240,11 +2208,11 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox4</rd:DefaultName> <rd:DefaultName>Textbox4</rd:DefaultName>
<Top>9.1136cm</Top> <Top>6.2561cm</Top>
<Left>0.16383cm</Left> <Left>0.16383cm</Left>
<Height>2.44366cm</Height> <Height>2.44366cm</Height>
<Width>15.07903cm</Width> <Width>15.07903cm</Width>
<ZIndex>14</ZIndex> <ZIndex>13</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -2270,11 +2238,11 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox5</rd:DefaultName> <rd:DefaultName>Textbox5</rd:DefaultName>
<Top>11.6631cm</Top> <Top>8.8056cm</Top>
<Left>0.10579cm</Left> <Left>0.10579cm</Left>
<Height>0.05496cm</Height> <Height>0.05496cm</Height>
<Width>20.88652cm</Width> <Width>20.88652cm</Width>
<ZIndex>15</ZIndex> <ZIndex>14</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -2389,116 +2357,17 @@
</TablixMembers> </TablixMembers>
</TablixRowHierarchy> </TablixRowHierarchy>
<DataSetName>DataSet1</DataSetName> <DataSetName>DataSet1</DataSetName>
<Top>9.1136cm</Top> <Top>6.2561cm</Top>
<Left>15.31342cm</Left> <Left>15.31342cm</Left>
<Height>0.48004cm</Height> <Height>0.48004cm</Height>
<Width>5.71104cm</Width> <Width>5.71104cm</Width>
<ZIndex>16</ZIndex> <ZIndex>15</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
</Border> </Border>
</Style> </Style>
</Tablix> </Tablix>
<Textbox Name="Textbox3">
<CanGrow>true</CanGrow>
<CanShrink>true</CanShrink>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Sucursal Matriz</Value>
<Style>
<FontFamily>Calibri</FontFamily>
<FontSize>9pt</FontSize>
<TextDecoration>None</TextDecoration>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Beneficiario: SERVICIOS ELECTRICOS Y CONTROL DE HERMOSILLO S.A DE C.V</Value>
<Style>
<FontFamily>Calibri</FontFamily>
<FontSize>8pt</FontSize>
<TextDecoration>None</TextDecoration>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Banco: BANORTE</Value>
<Style>
<FontFamily>Calibri</FontFamily>
<FontSize>8pt</FontSize>
<TextDecoration>None</TextDecoration>
</Style>
</TextRun>
</TextRuns>
<LeftIndent>0cm</LeftIndent>
<RightIndent>0cm</RightIndent>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>CLABE: 072 760 004 614 648 782 </Value>
<Style>
<FontFamily>Calibri</FontFamily>
<FontSize>8pt</FontSize>
<TextDecoration>None</TextDecoration>
</Style>
</TextRun>
</TextRuns>
<LeftIndent>0cm</LeftIndent>
<RightIndent>0cm</RightIndent>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Cuenta: 0461464878</Value>
<Style>
<FontFamily>Calibri</FontFamily>
<FontSize>8pt</FontSize>
<TextDecoration>None</TextDecoration>
</Style>
</TextRun>
</TextRuns>
<LeftIndent>0cm</LeftIndent>
<RightIndent>0cm</RightIndent>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName>
<Top>7.01327cm</Top>
<Left>0.25136cm</Left>
<Height>1.8337cm</Height>
<Width>9.18009cm</Width>
<ZIndex>17</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Image Name="Image1"> <Image Name="Image1">
<Source>Embedded</Source> <Source>Embedded</Source>
<Value>RFIRMAELECTRONICAEDITABLE</Value> <Value>RFIRMAELECTRONICAEDITABLE</Value>
@@ -2507,45 +2376,13 @@
<Left>0.28014cm</Left> <Left>0.28014cm</Left>
<Height>1.73059cm</Height> <Height>1.73059cm</Height>
<Width>3.63914cm</Width> <Width>3.63914cm</Width>
<ZIndex>18</ZIndex> <ZIndex>16</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
</Border> </Border>
</Style> </Style>
</Image> </Image>
<Textbox Name="Textbox13">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Cuenta Bancaria</Value>
<Style />
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox13</rd:DefaultName>
<Top>6.49293cm</Top>
<Left>0.28014cm</Left>
<Height>0.52035cm</Height>
<Width>9.15131cm</Width>
<ZIndex>19</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Rectangle Name="Rectangle1"> <Rectangle Name="Rectangle1">
<ReportItems> <ReportItems>
<Textbox Name="Textbox42"> <Textbox Name="Textbox42">
@@ -3017,11 +2854,11 @@
</Textbox> </Textbox>
</ReportItems> </ReportItems>
<KeepTogether>true</KeepTogether> <KeepTogether>true</KeepTogether>
<Top>15.5602cm</Top> <Top>12.7027cm</Top>
<Left>0.16937cm</Left> <Left>0.16937cm</Left>
<Height>2.67787cm</Height> <Height>2.67787cm</Height>
<Width>20.85172cm</Width> <Width>20.85172cm</Width>
<ZIndex>20</ZIndex> <ZIndex>17</ZIndex>
<Visibility> <Visibility>
<Hidden>=Microsoft.VisualBasic.Interaction.IIF(First(Fields!SerieFolio.Value, "DataSet4") &lt;&gt; "", False, True)</Hidden> <Hidden>=Microsoft.VisualBasic.Interaction.IIF(First(Fields!SerieFolio.Value, "DataSet4") &lt;&gt; "", False, True)</Hidden>
</Visibility> </Visibility>
@@ -3032,7 +2869,7 @@
</Style> </Style>
</Rectangle> </Rectangle>
</ReportItems> </ReportItems>
<Height>18.23807cm</Height> <Height>15.38057cm</Height>
<Style /> <Style />
</Body> </Body>
<Width>21.16666cm</Width> <Width>21.16666cm</Width>

File diff suppressed because it is too large Load Diff

View File

@@ -3204,7 +3204,7 @@ Produce of MX.</Value>
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>63</Value> <Value>=Parameters!NumberSmall.Value</Value>
<Style> <Style>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
<Color>White</Color> <Color>White</Color>
@@ -3240,7 +3240,7 @@ Produce of MX.</Value>
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>47</Value> <Value>=Parameters!NumberBig.Value</Value>
<Style> <Style>
<FontSize>14pt</FontSize> <FontSize>14pt</FontSize>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
@@ -3382,7 +3382,7 @@ Produce of MX.</Value>
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>63</Value> <Value>=Parameters!NumberSmall.Value</Value>
<Style> <Style>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
<Color>White</Color> <Color>White</Color>
@@ -3418,7 +3418,7 @@ Produce of MX.</Value>
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>47</Value> <Value>=Parameters!NumberBig.Value</Value>
<Style> <Style>
<FontSize>14pt</FontSize> <FontSize>14pt</FontSize>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
@@ -3444,6 +3444,7 @@ Produce of MX.</Value>
<PaddingBottom>2pt</PaddingBottom> <PaddingBottom>2pt</PaddingBottom>
</Style> </Style>
</Textbox> </Textbox>
<rd:Selected>true</rd:Selected>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
</TablixCells> </TablixCells>
@@ -3921,7 +3922,7 @@ Produce of MX.</Value>
<Top>0.0801cm</Top> <Top>0.0801cm</Top>
<Left>0.05458cm</Left> <Left>0.05458cm</Left>
<Height>8.07288cm</Height> <Height>8.07288cm</Height>
<Width>10.64012cm</Width> <Width>10.6401cm</Width>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -4005,6 +4006,18 @@ Produce of MX.</Value>
<AllowBlank>true</AllowBlank> <AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt> <Prompt>ReportParameter1</Prompt>
</ReportParameter> </ReportParameter>
<ReportParameter Name="NumberSmall">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="NumberBig">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters> </ReportParameters>
<EmbeddedImages> <EmbeddedImages>
<EmbeddedImage Name="logojam"> <EmbeddedImage Name="logojam">

View File

@@ -217,19 +217,25 @@
</div> </div>
<div class="row rowpadding"> <div class="row rowpadding">
<label class="col-md-3">Chofer:</label> <label class="col-md-3">Chofer:</label>
<div class="col-md-9"> <div class="col-md-8">
<asp:DropDownList ID="DdlChofer" runat="server" DataTextField="ChoferLicencia" DataValueField="CveChofer" OnSelectedIndexChanged="DldChofer_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList> <asp:DropDownList ID="DdlChofer" runat="server" DataTextField="ChoferLicencia" DataValueField="CveChofer" OnSelectedIndexChanged="DldChofer_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlChofer" runat="server" Enabled="false" ControlToValidate="DdlChofer" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RfvDdlChofer" runat="server" Enabled="false" ControlToValidate="DdlChofer" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VceDdlChofer" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlChofer" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VceDdlChofer" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlChofer" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
<div class="col-md-1">
<asp:LinkButton ID="LnkAgregarChofer" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Agregar Chofer" />
</div>
</div> </div>
<div class="row rowpadding"> <div class="row rowpadding">
<label class="col-md-3">Unidad:</label> <label class="col-md-3">Unidad:</label>
<div class="col-md-9"> <div class="col-md-8">
<asp:DropDownList runat="server" ID="DdlUnidadCamion" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" OnSelectedIndexChanged="DdlUnidadCamionActivoFijo_SelectedIndexChanged" ></asp:DropDownList> <asp:DropDownList runat="server" ID="DdlUnidadCamion" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" OnSelectedIndexChanged="DdlUnidadCamionActivoFijo_SelectedIndexChanged" ></asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlUnidadCamion" runat="server" Enabled="false" ControlToValidate="DdlUnidadCamion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RfvDdlUnidadCamion" runat="server" Enabled="false" ControlToValidate="DdlUnidadCamion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VceDdlUnidadCamion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlUnidadCamion" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VceDdlUnidadCamion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlUnidadCamion" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
<div class="col-md-1">
<asp:LinkButton ID="LnkAgregarUnidad" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Agregar Unidad" />
</div>
</div> </div>

View File

@@ -5071,7 +5071,7 @@ Partial Class Inventarios_EntradasSalidas
If EsConsumoInterno And UsuarioActual.Empresa.Funcionalidad(590) = "1" Then If EsConsumoInterno And UsuarioActual.Empresa.Funcionalidad(590) = "1" Then
If DdlSubProyecto.SelectedValue.ToEntero <= 0 Then If DdlSubProyecto.SelectedValue.ToEntero <= 0 Then
Alert("Debe seleccionar un Centro de Constos.", TipoMensaje.MsgAdvertencia) Alert("Debe seleccionar un Centro de Costos.", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
Else Else
CargaCultivos() CargaCultivos()

View File

@@ -132,13 +132,13 @@
<%--<script type="text/javascript" src="/Scripts/Notificaciones.js"></script>--%> <%--<script type="text/javascript" src="/Scripts/Notificaciones.js"></script>--%>
<script> <script>
function opennewlocation(returnurl, token) { function opennewlocation(returnurl, token) {
debugger; // debugger;
if (token.length > 0) { if (token.length > 0) {
$('#framexd').attr('src', token) $('#framexd').attr('src', token)
} else { } else {
} }
setTimeout(function () { document.location = returnurl; }, 2000); setTimeout(function () { document.location = returnurl; }, 1000);
} }
// aqui debe de llammarse siganalr, para desconectar // aqui debe de llammarse siganalr, para desconectar
function exitsignalr() { function exitsignalr() {

View File

@@ -278,7 +278,7 @@ Partial Class LogIn
strdomain = strdomain.Replace(String.Format(":{0}", Request.Url.Port), "") strdomain = strdomain.Replace(String.Format(":{0}", Request.Url.Port), "")
End If End If
Dim token As String = GetTokenAngular() Dim token As String = GetTokenAngular()
routeangular = String.Format("{0}{1}/auth/login?token={3}{4}&returnUrl=/{2}", strdomain, puerto, HttpUtility.UrlEncode(ReturnUrl), HttpUtility.UrlEncode(token), If(puerto.Length > 0, "cerrar=1&", "")) routeangular = String.Format("{0}{1}/auth/login?token={3}{4}&returnUrl=/{2}", strdomain, puerto, HttpUtility.UrlEncode(ReturnUrl), HttpUtility.UrlEncode(token), If(puerto.Length > 0, "", "")) '&cerrar=1
'S ies angular retiro el https para que no marque error la pagina 'S ies angular retiro el https para que no marque error la pagina
routeangular = routeangular.Replace("https", "http") routeangular = routeangular.Replace("https", "http")
routeangular = routeangular.Replace("HTTPS", "HTTP") routeangular = routeangular.Replace("HTTPS", "HTTP")

View File

@@ -4,9 +4,9 @@
</asp:Content> </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server"> <asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style> <style>
/*#pnlIncapacidade .form-group.form-md-line-input > .select2-container { #pnlIncapacidade .form-group.form-md-line-input > .select2-container {
margin-top: 0px; margin-top: 20px;
}*/ }
.lnkMovotPermanente{ .lnkMovotPermanente{
width:100%; width:100%;
color:#111; color:#111;

View File

@@ -1,180 +0,0 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PVRepCompras.aspx.vb" Inherits="PV_PVRepCompras" %>
<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="HB" runat="Server">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<li>
<asp:LinkButton ID="ImgImprimir" runat="server" Enabled="false"> <i class="fa fa-print"></i> Imprimir</asp:LinkButton>
<%--<asp:ImageButton ID="ImgImprimir" runat="server" ImageUrl="/Imagenes/btnImprimir.gif" Width="17px" Height="17px" Enabled="false" />--%>
</li>
<li>
<asp:LinkButton ID="ImgExcel" runat="server" > <i class="fa fa-ad-excel"></i> Generar</asp:LinkButton>
<%--<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />--%>
</li>
<li>
<asp:HyperLink NavigateUrl ="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server" > <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>
<%--<asp:Image ID="ImgPersonalizar" runat="server" ImageUrl="/Imagenes/Table-icon.png" Width="17px" Height="17px" Style="cursor: pointer;" />--%>
</li>
</ContentTemplate>
</asp:UpdatePanel>
<%--<asp:ImageButton ID="ImgImprimir" runat="server" ImageUrl="/Imagenes/btnImprimir.gif" Width="17px" Height="17px" Enabled="false" />
<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
<asp:Image ID="ImgPersonalizar" runat="server" ImageUrl="/Imagenes/Table-icon.png" Width="17px" Height="17px" Style="cursor: pointer;" />--%>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Reporte de Compras
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" style="">
<div class="portlet-title portlet-filterT" style="">
<div class="titlefiltros caption ">
<ul class="list-inline">
<li>Proveedor:
<asp:DropDownList ID="DdlProveedores" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 250px !important;">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</li>
<li>Responsable:
<asp:DropDownList ID="DdlUsuario" runat="server" AppendDataBoundItems="true" DataTextField="Usuario" DataValueField="CveUsuario" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</li>
<li>Moneda:
<asp:DropDownList ID="DdlMonedas" runat="server" AppendDataBoundItems="true" DataTextField="Moneda" DataValueField="CveMoneda" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</li>
</ul>
</div>
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
<a href="javascript:;" class="expand"></a>
<a onclick="document.getElementById('C_BtnConsultar').click();" class="reload"></a>
</div>
</div>
<div class="portlet-body" style="display: none;">
<ul class="list-inline">
<li>F.I.:
<asp:TextBox ID="txtFechaI" runat="server" Width="70px"></asp:TextBox>
&nbsp;<asp:ImageButton runat="server" ID="imgCalendario" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</li>
<li style="width: 233px;">F.F.:
<asp:TextBox ID="txtFechaF" runat="server" Width="70px"></asp:TextBox>
&nbsp;<asp:ImageButton runat="server" ID="imgCalendarioF" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
</li>
<li>Grupo:
<asp:DropDownList ID="DdlGrupo" runat="server" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 140px !important;">
<asp:ListItem Text="Año" Value="1"></asp:ListItem>
<asp:ListItem Text="Mes" Value="2"></asp:ListItem>
<asp:ListItem Selected="True" Text="Año/Mes" Value="3"></asp:ListItem>
<asp:ListItem Text="Fecha" Value="4"></asp:ListItem>
<asp:ListItem Text="Proveedor" Value="5"></asp:ListItem>
<asp:ListItem Text="Tipo Documento" Value="6"></asp:ListItem>
<asp:ListItem Text="Clasificación Prov" Value="7"></asp:ListItem>
<asp:ListItem Text="Responsable" Value="8"></asp:ListItem>
</asp:DropDownList>
</li>
</ul>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<br />
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table border="0" cellpadding="0" cellspacing="0" id="tblSucursales" runat="server" visible="false">
<tr>
<td style="width: 150px">&nbsp;</td>
</tr>
</table>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Compras con los filtros especificados" ToolTip="Listado de Compras" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
<Columns>
<asp:TemplateField>
<HeaderTemplate>
Grupo
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlGrupo" runat="server" Text='<%# Eval("GPO") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel runat="server" ID="UPPersonalizar" UpdateMode="Conditional">
<ContentTemplate>
<div id="DivPersonalizar" style="width: 315px; background-color: White; border: solid 1px black; color: Black; display: none; position: absolute;">
<table class="table table-striped table-advance table-hover" width="315px">
<tr class="Titulos">
<th style="width: 310px">
<asp:Label ID="LblTitulo1" runat="server" ClientIDMode="Static" Text="Personalizar Columnas"></asp:Label>
</th>
<th style="padding-right: 4px; padding-top: 4px" valign="top">
<img alt="" src="/Imagenes/close.gif" style="cursor: pointer;" onclick="$('#DivPersonalizar').hide(1000);" /></th>
</tr>
<tr align="left">
<td colspan="2">
<table class="table table-striped table-advance table-hover">
<thead>
<tr>
<th style="text-align: left;">
<asp:CheckBox ID="ChkRetIVA" runat="server" Text="Ret. IVA" /></th>
<th style="text-align: left;">
<asp:CheckBox ID="ChkMinSub" runat="server" Text="SubTotal Mínimo" /></th>
</tr>
<tr>
<th style="text-align: left;">
<asp:CheckBox ID="ChkRetISR" runat="server" Text="Ret. ISR" /></th>
<th style="text-align: left;">
<asp:CheckBox ID="ChkMaxTot" runat="server" Text="Total Máximo" /></th>
</tr>
<tr>
<th style="text-align: left;">
<asp:CheckBox ID="ChkMaxSub" runat="server" Text="SubTotal Máximo" /></th>
<th style="text-align: left;">
<asp:CheckBox ID="ChkAvgTot" runat="server" Text="Total Promedio" /></th>
</tr>
<tr>
<th style="text-align: left;">
<asp:CheckBox ID="ChkAVGSub" runat="server" Text="SubTotal Promedio" /></th>
<th style="text-align: left;">
<asp:CheckBox ID="ChkMinTot" runat="server" Text="Total Mínimo" /></th>
</tr>
</thead>
</table>
</td>
</tr>
<tr style="height: 25px">
<td style="text-align: center;" colspan="2">
<asp:Button ID="BtnPersonalizar" runat="server" Text="Personalizar" class="btn btn-primary" /><input type="button" value="Cancelar" onclick="$('#DivPersonalizar').hide(1000);" class="btn btn-danger" /></td>
</tr>
</table>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -1,307 +0,0 @@
Option Explicit On
Option Strict On
Imports Extensiones
Imports System.Data
Partial Class PV_PVRepCompras
Inherits ClsPaginas
#Region "Propiedades"
'Local
Private Property TmpDT As DataTable
Get
Return CType(ViewState("TmpDT"), DataTable)
End Get
Set(value As DataTable)
ViewState("TmpDT") = value
End Set
End Property
#End Region
Protected Sub Page_Init(sender As Object, e As EventArgs) Handles Me.Init
CreaGrid()
End Sub
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
CargaCombos()
'ImgPersonalizar.Attributes.Add("onclick", "javascript:$('#DivPersonalizar').show(1000); PosicionaObjeto(this.id,'DivPersonalizar');")
End If
End Sub
Private Sub CargaCombos()
'CargaProveedores
'Dim ObjProveedores As New ClsCompProveedores
'If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", UsuarioActual.CveEmpresa) Then
' DdlProveedores.DataSource = ObjProveedores.DtResultados
'Else
' DdlProveedores.DataSource = Nothing
'End If
'ObjProveedores.Dispose()
DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlProveedores.DataBind()
'CargaUsuarios
DdlUsuario.DataSource = GlobalDTUsuarioResponsable.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
DdlUsuario.DataBind()
DdlMonedas.DataSource = GlobalDTMonedas()
DdlMonedas.DataBind()
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
CargaDatos()
UPDatos.Update()
End Sub
Private Sub CreaGrid()
Dim TotalAncho As Integer = 150
Dim TotalAnchoSucursal As Integer = 0
Dim SucursalTitulo As String = ""
TmpDT = New DataTable
TmpDT.Columns.Add("GPO", GetType(String))
Dim ObjCompras As New ClsPV()
Dim FechaI, FechaF As String
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
If ObjCompras.GetRepPVCompras(FechaI, FechaF, DdlProveedores.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlMonedas.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero) Then
Dim gv As New GridView
For Each Col As DataColumn In ObjCompras.DtResultados.Columns
If Col.ColumnName.Split(CChar("_")).Length = 3 AndAlso Col.ColumnName.Substring(0, 2).ToUpper = "T_" Then
Dim Sucursal As String = Col.ColumnName.Split(CChar("_"))(1).ToUpper()
Dim Categoria As String = Col.ColumnName.Split(CChar("_"))(2).ToUpper()
Dim bfield As New TemplateField
' Dim iTemplate As System.Web.UI.ITemplate
bfield.HeaderText = Categoria
'bfield.FooterText = Row("CveEstatus").ToString
bfield.ItemStyle.HorizontalAlign = HorizontalAlign.Right
If Sucursal = "TOTAL" Or Categoria = "TOTAL" Then
bfield.ItemStyle.Width = 97
TotalAnchoSucursal = TotalAnchoSucursal + 100
TotalAncho = TotalAncho + 100
Else
bfield.ItemStyle.Width = 87
TotalAnchoSucursal = TotalAnchoSucursal + 90
TotalAncho = TotalAncho + 90
End If
bfield.ItemTemplate = New GridViewTemplate(ListItemType.Item, Col.ColumnName)
gv.Columns.Add(bfield)
TmpDT.Columns.Add(Col.ColumnName, GetType(Integer))
If SucursalTitulo <> Sucursal And Categoria.ToUpper = "TOTAL" Then
SucursalTitulo = Sucursal
Dim Celda As New HtmlTableCell()
Celda.InnerText = SucursalTitulo
Celda.Attributes.Add("class", "Titulos")
Celda.Attributes.Add("style", "border-width: 1px;border-right-style: solid;")
Celda.Width = TotalAnchoSucursal.ToString
tblSucursales.Rows(0).Cells.Add(Celda)
TotalAnchoSucursal = 0
End If
End If
Next
For Each Columna In gv.Columns
GvDatos.Columns.Add(CType(Columna, DataControlField))
Next
GvDatos.Width = TotalAncho
Else
GvDatos.DataSource = Nothing
End If
ObjCompras.Dispose()
UPDatos.Update()
End Sub
Private Sub CargaDatos()
Dim ObjCompras As New ClsPV()
Dim FechaI, FechaF As String
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
'FechaI, FechaF, -1, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero
If ObjCompras.GetRepPVCompras(FechaI, FechaF, DdlProveedores.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlMonedas.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjCompras.DtResultados
tblSucursales.Visible = True
Else
GvDatos.DataSource = Nothing
End If
ObjCompras.Dispose()
GvDatos.DataBind()
End Sub
Public Class GridViewTemplate
Implements ITemplate
'A variable to hold the type of ListItemType.
Private _templateType As ListItemType
'A variable to hold the column name.
Private _columnName As String
'Constructor where we define the template type and column name.
Public Sub New(type As ListItemType, colname As String)
'Stores the template type.
_templateType = type
'Stores the column name.
_columnName = colname
End Sub
Private Sub ITemplate_InstantiateIn(container As System.Web.UI.Control) Implements ITemplate.InstantiateIn
Select Case _templateType
Case ListItemType.Header
'Creates a new label control and add it to the container.
Dim lbl As New Label()
'Allocates the new label object.
lbl.Text = _columnName
'Assigns the name of the column in the lable.
container.Controls.Add(lbl)
'Adds the newly created label control to the container.
Exit Select
Case ListItemType.Item
'Creates a new text box control and add it to the container.
Dim ltl1 As New Literal
ltl1.ID = String.Format("ltl{0}", _columnName)
AddHandler ltl1.DataBinding, AddressOf ltl_DataBinding
'Creates a column with size 4.
container.Controls.Add(ltl1)
'Adds the newly created textbox to the container.
Exit Select
Case ListItemType.EditItem
'As, I am not using any EditItem, I didnot added any code here.
Exit Select
Case ListItemType.Footer
Dim chkColumn As New CheckBox()
chkColumn.ID = Convert.ToString("Chk") & _columnName
container.Controls.Add(chkColumn)
Exit Select
End Select
End Sub
Private Sub hdn_DataBinding(sender As Object, e As EventArgs)
Dim hidden As HiddenField = DirectCast(sender, HiddenField)
Dim row As GridViewRow = DirectCast(hidden.NamingContainer, GridViewRow)
Dim value As String = DataBinder.Eval(row.DataItem, _columnName).ToString()
hidden.Value = If(value Is Nothing OrElse value = String.Empty, "-1", value)
End Sub
Private Sub ltl_DataBinding(sender As Object, e As EventArgs)
Dim ltl As Literal = DirectCast(sender, Literal)
Dim row As GridViewRow = DirectCast(ltl.NamingContainer, GridViewRow)
Dim celda As DataControlFieldCell = DirectCast(ltl.Parent, DataControlFieldCell)
Dim value As String = DataBinder.Eval(row.DataItem, _columnName).ToString()
ltl.Text = value.FormatoNumero
End Sub
''' <summary>
''' This is the event, which will be raised when the binding happens.
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
Private Sub tb1_DataBinding(sender As Object, e As EventArgs)
Dim txtdata As TextBox = DirectCast(sender, TextBox)
Dim container As GridViewRow = DirectCast(txtdata.NamingContainer, GridViewRow)
Dim dataValue As Object = DataBinder.Eval(container.DataItem, _columnName)
If dataValue Is DBNull.Value Then
txtdata.Text = dataValue.ToString()
End If
End Sub
End Class
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim Css As String = "Texto"
If e.Row.RowIndex = 0 Then
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
e.Row.CssClass = "Totales"
Css = "Totales"
End If
'If e.Row.DBCampo("Orden") = "" Then
' e.Row.BackColor = Drawing.Color.LightGray
'End If
Dim FechaI, FechaF As String
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
Dim Liga As String = String.Format("/Compras/RepComprasDetalle.aspx?GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveProveedor={5}&CveUsuario={6}&FechaI={7}&FechaF={8}&CveMoneda={9}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveProveedor"), e.Row.DBCampo("CveUsuario"), FechaI, FechaF, e.Row.DBCampo("CveMoneda"))
e.Row.FCLiteral("LtlGrupo").Text = String.Format("<a class='{0}' href='{1}'>{2}</a>", Css, Liga, e.Row.FCLiteral("LtlGrupo").Text)
End If
End Sub
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
If ChkRetIVA.Checked Then
GvDatos.Columns(6).Visible = True
Else
GvDatos.Columns(6).Visible = False
End If
If ChkRetISR.Checked Then
GvDatos.Columns(7).Visible = True
Else
GvDatos.Columns(7).Visible = False
End If
If ChkMinSub.Checked Then
GvDatos.Columns(9).Visible = True
Else
GvDatos.Columns(9).Visible = False
End If
If ChkAVGSub.Checked Then
GvDatos.Columns(10).Visible = True
Else
GvDatos.Columns(10).Visible = False
End If
If ChkMaxSub.Checked Then
GvDatos.Columns(11).Visible = True
Else
GvDatos.Columns(11).Visible = False
End If
If ChkMinTot.Checked Then
GvDatos.Columns(12).Visible = True
Else
GvDatos.Columns(12).Visible = False
End If
If ChkAvgTot.Checked Then
GvDatos.Columns(13).Visible = True
Else
GvDatos.Columns(13).Visible = False
End If
If ChkMaxTot.Checked Then
GvDatos.Columns(14).Visible = True
Else
GvDatos.Columns(14).Visible = False
End If
UPDatos.Update()
End Sub
Protected Sub ImgExcel_Click(sender As Object, e As System.EventArgs) Handles ImgExcel.Click
GvDatos.ExportToExcel("ReporteCompras" & Now.ToShortDateString)
End Sub
End Class

View File

@@ -1,229 +0,0 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PVRepVentas.aspx.vb" Inherits="PV_PVRepVentas" %>
<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="HB" runat="Server">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<li>
<asp:LinkButton ID="ImgImprimir" runat="server" Enabled="false"> <i class="fa fa-print"></i> Imprimir</asp:LinkButton>
<%--<asp:ImageButton ID="ImgImprimir" runat="server" ImageUrl="/Imagenes/btnImprimir.gif" Width="17px" Height="17px" Enabled="false" />--%>
</li>
<li>
<asp:LinkButton ID="ImgExcel" runat="server" > <i class="fa fa-ad-excel"></i> Generar</asp:LinkButton>
<%--<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />--%>
</li>
<li>
<asp:HyperLink NavigateUrl ="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server" > <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>
<%--<asp:Image ID="ImgPersonalizar" runat="server" ImageUrl="/Imagenes/Table-icon.png" Width="17px" Height="17px" Style="cursor: pointer;" />--%>
</li>
</ContentTemplate>
</asp:UpdatePanel>
<%-- <asp:ImageButton ID="ImgImprimir" runat="server" ImageUrl="/Imagenes/btnImprimir.gif" Width="17px" Height="17px" Enabled="false" />
<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
<asp:Image ID="ImgPersonalizar" runat="server" ImageUrl="/Imagenes/Table-icon.png" Width="17px" Height="17px" Style="cursor: pointer;" />--%>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Reporte de Ventas
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" style="">
<div class="portlet-title portlet-filterT" style="">
<div class="titlefiltros caption ">
<ul class="list-inline">
<li>Cliente:
<asp:DropDownList ID="DdlClientes" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 200px !important;">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</li>
<li>Sucursal:
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 150px !important;">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList>
</li>
<li>Vendedor:
<asp:DropDownList ID="DdlVendedor" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="Vendedor" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 150px !important;">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</li>
<li>Usuario:
<asp:DropDownList ID="DdlUsuario" runat="server" AppendDataBoundItems="true" DataTextField="Usuario" DataValueField="CveUsuario" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 110px !important;">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</li>
</ul>
</div>
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
<a href="javascript:;" class="expand"></a>
<a onclick="document.getElementById('C_BtnConsultar').click();" class="reload"></a>
</div>
</div>
<div class="portlet-body" style="display: none;">
<ul class="list-inline">
<li style="width: 384px;">Estatus:
<asp:DropDownList ID="DdlEstatus" runat="server" AppendDataBoundItems="true" DataTextField="EstatusFactura" DataValueField="CveEstatusFactura" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 120px !important;">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</li>
<li>F.I.:
<asp:TextBox ID="txtFechaI" runat="server" Width="70px"></asp:TextBox>
&nbsp;<asp:ImageButton runat="server" ID="imgCalendario" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</li>
<li style="width: 191px;">&nbsp;&nbsp;&nbsp;&nbsp;F.F.:
<asp:TextBox ID="txtFechaF" runat="server" Width="70px"></asp:TextBox>
&nbsp;<asp:ImageButton runat="server" ID="imgCalendarioF" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
</li>
<li>Grupo:
<asp:DropDownList ID="DdlGrupo" runat="server" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 120px !important;">
<asp:ListItem Text="Año" Value="1"></asp:ListItem>
<asp:ListItem Text="Mes" Value="2"></asp:ListItem>
<asp:ListItem Selected="True" Text="Año/Mes" Value="3"></asp:ListItem>
<asp:ListItem Text="Fecha" Value="4"></asp:ListItem>
<asp:ListItem Text="Cliente" Value="5"></asp:ListItem>
<asp:ListItem Text="Sucursal" Value="6"></asp:ListItem>
<asp:ListItem Text="Corte" Value="16"></asp:ListItem>
<asp:ListItem Text="Vendedor" Value="7"></asp:ListItem>
<asp:ListItem Text="Usuario" Value="8"></asp:ListItem>
<asp:ListItem Text="Estatus Fact." Value="9"></asp:ListItem>
<asp:ListItem Text="% IVA" Value="10"></asp:ListItem>
<asp:ListItem Text="Año Ejec" Value="11"></asp:ListItem>
<asp:ListItem Text="Mes Ejec" Value="12"></asp:ListItem>
<asp:ListItem Text="Año/Mes Ejec" Value="13"></asp:ListItem>
<asp:ListItem Text="Fecha Ejec" Value="14"></asp:ListItem>
<asp:ListItem Text="Sucursal Ejec" Value="15"></asp:ListItem>
</asp:DropDownList>
</li>
</ul>
<ul class="list-inline">
<li>Sucursal Ejecución:
<asp:DropDownList ID="DdlSubProyectoEjecucion" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 250px !important;">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList>
</li>
<li>F.I. E.:
<asp:TextBox ID="TxtFechaIEjec" runat="server" Width="70px"></asp:TextBox>
&nbsp;<asp:ImageButton ID="ImgCalFechaIEjec" runat="server" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
<ajax:MaskedEditExtender ID="MEEFechaIEjec" runat="server" TargetControlID="TxtFechaIEjec" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender ID="CalFechaIEjec" runat="server" TargetControlID="TxtFechaIEjec" PopupButtonID="ImgCalFechaIEjec" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFechaIEjec" runat="server" ControlToValidate="TxtFechaIEjec" Display="None" ErrorMessage="El campo <b>''Fecha Inicial Ejecución''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVFechaIEjec" runat="server" ControlToValidate="TxtFechaIEjec" Display="None" ErrorMessage="El campo <b>''Fecha Inicial Ejecución''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOFechaIEjec1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaIEjec" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VCOFechaIEjec2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaIEjec" Width="350px"></ajax:ValidatorCalloutExtender>
</li>
<li>F.F. E.:
<asp:TextBox ID="TxtFechaFEjec" runat="server" Width="70px"></asp:TextBox>
&nbsp;<asp:ImageButton ID="ImgCalFechaFEjec" runat="server" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
<ajax:MaskedEditExtender ID="MEEFechaFEjec" runat="server" TargetControlID="TxtFechaFEjec" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender ID="CalFechaFEjec" runat="server" TargetControlID="TxtFechaFEjec" PopupButtonID="ImgCalFechaFEjec" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFechaFEjec" runat="server" ControlToValidate="TxtFechaFEjec" Display="None" ErrorMessage="El campo <b>''Fecha Final Ejecución''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVFechaFEjec" runat="server" ControlToValidate="TxtFechaFEjec" Display="None" ErrorMessage="El campo <b>''Fecha Final Ejecución''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOFechaFEjec1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaFEjec" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VCOFechaFEjec2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaFEjec" Width="350px"></ajax:ValidatorCalloutExtender>
</li>
</ul>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<br />
<div class="row">
<div class="col-md-12">
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table border="0" cellpadding="0" cellspacing="0" id="tblSucursales" runat="server" visible="false">
<tr>
<td style="width: 150px">&nbsp;</td>
</tr>
</table>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Ventas" CssClass="table table-striped table-advance table-hover" Style=" text-align: center;" GridLines="None">
<Columns>
<asp:TemplateField>
<HeaderTemplate>
Grupo
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlGrupo" runat="server" Text='<%# Eval("GPO") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel runat="server" ID="UPPersonalizar" UpdateMode="Conditional">
<ContentTemplate>
<div id="DivPersonalizar" style="width: 330px; background-color: White; border: solid 1px black; color: Black; display: none; position: absolute;">
<table class="table table-striped table-advance table-hover" width="330px">
<tr class="Titulos">
<th style="width: 325px">
<asp:Label ID="LblTitulo1" runat="server" ClientIDMode="Static" Text="Personalizar Columnas"></asp:Label>
</th>
<th style="padding-right: 4px; padding-top: 4px" valign="top">
<img alt="" src="/Imagenes/close.gif" style="cursor: pointer;" onclick="$('#DivPersonalizar').hide(1000);" /></th>
</tr>
<tr align="left">
<td colspan="2">
<table class="table table-striped table-advance table-hover">
<thead>
<tr>
<th style="text-align: left;">
<asp:CheckBox ID="ChkRetIVA" runat="server" Text="Ret. IVA" /></th>
<th style="text-align: left;">
<asp:CheckBox ID="ChkMinSub" runat="server" Text="SubTotal Mínimo" /></th>
</tr>
<tr>
<th style="text-align: left;">
<asp:CheckBox ID="ChkRetISR" runat="server" Text="Ret. ISR" /></th>
<th style="text-align: left;">
<asp:CheckBox ID="ChkMaxTot" runat="server" Text="Total Máximo" /></th>
</tr>
<tr>
<th style="text-align: left;">
<asp:CheckBox ID="ChkMaxSub" runat="server" Text="SubTotal Máximo" /></th>
<th style="text-align: left;">
<asp:CheckBox ID="ChkAvgTot" runat="server" Text="Total Promedio" /></th>
</tr>
<tr>
<th style="text-align: left;">
<asp:CheckBox ID="ChkAVGSub" runat="server" Text="SubTotal Promedio" /></th>
<th style="text-align: left;">
<asp:CheckBox ID="ChkMinTot" runat="server" Text="Total Mínimo" /></th>
</tr>
</thead>
</table>
</td>
</tr>
<tr style="height: 25px">
<td style="text-align: center;" colspan="2">
<asp:Button ID="BtnPersonalizar" runat="server" Text="Personalizar" class="btn btn-primary" /><input type="button" value="Cancelar" onclick="$('#DivPersonalizar').hide(1000);" class="btn btn-danger" /></td>
</tr>
</table>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -1,365 +0,0 @@
Option Explicit On
Option Strict On
Imports System.Data
Imports Extensiones
Partial Class PV_PVRepVentas
Inherits ClsPaginas
#Region "Propiedades"
'Local
Private Property TmpDT As DataTable
Get
Return CType(ViewState("TmpDT"), DataTable)
End Get
Set(value As DataTable)
ViewState("TmpDT") = value
End Set
End Property
#End Region
Protected Sub Page_Init(sender As Object, e As EventArgs) Handles Me.Init
CreaGrid()
End Sub
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
' If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx")
CargaCombos()
'ImgPersonalizar.Attributes.Add("onclick", "javascript:$('#DivPersonalizar').show(1000); PosicionaObjeto(this.id,'DivPersonalizar');")
End If
End Sub
Private Sub CargaCombos()
'CargaClientes
Dim ObjClientes As New ClsClientes
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
DdlClientes.DataSource = ObjClientes.DtResultados
Else
DdlClientes.DataSource = Nothing
End If
ObjClientes.Dispose()
DdlClientes.DataBind()
'CargaSucursales
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1).FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
DdlSubProyecto.DataBind()
DdlSubProyectoEjecucion.DataSource = GlobalDTSubProyectos(-1).FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
DdlSubProyectoEjecucion.DataBind()
'Vendedor
'CargaUsuarios
DdlUsuario.DataSource = GlobalDTUsuarios.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
DdlUsuario.DataBind()
'CargaEstatus
DdlEstatus.DataSource = GlobalDTEstatusFactura.FiltraParametros(" CveEstatusFactura NOT IN (1, 4, 5) ")
DdlEstatus.DataBind()
DdlEstatus.Items.Add(New ListItem("Canceladas", "4"))
'If UsuarioActual.Empresa.TipoFacturacion = "CFDi" Then
' DdlEstatus.SelectedIndex = 2
'Else
DdlEstatus.SelectedIndex = 1
'End If
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
CargaDatos()
ConfiguraEmpresa()
UPDatos.Update()
End Sub
Private Sub CreaGrid()
Dim TotalAncho As Integer = 150
Dim TotalAnchoSucursal As Integer = 0
Dim SucursalTitulo As String = ""
TmpDT = New DataTable
TmpDT.Columns.Add("GPO", GetType(String))
Dim ObjVentas As New ClsPV()
Dim FechaI, FechaF, FechaIEjec, FechaFEjec As String
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim(), "-1")
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim(), "-1")
If ObjVentas.GetRepPVVentas(FechaI, FechaF, FechaIEjec, FechaFEjec, DdlClientes.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue,
DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero) Then
Dim gv As New GridView
For Each Col As DataColumn In ObjVentas.DtResultados.Columns
If Col.ColumnName.Split(CChar("_")).Length >= 3 AndAlso Col.ColumnName.Substring(0, 2).ToUpper = "T_" Then
Dim Sucursal As String = Col.ColumnName.Split(CChar("_"))(1).ToUpper()
Dim Categoria As String = Col.ColumnName.Split(CChar("_"))(2).ToUpper()
' Dim CveSucursal As Integer = Col.ColumnName.Split(CChar("_"))(3).ToEntero
Dim bfield As New TemplateField
' Dim iTemplate As System.Web.UI.ITemplate
bfield.HeaderText = Categoria
'bfield.FooterText = Row("CveEstatus").ToString
bfield.ItemStyle.HorizontalAlign = HorizontalAlign.Right
If Sucursal = "TOTAL" Or Categoria = "TOTAL" Then
bfield.ItemStyle.Width = 97
TotalAnchoSucursal = TotalAnchoSucursal + 100
TotalAncho = TotalAncho + 100
Else
bfield.ItemStyle.Width = 87
TotalAnchoSucursal = TotalAnchoSucursal + 90
TotalAncho = TotalAncho + 90
End If
bfield.ItemTemplate = New GridViewTemplate(ListItemType.Item, Col.ColumnName)
' bfield.ItemTemplate
gv.Columns.Add(bfield)
TmpDT.Columns.Add(Col.ColumnName, GetType(Integer))
If SucursalTitulo <> Sucursal And Categoria.ToUpper = "TOTAL" Then
SucursalTitulo = Sucursal
Dim Celda As New HtmlTableCell()
'Celda.InnerHtml = String.Format("<font color='White'>{0}</font>", SucursalTitulo)
Celda.InnerText = SucursalTitulo
'Celda.BorderColor = "White"
'Celda.BgColor = "Gray"
Celda.Attributes.Add("class", "Titulos")
Celda.Attributes.Add("style", "border-width: 1px;border-right-style: solid;")
Celda.Width = TotalAnchoSucursal.ToString
tblSucursales.Rows(0).Cells.Add(Celda)
TotalAnchoSucursal = 0
End If
End If
Next
For Each Columna In gv.Columns
GvDatos.Columns.Add(CType(Columna, DataControlField))
Next
GvDatos.Width = TotalAncho
Else
GvDatos.DataSource = Nothing
End If
ObjVentas.Dispose()
UPDatos.Update()
End Sub
Private Sub CargaDatos()
Dim ObjVentas As New ClsPV()
Dim FechaI, FechaF, FechaIEjec, FechaFEjec As String
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim(), "-1")
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim(), "-1")
If ObjVentas.GetRepPVVentas(FechaI, FechaF, FechaIEjec, FechaFEjec, DdlClientes.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue,
DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjVentas.DtResultados
tblSucursales.Visible = True
Else
GvDatos.DataSource = Nothing
End If
ObjVentas.Dispose()
GvDatos.DataBind()
End Sub
Private Sub ConfiguraEmpresa()
'If Not UsuarioActual.Empresa.MostrarRetIVA Then GvDatos.Columns(6).Visible = False
'If Not UsuarioActual.Empresa.MostrarRetISR Then GvDatos.Columns(7).Visible = False
End Sub
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
If ChkRetIVA.Checked Then
GvDatos.Columns(6).Visible = True
Else
GvDatos.Columns(6).Visible = False
End If
If ChkRetISR.Checked Then
GvDatos.Columns(7).Visible = True
Else
GvDatos.Columns(7).Visible = False
End If
If ChkMinSub.Checked Then
GvDatos.Columns(9).Visible = True
Else
GvDatos.Columns(9).Visible = False
End If
If ChkAVGSub.Checked Then
GvDatos.Columns(10).Visible = True
Else
GvDatos.Columns(10).Visible = False
End If
If ChkMaxSub.Checked Then
GvDatos.Columns(11).Visible = True
Else
GvDatos.Columns(11).Visible = False
End If
If ChkMinTot.Checked Then
GvDatos.Columns(12).Visible = True
Else
GvDatos.Columns(12).Visible = False
End If
If ChkAvgTot.Checked Then
GvDatos.Columns(13).Visible = True
Else
GvDatos.Columns(13).Visible = False
End If
If ChkMaxTot.Checked Then
GvDatos.Columns(14).Visible = True
Else
GvDatos.Columns(14).Visible = False
End If
UPDatos.Update()
End Sub
Protected Sub ImgExcel_Click(sender As Object, e As System.EventArgs) Handles ImgExcel.Click
GvDatos.ExportToExcel("ReporteVentas" & Now.ToShortDateString)
End Sub
'Region "TEMPLATE"
Public Class GridViewTemplate
Implements ITemplate
'A variable to hold the type of ListItemType.
Private _templateType As ListItemType
'A variable to hold the column name.
Private _columnName As String
'Constructor where we define the template type and column name.
Public Sub New(type As ListItemType, colname As String)
'Stores the template type.
_templateType = type
'Stores the column name.
_columnName = colname
End Sub
Private Sub ITemplate_InstantiateIn(container As System.Web.UI.Control) Implements ITemplate.InstantiateIn
Select Case _templateType
Case ListItemType.Header
'Creates a new label control and add it to the container.
Dim lbl As New Label()
'Allocates the new label object.
lbl.Text = _columnName
'Assigns the name of the column in the lable.
container.Controls.Add(lbl)
'Adds the newly created label control to the container.
Exit Select
Case ListItemType.Item
'Creates a new text box control and add it to the container.
Dim ltl1 As New Literal
ltl1.ID = String.Format("ltl{0}", _columnName)
AddHandler ltl1.DataBinding, AddressOf ltl_DataBinding
'AddHandler hdn1.DataBinding, AddressOf hdn_DataBinding
'Creates a column with size 4.
container.Controls.Add(ltl1)
'Adds the newly created textbox to the container.
Exit Select
Case ListItemType.EditItem
'As, I am not using any EditItem, I didnot added any code here.
Exit Select
Case ListItemType.Footer
Dim chkColumn As New CheckBox()
chkColumn.ID = Convert.ToString("Chk") & _columnName
container.Controls.Add(chkColumn)
Exit Select
End Select
End Sub
Private Sub hdn_DataBinding(sender As Object, e As EventArgs)
Dim hidden As HiddenField = DirectCast(sender, HiddenField)
Dim row As GridViewRow = DirectCast(hidden.NamingContainer, GridViewRow)
Dim value As String = DataBinder.Eval(row.DataItem, _columnName).ToString()
hidden.Value = If(value Is Nothing OrElse value = String.Empty, "-1", value)
End Sub
Private Sub ltl_DataBinding(sender As Object, e As EventArgs)
Dim ltl As Literal = DirectCast(sender, Literal)
Dim row As GridViewRow = DirectCast(ltl.NamingContainer, GridViewRow)
Dim celda As DataControlFieldCell = DirectCast(ltl.Parent, DataControlFieldCell)
Dim value As String = DataBinder.Eval(row.DataItem, _columnName).ToString()
ltl.Text = value.FormatoNumero
End Sub
''' <summary>
''' This is the event, which will be raised when the binding happens.
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
Private Sub tb1_DataBinding(sender As Object, e As EventArgs)
Dim txtdata As TextBox = DirectCast(sender, TextBox)
Dim container As GridViewRow = DirectCast(txtdata.NamingContainer, GridViewRow)
Dim dataValue As Object = DataBinder.Eval(container.DataItem, _columnName)
If dataValue Is DBNull.Value Then
txtdata.Text = dataValue.ToString()
End If
End Sub
End Class
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim Css As String = "Texto"
If e.Row.RowIndex = 0 Then
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
' e.Row.Cells(0).Width = Unit.Pixel(150)
e.Row.CssClass = "Totales"
Css = "Totales"
End If
Dim FechaI, FechaF As String
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
Dim Liga As String = String.Format("/Ventas/RepVentaDetalle.aspx?GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSucursal={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&FechaI={10}&FechaF={11}&IVA={12}&CveCorte={13}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"),
e.Row.DBCampo("Vendedor"), e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), FechaI, FechaF, e.Row.DBCampo("GPO_IVA"), e.Row.DBCampo("CveCorte"))
e.Row.FCLiteral("LtlGrupo").Text = "<a class=""" & Css & """ href=""" & Liga & """>" & e.Row.FCLiteral("LtlGrupo").Text & "</a>"
'e.Row.FCLiteral("LtlCantidad").Text = "<a class=""" & Css & """ href=""" & Liga & """>" & e.Row.FCLiteral("LtlCantidad").Text & "</a>"
For Each Col As DataColumn In DirectCast(e.Row.DataItem, System.Data.DataRowView).Row.Table.Columns
If Col.ColumnName.Split(CChar("_")).Count = 4 Then
Dim CveSubProyecto As Integer = Col.ColumnName.Split(CChar("_"))(3).ToEntero
Liga = String.Format("/Ventas/RepVentaDetalle.aspx?GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSucursal={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&FechaI={10}&FechaF={11}&IVA={12}&CveCorte={13}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), CveSubProyecto,
e.Row.DBCampo("Vendedor"), e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), FechaI, FechaF, e.Row.DBCampo("GPO_IVA"), e.Row.DBCampo("CveCorte"))
e.Row.FCLiteral(String.Format("ltl{0}", Col.ColumnName)).Text = "<a class=""" & Css & """ href=""" & Liga & """>" & e.Row.FCLiteral(String.Format("ltl{0}", Col.ColumnName)).Text & "</a>"
End If
Next
'If e.Row.DBCampo("SubTotal").ToDouble = 0 Then e.Row.FCLiteral("LtlSubTotal").Text = ""
'If e.Row.DBCampo("Descuento").ToDouble = 0 Then e.Row.FCLiteral("LtlDescuento").Text = ""
'If e.Row.DBCampo("Amortizacion").ToDouble = 0 Then e.Row.FCLiteral("LtlAmortizacion").Text = ""
'If e.Row.DBCampo("IVA").ToDouble = 0 Then e.Row.FCLiteral("LtlIVA").Text = ""
'If e.Row.DBCampo("RetIVA").ToDouble = 0 Then e.Row.FCLiteral("LtlRetIVA").Text = ""
'If e.Row.DBCampo("RetISR").ToDouble = 0 Then e.Row.FCLiteral("LtlRetISR").Text = ""
'If e.Row.DBCampo("Total").ToDouble = 0 Then e.Row.FCLiteral("LtlTotal").Text = ""
'If e.Row.DBCampo("MAX_SubTotal").ToDouble = 0 Then e.Row.FCLiteral("LtlMaxSubTotal").Text = ""
'If e.Row.DBCampo("AVG_SubTotal").ToDouble = 0 Then e.Row.FCLiteral("LtlAVGSubTotal").Text = ""
'If e.Row.DBCampo("MIN_SubTotal").ToDouble = 0 Then e.Row.FCLiteral("LtlMinSubTotal").Text = ""
'If e.Row.DBCampo("MAX_Total").ToDouble = 0 Then e.Row.FCLiteral("LtlMaxTotal").Text = ""
'If e.Row.DBCampo("AVG_Total").ToDouble = 0 Then e.Row.FCLiteral("LtlAVGTotal").Text = ""
'If e.Row.DBCampo("MIN_Total").ToDouble = 0 Then e.Row.FCLiteral("LtlMinTotal").Text = ""
End If
End Sub
End Class

View File

@@ -1,164 +0,0 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PVRepVentasCompras.aspx.vb" Inherits="PV_PVRepVentasCompras" %>
<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="HB" runat="Server">
<asp:ImageButton ID="ImgImprimir" runat="server" ImageUrl="/Imagenes/btnImprimir.gif" Width="17px" Height="17px" Enabled="false" />
<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
<asp:Image ID="ImgPersonalizar" runat="server" ImageUrl="/Imagenes/Table-icon.png" Width="17px" Height="17px" Style="cursor: pointer;" />
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Reporte de Ventas y Compras
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" style="">
<div class="portlet-title portlet-filterT" style="">
<div class="titlefiltros caption ">
<ul class="list-inline">
<li>Sucursal
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 200px !important;">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList>
</li>
<li>Fecha Inicial:
<asp:TextBox ID="txtFechaI" runat="server" Width="70px"></asp:TextBox>
&nbsp;<asp:ImageButton runat="server" ID="imgCalendario" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</li>
<li>Fecha Final:
<asp:TextBox ID="txtFechaF" runat="server" Width="70px"></asp:TextBox>
&nbsp;<asp:ImageButton runat="server" ID="imgCalendarioF" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
</li>
<li>Grupo:
<asp:DropDownList ID="DdlGrupo" runat="server" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Text="Año" Value="1"></asp:ListItem>
<asp:ListItem Text="Mes" Value="2"></asp:ListItem>
<asp:ListItem Text="Año/Mes" Value="3"></asp:ListItem>
<asp:ListItem Text="Fecha" Value="4"></asp:ListItem>
<asp:ListItem Text="Cliente" Value="5"></asp:ListItem>
<asp:ListItem Selected="True" Text="Sucursal" Value="6"></asp:ListItem>
</asp:DropDownList>
</li>
</ul>
</div>
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<br />
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table border="0" cellpadding="0" cellspacing="0" id="tblSucursales" runat="server" visible="false">
<tr>
<td style="width: 150px">&nbsp;</td>
</tr>
</table>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Ventas" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
<Columns>
<asp:TemplateField>
<HeaderTemplate>
Grupo
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlGrupo" runat="server" Text='<%# Eval("GPO") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
Ventas
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlVentas" runat="server" Text='<%# Eval("Ventas", "{0:N2}")%>'></asp:Literal>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
Compras
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlCompras" runat="server" Text='<%# Eval("Compras", "{0:N2}")%>'></asp:Literal>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel runat="server" ID="UPPersonalizar" UpdateMode="Conditional">
<ContentTemplate>
<div id="DivPersonalizar" style="width: 315px; background-color: White; border: solid 1px black; color: Black; display: none; position: absolute;">
<table class="table table-striped table-advance table-hover" width="315px">
<tr class="Titulos">
<th style="width: 310px">
<asp:Label ID="LblTitulo1" runat="server" ClientIDMode="Static" Text="Personalizar Columnas"></asp:Label>
</th>
<th style="padding-right: 4px; padding-top: 4px" valign="top">
<img alt="" src="/Imagenes/close.gif" style="cursor: pointer;" onclick="$('#DivPersonalizar').hide(1000);" /></th>
</tr>
<tr align="left">
<td colspan="2">
<table class="table table-striped table-advance table-hover">
<thead>
<tr>
<th style="text-align: left;">
<asp:CheckBox ID="ChkRetIVA" runat="server" Text="Ret. IVA" /></th>
<th style="text-align: left;">
<asp:CheckBox ID="ChkMinSub" runat="server" Text="SubTotal Mínimo" /></th>
</tr>
<tr>
<th style="text-align: left;">
<asp:CheckBox ID="ChkRetISR" runat="server" Text="Ret. ISR" /></th>
<th style="text-align: left;">
<asp:CheckBox ID="ChkMaxTot" runat="server" Text="Total Máximo" /></th>
</tr>
<tr>
<th style="text-align: left;">
<asp:CheckBox ID="ChkMaxSub" runat="server" Text="SubTotal Máximo" /></th>
<th style="text-align: left;">
<asp:CheckBox ID="ChkAvgTot" runat="server" Text="Total Promedio" /></th>
</tr>
<tr>
<th style="text-align: left;">
<asp:CheckBox ID="ChkAVGSub" runat="server" Text="SubTotal Promedio" /></th>
<th style="text-align: left;">
<asp:CheckBox ID="ChkMinTot" runat="server" Text="Total Mínimo" /></th>
</tr>
</thead>
</table>
</td>
</tr>
<tr style="height: 25px">
<td style="text-align: center;" colspan="2">
<asp:Button ID="BtnPersonalizar" runat="server" Text="Personalizar" class="btn btn-primary" /><input type="button" value="Cancelar" onclick="$('#DivPersonalizar').hide(1000);" class="btn btn-danger" /></td>
</tr>
</table>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -1,238 +0,0 @@
Option Explicit On
Option Strict On
Imports System.Data
Imports Extensiones
Partial Class PV_PVRepVentasCompras
Inherits ClsPaginas
#Region "Propiedades"
'Local
Private Property TmpDT As DataTable
Get
Return CType(ViewState("TmpDT"), DataTable)
End Get
Set(value As DataTable)
ViewState("TmpDT") = value
End Set
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
' If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx")
CargaCombos()
ImgPersonalizar.Attributes.Add("onclick", "javascript:$('#DivPersonalizar').show(1000); PosicionaObjeto(this.id,'DivPersonalizar');")
End If
End Sub
Private Sub CargaCombos()
'CargaSucursales
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1).FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
DdlSubProyecto.DataBind()
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
CargaDatos()
ConfiguraEmpresa()
UPDatos.Update()
End Sub
Private Sub CargaDatos()
Dim ObjVentas As New ClsPV()
Dim FechaI, FechaF As String
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
If ObjVentas.GetRepPVVentasCompras(FechaI, FechaF, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjVentas.DtResultados
tblSucursales.Visible = True
Else
GvDatos.DataSource = Nothing
End If
ObjVentas.Dispose()
GvDatos.DataBind()
End Sub
Private Sub ConfiguraEmpresa()
'If Not UsuarioActual.Empresa.MostrarRetIVA Then GvDatos.Columns(6).Visible = False
'If Not UsuarioActual.Empresa.MostrarRetISR Then GvDatos.Columns(7).Visible = False
End Sub
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
If ChkRetIVA.Checked Then
GvDatos.Columns(6).Visible = True
Else
GvDatos.Columns(6).Visible = False
End If
If ChkRetISR.Checked Then
GvDatos.Columns(7).Visible = True
Else
GvDatos.Columns(7).Visible = False
End If
If ChkMinSub.Checked Then
GvDatos.Columns(9).Visible = True
Else
GvDatos.Columns(9).Visible = False
End If
If ChkAVGSub.Checked Then
GvDatos.Columns(10).Visible = True
Else
GvDatos.Columns(10).Visible = False
End If
If ChkMaxSub.Checked Then
GvDatos.Columns(11).Visible = True
Else
GvDatos.Columns(11).Visible = False
End If
If ChkMinTot.Checked Then
GvDatos.Columns(12).Visible = True
Else
GvDatos.Columns(12).Visible = False
End If
If ChkAvgTot.Checked Then
GvDatos.Columns(13).Visible = True
Else
GvDatos.Columns(13).Visible = False
End If
If ChkMaxTot.Checked Then
GvDatos.Columns(14).Visible = True
Else
GvDatos.Columns(14).Visible = False
End If
UPDatos.Update()
End Sub
Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click
GvDatos.ExportToExcel("ReporteVentas" & Now.ToShortDateString)
End Sub
'Region "TEMPLATE"
Public Class GridViewTemplate
Implements ITemplate
'A variable to hold the type of ListItemType.
Private _templateType As ListItemType
'A variable to hold the column name.
Private _columnName As String
'Constructor where we define the template type and column name.
Public Sub New(type As ListItemType, colname As String)
'Stores the template type.
_templateType = type
'Stores the column name.
_columnName = colname
End Sub
Private Sub ITemplate_InstantiateIn(container As System.Web.UI.Control) Implements ITemplate.InstantiateIn
Select Case _templateType
Case ListItemType.Header
'Creates a new label control and add it to the container.
Dim lbl As New Label()
'Allocates the new label object.
lbl.Text = _columnName
'Assigns the name of the column in the lable.
container.Controls.Add(lbl)
'Adds the newly created label control to the container.
Exit Select
Case ListItemType.Item
'Creates a new text box control and add it to the container.
Dim ltl1 As New Literal
ltl1.ID = String.Format("ltl{0}", _columnName)
AddHandler ltl1.DataBinding, AddressOf ltl_DataBinding
'AddHandler hdn1.DataBinding, AddressOf hdn_DataBinding
'Creates a column with size 4.
container.Controls.Add(ltl1)
'Adds the newly created textbox to the container.
Exit Select
Case ListItemType.EditItem
'As, I am not using any EditItem, I didnot added any code here.
Exit Select
Case ListItemType.Footer
Dim chkColumn As New CheckBox()
chkColumn.ID = Convert.ToString("Chk") & _columnName
container.Controls.Add(chkColumn)
Exit Select
End Select
End Sub
Private Sub hdn_DataBinding(sender As Object, e As EventArgs)
Dim hidden As HiddenField = DirectCast(sender, HiddenField)
Dim row As GridViewRow = DirectCast(hidden.NamingContainer, GridViewRow)
Dim value As String = DataBinder.Eval(row.DataItem, _columnName).ToString()
hidden.Value = If(value Is Nothing OrElse value = String.Empty, "-1", value)
End Sub
Private Sub ltl_DataBinding(sender As Object, e As EventArgs)
Dim ltl As Literal = DirectCast(sender, Literal)
Dim row As GridViewRow = DirectCast(ltl.NamingContainer, GridViewRow)
Dim celda As DataControlFieldCell = DirectCast(ltl.Parent, DataControlFieldCell)
Dim value As String = DataBinder.Eval(row.DataItem, _columnName).ToString()
ltl.Text = value.FormatoNumero
End Sub
''' <summary>
''' This is the event, which will be raised when the binding happens.
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
Private Sub tb1_DataBinding(sender As Object, e As EventArgs)
Dim txtdata As TextBox = DirectCast(sender, TextBox)
Dim container As GridViewRow = DirectCast(txtdata.NamingContainer, GridViewRow)
Dim dataValue As Object = DataBinder.Eval(container.DataItem, _columnName)
If dataValue Is DBNull.Value Then
txtdata.Text = dataValue.ToString()
End If
End Sub
End Class
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim Css As String = "Texto"
If e.Row.RowIndex = 0 Then
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
e.Row.Cells(0).Width = Unit.Pixel(150)
e.Row.Cells(1).Width = Unit.Pixel(100)
e.Row.Cells(2).Width = Unit.Pixel(100)
e.Row.CssClass = "Totales"
Css = "Totales"
End If
Dim FechaI, FechaF As String
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
Dim LigaV As String = String.Format("/Ventas/RepVentaDetalle.aspx?GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente=-1&CveSucursal={5}&Vendedor=-1&CveUsuario=-1&CveEstatusFactura=-1&FechaI={6}&FechaF={7}&IVA=-1&CveCorte=-1",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveSucursal"), FechaI, FechaF)
Dim LigaC As String = String.Format("/Compras/RepComprasDetalle.aspx?GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveProveedor=-1&CveUsuario=-1&FechaI={5}&FechaF={6}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), FechaI, FechaF)
e.Row.FCLiteral("LtlVentas").Text = "<a class=""" & Css & """ href=""" & LigaV & """>" & e.Row.FCLiteral("LtlVentas").Text & "</a>"
e.Row.FCLiteral("LtlCompras").Text = String.Format("<a class='{0}' href='{1}'>{2}</a>", Css, LigaC, e.Row.FCLiteral("LtlCompras").Text)
End If
End Sub
End Class

View File

@@ -1261,6 +1261,22 @@ Partial Class RH_CatPersonal
DdlTipoTrabajador.DataSource = dt DdlTipoTrabajador.DataSource = dt
DdlTipoTrabajador.DataBind() DdlTipoTrabajador.DataBind()
End If End If
If DdlSubProyectoAsignadoAdd.SelectedValue.ToEntero().Contiene(11954, 11884, 11883) Then
Dim objgenerales As New ClsGenerales()
objgenerales.GetMediosTransporte(-1, True, UsuarioActual.CveEmpresa, 1, -1, -1, -1)
DdlMedioTransporte.Items.Clear()
DdlMedioTransporte.DataSource = objgenerales.DtResultados
DdlMedioTransporte.DataBind()
Else
Dim objgenerales As New ClsGenerales()
objgenerales.GetMediosTransporte(-1, True, UsuarioActual.CveEmpresa, -1, DdlSubProyectoAsignadoAdd.SelectedValue.ToEntero(), -1, -1)
DdlMedioTransporte.Items.Clear()
DdlMedioTransporte.DataSource = objgenerales.DtResultados
DdlMedioTransporte.DataBind()
End If
End Using End Using
End Sub End Sub

View File

@@ -196,6 +196,11 @@
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(4) { .reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(4) {
white-space: nowrap; white-space: nowrap;
} }
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(2),
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(3),
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(n+40) {
text-align: right !important;
}
</style> </style>
</asp:Content> </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">

40
SiteAngular.aspx Normal file
View File

@@ -0,0 +1,40 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SiteAngular.aspx.cs" Inherits="SiteAngular" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="FromSIG" runat="server">
<div>
</div>
<script type="text/javascript">
let currentoring = document.location.origin;
window.addEventListener('message', function (event) {
if (event.origin != currentoring) {
if (event.data) {
localStorage.setItem("localstorage", event.data);
} else {
localStorage.removeItem("localstorage");
}
console.log("hola SIG")
var postMsg = { 'msg': 'TokenSig', 'data': 'datos', 'token': '<%= GetTokenAngular() %>' };
parent.postMessage(postMsg, event.origin);
}
});
function loadpage() {
var postMsg = { 'msg': 'TokenSig', 'data': 'datos', 'token': '<%= GetTokenAngular() %>' };
parent.postMessage(postMsg, event.origin);
} loadpage();
console.log("hola SIG load");
</script>
</form>
</body>
</html>

53
SiteAngular.aspx.cs Normal file
View File

@@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class SiteAngular : System.Web.UI.Page
{
public Usuario UsuarioActual
{
get
{
try
{
// UsuarioActual = DirectCast(Session("UsuarioSIG"), Usuario)
if (Context.Session["UsuarioSIG"] == null)
{
return null;
}
else {
return (Usuario)Context.Session["UsuarioSIG"];
}
}
catch (Exception ex)
{
return null;
}
}
}
protected void Page_Load(object sender, EventArgs e)
{
}
public string GetTokenAngular()
{
if (Context.Session["UsuarioSIG"] != null)
{
Usuario usuario = (Usuario)Context.Session["UsuarioSIG"];
var tokenDescriptor = new Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor() { Subject = new System.Security.Claims.ClaimsIdentity(new System.Security.Claims.Claim[] { new System.Security.Claims.Claim("CvePlataforma", usuario.CvePlataforma.ToString()), new System.Security.Claims.Claim("CveUsuario", usuario.CveUsuario.ToString()), new System.Security.Claims.Claim("CveEmpresa", usuario.CveEmpresa.ToString()), new System.Security.Claims.Claim("CveRol", usuario.CveRol.ToString()), new System.Security.Claims.Claim("Fecha", DateTime.Now.ToLongDateString()) }), Expires = DateTime.UtcNow.AddHours(3), SigningCredentials = new Microsoft.IdentityModel.Tokens.SigningCredentials(new Microsoft.IdentityModel.Tokens.SymmetricSecurityKey(Encoding.ASCII.GetBytes("*_AsistenciaDesarrolloSistemas-SIGAPI_*17-06-2020")), Microsoft.IdentityModel.Tokens.SecurityAlgorithms.HmacSha256Signature) };
var tokenHandler = new System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler();
var newtoken = tokenHandler.CreateToken(tokenDescriptor);
string stokenn = tokenHandler.WriteToken(newtoken);
return stokenn;
}
else
return "";
}
}

View File

@@ -35,7 +35,7 @@
<div class="portlet-title portlet-filterT smalltitle"> <div class="portlet-title portlet-filterT smalltitle">
<div class="tools"> <div class="tools">
<asp:Button ID="BtnConsultar" OnClick="BtnConsultar_Click" runat="server" Text="Consultar" class="btn btn-primary" /> <asp:Button ID="BtnConsultar" OnClick="BtnConsultar_Click" runat="server" Text="Consultar" class="btn btn-primary" />
<a href="javascript:;" class="expand"></a> <a href="javascript:;" class="expand"></a>
</div> </div>
<div class="titlefiltros caption"> <div class="titlefiltros caption">
<div class="row" style="height: 32px;"> <div class="row" style="height: 32px;">
@@ -109,14 +109,18 @@
<asp:Label ID="LblTipo" Text='<%# Eval("TipoDocumento") %>' runat="server"></asp:Label> <asp:Label ID="LblTipo" Text='<%# Eval("TipoDocumento") %>' runat="server"></asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField DataField="TipoAutorizacionTexto" HeaderText="Tipo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" /> <asp:TemplateField HeaderText="Tipo" ItemStyle-Width="5%">
<ItemTemplate>
<asp:Label ID="LblTipoAuto" Text='<%# Eval("TipoAutorizacionTexto") %>' runat="server"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField DataTextField="NombreComercial" Target="_blank" HeaderText="Cliente" DataNavigateUrlFields="CveCliente" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" /> <asp:HyperLinkField DataTextField="NombreComercial" Target="_blank" HeaderText="Cliente" DataNavigateUrlFields="CveCliente" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" />
<asp:BoundField DataField="Vendedor" HeaderText="Vendedor" ItemStyle-Width="15%" /> <asp:BoundField DataField="Vendedor" HeaderText="Vendedor" ItemStyle-Width="15%" />
<asp:BoundField DataField="Importe" ItemStyle-Width="15%" HeaderText="Importe" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" /> <asp:BoundField DataField="Importe" ItemStyle-Width="15%" HeaderText="Importe" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
<asp:BoundField DataField="PorcentajeDescuento" ItemStyle-Width="10%" HeaderText="% Desc" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
<asp:BoundField DataField="LimiteCredito" ItemStyle-Width="10%" HeaderText="Limite Crédito" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" /> <asp:BoundField DataField="LimiteCredito" ItemStyle-Width="10%" HeaderText="Limite Crédito" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
<asp:BoundField DataField="Saldo" ItemStyle-Width="10%" HeaderText="Saldo" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" /> <asp:BoundField DataField="Saldo" ItemStyle-Width="10%" HeaderText="Saldo" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
<asp:BoundField DataField="FechaIng" ItemStyle-Width="10%" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" /> <asp:BoundField DataField="FechaIng" ItemStyle-Width="10%" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
<asp:BoundField DataField="DiasVencidos" ItemStyle-Width="5%" HeaderText="D.Venc" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N0}" /> <asp:BoundField DataField="DiasVencidos" ItemStyle-Width="5%" HeaderText="D.Venc" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N0}" />
<asp:HyperLinkField DataTextField="FacturaAplicada" Target="_blank" HeaderText="Factura" DataNavigateUrlFields="CveVentaAplicada" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ItemStyle-HorizontalAlign="Left" /> <asp:HyperLinkField DataTextField="FacturaAplicada" Target="_blank" HeaderText="Factura" DataNavigateUrlFields="CveVentaAplicada" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left" />
@@ -172,6 +176,7 @@
<asp:DropDownList ID="DdlTipoDocto" runat="server" Width="100%" CssClass="form-control marginFixRow select2me" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoDocto_SelectedIndexChanged"> <asp:DropDownList ID="DdlTipoDocto" runat="server" Width="100%" CssClass="form-control marginFixRow select2me" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoDocto_SelectedIndexChanged">
<asp:ListItem Value="Ing" Selected="True" Text="Factura de Ingreso"></asp:ListItem> <asp:ListItem Value="Ing" Selected="True" Text="Factura de Ingreso"></asp:ListItem>
<asp:ListItem Value="Egs" Text="Nota de crédito"></asp:ListItem> <asp:ListItem Value="Egs" Text="Nota de crédito"></asp:ListItem>
<asp:ListItem Value="Rem" Text="Remisión"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlTipoDocto.ClientID.ToString()%>">Tipo Documento:</label> <label for="<%= DdlTipoDocto.ClientID.ToString()%>">Tipo Documento:</label>
</div> </div>
@@ -180,6 +185,7 @@
<asp:ListItem Selected="True" Value="-1" Text="Seleccione"></asp:ListItem> <asp:ListItem Selected="True" Value="-1" Text="Seleccione"></asp:ListItem>
<asp:ListItem Value="1" Text="Importe"></asp:ListItem> <asp:ListItem Value="1" Text="Importe"></asp:ListItem>
<asp:ListItem Value="2" Text="Vencimiento"></asp:ListItem> <asp:ListItem Value="2" Text="Vencimiento"></asp:ListItem>
<%--<asp:ListItem Value="3" Text="Porcentaje Descuento"></asp:ListItem>--%>
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlTipoAutorizacion.ClientID.ToString()%>">Tipo Autorización:</label> <label for="<%= DdlTipoAutorizacion.ClientID.ToString()%>">Tipo Autorización:</label>
</div> </div>
@@ -194,14 +200,37 @@
<label for="<%= TxtPrecio.ClientID.ToString()%>">Importe:</label> <label for="<%= TxtPrecio.ClientID.ToString()%>">Importe:</label>
</div> </div>
<div id="DivDiasVencidos" runat="server" visible="false" class="row"> <div id="DivDiasVencidos" runat="server" visible="false" class="row">
<label class="col-md-2 truncate">Días Vencidos:</label> <div class="col-md-12">
<div class="col-md-10"> <div class="row">
<asp:TextBox ID="TxtDiasVencidos" Text="" runat="server" /> <label class="col-md-3 truncate" style="color: #888888; font-family: 'Open Sans', sans-serif; direction: ltr; font-size: 12px;">Días Vencidos:</label>
<ajax:FilteredTextBoxExtender ID="SoloNumerosCantidad" runat="server" TargetControlID="TxtDiasVencidos" FilterType="Custom, Numbers" /> </div>
<asp:RequiredFieldValidator ID="RFVCantiMinima" runat="server" ControlToValidate="TxtDiasVencidos" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Días Vencidos''</b> es necesario, por favor ingréselo." ValidationGroup="VgmGuardar"></asp:RequiredFieldValidator> <div class="row">
<ajax:ValidatorCalloutExtender ID="VCECantMinima" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantiMinima" Width="350px"></ajax:ValidatorCalloutExtender> <div class="col-md-12">
<asp:RequiredFieldValidator ID="RFVDiasVencidos2" runat="server" ControlToValidate="TxtDiasVencidos" Display="None" InitialValue="0" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El valor del campo <b>''Días Vencidos''</b> debe ser mayor a 0." ValidationGroup="VgmGuardar"></asp:RequiredFieldValidator> <asp:TextBox ID="TxtDiasVencidos" Text="" runat="server" />
<ajax:ValidatorCalloutExtender ID="VCEDiasVencidos2" runat="server" HighlightCssClass="vco" TargetControlID="RFVDiasVencidos2" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:FilteredTextBoxExtender ID="SoloNumerosCantidad" runat="server" TargetControlID="TxtDiasVencidos" FilterType="Custom, Numbers" />
<asp:RequiredFieldValidator ID="RFVCantiMinima" runat="server" ControlToValidate="TxtDiasVencidos" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Días Vencidos''</b> es necesario, por favor ingréselo." ValidationGroup="VgmGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCECantMinima" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantiMinima" Width="350px"></ajax:ValidatorCalloutExtender>
<asp:RequiredFieldValidator ID="RFVDiasVencidos2" runat="server" ControlToValidate="TxtDiasVencidos" Display="None" InitialValue="0" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El valor del campo <b>''Días Vencidos''</b> debe ser mayor a 0." ValidationGroup="VgmGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEDiasVencidos2" runat="server" HighlightCssClass="vco" TargetControlID="RFVDiasVencidos2" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
<div id="DivPorcentajeDescuento" runat="server" visible="false" class="row">
<div class="col-md-12">
<div class="row">
<label class="col-md-3 truncate" style="color: #888888; font-family: 'Open Sans', sans-serif; direction: ltr; font-size: 12px;">Porcentaje:</label>
</div>
<div class="row">
<div class="col-md-12">
<asp:TextBox ID="TxtPorcentaje" Text="" runat="server" CssClass="form-control input-sm" />
<ajax:FilteredTextBoxExtender ID="FTETxtPorcentaje" runat="server" TargetControlID="TxtPorcentaje" FilterType="Custom, Numbers" />
<asp:RequiredFieldValidator ID="RFVTxtPorcentaje" runat="server" ControlToValidate="TxtPorcentaje" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Porcentaje Descuento''</b> es necesario, por favor ingréselo." ValidationGroup="VgmGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCETxtPorcentaje" runat="server" HighlightCssClass="vco" TargetControlID="RFVTxtPorcentaje" Width="350px"></ajax:ValidatorCalloutExtender>
<asp:RangeValidator ID="RVTxtPorcentaje" runat="server" ControlToValidate="TxtPorcentaje" Display="None" Type="Double" MinimumValue="1" MaximumValue="100" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El valor del campo <b>''Porcentaje Descuento''</b> debe ser entre 0 y 100." ValidationGroup="VgmGuardar"></asp:RangeValidator>
<ajax:ValidatorCalloutExtender ID="VCETxtPorcentaje2" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtPorcentaje" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div> </div>
</div> </div>
<div id="DivMotivo" runat="server" visible="false" class="row"> <div id="DivMotivo" runat="server" visible="false" class="row">
@@ -218,6 +247,7 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="VgmGuardar" /> <asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="VgmGuardar" />

View File

@@ -132,7 +132,7 @@ Partial Class Ventas_CatAutorizacionLimites
Dim Motivo As String = TxtMotivo.Text.Trim Dim Motivo As String = TxtMotivo.Text.Trim
Dim ObjPS As New ClsVentas Dim ObjPS As New ClsVentas
If ObjPS.AddAutorizacionLimite(UsuarioActual.CveEmpresa, DdlCliente.SelectedValue.ToEntero(), DdlVendedor.SelectedValue.ToEntero(), TxtPrecio.Text.ToDecimal(), CveEstatus, UsuarioActual.CveUsuario, CveTipoAutorizacion, TipoDocto, DiasVencidos, Motivo:=Motivo) Then If ObjPS.AddAutorizacionLimite(UsuarioActual.CveEmpresa, DdlCliente.SelectedValue.ToEntero(), DdlVendedor.SelectedValue.ToEntero(), TxtPrecio.Text.ToDecimal(), CveEstatus, UsuarioActual.CveUsuario, CveTipoAutorizacion, TipoDocto, DiasVencidos, Motivo:=Motivo, PorcentajeDescuento:=TxtPorcentaje.Text.ToDecimal()) Then
RegistraScript("$('#DModal').modal('hide')") RegistraScript("$('#DModal').modal('hide')")
Alert("La autorización se agregó correctamente.", TipoMensaje.MsgInformacion) Alert("La autorización se agregó correctamente.", TipoMensaje.MsgInformacion)
End If End If
@@ -174,12 +174,21 @@ Partial Class Ventas_CatAutorizacionLimites
e.Row.FCLinkButton("LnkAutorizar").Visible = False e.Row.FCLinkButton("LnkAutorizar").Visible = False
e.Row.FCLinkButton("LnkRechazar").Visible = False e.Row.FCLinkButton("LnkRechazar").Visible = False
End If End If
If e.Row.DBCampo("TipoDocumento") = "Ingreso" Then If e.Row.DBCampo("TipoDocumento") = "Ingreso" Then
e.Row.FCLabel("LblTipo").CssClass = "label label-sm label-success" e.Row.FCLabel("LblTipo").CssClass = "label label-sm label-success"
Else Else
e.Row.FCLabel("LblTipo").CssClass = "label label-sm label-warning" e.Row.FCLabel("LblTipo").CssClass = "label label-sm label-warning"
End If End If
If e.Row.DBCampo("TipoAutorizacion") = "1" Then
e.Row.FCLabel("LblTipoAuto").CssClass = "badge badge-success"
ElseIf e.Row.DBCampo("TipoAutorizacion") = "2" Then
e.Row.FCLabel("LblTipoAuto").CssClass = "badge badge-primary"
ElseIf e.Row.DBCampo("TipoAutorizacion") = "3" Then
e.Row.FCLabel("LblTipoAuto").CssClass = "badge badge-secondary"
End If
'If e.Row.DBCampo("Estatus") = "True" Then 'If e.Row.DBCampo("Estatus") = "True" Then
' e.Row.Cells(1).ForeColor = Drawing.Color.Green ' e.Row.Cells(1).ForeColor = Drawing.Color.Green
' e.Row.Cells(1).Font.Bold = True ' e.Row.Cells(1).Font.Bold = True
@@ -281,6 +290,7 @@ Partial Class Ventas_CatAutorizacionLimites
Protected Sub DdlTipoAutorizacion_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlTipoAutorizacion_SelectedIndexChanged(sender As Object, e As EventArgs)
DivImporte.Visible = DdlTipoAutorizacion.SelectedValue.ToEntero() = 1 DivImporte.Visible = DdlTipoAutorizacion.SelectedValue.ToEntero() = 1
DivDiasVencidos.Visible = DdlTipoAutorizacion.SelectedValue.ToEntero() = 2 DivDiasVencidos.Visible = DdlTipoAutorizacion.SelectedValue.ToEntero() = 2
DivPorcentajeDescuento.Visible = DdlTipoAutorizacion.SelectedValue.ToEntero() = 3
UpModal.Update() UpModal.Update()
End Sub End Sub
Protected Sub DdlCliente_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlCliente_SelectedIndexChanged(sender As Object, e As EventArgs)
@@ -299,14 +309,30 @@ Partial Class Ventas_CatAutorizacionLimites
Dim TipoDocto As String = DdlTipoDocto.SelectedValue.ToString() Dim TipoDocto As String = DdlTipoDocto.SelectedValue.ToString()
Select Case TipoDocto Select Case TipoDocto
Case "Ing" Case "Ing"
If DdlTipoAutorizacion.Items.FindByValue("1") Is Nothing Then
DdlTipoAutorizacion.Items.Insert(0, New ListItem("Importe", "1"))
End If
If DdlTipoAutorizacion.Items.FindByValue("2") Is Nothing Then If DdlTipoAutorizacion.Items.FindByValue("2") Is Nothing Then
DdlTipoAutorizacion.Items.Insert(0, New ListItem("Vencimiento", "2")) DdlTipoAutorizacion.Items.Insert(0, New ListItem("Vencimiento", "2"))
End If End If
DdlTipoAutorizacion.Items.Remove(DdlTipoAutorizacion.Items.FindByValue("3"))
DivMotivo.Visible = False DivMotivo.Visible = False
Case "Egs" Case "Egs"
If DdlTipoAutorizacion.Items.FindByValue("1") Is Nothing Then
DdlTipoAutorizacion.Items.Insert(0, New ListItem("Importe", "1"))
End If
'QUITAR LA DE VENCIMIENTO 'QUITAR LA DE VENCIMIENTO
DdlTipoAutorizacion.Items.Remove(DdlTipoAutorizacion.Items.FindByValue("2")) DdlTipoAutorizacion.Items.Remove(DdlTipoAutorizacion.Items.FindByValue("2"))
'QUITAR LA DE DESCUENTO
DdlTipoAutorizacion.Items.Remove(DdlTipoAutorizacion.Items.FindByValue("3"))
DivMotivo.Visible = True DivMotivo.Visible = True
Case "Rem"
If DdlTipoAutorizacion.Items.FindByValue("3") Is Nothing Then
DdlTipoAutorizacion.Items.Insert(0, New ListItem("Porcentaje Descuento", "3"))
End If
DdlTipoAutorizacion.Items.Remove(DdlTipoAutorizacion.Items.FindByValue("1"))
DdlTipoAutorizacion.Items.Remove(DdlTipoAutorizacion.Items.FindByValue("2"))
DivMotivo.Visible = False
End Select End Select
UpModal.Update() UpModal.Update()
End Sub End Sub

View File

@@ -6,6 +6,14 @@
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server"> <asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
<style> <style>
.labelddl {
top: 0;
margin-bottom: 0;
font-size: 13px;
color: #888888;
opacity: 1;
}
.nolineheight { .nolineheight {
line-height: 1; line-height: 1;
} }
@@ -192,6 +200,9 @@
<li> <li>
<asp:LinkButton ID="LkbRetiro" OnClick="LkbRetiro_Click" runat="server" Visible="false"> <i class="fa fa-ad-excel"></i> Retiro de Efectivo</asp:LinkButton> <asp:LinkButton ID="LkbRetiro" OnClick="LkbRetiro_Click" runat="server" Visible="false"> <i class="fa fa-ad-excel"></i> Retiro de Efectivo</asp:LinkButton>
</li> </li>
<li>
<asp:LinkButton ID="LnkSolicitarDesc" OnClick="LnkSolicitarDesc_Click" runat="server"><i class="fa fa-plus"></i>Solicitar descuento</asp:LinkButton>
</li>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
@@ -2454,171 +2465,171 @@
<ContentTemplate> <ContentTemplate>
<div class="portlet-title"> <div class="portlet-title">
<div class="caption font-green"> <div class="caption font-green">
<i class="fa fa-users font-green"></i> <i class="fa fa-users font-green"></i>
<span class="caption-subject bold uppercase">Datos del Cliente</span> <span class="caption-subject bold uppercase">Datos del Cliente</span>
</div> </div>
<div class="actions"> <div class="actions">
<div class="btn-group"> <div class="btn-group">
</div> </div>
</div> </div>
</div>
<div class="modal-body">
<div class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-9">
<asp:TextBox ID="TxtRFCCliente" Text="XAXX010101000" Style="text-transform: uppercase;" placeholder="Ingrese el RFC para su validación" runat="server" CssClass="form-control" MaxLength="13" CausesValidation="true"></asp:TextBox>
<asp:RegularExpressionValidator ID="REVRFCCliente" runat="server" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RFC''</b> es incorrecto, por favor ingréselo." ValidationGroup="GrpGuardarCliente" ControlToValidate="TxtRFCCliente" ValidationExpression="[a-z,ñ,A-Z,Ñ,&]{3,4}[0-9]{2}[0-1][0-9][0-3][0-9][A-Z,0-9]?[A-Z,0-9]?[0-9,A-Z]?"></asp:RegularExpressionValidator>
<label for="<%= TxtRFCCliente.ClientID.ToString()%>">RFC:</label>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-3">
<asp:Button ID="BtnValidarRFC" runat="server" CssClass="btn btn-success" Text="Validar" />
</div>
</div>
<div class="row">
<div class="col-md-12">
<div runat="server" id="DivTipoPersona" visible="false" class="form-group form-md-line-input input-iconright">
<asp:RadioButtonList runat="server" ID="RdTipoPersona" RepeatDirection="Horizontal" OnSelectedIndexChanged="RdTipoPersona_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control">
<asp:ListItem Value="0">Física</asp:ListItem>
<asp:ListItem Value="1">Moral</asp:ListItem>
</asp:RadioButtonList>
<label for="<%= RdTipoPersona.ClientID.ToString()%>">Tipo Persona:</label>
<i></i>
</div> </div>
</div>
</div>
<div class="modal-body">
<div class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-9">
<asp:TextBox ID="TxtRFCCliente" Text="XAXX010101000" Style="text-transform: uppercase;" placeholder="Ingrese el RFC para su validación" runat="server" CssClass="form-control" MaxLength="13" CausesValidation="true"></asp:TextBox>
<asp:RegularExpressionValidator ID="REVRFCCliente" runat="server" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RFC''</b> es incorrecto, por favor ingréselo." ValidationGroup="GrpGuardarCliente" ControlToValidate="TxtRFCCliente" ValidationExpression="[a-z,ñ,A-Z,Ñ,&]{3,4}[0-9]{2}[0-1][0-9][0-3][0-9][A-Z,0-9]?[A-Z,0-9]?[0-9,A-Z]?"></asp:RegularExpressionValidator>
<label for="<%= TxtRFCCliente.ClientID.ToString()%>">RFC:</label> <div class="row">
</div> <div class="col-md-12" runat="server" id="DivRazonSocial2">
<div class="form-group form-md-line-input input-iconright col-xs-3"> <div id="DivNombreCliente" runat="server" visible="false" class="form-group form-md-line-input input-iconright">
<asp:Button ID="BtnValidarRFC" runat="server" CssClass="btn btn-success" Text="Validar" /> <asp:TextBox ID="TxtNombreCliente" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
</div> <asp:RequiredFieldValidator ID="RFVNombreCliente" runat="server" ControlToValidate="TxtNombreCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtNombreCliente.ClientID.ToString()%>">Razón Social:</label>
</div> </div>
</div>
<div class="col-md-4" id="DVRegimenSociedad" runat="server" visible="false">
<div class="row"> <div runat="server" class="form-group form-md-line-input input-iconright">
<div class="col-md-12"> <asp:TextBox ID="TxtRegimenSociedad" CssClass="form-control " runat="server" MaxLength="50" onkeyup="fncTxt()" ClientIDMode="Static"></asp:TextBox>
<label for="<%= TxtRegimenSociedad.ClientID.ToString()%>">Regimen Sociedad:</label>
<i></i>
<div runat="server" id="DivTipoPersona" visible="false" class="form-group form-md-line-input input-iconright">
<asp:RadioButtonList runat="server" ID="RdTipoPersona" RepeatDirection="Horizontal" OnSelectedIndexChanged="RdTipoPersona_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control">
<asp:ListItem Value="0">Física</asp:ListItem>
<asp:ListItem Value="1">Moral</asp:ListItem>
</asp:RadioButtonList>
<label for="<%= RdTipoPersona.ClientID.ToString()%>">Tipo Persona:</label>
<i></i>
</div>
</div>
</div> </div>
</div>
</div>
<div id="DivDireccionCliente" runat="server" visible="false" class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtDireccionCliente" CssClass="form-control " runat="server" MaxLength="90" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVDireccionC" runat="server" ControlToValidate="TxtDireccionCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Direccion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtDireccionCliente.ClientID.ToString()%>">Dirección:</label>
</div>
<div id="DivNumeroCPCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-4">
<asp:TextBox ID="TxtCPCliente" CssClass="form-control " runat="server" MaxLength="5" CausesValidation="true"></asp:TextBox>
<label for="<%= TxtCPCliente.ClientID.ToString()%>">Código Postal:</label>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-4">
<asp:TextBox ID="TxtNumExtCliente" CssClass="form-control " runat="server" MaxLength="40" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVNoEC" runat="server" ControlToValidate="TxtNumExtCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Número Exterior''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtNumExtCliente.ClientID.ToString()%>">Número Exterior:</label>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-4">
<asp:TextBox ID="TxtNumIntCliente" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
<label for="<%= TxtNumIntCliente.ClientID.ToString()%>">Número Interior:</label>
</div>
</div>
<div id="DivColoniaTelefonoCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:TextBox ID="TxtColoniaCliente" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVColoniaC" runat="server" ControlToValidate="TxtColoniaCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Colonia''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtColoniaCliente.ClientID.ToString()%>">Colonia:</label>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:TextBox ID="TxtTelefonoCliente" CssClass="form-control " runat="server" MaxLength="10" CausesValidation="true"></asp:TextBox>
<label for="<%= TxtTelefonoCliente.ClientID.ToString()%>">Teléfono:</label>
</div>
</div>
<div id="DivCiudadLocalidadCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:TextBox ID="TxtCiudadCliente" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVCiudadC" runat="server" ControlToValidate="TxtCiudadCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ciudad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtCiudadCliente.ClientID.ToString()%>">Ciudad:</label>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:TextBox ID="TxtLocalidadCliente" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVLocalidadC" runat="server" ControlToValidate="TxtLocalidadCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Localidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtLocalidadCliente.ClientID.ToString()%>">Localidad:</label>
</div>
</div>
<div id="DivEstadoPaisCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:DropDownList ID="DdlSATPais" runat="server" CssClass="form-control input-sm select2me" OnSelectedIndexChanged="DdlSATPais_SelectedIndexChanged" AutoPostBack="true">
<asp:ListItem Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Value="MEX" Text="México" Selected="True"></asp:ListItem>
<asp:ListItem Value="USA" Text="USA"></asp:ListItem>
<asp:ListItem Value="CAN" Text="Canada"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVSATPais" runat="server" InitialValue="-1" ControlToValidate="DdlSATPais" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Pais''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= DdlSATPais.ClientID.ToString()%>">Pais:</label>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:DropDownList ID="DdlEstadoSAT" DataTextField="NombreEstado" DataValueField="CveSATEstado" runat="server" CssClass="form-control input-sm select2me">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlEstadoSAT" runat="server" InitialValue="-1" ControlToValidate="DdlEstadoSAT" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= DdlEstadoSAT.ClientID.ToString()%>">Estado:</label>
</div>
</div>
<div id="DivCorreoCuentaCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:TextBox ID="TxtCorreoCliente" CssClass="form-control" runat="server" MaxLength="300" CausesValidation="true"></asp:TextBox>
<label for="<%= TxtCorreoCliente.ClientID.ToString()%>">Email: </label>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-6">
</div>
</div>
<div id="DivFormaCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:DropDownList ID="DdlMetodoCliente" runat="server" CssClass=" form-control input-sm select2me" AppendDataBoundItems="true" CausesValidation="true" DataTextField="MetodoPagoSAT" DataValueField="CveMetodoPago" Width="200px">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="DdlMetodoCliente" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Método Pago''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= DdlMetodoCliente.ClientID.ToString()%>">Método Pago:</label>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:DropDownList ID="DdlFormaCliente" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="FormaPagoSAT" DataValueField="CveFormaPago" Width="200px">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="DdlMetodoCliente" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Forma Pago''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= DdlFormaCliente.ClientID.ToString()%>">Forma Pago: </label>
<i></i>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12" runat="server" id="DivRazonSocial2">
<div id="DivNombreCliente" runat="server" visible="false" class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtNombreCliente" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVNombreCliente" runat="server" ControlToValidate="TxtNombreCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtNombreCliente.ClientID.ToString()%>">Razón Social:</label>
</div>
</div>
<div class="col-md-4" id="DVRegimenSociedad" runat="server" visible="false">
<div runat="server" class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtRegimenSociedad" CssClass="form-control " runat="server" MaxLength="50" onkeyup="fncTxt()" ClientIDMode="Static"></asp:TextBox>
<label for="<%= TxtRegimenSociedad.ClientID.ToString()%>">Regimen Sociedad:</label>
<i></i>
</div>
</div>
</div>
<div id="DivDireccionCliente" runat="server" visible="false" class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtDireccionCliente" CssClass="form-control " runat="server" MaxLength="90" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVDireccionC" runat="server" ControlToValidate="TxtDireccionCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Direccion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtDireccionCliente.ClientID.ToString()%>">Dirección:</label>
</div>
<div id="DivNumeroCPCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-4">
<asp:TextBox ID="TxtCPCliente" CssClass="form-control " runat="server" MaxLength="5" CausesValidation="true"></asp:TextBox>
<label for="<%= TxtCPCliente.ClientID.ToString()%>">Código Postal:</label>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-4">
<asp:TextBox ID="TxtNumExtCliente" CssClass="form-control " runat="server" MaxLength="40" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVNoEC" runat="server" ControlToValidate="TxtNumExtCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Número Exterior''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtNumExtCliente.ClientID.ToString()%>">Número Exterior:</label>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-4">
<asp:TextBox ID="TxtNumIntCliente" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
<label for="<%= TxtNumIntCliente.ClientID.ToString()%>">Número Interior:</label>
</div>
</div>
<div id="DivColoniaTelefonoCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:TextBox ID="TxtColoniaCliente" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVColoniaC" runat="server" ControlToValidate="TxtColoniaCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Colonia''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtColoniaCliente.ClientID.ToString()%>">Colonia:</label>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:TextBox ID="TxtTelefonoCliente" CssClass="form-control " runat="server" MaxLength="10" CausesValidation="true"></asp:TextBox>
<label for="<%= TxtTelefonoCliente.ClientID.ToString()%>">Teléfono:</label>
</div>
</div>
<div id="DivCiudadLocalidadCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:TextBox ID="TxtCiudadCliente" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVCiudadC" runat="server" ControlToValidate="TxtCiudadCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ciudad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtCiudadCliente.ClientID.ToString()%>">Ciudad:</label>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:TextBox ID="TxtLocalidadCliente" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVLocalidadC" runat="server" ControlToValidate="TxtLocalidadCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Localidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtLocalidadCliente.ClientID.ToString()%>">Localidad:</label>
</div>
</div>
<div id="DivEstadoPaisCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:DropDownList ID="DdlSATPais" runat="server" CssClass="form-control input-sm select2me" OnSelectedIndexChanged="DdlSATPais_SelectedIndexChanged" AutoPostBack="true">
<asp:ListItem Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Value="MEX" Text="México" Selected="True"></asp:ListItem>
<asp:ListItem Value="USA" Text="USA"></asp:ListItem>
<asp:ListItem Value="CAN" Text="Canada"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVSATPais" runat="server" InitialValue="-1" ControlToValidate="DdlSATPais" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Pais''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= DdlSATPais.ClientID.ToString()%>">Pais:</label>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:DropDownList ID="DdlEstadoSAT" DataTextField="NombreEstado" DataValueField="CveSATEstado" runat="server" CssClass="form-control input-sm select2me">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlEstadoSAT" runat="server" InitialValue="-1" ControlToValidate="DdlEstadoSAT" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= DdlEstadoSAT.ClientID.ToString()%>">Estado:</label>
</div>
</div>
<div id="DivCorreoCuentaCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:TextBox ID="TxtCorreoCliente" CssClass="form-control" runat="server" MaxLength="300" CausesValidation="true"></asp:TextBox>
<label for="<%= TxtCorreoCliente.ClientID.ToString()%>">Email: </label>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-6">
</div>
</div>
<div id="DivFormaCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:DropDownList ID="DdlMetodoCliente" runat="server" CssClass=" form-control input-sm select2me" AppendDataBoundItems="true" CausesValidation="true" DataTextField="MetodoPagoSAT" DataValueField="CveMetodoPago" Width="200px">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="DdlMetodoCliente" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Método Pago''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= DdlMetodoCliente.ClientID.ToString()%>">Método Pago:</label>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:DropDownList ID="DdlFormaCliente" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="FormaPagoSAT" DataValueField="CveFormaPago" Width="200px">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="DdlMetodoCliente" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Forma Pago''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= DdlFormaCliente.ClientID.ToString()%>">Forma Pago: </label>
<i></i>
</div>
</div>
</div>
@@ -2980,7 +2991,7 @@
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtDescuento" inputmode="numeric" runat="server" onkeyup="Recalcula();" CausesValidation="true" lang="nb" ClientIDMode="Static" Text="0.00" MaxLength="12" ValidationGroup="GrpAddVenta" Width="100px" CssClass="form-control "></asp:TextBox> <asp:TextBox ID="TxtDescuento" inputmode="numeric" runat="server" onkeyup="Recalcula();" CausesValidation="true" lang="nb" ClientIDMode="Static" Text="0.00" MaxLength="12" ValidationGroup="GrpAddVenta" Width="100px" Enabled="false" CssClass="form-control "></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server" TargetControlID="TxtDescuento" FilterType="Custom, Numbers" ValidChars="." /> <ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server" TargetControlID="TxtDescuento" FilterType="Custom, Numbers" ValidChars="." />
<asp:CustomValidator ID="CVDescuento" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtDescuento" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descuento''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GrpAddVenta"></asp:CustomValidator> <asp:CustomValidator ID="CVDescuento" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtDescuento" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descuento''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GrpAddVenta"></asp:CustomValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="CVDescuento" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="CVDescuento" Width="300px"></ajax:ValidatorCalloutExtender>
@@ -2991,7 +3002,8 @@
<div class="col-md-1"> <div class="col-md-1">
<asp:UpdatePanel ID="UpBtnDescuento" runat="server" class="portlet-body form" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpBtnDescuento" runat="server" class="portlet-body form" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:LinkButton ID="ImgDescPU" runat="server" Text="<i class='fa fa-tags' style='color:dimgray;'></i>" Style="cursor: pointer;" AlternateText="Agregar Descuento" /> <asp:LinkButton ID="ImgDescPU" Visible="false" runat="server" Text="<i class='fa fa-tags' style='color:dimgray;'></i>" Style="cursor: pointer;" AlternateText="Agregar Descuento" />
<asp:LinkButton ID="LnkDescPU" Visible="false" OnClick="LnkDescPU_Click" runat="server" Text="<i class='fa fa-tags' style='color:dimgray;'></i>" Style="cursor: pointer;" AlternateText="Agregar Descuento" />
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
@@ -3276,6 +3288,78 @@
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
<div id="ModalSolicitudDescuento" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpSolicitarDescuento" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content">
<div class="modal-header ">
<h4 class="modal-title">
<asp:Literal Text="Solicitar Descuento" runat="server"> </asp:Literal></h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-12">
<label class="labelddl">Cliente:</label>
</div>
</div>
<div class="row">
<div class="col-md-12">
<asp:Literal ID="LtlClienteDescuento" Text="" runat="server"> </asp:Literal>
</div>
</div>
<div class="row">
<div class="col-md-12">
<label class="labelddl">Vendedor:</label>
</div>
</div>
<div class="row">
<div class="col-md-12">
<asp:Literal ID="LtlVendedorDescuento" Text="" runat="server"> </asp:Literal>
</div>
</div>
<br />
<div class="row">
<div class="col-md-12">
<div class="row">
<label class="col-md-3 truncate" style="color: #888888; font-family: 'Open Sans', sans-serif; direction: ltr; font-size: 12px;">Porcentaje:</label>
</div>
<div class="row">
<div class="col-md-12">
<asp:TextBox ID="TxtPorcentaje" Text="" runat="server" CssClass="form-control input-sm" />
<ajax:FilteredTextBoxExtender ID="FTETxtPorcentaje" runat="server" TargetControlID="TxtPorcentaje" FilterType="Custom, Numbers" />
<asp:RequiredFieldValidator ID="RFVTxtPorcentaje" runat="server" ControlToValidate="TxtPorcentaje" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Porcentaje Descuento''</b> es necesario, por favor ingréselo." ValidationGroup="VgmGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCETxtPorcentaje" runat="server" HighlightCssClass="vco" TargetControlID="RFVTxtPorcentaje" Width="350px"></ajax:ValidatorCalloutExtender>
<asp:RangeValidator ID="RVTxtPorcentaje" runat="server" ControlToValidate="TxtPorcentaje" Display="None" Type="Double" MinimumValue="1" MaximumValue="100" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El valor del campo <b>''Porcentaje Descuento''</b> debe ser entre 0 y 100." ValidationGroup="VgmGuardar"></asp:RangeValidator>
<ajax:ValidatorCalloutExtender ID="VCETxtPorcentaje2" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtPorcentaje" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="row">
<label class="col-md-3 truncate" style="color: #888888; font-family: 'Open Sans', sans-serif; direction: ltr; font-size: 12px;">Motivo:</label>
</div>
<div class="row">
<div class="col-md-12">
<asp:TextBox ID="TxtMotivo" CssClass="form-control input-sm" runat="server" Rows="2" TextMode="MultiLine" Width="100%" MaxLength="50"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVMotivo" runat="server" ControlToValidate="TxtMotivo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Motivo''</b> es necesario, por favor ingréselo." ValidationGroup="VgmGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEMotivo" runat="server" HighlightCssClass="vco" TargetControlID="RFVMotivo" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<asp:Button ID="BtnSolicitarDescuento" runat="server" Text="Solicitar" OnClick="BtnSolicitarDescuento_Click" CssClass="btn btn-primary" ValidationGroup="VgmGuardar" />
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</asp:Content> </asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
@@ -4185,31 +4269,31 @@
function showDivEC() { function showDivEC() {
$('#<%= TxtNombreCliente.ClientID %>').val(''); $('#<%= TxtNombreCliente.ClientID %>').val('');
$('#<%= TxtDireccionCliente.ClientID %>').val(''); $('#<%= TxtDireccionCliente.ClientID %>').val('');
$('#<%= TxtNumExtCliente.ClientID %>').val(''); $('#<%= TxtNumExtCliente.ClientID %>').val('');
$('#<%= TxtNumIntCliente.ClientID %>').val(''); $('#<%= TxtNumIntCliente.ClientID %>').val('');
$('#<%= TxtCPCliente.ClientID %>').val(''); $('#<%= TxtCPCliente.ClientID %>').val('');
$('#<%= TxtColoniaCliente.ClientID %>').val(''); $('#<%= TxtColoniaCliente.ClientID %>').val('');
$('#<%= TxtTelefonoCliente.ClientID %>').val(''); $('#<%= TxtTelefonoCliente.ClientID %>').val('');
$('#<%= TxtCiudadCliente.ClientID %>').val(''); $('#<%= TxtCiudadCliente.ClientID %>').val('');
$('#<%= TxtLocalidadCliente.ClientID %>').val(''); $('#<%= TxtLocalidadCliente.ClientID %>').val('');
$('#<%= DdlEstadoSAT.ClientID %>').val(''); $('#<%= DdlEstadoSAT.ClientID %>').val('');
$('#<%= DdlSATPais.ClientID %>').val(''); $('#<%= DdlSATPais.ClientID %>').val('');
$('#<%= TxtCorreoCliente.ClientID %>').val(''); $('#<%= TxtCorreoCliente.ClientID %>').val('');
$('#divAgregarCliente').modal(); $('#divAgregarCliente').modal();
} }
function hideDivEC() { function hideDivEC() {
$('#divAgregarCliente').modal('hide'); $('#divAgregarCliente').modal('hide');
} }
function CambiaAjuste(txt, txtajuste) { function CambiaAjuste(txt, txtajuste) {
Recalcula(); Recalcula();
if (txtajuste != null) { if (txtajuste != null) {
txtajuste.value = ToDouble(txt.value) txtajuste.value = ToDouble(txt.value)
}
} }
}
</script> </script>
</asp:Content> </asp:Content>

View File

@@ -701,6 +701,14 @@ Partial Class PV
} }
End Get End Get
End Property End Property
Private Property CveAutorizacion As Integer
Get
Return (IfNull(ViewState("CveAutorizacion"), "-1", ViewState("CveAutorizacion"))).ToString().ToEntero()
End Get
Set(value As Integer)
ViewState("CveAutorizacion") = value
End Set
End Property
#End Region #End Region
#Region "PROPIEDADES DE PUNTO DE VENTA" #Region "PROPIEDADES DE PUNTO DE VENTA"
@@ -1027,6 +1035,7 @@ Partial Class PV
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
ViewState("CveVenta") = -1 ViewState("CveVenta") = -1
Me.CveAutorizacion = -1
'VERIFICAR SI LA SESION SE ENCUENTRA BLOQUEADA 'VERIFICAR SI LA SESION SE ENCUENTRA BLOQUEADA
If UsuarioActual.Empresa.Funcionalidad(599) = "1" Then If UsuarioActual.Empresa.Funcionalidad(599) = "1" Then
Dim DrUsuario As DataRow = GlobalDTUsuarios(CveUsuario:=UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0) Dim DrUsuario As DataRow = GlobalDTUsuarios(CveUsuario:=UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)
@@ -1135,11 +1144,15 @@ Partial Class PV
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
ImgDescPU.Attributes.Add("onclick", "javascript:AbrirModalDescuentoAdicional();") ImgDescPU.Attributes.Add("onclick", "javascript:AbrirModalDescuentoAdicional();")
ImgDescPU.Visible = False
LnkDescPU.Visible = True
TxtPorDescP.Attributes.Add("onKeyUp", "CalculaDescuentoAdicional();") TxtPorDescP.Attributes.Add("onKeyUp", "CalculaDescuentoAdicional();")
TxtDescP.Attributes.Add("onKeyUp", "CalculaDescuentoMontoAdicional();") TxtDescP.Attributes.Add("onKeyUp", "CalculaDescuentoMontoAdicional();")
TrDescuentoIncluido.Visible = True TrDescuentoIncluido.Visible = True
TrDescuentoAdicional.Visible = True TrDescuentoAdicional.Visible = True
Else Else
ImgDescPU.Visible = True
LnkDescPU.Visible = False
ImgDescPU.Attributes.Add("onclick", "javascript:$('#ModalDescuento').modal(); $get('LblTitulo1').style.display = ''; $get('LblTitulo2').style.display = 'none'; $get('LblTituloTipo1').style.display = ''; $get('LblTituloTipo2').style.display = 'none'; $get('HdnTipoDescuento').value = '0'; $get('LblPrecio1').style.display = ''; $get('LblTotalPS1').style.display = 'none'; $get('LblSubTotal1').style.display = 'none'; $get('LblAmort').style.display = 'none'; $get('BtnAplicarDescP').style.display = ''; $get('BtnAplicarDescG').style.display = 'none'; $get('TrMotivoDescuento').style.display = '';") ImgDescPU.Attributes.Add("onclick", "javascript:$('#ModalDescuento').modal(); $get('LblTitulo1').style.display = ''; $get('LblTitulo2').style.display = 'none'; $get('LblTituloTipo1').style.display = ''; $get('LblTituloTipo2').style.display = 'none'; $get('HdnTipoDescuento').value = '0'; $get('LblPrecio1').style.display = ''; $get('LblTotalPS1').style.display = 'none'; $get('LblSubTotal1').style.display = 'none'; $get('LblAmort').style.display = 'none'; $get('BtnAplicarDescP').style.display = ''; $get('BtnAplicarDescG').style.display = 'none'; $get('TrMotivoDescuento').style.display = '';")
TxtPorDescP.Attributes.Add("onKeyUp", "CalculaDescuento();") TxtPorDescP.Attributes.Add("onKeyUp", "CalculaDescuento();")
TxtDescP.Attributes.Add("onKeyUp", "CalculaDescuentoMonto();") TxtDescP.Attributes.Add("onKeyUp", "CalculaDescuentoMonto();")
@@ -1189,7 +1202,7 @@ Partial Class PV
If UsuarioActual.Empresa.Funcionalidad(531).ToString = "1" Then If UsuarioActual.Empresa.Funcionalidad(531).ToString = "1" Then
CargaAjuste() CargaAjuste()
RVPorDesc.MaximumValue = UsuarioActual.DescuentoAutorizado.ToString RVPorDesc.MaximumValue = UsuarioActual.DescuentoAutorizado.ToString
RVPorDesc.ErrorMessage = $"El rango para el % de descuento debe de estar entre <b>0</b> y <b>{UsuarioActual.DescuentoAutorizado.ToString}</b>." RVPorDesc.ErrorMessage = $"El rango para el % de descuento debe de estar entre <b>0</b> y <b>{UsuarioActual.DescuentoAutorizado.ToString}</b>."
End If End If
LimpiaEscondeContado() LimpiaEscondeContado()
@@ -3425,6 +3438,7 @@ Partial Class PV
Dim TieneError As Boolean = False Dim TieneError As Boolean = False
Dim ObjAcum As New ClsAcumuladores Dim ObjAcum As New ClsAcumuladores
Dim ObjVentas As New ClsVentas(ObjAcum.IniciaTransacSQL())
Dim ObjContPaq As ClsContPAQi = Nothing Dim ObjContPaq As ClsContPAQi = Nothing
If UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then If UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
ObjContPaq = New ClsContPAQi(UsuarioActual.Empresa) ObjContPaq = New ClsContPAQi(UsuarioActual.Empresa)
@@ -3462,6 +3476,12 @@ Partial Class PV
'End If 'End If
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso Me.CveAutorizacion > 0 Then
If Not ObjVentas.UpdateAutorizacionLimite(Me.CveAutorizacion, ObjFactura.CveCliente, Retorno.CveVenta) Then
ErrorList.Add("Error al guardar los limites de la autorizacion")
End If
End If
If ObjAcum.GetGarantiasDetalle(Retorno.CveVenta) Then If ObjAcum.GetGarantiasDetalle(Retorno.CveVenta) Then
Dim RowGarantia As DataRow = ObjAcum.DtResultados.FiltroPrimero("") Dim RowGarantia As DataRow = ObjAcum.DtResultados.FiltroPrimero("")
If RowGarantia IsNot Nothing Then If RowGarantia IsNot Nothing Then
@@ -3489,13 +3509,15 @@ Partial Class PV
If ObjContPaq IsNot Nothing Then ObjContPaq.RollBack() If ObjContPaq IsNot Nothing Then ObjContPaq.RollBack()
ObjAcum.Dispose() ObjAcum.Dispose()
ObjVentas.Dispose()
If ObjContPaq IsNot Nothing Then ObjContPaq.Dispose() If ObjContPaq IsNot Nothing Then ObjContPaq.Dispose()
Me.CveAutorizacion = -1
Else Else
ObjAcum.Commit() ObjAcum.Commit()
If ObjContPaq IsNot Nothing Then ObjContPaq.Commit() If ObjContPaq IsNot Nothing Then ObjContPaq.Commit()
ObjAcum.Dispose() ObjAcum.Dispose()
ObjVentas.Dispose()
If ObjContPaq IsNot Nothing Then ObjContPaq.Dispose() If ObjContPaq IsNot Nothing Then ObjContPaq.Dispose()
RegistraScript($"descargarPDF('{urlFactura}','{urlAjuste}');", "Imprimir") RegistraScript($"descargarPDF('{urlFactura}','{urlAjuste}');", "Imprimir")
@@ -4145,7 +4167,8 @@ Partial Class PV
If PrecioSugerido > 0 Then If PrecioSugerido > 0 Then
TxtPrecio.Text = PrecioSugerido.FormatoNumero() TxtPrecio.Text = PrecioSugerido.FormatoNumero()
RegistraScript("$get('LblPrecio1').innerText = formato_numero(" + PrecioSugerido.ToString + ", 2, '.', ',');") LblPrecio1.Text = PrecioSugerido.FormatoNumero()
'RegistraScript("$get('LblPrecio1').innerText = formato_numero(" + PrecioSugerido.ToString + ", 2, '.', ',');")
End If End If
@@ -4183,7 +4206,8 @@ Partial Class PV
If PrecioSugerido > 0 AndAlso TxtDescuento.Text.ToDecimal() > 0 Then If PrecioSugerido > 0 AndAlso TxtDescuento.Text.ToDecimal() > 0 Then
TxtPrecio.Text = PrecioSugerido.FormatoNumero() TxtPrecio.Text = PrecioSugerido.FormatoNumero()
RegistraScript("$get('LblPrecio1').innerText = formato_numero(" + PrecioSugerido.ToString() + ", 2, '.', ',');", "A1") LblPrecio1.Text = PrecioSugerido.FormatoNumero()
'RegistraScript("$get('LblPrecio1').innerText = formato_numero(" + PrecioSugerido.ToString() + ", 2, '.', ',');", "A1")
End If End If
If ChkAjuste.Checked Then If ChkAjuste.Checked Then
@@ -8305,4 +8329,62 @@ Partial Class PV
UpAgregarCliente.Update() UpAgregarCliente.Update()
End Sub End Sub
Protected Sub LnkSolicitarDesc_Click(sender As Object, e As EventArgs)
If Me.CveCliente <= 0 Then
Alert("Debe seleccionar un cliente.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If DdlVendedor.SelectedValue.ToEntero() <= 0 Then
Alert("Debe seleccionar un vendedor.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
LtlClienteDescuento.Text = LblCliente.Text
LtlVendedorDescuento.Text = DdlVendedor.SelectedItem.Text
UpSolicitarDescuento.Update()
RegistraScript("$('#ModalSolicitudDescuento').modal()")
End Sub
Protected Sub BtnSolicitarDescuento_Click(sender As Object, e As EventArgs)
Dim DiasVencidos As Integer = 0
Dim CveEstatus As Integer = 0
Dim CveTipoAutorizacion As Integer = 3
Dim Motivo As String = TxtMotivo.Text.Trim
Dim ObjPS As New ClsVentas
If ObjPS.AddAutorizacionLimite(UsuarioActual.CveEmpresa, Me.CveCliente, DdlVendedor.SelectedValue.ToEntero(), 0, CveEstatus, UsuarioActual.CveUsuario, CveTipoAutorizacion, "Rem", DiasVencidos, Motivo:=Motivo, PorcentajeDescuento:=TxtPorcentaje.Text.ToDecimal()) Then
RegistraScript("$('#ModalSolicitudDescuento').modal('hide')")
Alert("La autorización se agregó correctamente.", TipoMensaje.MsgInformacion)
End If
ObjPS.Dispose()
End Sub
Protected Sub LnkDescPU_Click(sender As Object, e As EventArgs)
Dim ObjVentas As New ClsVentas
If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedor.SelectedValue.ToEntero, "Rem", CveEstatus:=1) Then
Dim RowAutorizacion As DataRow = Nothing
'SI TIENE DIAS VENCIDOS BUSCAR POR TIPO VENCIMIENTO
RowAutorizacion = ObjVentas.DtResultados.FiltroPrimero($"TipoAutorizacion = 3 AND CveVenta IS NULL AND CveTipoDocumento='Rem'", Orderby:="Importe DESC")
If RowAutorizacion IsNot Nothing Then
Me.CveAutorizacion = RowAutorizacion("CveAutorizacion").ToString().ToEntero()
HdnPorcentajeDescuentoMaximo.Value = RowAutorizacion("PorcentajeDescuento").ToString()
RVPorDesc.MaximumValue = HdnPorcentajeDescuentoMaximo.Value
RVPorDesc.ErrorMessage = $"El rango para el % de descuento debe de estar entre <b>0</b> y <b>{HdnPorcentajeDescuentoMaximo.Value.ToDecimal().FormatoNumero}</b>."
End If
End If
ObjVentas.Dispose()
TxtPorDescP.Attributes.Clear()
TxtPorDescP.Attributes.Add("onKeyUp", "CalculaDescuentoAdicional();")
TxtDescP.Attributes.Clear()
TxtDescP.Attributes.Add("onKeyUp", "CalculaDescuentoMontoAdicional();")
UPPDescuento.Update()
RegistraScript("AbrirModalDescuentoAdicional();")
End Sub
End Class End Class

View File

@@ -103,7 +103,7 @@
<div class="col-md-12"> <div class="col-md-12">
<asp:GridView ID="GvRefacturaciones" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron solicitudes de cancelación" <asp:GridView ID="GvRefacturaciones" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron solicitudes de cancelación"
DataKeyNames="CveVenta,CveCliente,Folio,TipoDocto,Nombre,FolioFiscal,Total,SubTotal,RFCCliente,FolioFiscalSustitucion" DataKeyNames="CveVenta,CveCliente,Folio,TipoDocto,Nombre,FolioFiscal,Total,SubTotal,RFCCliente,FolioFiscalSustitucion,CveEstatusFactura"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" GridLines="None" Width="99%" OnRowDataBound="GvDatos_RowDataBound"> CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" GridLines="None" Width="99%" OnRowDataBound="GvDatos_RowDataBound">
<Columns> <Columns>
<asp:BoundField HeaderText="Cliente" DataField="Nombre" ItemStyle-Width="25%" /> <asp:BoundField HeaderText="Cliente" DataField="Nombre" ItemStyle-Width="25%" />

View File

@@ -129,10 +129,11 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
string TipoDocto = GvRow.DataKey("TipoDocto"); string TipoDocto = GvRow.DataKey("TipoDocto");
string Nombre = GvRow.DataKey("Nombre"); string Nombre = GvRow.DataKey("Nombre");
string FolioSustitucion = GvRow.DataKey("FolioFiscalSustitucion"); string FolioSustitucion = GvRow.DataKey("FolioFiscalSustitucion");
int CveEstatusFactura = GvRow.DataKey("CveEstatusFactura").ToEntero();
if (CveVenta > 0 && Uuid != "") if (CveVenta > 0 && Uuid != "")
{ {
var respuesta = VerificarVigenciaSAT(CveVenta, CveCliente, Folio, TipoDocto, Uuid, UsuarioActual.Empresa.RFC, RFCCliente, Total, true, FolioSustitucion); var respuesta = VerificarVigenciaSAT(CveVenta, CveCliente, Folio, TipoDocto, Uuid, UsuarioActual.Empresa.RFC, RFCCliente, Total, EsRefacturacion: true, FolioSustitucion: FolioSustitucion, CveEstatusFactura: CveEstatusFactura);
CargaDatos(); CargaDatos();
if (respuesta.CveEstatus.Contiene(4, 5)) if (respuesta.CveEstatus.Contiene(4, 5))
{ {
@@ -186,7 +187,11 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
var EnviarAcuse = false; var EnviarAcuse = false;
if (respCancelacion.CveEstatus > 0) if (respCancelacion.CveEstatus > 0)
{ {
EnviarAcuse = true; if (respCancelacion.CveEstatus.Contiene(5, 20))
{
EnviarAcuse = true;
}
var CveEstatus = respCancelacion.CveEstatus; var CveEstatus = respCancelacion.CveEstatus;
var ObjVentas = new ClsVentas(); var ObjVentas = new ClsVentas();
if (ObjVentas.UpdateEstatusVenta(CveVenta, CveEstatus, UsuarioActual.CveEmpresa)) if (ObjVentas.UpdateEstatusVenta(CveVenta, CveEstatus, UsuarioActual.CveEmpresa))
@@ -194,6 +199,8 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
if (respCancelacion.CveEstatus == 20) if (respCancelacion.CveEstatus == 20)
{ {
sb.Append("El estatus de la factura fue cambiado a 'Cancelación en proceso'."); sb.Append("El estatus de la factura fue cambiado a 'Cancelación en proceso'.");
sb.Append("El documento se canceló correctamente.");
sb.Append($"</br> <a href='/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=CAN&CVEVTA={CveVenta}")}' class='Texto' target='_blank'>Imprimir Acuse</a>");
} }
else if (respCancelacion.CveEstatus == 23) else if (respCancelacion.CveEstatus == 23)
{ {
@@ -202,6 +209,8 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
else else
{ {
sb.Append("El estatus de la factura fue cambiado a 'Cancelada'."); sb.Append("El estatus de la factura fue cambiado a 'Cancelada'.");
sb.Append("El documento se canceló correctamente.");
sb.Append($"</br> <a href='/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=CAN&CVEVTA={CveVenta}")}' class='Texto' target='_blank'>Imprimir Acuse</a>");
} }
} }
@@ -210,9 +219,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
sb.Append("Ocurrió un error al cambiar el estatus de la factura."); sb.Append("Ocurrió un error al cambiar el estatus de la factura.");
} }
ObjVentas.Dispose(); ObjVentas.Dispose();
sb.Append("El documento se canceló correctamente.");
sb.Append($"</br> <a href='/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=CAN&CVEVTA={CveVenta}")}' class='Texto' target='_blank'>Imprimir Acuse</a>");
sb.Append("</br></br> ¿Desea enviar el Acuse de Cancelación al Cliente?");
} }
else else
{ {
@@ -221,6 +228,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
if (EnviarAcuse) if (EnviarAcuse)
{ {
sb.Append("</br></br> ¿Desea enviar el Acuse de Cancelación al Cliente?");
Alert(sb.ToString(), TipoMensaje.MsgConfirmacion, "BtnEnviarMailCancelacion();", TextoConfirmacion: "Enviar", TextoSegundoBoton: "Cancelar"); Alert(sb.ToString(), TipoMensaje.MsgConfirmacion, "BtnEnviarMailCancelacion();", TextoConfirmacion: "Enviar", TextoSegundoBoton: "Cancelar");
} }
else else
@@ -238,7 +246,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
UPDatos.Update(); UPDatos.Update();
} }
private MRespuestaSAT VerificarVigenciaSAT(int CveVenta, int CveCliente, string Folio, string TipoDocto, string uuid, string emisor, string receptor, string total, bool EsRefacturacion = false, string FolioSustitucion = "") private MRespuestaSAT VerificarVigenciaSAT(int CveVenta, int CveCliente, string Folio, string TipoDocto, string uuid, string emisor, string receptor, string total, bool EsRefacturacion = false, string FolioSustitucion = "", int CveEstatusFactura = -1)
{ {
//HdnLigaRefacturar.Value = ""; //HdnLigaRefacturar.Value = "";
@@ -301,14 +309,22 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
} }
else else
{ {
if ((resp.EsCancelable.ToUpper() == "NO CANCELABLE")) //SI ES REFACTURACION Y SE MANDO LA SOLICITUD, PERO NO APARECE EL ESTATUS DE CANCELACION, DEBE PONERSE COMO CANCELACION PENDIENTE
if (EsRefacturacion && CveEstatusFactura == 20 && resp.Estado.ToUpper().Trim() == "VIGENTE" && string.IsNullOrEmpty(resp.EstatusCancelacion))
{ {
sb.Append("Esta factura no es cancelable."); CveEstatus = 23;
retorno.Mensaje = sb.ToString(); var ObjVentas = new ClsVentas();
return retorno; if (ObjVentas.UpdateEstatusVenta(CveVenta, CveEstatus, UsuarioActual.CveEmpresa))
{
sb.Append("El estatus de la factura fue cambiado a 'Cancelación Pendiente'.");
}
else
{
sb.Append("Ocurrió un error al cambiar el estatus de la factura.");
}
ObjVentas.Dispose();
} }
else if (resp.Estado.ToUpper().Trim() == "CANCELADO" || resp.EstatusCancelacion.ToUpper() == "PLAZO VENCIDO")
if (resp.Estado.ToUpper().Trim() == "CANCELADO" || resp.EstatusCancelacion.ToUpper() == "PLAZO VENCIDO")
{ {
CveEstatus = 5; CveEstatus = 5;
@@ -377,7 +393,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
} }
ObjVentas.Dispose(); ObjVentas.Dispose();
} }
else if (resp.Estado.ToUpper().Trim() == "VIGENTE" && string.IsNullOrEmpty(resp.EstatusCancelacion)) else if (resp.Estado.ToUpper().Trim() == "VIGENTE" && string.IsNullOrEmpty(resp.EstatusCancelacion) && !EsRefacturacion)
{ {
//ASIGNAMOS ESTATUS EMITIDA //ASIGNAMOS ESTATUS EMITIDA
CveEstatus = 3; CveEstatus = 3;
@@ -392,6 +408,12 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
} }
ObjVentas.Dispose(); ObjVentas.Dispose();
} }
else if ((resp.EsCancelable.ToUpper() == "NO CANCELABLE"))
{
sb.Append("Esta factura no es cancelable.");
retorno.Mensaje = sb.ToString();
return retorno;
}
} }
} }
else else
@@ -586,7 +608,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
byte[] ObjetoPDF = DescargarPDF(Encripta(String.Format("OP=CAN&CVEVTA={0}", CveVenta))); byte[] ObjetoPDF = DescargarPDF(Encripta(String.Format("OP=CAN&CVEVTA={0}", CveVenta)));
List <ClsSisMail.ArchivoMail> LSRutasMail = new List<ClsSisMail.ArchivoMail>(); List<ClsSisMail.ArchivoMail> LSRutasMail = new List<ClsSisMail.ArchivoMail>();
string Asunto = string.Empty; string Asunto = string.Empty;
string Cuerpo = string.Empty; string Cuerpo = string.Empty;

View File

@@ -5017,7 +5017,7 @@ Partial Class Ventas
End If End If
'CargaAcuseCancelacion 'CargaAcuseCancelacion
If DbRowVenta("CveEstatusFactura").ToString() = "5" Then If DbRowVenta("CveEstatusFactura").ToString().Contiene("5", "20") Then
ImgDownCancelacion.Visible = True ImgDownCancelacion.Visible = True
ImgDownCancelacion.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CAN&CVEVTA={0}", CveVenta))) ImgDownCancelacion.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CAN&CVEVTA={0}", CveVenta)))
End If End If
@@ -8984,7 +8984,6 @@ Partial Class Ventas
End If End If
Dim SerieFolioNCProntoPago As String = "" Dim SerieFolioNCProntoPago As String = ""
Dim CveVentaNCProntoPago As Integer = -1 Dim CveVentaNCProntoPago As Integer = -1
Dim GeneroDescuentoProntoPago As Boolean = False
'SOLO GENERAR NC POR DESCUENTO PRONTO PAGO SI EL PAGO ES DE CONTADO 'SOLO GENERAR NC POR DESCUENTO PRONTO PAGO SI EL PAGO ES DE CONTADO
If ErrorList.Count = 0 AndAlso RBLPago.SelectedValue = "2" AndAlso ObjFactura.DescuentoProntoPago > 0 Then If ErrorList.Count = 0 AndAlso RBLPago.SelectedValue = "2" AndAlso ObjFactura.DescuentoProntoPago > 0 Then
@@ -8994,13 +8993,13 @@ Partial Class Ventas
If (ImportePagado + ImporteRNC + ObjFactura.DescuentoProntoPago) >= ObjFactura.Total Then If (ImportePagado + ImporteRNC + ObjFactura.DescuentoProntoPago) >= ObjFactura.Total Then
Dim RespFacturaProntoPago = GenerarNCProntoPago(ObjVentas.IniciaTransacSQL(), ObjClientes, ObjContPaq, ObjFactura) Dim RespFacturaProntoPago = GenerarNCProntoPago(ObjVentas.IniciaTransacSQL(), ObjClientes, ObjContPaq, ObjFactura)
If RespFacturaProntoPago.ObjFacturaProntoPago Is Nothing OrElse RespFacturaProntoPago Is Nothing Then If RespFacturaProntoPago.ObjFacturaProntoPago Is Nothing OrElse RespFacturaProntoPago Is Nothing Then
ErrorList.Add("No se pudo generar la nota de crédito de pronto pago") ErrorList.Add("No se pudo generar la nota de crédito de pronto pago")
Else Else
If RespFacturaProntoPago.Mensaje.CveVenta <= 0 OrElse RespFacturaProntoPago.Mensaje.TieneError Then If RespFacturaProntoPago.Mensaje.CveVenta <= 0 OrElse RespFacturaProntoPago.Mensaje.TieneError Then
ErrorList.Add("No se pudo generar la nota de crédito de pronto pago") ErrorList.Add("No se pudo generar la nota de crédito de pronto pago")
Else Else
GeneroDescuentoProntoPago = True
CveVentaNCProntoPago = RespFacturaProntoPago.Mensaje.CveVenta CveVentaNCProntoPago = RespFacturaProntoPago.Mensaje.CveVenta
SerieFolioNCProntoPago = RespFacturaProntoPago.Mensaje.SerieFolio SerieFolioNCProntoPago = RespFacturaProntoPago.Mensaje.SerieFolio
@@ -17798,7 +17797,7 @@ Partial Class Ventas
End If End If
End If End If
ObjDescuento.ImporteDescuento = Descuento ObjDescuento.ImporteDescuento = Descuento.RoundSQL(2)
ObjDescuento.CvePromocionDetalle = CvePromocionDetalle ObjDescuento.CvePromocionDetalle = CvePromocionDetalle
If SeAjustoPU Then If SeAjustoPU Then
ObjDescuento.PU = PUModificado ObjDescuento.PU = PUModificado
@@ -21745,16 +21744,21 @@ Partial Class Ventas
Dim DtCC As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa) Dim DtCC As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa)
DdlCuentaEfectivo.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) 'MOSTRAR SOLO CUENTAS DE CONTADO EN BDH
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
DdlCuentaEfectivo.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 0", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
DdlCuentaCheque.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 0", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
Else
DdlCuentaEfectivo.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
DdlCuentaCheque.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
End If
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
DdlCuentaTarjetaCredito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) DdlCuentaTarjetaCredito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
DdlCuentaTarjetaDebito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) DdlCuentaTarjetaDebito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
DdlCuentaCheque.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
Else Else
DdlCuentaTarjetaCredito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND (CveTipoCuenta <> 1 OR TieneTerminal = 1)", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) DdlCuentaTarjetaCredito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND (CveTipoCuenta <> 1 OR TieneTerminal = 1)", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
DdlCuentaTarjetaDebito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND (CveTipoCuenta <> 1 OR TieneTerminal = 1)", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) DdlCuentaTarjetaDebito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND (CveTipoCuenta <> 1 OR TieneTerminal = 1)", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
DdlCuentaCheque.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
End If End If
DdlCuentaTransferencia.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) DdlCuentaTransferencia.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
@@ -23724,7 +23728,7 @@ Partial Class Ventas
Alert("No se pudo encontrar el estatus de la factura en el SAT.", TipoMensaje.MsgAdvertencia) Alert("No se pudo encontrar el estatus de la factura en el SAT.", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
End If End If
MostrarRemisionesCancelar()
sb.Append("<b>No encontrado</b> <br/>") sb.Append("<b>No encontrado</b> <br/>")
sb.Append("Está seguro de cancelar el documento?.") sb.Append("Está seguro de cancelar el documento?.")
Else Else
@@ -23737,10 +23741,12 @@ Partial Class Ventas
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable) sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
If Vigencia.EsCancelable.ToUpper() <> "NO CANCELABLE" Then If Vigencia.EsCancelable.ToUpper() <> "NO CANCELABLE" Then
MostrarRemisionesCancelar()
sb.Append("Está seguro de cancelar el documento?.") sb.Append("Está seguro de cancelar el documento?.")
End If End If
End If End If
Else Else
MostrarRemisionesCancelar()
sb.Append("<b>No encontrado</b> <br/>") sb.Append("<b>No encontrado</b> <br/>")
sb.Append("Está seguro de cancelar el documento?.") sb.Append("Está seguro de cancelar el documento?.")
End If End If
@@ -23764,6 +23770,24 @@ Partial Class Ventas
End If End If
End Sub End Sub
Private Sub MostrarRemisionesCancelar()
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing") AndAlso DivCanRem.Visible Then
ChkCanRem.Checked = True
ChkCanRem_CheckedChanged(ChkCanRem, EventArgs.Empty)
ChkCanRem.Enabled = False
If DivGvCancelarRemision.Visible Then
For Each GvRow As GridViewRow In GvCancelarRemisiones.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
GvRow.FCCheckBox("ChkCancelarRemision").Checked = True
GvRow.FCCheckBox("ChkCancelarRemision").Enabled = False
End If
Next
End If
End If
End Sub
Protected Sub ChkDevAlm_CheckedChanged(sender As Object, e As EventArgs) Protected Sub ChkDevAlm_CheckedChanged(sender As Object, e As EventArgs)
MostrarCondicionesCancelacion() MostrarCondicionesCancelacion()
End Sub End Sub
@@ -33245,9 +33269,6 @@ Partial Class Ventas
ObjFacturaProntoPago.FormaPago33 = "Aplicación de anticipos" ObjFacturaProntoPago.FormaPago33 = "Aplicación de anticipos"
ObjFacturaProntoPago.FormaPagoSAT33 = "30" ObjFacturaProntoPago.FormaPagoSAT33 = "30"
ObjFacturaProntoPago.MetodoPago = ""
ObjFacturaProntoPago.ClaveMetodoPagoSAT = GlobalDTMetodosPago.FiltroPrimeroValor("ClaveSAT", $"CveMetodoPago = {ObjFacturaProntoPago.CveMetodoPago33}")
ObjFacturaProntoPago.CveSubProyecto = CveSubProyecto ObjFacturaProntoPago.CveSubProyecto = CveSubProyecto
ObjFacturaProntoPago.SetSubProyecto() ObjFacturaProntoPago.SetSubProyecto()
@@ -33280,9 +33301,7 @@ Partial Class Ventas
ObjFacturaProntoPago.CveTipoRelacion = 7 ObjFacturaProntoPago.CveTipoRelacion = 7
ObjFacturaProntoPago.TipoRelacion = "07" ObjFacturaProntoPago.TipoRelacion = "07"
Dim Fol As New List(Of String) ObjFacturaProntoPago.UUIDRelacionados = New List(Of String)
Fol.Add(ObjFactura.FolioFiscal)
ObjFacturaProntoPago.UUIDRelacionados = Fol
Select Case ObjFacturaProntoPago.TipoDocto Select Case ObjFacturaProntoPago.TipoDocto
Case "Ing" Case "Ing"
@@ -33346,17 +33365,17 @@ Partial Class Ventas
ObjFacturaProntoPago.DtVentasNC = DtVentasNC ObjFacturaProntoPago.DtVentasNC = DtVentasNC
ObjFacturaProntoPago.Timbre = PreParaTimbre(ObjFacturaProntoPago)
Resp = ObjFacturaProntoPago.EmitirFactura(False, Transac:=SqlTransaccion, ObjContPaqTransac:=ObjConta) Resp = ObjFacturaProntoPago.EmitirFactura(False, Transac:=SqlTransaccion, ObjContPaqTransac:=ObjConta)
ObjFacturaProntoPago.Dispose() Retorno.ObjFacturaProntoPago = ObjFacturaProntoPago
Catch ex As Exception Catch ex As Exception
Resp.CveVenta = -1 Resp.CveVenta = -1
Resp.TieneError = True Resp.TieneError = True
OnError("Ocurrio un error al generar la nota de credito de pronto pago", ex) OnError("Ocurrio un error al generar la nota de credito de pronto pago", ex)
End Try End Try
Retorno.ObjFacturaProntoPago = ObjFacturaProntoPago
Retorno.Mensaje = Resp Retorno.Mensaje = Resp
Return Retorno Return Retorno
@@ -33369,7 +33388,7 @@ Partial Class Ventas
PorcentajeRetISR As Double, ImporteRetISR As Double, PorcentajeIEPS As Double, ImporteIEPS As Double, TipoDescuento As Integer, Descuento As Double, PorcentajeRetISR As Double, ImporteRetISR As Double, PorcentajeIEPS As Double, ImporteIEPS As Double, TipoDescuento As Integer, Descuento As Double,
Total As Double, Serie As String, TiempoEntrega As String, CvePresupuestoIngreso As Integer, EntregaDirecta As Integer, SATClaveProdServ As String, Total As Double, Serie As String, TiempoEntrega As String, CvePresupuestoIngreso As Integer, EntregaDirecta As Integer, SATClaveProdServ As String,
SATClaveUM As String, CveContratoDetalle As Integer, CveVentaDetalle As Integer, CveMovimientoDetallePedido As Integer, CveOrdenCompraDetalle As Integer, SATClaveUM As String, CveContratoDetalle As Integer, CveVentaDetalle As Integer, CveMovimientoDetallePedido As Integer, CveOrdenCompraDetalle As Integer,
CveVentaDetalleRemision As Integer, CveVentaDetalleCotizacion As Integer) CveVentaDetalleRemision As Integer, CveVentaDetalleCotizacion As Integer, CodigoObjetoImpuesto As String)
Dim Row As DataRow = Nothing Dim Row As DataRow = Nothing
Row = TmpDT.NewRow() Row = TmpDT.NewRow()
@@ -33418,6 +33437,7 @@ Partial Class Ventas
Row("EntregaDirecta") = EntregaDirecta Row("EntregaDirecta") = EntregaDirecta
Row("SATClaveProdServ") = SATClaveProdServ Row("SATClaveProdServ") = SATClaveProdServ
Row("SATClaveUM") = SATClaveUM Row("SATClaveUM") = SATClaveUM
Row("CodigoObjetoImpuesto") = CodigoObjetoImpuesto
'Contratos 'Contratos
Row("CveContratoDetalle") = CveContratoDetalle Row("CveContratoDetalle") = CveContratoDetalle
@@ -33471,7 +33491,7 @@ Partial Class Ventas
DrPS("CveUM").ToString.ToEntero, DrPS("UnidadMedida").ToString, DrPS("CveClasificacion").ToString.ToEntero, DrPS("Clasificacion").ToString, CveProyecto, CveSubProyecto, DrPS("CveUM").ToString.ToEntero, DrPS("UnidadMedida").ToString, DrPS("CveClasificacion").ToString.ToEntero, DrPS("Clasificacion").ToString, CveProyecto, CveSubProyecto,
"", Cantidad, Dr("ImportePU").ToString.ToDecimal, Dr("PorcentajeIVA").ToString.ToDecimal, Dr("ImporteIVA").ToString.ToDecimal, Dr("PorcentajeRetIVA").ToString.ToDecimal, Dr("ImporteRetIVA").ToString.ToDecimal, "", Cantidad, Dr("ImportePU").ToString.ToDecimal, Dr("PorcentajeIVA").ToString.ToDecimal, Dr("ImporteIVA").ToString.ToDecimal, Dr("PorcentajeRetIVA").ToString.ToDecimal, Dr("ImporteRetIVA").ToString.ToDecimal,
Dr("PorcentajeRetISR").ToString.ToDecimal, Dr("ImporteRetISR").ToString.ToDecimal, Dr("PorcentajeIEPS").ToString.ToDecimal, Dr("ImporteIEPS").ToString.ToDecimal, -1, 0.0, Dr("ImporteTotal").ToString.ToDecimal, "", "", -1, -1, Dr("PorcentajeRetISR").ToString.ToDecimal, Dr("ImporteRetISR").ToString.ToDecimal, Dr("PorcentajeIEPS").ToString.ToDecimal, Dr("ImporteIEPS").ToString.ToDecimal, -1, 0.0, Dr("ImporteTotal").ToString.ToDecimal, "", "", -1, -1,
DrPS("SATClavePS").ToString, DrPS("SATClaveUnidadMedida").ToString, -1, -1, -1, -1, -1, -1) DrPS("SATClavePS").ToString, DrPS("SATClaveUnidadMedida").ToString, -1, -1, -1, -1, -1, -1, DrPS("CodigoObjetoImpuesto").ToString())
Next Next
End Sub End Sub
@@ -33640,6 +33660,7 @@ Partial Class Ventas
TmpDT.Columns.Add("ClaveSATUnidadAduana", GetType(String)) TmpDT.Columns.Add("ClaveSATUnidadAduana", GetType(String))
TmpDT.Columns.Add("ClaveSATFraccionArancelariaDescripcion", GetType(String)) TmpDT.Columns.Add("ClaveSATFraccionArancelariaDescripcion", GetType(String))
TmpDT.Columns.Add("ClaveSATUnidadAduanaDescripcion", GetType(String)) TmpDT.Columns.Add("ClaveSATUnidadAduanaDescripcion", GetType(String))
TmpDT.Columns.Add("CodigoObjetoImpuesto", GetType(String))
TmpDT.Columns.Add("CveTamaño", GetType(Integer)) TmpDT.Columns.Add("CveTamaño", GetType(Integer))
TmpDT.Columns.Add("EsCargo", GetType(Boolean)) TmpDT.Columns.Add("EsCargo", GetType(Boolean))
@@ -34353,22 +34374,5 @@ Partial Class Ventas
UpEmitirTransitorio.Update() UpEmitirTransitorio.Update()
End Sub End Sub
#End Region #End Region
Protected Sub RdTipoPersona_SelectedIndexChanged(sender As Object, e As EventArgs)
DVRegimenSociedad.Visible = False
DivRazonSocial2.Attributes.Add("class", "col-md-12")
If RdTipoPersona.SelectedValue.ToEntero = 1 And UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
DivRazonSocial2.Attributes.Add("class", "col-md-8")
DVRegimenSociedad.Visible = True
End If
UpAgregarCliente.Update()
End Sub
End Class End Class

View File

@@ -462,6 +462,12 @@