diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb
index f5df70545..d5970bf8a 100644
--- a/Compras/Proveedores.aspx.vb
+++ b/Compras/Proveedores.aspx.vb
@@ -828,6 +828,8 @@ Partial Class Compras_Proveedores
HplAbonarMasivo.NavigateUrl = String.Format("/Bancos/ProveedoresAbonar.aspx?CveProveedor={0}&Serie={1}&CveMoneda={2}", CveProveedor, Serie, CveMoneda)
+ HplAbonarMasivoNotas.NavigateUrl = String.Format("/Bancos/IE.aspx?OPCION=DevDinC&CveProveedor={0}&Masivo={1}", CveProveedor, 1)
+
TxtCorreoCobranza.Text = ObjProveedor.CorreoCobranza
LblUsuarioPortalCliente.Text = ObjProveedor.CorreoCobranza
LblUsuarioPortalCliente.Attributes("style") = "font-weight: bold;"
@@ -1112,6 +1114,14 @@ Partial Class Compras_Proveedores
DtAntNCH = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Hist'")
GvAH.DataSource = DtAntNCH
End If
+
+
+ ' e.Row.DBCampo("TipoDocto") = "NC"
+ If ObjMovtos.DtResultados.FiltraParametros("TipoDocto = 'NC'").Rows.Count > 0 And UsuarioActual.TienePermisoProceso(273) Then
+ HplAbonarMasivoNotas.Visible = True
+ UpAnticipos.Update()
+ End If
+
Else
GvA.DataSource = Nothing
GvAH.DataSource = Nothing
diff --git a/Inventarios/PaquetesArmadoDesarmado.aspx b/Inventarios/PaquetesArmadoDesarmado.aspx
index b6b4271e3..403797160 100644
--- a/Inventarios/PaquetesArmadoDesarmado.aspx
+++ b/Inventarios/PaquetesArmadoDesarmado.aspx
@@ -216,18 +216,38 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Inventarios/PaquetesArmadoDesarmado.aspx.vb b/Inventarios/PaquetesArmadoDesarmado.aspx.vb
index ba212c0e1..8af94a12a 100644
--- a/Inventarios/PaquetesArmadoDesarmado.aspx.vb
+++ b/Inventarios/PaquetesArmadoDesarmado.aspx.vb
@@ -240,14 +240,15 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
End If
Next
+ Dim AplicaSerie As String = ""
If ErrorExistencias Then
Alert(TextoExistencias, TipoMensaje.MsgAdvertencia)
Else
- CveTipoPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPaqueteArmado.SelectedValue.ToEntero).FiltroPrimeroValor("Inv_CveMetodoInventario").ToEntero
+ AplicaSerie = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPaqueteArmado.SelectedValue.ToEntero).FiltroPrimeroValor("AplicaSerie")
BtnGuadarArmado.Visible = True
End If
- If CveTipoPS = 5 Then
+ If AplicaSerie = "True" Then
DivSeriesPaqueteArmado.Visible = True
Dim Dt As New DataTable
Dt.Columns.Add("Row", GetType(Integer))
@@ -468,6 +469,9 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
For Each Gvr As GridViewRow In GvDatosArmado.Rows
If Gvr.DataKey("Cantidad").ToString.ToDouble > 0 Then
+ Dim Lote As String = If(Gvr.FCTextBox("TxtLote").Text = "", "-1", Gvr.FCTextBox("TxtLote").Text)
+ Dim FechaCaducidad As String = If(Gvr.FCTextBox("TxtCaducidad").Text = "", "-1", Gvr.FCTextBox("TxtCaducidad").Text)
+ Dim CveSeccionAlmacen As Integer = Gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero()
If Gvr.DataKey("Inv_CveMetodoInventario").ToString.ToEntero = 5 Then
For Each Dr As DataRow In DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec").ToEntero)).Rows
If Not ObjInventario.GetExistenciasPS(Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenArmado.SelectedValue.ToEntero, FechaMovto:=Fecha.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Dr("Serie").ToString, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente)) >= 1 Then
@@ -476,7 +480,8 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
Exit For
End If
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1, Serie:=Dr("Serie").ToString) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1,
+ CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Dr("Serie").ToString, Lote:=Lote, FechaCaducidad:=FechaCaducidad.ToDate) Then
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de salida. Por favor vuelva a intentar."
TieneError = True
Exit For
@@ -488,7 +493,9 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
End If
Else
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.DataKey("Cantidad").ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.DataKey("Cantidad").ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero,
+ Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1, CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Lote,
+ FechaCaducidad:=FechaCaducidad.ToDate) Then
MensajeError = "Ocurrió un error al guardar los detalles del movimiento de salida. Por favor vuelva a intentar."
TieneError = True
Exit For
@@ -661,44 +668,44 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
'If Tipo = 1 Then
BtnGuadarArmado.Visible = False
- DivSeriesPaqueteArmado.Visible = False
- GvDatosArmado.Columns(4).Visible = False
+ DivSeriesPaqueteArmado.Visible = False
+ GvDatosArmado.Columns(4).Visible = False
- LbPaqueteArmado.Text = ""
- CvePaqueteArmado = -1
- LbCantidadArmado.Text = ""
- LbAlmacenArmado.Text = ""
- CveAlmacenArmado = -1
- LbFechaArmado.Text = ""
- TxtObservacionesArmado.Text = ""
- UpGeneralesArmado.Update()
+ LbPaqueteArmado.Text = ""
+ CvePaqueteArmado = -1
+ LbCantidadArmado.Text = ""
+ LbAlmacenArmado.Text = ""
+ CveAlmacenArmado = -1
+ LbFechaArmado.Text = ""
+ TxtObservacionesArmado.Text = ""
+ UpGeneralesArmado.Update()
- GvDatosArmado.DataBind()
- UpDatosArmado.Update()
- UpSeriesPaqueteArmado.Update()
+ GvDatosArmado.DataBind()
+ UpDatosArmado.Update()
+ UpSeriesPaqueteArmado.Update()
'Else
LbPaqueteDesarmado.Text = ""
- CvePaqueteDesarmado = -1
- LbCantidadDesarmado.Text = ""
- LbAlmacenDesarmado.Text = ""
- CveAlmacenDesarmado = -1
- LbFechaDesarmado.Text = ""
- TxtObservacionesDesarmado.Text = ""
- UpGeneralesDesarmado.Update()
+ CvePaqueteDesarmado = -1
+ LbCantidadDesarmado.Text = ""
+ LbAlmacenDesarmado.Text = ""
+ CveAlmacenDesarmado = -1
+ LbFechaDesarmado.Text = ""
+ TxtObservacionesDesarmado.Text = ""
+ UpGeneralesDesarmado.Update()
- BtnGuadarDesarmado.Visible = False
- TotalDesarmado.Visible = False
+ BtnGuadarDesarmado.Visible = False
+ TotalDesarmado.Visible = False
- DtSeriesDesarmado.Clear()
- GvDatosDesarmado.Columns(4).Visible = False
- DivSeriesPaqueteDesarmado.Visible = False
- GvSeriesPaqueteDesarmado.DataBind()
- BtnAgregarSerieDesarmado.Enabled = True
+ DtSeriesDesarmado.Clear()
+ GvDatosDesarmado.Columns(4).Visible = False
+ DivSeriesPaqueteDesarmado.Visible = False
+ GvSeriesPaqueteDesarmado.DataBind()
+ BtnAgregarSerieDesarmado.Enabled = True
- LbTotalCalculado.Text = "0.00"
+ LbTotalCalculado.Text = "0.00"
- GvDatosDesarmado.DataBind()
+ GvDatosDesarmado.DataBind()
UpDatosDesarmado.Update()
UpSeriesPaqueteDesarmado.Update()
@@ -730,6 +737,19 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
e.Row.FCButton("BtnSerie").Visible = False
End If
+ If e.Row.DataKey("AplicaSeccion") = "False" Then
+ e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
+ Else
+ e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
+ e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
+ e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
+ End If
+
+ e.Row.FCTextBox("TxtCaducidad").Visible = e.Row.DataKey("AplicaCaducidad") = "True"
+
+ e.Row.FCTextBox("TxtLote").Visible = e.Row.DataKey("AplicaLote") = "True"
+
+ e.Row.FCTextBox("TxtSerie").Visible = e.Row.DataKey("AplicaSerie") = "True"
''FUNCIONALIDAD PISTOLA DE CODIGOS
'If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then
' e.Row.FCTextBox("TbCantidadF").Enabled = False
diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx
index d8d8caf02..cb0957bcf 100644
--- a/Ventas/Ventas.aspx
+++ b/Ventas/Ventas.aspx
@@ -3403,6 +3403,8 @@
+
+
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index 9c27d444d..65b1df597 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -2049,6 +2049,7 @@ Partial Class Ventas
DdlSubProyectoDatos.Enabled = False
BtnEmitirImprimir.Visible = False
BtnCrearApartirDe.Visible = True
+ BtnEditar.Visible = True
'DdlEstatus.Enabled = True
DivFechaAnticipoCliente.Visible = True
@@ -4450,36 +4451,41 @@ Partial Class Ventas
End If
End If
+ If UsuarioActual.Empresa.Funcionalidad(280) = "1" Then
+ RblPaqueteria.SelectedValue = If(DbRowVenta("FormaPaqueteria").ToString = "", "1", DbRowVenta("FormaPaqueteria").ToString)
+ RblPaqueteria.Enabled = False
+ End If
+
If UsuarioActual.CveEmpresa = 48 Then
- TxtFecha.AutoPostBack = True
- End If
-
- CargaCodigoUnico()
-
- 'SI ES COTIZACION PUEDE GENERAR UNA OC PARA MODIFICAR LOS IMPORTES
- If DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(583) = "1" Then
- Dim DtOCGeneradas As DataTable = Nothing
- If ObjVentas.GetVentasCotizacionesOC(Me.CveVenta, -1, UsuarioActual.CveEmpresa) Then
- DtOCGeneradas = ObjVentas.DtResultados.Copy()
+ TxtFecha.AutoPostBack = True
End If
- If DtOCGeneradas IsNot Nothing AndAlso DtOCGeneradas.Rows.Count > 0 Then
- LtGenerarOC.Visible = False
- Else
- LtGenerarOC.Visible = True
+
+ CargaCodigoUnico()
+
+ 'SI ES COTIZACION PUEDE GENERAR UNA OC PARA MODIFICAR LOS IMPORTES
+ If DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(583) = "1" Then
+ Dim DtOCGeneradas As DataTable = Nothing
+ If ObjVentas.GetVentasCotizacionesOC(Me.CveVenta, -1, UsuarioActual.CveEmpresa) Then
+ DtOCGeneradas = ObjVentas.DtResultados.Copy()
+ End If
+ If DtOCGeneradas IsNot Nothing AndAlso DtOCGeneradas.Rows.Count > 0 Then
+ LtGenerarOC.Visible = False
+ Else
+ LtGenerarOC.Visible = True
+ End If
End If
- End If
- DdlTipoRetencion.SelectedValueExist(DbRowVenta("CveTipoRetencion").ToString())
+ DdlTipoRetencion.SelectedValueExist(DbRowVenta("CveTipoRetencion").ToString())
- CargaPS(-1, DdlPS)
+ CargaPS(-1, DdlPS)
- UpPS.Update()
- UpContado.Update()
- UpEstatus.Update()
- Retorno = True
+ UpPS.Update()
+ UpContado.Update()
+ UpEstatus.Update()
+ Retorno = True
- Else
- ViewState("CveVenta") = -1
+ Else
+ ViewState("CveVenta") = -1
Alert("El documento solicitado no existe, favor de revisar su búsqueda.", TipoMensaje.MsgAdvertencia)
End If
End If
@@ -25965,4 +25971,48 @@ Partial Class Ventas
End If
ObjVentas.Dispose()
End Sub
+
+ Protected Sub BtnEditar_Click() Handles BtnEditar.Click
+ Dim Opcion As String = BtnEditar.Text
+ If Opcion = "Editar" Then
+ EditarHabilitarCampos()
+ ElseIf Opcion = "Guardar" Then
+ GuardarValoresEditados()
+ End If
+ End Sub
+
+ Private Sub EditarHabilitarCampos()
+ 'Datos de emisión
+ DdlVendedor.Enabled = True
+
+ 'Observaciones
+ TxtObsFact.Enabled = True
+ TxtOrdenCompra.Enabled = True
+ TxtPedidoContrato.Enabled = True
+ TxtObsAlmacen.Enabled = True
+ RblPaqueteria.Enabled = True
+
+ 'Acciones
+ BtnEditar.Text = "Guardar"
+
+ UpParametros.Update()
+ UPObservaciones.Update()
+ UpFacturar.Update()
+ End Sub
+
+ Private Sub GuardarValoresEditados()
+ Dim ObjVentas As New ClsVentas()
+ If ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDecimal, LblDescuentos.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtIEPS.Text.ToDecimal, TxtTotal.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero(),
+ TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim, UsuarioActual.CveEmpresa, CveVenta, DdlMetodoPago33.SelectedValue.ToEntero, DdlFormaPago33.SelectedValue.ToEntero,
+ TipoDocto:=DdlTipoComprobante.SelectedValue, OrdenCompra:=TxtOrdenCompra.Text, PedidoContrato:=TxtPedidoContrato.Text, ObsAlm:=TxtObsAlmacen.Text, FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero,
+ CorreoNot:=TxtCorreoNotificaciones.Text) Then
+ CargaVenta()
+ BtnEditar.Text = "Editar"
+ Alert("Actualizado correctamente")
+ UpParametros.Update()
+ UPObservaciones.Update()
+ UpFacturar.Update()
+ End If
+ ObjVentas.Dispose()
+ End Sub
End Class
\ No newline at end of file
diff --git a/vwd.webinfo b/vwd.webinfo
index a2d171c0b..8404920ba 100644
--- a/vwd.webinfo
+++ b/vwd.webinfo
@@ -72,6 +72,8 @@
+
+