This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2020-01-06 18:28:16 -07:00
25 changed files with 1796 additions and 1219 deletions

View File

@@ -49,7 +49,7 @@ Partial Class Acumuladores_RepEntradasUsados
Dim Dia As String = {"lunes", "martes", "miércoles", "jueves", "viernes", "sábado", "domingo"}(If((Weekday(Today) - 2) = -1, 7, Weekday(Today) - 2)) Dim Dia As String = {"lunes", "martes", "miércoles", "jueves", "viernes", "sábado", "domingo"}(If((Weekday(Today) - 2) = -1, 7, Weekday(Today) - 2))
Dim Mes As String = {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}(Month(Today) - 1) Dim Mes As String = {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}(Month(Today) - 1)
Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Month(Today), Mes, Year(Today)) Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Day(Today), Mes, Year(Today))
Dim params As New List(Of ReportParameter) Dim params As New List(Of ReportParameter)

View File

@@ -74,7 +74,7 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
Dim Dia As String = {"lunes", "martes", "miércoles", "jueves", "viernes", "sábado", "domingo"}(If((Weekday(Today) - 2) = -1, 7, Weekday(Today) - 2)) Dim Dia As String = {"lunes", "martes", "miércoles", "jueves", "viernes", "sábado", "domingo"}(If((Weekday(Today) - 2) = -1, 7, Weekday(Today) - 2))
Dim Mes As String = {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}(Month(Today) - 1) Dim Mes As String = {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}(Month(Today) - 1)
Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Month(Today), Mes, Year(Today)) Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Day(Today), Mes, Year(Today))
Dim params As New List(Of ReportParameter) Dim params As New List(Of ReportParameter)

View File

@@ -549,25 +549,34 @@ Public Class ClsPaginas
Application("GlobalDTEmpresas") = value Application("GlobalDTEmpresas") = value
End Set End Set
End Property End Property
Property GlobalDTClasificaciones(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1, Optional UsoClasificacion As Integer = -1) As DataTable Property GlobalDTClasificaciones(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1, Optional UsoClasificacion As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable
Get Get
Dim AppNombre As String = String.Format("GlobalDTClasificaciones{0}", CveEmpresa)
'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
Dim ObjClasificaciones As New ClsClasificaciones
If ObjClasificaciones.GetClasificaciones(CveEmpresa) Then Application(AppNombre) = ObjClasificaciones.DtResultados
ObjClasificaciones.Dispose()
End If
If CveEmpresa <> -1 Then If CveEmpresa <> -1 Then
Dim Str As New StringBuilder Dim Str As New StringBuilder
Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria) If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
If UsoClasificacion <> -1 Then Str.AppendFormat(" AND UsoClasificacion IN ({0},3) ", UsoClasificacion) If UsoClasificacion <> -1 Then Str.AppendFormat(" AND UsoClasificacion IN ({0},3) ", UsoClasificacion)
Dim Dv As New DataView(DirectCast(Application("GlobalDTClasificaciones"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows) If CveClasificacion <> -1 Then Str.AppendFormat(" AND CveClasificacion = {0}", CveClasificacion)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
GlobalDTClasificaciones = Dv.ToTable GlobalDTClasificaciones = Dv.ToTable
Dv.Dispose() Dv.Dispose()
Else Else
GlobalDTClasificaciones = DirectCast(Application("GlobalDTClasificaciones"), DataTable) GlobalDTClasificaciones = DirectCast(Application(AppNombre), DataTable)
End If End If
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTClasificaciones") = value Dim AppNombre As String = String.Format("GlobalDTClasificaciones{0}", CveEmpresa)
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTClasificaciones2(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable Property GlobalDTClasificaciones2(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable
@@ -1507,7 +1516,7 @@ Public Class ClsPaginas
'Fin Ruta 'Fin Ruta
'Cliente 'Cliente
Property GlobalDTCliente(CveEmpresa As Integer, Optional Estatus As Integer = 1) As DataTable Property GlobalDTCliente(CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional CveCliente As Integer = -1) As DataTable
Get Get
Dim AppNombre As String = String.Format("GlobalDTCliente{0}", CveEmpresa) Dim AppNombre As String = String.Format("GlobalDTCliente{0}", CveEmpresa)
'sino existe, recarga los datos 'sino existe, recarga los datos
@@ -1523,10 +1532,11 @@ Public Class ClsPaginas
Dim StrSQL As New StringBuilder Dim StrSQL As New StringBuilder
StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa) StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
If Estatus >= 0 Then StrSQL.AppendFormat(" AND EstatusBool = {0} ", Estatus) If Estatus >= 0 Then StrSQL.AppendFormat(" AND EstatusBool = {0} ", Estatus)
If CveCliente >= 0 Then StrSQL.AppendFormat(" AND CveCliente = {0} ", CveCliente)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows) Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
GlobalDTCliente = Dv.ToTable GlobalDTCliente = Dv.ToTable
Dv.Dispose() Dv.Dispose()
Else Else
GlobalDTCliente = DirectCast(Application(AppNombre), DataTable) GlobalDTCliente = DirectCast(Application(AppNombre), DataTable)

View File

@@ -463,7 +463,7 @@ Public Class ClsSisEmpresas
_Empresa.CveDistribuidor = Data.Rows(0)("CveDistribuidor").ToString.ToEntero _Empresa.CveDistribuidor = Data.Rows(0)("CveDistribuidor").ToString.ToEntero
_Empresa.DiasPermitidos = Data.Rows(0)("DiasPermitidos").ToString.ToEntero _Empresa.DiasPermitidos = Data.Rows(0)("DiasPermitidos").ToString.ToEntero
_Empresa.AsientoContableComprasContado = If(Data.Rows(0)("Conta_AsientoContableComprasContado").ToString = "", False, CBool(Data.Rows(0)("Conta_AsientoContableComprasContado").ToString)) _Empresa.AsientoContableComprasContado = If(Data.Rows(0)("Conta_AsientoContableComprasContado").ToString = "", False, CBool(Data.Rows(0)("Conta_AsientoContableComprasContado").ToString))
_Empresa.TipoContabilizacion = Data.Rows(0)("Conta_TipoContabilizacion").ToString.ToEntero _Empresa.TipoContabilizacion = Data.Rows(0)("Conta_TipoContabilizacion").ToString.ToEntero '0 - Sin Conta, 1- Contabilidad SIG, 2- Contabilidad Contpaq
_Empresa.DefaultAsistencias = If(Data.Rows(0)("RH_DefaultAsistencias").ToString = "", False, CBool(Data.Rows(0)("RH_DefaultAsistencias").ToString)) _Empresa.DefaultAsistencias = If(Data.Rows(0)("RH_DefaultAsistencias").ToString = "", False, CBool(Data.Rows(0)("RH_DefaultAsistencias").ToString))
_Empresa.CIEC = Data.Rows(0)("CIEC").ToString _Empresa.CIEC = Data.Rows(0)("CIEC").ToString
_Empresa.Localidad = Data.Rows(0)("Localidad").ToString _Empresa.Localidad = Data.Rows(0)("Localidad").ToString

View File

@@ -1257,7 +1257,7 @@ Namespace Modelos
End If End If
If Not GuardarUsados(ObjVentas.IniciaTransacSQL, ObjVentas.CveVenta, ObjVentas) Then If Not GuardarUsados(ObjVentas.IniciaTransacSQL, ObjVentas.CveVenta, ObjVentas, factura.TipoDocto) Then
ErrorList.Add("Error al guardar usados") ErrorList.Add("Error al guardar usados")
End If End If
@@ -1785,10 +1785,10 @@ Namespace Modelos
DtVentasNC.Rows.Add(Dr) DtVentasNC.Rows.Add(Dr)
End If End If
End Sub End Sub
Private Function GuardarUsados(SqlTransaccion As SqlClient.SqlTransaction, CveVenta As Integer, ByRef ObjVentas As ClsVentas) As Boolean Private Function GuardarUsados(SqlTransaccion As SqlClient.SqlTransaction, CveVenta As Integer, ByRef ObjVentas As ClsVentas, TipoDocto As String) As Boolean
Dim Resultado As Boolean = True Dim Resultado As Boolean = True
If UsuarioActual.Empresa.Funcionalidad(533).ToEntero > 0 Then If UsuarioActual.Empresa.Funcionalidad(533).ToEntero > 0 AndAlso TipoDocto.Contiene("Ing", "Ant") Then
Dim CvePSPSA As Integer = UsuarioActual.Empresa.Funcionalidad(533).ToEntero Dim CvePSPSA As Integer = UsuarioActual.Empresa.Funcionalidad(533).ToEntero
Dim ObjAcum As New ClsAcumuladores(SqlTransaccion) Dim ObjAcum As New ClsAcumuladores(SqlTransaccion)
@@ -3476,7 +3476,7 @@ Namespace Modelos
'COMIENZA: VENTADETALLE 'COMIENZA: VENTADETALLE
'CUANDO SEA SALIDA VA POR LA VENTA DETALLE DE LA FACTURA DE LA REMISION - OJO!! SOLO FUNCIONA HASTA ORITA QUE SE HACE SALIDA SOLO CUANDO SE FACTURA LA REMISION 'CUANDO SEA SALIDA VA POR LA VENTA DETALLE DE LA FACTURA DE LA REMISION - OJO!! SOLO FUNCIONA HASTA ORITA QUE SE HACE SALIDA SOLO CUANDO SE FACTURA LA REMISION
Dim CveVentaDetalle = If(ConceptoEntrada = 3, DtDetalle.FiltroPrimeroValor("CveVentaDetalle", $"Consec={Consec}").ToEntero, MovDet("CveVentaDetalle").ToString.ToEntero) Dim CveVentaDetalle = If(ConceptoEntrada.Contiene(3, 40), DtDetalle.FiltroPrimeroValor("CveVentaDetalle", $"Consec={Consec}").ToEntero, MovDet("CveVentaDetalle").ToString.ToEntero)
'CUANDO LA VENTADETALLE NO TENGA VALOR DEBE MARCAR ERROR, NUEVA RESTRICCION DE ALMACEN 'CUANDO LA VENTADETALLE NO TENGA VALOR DEBE MARCAR ERROR, NUEVA RESTRICCION DE ALMACEN
If CveVentaDetalle < 0 Then If CveVentaDetalle < 0 Then
OcurrioError = True OcurrioError = True

View File

@@ -2237,6 +2237,11 @@ Partial Class Compras_Compras
If UsuarioActual.Empresa.Funcionalidad(577).ToString = "1" Then If UsuarioActual.Empresa.Funcionalidad(577).ToString = "1" Then
'If UsuarioActual.CveRol = 1 Then
' Alert("Ok funcionalidad 577")
'End If
If RetencionIVA = 0 And IVAOriginal > 0 Then If RetencionIVA = 0 And IVAOriginal > 0 Then
For Each dRow As DataRow In TmpDT.Rows For Each dRow As DataRow In TmpDT.Rows
If dRow("CveTipoPS").ToString.ToEntero = 1 Then If dRow("CveTipoPS").ToString.ToEntero = 1 Then
@@ -5830,6 +5835,12 @@ Partial Class Compras_Compras
End If End If
End If End If
If UsuarioActual.Empresa.Funcionalidad(577).ToEntero = 1 Then
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero
End If
'Agregamos el Opuesto del 22 -> 15 'Agregamos el Opuesto del 22 -> 15
If importeMovimiento <> 0 Then If importeMovimiento <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 15, Concepto + If(tipoCambioActual > 1, $" TC: {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 15, Concepto + If(tipoCambioActual > 1, $" TC: {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
@@ -8468,6 +8479,8 @@ Partial Class Compras_Compras
If DdlRetIVAConcepto.SelectedValue.ToEntero = 1 Then If DdlRetIVAConcepto.SelectedValue.ToEntero = 1 Then
ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2) ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2)
importeMN = ImporteMovimiento * tipoCambio importeMN = ImporteMovimiento * tipoCambio
If CtaProveedorRetIVA > 0 Then If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA IdCtaContable = CtaProveedorRetIVA
CveCuenta = CveCuentaProveedorRetIVA CveCuenta = CveCuentaProveedorRetIVA
@@ -8481,10 +8494,19 @@ Partial Class Compras_Compras
End If End If
End If End If
End If End If
If UsuarioActual.Empresa.Funcionalidad(577).ToEntero = 1 Then
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero
End If
End If End If
End If End If
End If End If
Case 183 'RetIVA x Acreditar Fletes P.F. Case 183 'RetIVA x Acreditar Fletes P.F.
If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then
If DdlRetIVAConcepto.Items.Count > 0 Then If DdlRetIVAConcepto.Items.Count > 0 Then
@@ -16988,6 +17010,26 @@ Partial Class Compras_Compras
CompruebaAgregar() CompruebaAgregar()
GuardaAC() GuardaAC()
End If End If
If UsuarioActual.Empresa.Funcionalidad(577).ToString = "1" Then
'If UsuarioActual.CveRol = 1 Then
' Alert($"Ok funcionalidad 577 RetencionIVA { RetencionIVA} IVAOriginal {IVAOriginal}")
'End If
If RetencionIVA = 0 And IVAOriginal > 0 Then
For Each dRow As DataRow In TmpDT.Rows
If dRow("CveTipoPS").ToString.ToEntero = 1 Then
tdIVA6.Visible = True
Exit For
End If
Next
End If
End If
UpPS.Update() UpPS.Update()
CargaGvPersonal() CargaGvPersonal()
End Sub End Sub

View File

@@ -1889,10 +1889,9 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("Fecha", Fecha)) 'TxtFecha.Text params.Add(New ReportParameter("Fecha", Fecha)) 'TxtFecha.Text
params.Add(New ReportParameter("NombreEntrego", Capturo)) 'UsuarioActual.Nombre params.Add(New ReportParameter("NombreEntrego", Capturo)) 'UsuarioActual.Nombre
params.Add(New ReportParameter("NombreAccion", Recibio)) 'TxtResponsable.Text params.Add(New ReportParameter("NombreAccion", Recibio)) 'TxtResponsable.Text
params.Add(New ReportParameter("Accion", "Recibió")) 'Antes Trasladó params.Add(New ReportParameter("Accion", "RECIBE")) 'Antes Trasladó
params.Add(New ReportParameter("Observaciones", Observaciones)) params.Add(New ReportParameter("Observaciones", Observaciones))
Dim DTCliente As New DataTable Dim DTCliente As New DataTable
Dim SBDireccionO As New StringBuilder() Dim SBDireccionO As New StringBuilder()
Dim SBDireccionD As New StringBuilder() Dim SBDireccionD As New StringBuilder()
@@ -2003,6 +2002,16 @@ Partial Class PopUpVerFactura
ImprimirPDF(String.Format(RutaFormato, UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Aviso de Traslado - {0}", Folio), RDSName:="DsInventarios") ImprimirPDF(String.Format(RutaFormato, UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Aviso de Traslado - {0}", Folio), RDSName:="DsInventarios")
Else Else
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("LogoPath", logouri))
Else
params.Add(New ReportParameter("LogoPath", ""))
End If
params.Add(New ReportParameter("Origen", Almacen))
params.Add(New ReportParameter("Destino", AlmacenDestino))
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
@@ -2042,6 +2051,17 @@ Partial Class PopUpVerFactura
ImprimirPDF(String.Format("{0}Formatos\Traslado.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Recepción de Traslado - {0}", Folio), RDSName:="DsInventarios") ImprimirPDF(String.Format("{0}Formatos\Traslado.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Recepción de Traslado - {0}", Folio), RDSName:="DsInventarios")
Else Else
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("LogoPath", logouri))
Else
params.Add(New ReportParameter("LogoPath", ""))
End If
params.Add(New ReportParameter("Origen", Almacen))
params.Add(New ReportParameter("Destino", AlmacenDestino))
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))

View File

@@ -1533,11 +1533,12 @@ Partial Class Compras_Proveedores
If ObjContaAC IsNot Nothing Then ObjContaAC.Commit() If ObjContaAC IsNot Nothing Then ObjContaAC.Commit()
'ACTUALIZAR GLOBAL 'ACTUALIZAR GLOBAL
If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then 'If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = ObjProveedores.DtResultados GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = Nothing
Else 'Else
ErrorBancos = True ' ErrorBancos = True
End If 'End If
Alert("El Proveedor se guardó correctamente. " & "<br />" & MsgCuentaContable, TipoMensaje.MsgInformacion, If(Request("CveFactura") Is Nothing, "document.location.href=""/Compras/CatProveedores.aspx""", "window.opener.location.href = window.opener.location.href; window.close();")) Alert("El Proveedor se guardó correctamente. " & "<br />" & MsgCuentaContable, TipoMensaje.MsgInformacion, If(Request("CveFactura") Is Nothing, "document.location.href=""/Compras/CatProveedores.aspx""", "window.opener.location.href = window.opener.location.href; window.close();"))
RecargaGlobalCuentasBancarias() RecargaGlobalCuentasBancarias()
End If End If
@@ -1617,9 +1618,9 @@ Partial Class Compras_Proveedores
If tIdContaProveedor > 0 AndAlso CreoCuenta Then ObjProveedores.UpdateProveedorIdCuentaAC(CveProveedor, tIdContaProveedor) If tIdContaProveedor > 0 AndAlso CreoCuenta Then ObjProveedores.UpdateProveedorIdCuentaAC(CveProveedor, tIdContaProveedor)
If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then 'If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = ObjProveedores.DtResultados GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = Nothing
End If 'End If
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion) Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
'HABILITA ENVIAR ACTIVACION AL PORTAL PROVEEDOR SI SE AGREGO CORREO 'HABILITA ENVIAR ACTIVACION AL PORTAL PROVEEDOR SI SE AGREGO CORREO

View File

@@ -818,6 +818,10 @@ Partial Class ContabilidadC_RegPrePoliza
If CvePrePoliza > 0 Then If CvePrePoliza > 0 Then
'Nuevo Modulo Charlie 'Nuevo Modulo Charlie
ActualizarPrePoliza() ActualizarPrePoliza()
Else Else
Dim MensajeAlert = New StringBuilder Dim MensajeAlert = New StringBuilder
Dim ObjIE As New ClsBancos() Dim ObjIE As New ClsBancos()
@@ -968,8 +972,17 @@ Partial Class ContabilidadC_RegPrePoliza
Dim ObjContabilidad As New ClsContabilidad Dim ObjContabilidad As New ClsContabilidad
ObjContabilidad.IniciaTransacSQL() ObjContabilidad.IniciaTransacSQL()
If Not ObjContabilidad.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
OcurrioError = True
End If
ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate) ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate)
For Each row As GridViewRow In GvPrePoliza.Rows For Each row As GridViewRow In GvPrePoliza.Rows
If row.DataKey("CvePrePolizaDetalle").ToEntero > 0 Then If row.DataKey("CvePrePolizaDetalle").ToEntero > 0 Then
If Not ObjContabilidad.UpdatePrepolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCTextBox("TxtConcepto").Text, row.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, If Not ObjContabilidad.UpdatePrepolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCTextBox("TxtConcepto").Text, row.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero,
@@ -1003,6 +1016,13 @@ Partial Class ContabilidadC_RegPrePoliza
ObjContabilidad.Dispose() ObjContabilidad.Dispose()
CargaPrePoliza() CargaPrePoliza()
If Not OcurrioError Then
If IdPoliza > 0 Then
BtnContabilizar_Click(Nothing, Nothing)
End If
End If
End Sub End Sub
Protected Sub GvPrePoliza_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvPrePoliza.RowUpdating Protected Sub GvPrePoliza_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvPrePoliza.RowUpdating
RegistraScript(String.Format("$('#{0}').modal();", "DivEditConcepto")) RegistraScript(String.Format("$('#{0}').modal();", "DivEditConcepto"))
@@ -1463,13 +1483,14 @@ Partial Class ContabilidadC_RegPrePoliza
End Sub End Sub
Private Sub Contabilizar() Private Sub Contabilizar()
Dim ObjConta As New ClsContabilidad Dim ObjConta As New ClsContabilidad
If IdPoliza > 0 Then 'si está bloqueada, lo desbloqueaprimero If IdPoliza > 0 Then 'si está bloqueada, lo desbloqueaprimero
ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False)
End If End If
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, pIDPoliza:=If(IdPoliza > 0, IdPoliza, -1)) Then If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, pIDPoliza:=If(IdPoliza > 0, IdPoliza, -1), Concepto:=TxtConcepto.Text, Fecha:=TxtFechaDocumento.Text.ToDateTime) Then
Alert(String.Format("Prepóliza contabilizada. <br/><br/>Folio:<a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", ObjConta.ContaIdPoliza), ModExtensiones.TipoMensaje.MsgInformacion) Alert(String.Format("Prepóliza contabilizada. <br/><br/>Folio:<a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", ObjConta.ContaIdPoliza), ModExtensiones.TipoMensaje.MsgInformacion)
Else Else

View File

@@ -2046,7 +2046,7 @@ Partial Class Contratos_Default
Row("LimitarCantidad") = If(ChkLimitar.Checked, 1, 0) Row("LimitarCantidad") = If(ChkLimitar.Checked, 1, 0)
Dim ObjContratos As New ClsContratos Dim ObjContratos As New ClsContratos
If ObjContratos.AddContratosDetalle(CveContrato, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, UsuarioActual.CveUsuario, Row("CveTipoPresupuesto").ToString.ToEntero, Row("NoIdentificacion").ToString, Row("LimitarCantidad").ToString.ToEntero = 1, "") Then If ObjContratos.AddContratosDetalle(CveContrato, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, UsuarioActual.CveUsuario, Row("CveTipoPresupuesto").ToString.ToEntero, Row("NoIdentificacion").ToString, Convert.ToBoolean(Row("LimitarCantidad")), "") Then
If Autorizado Then If Autorizado Then
Dim msj As String = String.Format("Se agregaron {0} {1} del producto {2} con un precio ${3}.", Row("Cantidad"), Row("UM"), Row("PS"), Row("PU")) Dim msj As String = String.Format("Se agregaron {0} {1} del producto {2} con un precio ${3}.", Row("Cantidad"), Row("UM"), Row("PS"), Row("PU"))
guardarBitacora(msj) guardarBitacora(msj)

View File

@@ -15,11 +15,14 @@
<Width>2.15604cm</Width> <Width>2.15604cm</Width>
</TablixColumn> </TablixColumn>
<TablixColumn> <TablixColumn>
<Width>15.6445cm</Width> <Width>13.71833cm</Width>
</TablixColumn> </TablixColumn>
<TablixColumn> <TablixColumn>
<Width>2.02375cm</Width> <Width>2.02375cm</Width>
</TablixColumn> </TablixColumn>
<TablixColumn>
<Width>1.8105cm</Width>
</TablixColumn>
</TablixColumns> </TablixColumns>
<TablixRows> <TablixRows>
<TablixRow> <TablixRow>
@@ -300,6 +303,61 @@
</Textbox> </Textbox>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox6">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Valor</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox6</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<TopBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</TopBorder>
<BottomBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</BottomBorder>
<LeftBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</LeftBorder>
<RightBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</RightBorder>
<BackgroundColor>Silver</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
</TablixCells> </TablixCells>
</TablixRow> </TablixRow>
<TablixRow> <TablixRow>
@@ -420,7 +478,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>=IIf(Fields!PS.Value = "", "Almacén Destino: " &amp; Fields!AlmacenDestino.Value &amp; " Responsable: " &amp; Fields!Recibio.Value, Fields!PS.Value)</Value> <Value>=IIf(Fields!PS.Value = "", "Almacén Origen: " &amp; Fields!Almacen.Value &amp; " Almacén Destino: " &amp; Fields!AlmacenDestino.Value &amp; " Responsable: " &amp; Fields!Recibio.Value, Fields!PS.Value)</Value>
<Style> <Style>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>
<FontWeight>=IIf(Fields!PS.Value = "", "Bold", "Default")</FontWeight> <FontWeight>=IIf(Fields!PS.Value = "", "Bold", "Default")</FontWeight>
@@ -481,6 +539,42 @@
</Textbox> </Textbox>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Valor">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!Valor.Value</Value>
<Style>
<FontSize>8pt</FontSize>
<Format>#,0.00;(#,0.00)</Format>
<Color>=IIf(Fields!PS.Value = "", "White", "Black")</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Valor</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=IIf(Fields!PS.Value = "", "#9cacc1", "NoColor")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
</TablixCells> </TablixCells>
</TablixRow> </TablixRow>
</TablixRows> </TablixRows>
@@ -492,6 +586,7 @@
<TablixMember /> <TablixMember />
<TablixMember /> <TablixMember />
<TablixMember /> <TablixMember />
<TablixMember />
</TablixMembers> </TablixMembers>
</TablixColumnHierarchy> </TablixColumnHierarchy>
<TablixRowHierarchy> <TablixRowHierarchy>
@@ -512,7 +607,7 @@
<Top>0.17639cm</Top> <Top>0.17639cm</Top>
<Left>0.24474cm</Left> <Left>0.24474cm</Left>
<Height>0.90897cm</Height> <Height>0.90897cm</Height>
<Width>25.7676cm</Width> <Width>25.65193cm</Width>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -523,7 +618,7 @@
<Height>0.67394in</Height> <Height>0.67394in</Height>
<Style /> <Style />
</Body> </Body>
<Width>10.24108in</Width> <Width>10.22558in</Width>
<Page> <Page>
<PageHeader> <PageHeader>
<Height>3.48078cm</Height> <Height>3.48078cm</Height>
@@ -962,6 +1057,10 @@
<DataField>FechaMovto</DataField> <DataField>FechaMovto</DataField>
<rd:TypeName>System.String</rd:TypeName> <rd:TypeName>System.String</rd:TypeName>
</Field> </Field>
<Field Name="Almacen">
<DataField>Almacen</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="AlmacenDestino"> <Field Name="AlmacenDestino">
<DataField>AlmacenDestino</DataField> <DataField>AlmacenDestino</DataField>
<rd:TypeName>System.String</rd:TypeName> <rd:TypeName>System.String</rd:TypeName>
@@ -970,6 +1069,10 @@
<DataField>Recibio</DataField> <DataField>Recibio</DataField>
<rd:TypeName>System.String</rd:TypeName> <rd:TypeName>System.String</rd:TypeName>
</Field> </Field>
<Field Name="Valor">
<DataField>Valor</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
</Fields> </Fields>
<rd:DataSetInfo> <rd:DataSetInfo>
<rd:DataSetName>DataSet</rd:DataSetName> <rd:DataSetName>DataSet</rd:DataSetName>

View File

@@ -15,7 +15,13 @@
<Width>2.19837cm</Width> <Width>2.19837cm</Width>
</TablixColumn> </TablixColumn>
<TablixColumn> <TablixColumn>
<Width>12.15373cm</Width> <Width>9.27592cm</Width>
</TablixColumn>
<TablixColumn>
<Width>1.41521cm</Width>
</TablixColumn>
<TablixColumn>
<Width>1.45633cm</Width>
</TablixColumn> </TablixColumn>
</TablixColumns> </TablixColumns>
<TablixRows> <TablixRows>
@@ -190,6 +196,90 @@
</Textbox> </Textbox>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox13">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Costo</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox13</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<TopBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</TopBorder>
<BottomBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</BottomBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox15">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Valor</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox15</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<TopBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</TopBorder>
<BottomBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</BottomBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
</TablixCells> </TablixCells>
</TablixRow> </TablixRow>
<TablixRow> <TablixRow>
@@ -207,7 +297,7 @@
<Value>=Fields!Cantidad.Value</Value> <Value>=Fields!Cantidad.Value</Value>
<Style> <Style>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>
<Format>#,0.00</Format> <Format>#,0</Format>
<Language>es-MX</Language> <Language>es-MX</Language>
</Style> </Style>
</TextRun> </TextRun>
@@ -330,6 +420,74 @@
</Textbox> </Textbox>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="PU">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!PU.Value</Value>
<Style>
<FontSize>8pt</FontSize>
<Format>#,0.00;(#,0.00)</Format>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>PU</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<VerticalAlign>Bottom</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>=IIf(rownumber(nothing) = 1, "2pt", "0pt")</PaddingTop>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Total">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!Total.Value</Value>
<Style>
<FontSize>8pt</FontSize>
<Format>#,0.00;(#,0.00)</Format>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Total</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<VerticalAlign>Bottom</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>=IIf(rownumber(nothing) = 1, "2pt", "0pt")</PaddingTop>
</Style>
</Textbox>
</CellContents>
</TablixCell>
</TablixCells> </TablixCells>
</TablixRow> </TablixRow>
</TablixRows> </TablixRows>
@@ -340,6 +498,8 @@
<TablixMember /> <TablixMember />
<TablixMember /> <TablixMember />
<TablixMember /> <TablixMember />
<TablixMember />
<TablixMember />
</TablixMembers> </TablixMembers>
</TablixColumnHierarchy> </TablixColumnHierarchy>
<TablixRowHierarchy> <TablixRowHierarchy>
@@ -356,7 +516,7 @@
<Top>0.07056cm</Top> <Top>0.07056cm</Top>
<Left>0.00711cm</Left> <Left>0.00711cm</Left>
<Height>0.73434cm</Height> <Height>0.73434cm</Height>
<Width>19.57434cm</Width> <Width>19.56807cm</Width>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -370,7 +530,7 @@
<Width>7.70923in</Width> <Width>7.70923in</Width>
<Page> <Page>
<PageHeader> <PageHeader>
<Height>2.09944cm</Height> <Height>5.08094cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage> <PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage> <PrintOnLastPage>true</PrintOnLastPage>
<ReportItems> <ReportItems>
@@ -392,9 +552,10 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox2</rd:DefaultName> <rd:DefaultName>Textbox2</rd:DefaultName>
<Left>0.00711cm</Left> <Top>0.03803cm</Top>
<Height>0.6cm</Height> <Left>4.37423cm</Left>
<Width>16.69653cm</Width> <Height>2.04667cm</Height>
<Width>12.55984cm</Width>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -424,8 +585,8 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox4</rd:DefaultName> <rd:DefaultName>Textbox4</rd:DefaultName>
<Top>1.34069cm</Top> <Top>4.48094cm</Top>
<Left>17.81839cm</Left> <Left>17.3888cm</Left>
<Height>0.6cm</Height> <Height>0.6cm</Height>
<Width>1.76305cm</Width> <Width>1.76305cm</Width>
<ZIndex>1</ZIndex> <ZIndex>1</ZIndex>
@@ -456,8 +617,8 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox5</rd:DefaultName> <rd:DefaultName>Textbox5</rd:DefaultName>
<Top>1.34067cm</Top> <Top>4.48092cm</Top>
<Left>16.70363cm</Left> <Left>16.27404cm</Left>
<Height>0.6cm</Height> <Height>0.6cm</Height>
<Width>1.11476cm</Width> <Width>1.11476cm</Width>
<ZIndex>2</ZIndex> <ZIndex>2</ZIndex>
@@ -487,8 +648,8 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox4</rd:DefaultName> <rd:DefaultName>Textbox4</rd:DefaultName>
<Top>1.34066cm</Top> <Top>0.63803cm</Top>
<Left>15.46894cm</Left> <Left>17.07518cm</Left>
<Height>0.6cm</Height> <Height>0.6cm</Height>
<Width>1.2347cm</Width> <Width>1.2347cm</Width>
<ZIndex>3</ZIndex> <ZIndex>3</ZIndex>
@@ -517,8 +678,8 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox5</rd:DefaultName> <rd:DefaultName>Textbox5</rd:DefaultName>
<Top>1.34066cm</Top> <Top>0.03803cm</Top>
<Left>14.2869cm</Left> <Left>17.07518cm</Left>
<Height>0.6cm</Height> <Height>0.6cm</Height>
<Width>1.18203cm</Width> <Width>1.18203cm</Width>
<ZIndex>4</ZIndex> <ZIndex>4</ZIndex>
@@ -549,7 +710,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox2</rd:DefaultName> <rd:DefaultName>Textbox2</rd:DefaultName>
<Top>0.7407cm</Top> <Top>2.6457cm</Top>
<Left>0.00711cm</Left> <Left>0.00711cm</Left>
<Height>0.6cm</Height> <Height>0.6cm</Height>
<Width>7.66226cm</Width> <Width>7.66226cm</Width>
@@ -582,7 +743,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox2</rd:DefaultName> <rd:DefaultName>Textbox2</rd:DefaultName>
<Top>1.34066cm</Top> <Top>3.24566cm</Top>
<Left>0.00711cm</Left> <Left>0.00711cm</Left>
<Height>0.6cm</Height> <Height>0.6cm</Height>
<Width>14.27979cm</Width> <Width>14.27979cm</Width>
@@ -597,6 +758,101 @@
<PaddingBottom>2pt</PaddingBottom> <PaddingBottom>2pt</PaddingBottom>
</Style> </Style>
</Textbox> </Textbox>
<Textbox Name="Textbox11">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Origen: </Value>
<Style>
<FontSize>12pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!Origen.Value</Value>
<Style>
<FontSize>12pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox2</rd:DefaultName>
<Top>3.84566cm</Top>
<Left>0.00711cm</Left>
<Height>0.6cm</Height>
<Width>14.27979cm</Width>
<ZIndex>7</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox12">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Destino: </Value>
<Style>
<FontSize>12pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!Destino.Value</Value>
<Style>
<FontSize>12pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox2</rd:DefaultName>
<Top>4.48094cm</Top>
<Left>0.00711cm</Left>
<Height>0.6cm</Height>
<Width>14.27979cm</Width>
<ZIndex>8</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Image Name="Logo">
<Source>External</Source>
<Value>=Parameters!LogoPath.Value</Value>
<Sizing>FitProportional</Sizing>
<Top>0.03803cm</Top>
<Left>0.1121cm</Left>
<Height>2.53711cm</Height>
<Width>4.08574cm</Width>
<ZIndex>9</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</Image>
</ReportItems> </ReportItems>
<Style> <Style>
<Border> <Border>
@@ -865,7 +1121,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>ENVIÓ</Value> <Value>ENTREGA</Value>
<Style> <Style>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
</Style> </Style>
@@ -1324,6 +1580,23 @@
<AllowBlank>true</AllowBlank> <AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt> <Prompt>ReportParameter1</Prompt>
</ReportParameter> </ReportParameter>
<ReportParameter Name="Origen">
<DataType>String</DataType>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="Destino">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="LogoPath">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters> </ReportParameters>
<EmbeddedImages> <EmbeddedImages>
<EmbeddedImage Name="compuproveedores"> <EmbeddedImage Name="compuproveedores">

View File

@@ -71,7 +71,7 @@ Partial Class Inventarios_InventarioFisicoDetalle
EsUsuarioActual = True EsUsuarioActual = True
End If End If
GvIFD.Columns(6).Visible = EsUsuarioActual GvIFD.Columns(6).Visible = EsUsuarioActual OrElse UsuarioActual.TienePermisoProceso(283) ' si el usuario lo registro o si tiene permisos especial
GvIFD.DataBind() GvIFD.DataBind()
If (GvIFD.Rows.Count > 0) Then If (GvIFD.Rows.Count > 0) Then
@@ -332,7 +332,7 @@ Partial Class Inventarios_InventarioFisicoDetalle
#Region " ELIMINAR " #Region " ELIMINAR "
Protected Sub gvInventarioFisicoDetalle_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvIFD.RowDeleting Protected Sub gvInventarioFisicoDetalle_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvIFD.RowDeleting
If ddlUsuario.SelectedValue = UsuarioActual.CveUsuario.ToString Then If ddlUsuario.SelectedValue = UsuarioActual.CveUsuario.ToString OrElse UsuarioActual.TienePermisoProceso(283) Then
Dim Inventarios As New ClsInventarios Dim Inventarios As New ClsInventarios
Dim Retorno As Boolean = Inventarios.RemoveInventarioFisicoDetalles(GvIFD.DataKeys(e.RowIndex).Value.ToString.ToEntero()) Dim Retorno As Boolean = Inventarios.RemoveInventarioFisicoDetalles(GvIFD.DataKeys(e.RowIndex).Value.ToString.ToEntero())

View File

@@ -57,21 +57,12 @@
Recepción/Entrega de Usados Recepción/Entrega de Usados
</asp:Content> </asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel runat="server"> <asp:UpdatePanel runat="server" ID="UppAcciones" UpdateMode="Conditional" >
<ContentTemplate> <ContentTemplate>
<li> <li>
<asp:HyperLink ID="HplImprimir" runat="server" Visible="false"><i class="fa fa-print"></i> Imprimir</asp:HyperLink> <asp:HyperLink ID="HplImprimir" runat="server" Visible="false"><i class="fa fa-print"></i> Imprimir</asp:HyperLink>
</li> </li>
<li>
<asp:HyperLink ID="HplTraspaso" Target="_blank" runat="server" Visible="false"><i class="fa fa-truck" aria-hidden="true"></i> Traspaso Almacen</asp:HyperLink>
</li>
<%-- <li style="text-align: left!important" runat="server" id="LiLnkGuias" visible="false">
<asp:LinkButton runat="server" ID="LnkAgregarGuia" CssClass="" data-toggle="tooltip" data-placement="left" OnClick="LnkAgregarGuia_Click"
title="Paqueteria Guías." Text="<i class='fa fa-truck'></i> Paqueteria Guías"></asp:LinkButton>
</li>--%>
<li>
<asp:HyperLink ID="HplPrePoliza" Target="_blank" runat="server" Visible="false"> Ver PrePóliza</asp:HyperLink>
</li>
<li> <li>
<asp:LinkButton runat="server" ID="LnkAgregarUsado" CssClass="" data-toggle="tooltip" data-placement="left" OnClick="LnkAgregarUsado_Click" <asp:LinkButton runat="server" ID="LnkAgregarUsado" CssClass="" data-toggle="tooltip" data-placement="left" OnClick="LnkAgregarUsado_Click"
Text="<i class='fa fa-plus'></i> Agregar Usado"></asp:LinkButton> Text="<i class='fa fa-plus'></i> Agregar Usado"></asp:LinkButton>
@@ -757,7 +748,7 @@
<asp:HiddenField runat="server" ID="HdnCodAFEdit" Value="-1" ClientIDMode="Static" /> <asp:HiddenField runat="server" ID="HdnCodAFEdit" Value="-1" ClientIDMode="Static" />
<asp:GridView ID="GvM" runat="server" GridLines="none" Width="70%" <asp:GridView ID="GvM" runat="server" GridLines="none" Width="70%"
CssClass="table table-hover ADScroller btn-xs" ShowHeader="True" CssClass="table table-hover ADScroller btn-xs" ShowHeader="True"
EmptyDataText="Aún no hay registros." DataKeyNames="No,CveMovimientoDetalle,CvePS,PU,Cantidad" EmptyDataText="Aún no hay registros." DataKeyNames="No,CveMovimientoDetalle,CvePS,PU,Cantidad,CveTamaño"
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" ShowHeaderWhenEmpty="True"> AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" ShowHeaderWhenEmpty="True">
<Columns> <Columns>
<asp:TemplateField HeaderText="" ItemStyle-Font-Size="6pt"> <asp:TemplateField HeaderText="" ItemStyle-Font-Size="6pt">

View File

@@ -1003,6 +1003,12 @@ Partial Class Inventarios_RecepcionUsados
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
If DdlClientes.SelectedValue.ToEntero <= 0 Then
Alert("No se ha especificado el cliente", TipoMensaje.MsgError)
Exit Sub
End If
'SI ES DISTRIBUIDOR Y NO VIENE DE REMISION, GENERA UNA REMISION DE NOTA DE CREDITO 'SI ES DISTRIBUIDOR Y NO VIENE DE REMISION, GENERA UNA REMISION DE NOTA DE CREDITO
If EsDistribuidor AndAlso Me.CveRemisionRecibida <= 0 Then If EsDistribuidor AndAlso Me.CveRemisionRecibida <= 0 Then
Dim CveCliente As Integer = DdlClientes.SelectedValue.ToEntero() Dim CveCliente As Integer = DdlClientes.SelectedValue.ToEntero()
@@ -1107,7 +1113,7 @@ Partial Class Inventarios_RecepcionUsados
'si es selectedvalue = 42, es entrada ,3 -salida 'si es selectedvalue = 42, es entrada ,3 -salida
Dim CveConceptoUsados As Integer = If(RBLOpcion.SelectedValue.ToEntero = 42, 1, 2) Dim CveConceptoUsados As Integer = If(RBLOpcion.SelectedValue.ToEntero = 42, 1, 2)
If RBLOpcion.SelectedValue.ToEntero = 42 AndAlso EsDistribuidor Then If RBLOpcion.SelectedValue.ToEntero = 42 AndAlso EsDistribuidor AndAlso Dr("CveTamaño").ToString.ToEntero > 0 Then
If Not ObjAcum.DistribuidorMovtosAdd(DdlClientes.SelectedValue.ToEntero, Dr("Cantidad").ToString.ToEntero(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, CveVenta, UsuarioActual.CveUsuario, If Not ObjAcum.DistribuidorMovtosAdd(DdlClientes.SelectedValue.ToEntero, Dr("Cantidad").ToString.ToEntero(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, CveVenta, UsuarioActual.CveUsuario,
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, CveMovimiento:=CveMovimiento) Then UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, CveMovimiento:=CveMovimiento) Then
@@ -2067,6 +2073,8 @@ Partial Class Inventarios_RecepcionUsados
Me.ObjRemisionNC.SetCliente() Me.ObjRemisionNC.SetCliente()
Me.ObjRemisionNC.CveAlmacen = -1 Me.ObjRemisionNC.CveAlmacen = -1
Dim ObjCliente As New ClsClientes Dim ObjCliente As New ClsClientes
If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
If ObjCliente.DtResultados.Rows.Count > 0 Then If ObjCliente.DtResultados.Rows.Count > 0 Then
@@ -2112,7 +2120,11 @@ Partial Class Inventarios_RecepcionUsados
End If End If
ObjVentas.Dispose() ObjVentas.Dispose()
Me.ObjRemisionNC.Observaciones = "" If RblUsadosAjuste.SelectedValue = "1" Then
Me.ObjRemisionNC.Observaciones = "Descuento por garantía"
Else
Me.ObjRemisionNC.Observaciones = "Devolución por usado"
End If
Me.ObjRemisionNC.OrdenCompra = "" Me.ObjRemisionNC.OrdenCompra = ""
Me.ObjRemisionNC.PedidoContrato = "" Me.ObjRemisionNC.PedidoContrato = ""
Me.ObjRemisionNC.ObservacionesAlmacen = "" Me.ObjRemisionNC.ObservacionesAlmacen = ""
@@ -2125,7 +2137,7 @@ Partial Class Inventarios_RecepcionUsados
Optional SerieLote As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0, Optional SerieLote As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0,
Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0, Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0,
Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0, Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0,
Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional EsCargo As Boolean = False, Optional PorcentajeIVA As Decimal = 0D) As Boolean Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional EsCargo As Boolean = False, Optional PorcentajeIVA As Decimal = 0D, Optional CveTamaño As Integer = 0) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
If Not CvePS > 0 Then If Not CvePS > 0 Then
@@ -2238,6 +2250,7 @@ Partial Class Inventarios_RecepcionUsados
Row("CveVentaDetallePedido2") = CveVentaDetallePedido2 Row("CveVentaDetallePedido2") = CveVentaDetallePedido2
Row("CuentaPredial") = CuentaPredial Row("CuentaPredial") = CuentaPredial
Row("EsCargo") = EsCargo Row("EsCargo") = EsCargo
Row("CveTamaño") = CveTamaño
'RECARGAR GV 'RECARGAR GV
TmpDT.Rows.Add(Row) TmpDT.Rows.Add(Row)
@@ -2344,6 +2357,7 @@ Partial Class Inventarios_RecepcionUsados
Dim CvePS As Integer = Row.DataKey("CvePS").ToEntero() Dim CvePS As Integer = Row.DataKey("CvePS").ToEntero()
Dim Cantidad As Decimal = Row.DataKey("Cantidad").ToDecimal() Dim Cantidad As Decimal = Row.DataKey("Cantidad").ToDecimal()
Dim PU As Decimal = Row.DataKey("PU").ToDecimal() Dim PU As Decimal = Row.DataKey("PU").ToDecimal()
Dim CveTamaño As Integer = Row.DataKey("CveTamaño").ToEntero()
Dim SubTotal As Decimal = Cantidad * PU Dim SubTotal As Decimal = Cantidad * PU
Dim CveUnidadMedida As Integer = 0 Dim CveUnidadMedida As Integer = 0
@@ -2368,11 +2382,32 @@ Partial Class Inventarios_RecepcionUsados
End If End If
End If End If
AddPSRNC(ObjRemisionNC.DtDetalle, Cantidad, CveUnidadMedida, UnidadMedida, CveClasificacion, Clasificacion, CvePS, PS, "Inv/RecepcionUsados", PU, 0, -1, "", AddPSRNC(ObjRemisionNC.DtDetalle, Cantidad, CveUnidadMedida, UnidadMedida, CveClasificacion, Clasificacion, CvePS, PS, "", PU, 0, -1, "",
ObjRemisionNC.CveSubProyecto, ObjRemisionNC.SubProyecto.SubProyecto, PorcentajeIVA:=PorcentajeIVA) ObjRemisionNC.CveSubProyecto, ObjRemisionNC.SubProyecto.SubProyecto, PorcentajeIVA:=PorcentajeIVA, CveTamaño:=CveTamaño)
End If End If
Next Next
If RblUsadosAjuste.SelectedValue = "1" Then
'agrego un registro extra del importe de ajuste
Dim PU As Decimal = TxtImporteAjuste.Text.ToDecimal
Dim CveSATNC As String = "84111506"
Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, SATClavePS:=CveSATNC, AplicaParaVenta:=1).FiltroPrimero("")
If Dr IsNot Nothing Then
Dim CveUnidadMedida, CveClasificacion, CvePS As Integer
CveUnidadMedida = Dr("CveUnidadMedida").ToString.ToEntero
CveClasificacion = Dr("CveClasificacion").ToString.ToEntero
CvePS = Dr("CvePS").ToString.ToEntero
Dim PorcentajeIVA As Decimal = 0.16D
Dim Obs As String = "Descuento por garantía"
AddPSRNC(ObjRemisionNC.DtDetalle, 1, CveUnidadMedida, "", CveClasificacion, "", CvePS, "", Obs, PU, 0, -1, "",
ObjRemisionNC.CveSubProyecto, ObjRemisionNC.SubProyecto.SubProyecto, PorcentajeIVA:=PorcentajeIVA)
Else
End If
End If
Dim TotalImporte As Decimal = ObjRemisionNC.DtDetalle.SUM("TotalImporte").ToDecimal() Dim TotalImporte As Decimal = ObjRemisionNC.DtDetalle.SUM("TotalImporte").ToDecimal()
Dim ImporteIVA As Decimal = ObjRemisionNC.DtDetalle.SUM("ImporteIVA").ToDecimal() Dim ImporteIVA As Decimal = ObjRemisionNC.DtDetalle.SUM("ImporteIVA").ToDecimal()
Dim ImporteRetIVA As Decimal = ObjRemisionNC.DtDetalle.SUM("ImporteRetIVA").ToDecimal() Dim ImporteRetIVA As Decimal = ObjRemisionNC.DtDetalle.SUM("ImporteRetIVA").ToDecimal()
@@ -2405,12 +2440,23 @@ Partial Class Inventarios_RecepcionUsados
#Region "Ajustes" #Region "Ajustes"
Public Sub OnRblUsadosAjuste_Change(sender As Object, e As EventArgs) Public Sub OnRblUsadosAjuste_Change(sender As Object, e As EventArgs)
DdlAlmacen.Items.Clear()
If RblUsadosAjuste.SelectedValue = "1" Then If RblUsadosAjuste.SelectedValue = "1" Then
CargaAjuste() CargaAjuste()
DivAjuste.Visible = True DivAjuste.Visible = True
'Llenar el dropdownlist de almacén
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 6)
LnkAgregarUsado.Visible = False
UppAcciones.Update()
Else Else
DivAjuste.Visible = False DivAjuste.Visible = False
'Llenar el dropdownlist de almacén
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 22)
LnkAgregarUsado.Visible = True
UppAcciones.Update()
End If End If
DdlAlmacen.DataBind()
End Sub End Sub
Private Sub CargaAjuste() Private Sub CargaAjuste()
@@ -2496,6 +2542,7 @@ Partial Class Inventarios_RecepcionUsados
End Sub End Sub
Private Sub CargaBCIAjuste() Private Sub CargaBCIAjuste()
DdlBCIAjuste.Items.Clear()
Dim ObjGral As New ClsGenerales Dim ObjGral As New ClsGenerales
If ObjGral.BCIUsadoGet(UsuarioActual.CveEmpresa) Then If ObjGral.BCIUsadoGet(UsuarioActual.CveEmpresa) Then
DdlBCIAjuste.DataSource = ObjGral.DtResultados DdlBCIAjuste.DataSource = ObjGral.DtResultados
@@ -2506,6 +2553,7 @@ Partial Class Inventarios_RecepcionUsados
End Sub End Sub
Private Sub CargaFolioAjuste() Private Sub CargaFolioAjuste()
DdlFolioGarantia.Items.Clear()
Dim ObjAcum As New ClsAcumuladores Dim ObjAcum As New ClsAcumuladores
If ObjAcum.FoliosGarantiaGet(-1, UsuarioActual.CveEmpresa) Then If ObjAcum.FoliosGarantiaGet(-1, UsuarioActual.CveEmpresa) Then
DdlFolioGarantia.DataSource = ObjAcum.DtResultados DdlFolioGarantia.DataSource = ObjAcum.DtResultados
@@ -2519,16 +2567,17 @@ Partial Class Inventarios_RecepcionUsados
Dim ObjAcumuladores As New ClsAcumuladores Dim ObjAcumuladores As New ClsAcumuladores
If ObjAcumuladores.GetNuevoConsecutivoFolio(DdlFolioGarantia.SelectedValue.ToEntero) Then If ObjAcumuladores.GetNuevoConsecutivoFolio(DdlFolioGarantia.SelectedValue.ToEntero) Then
Dim resultado As String = ObjAcumuladores.DtResultados.FiltroPrimeroValor("NuevoConsecutivo") Dim resultado As String = ObjAcumuladores.DtResultados.FiltroPrimeroValor("NuevoConsecutivo")
TxtConsecutivoAjuste.Text = resultado TxtConsecutivoAjuste.Text = (resultado.ToEntero + 1).ToString
UpAjuste.Update() UpAjuste.Update()
End If End If
ObjAcumuladores.Dispose() ObjAcumuladores.Dispose()
End Sub End Sub
Protected Sub CargaTipoDeUso() Protected Sub CargaTipoDeUso()
DdlTipoUso.Items.Clear()
DdlTipoUso.DataSource = GlobalDTAcumTiposUso.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}") DdlTipoUso.DataSource = GlobalDTAcumTiposUso.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
DdlTipoUso.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlTipoUso.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlTipoUso.DataBind DdlTipoUso.DataBind()
End Sub End Sub
Protected Sub DdlTipoUso_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlTipoUso_SelectedIndexChanged(sender As Object, e As EventArgs)
@@ -2637,14 +2686,22 @@ Partial Class Inventarios_RecepcionUsados
If ObjPS.GetPS(CvePS, -1, UsuarioActual.CveEmpresa) Then If ObjPS.GetPS(CvePS, -1, UsuarioActual.CveEmpresa) Then
CveTamaño = ObjPS.DtResultados.FiltroPrimeroValor("CveTamaño").ToEntero CveTamaño = ObjPS.DtResultados.FiltroPrimeroValor("CveTamaño").ToEntero
End If End If
Dim Datos 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 TamañoPS As DataRow If drDatos IsNot Nothing Then
If ObjPS.GetPS(Datos.Item("CvePSCargo").ToString.ToEntero, -1, UsuarioActual.CveEmpresa) Then Dim Importe As Decimal = drDatos("Cargo").ToString.ToDecimal
TamañoPS = ObjPS.DtResultados.FiltroPrimero("") Dim drTamañoPS As DataRow = Nothing
DtMovimientos.Rows.Clear()
If ObjPS.GetPS(drDatos.Item("CvePSCargo").ToString.ToEntero, -1, UsuarioActual.CveEmpresa) Then
drTamañoPS = ObjPS.DtResultados.FiltroPrimero("")
'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,
"", "-1", "-1", "-1", "", "", "", -1, "", "", CveTamaño)
End If
End If End If
AddNew(TamañoPS.Item("CvePS").ToString.ToEntero, TamañoPS.Item("PSCodigo").ToString, TamañoPS.Item("CveUM").ToString.ToEntero, TamañoPS.Item("UnidadMedida").ToString, 1.0, TxtPUFactura.Text.ToDouble,
"", "-1", "-1", "-1", "", "", "", -1, "", "", -1)
ObjPS.Dispose() ObjPS.Dispose()
End Sub End Sub
#End Region #End Region

View File

@@ -120,10 +120,13 @@
<div class="portlet-body"> <div class="portlet-body">
<div class="row"> <div class="row">
<div class="col-md-1" style="text-align:right">
<label class="truncate">F.I.:</label>
</div>
<label class="col-md-1 truncate">F.I.:</label>
<div class="col-md-2"> <div class="col-md-1">
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px; margin-top: 10px;"> <div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px; margin-top: 10px;">
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox> <asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn "> <span class="input-group-btn ">
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton> <asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
@@ -136,9 +139,13 @@
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<label class="col-md-1 truncate">F.F.:</label>
<div class="col-md-2"> <div class="col-md-1" style="text-align:right">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px; margin-top: 10px;"> <label class="truncate">F.F.:</label>
</div>
<div class="col-md-1">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px; margin-top: 10px;">
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox> <asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn "> <span class="input-group-btn ">
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton> <asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
@@ -152,21 +159,29 @@
</div> </div>
</div> </div>
<label class="col-md-2">Almacén Origen:</label> <div class="col-md-2" style="text-align:right">
<div class="col-md-3"> <label >Almacén Origen:</label>
</div>
<div class="col-md-1">
<asp:DropDownList ID="DdlAlmacenOrigen" Width="150px" AppendDataBoundItems="true" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control input-sm input-small select2me"></asp:DropDownList> <asp:DropDownList ID="DdlAlmacenOrigen" Width="150px" AppendDataBoundItems="true" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control input-sm input-small select2me"></asp:DropDownList>
</div> </div>
<div class="col-md-2" style="text-align:right">
<label class="truncate">Almacén Destino:</label>
</div>
<div class="col-md-1">
<asp:DropDownList ID="DdlAlmacenDestino" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control input-sm input-small select2me" Width="150px" runat="server"></asp:DropDownList>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>> <div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
<div class="row"> <div class="row">
<label class="col-md-1 truncate" data-toggle="tooltip" title="Almacén Destino">Almacén Destino:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlAlmacenDestino" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control input-sm input-small select2me" Width="150px" runat="server"></asp:DropDownList>
</div>
<label class="col-md-1 truncate">Recibido:</label> <label class="col-md-1 truncate">Recibido:</label>
<div class="col-md-2"> <div class="col-md-2">
@@ -196,6 +211,7 @@
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-Width="10%" /> <asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-Width="40%" ItemStyle-HorizontalAlign="Left"/> <asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-Width="40%" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField HeaderText="SerieLote" DataField="SerieLote" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left"/> <asp:BoundField HeaderText="SerieLote" DataField="SerieLote" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField HeaderText="Valor" DataField="Valor" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:n}" />
</Columns> </Columns>
<HeaderStyle CssClass="Titulos" /> <HeaderStyle CssClass="Titulos" />
<RowStyle CssClass="Texto" /> <RowStyle CssClass="Texto" />

View File

@@ -101,11 +101,12 @@ Partial Class RepTraspasoAlmacen
'Cuando es titulo 'Cuando es titulo
If e.Row.DBCampo("PS").ToString.Trim = "" Then If e.Row.DBCampo("PS").ToString.Trim = "" Then
e.Row.CssClass = "Totales" e.Row.CssClass = "Totales"
e.Row.Cells(0).Text = String.Format("Folio: <a class=""texto"" style=""color:white;"" target='_blank' href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}'>{0}</a> ", e.Row.DBCampo("FolioSalida"), e.Row.DBCampo("CveMovimientoSalida")) e.Row.Cells(0).Text = String.Format("Folio: <a class=""texto"" style=""color:white;"" target='_blank' href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}'>{0}</a> ", e.Row.DBCampo("FolioSalida"), e.Row.DBCampo("CveMovimientoSalida"))
e.Row.Cells(1).Text = String.Format("{0}", e.Row.DBCampo("FechaMovto").ToString.ToDate.ToShortDateString) e.Row.Cells(1).Text = String.Format("{0}", e.Row.DBCampo("FechaMovto").ToString.ToDate.ToShortDateString)
e.Row.Cells(3).Text = String.Format("Almacen Destino: {0} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Responsable: {1}", e.Row.DBCampo("AlmacenDestino"), e.Row.DBCampo("Recibio")) e.Row.Cells(3).Text = String.Format("Almacen Origen: {0}&nbsp;&nbsp;&nbsp;&nbsp; Almacen Destino: {1} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Responsable: {2}", e.Row.DBCampo("Almacen"), e.Row.DBCampo("AlmacenDestino"), e.Row.DBCampo("Recibio"))
End If End If
End If End If

View File

@@ -1426,7 +1426,7 @@ Partial Class Inventarios_TraspasoAlmacen
e.Row.Cells(2).Text = String.Format("Folio: <a class=""texto"" style=""color:white;"" target='_blank' href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}'>{0}</a> ", e.Row.DBCampo("FolioSalida"), e.Row.DBCampo("CveMovimientoSalida")) e.Row.Cells(2).Text = String.Format("Folio: <a class=""texto"" style=""color:white;"" target='_blank' href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}'>{0}</a> ", e.Row.DBCampo("FolioSalida"), e.Row.DBCampo("CveMovimientoSalida"))
e.Row.Cells(3).Text = String.Format("{0}", e.Row.DBCampo("FechaMovto").ToString.ToDate.ToShortDateString) e.Row.Cells(3).Text = String.Format("{0}", e.Row.DBCampo("FechaMovto").ToString.ToDate.ToShortDateString)
e.Row.Cells(5).Text = String.Format("Almacen: {0} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Responsable: {1}", e.Row.DBCampo("AlmacenDestino"), e.Row.DBCampo("Recibio")) e.Row.Cells(5).Text = String.Format("Almacen Origen: {0} &nbsp;&nbsp;&nbsp; Almacen Destino: {1} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Responsable: {2}", e.Row.DBCampo("Almacen"), e.Row.DBCampo("AlmacenDestino"), e.Row.DBCampo("Recibio"))
Else Else
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onkeyup", String.Format("ValidaCantidad(this,{0});", e.Row.DBCampo("Cantidad"))) e.Row.FCTextBox("TxtCantidad").Attributes.Add("onkeyup", String.Format("ValidaCantidad(this,{0});", e.Row.DBCampo("Cantidad")))

View File

@@ -7299,6 +7299,7 @@ Partial Class OC
Dim ObjPS As New ClsProductosServicios Dim ObjPS As New ClsProductosServicios
If ObjPS.AddPSSimplificado(PS) > 0 Then If ObjPS.AddPSSimplificado(PS) > 0 Then
RecargaGlobalEquivalencias() RecargaGlobalEquivalencias()
RecargaPSGlobal()
Alert("El P/S fue agregado correctamente.") Alert("El P/S fue agregado correctamente.")
End If End If
ObjPS.Dispose() ObjPS.Dispose()
@@ -7312,10 +7313,10 @@ Partial Class OC
UpAgregarPS.Update() UpAgregarPS.Update()
RegistraScript("$('#DivAgregarPS').modal('hide');") RegistraScript("$('#DivAgregarPS').modal('hide');")
RecargaPSGlobal()
End Sub End Sub
Private Sub RecargaPSGlobal() Private Sub RecargaPSGlobal()
'GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) = Nothing GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) = Nothing
'Dim ObjPS As New ClsProductosServicios 'Dim ObjPS As New ClsProductosServicios
'If ObjPS.GetPSSimplificado(UsuarioActual.CveEmpresa) Then Application(String.Format("GlobalDTPSSimplificado{0}", UsuarioActual.CveEmpresa)) = ObjPS.DtResultados.AsEnumerable() 'If ObjPS.GetPSSimplificado(UsuarioActual.CveEmpresa) Then Application(String.Format("GlobalDTPSSimplificado{0}", UsuarioActual.CveEmpresa)) = ObjPS.DtResultados.AsEnumerable()
@@ -7325,10 +7326,12 @@ Partial Class OC
Private Sub RecargaGlobalEquivalencias() Private Sub RecargaGlobalEquivalencias()
Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalEquivalencias) GeneraGlobalEquivalencias()
Hilo.Start() 'Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalEquivalencias)
'Hilo.Start()
End Sub End Sub
Private Sub GeneraGlobalEquivalencias() Private Sub GeneraGlobalEquivalencias()
GlobalDTProductosServiciosEquivalencias(-1, -1, UsuarioActual.CveEmpresa) = Nothing
'Dim dtt As DataTable = GlobalDTProductosServiciosEquivalencias(-1, -1, UsuarioActual.CveEmpresa) 'Dim dtt As DataTable = GlobalDTProductosServiciosEquivalencias(-1, -1, UsuarioActual.CveEmpresa)
'Dim ObjPS = New ClsProductosServicios 'Dim ObjPS = New ClsProductosServicios
'If ObjPS.GetPSEquivalencias(-1, UsuarioActual.CveEmpresa) Then 'If ObjPS.GetPSEquivalencias(-1, UsuarioActual.CveEmpresa) Then

View File

@@ -75,31 +75,30 @@ Partial Class Ventas_ActualizarPrecios
Public Sub CargaPreciosLista() Public Sub CargaPreciosLista()
DdlPrecioLista.ITEMS.Clear DdlPrecioLista.Items.Clear()
Dim ObjVta As New ClsVentas
Dim primerItem As String = "" If UsuarioActual.Empresa.Funcionalidad(404).ToString = "1" Then 'si manneja precios de lista
If ObjVta.GetPrecioListas(UsuarioActual.CveEmpresa) Then Dim ObjVta As New ClsVentas
DdlPrecioLista.DataSource = ObjVta.DtResultados.Copy() Dim primerItem As String = ""
DdlPrecioListaCarga.DataSource = ObjVta.DtResultados.Copy() If ObjVta.GetPrecioListas(UsuarioActual.CveEmpresa) Then
primerItem = ObjVta.DtResultados.FiltroPrimeroValor("CvePrecioLista") DdlPrecioLista.DataSource = ObjVta.DtResultados.Copy()
End If DdlPrecioListaCarga.DataSource = ObjVta.DtResultados.Copy()
ObjVta.Dispose() primerItem = ObjVta.DtResultados.FiltroPrimeroValor("CvePrecioLista")
End If
ObjVta.Dispose()
DdlPrecioLista.DataBind() DdlPrecioLista.DataBind()
DdlPrecioListaCarga.DataBind() DdlPrecioListaCarga.DataBind()
If (DdlPrecioLista.Items.Count = 1) Then If (DdlPrecioLista.Items.Count = 1) Then
DdlPrecioLista.Items.FindByValue(primerItem).Selected = True DdlPrecioLista.Items.FindByValue(primerItem).Selected = True
End If End If
Else
DdlPrecioLista.Items.Insert(0, New ListItem("Seleccione", "-1"))
If UsuarioActual.CveEmpresa.Contiene(1, 140) Then
DdlPrecioLista.Items.Insert(0, New ListItem("Sin Precio Lista", "-2")) DdlPrecioLista.Items.Insert(0, New ListItem("Sin Precio Lista", "-2"))
DdlPrecioListaCarga.Items.Insert(0, New ListItem("Sin Precio Lista", "-2")) DdlPrecioListaCarga.Items.Insert(0, New ListItem("Sin Precio Lista", "-2"))
End If End If
End Sub End Sub
Public Sub CargaPS() Public Sub CargaPS()

View File

@@ -258,7 +258,7 @@
<asp:UpdatePanel runat="server" ID="UpPorcentajeMarcas" RenderMode="Inline" UpdateMode="Conditional"> <asp:UpdatePanel runat="server" ID="UpPorcentajeMarcas" RenderMode="Inline" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<li> <li>
<asp:LinkButton ID="LnkPorcentajeMarcas" Visible="False" data-toggle="tooltip" data-placement="left" title="Condiciones Comerciales" runat="server" Text="<i class='fa fa-pencil'></i> Modificar Precio por Marca"></asp:LinkButton> <asp:LinkButton ID="LnkPorcentajeMarcas" Visible="False" data-toggle="tooltip" data-placement="left" title="Condiciones Comerciales" runat="server" Text="<i class='fa fa-pencil'></i>Condiciones Comerciales"></asp:LinkButton>
</li> </li>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>

View File

@@ -261,7 +261,7 @@
<asp:UpdatePanel ID="UPVentas" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPVentas" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvCxC" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas por Cobrar Pendientes" <asp:GridView ID="GvCxC" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas por Cobrar Pendientes"
DataKeyNames="TipoDocto,CveVenta,CveCliente,SerieFolio,Original,SubTotal,IVA,IEPS,RetIVA,RetISR,Num3,CveSubProyecto,CveMoneda,Saldo,TipoCambio, RFC,UUID,Fecha,PorcentajeIVA" DataKeyNames="TipoDocto,CveVenta,CveCliente,SerieFolio,Original,SubTotal,IVA,IEPS,RetIVA,RetISR,Num3,CveSubProyecto,CveMoneda,Saldo,TipoCambio, RFC,UUID,Fecha,PorcentajeIVA,DescuentoProntoPago"
CssClass="table table-striped table-advance table-hover Widthall" Style="text-align: center;" GridLines="None"> CssClass="table table-striped table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
<Columns> <Columns>
<asp:TemplateField> <asp:TemplateField>
@@ -338,6 +338,12 @@
<asp:RangeValidator ID="RVComision" runat="server" Enabled="false" ErrorMessage="*" ControlToValidate="TxtComision" Display="Dynamic" Type="Double"></asp:RangeValidator> <asp:RangeValidator ID="RVComision" runat="server" Enabled="false" ErrorMessage="*" ControlToValidate="TxtComision" Display="Dynamic" Type="Double"></asp:RangeValidator>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-HorizontalAlign="Center">
<HeaderTemplate>Descuento Pronto Pago</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlDescuentoProntoPago" runat="server" Text='<%# Eval("DescuentoProntoPago", "{0:N2}") %>'></asp:Literal>&nbsp;
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="300px"> <asp:TemplateField ItemStyle-Width="300px">
<HeaderTemplate>Auxiliar</HeaderTemplate> <HeaderTemplate>Auxiliar</HeaderTemplate>
<ItemTemplate> <ItemTemplate>

View File

@@ -445,16 +445,22 @@ Partial Class Ventas_ClientesAbonar
Dim FechaCorte As Date = IIf(CveIESustitucion > 0, (FechaCorteIE.ToDate).ToShortDateString, DateTime.Now.AddYears(1).ToShortDateString).ToString.ToDate Dim FechaCorte As Date = IIf(CveIESustitucion > 0, (FechaCorteIE.ToDate).ToShortDateString, DateTime.Now.AddYears(1).ToShortDateString).ToString.ToDate
Dim SumDescuentoProntoPago As Double = 0.0
If Mov.GetCxCClienteDetalle(ViewState("CveCliente").ToString.ToEntero, FechaI, FechaF, pCveMoneda, CveSubProyecto, UsuarioActual.CveEmpresa, CveClienteSucursal, FechaCorte:=FechaCorte, CveIESustitucion:=CveIESustitucion) Then If Mov.GetCxCClienteDetalle(ViewState("CveCliente").ToString.ToEntero, FechaI, FechaF, pCveMoneda, CveSubProyecto, UsuarioActual.CveEmpresa, CveClienteSucursal, FechaCorte:=FechaCorte, CveIESustitucion:=CveIESustitucion) Then
Dim TmpCxCAux As DataTable
TmpCxCAux = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio")
SumDescuentoProntoPago = TmpCxCAux.SUM("DescuentoProntoPago")
GvCxC.DataSource = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio") GvCxC.DataSource = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio")
GvCxC.DataBind() GvCxC.DataBind()
CveMoneda = pCveMoneda CveMoneda = pCveMoneda
End If
End If
TxtImporte.Text = "" TxtImporte.Text = ""
TxtObservaciones.Text = "" TxtObservaciones.Text = ""
If SumDescuentoProntoPago > 0.0 Then
GvCxC.Columns("DescuentoProntoPago").Visible = True
End If
Mov.Dispose() Mov.Dispose()
UPVentas.Update() UPVentas.Update()
@@ -608,8 +614,7 @@ Partial Class Ventas_ClientesAbonar
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1}); FnCambia({2},this,{1},0,{3},{4});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo"), e.Row.FCCheckBox("Chk").ClientID, CveMonedaFiltro, moneda)) e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1}); FnCambia({2},this,{1},0,{3},{4});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo"), e.Row.FCCheckBox("Chk").ClientID, CveMonedaFiltro, moneda))
If Not UsuarioActual.Empresa.Funcionalidad(536) = "1" Then If Not UsuarioActual.Empresa.Funcionalidad(536) = "1" Then
'si es remisión y factura no timbrada If e.Row.DBCampo("TipoDocto") = "Rem" Then
If e.Row.DBCampo("TipoDocto") = "Rem" OrElse (e.Row.DBCampo("TipoDocto") = "Ing" AndAlso e.Row.DBCampo("FolioFiscal") = "") Then
e.Row.FCCheckBox("Chk").Visible = False ' que no se pueda pagar si es remisión e.Row.FCCheckBox("Chk").Visible = False ' que no se pueda pagar si es remisión
e.Row.Cells(0).ToolTip = "El documento es remisión y no se puede realizar el pago" e.Row.Cells(0).ToolTip = "El documento es remisión y no se puede realizar el pago"
End If End If
@@ -872,6 +877,7 @@ Partial Class Ventas_ClientesAbonar
CveVentasPago.Add(gvr.DataKey("CveVenta").ToEntero) CveVentasPago.Add(gvr.DataKey("CveVenta").ToEntero)
SeriesPago.Add(gvr.DataKey("SerieFolio")) SeriesPago.Add(gvr.DataKey("SerieFolio"))
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) Then EsAnticipoEspecial = True
@@ -1243,7 +1249,7 @@ Partial Class Ventas_ClientesAbonar
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
@@ -1281,7 +1287,7 @@ Partial Class Ventas_ClientesAbonar
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
Dim Diferencia As Decimal = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVentaValuacion) - ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta Dim Diferencia As Decimal = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVentaValuacion) - ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta

View File

@@ -5965,7 +5965,7 @@
</div> </div>
<%--APLICAR REMISIONES DE NC--%> <%--APLICAR REMISIONES DE NC--%>
<div id="ModalAplicarRemisionesNC" class="modal ADS fade" role="dialog"> <div id="ModalAplicarRemisionesNC" class="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UpModalRemisionesNC" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpModalRemisionesNC" class="modal-dialog rowpadding modal-lg" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
@@ -5988,6 +5988,7 @@
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:HyperLinkField DataNavigateUrlFields="CveVenta" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="Folio" HeaderText="Folio" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" /> <asp:HyperLinkField DataNavigateUrlFields="CveVenta" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="Folio" HeaderText="Folio" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" />
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" /> <asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right"> <asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
<ItemTemplate> <ItemTemplate>

View File

@@ -5840,9 +5840,9 @@ Partial Class Ventas
If Not EsValido Then If Not EsValido Then
MensajeCosto.AppendFormat("El Producto <b>{0}</b>. No se puede vender a un precio menor de su Costo <br/>", DatarowPS("PS").ToString) MensajeCosto.AppendFormat("El Producto <b>{0}</b>. No se puede vender a un precio menor de su Costo <br/>", DatarowPS("PS").ToString)
If TienePermisoImportes Then If TienePermisoImportes Then
MensajeCosto.AppendFormat("El costo del producto es: <b>${0}</b> <br/>", Costo) MensajeCosto.AppendFormat("El costo del producto es: <b>${0:#,###.00}</b> <br/>", Costo)
MensajeCosto.AppendFormat("El rango menor aceptado es: {0}% <b>${1}</b> <br/>", UsuarioActual.Empresa.Funcionalidad(129).ToEntero, CostoMenor) MensajeCosto.AppendFormat("El rango menor aceptado es: {0:#,###.00}% <b>${1}</b> <br/>", UsuarioActual.Empresa.Funcionalidad(129).ToEntero, CostoMenor)
MensajeCosto.AppendFormat("El precio indicado es: <b>${0}</b> ({1}% de ganancia) <br/>", PU.FormatoNumero, (If(Costo > 0, ((PU - Costo) * 100) / Costo, 0)).FormatoNumero) MensajeCosto.AppendFormat("El precio indicado es: <b>${0:#,###.00}</b> ({1}% de ganancia) <br/>", PU.FormatoNumero, (If(Costo > 0, ((PU - Costo) * 100) / Costo, 0)).FormatoNumero)
End If End If
@@ -5855,9 +5855,9 @@ Partial Class Ventas
If Not EsValidoMayor Then If Not EsValidoMayor Then
MensajeCosto.AppendFormat("El Producto <b>{0}</b>. No se puede vender a un precio mayor de su rango aceptado<br/>", HdnPS.Value) MensajeCosto.AppendFormat("El Producto <b>{0}</b>. No se puede vender a un precio mayor de su rango aceptado<br/>", HdnPS.Value)
If TienePermisoImportes Then If TienePermisoImportes Then
MensajeCosto.AppendFormat("El costo del producto es: <b>${0}</b> <br/>", Costo) MensajeCosto.AppendFormat("El costo del producto es: <b>${0:#,###.00}</b> <br/>", Costo)
MensajeCosto.AppendFormat("El rango mayor aceptado es: {0}% <b>${1}</b> <br/>", UsuarioActual.Empresa.Funcionalidad(133).ToEntero, CostoMayor) MensajeCosto.AppendFormat("El rango mayor aceptado es: {0}% <b>${1:#,###.00}</b> <br/>", UsuarioActual.Empresa.Funcionalidad(133).ToEntero, CostoMayor)
MensajeCosto.AppendFormat("El precio indicado es: <b>${0}</b> ({1}% de ganancia) <br/>", PU.FormatoNumero, (If(Costo > 0, ((PU - Costo) * 100) / Costo, 0)).FormatoNumero) MensajeCosto.AppendFormat("El precio indicado es: <b>${0:#,###.00}</b> ({1}% de ganancia) <br/>", PU.FormatoNumero, (If(Costo > 0, ((PU - Costo) * 100) / Costo, 0)).FormatoNumero)
End If End If
Alert(MensajeCosto.ToString, TipoMensaje.MsgAdvertencia) Alert(MensajeCosto.ToString, TipoMensaje.MsgAdvertencia)
e.Cancel = True e.Cancel = True
@@ -6422,18 +6422,18 @@ Partial Class Ventas
MensajeCosto.AppendFormat("El Producto <b>{0}</b>. No se puede vender a un precio menor de su Costo ni a un precio mayor de su rango aceptado<br/>", dr("PS").ToString) MensajeCosto.AppendFormat("El Producto <b>{0}</b>. No se puede vender a un precio menor de su Costo ni a un precio mayor de su rango aceptado<br/>", dr("PS").ToString)
If TienePermisoImportes Then If TienePermisoImportes Then
MensajeCosto.AppendFormat("El costo del producto es: <b>{0}$</b> <br/>", Costo) MensajeCosto.AppendFormat("El costo del producto es: <b>{0:#,###.00}$</b> <br/>", Costo)
MensajeCosto.AppendFormat("El rango menor aceptado es: {0} <b>{1}$</b> <br/>", UsuarioActual.Empresa.Funcionalidad(129).ToEntero, CostoMenor) MensajeCosto.AppendFormat("El rango menor aceptado es: {0} <b>{1:#,###.00}$</b> <br/>", UsuarioActual.Empresa.Funcionalidad(129).ToEntero, CostoMenor)
MensajeCosto.AppendFormat("El precio indicado es: <b>{0}$</b> ({1}% de ganancia) <br/>", PU.FormatoNumero, If(Costo > 0, ((PU - Costo) * 100) / Costo, 0)) MensajeCosto.AppendFormat("El precio indicado es: <b>{0:#,###.00}$</b> ({1}% de ganancia) <br/>", PU.FormatoNumero, If(Costo > 0, ((PU - Costo) * 100) / Costo, 0))
End If End If
End If End If
If Not EsValidoMayor Then If Not EsValidoMayor Then
MensajeCosto.AppendFormat("El Producto <b>{0}</b>. No se puede vender a un precio mayor de su rango aceptado<br/>", dr("PS").ToString) MensajeCosto.AppendFormat("El Producto <b>{0}</b>. No se puede vender a un precio mayor de su rango aceptado<br/>", dr("PS").ToString)
If TienePermisoImportes Then If TienePermisoImportes Then
MensajeCosto.AppendFormat("El costo del producto es: <b>{0}$</b> <br/>", Costo) MensajeCosto.AppendFormat("El costo del producto es: <b>{0:#,###.00}$</b> <br/>", Costo)
MensajeCosto.AppendFormat("El rango mayor aceptado es: {0} <b>{1}$</b> <br/>", UsuarioActual.Empresa.Funcionalidad(133).ToEntero, CostoMayor) MensajeCosto.AppendFormat("El rango mayor aceptado es: {0} <b>{1:#,###.00}$</b> <br/>", UsuarioActual.Empresa.Funcionalidad(133).ToEntero, CostoMayor)
MensajeCosto.AppendFormat("El precio indicado es: <b>{0}$</b> ({1}% de ganancia) <br/>", PU.FormatoNumero, If(Costo > 0, ((PU - Costo) * 100) / Costo, 0)) MensajeCosto.AppendFormat("El precio indicado es: <b>{0:#,###.00}$</b> ({1}% de ganancia) <br/>", PU.FormatoNumero, If(Costo > 0, ((PU - Costo) * 100) / Costo, 0))
End If End If
End If End If
@@ -6454,6 +6454,27 @@ Partial Class Ventas
End If End If
End If End If
'Valida si en caso de que el detalle tenga llantas o polizas se agreguén kilometraje/serie en la parte de observaciones(solo para el caso de empresas llanteras)
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
If TxtObsFact.Text = "" Then
Dim FaltaObservacion As Integer = -1
For Each PS As GridViewRow In GvPS.Rows
Dim PsRenglon As GridViewRow = PS
Dim CveClasificacion As Integer = PsRenglon.DataKey("CveClasificacion").ToEntero
If CveClasificacion = 20345 Or CveClasificacion = 20342 Then
FaltaObservacion = CveClasificacion
Exit For
End If
Next
If FaltaObservacion = 20345 Then
Alert("No se ha especificado la <strong>serie</strong> para la poliza en la sección de Observaciones", TipoMensaje.MsgAdvertencia)
Exit Sub
ElseIf FaltaObservacion = 20342 Then
Alert("No se ha especificado el <strong>kilometraje</strong> para la llanta en el sección de Observaciones", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
End If
If UsuarioActual.Empresa.Funcionalidad(135) = "1" And DdlTipoComprobante.SelectedValue = "Cot" Then If UsuarioActual.Empresa.Funcionalidad(135) = "1" And DdlTipoComprobante.SelectedValue = "Cot" Then
Alert("Se mando autorización al supervisor.", TipoMensaje.MsgInformacion) Alert("Se mando autorización al supervisor.", TipoMensaje.MsgInformacion)
@@ -6494,6 +6515,7 @@ Partial Class Ventas
End If End If
EmitirImprimirNew() EmitirImprimirNew()
End Sub End Sub
#End Region #End Region
@@ -10658,7 +10680,7 @@ Partial Class Ventas
If GvInv.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("cbInv").Checked) > 0 Then If GvInv.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("cbInv").Checked) > 0 Then
Dim CveAlmacen = ddlAlmacen.SelectedValue.ToEntero Dim CveAlmacen = ddlAlmacen.SelectedValue.ToEntero
Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, 3, factura.CveMoneda, factura.Fecha, -1, factura.CveUsuario, factura.CveEmpresa, -1, factura.CveVenta, -1, -1, Modulo:="Vta/E") Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, 3, factura.CveMoneda, factura.Fecha, -1, factura.CveUsuario, factura.CveEmpresa, -1, factura.CveVenta, -1, -1, Modulo:="Vta/E1")
If CveMovimientoInventario <= 0 Then If CveMovimientoInventario <= 0 Then
OcurrioError = True OcurrioError = True
@@ -12667,8 +12689,8 @@ Partial Class Ventas
Dim Fecha As Date = Now Dim Fecha As Date = Now
'Creamos el movimiento de entrada y el movimiento de salida 'Creamos el movimiento de entrada y el movimiento de salida
Dim CveMovimientoInventarioEntrada As Integer = ObjInventario.AddMovimiento(CveAlmacen, 18, CveMoneda, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveDevolucion, -1, -1, MovimientoFijo:=True, Modulo:="Vta/E") Dim CveMovimientoInventarioEntrada As Integer = ObjInventario.AddMovimiento(CveAlmacen, 18, CveMoneda, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveDevolucion, -1, -1, MovimientoFijo:=True, Modulo:="Vta/E2")
Dim CveMovimientoInventarioSalida As Integer = ObjInventario.AddMovimiento(CveAlmacen, 3, CveMoneda, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaNueva, -1, -1, MovimientoFijo:=True, Modulo:="Vta/E") Dim CveMovimientoInventarioSalida As Integer = ObjInventario.AddMovimiento(CveAlmacen, 3, CveMoneda, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaNueva, -1, -1, MovimientoFijo:=True, Modulo:="Vta/E3")
If CveMovimientoInventarioEntrada > 0 AndAlso CveMovimientoInventarioSalida > 0 Then If CveMovimientoInventarioEntrada > 0 AndAlso CveMovimientoInventarioSalida > 0 Then
@@ -13065,7 +13087,7 @@ Partial Class Ventas
Dim PorcentajePrecio As Double = 0 Dim PorcentajePrecio As Double = 0
If PrecioSugerido = 0 Then If PrecioSugerido = 0 Then
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("CvePrecioLista", $"CveCliente = {CveCliente}").ToEntero CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero
If CvePrecioListaPS > 0 Then If CvePrecioListaPS > 0 Then
Dim ObjPS As New ClsProductosServicios Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
@@ -13089,13 +13111,16 @@ Partial Class Ventas
End If End If
Dim PrecioBaseCosto As Decimal = 0
Dim ObjClasificaciones As New ClsClasificaciones 'Dim ObjClasificaciones As New ClsClasificaciones
If ObjClasificaciones.GetClasificaciones() Then 'If ObjClasificaciones.GetClasificaciones() Then
PrecioBaseCosto = ObjClasificaciones.DtResultados.FiltroPrimeroValor("PrecioBaseCosto", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveClasificacion = {drPS("CveClasificacion")}").ToDecimal ' PrecioBaseCosto = ObjClasificaciones.DtResultados.FiltroPrimeroValor("PrecioBaseCosto", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveClasificacion = {drPS("CveClasificacion")}").ToDecimal
End If 'End If
If PrecioSugerido > 0 Then If PrecioSugerido > 0 Then
Dim PrecioBaseCosto As Decimal = 0
PrecioBaseCosto = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=drPS("CveClasificacion").ToString.ToEntero).FiltroPrimeroValor("PrecioBaseCosto", "").ToDecimal
If PrecioBaseCosto > 0 Then If PrecioBaseCosto > 0 Then
PrecioSugerido = PrecioSugerido * ((PrecioBaseCosto / 100) + 1) PrecioSugerido = PrecioSugerido * ((PrecioBaseCosto / 100) + 1)
End If End If
@@ -13733,11 +13758,11 @@ Partial Class Ventas
Dim MensajeCosto As New StringBuilder Dim MensajeCosto As New StringBuilder
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201) Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
If Not EsValido Then If Not EsValido Then
MensajeCosto.AppendFormat("El Producto <b>{0}</b>. No se puede vender a un precio menor de su Costo <br/>", HdnPS.Value) MensajeCosto.AppendFormat("El Producto <b>{0}-{1}</b>. No se puede vender a un precio menor de su Costo <br/>", HdnCodigoPS.Value, HdnPS.Value)
If TienePermisoImportes Then If TienePermisoImportes Then
MensajeCosto.AppendFormat("El costo del producto es: <b>${0}</b> <br/>", Costo) MensajeCosto.AppendFormat("El costo del producto es: <b>${0:#,###.00}</b> <br/>", Costo)
MensajeCosto.AppendFormat("El rango menor aceptado es: {0}% <b>${1}</b> <br/>", UsuarioActual.Empresa.Funcionalidad(129).ToEntero, CostoMenor) MensajeCosto.AppendFormat("El rango menor aceptado es: {0}% <b>${1:#,###.00}</b> <br/>", UsuarioActual.Empresa.Funcionalidad(129).ToEntero, CostoMenor)
MensajeCosto.AppendFormat("El precio indicado es: <b>${0}</b> ({1}% de ganancia) <br/>", PU.FormatoNumero, (If(Costo > 0, ((PU - Costo) * 100) / Costo, 0)).FormatoNumero) MensajeCosto.AppendFormat("El precio indicado es: <b>${0:#,###.00}</b> ({1}% de ganancia) <br/>", PU.FormatoNumero, (If(Costo > 0, ((PU - Costo) * 100) / Costo, 0)).FormatoNumero)
End If End If
Alert(String.Format(MensajeCosto.ToString), TipoMensaje.MsgAdvertencia) Alert(String.Format(MensajeCosto.ToString), TipoMensaje.MsgAdvertencia)
@@ -13748,9 +13773,9 @@ Partial Class Ventas
If Not EsValidoMayor Then If Not EsValidoMayor Then
MensajeCosto.AppendFormat("El Producto <b>{0}</b>. No se puede vender a un precio mayor de su rango aceptado<br/>", HdnPS.Value) MensajeCosto.AppendFormat("El Producto <b>{0}</b>. No se puede vender a un precio mayor de su rango aceptado<br/>", HdnPS.Value)
If TienePermisoImportes Then If TienePermisoImportes Then
MensajeCosto.AppendFormat("El costo del producto es: <b>${0}</b> <br/>", Costo) MensajeCosto.AppendFormat("El costo del producto es: <b>${0:#,###.00}</b> <br/>", Costo)
MensajeCosto.AppendFormat("El rango mayor aceptado es: {0}% <b>${1}</b> <br/>", UsuarioActual.Empresa.Funcionalidad(133).ToEntero, CostoMayor) MensajeCosto.AppendFormat("El rango mayor aceptado es: {0}% <b>${1:#,###.00}</b> <br/>", UsuarioActual.Empresa.Funcionalidad(133).ToEntero, CostoMayor)
MensajeCosto.AppendFormat("El precio indicado es: <b>${0}</b> ({1}% de ganancia) <br/>", PU.FormatoNumero, (If(Costo > 0, ((PU - Costo) * 100) / Costo, 0)).FormatoNumero) MensajeCosto.AppendFormat("El precio indicado es: <b>${0:#,###.00}</b> ({1}% de ganancia) <br/>", PU.FormatoNumero, (If(Costo > 0, ((PU - Costo) * 100) / Costo, 0)).FormatoNumero)
End If End If
Alert(MensajeCosto.ToString, TipoMensaje.MsgAdvertencia) Alert(MensajeCosto.ToString, TipoMensaje.MsgAdvertencia)
Return False Return False
@@ -15320,24 +15345,25 @@ Partial Class Ventas
If ErrorList.Count = 0 AndAlso MovDetalle.Rows.Count > 0 Then If ErrorList.Count = 0 AndAlso MovDetalle.Rows.Count > 0 Then
Dim CveMovimientoSalidaPorTraspaso As Integer = -1 Dim CveMovimientoSalidaPorTraspaso As Integer = -1
Dim CveConceptoSalidaAlmacen As Integer = 3
'SALIDA DEFINITIVA DEL SISTEMA 'SALIDA DEFINITIVA DEL SISTEMA
If UsuarioActual.Empresa.Funcionalidad(575) = "1" Then If UsuarioActual.Empresa.Funcionalidad(575) = "1" Then
'Le damos salida normal CveConceptoSalidaAlmacen = 40
If ConSalida Then ''Le damos salida normal
GeneroMovimientoAlmacen = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenSalida, 40, CveMoneda, CveRemision, AplicaMovimientoDetalleEntrada:=AplicaMovimientoDetalleEntrada, MovimientoPrePoliza:=True, ObjConta:=ObjConta) > 0 'If ConSalida Then
' GeneroMovimientoAlmacen = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenSalida, 40, CveMoneda, CveVenta, AplicaMovimientoDetalleEntrada:=AplicaMovimientoDetalleEntrada, MovimientoPrePoliza:=True, ObjConta:=ObjConta) > 0
If Not GeneroMovimientoAlmacen Then ' If Not GeneroMovimientoAlmacen Then
OcurrioError = True ' OcurrioError = True
Exit For ' Exit For
End If ' End If
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then ' If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
If Not GeneroMovimientoAlmacen Then ' If Not GeneroMovimientoAlmacen Then
OcurrioError = Not GenerarMovimientoAlmacenVirtual(CveRemision, ObjInventario, ObjFactura) ' OcurrioError = Not GenerarMovimientoAlmacenVirtual(CveRemision, ObjInventario, ObjFactura)
End If ' End If
End If ' End If
End If 'End If
Else Else
'Le damos salida de apartado por traspaso 'Le damos salida de apartado por traspaso
CveMovimientoSalidaPorTraspaso = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenSalida, 8, CveMoneda, CveRemision, AplicaMovimientoDetalleEntrada:=AplicaMovimientoDetalleEntrada) CveMovimientoSalidaPorTraspaso = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenSalida, 8, CveMoneda, CveRemision, AplicaMovimientoDetalleEntrada:=AplicaMovimientoDetalleEntrada)
@@ -15357,23 +15383,24 @@ Partial Class Ventas
End If End If
End If End If
'Le damos salida normal
If ConSalida AndAlso Not OcurrioError Then
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then End If
OcurrioError = Not GenerarMovimientoAlmacenVirtual(CveRemision, ObjInventario, ObjFactura) 'Le damos salida normal
End If If ConSalida AndAlso Not OcurrioError Then
If Not OcurrioError Then
GeneroMovimientoAlmacen = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenEntrada, 3, CveMoneda, ObjFactura.CveVenta, MovimientoPrePoliza:=True, ObjConta:=ObjConta) > 0
If Not GeneroMovimientoAlmacen Then
OcurrioError = True
Exit For
End If
End If
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
OcurrioError = Not GenerarMovimientoAlmacenVirtual(CveRemision, ObjInventario, ObjFactura)
End If End If
If Not OcurrioError Then
GeneroMovimientoAlmacen = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenEntrada, CveConceptoSalidaAlmacen, CveMoneda, ObjFactura.CveVenta, MovimientoPrePoliza:=True, ObjConta:=ObjConta) > 0
If Not GeneroMovimientoAlmacen Then
OcurrioError = True
Exit For
End If
End If
End If End If
Else Else
@@ -15493,7 +15520,7 @@ Partial Class Ventas
'Creamos el movimiento 'Creamos el movimiento
Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, ConceptoEntrada, CveMoneda, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, ConceptoEntrada, CveMoneda, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1,
CveMovimientoRelacionado:=CveMovimientoRelacionado, Modulo:="Vta/E") CveMovimientoRelacionado:=CveMovimientoRelacionado, Modulo:="Vta/E4")
If CveMovimientoInventario > 0 Then If CveMovimientoInventario > 0 Then
@@ -15518,7 +15545,7 @@ Partial Class Ventas
'COMIENZA: VENTADETALLE 'COMIENZA: VENTADETALLE
'CUANDO SEA SALIDA VA POR LA VENTA DETALLE DE LA FACTURA DE LA REMISION - OJO!! SOLO FUNCIONA HASTA ORITA QUE SE HACE SALIDA SOLO CUANDO SE FACTURA LA REMISION 'CUANDO SEA SALIDA VA POR LA VENTA DETALLE DE LA FACTURA DE LA REMISION - OJO!! SOLO FUNCIONA HASTA ORITA QUE SE HACE SALIDA SOLO CUANDO SE FACTURA LA REMISION
Dim CveVentaDetalle = If(ConceptoEntrada = 3, TmpDT.FiltroPrimeroValor("CveVentaDetalle", $"Consec={Consec}").ToEntero, MovDet("CveVentaDetalle").ToString.ToEntero) Dim CveVentaDetalle = If(ConceptoEntrada.Contiene(3, 40), TmpDT.FiltroPrimeroValor("CveVentaDetalle", $"Consec={Consec}").ToEntero, MovDet("CveVentaDetalle").ToString.ToEntero)
'CUANDO LA VENTADETALLE NO TENGA VALOR DEBE MARCAR ERROR, NUEVA RESTRICCION DE ALMACEN 'CUANDO LA VENTADETALLE NO TENGA VALOR DEBE MARCAR ERROR, NUEVA RESTRICCION DE ALMACEN
If CveVentaDetalle < 0 Then If CveVentaDetalle < 0 Then
Alert("no se encontro la venta detalle. Por favor comuniquese con atención SIG.", TipoMensaje.ToastError) Alert("no se encontro la venta detalle. Por favor comuniquese con atención SIG.", TipoMensaje.ToastError)
@@ -19422,7 +19449,7 @@ Partial Class Ventas
'MOVIMIENTO DE SALIDA POR TRASPASO DEL ALMACEN DE CONSIGNACION 'MOVIMIENTO DE SALIDA POR TRASPASO DEL ALMACEN DE CONSIGNACION
CveMovimientoSalidaConsignacion = ObjInventario.AddMovimiento(CveAlmacenExistenciasContrato, 8, 1, factura.Fecha, -1, factura.CveUsuario, factura.CveEmpresa, -1, factura.CveVenta, -1, -1, Modulo:="Vta/E") CveMovimientoSalidaConsignacion = ObjInventario.AddMovimiento(CveAlmacenExistenciasContrato, 8, 1, factura.Fecha, -1, factura.CveUsuario, factura.CveEmpresa, -1, factura.CveVenta, -1, -1, Modulo:="Vta/E5")
If CveMovimientoSalidaConsignacion > 0 Then If CveMovimientoSalidaConsignacion > 0 Then
Dim CveProducto As Integer Dim CveProducto As Integer
Dim CveUnidad As Integer Dim CveUnidad As Integer
@@ -19465,7 +19492,7 @@ Partial Class Ventas
'ENTRADA POR TRASPASO A GENERAL 'ENTRADA POR TRASPASO A GENERAL
CveMovimientoEntradaGeneral = ObjInventario.AddMovimiento(CveAlmacenOrigenContrato, 9, 1, factura.Fecha, -1, factura.CveUsuario, factura.CveEmpresa, -1, factura.CveVenta, -1, -1, CveMovimientoRelacionado:=CveMovimientoSalidaConsignacion, Modulo:="Vta/E") CveMovimientoEntradaGeneral = ObjInventario.AddMovimiento(CveAlmacenOrigenContrato, 9, 1, factura.Fecha, -1, factura.CveUsuario, factura.CveEmpresa, -1, factura.CveVenta, -1, -1, CveMovimientoRelacionado:=CveMovimientoSalidaConsignacion, Modulo:="Vta/E6")
If CveMovimientoEntradaGeneral > 0 Then If CveMovimientoEntradaGeneral > 0 Then
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaConsignacion, UsuarioActual.CveEmpresa) Then If ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaConsignacion, UsuarioActual.CveEmpresa) Then
For Each Dr As DataRow In ObjInventario.DtResultados.Rows For Each Dr As DataRow In ObjInventario.DtResultados.Rows
@@ -19479,7 +19506,7 @@ Partial Class Ventas
End If End If
'SALIDA GENERAL 'SALIDA GENERAL
CveMovimientoEntradaGeneral = ObjInventario.AddMovimiento(CveAlmacenOrigenContrato, 3, 1, factura.Fecha, -1, factura.CveUsuario, factura.CveEmpresa, -1, factura.CveVenta, -1, -1, Modulo:="Vta/E") CveMovimientoEntradaGeneral = ObjInventario.AddMovimiento(CveAlmacenOrigenContrato, 3, 1, factura.Fecha, -1, factura.CveUsuario, factura.CveEmpresa, -1, factura.CveVenta, -1, -1, Modulo:="Vta/E7")
If CveMovimientoEntradaGeneral > 0 Then If CveMovimientoEntradaGeneral > 0 Then
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaConsignacion, UsuarioActual.CveEmpresa) Then If ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaConsignacion, UsuarioActual.CveEmpresa) Then
For Each Dr As DataRow In ObjInventario.DtResultados.Rows For Each Dr As DataRow In ObjInventario.DtResultados.Rows