Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -9144,6 +9144,10 @@ Partial Class Ventas
|
||||
AutoConta = False
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
AutoConta = True
|
||||
End If
|
||||
|
||||
If AutoConta Then
|
||||
If idCuentaContabilizacion > 0 Then
|
||||
If ObjConta.ContabilizarPrePoliza(ObjFactura.CvePrePoliza, ObjFactura.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then
|
||||
@@ -9177,9 +9181,6 @@ Partial Class Ventas
|
||||
|
||||
ViewState("CveVenta") = ObjFactura.CveVenta
|
||||
|
||||
|
||||
|
||||
|
||||
If Request("CveEmbarqueManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveEmbarqueManifiesto")) AndAlso Request("CveEmbarqueManifiesto").ToEntero() > 0 Then
|
||||
|
||||
If ObjVentas.Embarque_ManifiestoUpvta(ObjFactura.CveVenta, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, Request("CveEmbarqueManifiesto").ToEntero()) Then
|
||||
@@ -9188,7 +9189,6 @@ Partial Class Ventas
|
||||
End If
|
||||
GVAnticipos.DataBind()
|
||||
|
||||
|
||||
Try
|
||||
Dim DirectoriArchivoXML As String = String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto) ' System.IO.Path.Combine()
|
||||
If Not Directory.Exists(DirectoriArchivoXML) Then
|
||||
@@ -34434,5 +34434,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