This commit is contained in:
Antonio Gonzalez
2020-11-04 16:57:29 -07:00
17 changed files with 362 additions and 95 deletions

View File

@@ -1140,7 +1140,9 @@ Public Class ClsContabilidad
Optional ObjConta As ClsContPAQi = Nothing, Optional pIDPoliza As Integer = -1) As Boolean
Dim StrLog As New StringBuilder
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
@@ -1154,7 +1156,7 @@ Public Class ClsContabilidad
If CvePrePoliza <= 0 Then Return False
Dim OcurrioError As Boolean = False
Dim ContaCompartida As Boolean = False
If ObjConta Is Nothing Then
@@ -1263,6 +1265,7 @@ Public Class ClsContabilidad
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
OcurrioError = True
StrLog.AppendFormat(" Error 1.1 - ")
Exit For
End If
@@ -1271,6 +1274,7 @@ Public Class ClsContabilidad
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
OcurrioError = True
StrLog.AppendFormat(" Error 1.2 - ")
Exit For
End If
@@ -1279,6 +1283,7 @@ Public Class ClsContabilidad
End If
Else
OcurrioError = True
StrLog.AppendFormat(" Error 1.3 - ")
Mensaje.Append(String.Format("<br> La cuenta contable {0} es invalida", dr("ConceptoContable")))
Exit For
End If
@@ -1298,6 +1303,7 @@ Public Class ClsContabilidad
dr("ISRRetenido").ToString.ToDecimal,
dr("IVARetenido").ToString.ToDecimal, False) Then
OcurrioError = True
StrLog.AppendFormat(" Error 1.4 - ")
End If
End If
@@ -1347,6 +1353,7 @@ Public Class ClsContabilidad
IdProveedor = ObjConta.AddProveedor(IdCtaContProveedores, RFC, RazonSocial, "")
If IdProveedor <= 0 Then
OcurrioError = True
StrLog.AppendFormat(" Error 1.5 - ")
End If
End If
@@ -1364,6 +1371,7 @@ Public Class ClsContabilidad
dr("Serie").ToString.ToString,
dr("Folio").ToString.StrToNum, dr("FolioFiscal").ToString, Empresa.CveEmpresa) Then
OcurrioError = True
StrLog.AppendFormat(" Error 1.6 - ")
Mensaje.Append("La Poliza o la Cuenta no son válidas ")
End If
@@ -1377,12 +1385,14 @@ Public Class ClsContabilidad
If Not OcurrioError Then
If Not UpdatePrePolizasDetalleBloquear(CvePrePoliza, True) Then
StrLog.AppendFormat(" Error 2.1 - ")
OcurrioError = True
End If
End If
If Not OcurrioError Then
If Not UpdatePrePoliza(Fecha, ObjConta.Folio, CveTipoPoliza, tIdPoliza, CvePrePoliza, Empresa.CveEmpresa, CveUsuarioModifico:=CveUsuario) Then
StrLog.AppendFormat(" Error 2.2 - ")
OcurrioError = True
End If
End If
@@ -1404,11 +1414,13 @@ Public Class ClsContabilidad
Else
OcurrioError = True
StrLog.AppendFormat(" Error 3.1 - ")
End If
Catch ex As Exception
StrLog.AppendFormat(" Error 4.1 - ")
If Not ContaCompartida Then ObjConta.RollBack()
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)
@@ -1417,8 +1429,9 @@ Public Class ClsContabilidad
If Not ContaCompartida Then ObjConta.Dispose()
End If
StrLog.AppendFormat(" - Con Retorno ({0}) - OcurrioError ({1} ", Retorno, OcurrioError)
StrLog.AppendFormat(" - Fin")
StrLog.ToString.GuardaLogAD("LogContabilidazacion")
StrLog.ToString.GuardaLogAD("LogContabilizacion")
Return Retorno
End Function

View File

@@ -34,11 +34,17 @@ Public Class ClsContratos
End Property
Public Property NotificarAvanceAlcanzado As Boolean
Public Property CveContratoGasto As Integer
Public Property CveContratoGasto As Integer
Public Property NumeroEstimacionNueva As Integer
Public Property CveEstimacionNueva As Integer
#End Region
#Region "T R A N S A C C I O N E S"
Public Function IniciaTransacSQL() As SqlTransaction
If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction()
@@ -1102,6 +1108,61 @@ Public Class ClsContratos
Return Retorno
End Function
Public Function AddContratosAvanceEstimacion(CveContrato As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno = False
NumeroEstimacionNueva = -1
CveEstimacionNueva = -1
DataAdapter("PA_Con_ContratosEstimacionAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@NumeroEstimacion", SqlDbType.Int).Direction = ParameterDirection.Output
.Add("@CveEstimacion", SqlDbType.Int).Direction = ParameterDirection.Output
End With
Try
SqlAdapter.Fill(Data)
NumeroEstimacionNueva = SqlAdapter.SelectCommand.Parameters("@NumeroEstimacion").Value.ToString.ToEntero
CveEstimacionNueva = SqlAdapter.SelectCommand.Parameters("@CveEstimacion").Value.ToString.ToEntero
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al agregar la estimación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function UpdateContratosAvanceEstimacion(CveContratoAvance As Integer, CveEstimacion As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno = False
DataAdapter("PA_Con_ContratosAvanceEstimacionUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveContratoAvance", SqlDbType.Int).Value = CveContratoAvance
.Add("@CveEstimacion", SqlDbType.Int).Value = CveEstimacion
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar el avance.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
#End Region
#Region " S E C C I O N E S "

View File

@@ -745,7 +745,7 @@ Public Class ClsOIEventos
OnError("Ocurrió un error al actualizar la relación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
End Function
Public Function UPEventosVinculo(CveEvento As Integer, CveTipoRelacion As Integer, CveRelacion As Integer, CveEmpresa As Integer, CveUsuarioIng As Integer) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_OI_EventosVinculoUP", CommandType.StoredProcedure)

View File

@@ -850,7 +850,7 @@ Public Class WS_PuntoVenta
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.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.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.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
'Ingresar los detalles
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)
' For Each Row As DataRow In DT.Rows
ImporteMov = objVenta.SubTotal ' TmpDT.SUM("Total", "IdCtaContVentas = '" & Row("IdCtaContVentas").ToString & "'")
Dim CveClasificacion_04 = -1
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
End If
End If
@@ -989,7 +990,7 @@ Public Class WS_PuntoVenta
'Se agregan los DSV DESCUENTOS
ImporteMov = objVenta.Descuento
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
End If
End If
@@ -998,7 +999,7 @@ Public Class WS_PuntoVenta
'Se agregan las CxC
ImporteMov = objVenta.Total - TotalPagado
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
End If
End If
@@ -1006,7 +1007,8 @@ Public Class WS_PuntoVenta
'Si hubo un pago agregarlo
ImporteMov = TotalPagado
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
End If
End If
@@ -1014,7 +1016,11 @@ Public Class WS_PuntoVenta
'Se agregan el Traslado de IVA
ImporteMov = objVenta.IVA
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
End If
End If
@@ -1238,7 +1244,7 @@ Public Class WS_PuntoVenta
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
If CvePrePoliza > 0 Then
@@ -1252,9 +1258,9 @@ Public Class WS_PuntoVenta
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
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
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))
Case "sendMailLPM"
context.Response.Write(sendMailLPM(context))
Case "GetTokenAngular"
context.Response.Write(GetTokenAngular(context))
context.Response.End()
End Select
Catch ex As Exception
ex.GuardaLog(ex.Message)
End Try
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
Dim retorno As String = "true"
Dim nombre As String = ""

Binary file not shown.

Binary file not shown.

View File

@@ -570,6 +570,13 @@
<asp:BoundField DataField="FechaPago" HeaderText="Fecha Pago" ItemStyle-HorizontalAlign="center" DataFormatString="{0:d}" />
<asp:BoundField DataField="ImportePago" HeaderText="Importe Pago" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
<asp:TemplateField ItemStyle-HorizontalAlign="Center" Visible="false">
<ItemTemplate>
<asp:Label ID="LblCveIE" runat="server" />
<asp:Label ID="LblCvePrePolizaDetalle" runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>

View File

@@ -2926,6 +2926,9 @@ Partial Class Compras_eFacturas
End If
Next
If MSGComplemento.Trim.Length > 0 Then
' BtnVincularPago.Visible = False
ViculacionConPUE = True
@@ -2974,11 +2977,30 @@ Partial Class Compras_eFacturas
GvVincularPago.DataBind()
UpVincularPago.Update()
ListaComprasPUE = ListaComprasPUEInterna
If DivVincularPagoManualmente.Visible Then
For Each GvRowValidaCompra As GridViewRow In GVPDocumentosRelacionadosPagos.Rows
If GvRowValidaCompra.DataKey("CveCompra").ToEntero > 0 Then
DivVincularPagoManualmente.Visible = True
Exit For
Else
DivVincularPagoManualmente.Visible = False
End If
Next
End If
UpVincularPago.Update()
RegistraScript("$('#ModalVincularPago').modal('show')", "VincularPagoModalShow")
End Sub
@@ -3004,11 +3026,25 @@ Partial Class Compras_eFacturas
For Each Gv As GridViewRow In GVPDocumentosRelacionadosPagos.Rows
If Not ObjCompra.AddComplementoPago(Gv.DataKey("CveIE").ToEntero, Gv.DataKey("CveCompra").ToEntero, Gv.DataKey("ImpPagado").ToDecimal, Gv.DataKey("CvePrePolizaDetalle").ToEntero, CveFacturaPago) > 0 Then
TieneError = True
If HdnCveIE.Value.ToEntero > 0 Then
If Gv.DataKey("CveCompra").ToEntero > 0 And Gv.FCLabel("LblCveIE").Text.ToEntero > 0 Then
If Not ObjCompra.AddComplementoPago(Gv.FCLabel("LblCveIE").Text.ToEntero, Gv.DataKey("CveCompra").ToEntero, Gv.DataKey("ImpPagado").ToDecimal, Gv.FCLabel("LblCvePrePolizaDetalle").Text.ToEntero, CveFacturaPago) > 0 Then
TieneError = True
Exit For
End If
End If
Else
If Gv.DataKey("CveCompra").ToEntero > 0 Then
If Not ObjCompra.AddComplementoPago(Gv.DataKey("CveIE").ToEntero, Gv.DataKey("CveCompra").ToEntero, Gv.DataKey("ImpPagado").ToDecimal, Gv.DataKey("CvePrePolizaDetalle").ToEntero, CveFacturaPago) > 0 Then
TieneError = True
Exit For
End If
End If
End If
Next
If Not TieneError AndAlso Not ObjCompra.AddVincularPago(CveFacturaPago) Then
@@ -3021,6 +3057,7 @@ Partial Class Compras_eFacturas
If ViculacionConPUE Then
For Each CveCompraVinculada In ListaComprasPUE
objEventos.AddEventoBitacora($"Complemento { ComplementoConPUE } vinculado manualmente (Compra PUE) ", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=CveCompraVinculada)
Next
@@ -3040,6 +3077,8 @@ Partial Class Compras_eFacturas
ObjCompra.Commit()
HdnCveIE.Value = ""
Alert("El pago fue vinculado correctamente", TipoMensaje.MsgInformacion)
RegistraScript("$('#ModalVincularPago').modal('hide')", "VincularPagoModalHide")
CargaDatos()
@@ -3062,33 +3101,83 @@ Partial Class Compras_eFacturas
End Sub
Protected Sub BtnVincularManualmente_Click(sender As Object, e As EventArgs)
If HdnCveIE.Value <> "-1" AndAlso IsNumeric(HdnCveIE.Value) AndAlso HdnCveIE.Value.ToEntero > 0 Then
Dim ImportePago As Double = 0
Dim ImporteIES As Double = 0
Dim SerieFolioIE As String = ""
Dim ObjCompras As New ClsCompras
Dim ErrorVinculacion = True
If ObjCompras.GetCompararComplementoPago(CveProveedor, -1, "", UsuarioActual.CveEmpresa, HdnCveIE.Value.ToEntero) Then
GvVincularPago.DataSource = ObjCompras.DtResultados
If ObjCompras.DtResultados.Rows.Count > 0 Then
SerieFolioIE = ObjCompras.DtResultados.Rows(0)("SerieFolio").ToString
End If
ImportePago = ObjCompras.DtResultados.SUMD("Monto")
'GvVincularPago.DataSource = ObjCompras.DtResultados
'If ObjCompras.DtResultados.Rows.Count > 0 Then
' SerieFolioIE = ObjCompras.DtResultados.Rows(0)("SerieFolio").ToString
'End If
'ImportePago = ObjCompras.DtResultados.SUMD("Monto")
For Each Drow As DataRow In ObjCompras.DtResultados.Rows
For Each GvRow As GridViewRow In GVPDocumentosRelacionadosPagos.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
If Drow("CveCompra").ToString.ToEntero = GvRow.DataKey("CveCompra").ToEntero Then
GvRow.FCLabel("LblCveIE").Text = Drow("CveIE").ToString.ToEntero.ToString
GvRow.FCLabel("LblCvePrePolizaDetalle").Text = Drow("CvePrePolizaDetalle").ToString.ToEntero.ToString
End If
End If
Next
Next
For Each GvRow As GridViewRow In GVPDocumentosRelacionadosPagos.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
If GvRow.FCLabel("LblCveIE").Text.ToEntero > 0 And GvRow.FCLabel("LblCvePrePolizaDetalle").Text.ToEntero > 0 Then
ErrorVinculacion = False
Exit For
Else
ErrorVinculacion = True
End If
End If
Next
Else
ErrorVinculacion = True
End If
ImporteIES = ObjCompras.DtResultados.FiltraParametros("CveIE > 0").SUM("Importe")
ObjCompras.Dispose()
If Not ErrorVinculacion Then
ImporteIES = ObjCompras.DtResultados.FiltraParametros("CveIE > 0").SUM("Importe")
ObjCompras.Dispose()
BtnVincularPago.Visible = True
BtnVincularPago.Visible = True
LblSerieFolioPago.Text = $"{SeriePago}-{FolioPago}"
LblImportePago.Text = ImportePago.FormatoNumero
'LblSerieFolioIE.Text = SerieFolioIE
LblImporteIE.Text = ImporteIES.FormatoNumero
GvVincularPago.DataBind()
UpVincularPago.Update()
ObjCompras.Dispose()
Else
Alert("No se pudo realizar la vinculacion manual", TipoMensaje.MsgAdvertencia)
End If
LblSerieFolioPago.Text = $"{SeriePago}-{FolioPago}"
LblImportePago.Text = ImportePago.FormatoNumero
'LblSerieFolioIE.Text = SerieFolioIE
LblImporteIE.Text = ImporteIES.FormatoNumero
GvVincularPago.DataBind()
UpVincularPago.Update()
ObjCompras.Dispose()
End If
End Sub
Private Sub GVPDocumentosRelacionadosPagos_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles GVPDocumentosRelacionadosPagos.RowCreated

View File

@@ -273,7 +273,7 @@
<div class="col-md-12">
<asp:GridView ID="GvEstimaciones" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron partidas para levantar avance"
DataKeyNames="CveFamilias,CveSubFamilias,CveContratoDetalle,PS,Cantidad,Importe,Cantidad_Ultima,Importe_Ultima,PU,CantidadMax,Avance"
DataKeyNames="CveContratoAvance,CveFamilias,CveSubFamilias,CveContratoDetalle,PS,Cantidad,Importe,Cantidad_Ultima,Importe_Ultima,PU,CantidadMax,Avance"
CssClass="table GVEstimacion table-advance table-hover" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="">

View File

@@ -33,7 +33,22 @@ Partial Class Contratos_ContratoAvance
Set(value As Integer)
ViewState("CveContrato") = value
End Set
End Property
Private Property CveContratoEstimacion As Integer
Get
If ViewState("CveContratoEstimacion") Is Nothing Then
Return Nothing
Else
Return ViewState("CveContratoEstimacion").ToString.ToEntero
End If
End Get
Set(value As Integer)
ViewState("CveContratoEstimacion") = value
End Set
End Property
'fecha seleccionada del historico de avances
Private Property fecha As String
Get
@@ -306,7 +321,7 @@ Partial Class Contratos_ContratoAvance
Private Sub CargaAvancesParaEstimar()
CveContratoEstimacion = -1
Dim ObjContratos As New ClsContratos()
Dim DTEstimaciones As New DataTable
@@ -314,9 +329,10 @@ Partial Class Contratos_ContratoAvance
If ObjContratos.GetContratosAvanceEstimacion(DDlContratosEstimaciones.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
DTEstimaciones = ObjContratos.DtResultados
BtnGuardarEstimacion.Visible = True
Else
BtnGuardarEstimacion.Visible = False
CveContratoEstimacion = DDlContratosEstimaciones.SelectedValue.ToEntero
End If
@@ -325,8 +341,10 @@ Partial Class Contratos_ContratoAvance
If DTEstimaciones.Rows.Count > 0 Then
GvEstimaciones.DataSource = DTEstimaciones
BtnGuardarEstimacion.Visible = True
Else
GvEstimaciones.DataSource = Nothing
BtnGuardarEstimacion.Visible = False
End If
GvEstimaciones.DataBind()
@@ -358,16 +376,46 @@ Partial Class Contratos_ContratoAvance
End If
End If
End Sub
Private Sub BtnGuardarEstimacion_Click(sender As Object, e As EventArgs) Handles BtnGuardarEstimacion.Click
Dim ObjContratos As New ClsContratos()
Dim ErrorProceso As Boolean = False
Dim NuemeroEstimacion As Integer = -1
ObjContratos.IniciaTransacSQL()
If ObjContratos.AddContratosAvanceEstimacion(CveContratoEstimacion, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
NuemeroEstimacion = ObjContratos.NumeroEstimacionNueva
For Each GvRow As GridViewRow In GvEstimaciones.Rows
If GvRow.DataKey("CveContratoAvance").ToEntero > 0 Then
If Not ObjContratos.UpdateContratosAvanceEstimacion(GvRow.DataKey("CveContratoAvance").ToEntero, ObjContratos.CveEstimacionNueva, UsuarioActual.CveEmpresa) Then
ErrorProceso = True
Exit For
End If
End If
Next
Else
ErrorProceso = True
End If
'AddContratosAvanceEstimacion
'UpdateContratosAvanceEstimacion
If Not ErrorProceso Then
ObjContratos.Commit()
Alert($"Estimación {NuemeroEstimacion} agregada correctamente.")
Else
ObjContratos.RollBack()
End If
ObjContratos.Dispose()

View File

@@ -2850,11 +2850,11 @@ Partial Class Inventarios_EntregaAlmacen
Dim ValorMultiplicador = 1
If TipoMovimiento = 1 Then
ValorMultiplicador = 1
ElseIf TipoMovimiento = 2 AndAlso TipoDocto.Contiene({"Dev"}) AndAlso (EsDevolucionVenta = 1) Then
ValorMultiplicador = 1
ElseIf TipoMovimiento = 2 Then
ValorMultiplicador = -1
ElseIf TipoMovimiento = 2 AndAlso TipoDocto.Contiene({"Dev"}) And (EsDevolucionVenta = 1) Then
ValorMultiplicador = 1
ValorMultiplicador = -1
End If
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/RecepcionEntrega", 4, TotalCosto, TotalCosto, 1, Fecha, ClienteNombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)

View File

@@ -3002,8 +3002,8 @@ Partial Class Inventarios_RecepcionAlmacen
'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
TotalCostoDetalle = TotalCostoDetalle + (Math.Round(TotalCosto, 2) - Math.Round(TotalCostoAcumulado, 2))
TotalCostoExtranjero = TotalCostoExtranjero + (Math.Round(TotalCosto, 2) - Math.Round(TotalCostoAcumulado, 2))
TotalCostoDetalle = TotalCostoDetalle + (Math.Round(TotalCosto, 3) - Math.Round(TotalCostoAcumulado, 3))
TotalCostoExtranjero = TotalCostoExtranjero + (Math.Round(TotalCosto, 3) - Math.Round(TotalCostoAcumulado, 3))
End If
If CveMoneda <> 1 AndAlso UsaComplementariaFleteImportaciones Then

View File

@@ -40,7 +40,7 @@
<div class="col-sm-1" style="text-align:right">
<label>Proveedor:</label>
</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>
</div>
<div class="col-sm-1" style="text-align:right">
@@ -72,19 +72,28 @@
<div class="col-sm-1" style="text-align:right">
<label>Sucursal:</label>
</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>
</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>
</div>
<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>
</ContentTemplate>
</asp:UpdatePanel>
<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 */
/* 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 > tbody > tr.ADSRow > td, table.table > tbody > 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 {
width: 8px;
height:10px;
height: 10px;
background-color: #F5F5F5;
}
@@ -58,7 +67,7 @@ table > tr > th.adsCol, table.table > tr > th.adsCol {
background-color: #AAA;
border-radius: 4px;
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 {
@@ -440,7 +449,7 @@ input[type="hidden"] {
}
/*end tabwizard*/
/*tab wizard2*/
/*tab wizard2*/
.tab-wizard2 {
text-align: center;
counter-reset: section;
@@ -467,28 +476,29 @@ input[type="hidden"] {
position: relative;
display: block;
padding: 10px 15px;
text-align:center;
text-align: center;
}
.tab-wizard2 .ajax__tab_outer a.ajax__tab_tab > span::before {
content: ' ';
display: block;
}
.tab-wizard2 .ajax__tab_outer a.ajax__tab_tab::before {
background-color: #eee;
text-align: center !important;
padding: 13px 15px 11px;
height: 45px;
width: 45px;
-webkit-border-radius: 50% !important;
-moz-border-radius: 50% !important;
border-radius: 50% !important;
counter-increment: section;
content: ' 'counter(section);
display: inline-block;
position: relative;
margin-right:4px;
}
.tab-wizard2 .ajax__tab_outer a.ajax__tab_tab::before {
background-color: #eee;
text-align: center !important;
padding: 13px 15px 11px;
height: 45px;
width: 45px;
-webkit-border-radius: 50% !important;
-moz-border-radius: 50% !important;
border-radius: 50% !important;
counter-increment: section;
content: ' 'counter(section);
display: inline-block;
position: relative;
margin-right: 4px;
}
.tab-wizard2 .ajax__tab_active .ajax__tab_outer a.ajax__tab_tab::before {
background-color: rgb(54, 198, 211);
@@ -506,7 +516,7 @@ input[type="hidden"] {
.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);
}
}
/*end tabwizard2*/
@@ -728,11 +738,12 @@ div.ADScroller {
line-height: .5 !important;
}
div:not(.ADScroller-header)>table tbody .trnopadding.ADtr {
div:not(.ADScroller-header) > table tbody .trnopadding.ADtr {
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 {
@@ -2661,6 +2672,7 @@ select.select2-offscreen, select.select2-offscreen:focus {
font-size: 20px;
margin-top: 15px;
}
.addropzone.dz-clickable:after {
position: absolute;
content: "o presione doble click";
@@ -2925,9 +2937,9 @@ select.select2-offscreen, select.select2-offscreen:focus {
margin-right: 0px;
}
.select2 .select2-selection__rendered{
line-height:1;
color:#111;
.select2 .select2-selection__rendered {
line-height: 1;
color: #111;
}
.select2 .select2-selection--multiple {
@@ -2951,18 +2963,21 @@ select.select2-offscreen, select.select2-offscreen:focus {
.btn-consultar {
background: #444;
color:#fff
}
.btn-consultar:hover {
background: #2f353b;
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 > 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 > 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;
}
div.mypaste * {
display: none;
}
}

View File

@@ -23887,7 +23887,7 @@ Partial Class Ventas
If Math.Abs(difTmp) > 0.00D Then
'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)("ImportePU") = ImporteAjustado
End If

View File

@@ -126,10 +126,6 @@