This commit is contained in:
Rakcsle Supertramp
2020-11-04 10:32:44 -07:00
27 changed files with 811 additions and 580 deletions

View File

@@ -1140,7 +1140,9 @@ Public Class ClsContabilidad
Optional ObjConta As ClsContPAQi = Nothing, Optional pIDPoliza As Integer = -1) As Boolean Optional ObjConta As ClsContPAQi = Nothing, Optional pIDPoliza As Integer = -1) As Boolean
Dim StrLog As New StringBuilder Dim StrLog As New StringBuilder
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
StrLog.AppendFormat("CvePrep:{0} - Inicio", CvePrePoliza) Dim OcurrioError As Boolean = False
StrLog.AppendFormat("CvePrep:{0} - Inicio -", CvePrePoliza)
If Empresa.TipoContabilizacion = 1 Then ' contabilidad en SIG If Empresa.TipoContabilizacion = 1 Then ' contabilidad en SIG
@@ -1154,7 +1156,7 @@ Public Class ClsContabilidad
If CvePrePoliza <= 0 Then Return False If CvePrePoliza <= 0 Then Return False
Dim OcurrioError As Boolean = False
Dim ContaCompartida As Boolean = False Dim ContaCompartida As Boolean = False
If ObjConta Is Nothing Then If ObjConta Is Nothing Then
@@ -1263,6 +1265,7 @@ Public Class ClsContabilidad
If Not ObjConta.AddMovimiento(tIdPoliza, dr("IdCtaContable").ToString.ToEntero, tipoMovimiento, If Not ObjConta.AddMovimiento(tIdPoliza, dr("IdCtaContable").ToString.ToEntero, tipoMovimiento,
dr("ImporteMN").ToString.ToDecimal, dr("Referencia").ToString, dr("Concepto").ToString, dr("IdSegmentoNegocio").ToString.ToEntero, Fecha, SigReferencia, dr("CvePrePolizaDetalle").ToString.ToEntero, ImporteMonedaExtranjera:=dr("ImporteME").ToString.ToDecimal) Then dr("ImporteMN").ToString.ToDecimal, dr("Referencia").ToString, dr("Concepto").ToString, dr("IdSegmentoNegocio").ToString.ToEntero, Fecha, SigReferencia, dr("CvePrePolizaDetalle").ToString.ToEntero, ImporteMonedaExtranjera:=dr("ImporteME").ToString.ToDecimal) Then
OcurrioError = True OcurrioError = True
StrLog.AppendFormat(" Error 1.1 - ")
Exit For Exit For
End If End If
@@ -1271,6 +1274,7 @@ Public Class ClsContabilidad
If Not ObjConta.AddMovimiento(tIdPoliza, dr("IdCtaContable").ToString.ToEntero, tipoMovimiento, If Not ObjConta.AddMovimiento(tIdPoliza, dr("IdCtaContable").ToString.ToEntero, tipoMovimiento,
dr("Importe").ToString.ToDecimal, dr("Referencia").ToString, dr("Concepto").ToString, dr("IdSegmentoNegocio").ToString.ToEntero, Fecha, SigReferencia, dr("CvePrePolizaDetalle").ToString.ToEntero, ImporteMonedaExtranjera:=dr("ImporteME").ToString.ToDecimal) Then dr("Importe").ToString.ToDecimal, dr("Referencia").ToString, dr("Concepto").ToString, dr("IdSegmentoNegocio").ToString.ToEntero, Fecha, SigReferencia, dr("CvePrePolizaDetalle").ToString.ToEntero, ImporteMonedaExtranjera:=dr("ImporteME").ToString.ToDecimal) Then
OcurrioError = True OcurrioError = True
StrLog.AppendFormat(" Error 1.2 - ")
Exit For Exit For
End If End If
@@ -1279,6 +1283,7 @@ Public Class ClsContabilidad
End If End If
Else Else
OcurrioError = True OcurrioError = True
StrLog.AppendFormat(" Error 1.3 - ")
Mensaje.Append(String.Format("<br> La cuenta contable {0} es invalida", dr("ConceptoContable"))) Mensaje.Append(String.Format("<br> La cuenta contable {0} es invalida", dr("ConceptoContable")))
Exit For Exit For
End If End If
@@ -1298,6 +1303,7 @@ Public Class ClsContabilidad
dr("ISRRetenido").ToString.ToDecimal, dr("ISRRetenido").ToString.ToDecimal,
dr("IVARetenido").ToString.ToDecimal, False) Then dr("IVARetenido").ToString.ToDecimal, False) Then
OcurrioError = True OcurrioError = True
StrLog.AppendFormat(" Error 1.4 - ")
End If End If
End If End If
@@ -1347,6 +1353,7 @@ Public Class ClsContabilidad
IdProveedor = ObjConta.AddProveedor(IdCtaContProveedores, RFC, RazonSocial, "") IdProveedor = ObjConta.AddProveedor(IdCtaContProveedores, RFC, RazonSocial, "")
If IdProveedor <= 0 Then If IdProveedor <= 0 Then
OcurrioError = True OcurrioError = True
StrLog.AppendFormat(" Error 1.5 - ")
End If End If
End If End If
@@ -1364,6 +1371,7 @@ Public Class ClsContabilidad
dr("Serie").ToString.ToString, dr("Serie").ToString.ToString,
dr("Folio").ToString.StrToNum, dr("FolioFiscal").ToString, Empresa.CveEmpresa) Then dr("Folio").ToString.StrToNum, dr("FolioFiscal").ToString, Empresa.CveEmpresa) Then
OcurrioError = True OcurrioError = True
StrLog.AppendFormat(" Error 1.6 - ")
Mensaje.Append("La Poliza o la Cuenta no son válidas ") Mensaje.Append("La Poliza o la Cuenta no son válidas ")
End If End If
@@ -1377,12 +1385,14 @@ Public Class ClsContabilidad
If Not OcurrioError Then If Not OcurrioError Then
If Not UpdatePrePolizasDetalleBloquear(CvePrePoliza, True) Then If Not UpdatePrePolizasDetalleBloquear(CvePrePoliza, True) Then
StrLog.AppendFormat(" Error 2.1 - ")
OcurrioError = True OcurrioError = True
End If End If
End If End If
If Not OcurrioError Then If Not OcurrioError Then
If Not UpdatePrePoliza(Fecha, ObjConta.Folio, CveTipoPoliza, tIdPoliza, CvePrePoliza, Empresa.CveEmpresa, CveUsuarioModifico:=CveUsuario) Then If Not UpdatePrePoliza(Fecha, ObjConta.Folio, CveTipoPoliza, tIdPoliza, CvePrePoliza, Empresa.CveEmpresa, CveUsuarioModifico:=CveUsuario) Then
StrLog.AppendFormat(" Error 2.2 - ")
OcurrioError = True OcurrioError = True
End If End If
End If End If
@@ -1404,11 +1414,13 @@ Public Class ClsContabilidad
Else Else
OcurrioError = True OcurrioError = True
StrLog.AppendFormat(" Error 3.1 - ")
End If End If
Catch ex As Exception Catch ex As Exception
StrLog.AppendFormat(" Error 4.1 - ")
If Not ContaCompartida Then ObjConta.RollBack() If Not ContaCompartida Then ObjConta.RollBack()
OnError("Ocurrió un error al intentar contabilizar la PrePoliza", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error al intentar contabilizar la PrePoliza", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
'Alert("Ocurrió un error al guardar la póliza", TipoMensaje.MsgAdvertencia) 'Alert("Ocurrió un error al guardar la póliza", TipoMensaje.MsgAdvertencia)
@@ -1417,8 +1429,9 @@ Public Class ClsContabilidad
If Not ContaCompartida Then ObjConta.Dispose() If Not ContaCompartida Then ObjConta.Dispose()
End If End If
StrLog.AppendFormat(" - Con Retorno ({0}) - OcurrioError ({1} ", Retorno, OcurrioError)
StrLog.AppendFormat(" - Fin") StrLog.AppendFormat(" - Fin")
StrLog.ToString.GuardaLogAD("LogContabilidazacion") StrLog.ToString.GuardaLogAD("LogContabilizacion")
Return Retorno Return Retorno
End Function End Function

View File

@@ -962,7 +962,7 @@ Public Class ClsInventarios
Optional CveMovimientoRelacionado As Integer = -1, Optional TipoCambio As Double = -1, Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1, Optional MovimientoFijo As Boolean = False, Optional CveContrato As Integer = -1, Optional CveMovimientoRelacionado As Integer = -1, Optional TipoCambio As Double = -1, Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1, Optional MovimientoFijo As Boolean = False, Optional CveContrato As Integer = -1,
Optional CveProveedor As Integer = -1, Optional Remision As String = "", Optional CveClienteSucursal As Integer = -1, Optional DepartamentoEntrega As String = "", Optional PedidoContrato As String = "", Optional GastoIndirecto As Double = -1, Optional CveChofer As Integer = -1, Optional Placa As String = "", Optional CveProveedor As Integer = -1, Optional Remision As String = "", Optional CveClienteSucursal As Integer = -1, Optional DepartamentoEntrega As String = "", Optional PedidoContrato As String = "", Optional GastoIndirecto As Double = -1, Optional CveChofer As Integer = -1, Optional Placa As String = "",
Optional FechaEntrega As String = "", Optional EspecifUnidad As String = "", Optional ResponsableCarga As String = "", Optional ResponsableRecibio As String = "", Optional Identificacion As String = "", Optional Domicilio As String = "", Optional FechaEntrega As String = "", Optional EspecifUnidad As String = "", Optional ResponsableCarga As String = "", Optional ResponsableRecibio As String = "", Optional Identificacion As String = "", Optional Domicilio As String = "",
Optional Telefono As String = "", Optional Ciudad As String = "", Optional Licencia As String = "", Optional Modulo As String = "") As Integer Optional Telefono As String = "", Optional Ciudad As String = "", Optional Licencia As String = "", Optional Modulo As String = "", Optional CveOP As Integer = -1) As Integer
Dim Retorno As Integer = -1 Dim Retorno As Integer = -1
@@ -1016,6 +1016,7 @@ Public Class ClsInventarios
.Add("@Ciudad", SqlDbType.VarChar).Value = Ciudad .Add("@Ciudad", SqlDbType.VarChar).Value = Ciudad
.Add("@Licencia", SqlDbType.VarChar).Value = Licencia .Add("@Licencia", SqlDbType.VarChar).Value = Licencia
.Add("@Modulo", SqlDbType.VarChar).Value = Modulo .Add("@Modulo", SqlDbType.VarChar).Value = Modulo
.Add("@CveOP", SqlDbType.Int).Value = CveOP
End With End With
Try Try
@@ -5259,13 +5260,13 @@ Public Class ClsInventarios
Return Retorno Return Retorno
End Function End Function
Public Function DeleteMovimientosProyectados(TipoMovto As Integer) As Boolean Public Function DeleteMovimientosProyectados(TipoMovto As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("Inv_MovimientosProyectadosDelete") DataAdapter("Inv_MovimientosProyectadosDelete")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@TipoMovto", SqlDbType.TinyInt).Value = TipoMovto .Add("@TipoMovto", SqlDbType.TinyInt).Value = TipoMovto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With End With
Try Try

View File

@@ -850,7 +850,7 @@ Public Class WS_PuntoVenta
If objVentas.GetVentaTerminal(objVenta.CveVentaTerminal, objVenta.Fecha, objVenta.CveSubProyecto, objVenta.CveEmpresa) Then If objVentas.GetVentaTerminal(objVenta.CveVentaTerminal, objVenta.Fecha, objVenta.CveSubProyecto, objVenta.CveEmpresa) Then
CvePrePoliza = ObjConta.AddPrePolizas("Vta", 4, objVenta.Total, objVenta.Total, objVenta.CveMoneda, objVenta.Fecha, "", objVenta.CveUsuario, objVenta.CveEmpresa) CvePrePoliza = ObjConta.AddPrePolizas("Vta", 4, objVenta.Total, objVenta.Total, objVenta.CveMoneda, objVenta.Fecha, "Punto de Venta addVenta", objVenta.CveUsuario, objVenta.CveEmpresa)
If objVentas.DtResultados.Rows.Count = 0 Then If objVentas.DtResultados.Rows.Count = 0 Then
If objVentas.AddVenta(objVenta.TipoDocto, objVenta.FolioFact, objVenta.CveCliente, objVenta.CveClienteSucursal, If objVentas.AddVenta(objVenta.TipoDocto, objVenta.FolioFact, objVenta.CveCliente, objVenta.CveClienteSucursal,
@@ -858,7 +858,7 @@ Public Class WS_PuntoVenta
objVenta.Total, objVenta.CveMoneda, objVenta.TipoCambio, objVenta.CveMetodoPago, objVenta.CondicionesPago, objVenta.Total, objVenta.CveMoneda, objVenta.TipoCambio, objVenta.CveMetodoPago, objVenta.CondicionesPago,
objVenta.FormaPago, Now, objVenta.Fecha, objVenta.MotivoDescuento, objVenta.Observaciones, objVenta.FechaEjecucion, objVenta.FormaPago, Now, objVenta.Fecha, objVenta.MotivoDescuento, objVenta.Observaciones, objVenta.FechaEjecucion,
objVenta.CveVendedor, If(objVenta.Alfa1 IsNot Nothing, objVenta.Alfa1, ""), If(objVenta.Alfa2 IsNot Nothing, objVenta.Alfa2, ""), If(objVenta.Alfa3 IsNot Nothing, objVenta.Alfa3, ""), objVenta.Num1, objVenta.CveVendedor, If(objVenta.Alfa1 IsNot Nothing, objVenta.Alfa1, ""), If(objVenta.Alfa2 IsNot Nothing, objVenta.Alfa2, ""), If(objVenta.Alfa3 IsNot Nothing, objVenta.Alfa3, ""), objVenta.Num1,
objVenta.Num2, objVenta.Num3, Fech1, Fech2, Fech3, objVenta.CveCorte, objVenta.CveMesa, If(objVenta.NumeroPersonas > 255, 255, objVenta.NumeroPersonas), CvePrePoliza, objVenta.CveUsuario, objVenta.CveEmpresa, objVenta.Propina, objVenta.CveVentaTerminal) Then objVenta.Num2, objVenta.Num3, Fech1, Fech2, Fech3, objVenta.CveCorte, objVenta.CveMesa, If(objVenta.NumeroPersonas > 255, 255, objVenta.NumeroPersonas), CvePrePoliza, objVenta.CveUsuario, objVenta.CveEmpresa, objVenta.Propina, objVenta.CveVentaTerminal, CveSubProyecto:=objVenta.CveSubProyecto, CveSubProyectoEjecucion:=objVenta.CveSubProyecto) Then
objVenta.CveVenta = objVentas.CveVenta objVenta.CveVenta = objVentas.CveVenta
'Ingresar los detalles 'Ingresar los detalles
For Each Detalle As ClsVentaWS.ClsVentaDetalleWS In objVenta.Detalle For Each Detalle As ClsVentaWS.ClsVentaDetalleWS In objVenta.Detalle
@@ -979,8 +979,9 @@ Public Class WS_PuntoVenta
'Se agrega movimiento separado por la cuenta de ventas (ER) 'Se agrega movimiento separado por la cuenta de ventas (ER)
' For Each Row As DataRow In DT.Rows ' For Each Row As DataRow In DT.Rows
ImporteMov = objVenta.SubTotal ' TmpDT.SUM("Total", "IdCtaContVentas = '" & Row("IdCtaContVentas").ToString & "'") ImporteMov = objVenta.SubTotal ' TmpDT.SUM("Total", "IdCtaContVentas = '" & Row("IdCtaContVentas").ToString & "'")
Dim CveClasificacion_04 = -1
If ImporteMov <> 0 Then If ImporteMov <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, " ", CveConceptoVenta, " ", objVenta.Fecha, -1, -1, CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, " ", CveConceptoVenta, " ", objVenta.Fecha, -1, -1, CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, ImporteMX:=ImporteMov, CveSubProyecto:=objVenta.CveSubProyecto, CveClasificacion:=CveClasificacion_04) Then
ErrorMovtosVentas = True ErrorMovtosVentas = True
End If End If
End If End If
@@ -989,7 +990,7 @@ Public Class WS_PuntoVenta
'Se agregan los DSV DESCUENTOS 'Se agregan los DSV DESCUENTOS
ImporteMov = objVenta.Descuento ImporteMov = objVenta.Descuento
If ImporteMov <> 0 Then If ImporteMov <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, " ", CveConceptoDSV, " ", objVenta.Fecha, IdCtaContDSV, -1, CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, " ", CveConceptoDSV, " ", objVenta.Fecha, IdCtaContDSV, -1, CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, ImporteMX:=ImporteMov) Then
ErrorMovtosDSV = True ErrorMovtosDSV = True
End If End If
End If End If
@@ -998,7 +999,7 @@ Public Class WS_PuntoVenta
'Se agregan las CxC 'Se agregan las CxC
ImporteMov = objVenta.Total - TotalPagado ImporteMov = objVenta.Total - TotalPagado
If ImporteMov <> 0 Then If ImporteMov <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, " ", CveConceptoAfectacion, " ", objVenta.Fecha, IdCtaContClientes, -1, CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, " ", CveConceptoAfectacion, " ", objVenta.Fecha, IdCtaContClientes, -1, CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, ImporteMX:=ImporteMov) Then
ErrorMovtosCxC = True ErrorMovtosCxC = True
End If End If
End If End If
@@ -1006,7 +1007,8 @@ Public Class WS_PuntoVenta
'Si hubo un pago agregarlo 'Si hubo un pago agregarlo
ImporteMov = TotalPagado ImporteMov = TotalPagado
If ImporteMov <> 0 Then If ImporteMov <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, " ", 2, " ", objVenta.Fecha, IdCtaContClientes, -1, CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, " ", 2, " ", objVenta.Fecha, IdCtaContClientes, -1, CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, ImporteMX:=ImporteMov) Then
ErrorMovtosCxC = True ErrorMovtosCxC = True
End If End If
End If End If
@@ -1014,7 +1016,11 @@ Public Class WS_PuntoVenta
'Se agregan el Traslado de IVA 'Se agregan el Traslado de IVA
ImporteMov = objVenta.IVA ImporteMov = objVenta.IVA
If ImporteMov <> 0 Then If ImporteMov <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, " ", CveConceptoIVA, " ", objVenta.Fecha, 0, -1, CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then Dim PorcentajeImpuesto = 0
If objVenta.SubTotal > 0 Then
PorcentajeImpuesto = (objVenta.IVA / objVenta.SubTotal)
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, " ", CveConceptoIVA, " ", objVenta.Fecha, 0, -1, CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, ImporteMX:=ImporteMov, PorcentajeImpuesto:=PorcentajeImpuesto) Then
ErrorMovtosTrasladoIVA = True ErrorMovtosTrasladoIVA = True
End If End If
End If End If
@@ -1238,7 +1244,7 @@ Public Class WS_PuntoVenta
Try Try
CvePrePoliza = ObjMov.AddPrePolizas("Banc", CvePlantillaPoliza, Importe, Importe, Moneda, Fecha, "", CveUsuario, CveEmpresa) CvePrePoliza = ObjMov.AddPrePolizas("Banc", CvePlantillaPoliza, Importe, Importe, Moneda, Fecha, "Punto de venta IE", CveUsuario, CveEmpresa)
'valida prepoliza 'valida prepoliza
If CvePrePoliza > 0 Then If CvePrePoliza > 0 Then
@@ -1252,9 +1258,9 @@ Public Class WS_PuntoVenta
If CveIE > 0 Then If CveIE > 0 Then
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Importe, "", CveConceptoContable, " ", Now, 0, -1, CveIE) Then If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Importe, "", CveConceptoContable, " ", Now, 0, -1, CveIE, ImporteMX:=Importe) Then
Dim IVA As Double = 0 Dim IVA As Double = 0
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Importe - IVA - CIF, "", CveConceptoCompra, " ", Now, 0, -1, CveIE) Then If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Importe - IVA - CIF, "", CveConceptoCompra, " ", Now, 0, -1, CveIE, ImporteMX:=Importe - IVA - CIF) Then
Else Else
MsgError = "no se pudo insertar el detalle de la póliza2" MsgError = "no se pudo insertar el detalle de la póliza2"

View File

@@ -53,13 +53,36 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
context.Response.Write(sendMail(context)) context.Response.Write(sendMail(context))
Case "sendMailLPM" Case "sendMailLPM"
context.Response.Write(sendMailLPM(context)) context.Response.Write(sendMailLPM(context))
Case "GetTokenAngular"
context.Response.Write(GetTokenAngular(context))
context.Response.End()
End Select End Select
Catch ex As Exception Catch ex As Exception
ex.GuardaLog(ex.Message) ex.GuardaLog(ex.Message)
End Try End Try
End Sub End Sub
Private Function GetTokenAngular(context As HttpContext) As String
Dim usuario As Usuario = UsuarioActual(context)
Dim tokenDescriptor = New Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor With {
.Subject = New System.Security.Claims.ClaimsIdentity(New System.Security.Claims.Claim() {New System.Security.Claims.Claim("CvePlataforma", usuario.CvePlataforma.ToString()),
New System.Security.Claims.Claim("CveUsuario", usuario.CveUsuario.ToString()), New System.Security.Claims.Claim("CveEmpresa", usuario.CveEmpresa.ToString()),
New System.Security.Claims.Claim("CveRol", usuario.CveRol.ToString()), New System.Security.Claims.Claim("Fecha", Date.Now.ToLongDateString())}),
.Expires = Date.UtcNow.AddHours(3),
.SigningCredentials = New Microsoft.IdentityModel.Tokens.SigningCredentials(
New Microsoft.IdentityModel.Tokens.SymmetricSecurityKey(Encoding.ASCII.GetBytes("*_AsistenciaDesarrolloSistemas-SIGAPI_*17-06-2020")),
Microsoft.IdentityModel.Tokens.SecurityAlgorithms.HmacSha256Signature)}
Dim tokenHandler = New System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler()
Dim newtoken = tokenHandler.CreateToken(tokenDescriptor)
'context.Response.AddHeader("Access-Control-Allow-Origin", "http://localhost:4200")
'context.Response.AddHeader("Access-Control-Allow-Methods", "GET, POST")
'context.Response.AddHeader("Access-Control-Allow-Headers", "Content-Type, Accept")
context.Response.AddHeader("Access-Control-Allow-Credentials", true )
context.Response.StatusCode = 200
Dim stokenn As String = tokenHandler.WriteToken(newtoken)
Return stokenn
End Function
Private Function sendMailLPM(context As HttpContext) As String Private Function sendMailLPM(context As HttpContext) As String
Dim retorno As String = "true" Dim retorno As String = "true"
Dim nombre As String = "" Dim nombre As String = ""

View File

@@ -17669,7 +17669,7 @@ Partial Class Compras_Compras
ViewState("IVAPS") = Drr("IVA").ToString().ToDouble() ViewState("IVAPS") = Drr("IVA").ToString().ToDouble()
DdlProyecto.SelectedValueExist(Drr("CveProyecto")) DdlProyecto.SelectedValueExist(Drr("CveProyecto"))
'DdlIVA.Enabled = True DdlIVA.Enabled = True
If Not Modalidad = "U" Then If Not Modalidad = "U" Then
@@ -17989,13 +17989,13 @@ Partial Class Compras_Compras
Row("IEPSPSPorcentaje") = PorcentajeIEPS Row("IEPSPSPorcentaje") = PorcentajeIEPS
Else Else
'If DdlIVA.SelectedValue.ToDouble = 0 Then Row("IVA") = 0 Else Row("IVA") = Math.Round(IVA * Total, DecimalesPermitidos) 'If DdlIVA.SelectedValue.ToDouble = 0 Then Row("IVA") = 0 Else Row("IVA") = Math.Round(IVA * Total, DecimalesPermitidos)
Row("IVA") = Math.Round(IVA * Total, DecimalesPermitidos) Row("IVA") = Math.Round(IVA * Total, 2)
Row("IVAPorcentaje") = IVA Row("IVAPorcentaje") = IVA
Row("RetIVA") = Math.Round(RetIVA * Total, DecimalesPermitidos) Row("RetIVA") = Math.Round(RetIVA * Total, 2)
Row("RetIVAPorcentaje") = RetIVA Row("RetIVAPorcentaje") = RetIVA
Row("RetISR") = Math.Round(RetISR * Total, DecimalesPermitidos) Row("RetISR") = Math.Round(RetISR * Total, 2)
Row("RetISRPorcentaje") = RetISR Row("RetISRPorcentaje") = RetISR
Row("IEPSPS") = Math.Round(IEPSPS * Total, DecimalesPermitidos) Row("IEPSPS") = Math.Round(IEPSPS * Total, 2)
Row("IEPSPSPorcentaje") = IEPSPS Row("IEPSPSPorcentaje") = IEPSPS
End If End If
Row("ImporteConImpuestos") = (Row("Cantidad").ToString.ToDouble * Row("PU").ToString.ToDouble) + Row("IVA").ToString.ToDouble + Row("IEPSPS").ToString.ToDouble - (Row("RetIVA").ToString.ToDouble + Row("RetISR").ToString.ToDouble) Row("ImporteConImpuestos") = (Row("Cantidad").ToString.ToDouble * Row("PU").ToString.ToDouble) + Row("IVA").ToString.ToDouble + Row("IEPSPS").ToString.ToDouble - (Row("RetIVA").ToString.ToDouble + Row("RetISR").ToString.ToDouble)

View File

@@ -214,7 +214,7 @@
</ItemTemplate> </ItemTemplate>
<ItemStyle HorizontalAlign="Left" /> <ItemStyle HorizontalAlign="Left" />
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Importe"> <asp:TemplateField HeaderText="Importe" ItemStyle-Width="125px">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlTotal" runat="server" Text='<%# String.Format("{0} {1}", Eval("Total", "{0:N2}"), Eval("Abreviatura")) %>'></asp:Literal> <asp:Literal ID="LtlTotal" runat="server" Text='<%# String.Format("{0} {1}", Eval("Total", "{0:N2}"), Eval("Abreviatura")) %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>

View File

@@ -183,7 +183,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value> R.F.C PPP885522PPP</Value> <Value> R.F.C STJ180705IV4</Value>
<Style> <Style>
<FontFamily>Calibri</FontFamily> <FontFamily>Calibri</FontFamily>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>

View File

@@ -105,7 +105,7 @@
</Style> </Style>
</TextRun> </TextRun>
<TextRun> <TextRun>
<Value>PPP885522PPP</Value> <Value>STJ180705IV4</Value>
<Style> <Style>
<FontFamily>Calibri</FontFamily> <FontFamily>Calibri</FontFamily>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>

View File

@@ -3818,7 +3818,7 @@
</Style> </Style>
</TextRun> </TextRun>
<TextRun> <TextRun>
<Value>PPP885522PPP</Value> <Value>STJ180705IV4</Value>
<Style> <Style>
<FontFamily>Calibri</FontFamily> <FontFamily>Calibri</FontFamily>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>

View File

@@ -183,7 +183,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value> R.F.C PPP885522PPP</Value> <Value> R.F.C STJ180705IV4</Value>
<Style> <Style>
<FontFamily>Calibri</FontFamily> <FontFamily>Calibri</FontFamily>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>

View File

@@ -276,7 +276,7 @@
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'SAT 'SAT
Using ObjGrales As New ClsGenerales Using ObjGrales As New ClsGenerales
'If ObjGrales.GetSATProductosServicios Then Application("GlobalDTPSATPS") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATPS") = Nothing If ObjGrales.GetSATProductosServicios Then Application("GlobalDTPSATPS") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATPS") = Nothing
'If ObjGrales.GetSATUnidadMedida Then Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATUM") = Nothing 'If ObjGrales.GetSATUnidadMedida Then Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATUM") = Nothing
If ObjGrales.GetSATUsosCFDI Then Application("GlobalDTSATUsosCFDI") = ObjGrales.DtResultados Else Application("GlobalDTSATUsosCFDI") = Nothing If ObjGrales.GetSATUsosCFDI Then Application("GlobalDTSATUsosCFDI") = ObjGrales.DtResultados Else Application("GlobalDTSATUsosCFDI") = Nothing
If ObjGrales.GetSATFraccionArancelaria Then Application("GlobalDTFraccionArancelaria") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTFraccionArancelaria") = Nothing If ObjGrales.GetSATFraccionArancelaria Then Application("GlobalDTFraccionArancelaria") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTFraccionArancelaria") = Nothing

View File

@@ -47,7 +47,7 @@
</div> </div>
<label class="col-sm-1" style="text-align: right">Folio:</label> <label class="col-sm-1" style="text-align: right">Folio:</label>
<div class="col-sm-1" style="width:60px"> <div class="col-sm-1" style="width: 60px">
<asp:TextBox runat="server" ID="TxtFolioFiltro" Width="60px" /> <asp:TextBox runat="server" ID="TxtFolioFiltro" Width="60px" />
</div> </div>
@@ -59,7 +59,6 @@
</div> </div>
<div class="portlet-body"> <div class="portlet-body">
<div class="row" style="margin-left: 0px;"> <div class="row" style="margin-left: 0px;">
</div> </div>
</div> </div>
</div> </div>
@@ -84,6 +83,37 @@
<asp:RangeValidator ID="RVR" Display="Dynamic" ControlToValidate="TxtCantidad" runat="server" MinimumValue="0" Type="Double" ErrorMessage="No cumple con la cantidad especificada"></asp:RangeValidator> <asp:RangeValidator ID="RVR" Display="Dynamic" ControlToValidate="TxtCantidad" runat="server" MinimumValue="0" Type="Double" ErrorMessage="No cumple con la cantidad especificada"></asp:RangeValidator>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:CheckBox ID="ChkLote" Checked="false" runat="server" OnCheckedChanged="Chk_Click" AutoPostBack="true"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Nuevo Lote" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:TextBox runat="server" ID="TxtLote" Text='<%# Eval("Lote").ToString()%>' CssClass="form-control" ClientIDMode="Static" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:CheckBox ID="ChkEditCaducidad" Checked="false" runat="server" OnCheckedChanged="Chk_Click" AutoPostBack="true"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Nueva Fecha Cad." ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
<asp:TextBox runat="server" ID="TxtFechaCadNueva" Text='<%# Eval("FechaCaducidad").ToString()%>' CssClass="form-control" ClientIDMode="Static" />
<span class="input-group-btn ">
<asp:LinkButton runat="server" ID="ImgFecha" class="btn default"> <i class="fa fa-calendar"></i> </asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFechaCadNueva" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFecha" TargetControlID="TxtFechaCadNueva" PopupButtonID="ImgFecha" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<%--<asp:DropDownList ID="DDlS" runat="server" Width="150px" DataValueField="CveSeccionAlmacen" DataTextField="SeccionAlmacen" class="select2me"></asp:DropDownList>--%>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:CheckBox ID="Chk" Checked="false" runat="server" OnCheckedChanged="Chk_Click" AutoPostBack="true"></asp:CheckBox> <asp:CheckBox ID="Chk" Checked="false" runat="server" OnCheckedChanged="Chk_Click" AutoPostBack="true"></asp:CheckBox>

View File

@@ -25,6 +25,9 @@ Partial Class Inventarios_AjustesSeccionAlmacen
DdlClasificaciones.DataBind() DdlClasificaciones.DataBind()
DdlClasificaciones.Items.Insert(0, New ListItem("Todos", "-1")) DdlClasificaciones.Items.Insert(0, New ListItem("Todos", "-1"))
GvD.Columns(4).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
GvD.Columns(10).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Nueva Fecha Elaboración", "Nueva Fecha Caducidad")
End Sub End Sub
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
@@ -48,8 +51,8 @@ Partial Class Inventarios_AjustesSeccionAlmacen
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
CargaSeccionesAlmacen(e.Row.FCDropDownList("DDlS"), DdlAlmacen.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero, UsuarioActual.CveEmpresa) CargaSeccionesAlmacen(e.Row.FCDropDownList("DDlS"), DdlAlmacen.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero, UsuarioActual.CveEmpresa)
'e.Row.FCDropDownList("DDlS").DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero) e.Row.FCDropDownList("DDlS").DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero)
'e.Row.FCDropDownList("DDlS").DataBind() e.Row.FCDropDownList("DDlS").DataBind()
Dim ExistenciasAux As Decimal = e.Row.DataKey("Existencia").ToDecimal Dim ExistenciasAux As Decimal = e.Row.DataKey("Existencia").ToDecimal
e.Row.FCRangeValidator("RVR").Enabled = ExistenciasAux > 0 e.Row.FCRangeValidator("RVR").Enabled = ExistenciasAux > 0
@@ -90,28 +93,51 @@ Partial Class Inventarios_AjustesSeccionAlmacen
Dim CveMovimientoDetalleEntrada As Integer = 0 Dim CveMovimientoDetalleEntrada As Integer = 0
Dim Cont As Integer = 0 Dim Cont As Integer = 0
Dim Lista As New Hashtable Dim Lista As New Hashtable
Dim ListaCaducidad As New Hashtable
Dim ListaLote As New Hashtable
Dim Cantidad As Decimal = 0 Dim Cantidad As Decimal = 0
For Each gvr As GridViewRow In GvD.Rows For Each gvr As GridViewRow In GvD.Rows
Dim FechaCaducidadOriginal As String = gvr.DataKey("FechaCaducidad")
Dim FechaCaducidadNueva As String = gvr.FCTextBox("TxtFechaCadNueva").Text
Dim LoteOriginal As String = gvr.DataKey("Lote")
Dim LoteNuevo As String = gvr.FCTextBox("TxtLote").Text
'que este seleccionado y que tenga diferente seccion 'que este seleccionado y que tenga diferente seccion
Dim Modificar As Boolean = False
If gvr.FCCheckBox("Chk").Checked AndAlso gvr.FCDropDownList("DDlS").SelectedValue.ToEntero <> gvr.DataKey("CveSeccionAlmacen").ToEntero Then If gvr.FCCheckBox("Chk").Checked AndAlso gvr.FCDropDownList("DDlS").SelectedValue.ToEntero <> gvr.DataKey("CveSeccionAlmacen").ToEntero Then
Cantidad = gvr.FCTextBox("TxtCantidad").Text.ToDecimal()
If gvr.DataKey("CveSeccionAlmacen").ToEntero > 0 Then If gvr.DataKey("CveSeccionAlmacen").ToEntero > 0 Then
ObjPS.UpdateAplicaSeccionAlmacen(gvr.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, True) ObjPS.UpdateAplicaSeccionAlmacen(gvr.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, True)
Else Else
ObjPS.UpdateAplicaSeccionAlmacen(gvr.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, False) ObjPS.UpdateAplicaSeccionAlmacen(gvr.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, False)
End If End If
If Not Lista.ContainsKey(gvr.DataKey("CvePS").ToEntero) Then Lista.Add(gvr.DataKey("CvePS").ToEntero, gvr.FCDropDownList("DDlS").SelectedValue.ToEntero) 'guardo que dato le corresponde
If Not Lista.ContainsKey(gvr.DataKey("CvePS").ToEntero) Then Lista.Add(gvr.DataKey("CvePS").ToEntero, gvr.FCDropDownList("DDlS").SelectedValue.ToEntero) 'guardo que dato le corresponde
Modificar = True
End If
If gvr.FCCheckBox("ChkEditCaducidad").Checked And FechaCaducidadNueva.Length > 0 And FechaCaducidadNueva <> FechaCaducidadOriginal Then
If Not ListaCaducidad.ContainsKey(gvr.DataKey("CvePS").ToEntero) Then ListaCaducidad.Add(gvr.DataKey("CvePS").ToEntero, FechaCaducidadNueva) 'guardo que dato le corresponde
Modificar = True
End If
If gvr.FCCheckBox("ChkLote").Checked And LoteNuevo.Length > 0 And LoteNuevo <> LoteOriginal Then
If Not ListaLote.ContainsKey(gvr.DataKey("CvePS").ToEntero) Then ListaLote.Add(gvr.DataKey("CvePS").ToEntero, LoteNuevo) 'guardo que dato le corresponde
Modificar = True
End If
If Modificar Then
Cantidad = gvr.FCTextBox("TxtCantidad").Text.ToDecimal()
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Cantidad, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, 0, -1, CveSeccionAlmacen:=gvr.DataKey("CveSeccionAlmacen").ToEntero, Serie:=gvr.DataKey("Serie"), Lote:=gvr.DataKey("Lote"), FechaCaducidad:=gvr.DataKey("FechaCaducidad").ToDate) Then If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Cantidad, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, 0, -1, CveSeccionAlmacen:=gvr.DataKey("CveSeccionAlmacen").ToEntero, Serie:=gvr.DataKey("Serie"), Lote:=gvr.DataKey("Lote"), FechaCaducidad:=gvr.DataKey("FechaCaducidad").ToDate) Then
ErrorMovInv = True ErrorMovInv = True
TextoError = "Ocurrió un error al guardar los movimientos de salida" TextoError = "Ocurrió un error al guardar los movimientos de salida"
Exit For Exit For
End If End If
Contador += 1 Contador += 1
End If End If
Next Next
If Not ErrorMovInv AndAlso Contador > 0 Then If Not ErrorMovInv AndAlso Contador > 0 Then
@@ -131,11 +157,24 @@ Partial Class Inventarios_AjustesSeccionAlmacen
Dim CostoIndirecto As Decimal = Row("CostoIndirecto").ToString().ToDecimal() Dim CostoIndirecto As Decimal = Row("CostoIndirecto").ToString().ToDecimal()
Dim Serie As String = Row("Serie").ToString() Dim Serie As String = Row("Serie").ToString()
Dim Lote As String = Row("Lote").ToString() Dim Lote As String = Row("Lote").ToString()
Dim FechaCaducidad As Date = IfNull(Row("FechaCaducidad"), MinFecha).ToString.ToDate Dim FechaCaducidad As Date = MinFecha
If ListaCaducidad.ContainsKey(CvePS) Then
FechaCaducidad = ListaCaducidad(CvePS).ToString.ToDate
Else
FechaCaducidad = IfNull(Row("FechaCaducidad"), MinFecha).ToString.ToDate
End If
If ListaLote.ContainsKey(CvePS) Then
Lote = ListaLote(CvePS).ToString
Else
Lote = Row("Lote").ToString()
End If
'actualizamos el PS, para que tenga el aplica seccion 'actualizamos el PS, para que tenga el aplica seccion
ObjPS.UpdateAplicaSeccionAlmacen(Row("CvePS").ToString().ToEntero(), UsuarioActual.CveEmpresa, True) If Lista.ContainsKey(CvePS) Then
ObjPS.UpdateAplicaSeccionAlmacen(Row("CvePS").ToString().ToEntero(), UsuarioActual.CveEmpresa, True)
End If
'If Not ObjInventario.AddProductosServiciosAlmacenSeccion(CvePS, CveAlmacen, CveSeccionAlmacen) Then 'If Not ObjInventario.AddProductosServiciosAlmacenSeccion(CvePS, CveAlmacen, CveSeccionAlmacen) Then
' ErrorMovInv = True ' ErrorMovInv = True
'End If 'End If

View File

@@ -456,7 +456,7 @@
<div class="col-md-2 pull-right"> <div class="col-md-2 pull-right">
<div class="btn-group" style="float: right;"> <div class="btn-group" style="float: right;">
<asp:Button ID="BtnVerSugerencias" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnVerSugerencias_Click" runat="server" Text="Ver Secciones" /> <asp:Button ID="BtnVerSugerencias" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnVerSugerencias_Click" runat="server" Text="Ver Sugerencias" />
</div> </div>
</div> </div>
<div class="col-md-4 pull-right"> <div class="col-md-4 pull-right">
@@ -516,7 +516,7 @@
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false"> <asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtLote" CssClass="form-control" runat="server" Visible="false"></asp:TextBox> <asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Visible="false"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="F.Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false"> <asp:TemplateField HeaderText="F.Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false">
@@ -527,7 +527,7 @@
<asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" Visible="false"> <i class="fa fa-calendar"></i> </asp:LinkButton> <asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" Visible="false"> <i class="fa fa-calendar"></i> </asp:LinkButton>
<ajax:MaskedEditExtender ID="MEECaducidad" runat="server" TargetControlID="TxtCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender> <ajax:MaskedEditExtender ID="MEECaducidad" runat="server" TargetControlID="TxtCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CECaducidad" TargetControlID="TxtCaducidad" PopupButtonID="LnkCaducidad" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender> <ajax:CalendarExtender runat="server" ID="CECaducidad" TargetControlID="TxtCaducidad" PopupButtonID="LnkCaducidad" PopupPosition="BottomLeft" Enabled="True" Format="dd/MM/yyyy" ></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVCaducidad" runat="server" ControlToValidate="TxtCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Caducidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVCaducidad" runat="server" ControlToValidate="TxtCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Caducidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCECaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaducidad"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCECaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaducidad"></ajax:ValidatorCalloutExtender>
</span> </span>
@@ -847,7 +847,7 @@
<asp:GridView ID="GvSugerencias" runat="server" EmptyDataText="No se encontraron registros." AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall ScrollAD" GridLines="None"> <asp:GridView ID="GvSugerencias" runat="server" EmptyDataText="No se encontraron registros." AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall ScrollAD" GridLines="None">
<Columns> <Columns>
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Sección Almacen" DataField="Seccion" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Sección Almacen" DataField="Seccion" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" />

File diff suppressed because it is too large Load Diff

View File

@@ -565,8 +565,10 @@
DataKeyNames="Almacen,Cantidad,FechaCaducidad"> DataKeyNames="Almacen,Cantidad,FechaCaducidad">
<Columns> <Columns>
<asp:BoundField HeaderText="Almacén" DataField="Almacen"/> <asp:BoundField HeaderText="Almacén" DataField="Almacen"/>
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:n2}" ItemStyle-HorizontalAlign="Right"/> <asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Right"/>
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" DataFormatString="{0:dd/MM/yyyy}"/> <asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="125px"/>
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="125px"/>
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="100px"/>
</Columns> </Columns>
</asp:GridView> </asp:GridView>

View File

@@ -207,8 +207,14 @@ Partial Class Inventarios_Kardex
If AplicaLote Then GvM.Columns(10).Visible = True If AplicaLote Then GvM.Columns(10).Visible = True
If AplicaCaducidad Then GvM.Columns(11).Visible = True If AplicaCaducidad Then GvM.Columns(11).Visible = True
Dim AuxAplicaSerie As Boolean = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimeroValor("AplicaSerie") = "True" Dim Drp As datarow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimero("")
Dim AuxAplicaCad As Boolean = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimeroValor("AplicaCaducidad") = "True" Dim AuxAplicaSerie As Boolean
Dim AuxAplicaCad As Boolean
If Drp IsNot Nothing Then
AuxAplicaSerie = Drp("AplicaSerie").ToString = "True"
AuxAplicaCad = Drp("AplicaCaducidad").ToString = "True"
End If
LnkSeries.Visible = AuxAplicaSerie LnkSeries.Visible = AuxAplicaSerie
LnkCaducidad.Visible = AuxAplicaCad LnkCaducidad.Visible = AuxAplicaCad
'CARGA INDICADORES 'CARGA INDICADORES
@@ -338,9 +344,15 @@ Partial Class Inventarios_Kardex
Dim ObjInventarios As New ClsInventarios Dim ObjInventarios As New ClsInventarios
If ObjInventarios.GetExistenciasCaducidad(ddlProducto2.SelectedValue.ToEntero(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, almacenes) Then If ObjInventarios.GetExistenciasCaducidad(ddlProducto2.SelectedValue.ToEntero(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, almacenes) Then
GvProductoCaducidad.DataSource = ObjInventarios.DtResultados GvProductoCaducidad.DataSource = ObjInventarios.DtResultados
GvProductoCaducidad.columns(2).visible = ObjInventarios.DtResultados.max("Serie") <> ""
GvProductoCaducidad.columns(3).visible = ObjInventarios.DtResultados.max("Lote") <> ""
GvProductoCaducidad.columns(4).visible = ObjInventarios.DtResultados.max("FechaCaducidad").todate > minfecha
End If End If
ObjInventarios.Dispose() ObjInventarios.Dispose()
GvProductoCaducidad.DataBind() GvProductoCaducidad.DataBind()
End Sub End Sub
#End Region #End Region

View File

@@ -200,6 +200,7 @@
<asp:Label runat="server" ID="LblProyectado" Text="Incluir Proyectados" class="col-md-1 truncate" /> <asp:Label runat="server" ID="LblProyectado" Text="Incluir Proyectados" class="col-md-1 truncate" />
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlProyeccionFiltro" runat="server" CssClass="select2me" Width="100%" > <asp:DropDownList ID="DdlProyeccionFiltro" runat="server" CssClass="select2me" Width="100%" >
<asp:ListItem Text="Todos (Entradas/Salidas)" Value="3" />
<asp:ListItem Text="Entradas" Value="1" /> <asp:ListItem Text="Entradas" Value="1" />
<asp:ListItem Text="Salidas" Value="2" /> <asp:ListItem Text="Salidas" Value="2" />
<asp:ListItem Text="No" Value="0" Selected="True" /> <asp:ListItem Text="No" Value="0" Selected="True" />
@@ -273,7 +274,7 @@
<div class="modal-body"> <div class="modal-body">
<div class="row" style="width: 100%; text-align: center"> <div class="row" style="width: 100%; text-align: center">
<asp:Label runat="server" ID="LblProyeccionOpcion" /> <asp:Label runat="server" ID="LblProyeccionOpcion" />
<asp:RadioButtonList ID="RblProyeccionOpcion" runat="server" RepeatDirection="Horizontal" Width="50%" Style="margin: 0 25% 0 25%"> <asp:RadioButtonList ID="RblProyeccionOpcion" runat="server" RepeatDirection="Horizontal" Width="50%" Style="margin: 0 25% 0 25%">
<asp:ListItem Text="Entrada" Value="1" Selected="True" /> <asp:ListItem Text="Entrada" Value="1" Selected="True" />
<asp:ListItem Text="Salida" Value="2" /> <asp:ListItem Text="Salida" Value="2" />
</asp:RadioButtonList> </asp:RadioButtonList>

View File

@@ -396,9 +396,7 @@ Partial Class Inventarios_KardexAlmacen
Dim ObjInventarios As New ClsInventarios Dim ObjInventarios As New ClsInventarios
ObjInventarios.IniciaTransacSQL() ObjInventarios.IniciaTransacSQL()
Dim TipoMovot As Integer = If(RblProyeccionOpcion.SelectedValue = "1", 0, 1) If ObjInventarios.DeleteMovimientosProyectados(RblProyeccionOpcion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
If ObjInventarios.DeleteMovimientosProyectados(TipoMovot) Then
Dim DtProductosEmpresas As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) Dim DtProductosEmpresas As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
For Each dtRow As DataRow In dt.Rows For Each dtRow As DataRow In dt.Rows
Dim Codigo As String = dtRow("Código").ToString Dim Codigo As String = dtRow("Código").ToString

View File

@@ -478,13 +478,13 @@
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false"> <asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtLote" CssClass="form-control" runat="server" Visible="false"></asp:TextBox> <asp:TextBox ID="TxtLote" Width="80px" class="form-control input-sm" runat="server" Visible="false"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false"> <asp:TemplateField HeaderText="Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false">
<ItemTemplate> <ItemTemplate>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;"> <div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
<asp:TextBox ID="TxtCaducidad" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server" Visible="false"></asp:TextBox> <asp:TextBox ID="TxtCaducidad" CssClass="form-control input-sm ADSMaskDate" Style="width: 80px" runat="server" Visible="false"></asp:TextBox>
<span class="input-group-btn "> <span class="input-group-btn ">
<asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" Visible="false"> <i class="fa fa-calendar"></i> </asp:LinkButton> <asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" Visible="false"> <i class="fa fa-calendar"></i> </asp:LinkButton>
</span> </span>

View File

@@ -3002,8 +3002,8 @@ Partial Class Inventarios_RecepcionAlmacen
'si es el último movimiento verifica los importes que sean igual 'si es el último movimiento verifica los importes que sean igual
If cont = DtCostos.Rows.Count AndAlso (Math.Round(TotalCosto, 2) <> Math.Round(TotalCostoAcumulado, 2)) Then If cont = DtCostos.Rows.Count AndAlso (Math.Round(TotalCosto, 2) <> Math.Round(TotalCostoAcumulado, 2)) Then
TotalCostoDetalle = TotalCostoDetalle + (Math.Round(TotalCosto, 2) - Math.Round(TotalCostoAcumulado, 2)) TotalCostoDetalle = TotalCostoDetalle + (Math.Round(TotalCosto, 3) - Math.Round(TotalCostoAcumulado, 3))
TotalCostoExtranjero = TotalCostoExtranjero + (Math.Round(TotalCosto, 2) - Math.Round(TotalCostoAcumulado, 2)) TotalCostoExtranjero = TotalCostoExtranjero + (Math.Round(TotalCosto, 3) - Math.Round(TotalCostoAcumulado, 3))
End If End If
If CveMoneda <> 1 AndAlso UsaComplementariaFleteImportaciones Then If CveMoneda <> 1 AndAlso UsaComplementariaFleteImportaciones Then

View File

@@ -1152,7 +1152,7 @@ Partial Class Inventarios_RecepcionUsados
If Not ErrorMovInv Then If Not ErrorMovInv Then
Msg.AppendFormat("<br/>El Movimiento se registro con el Folio: <b><a href='Inventarios/EntradasSalidas.aspx?CveMovimiento={1}'>{0}</a></b>", ObjInventario.Folio, CveMovimiento) Msg.AppendFormat("<br/>El Movimiento se registro con el Folio: <b><a href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}'>{0}</a></b>", ObjInventario.Folio, CveMovimiento)
Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento))) Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
If IDPoliza > 0 Then Msg = Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza) If IDPoliza > 0 Then Msg = Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza)

View File

@@ -40,7 +40,7 @@
<div class="col-sm-1" style="text-align:right"> <div class="col-sm-1" style="text-align:right">
<label>Proveedor:</label> <label>Proveedor:</label>
</div> </div>
<div class="col-md-1"> <div class="col-sm-2">
<ADS:Dropdownlost ID="DdlProveedor" runat="server" DataValueField="CveProveedor" DataTextField="RazonSocial" CssClassDdl="select2me" Width="100%" CssStyle="width: 100%;"></ADS:Dropdownlost> <ADS:Dropdownlost ID="DdlProveedor" runat="server" DataValueField="CveProveedor" DataTextField="RazonSocial" CssClassDdl="select2me" Width="100%" CssStyle="width: 100%;"></ADS:Dropdownlost>
</div> </div>
<div class="col-sm-1" style="text-align:right"> <div class="col-sm-1" style="text-align:right">
@@ -72,19 +72,28 @@
<div class="col-sm-1" style="text-align:right"> <div class="col-sm-1" style="text-align:right">
<label>Sucursal:</label> <label>Sucursal:</label>
</div> </div>
<div class="col-md-1"> <div class="col-sm-1">
<asp:DropDownList runat="server" ID="DdlSucursal" CssClass="select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto"></asp:DropDownList> <asp:DropDownList runat="server" ID="DdlSucursal" CssClass="select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto"></asp:DropDownList>
</div> </div>
<div class="col-sm-1" style="text-align:right">
</div>
</div>
</div>
<div class="portlet-body" style="display: none;">
<div class="row">
<div class="col-sm-1" style="text-align:right">
<label>Clasificación:</label> <label>Clasificación:</label>
</div> </div>
<div class="col-md-1"> <div class="col-md-1">
<asp:DropDownList runat="server" ID="DdlClasificacion" CssClass="select2me" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%"/> <asp:DropDownList runat="server" ID="DdlClasificacion" CssClass="select2me" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" CssStyle="width: 100%;"/>
</div> </div>
</div>
</div> </div>
</div> </div>
</div>
</div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">

View File

@@ -1,6 +1,15 @@
/* here you can put your own css to customize and override the theme */ /* here you can put your own css to customize and override the theme */
/* establezco el color de fondo de total, sin importar que este en un renglon alternativo */ /* establezco el color de fondo de total, sin importar que este en un renglon alternativo */
@media (max-width: 768px) {
.ContentPlaceHolderc {
max-width: 100%;
overflow-x: auto !important;
}
}
.table-striped > tbody > tr:nth-of-type(odd).ADSRow, .table-striped > tbody > tr:nth-of-type(odd).ADSRow,
table > tbody > tr.ADSRow > td, table.table > tbody > tr.ADSRow > td, table > tbody > tr.ADSRow > td, table.table > tbody > tr.ADSRow > td,
table > tr.ADSRow > td, table.table > tr.ADSRow > td, table > tr.ADSRow > td, table.table > tr.ADSRow > td,
@@ -49,7 +58,7 @@ table > tr > th.adsCol, table.table > tr > th.adsCol {
.AdsBody .ADSCroll::-webkit-scrollbar { .AdsBody .ADSCroll::-webkit-scrollbar {
width: 8px; width: 8px;
height:10px; height: 10px;
background-color: #F5F5F5; background-color: #F5F5F5;
} }
@@ -58,7 +67,7 @@ table > tr > th.adsCol, table.table > tr > th.adsCol {
background-color: #AAA; background-color: #AAA;
border-radius: 4px; border-radius: 4px;
background-color: #F5F5F5; background-color: #F5F5F5;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
} }
.line-Lite .form-group.form-md-line-input .form-control { .line-Lite .form-group.form-md-line-input .form-control {
@@ -440,7 +449,7 @@ input[type="hidden"] {
} }
/*end tabwizard*/ /*end tabwizard*/
/*tab wizard2*/ /*tab wizard2*/
.tab-wizard2 { .tab-wizard2 {
text-align: center; text-align: center;
counter-reset: section; counter-reset: section;
@@ -467,28 +476,29 @@ input[type="hidden"] {
position: relative; position: relative;
display: block; display: block;
padding: 10px 15px; padding: 10px 15px;
text-align:center; text-align: center;
} }
.tab-wizard2 .ajax__tab_outer a.ajax__tab_tab > span::before { .tab-wizard2 .ajax__tab_outer a.ajax__tab_tab > span::before {
content: ' '; content: ' ';
display: block; display: block;
} }
.tab-wizard2 .ajax__tab_outer a.ajax__tab_tab::before {
background-color: #eee; .tab-wizard2 .ajax__tab_outer a.ajax__tab_tab::before {
text-align: center !important; background-color: #eee;
padding: 13px 15px 11px; text-align: center !important;
height: 45px; padding: 13px 15px 11px;
width: 45px; height: 45px;
-webkit-border-radius: 50% !important; width: 45px;
-moz-border-radius: 50% !important; -webkit-border-radius: 50% !important;
border-radius: 50% !important; -moz-border-radius: 50% !important;
counter-increment: section; border-radius: 50% !important;
content: ' 'counter(section); counter-increment: section;
display: inline-block; content: ' 'counter(section);
position: relative; display: inline-block;
margin-right:4px; position: relative;
} margin-right: 4px;
}
.tab-wizard2 .ajax__tab_active .ajax__tab_outer a.ajax__tab_tab::before { .tab-wizard2 .ajax__tab_active .ajax__tab_outer a.ajax__tab_tab::before {
background-color: rgb(54, 198, 211); background-color: rgb(54, 198, 211);
@@ -506,7 +516,7 @@ input[type="hidden"] {
.tab-wizard2 .progress-striped .progress-bar { .tab-wizard2 .progress-striped .progress-bar {
background-image: linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent); background-image: linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);
} }
/*end tabwizard2*/ /*end tabwizard2*/
@@ -728,11 +738,12 @@ div.ADScroller {
line-height: .5 !important; line-height: .5 !important;
} }
div:not(.ADScroller-header)>table tbody .trnopadding.ADtr { div:not(.ADScroller-header) > table tbody .trnopadding.ADtr {
visibility: hidden; visibility: hidden;
} }
.ADScroller-header>table tbody .trnopadding.ADtr td{
background-color :#ddd; .ADScroller-header > table tbody .trnopadding.ADtr td {
background-color: #ddd;
} }
div.ADScroller-header { div.ADScroller-header {
@@ -2661,6 +2672,7 @@ select.select2-offscreen, select.select2-offscreen:focus {
font-size: 20px; font-size: 20px;
margin-top: 15px; margin-top: 15px;
} }
.addropzone.dz-clickable:after { .addropzone.dz-clickable:after {
position: absolute; position: absolute;
content: "o presione doble click"; content: "o presione doble click";
@@ -2925,9 +2937,9 @@ select.select2-offscreen, select.select2-offscreen:focus {
margin-right: 0px; margin-right: 0px;
} }
.select2 .select2-selection__rendered{ .select2 .select2-selection__rendered {
line-height:1; line-height: 1;
color:#111; color: #111;
} }
.select2 .select2-selection--multiple { .select2 .select2-selection--multiple {
@@ -2951,18 +2963,21 @@ select.select2-offscreen, select.select2-offscreen:focus {
.btn-consultar { .btn-consultar {
background: #444; background: #444;
color:#fff
}
.btn-consultar:hover {
background: #2f353b;
color: #fff color: #fff
} }
.btn-consultar:hover {
background: #2f353b;
color: #fff
}
.ADScroller > div > table.table.table-smallpadding > tbody > tr > td:nth-last-child(1) a, table.ScrollAD.table.table-smallpadding > tbody > tr > td:nth-last-child(1) a, .ADScroller > div > table.table.table-smallpadding > tbody > tr > td:nth-last-child(1) a, table.ScrollAD.table.table-smallpadding > tbody > tr > td:nth-last-child(1) a,
.ADScroller > div > table.table.table-smallpadding > tbody > tr > th:nth-last-child(1) a, table.ScrollAD.table.table-smallpadding > tbody > tr > th:nth-last-child(1) a, .ADScroller > div > table.table.table-smallpadding > tbody > tr > th:nth-last-child(1) a, table.ScrollAD.table.table-smallpadding > tbody > tr > th:nth-last-child(1) a,
.ADScroller > div > table.table.table-smallpadding > tbody > tr > td:nth-last-child(1) span, table.ScrollAD.table.table-smallpadding > tbody > tr > td:nth-last-child(1) span, .ADScroller > div > table.table.table-smallpadding > tbody > tr > td:nth-last-child(1) span, table.ScrollAD.table.table-smallpadding > tbody > tr > td:nth-last-child(1) span,
.ADScroller > div > table.table.table-smallpadding > tbody > tr > th:nth-last-child(1) span, table.ScrollAD.table.table-smallpadding > tbody > tr > th:nth-last-child(1) span{ .ADScroller > div > table.table.table-smallpadding > tbody > tr > th:nth-last-child(1) span, table.ScrollAD.table.table-smallpadding > tbody > tr > th:nth-last-child(1) span {
padding-right: 7px; padding-right: 7px;
} }
div.mypaste * { div.mypaste * {
display: none; display: none;
} }

View File

@@ -1239,7 +1239,7 @@ Partial Class ProductosyServicios
Next Next
End If End If
If UsuarioActual.CveEmpresa = 141 Then If UsuarioActual.CveEmpresa = 141 Then
TieneError = GuardarProductoEnFranquicia(ObjProductosServicios, PSS, CveMetodoInv, EsPaquete, CveMarca, True) TieneError = GuardarProductoEnFranquicia(ObjProductosServicios, PSS, CveMetodoInv, EsPaquete, True)
End If End If
Else Else
@@ -1305,7 +1305,7 @@ Partial Class ProductosyServicios
End If End If
If UsuarioActual.CveEmpresa = 141 Then If UsuarioActual.CveEmpresa = 141 Then
TieneError = GuardarProductoEnFranquicia(ObjProductosServicios, PSS, CveMetodoInv, EsPaquete, CveMarca, False) TieneError = GuardarProductoEnFranquicia(ObjProductosServicios, PSS, CveMetodoInv, EsPaquete, False)
End If End If
Else Else
@@ -1638,11 +1638,15 @@ Partial Class ProductosyServicios
If CvePSAdicional < 0 Then If CvePSAdicional < 0 Then
If Not ObjProductosServicios.AddPSAdicionales(CvePS, DdlPSAdicional.SelectedValue.ToEntero, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then If Not ObjProductosServicios.AddPSAdicionales(CvePS, DdlPSAdicional.SelectedValue.ToEntero, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then
TieneError = True TieneError = True
Else
TieneError = GuardarProductosEquivalenteEnFranquicia(ObjProductosServicios, True)
End If End If
Else Else
If Not ObjProductosServicios.UpdatePSAdicionales(CvePS, DdlPSAdicional.SelectedValue.ToEntero, CvePSAdicional, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then If Not ObjProductosServicios.UpdatePSAdicionales(CvePS, DdlPSAdicional.SelectedValue.ToEntero, CvePSAdicional, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then
TieneError = True TieneError = True
Else
TieneError = GuardarProductosEquivalenteEnFranquicia(ObjProductosServicios, False)
End If End If
End If End If
@@ -2758,19 +2762,61 @@ Partial Class ProductosyServicios
RfvTxtTiempoCaducidad.Enabled = Activar RfvTxtTiempoCaducidad.Enabled = Activar
End Sub End Sub
Private Function GuardarProductoEnFranquicia(ObjPS As ClsProductosServicios, PSS As String, CveMetodoInv As Integer, EsPaquete As Integer, CveMarca As Integer, Agregar As Boolean) As Boolean Private Function GuardarProductoEnFranquicia(ObjPS As ClsProductosServicios, PSS As String, CveMetodoInv As Integer, EsPaquete As Integer, Agregar As Boolean) As Boolean
Dim EmpresasFranquicia = New Integer() {152} Dim EmpresasFranquicia = New Integer() {152}
For Each Franquicia As Integer In EmpresasFranquicia For Each Franquicia As Integer In EmpresasFranquicia
Dim nombreEmpresa As String = GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")
Dim CveClasificacion As Integer = GlobalDTClasificaciones(CveEmpresa:=Franquicia).FiltroPrimeroValor("CveClasificacion", String.Format("Clasificacion = '{0}'", DdlClasificacion.SelectedItem.Text)).ToEntero Dim CveClasificacion As Integer = GlobalDTClasificaciones(CveEmpresa:=Franquicia).FiltroPrimeroValor("CveClasificacion", String.Format("Clasificacion = '{0}'", DdlClasificacion.SelectedItem.Text)).ToEntero
Dim CveUnidadMedida As Integer = GlobalDTUnidadesMedida(CveEmpresa:=Franquicia).FiltroPrimeroValor("CveUnidadMedida", String.Format("UnidadMedida = '{0}'", DdlUnidadMedida.SelectedItem.Text)).ToEntero Dim CveUnidadMedida As Integer = GlobalDTUnidadesMedida(CveEmpresa:=Franquicia).FiltroPrimeroValor("CveUnidadMedida", String.Format("UnidadMedida = '{0}'", DdlUnidadMedida.SelectedItem.Text)).ToEntero
Dim CveClasificacion2 As Integer = GlobalDTClasificaciones(CveEmpresa:=Franquicia).FiltroPrimeroValor("CveClasificacion", String.Format("Clasificacion = '{0}'", DdlClasificacion2.SelectedItem.Text)).ToEntero Dim CveClasificacion2 As Integer = GlobalDTClasificaciones(CveEmpresa:=Franquicia).FiltroPrimeroValor("CveClasificacion", String.Format("Clasificacion = '{0}'", DdlClasificacion2.SelectedItem.Text)).ToEntero
Dim CveTipo As Integer = GlobalDTClasificacionesDetalle(CveEmpresa:=Franquicia).FiltroPrimeroValor("CveClasificacionDetalle", String.Format("ClasificacionDetalle = '{0}'", DdlTipoPSDes.SelectedItem.Text)).ToEntero
Dim CveMarcaFranquicia As Integer = -1
If ObjPS.GetMarcas(Franquicia) Then
CveMarcaFranquicia = ObjPS.DtResultados.FiltroPrimeroValor("CveMarca", String.Format("Marca = '{0}'", DdlMarca.SelectedItem.Text)).ToEntero
End If
Dim CveModelo As Integer = -1
Dim CveMedida As Integer = -1
Dim CveRin As Integer = -1
Dim ObjGral As New ClsGenerales()
If ObjGral.GetModelos(Franquicia) Then
CveModelo = ObjGral.DtResultados.FiltroPrimeroValor("CveModelo", String.Format("Modelo = '{0}'", DdlModelo.SelectedItem.Text)).ToEntero
End If
If ObjGral.GetMedidas(Franquicia) Then
CveMedida = ObjGral.DtResultados.FiltroPrimeroValor("CveMedida", String.Format("Medida = '{0}'", DdlMedida.SelectedItem.Text)).ToEntero
End If
If ObjGral.GetRimTamanios(Franquicia) Then
CveRin = ObjGral.DtResultados.FiltroPrimeroValor("CveRinTamaño", String.Format("RinTamaño = '{0}'", DdlRin.SelectedItem.Text)).ToEntero
End If
ObjGral.Dispose()
If CveClasificacion <= 0 Then If CveClasificacion <= 0 Then
Alert(String.Format("La clasificación indicada no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia) Alert(String.Format("La clasificación indicada no existe en la franquicia: '{0}'", nombreEmpresa), TipoMensaje.MsgAdvertencia)
Return True Return True
End If End If
If CveUnidadMedida <= 0 Then If CveUnidadMedida <= 0 Then
Alert(String.Format("La unidad de medida indicada no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia) Alert(String.Format("La unidad de medida indicada no existe en la franquicia: '{0}'", nombreEmpresa), TipoMensaje.MsgAdvertencia)
Return True
End If
If CveTipo <= 0 And DdlTipoPSDes.SelectedValue.ToEntero <> -1 Then
Alert(String.Format("El tipo de producto indicado no existe en la franquicia: '{0}'", nombreEmpresa), TipoMensaje.MsgAdvertencia)
Return True
End If
If CveMarcaFranquicia <= 0 And DdlMarca.SelectedValue.ToEntero <> -1 Then
Alert(String.Format("La marca indicada no existe en la franquicia: '{0}'", nombreEmpresa), TipoMensaje.MsgAdvertencia)
Return True
End If
If CveModelo <= 0 And DdlModelo.SelectedValue.ToEntero <> -1 Then
Alert(String.Format("El modelo indicado no existe en la franquicia: '{0}'", nombreEmpresa), TipoMensaje.MsgAdvertencia)
Return True
End If
If CveMedida <= 0 And DdlMedida.SelectedValue.ToEntero <> -1 Then
Alert(String.Format("La medida indicada no existe en la franquicia: '{0}'", nombreEmpresa), TipoMensaje.MsgAdvertencia)
Return True
End If
If CveRin <= 0 And DdlRin.SelectedValue.ToEntero <> -1 Then
Alert(String.Format("El rin indicado no existe en la franquicia: '{0}'", nombreEmpresa), TipoMensaje.MsgAdvertencia)
Return True Return True
End If End If
@@ -2778,12 +2824,12 @@ Partial Class ProductosyServicios
If Not ObjPS.AddPS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, "", TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, If Not ObjPS.AddPS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, "", TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble,
(TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, DdlProveedor.txtValue.Value.ToEntero, True, ChkAplicaParaVenta.Checked, UsuarioActual.CveUsuario, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, DdlProveedor.txtValue.Value.ToEntero, True, ChkAplicaParaVenta.Checked, UsuarioActual.CveUsuario,
Franquicia, CveMetodoInv, EsPaquete, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, FuePorXML:=False, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, Franquicia, CveMetodoInv, EsPaquete, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, FuePorXML:=False, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2,
CveMarca:=CveMarca, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal, CveMarca:=CveMarcaFranquicia, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal,
CveConceptoContable:=DdlConceptoRelacionado.SelectedValue.ToEntero, CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero, CveConceptoContable:=DdlConceptoRelacionado.SelectedValue.ToEntero, CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero,
IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal, CveMoneda:=DdlMoneda.SelectedValue.ToEntero, RetISR:=(TxtRetISR.Text.Trim.ToDouble / 100), IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal, CveMoneda:=DdlMoneda.SelectedValue.ToEntero, RetISR:=(TxtRetISR.Text.Trim.ToDouble / 100),
PrecioMinimo:=TxtPrecioMinimo.Text.ToDecimal, CveTipoFactor:=DdlTipoFactor.SelectedValue.ToEntero, CveFraccionArancelaria:=DdlFraccionArancelaria.SelectedValue.ToEntero, PrecioMinimo:=TxtPrecioMinimo.Text.ToDecimal, CveTipoFactor:=DdlTipoFactor.SelectedValue.ToEntero, CveFraccionArancelaria:=DdlFraccionArancelaria.SelectedValue.ToEntero,
CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero, CveTamaño:=DdlTamanio.SelectedValue.ToEntero, CveModelo:=DdlModelo.SelectedValue.ToEntero(), CveClasificacionDetalle:=CveTipo, CveTamaño:=DdlTamanio.SelectedValue.ToEntero, CveModelo:=CveModelo,
CveMedida:=DdlMedida.SelectedValue.ToEntero(), CveRinTamaño:=DdlRin.SelectedValue.ToEntero(), ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, CveMedida:=CveMedida, CveRinTamaño:=CveRin, ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString,
ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString,
EsOutSourcing:=ChkEsOutSourcing.Checked, TiempoCaducidad:=TxtTiempoCaducidad.Text.ToEntero()) > 0 Then EsOutSourcing:=ChkEsOutSourcing.Checked, TiempoCaducidad:=TxtTiempoCaducidad.Text.ToEntero()) > 0 Then
'Alert(String.Format("Error al agregar el nuevo producto en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa"))) 'Alert(String.Format("Error al agregar el nuevo producto en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")))
@@ -2792,17 +2838,17 @@ Partial Class ProductosyServicios
End If End If
Else Else
If ObjPS.GetPS(-1, CveClasificacion, Franquicia, Codigo:=TxtCodigo.Text.Trim.ToUpper) Then If ObjPS.GetPS(-1, -1, Franquicia, Codigo:=TxtCodigo.Text.Trim.ToUpper) Then
Dim CvePS As Integer = ObjPS.DtResultados.FiltroPrimeroValor("CvePS").ToEntero() Dim CvePS As Integer = ObjPS.DtResultados.FiltroPrimeroValor("CvePS").ToEntero()
If Not ObjPS.UpdatePS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, "", TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, If Not ObjPS.UpdatePS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, "", TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble,
(TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, -1, True, ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, -1, True, ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv,
EsPaquete, DdlSATPS.SelectedValue.ToEntero, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarca, EsPaquete, DdlSATPS.SelectedValue.ToEntero, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarcaFranquicia,
AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal,
CveConceptoContable:=DdlConceptoRelacionado.SelectedValue.ToEntero, CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked, CveConceptoContable:=DdlConceptoRelacionado.SelectedValue.ToEntero, CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked,
VentaMinima:=TxtVentaMinima.Text.ToDecimal, CveMoneda:=DdlMoneda.SelectedValue.ToEntero, RetISR:=(TxtRetISR.Text.Trim.ToDouble / 100), PrecioMinimo:=TxtPrecioMinimo.Text.ToDecimal, VentaMinima:=TxtVentaMinima.Text.ToDecimal, CveMoneda:=DdlMoneda.SelectedValue.ToEntero, RetISR:=(TxtRetISR.Text.Trim.ToDouble / 100), PrecioMinimo:=TxtPrecioMinimo.Text.ToDecimal,
CveTipoFactor:=DdlTipoFactor.SelectedValue.ToEntero, CveFraccionArancelaria:=DdlFraccionArancelaria.SelectedValue.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveTipoFactor:=DdlTipoFactor.SelectedValue.ToEntero, CveFraccionArancelaria:=DdlFraccionArancelaria.SelectedValue.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario,
CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero, CveTamaño:=DdlTamanio.SelectedValue.ToEntero, CveModelo:=DdlModelo.SelectedValue.ToEntero(), CveClasificacionDetalle:=CveTipo, CveTamaño:=DdlTamanio.SelectedValue.ToEntero, CveModelo:=CveModelo,
CveMedida:=DdlMedida.SelectedValue.ToEntero(), CveRinTamaño:=DdlRin.SelectedValue.ToEntero(), ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, CveMedida:=CveMedida, CveRinTamaño:=CveRin, ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString,
ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString,
EsOutSourcing:=ChkEsOutSourcing.Checked, AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, EsOutSourcing:=ChkEsOutSourcing.Checked, AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked,
TiempoCaducidad:=TxtTiempoCaducidad.Text.ToEntero()) Then TiempoCaducidad:=TxtTiempoCaducidad.Text.ToEntero()) Then
@@ -2817,4 +2863,34 @@ Partial Class ProductosyServicios
Next Next
Return False Return False
End Function End Function
Private Function GuardarProductosEquivalenteEnFranquicia(ObjPS As ClsProductosServicios, Agregar As Boolean) As Boolean
Dim EmpresasFranquicia = New Integer() {152}
For Each Franquicia As Integer In EmpresasFranquicia
Dim CvePSPagina As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("Codigo = '{0}'", TxtCodigo.Text.Trim)).ToEntero
Dim CvePSAdicional As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("PS = '{0}'", DdlPSAdicional.SelectedItem.Text)).ToEntero
If CvePSPagina <= 0 Then
Alert(String.Format("El producto de la página no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
End If
If CvePSPagina <= 0 Then
Alert(String.Format("El producto adicional no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
End If
If Agregar Then
If Not ObjPS.AddPSAdicionales(CvePSPagina, CvePSAdicional, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then
Return True
End If
Else
Dim PSAnterior As String = GlobalDTPS(Franquicia).FiltroPrimeroValor("PS", String.Format("CvePS = '{0}'", CvePSAdicional))
Dim CvePSAnterio As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("PS = '{0}'", PSAnterior)).ToEntero
If Not ObjPS.UpdatePSAdicionales(CvePSPagina, CvePSAdicional, CvePSAnterio, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then
Return True
End If
End If
Next
Return False
End Function
End Class End Class

View File

@@ -11458,7 +11458,7 @@ Partial Class Ventas
End If End If
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto"}) DT = TmpDTDetalle.FiltraParametros($"CvePS <> {CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
If DT.Rows.Count > 0 Then If DT.Rows.Count > 0 Then
'Se agrega movimiento separado por la cuenta de ventas (ER) 'Se agrega movimiento separado por la cuenta de ventas (ER)
@@ -11491,8 +11491,6 @@ Partial Class Ventas
If Row2("CveClasificacion").ToString() = "19929" Then IdCtaContable = 1142 If Row2("CveClasificacion").ToString() = "19929" Then IdCtaContable = 1142
End If End If
' CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
If importeMovimiento <> 0 Then If importeMovimiento <> 0 Then
If IdCtaContable <= 0 Then If IdCtaContable <= 0 Then
@@ -11500,12 +11498,7 @@ Partial Class Ventas
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
'If CveCuenta <= 0 Then If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=Row2("CveSubProyecto").ToString().ToEntero(), ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal) Then
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"))
' CveCuentaContabilizacion = 0
'End If
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=Row2("CveSubProyecto").ToString().ToEntero(), ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Else Else
ViewState("SeGuardoPrePoliza") = True ViewState("SeGuardoPrePoliza") = True
@@ -23894,7 +23887,7 @@ Partial Class Ventas
If Math.Abs(difTmp) > 0.00D Then If Math.Abs(difTmp) > 0.00D Then
'asusto la diferencia en el último concepto 'asusto la diferencia en el último concepto
Dim ImporteAjustado As Decimal = DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal").ToString().ToDecimal + Math.Abs(difTmp) Dim ImporteAjustado As Decimal = DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal").ToString().ToDecimal + difTmp
DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal") = ImporteAjustado DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal") = ImporteAjustado
DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImportePU") = ImporteAjustado DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImportePU") = ImporteAjustado
End If End If

View File

@@ -126,6 +126,8 @@