This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2021-06-26 11:21:13 -07:00
44 changed files with 1235 additions and 793 deletions

View File

@@ -107,7 +107,7 @@
<td> <td>
<asp:TextBox ID="TxtSindical" runat="server" Width="75px"></asp:TextBox></td> <asp:TextBox ID="TxtSindical" runat="server" Width="75px"></asp:TextBox></td>
<td> </td><td> </td> <td>P. Empleados:</td><td><asp:TextBox ID="TxtPrestamoEmpleados" runat="server" Width="75px"></asp:TextBox></td>
</tr> </tr>
</table> </table>
</asp:Panel> </asp:Panel>

View File

@@ -379,6 +379,7 @@ Partial Class AC_RegNomina
Dim IdCtaServicioMedico As Integer = 643 Dim IdCtaServicioMedico As Integer = 643
Dim IdCtaPension As Integer = 643 Dim IdCtaPension As Integer = 643
Dim IdCtaISRAsimilados As Integer = 4442 Dim IdCtaISRAsimilados As Integer = 4442
Dim IdCtaPrestamoEmpleados As Integer = 4477
Dim Importe As Double Dim Importe As Double
Dim MsgError As String = "" Dim MsgError As String = ""
@@ -617,6 +618,9 @@ Partial Class AC_RegNomina
Importe = TxtISRAsimilados.Text.ToDouble Importe = TxtISRAsimilados.Text.ToDouble
If Importe > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaISRAsimilados, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True If Importe > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaISRAsimilados, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True
'Registro Prestamo Empleados
Importe = TxtPrestamoEmpleados.Text.ToDouble
If Importe > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaPrestamoEmpleados, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True
''Registro del Mov Devolución ''Registro del Mov Devolución
'Importe = TxtISPT.Text.ToDouble - TxtCredSalario.Text.ToDouble 'Importe = TxtISPT.Text.ToDouble - TxtCredSalario.Text.ToDouble

View File

@@ -1294,7 +1294,8 @@ Public Class ClsPaginas
ObjPS.Dispose() ObjPS.Dispose()
End Get End Get
End Property End Property
Public Property GlobalDTPSSimplificado(CveEmpresa As Integer, Optional CveClasificacion As Integer = -1, Optional PSCodigo As String = "-1", Optional Estatus As Integer = 1, Optional AplicaParaVenta As Integer = -1, Optional CvePS As Integer = -1) As DataTable Public Property GlobalDTPSSimplificado(CveEmpresa As Integer, Optional CveClasificacion As Integer = -1, Optional PSCodigo As String = "-1", Optional Estatus As Integer = 1,
Optional AplicaParaVenta As Integer = -1, Optional CvePS As Integer = -1, Optional Codigo As String = "-1") As DataTable
Get Get
Dim AppNombre As String = String.Format("GlobalDTPSSimplificado-{0}", CveEmpresa) Dim AppNombre As String = String.Format("GlobalDTPSSimplificado-{0}", CveEmpresa)
If CveEmpresa <> -1 Then If CveEmpresa <> -1 Then
@@ -1312,6 +1313,8 @@ Public Class ClsPaginas
Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa)) Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa))
If CveClasificacion >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveClasificacion) = CveClasificacion)) If CveClasificacion >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveClasificacion) = CveClasificacion))
If PSCodigo <> "-1" Then Cons = Cons.Where((Function(a) Convert.ToString(a!PSCodigo) = PSCodigo)) If PSCodigo <> "-1" Then Cons = Cons.Where((Function(a) Convert.ToString(a!PSCodigo) = PSCodigo))
Codigo = Codigo.ToUpper().Trim()
If Codigo <> "-1" Then Cons = Cons.Where((Function(a) Convert.ToString(a!Codigo).ToUpper().Trim() = Codigo))
If Estatus >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEstado) = Estatus)) If Estatus >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEstado) = Estatus))
If AplicaParaVenta >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!AplicaParaVenta) = AplicaParaVenta)) If AplicaParaVenta >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!AplicaParaVenta) = AplicaParaVenta))
If CvePS >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CvePS) = CvePS)) If CvePS >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CvePS) = CvePS))
@@ -4620,6 +4623,7 @@ Public Class ClsPaginas
PaginaDict.Add("/GPS/RepGastos.aspx".ToUpper(), 685) PaginaDict.Add("/GPS/RepGastos.aspx".ToUpper(), 685)
PaginaDict.Add("/GPS/RecursoConfiableTracking.aspx".ToUpper(), 692) PaginaDict.Add("/GPS/RecursoConfiableTracking.aspx".ToUpper(), 692)
PaginaDict.Add("/GPS/KimberlyClarkTracking.aspx".ToUpper(), -1) PaginaDict.Add("/GPS/KimberlyClarkTracking.aspx".ToUpper(), -1)
PaginaDict.Add("/GPS/RepUnidades.aspx".ToUpper(), 780)
#End Region #End Region
'INVENTARIOS 'INVENTARIOS
#Region "Inventarios" #Region "Inventarios"
@@ -4693,6 +4697,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Inventarios/EntregasPorRealizar.aspx".ToUpper(), 728) PaginaDict.Add("/Inventarios/EntregasPorRealizar.aspx".ToUpper(), 728)
PaginaDict.Add("/Inventarios/CatAlmacenClasificacionSecciones.aspx".ToUpper(), 764) PaginaDict.Add("/Inventarios/CatAlmacenClasificacionSecciones.aspx".ToUpper(), 764)
PaginaDict.Add("/Inventarios/ReconstruirCostos.aspx".ToUpper(), 764) PaginaDict.Add("/Inventarios/ReconstruirCostos.aspx".ToUpper(), 764)
PaginaDict.Add("/Inventarios/RecepcionDevolucion.aspx".ToUpper(), 696)
#End Region #End Region
@@ -5079,6 +5084,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Ventas/MetasVendedores.aspx".ToUpper(), 722) PaginaDict.Add("/Ventas/MetasVendedores.aspx".ToUpper(), 722)
PaginaDict.Add("/Ventas/CatMetasVendedores.aspx".ToUpper(), 723) PaginaDict.Add("/Ventas/CatMetasVendedores.aspx".ToUpper(), 723)
PaginaDict.Add("/Ventas/RepAuxiliarFacturas.aspx".ToUpper(), 567) PaginaDict.Add("/Ventas/RepAuxiliarFacturas.aspx".ToUpper(), 567)
PaginaDict.Add("/Ventas/CatAutorizacionLimites.aspx".ToUpper(), 781)
#End Region #End Region
@@ -5953,6 +5959,19 @@ Public Class ClsPaginas
Dim TipoDocumentoRef As String = "" Dim TipoDocumentoRef As String = ""
Dim AplicaPagare As String = "1" Dim AplicaPagare As String = "1"
Dim RFCReceptor As String = ""
If String.IsNullOrEmpty(Vta.RFCReceptor) Then
RFCReceptor = Vta.Cliente.RFC
If Vta.FacturarSucursal Then
If Vta.ClienteSucursal IsNot Nothing Then
RFCReceptor = Vta.ClienteSucursal.RFC
End If
End If
Else
RFCReceptor = Vta.RFCReceptor
End If
Dim RutaCBB As String = String.Format("{0}CBB\{1}.jpg", Ruta, Vta.SerieFolio) Dim RutaCBB As String = String.Format("{0}CBB\{1}.jpg", Ruta, Vta.SerieFolio)
Dim ImagenCBB As New System.IO.FileInfo(RutaCBB) Dim ImagenCBB As New System.IO.FileInfo(RutaCBB)
Dim ImgCBB As String '= String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio) Dim ImgCBB As String '= String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
@@ -6082,7 +6101,7 @@ Public Class ClsPaginas
'Si no tiene CBB, SE GENERA 'Si no tiene CBB, SE GENERA
If Not ImagenCBB.Exists Then If Not ImagenCBB.Exists Then
Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar() Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
CBB.GenerarCBB(UsuarioActual.Empresa.RFC, Vta.Cliente.RFC, Vta.Total.ToString.ToDecimal, Vta.FolioFiscal, RutaCBB) CBB.GenerarCBB(UsuarioActual.Empresa.RFC, RFCReceptor, Vta.Total.ToString.ToDecimal, Vta.FolioFiscal, RutaCBB)
End If End If
ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio) ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
@@ -6097,7 +6116,7 @@ Public Class ClsPaginas
'CLIENTE 'CLIENTE
params.Add(New CrystalParametro("ClienteCodigo", Vta.Cliente.Codigo)) params.Add(New CrystalParametro("ClienteCodigo", Vta.Cliente.Codigo))
params.Add(New CrystalParametro("ClienteNombre", If(Vta.ClienteSucursal.ImprimeNombreSucursal = "True", If(Vta.CveClienteSucursal > 0, Vta.ClienteSucursal.Sucursal, Vta.Cliente.Nombre), If(Vta.AtencionA <> "" AndAlso Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.RFC = "XAXX010101000", $"{Vta.Cliente.Nombre}({Vta.AtencionA})", Vta.Cliente.Nombre)))) params.Add(New CrystalParametro("ClienteNombre", If(Vta.ClienteSucursal.ImprimeNombreSucursal = "True", If(Vta.CveClienteSucursal > 0, Vta.ClienteSucursal.Sucursal, Vta.Cliente.Nombre), If(Vta.AtencionA <> "" AndAlso Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso RFCReceptor = "XAXX010101000", $"{Vta.Cliente.Nombre}({Vta.AtencionA})", Vta.Cliente.Nombre))))
params.Add(New CrystalParametro("ClienteDireccion", ClienteDireccion)) params.Add(New CrystalParametro("ClienteDireccion", ClienteDireccion))
params.Add(New CrystalParametro("ClienteLugar", ClienteLugar)) params.Add(New CrystalParametro("ClienteLugar", ClienteLugar))
@@ -6129,7 +6148,7 @@ Public Class ClsPaginas
params.Add(New CrystalParametro("SelloSAT", Vta.SelloSAT)) params.Add(New CrystalParametro("SelloSAT", Vta.SelloSAT))
params.Add(New CrystalParametro("QR", ImgCBB)) params.Add(New CrystalParametro("QR", ImgCBB))
params.Add(New CrystalParametro("ClienteRFC", Vta.Cliente.RFC)) params.Add(New CrystalParametro("ClienteRFC", RFCReceptor))
params.Add(New CrystalParametro("FormaPago", Vta.FormaPagoText)) params.Add(New CrystalParametro("FormaPago", Vta.FormaPagoText))
params.Add(New CrystalParametro("Moneda", Vta.Moneda)) params.Add(New CrystalParametro("Moneda", Vta.Moneda))
params.Add(New CrystalParametro("TipoCambio", Vta.TipoCambio.ToString)) params.Add(New CrystalParametro("TipoCambio", Vta.TipoCambio.ToString))
@@ -6162,7 +6181,7 @@ Public Class ClsPaginas
params.Add(New CrystalParametro("ClienteTelefono", Vta.ClienteSucursal.TelefonoSucursal)) params.Add(New CrystalParametro("ClienteTelefono", Vta.ClienteSucursal.TelefonoSucursal))
Else Else
params.Add(New CrystalParametro("ClienteContactoMail", Vta.Cliente.MailCotizacion)) params.Add(New CrystalParametro("ClienteContactoMail", Vta.Cliente.MailCotizacion))
params.Add(New CrystalParametro("ClienteTelefono", If(Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.RFC = "XAXX010101000", Vta.TelefonoGenerico, Vta.Cliente.Telefono))) params.Add(New CrystalParametro("ClienteTelefono", If(Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.Telefono.Length > 6, Vta.Cliente.Telefono, Vta.TelefonoGenerico)))
End If End If
If UsuarioActual.CveEmpresa.Contiene(17) Then If UsuarioActual.CveEmpresa.Contiene(17) Then
@@ -6464,7 +6483,18 @@ Public Class ClsPaginas
Dim NombreArchivoDescarga As String = "" Dim NombreArchivoDescarga As String = ""
Dim TipoDocumento As String = "" Dim TipoDocumento As String = ""
Dim TipoDocumentoRef As String = "" Dim TipoDocumentoRef As String = ""
Dim RFCReceptor As String = ""
If String.IsNullOrEmpty(Vta.RFCReceptor) Then
RFCReceptor = Vta.Cliente.RFC
If Vta.FacturarSucursal Then
If Vta.ClienteSucursal IsNot Nothing Then
RFCReceptor = Vta.ClienteSucursal.RFC
End If
End If
Else
RFCReceptor = Vta.RFCReceptor
End If
Dim RutaCBB As String = String.Format("{0}CBB\{1}.jpg", Ruta, Vta.SerieFolio) Dim RutaCBB As String = String.Format("{0}CBB\{1}.jpg", Ruta, Vta.SerieFolio)
Dim ImagenCBB As New System.IO.FileInfo(RutaCBB) Dim ImagenCBB As New System.IO.FileInfo(RutaCBB)
@@ -6619,7 +6649,7 @@ Public Class ClsPaginas
'Si no tiene CBB, SE GENERA 'Si no tiene CBB, SE GENERA
If Not ImagenCBB.Exists AndAlso Vta.CveCliente.ToEntero > 0 Then If Not ImagenCBB.Exists AndAlso Vta.CveCliente.ToEntero > 0 Then
Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar() Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
CBB.GenerarCBB(UsuarioActual.Empresa.RFC, Vta.Cliente.RFC, Vta.Total.ToString.ToDecimal, Vta.FolioFiscal, RutaCBB) CBB.GenerarCBB(UsuarioActual.Empresa.RFC, RFCReceptor, Vta.Total.ToString.ToDecimal, Vta.FolioFiscal, RutaCBB)
End If End If
ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio) ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
@@ -6637,17 +6667,17 @@ Public Class ClsPaginas
'CLIENTE 'CLIENTE
If Vta.CveCliente.ToEntero > 0 Or Vta.CveEmpresaCRM.ToEntero > 0 Then If Vta.CveCliente.ToEntero > 0 Or Vta.CveEmpresaCRM.ToEntero > 0 Then
params.Add(New ReportParameter("ClienteCodigo", Vta.Cliente.Codigo)) params.Add(New ReportParameter("ClienteCodigo", Vta.Cliente.Codigo))
params.Add(New ReportParameter("ClienteNombre", If(Vta.ClienteSucursal.ImprimeNombreSucursal = "True", If(Vta.CveClienteSucursal > 0, Vta.ClienteSucursal.Sucursal, Vta.Cliente.Nombre), If(Vta.AtencionA <> "" AndAlso Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.RFC = "XAXX010101000", $"{Vta.Cliente.Nombre}({Vta.AtencionA})", Vta.Cliente.Nombre)))) params.Add(New ReportParameter("ClienteNombre", If(Vta.ClienteSucursal.ImprimeNombreSucursal = "True", If(Vta.CveClienteSucursal > 0, Vta.ClienteSucursal.Sucursal, Vta.Cliente.Nombre), If(Vta.AtencionA <> "" AndAlso Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso RFCReceptor = "XAXX010101000", $"{Vta.Cliente.Nombre}({Vta.AtencionA})", Vta.Cliente.Nombre))))
params.Add(New ReportParameter("ClienteDireccion", ClienteDireccion)) params.Add(New ReportParameter("ClienteDireccion", ClienteDireccion))
params.Add(New ReportParameter("ClienteLugar", ClienteLugar)) params.Add(New ReportParameter("ClienteLugar", ClienteLugar))
params.Add(New ReportParameter("ClienteRFC", Vta.Cliente.RFC)) params.Add(New ReportParameter("ClienteRFC", RFCReceptor))
End If End If
If Vta.CveEmpresaCRM.ToEntero > 0 Then If Vta.CveEmpresaCRM.ToEntero > 0 Then
params.Add(New ReportParameter("ClienteCodigo", Vta.Cliente.Codigo)) params.Add(New ReportParameter("ClienteCodigo", Vta.Cliente.Codigo))
params.Add(New ReportParameter("ClienteNombre", Vta.Cliente.Nombre)) params.Add(New ReportParameter("ClienteNombre", Vta.Cliente.Nombre))
params.Add(New ReportParameter("ClienteDireccion", ClienteDireccion)) params.Add(New ReportParameter("ClienteDireccion", ClienteDireccion))
params.Add(New ReportParameter("ClienteLugar", ClienteLugar)) params.Add(New ReportParameter("ClienteLugar", ClienteLugar))
params.Add(New ReportParameter("ClienteRFC", Vta.Cliente.RFC)) params.Add(New ReportParameter("ClienteRFC", RFCReceptor))
End If End If
'TOTALES 'TOTALES
@@ -6730,7 +6760,7 @@ Public Class ClsPaginas
params.Add(New ReportParameter("ClienteTelefono", Vta.ClienteSucursal.TelefonoSucursal)) params.Add(New ReportParameter("ClienteTelefono", Vta.ClienteSucursal.TelefonoSucursal))
ElseIf Vta.CveCliente.ToEntero > 0 Then ElseIf Vta.CveCliente.ToEntero > 0 Then
params.Add(New ReportParameter("ClienteContactoMail", Vta.Cliente.MailCotizacion)) params.Add(New ReportParameter("ClienteContactoMail", Vta.Cliente.MailCotizacion))
params.Add(New ReportParameter("ClienteTelefono", If(Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.Telefono.Length > 6, Vta.TelefonoGenerico, Vta.Cliente.Telefono))) params.Add(New ReportParameter("ClienteTelefono", If(Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.Telefono.Length > 6, Vta.Cliente.Telefono, Vta.TelefonoGenerico)))
End If End If
If UsuarioActual.CveEmpresa.Contiene(17) Then If UsuarioActual.CveEmpresa.Contiene(17) Then

View File

@@ -420,20 +420,6 @@ Public Class ClsSisEmpresas
_Empresa.IdCuentaIEPSTrasladado = Data.Rows(0)("IdCuentaIEPSTrasladado").ToString.ToEntero _Empresa.IdCuentaIEPSTrasladado = Data.Rows(0)("IdCuentaIEPSTrasladado").ToString.ToEntero
_Empresa.IdCuentaOtrosIngresos = Data.Rows(0)("Conta_IdCuentaOtrosIngresos").ToString.ToEntero _Empresa.IdCuentaOtrosIngresos = Data.Rows(0)("Conta_IdCuentaOtrosIngresos").ToString.ToEntero
'Contabilidad SIG
_Empresa.CveCuentaIVAxAcreditar = Data.Rows(0)("IdCuentaIVAxAcreditarSIG").ToString.ToEntero
_Empresa.CveCuentaIVAAcreditable = Data.Rows(0)("IdCuentaIVAAcreditableSIG").ToString.ToEntero
_Empresa.CveCuentaIVAxTrasladar = Data.Rows(0)("IdCuentaIVAxTrasladarSIG").ToString.ToEntero
_Empresa.CveCuentaIVATrasladado = Data.Rows(0)("IdCuentaIVATrasladadoSIG").ToString.ToEntero
_Empresa.CveCuentaRetIVACirculacion = Data.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
_Empresa.CveCuentaRetISRCirculacion = Data.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
_Empresa.CveCuentaDSV = Data.Rows(0)("IdCuentaDescuentoVentaSIG").ToString.ToEntero
_Empresa.CveCuentaImpuestosLocales = Data.Rows(0)("IdCuentaImpuestosLocalesSIG").ToString.ToEntero
_Empresa.CveCuentaIEPSxAcreditar = Data.Rows(0)("IdCuentaIEPSxAcreditarSIG").ToString.ToEntero
_Empresa.CveCuentaIEPSAcreditable = Data.Rows(0)("IdCuentaIEPSAcreditableSIG").ToString.ToEntero
_Empresa.CveCuentaIEPSxTrasladar = Data.Rows(0)("IdCuentaIEPSxTrasladarSIG").ToString.ToEntero
_Empresa.CveCuentaIEPSTrasladado = Data.Rows(0)("IdCuentaIEPSTrasladadoSIG").ToString.ToEntero
'_Empresa.IdCtaProveedor = Data.Rows(0)("IdCtaProveedor").ToString.ToEntero '_Empresa.IdCtaProveedor = Data.Rows(0)("IdCtaProveedor").ToString.ToEntero
'_Empresa.IdCtaCliente = Data.Rows(0)("IdCtaCliente").ToString.ToEntero '_Empresa.IdCtaCliente = Data.Rows(0)("IdCtaCliente").ToString.ToEntero
'_Empresa.IdCtaDeudores = Data.Rows(0)("IdCtaDeudores").ToString.ToEntero '_Empresa.IdCtaDeudores = Data.Rows(0)("IdCtaDeudores").ToString.ToEntero

View File

@@ -821,7 +821,7 @@ Public Class ClsSisUsuarios
Public Function AddUsuario(Usuario As String, Contraseña As String, Nombre As String, CveRol As Integer, Correo As String, Public Function AddUsuario(Usuario As String, Contraseña As String, Nombre As String, CveRol As Integer, Correo As String,
CvePersonal As Integer, CveVendedor As Integer, CambiarContraseña As Boolean, CvePersonal As Integer, CveVendedor As Integer, CambiarContraseña As Boolean,
CveUsuarioIng As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, Optional Rol As String = "-1", Optional CveAlmacenAsignado As Integer = -1, Optional AsignarSubProyecto As Boolean = False, Optional AsignarOC As Boolean = False, CveUsuarioIng As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, Optional Rol As String = "-1", Optional CveAlmacenAsignado As Integer = -1, Optional AsignarSubProyecto As Boolean = False, Optional AsignarOC As Boolean = False,
Optional CvePlataforma As Integer = -1, Optional CveClientePlataforma As Integer = -1, Optional CveProveedorPlataforma As Integer = -1, Optional DescuentoAutorizado As Double = 0, Optional CodigoAcceso As String = "-1") As Integer Optional CvePlataforma As Integer = -1, Optional CveClientePlataforma As Integer = -1, Optional CveProveedorPlataforma As Integer = -1, Optional DescuentoAutorizado As Double = 0, Optional CodigoAcceso As String = "-1", Optional LimiteCreditoAutorizado As Decimal = 0) As Integer
Dim Retorno = -1 Dim Retorno = -1
DataAdapter("PA_Sis_UsuarioAdd") DataAdapter("PA_Sis_UsuarioAdd")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
@@ -842,6 +842,7 @@ Public Class ClsSisUsuarios
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedorPlataforma .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedorPlataforma
.Add("@DescuentoAutorizado", SqlDbType.Float).Value = DescuentoAutorizado .Add("@DescuentoAutorizado", SqlDbType.Float).Value = DescuentoAutorizado
.Add("@CodigoAcceso", SqlDbType.VarChar).Value = CodigoAcceso .Add("@CodigoAcceso", SqlDbType.VarChar).Value = CodigoAcceso
.Add("@LimiteCreditoAutorizado", SqlDbType.Money).Value = LimiteCreditoAutorizado
.Add("@CveUsuario", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@CveUsuario", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
@@ -940,7 +941,7 @@ Public Class ClsSisUsuarios
End Function End Function
Public Function UpdateUsuario(Usuario As String, Nombre As String, CveRol As Integer, Correo As String, CvePersonal As Integer, Public Function UpdateUsuario(Usuario As String, Nombre As String, CveRol As Integer, Correo As String, CvePersonal As Integer,
CveVendedor As Integer, CambiarContraseña As Boolean, Activo As Boolean, CveEmpresa As Integer, CveUsuario As Integer, CveAlmacenAsignado As Integer, CveSubProyecto As Integer, Optional CveUsuarioModifico As Integer = -1, Optional AsignarSubProyecto As Boolean = False, Optional AsignarOC As Boolean = False, CveVendedor As Integer, CambiarContraseña As Boolean, Activo As Boolean, CveEmpresa As Integer, CveUsuario As Integer, CveAlmacenAsignado As Integer, CveSubProyecto As Integer, Optional CveUsuarioModifico As Integer = -1, Optional AsignarSubProyecto As Boolean = False, Optional AsignarOC As Boolean = False,
Optional DescuentoAutorizado As Double = 0, Optional CodigoAcceso As String = "-1") As Boolean Optional DescuentoAutorizado As Double = 0, Optional CodigoAcceso As String = "-1", Optional LimiteCreditoAutorizado As Decimal = 0) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Sis_UsuarioUpdate") DataAdapter("PA_Sis_UsuarioUpdate")
@@ -962,6 +963,7 @@ Public Class ClsSisUsuarios
.Add("@AsignarOC", SqlDbType.Bit).Value = AsignarOC .Add("@AsignarOC", SqlDbType.Bit).Value = AsignarOC
.Add("@DescuentoAutorizado", SqlDbType.Float).Value = DescuentoAutorizado .Add("@DescuentoAutorizado", SqlDbType.Float).Value = DescuentoAutorizado
.Add("@CodigoAcceso", SqlDbType.VarChar).Value = CodigoAcceso .Add("@CodigoAcceso", SqlDbType.VarChar).Value = CodigoAcceso
.Add("@LimiteCreditoAutorizado", SqlDbType.Money).Value = LimiteCreditoAutorizado
End With End With
Try Try

View File

@@ -341,7 +341,7 @@ Public Class ClsVentas
Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional CveUsoCFDI As Integer = -1, Optional OrdenCompra As String = "-1", Optional CveCuentaTerminal As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ImpuestoLocal As Double = 0, Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional CveUsoCFDI As Integer = -1, Optional OrdenCompra As String = "-1", Optional CveCuentaTerminal As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ImpuestoLocal As Double = 0,
Optional CveTipoAmortizacionAnticipo As Integer = -1, Optional CveVentaRelacion As Integer = -1, Optional ImporteRelacion As Decimal = -1, Optional CveEmpresaCRM As Integer = -1, Optional EsInterno As Integer = -1, Optional CveAcercamientoCRM As Integer = -1, Optional CveTipoAmortizacionAnticipo As Integer = -1, Optional CveVentaRelacion As Integer = -1, Optional ImporteRelacion As Decimal = -1, Optional CveEmpresaCRM As Integer = -1, Optional EsInterno As Integer = -1, Optional CveAcercamientoCRM As Integer = -1,
Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0,
Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False, Optional ServicioDomicilio As Boolean = False, Optional RFCReceptor As String = "", Optional Adjunto As String = "-1") As Boolean Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False, Optional ServicioDomicilio As Boolean = False, Optional RFCReceptor As String = "", Optional Adjunto As String = "-1", Optional DevolucionImportePagado As Decimal = 0) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_VentasAdd") DataAdapter("PA_VentasAdd")
@@ -438,6 +438,8 @@ Public Class ClsVentas
.Add("@RFCReceptor", SqlDbType.VarChar).Value = RFCReceptor .Add("@RFCReceptor", SqlDbType.VarChar).Value = RFCReceptor
.Add("@Adjunto", SqlDbType.VarChar).Value = Adjunto .Add("@Adjunto", SqlDbType.VarChar).Value = Adjunto
.Add("@DevolucionImportePagado", SqlDbType.Money).Value = DevolucionImportePagado
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
End With End With
'SqlTypes.SqlDateTime.Null 'SqlTypes.SqlDateTime.Null
@@ -4387,8 +4389,6 @@ Public Class ClsVentas
Return Retorno Return Retorno
End Function End Function
#End Region #End Region
#Region " AUTORIZACION LIMITES " #Region " AUTORIZACION LIMITES "
Public Function AutorizacionLimitesGet(CveCliente As Integer, CveCveVendedor As Integer, CveEstatus As Integer) As Boolean Public Function AutorizacionLimitesGet(CveCliente As Integer, CveCveVendedor As Integer, CveEstatus As Integer) As Boolean
@@ -5091,6 +5091,81 @@ Public Class ClsVentas
End Function End Function
#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) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_AutorizacionLimitesAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@Importe", SqlDbType.Money).Value = Importe
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@TipoAutorizacion", SqlDbType.Int).Value = TipoAutorizacion
.Add("@TipoDocumento", SqlDbType.VarChar).Value = TipoDocumento
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los limites.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function GetAutorizacionLimite(CveEmpresa As Integer, CveCliente As Integer, CveVendedor As Integer, Optional CveEstatus As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_AutorizacionLimitesGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los limites.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function UpdateAutorizacionLimite(CveAutorizacion As Integer, CveCliente As Integer, CveVenta As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_AutorizacionlimitesEstatusUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveAutorizacion", SqlDbType.Int).Value = CveAutorizacion
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar los limites.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function RemoveAutorizacionLimite(CveAutorizacion As Integer, CveCliente As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_AutorizacionLimitesRemove")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveAutorizacion", SqlDbType.Int).Value = CveAutorizacion
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al eliminar los limites.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
#Region "IDisposable Support" #Region "IDisposable Support"

View File

@@ -108,12 +108,7 @@ Public Class Empresa
Public Property IdCuentaIVAxTrasladar As Integer Public Property IdCuentaIVAxTrasladar As Integer
Public Property IdCuentaIVATrasladado As Integer Public Property IdCuentaIVATrasladado As Integer
Public Property IdCuentaPerdidaCambiaria As Integer Public Property IdCuentaPerdidaCambiaria As Integer
Public Property IdCuentaGananciaCambiaria As Integer Public Property IdCuentaGananciaCambiaria As Integer
Public Property CveCuentaIVAxTrasladar As Integer
Public Property CveCuentaIVATrasladado As Integer
Public Property CveCuentaPerdidaCambiaria As Integer
Public Property CveCuentaGananciaCambiaria As Integer
Public Property ContaContabilizacionNC As Integer Public Property ContaContabilizacionNC As Integer
Public Property PV_TerminalTipo As Integer Public Property PV_TerminalTipo As Integer
Public Property PlantillaMailVenta As String Public Property PlantillaMailVenta As String
@@ -132,20 +127,9 @@ Public Class Empresa
Public Property IdCtaAcreedores As Integer Public Property IdCtaAcreedores As Integer
Public Property IdCtaDocXPagar As Integer Public Property IdCtaDocXPagar As Integer
Public Property IdCtaAnticipoCliente As Integer Public Property IdCtaAnticipoCliente As Integer
Public Property IdCtaAnticipoProveedores As Integer Public Property IdCtaAnticipoProveedores As Integer
Public Property CveCuentaIVAxAcreditar As Integer 'Nuevos Datos
Public Property CveCuentaIVAAcreditable As Integer
Public Property CveCuentaRetIVACirculacion As Integer
Public Property CveCuentaRetISRCirculacion As Integer
Public Property CveCuentaDSV As Integer
Public Property CveCuentaImpuestosLocales As Integer
Public Property CveCuentaIEPSxAcreditar As Integer
Public Property CveCuentaIEPSAcreditable As Integer
Public Property CveCuentaIEPSxTrasladar As Integer
Public Property CveCuentaIEPSTrasladado As Integer
'Nuevos Datos
Public Property IdCuentaIEPSxAcreditar As Integer Public Property IdCuentaIEPSxAcreditar As Integer
Public Property IdCuentaIEPSAcreditable As Integer Public Property IdCuentaIEPSAcreditable As Integer
Public Property IdCuentaIEPSxTrasladar As Integer Public Property IdCuentaIEPSxTrasladar As Integer

View File

@@ -2268,7 +2268,6 @@ Namespace Modelos
Dim FechaMovimiento As Date = ObjFactura.Fecha Dim FechaMovimiento As Date = ObjFactura.Fecha
Dim IdCtaContable As Integer Dim IdCtaContable As Integer
Dim IdCtaContableCliente As Integer Dim IdCtaContableCliente As Integer
Dim CveCuentaCliente As Integer
Dim Concepto As String = ObjFactura.SerieFolio Dim Concepto As String = ObjFactura.SerieFolio
Dim Referencia As String = ObjFactura.SerieFolio Dim Referencia As String = ObjFactura.SerieFolio
Dim Fecha = ObjFactura.Fecha Dim Fecha = ObjFactura.Fecha
@@ -2282,8 +2281,6 @@ Namespace Modelos
Dim CveSubProyectoContabilizar As Integer Dim CveSubProyectoContabilizar As Integer
Dim IdCtaIVAXTrasladar As Integer = 0 Dim IdCtaIVAXTrasladar As Integer = 0
Dim IdCtaIVATrasladado As Integer = 0 Dim IdCtaIVATrasladado As Integer = 0
Dim CveCuentaIVAxTrasladar As Integer = 0
Dim CveCuentaIVATrasladado As Integer = 0
Dim SeContabiliza As Boolean = True Dim SeContabiliza As Boolean = True
If (UsuarioActual.Empresa.Funcionalidad(343) = "1" AndAlso ObjFactura.TipoDocto = "Ant") Then If (UsuarioActual.Empresa.Funcionalidad(343) = "1" AndAlso ObjFactura.TipoDocto = "Ant") Then
@@ -2471,7 +2468,6 @@ Namespace Modelos
End If End If
IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
'CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera
End If End If
CveSubProyectoContabilizar = CveSubProyectoVenta CveSubProyectoContabilizar = CveSubProyectoVenta
ImporteConcepto12 = importeMX.RoundSQL ImporteConcepto12 = importeMX.RoundSQL
@@ -2847,7 +2843,6 @@ Namespace Modelos
'CTACONTABLE 'CTACONTABLE
'IdCtaContable = IdCtaContAnticipos 'IdCtaContable = IdCtaContAnticipos
'CveCuenta = CveCuentaAnticipos
If tipoCambio = 1 Then If tipoCambio = 1 Then
IdCtaContable = ObjFactura.Cliente.IdCtaContClientes IdCtaContable = ObjFactura.Cliente.IdCtaContClientes
@@ -2996,7 +2991,7 @@ Namespace Modelos
End If End If
If sumaAmorticaciones <> 0 Then If sumaAmorticaciones <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, sumaAmorticaciones, Referencia, 251, Concepto, FechaMovimiento, If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, sumaAmorticaciones, Referencia, 251, Concepto, FechaMovimiento,
ObjFactura.Cliente.IdCtaContClientes, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=sumaAmorticaciones * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuentaCliente, CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then ObjFactura.Cliente.IdCtaContClientes, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=sumaAmorticaciones * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Else Else
ObjFactura.SeGuardoPrePoliza = True ObjFactura.SeGuardoPrePoliza = True
@@ -3052,9 +3047,6 @@ Namespace Modelos
IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
End If End If
'CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
If importeMovimiento <> 0 Then If importeMovimiento <> 0 Then
If IdCtaContable <= 0 Then If IdCtaContable <= 0 Then
@@ -3135,8 +3127,6 @@ Namespace Modelos
If Row2("CveClasificacion").ToString = "19929" Then IdCtaContable = 1142 If Row2("CveClasificacion").ToString = "19929" Then IdCtaContable = 1142
End If End If
'CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
If importeMovimiento <> 0 Then If importeMovimiento <> 0 Then
If IdCtaContable <= 0 Then If IdCtaContable <= 0 Then
@@ -3144,10 +3134,6 @@ Namespace Modelos
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
'If CveCuenta <= 0 Then
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"))
' CveCuentaContabilizacion = 0
'End If
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal) Then If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal) Then
ErrorPrepoliza = True ErrorPrepoliza = True
@@ -3171,7 +3157,6 @@ Namespace Modelos
If importeMovimiento <> 0 AndAlso ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then If importeMovimiento <> 0 AndAlso ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("Conta_IdCuentaDescuentoVenta").ToString().ToEntero() IdCtaContable = ObjConta.DtResultados.Rows(0)("Conta_IdCuentaDescuentoVenta").ToString().ToEntero()
'CveCuenta = ObjConta.DtResultados.Rows(0)("Conta_IdCuentaDescuentoVenta").ToString().ToEntero()
End If End If
End If End If
@@ -3334,20 +3319,18 @@ Namespace Modelos
' If importeMovimiento <> 0 Then ' If importeMovimiento <> 0 Then
' 'IVA X TRASLADAR ' 'IVA X TRASLADAR
' IdCtaIVAXTrasladar = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar) ' IdCtaIVAXTrasladar = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
' CveCuentaIVAxTrasladar = If(CveCuentaIVAxTrasladar > 0, CveCuentaIVAxTrasladar, UsuarioActual.Empresa.CveCuentaIVAxTrasladar)
' Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 13, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString()) ' Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 13, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
' If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 13, Concepto, Fecha, IdCtaIVAXTrasladar, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=-1, ImporteMX:=importeMX * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuentaIVAxTrasladar, CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuesto) Then ' If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 13, Concepto, Fecha, IdCtaIVAXTrasladar, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=-1, ImporteMX:=importeMX * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuesto) Then
' ErrorPrepoliza = True ' ErrorPrepoliza = True
' Exit For ' Exit For
' End If ' End If
' 'IVA PAGADO ' 'IVA PAGADO
' IdCtaIVATrasladado = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado) ' IdCtaIVATrasladado = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
' CveCuentaIVATrasladado = If(CveCuentaIVATrasladado > 0, CveCuentaIVATrasladado, UsuarioActual.Empresa.CveCuentaIVATrasladado)
' Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 61, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString()) ' Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 61, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
' If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 61, Concepto, Fecha, IdCtaIVATrasladado, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=-1, ImporteMX:=importeMX * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuentaIVATrasladado, CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuesto) Then ' If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 61, Concepto, Fecha, IdCtaIVATrasladado, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=-1, ImporteMX:=importeMX * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuesto) Then
' ErrorPrepoliza = True ' ErrorPrepoliza = True
' Exit For ' Exit For
' End If ' End If
@@ -3437,7 +3420,6 @@ Namespace Modelos
If GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows.Count = 1 Then If GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows.Count = 1 Then
IdCtaContable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("IdCtaContable").ToString.ToEntero IdCtaContable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("IdCtaContable").ToString.ToEntero
' CveCuenta = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero).Rows(0)("IdCtaContableSIG").ToString.ToEntero
End If End If
If IdCtaContable <= 0 Then If IdCtaContable <= 0 Then
@@ -3445,11 +3427,6 @@ Namespace Modelos
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
'If CveCuenta <= 0 Then
' CuentasContablesInvalidasSIG.AppendFormat("<br> {0}", GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero).Rows(0)("NumCuentaMoneda").ToString.ToEntero)
' CveCuentaContabilizacion = 0
'End If
'BANCOS 'BANCOS
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 30, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString) Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 30, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString)
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento)) Then If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento)) Then
@@ -3459,39 +3436,37 @@ Namespace Modelos
'CLIENTES 'CLIENTES
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 2, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString) Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 2, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString)
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 2, Concepto, Fecha, IdCtaContableCliente, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuentaCliente, CveSubProyecto:=CveSubProyectoContabilizar) Then If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 2, Concepto, Fecha, IdCtaContableCliente, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Exit For Exit For
End If End If
'IVA X TRASLADAR 'IVA X TRASLADAR
IdCtaIVAXTrasladar = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar) IdCtaIVAXTrasladar = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
CveCuentaIVAxTrasladar = If(CveCuentaIVAxTrasladar > 0, CveCuentaIVAxTrasladar, UsuarioActual.Empresa.CveCuentaIVAxTrasladar)
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 13, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString) Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 13, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString)
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, (importeMovimiento * ObjFactura.IVA) / ObjFactura.Total, Referencia, 13, Concepto, Fecha, IdCtaIVAXTrasladar, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IVA) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuentaIVAxTrasladar, CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, (importeMovimiento * ObjFactura.IVA) / ObjFactura.Total, Referencia, 13, Concepto, Fecha, IdCtaIVAXTrasladar, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IVA) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Exit For Exit For
End If End If
'IVA PAGADO 'IVA PAGADO
IdCtaIVATrasladado = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado) IdCtaIVATrasladado = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
CveCuentaIVATrasladado = If(CveCuentaIVATrasladado > 0, CveCuentaIVATrasladado, UsuarioActual.Empresa.CveCuentaIVATrasladado)
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 61, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString) Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 61, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString)
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, (importeMovimiento * ObjFactura.IVA) / ObjFactura.Total, Referencia, 61, Concepto, Fecha, IdCtaIVATrasladado, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IVA) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuentaIVATrasladado, CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, (importeMovimiento * ObjFactura.IVA) / ObjFactura.Total, Referencia, 61, Concepto, Fecha, IdCtaIVATrasladado, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IVA) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Exit For Exit For
End If End If
'IEPS X TRASLADAR 'IEPS X TRASLADAR
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 38, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString) Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 38, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString)
If ObjFactura.IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, (importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total, Referencia, 38, Concepto, Fecha, UsuarioActual.Empresa.IdCuentaIEPSxTrasladar, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=UsuarioActual.Empresa.CveCuentaIEPSxTrasladar, CveSubProyecto:=CveSubProyectoContabilizar) Then If ObjFactura.IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, (importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total, Referencia, 38, Concepto, Fecha, UsuarioActual.Empresa.IdCuentaIEPSxTrasladar, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Exit For Exit For
End If End If
'IEPS PAGADO 'IEPS PAGADO
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 39, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString) Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 39, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString)
If ObjFactura.IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, (importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total, Referencia, 39, Concepto, Fecha, UsuarioActual.Empresa.IdCuentaIEPSTrasladado, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=UsuarioActual.Empresa.CveCuentaIEPSTrasladado, CveSubProyecto:=CveSubProyectoContabilizar) Then If ObjFactura.IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, (importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total, Referencia, 39, Concepto, Fecha, UsuarioActual.Empresa.IdCuentaIEPSTrasladado, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Exit For Exit For
End If End If
@@ -3515,11 +3490,6 @@ Namespace Modelos
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
'If CveCuenta <= 0 Then
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
' CveCuentaContabilizacion = 0
'End If
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=tipoCambio, Contabilizable:=SeContabiliza) Then If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=tipoCambio, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Else Else
@@ -3966,13 +3936,11 @@ Namespace Modelos
Dim DtCostos = ObjInventario.DtResultados.Copy Dim DtCostos = ObjInventario.DtResultados.Copy
Dim DtCostosDistinct As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"}) Dim DtCostosDistinct As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"})
Dim IdCtaContable As Integer = 0 Dim IdCtaContable As Integer = 0
Dim CveCuenta As Integer = 0
Dim ValorInventario As Decimal Dim ValorInventario As Decimal
For Each RowInv As DataRow In DtCostosDistinct.Rows For Each RowInv As DataRow In DtCostosDistinct.Rows
ValorInventario = DtCostos.SUM("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).ToString.ToDecimal ValorInventario = DtCostos.SUM("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).ToString.ToDecimal
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
Try Try
If ValorInventario <> 0 Then If ValorInventario <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(Me.CvePrePoliza, False, ValorInventario, Me.SerieFolio, 69, Me.SerieFolio, Me.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=Me.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveSubProyecto:=Me.CveSubProyecto) Then If Not ObjConta.AddPrePolizasDetalle(Me.CvePrePoliza, False, ValorInventario, Me.SerieFolio, 69, Me.SerieFolio, Me.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=Me.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveSubProyecto:=Me.CveSubProyecto) Then
@@ -3998,7 +3966,6 @@ Namespace Modelos
End If End If
End If End If
'VALIDA QUE SE HALLAN AGREGADO DETALLES AL MOVIMIENTO 'VALIDA QUE SE HALLAN AGREGADO DETALLES AL MOVIMIENTO
If ContadorMovtosDetalles = 0 Then If ContadorMovtosDetalles = 0 Then
OcurrioError = True OcurrioError = True
@@ -4008,8 +3975,6 @@ Namespace Modelos
OcurrioError = True OcurrioError = True
End If End If
If OcurrioError Then If OcurrioError Then
Return -1 Return -1
Else Else
@@ -4121,7 +4086,6 @@ Namespace Modelos
TotalCosto = DtCostos.SUMD("Total").RoundSQL TotalCosto = DtCostos.SUMD("Total").RoundSQL
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"}) Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
Dim IdCtaContable As Integer = 0 Dim IdCtaContable As Integer = 0
Dim CveCuenta As Integer = 0
If tmpCostos.Rows.Count > 0 Then If tmpCostos.Rows.Count > 0 Then
Dim TotalCostoAcumulado As Decimal = 0 Dim TotalCostoAcumulado As Decimal = 0
Dim cont As Integer = 1 Dim cont As Integer = 1
@@ -4137,10 +4101,9 @@ Namespace Modelos
'Concepto = String.Format("{0} - {1}", Row2("Clasificacion").ToString(), Row2("SubProyecto").ToString()) 'Concepto = String.Format("{0} - {1}", Row2("Clasificacion").ToString(), Row2("SubProyecto").ToString())
IdCtaContable = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() IdCtaContable = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
'CveCuenta = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
'If ValorInventario <> 0 Then 'If ValorInventario <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto69, ValorInventario, factura.SerieFolio, 69, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta) Then If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto69, ValorInventario, factura.SerieFolio, 69, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario) Then
OcurrioError = True OcurrioError = True
End If End If
'End If 'End If
@@ -4262,7 +4225,6 @@ Namespace Modelos
TotalCosto = DtCostos.SUMD("Total").RoundSQL TotalCosto = DtCostos.SUMD("Total").RoundSQL
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"}) Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
Dim IdCtaContable As Integer = 0 Dim IdCtaContable As Integer = 0
Dim CveCuenta As Integer = 0
If tmpCostos.Rows.Count > 0 Then If tmpCostos.Rows.Count > 0 Then
Dim TotalCostoAcumulado As Decimal = 0 Dim TotalCostoAcumulado As Decimal = 0
Dim cont As Integer = 1 Dim cont As Integer = 1
@@ -4278,10 +4240,9 @@ Namespace Modelos
'Concepto = String.Format("{0} - {1}", Row2("Clasificacion").ToString(), Row2("SubProyecto").ToString()) 'Concepto = String.Format("{0} - {1}", Row2("Clasificacion").ToString(), Row2("SubProyecto").ToString())
IdCtaContable = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() IdCtaContable = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
'CveCuenta = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
'If ValorInventario <> 0 Then 'If ValorInventario <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto69, ValorInventario, factura.SerieFolio, 69, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta) Then If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto69, ValorInventario, factura.SerieFolio, 69, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario) Then
OcurrioError = True OcurrioError = True
End If End If
'End If 'End If
@@ -4347,7 +4308,7 @@ Namespace Modelos
If factura.DtImpuestosLocales IsNot Nothing AndAlso factura.CvePrePoliza > 0 AndAlso Not factura.TipoDocto.Contiene("Cot", "Rem") Then If factura.DtImpuestosLocales IsNot Nothing AndAlso factura.CvePrePoliza > 0 AndAlso Not factura.TipoDocto.Contiene("Cot", "Rem") Then
Dim Importe As Decimal Dim Importe As Decimal
Dim IdCtaContable, CveCuenta As Integer Dim IdCtaContable As Integer
Dim Concepto As String Dim Concepto As String
Dim tipoCambio As Decimal Dim tipoCambio As Decimal
Dim CveSubProyectoContabilizar As Integer = factura.CveSubProyecto Dim CveSubProyectoContabilizar As Integer = factura.CveSubProyecto
@@ -4357,7 +4318,6 @@ Namespace Modelos
Importe = RowIL("Importe").ToString.ToDecimal * ValorMultiplicador Importe = RowIL("Importe").ToString.ToDecimal * ValorMultiplicador
IdCtaContable = RowIL("IdCtaContable").ToString.ToEntero IdCtaContable = RowIL("IdCtaContable").ToString.ToEntero
CveCuenta = RowIL("IdCtaContable").ToString.ToEntero
Concepto = factura.SerieFolio Concepto = factura.SerieFolio
If factura.CveMoneda = 2 AndAlso factura.TipoCambio > 0 Then If factura.CveMoneda = 2 AndAlso factura.TipoCambio > 0 Then
@@ -5107,9 +5067,7 @@ Namespace Modelos
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"}) Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
Dim IdCtaContableAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {CveAlmacenMovimiento}").ToEntero Dim IdCtaContableAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {CveAlmacenMovimiento}").ToEntero
'Dim CveCuentaAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen = {CveAlmacenDevolucion}").ToEntero
Dim IdCtaContable As Integer = 0 Dim IdCtaContable As Integer = 0
Dim CveCuenta As Integer = 0
If tmpCostos.Rows.Count > 0 Then If tmpCostos.Rows.Count > 0 Then
Dim Multiplicador As Decimal = -1D Dim Multiplicador As Decimal = -1D
@@ -6133,6 +6091,8 @@ Namespace Modelos
Public Property CveDireccionEnvio As Integer Public Property CveDireccionEnvio As Integer
Public Property RefacturacionGeneroNC As Boolean = False Public Property RefacturacionGeneroNC As Boolean = False
Public Property Pagado As Decimal Public Property Pagado As Decimal
Public Property PagadoBancos As Decimal
Public Property PagadoCveIE As Integer
Public Property DescuentoProntoPago As Decimal Public Property DescuentoProntoPago As Decimal
Public Property CveVentaRNCCargo As Integer Public Property CveVentaRNCCargo As Integer
Public Property FacturarSucursal As Boolean = False Public Property FacturarSucursal As Boolean = False
@@ -6503,6 +6463,7 @@ Namespace Modelos
Public Property FordGSDB As String = "" Public Property FordGSDB As String = ""
Public Property FordASN As String = "" Public Property FordASN As String = ""
Public Property FemsaFactura As Modelos.FemsaFactura Public Property FemsaFactura As Modelos.FemsaFactura
Public Property DevolucionImportePagado As Decimal = 0
Public Sub SetSubProyecto() Public Sub SetSubProyecto()
If CveSubProyecto > 0 AndAlso UsuarioActual IsNot Nothing Then If CveSubProyecto > 0 AndAlso UsuarioActual IsNot Nothing Then
@@ -7735,24 +7696,6 @@ Namespace Modelos
End Property End Property
'Property GlobalDTBancosCuentas(CveUsuario As Integer, Optional CveCuenta As Integer = -1, Optional Estatus As Integer = 1) As DataTable
' Get
' Dim Str As String = String.Format("CveEmpresa = {0} ", UsuarioActual.CveEmpresa)
' If CveUsuario > -1 Then Str = String.Format("{0} AND CveUsuario = {1}", Str, CveUsuario)
' If CveCuenta > -1 Then Str = String.Format("{0} AND CveCuenta = {1}", Str, CveCuenta)
' If Estatus > -1 Then Str = String.Format("{0} AND Estatus = '{1}'", Str, If(Estatus = 1, "Activo", "Inactivo"))
' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTBancosCuentas"), DataTable), Str, "", DataViewRowState.CurrentRows)
' GlobalDTBancosCuentas = Dv.ToTable
' Dv.Dispose()
' 'GlobalDTBancosCuentas = DirectCast(HttpContext.Current.Application("GlobalDTBancosCuentas"), DataTable)
' End Get
' Set(value As DataTable)
' HttpContext.Current.Application("GlobalDTBancosCuentas") = value
' End Set
'End Property
Property GlobalDTBancosCuentas(CveUsuario As Integer, Optional CveCuenta As Integer = -1, Optional Estatus As Integer = 1, Optional CveEmpresa As Integer = -1) As DataTable Property GlobalDTBancosCuentas(CveUsuario As Integer, Optional CveCuenta As Integer = -1, Optional Estatus As Integer = 1, Optional CveEmpresa As Integer = -1) As DataTable
Get Get
Dim AppNombre As String = String.Format("GlobalDTBancosCuentas-{0}", CveEmpresa) Dim AppNombre As String = String.Format("GlobalDTBancosCuentas-{0}", CveEmpresa)
@@ -9846,12 +9789,6 @@ Namespace Modelos
Public Property IdCtaContAnticipos As Integer Public Property IdCtaContAnticipos As Integer
Public Property IdCtaContRetIVA As Integer Public Property IdCtaContRetIVA As Integer
Public Property IdCtaContRetISR As Integer Public Property IdCtaContRetISR As Integer
Public Property CveCuentaClientes As Integer
Public Property CveCuentaMonedaExtranjera As Integer
Public Property CveCuentaComplementaria As Integer
Public Property CveCuentaAnticipos As Integer
Public Property CveCuentaRetIVA As Integer
Public Property CveCuentaRetISR As Integer
Public Property ConvenioCIE As String Public Property ConvenioCIE As String
Public Property FormaFacturacion As String Public Property FormaFacturacion As String
Public Property LimiteCredito As Decimal Public Property LimiteCredito As Decimal

View File

@@ -810,6 +810,18 @@ Public Class Timbrado
Dim tCvePAC As Integer = UsuarioActual.Empresa.CvePAC Dim tCvePAC As Integer = UsuarioActual.Empresa.CvePAC
If CvePACEspecial <> -1 Then tCvePAC = CvePACEspecial If CvePACEspecial <> -1 Then tCvePAC = CvePACEspecial
'validación especial.
If Ventas.TipoDocto.Contiene("Ing", "Dev") Then
Dim CodigoIncorrecto As Integer = (From c In Ventas.Timbre.Conceptos Where (c.ClaveProdServ = "84111506" Or c.ClaveProdServ = "01010101")
Select c.ClaveProdServ).Count()
If CodigoIncorrecto > 0 Then
MensajeErrorCFDI = "SAT - Hay un concepto con Codigo no permitido."
Return False
End If
End If
Select Case tCvePAC Select Case tCvePAC
Case 1 Case 1
' Retorno = TimbrarFacturaBIInform33(UsuarioActual, Ventas, FM, TmpDTConceptos, TmpDTImpuestos, TmpDT7Eleven, TmpDTComplementos, Ruta, LstFordASN, FordGSDBM, ObjV) ' Retorno = TimbrarFacturaBIInform33(UsuarioActual, Ventas, FM, TmpDTConceptos, TmpDTImpuestos, TmpDT7Eleven, TmpDTComplementos, Ruta, LstFordASN, FordGSDBM, ObjV)

View File

@@ -49,21 +49,13 @@ Public Class E141 : Implements IHttpHandler
End Property End Property
Public ReadOnly Property TokenAutorizacion As String Public ReadOnly Property TokenAutorizacion As String
Get Get
If EsProduccion Then Return "$2y$10$LGqtRWUloKQmAt.jcUldc.PmS5LJ6l.WU2w1G4PBOTLMVKZRNQFPS"
Return "$2y$10$EZlXnFrhUc4aRVwjy5/v0.3JPdFNjyeANDc64YXJ5eHD8pMsv93Q."
Else
Return "$2y$10$8Mk3YeIkJESilIwD.U5dG.SsA4JloycJKbaGls8TNEw/AKBE1qane"
End If
End Get End Get
End Property End Property
Public ReadOnly Property URLBase As String Public ReadOnly Property URLBase As String
Get Get
If EsProduccion Then Return "https://services.fidelityapps.mx/"
Return "https://services.fidelityapps.mx/"
Else
Return "https://econollantas-pruebas.fidelityapps.mx/"
End If
End Get End Get
End Property End Property
@@ -1852,6 +1844,7 @@ Public Class E141 : Implements IHttpHandler
httpClient.Timeout = New TimeSpan(0, 5, 0) httpClient.Timeout = New TimeSpan(0, 5, 0)
Using request = New HttpRequestMessage(HttpMethod.Post, New Uri(url)) Using request = New HttpRequestMessage(HttpMethod.Post, New Uri(url))
request.Headers.Add("X-PUBLIC-AUTH", TokenAutorizacion) request.Headers.Add("X-PUBLIC-AUTH", TokenAutorizacion)
request.Headers.Add("X-Authentication", TokenAutorizacion)
Using content = New StringContent(payload, Encoding.UTF8, "application/json") Using content = New StringContent(payload, Encoding.UTF8, "application/json")
request.Content = content request.Content = content

113
Ashx/E72.ashx Normal file
View File

@@ -0,0 +1,113 @@
<%@ WebHandler Language="VB" Class="E72" %>
Imports System
Imports System.Web
Imports System.Data
Imports Newtonsoft.Json
Imports Extensiones
Imports System.IO
Public Class E72 : Implements IHttpHandler, IRequiresSessionState
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
Get
Return False
End Get
End Property
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
Try
Select Case context.Request("metodo")
Case "contratoexistencia"
contratoexistencia(context)
End Select
Catch ex As Exception
ex.GuardaLog(ex.Message)
End Try
End Sub
Private Function contratoexistencia(ByVal context As HttpContext) As String
Dim retorno As String = ""
Dim ObjInv As New ClsInventarios
Try
Dim DtMovimientos As DataTable = CreaDT()
ObjInv.GetRepEntradasSalidasXContrato(72, -1, MinFecha, Date.Now, -1, -1, 17, -1, -1, 3, -1, 1158)
Dim DtRepEntradasSalidasXContrato As DataTable = ObjInv.DtResultados.FiltraParametros("CvePS > 0")
ObjInv.ApartadosRep(-1, 70437, 259, 72, -1, MinFecha, Date.Now)
Dim DtApartados As DataTable = ObjInv.DtResultados.FiltraParametros("CvePS > 0", "", {"CvePS", "Cantidad"})
Dim asd As Integer = DtApartados.Rows.Count
For Each tempApartados As DataRow In DtApartados.Rows
For Each tempEntradasSalidas As DataRow In DtRepEntradasSalidasXContrato.Rows
Dim dr As DataRow = DtMovimientos.NewRow
If tempEntradasSalidas("CvePS").ToString.ToEntero = tempApartados("CvePS").ToString.ToEntero Then
dr("Codigo") = tempEntradasSalidas("Codigo")
dr("Existencia") = tempEntradasSalidas("SaldoFCant")
dr("Cantidad") = tempApartados("Cantidad")
dr("Precio") = tempEntradasSalidas("PrecioVenta")
Else
dr("Codigo") = tempEntradasSalidas("Codigo")
dr("Existencia") = tempEntradasSalidas("SaldoFCant")
dr("Cantidad") = 0
dr("Precio") = tempEntradasSalidas("PrecioVenta")
End If
DtMovimientos.Rows.Add(dr)
Next
Next
Dim dtExistencias = From row In DtMovimientos.FiltraParametros("", "", {"Codigo", "Existencia", "Cantidad", "Precio"})
Group row By Codigo = row.Field(Of String)("Codigo"), Existencia = row.Field(Of Double)("Existencia"), Precio = row.Field(Of Double)("Precio") Into CodigoGroup = Group
Select New With {
.Codigo = Codigo,
.Existencia = Existencia,
.Cantidad = CodigoGroup.Sum(Function(r) r.Field(Of Double)("Cantidad")),
.Precio = Precio}
'Dim LINQEntradasSalidas = From row In DtRepEntradasSalidasXContrato.AsEnumerable
' Select New With {
' .CvePS = row.Field(Of Integer)("CvePS"),
' .Existencia = row.Field(Of Double)("SaldoFCant"),
' .Cantidad = 0,
' .Precio = row.Field(Of Double)("PrecioVenta"),
' .Codigo = row.Field(Of String)("Codigo")}
'Dim DtTemp = From LINQEntradasSalida In LINQEntradasSalidas.AsEnumerable
' Group Join LINQapartados In LINQapartado.AsEnumerable
' On LINQEntradasSalida.CvePS Equals LINQapartados.CvePS Into Group
' From unido In Group.DefaultIfEmpty
' Where unido IsNot Nothing
' Order By LINQEntradasSalida.CvePS
' Select New With {.Codigo = LINQEntradasSalida.Codigo,
' .Existencia = LINQEntradasSalida.Existencia,
' .Precio = LINQEntradasSalida.Precio}
'Dim Dtnum As Integer = DtMovimientos.su
retorno = JsonConvert.SerializeObject(dtExistencias).ToString
context.Response.Write(retorno)
Catch ex As Exception
End Try
ObjInv.Dispose()
Return retorno
End Function
Private Function CreaDT()
Dim DtMovimientos As DataTable = New DataTable("Productos")
With DtMovimientos.Columns
.Add("Codigo", Type.GetType("System.String"))
.Add("Existencia", Type.GetType("System.Double"))
.Add("Cantidad", Type.GetType("System.Double"))
.Add("Precio", Type.GetType("System.Double"))
End With
Return DtMovimientos
End Function
End Class

View File

@@ -308,7 +308,6 @@ Partial Class Bancos_DepositoTerminal
Dim importeMX As Decimal Dim importeMX As Decimal
Dim FechaMovimiento As Date = TxtFecha.Text.ToDate Dim FechaMovimiento As Date = TxtFecha.Text.ToDate
Dim IdCtaContable As Integer = 0 Dim IdCtaContable As Integer = 0
Dim CveCuenta As Integer = 0
Dim ConceptoMovimiento As String = ObjContabilidad.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, NombreComercial, gvr.DataKey("SerieFolio").ToString, TxtFolio.ToString) Dim ConceptoMovimiento As String = ObjContabilidad.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, NombreComercial, gvr.DataKey("SerieFolio").ToString, TxtFolio.ToString)
Dim Referencia As String = gvr.DataKey("SerieFolio").ToString Dim Referencia As String = gvr.DataKey("SerieFolio").ToString
Dim CveSubProyecto As Integer = gvr.DataKey("CveSubProyecto").ToEntero Dim CveSubProyecto As Integer = gvr.DataKey("CveSubProyecto").ToEntero
@@ -320,20 +319,17 @@ Partial Class Bancos_DepositoTerminal
If tipoCambioVenta = 1 Then If tipoCambioVenta = 1 Then
IdCtaContable = IdCuentaCliente IdCtaContable = IdCuentaCliente
CveCuenta = CveCuentaCliente
Else Else
ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}" ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}"
IdCtaContable = IdCtaContComplementaria IdCtaContable = IdCtaContComplementaria
CveCuenta = CveCuentaComplementaria
If ImporteMovimiento <> 0 AndAlso IdCtaContable > 0 Then If ImporteMovimiento <> 0 AndAlso IdCtaContable > 0 Then
importeMX = ImporteMovimiento importeMX = ImporteMovimiento
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, TipoMovimiento, 0, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyecto, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteMovimiento * tipoCambioVenta - ImporteMovimiento, CveCuenta:=CveCuenta) Then If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, TipoMovimiento, 0, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyecto, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteMovimiento * tipoCambioVenta - ImporteMovimiento) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
End If End If
IdCtaContable = IdCtaContMonedaExtranjera IdCtaContable = IdCtaContMonedaExtranjera
CveCuenta = CveCuentaMonedaExtranjera
End If End If
Case 8 'Ret IVA x Trasladar Case 8 'Ret IVA x Trasladar
@@ -351,19 +347,9 @@ Partial Class Bancos_DepositoTerminal
IdCtaContable = ObjContabilidad.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero IdCtaContable = ObjContabilidad.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If End If
End If End If
End If End If
'Conta SIG
If CveCuentaRetIVA <> 0 Then
CveCuenta = CveCuentaRetIVA
Else
If ObjContabilidad.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjContabilidad.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjContabilidad.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
Case 9 'Ret ISR x Trasladar Case 9 'Ret ISR x Trasladar
ImporteMovimiento = gvr.DataKey("RetISR").ToDecimal * PorcentajePago ImporteMovimiento = gvr.DataKey("RetISR").ToDecimal * PorcentajePago
@@ -379,25 +365,13 @@ Partial Class Bancos_DepositoTerminal
IdCtaContable = ObjContabilidad.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero IdCtaContable = ObjContabilidad.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
End If End If
End If End If
End If End If
'Conta SIG
If CveCuentaRetISR <> 0 Then
CveCuenta = CveCuentaRetISR
Else
If ObjContabilidad.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjContabilidad.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjContabilidad.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
End If
End If
End If
Case 13 'Iva por Trasladar Case 13 'Iva por Trasladar
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal * PorcentajePago ImporteMovimiento = gvr.DataKey("IVA").ToDecimal * PorcentajePago
importeMX = Math.Round(ImporteMovimiento * tipoCambioVenta, 2) importeMX = Math.Round(ImporteMovimiento * tipoCambioVenta, 2)
IdCtaContable = UsuarioActual.Empresa.IdCuentaIVAxTrasladar IdCtaContable = UsuarioActual.Empresa.IdCuentaIVAxTrasladar
CveCuenta = UsuarioActual.Empresa.CveCuentaIVAxTrasladar
If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}" If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}"
Case 62 'Ret IVA Trasladado Case 62 'Ret IVA Trasladado
@@ -415,19 +389,9 @@ Partial Class Bancos_DepositoTerminal
IdCtaContable = ObjContabilidad.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero IdCtaContable = ObjContabilidad.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If End If
End If End If
End If End If
'Conta SIG
If CveCuentaRetIVA <> 0 Then
CveCuenta = CveCuentaRetIVA
Else
If ObjContabilidad.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjContabilidad.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjContabilidad.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
Case 63 'Ret ISR Trasladado Case 63 'Ret ISR Trasladado
ImporteMovimiento = gvr.DataKey("RetISR").ToDecimal * PorcentajePago ImporteMovimiento = gvr.DataKey("RetISR").ToDecimal * PorcentajePago
@@ -443,25 +407,13 @@ Partial Class Bancos_DepositoTerminal
IdCtaContable = ObjContabilidad.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero IdCtaContable = ObjContabilidad.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
End If End If
End If End If
End If End If
'Conta SIG
If CveCuentaRetISR <> 0 Then
CveCuenta = CveCuentaRetISR
Else
If ObjContabilidad.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjContabilidad.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjContabilidad.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
End If
End If
End If
Case 61 'Iva Trasladado Case 61 'Iva Trasladado
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal * PorcentajePago ImporteMovimiento = gvr.DataKey("IVA").ToDecimal * PorcentajePago
importeMX = Math.Round(ImporteMovimiento * tipoCambioManual, 2) importeMX = Math.Round(ImporteMovimiento * tipoCambioManual, 2)
IdCtaContable = UsuarioActual.Empresa.IdCuentaIVATrasladado IdCtaContable = UsuarioActual.Empresa.IdCuentaIVATrasladado
CveCuenta = UsuarioActual.Empresa.CveCuentaIVATrasladado
If tipoCambioManual > 1 Then ConceptoMovimiento += $" TC:{tipoCambioManual} ${ImporteMovimiento.FormatoNumero(2)}" If tipoCambioManual > 1 Then ConceptoMovimiento += $" TC:{tipoCambioManual} ${ImporteMovimiento.FormatoNumero(2)}"
Case 38 'IEPS por trasladar Case 38 'IEPS por trasladar
@@ -470,14 +422,12 @@ Partial Class Bancos_DepositoTerminal
importeMX = Math.Round(ImporteMovimiento * tipoCambioVenta, 2) importeMX = Math.Round(ImporteMovimiento * tipoCambioVenta, 2)
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar
CveCuenta = UsuarioActual.Empresa.CveCuentaIEPSxTrasladar
Case 39 'IEPS Trasladado Case 39 'IEPS Trasladado
ImporteMovimiento = gvr.DataKey("IEPS").ToDecimal * PorcentajePago ImporteMovimiento = gvr.DataKey("IEPS").ToDecimal * PorcentajePago
importeMX = Math.Round(ImporteMovimiento * tipoCambioManual, 2) importeMX = Math.Round(ImporteMovimiento * tipoCambioManual, 2)
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSTrasladado IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSTrasladado
CveCuenta = UsuarioActual.Empresa.CveCuentaIEPSTrasladado
Case 78 'Otros Ingresos Case 78 'Otros Ingresos
If ChkAjusteOI.Checked Then If ChkAjusteOI.Checked Then
@@ -500,15 +450,9 @@ Partial Class Bancos_DepositoTerminal
If (IdCtaContable < 1 Or IdCuentaBancaria < 1) Then If (IdCtaContable < 1 Or IdCuentaBancaria < 1) Then
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
'Conta SIG If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyecto, gvr.DataKey("CveCliente").ToEntero, ImporteMX:=importeMX) Then
If (CveCuenta < 1 Or CveCuentaBancaria < 1) Then
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
CveCuentaContabilizacion = 0
End If
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyecto, gvr.DataKey("CveCliente").ToEntero, ImporteMX:=importeMX, CveCuenta:=CveCuenta) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
End If End If

View File

@@ -340,7 +340,6 @@
specialKeys.push(9); //Backspace specialKeys.push(9); //Backspace
function numericOnly(elementRef) { function numericOnly(elementRef) {
var keyCodeEntered = (event.which) ? event.which : (window.event.keyCode) ? window.event.keyCode : -1; var keyCodeEntered = (event.which) ? event.which : (window.event.keyCode) ? window.event.keyCode : -1;
debugger;
if ((keyCodeEntered >= 48) && (keyCodeEntered <= 57)) { if ((keyCodeEntered >= 48) && (keyCodeEntered <= 57)) {
return true; return true;
@@ -357,7 +356,6 @@
var tamaño = elementRef.value.length; var tamaño = elementRef.value.length;
if (tamaño == 0) { if (tamaño == 0) {
if ((elementRef.value) && (elementRef.value.indexOf('-') >= 0)) { if ((elementRef.value) && (elementRef.value.indexOf('-') >= 0)) {
debugger;
return false; return false;
} }
else { else {
@@ -367,7 +365,6 @@
} }
} }
debugger;
return false; return false;
} }
@@ -400,7 +397,6 @@
saldoInicial = saldoInicial + cantidad; saldoInicial = saldoInicial + cantidad;
$('#C_lblValorTotal').text(FormatoNumero(saldoInicial, 2)); $('#C_lblValorTotal').text(FormatoNumero(saldoInicial, 2));
$('#C_lblValorTotalSeleccionado').text(FormatoNumero(ValorTotalSeleccionado, 2)); $('#C_lblValorTotalSeleccionado').text(FormatoNumero(ValorTotalSeleccionado, 2));
debugger;
if ($('#C_ChkFaltante').attr('checked')) { if ($('#C_ChkFaltante').attr('checked')) {
@@ -418,7 +414,6 @@
alert("No es posible poner un importe Faltante/Sobrante superior a lo seleccionado"); alert("No es posible poner un importe Faltante/Sobrante superior a lo seleccionado");
saldo = 0; saldo = 0;
$('#C_lblValorTotal').text(FormatoNumero(ValorTotalSeleccionado, 2)); $('#C_lblValorTotal').text(FormatoNumero(ValorTotalSeleccionado, 2));
debugger;
} else { } else {
//debugger; //debugger;
@@ -441,7 +436,6 @@
alert("No es posible poner un descuento superior a lo seleccionado"); alert("No es posible poner un descuento superior a lo seleccionado");
saldo = 0; saldo = 0;
$('#C_lblValorTotal').text(FormatoNumero(ValorTotalSeleccionado, 2)); $('#C_lblValorTotal').text(FormatoNumero(ValorTotalSeleccionado, 2));
debugger;
} else { } else {
//saldo = ValorTotalSeleccionado + txtdescuento + comision; //saldo = ValorTotalSeleccionado + txtdescuento + comision;
//$('#C_lblValorTotal').text(FormatoNumero(saldo, 2)); //$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
@@ -466,7 +460,6 @@
alert("No es posible poner un descuento superior a lo seleccionado"); alert("No es posible poner un descuento superior a lo seleccionado");
saldo = 0; saldo = 0;
$('#C_lblValorTotal').text(FormatoNumero(ValorTotalSeleccionado, 2)); $('#C_lblValorTotal').text(FormatoNumero(ValorTotalSeleccionado, 2));
debugger;
} else { } else {
//saldo = ValorTotalSeleccionado + txtdescuento + comision; //saldo = ValorTotalSeleccionado + txtdescuento + comision;
//$('#C_lblValorTotal').text(FormatoNumero(saldo, 2)); //$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
@@ -491,7 +484,6 @@
alert("No es posible poner un importe IVA superior a lo seleccionado"); alert("No es posible poner un importe IVA superior a lo seleccionado");
saldo = 0; saldo = 0;
$('#C_lblValorTotal').text(FormatoNumero(ValorTotalSeleccionado, 2)); $('#C_lblValorTotal').text(FormatoNumero(ValorTotalSeleccionado, 2));
debugger;
} else { } else {
//debugger; //debugger;
@@ -536,12 +528,12 @@
function txtSumaIVA(txt) { function txtSumaIVA(txt) {
var comision2 = ToDouble($('#C_TxtIVA').val()); var comision2 = ToDouble($('#C_TxtIVA').val());
if (comision2 > ValorTotalSeleccionado) { if (comision2 > ValorTotalSeleccionado) {
$('#C_TxtIVA').val(IVA) $('#C_TxtIVA').val(IVA);
alert("No es posible poner un IVA superior a lo seleccionado") alert("No es posible poner un IVA superior a lo seleccionado");
} else { } else {
saldo = ValorTotalSeleccionado - descuento + comision - comision2 - ComisionIntermediario; saldo = ValorTotalSeleccionado - descuento + comision - comision2 - ComisionIntermediario;
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2)); $('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
IVA = ToDouble($('#C_TxtIVA').val()) IVA = ToDouble($('#C_TxtIVA').val());
} }
} }
@@ -549,12 +541,12 @@
function txtSumaTntermediario(txt) { function txtSumaTntermediario(txt) {
var comision2 = ToDouble($('#C_TxtComisionIntermediario').val()); var comision2 = ToDouble($('#C_TxtComisionIntermediario').val());
if (comision2 > ValorTotalSeleccionado) { if (comision2 > ValorTotalSeleccionado) {
$('#C_TxtComisionIntermediario').val(ComisionIntermediario) $('#C_TxtComisionIntermediario').val(ComisionIntermediario);
alert("No es posible poner un importe superior a lo seleccionado") alert("No es posible poner un importe superior a lo seleccionado");
} else { } else {
saldo = ValorTotalSeleccionado - descuento + comision - comision2 - IVA; saldo = ValorTotalSeleccionado - descuento + comision - comision2 - IVA;
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2)); $('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
ComisionIntermediario = ToDouble($('#C_TxtComisionIntermediario').val()) ComisionIntermediario = ToDouble($('#C_TxtComisionIntermediario').val());
} }
} }
@@ -562,12 +554,15 @@
function CheckFaltante(chk) { function CheckFaltante(chk) {
if (chk.checked == true) { if (chk.checked == true) {
$('#DivComision').css("display", "block"); $('#DivComision').css("display", "block");
$('#DivComisioncheck').removeClass("truncate") $('#DivComisioncheck').removeClass("truncate");
$("#DivDescuentocheck").css("margin-top", 0); $("#DivDescuentocheck").css("margin-top", 0);
} else { } else {
$('#C_TxtComision').val(0);
Recalcular();
$('#DivComision').css("display", "none"); $('#DivComision').css("display", "none");
$('#DivComisioncheck').addClass("truncate") $('#DivComisioncheck').addClass("truncate");
$("#DivDescuentocheck").css("margin-top", -25); $("#DivDescuentocheck").css("margin-top", -25);
} }
} }
@@ -575,15 +570,17 @@
function CheckDescuento(chk) { function CheckDescuento(chk) {
if (chk.checked == true) { if (chk.checked == true) {
$('#DivDescuento').css("display", "block"); $('#DivDescuento').css("display", "block");
$('#DivDescuentocheck').removeClass("truncate") $('#DivDescuentocheck').removeClass("truncate");
$("#DivIntercheck").css("margin-top", 0); $("#DivIntercheck").css("margin-top", 0);
} else { } else {
$('#C_TxtDescuento').val(0);
Recalcular();
$('#DivDescuento').css("display", "none"); $('#DivDescuento').css("display", "none");
$('#DivDescuentocheck').addClass("truncate") $('#DivDescuentocheck').addClass("truncate");
$("#DivIntercheck").css("margin-top", -25); $("#DivIntercheck").css("margin-top", -25);
} }
} }
@@ -591,14 +588,32 @@
function CheckIntermediario(chk) { function CheckIntermediario(chk) {
if (chk.checked == true) { if (chk.checked == true) {
$('#DivInter').css("display", "block"); $('#DivInter').css("display", "block");
$('#DivIntercheck').removeClass("truncate") $('#DivIntercheck').removeClass("truncate");
} else { } else {
$('#C_TxtIVA').val(0);
$('#C_TxtComisionIntermediario').val(0);
Recalcular();
$('#DivInter').css("display", "none"); $('#DivInter').css("display", "none");
$('#DivIntercheck').addClass("truncate") $('#DivIntercheck').addClass("truncate");
} }
} }
function Recalcular() {
debugger;
var Comision = ToDouble($('#C_TxtComision').val());
var Descuento = ToDouble($('#C_TxtDescuento').val());
var IVA = ToDouble($('#C_TxtIVA').val());
var ImporteInter = ToDouble($('#C_TxtComisionIntermediario').val());
var total = ValorTotalSeleccionado + Comision - Descuento - IVA - ImporteInter
$('#C_lblValorTotal').text(FormatoNumero(total, 2));
debugger;
}
</script> </script>

View File

@@ -996,7 +996,7 @@
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<div class="row"> <div class="row">
<div class="col-md-10 col-xs-10"> <div class="col-md-8 col-xs-8">
<h4 class="panel-title"> <h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#AccordArchivos" href='#collapse_<%# Eval("CveEvento")%>' style="text-decoration: none;"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#AccordArchivos" href='#collapse_<%# Eval("CveEvento")%>' style="text-decoration: none;">
<%# Eval("Descripcion")%> <%# Eval("Descripcion")%>
@@ -1011,6 +1011,9 @@
<i class="fa fa-download" ></i> <i class="fa fa-download" ></i>
</asp:LinkButton> </asp:LinkButton>
</div> </div>
<div class="col-md-2 col-xs-2" style="padding-left: 0px; padding-top: 0px;">
<asp:LinkButton ID="LinkDelete" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" OnClick="EliminarFile" />
</div>
</div> </div>
</div> </div>

View File

@@ -1027,6 +1027,19 @@ public partial class CRM_Acercamiento : ClsPaginas
Archivo = null; Archivo = null;
} }
protected void EliminarFile(object sender, EventArgs e)
{
string cveEvento = string.Format("{0}",((LinkButton)sender).CommandArgument);
ClsOIEventos ObjEventoBitacora = new ClsOIEventos();
ObjEventoBitacora.RemoveAgendaBitacora( cveEvento.ToEntero(), UsuarioActual.CveEmpresa);
ObjEventoBitacora.Dispose();
UPAddEventoBitacora.Update();
//RECARGAMOS GRID BITACORA
CargaEventoBitacora(HdfEtapaSeleccionada.Value.ToEntero());
UPBitacora.Update();
}
protected void BtnGuardarEventoBitacora_Click(object sender, EventArgs e) protected void BtnGuardarEventoBitacora_Click(object sender, EventArgs e)
{ {
ClsOIEventos ObjEventoBitacora = new ClsOIEventos(); ClsOIEventos ObjEventoBitacora = new ClsOIEventos();
@@ -1109,6 +1122,9 @@ public partial class CRM_Acercamiento : ClsPaginas
ScriptManager.GetCurrent(this).RegisterPostBackControl(e.Item.FindControl("LinkArchivo")); // Registro un evento Postbacktrigger, que recargue toda la pagina para que funcione ScriptManager.GetCurrent(this).RegisterPostBackControl(e.Item.FindControl("LinkArchivo")); // Registro un evento Postbacktrigger, que recargue toda la pagina para que funcione
((Label)e.Item.FindControl("LblTipoArchivo")).Text = row["Archivo"].ToString().Split('.')[1].ToUpper(); ((Label)e.Item.FindControl("LblTipoArchivo")).Text = row["Archivo"].ToString().Split('.')[1].ToUpper();
((LinkButton)e.Item.FindControl("LinkDelete")).CommandArgument = row["CveEvento"].ToString();
} }
} }

View File

@@ -4563,6 +4563,9 @@
<asp:HiddenField ID="HdnAliasInd" ClientIDMode="Static" runat="server" /> <asp:HiddenField ID="HdnAliasInd" ClientIDMode="Static" runat="server" />
<asp:HiddenField ID="HdnPSAliasCveClasificacion" ClientIDMode="Static" runat="server" /> <asp:HiddenField ID="HdnPSAliasCveClasificacion" ClientIDMode="Static" runat="server" />
<asp:HiddenField ID="HdnPSAliasClasificacion" ClientIDMode="Static" runat="server" /> <asp:HiddenField ID="HdnPSAliasClasificacion" ClientIDMode="Static" runat="server" />
<asp:HiddenField ID="HdnPSAliasCveSATPS" ClientIDMode="Static" runat="server" />
<asp:HiddenField ID="HdnPSAliasSATClavePS" ClientIDMode="Static" runat="server" />
</div> </div>
</div> </div>
<div class="row"> <div class="row">

View File

@@ -3789,7 +3789,7 @@ Partial Class Compras_Compras
'' AGREGA PS '' AGREGA PS
'AGREGA A TMPDT 'AGREGA A TMPDT
AddPS(ValorXML(node, "cantidad").ToDouble, CveUM, UMM, tCveClasif, Clasif, tCvePS, PSS, TipoPS, "-1", "SE", "SE", "-1", Obs, PU, Total, IVA, RetIVA, RetISR, IEPS, 0, Descuento, PSCodigo:=tPSCodigo, TCalculaTotales:=False, CveSATPS:=ValorXML(node, "ClaveProdServ").ToEntero(), CargaXml:=True, PorcentajeIVA:=PorcentajeIVA, PorcentajeRetIVA:=PorcentajeRetIVA, PorcentajeRetISR:=PorcentajeRetISR, PorcentajeIEPS:=PorcentajeIEPS) AddPS(ValorXML(node, "cantidad").ToDouble, CveUM, UMM, tCveClasif, Clasif, tCvePS, PSS, TipoPS, "-1", "SE", "SE", "-1", Obs, PU, Total, IVA, RetIVA, RetISR, IEPS, 0, Descuento, PSCodigo:=tPSCodigo, TCalculaTotales:=False, CodigoSATPS:=ValorXML(node, "ClaveProdServ").ToEntero(), CargaXml:=True, PorcentajeIVA:=PorcentajeIVA, PorcentajeRetIVA:=PorcentajeRetIVA, PorcentajeRetISR:=PorcentajeRetISR, PorcentajeIEPS:=PorcentajeIEPS)
@@ -15904,7 +15904,7 @@ Partial Class Compras_Compras
'Dim Descuento As Double = gvr.FCHiddenField("HdnOC1Descuento").Value.ToDecimal 'Dim Descuento As Double = gvr.FCHiddenField("HdnOC1Descuento").Value.ToDecimal
Dim CveOrdenCompraDetalle As Integer = dr("CveOrdenCompraDetalle").ToString.ToEntero Dim CveOrdenCompraDetalle As Integer = dr("CveOrdenCompraDetalle").ToString.ToEntero
Dim EntregaDirecta As Integer = dr("EntregaDirecta").ToString.ToEntero Dim EntregaDirecta As Integer = dr("EntregaDirecta").ToString.ToEntero
Dim CveSATPS As Integer = gvr.FCDropDownLost("DdlSATPS").SelectedValue.ToEntero Dim CodigoSATPS As Integer = gvr.FCDropDownLost("DdlSATPS").SelectedValue.ToEntero
Dim CveTipoGasto As Integer = dr("CveTipoGastoObra").ToString.ToEntero Dim CveTipoGasto As Integer = dr("CveTipoGastoObra").ToString.ToEntero
Dim TipoGasto As String = dr("TipoGasto").ToString Dim TipoGasto As String = dr("TipoGasto").ToString
@@ -15921,7 +15921,7 @@ Partial Class Compras_Compras
End If End If
AddPS(Cantidad, CveUM, UM, CveClasificacion, Clasificacion, CvePS, PS, CveTipoPS, CveSubProyectoContrato, SubProyecto, Proyecto, CveProyecto, Obs, PU, Total, IVA, RetIVA, RetISR, IEPSPS, IEPSPSIVA, Descuento, CveOrdenCompraDetalle, False, AddPS(Cantidad, CveUM, UM, CveClasificacion, Clasificacion, CvePS, PS, CveTipoPS, CveSubProyectoContrato, SubProyecto, Proyecto, CveProyecto, Obs, PU, Total, IVA, RetIVA, RetISR, IEPSPS, IEPSPSIVA, Descuento, CveOrdenCompraDetalle, False,
CantidadF:=CantidadF, EntregaDirecta:=EntregaDirecta, CveSATPS:=CveSATPS, CveTipoGasto:=CveTipoGasto, TipoGasto:=TipoGasto, CveContratoDetalle:=CveContratoDetalle, CveCultivoCuadroDetalle:=CveCultivoCuadroDetalle) CantidadF:=CantidadF, EntregaDirecta:=EntregaDirecta, CodigoSATPS:=CodigoSATPS, CveTipoGasto:=CveTipoGasto, TipoGasto:=TipoGasto, CveContratoDetalle:=CveContratoDetalle, CveCultivoCuadroDetalle:=CveCultivoCuadroDetalle)
'CARGA PE 'CARGA PE
Index = TmpDT.Rows.Count - 1 Index = TmpDT.Rows.Count - 1
@@ -16170,7 +16170,7 @@ Partial Class Compras_Compras
Dim Descuento As Double = gvr.FCHiddenField("HdnOC1Descuento").Value.ToDecimal Dim Descuento As Double = gvr.FCHiddenField("HdnOC1Descuento").Value.ToDecimal
Dim CveOrdenCompraDetalle As Integer = dr("CveOrdenCompraDetalle").ToString.ToEntero Dim CveOrdenCompraDetalle As Integer = dr("CveOrdenCompraDetalle").ToString.ToEntero
Dim EntregaDirecta As Integer = dr("EntregaDirecta").ToString.ToEntero Dim EntregaDirecta As Integer = dr("EntregaDirecta").ToString.ToEntero
Dim CveSATPS As Integer = gvr.FCDropDownLost("DdlSATPS").SelectedValue.ToEntero Dim CodigoSATPS As Integer = gvr.FCDropDownLost("DdlSATPS").SelectedValue.ToEntero
Dim CveTipoGasto As Integer = -1 Dim CveTipoGasto As Integer = -1
Dim TipoGasto As String = "" Dim TipoGasto As String = ""
@@ -16184,7 +16184,7 @@ Partial Class Compras_Compras
End If End If
'AGREGA PS 'AGREGA PS
Dim IndexVinculacionOC = AddPS(Cantidad, CveUM, UM, CveClasificacion, Clasificacion, CvePS, PS, CveTipoPS, CveSubProyectoContrato, SubProyecto, Proyecto, CveProyecto, Obs, PU, Total, IVA, RetIVA, RetISR, IEPSPS, IEPSPSIVA, Descuento, CveOrdenCompraDetalle, False, CantidadF:=CantidadF, EntregaDirecta:=EntregaDirecta, CveSATPS:=CveSATPS, CveTipoGasto:=CveTipoGasto, TipoGasto:=TipoGasto) Dim IndexVinculacionOC = AddPS(Cantidad, CveUM, UM, CveClasificacion, Clasificacion, CvePS, PS, CveTipoPS, CveSubProyectoContrato, SubProyecto, Proyecto, CveProyecto, Obs, PU, Total, IVA, RetIVA, RetISR, IEPSPS, IEPSPSIVA, Descuento, CveOrdenCompraDetalle, False, CantidadF:=CantidadF, EntregaDirecta:=EntregaDirecta, CodigoSATPS:=CodigoSATPS, CveTipoGasto:=CveTipoGasto, TipoGasto:=TipoGasto)
'CARGA PE 'CARGA PE
TmpDT.Rows(IndexVinculacionOC)("CvePresupuestoEgreso") = dr("CvePresupuestoEgreso").ToString.ToEntero TmpDT.Rows(IndexVinculacionOC)("CvePresupuestoEgreso") = dr("CvePresupuestoEgreso").ToString.ToEntero
@@ -18123,10 +18123,10 @@ Partial Class Compras_Compras
Select Case Modalidad Select Case Modalidad
Case "A" 'ADD Case "A" 'ADD
Dim SATClavePS = -1 Dim CodigoSATPS = -1
Dim PSRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("") Dim PSRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("")
If PSRow IsNot Nothing Then If PSRow IsNot Nothing Then
SATClavePS = PSRow("SATClavePS").ToString.ToEntero CodigoSATPS = PSRow("SATClavePS").ToString.ToEntero
End If End If
Dim IVA As Double Dim IVA As Double
If chkImportacion.Checked Then If chkImportacion.Checked Then
@@ -18137,7 +18137,7 @@ Partial Class Compras_Compras
AddPS(TxtCantidad.Text.Trim.ToDouble, ddlUM.SelectedValue.ToEntero, ddlUM.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text, DdlPS.SelectedValue.ToEntero, DdlPS.SelectedText, HdnTipoPS.Value.ToEntero, AddPS(TxtCantidad.Text.Trim.ToDouble, ddlUM.SelectedValue.ToEntero, ddlUM.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text, DdlPS.SelectedValue.ToEntero, DdlPS.SelectedText, HdnTipoPS.Value.ToEntero,
DdlSubProyecto.SelectedValue.ToString, DdlSubProyecto.SelectedItem.Text, DdlProyecto.SelectedItem.Text, DdlProyecto.SelectedValue.ToString, TxtObsPS.Text.Trim, TxtPrecio.Text.Trim.ToDouble, Total, IVA, DdlSubProyecto.SelectedValue.ToString, DdlSubProyecto.SelectedItem.Text, DdlProyecto.SelectedItem.Text, DdlProyecto.SelectedValue.ToString, TxtObsPS.Text.Trim, TxtPrecio.Text.Trim.ToDouble, Total, IVA,
TxtRetIVAModal.Text.ToDouble / 100, TxtRetISRModal.Text.ToDouble / 100, TxtIEPSModal.Text.ToDouble / 100, 0, TxtDescuentoModal.Text.ToDouble, OtrosGastos:=TxtOtrosGastos.Text.ToDouble, CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, TipoGasto:=DdlTipoGasto.SelectedItem.Text, TxtRetIVAModal.Text.ToDouble / 100, TxtRetISRModal.Text.ToDouble / 100, TxtIEPSModal.Text.ToDouble / 100, 0, TxtDescuentoModal.Text.ToDouble, OtrosGastos:=TxtOtrosGastos.Text.ToDouble, CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, TipoGasto:=DdlTipoGasto.SelectedItem.Text,
NoDeducible:=ChkEsNoDeduciblePS.Checked, CveSATPS:=SATClavePS) NoDeducible:=ChkEsNoDeduciblePS.Checked, CodigoSATPS:=CodigoSATPS)
AddPS2() AddPS2()
LimpiaAgregar() LimpiaAgregar()
@@ -18192,7 +18192,7 @@ Partial Class Compras_Compras
Private Function AddPS(Cantidad As Double, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, CvePS As Integer, PS As String, CveTipoPS As Integer, CveSubProyectoContrato As String, SubProyecto As String, Proyecto As String, CveProyecto As String, Private Function AddPS(Cantidad As Double, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, CvePS As Integer, PS As String, CveTipoPS As Integer, CveSubProyectoContrato As String, SubProyecto As String, Proyecto As String, CveProyecto As String,
Obs As String, PU As Double, Total As Double, IVA As Double, RetIVA As Double, RetISR As Double, IEPSPS As Double, IEPSPSIVA As Double, Descuento As Double, Optional CveOrdenCompraDetalle As Integer = -1, Optional TCalculaTotales As Boolean = True, Obs As String, PU As Double, Total As Double, IVA As Double, RetIVA As Double, RetISR As Double, IEPSPS As Double, IEPSPSIVA As Double, Descuento As Double, Optional CveOrdenCompraDetalle As Integer = -1, Optional TCalculaTotales As Boolean = True,
Optional PSCodigo As String = "-", Optional PSDescripcion As String = "-", Optional CantidadF As Double = -1, Optional EntregaDirecta As Integer = -1, Optional OtrosGastos As Double = 0, Optional PSCodigo As String = "-", Optional PSDescripcion As String = "-", Optional CantidadF As Double = -1, Optional EntregaDirecta As Integer = -1, Optional OtrosGastos As Double = 0,
Optional CveSATPS As Integer = -1, Optional CargaXml As Boolean = False, Optional CveTipoGasto As Integer = -1, Optional TipoGasto As String = "", Optional PorcentajeIVA As Double = 0, Optional CodigoSATPS As Integer = -1, Optional CargaXml As Boolean = False, Optional CveTipoGasto As Integer = -1, Optional TipoGasto As String = "", Optional PorcentajeIVA As Double = 0,
Optional PorcentajeIEPS As Double = 0, Optional PorcentajeRetIVA As Double = 0, Optional PorcentajeRetISR As Double = 0, Optional NoDeducible As Boolean = False, Optional CveContratoDetalle As Integer = -1, Optional CveCultivoCuadroDetalle As Integer = -1) As Integer Optional PorcentajeIEPS As Double = 0, Optional PorcentajeRetIVA As Double = 0, Optional PorcentajeRetISR As Double = 0, Optional NoDeducible As Boolean = False, Optional CveContratoDetalle As Integer = -1, Optional CveCultivoCuadroDetalle As Integer = -1) As Integer
Dim Row As DataRow = Nothing Dim Row As DataRow = Nothing
@@ -18232,15 +18232,15 @@ Partial Class Compras_Compras
Row("Consec") = TmpDT.Rows.Count + 1 Row("Consec") = TmpDT.Rows.Count + 1
End If End If
If Version = "3.3" And CveSATPS > 0 Then If Version = "3.3" And CodigoSATPS > 0 Then
Dim DrPSSAT As DataRow = Nothing Dim DrPSSAT As DataRow = Nothing
If CargaXml Then If CargaXml Then
DrPSSAT = GlobalDTPSATPS("-1", CveSATPS.ToString).FiltroPrimero("") DrPSSAT = GlobalDTPSATPS("-1", CodigoSATPS.ToString).FiltroPrimero("")
'If GlobalDTPSATPS().FiltraParametros(String.Format("SATClavePS={0}", CveSATPS)).Rows.Count > 0 Then 'If GlobalDTPSATPS().FiltraParametros(String.Format("SATClavePS={0}", CveSATPS)).Rows.Count > 0 Then
' DrPSSAT = GlobalDTPSATPS().FiltraParametros(String.Format("SATClavePS={0}", CveSATPS)).Rows(0) ' DrPSSAT = GlobalDTPSATPS().FiltraParametros(String.Format("SATClavePS={0}", CveSATPS)).Rows(0)
'End If 'End If
Else Else
DrPSSAT = GlobalDTPSATPS("-1", CveSATPS.ToString).FiltroPrimero("") '= GlobalDTPSATPS().FiltroPrimero(String.Format("SATClavePS={0}", CveSATPS)) DrPSSAT = GlobalDTPSATPS("-1", CodigoSATPS.ToString).FiltroPrimero("") '= GlobalDTPSATPS().FiltroPrimero(String.Format("SATClavePS={0}", CveSATPS))
'If GlobalDTPSATPS().FiltraParametros(String.Format("CveSATPS={0}", CveSATPS)).Rows.Count > 0 Then 'If GlobalDTPSATPS().FiltraParametros(String.Format("CveSATPS={0}", CveSATPS)).Rows.Count > 0 Then
' DrPSSAT = GlobalDTPSATPS().FiltraParametros(String.Format("CveSATPS={0}", CveSATPS)).Rows(0) ' DrPSSAT = GlobalDTPSATPS().FiltraParametros(String.Format("CveSATPS={0}", CveSATPS)).Rows(0)
'End If 'End If
@@ -18664,6 +18664,9 @@ Partial Class Compras_Compras
DdlUnidadAlias.DataBind() DdlUnidadAlias.DataBind()
HdnPSAliasCveClasificacion.Value = DrPS("CveClasificacion").ToString HdnPSAliasCveClasificacion.Value = DrPS("CveClasificacion").ToString
HdnPSAliasClasificacion.Value = DrPS("Clasificacion").ToString HdnPSAliasClasificacion.Value = DrPS("Clasificacion").ToString
HdnPSAliasCveSATPS.Value = DrPS("CveSATPS").ToString
HdnPSAliasSATClavePS.Value = DrPS("SATClavePS").ToString
End If End If
End If End If
UpPSAlias.Update() UpPSAlias.Update()
@@ -18686,6 +18689,8 @@ Partial Class Compras_Compras
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("CveClasificacion") = HdnPSAliasCveClasificacion.Value.ToEntero TmpDT.Rows(HdnAliasInd.Value.ToEntero)("CveClasificacion") = HdnPSAliasCveClasificacion.Value.ToEntero
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("Clasificacion") = HdnPSAliasClasificacion.Value TmpDT.Rows(HdnAliasInd.Value.ToEntero)("Clasificacion") = HdnPSAliasClasificacion.Value
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("Obs") = TxtPSAlias.Text.Trim TmpDT.Rows(HdnAliasInd.Value.ToEntero)("Obs") = TxtPSAlias.Text.Trim
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("CveSATPS") = HdnPSAliasCveSATPS.Value
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("SATClaveProductoServicio") = HdnPSAliasSATClavePS.Value
'busco si el producto está en otros renglones QUE NO LO TENGAN ASIGNADO, LO VINCULE 'busco si el producto está en otros renglones QUE NO LO TENGAN ASIGNADO, LO VINCULE
For Each drt As DataRow In TmpDT.Select($"PS ='{TxtPSAlias.Text.Trim}' and ISNULL(CvePS,0) = 0") For Each drt As DataRow In TmpDT.Select($"PS ='{TxtPSAlias.Text.Trim}' and ISNULL(CvePS,0) = 0")
@@ -18696,10 +18701,11 @@ Partial Class Compras_Compras
drt("CveClasificacion") = HdnPSAliasCveClasificacion.Value.ToEntero drt("CveClasificacion") = HdnPSAliasCveClasificacion.Value.ToEntero
drt("Clasificacion") = HdnPSAliasClasificacion.Value drt("Clasificacion") = HdnPSAliasClasificacion.Value
drt("Obs") = TxtPSAlias.Text.Trim drt("Obs") = TxtPSAlias.Text.Trim
drt("CveSATPS") = HdnPSAliasCveSATPS.Value
drt("SATClaveProductoServicio") = HdnPSAliasSATClavePS.Value
Next Next
TmpDT.AcceptChanges() TmpDT.AcceptChanges()
GvPS.DataSource = TmpDT GvPS.DataSource = TmpDT
GvPS.DataBind() GvPS.DataBind()
UpPS.Update() UpPS.Update()

View File

@@ -102,31 +102,31 @@ Partial Class Compras_ReembolsosComprobaciones
ObjPersonal.Dispose() ObjPersonal.Dispose()
DdlPersonal.DataBind() DdlPersonal.DataBind()
CargaTipoTransaccion() CargaTipoTransaccion()
If UsuarioActual.Empresa.Funcionalidad(506) = "1" Then If UsuarioActual.Empresa.Funcionalidad(506) = "1" Then
CbPermitirExcedente.Visible = True CbPermitirExcedente.Visible = True
Else Else
CbPermitirExcedente.Visible = False CbPermitirExcedente.Visible = False
End If End If
' If UsuarioActual.CveEmpresa.Contiene(1, 4, 7, 11, 12, 72, 80, 119) Then ' If UsuarioActual.CveEmpresa.Contiene(1, 4, 7, 11, 12, 72, 80, 119) Then
'rowComisiones.Visible = True 'rowComisiones.Visible = True
' End If ' End If
If UsuarioActual.CveEmpresa = 119 Then If UsuarioActual.CveEmpresa = 119 Then
ChkReembolsarSinBancos.Visible = True ChkReembolsarSinBancos.Visible = True
End If
TxtFechaPrePoliza.Text = Date.Now.ToShortDateString
'CargaCuentasDiferencia()
'TableDiferencia.Visible = False
End If End If
TxtFechaPrePoliza.Text = Date.Now.ToShortDateString
'CargaCuentasDiferencia()
'TableDiferencia.Visible = False
End If
End Sub End Sub
#Region " FILTROS " #Region " FILTROS "
@@ -799,7 +799,7 @@ Partial Class Compras_ReembolsosComprobaciones
End If End If
Else Else
'Agrego el IVA 'Agrego el IVA
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, gvr.DataKey("IVAPorPagar").ToDecimal * PorcentajePago, Referencia, 14, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAXAcreditar > 0, IdCtaContIVAXAcreditar, IdCtaIVAxAcreditar), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVAPorPagar").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("IVAPorPagar").ToDecimal * PorcentajePago) * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago, Referencia, 14, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAXAcreditar > 0, IdCtaContIVAXAcreditar, IdCtaIVAxAcreditar), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago) * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
MsgError = "Detalle" MsgError = "Detalle"
End If End If
'Agrego el IVA 'Agrego el IVA
@@ -1129,7 +1129,7 @@ Partial Class Compras_ReembolsosComprobaciones
End If End If
Else Else
'Agrego el IVA 'Agrego el IVA
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, gvr.DataKey("IVAPorPagar").ToDecimal * PorcentajePago, Referencia, 14, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAXAcreditar > 0, IdCtaContIVAXAcreditar, IdCtaIVAxAcreditar), -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVAPorPagar").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("IVAPorPagar").ToDecimal * PorcentajePago) * tipoCambio, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago, Referencia, 14, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAXAcreditar > 0, IdCtaContIVAXAcreditar, IdCtaIVAxAcreditar), -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago) * tipoCambio, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
MsgError = "Detalle" MsgError = "Detalle"
End If End If

View File

@@ -224,9 +224,7 @@
</th> </th>
<th> <th>
<asp:TextBox ID="TxtAbono" runat="server" Width="76px" Height="24px" CssClass="txtabono"></asp:TextBox> <asp:TextBox ID="TxtAbono" runat="server" Width="76px" Height="24px" CssClass="txtabono"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TxtAbono" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Abono''</b> es necesario." ValidationGroup="ValidarAbono"></asp:RequiredFieldValidator> </th>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator2" Width="30px" PopupPosition="BottomLeft"></ajax:ValidatorCalloutExtender>
</th>
<th align="center"> <th align="center">
<asp:LinkButton ID="LbAgregar" runat="server" CssClass="Texto" Enabled="true" Text="Agregar" ValidationGroup="ValidarAbono"></asp:LinkButton> <asp:LinkButton ID="LbAgregar" runat="server" CssClass="Texto" Enabled="true" Text="Agregar" ValidationGroup="ValidarAbono"></asp:LinkButton>
<asp:LinkButton ID="LbCancelarEdicion" runat="server" Visible="false" CssClass="Texto" Enabled="true" Text="Cancelar"></asp:LinkButton> <asp:LinkButton ID="LbCancelarEdicion" runat="server" Visible="false" CssClass="Texto" Enabled="true" Text="Cancelar"></asp:LinkButton>

View File

@@ -1283,6 +1283,7 @@ Partial Class ContabilidadC_RegPrePolizaS
dr("CveCliente") = DdlClientesE.SelectedValue.ToEntero dr("CveCliente") = DdlClientesE.SelectedValue.ToEntero
dr("CveVenta") = DdlVentasE.SelectedValue.ToEntero dr("CveVenta") = DdlVentasE.SelectedValue.ToEntero
dr("FolioFactura") = If(DdlComprasE.Visible = True, DdlComprasE.SelectedItem.ToString, If(DdlVentasE.Visible = True, DdlVentasE.SelectedItem.ToString, "")) dr("FolioFactura") = If(DdlComprasE.Visible = True, DdlComprasE.SelectedItem.ToString, If(DdlVentasE.Visible = True, DdlVentasE.SelectedItem.ToString, ""))
dr("Modificado") = True
DtMovimientos.Rows.Add(dr) DtMovimientos.Rows.Add(dr)

View File

@@ -360,8 +360,8 @@
<asp:GridView ID="GvExcesos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Eventos" GridLines="none" ToolTip="Listado de Eventos" CssClass="table table-striped table-hover Widthall"> <asp:GridView ID="GvExcesos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Eventos" GridLines="none" ToolTip="Listado de Eventos" CssClass="table table-striped table-hover Widthall">
<Columns> <Columns>
<asp:BoundField DataField="VelocidadMaxima" ItemStyle-Width="25%" HeaderText="Velocidad Máxima" ItemStyle-HorizontalAlign="Center" /> <asp:BoundField DataField="VelocidadMaxima" ItemStyle-Width="25%" HeaderText="Velocidad Máxima" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField DataField="TiempoDetenido" ItemStyle-Width="25%" HeaderText="Tiempo Detenido" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField DataField="FechaTrama" ItemStyle-Width="25%" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" /> <asp:BoundField DataField="FechaTrama" ItemStyle-Width="25%" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField DataField="Direccion" ItemStyle-Width="60%" HeaderText="Dirección" ItemStyle-HorizontalAlign="Left" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div> </div>

View File

@@ -186,7 +186,17 @@ Partial Class GPS_TrayectoDetalle
GvIgnicion.DataSource = DsDatos.Tables(1) GvIgnicion.DataSource = DsDatos.Tables(1)
GvIgnicion.DataBind() GvIgnicion.DataBind()
GvExcesos.DataSource = DsDatos.Tables(2) Dim DtExcesos As DataTable = DsDatos.Tables(2)
Dim Direcciones = ConsultarDirecciones(DtExcesos)
If Direcciones IsNot Nothing Then
For Each Dir As JObject In Direcciones
DtExcesos.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
Next
End If
GvExcesos.DataSource = DtExcesos
GvExcesos.DataBind() GvExcesos.DataBind()
GvRalenti.DataSource = DsDatos.Tables(3) GvRalenti.DataSource = DsDatos.Tables(3)

View File

@@ -135,6 +135,8 @@
<asp:BoundField DataField="PendientePorSurtir" ItemStyle-HorizontalAlign="Right" HeaderText="Pendiente Por Surtir" DataFormatString="{0:#,###.######}" /> <asp:BoundField DataField="PendientePorSurtir" ItemStyle-HorizontalAlign="Right" HeaderText="Pendiente Por Surtir" DataFormatString="{0:#,###.######}" />
<asp:BoundField DataField="ExistenciaFinal" ItemStyle-HorizontalAlign="Right" HeaderText="Existencia Real" DataFormatString="{0:#,###.######}" /> <asp:BoundField DataField="ExistenciaFinal" ItemStyle-HorizontalAlign="Right" HeaderText="Existencia Real" DataFormatString="{0:#,###.######}" />
<asp:BoundField DataField="CantidadDisponibleInv" ItemStyle-HorizontalAlign="Right" HeaderText="Pendiente Por Recibir" DataFormatString="{0:#,###.######}" Visible="false"/> <asp:BoundField DataField="CantidadDisponibleInv" ItemStyle-HorizontalAlign="Right" HeaderText="Pendiente Por Recibir" DataFormatString="{0:#,###.######}" Visible="false"/>
<%-- <asp:BoundField DataField="Importe" ItemStyle-HorizontalAlign="Right" HeaderText="Precio Neto" DataFormatString="{0:N2}"/>
<asp:BoundField DataField="ImportePromocion" ItemStyle-HorizontalAlign="Right" HeaderText="Precio Promoción" DataFormatString="{0:N2}"/>--%>
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div> </div>
@@ -147,6 +149,7 @@
<asp:BoundField DataField="PendientePorSurtir" ItemStyle-HorizontalAlign="Right" HeaderText="Pendiente Por Surtir" DataFormatString="{0:#,###.######}" /> <asp:BoundField DataField="PendientePorSurtir" ItemStyle-HorizontalAlign="Right" HeaderText="Pendiente Por Surtir" DataFormatString="{0:#,###.######}" />
<asp:BoundField DataField="ExistenciaFinal" ItemStyle-HorizontalAlign="Right" HeaderText="Existencia Real" DataFormatString="{0:#,###.######}" /> <asp:BoundField DataField="ExistenciaFinal" ItemStyle-HorizontalAlign="Right" HeaderText="Existencia Real" DataFormatString="{0:#,###.######}" />
<asp:BoundField DataField="Importe" ItemStyle-HorizontalAlign="Right" HeaderText="Precio Neto" DataFormatString="{0:N2}"/> <asp:BoundField DataField="Importe" ItemStyle-HorizontalAlign="Right" HeaderText="Precio Neto" DataFormatString="{0:N2}"/>
<asp:BoundField DataField="ImportePromocion" ItemStyle-HorizontalAlign="Right" HeaderText="Precio Promoción" DataFormatString="{0:N2}"/>
<asp:BoundField DataField="CantidadDisponibleInv" ItemStyle-HorizontalAlign="Right" HeaderText="Pendiente Por Recibir" DataFormatString="{0:#,###.######}" Visible="false"/> <asp:BoundField DataField="CantidadDisponibleInv" ItemStyle-HorizontalAlign="Right" HeaderText="Pendiente Por Recibir" DataFormatString="{0:#,###.######}" Visible="false"/>
</Columns> </Columns>
</asp:GridView> </asp:GridView>

View File

@@ -2560,11 +2560,12 @@ Partial Class Inventarios_RecepcionUsados
Case "0" ' USADOS Case "0" ' USADOS
CvePS = Row.DataKey("CvePS").ToEntero() CvePS = Row.DataKey("CvePS").ToEntero()
Case "1" ' AJUSTE/GARANTIA Case "1" ' AJUSTE/GARANTIA
Dim drDatos As DataRow = GlobalDTAcumTamaños().FiltroPrimero(String.Format("CveTamaño = {0} AND CveEmpresa = {1}", CveTamaño, UsuarioActual.CveEmpresa)) CvePS = Row.DataKey("CvePS").ToEntero()
'Dim drDatos As DataRow = GlobalDTAcumTamaños().FiltroPrimero(String.Format("CveTamaño = {0} AND CveEmpresa = {1}", CveTamaño, UsuarioActual.CveEmpresa))
If drDatos IsNot Nothing Then 'If drDatos IsNot Nothing Then
CvePS = drDatos.Item("CvePSCargo").ToString.ToEntero ' CvePS = drDatos.Item("CvePSCargo").ToString.ToEntero
End If 'End If
End Select End Select
If CvePS > 0 Then If CvePS > 0 Then
@@ -3104,28 +3105,37 @@ Partial Class Inventarios_RecepcionUsados
End If End If
Dim drDatos As DataRow = GlobalDTAcumTamaños().FiltroPrimero(String.Format("CveTamaño = {0} AND CveEmpresa = {1}", CveTamaño, UsuarioActual.CveEmpresa)) Dim drDatos As DataRow = GlobalDTAcumTamaños().FiltroPrimero(String.Format("CveTamaño = {0} AND CveEmpresa = {1}", CveTamaño, UsuarioActual.CveEmpresa))
Dim Importe As Decimal = 0
Dim drTamañoPS As DataRow = Nothing
DtMovimientos.Rows.Clear()
' USADOS
If drDatos IsNot Nothing Then If drDatos IsNot Nothing Then
Dim Importe As Decimal = drDatos("Cargo").ToString.ToDecimal If RblUsadosAjuste.SelectedValue = "0" Then
Dim drTamañoPS As DataRow = Nothing CvePS = drDatos.Item("CvePSCargo").ToString.ToEntero
End If
Importe = drDatos("Cargo").ToString.ToDecimal
Else
Importe = TxtImporteAjuste.Text.ToDecimal
End If
DtMovimientos.Rows.Clear() 'AJUSTE/GARANTIA
If RblUsadosAjuste.SelectedValue = "1" Then
Select Case RblUsadosAjuste.SelectedValue CvePS = DdlPSAjuste.SelectedValue.ToEntero
Case "0" ' USADOS End If
CvePS = drDatos.Item("CvePSCargo").ToString.ToEntero
Case "1" ' AJUSTE/GARANTIA
CvePS = DdlPSAjuste.SelectedValue.ToEntero
End Select
If CvePS > 0 Then
If ObjPS.GetPS(CvePS, -1, UsuarioActual.CveEmpresa) Then If ObjPS.GetPS(CvePS, -1, UsuarioActual.CveEmpresa) Then
drTamañoPS = ObjPS.DtResultados.FiltroPrimero("") drTamañoPS = ObjPS.DtResultados.FiltroPrimero("")
'CveTamaño = -1 'limpio esta variable para que no se registre dos veces en la clase Modelos 'CveTamaño = -1 'limpio esta variable para que no se registre dos veces en la clase Modelos
AddNew(drTamañoPS.Item("CvePS").ToString.ToEntero, drTamañoPS.Item("PSCodigo").ToString, drTamañoPS.Item("CveUM").ToString.ToEntero, drTamañoPS.Item("UnidadMedida").ToString, 1.0, Importe, AddNew(drTamañoPS.Item("CvePS").ToString.ToEntero, drTamañoPS.Item("PSCodigo").ToString, drTamañoPS.Item("CveUM").ToString.ToEntero, drTamañoPS.Item("UnidadMedida").ToString, 1.0, Importe,
"", "-1", "-1", "-1", "", "", -1, "", "", CveTamaño) "", "-1", "-1", "-1", "", "", -1, "", "", CveTamaño)
End If End If
Else Else
Alert("No se pudo cargar el producto", TipoMensaje.MsgError) Alert("No se pudo cargar el producto", TipoMensaje.MsgError)
End If End If
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error al agregar el producto", ex) OnError("Ocurrió un error al agregar el producto", ex)
End Try End Try

View File

@@ -803,14 +803,13 @@ Partial Class Inventarios_Remanufactura
FechaMovimiento = ObjFactura.FechaPago FechaMovimiento = ObjFactura.FechaPago
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
IdCtaContable = ObjFactura.Cliente.IdCtaContClientes IdCtaContable = ObjFactura.Cliente.IdCtaContClientes
CveCuenta = ObjFactura.Cliente.CveCuentaClientes
If importeMovimiento <> 0 Then If importeMovimiento <> 0 Then
If IdCtaContable <= 0 Then If IdCtaContable <= 0 Then
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero) Then If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Else Else
ViewState("SeGuardoPrePoliza") = True ViewState("SeGuardoPrePoliza") = True

View File

@@ -463,6 +463,14 @@ Partial Class OC
ViewState("CveConfianzaProveedor") = value ViewState("CveConfianzaProveedor") = value
End Set End Set
End Property End Property
Private Property CveProveedorOriginal As Integer
Get
Return IfNull(ViewState("CveProveedorOriginal"), -1).ToString().ToEntero()
End Get
Set(value As Integer)
ViewState("CveProveedorOriginal") = value
End Set
End Property
Private Property CveEstatusSupervisada As Integer Private Property CveEstatusSupervisada As Integer
Get Get
Return IfNull(ViewState("CveEstatusSupervisada"), -1).ToString().ToEntero() Return IfNull(ViewState("CveEstatusSupervisada"), -1).ToString().ToEntero()
@@ -572,6 +580,7 @@ Partial Class OC
If Not Page.IsPostBack Then If Not Page.IsPostBack Then
CargaDatosAgregarPS() CargaDatosAgregarPS()
CveProveedorOriginal = -1
'MODALIDAD MULTIEMPRESA 'MODALIDAD MULTIEMPRESA
CveEmpresaActual = UsuarioActual.CveEmpresa CveEmpresaActual = UsuarioActual.CveEmpresa
CargaEstatusUsuariosClasificaciones() CargaEstatusUsuariosClasificaciones()
@@ -1431,6 +1440,7 @@ Partial Class OC
DdlProveedores.SelectedValue = objOC.CveProveedor.ToString DdlProveedores.SelectedValue = objOC.CveProveedor.ToString
If DdlProveedores.SelectedValue.ToEntero > 0 Then If DdlProveedores.SelectedValue.ToEntero > 0 Then
CveProveedorOriginal = objOC.CveProveedor
DdlProveedores.SelectedText = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltraParametros($"CveProveedor = {objOC.CveProveedor}").Rows(0)("RazonSocial").ToString DdlProveedores.SelectedText = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltraParametros($"CveProveedor = {objOC.CveProveedor}").Rows(0)("RazonSocial").ToString
Else Else
DdlProveedores.SelectedText = "-" DdlProveedores.SelectedText = "-"
@@ -2718,8 +2728,10 @@ Partial Class OC
DdlVendedor.SelectedValue.ToEntero, txtobsprioridad.Text, IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), DdlVendedor.SelectedValue.ToEntero, txtobsprioridad.Text, IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1),
Guia:=TxtGuia.Text.Trim, IEPS:=TxtIEPS.Text.ToDecimal, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, Promocion:=Promocion, pCveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, CveProveedorContacto:=CveProveedorContacto, Guia:=TxtGuia.Text.Trim, IEPS:=TxtIEPS.Text.ToDecimal, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, Promocion:=Promocion, pCveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, CveProveedorContacto:=CveProveedorContacto,
PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2)) Then PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2)) Then
If Not ObjConta.UpdateProveedorPoliza(CveOrdenCompra, CveProveedor, Proveedor) Then If CveProveedorOriginal <> CveProveedor Then
TieneError = True If Not ObjConta.UpdateProveedorPoliza(CveOrdenCompra, CveProveedor, Proveedor) Then
TieneError = True
End If
End If End If
Else Else
TieneError = True TieneError = True

View File

@@ -766,8 +766,7 @@ Partial Class Ventas_PortalCliente
Dim TipoMovimiento = False Dim TipoMovimiento = False
Dim ImporteMovimiento = 0.0D Dim ImporteMovimiento = 0.0D
Dim importeMX = 0.0D Dim importeMX = 0.0D
Dim IdCtaContable = 0 Dim IdCtaContable = 0
Dim CveCuenta = 0
Dim ConceptoMovimiento = "" Dim ConceptoMovimiento = ""
Dim Referencia = "" Dim Referencia = ""
Dim CveSubProyecto = -1 Dim CveSubProyecto = -1
@@ -810,7 +809,6 @@ Partial Class Ventas_PortalCliente
ImporteMovimiento = 0 ImporteMovimiento = 0
importeMX = 0 importeMX = 0
IdCtaContable = 0 IdCtaContable = 0
CveCuenta = 0
PorcentajeImpuesto = 0 PorcentajeImpuesto = 0
ConceptoMovimiento = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, LtlCliente.Text, DrPago("Factura").ToString, DrPago("Factura").ToString) ConceptoMovimiento = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, LtlCliente.Text, DrPago("Factura").ToString, DrPago("Factura").ToString)
'VALORES DE LA VENTA 'VALORES DE LA VENTA
@@ -843,14 +841,12 @@ Partial Class Ventas_PortalCliente
If CveMonedaVenta = 1 Then If CveMonedaVenta = 1 Then
IdCtaContable = IdCuentaCliente IdCtaContable = IdCuentaCliente
CveCuenta = CveCuentacliente
Else Else
IdCtaContable = IdCtaContMonedaExtranjera IdCtaContable = IdCtaContMonedaExtranjera
CveCuenta = CveCuentaComplementaria
ConceptoMovimiento += $" TC:{TCPago} ${ImporteMovimiento.FormatoNumero(2)}" ConceptoMovimiento += $" TC:{TCPago} ${ImporteMovimiento.FormatoNumero(2)}"
If ImporteMovimiento <> 0 AndAlso IdCtaContable > 0 Then If ImporteMovimiento <> 0 AndAlso IdCtaContable > 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, 207, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, -1, CveVenta, -1, CveSubProyecto, CveCliente, ImporteMX:=(importeMX - ImporteMovimiento).RoundSQL(), ImporteME:=ImporteMovimiento, CveCuenta:=CveCuenta, TipoCambio:=TCVenta) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, 207, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, -1, CveVenta, -1, CveSubProyecto, CveCliente, ImporteMX:=(importeMX - ImporteMovimiento).RoundSQL(), ImporteME:=ImporteMovimiento, TipoCambio:=TCVenta) Then
TieneError = True TieneError = True
MensajeError.Append("No se pudo insertar el detalle de pago de la póliza<br>") MensajeError.Append("No se pudo insertar el detalle de pago de la póliza<br>")
Exit For Exit For
@@ -858,7 +854,6 @@ Partial Class Ventas_PortalCliente
End If End If
IdCtaContable = IdCtaContMonedaExtranjera IdCtaContable = IdCtaContMonedaExtranjera
CveCuenta = CveCuentaMonedaExtranjera
End If End If
Case 134 'PAGO INTERMEDIARIO Case 134 'PAGO INTERMEDIARIO
@@ -882,7 +877,6 @@ Partial Class Ventas_PortalCliente
TCGeneral = TCVenta TCGeneral = TCVenta
IdCtaContable = UsuarioActual.Empresa.IdCuentaIVAxTrasladar IdCtaContable = UsuarioActual.Empresa.IdCuentaIVAxTrasladar
CveCuenta = UsuarioActual.Empresa.CveCuentaIVAxTrasladar
If TCVenta > 1 Then ConceptoMovimiento += $" TC:{TCVenta} ${ImporteMovimiento.FormatoNumero(2)}" If TCVenta > 1 Then ConceptoMovimiento += $" TC:{TCVenta} ${ImporteMovimiento.FormatoNumero(2)}"
Case 61 'IVA TRASLADADO Case 61 'IVA TRASLADADO
@@ -900,7 +894,6 @@ Partial Class Ventas_PortalCliente
TCGeneral = TCFluctuacion TCGeneral = TCFluctuacion
IdCtaContable = UsuarioActual.Empresa.IdCuentaIVATrasladado IdCtaContable = UsuarioActual.Empresa.IdCuentaIVATrasladado
CveCuenta = UsuarioActual.Empresa.CveCuentaIVATrasladado
If TCFluctuacion > 1 Then ConceptoMovimiento += $" TC:{TCFluctuacion} ${ImporteMovimiento.FormatoNumero(2)}" If TCFluctuacion > 1 Then ConceptoMovimiento += $" TC:{TCFluctuacion} ${ImporteMovimiento.FormatoNumero(2)}"
Case 8 'RETIVA X TRASLADAR Case 8 'RETIVA X TRASLADAR
@@ -926,16 +919,8 @@ Partial Class Ventas_PortalCliente
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetIVACirculacion").ToEntero IdCtaContable = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetIVACirculacion").ToEntero
End If End If
End If End If
'Conta SIG
If CveCuentaRetIVA <> 0 Then
CveCuenta = CveCuentaRetIVA
Else
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetIVACirculacionSIG").ToEntero
End If
End If
Case 62 'RETIVA TRASLADADO Case 62 'RETIVA TRASLADADO
If CveMonedaVenta = 1 Then If CveMonedaVenta = 1 Then
ImporteMovimiento = RetIVAVenta * PorcentajePago ImporteMovimiento = RetIVAVenta * PorcentajePago
@@ -959,17 +944,9 @@ Partial Class Ventas_PortalCliente
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetIVACirculacion").ToEntero IdCtaContable = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetIVACirculacion").ToEntero
End If End If
End If End If
'Conta SIG
If CveCuentaRetIVA <> 0 Then
CveCuenta = CveCuentaRetIVA
Else
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetIVACirculacionSIG").ToEntero
End If
End If
Case 9 'RETISR X TRASLADAR Case 9 'RETISR X TRASLADAR
If CveMonedaVenta = 1 Then If CveMonedaVenta = 1 Then
ImporteMovimiento = RetISRVenta * PorcentajePago ImporteMovimiento = RetISRVenta * PorcentajePago
@@ -993,17 +970,9 @@ Partial Class Ventas_PortalCliente
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetISRCirculacion").ToEntero IdCtaContable = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetISRCirculacion").ToEntero
End If End If
End If End If
'Conta SIG
If CveCuentaRetISR <> 0 Then
CveCuenta = CveCuentaRetISR
Else
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetISRCirculacionSIG").ToEntero
End If
End If
Case 63 'RETISR TRASLADADO Case 63 'RETISR TRASLADADO
If CveMonedaVenta = 1 Then If CveMonedaVenta = 1 Then
ImporteMovimiento = RetIVAVenta * PorcentajePago ImporteMovimiento = RetIVAVenta * PorcentajePago
@@ -1027,17 +996,8 @@ Partial Class Ventas_PortalCliente
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetISRCirculacion").ToEntero IdCtaContable = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetISRCirculacion").ToEntero
End If End If
End If End If
'Conta SIG
If CveCuentaRetISR <> 0 Then
CveCuenta = CveCuentaRetISR
Else
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetISRCirculacionSIG").ToEntero
End If
End If
Case 38 'IEPS X TRASLADAR Case 38 'IEPS X TRASLADAR
If CveMonedaVenta = 1 Then If CveMonedaVenta = 1 Then
ImporteMovimiento = IEPSVenta * PorcentajePago ImporteMovimiento = IEPSVenta * PorcentajePago
@@ -1053,7 +1013,6 @@ Partial Class Ventas_PortalCliente
TCGeneral = TCVenta TCGeneral = TCVenta
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar
CveCuenta = UsuarioActual.Empresa.CveCuentaIEPSxTrasladar
If TCVenta > 1 Then ConceptoMovimiento += $" TC:{TCVenta} ${ImporteMovimiento.FormatoNumero(2)}" If TCVenta > 1 Then ConceptoMovimiento += $" TC:{TCVenta} ${ImporteMovimiento.FormatoNumero(2)}"
Case 39 'IEPS TRASLADADO Case 39 'IEPS TRASLADADO
@@ -1071,14 +1030,12 @@ Partial Class Ventas_PortalCliente
TCGeneral = TCFluctuacion TCGeneral = TCFluctuacion
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSTrasladado IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSTrasladado
CveCuenta = UsuarioActual.Empresa.CveCuentaIEPSTrasladado
If TCFluctuacion > 1 Then ConceptoMovimiento += $" TC:{TCFluctuacion} ${ImporteMovimiento.FormatoNumero(2)}" If TCFluctuacion > 1 Then ConceptoMovimiento += $" TC:{TCFluctuacion} ${ImporteMovimiento.FormatoNumero(2)}"
Case 64 'GANANCIA Case 64 'GANANCIA
Continue For 'SKIPEA Continue For 'SKIPEA
If CveMonedaVenta <> 1 Then If CveMonedaVenta <> 1 Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
If TCPago > TCVenta AndAlso CveMonedaVenta = 2 Then If TCPago > TCVenta AndAlso CveMonedaVenta = 2 Then
ImporteMovimiento = (ImportePago * TCPago) - (ImportePago * TCVenta) ImporteMovimiento = (ImportePago * TCPago) - (ImportePago * TCVenta)
ImporteMovimiento -= ((IVAVenta * PorcentajePago) * TCFluctuacion) - ((IVAVenta * PorcentajePago) * TCVenta) ImporteMovimiento -= ((IVAVenta * PorcentajePago) * TCFluctuacion) - ((IVAVenta * PorcentajePago) * TCVenta)
@@ -1094,7 +1051,6 @@ Partial Class Ventas_PortalCliente
Continue For 'SKIPEA Continue For 'SKIPEA
If CveMonedaVenta <> 1 Then If CveMonedaVenta <> 1 Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
If TCPago < TCVenta AndAlso CveMonedaVenta = 2 Then If TCPago < TCVenta AndAlso CveMonedaVenta = 2 Then
ImporteMovimiento = (ImportePago * TCPago) - (ImportePago * TCVenta) ImporteMovimiento = (ImportePago * TCPago) - (ImportePago * TCVenta)
ImporteMovimiento -= ((IVAVenta * PorcentajePago) * TCFluctuacion) - ((IVAVenta * PorcentajePago) * TCVenta) ImporteMovimiento -= ((IVAVenta * PorcentajePago) * TCFluctuacion) - ((IVAVenta * PorcentajePago) * TCVenta)
@@ -1110,7 +1066,7 @@ Partial Class Ventas_PortalCliente
'AGREGA PREPOLIZA DETALLE 'AGREGA PREPOLIZA DETALLE
If ImporteMovimiento <> 0 Then If ImporteMovimiento <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, -1, CveVenta, -1, CveSubProyecto, CveCliente, CveProveedorContabilizar, ImporteMX:=importeMX, CveCuenta:=CveCuenta, TipoCambio:=TCGeneral, PorcentajeImpuesto:=PorcentajeImpuesto) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, -1, CveVenta, -1, CveSubProyecto, CveCliente, CveProveedorContabilizar, ImporteMX:=importeMX, TipoCambio:=TCGeneral, PorcentajeImpuesto:=PorcentajeImpuesto) Then
TieneError = True TieneError = True
MensajeError.Append("No se pudo insertar el detalle de la póliza<br>") MensajeError.Append("No se pudo insertar el detalle de la póliza<br>")
Exit For Exit For
@@ -1954,7 +1910,7 @@ Partial Class Ventas_PortalCliente
End Select End Select
If importeMovimiento <> 0 Then If importeMovimiento <> 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, If(ConceptoContable = 30, ObjFactura.Cliente.IdCtaContClientes, ObjFactura.Cliente.IdCtaContAnticipos), -1, CveIE:=CveIE, CveCompra:=-1, CveProveedor:=-1, CvePersonal:=-1, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=importeMovimiento, ImporteME:=tImporteMonedaExtranjera, TipoCambio:=TxtTipoCambio.Text.ToDecimal, CveCuenta:=If(ConceptoContable = 30, ObjFactura.Cliente.CveCuentaClientes, ObjFactura.Cliente.CveCuentaAnticipos)) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, If(ConceptoContable = 30, ObjFactura.Cliente.IdCtaContClientes, ObjFactura.Cliente.IdCtaContAnticipos), -1, CveIE:=CveIE, CveCompra:=-1, CveProveedor:=-1, CvePersonal:=-1, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=importeMovimiento, ImporteME:=tImporteMonedaExtranjera, TipoCambio:=TxtTipoCambio.Text.ToDecimal) Then
MsgError = "Ocurrió un error al registrar el asiento del ingreso." MsgError = "Ocurrió un error al registrar el asiento del ingreso."
End If End If
End If End If

View File

@@ -193,7 +193,13 @@
<asp:BoundField DataField="PorPagado" DataFormatString="{0:N2}%" HeaderText="% Abonado" /> <asp:BoundField DataField="PorPagado" DataFormatString="{0:N2}%" HeaderText="% Abonado" />
<asp:BoundField DataField="Saldo" DataFormatString="{0:N2}" HeaderText="Saldo" /> <asp:BoundField DataField="Saldo" DataFormatString="{0:N2}" HeaderText="Saldo" />
<asp:BoundField DataField="PorXPagar" DataFormatString="{0:N2}%" HeaderText="% A Cobrar" ItemStyle-HorizontalAlign="Center" /> <asp:BoundField DataField="PorXPagar" DataFormatString="{0:N2}%" HeaderText="% A Cobrar" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField DataField="AplicaNC" HeaderText="Aplica NC" ItemStyle-Width="10%" /> <asp:TemplateField>
<HeaderTemplate>Aplica NC</HeaderTemplate>
<ItemTemplate>
<asp:HyperLink ID="HplNC" Visible='<%# Eval("AplicaNotaCredito").ToString = "True"%>' ToolTip="Aplica Nota de Crédito" ImageUrl="/Imagenes/flag_blue.png" Enabled="false" runat="server"></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<%--<asp:BoundField DataField="AplicaNC" HeaderText="Aplica NC" ItemStyle-Width="10%" />--%>
</Columns> </Columns>
</asp:GridView> </asp:GridView>
@@ -751,72 +757,6 @@
</ContentTemplate> </ContentTemplate>
</ajax:TabPanel> </ajax:TabPanel>
<%--02/07/2018 - TAB CAMBIO DE CONTRASENIAS--%>
<ajax:TabPanel ID="TabContraseña" runat="server" HeaderText="<i class='fa fa-lock'></i> Contraseña" Visible="False">
<ContentTemplate>
<asp:UpdatePanel ID="UPPContraseña" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row" style="padding: 5px; margin: 5px;">
<div class="col-md-4 col-md-offset-4">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="fa fa-user font-green"></i>
<span class="caption-subject bold uppercase">Cambio Contraseña</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
</div>
<div class="portlet-body">
<div style="padding: 10px">
<div class=" form-group">
<div style="text-align: left;" class="form-group">
<label class="control-label visible-ie8 visible-ie9">Contraseña Actual</label>
<div class="input-icon">
<i class="fa fa-lock"></i>
<asp:TextBox ID="TxtContraseniaActual" class="form-control placeholder-no-fix" type="password" placeholder="Contraseña Actual" runat="server" CausesValidation="true" TextMode="Password" ValidationGroup="GrpGuardarContra" Width="100%"></asp:TextBox>
</div>
<asp:RequiredFieldValidator ID="RfvContraseña" runat="server" ControlToValidate="TxtContraseniaActual" Display="Dynamic" ErrorMessage="<span class='has-error'><span id='username-error' class='help-block'>El campo <b>''Contraseña''</b> es necesario.</span></span>" ValidationGroup="GrpGuardarContra"></asp:RequiredFieldValidator>
</div>
</div>
<div class=" form-group">
<div style="text-align: left;" class="form-group">
<label class="control-label visible-ie8 visible-ie9">Nueva Contraseña</label>
<div class="input-icon">
<i class="fa fa-lock"></i>
<asp:TextBox ID="TxtContrasenia1" class="form-control placeholder-no-fix" type="password" placeholder="Nueva Contraseña" runat="server" CausesValidation="true" TextMode="Password" ValidationGroup="GrpGuardarContra" Width="100%"></asp:TextBox>
</div>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TxtContrasenia1" Display="Dynamic" ErrorMessage="<span class='has-error'><span id='username-error' class='help-block'>El campo <b>''Nueva Contraseña''</b> es necesario.</span></span>" ValidationGroup="GrpGuardarContra"></asp:RequiredFieldValidator>
</div>
</div>
<div class=" form-group">
<div style="text-align: left;" class="form-group">
<label class="control-label visible-ie8 visible-ie9">Confirmar Contraseña</label>
<div class="input-icon">
<i class="fa fa-lock"></i>
<asp:TextBox ID="TxtContrasenia2" class="form-control placeholder-no-fix" type="password" placeholder="Confirmar Contraseña" runat="server" CausesValidation="true" TextMode="Password" ValidationGroup="GrpGuardarContra" Width="100%"></asp:TextBox>
</div>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TxtContrasenia2" Display="Dynamic" ErrorMessage="<span class='has-error'><span id='username-error' class='help-block'>El campo <b>''Confirmar Contraseña''</b> es necesario.</span></span>" ValidationGroup="GrpGuardarContra"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVContrasenia" runat="server" ErrorMessage="Contraseñas diferentes"
Text="La nueva contraseña es diferente" ControlToCompare="TxtContrasenia1" ControlToValidate="TxtContrasenia2"
ValidationGroup="GrpGuardarContra" Display="Dynamic"></asp:CompareValidator>
</div>
</div>
<div style="text-align: center;">
<asp:Button ID="BtnGuardarContraseña" runat="server" Text="Guardar" ValidationGroup="GrpGuardarContra" class="btn btn-primary" />
</div>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</ajax:TabPanel>
<%---2020/02/06 - Auditoria--%> <%---2020/02/06 - Auditoria--%>
<ajax:TabPanel ID="TabAuditoria" runat="server" HeaderText="<i class='fa fa-search'></i> Auditoría" Visible="false" > <ajax:TabPanel ID="TabAuditoria" runat="server" HeaderText="<i class='fa fa-search'></i> Auditoría" Visible="false" >
<ContentTemplate> <ContentTemplate>

View File

@@ -293,7 +293,6 @@ Partial Class Portal_PortalProveedor
End If End If
'CARGA TAB CONTRASENIA PARA TODOS LOS USUARIOS 'CARGA TAB CONTRASENIA PARA TODOS LOS USUARIOS
If UsuarioActual.CvePlataforma = 7 Then TabContraseña.Visible = True
End If End If
@@ -511,13 +510,25 @@ Partial Class Portal_PortalProveedor
e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Right e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(8).HorizontalAlign = HorizontalAlign.Right e.Row.Cells(8).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(9).Width = Unit.Percentage(10)
If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(5).ForeColor = Drawing.Color.Red If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(5).ForeColor = Drawing.Color.Red
If e.Row.DBCampo("DiasVencidos").ToDouble > 0 AndAlso CType(sender, GridView).ID = "GvCxP" Then e.Row.Cells(3).ForeColor = Drawing.Color.Red If e.Row.DBCampo("DiasVencidos").ToDouble > 0 AndAlso CType(sender, GridView).ID = "GvCxP" Then e.Row.Cells(3).ForeColor = Drawing.Color.Red
If e.Row.DBCampo("CveCompra") = "" Then If e.Row.DBCampo("CveCompra") = "" Then
e.Row.BackColor = Drawing.Color.LightGray e.Row.BackColor = Drawing.Color.LightGray
End If End If
If e.Row.DBCampo("CveCompraNC").ToEntero > 0 Then
Dim asdas2 As Integer = e.Row.DBCampo("CveCompraNC").ToEntero
Dim asdas As String = e.Row.DBCampo("AplicaNotaCredito").ToString
If e.Row.DBCampo("AplicaNotaCredito").ToString = "True" Then
e.Row.FCHyperLink("HplNC").Visible = True
e.Row.FCHyperLink("HplNC").ImageUrl = "/Imagenes/flag_green.png"
e.Row.FCHyperLink("HplNC").ToolTip = "Notas de Crédito Aplicadas"
End If
End If
If CType(sender, GridView).ID = "GvCxPHistorial" Then If CType(sender, GridView).ID = "GvCxPHistorial" Then
If e.Row.DBCampo("CveCompra") = "" Then If e.Row.DBCampo("CveCompra") = "" Then
e.Row.BackColor = Drawing.Color.LightGray e.Row.BackColor = Drawing.Color.LightGray
@@ -1367,39 +1378,11 @@ Partial Class Portal_PortalProveedor
End If End If
ObjMovtos.Dispose() ObjMovtos.Dispose()
Return retorno Return retorno
End Function End Function
#End Region #End Region
#Region "TAB CONTRASENIA"
Protected Sub BtnGuardarContraseña_Click(sender As Object, e As EventArgs) Handles BtnGuardarContraseña.Click
If Decripta(UsuarioActual.Contraseña) = TxtContraseniaActual.Text Then
Dim ObjUsuario As New ClsSisUsuarios
Dim Usuario As Usuario = Nothing
If ObjUsuario.GetUsuariosPortal(UsuarioActual.CveUsuario, -1, -1) Then
Dim dr As DataRow = ObjUsuario.DtResultados.FiltroPrimero("")
If ObjUsuario.UpdateUsuarioPortal(dr("Usuario").ToString, dr("Nombre").ToString, dr("Correo").ToString, True, Encripta(TxtContrasenia1.Text), dr("CveCliente").ToString.ToEntero, dr("CveProveedor").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveUsuario) Then
UsuarioActual.Contraseña = Encripta(TxtContrasenia1.Text)
Alert("Contraseña Modificada.", TipoMensaje.MsgInformacion)
End If
End If
ObjUsuario.Dispose()
Else
Alert("La Contraseña Actual es incorrecta.", TipoMensaje.MsgAdvertencia)
End If
End Sub
#End Region
#Region "AUDITORIA" #Region "AUDITORIA"
Property DTDocumentacion As DataTable Property DTDocumentacion As DataTable
Get Get
If ViewState("DTDocumentacion") Is Nothing Then If ViewState("DTDocumentacion") Is Nothing Then

View File

@@ -307,6 +307,13 @@
<ajax:FilteredTextBoxExtender ID="FTBEDescuentoAutorizado" TargetControlID="TxtDescuentoAutorizado" FilterType="Numbers,Custom" ValidChars="." runat="server" /> <ajax:FilteredTextBoxExtender ID="FTBEDescuentoAutorizado" TargetControlID="TxtDescuentoAutorizado" FilterType="Numbers,Custom" ValidChars="." runat="server" />
</td> </td>
</tr> </tr>
<tr id="TrLimiteAutorizacion" runat="server" visible="false">
<td>Límite Cédito Autorizado:</td>
<td>
<asp:TextBox ID="TxtLimiteAutorizado" MaxLength="20" CssClass="form-control" runat="server"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTELimiteAutorizado" TargetControlID="TxtLimiteAutorizado" FilterType="Numbers,Custom" ValidChars="." runat="server" />
</td>
</tr>
</table> </table>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>

View File

@@ -447,6 +447,7 @@ Partial Class Sistemas_UsuarioDetalle
If UsuarioActual.Empresa.Funcionalidad(531).ToString = "1" Then If UsuarioActual.Empresa.Funcionalidad(531).ToString = "1" Then
TrDescuentoAutorizado.Visible = True TrDescuentoAutorizado.Visible = True
TrLimiteAutorizacion.Visible = True
End If End If
If UsuarioActual.Empresa.Funcionalidad(599) = "1" Then If UsuarioActual.Empresa.Funcionalidad(599) = "1" Then
@@ -586,8 +587,8 @@ Partial Class Sistemas_UsuarioDetalle
LblFechaCaptura.Text = ObjUsuario.Fecha.ToShortDateString LblFechaCaptura.Text = ObjUsuario.Fecha.ToShortDateString
LblUsuarioCapturo.Text = ObjUsuario.UsuarioCreo LblUsuarioCapturo.Text = ObjUsuario.UsuarioCreo
TxtDescuentoAutorizado.Text = ObjUsuario.DescuentoAutorizado.FormatoNumero TxtDescuentoAutorizado.Text = ObjUsuario.DescuentoAutorizado.FormatoNumero
TxtLimiteAutorizado.Text = ObjUsuario.DtResultados.Rows(0)("LimiteCreditoAutorizado").ToString()
Else Else
Alert("El Usuario Solicitado no existe, Revise su búsqueda.", TipoMensaje.MsgAdvertencia) Alert("El Usuario Solicitado no existe, Revise su búsqueda.", TipoMensaje.MsgAdvertencia)
BtnGuardar.Enabled = False BtnGuardar.Enabled = False
@@ -831,7 +832,7 @@ Partial Class Sistemas_UsuarioDetalle
'REGISTRA O ACTUALIZA LOS DATOS GENERALES DEL USUARIO 'REGISTRA O ACTUALIZA LOS DATOS GENERALES DEL USUARIO
If CveUsuario = -1 Then If CveUsuario = -1 Then
CveUsuario = ObjUsuarios.AddUsuario(TxtUsuario.Text.Trim, Encripta(ContraseñaPredeterminada), TxtNombre.Text.Trim, DdlRol.SelectedValue.ToEntero, TxtCorreo.Text.Trim, DdlPersonal.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, ChkCambiarContraseña.Checked, UsuarioActual.CveUsuario, DdlEmpresa.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, CveAlmacenAsignado:=DdlAlmacenGeneral.SelectedValue.ToEntero, AsignarSubProyecto:=ChkAsignarSubProyecto.Checked, AsignarOC:=ChkAsignarOC.Checked, DescuentoAutorizado:=TxtDescuentoAutorizado.Text.ToDouble, CodigoAcceso:=CodigoAcceso) CveUsuario = ObjUsuarios.AddUsuario(TxtUsuario.Text.Trim, Encripta(ContraseñaPredeterminada), TxtNombre.Text.Trim, DdlRol.SelectedValue.ToEntero, TxtCorreo.Text.Trim, DdlPersonal.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, ChkCambiarContraseña.Checked, UsuarioActual.CveUsuario, DdlEmpresa.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, CveAlmacenAsignado:=DdlAlmacenGeneral.SelectedValue.ToEntero, AsignarSubProyecto:=ChkAsignarSubProyecto.Checked, AsignarOC:=ChkAsignarOC.Checked, DescuentoAutorizado:=TxtDescuentoAutorizado.Text.ToDouble, CodigoAcceso:=CodigoAcceso, LimiteCreditoAutorizado:=TxtLimiteAutorizado.Text.ToDecimal())
EsNuevoUsuario = True EsNuevoUsuario = True
If CveUsuario = -1 Then If CveUsuario = -1 Then
TieneError = True TieneError = True
@@ -843,7 +844,7 @@ Partial Class Sistemas_UsuarioDetalle
End If End If
Next Next
Else Else
If Not ObjUsuarios.UpdateUsuario(TxtUsuario.Text.Trim, TxtNombre.Text.Trim, DdlRol.SelectedValue.ToEntero, TxtCorreo.Text.Trim, DdlPersonal.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, ChkCambiarContraseña.Checked, ChkEstatus.Checked, DdlEmpresa.SelectedValue.ToEntero, CveUsuario, DdlAlmacenGeneral.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, AsignarSubProyecto:=ChkAsignarSubProyecto.Checked, AsignarOC:=ChkAsignarOC.Checked, DescuentoAutorizado:=TxtDescuentoAutorizado.Text.ToDouble, CodigoAcceso:=CodigoAcceso) Then If Not ObjUsuarios.UpdateUsuario(TxtUsuario.Text.Trim, TxtNombre.Text.Trim, DdlRol.SelectedValue.ToEntero, TxtCorreo.Text.Trim, DdlPersonal.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, ChkCambiarContraseña.Checked, ChkEstatus.Checked, DdlEmpresa.SelectedValue.ToEntero, CveUsuario, DdlAlmacenGeneral.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, AsignarSubProyecto:=ChkAsignarSubProyecto.Checked, AsignarOC:=ChkAsignarOC.Checked, DescuentoAutorizado:=TxtDescuentoAutorizado.Text.ToDouble, CodigoAcceso:=CodigoAcceso, LimiteCreditoAutorizado:=TxtLimiteAutorizado.Text.ToDecimal()) Then
TieneError = True TieneError = True
End If End If

View File

@@ -559,7 +559,7 @@ Partial Class Ventas_ActualizarPrecios
For Each Franquicia In Franquicias For Each Franquicia In Franquicias
Dim CveFranquicia As Integer = Franquicia.ToEntero Dim CveFranquicia As Integer = Franquicia.ToEntero
Dim CvePS As Integer = GlobalDTPS(CveFranquicia, Codigo:=Codigo.ToUpper).FiltroPrimeroValor("CvePS", "").ToEntero Dim CvePS As Integer = GlobalDTPSSimplificado(CveFranquicia, Codigo:=Codigo).FiltroPrimeroValor("CvePS", "").ToEntero
Dim CvePrecioLisa As Integer = GlobalDTPrecioListas(CveFranquicia).FiltroPrimeroValor("CvePrecioLista", String.Format("PrecioLista = '{0}'", PrecioLista)).ToEntero Dim CvePrecioLisa As Integer = GlobalDTPrecioListas(CveFranquicia).FiltroPrimeroValor("CvePrecioLista", String.Format("PrecioLista = '{0}'", PrecioLista)).ToEntero
If CvePS <= 0 Then If CvePS <= 0 Then

View File

@@ -0,0 +1,156 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatAutorizacionLimites.aspx.vb" Inherits="Ventas_CatAutorizacionLimites" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.labelddl {
top: 0;
margin-bottom: 0;
font-size: 13px;
color: #888888;
opacity: 1;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Catálogo de autorizaciones de límite de crédito
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkAgregar" OnClick="LnkAgregar_Click" runat="server"><i class="fa fa-plus"></i>Agregar autorización</asp:LinkButton></li>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" 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 smalltitle " style="">
<div class="tools">
<asp:Button ID="BtnConsultar" OnClick="BtnConsultar_Click" runat="server" Text="Consultar" class="btn btn-primary" />
</div>
<div class="titlefiltros caption" style="margin-top: -8px;">
<ul class="list-inline" style="font-size: 12px;">
<li>Estatus:
<asp:DropDownList AppendDataBoundItems="true" ID="DdlEstatus" runat="server" Width="200px" DataTextField="Nombre" DataValueField="CveDispositivosGrupos" CssClass="form-control input-sm select2me">
<asp:ListItem Selected="True" Value="-1" Text="Todos"></asp:ListItem>
<asp:ListItem Value="0" Text="Solicitada"></asp:ListItem>
<asp:ListItem Value="1" Text="Autorizada"></asp:ListItem>
<asp:ListItem Value="2" Text="Aplicada"></asp:ListItem>
<asp:ListItem Value="3" Text="Rechazada"></asp:ListItem>
</asp:DropDownList>
</li>
</ul>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveAutorizacion,CveCliente,CveVendedor,Importe"
EmptyDataText="No se encontraron autorizaciones" ToolTip="Listado de autorizaciones"
CssClass="table table-striped table-advance table-hover ScrollAD mysmallbtn" data-sort="true" Width="100%" GridLines="None">
<Columns>
<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-HorizontalAlign="Left" ItemStyle-Width="15%" />
<asp:BoundField DataField="Importe" ItemStyle-Width="15%" HeaderText="Importe" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N2}" />
<asp:BoundField DataField="LimiteCredito" ItemStyle-Width="15%" HeaderText="Limite Credito" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N2}" />
<asp:BoundField DataField="Saldo" ItemStyle-Width="15%" HeaderText="Saldo" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N2}" />
<asp:BoundField DataField="FechaIng" ItemStyle-Width="10%" HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
<asp:BoundField DataField="TipoAutorizacionTexto" HeaderText="Tipo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
<asp:BoundField DataField="TipoDocumento" HeaderText="Tipo Documento" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left" />
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%">
<ItemTemplate>
<asp:Label ID="LblEstatus" Text='<%# Eval("Estatus") %>' runat="server"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" HeaderText="Autorizar/Rechazar">
<ItemTemplate>
<asp:LinkButton data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea autorizar el limite?" data-btn-ok-label="si" ID="LnkAutorizar" OnClick="LnkAutorizar_Click" CssClass="btn btn-circle btn-sm green" runat="server" Text="<i class='fa fa-check'></i>"></asp:LinkButton>
<asp:LinkButton data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea rechazar el limite?" data-btn-ok-label="si" ID="LnkRechazar" OnClick="LnkRechazar_Click" CssClass="btn btn-circle btn-sm red" runat="server" Text="<i class='fa fa-times'></i>"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" HeaderText="Eliminar">
<ItemTemplate>
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el limite?" data-btn-ok-label="si" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<div id="DModal" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModal" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content">
<div class="modal-header ">
<h4 class="modal-title">
<asp:Literal ID="ltlMotititulo" Text="Medida" 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">
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlCliente" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
</div>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlVendedor" CssClass="form-control marginFixRow select2me" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="100%">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVVendedor" runat="server" ControlToValidate="DdlVendedor" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Vendedor''</b> es necesario, por favor seleccione uno." ValidationGroup="VgmGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEClasificacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVVendedor" Width="300px"></ajax:ValidatorCalloutExtender>
<label for="<%= DdlVendedor.ClientID.ToString()%>">Vendedor:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<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="Egs" Text="Nota de crédito"></asp:ListItem>
</asp:DropDownList>
<label for="<%= DdlTipoDocto.ClientID.ToString()%>">Tipo Documento:</label>
</div>
<div id="DivAutorizacion" runat="server" class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlTipoAutorizacion" runat="server" Width="100%" CssClass="form-control marginFixRow select2me" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoAutorizacion_SelectedIndexChanged">
<asp:ListItem Selected="True" Value="-1" Text="Seleccione"></asp:ListItem>
<asp:ListItem Value="1" Text="Importe"></asp:ListItem>
<asp:ListItem Value="2" Text="Vencimiento"></asp:ListItem>
</asp:DropDownList>
<label for="<%= DdlTipoAutorizacion.ClientID.ToString()%>">Tipo Autorización:</label>
</div>
<div id="DivImporte" runat="server" class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPrecio" inputmode="numeric" runat="server" onkeyup="Recalcula();" CausesValidation="true" lang="nb" ClientIDMode="Static" Text="0.00" MaxLength="12" ValidationGroup="GrpAddVenta" Width="200px" CssClass="form-control "></asp:TextBox>
<%--<ajax:MaskedEditExtender ID="MEEPrecio" runat="server" TargetControlID="TxtPrecio" ClearMaskOnLostFocus="false" MaskType="Number" Mask="9,999.99" InputDirection="RightToLeft" DisplayMoney="Left"></ajax:MaskedEditExtender>--%>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="TxtPrecio" FilterType="Custom, Numbers" ValidChars="." />
<asp:RequiredFieldValidator ID="RFVPrecio" runat="server" ControlToValidate="TxtPrecio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCPrecio" runat="server" HighlightCssClass="vco" TargetControlID="RFVPrecio" Width="300px"></ajax:ValidatorCalloutExtender>
<asp:CustomValidator ID="CVPrecio" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtPrecio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GrpAddVenta"></asp:CustomValidator>
<ajax:ValidatorCalloutExtender ID="VCEPrecio" runat="server" HighlightCssClass="vco" TargetControlID="CVPrecio" Width="300px"></ajax:ValidatorCalloutExtender>
<label for="<%= TxtPrecio.ClientID.ToString()%>">Importe:</label>
</div>
</div>
<div class="modal-footer">
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" Text="Agregar" 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 ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -0,0 +1,215 @@

Imports Extensiones
Partial Class Ventas_CatAutorizacionLimites
Inherits ClsPaginas
#Region "PROPIEDADES"
Private Property CveAutorizacion() As Integer
Get
Return If(IsNothing(ViewState("CveAutorizacion")), -1, CInt(ViewState("CveAutorizacion")))
End Get
Set
ViewState("CveAutorizacion") = Value
End Set
End Property
Private Property Modalidad() As String
Get
Return If(IsNothing(ViewState("Modalidad")), "", (ViewState("Modalidad").ToString))
End Get
Set
ViewState("Modalidad") = Value
End Set
End Property
#End Region
Private Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then
CargaCombos()
CargaDatos()
End If
End Sub
#Region "CARGAS"
Private Sub CargaCombos()
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
If EsWS Then
DdlCliente.setEsWebService(True)
Else
DdlCliente.setEsWebService(False)
DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
DdlCliente.DataBind()
DdlCliente.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
End If
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
DdlVendedor.DataBind()
UpModal.Update()
End Sub
Private Sub CargaDatos()
Dim ObjGral As New ClsVentas
If ObjGral.GetAutorizacionLimite(UsuarioActual.CveEmpresa, -1, -1, CveEstatus:=DdlEstatus.SelectedValue.ToEntero()) Then
GvDatos.DataSource = ObjGral.DtResultados
End If
ObjGral.Dispose()
GvDatos.DataBind()
UpDatos.Update()
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
CargaDatos()
End Sub
#End Region
#Region "BOTONES"
Protected Sub LnkEliminar_Click(sender As Object, e As EventArgs)
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
Dim CveAutorizacion = gvRow.DataKey("CveAutorizacion").ToEntero()
Dim CveCliente = gvRow.DataKey("CveCliente").ToEntero()
Dim ObjGral As New ClsVentas
If ObjGral.RemoveAutorizacionLimite(CveAutorizacion, CveCliente) Then
Alert("La autorización se elimino correctamente.", TipoMensaje.MsgInformacion)
End If
ObjGral.Dispose()
CargaDatos()
End Sub
Protected Sub LnkAgregar_Click(sender As Object, e As EventArgs)
LimpiaModal()
Modalidad = "A"
BtnGuardar.Text = "Agregar"
ltlMotititulo.Text = "Agregar autorización"
UpModal.Update()
RegistraScript("$('#DModal').modal()")
End Sub
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
If DdlTipoDocto.SelectedValue = "Ing" AndAlso DdlTipoAutorizacion.SelectedValue.ToEntero() <= 0 Then
Alert("Debe seleccionar un tipo de autorización", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim CveEstatus As Integer = 1
Dim TipoDocto As String = DdlTipoDocto.SelectedValue
Dim CveTipoAutorizacion As Integer = -1
Select Case TipoDocto
Case "Ing"
CveTipoAutorizacion = DdlTipoAutorizacion.SelectedValue.ToEntero()
Case "Egs"
CveTipoAutorizacion = -1
End Select
Dim ObjPS As New ClsVentas
If ObjPS.AddAutorizacionLimite(UsuarioActual.CveEmpresa, DdlCliente.SelectedValue.ToEntero(), DdlVendedor.SelectedValue.ToEntero(), TxtPrecio.Text.ToDecimal(), CveEstatus, UsuarioActual.CveUsuario, CveAutorizacion, TipoDocto) Then
RegistraScript("$('#DModal').modal('hide')")
Alert("La autorización se agregó correctamente.", TipoMensaje.MsgInformacion)
End If
ObjPS.Dispose()
CargaDatos()
End Sub
#End Region
#Region "LIMPIAR"
Protected Sub LimpiaModal()
Me.CveAutorizacion = -1
TxtPrecio.Text = ""
DdlCliente.SelectedValue = "-1"
DdlVendedor.SelectedValueExist("-1")
End Sub
#End Region
#Region "GRIDVIEW"
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("CveEstatus") = "0" Then
e.Row.FCLabel("LblEstatus").CssClass = "badge badge-secondary"
e.Row.FCLinkButton("LnkAutorizar").Visible = True
e.Row.FCLinkButton("LnkRechazar").Visible = True
ElseIf e.Row.DBCampo("CveEstatus") = "1" Then
e.Row.FCLabel("LblEstatus").CssClass = "badge badge-success"
e.Row.FCLinkButton("LnkAutorizar").Visible = False
e.Row.FCLinkButton("LnkRechazar").Visible = True
ElseIf e.Row.DBCampo("CveEstatus") = "2" Then
e.Row.FCLabel("LblEstatus").CssClass = "badge badge-primary"
e.Row.FCLinkButton("LnkAutorizar").Visible = False
e.Row.FCLinkButton("LnkRechazar").Visible = False
ElseIf e.Row.DBCampo("CveEstatus") = "3" Then
e.Row.FCLabel("LblEstatus").CssClass = "badge badge-danger"
e.Row.FCLinkButton("LnkAutorizar").Visible = False
e.Row.FCLinkButton("LnkRechazar").Visible = False
End If
'If e.Row.DBCampo("Estatus") = "True" Then
' e.Row.Cells(1).ForeColor = Drawing.Color.Green
' e.Row.Cells(1).Font.Bold = True
' e.Row.Cells(1).Text = "Activo"
'Else
' e.Row.Cells(1).Text = "Inactivo"
' e.Row.Cells(1).ForeColor = Drawing.Color.Red
' e.Row.Cells(1).Font.Bold = True
'End If
End If
End Sub
#End Region
Protected Sub LnkAutorizar_Click(sender As Object, e As EventArgs)
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
Dim CveAutorizacion = gvRow.DataKey("CveAutorizacion").ToEntero()
Dim CveCliente = gvRow.DataKey("CveCliente").ToEntero()
Dim CveVendedor = gvRow.DataKey("CveVendedor").ToEntero()
Dim Importe = gvRow.DataKey("Importe").ToEntero()
Dim CveEstatusAutorizacion As Integer = 1
Dim ObjVentas As New ClsVentas
If ObjVentas.AutorizacionLimitesUpdate(CveAutorizacion, CveCliente, CveVendedor, Importe, CveEstatusAutorizacion) Then
Alert("El límite de crédito fue autorizado.")
End If
ObjVentas.Dispose()
CargaDatos()
End Sub
Protected Sub LnkRechazar_Click(sender As Object, e As EventArgs)
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
Dim CveAutorizacion = gvRow.DataKey("CveAutorizacion").ToEntero()
Dim CveCliente = gvRow.DataKey("CveCliente").ToEntero()
Dim CveVendedor = gvRow.DataKey("CveVendedor").ToEntero()
Dim Importe = gvRow.DataKey("Importe").ToEntero()
Dim CveEstatusAutorizacion As Integer = 3
Dim ObjVentas As New ClsVentas
If ObjVentas.AutorizacionLimitesUpdate(CveAutorizacion, CveCliente, CveVendedor, Importe, CveEstatusAutorizacion) Then
Alert("El límite de crédito fue rechazado.")
End If
ObjVentas.Dispose()
CargaDatos()
End Sub
Protected Sub DdlTipoAutorizacion_SelectedIndexChanged(sender As Object, e As EventArgs)
DivImporte.Visible = DdlTipoAutorizacion.SelectedValue.ToEntero() = 1
UpModal.Update()
End Sub
Protected Sub DdlCliente_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim CveCliente As Integer = DdlCliente.SelectedValue.ToEntero()
If CveCliente > 0 Then
Using ObjClientes As New ClsClientes
If ObjClientes.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) AndAlso ObjClientes.DtResultados.Rows.Count > 0 Then
DdlVendedor.SelectedValueExist(ObjClientes.DtResultados.Rows(0)("CveVendedor"))
End If
End Using
End If
UpModal.Update()

View File

@@ -855,7 +855,7 @@ Partial Class Ventas_ClientesAbonar
Dim tipoCambioVentaDiferenciaCambiaria As Double = 1 Dim tipoCambioVentaDiferenciaCambiaria As Double = 1
Dim EsAnticipoEspecial As Boolean = False Dim EsAnticipoEspecial As Boolean = False
If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then EsAnticipoEspecial = True If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119, 158) Then EsAnticipoEspecial = True
If dtConceptos IsNot Nothing Then If dtConceptos IsNot Nothing Then
For Each Row As DataRow In dtConceptos.Rows For Each Row As DataRow In dtConceptos.Rows
@@ -900,9 +900,9 @@ Partial Class Ventas_ClientesAbonar
Else Else
ConceptoMovimiento += $" TC:{tipoCambioVentaValuacion} ${ImporteMovimiento.FormatoNumero(2)}" ConceptoMovimiento += $" TC:{tipoCambioVentaValuacion} ${ImporteMovimiento.FormatoNumero(2)}"
IdCtaContable = If(EsAnticipoEspecial, IdCtaContMonedaComplementariaAnticipo, IdCtaContComplementaria) IdCtaContable = If(EsAnticipoEspecial, IdCtaContMonedaComplementariaAnticipo, IdCtaContComplementaria)
If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa.Contiene(119, 158)) Then
importeMX = ImporteMovimiento importeMX = ImporteMovimiento
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, If(gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa = 119, 226, 207), ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=(ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento).RoundSQL, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioVentaValuacion) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, If(gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(119, 158), 226, 207), ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=(ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento).RoundSQL, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioVentaValuacion) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
End If End If
@@ -2579,7 +2579,6 @@ Partial Class Ventas_ClientesAbonar
For Each gr As GridViewRow In GvCxC.Rows For Each gr As GridViewRow In GvCxC.Rows
If gr.FCCheckBox("Chk").Checked Then If gr.FCCheckBox("Chk").Checked Then
Dim IdCtaContable As Integer = IdCuentaCliente Dim IdCtaContable As Integer = IdCuentaCliente
Dim CveCuenta As Integer = 0
Dim PorcentajePago As Decimal = gr.DataKey("Saldo").ToDecimal / gr.DataKey("Original").ToDecimal Dim PorcentajePago As Decimal = gr.DataKey("Saldo").ToDecimal / gr.DataKey("Original").ToDecimal
Dim Saldo As Decimal = gr.DataKey("Saldo").ToDecimal Dim Saldo As Decimal = gr.DataKey("Saldo").ToDecimal
Dim RETIVA As Decimal = gr.DataKey("RetIVA").ToDecimal Dim RETIVA As Decimal = gr.DataKey("RetIVA").ToDecimal
@@ -2632,11 +2631,11 @@ Partial Class Ventas_ClientesAbonar
End If End If
Dim UsaComplementaria As Boolean = False Dim UsaComplementaria As Boolean = True
If UsuarioActual.CveEmpresa = 119 Then 'If UsuarioActual.CveEmpresa = 119 Then
UsaComplementaria = True ' UsaComplementaria = True
End If 'End If
If MsgError = "" Then If MsgError = "" Then
@@ -2648,16 +2647,16 @@ Partial Class Ventas_ClientesAbonar
If UsaComplementaria AndAlso tCveMoneda = 2 Then If UsaComplementaria AndAlso tCveMoneda = 2 Then
'normal 'normal
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, Saldo, gr.DataKey("SerieFolio").ToString, CveConceptoCliente, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, Saldo, Saldo), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, Saldo, gr.DataKey("SerieFolio").ToString, CveConceptoCliente, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, Saldo, Saldo), TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
MsgError = "Ocurrio un error al saldar el movimiento" MsgError = "Ocurrio un error al saldar el movimiento"
End If End If
'complementaria 'complementaria
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, 0, gr.DataKey("SerieFolio").ToString, 207, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=IdCtaContComplementaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, Saldo, (Saldo * TCVenta) - Saldo).RoundSQL, ImporteME:=Saldo, CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, 0, gr.DataKey("SerieFolio").ToString, 207, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=IdCtaContComplementaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, Saldo, (Saldo * TCVenta) - Saldo).RoundSQL, ImporteME:=Saldo, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
MsgError = "Ocurrio un error al saldar el movimiento" MsgError = "Ocurrio un error al saldar el movimiento"
End If End If
Else Else
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, Saldo, gr.DataKey("SerieFolio").ToString, CveConceptoCliente, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, Saldo, Saldo * TCVenta), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, Saldo, gr.DataKey("SerieFolio").ToString, CveConceptoCliente, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, Saldo, Saldo * TCVenta), TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
MsgError = "Ocurrio un error al saldar el movimiento" MsgError = "Ocurrio un error al saldar el movimiento"
End If End If
@@ -2673,11 +2672,11 @@ Partial Class Ventas_ClientesAbonar
End If End If
If TCPago > TCVenta Then If TCPago > TCVenta Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
MsgError = "Ocurrio un error al saldar el movimiento" MsgError = "Ocurrio un error al saldar el movimiento"
End If End If
Else Else
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 65, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 65, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
MsgError = "Ocurrio un error al saldar el movimiento" MsgError = "Ocurrio un error al saldar el movimiento"
End If End If
End If End If
@@ -2700,19 +2699,17 @@ Partial Class Ventas_ClientesAbonar
End If End If
IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar) IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
CveCuenta = If(CveCuentaIVAxTrasladar > 0, CveCuentaIVAxTrasladar, UsuarioActual.Empresa.CveCuentaIVAxTrasladar)
If (IVA > 0 Or UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) And IVA < 0) AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IVA, gr.DataKey("SerieFolio").ToString, 13, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, IVA, IVA * TCVenta), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then If (IVA > 0 Or UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) And IVA < 0) AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IVA, gr.DataKey("SerieFolio").ToString, 13, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, IVA, IVA * TCVenta), PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
MsgError = "Ocurrio un error al saldar el movimiento" MsgError = "Ocurrio un error al saldar el movimiento"
End If End If
If (RETIVA > 0 Or UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) And RETIVA < 0) AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, RETIVA, gr.DataKey("SerieFolio").ToString, 8, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContRetIVA, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, RETIVA, RETIVA * TCVenta), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then If (RETIVA > 0 Or UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) And RETIVA < 0) AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, RETIVA, gr.DataKey("SerieFolio").ToString, 8, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContRetIVA, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, RETIVA, RETIVA * TCVenta), PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
MsgError = "Ocurrio un error al saldar el movimiento" MsgError = "Ocurrio un error al saldar el movimiento"
End If End If
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar
CveCuenta = UsuarioActual.Empresa.CveCuentaIEPSxTrasladar If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IEPS, gr.DataKey("SerieFolio").ToString, 38, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, IEPS, IEPS * TCVenta), PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IEPS, gr.DataKey("SerieFolio").ToString, 38, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, IEPS, IEPS * TCVenta), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
MsgError = "Ocurrio un error al saldar el movimiento" MsgError = "Ocurrio un error al saldar el movimiento"
End If End If

View File

@@ -4993,13 +4993,13 @@ Partial Class PV
If CveVentaDetalle <= 0 AndAlso Not EsCargo Then If CveVentaDetalle <= 0 AndAlso Not EsCargo Then
Dim ListaPSCargo = CalculaUsados(Consec) Dim ListaPSCargo = CalculaUsados(Consec)
If ListaPSCargo.Count > 0 Then If ListaPSCargo.Count > 0 Then
CalculaRecepcionUsados(CvePS, ListaPSCargo) CalculaRecepcionUsados(CvePS, ListaPSCargo, Cantidad)
End If End If
ElseIf CveVentaDetalle > 0 AndAlso Not EsCargo Then ElseIf CveVentaDetalle > 0 AndAlso Not EsCargo Then
EliminarUsados() EliminarUsados()
Dim ListaPSCargo = CalculaUsados(Consec, LimpiarUsados:=False) Dim ListaPSCargo = CalculaUsados(Consec, LimpiarUsados:=False)
If ListaPSCargo.Count > 0 Then If ListaPSCargo.Count > 0 Then
CalculaRecepcionUsados(CvePS, ListaPSCargo) CalculaRecepcionUsados(CvePS, ListaPSCargo, Cantidad)
End If End If
End If End If
@@ -7091,7 +7091,7 @@ Partial Class PV
EmitirImprimirNew() EmitirImprimirNew()
End Sub End Sub
Private Sub CalculaRecepcionUsados(CvePS As Integer, ListaPSCargo As List(Of Integer)) Private Sub CalculaRecepcionUsados(CvePS As Integer, ListaPSCargo As List(Of Integer), CantidadUsado As Decimal)
If Modalidad = "U" Then If Modalidad = "U" Then
If TmpDTRecepcionUsados.Rows.Count > 0 Then If TmpDTRecepcionUsados.Rows.Count > 0 Then
@@ -7139,14 +7139,14 @@ Partial Class PV
Dim DrTamanio As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo = {DdlRecepcionUsados.SelectedValue}") Dim DrTamanio As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo = {DdlRecepcionUsados.SelectedValue}")
If DdlRecepcionUsados.SelectedValue.ToEntero() > 0 Then If DdlRecepcionUsados.SelectedValue.ToEntero() > 0 Then
TotalCargos += 1D * DrTamanio("Cargo").ToString().ToDecimal TotalCargos += CantidadUsado * DrTamanio("Cargo").ToString().ToDecimal
TotalCantidad += 1D TotalCantidad += CantidadUsado
StrTamanios.AppendFormat("{0},", DrTamanio("CodigoPS")) StrTamanios.AppendFormat("{0},", DrTamanio("CodigoPS"))
Dim Row As DataRow = TmpDTRecepcionUsados.NewRow() Dim Row As DataRow = TmpDTRecepcionUsados.NewRow()
Row("CvePS") = DrTamanio("CvePSCargo").ToString().ToEntero Row("CvePS") = DrTamanio("CvePSCargo").ToString().ToEntero
Row("CvePSRelacionado") = CvePS Row("CvePSRelacionado") = CvePS
Row("Cantidad") = 1D Row("Cantidad") = CantidadUsado
Row("CveUM") = DrTamanio("CveUM").ToString().ToEntero Row("CveUM") = DrTamanio("CveUM").ToString().ToEntero
Row("CveVentaDetalle") = -1 Row("CveVentaDetalle") = -1
Row("PU") = DrTamanio("Cargo").ToString().ToDecimal Row("PU") = DrTamanio("Cargo").ToString().ToDecimal
@@ -7176,11 +7176,14 @@ Partial Class PV
' Exit Sub ' Exit Sub
'End If 'End If
For Each Dr As DataRow In TmpDT.FiltraParametros($"EsCargo = True AND EliminarDB = False AND CvePS IN ({StrCargos})").Rows Dim DtUsadosFiltro As DataTable = TmpDT.FiltraParametros($"EsCargo = True AND EliminarDB = False AND CvePS IN ({StrCargos})")
Dim DivisorUsado = DtUsadosFiltro.Rows.Count.ToString().ToDecimal()
For Each Dr As DataRow In DtUsadosFiltro.Rows
Dim TotalAnterior As Decimal = Dr("Cantidad").ToString.ToDecimal * Dr("PU").ToString.ToDecimal Dim TotalAnterior As Decimal = Dr("Cantidad").ToString.ToDecimal * Dr("PU").ToString.ToDecimal
'Dim PUActual As Decimal = (TotalAnterior - TotalCargos) / Dr("Cantidad").ToString.ToDecimal 'Dim PUActual As Decimal = (TotalAnterior - TotalCargos) / Dr("Cantidad").ToString.ToDecimal
Dim DescuentoCargo As Decimal = (TotalCargos / Dr("Cantidad").ToString.ToDecimal) Dim DescuentoCargo As Decimal = (TotalCargos / DivisorUsado)
If DescuentoCargo > (TotalAnterior - Dr("Descuento").ToString.ToDecimal()) Then If DescuentoCargo > (TotalAnterior - Dr("Descuento").ToString.ToDecimal()) Then
DescuentoCargo = (TotalAnterior - Dr("Descuento").ToString.ToDecimal()) DescuentoCargo = (TotalAnterior - Dr("Descuento").ToString.ToDecimal())
@@ -7218,20 +7221,23 @@ Partial Class PV
Next Next
TmpDT.AcceptChanges() TmpDT.AcceptChanges()
If TotalCargos > 0 Then ' cuando se entrega más valor de usados, que los cargos hechos, se descuenta sobre el PU del producto de venta If TotalCargos > 0 Then ' cuando se entrega más valor de usados, que los cargos hechos, se descuenta sobre el PU del producto de venta
For Each Dr As DataRow In TmpDT.FiltraParametros($"EsCargo = False AND EliminarDB = False AND CvePS={CvePS}").Rows Dim DtPSFiltro As DataTable = TmpDT.FiltraParametros($"EsCargo = False AND EliminarDB = False AND CvePS={CvePS}")
Dim Divisor = DtPSFiltro.Rows.Count.ToString().ToDecimal()
Dim PUAnterior As Decimal = Dr("Cantidad").ToString.ToDecimal * Dr("PU").ToString.ToDecimal For Each Dr As DataRow In DtPSFiltro.Rows
Dim DescuentoCargo As Decimal = (TotalCargos / Dr("Cantidad").ToString.ToDecimal)
If DescuentoCargo > (PUAnterior - Dr("Descuento").ToString.ToDecimal()) Then Dim TotalAnterior As Decimal = Dr("Cantidad").ToString.ToDecimal * Dr("PU").ToString.ToDecimal
DescuentoCargo = (PUAnterior - Dr("Descuento").ToString.ToDecimal()) Dim DescuentoCargo As Decimal = (TotalCargos / Divisor)
If DescuentoCargo > (TotalAnterior - Dr("Descuento").ToString.ToDecimal()) Then
DescuentoCargo = (TotalAnterior - Dr("Descuento").ToString.ToDecimal())
End If End If
'Dim PUActual As Decimal = PUAnterior - DescuentoCargo 'Dim PUActual As Decimal = PUAnterior - DescuentoCargo
Dim Descuento As Decimal = Dr("Descuento").ToString.ToDecimal + DescuentoCargo Dim Descuento As Decimal = Dr("Descuento").ToString.ToDecimal + DescuentoCargo
Dim TotalCalculableImpuestos As Decimal = (Dr("Cantidad").ToString.ToDecimal * (PUAnterior)) - Descuento Dim TotalCalculableImpuestos As Decimal = (Dr("Cantidad").ToString.ToDecimal * Dr("PU").ToString.ToDecimal) - Descuento
TotalCargos += -DescuentoCargo TotalCargos -= DescuentoCargo
Dim drt As DataRow() = TmpDT.Select("Consec = " & Dr("Consec").ToString) Dim drt As DataRow() = TmpDT.Select("Consec = " & Dr("Consec").ToString)
Dim drr As DataRow = drt(0) Dim drr As DataRow = drt(0)

View File

@@ -2944,7 +2944,10 @@ Partial Class ProductosyServicios
Return True Return True
End If End If
End If End If
GlobalDTPSSimplificado(CveEmpresaFranquicia) = Nothing
Next Next
Return False Return False
End Function End Function

View File

@@ -196,6 +196,11 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlSubProyectoSaldar" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%">
</asp:DropDownList>
<label for="<%= DdlSubProyectoSaldar.ClientID.ToString()%>">Centro Costo:</label>
</div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtConcepto" CssClass="form-control" runat="server"></asp:TextBox> <asp:TextBox ID="TxtConcepto" CssClass="form-control" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvConcepto" runat="server" ControlToValidate="TxtConcepto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="VgGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RfvConcepto" runat="server" ControlToValidate="TxtConcepto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="VgGuardar"></asp:RequiredFieldValidator>

View File

@@ -94,7 +94,9 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
DdlSucursal.DataSource = get_GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa); DdlSucursal.DataSource = get_GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa);
DdlSucursal.DataBind(); DdlSucursal.DataBind();
DdlSucursal.Items.Insert(0, new ListItem("Todos", "-1")); DdlSucursal.Items.Insert(0, new ListItem("Todos", "-1"));
DdlSucursal.SelectedValue = "-1"; DdlSucursal.SelectedValue = "-1";
DdlSubProyectoSaldar.DataSource = get_GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa);
DdlSubProyectoSaldar.DataBind();
} }
//protected void CargaClientes() //protected void CargaClientes()
@@ -386,7 +388,7 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
break; break;
} }
if (!ObjConta.AddPrePolizasDetalle(CvePrePoliza, true, Gv.DataKey("Saldo").ToDecimal(), Gv.DataKey("Folio").ToString(), 78, TxtConcepto.Text, TxtFecha.Text.ToDate(), UsuarioActual.Empresa.IdCuentaOtrosIngresos, -1, CveIE, CveVenta, ImporteMX: Gv.DataKey("Saldo").ToDecimal(), CveCuenta: -1, CveSubProyecto: Gv.DataKey("CveSubProyecto").ToEntero())) if (!ObjConta.AddPrePolizasDetalle(CvePrePoliza, true, Gv.DataKey("Saldo").ToDecimal(), Gv.DataKey("Folio").ToString(), 78, TxtConcepto.Text, TxtFecha.Text.ToDate(), UsuarioActual.Empresa.IdCuentaOtrosIngresos, -1, CveIE, CveVenta, ImporteMX: Gv.DataKey("Saldo").ToDecimal(), CveCuenta: -1, CveSubProyecto: DdlSubProyectoSaldar.SelectedValue.ToEntero()))
{ {
MsgError = "Ocurrio un error al saldar el movimiento"; MsgError = "Ocurrio un error al saldar el movimiento";
break; break;

View File

@@ -775,9 +775,9 @@ Partial Class Ventas_RepPS
'worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 9).Value = Row("PolizasCantidadAcumulada") 'worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 9).Value = Row("PolizasCantidadAcumulada")
worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 9).Formula = $"=SUM({worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 7).Name}:{worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 8).Name})" worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 9).Formula = $"=SUM({worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 7).Name}:{worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 8).Name})"
worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 10).Value = Row("VentaAnterior") worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 10).Value = Row("ManoObraCantidadAnterior")
worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 11).Value = Row("VentaDia") worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 11).Value = Row("ManoObraCantidadDia")
'worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 12).Value = Row("VentaAcumulada") 'worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 12).Value = Row("ManoObraCantidadAcumulada")
worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 12).Formula = $"=SUM({worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 10).Name}:{worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 11).Name})" worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 12).Formula = $"=SUM({worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 10).Name}:{worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 11).Name})"
Dim StyleData = worksheet.Cells.GetSubrangeAbsolute(IdxSucursalesServiciosAmortPolizas, 0, IdxSucursalesServiciosAmortPolizas, 12).Style Dim StyleData = worksheet.Cells.GetSubrangeAbsolute(IdxSucursalesServiciosAmortPolizas, 0, IdxSucursalesServiciosAmortPolizas, 12).Style

View File

@@ -244,7 +244,7 @@
<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" EmptyDataText="No se encontraron Ventas Utilidad con los filtros especificados" ToolTip="Listado de Ventas" CssClass="table table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None"> <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> <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="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="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}"/>

View File

@@ -181,6 +181,9 @@ Partial Class Ventas_RepVentasUtilidad
End If End If
If Not e.Row.RowIndex = 0 AndAlso e.Row.DBCampo("SubTotal").ToDecimal = 0 AndAlso e.Row.DBCampo("CveVenta").ToEntero > 0 Then If Not e.Row.RowIndex = 0 AndAlso e.Row.DBCampo("SubTotal").ToDecimal = 0 AndAlso e.Row.DBCampo("CveVenta").ToEntero > 0 Then
If e.Row.DBCampo("FechaVenta").ToDate < txtFechaI.Text.ToDate.FirstDayOfMonth Then
e.Row.ToolTip = "Venta con realizada en un periodo anterior"
End If
e.Row.CssClass = "danger" e.Row.CssClass = "danger"
ElseIf Not e.Row.RowIndex = 0 AndAlso e.Row.DBCampo("CveVenta") <> "" Then ElseIf Not e.Row.RowIndex = 0 AndAlso e.Row.DBCampo("CveVenta") <> "" Then
e.Row.Cells(0).BackColor = ColorTranslator.FromHtml("#e9e9e9") e.Row.Cells(0).BackColor = ColorTranslator.FromHtml("#e9e9e9")
@@ -218,6 +221,7 @@ Partial Class Ventas_RepVentasUtilidad
If e.Row.DBCampo("CveVenta").ToEntero > 0 AndAlso Not CBool(e.Row.DBCampo("TienePago")) Then If e.Row.DBCampo("CveVenta").ToEntero > 0 AndAlso Not CBool(e.Row.DBCampo("TienePago")) Then
e.Row.Cells(15).BackColor = Drawing.Color.LightPink e.Row.Cells(15).BackColor = Drawing.Color.LightPink
e.Row.Cells(15).ToolTip = "Factura sin pago registrado"
End If End If

View File

@@ -367,6 +367,9 @@
<li> <li>
<asp:HyperLink ID="HlFacturasRelaciondas" Visible="false" NavigateUrl="#" data-toggle="modal" data-backdrop="static" data-keyboard="false" data-target="#DivFacturasRelaciondas" runat="server"><i class='fa fa-file'></i> Relacionar Facturas</asp:HyperLink> <asp:HyperLink ID="HlFacturasRelaciondas" Visible="false" NavigateUrl="#" data-toggle="modal" data-backdrop="static" data-keyboard="false" data-target="#DivFacturasRelaciondas" runat="server"><i class='fa fa-file'></i> Relacionar Facturas</asp:HyperLink>
</li> </li>
<li>
<asp:LinkButton ID="LnkSolicitarCredito" Visible="false" runat="server"><i class="fa fa-plus"></i>Solicitar autorización de crédito</asp:LinkButton>
</li>
</ContentTemplate> </ContentTemplate>
<Triggers> <Triggers>
<asp:AsyncPostBackTrigger ControlID="LnkImprimir" EventName="Click" /> <asp:AsyncPostBackTrigger ControlID="LnkImprimir" EventName="Click" />
@@ -3657,7 +3660,7 @@
</div> </div>
<div class="col-md-4" align="right"> <div class="col-md-4" align="right">
<div class="row"> <div class="row">
<div class="col-md-12" align="right" style="padding-bottom: 15px;"> <div class="col-md-12" align="right" style="padding-bottom: 15px;">
<asp:UpdatePanel ID="UpFacturar" runat="server" class="portlet light xspadding bordered " style="width: 300px;" align="right" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpFacturar" runat="server" class="portlet light xspadding bordered " style="width: 300px;" align="right" UpdateMode="Conditional">
<Triggers> <Triggers>
@@ -3765,23 +3768,23 @@
<tr runat="server" id="Tr3"> <tr runat="server" id="Tr3">
<td align="center" style="" runat="server" id="tdAdjuntar"> <td align="center" style="" runat="server" id="tdAdjuntar">
<asp:LinkButton ID="BtnAdjuntar" runat="server" Text="Adjuntar" data-toggle="modal" data-target="#ModalAdjuntar" CssClass="btn myventasbutton btn-primary" /> <asp:LinkButton ID="BtnAdjuntar" runat="server" Text="Adjuntar" data-toggle="modal" data-target="#ModalAdjuntar" CssClass="btn myventasbutton btn-primary" />
</td> </td>
<td align="left" style="display: none;" runat="server" id="tdAdjunto"> <td align="left" style="display: none;" runat="server" id="tdAdjunto">
<div class="col-md-6"> <div class="col-md-6">
<asp:LinkButton ID="BtnArchivoAdjunto" runat="server" Text="" Font-Size="14px" /> <asp:LinkButton ID="BtnArchivoAdjunto" runat="server" Text="" Font-Size="14px" />
</div> </div>
<div class="col-md-6" style="text-align: right;"> <div class="col-md-6" style="text-align: right;">
<asp:LinkButton ID="BtnEliminarAdjunto" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" Visible="false"/> <asp:LinkButton ID="BtnEliminarAdjunto" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" Visible="false" />
</div> </div>
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
</ContentTemplate> </ContentTemplate>
<Triggers> <Triggers>
<asp:PostBackTrigger ControlID="BtnArchivoAdjunto" /> <asp:PostBackTrigger ControlID="BtnArchivoAdjunto" />
</Triggers> </Triggers>
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
@@ -3956,7 +3959,7 @@
<div style="max-height: 300px; overflow-y: auto;"> <div style="max-height: 300px; overflow-y: auto;">
<asp:GridView ID="GVAnticipos" runat="server" AutoGenerateColumns="False" ClientIDMode="Static" EmptyDataText="No se encontraron Anticipos del Cliente" <asp:GridView ID="GVAnticipos" runat="server" AutoGenerateColumns="False" ClientIDMode="Static" EmptyDataText="No se encontraron Anticipos del Cliente"
ToolTip="Listado de Anticipos" CssClass="GVAnticipos table table-striped table-hover Widthall" data-height="300" Style="text-align: center;" GridLines="None" ToolTip="Listado de Anticipos" CssClass="GVAnticipos table table-striped table-hover Widthall" data-height="300" Style="text-align: center;" GridLines="None"
DataKeyNames="ISTotal,Saldo,CveIE,Folio,Tipo,CveVenta,CveConceptoContable,CveConceptoContableAmor, TotalAnticipo, SubTotalAnticipo, IVAAnticipo,IEPS, ImpuestosLocalesAnticipo, SubTotalAmortizacion, SubTotal, Original, IVA, RetIVA, RetISR, IdCtaContableNC,FolioFiscal, CveClasificacionNC, IdCtaContableNCSIG, TipoCambio,TipoCambioPago,TipoCambioHoy, CveMoneda,Fecha,SaldoSubTotal,SaldoConImpuestos,RegresarImpuesto,CveCliente"> DataKeyNames="ISTotal,Saldo,CveIE,Folio,Tipo,CveVenta,CveConceptoContable,CveConceptoContableAmor, TotalAnticipo, SubTotalAnticipo, IVAAnticipo,IEPS, ImpuestosLocalesAnticipo, SubTotalAmortizacion, SubTotal, Original, IVA, RetIVA, RetISR, IdCtaContableNC,FolioFiscal, CveClasificacionNC, TipoCambio,TipoCambioPago,TipoCambioHoy, CveMoneda,Fecha,SaldoSubTotal,SaldoConImpuestos,RegresarImpuesto,CveCliente">
<Columns> <Columns>
<asp:TemplateField> <asp:TemplateField>
<ItemTemplate> <ItemTemplate>
@@ -6239,7 +6242,7 @@
<button type="button" class="close" data-dismiss="modal">&times;</button> <button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Facturas Relacionadas</h4> <h4 class="modal-title">Facturas Relacionadas</h4>
</div> </div>
<div class="modal-body" style="width:900px;"> <div class="modal-body" style="width: 900px;">
<div class="row"> <div class="row">
<div class="col-md-2"> <div class="col-md-2">
<label>Relación:</label> <label>Relación:</label>
@@ -6267,7 +6270,7 @@
<label>Folio Fiscal:</label> <label>Folio Fiscal:</label>
</div> </div>
<div class="col-md-8"> <div class="col-md-8">
<asp:TextBox ID="TxtFolioFiscalRelacionar" runat="server" Text="" Width="100%" CssClass="form-control input-sm"></asp:TextBox> <asp:TextBox ID="TxtFolioFiscalRelacionar" runat="server" Text="" Width="100%" CssClass="form-control input-sm"></asp:TextBox>
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
<asp:LinkButton ID="LnkAgregarFolioFiscalRelacionada" runat="server" CssClass="btn btn-sm btn-primary" OnClick="LnkAgregarFolioFiscalRelacionada_Click"><i class="fa fa-plus"></i>Agregar Folio</asp:LinkButton> <asp:LinkButton ID="LnkAgregarFolioFiscalRelacionada" runat="server" CssClass="btn btn-sm btn-primary" OnClick="LnkAgregarFolioFiscalRelacionada_Click"><i class="fa fa-plus"></i>Agregar Folio</asp:LinkButton>
@@ -6312,8 +6315,9 @@
<asp:UpdatePanel runat="server" ID="UpdatePanel3" UpdateMode="Conditional"> <asp:UpdatePanel runat="server" ID="UpdatePanel3" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="row"> <div class="row">
<div class="col-md-2"> Folio Fiscal</div> <div class="col-md-2">Folio Fiscal</div>
<div class="col-md-10"> <asp:TextBox ID="TxtModalFolioFiscal" runat="server" Width="100%"></asp:TextBox></div> <div class="col-md-10">
<asp:TextBox ID="TxtModalFolioFiscal" runat="server" Width="100%"></asp:TextBox></div>
</div> </div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
@@ -7539,6 +7543,47 @@
</div> </div>
</div> </div>
<div id="DivModalSolicitarCredito" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalSolicitud" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content">
<div class="modal-header ">
<h4 class="modal-title">Solicitar crédito</h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlTipoDocto" runat="server" Width="100%" CssClass="form-control marginFixRow select2me" AutoPostBack="true">
<asp:ListItem Value="Ing" Selected="True" Text="Factura de Ingreso"></asp:ListItem>
<asp:ListItem Value="Egs" Text="Nota de crédito"></asp:ListItem>
</asp:DropDownList>
<label for="<%= DdlTipoDocto.ClientID.ToString()%>">Tipo Documento:</label>
</div>
<div id="DivAutorizacion" runat="server" class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlTipoAutorizacion" runat="server" Width="100%" CssClass="form-control marginFixRow select2me" AutoPostBack="true">
<asp:ListItem Selected="True" Value="-1" Text="Seleccione"></asp:ListItem>
<asp:ListItem Value="1" Text="Importe"></asp:ListItem>
<asp:ListItem Value="2" Text="Vencimiento"></asp:ListItem>
</asp:DropDownList>
<label for="<%= DdlTipoAutorizacion.ClientID.ToString()%>">Tipo Autorización:</label>
</div>
<div id="DivImporteSolicitud" runat="server" class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtImporteSolicitud" inputmode="numeric" runat="server" CausesValidation="true" lang="nb" ClientIDMode="Static" Text="0.00" MaxLength="12" ValidationGroup="VgmGuardarAut" Width="200px" CssClass="form-control "></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTBImporteSolicitud" runat="server" TargetControlID="TxtImporteSolicitud" FilterType="Custom, Numbers" ValidChars="." />
<asp:RequiredFieldValidator ID="RFVImporteSolicitud" runat="server" ControlToValidate="TxtImporteSolicitud" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="VgmGuardarAut"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="RFVImporteSolicitud" Width="300px"></ajax:ValidatorCalloutExtender>
<asp:CustomValidator ID="CVImporteSolcitud" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtImporteSolicitud" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="VgmGuardarAut"></asp:CustomValidator>
<ajax:ValidatorCalloutExtender ID="VCEImporteSolicitud" runat="server" HighlightCssClass="vco" TargetControlID="CVImporteSolcitud" Width="300px"></ajax:ValidatorCalloutExtender>
<label for="<%= TxtImporteSolicitud.ClientID.ToString()%>">Importe:</label>
</div>
</div>
<div class="modal-footer">
<asp:Button ID="BtnSolicitarCredito" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="VgmGuardarAut" />
<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">
<script src="/Metronic/assets/global/scripts/jquery-sortable.js"></script> <script src="/Metronic/assets/global/scripts/jquery-sortable.js"></script>
@@ -7672,12 +7717,20 @@
Importe = ToDouble(Importe.toFixed(2)); Importe = ToDouble(Importe.toFixed(2));
if (Importe > 0) { if (Importe > 0) {
let pu = (ImporteTotal / CantidadPendiente); let pu = (ImporteTotal / CantidadPendiente);
if (pu > 0) { if (pu > 0) {
TxtCantidad.value = (Importe / pu).toString(); const cantidadSugerida = (Importe / pu);
} if (cantidadSugerida > CantidadPendiente) {
TxtCantidad.value = CantidadPendiente.toString();
}else {
TxtCantidad.value = cantidadSugerida.toString();
}
}else {
TxtCantidad.value = "0";
}
}else { }else {
TxtCantidad.value = "0"; TxtCantidad.value = "0";
@@ -8616,7 +8669,7 @@
} }
//Suma Totales //Suma Totales
function FnSuma() { function FnSuma() {
debugger; debugger;
$get('TxtSubTotal2').value = FormatoNumero(ToDouble($get('TxtSubTotal').value) - ToDouble($get('LblDescuentos').innerHTML) - ToDouble($get('LblAmortizacion').innerHTML), 2); $get('TxtSubTotal2').value = FormatoNumero(ToDouble($get('TxtSubTotal').value) - ToDouble($get('LblDescuentos').innerHTML) - ToDouble($get('LblAmortizacion').innerHTML), 2);
var totalVenta = ToDouble($get('TxtSubTotal2').value) + ToDouble($get('TxtIVA').value) + ToDouble($get('TxtIEPS') ? ToDouble($get('TxtIEPS').value) : 0) - ToDouble($get('TxtRetIVA') ? $get('TxtRetIVA').value : 0) - ToDouble($get('TxtRetISR') ? $get('TxtRetISR').value:0); var totalVenta = ToDouble($get('TxtSubTotal2').value) + ToDouble($get('TxtIVA').value) + ToDouble($get('TxtIEPS') ? ToDouble($get('TxtIEPS').value) : 0) - ToDouble($get('TxtRetIVA') ? $get('TxtRetIVA').value : 0) - ToDouble($get('TxtRetISR') ? $get('TxtRetISR').value:0);

File diff suppressed because it is too large Load Diff