Merge branch 'master' of http://agonzalez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -5152,7 +5152,9 @@ Partial Class Ventas
|
||||
|
||||
CargarAlmacenes()
|
||||
|
||||
CargaDocumentacionCliente()
|
||||
If UsuarioActual.Empresa.FacturaProduccion Then
|
||||
CargaDocumentacionCliente()
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 1, 119) Then
|
||||
BtnEmitirImprimir.OnClientClick = $"ValidaGuardar({ If(ImprimeNombreSucursal = True, 1, 0)});"
|
||||
@@ -7029,7 +7031,7 @@ Partial Class Ventas
|
||||
|
||||
'MARCA LO PENDIENTE A NIVEL DETALLE
|
||||
Dim DtMovDetalles As DataTable = Nothing
|
||||
If ObjInventario.GetSaldoVentaDetalle(ObjFactura.CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
If ObjInventario.GetSaldoVentaDetalle(CveDevolucion, UsuarioActual.CveEmpresa) Then
|
||||
DtMovDetalles = ObjInventario.DtResultados.Copy()
|
||||
End If
|
||||
|
||||
@@ -7037,9 +7039,9 @@ Partial Class Ventas
|
||||
For Each Row As DataRow In DtMovDetalles.Rows
|
||||
Dim SaldoAlmacen As Decimal = Row("SaldoAlmacen").ToString().ToEntero()
|
||||
If SaldoAlmacen < 0 Then
|
||||
ObjInventario.UpdateEstatusAlmacen(Row("CveVentaDetalle").ToString().ToEntero(), 1)
|
||||
ObjInventario.UpdateEstatusAlmacen(Row("CveVentaDetalleNueva").ToString().ToEntero(), 1)
|
||||
ElseIf SaldoAlmacen = 0 Then
|
||||
ObjInventario.UpdateEstatusAlmacen(Row("CveVentaDetalle").ToString().ToEntero(), 0)
|
||||
ObjInventario.UpdateEstatusAlmacen(Row("CveVentaDetalleNueva").ToString().ToEntero(), 0)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
@@ -10186,7 +10188,7 @@ Partial Class Ventas
|
||||
Exit For
|
||||
Else
|
||||
ViewState("SeGuardoPrePoliza") = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, importeMovimiento, Referencia, 2, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=ObjFactura.CveCliente, ImporteMX:=importeMovimiento, ImporteME:=If(Dr("TCCambioValuacion").ToString().ToDecimal = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, CveIE:=CveIEAnticipo, CveVentaAmortizacion:=ObjFactura.CveVenta, TipoCambio:=Dr("TCCambioValuacion").ToString().ToDecimal, TipoCambioPago:=tipoCambio) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, importeMovimiento, Referencia, 2, Concepto, FechaMovimiento, ObjFactura.Cliente.IdCtaContClientes, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=ObjFactura.CveCliente, ImporteMX:=importeMovimiento, ImporteME:=If(Dr("TCCambioValuacion").ToString().ToDecimal = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, CveIE:=CveIEAnticipo, CveVentaAmortizacion:=ObjFactura.CveVenta, TipoCambio:=Dr("TCCambioValuacion").ToString().ToDecimal, TipoCambioPago:=tipoCambio) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -19451,6 +19453,7 @@ Partial Class Ventas
|
||||
|
||||
Private Sub CancelarDocumento(Optional EsRefacturacion As Boolean = False)
|
||||
|
||||
Dim LigaRedirigir As String = ""
|
||||
'Si es cancelacion de una refactura ignoramos las condiciones
|
||||
If Me.CveEstatus = 13 Then
|
||||
CancelarRefacturada()
|
||||
@@ -19495,11 +19498,9 @@ Partial Class Ventas
|
||||
Else
|
||||
If EsRefacturacion Then
|
||||
If resp.CveEstatus = 20 Then
|
||||
ObjFacturaCancelacion.Dispose()
|
||||
Server.Transfer($"/Ventas/RepCancelacionesPorRespuesta.aspx?CveVenta={CveVenta}")
|
||||
LigaRedirigir = $"/Ventas/RepCancelacionesPorRespuesta.aspx?CveVenta={CveVenta}"
|
||||
ElseIf resp.CveEstatus.Contiene(4, 5) Then
|
||||
ObjFacturaCancelacion.Dispose()
|
||||
Server.Transfer($"Ventas.aspx?CveDevolucion={CveVenta}&NuevaFactura=1")
|
||||
LigaRedirigir = $"Ventas.aspx?CveDevolucion={CveVenta}&NuevaFactura=1"
|
||||
Else
|
||||
Alert(resp.Mensaje, resp.TipoMensaje, JSBtnAceptar:="BtnRefrescarPagina();")
|
||||
End If
|
||||
@@ -19507,8 +19508,6 @@ Partial Class Ventas
|
||||
Alert(resp.Mensaje, resp.TipoMensaje, JSBtnAceptar:="BtnRefrescarPagina();")
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjFacturaCancelacion.CveAlmacen = -1
|
||||
Else
|
||||
Alert("Ocurrió un error al generar la cancelación", TipoMensaje.MsgError)
|
||||
End If
|
||||
@@ -19520,6 +19519,10 @@ Partial Class Ventas
|
||||
|
||||
UpEstatus.Update()
|
||||
|
||||
If Not String.IsNullOrEmpty(LigaRedirigir) Then
|
||||
Response.Redirect(LigaRedirigir)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user