Correcion al generar cotizacion de factura
This commit is contained in:
@@ -2306,9 +2306,9 @@ Partial Class Ventas
|
|||||||
ViewState("CveRemision") = IfNull(Request("CveRemision").ToEntero(), 0)
|
ViewState("CveRemision") = IfNull(Request("CveRemision").ToEntero(), 0)
|
||||||
ViewState("CveCotizacion") = IfNull(Request("CveCotizacion").ToEntero(), 0)
|
ViewState("CveCotizacion") = IfNull(Request("CveCotizacion").ToEntero(), 0)
|
||||||
|
|
||||||
If ViewState("CveCotizacion").ToString().ToEntero() > 0 Then
|
'If ViewState("CveCotizacion").ToString().ToEntero() > 0 Then
|
||||||
EsCreaApartirDe = True
|
' EsCreaApartirDe = True
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If ViewState("CveRemision").ToString().ToEntero() > 0 Or ViewState("CveCotizacion").ToString().ToEntero() > 0 Then
|
If ViewState("CveRemision").ToString().ToEntero() > 0 Or ViewState("CveCotizacion").ToString().ToEntero() > 0 Then
|
||||||
'ViewState("CveRemision") = Request("CveRemision")
|
'ViewState("CveRemision") = Request("CveRemision")
|
||||||
@@ -2346,6 +2346,20 @@ Partial Class Ventas
|
|||||||
|
|
||||||
'CargaDetalle de Almacen
|
'CargaDetalle de Almacen
|
||||||
InventarioMov()
|
InventarioMov()
|
||||||
|
|
||||||
|
If ViewState("CveCotizacion").ToString().ToEntero() > 0 Then
|
||||||
|
|
||||||
|
CargaCotizaciones()
|
||||||
|
|
||||||
|
If DtCotizaciones IsNot Nothing Then
|
||||||
|
For Each Row As DataRow In DtCotizaciones.Select($"CveVenta={ViewState("CveCotizacion").ToString().ToEntero()}")
|
||||||
|
Row("Aplicado") = True
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
CargarCotizacionesAFacturar()
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ExFolioFactura Then SetPermisos()
|
If Not ExFolioFactura Then SetPermisos()
|
||||||
@@ -16239,6 +16253,11 @@ Partial Class Ventas
|
|||||||
If Not OcurrioError Then
|
If Not OcurrioError Then
|
||||||
OcurrioError = Not GeneroMovimientoAlmacen
|
OcurrioError = Not GeneroMovimientoAlmacen
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If OcurrioError Then
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -16250,6 +16269,10 @@ Partial Class Ventas
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If OcurrioError Then
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
@@ -23598,6 +23621,15 @@ Partial Class Ventas
|
|||||||
|
|
||||||
'MARCA LAS SELECCIONADAS
|
'MARCA LAS SELECCIONADAS
|
||||||
VerificaCotizaciones(DtCotizaciones)
|
VerificaCotizaciones(DtCotizaciones)
|
||||||
|
|
||||||
|
CargarCotizacionesAFacturar()
|
||||||
|
|
||||||
|
RegistraScript("$('#DivCotizaciones').modal('hide');")
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargarCotizacionesAFacturar()
|
||||||
|
|
||||||
Dim DTSeleccionadas = DtCotizaciones.FiltraParametros("Aplicado = True")
|
Dim DTSeleccionadas = DtCotizaciones.FiltraParametros("Aplicado = True")
|
||||||
|
|
||||||
If DTSeleccionadas.Rows.Count = 0 Then
|
If DTSeleccionadas.Rows.Count = 0 Then
|
||||||
@@ -23684,9 +23716,6 @@ Partial Class Ventas
|
|||||||
UpFacturar.Update()
|
UpFacturar.Update()
|
||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
UpParametros.Update()
|
UpParametros.Update()
|
||||||
|
|
||||||
RegistraScript("$('#DivCotizaciones').modal('hide');")
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub VerificaCotizaciones(ByRef dt As DataTable)
|
Private Sub VerificaCotizaciones(ByRef dt As DataTable)
|
||||||
If ChkCotProductos.Checked Then
|
If ChkCotProductos.Checked Then
|
||||||
|
|||||||
Reference in New Issue
Block a user