This commit is contained in:
Rakcsle Supertramp
2020-04-15 08:29:07 -07:00
14 changed files with 355 additions and 104 deletions

View File

@@ -4433,13 +4433,14 @@ Public Class ClsVentas
Return retorno Return retorno
End Function End Function
Public Function GetRepTopClientesVentas(CveEmpresa As Integer, Mes As Integer, Año As Integer, Optional CveSubProyecto As Integer = -1) As Boolean Public Function GetRepTopClientesVentas(CveEmpresa As Integer, Mes As Integer, Año As Integer, Optional Top As Integer = 20, Optional CveSubProyecto As Integer = -1) As Boolean
Dim retorno As Boolean = False Dim retorno As Boolean = False
DataAdapter("PA_Vta_Top20ClientesMasVendidos", CommandType.StoredProcedure) DataAdapter("PA_Vta_Top20ClientesMasVendidos", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Mes", SqlDbType.Int).Value = Mes .Add("@Mes", SqlDbType.Int).Value = Mes
.Add("@Año", SqlDbType.Int).Value = Año .Add("@Año", SqlDbType.Int).Value = Año
.Add("@Top", SqlDbType.Int).Value = Top
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
End With End With
Try Try

View File

@@ -3997,9 +3997,24 @@ Namespace Modelos
Dim CancelarRemisiones As Boolean = ListaRemisionesCancelar IsNot Nothing AndAlso ListaRemisionesCancelar.Count > 0 Dim CancelarRemisiones As Boolean = ListaRemisionesCancelar IsNot Nothing AndAlso ListaRemisionesCancelar.Count > 0
Dim TieneAlmacen As Boolean = False Dim TieneAlmacen As Boolean = False
Dim AplicaRefacturacionConPagos As Boolean = False
'1 NORMAL, 2 CON PAGOS
Dim ModalidadRefacturacion As Integer = UsuarioActual.Empresa.Funcionalidad(586).ToEntero()
If ModalidadRefacturacion <= 0 Then
Retorno.Mensaje = "La factura no se puede refacturar debido a que la empresa no tiene asignada una modalidad de refacturación."
Retorno.TipoMensaje = TipoMensaje.MsgAdvertencia
Return Retorno
End If
If EsRefacturacion AndAlso ModalidadRefacturacion = 2 Then
AplicaRefacturacionConPagos = True
End If
'VALIDA QUE LA FACTURA NO TENGA PAGOS 'VALIDA QUE LA FACTURA NO TENGA PAGOS
If Not EsRefacturacion AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Rem") AndAlso ObjFactura.Pagado > 0 Then If Not AplicaRefacturacionConPagos AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Rem") AndAlso ObjFactura.Pagado > 0 Then
Retorno.Mensaje = "La factura no se puede cancelar debido a que tiene pagos vinculados." Retorno.Mensaje = "La factura no se puede cancelar debido a que tiene pagos vinculados."
Retorno.TipoMensaje = TipoMensaje.MsgAdvertencia Retorno.TipoMensaje = TipoMensaje.MsgAdvertencia
@@ -4023,7 +4038,7 @@ Namespace Modelos
End If End If
'LA VALIDACION DE SALDOS CUANDO ES REFACTURACION SE HACE ANTES ASI QUE SI ES REFACTURACION IGNORAMOS ESTA CONDICION, SI ES ANTICIPO VERIFICA QUE NO ESTÉ APLICADO 'LA VALIDACION DE SALDOS CUANDO ES REFACTURACION SE HACE ANTES ASI QUE SI ES REFACTURACION IGNORAMOS ESTA CONDICION, SI ES ANTICIPO VERIFICA QUE NO ESTÉ APLICADO
If Not EsRefacturacion AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Ant", "Rem") AndAlso ObjFactura.Pagado > 0 AndAlso DTDocumentosRelacionados.Rows.Count > 0 Then If Not AplicaRefacturacionConPagos AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Ant", "Rem") AndAlso ObjFactura.Pagado > 0 AndAlso DTDocumentosRelacionados.Rows.Count > 0 Then
Retorno.Mensaje = "La factura no se puede cancelar debido a que tiene pagos vinculados." Retorno.Mensaje = "La factura no se puede cancelar debido a que tiene pagos vinculados."
Retorno.TipoMensaje = TipoMensaje.MsgAdvertencia Retorno.TipoMensaje = TipoMensaje.MsgAdvertencia
@@ -4283,7 +4298,7 @@ Namespace Modelos
End If End If
'CUANDO LA CANCELACION ESTA EN PROCESO NO DEBE REALIZAR NADA DE ESTE PROCESO 'CUANDO LA CANCELACION ESTA EN PROCESO NO DEBE REALIZAR NADA DE ESTE PROCESO
If Not EsRefacturacion AndAlso ((((ObjFactura.Saldo > 0 AndAlso (CveEstatus > 0 AndAlso CveEstatus <> 20)) OrElse (ObjFactura.Total = 0 AndAlso UsuarioActual.CveEmpresa.Contiene(72) AndAlso ObjFactura.TipoDocto.Contiene("Ing"))) AndAlso CveEstatus.Contiene(4, 5)) OrElse (CvePlantillaPoliza = 7 AndAlso (CveEstatus > 0 AndAlso CveEstatus <> 20))) Then If Not AplicaRefacturacionConPagos AndAlso ((((ObjFactura.Saldo > 0 AndAlso (CveEstatus > 0 AndAlso CveEstatus <> 20)) OrElse (ObjFactura.Total = 0 AndAlso UsuarioActual.CveEmpresa.Contiene(72) AndAlso ObjFactura.TipoDocto.Contiene("Ing"))) AndAlso CveEstatus.Contiene(4, 5)) OrElse (CvePlantillaPoliza = 7 AndAlso (CveEstatus > 0 AndAlso CveEstatus <> 20))) Then
'CUANDO SE CANCELA, LA PÓLIZA DEBE DE SER DE DIARIO 'CUANDO SE CANCELA, LA PÓLIZA DEBE DE SER DE DIARIO
CvePrePoliza = ObjConta.AddPrePolizas("Modelos/CancelarDocumento", CvePlantillaPoliza, ObjFactura.Total, ObjFactura.Total, ObjFactura.CveMoneda, Now, ObjFactura.Cliente.Nombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3) CvePrePoliza = ObjConta.AddPrePolizas("Modelos/CancelarDocumento", CvePlantillaPoliza, ObjFactura.Total, ObjFactura.Total, ObjFactura.CveMoneda, Now, ObjFactura.Cliente.Nombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3)
@@ -4294,16 +4309,8 @@ Namespace Modelos
MensajeError = "Ocurrió un error al generar la prepoliza de cancelación." MensajeError = "Ocurrió un error al generar la prepoliza de cancelación."
End If End If
''CANCELAR PAGOS
'If EsRefacturacion AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Rem", "Ant") AndAlso ObjFactura.Pagado > 0 Then
' If Not ObjVentas.CancelarPagos(ObjFactura.CveVenta, CvePrePoliza) Then
' ErrorCancelar = True
' MensajeError = "Ocurrió un error al generar la cancelación de pagos."
' End If
'End If
'CANCELAR PAGOS 'CANCELAR PAGOS
If Not EsRefacturacion AndAlso ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
If Not ErrorCancelar Then If Not ErrorCancelar Then
If Not ObjConta.PrePolizasCancelarPagos(ObjFactura.CveDevolucion, CvePrePoliza) Then If Not ObjConta.PrePolizasCancelarPagos(ObjFactura.CveDevolucion, CvePrePoliza) Then
ErrorCancelar = True ErrorCancelar = True
@@ -4312,7 +4319,6 @@ Namespace Modelos
End If End If
End If End If
'CANCELA PREPOLIZA 'CANCELA PREPOLIZA
If Not ErrorCancelar Then If Not ErrorCancelar Then
ErrorCancelar = ProcesoPrepolizas(ObjFactura, ObjConta, -1, ObjFactura.DtDetalle, ObjAC, -1, ObjBancos, ObjVentas, ObjEventos, DtRemisionesRelacionadas:=DtRemisionesRelacionadas, SeCancelaRemisionProceso:=SeCancelaRemisionProceso, ErrorCancelar = ProcesoPrepolizas(ObjFactura, ObjConta, -1, ObjFactura.DtDetalle, ObjAC, -1, ObjBancos, ObjVentas, ObjEventos, DtRemisionesRelacionadas:=DtRemisionesRelacionadas, SeCancelaRemisionProceso:=SeCancelaRemisionProceso,

View File

@@ -99,7 +99,7 @@ Namespace Extensiones
' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) ' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10)
strLineaTMP = String.Format("{0}{1}Log: {5}{2}{3}:{4}", Chr(13), Chr(10), Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString, Urlstring) strLineaTMP = String.Format("{0}{1}Log: {5}{2}{3}:{4}", Chr(13), Chr(10), Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString, Urlstring)
Try Try
ArchivoW = New StreamWriter(String.Format("{0}\Log.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) ArchivoW = New StreamWriter(String.Format("{0}\Log\Log.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8)
Catch ex As UnauthorizedAccessException Catch ex As UnauthorizedAccessException
'Alert("No hay permisos para guardar en el Log.", Extensiones.TipoMensaje.MsgError) 'Alert("No hay permisos para guardar en el Log.", Extensiones.TipoMensaje.MsgError)
Exit Sub Exit Sub

View File

@@ -565,17 +565,51 @@ Partial Class Bancos_ProveedoresAbonar
If e.Row.DBCampo("CveCompra").ToEntero > 0 Then If e.Row.DBCampo("CveCompra").ToEntero > 0 Then
Dim FiltroInv As String = "" Dim FiltroInv As String = ""
If UsuarioActual.Empresa.Funcionalidad(134).ToEntero > 0 Then
Dim PorcentajeSaldo = e.Row.DBCampo("ImporteAlmacenPorcentaje").ToString.ToDouble + e.Row.DBCampo("ImporteServiciosPorcentaje").ToString.ToDouble + e.Row.DBCampo("ImporteDevolucionPorcentaje").ToString.ToDouble If UsuarioActual.Empresa.Funcionalidad(134).ToEntero > 0 Then ' valores 1 - permite pago proporcional, valor 2. paga solo si se recibio el 100%
Dim SaldoInv = (e.Row.DBCampo("Saldo").ToString.ToDouble * (PorcentajeSaldo / 100)) 'se bloquean las opciones
e.Row.FCCheckBox("Chk").Enabled = False
e.Row.FCTextBox("TxtAbonar").Enabled = False
Dim Str As New StringBuilder
Str.AppendFormat("Importe Almacen: ${0} ({1}%) <br/>", e.Row.DBCampo("ImporteAlmacen").FormatoNumero, e.Row.DBCampo("ImporteAlmacenPorcentaje"))
If e.Row.DBCampo("ImporteServicios").ToDouble > 0 Then Str.AppendFormat("Importe Servicios: ${0} ({1}%) <br/>", e.Row.DBCampo("ImporteServicios").FormatoNumero, e.Row.DBCampo("ImporteServiciosPorcentaje"))
If e.Row.DBCampo("ImporteDevolucion").ToDouble > 0 Then Str.AppendFormat("Importe Devuelto: ${0} ({1}%) <br/>", e.Row.DBCampo("ImporteDevolucion").FormatoNumero, e.Row.DBCampo("ImporteDevolucionPorcentaje"))
Str.AppendFormat(" <i> Importes <b> SIN</b> IVA</i>")
e.Row.FCLabel("LbEstatusInv").Attributes.Add("title", Str.ToString)
Dim PorcentajeAlmacen As Decimal = e.Row.DBCampo("ImporteAlmacenPorcentaje").ToString.ToDecimal + e.Row.DBCampo("ImporteServiciosPorcentaje").ToString.ToDecimal + e.Row.DBCampo("ImporteDevolucionPorcentaje").ToString.ToDecimal
Dim SaldoInv As Decimal = (e.Row.DBCampo("Saldo").ToString.ToDecimal * (PorcentajeAlmacen / 100))
If UsuarioActual.Empresa.Funcionalidad(134) = "1" Then 'cuando es proporcional If UsuarioActual.Empresa.Funcionalidad(134) = "1" Then 'cuando es proporcional
FiltroInv = $"FnCambia({e.Row.FCCheckBox("Chk").ClientID},this,{SaldoInv},1,'{"El importe no debe exceder lo recibido en almacén"}',1);" FiltroInv = $"FnCambia({e.Row.FCCheckBox("Chk").ClientID},this,{SaldoInv},1,'{"El importe no debe exceder lo recibido en almacén"}',1);"
ElseIf UsuarioActual.Empresa.Funcionalidad(134) = "2" Then ElseIf UsuarioActual.Empresa.Funcionalidad(134) = "2" Then
FiltroInv = "" 'queno considera lo proporcional FiltroInv = "" 'queno considera lo proporcional
End If End If
If PorcentajeAlmacen = 0 Then ' sin recibir
e.Row.FCLabel("LbEstatusInv").Text = "<i Class='fa fa-flag-o' aria-hidden='true'></i>"
e.Row.FCLabel("LbEstatusInv").ForeColor = Drawing.Color.Red
ElseIf PorcentajeAlmacen > 99.0 OrElse e.Row.DBCampo("ImporteAlmacen").ToDecimal >= e.Row.DBCampo("Saldo").ToString.ToDecimal Then 'recibido completo ' si tiene un porcentaje mayor ingresado, que este halla sido por OC, debe de permitirlo
' NOTA. si la factura tiene devoluciones, debera comparar el saldo de la factura con lo recibido en el almacen
e.Row.FCLabel("LbEstatusInv").Text = "<i Class='fa fa-flag' aria-hidden='true'></i>"
e.Row.FCLabel("LbEstatusInv").ForeColor = Drawing.Color.Green
e.Row.FCCheckBox("Chk").Enabled = True
e.Row.FCTextBox("TxtAbonar").Enabled = True
Else ' parcial
e.Row.FCLabel("LbEstatusInv").Text = "<i Class='fa fa-flag-checkered' aria-hidden='true'></i>"
e.Row.FCLabel("LbEstatusInv").ForeColor = Drawing.Color.DarkOrange
If UsuarioActual.Empresa.Funcionalidad(134).ToEntero = 1 Then ' si es la opcion ,de pagar lo proporcional
e.Row.FCCheckBox("Chk").Enabled = True
e.Row.FCTextBox("TxtAbonar").Enabled = True
End If
End If
End If End If
e.Row.FCLiteral("LtlAux").Text = String.Format("<a Class=""Texto thickbox"" href=""/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxPProveedor&CveProveedor={0}&CveCompra={1}&TB_iframe=true&height=370&width=900"" />Ir</a>", e.Row.DBCampo("CveProveedor"), e.Row.DBCampo("CveCompra")) e.Row.FCLiteral("LtlAux").Text = String.Format("<a Class=""Texto thickbox"" href=""/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxPProveedor&CveProveedor={0}&CveCompra={1}&TB_iframe=true&height=370&width=900"" />Ir</a>", e.Row.DBCampo("CveProveedor"), e.Row.DBCampo("CveCompra"))
e.Row.FCTextBox("TxtAbonar").Attributes.Add("onblur", String.Format("FnCambia({0},this,{1},1,'{2}',1);{3}", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"), "El Importe no debe de exceder el saldo", FiltroInv)) e.Row.FCTextBox("TxtAbonar").Attributes.Add("onblur", String.Format("FnCambia({0},this,{1},1,'{2}',1);{3}", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"), "El Importe no debe de exceder el saldo", FiltroInv))
@@ -605,61 +639,18 @@ Partial Class Bancos_ProveedoresAbonar
End If End If
If UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 Or UsuarioActual.Empresa.Funcionalidad(134).ToEntero > 0 Then
Dim Str As New StringBuilder
Str.AppendFormat("Importe Almacen: ${0} ({1}%) <br/>", e.Row.DBCampo("ImporteAlmacen").FormatoNumero, e.Row.DBCampo("ImporteAlmacenPorcentaje"))
If e.Row.DBCampo("ImporteServicios").ToDouble > 0 Then Str.AppendFormat("Importe Servicios: ${0} ({1}%) <br/>", e.Row.DBCampo("ImporteServicios").FormatoNumero, e.Row.DBCampo("ImporteServiciosPorcentaje"))
If e.Row.DBCampo("ImporteDevolucion").ToDouble > 0 Then Str.AppendFormat("Importe Devuelto: ${0} ({1}%) <br/>", e.Row.DBCampo("ImporteDevolucion").FormatoNumero, e.Row.DBCampo("ImporteDevolucionPorcentaje"))
Str.AppendFormat(" <i> Importes <b> SIN</b> IVA</i>")
e.Row.FCLabel("LbEstatusInv").Attributes.Add("title", Str.ToString) 'si está bloqueada y es refacturación, debe de permitirlo, sin importar lo que se halla ingresado
Select Case e.Row.DBCampo("EstatusInventario").ToEntero If e.Row.DBCampo("CveCompraRefacturacion").ToEntero > 0 AndAlso Not e.Row.FCCheckBox("Chk").Enabled Then
Case 1 e.Row.FCCheckBox("Chk").Enabled = True
e.Row.FCLabel("LbEstatusInv").Text = "<i Class='fa fa-flag-o' aria-hidden='true'></i>" e.Row.FCTextBox("TxtAbonar").Enabled = True
e.Row.FCLabel("LbEstatusInv").ForeColor = Drawing.Color.Red End If
If UsuarioActual.Empresa.Funcionalidad(134).ToEntero.Contiene(1, 2) Then ' si se recibió mercancía se paga lo proporcional If UsuarioActual.Empresa.Funcionalidad(306) = "1" And e.Row.DBCampo("AplicaNotaCredito").ToString = "True" Then
If UsuarioActual.CveEmpresa = 72 Then e.Row.FCCheckBox("Chk").Enabled = False
If e.Row.DBCampo("Fecha").ToDate > "12/02/2017".ToDate Then
e.Row.FCCheckBox("Chk").Enabled = False
e.Row.FCTextBox("TxtAbonar").Enabled = False
End If
Else
e.Row.FCCheckBox("Chk").Enabled = False
e.Row.FCTextBox("TxtAbonar").Enabled = False
End If
End If
Case 2
e.Row.FCLabel("LbEstatusInv").Text = "<i Class='fa fa-flag-checkered' aria-hidden='true'></i>"
e.Row.FCLabel("LbEstatusInv").ForeColor = Drawing.Color.DarkOrange
'condición que bloquea que se pueda pagar sin aun es parcial la recepción,
If UsuarioActual.Empresa.Funcionalidad(134).ToEntero = 2 Then
e.Row.FCCheckBox("Chk").Enabled = False
e.Row.FCTextBox("TxtAbonar").Enabled = False
' si tiene un porcentaje mayor ingresado, que este halla sido por OC, debe de permitirlo
If e.Row.DBCampo("ImporteAlmacenPorcentaje").ToDecimal >= 99.0 Then 'si ya se recibió el 100%
e.Row.FCCheckBox("Chk").Enabled = True
e.Row.FCTextBox("TxtAbonar").Enabled = True
End If
End If
Case 3
e.Row.FCLabel("LbEstatusInv").Text = "<i Class='fa fa-flag' aria-hidden='true'></i>"
e.Row.FCLabel("LbEstatusInv").ForeColor = Drawing.Color.Green
Case Else
End Select
'si está bloqueada y es refacturación, debe de permitirlo, sin importar lo que se halla ingresado
If e.Row.DBCampo("CveCompraRefacturacion").ToEntero > 0 AndAlso Not e.Row.FCCheckBox("Chk").Enabled Then
e.Row.FCCheckBox("Chk").Enabled = True
e.Row.FCTextBox("TxtAbonar").Enabled = True
End If
End If End If
End If End If
If UsuarioActual.Empresa.Funcionalidad(306) = "1" And e.Row.DBCampo("AplicaNotaCredito").ToString = "True" Then
e.Row.FCCheckBox("Chk").Enabled = False
End If
End If End If
End Sub End Sub
@@ -2017,7 +2008,7 @@ Partial Class Bancos_ProveedoresAbonar
End If End If
End If End If
If MsgError <> "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then
If ObjMov.ValorPolizaDescuadre > 0 Then If ObjMov.ValorPolizaDescuadre > 0 Then
MsgError = ObjMov.MensajePolizaDescuadre + " " + ObjMov.ValorDiferencia MsgError = ObjMov.MensajePolizaDescuadre + " " + ObjMov.ValorDiferencia
GuardaLogAD($"Bancos/ProveedoresAbonar | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") GuardaLogAD($"Bancos/ProveedoresAbonar | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
@@ -2957,6 +2948,7 @@ Partial Class Bancos_ProveedoresAbonar
Dim TCPago As Decimal = GlobalTipoCambio(TxtFechaIncobrable.Text.ToDate).ToDecimal Dim TCPago As Decimal = GlobalTipoCambio(TxtFechaIncobrable.Text.ToDate).ToDecimal
Dim CveMoneda As Integer = gr.DataKey("CveMoneda").ToEntero Dim CveMoneda As Integer = gr.DataKey("CveMoneda").ToEntero
Dim FechaCompra As Date = gr.DataKey("Fecha").ToDate Dim FechaCompra As Date = gr.DataKey("Fecha").ToDate
Dim CveSubProyecto As Integer = gr.DataKey("CveSubProyecto").ToEntero
Dim CveConceptoContablePago As Integer = 17 Dim CveConceptoContablePago As Integer = 17
If gr.DataKey("CveTipoConcepto").ToEntero = 2 Then CveConceptoContablePago = 308 'cuando es acreedor If gr.DataKey("CveTipoConcepto").ToEntero = 2 Then CveConceptoContablePago = 308 'cuando es acreedor
@@ -3004,7 +2996,7 @@ Partial Class Bancos_ProveedoresAbonar
Dim PorcentajePago As Decimal = gr.DataKey("Saldo").ToDecimal / gr.DataKey("Original").ToDecimal Dim PorcentajePago As Decimal = gr.DataKey("Saldo").ToDecimal / gr.DataKey("Original").ToDecimal
If gr.DataKey("IVA").ToDecimal > 0 Then If MsgError = "" AndAlso gr.DataKey("IVA").ToDecimal > 0 Then
Dim PorcentajeImpuesto As Decimal = gr.DataKey("PorcentajeIVA").ToDecimal Dim PorcentajeImpuesto As Decimal = gr.DataKey("PorcentajeIVA").ToDecimal
Dim IdCtaIVAXAcreditar As Integer = 0 Dim IdCtaIVAXAcreditar As Integer = 0
Dim IdCtaIVAAcreditable As Integer = 0 Dim IdCtaIVAAcreditable As Integer = 0
@@ -3024,7 +3016,7 @@ Partial Class Bancos_ProveedoresAbonar
End If End If
If gr.DataKey("IEPS").ToDecimal > 0 Then If MsgError = "" AndAlso gr.DataKey("IEPS").ToDecimal > 0 Then
Dim IEPS As Decimal = PorcentajePago * gr.DataKey("IEPS").ToDecimal Dim IEPS As Decimal = PorcentajePago * gr.DataKey("IEPS").ToDecimal
If ObjConta.GetRetCuenta(25, UsuarioActual.CveEmpresa) Then If ObjConta.GetRetCuenta(25, UsuarioActual.CveEmpresa) Then
@@ -3043,7 +3035,7 @@ Partial Class Bancos_ProveedoresAbonar
End If End If
' se manda al ot ingresos, los impuestos por acreditar ' se manda al ot ingresos, los impuestos por acreditar
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Saldo, gr.DataKey("SerieFolio").ToString, 78, ConceptoPartida, Now, IdCtaContable:=UsuarioActual.Empresa.IdCuentaOtrosIngresos, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=If(CveMoneda = 1, Saldo, Saldo * TCPago), TipoCambio:=TCCompra, TipoCambioPago:=TCPago, CveCuenta:=-1) Then If MsgError = "" AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Saldo, gr.DataKey("SerieFolio").ToString, 78, ConceptoPartida, Now, IdCtaContable:=UsuarioActual.Empresa.IdCuentaOtrosIngresos, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=If(CveMoneda = 1, Saldo, Saldo * TCPago), TipoCambio:=TCCompra, TipoCambioPago:=TCPago, CveCuenta:=-1, CveSubProyecto:=CveSubProyecto) Then
MsgError = "Ocurrio un error al saldar el movimiento" MsgError = "Ocurrio un error al saldar el movimiento"
End If End If
@@ -3064,7 +3056,7 @@ Partial Class Bancos_ProveedoresAbonar
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then If MsgError = "" AndAlso ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then
If ObjConta.ValorPolizaDescuadre > 0 Then If ObjConta.ValorPolizaDescuadre > 0 Then
MsgError = ObjConta.MensajePolizaDescuadre + " " + ObjConta.ValorDiferencia MsgError = ObjConta.MensajePolizaDescuadre + " " + ObjConta.ValorDiferencia
GuardaLogAD($"Bancos/ProveedoresAbonar | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") GuardaLogAD($"Bancos/ProveedoresAbonar | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")

View File

@@ -5,13 +5,13 @@
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server"> <asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Catálogo de Empresas CRM Catálogo de Prospectos
</asp:Content> </asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server"> <asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<li> <li>
<asp:HyperLink ID="LnkAgregar" NavigateUrl="/CRM/EmpresaCRM.aspx" runat="server" Target="_blank"><i class="fa fa-plus"></i><span style="padding-left:5px;">Agregar Empresa</span></asp:HyperLink> <asp:HyperLink ID="LnkAgregar" NavigateUrl="/CRM/EmpresaCRM.aspx" runat="server" Target="_blank"><i class="fa fa-plus"></i><span style="padding-left:5px;">Agregar Prospecto</span></asp:HyperLink>
</li> </li>
</asp:Content> </asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server"> <asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
@@ -48,7 +48,7 @@
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" /> <input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a> <a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div> </div>
<asp:GridView ID="GVDatos" runat="server" DataKeyNames="CveEmpresaCRM, Empresa, RFC, CveMedioCaptacion, MedioCaptacion, CveVendedorAsignado, Vendedor, NoContactos, NoAcercamientos, CveUsuarioIng, UsuarioIng, FechaIng" EmptyDataText="No se han registrado de Empresas" <asp:GridView ID="GVDatos" runat="server" DataKeyNames="CveEmpresaCRM, Empresa, RFC, CveMedioCaptacion, MedioCaptacion, CveVendedorAsignado, Vendedor, NoContactos, NoAcercamientos, CveUsuarioIng, UsuarioIng, FechaIng" EmptyDataText="No se han registrado de Prospectos"
EmptyDataRowStyle-HorizontalAlign="Center" CssClass="table table-striped table-advance table-hover ScrollAD Widthall mysmallbtn" data-sort="true" EmptyDataRowStyle-HorizontalAlign="Center" CssClass="table table-striped table-advance table-hover ScrollAD Widthall mysmallbtn" data-sort="true"
GridLines="None" AutoGenerateColumns="false" OnRowDeleting="GVDatos_RowDeleting" OnRowDataBound="GVDatos_RowDataBound"> GridLines="None" AutoGenerateColumns="false" OnRowDeleting="GVDatos_RowDeleting" OnRowDataBound="GVDatos_RowDataBound">
<Columns> <Columns>

View File

@@ -28,7 +28,7 @@
</tr> </tr>
<tr align="left" visible="true"> <tr align="left" visible="true">
<td class="text-right" style="width: 140px;"><b>Empresa CRM:</b></td> <td class="text-right" style="width: 140px;"><b>Prospecto:</b></td>
<td> <td>
<asp:DropDownList ID="DdlEmpresaCRM" runat="server" AppendDataBoundItems="true" DataTextField="Empresa" DataValueField="CveEmpresaCRM" Class="table-group-action-input form-control input-inline input-sm select2me" Width="200px"></asp:DropDownList> <asp:DropDownList ID="DdlEmpresaCRM" runat="server" AppendDataBoundItems="true" DataTextField="Empresa" DataValueField="CveEmpresaCRM" Class="table-group-action-input form-control input-inline input-sm select2me" Width="200px"></asp:DropDownList>
</td> </td>

View File

@@ -3108,21 +3108,31 @@
<asp:Label ID="Label7" runat="server" ClientIDMode="Static" Text="Refacturación"></asp:Label></h4> <asp:Label ID="Label7" runat="server" ClientIDMode="Static" Text="Refacturación"></asp:Label></h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table width="100%"> <table width="100%">
<tr> <tr>
<td width="80px">Factura:</td> <td width="80px">Factura:</td>
<td> <td>
<asp:DropDownList runat="server" Width="100%" CssClass="form-control input-sm select2me" ID="DdlRefacturacionFacturas" DataTextField="SerieFolio" DataValueField="CveCompra" ValidationGroup="GrpVinculaFactura"></asp:DropDownList>
<asp:DropDownList runat="server" Width="100%" CssClass="form-control input-sm select2me" ID="DdlRefacturacionFacturas" DataTextField="SerieFolio" DataValueField="CveCompra" ValidationGroup="GrpVinculaFactura" AutoPostBack ="true"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVRefacturacion" runat="server" ControlToValidate="DdlRefacturacionFacturas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Factura''</b> es necesario para cargar la Refacturación, por favor seleccione uno." ValidationGroup="GrpVinculaFactura"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVRefacturacion" runat="server" ControlToValidate="DdlRefacturacionFacturas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Factura''</b> es necesario para cargar la Refacturación, por favor seleccione uno." ValidationGroup="GrpVinculaFactura"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCERefacturacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVRefacturacion" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCERefacturacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVRefacturacion" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</td>
</tr> </tr>
<tr> <tr>
<td width="120px">Refacturar X NC:</td> <td width="120px">Refacturar X NC:</td>
<td> <td>
<asp:CheckBox ID="ChkRefacNC" runat="server" /> <asp:CheckBox ID="ChkRefacNC" runat="server" />
</td> </td>
</tr>
<tr>
<td width="120px"></td>
<td>
<asp:CheckBox ID="ChkRefacturacionConAlmacen" Enabled="false" runat="server" Text="Con Almacen" />
<asp:HiddenField ID="HdnRefacturacionConcepto" runat="server" />
</td>
</tr> </tr>
<tr> <tr>
<td colspan="2" align="center"> <td colspan="2" align="center">
@@ -3135,6 +3145,9 @@
</td> </td>
</tr> </tr>
</table> </table>
</ContentTemplate>
</asp:UpdatePanel>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button id="CancelarDevolucionF" type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button> <button id="CancelarDevolucionF" type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>

View File

@@ -4335,7 +4335,7 @@ Partial Class Compras_Compras
Try Try
Dim FolioFijo As Integer = 0 Dim FolioFijo As Integer = 0
'cheque 'cheque
If DdlTipoTransaccion.SelectedValue = "1" Then FolioFijo = TxtFolio.Text.ToEntero If DdlTipoTransaccion.SelectedValue = "1" Then FolioFijo = TxtFolio.Text.ToEntero
CvePrePoliza = ObjConta.AddPrePolizas("Compras/Registrar", If(EsContado And CvePlantillaPrePoliza = 1, 2, CvePlantillaPrePoliza), ImporteCompra, TxtTotal.Text.ToDouble, DdlMoneda.SelectedValue.ToEntero, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjCompras.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjConta.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa)) CvePrePoliza = ObjConta.AddPrePolizas("Compras/Registrar", If(EsContado And CvePlantillaPrePoliza = 1, 2, CvePlantillaPrePoliza), ImporteCompra, TxtTotal.Text.ToDouble, DdlMoneda.SelectedValue.ToEntero, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjCompras.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjConta.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa))
@@ -4448,6 +4448,8 @@ Partial Class Compras_Compras
CveConceptoContableAlmacen = DdlOCVinculaInv.SelectedValue.ToEntero CveConceptoContableAlmacen = DdlOCVinculaInv.SelectedValue.ToEntero
ElseIf (CveImportacion > 0 Or CveFlete > 0) AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then ElseIf (CveImportacion > 0 Or CveFlete > 0) AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
CveConceptoContableAlmacen = CveConceptoContableAlmacen CveConceptoContableAlmacen = CveConceptoContableAlmacen
ElseIf CveCompraRefacturacion > 0 AndAlso ChkRefacNC.Checked Then ' cuando es refacturacion, tomara del concepto anterior
CveConceptoContableAlmacen = HdnRefacturacionConcepto.Value.ToEntero
End If End If
End If End If
@@ -6070,7 +6072,7 @@ Partial Class Compras_Compras
End If End If
End If End If
Case 186 'RetIVA Acreditable Fletes P.M. Case 186 'RetIVA Acreditable Fletes P.M.
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") AndAlso TxtRetIVA.Text.ToDecimal > 0 Then
If DdlRetIVAConcepto.Items.Count > 0 Then If DdlRetIVAConcepto.Items.Count > 0 Then
If DdlRetIVAConcepto.SelectedValue.ToEntero = 3 Then If DdlRetIVAConcepto.SelectedValue.ToEntero = 3 Then
importeMovimiento = importeRetIVAAcreditable importeMovimiento = importeRetIVAAcreditable
@@ -6101,7 +6103,7 @@ Partial Class Compras_Compras
End If End If
End If End If
Case 185 'RetIVA X Acreditar Fletes P.M. Case 185 'RetIVA X Acreditar Fletes P.M.
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") AndAlso TxtRetIVA.Text.ToDecimal > 0 Then
If DdlRetIVAConcepto.Items.Count > 0 Then If DdlRetIVAConcepto.Items.Count > 0 Then
If DdlRetIVAConcepto.SelectedValue.ToEntero = 3 Then If DdlRetIVAConcepto.SelectedValue.ToEntero = 3 Then
importeMovimiento = importeRetIVAxAcreditar importeMovimiento = importeRetIVAxAcreditar
@@ -6124,7 +6126,7 @@ Partial Class Compras_Compras
End If End If
End If End If
Case 249 'RetIVA Acreditable Arrendamiento Case 249 'RetIVA Acreditable Arrendamiento
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") AndAlso TxtRetIVA.Text.ToDecimal > 0 Then
If DdlRetIVAConcepto.Items.Count > 0 AndAlso DdlRetIVAConcepto.SelectedValue.ToEntero = 4 Then If DdlRetIVAConcepto.Items.Count > 0 AndAlso DdlRetIVAConcepto.SelectedValue.ToEntero = 4 Then
importeMovimiento = importeRetIVAAcreditable importeMovimiento = importeRetIVAAcreditable
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
@@ -6246,7 +6248,7 @@ Partial Class Compras_Compras
' End If ' End If
' End If ' End If
Case 64 'Ganancia Case 64 'Ganancia
If TCPago <> 1 AndAlso TxtFechaPago.Text <> TxtFecha.Text Then If TCPago > 0 AndAlso TCPago <> 1 AndAlso TxtFechaPago.Text <> TxtFecha.Text Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
If TCPago < TipoCambioCompra Then If TCPago < TipoCambioCompra Then
@@ -6262,7 +6264,7 @@ Partial Class Compras_Compras
Case 65 'Perdida Case 65 'Perdida
If TCPago <> 1 AndAlso TxtFechaPago.Text <> TxtFecha.Text Then If TCPago > 0 AndAlso TCPago <> 1 AndAlso TxtFechaPago.Text <> TxtFecha.Text Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
If TCPago < TipoCambioCompra Then If TCPago < TipoCambioCompra Then
@@ -6309,7 +6311,7 @@ Partial Class Compras_Compras
Exit Select 'Es credito el concepto 6 se agrega en CASE 17 Exit Select 'Es credito el concepto 6 se agrega en CASE 17
End If End If
If Not CveCompraRefacturacion > 0 OrElse ChkRefacNC.Checked Then If Not CveCompraRefacturacion > 0 OrElse (ChkRefacNC.Checked) Then
'AF TipoAF 2 Es para las compras 'AF TipoAF 2 Es para las compras
DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) = 2 And ISNULL(AplicaCostoIndirecto,0) <> 1") DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) = 2 And ISNULL(AplicaCostoIndirecto,0) <> 1")
If DT.Rows.Count > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then If DT.Rows.Count > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
@@ -6380,6 +6382,8 @@ Partial Class Compras_Compras
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True ErrorPrepoliza = True
End If End If
' si agrego en almacen, ya no se ocupa algun concepto puente
AgregaMercanciaInventario = False
End If End If
Next Next
End If End If
@@ -6419,6 +6423,8 @@ Partial Class Compras_Compras
Case 205 Case 205
ConceptoContabilizacionME = 230 ConceptoContabilizacionME = 230
ConceptoContabilizacionMEComp = 231 ConceptoContabilizacionMEComp = 231
importeMovimiento = TmpDT.SUMD(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total"))
importeMN = importeMovimiento * tipoCambioActual * Multiplicador 'TIENE QUE TENER EL IMPORTEMN IGUAL AL IMPORTEMOVIMIENTO PORQUE NO TOMA EN CUENTA SI UN PRODUCTO ES TIPO SERVICIO
Case 237 Case 237
ConceptoContabilizacionME = 238 ConceptoContabilizacionME = 238
ConceptoContabilizacionMEComp = 239 ConceptoContabilizacionMEComp = 239
@@ -6611,7 +6617,7 @@ Partial Class Compras_Compras
DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) = 0 And ISNULL(AplicaCostoIndirecto,0) <> 1", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto"}) DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) = 0 And ISNULL(AplicaCostoIndirecto,0) <> 1", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto"})
End If End If
'RMF, si es concepto relacionado a flete o importacion, no debe de afectar al gasto 'RMF, si es concepto relacionado a flete o importacion, no debe de afectar al gasto
If CveFlete > 0 OrElse CveImportacion > 0 Then If CveFlete > 0 OrElse CveImportacion > 0 OrElse (CveCompraRefacturacion > 0 AndAlso ChkRefacNC.Checked) Then
DTDistinct.Clear() DTDistinct.Clear()
End If End If
@@ -14034,6 +14040,21 @@ Partial Class Compras_Compras
UpRefacturacion.Update() UpRefacturacion.Update()
End Sub End Sub
Private Sub DdlRefacturacionFacturas_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlRefacturacionFacturas.SelectedIndexChanged
If DdlRefacturacionFacturas.SelectedValue.ToEntero > 0 Then
Dim dr As DataRow = DtRefacturacion.FiltroPrimero(String.Format("CveCompra ={0}", DdlRefacturacionFacturas.SelectedValue))
If dr IsNot Nothing Then
HdnRefacturacionConcepto.Value = dr("CveConceptoContableAlmacen").ToString
ChkRefacturacionConAlmacen.Checked = If(dr("CveMovimientoAlmacen").ToString.ToEntero > 0, True, False)
End If
End If
End Sub
Protected Sub BtnRefacturacionAplicaFactura_Click(sender As Object, e As EventArgs) Handles BtnRefacturacionAplicaFactura.Click Protected Sub BtnRefacturacionAplicaFactura_Click(sender As Object, e As EventArgs) Handles BtnRefacturacionAplicaFactura.Click
TxtDescripcion.Text = String.Format("Refacturacion: {0}", DtRefacturacion.Rows(DdlRefacturacionFacturas.SelectedIndex - 1)("Descripcion")) TxtDescripcion.Text = String.Format("Refacturacion: {0}", DtRefacturacion.Rows(DdlRefacturacionFacturas.SelectedIndex - 1)("Descripcion"))
TxtFechaPago.Text = DtRefacturacion.Rows(DdlRefacturacionFacturas.SelectedIndex - 1)("FechaVencimiento").ToString.ToDate.ToShortDateString TxtFechaPago.Text = DtRefacturacion.Rows(DdlRefacturacionFacturas.SelectedIndex - 1)("FechaVencimiento").ToString.ToDate.ToShortDateString
@@ -14838,6 +14859,10 @@ Partial Class Compras_Compras
End If End If
End If End If
If DTOCGV.MAX("IVAPorcentaje").ToDecimal <> TmpDT.MAX("IVAPorcentaje").ToDecimal Then
Alert("La orden de compra(s) tiene diferentes tasa de IVA.", TipoMensaje.MsgAdvertencia)
End If
If DTOCGV.Rows.Count = 0 Then If DTOCGV.Rows.Count = 0 Then
Alert("La orden de compra no tiene nada pendiente por vincular. En caso de ser Entrega Directa por favor verifique el estatus de facturación.", TipoMensaje.MsgAdvertencia) Alert("La orden de compra no tiene nada pendiente por vincular. En caso de ser Entrega Directa por favor verifique el estatus de facturación.", TipoMensaje.MsgAdvertencia)
End If End If

View File

@@ -317,7 +317,7 @@ public partial class Contabilidad_ContabilizacionCompras : ClsPaginas
int cvecuenta = e.Row.DataKey("CveCuenta").ToString().ToEntero(); int cvecuenta = e.Row.DataKey("CveCuenta").ToString().ToEntero();
int CveConcepto = e.Row.DBCampo("CveConceptoContable").ToEntero(); int CveConcepto = e.Row.DBCampo("CveConceptoContable").ToEntero();
if (CveConcepto.Contiene(5, 6, 14, 16, 17, 19, 206, 22, 23, 25, 26, 18, 60, 183, 184, 185, 186 ,205, 240, 243, 244, 248, 249,15,22,248,249,237)) if (CveConcepto.Contiene(5, 6, 14, 16, 17, 19, 206, 22, 23, 25, 26, 18, 60, 183, 184, 185, 186 ,205, 240, 243, 244, 248, 249,15,22,248,249,237,312))
{ {
e.Row.FCHyperLink("HplC").NavigateUrl = string.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DBCampo("CveCompra")); e.Row.FCHyperLink("HplC").NavigateUrl = string.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DBCampo("CveCompra"));
} }

View File

@@ -5,6 +5,54 @@
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server"> <asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" /> <link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
<style> <style>
.btnopaco {
background-color: rgba(0,0,0,0.2);
color: #FFF;
}
.btnopaco:hover {
background-color: rgba(0,0,0,0.4);
color: #FFF;
font-weight: bold;
}
.select2 .select2-selection__rendered {
line-height: 1;
color: #111;
}
.select2 .select2-selection--multiple {
box-sizing: border-box;
cursor: pointer;
display: block;
min-height: 20px;
user-select: none;
-webkit-user-select: none;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
margin-top: 10px;
}
.select2-selection__rendered {
margin-top: 0px;
height: 25px;
}
.select2-selection {
margin-top: 0px;
height: 31px;
}
.select2-container--default.select2-container--focus .select2-selection--multiple {
border: none;
outline: 0;
}
#chartdiv {
width: 100%;
height: 700px;
}
</style> </style>
</asp:Content> </asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="HA" runat="Server"> <asp:Content ID="Content8" ContentPlaceHolderID="HA" runat="Server">
@@ -13,6 +61,13 @@
<li> <li>
<asp:LinkButton ID="ImgImprimir" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton> <asp:LinkButton ID="ImgImprimir" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
</li> </li>
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server"><i class="fa fa-signal"></i> Ver Grafica</asp:LinkButton>
</li>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content> </asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server"> <asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Reporte de Top de Ventas por Cliente Reporte de Top de Ventas por Cliente
@@ -53,11 +108,16 @@
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<label class="col-md-1 ">Grupo:</label> <label class="col-md-1 ">Sucursal:</label>
<div class="col-md-2"> <div class="col-md-1">
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me"> <asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<label class="col-md-1 " style="margin-left: 40px">Top:</label>
<div class="col-md-1">
<asp:TextBox runat="server" ID="TxtTop" CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 50%"></asp:TextBox>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -67,17 +127,81 @@
</asp:UpdatePanel> </asp:UpdatePanel>
<asp:UpdatePanel ID="UppGrid" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UppGrid" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvM" runat="server" GridLines="none" CssClass="table table-striped table-advance table-hover" Style="margin-top: 10px; text-align: center; width: 100%" ShowHeader="False" EmptyDataText="Aún no hay registros." <asp:GridView ID="GvM" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCliente,NombreComercial,ImporteAcumulado" EmptyDataText="No se encontraron Motivo de Baja Registrados"
DataKeyNames="NombreComercial,ImporteAcumulado" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" ShowHeaderWhenEmpty="True"> ToolTip="Listado de Top de Clientes" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style="text-align: center; width: 100%" GridLines="None">
<Columns> <Columns>
<asp:BoundField HeaderText="Cliente" DataField="NombreComercial" ItemStyle-HorizontalAlign="Left" /> <asp:HyperLinkField DataTextField='NombreComercial' HeaderText="Cliente" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" DataNavigateUrlFields="CveCliente" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Importe" DataField="ImporteAcumulado" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Importe" DataField="ImporteAcumulado" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:C2}" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<div id="DivModalGrafica" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UPModalProd" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">
<asp:Label ID="LblTituloGrafica" runat="server" ClientIDMode="Static" Text=""></asp:Label>
</h4>
</div>
<div class="modal-body">
<br />
<div id="chartdiv"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</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="//www.amcharts.com/lib/4/core.js"></script>
<script src="//www.amcharts.com/lib/4/charts.js"></script>
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
<script src="https://www.amcharts.com/lib/3/pie.js"></script>
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
<script> <script>
function CargaGraficaBarras(data) {
var chart = am4core.createFromConfig({
"data": data,
"xAxes": [{
"type": "CategoryAxis",
"dataFields": {
"category": "Cliente"
},
"renderer": {
"minGridDistance":10,
"labels": {
"rotation": 90,
"verticalCenter": "middle",
"horizontalCenter": "left",
"truncate": true,
"maxWidth": 200
}
}
}],
"yAxes": [{
"type": "ValueAxis"
}],
"series": [{
"type": "ColumnSeries",
"dataFields": {
"valueY": "Importe",
"categoryX": "Cliente"
}
}]
}, "chartdiv", am4charts.XYChart);
</script> </script>
</asp:Content> </asp:Content>

View File

@@ -9,6 +9,15 @@ Imports Microsoft.Reporting.WebForms
Partial Class Ventas_RepTopClientesVentas Partial Class Ventas_RepTopClientesVentas
Inherits ClsPaginas Inherits ClsPaginas
Private Property DtClientes As DataTable
Get
Return DirectCast(ViewState("DtClientes"), DataTable)
End Get
Set(value As DataTable)
ViewState("DtClientes") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
CargarFiltros() CargarFiltros()
@@ -47,12 +56,16 @@ Partial Class Ventas_RepTopClientesVentas
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa) DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
DdlSubProyecto.DataBind() DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1")) DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
TxtTop.Text = "20"
End Sub End Sub
Private Sub CargaDatos() Private Sub CargaDatos()
Dim ObjVentas As New ClsVentas Dim ObjVentas As New ClsVentas
If ObjVentas.GetRepTopClientesVentas(UsuarioActual.CveEmpresa, DdlMes.SelectedValue.ToEntero, DdlAño.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero) Then If ObjVentas.GetRepTopClientesVentas(UsuarioActual.CveEmpresa, DdlMes.SelectedValue.ToEntero, DdlAño.SelectedValue.ToEntero, TxtTop.Text.ToEntero,
DdlSubProyecto.SelectedValue.ToEntero) Then
GvM.DataSource = ObjVentas.DtResultados GvM.DataSource = ObjVentas.DtResultados
DtClientes = ObjVentas.DtResultados
End If End If
ObjVentas.Dispose() ObjVentas.Dispose()
GvM.DataBind() GvM.DataBind()
@@ -62,4 +75,50 @@ Partial Class Ventas_RepTopClientesVentas
CargaDatos() CargaDatos()
UppGrid.Update() UppGrid.Update()
End Sub End Sub
Protected Sub ImgImprimir_Click(sender As Object, e As EventArgs) Handles ImgImprimir.Click
Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString))
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
If Imagen.Exists Then
params.Add(New ReportParameter("pImg", logouri))
Else
params.Add(New ReportParameter("pImg", ""))
End If
ImprimirPDF("Empresas/Grales/Formatos/TopClientes.rdlc", DtClientes, params, String.Format("ReporteVentas-{0}", Now.ToDateTime.ToShortDateString), Formato:="PDF")
End Sub
Protected Sub LnkVerGrafica_Click(sender As Object, e As EventArgs)
If Not DtClientes IsNot Nothing AndAlso DtClientes.Rows.Count > 0 Then
Alert("No hay datos disponibles", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
LblTituloGrafica.Text = $"Agrupado por: Clientes"
RegistraScript("$('#DivModalGrafica').modal('show')")
CambioGrafica()
End Sub
Private Sub CambioGrafica()
Dim Dt As New DataTable()
Dt.Columns.Add("Cliente")
Dt.Columns.Add("Importe")
For Each Dr As DataRow In DtClientes.Rows
Dim Row As DataRow = Nothing
Row = Dt.NewRow()
Row("Cliente") = Dr("NombreComercial").ToString
Row("Importe") = Dr("ImporteAcumulado").ToString.FormatoNumero
Dt.Rows.Add(Row)
Next
Dim query = From s In Dt.AsEnumerable() Select New With {.Cliente = s("Cliente").ToString(), .Importe = s("Importe").ToString().ToDouble()}
Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(query)
RegistraScript($"CargaGraficaBarras({json})", "22")
UPModalProd.Update()
End Sub
End Class End Class

View File

@@ -6207,6 +6207,11 @@
</h4> </h4>
</div> </div>
</div> </div>
<div class="row">
<div class="col-md-12">
<asp:Label ID="LbCancelarDescripcion" runat="server"></asp:Label>
</div>
</div>
<div id="DivCanRem" runat="server" visible="false"> <div id="DivCanRem" runat="server" visible="false">
<h5> <h5>
<asp:CheckBox ID="ChkCanRem" runat="server" AutoPostBack="true" OnCheckedChanged="ChkCanRem_CheckedChanged" /><asp:Label ID="LblChkCanRem" Text="Cancelar la Remisión" runat="server"></asp:Label> <asp:CheckBox ID="ChkCanRem" runat="server" AutoPostBack="true" OnCheckedChanged="ChkCanRem_CheckedChanged" /><asp:Label ID="LblChkCanRem" Text="Cancelar la Remisión" runat="server"></asp:Label>
@@ -6228,7 +6233,7 @@
</div> </div>
<div id="DivDevAlm" runat="server" class="row" visible="false"> <div id="DivDevAlm" runat="server" class="row" visible="false">
<h5> <h5>
<asp:CheckBox ID="ChkDevAlm" runat="server" /><asp:Label ID="LblDevAlm" Text="Devolución Almacen" runat="server"></asp:Label> <asp:CheckBox ID="ChkDevAlm" AutoPostBack="true" runat="server" OnCheckedChanged="ChkDevAlm_CheckedChanged" /><asp:Label ID="LblDevAlm" Text="Devolución Almacen" runat="server"></asp:Label>
</h5> </h5>
</div> </div>
</div> </div>

View File

@@ -10930,8 +10930,10 @@ Partial Class Ventas
End If End If
'TRASPASA PAGADO (ObjFacturaNC.Pagado > 0) AndAlso Dim ModalidadRefacturacion As Integer = UsuarioActual.Empresa.Funcionalidad(586).ToEntero()
If ObjFactura.TipoDocto.Contiene("Ing", "Ant") AndAlso ObjFactura.NuevaFactura = 1 Then
'REFACTURACION CON PAGOS, DEBE CANCELAR SALDOS DEL DOCUMENTO ANTERIOR Y TRASPASAR PAGOS AL NUEVO
If ModalidadRefacturacion = 2 AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Ant") AndAlso ObjFactura.NuevaFactura = 1 Then
If Not ObjConta.TraspasarSaldosPrePolizasRefacturacion(ObjFacturaNC.CveVenta, ObjFactura.CveVenta, ObjFactura.CvePrePoliza, CvePlantilaPoliza, UsuarioActual.CveEmpresa) Then If Not ObjConta.TraspasarSaldosPrePolizasRefacturacion(ObjFacturaNC.CveVenta, ObjFactura.CveVenta, ObjFactura.CvePrePoliza, CvePlantilaPoliza, UsuarioActual.CveEmpresa) Then
ErrorList.Add("Ocurrió un error al agregar la bitacora de Póliza Virtual.") ErrorList.Add("Ocurrió un error al agregar la bitacora de Póliza Virtual.")
End If End If
@@ -16829,7 +16831,6 @@ Partial Class Ventas
Private Sub BtnNuevaFactura_Click(sender As Object, e As EventArgs) Handles LkRefacturacion.Click Private Sub BtnNuevaFactura_Click(sender As Object, e As EventArgs) Handles LkRefacturacion.Click
'Nos vamos a la nueva factura 'Nos vamos a la nueva factura
Dim script As String = "" Dim script As String = ""
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Dev", "Egs") Then If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Dev", "Egs") Then
Dim sb As New StringBuilder() Dim sb As New StringBuilder()
@@ -18983,6 +18984,24 @@ Partial Class Ventas
End If End If
End Sub End Sub
Private Sub MostrarCondicionesCancelacion()
Dim SbCondiciones As New StringBuilder()
If VentaSaldoAlmacen < 0 AndAlso ChkDevAlm.Checked Then
SbCondiciones.Append("<b>*Se realizará una devolución en automatico al realizar la cancelación.</b>")
End If
If GvRemisiones.Rows.Count > 0 AndAlso Not DivCanRem.Visible AndAlso Not AplicaCancelarRemision Then
SbCondiciones.Append("<br><br><b>*No se puede cancelar las remisiones ligadas a la factura, esto puede deberse por los siguientes motivo:</b>")
SbCondiciones.Append("<br><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-La remisión no está facturada al 100%.</b>")
SbCondiciones.Append("<br><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-La remisión está relacionada con otra factura.</b>")
End If
LbCancelarDescripcion.Text = SbCondiciones.ToString()
UpCancelarDocumento.Update()
End Sub
Private Sub LbCancelarDocumento_Click(sender As Object, e As EventArgs) Handles LbCancelarDocumento.Click Private Sub LbCancelarDocumento_Click(sender As Object, e As EventArgs) Handles LbCancelarDocumento.Click
'If VentaSaldoAlmacen <> 0 Then 'If VentaSaldoAlmacen <> 0 Then
@@ -19020,6 +19039,7 @@ Partial Class Ventas
sb.Append("Está seguro de cancelar el documento?.") sb.Append("Está seguro de cancelar el documento?.")
LblCancelarDocumento.Text = sb.ToString() LblCancelarDocumento.Text = sb.ToString()
MostrarCondicionesCancelacion()
RegistraScript("$('#ModalCancelarDocumento').modal();") RegistraScript("$('#ModalCancelarDocumento').modal();")
UpCancelarDocumento.Update() UpCancelarDocumento.Update()
@@ -19029,6 +19049,9 @@ Partial Class Ventas
End If End If
End Sub End Sub
Protected Sub ChkDevAlm_CheckedChanged(sender As Object, e As EventArgs)
MostrarCondicionesCancelacion()
End Sub
Protected Sub BtnCancelarDocumento_Click(sender As Object, e As EventArgs) Protected Sub BtnCancelarDocumento_Click(sender As Object, e As EventArgs)
CancelarDocumento() CancelarDocumento()
RegistraScript("$('#ModalCancelarDocumento').modal('hide');") RegistraScript("$('#ModalCancelarDocumento').modal('hide');")
@@ -23427,7 +23450,7 @@ Partial Class Ventas
Else Else
DivGvCancelarRemision.Visible = False DivGvCancelarRemision.Visible = False
End If End If
UpCancelarDocumento.Update() MostrarCondicionesCancelacion()
End Sub End Sub
Private Sub LnkRemisiones_Click(sender As Object, e As EventArgs) Handles LnkRemisiones.Click Private Sub LnkRemisiones_Click(sender As Object, e As EventArgs) Handles LnkRemisiones.Click
Dim ObjContratos As New ClsContratos Dim ObjContratos As New ClsContratos
@@ -24532,7 +24555,7 @@ Partial Class Ventas
Dim CveEstatusAutorizacion As Integer = RowVenta("CveEstatusFactura").ToString().ToEntero() Dim CveEstatusAutorizacion As Integer = RowVenta("CveEstatusFactura").ToString().ToEntero()
'SI LA AUTORIZACION ESTA REMISIONADA NO DEBE REMISIONAR DE NUEVO 'SI LA AUTORIZACION ESTA REMISIONADA NO DEBE REMISIONAR DE NUEVO
If CveEstatusAutorizacion = 18 Then If CveEstatusAutorizacion = 18 Then
Alert("La autorización ya esta remisionada") Alert("La autorización ya está remisionada")
Exit Sub Exit Sub
End If End If
Else Else
@@ -25284,4 +25307,5 @@ Partial Class Ventas
Public PU As Decimal = 0 Public PU As Decimal = 0
Public EsPUModificado As Boolean = False Public EsPUModificado As Boolean = False
End Class End Class
End Class End Class

View File

@@ -48,6 +48,8 @@