This commit is contained in:
2019-12-02 12:21:49 -07:00
21 changed files with 349 additions and 329 deletions

View File

@@ -115,6 +115,15 @@ Partial Class OC_CotizacionEnLinea
CType(Me.Master, Site).EsPopup = True
CType(Me.Master, Site).PopupWidth = 670
If Request("CvePrePoliza") IsNot Nothing AndAlso IsNumeric(Request("CvePrePoliza")) AndAlso Request("CvePrePoliza").ToEntero > 0 Then
If IfNull(Request("Conta"), "").ToString = "1" Then
Contabilizar(Request("CveEmpresa").ToEntero, Request("CvePrePoliza").ToEntero, Request("IdPoliza").ToEntero)
End If
Exit Sub
End If
'Validar que este activo aun el link
'ViewState("CveOrdenCompra") = If(Not Request("CveOrdenCompra") Is Nothing AndAlso Request("CveOrdenCompra").ToString.ToEntero > 0, Request("CveOrdenCompra").ToEntero, 0)
'ViewState("CveProveedor") = If(Not Request("CveProveedor") Is Nothing AndAlso Request("CveProveedor").ToString.ToEntero > 0, Request("CveProveedor").ToEntero, 0)
@@ -147,6 +156,32 @@ Partial Class OC_CotizacionEnLinea
End If
End Sub
Private Sub Contabilizar(CveEmpresa As Integer, CvePrePoliza As Integer, IdPoliza As Integer)
Dim ObjConta As New ClsContabilidad
If IdPoliza > 0 Then 'si está bloqueada, lo desbloqueaprimero
ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False)
End If
Dim Emp As Empresa = Nothing
Dim Empr As New ClsSisEmpresas
If Empr.GetEmpresas(CveEmpresa, "-1", "-1", "-1", "-1") Then
Emp = Empr.Empresa
End If
Empr.Dispose()
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, 100, Emp, pIDPoliza:=If(IdPoliza > 0, IdPoliza, -1)) Then
' Alert(String.Format("Prepóliza contabilizada. <br/><br/>Folio:<a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", ObjConta.ContaIdPoliza), ModExtensiones.TipoMensaje.MsgInformacion)
Else
'Alert($"Ocurrio un error al contabilizar {ObjConta.AlertaMensaje}", TipoMensaje.MsgAdvertencia)
End If
ObjConta.Dispose()
End Sub
Protected Sub CargaMonedas()
Dim objMonedas As New ClsMonedas