Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -3267,13 +3267,18 @@ Public Class ClsBancos
|
||||
|
||||
' Return Retorno
|
||||
'End Function
|
||||
Public Function UpdateCuentaDepositoPagoElectronico(CveCuentaDeposito As Integer) As Boolean
|
||||
Public Function UpdateCuentaDepositoPagoElectronico(CveCuentaDeposito As Integer, Optional Opcion As Integer = 1, Optional FechaEliminacion As Date = MinFecha) As Boolean
|
||||
|
||||
'Opcion 1: Bancomer, Opcion 2: Bajio, Opcion 3: Scotia
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Banc_LayoutCuentaDepositoUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito
|
||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
.Add("@FechaEliminacion", SqlDbType.Date).Value = FechaEliminacion
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -3431,7 +3431,7 @@ Public Class ClsVentas
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetReporteVentasUtilidad(CveVendedor As String, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer, EsGarantia As Integer) As Boolean
|
||||
Public Function GetReporteVentasUtilidad(CveVendedor As String, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer, EsGarantia As Integer, CveProveedorCompra As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasUtilidadGet")
|
||||
|
||||
@@ -3447,6 +3447,7 @@ Public Class ClsVentas
|
||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||
.Add("@EsGarantia", SqlDbType.Int).Value = EsGarantia
|
||||
.Add("@CveProveedorCompra", SqlDbType.Int).Value = CveProveedorCompra
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -3461,7 +3462,7 @@ Public Class ClsVentas
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetReporteVentasUtilidadDetalle(CveVendedor As String, CveVenta As Integer, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer, EsGarantia As Integer) As Boolean
|
||||
Public Function GetReporteVentasUtilidadDetalle(CveVendedor As String, CveVenta As Integer, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer, EsGarantia As Integer, CveProveedorCompra As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasUtilidadDetalleGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -3477,6 +3478,7 @@ Public Class ClsVentas
|
||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||
.Add("@EsGarantia", SqlDbType.Int).Value = EsGarantia
|
||||
.Add("@CveProveedorCompra", SqlDbType.Int).Value = CveProveedorCompra
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -3495,7 +3497,7 @@ Public Class ClsVentas
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetReportePadreVentasUtilidad(CveVendedor As String, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, Gpo As Integer,
|
||||
CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer, EsGarantia As Integer, EsFilial As Integer) As Boolean
|
||||
CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer, EsGarantia As Integer, EsFilial As Integer, CveProveedorCompra As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_RepVentasUtilidadGet")
|
||||
|
||||
@@ -3513,6 +3515,7 @@ Public Class ClsVentas
|
||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||
.Add("@EsGarantia", SqlDbType.Int).Value = EsGarantia
|
||||
.Add("@EsFilial", SqlDbType.Int).Value = EsFilial
|
||||
.Add("@CveProveedorCompra", SqlDbType.Int).Value = CveProveedorCompra
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.SelectCommand.CommandTimeout = 0
|
||||
|
||||
@@ -60,15 +60,20 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
Dim CveClienteSucursal As Integer = -1 ' DdlClienteSucursalSucursal()
|
||||
Dim CveVendedor As Integer = If(context.Request("CveVendedor") IsNot Nothing, context.Request("CveVendedor").ToEntero, -1)
|
||||
Dim CveEstatus As Integer = -1
|
||||
Dim ObjOS As New ClsOS
|
||||
|
||||
Dim ObjOS As New ClsOS
|
||||
|
||||
If CveVendedor > 0 AndAlso CveUsuarioPara = -1 Then
|
||||
Dim tcveu As Integer = ClsPaginas.GlobalDTUsuarios(-1, CveEmpresa).FiltroPrimeroValor("CveUsuario", $"CveVendedor = {CveVendedor}").ToEntero
|
||||
CveUsuarioPara = tcveu
|
||||
End If
|
||||
|
||||
If ObjOS.GetRepOrdenesServicioMedicasRep(FechaI, FechaF, Cvecliente, CveVendedor, CveEstatus, CveUsuarioPara, -1, CveEmpresa,
|
||||
CveMedico:=-1, CveProcedimiento:=-1, CveEspecialidad:=-1,
|
||||
CveClienteSucursal:=CveClienteSucursal, CveUsuario:=CveUsuario) Then
|
||||
|
||||
If ObjOS.DtResultados IsNot Nothing AndAlso ObjOS.DtResultados.Rows.Count > 0 Then
|
||||
events = New List(Of CalendarEvent)
|
||||
For Each dr As DataRow In ObjOS.DtResultados.Rows
|
||||
For Each dr As DataRow In ObjOS.DtResultados.FiltraParametros("CveOS > 0").Rows
|
||||
Dim cevent As CalendarEvent = New CalendarEvent()
|
||||
cevent.id = dr("CveOS").ToString.ToEntero
|
||||
cevent.title = $" {dr("Tecnico")}-{dr("NombreCliente")}"
|
||||
|
||||
@@ -178,7 +178,7 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState
|
||||
Dim TieneError As Boolean = False
|
||||
Dim CveSubProyecto As String = "11790"
|
||||
Dim JsonRequest As JObject = Nothing
|
||||
|
||||
Dim Bitac As New StringBuilder
|
||||
If context.Request.InputStream IsNot Nothing Then
|
||||
Using reader As New StreamReader(context.Request.InputStream)
|
||||
Dim json = reader.ReadToEnd
|
||||
@@ -190,7 +190,7 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
|
||||
Bitac.AppendLine("Inicio Pago ")
|
||||
Dim UsuarioActual As Usuario = ValidaUsuarioSistema(100, CveEmpresa)
|
||||
Dim data As New JArray
|
||||
Dim dtt As New DataTable
|
||||
@@ -204,7 +204,7 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState
|
||||
Dim pCveVenta As Integer = JsonRequest("cveventa").ToString.ToEntero
|
||||
Dim Referencia As String = ""
|
||||
'validaciones
|
||||
|
||||
Bitac.AppendLine("Validaciones Pago 1.0")
|
||||
Dim ObjVenta As New ClsVentas()
|
||||
Dim ObjClientes As New ClsClientes
|
||||
If ObjVenta.GetVenta(pCveVenta, CveEmpresa) Then
|
||||
@@ -228,6 +228,7 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState
|
||||
VentaRemision.PorcentajeIVA = dr("PorcentajeIVA").ToString.ToDecimal
|
||||
VentaRemision.CveSubProyecto = dr("CveSubProyecto").ToString.ToEntero
|
||||
|
||||
Bitac.AppendLine("Crear Nueva 1.0")
|
||||
Dim ObjFactura = Modelos.Factura.CrearVentaNueva(UsuarioActual, VentaRemision.CveSubProyecto, VentaRemision.CveCliente, VentaRemision.CveMoneda, "Ing")
|
||||
ObjFactura.CveMoneda = VentaRemision.CveMoneda
|
||||
ObjFactura.CveVendedor = dr("CveVendedor").ToString.ToEntero
|
||||
@@ -258,15 +259,15 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
If CvePrePoliza > 0 Then
|
||||
'registro de venta y pago
|
||||
|
||||
Bitac.AppendLine("Emitir 1.0")
|
||||
Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing
|
||||
Retorno = ObjFactura.EmitirFactura(False, Transac:=ObjVentas.IniciaTransacSQL(), Modulo:="Cobranza/GuardarVenta", MostrarURL:=True)
|
||||
Retorno = ObjFactura.EmitirFactura(False, Transac:=ObjVentas.IniciaTransacSQL(), Modulo:="Kiosko140/GuardarVenta", MostrarURL:=True)
|
||||
Retorno.Factura = ObjFactura
|
||||
|
||||
If Retorno IsNot Nothing AndAlso Retorno.CveVenta > 0 Then
|
||||
VentaRemision.CveVenta = ObjFactura.CveVenta
|
||||
'Respuesta.data = Retorno.SerieFolio
|
||||
|
||||
Bitac.AppendLine("Venta Registada")
|
||||
If TieneError Then
|
||||
Dim sb As New StringBuilder()
|
||||
For Each msg As String In Retorno.Mensajes
|
||||
@@ -274,6 +275,7 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState
|
||||
Next
|
||||
RespuestaError.message = sb.ToString()
|
||||
End If
|
||||
Bitac.AppendLine("Inicia Registro IE")
|
||||
'11- tdd, 12-tdc
|
||||
Dim CveIE As Integer = ObjIE.AddBancos_IE(CveCuentaBancaria, CveTipoTransaccion, FechaPago, "-1", "", ImportePago, VentaRemision.CveMoneda,
|
||||
VentaRemision.TC, "", "", False, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
@@ -288,20 +290,25 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState
|
||||
Pago.ImportePago = ImportePago
|
||||
Pago.ImportePagoVenta = ImportePago
|
||||
Pago.Referencia = Referencia
|
||||
|
||||
Bitac.AppendLine("IE Registrado")
|
||||
If MsgError = "" AndAlso ClsPaginas.AplicaPrePolizaPagoVenta(VentaRemision, Pago, CvePrePoliza, ObjConta) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
Else
|
||||
MsgError = "No se pudo insertar el pago"
|
||||
Bitac.AppendLine("IE NO Registrado")
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
MsgError = "Falta información para completar la venta."
|
||||
Bitac.AppendLine("Venta NO Registrado - ")
|
||||
Bitac.AppendLine(Retorno.Mensajes(0))
|
||||
End If
|
||||
End If
|
||||
Bitac.AppendLine("Registrados")
|
||||
|
||||
If Not TieneError Then
|
||||
Dim bytesPDF As Byte() = DescargarFactura(ObjFactura.SerieFolio, CveEmpresa, ObjFactura.CveVenta) 'ClsPaginas.PdfFactura(ObjFactura, AplicaPagare:="0", Guardar:=True, RegenerarQR:=True, EsTicket:=False)
|
||||
Dim bytesPDF As Byte() = Nothing ' DescargarFactura(ObjFactura.SerieFolio, CveEmpresa, ObjFactura.CveVenta) 'ClsPaginas.PdfFactura(ObjFactura, AplicaPagare:="0", Guardar:=True, RegenerarQR:=True, EsTicket:=False)
|
||||
|
||||
'generar el pdf y mandarlo
|
||||
Dim objretorno As New JObject(
|
||||
@@ -313,12 +320,15 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState
|
||||
Respuesta.data = data
|
||||
ObjConta.RollBack()
|
||||
'ObjConta.Commit()
|
||||
Bitac.AppendLine("Completado.")
|
||||
Else
|
||||
ObjConta.RollBack()
|
||||
Bitac.AppendLine("NO Completado.")
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
ObjIE.Dispose()
|
||||
End If
|
||||
Bitac.ToString.GuardaLog
|
||||
End If
|
||||
ObjVenta.Dispose()
|
||||
ObjClientes.Dispose()
|
||||
|
||||
@@ -105,11 +105,17 @@
|
||||
<td>
|
||||
<asp:Label runat="server" ID="LbNumeroInterbancarias" Width="80px"></asp:Label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr runat="server" id="TRNumBancomer" visible="true">
|
||||
<td>Bancomer:</td>
|
||||
<td>
|
||||
<asp:Label runat="server" ID="LbNumeroBancomer" Width="80px"></asp:Label></td>
|
||||
</tr>
|
||||
|
||||
<tr runat="server" id="TRNumScotia" visible="false">
|
||||
<td>Scotia Bank:</td>
|
||||
<td>
|
||||
<asp:Label runat="server" ID="LbNumeroScotia" Width="80px"></asp:Label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center">
|
||||
<asp:Button runat="server" ID="BtnGenerarAlta" Text="Generar Alta" OnClick="BtnAltas_Click" class="btn btn-primary" />
|
||||
@@ -157,7 +163,7 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -619,6 +625,71 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<div id="ModalDescarga" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlModalTituloDescarga" runat="server">Descarga Layout</asp:Literal></h4>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpModalDescarga" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12" runat="server" id="DVDescargaPagos" visible=" false" >
|
||||
<p> Pagos Descarga <asp:LinkButton runat="server" ID="LnkDescarga" OnClick="LnkDescarga_Click" CssClass="Texto"></asp:LinkButton> </p>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" runat="server" id="DVDescargaCuentas1" visible=" false" >
|
||||
<p><asp:Label runat="server" ID="LblCuentas" Text="Cuentas Bancomer"></asp:Label> <asp:LinkButton runat="server" ID="LnkDescargaCuentas1" OnClick="LnkDescargaCuentas1_Click" CssClass="Texto"></asp:LinkButton> </p>
|
||||
</div>
|
||||
|
||||
<%--<div class="col-md-12" runat="server" id="DVDescargaCuentas2" visible=" false">
|
||||
<p> Cuentas Interbancarias <asp:LinkButton runat="server" ID="LnkDescargaCuentas2" OnClick="LnkDescargaCuentas2_Click" CssClass="Texto"></asp:LinkButton> </p>
|
||||
</div>
|
||||
<div class="col-md-12" runat="server" id="DVDescargaCuentas3" visible=" false">
|
||||
<p> Cuentas Convennios CIE <asp:LinkButton runat="server" ID="LnkDescargaCuentas3" OnClick="LnkDescargaCuentas3_Click" CssClass="Texto"></asp:LinkButton> </p>
|
||||
</div>
|
||||
--%>
|
||||
|
||||
<div class="col-md-12" runat="server" id="DVDescargaReporte" visible=" false">
|
||||
<p> <asp:LinkButton runat="server" ID="LnkDescargaReporte" OnClick="LnkDescargaReporte_Click" CssClass="Texto" Text="Descargar Reporte"></asp:LinkButton> </p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkDescarga" />
|
||||
<asp:PostBackTrigger ControlID="LnkDescargaCuentas1" />
|
||||
<%-- <asp:PostBackTrigger ControlID="LnkDescargaCuentas2" />
|
||||
<asp:PostBackTrigger ControlID="LnkDescargaCuentas3" />--%>
|
||||
<asp:PostBackTrigger ControlID="LnkDescargaReporte" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:Button ID="BtnReporteAltaCarga" ClientIDMode="Static" Text="" runat="server" Style="display: none;" OnClick="BtnReporteAltaCarga_Click" />
|
||||
<asp:Button ID="BtnReporteAltaGenera" ClientIDMode="Static" Text="" runat="server" Style="display: none;" OnClick="BtnReporteAltaGenera_Click" />
|
||||
<asp:Button ID="BtnReportePago" ClientIDMode="Static" Text="" runat="server" Style="display: none;" OnClick="BtnReportePago_Click" />
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -607,11 +607,11 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
Private Function CreaArchivo(Tipo As Integer, Optional MismoBanco As Boolean = True, Optional ByRef NombreArchivoEnviado As String = "") As Boolean
|
||||
|
||||
|
||||
System.Threading.Thread.Sleep(1000) 'Un segundo de diferencia Para doferentes tipos de bancos
|
||||
System.Threading.Thread.Sleep(1000) 'Un segundo de diferencia Para dIferentes tipos de bancos
|
||||
|
||||
DirectoryExistsCreate(String.Format("{0}Layout", UsuarioActual.Empresa.Ruta))
|
||||
|
||||
NombreArchivo = String.Format("{2}{1}{0}.txt", UsuarioActual.CveUsuario, NowADS().ToString("yyyyMMdd-HH-mm-ss"), If(Tipo = 1, "LAYOUTPAGO", "LAYOUTALTA"))
|
||||
'NombreArchivo = String.Format("{2}{1}{0}.txt", UsuarioActual.CveUsuario, NowADS().ToString("yyyyMMdd-HH-mm-ss"), If(Tipo = 1, "LAYOUTPAGO", "LAYOUTALTA"))
|
||||
|
||||
If Tipo = 1 Then
|
||||
NombreArchivo = String.Format("{2}{1}{0}.txt", UsuarioActual.CveUsuario, NowADS().ToString("yyyyMMdd-HH-mm-ss"), "LAYOUTPAGO")
|
||||
@@ -866,7 +866,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
ElseIf OpBancos = 2 Then
|
||||
AltaProveedoresBajio()
|
||||
ElseIf OpBancos = 3 Then
|
||||
'AltaProveedoresScotia()
|
||||
'AltaProveedoresScotia() SE DEJA COMENTADO PORQUE NO SE ESTA USANDO, SE CAMBIO A PAGO ELECTRONICO
|
||||
End If
|
||||
|
||||
|
||||
@@ -1349,86 +1349,88 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
|
||||
|
||||
|
||||
'Protected Sub CrearDetalle()
|
||||
' Dim Resultado = True
|
||||
' Dim CuentaDeposito As String = ""
|
||||
' Dim TipoCuentaDeposito As String = ""
|
||||
' Dim TipoCuenta As String = ""
|
||||
|
||||
' ''''' LLENADO DE DETALLE
|
||||
' 'Campos #1-4 del Detalle
|
||||
' DetalleTexto &= String.Format("DA{0}N ", DTPendienteActual(0)("CveCuentaDeposito").ToString.ToUpper.PadLeft(30, PadCeros))
|
||||
|
||||
' 'Banco BBVA
|
||||
' If DTPendienteActual(0)("BancoNombre").ToString.ToUpper.Contains("BBVA") Or DTPendienteActual(0)("BancoNombre").ToString.ToUpper.Contains("BANCOMER") Then
|
||||
' 'Llenamos datos de BBVA
|
||||
' 'Campo #5-7 del detalle
|
||||
|
||||
' 'Busca que cuenta sera la asignada para el proveedor
|
||||
' If DTPendienteActual(0)("CIE").ToString <> "" Then
|
||||
' CuentaDeposito = String.Format("02{0}", DTPendienteActual(0)("CIE").ToString.PadLeft(8, PadCeros))
|
||||
' TipoCuenta = "50"
|
||||
' TipoCuentaDeposito = "CIE"
|
||||
' ElseIf DTPendienteActual(0)("Cuenta").ToString.Length = 10 Then
|
||||
' CuentaDeposito = DTPendienteActual(0)("Cuenta").ToString
|
||||
' TipoCuenta = "99"
|
||||
' TipoCuentaDeposito = "Cuenta"
|
||||
' ElseIf DTPendienteActual(0)("CLABE").ToString.Length = 18 Then
|
||||
' CuentaDeposito = DTPendienteActual(0)("CLABE").ToString
|
||||
' TipoCuenta = "40"
|
||||
' TipoCuentaDeposito = "CLABE"
|
||||
' End If
|
||||
|
||||
|
||||
' DetalleTexto &= String.Format("{0}{1}{2}", DTPendienteActual(0)("Abreviatura").ToString, TipoCuenta, CuentaDeposito.PadLeft(35, PadCeros))
|
||||
|
||||
' 'Llenamos en blanco datos de otros bancos
|
||||
' 'Campos 8-17 del detalle --- 64 de otros bancos y 45 para FILLER --- Fecha de Alta
|
||||
' DetalleTexto &= String.Format("{0}{1}", Vacio.PadLeft(109), NowADS()().ToString("yyyy-MM-dd"))
|
||||
|
||||
|
||||
' 'Otros Bancos NACIONAL!!
|
||||
' Else
|
||||
|
||||
' CuentaDeposito = DTPendienteActual(0)("CLABE").ToString
|
||||
' TipoCuentaDeposito = "CLABE"
|
||||
|
||||
' 'Llenamos en blanco datos de BBVA
|
||||
' DetalleTexto &= Vacio.PadRight(40)
|
||||
|
||||
' 'Llenamos datos de otros bancos
|
||||
' 'Campos 8- 17 del detalle --- 44 de otros bancos --- 20 de internacional --- 45 Filler -- Fecha de Alta
|
||||
' DetalleTexto &= String.Format("{0}40{1}{2}{3}{4}{5}", DTPendienteActual(0)("Abreviatura").ToString, DTPendienteActual(0)("CLABE").ToString.PadLeft(35, PadCeros), DTPendienteActual(0)("CLABE").ToString.Substring(0, 3).PadLeft(4, PadCeros), Vacio.PadRight(20), Vacio.PadRight(45), NowADS()().ToString("yyyy-MM-dd"))
|
||||
' End If
|
||||
|
||||
' 'Llenamos datos de Tipo de Persona - Fisica o Moral
|
||||
' TipoPersona()
|
||||
|
||||
' 'Campos 27-32 --- Fillers --- datos de otros bancos (internacional)
|
||||
' DetalleTexto &= Vacio.PadLeft(153)
|
||||
|
||||
' 'Campos 33-36 --- Datos de confirmacion
|
||||
' DetalleTexto &= String.Format("{0}02{1}", Vacio.PadRight(40), CorreoNotificacionesEmpresa.ToUpper.PadRight(50))
|
||||
|
||||
' 'If DTPendienteActual(0)("ContactoMail").ToString.Length > 0 Then
|
||||
' ' 'DetalleTexto &= String.Format("{0}02{1}", Vacio.PadRight(40), DTPendienteActual(0)("ContactoMail").ToString.ToUpper.PadRight(50))
|
||||
' 'ElseIf DTPendienteActual(0)("ContactoMail").ToString.Length <= 0 Then
|
||||
' ' DetalleTexto &= String.Format("{0}00{1}", Vacio.PadRight(40), Vacio.PadRight(50))
|
||||
' 'End If
|
||||
|
||||
' 'Campos 37-39 -- FILLER
|
||||
' DetalleTexto &= String.Format("00{0}", Vacio.PadRight(38))
|
||||
|
||||
|
||||
' ''LLENA DT PARA REPORTE
|
||||
' Dim Row = DtAlta.NewRow()
|
||||
' Row("Proveedor") = DTPendienteActual(0)("RazonSocial").ToString
|
||||
' Row("Banco") = DTPendienteActual(0)("BancoNombre").ToString
|
||||
' Row("TipoCuenta") = TipoCuentaDeposito
|
||||
' Row("Cuenta") = String.Format("{0}", CuentaDeposito)
|
||||
' DtAlta.Rows.Add(Row)
|
||||
'End Sub
|
||||
|
||||
|
||||
|
||||
'Protected Sub CrearDetalle()
|
||||
' Dim Resultado = True
|
||||
' Dim CuentaDeposito As String = ""
|
||||
' Dim TipoCuentaDeposito As String = ""
|
||||
' Dim TipoCuenta As String = ""
|
||||
|
||||
' ''''' LLENADO DE DETALLE
|
||||
' 'Campos #1-4 del Detalle
|
||||
' DetalleTexto &= String.Format("DA{0}N ", DTPendienteActual(0)("CveCuentaDeposito").ToString.ToUpper.PadLeft(30, PadCeros))
|
||||
|
||||
' 'Banco BBVA
|
||||
' If DTPendienteActual(0)("BancoNombre").ToString.ToUpper.Contains("BBVA") Or DTPendienteActual(0)("BancoNombre").ToString.ToUpper.Contains("BANCOMER") Then
|
||||
' 'Llenamos datos de BBVA
|
||||
' 'Campo #5-7 del detalle
|
||||
|
||||
' 'Busca que cuenta sera la asignada para el proveedor
|
||||
' If DTPendienteActual(0)("CIE").ToString <> "" Then
|
||||
' CuentaDeposito = String.Format("02{0}", DTPendienteActual(0)("CIE").ToString.PadLeft(8, PadCeros))
|
||||
' TipoCuenta = "50"
|
||||
' TipoCuentaDeposito = "CIE"
|
||||
' ElseIf DTPendienteActual(0)("Cuenta").ToString.Length = 10 Then
|
||||
' CuentaDeposito = DTPendienteActual(0)("Cuenta").ToString
|
||||
' TipoCuenta = "99"
|
||||
' TipoCuentaDeposito = "Cuenta"
|
||||
' ElseIf DTPendienteActual(0)("CLABE").ToString.Length = 18 Then
|
||||
' CuentaDeposito = DTPendienteActual(0)("CLABE").ToString
|
||||
' TipoCuenta = "40"
|
||||
' TipoCuentaDeposito = "CLABE"
|
||||
' End If
|
||||
|
||||
|
||||
' DetalleTexto &= String.Format("{0}{1}{2}", DTPendienteActual(0)("Abreviatura").ToString, TipoCuenta, CuentaDeposito.PadLeft(35, PadCeros))
|
||||
|
||||
' 'Llenamos en blanco datos de otros bancos
|
||||
' 'Campos 8-17 del detalle --- 64 de otros bancos y 45 para FILLER --- Fecha de Alta
|
||||
' DetalleTexto &= String.Format("{0}{1}", Vacio.PadLeft(109), NowADS()().ToString("yyyy-MM-dd"))
|
||||
|
||||
|
||||
' 'Otros Bancos NACIONAL!!
|
||||
' Else
|
||||
|
||||
' CuentaDeposito = DTPendienteActual(0)("CLABE").ToString
|
||||
' TipoCuentaDeposito = "CLABE"
|
||||
|
||||
' 'Llenamos en blanco datos de BBVA
|
||||
' DetalleTexto &= Vacio.PadRight(40)
|
||||
|
||||
' 'Llenamos datos de otros bancos
|
||||
' 'Campos 8- 17 del detalle --- 44 de otros bancos --- 20 de internacional --- 45 Filler -- Fecha de Alta
|
||||
' DetalleTexto &= String.Format("{0}40{1}{2}{3}{4}{5}", DTPendienteActual(0)("Abreviatura").ToString, DTPendienteActual(0)("CLABE").ToString.PadLeft(35, PadCeros), DTPendienteActual(0)("CLABE").ToString.Substring(0, 3).PadLeft(4, PadCeros), Vacio.PadRight(20), Vacio.PadRight(45), NowADS()().ToString("yyyy-MM-dd"))
|
||||
' End If
|
||||
|
||||
' 'Llenamos datos de Tipo de Persona - Fisica o Moral
|
||||
' TipoPersona()
|
||||
|
||||
' 'Campos 27-32 --- Fillers --- datos de otros bancos (internacional)
|
||||
' DetalleTexto &= Vacio.PadLeft(153)
|
||||
|
||||
' 'Campos 33-36 --- Datos de confirmacion
|
||||
' DetalleTexto &= String.Format("{0}02{1}", Vacio.PadRight(40), CorreoNotificacionesEmpresa.ToUpper.PadRight(50))
|
||||
|
||||
' 'If DTPendienteActual(0)("ContactoMail").ToString.Length > 0 Then
|
||||
' ' 'DetalleTexto &= String.Format("{0}02{1}", Vacio.PadRight(40), DTPendienteActual(0)("ContactoMail").ToString.ToUpper.PadRight(50))
|
||||
' 'ElseIf DTPendienteActual(0)("ContactoMail").ToString.Length <= 0 Then
|
||||
' ' DetalleTexto &= String.Format("{0}00{1}", Vacio.PadRight(40), Vacio.PadRight(50))
|
||||
' 'End If
|
||||
|
||||
' 'Campos 37-39 -- FILLER
|
||||
' DetalleTexto &= String.Format("00{0}", Vacio.PadRight(38))
|
||||
|
||||
|
||||
' ''LLENA DT PARA REPORTE
|
||||
' Dim Row = DtAlta.NewRow()
|
||||
' Row("Proveedor") = DTPendienteActual(0)("RazonSocial").ToString
|
||||
' Row("Banco") = DTPendienteActual(0)("BancoNombre").ToString
|
||||
' Row("TipoCuenta") = TipoCuentaDeposito
|
||||
' Row("Cuenta") = String.Format("{0}", CuentaDeposito)
|
||||
' DtAlta.Rows.Add(Row)
|
||||
'End Sub
|
||||
|
||||
Protected Sub TipoPersona()
|
||||
'Persona Moral
|
||||
If DTPendienteActual(0)("RFC").ToString.Length = 12 Then
|
||||
@@ -1981,16 +1983,16 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
If drow("Observaciones").ToString.Trim.Length = 0 Then
|
||||
|
||||
If drow("RazonSocial").ToString.Trim.Length > 30 Then
|
||||
RegistrosPago.Append(drow("RazonSocial").ToString.Substring(0, 30))
|
||||
RegistrosPago.Append(drow("RazonSocial").ToString.trim.Substring(0, 30))
|
||||
Else
|
||||
RegistrosPago.Append(drow("RazonSocial").ToString.PadRight(30, EspacioRelleno))
|
||||
End If
|
||||
Else
|
||||
|
||||
If drow("Observaciones").ToString.Trim.Length > 30 Then
|
||||
RegistrosPago.Append(drow("Observaciones").ToString.Substring(0, 30))
|
||||
RegistrosPago.Append(drow("Observaciones").ToString.Trim.Substring(0, 30))
|
||||
Else
|
||||
RegistrosPago.Append(drow("Observaciones").ToString.PadRight(30, EspacioRelleno))
|
||||
RegistrosPago.Append(drow("Observaciones").ToString.Trim.PadRight(30, EspacioRelleno))
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
@@ -740,8 +740,9 @@ Partial Class Contabilidad2_CatCuentas
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
Dim dtt As DataTable = DtDatos.Copy().FiltraParametros(" Codigo NOT IN ('_ACTIVO','_BPASIVO','_CAPITAL','_UTILIDAD','_RACREEDOR','_RDEUDOR','_CUADRE','_PASIVO','_ORDEN') ")
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Cuentas.rdlc", DtDatos, params, "Cuentas", Formato)
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Cuentas.rdlc", dtt, params, "Cuentas", Formato)
|
||||
'ImprimirPDFStimul("Empresas/Grales/Formatos/Cuentas.mrt", DtDatos, params, NombreArchivo:="Cuentas", RDSName:="Cuentas", Formato:=Formato)
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-5">
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
@@ -81,7 +81,15 @@
|
||||
</table>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="row" id="divMsg" runat="server" visible="false">
|
||||
<div class="col-md-12" style="text-align: center;">
|
||||
<div class="alert alert-warning" style="padding: 5px; margin-bottom: 5px; padding-right: 25px;">
|
||||
<button type="button" class="close" data-dismiss="alert" style="margin-top: 5px;" aria-hidden="true"></button>
|
||||
<strong style="font-size: 20px; margin-right: 25px;">Información: </strong>
|
||||
<asp:Literal Text=" solo se consideran los niveles 1 y 2." runat="server" ID="LtTipoCambioAdvertencia"></asp:Literal>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align: center;">
|
||||
<asp:Button ID="BtnGenerar" OnClick="BtnGenerar_Click" Text="Generar XML" Width="200px" CssClass="btn btn-primary" runat="server" />
|
||||
|
||||
@@ -109,12 +109,11 @@ Partial Class Contabilidad_ContabilidadElectronica
|
||||
DtCuentas = ObjConpaq.DtResultados
|
||||
End If
|
||||
ObjConpaq.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
If DtCuentas IsNot Nothing AndAlso DtCuentas.Rows.Count > 0 Then
|
||||
Dim Str As New StringBuilder
|
||||
|
||||
Dim Str As New StringBuilder
|
||||
'CABECERA
|
||||
Str.Append("<?xml version=""1.0"" encoding=""UTF-8""?>")
|
||||
Str.Append("<catalogocuentas:Catalogo xsi:schemaLocation=""http://www.sat.gob.mx/esquemas/ContabilidadE/1_3/CatalogoCuentas http://www.sat.gob.mx/esquemas/ContabilidadE/1_3/CatalogoCuentas/CatalogoCuentas_1_3.xsd"" Version=""1.3"" ")
|
||||
@@ -288,8 +287,11 @@ Partial Class Contabilidad_ContabilidadElectronica
|
||||
End If
|
||||
|
||||
If DtCuentas IsNot Nothing AndAlso DtCuentas.Rows.Count > 0 Then
|
||||
Dim Str As New StringBuilder
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
DtCuentas = DtCuentas.FiltraParametros("Nivel IN (1,2) ")
|
||||
End If
|
||||
Dim Str As New StringBuilder
|
||||
'CABECERA
|
||||
Str.Append("<?xml version=""1.0"" encoding=""UTF-8""?>")
|
||||
Str.Append("<bnc:Balanza ")
|
||||
@@ -381,6 +383,9 @@ Partial Class Contabilidad_ContabilidadElectronica
|
||||
trTipoEnvio.Visible = False
|
||||
ElseIf DdlTipoReporte.SelectedValue = "2" Then
|
||||
trTipoEnvio.Visible = True
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
divMsg.Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
<asp:Button ID="BtnContabilizarCompras" runat="server" CssClass="btn btn-success" Text="Contabilizar" />
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvPrePolizaCompras" runat="server" AutoGenerateColumns="False" Width="100%" CssClass="table table-advance table-hover" Style="text-align: center;" ForeColor="Black" DataKeyNames="CvePrePoliza,Fecha,CveTipoPoliza,IdPoliza" OnRowDataBound="OnRowDataBound" GridLines="None" ShowHeader="false">
|
||||
<asp:GridView ID="GvPrePolizaCompras" runat="server" AutoGenerateColumns="False" Width="100%" CssClass="table table-advance table-hover" Style="text-align: center;" ForeColor="Black" DataKeyNames="CvePrePoliza,Fecha,CveTipoPoliza,IdPoliza,Modulo" OnRowDataBound="OnRowDataBound" GridLines="None" ShowHeader="false">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -163,6 +163,15 @@ public partial class Contabilidad_ContabilizacionCompras : ClsPaginas
|
||||
{
|
||||
e.Row.FCLinkButton("LBActualizarTC").Visible = true;
|
||||
}
|
||||
|
||||
if (UsuarioActual.CveEmpresa == 119 && e.Row.DBCampo("Modulo").ToString() == "Compras Comproba")
|
||||
{
|
||||
e.Row.FCCheckBox("Chk").Enabled = false;
|
||||
e.Row.FCCheckBox("Chk").Checked = false;
|
||||
e.Row.FCCheckBox("Chk").ToolTip = "Comprobación";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -436,7 +436,7 @@
|
||||
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
|
||||
|
||||
<asp:GridView ID="GvPrePoliza" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-advance table-hover mysmallbtn GvPrePoliza" GridLines="None"
|
||||
DataKeyNames="CvePrePolizaDetalle,CvePrePoliza,IdMov, CveConceptoContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra, CveProveedor, CveCliente, CvePersonal, CveCuenta, PorcentajeImpuesto,TipoMovto,EsComplementaria,EsMonedaExtranjera,Concepto,CveClasificacion,ContadoCuenta,ContadoTipoTransaccion,ContadoNumeroFolio,ContadoBeneficiario,ContadoObservaciones,ContadoImporte,TC,ImporteME,ImporteMN,Cargo,Abono,CveIE,Modificado" Width="100%" >
|
||||
DataKeyNames="CvePrePolizaDetalle,CvePrePoliza,IdMov, CveConceptoContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra, CveProveedor, CveCliente, CvePersonal, CveCuenta, PorcentajeImpuesto,TipoMovto,EsComplementaria,EsMonedaExtranjera,Concepto,CveClasificacion,ContadoCuenta,ContadoTipoTransaccion,ContadoNumeroFolio,ContadoBeneficiario,ContadoObservaciones,ContadoImporte,TC,ImporteME,ImporteMN,Cargo,Abono,CveIE,CveActivoFijo,Modificado" Width="100%" >
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Movimiento</HeaderTemplate>
|
||||
@@ -744,6 +744,15 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" runat="server" id="DvModalConceptoActivoFijo" visible="false">
|
||||
<div class="col-xs-2" style="text-align: left">Activo Fijo:</div>
|
||||
<div class="col-xs-4" style="text-align: left">
|
||||
<asp:Dropdownlist ID="DdlAF" CssStyle="width: 100%;" CssClass ="select2me" runat="server" AppendDataBoundItems="true" DataTextField="Descripcion" DataValueField="CveActivoFijo" Width="405px" ></asp:Dropdownlist>
|
||||
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row" runat="server" id="DvModalconceptoVenta" visible="false">
|
||||
<div class="col-xs-2" style="text-align: left">Venta:</div>
|
||||
|
||||
@@ -392,6 +392,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
.Add("CveCompra", Type.GetType("System.Int32"))
|
||||
.Add("CveCliente", Type.GetType("System.Int32"))
|
||||
.Add("CveVenta", Type.GetType("System.Int32"))
|
||||
.Add("CveActivoFijo", Type.GetType("System.Int32"))
|
||||
.Add("CveIE", Type.GetType("System.Int32"))
|
||||
.Add("CveClasificacion", Type.GetType("System.Int32"))
|
||||
.Add("MultipleSubProyecto", Type.GetType("System.Boolean"))
|
||||
@@ -1097,7 +1098,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, CveClasificacion:=gvr.DataKey("CveClasificacion").ToEntero,
|
||||
ImporteME:=ImporteME, TipoCambio:=TipoCambio,
|
||||
CveTipoGasto:=tCveTipoGasto,
|
||||
CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCuenta:=tCveCuenta, PorcentajeImpuesto:=gvr.DataKey("PorcentajeImpuesto").ToDecimal) Then
|
||||
CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveActivoFijo:=gvr.DataKey("CveActivoFijo").ToEntero, CveCuenta:=tCveCuenta, PorcentajeImpuesto:=gvr.DataKey("PorcentajeImpuesto").ToDecimal) Then
|
||||
ContRegInsertados = ContRegInsertados + 1
|
||||
|
||||
Else
|
||||
@@ -1502,6 +1503,13 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
DvModalconceptoCliente.Visible = False
|
||||
End If
|
||||
|
||||
If AplicaActivoFijo Then
|
||||
CargaActivosFijos()
|
||||
DvModalConceptoActivoFijo.Visible = True
|
||||
Else
|
||||
DvModalConceptoActivoFijo.Visible = False
|
||||
End If
|
||||
|
||||
If AplicaBancos AndAlso Not AplicaComplementaria Then
|
||||
TxtCargoE.AutoPostBack = True
|
||||
TxtAbonoE.AutoPostBack = True
|
||||
@@ -1530,6 +1538,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Else
|
||||
DivMonedaExtranjera.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
CargaCuentaConcepto(CveConceptoContableInsertar)
|
||||
|
||||
End If
|
||||
@@ -1626,6 +1636,15 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
DdlClasificacionesE.DataBind()
|
||||
DdlClasificacionesE.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaActivosFijos()
|
||||
DdlAF.Items.Clear()
|
||||
DdlAF.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa)
|
||||
DdlAF.DataBind()
|
||||
'DdlAF.setEsWebService(True)
|
||||
'DdlAF.Attributes.Add("data-metodo", "getcliente")
|
||||
|
||||
End Sub
|
||||
Private Sub DdlProveedoresE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProveedoresE.SelectedIndexChanged
|
||||
CargaComprasE(DdlProveedoresE.SelectedValue.ToEntero, HdnCveCompra.Value.ToEntero)
|
||||
End Sub
|
||||
@@ -1743,6 +1762,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
dr("CvePersonal") = DdlPersonalE.SelectedValue.ToEntero
|
||||
dr("CveCliente") = DdlClientesE.SelectedValue.ToEntero
|
||||
dr("CveVenta") = DdlVentasE.SelectedValue.ToEntero
|
||||
dr("CveActivoFijo") = DdlAF.SelectedValue.ToEntero
|
||||
dr("FolioFactura") = If(DdlComprasE.Visible = True AndAlso DdlComprasE.SelectedItem IsNot Nothing, DdlComprasE.SelectedItem.ToString, If(DdlVentasE.Visible = True AndAlso DdlVentasE.SelectedItem IsNot Nothing, DdlVentasE.SelectedItem.ToString, ""))
|
||||
dr("Modificado") = True
|
||||
dr("TC") = TxtTipoCambio.Text.ToDecimal
|
||||
@@ -1861,6 +1881,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
dr("CveClasificacion") = -1
|
||||
dr("CveCliente") = DdlClientes.SelectedValue.ToEntero
|
||||
dr("CveVenta") = DdlVentas.SelectedValue.ToEntero
|
||||
dr("CveActivoFijo") = DdlAF.SelectedValue.ToEntero
|
||||
End If
|
||||
GvMov.DataSource = DtMovimientos
|
||||
GvMov.DataBind()
|
||||
@@ -1888,6 +1909,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
dr("CvePersonal") = DdlPersonal.SelectedValue.ToEntero
|
||||
dr("CveCliente") = DdlClientes.SelectedValue.ToEntero
|
||||
dr("CveVenta") = DdlVentas.SelectedValue.ToEntero
|
||||
dr("CveActivoFijo") = DdlAF.SelectedValue.ToEntero
|
||||
|
||||
TxtTotalAbonos.Text = (TxtTotalAbonos.Text.ToDecimal + TxtAbono.Text.ToDecimal).ToString.FormatoNumero
|
||||
TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDecimal + TxtCargo.Text.ToDecimal).ToString.FormatoNumero
|
||||
@@ -1932,6 +1954,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
dr("CveClasificacion") = -1
|
||||
dr("CveCliente") = DdlClientes.SelectedValue.ToEntero
|
||||
dr("CveVenta") = DdlVentas.SelectedValue.ToEntero
|
||||
dr("CveActivoFijo") = DdlAF.SelectedValue.ToEntero
|
||||
|
||||
TxtTotalAbonos.Text = (TxtTotalAbonos.Text.ToDecimal + TxtAbono.Text.ToDecimal).ToString.FormatoNumero
|
||||
TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDecimal + TxtCargo.Text.ToDecimal).ToString.FormatoNumero
|
||||
@@ -1942,9 +1965,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
GvMov.DataBind()
|
||||
UPMovs.Update()
|
||||
Actualizar = False
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
TxtCargo.Text = ""
|
||||
@@ -2125,6 +2146,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
'DdlClientes.txtText.Value = DrM("CveCliente").ToString
|
||||
|
||||
DdlVentas.SelectedValueExist(DrM("CveVenta").ToString)
|
||||
DdlAF.SelectedValueExist(DrM("CveActivoFijo").ToString)
|
||||
LbCancelarEdicion.Visible = True
|
||||
LbAgregar.Text = "Actualizar"
|
||||
|
||||
@@ -2566,7 +2588,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
DtMovimientos.Clear()
|
||||
Exit For
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If CveConceptoContable = 69 Then
|
||||
@@ -2596,6 +2617,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
dr("CveClasificacion") = CveClasificacion
|
||||
dr("CveCliente") = -1
|
||||
dr("CveVenta") = -1
|
||||
dr("CveActivoFijo") = -1
|
||||
dr("CveCuenta") = CveCuentaExcel
|
||||
dr("CveTipoGasto") = -1
|
||||
dr("CvePrePolizaDetalle") = -1
|
||||
|
||||
@@ -6,7 +6,6 @@ Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports ClosedXML.Excel
|
||||
Imports Profact.TimbraCFDI40
|
||||
Imports System.IO
|
||||
Imports System.Drawing
|
||||
Imports System.Web.Services
|
||||
@@ -434,12 +433,12 @@ Partial Class Contabilidad2_RepBalanzaComprobacion
|
||||
|
||||
Dim ultimaFila As DataRow = DtDatos.Rows(DtDatos.Rows.Count - 1)
|
||||
|
||||
Dim LastSaldoID As Decimal = ultimaFila("SaldoID").ToString.ToDecimal
|
||||
Dim LastTotalAbonos As Decimal = ultimaFila("TotalAbonos").ToString.ToDecimal
|
||||
Dim LastTotalCargos As Decimal = ultimaFila("TotalCargos").ToString.ToDecimal
|
||||
Dim LastSaldoAD As Decimal = ultimaFila("SaldoAD").ToString.ToDecimal
|
||||
Dim LastSaldoIA As Decimal = ultimaFila("SaldoIA").ToString.ToDecimal
|
||||
Dim LastSaldoAA As Decimal = ultimaFila("SaldoAA").ToString.ToDecimal
|
||||
Dim LastSaldoID As Decimal = ultimaFila("SaldoICargo").ToString.ToDecimal
|
||||
Dim LastTotalAbonos As Decimal = ultimaFila("Abonos").ToString.ToDecimal
|
||||
Dim LastTotalCargos As Decimal = ultimaFila("Cargos").ToString.ToDecimal
|
||||
Dim LastSaldoAD As Decimal = ultimaFila("SaldoFCargo").ToString.ToDecimal
|
||||
Dim LastSaldoIA As Decimal = ultimaFila("SaldoIAbono").ToString.ToDecimal
|
||||
Dim LastSaldoAA As Decimal = ultimaFila("SaldoFAbono").ToString.ToDecimal
|
||||
|
||||
WSReporte.Cell(CuerrentRow, 2).Value = "Sumas Iguales"
|
||||
WSReporte.Cell(CuerrentRow, 3).Value = LastSaldoID
|
||||
|
||||
@@ -2632,7 +2632,7 @@ Partial Class General_SaldosIniciales
|
||||
' CargoAbono = False
|
||||
'End If
|
||||
|
||||
If YaExiste = False AndAlso Afectable Then
|
||||
If YaExiste = False AndAlso Afectable AndAlso Importe <> 0 Then
|
||||
If IdCuenta > 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, Importe, 95, "", Concepto, CveSubProyecto:=CveSubProyecto, CveCuenta:=IdCuenta) Then
|
||||
TieneError = True
|
||||
|
||||
@@ -201,6 +201,12 @@ Partial Class LogIn
|
||||
Usuario = Nothing
|
||||
End If
|
||||
|
||||
''código temporal para bloquear accesos a empresas.
|
||||
'If Usuario IsNot Nothing AndAlso Usuario.CveEmpresa.Contiene(13, 83, 199, 201) Then
|
||||
' Alert(" this site can't be reached <br/><br/>refused to connect.<br/><br/>ERR_CONNECTION_REFUSED<br/><br/>", TipoMensaje.MsgError)
|
||||
' Usuario = Nothing
|
||||
' End If
|
||||
|
||||
If Usuario IsNot Nothing Then '' consideración especial, para el Grupo Adsistemas
|
||||
If Usuario.CveUsuario.Contiene(2, 93, 1537, 1538, 1360) Then 'JM,RM,OI,JP,JC cambia la cuenta por la de un admin
|
||||
Dim tUsuario As Usuario = ObjUsuario.GetUsuarioDetalle(100, Usuario.CveEmpresa) 'ObjUsuario.ValidaUsuario(txtUsuario.Text, Encripta(TxtContraseña.Text.Trim), GrupoEmpresa:=tGrupoEmpresa)
|
||||
|
||||
@@ -343,8 +343,8 @@ Partial Class OS_OrdenesServicios
|
||||
CargaPS(-1, DdlPSDetalle)
|
||||
CargaPsMateriales()
|
||||
'CargaClasificaciones()
|
||||
CargaPSCaracteristicasOpciones()
|
||||
CargaCuentasCaracteristicas()
|
||||
'CargaPSCaracteristicasOpciones()
|
||||
'CargaCuentasCaracteristicas()
|
||||
CargaAlmacen()
|
||||
CargaModelos()
|
||||
|
||||
@@ -847,14 +847,13 @@ Partial Class OS_OrdenesServicios
|
||||
If Row("Estatus").ToString = "Activo" Then Estatus = True Else Estatus = False
|
||||
If Row("SeSuperviso").ToString = "Sí" Then SeSuperviso = True Else SeSuperviso = False
|
||||
|
||||
|
||||
CargaMaterialesDetalle(CveOsDetalle, IDOSDetalle, IDOSDetalle)
|
||||
For Each R As DataRow In TmpDTMaterialesDetalle.FiltraParametros(String.Format("CveConsecutivoDetalle = {0}", IDOSDetalle)).Rows
|
||||
If Materiales = "-1" Then Materiales = "" Else Materiales = Materiales + "<br>"
|
||||
Materiales = Materiales + String.Format("{0} {1}", R("Cantidad").ToString, R("PS").ToString)
|
||||
Next
|
||||
|
||||
CargaEspecificaciones(CveOsDetalle, IDOSDetalle, IDOSDetalle)
|
||||
'CargaEspecificaciones(CveOsDetalle, IDOSDetalle, IDOSDetalle)
|
||||
For Each R As DataRow In TmpDTCaracteristica.FiltraParametros(String.Format("CveConsecutivoDetalle = {0}", IDOSDetalle)).Rows
|
||||
If Especificaciones = "-1" Then Especificaciones = "" Else Especificaciones = Especificaciones + ","
|
||||
Especificaciones = Especificaciones + String.Format("{0}:{1}:{2}:{3}:{4}:{5}", R("CveCaracteristica").ToString, R("Caracteristica").ToString, R("CveCaracteristicaTipo"), R("CveOpcion").ToString, R("Opcion").ToString, R("Valor").ToString)
|
||||
@@ -3112,11 +3111,20 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
'---------------- FIN VALIDACIONES -----------------
|
||||
|
||||
Dim CveAlmacenActual As Integer = DTSolicitudDev.FiltroPrimeroValor("CveAlmacenActual").ToEntero
|
||||
'Validación solo para que no sean uso de material
|
||||
Dim ValidaPU As String = ""
|
||||
If Not DdlTipoVenta.SelectedValue.Contiene("5") Then ValidaPU = "PU > 0"
|
||||
|
||||
Dim CveAlmacenActual As Integer = DTSolicitudDev.FiltroPrimeroValor("CveAlmacenActual", ValidaPU).ToEntero 'PU>0, para indicar que solo los productos que no se han retornado.
|
||||
Dim CveMoneda As Integer = DTSolicitudDev.FiltroPrimeroValor("CveMoneda").ToEntero
|
||||
Dim CveVentaPedido As Integer = DTSolicitudDev.FiltroPrimeroValor("CveVenta").ToEntero
|
||||
Dim CveVentaRemisionGenerada As Integer = -1
|
||||
|
||||
If CveAlmacenActual <= 0 Then
|
||||
Alert("No se pudo determinar el almacen del material", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim ObjV As New ClsVentas
|
||||
Dim ObjOS As New ClsOS(ObjV.IniciaTransacSQL())
|
||||
Dim ObjInventario As New ClsInventarios(ObjV.IniciaTransacSQL())
|
||||
@@ -3774,6 +3782,11 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
Protected Sub BtnCancelar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
CancelarOS()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CancelarOS()
|
||||
Dim CveEstatusOrdenServicioCancelacion As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", " TipoEstatus = 5 ").ToEntero
|
||||
Dim CveAlmacenDevolucion As Integer
|
||||
Dim CveMotivoCancelacion As Integer = GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMotivoCancelacion", "CveSATMotivoCancelacion IN (3)").ToEntero
|
||||
@@ -3836,7 +3849,6 @@ Partial Class OS_OrdenesServicios
|
||||
Catch ex As Exception
|
||||
Alert("Se presento un error al cancelar la orden de servicio")
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CancelarRemision(CveVenta As Integer, CveAlmacenDevolucion As Integer, CvePedido As Integer)
|
||||
@@ -3848,6 +3860,12 @@ Partial Class OS_OrdenesServicios
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'If DdlTipoVenta.SelectedValue.Contiene("5", "6") Then
|
||||
' CancelarOS() 'uso de material
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
|
||||
Dim ObjFacturaCancelacion As New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=True, VerificaAlmacen:=True)
|
||||
Try
|
||||
Dim resp As Modelos.Factura.MCancelacionVentaMensaje = Nothing
|
||||
@@ -3869,7 +3887,7 @@ Partial Class OS_OrdenesServicios
|
||||
Dim HuboError As Boolean = False
|
||||
If Not resp.HuboError Then
|
||||
|
||||
If resp.CveEstatus = 12 Then
|
||||
If resp.CveEstatus.Contiene(12) Then '12 - Rem - Cancelado, 14 - Pedido - cancelado
|
||||
Dim cveoo As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", $" TipoEstatus = 3").ToEntero
|
||||
If objos.UpdateOrdenesServiciosEstatus(cveoo, UsuarioActual.CveUsuario, CveOS) Then
|
||||
'retornar el estatus de la OS,
|
||||
@@ -3879,9 +3897,13 @@ Partial Class OS_OrdenesServicios
|
||||
Else
|
||||
HuboError = True
|
||||
End If
|
||||
ElseIf resp.CveEstatus.Contiene(14) Then ' 14 - Pedido - cancelado
|
||||
If Not ObjVenta.UpdateVentasDevolucionAlmacen(1, CvePedido) Then
|
||||
HuboError = True
|
||||
End If
|
||||
Else
|
||||
'si tiene pagos
|
||||
HuboError = True
|
||||
|
||||
HuboError = True 'si tiene pagos
|
||||
End If
|
||||
Else
|
||||
HuboError = True
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Imports ADSNetLibrary.SIGAPI.Models.CRM.Request
|
||||
Imports ADSNetLibrary.SIGAPI.Services.CRM
|
||||
|
||||
Partial Class Ventas_CatMedicos
|
||||
Inherits ClsPaginas
|
||||
@@ -18,8 +20,6 @@ Partial Class Ventas_CatMedicos
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Public Property CveMedicoEspecialidad As Integer
|
||||
Get
|
||||
If ViewState("CveMedicoEspecialidad") Is Nothing Then
|
||||
@@ -50,24 +50,49 @@ Partial Class Ventas_CatMedicos
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
If (Request("CveEmpresaCRM") IsNot Nothing) Then
|
||||
' ICRMService CRMService = New CRMService(System.Configuration.ConfigurationManager.ConnectionStrings["Conexion"].ConnectionString)
|
||||
'RequestEmpresasCRM parametros = New RequestEmpresasCRM(UsuarioActual.CveEmpresa, CveEmpresaCRM);
|
||||
'var objServicio = cRMService.GetEmpresasCRM(parametros);
|
||||
'If (objServicio.Result.Count > 0) Then
|
||||
' {
|
||||
' EsEditar = True;
|
||||
' LblEncabezadoEmpresa.Text = String.Format("Consulta de la Empresa: {0}", objServicio.Result[0].Empresa);
|
||||
' TxtNombreEmpresa.Text = objServicio.Result[0].Empresa;
|
||||
' TxtRFC.Text = objServicio.Result[0].RFC;
|
||||
' DdlTipoProceso2.SelectedValueExist(objServicio.Result[0].CveTipoProceso);
|
||||
' CargaMetodosCaptacion();
|
||||
' TxtCorreoEmpresaCRM.Text = objServicio.Result[0].Correo;
|
||||
' DdlMedioCaptacion.SelectedValueExist(objServicio.Result[0].CveMedioCaptacion);
|
||||
' CveEncuestaAplicada = objServicio.Result[0].CveEncuestaAplicada > 0 ? objServicio.Result[0].CveEncuestaAplicada.ToEntero() : -1;
|
||||
' CveVendedor = objServicio.Result[0].CveVendedorAsignado.ToEntero();
|
||||
' CveSubProyecto = objServicio.Result[0].CveSubProyecto.ToEntero();
|
||||
' CveCliente = objServicio.Result[0].CveCliente.ToEntero();
|
||||
' CveGiroClasificacion = objServicio.Result[0].CveGiroClasificacion > 0 ? objServicio.Result[0].CveGiroClasificacion.ToEntero() : -1;
|
||||
|
||||
' If (!(CveCliente > 0)) Then
|
||||
' {
|
||||
' HplCrearCliente.Visible = True;
|
||||
' HplCrearCliente.NavigateUrl = String.Format("/Ventas/Clientes.aspx?CveEmpresaCRM={0}", CveEmpresaCRM);
|
||||
' If (UsuarioActual.Empresa.Funcionalidad(578) == "1") Then
|
||||
' {
|
||||
' HplCrearCliente.Text = "Crear Médico";
|
||||
' HplCrearCliente.NavigateUrl = String.Format("/Ventas/CatMedicos.aspx?CveEmpresaCRM={0}", CveEmpresaCRM);
|
||||
' }
|
||||
' }
|
||||
|
||||
RegistraScript("$('#DvModalAddMedico').modal({ backdrop: 'static', keyboard: false });")
|
||||
End If
|
||||
|
||||
CargaCombos()
|
||||
CargaDatos()
|
||||
BtnConsultar_Click(Nothing, Nothing)
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub CargaDatos()
|
||||
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
If ObjVentas.GetMedicos(-1, UsuarioActual.CveEmpresa, -1) Then
|
||||
|
||||
If UsuarioActual.CveVendedor > 0 Then
|
||||
@@ -75,23 +100,15 @@ Partial Class Ventas_CatMedicos
|
||||
Else
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
GvDatos.DataBind()
|
||||
|
||||
ValidaExcelTab()
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
'Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
@@ -166,8 +183,6 @@ Partial Class Ventas_CatMedicos
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Public Sub LnkAgregarMedico_Click(sender As Object, e As EventArgs)
|
||||
|
||||
AddMedicoControl.CveMedico = -1
|
||||
@@ -188,8 +203,6 @@ Partial Class Ventas_CatMedicos
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'TxtMedico.Text = GvRow.DataKey("Medico")
|
||||
'TxtCedulaProfecional.Text = GvRow.DataKey("CedulaProfesional")
|
||||
'TxtFechaNacimiento.Text = GvRow.DataKey("FechaNacimiento").ToDate().ToString("dd/MM/yyyy")
|
||||
@@ -239,8 +252,6 @@ Partial Class Ventas_CatMedicos
|
||||
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
|
||||
|
||||
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = NowADS().ToShortDateString
|
||||
|
||||
@@ -254,7 +265,6 @@ Partial Class Ventas_CatMedicos
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
Dim objVentas As New ClsVentas
|
||||
Dim CveVendedor As Integer = If(UsuarioActual.CveVendedor > 0, UsuarioActual.CveVendedor, -1)
|
||||
Dim CveCliente As Integer = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1)
|
||||
|
||||
@@ -444,7 +444,9 @@ Partial Class Ventas_ClientesAbonar
|
||||
TmpCxCAux = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio")
|
||||
SumDescuentoProntoPago = TmpCxCAux.SUM("DescuentoProntoPago")
|
||||
|
||||
GvCxC.DataSource = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio")
|
||||
If UsuarioActual.CveEmpresa = 186 Then TmpCxCAux = TmpCxCAux.AsEnumerable.Take(200).CopyToDataTable() 'Limitar a 100 registros para evitar problemas de rendimiento
|
||||
|
||||
GvCxC.DataSource = TmpCxCAux.FiltraParametros("Saldo > 0", "Fecha,SerieFolio")
|
||||
CveMoneda = pCveMoneda
|
||||
|
||||
End If
|
||||
@@ -703,20 +705,21 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
|
||||
Protected Sub BtnIEGuardar_Click(sender As Object, e As EventArgs) Handles BtnIEGuardar.Click
|
||||
GenerarPago()
|
||||
'VERIFICA SI HAY CORTE ANTES DE HACER EL PAGO
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso CveCorte <= 0 Then
|
||||
Dim ObjPVenta As New ClsPuntoVenta
|
||||
If ObjPVenta.GetVta_Cortes(TxtFechaDocumento.Text, TxtFechaDocumento.Text, -1, -1, UsuarioActual.CveEmpresa, -1) Then
|
||||
DdlCorteCaja.DataSource = ObjPVenta.DtResultados.FiltraParametros($"CveSubProyecto={CveSubProyecto}")
|
||||
DdlCorteCaja.DataBind()
|
||||
End If
|
||||
ObjPVenta.Dispose()
|
||||
DdlCorteCaja.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
UpModalCorte.Update()
|
||||
RegistraScript("$('#ModalCorte').modal({backdrop: 'static', keyboard: false}, 'show')")
|
||||
Else
|
||||
GenerarPago()
|
||||
End If
|
||||
'If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso CveCorte <= 0 Then
|
||||
' Dim ObjPVenta As New ClsPuntoVenta
|
||||
' If ObjPVenta.GetVta_Cortes(TxtFechaDocumento.Text, TxtFechaDocumento.Text, -1, -1, UsuarioActual.CveEmpresa, -1) Then
|
||||
' DdlCorteCaja.DataSource = ObjPVenta.DtResultados.FiltraParametros($"CveSubProyecto={CveSubProyecto}")
|
||||
' DdlCorteCaja.DataBind()
|
||||
' End If
|
||||
' ObjPVenta.Dispose()
|
||||
' DdlCorteCaja.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
' UpModalCorte.Update()
|
||||
' RegistraScript("$('#ModalCorte').modal({backdrop: 'static', keyboard: false}, 'show')")
|
||||
'Else
|
||||
' GenerarPago()
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnGenerarPago_Click(sender As Object, e As EventArgs) Handles BtnGenerarPago.Click
|
||||
|
||||
@@ -201,6 +201,12 @@
|
||||
<div class="col-md-2">
|
||||
<asp:Dropdownlist runat="server" ID="DdlMarcas" CssStyle="width: 100%;" CssClass="form-control input-small input-sm select2me" Width="100%" DataTextField="Marca" DataValueField="CveMarca" />
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Proveedor:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<ADS:Dropdownlost ID="DdlProveedores" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -256,15 +262,15 @@
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas Utilidad con los filtros especificados" CssClass="table table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None">
|
||||
<Columns>
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Center" HeaderText="Serie Folio" DataTextField="SerieFolio" DataTextFormatString="{0}" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}"/>
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Center" HeaderText="Fecha" DataTextField="FechaVenta" DataTextFormatString="{0:d}" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}"/>
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" HeaderText="SubTotal" DataTextField="SubTotal" DataTextFormatString="{0:N}" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}"/>
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" HeaderText="Descuento" DataTextField="Descuento" DataTextFormatString="{0:N}" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}"/>
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" HeaderText="Bonificacion" DataTextField="Bonificacion" DataTextFormatString="{0:N}" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}"/>
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" HeaderText="SubTotal2" DataTextField="SubTotal2" DataTextFormatString="{0:N}" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}"/>
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Center" HeaderText="Serie Folio" DataTextField="SerieFolio" DataTextFormatString="{0}" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion,CveMarca,CveProveedorCompra" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}&CveProveedorCompra={10}"/>
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Center" HeaderText="Fecha" DataTextField="FechaVenta" DataTextFormatString="{0:d}" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion,CveMarca,CveProveedorCompra" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}&CveProveedorCompra={10}"/>
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" HeaderText="SubTotal" DataTextField="SubTotal" DataTextFormatString="{0:N}" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion,CveMarca,CveProveedorCompra" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}&CveProveedorCompra={10}"/>
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" HeaderText="Descuento" DataTextField="Descuento" DataTextFormatString="{0:N}" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion,CveMarca,CveProveedorCompra" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}&CveProveedorCompra={10}"/>
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" HeaderText="Bonificacion" DataTextField="Bonificacion" DataTextFormatString="{0:N}" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion,CveMarca,CveProveedorCompra" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}&CveProveedorCompra={10}"/>
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" HeaderText="SubTotal2" DataTextField="SubTotal2" DataTextFormatString="{0:N}" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion,CveMarca,CveProveedorCompra" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}&CveProveedorCompra={10}"/>
|
||||
<asp:HyperLinkField Text="Ir" DataNavigateUrlFields="CveVenta" ItemStyle-Width="2.5%" ItemStyle-HorizontalAlign="Center" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Center" HeaderText="Folio" ItemStyle-CssClass="Texto" DataTextField="FolioMovto" DataTextFormatString="{0}" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}"/>
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Center" HeaderText="Fecha" DataTextField="FechaMovto" DataTextFormatString="{0:d}" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}"/>
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Center" HeaderText="Folio" ItemStyle-CssClass="Texto" DataTextField="FolioMovto" DataTextFormatString="{0}" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion,CveMarca,CveProveedorCompra" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}&CveProveedorCompra={10}"/>
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Center" HeaderText="Fecha" DataTextField="FechaMovto" DataTextFormatString="{0:d}" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion,CveMarca,CveProveedorCompra" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}&CveProveedorCompra={10}"/>
|
||||
<asp:TemplateField HeaderText="Costo" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLCosto" runat="server" Text='<%# If(Eval("Costo").ToString() = "0", "-", Eval("Costo", "{0:#,##0.00}")) %>'> </asp:HyperLink>
|
||||
|
||||
@@ -73,6 +73,11 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
'Carga Productos
|
||||
DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
|
||||
DdlProveedores.setEsWebService(True)
|
||||
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
|
||||
DdlProveedores.SelectedText = "Todos"
|
||||
DdlProveedores.SelectedValue = "-1"
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||
DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
||||
DdlPS.SelectedText = "Todos"
|
||||
@@ -99,6 +104,7 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
Dim CveCategoria As String = If(Request("CveCategoria") IsNot Nothing AndAlso Request("CveCategoria") <> "", Request("CveCategoria"), "-1").ToString
|
||||
Dim CvePS As String = If(Request("CvePS") IsNot Nothing AndAlso Request("CvePS") <> "", Request("CvePS"), "-1").ToString
|
||||
Dim CveMarca As String = If(Request("CveMarca") IsNot Nothing AndAlso Request("CveMarca") <> "", Request("CveMarca"), "-1").ToString
|
||||
Dim CveProveedorCompra As Integer = If(Request("CveProveedorCompra") IsNot Nothing AndAlso Request("CveProveedorCompra") <> "", Request("CveProveedorCompra"), "-1").ToString.ToEntero
|
||||
|
||||
DdlSubProyecto.SelectedValuesIfExistM(CveSubProyecto)
|
||||
DdlVendedor.SelectedValuesIfExistM(CveVendedor)
|
||||
@@ -117,6 +123,11 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
|
||||
DdlMarcas.SelectedValueExist(CveMarca)
|
||||
|
||||
If CveProveedorCompra > 0 Then
|
||||
DdlProveedores.SelectedValue = CveProveedorCompra.ToString
|
||||
DdlProveedores.SelectedText = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedorCompra).FiltroPrimeroValor("RazonSocial", "").ToString
|
||||
End If
|
||||
|
||||
txtFechaI.Text = FechaI
|
||||
txtFechaF.Text = FechaF
|
||||
|
||||
@@ -164,7 +175,7 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
Dim Sucursales As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString
|
||||
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
|
||||
|
||||
If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1) Then
|
||||
If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1, DdlProveedores.SelectedValue.ToEntero) Then
|
||||
DtVentas = ObjVentas.DtResultados
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
GvDatos.DataBind()
|
||||
@@ -244,9 +255,8 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
e.Row.Cells(15).ToolTip = "Factura sin pago registrado"
|
||||
End If
|
||||
|
||||
|
||||
Dim Liga As String = String.Format("/Ventas/RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}",
|
||||
e.Row.DBCampo("CveVenta"), e.Row.DBCampo("CveVendedor"), e.Row.DBCampo("FechaI").ToDate, e.Row.DBCampo("FechaF").ToDate, e.Row.DBCampo("CveCliente"), e.Row.DBCampo("Orden"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveClasificacion"))
|
||||
Dim Liga As String = String.Format("/Ventas/RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}&CveProveedorCompra={10}",
|
||||
e.Row.DBCampo("CveVenta"), e.Row.DBCampo("CveVendedor"), e.Row.DBCampo("FechaI").ToDate, e.Row.DBCampo("FechaF").ToDate, e.Row.DBCampo("CveCliente"), e.Row.DBCampo("Orden"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveClasificacion"), -1, e.Row.DBCampo("CveProveedorCompra"))
|
||||
e.Row.FCHyperLink("HLCosto").NavigateUrl = Liga
|
||||
e.Row.FCHyperLink("HlGanancia").NavigateUrl = Liga
|
||||
e.Row.FCHyperLink("HlPorGanancia").NavigateUrl = Liga
|
||||
@@ -316,7 +326,7 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
Dim Sucursales As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString
|
||||
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
|
||||
|
||||
If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1) Then
|
||||
If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1, DdlProveedores.SelectedValue.ToEntero) Then
|
||||
|
||||
Dim FechaInicio As String = txtFechaI.Text
|
||||
Dim FechaFin As String = txtFechaF.Text
|
||||
|
||||
@@ -216,7 +216,12 @@
|
||||
<div class="col-md-2">
|
||||
<asp:Dropdownlist runat="server" ID="DdlMarcas" CssStyle="width: 100%;" CssClass="form-control input-small input-sm select2me" Width="100%" DataTextField="Marca" DataValueField="CveMarca" />
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
Proveedor:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<ADS:Dropdownlost ID="DdlProveedores" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -98,6 +98,7 @@ Partial Class Ventas_RepVentasUtilidadDetalle
|
||||
Orden = IfNull(Request("Orden"), "-1").ToString.ToEntero
|
||||
CvePS = IfNull(Request("CvePS"), "-1").ToString.ToEntero
|
||||
CveClasificacion = IfNull(Request("CveClasificacion"), "-1").ToString.ToEntero
|
||||
|
||||
CargaCombos()
|
||||
|
||||
CargaDatos()
|
||||
@@ -122,9 +123,9 @@ Partial Class Ventas_RepVentasUtilidadDetalle
|
||||
Private Sub CargaCombos()
|
||||
|
||||
'Carga Clientes
|
||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||
DdlClientes.DataBind()
|
||||
If CveCliente > 0 Then DdlClientes.SelectedValueExist(CveCliente)
|
||||
'DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||
'DdlClientes.DataBind()
|
||||
'If CveCliente > 0 Then DdlClientes.SelectedValueExist(CveCliente)
|
||||
|
||||
'CargaSubProyectos
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(UsuarioActual.CveEmpresa)
|
||||
@@ -140,6 +141,11 @@ Partial Class Ventas_RepVentasUtilidadDetalle
|
||||
DdlVendedor.Enabled = False
|
||||
End If
|
||||
|
||||
DdlProveedores.setEsWebService(True)
|
||||
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
|
||||
DdlProveedores.SelectedText = "Todos"
|
||||
DdlProveedores.SelectedValue = "-1"
|
||||
|
||||
'Carga Productos
|
||||
DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
|
||||
@@ -158,14 +164,21 @@ Partial Class Ventas_RepVentasUtilidadDetalle
|
||||
DdlMarcas.DataBind()
|
||||
DdlMarcas.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
|
||||
Dim CveProveedorCompra As Integer = If(Request("CveProveedorCompra") IsNot Nothing AndAlso Request("CveProveedorCompra") <> "", Request("CveProveedorCompra"), "-1").ToString.ToEntero
|
||||
|
||||
If CveProveedorCompra > 0 Then
|
||||
DdlProveedores.SelectedValue = CveProveedorCompra.ToString
|
||||
DdlProveedores.SelectedText = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedorCompra).FiltroPrimeroValor("RazonSocial", "").ToString
|
||||
End If
|
||||
|
||||
'Cargo Clasificaciones
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
DdlClasificacion.DataBind()
|
||||
|
||||
DdlClasificacion.SelectedValueExist(CveClasificacion)
|
||||
DdlPS.SelectedValue = CvePS.ToString
|
||||
If CvePS.ToEntero > 0 AndAlso GlobalDTPS(UsuarioActual.CveEmpresa, CvePS.ToEntero).Rows.Count > 0 Then
|
||||
DdlPS.SelectedText = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS.ToEntero).Rows(0)("PSCodigo").ToString
|
||||
If CvePS.ToEntero > 0 AndAlso GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS.ToEntero).Rows.Count > 0 Then
|
||||
DdlPS.SelectedText = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS.ToEntero).Rows(0)("PSCodigo").ToString
|
||||
Else
|
||||
DdlPS.SelectedText = "Todos"
|
||||
End If
|
||||
@@ -178,7 +191,7 @@ Partial Class Ventas_RepVentasUtilidadDetalle
|
||||
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
|
||||
|
||||
If ObjVentas.GetReporteVentasUtilidadDetalle(Vendedores, If(CveVenta = -1, Orden, CveVenta), DdlClientes.SelectedValue.ToEntero, Sucursales,
|
||||
FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, -1, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1) Then
|
||||
FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, -1, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1, DdlProveedores.SelectedValue.ToEntero) Then
|
||||
DtVentas = ObjVentas.DtResultados
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
GvDatos.DataBind()
|
||||
@@ -299,7 +312,7 @@ Partial Class Ventas_RepVentasUtilidadDetalle
|
||||
Dim Sucursales As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString
|
||||
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
|
||||
If ObjVentas.GetReporteVentasUtilidadDetalle(Vendedores, CveVenta, DdlClientes.SelectedValue.ToEntero, Sucursales,
|
||||
FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, -1, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1) Then
|
||||
FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, -1, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1, DdlProveedores.SelectedValue.ToEntero) Then
|
||||
|
||||
Dim FechaInicio As String = txtFechaI.Text
|
||||
Dim FechaFin As String = txtFechaF.Text
|
||||
@@ -357,7 +370,7 @@ Partial Class Ventas_RepVentasUtilidadDetalle
|
||||
Dim Sucursales As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString
|
||||
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
|
||||
If ObjVentas.GetReporteVentasUtilidadDetalle(Vendedores, CveVenta, DdlClientes.SelectedValue.ToEntero, Sucursales,
|
||||
FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, -1, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1) Then
|
||||
FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, -1, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1, DdlProveedores.SelectedValue.ToEntero) Then
|
||||
|
||||
Dim FechaInicio As String = txtFechaI.Text
|
||||
Dim FechaFin As String = txtFechaF.Text
|
||||
|
||||
@@ -136,6 +136,7 @@
|
||||
<asp:ListItem Text="Clasificación" Value="8"></asp:ListItem>
|
||||
<asp:ListItem Text="Categoría" Value="10"></asp:ListItem>
|
||||
<asp:ListItem Text="Marca" Value="9"></asp:ListItem>
|
||||
<asp:ListItem Text="Proveedor" Value="11"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
@@ -200,6 +201,12 @@
|
||||
<asp:ListItem Text="No" Value="0"></asp:ListItem>
|
||||
</asp:Dropdownlist>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Proveedor:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<ADS:Dropdownlost ID="DdlProveedores" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -243,7 +250,7 @@
|
||||
DataKeyNames=""
|
||||
CssClass="table table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None" Width="100%" OnRowDataBound="GvDatos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Left" Target="_blank" HeaderText="Grupo" DataTextField="GPO" DataNavigateUrlFields="FechaI,FechaF,CveSubProyecto,CveCliente,CveVendedor,Grupo,GPO,CvePS,CveClasificacion,CveMarca,CveCategoria" DataNavigateUrlFormatString="RepVentasUtilidad.aspx?FechaI={0}&FechaF={1}&CveSubProyecto={2}&CveCliente={3}&CveVendedor={4}&Gpo={5}&CveGpo={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}&CveCategoria={10}" />
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Left" Target="_blank" HeaderText="Grupo" DataTextField="GPO" DataNavigateUrlFields="FechaI,FechaF,CveSubProyecto,CveCliente,CveVendedor,Grupo,GPO,CvePS,CveClasificacion,CveMarca,CveCategoria,CveProveedorCompra" DataNavigateUrlFormatString="RepVentasUtilidad.aspx?FechaI={0}&FechaF={1}&CveSubProyecto={2}&CveCliente={3}&CveVendedor={4}&Gpo={5}&CveGpo={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}&CveCategoria={10}&CveProveedorCompra={11}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Ventas" DataField="Ventas" DataFormatString="{0:N2}" />
|
||||
<%--<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Crédito" DataField="Credito" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="% Crédito" DataField="PorcentajeCredito" ItemStyle-Width="30px" />
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Drawing
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class Ventas_RepVentasUtilidadPadre
|
||||
@@ -82,6 +81,11 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
|
||||
DdlProveedores.setEsWebService(True)
|
||||
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
|
||||
DdlProveedores.SelectedText = "Todos"
|
||||
DdlProveedores.SelectedValue = "-1"
|
||||
|
||||
'Carga Vendedor
|
||||
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
||||
DdlVendedor.DataBind()
|
||||
@@ -161,7 +165,7 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
If ObjVentas.GetReportePadreVentasUtilidad(If(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM), DdlClientesWS.SelectedValue.ToEntero,
|
||||
If(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM), txtFechaI.Text.ToDate, txtFechaF.Text.ToDate,
|
||||
UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero,
|
||||
DdlMarcas.SelectedValue.ToEntero, DdlGarantia.SelectedValue.ToEntero, DdlFilial.SelectedValue.ToEntero) Then
|
||||
DdlMarcas.SelectedValue.ToEntero, DdlGarantia.SelectedValue.ToEntero, DdlFilial.SelectedValue.ToEntero, DdlProveedores.SelectedValue.ToEntero) Then
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
DtDatos = ObjVentas.DtResultados
|
||||
End If
|
||||
@@ -276,9 +280,9 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
e.Row.CssClass = "Totales"
|
||||
e.Row.Cells(0).Text = "Total"
|
||||
Dim Css As String = "Texto"
|
||||
Dim Liga As String = String.Format("/Ventas/RepVentasUtilidad.aspx?FechaI={0}&FechaF={1}&CveSubProyecto={2}&CveCliente={3}&CveVendedor={4}&Gpo={5}&CveGpo={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}&CveCategoria={10}",
|
||||
Dim Liga As String = String.Format("/Ventas/RepVentasUtilidad.aspx?FechaI={0}&FechaF={1}&CveSubProyecto={2}&CveCliente={3}&CveVendedor={4}&Gpo={5}&CveGpo={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}&CveCategoria={10}&CveProveedorCompra={11}",
|
||||
e.Row.DBCampo("FechaI"), e.Row.DBCampo("FechaF"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveVendedor"),
|
||||
e.Row.DBCampo("Grupo"), e.Row.DBCampo("GPO"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CveMarca"), e.Row.DBCampo("CveCategoria"))
|
||||
e.Row.DBCampo("Grupo"), e.Row.DBCampo("GPO"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CveMarca"), e.Row.DBCampo("CveCategoria"), e.Row.DBCampo("CveProveedorCompra"))
|
||||
e.Row.Cells(0).Text = String.Format("<a class=""{0}"" href=""{1}"">{2}</a>", Css, Liga, e.Row.Cells(0).Text)
|
||||
|
||||
'e.Row.Cells(3).Text =
|
||||
@@ -358,7 +362,7 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
If TxtModalFechaInicio.Text = "" Then FechaI = MinFecha
|
||||
If TxtModalFechaFin.Text = "" Then FechaF = MaxFecha
|
||||
|
||||
If ObjVentas.GetReporteVentasUtilidad("-1", -1, "-1", FechaI, FechaF, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1) Then
|
||||
If ObjVentas.GetReporteVentasUtilidad("-1", -1, "-1", FechaI, FechaF, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, -1) Then
|
||||
GvPorcentajes.DataSource = ObjVentas.DtResultados.FiltraParametros($" CveVenta > 0 AND PorNeto <= {TxtModalPorcentaje.Text.ToDecimal} AND TipoDocto = 'Ing' AND CveEstatusFactura IN(2,3) ")
|
||||
End If
|
||||
|
||||
|
||||
Reference in New Issue
Block a user