-- generar póliza ac, de ingreso
This commit is contained in:
@@ -34374,5 +34374,38 @@ Partial Class Ventas
|
||||
UpEmitirTransitorio.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub BtnGenerarPoliza_Click(sender As Object, e As EventArgs)
|
||||
CreaObjetosVenta()
|
||||
Dim ObjAC As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim Msgok As New StringBuilder
|
||||
If ObjFactura.TipoDocto.Contiene("Ing", "Egs", "OP", "Com") Then
|
||||
|
||||
Dim IDPoliza As Modelos.RetornoPolizaConta = GenerarPolizaAC(ObjAC, ObjFactura)
|
||||
|
||||
If IDPoliza.IdPoliza > 0 Then
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
If ObjVentas.UpdateVentaPrePoliza(IDPoliza.IdPoliza, IDPoliza.FolioPoliza, CvePrePoliza, CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
'Si se facturó la cotización hay que vincular la venta
|
||||
Msgok.AppendFormat("Abono Registrado Correctamente.<br/><br/> <a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' target='_blank' class='Texto'>Ver Poliza</a>", IDPoliza)
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
'Si se facturó la cotización hay que vincular la venta
|
||||
Msgok.AppendFormat("Abono Registrado Correctamente.<br/><br/> <a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' target='_blank' class='Texto'>Ver Poliza</a>", IDPoliza)
|
||||
|
||||
Else
|
||||
ErrorList.Add("Ocurrió un error al generar A.C. en la Factura.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
End If
|
||||
|
||||
Else
|
||||
Msgok.Append("Movimiento Registrado Correctamente.<br/><br/> ")
|
||||
End If
|
||||
ObjAC.dispose
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user