diff --git a/Inventarios/EntradasSalidas.aspx b/Inventarios/EntradasSalidas.aspx
index 399ce3807..dc94b6426 100644
--- a/Inventarios/EntradasSalidas.aspx
+++ b/Inventarios/EntradasSalidas.aspx
@@ -664,7 +664,8 @@
-
+
@@ -786,13 +787,19 @@
-
-
-
-
+
+
-
+
@@ -1659,11 +1666,14 @@
@@ -1687,8 +1697,17 @@
@@ -1714,6 +1740,12 @@
@@ -1729,9 +1761,16 @@
-
+
+
+
+
@@ -1772,23 +1811,29 @@
+
+
@@ -1929,58 +1974,42 @@
}
$('#<%= GvM.ClientID%>').ADScroll({ 'height': Alto });
- <%-- if ($("#<%= DdlProductows.ClientID%>")) {
- if (!($('#<%= HFProducto.ClientID %>').val() === '')) {
- AddItem($('#<%= HFTProducto.ClientID%>').val(), $('#<%= HFProducto.ClientID %>').val());
- }
- }
- if ($("#<%= DdlProductows.ClientID%>").data('creado') === '1') { } else {
- $("#<%= DdlProductows.ClientID%>").data('creado', '1')
- $("#<%= DdlProductows.ClientID%>").select2({
- ajax: {
- url: "/Ashx/SIGWeb.ashx",
- dataType: 'json',
- delay: 250,
- data: function (params) {
- return {
- Name: params.term, // search term
- Metodo: 'getps'
- };
- },
- processResults: function (data, params) {
- // parse the results into the format expected by Select2
- // since we are using custom formatting functions we do not need to
- // alter the remote JSON data, except to indicate that infinite
- // scrolling can be used
- params.page = params.page || 1;
-
- return {
- results: data,
- pagination: {
- more: (params.page * 30) < data.total_count
- }
- };
- },
- cache: true
- },
- escapeMarkup: function (markup) { return markup; }, // let our custom formatter work
- minimumInputLength: 3
- });
- }
- if ($("#<%= DdlProductows.ClientID%>")) {
- if (!($('#<%= HFProducto.ClientID %>').val() === '')) {
- AddItem($('#<%= HFTProducto.ClientID%>').val(), $('#<%= HFProducto.ClientID %>').val());
- }
- $("#<%= DdlProductows.ClientID%>").on("select2:select", function (e) { console.log(e); $('#<%= HFProducto.ClientID %>').val(e.params.data.id); $('#<%= HFTProducto.ClientID%>').val(e.params.data.text); $('#<%= myhidenbutton.ClientID %>').click(); });
- }
-
- if ($("#<%= DdlProducto.ClientID%>")) {
- $("#<%= DdlProducto.ClientID%>").on("select2:select", function (e) { console.log(e); $('#<%= HFProducto.ClientID %>').val(e.params.data.id); $('#<%= HFTProducto.ClientID%>').val(e.params.data.text); });
-
- }--%>
+
});
+
+ function ValidaDecimal6digitsM0(val, args) {
+ if (args.Value.match(/^[1-9]\d*(\.\d{1,6})?$/))
+ args.IsValid = true;
+ else
+ args.IsValid = false;
+ }
+
+ function calcularTotal() {
+ var cantidad = parseFloat($('#txtCantidad').val().replace(/,/g, ''));
+ var precio = parseFloat($('#txtPrecio').val().replace(/,/g, ''));
+
+ if (!isNaN(cantidad) && !isNaN(precio)) {
+ var resultado = cantidad * precio;
+ var formatoResultado = formatoMoneda(resultado);
+ $('#TdTotal').text(formatoResultado);
+ } else {
+ $('#TdTotal').text('');
+ }
+ }
+
+ function formatoMoneda(valor) {
+ if (valor % 1 !== 0) { // Si el valor tiene decimales
+ return valor.toLocaleString('es-MX', {
+ minimumFractionDigits: 2,
+ maximumFractionDigits: 2
+ });
+ } else {
+ return valor.toLocaleString('es-MX'); // Sin decimales
+ }
+ }
+
diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb
index b4f6e27c7..4c2492a0c 100644
--- a/Inventarios/EntradasSalidas.aspx.vb
+++ b/Inventarios/EntradasSalidas.aspx.vb
@@ -275,6 +275,23 @@ Partial Class Inventarios_EntradasSalidas
ViewState("CveMovimientoDetalleEdit") = value
End Set
End Property
+
+
+ Public Property IndexActualTabla() As Integer
+ Get
+
+ If ViewState("IndexActualTabla") Is Nothing Then
+ ViewState("IndexActualTabla") = -1
+ End If
+
+ Return ViewState("IndexActualTabla").ToString.ToEntero
+ End Get
+ Set(value As Integer)
+ ViewState("IndexActualTabla") = value
+ End Set
+ End Property
+
+
Public Property CveAFEdit() As Integer
Get
Return ViewState("CveAFEdit").ToString.ToEntero
@@ -1287,10 +1304,23 @@ Partial Class Inventarios_EntradasSalidas
End Sub
Private Sub LimpiarAgregar()
- 'DdlClasificacion.SelectedValue = "-1"
txtCantidad.Text = ""
TxtnLote.Text = ""
- TxtObservacionesdetalle.Text = ""
+ LblCodigo.Text = ""
+ TxtnSerie.Text = ""
+ TxtnFechaCaducidad.Text = ""
+ HdnCodigoAF.Value = "-1"
+ HdnCveActivoFijo.Value = "-1"
+ txtPrecio.Text = ""
+
+ divSerie.Visible = False
+ divLote.Visible = False
+ divSeccionAlmacen.Visible = False
+ divCaducidad.Visible = False
+
+
+ UpAgregar.Update()
+
End Sub
Protected Sub BtnEliminar_Click(sender As Object, e As EventArgs) Handles BtnEliminar.Click
@@ -1425,12 +1455,23 @@ Partial Class Inventarios_EntradasSalidas
' AgregarPS()
'End Sub
Protected Sub LkAgregarDetalle_Click(sender As Object, e As EventArgs) Handles LkAgregarDetalle.Click
- If CveMovimientoDetalleEdit > 0 Then
- ActualizarPS()
+
+ If CveMovimiento > 0 Then
+ If CveMovimientoDetalleEdit > 0 Then
+ ActualizarPS()
+ Else
+ AgregarPS()
+ End If
Else
- AgregarPS()
+ If IndexActualTabla >= 0 Then
+ ActualizarPS()
+ Else
+ AgregarPS()
+ End If
End If
+
+
End Sub
Protected Sub BtnSerieAddNew_Click(sender As Object, e As EventArgs)
AgregarPS()
@@ -1464,9 +1505,10 @@ Partial Class Inventarios_EntradasSalidas
TxtnFechaCaducidad.Text = ""
HdnCodigoAF.Value = "-1"
HdnCveActivoFijo.Value = "-1"
+ txtPrecio.Text = ""
DdlModalCultivosCuadro.SelectedValueExist(-1)
- RegistraScript("CodigoAF = "";")
+ RegistraScript("CodigoAF = '';")
If Not UsuarioActual.Empresa.Funcionalidad(105).ToString = "1" Then
DdlProducto2.SelectedValue = "-1"
@@ -1475,11 +1517,16 @@ Partial Class Inventarios_EntradasSalidas
DdlProducto2.SelectedText = ""
End If
- txtCantidad.Focus()
+ If ChkContinuarRegistrando.Checked Then
+ txtCantidad.Focus()
+ Else
+ RegistraScript("$('#ModalAgregar').modal('hide');")
+ End If
+
End Sub
- Protected Sub AddNew(CvePS As Integer, PS As String, CveUM As Integer, UM As String, Cantidad As Decimal, PU As Decimal, Serie As String, CodigoAF As String, Codigo As String, CveAF As String, Observaciones As String, Lote As String, FechaCaducidad As Date, CveSeccionAlmacen As Integer, SeccionAlmacen As String, Optional CargarGV As Boolean = True, Optional CveCultivoCuadroDetalle As Integer = -1)
+ Protected Sub AddNew(CvePS As Integer, PS As String, CveUM As Integer, UM As String, Cantidad As Decimal, PU As Decimal, Serie As String, CodigoAF As String, Codigo As String, CveAF As String, Observaciones As String, Lote As String, FechaCaducidad As Date, CveSeccionAlmacen As Integer, SeccionAlmacen As String, Optional CargarGV As Boolean = True, Optional CveCultivoCuadroDetalle As Integer = -1, Optional IndexEspecidico As Integer = -1)
If DdlAlmacen.SelectedValue.ToEntero <= 0 Then Alert("Seleccione un almacen", TipoMensaje.MsgAdvertencia) : RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") : DdlProducto2.SelectedText = "" : Exit Sub
@@ -1539,55 +1586,112 @@ Partial Class Inventarios_EntradasSalidas
End If
End If
- If Valido Then
+ If IndexEspecidico >= 0 Then
+
Dim CveClasificacion As Integer
'Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimero("", "PS")
If RowPS IsNot Nothing Then CveClasificacion = RowPS("CveClasificacion").ToString.ToEntero
- 'VALIDA QUE LA SERIE NO SEA IGUAL AL CODIGO O CODIGOBARRAS
- If Serie <> "" And (Serie.ToUpper = RowPS("Codigo").ToString.ToUpper Or Serie.ToUpper = RowPS("CodigoBarras").ToString.ToUpper) Then
- Alert($"La serie indicada {Serie} coincide con el codigo o codigo de barras del producto. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
- Exit Sub
+ If Valido Then
+
+ DtMovimientos.Rows(IndexEspecidico)("Cantidad") = Cantidad
+ DtMovimientos.Rows(IndexEspecidico)("CveUM") = CveUM
+ DtMovimientos.Rows(IndexEspecidico)("UnidadMedida") = UM
+ DtMovimientos.Rows(IndexEspecidico)("CvePS") = CvePS
+
+ If Codigo = "-1" Then
+ DtMovimientos.Rows(IndexEspecidico)("CodigoPS") = PS
+ Else
+ DtMovimientos.Rows(IndexEspecidico)("CodigoPS") = String.Format("{0} - {1}", Codigo, PS)
+ End If
+
+
+ DtMovimientos.Rows(IndexEspecidico)("PS") = PS
+ DtMovimientos.Rows(IndexEspecidico)("PU") = PU
+ DtMovimientos.Rows(IndexEspecidico)("PUExtranjero") = PU
+ DtMovimientos.Rows(IndexEspecidico)("Total") = Cantidad * PU
+ DtMovimientos.Rows(IndexEspecidico)("CveClasificacion") = CveClasificacion
+ DtMovimientos.Rows(IndexEspecidico)("Estatus") = ""
+ DtMovimientos.Rows(IndexEspecidico)("CveSeccionAlmacen") = CveSeccionAlmacen
+ DtMovimientos.Rows(IndexEspecidico)("SeccionAlmacen") = SeccionAlmacen
+ DtMovimientos.Rows(IndexEspecidico)("CodigoAF") = CodigoAF
+ DtMovimientos.Rows(IndexEspecidico)("Codigo") = Codigo
+ DtMovimientos.Rows(IndexEspecidico)("CveAF") = CveAF
+ DtMovimientos.Rows(IndexEspecidico)("Serie") = If(Serie <> "", Serie, "")
+ DtMovimientos.Rows(IndexEspecidico)("Lote") = If(Lote <> "", Lote, "")
+ DtMovimientos.Rows(IndexEspecidico)("FechaCaducidad") = FechaCaducidad
+ DtMovimientos.Rows(IndexEspecidico)("Observaciones") = Observaciones
+ DtMovimientos.Rows(IndexEspecidico)("AplicaCaducidad") = RowPS("AplicaCaducidad").ToString
+ DtMovimientos.Rows(IndexEspecidico)("CveCultivoCuadroDetalle") = CveCultivoCuadroDetalle
+
+ DtMovimientos.AcceptChanges()
+
+ If CargarGV Then
+ CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
+ RegistraScript("playsonidito('beep-07.wav')")
+ End If
End If
- If String.IsNullOrEmpty(PS.Trim()) Then
- PS = RowPS("PS").ToString()
+ Else
+ If Valido Then
+ Dim CveClasificacion As Integer
+ 'Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimero("", "PS")
+ If RowPS IsNot Nothing Then CveClasificacion = RowPS("CveClasificacion").ToString.ToEntero
+
+ 'VALIDA QUE LA SERIE NO SEA IGUAL AL CODIGO O CODIGOBARRAS
+ If Serie <> "" And (Serie.ToUpper = RowPS("Codigo").ToString.ToUpper Or Serie.ToUpper = RowPS("CodigoBarras").ToString.ToUpper) Then
+ Alert($"La serie indicada {Serie} coincide con el codigo o codigo de barras del producto. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+
+ If String.IsNullOrEmpty(PS.Trim()) Then
+ PS = RowPS("PS").ToString()
+ End If
+
+ Dim registro As DataRow = DtMovimientos.NewRow
+ registro.Item("Cantidad") = Cantidad
+ registro.Item("CveUM") = CveUM
+ registro.Item("UnidadMedida") = UM
+ registro.Item("CvePS") = CvePS
+
+ If Codigo = "-1" Then
+ registro.Item("CodigoPS") = PS
+ Else
+ registro.Item("CodigoPS") = String.Format("{0} - {1}", Codigo, PS)
+ End If
+
+
+ registro.Item("PS") = PS
+ registro.Item("PU") = PU
+ 'registro.Item("PUExtranjero") = PU
+ registro.Item("Total") = Cantidad * PU
+ registro.Item("CveClasificacion") = CveClasificacion
+ registro.Item("Estatus") = ""
+ registro.Item("CveSeccionAlmacen") = CveSeccionAlmacen
+ registro.Item("SeccionAlmacen") = SeccionAlmacen
+
+ registro.Item("CodigoAF") = CodigoAF
+ registro.Item("Codigo") = Codigo
+ registro.Item("CveAF") = CveAF
+ registro.Item("Serie") = If(Serie <> "", Serie, "")
+ registro.Item("Lote") = If(Lote <> "", Lote, "")
+ registro.Item("FechaCaducidad") = FechaCaducidad
+ registro.Item("Observaciones") = Observaciones
+ registro.Item("AplicaCaducidad") = RowPS("AplicaCaducidad").ToString
+ registro.Item("CveCultivoCuadroDetalle") = CveCultivoCuadroDetalle
+
+ DtMovimientos.Rows.Add(registro)
+
+ If CargarGV Then
+ CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
+ RegistraScript("playsonidito('beep-07.wav')")
+ End If
+
End If
-
- Dim registro As DataRow = DtMovimientos.NewRow
- registro.Item("Cantidad") = Cantidad
- registro.Item("CveUM") = CveUM
- registro.Item("UnidadMedida") = UM
- registro.Item("CvePS") = CvePS
- registro.Item("CodigoPS") = String.Format("{0} - {1}", Codigo, PS)
- registro.Item("PS") = PS
- registro.Item("PU") = PU
- 'registro.Item("PUExtranjero") = PU
- registro.Item("Total") = Cantidad * PU
- registro.Item("CveClasificacion") = CveClasificacion
- registro.Item("Estatus") = ""
- registro.Item("CveSeccionAlmacen") = CveSeccionAlmacen
- registro.Item("SeccionAlmacen") = SeccionAlmacen
-
- registro.Item("CodigoAF") = CodigoAF
- registro.Item("Codigo") = Codigo
- registro.Item("CveAF") = CveAF
- registro.Item("Serie") = If(Serie <> "", Serie, "")
- registro.Item("Lote") = If(Lote <> "", Lote, "")
- registro.Item("FechaCaducidad") = FechaCaducidad
- registro.Item("Observaciones") = Observaciones
- registro.Item("AplicaCaducidad") = RowPS("AplicaCaducidad").ToString
- registro.Item("CveCultivoCuadroDetalle") = CveCultivoCuadroDetalle
-
- DtMovimientos.Rows.Add(registro)
-
- If CargarGV Then
- CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
- RegistraScript("playsonidito('beep-07.wav')")
- End If
-
End If
+
+
End Sub
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
@@ -2432,7 +2536,7 @@ Partial Class Inventarios_EntradasSalidas
Private Sub VisualizaPU(Opcion As Boolean)
'tdPU.Visible = Opcion
'tdTxtPU.Visible = Opcion
- txtPrecio.Visible = Opcion
+ divPrecio.Visible = Opcion
GvM.Columns(4).Visible = Opcion
TdTotal.Visible = Opcion
@@ -2499,12 +2603,7 @@ Partial Class Inventarios_EntradasSalidas
End If
If CBool(dr("AplicaSeccion")) Then
divSeccionAlmacen.Visible = True
- 'DdlSeccionAlmacen.Items.Clear()
- 'DdlSeccionAlmacen.ClearSelection()
- 'DdlSeccionAlmacen.DataSource = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, DdlProducto2.SelectedValue.ToEntero)
- 'DdlSeccionAlmacen.DataBind()
CargaSeccionesAlmacen(DdlSeccionAlmacen, DdlAlmacen.SelectedValue.ToEntero, DdlProducto2.SelectedValue.ToEntero, UsuarioActual.CveEmpresa)
-
End If
If CBool(dr("AplicaCaducidad")) Then
divCaducidad.Visible = True
@@ -2683,11 +2782,21 @@ Partial Class Inventarios_EntradasSalidas
End If
End Sub
Protected Sub GvM_RowEditing(sender As Object, e As GridViewEditEventArgs) Handles GvM.RowEditing
- Dim i As Integer = e.NewEditIndex
- GvM.EditIndex = i
- Dim Gv As GridView = DirectCast(sender, GridView)
- Dim GvRow As GridViewRow = Gv.Rows(i)
+
+ End Sub
+
+
+ Protected Sub imgE_Click(sender As Object, e As EventArgs)
+
+ Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
+
+ 'Dim i As Integer = e.NewEditIndex
+ 'GvM.EditIndex =
+
+ IndexActualTabla = GvRow.RowIndex
+
+
If CveMovimiento > 0 Then
CveMovimientoDetalleEdit = GvRow.DataKey("CveMovimientoDetalle").ToEntero
txtCantidad.Enabled = False
@@ -2717,14 +2826,20 @@ Partial Class Inventarios_EntradasSalidas
LkAgregarDetalle.Text = "Actualizar"
Dim Origen As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", String.Format("CveConcepto = {0}", DdlConcepto.SelectedValue)).ToEntero
divPrecio.Visible = (Origen = 1)
- txtPrecio.Visible = (Origen = 1)
+ 'txtPrecio.Visible = (Origen = 1)
If UsuarioActual.CveRol = 1 Then
divPrecio.Visible = True
- txtPrecio.Visible = True
+ 'txtPrecio.Visible = True
End If
+
+
+ ChkContinuarRegistrando.Checked = False
+ ChkContinuarRegistrando.Visible = False
+
UpAgregar.Update()
RegistraScript("$('#ModalAgregar').modal()")
- CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
+
+ ' CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
End Sub
Protected Sub EditPS(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
@@ -2749,8 +2864,12 @@ Partial Class Inventarios_EntradasSalidas
Dim Origen As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", String.Format("CveConcepto = {0}", DdlConcepto.SelectedValue)).ToEntero
divPrecio.Visible = Origen = 1
- txtPrecio.Visible = Origen = 1
+ 'txtPrecio.Visible = Origen = 1
LkAgregarDetalle.Text = "Actualizar"
+
+ ChkContinuarRegistrando.Checked = False
+ ChkContinuarRegistrando.Visible = False
+
UpAgregar.Update()
RegistraScript("$('#ModalAgregar').modal()")
CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
@@ -5210,26 +5329,42 @@ Partial Class Inventarios_EntradasSalidas
Private Sub ActualizarPS()
- Dim ObjInventario As New ClsInventarios
- If Not ObjInventario.UpdateMovimientoDetalle(txtCantidad.Text.ToDecimal, DdlUnidad.SelectedValue.ToEntero, DdlProducto2.SelectedValue.ToEntero, txtPrecio.Text.ToDecimal, CveAFEdit,
- CveMovimientoDetalleEdit, DdlSeccionAlmacen.SelectedValue.ToEntero, TxtnSerie.Text, TxtObservacionesdetalle.Text,
- CveUsuarioModifico:=UsuarioActual.CveUsuario, CveCultivoCuadroDetalle:=DdlModalCultivosCuadro.SelectedValue.ToEntero) Then
- Alert("Error al Actualizar los movimientos")
- Else
- GvM.EditIndex = -1
- 'cargar también los movimentos detalle
- If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
- DtMovimientos = ObjInventario.DtResultados
- CargaGVM(DtMovimientos)
+ If CveMovimientoDetalleEdit > 0 Then
+
+ Dim ObjInventario As New ClsInventarios
+ If Not ObjInventario.UpdateMovimientoDetalle(txtCantidad.Text.ToDecimal, DdlUnidad.SelectedValue.ToEntero, DdlProducto2.SelectedValue.ToEntero, txtPrecio.Text.ToDecimal, CveAFEdit,
+ CveMovimientoDetalleEdit, DdlSeccionAlmacen.SelectedValue.ToEntero, TxtnSerie.Text, TxtObservacionesdetalle.Text,
+ CveUsuarioModifico:=UsuarioActual.CveUsuario, CveCultivoCuadroDetalle:=DdlModalCultivosCuadro.SelectedValue.ToEntero) Then
+ Alert("Error al Actualizar los movimientos")
+ Else
+ GvM.EditIndex = -1
+ 'cargar también los movimentos detalle
+ If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
+ DtMovimientos = ObjInventario.DtResultados
+ CargaGVM(DtMovimientos)
+ End If
+ Alert("Movimiento actualizado correctamente")
+ RegistraScript("$('#ModalAgregar').modal('hide')")
End If
+
+ ObjInventario.Dispose()
+
+ Else
+ AddNew(DdlProducto2.SelectedValue.ToEntero, DdlProducto2.SelectedText, DdlUnidad.SelectedValue.ToEntero, DdlUnidad.SelectedItem.Text, txtCantidad.Text.ToDecimal,
+ txtPrecio.Text.ToDecimal, TxtnSerie.Text.Replace(" ", String.Empty), LblCodigo.Text, HdnCodigoAF.Value, HdnCveActivoFijo.Value, TxtObservacionesdetalle.Text,
+ TxtnLote.Text.Trim, TxtnFechaCaducidad.Text.ToDate, DdlSeccionAlmacen.SelectedValue.ToEntero, DdlSeccionAlmacen.SelectedItem.Text, CveCultivoCuadroDetalle:=DdlModalCultivosCuadro.SelectedValue.ToEntero, IndexEspecidico:=IndexActualTabla)
+ LimpiarAgregar()
Alert("Movimiento actualizado correctamente")
RegistraScript("$('#ModalAgregar').modal('hide')")
End If
- ObjInventario.Dispose()
End Sub
+
Private Sub limpiarModalDetalle()
+
+ IndexActualTabla = -1
+ CveMovimientoDetalleEdit = -1
txtCantidad.Enabled = True
'DdlClasificacion.Enabled = True
DdlProducto2.Enabled = True
@@ -5256,7 +5391,11 @@ Partial Class Inventarios_EntradasSalidas
End If
Dim Origen As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", String.Format("CveConcepto = {0}", DdlConcepto.SelectedValue)).ToEntero
divPrecio.Visible = Origen = 1
- txtPrecio.Visible = Origen = 1
+ 'txtPrecio.Visible = Origen = 1
+
+ ChkContinuarRegistrando.Checked = True
+ ChkContinuarRegistrando.Visible = True
+
UpAgregar.Update()
End Sub
@@ -5875,4 +6014,6 @@ Partial Class Inventarios_EntradasSalidas
+
+
End Class
diff --git a/OS/OrdenesServicios.aspx.vb b/OS/OrdenesServicios.aspx.vb
index 1c1c2b60f..d08586d18 100644
--- a/OS/OrdenesServicios.aspx.vb
+++ b/OS/OrdenesServicios.aspx.vb
@@ -1316,16 +1316,19 @@ Partial Class OS_OrdenesServicios
Next
- For Each RowM As DataRow In TmpDTMaterialesDetalle.FiltraParametros(String.Format("CveConsecutivoDetalle = {0}", Consecutivo)).Rows
- Dim CveClasificacion As Integer = RowM("CveClasificacion").ToString.ToEntero
- Dim CvePSMaterial As Integer = RowM("CvePS").ToString.ToEntero
- Dim CveUnidadMedidaM As Integer = RowM("CveUM").ToString.ToEntero
- Dim CantidadMaterial As Integer = RowM("Cantidad").ToString.ToEntero
+ If UsuarioActual.Empresa.Funcionalidad(578) = "" Then
+ For Each RowM As DataRow In TmpDTMaterialesDetalle.FiltraParametros(String.Format("CveConsecutivoDetalle = {0}", Consecutivo)).Rows
+ Dim CveClasificacion As Integer = RowM("CveClasificacion").ToString.ToEntero
+ Dim CvePSMaterial As Integer = RowM("CvePS").ToString.ToEntero
+ Dim CveUnidadMedidaM As Integer = RowM("CveUM").ToString.ToEntero
+ Dim CantidadMaterial As Integer = RowM("Cantidad").ToString.ToEntero
+
+ If Not ObjOrdenServicio.AddUpdateDetalleMateriales(-1, CveOsDetalle, CantidadMaterial, CveUnidadMedidaM, CveClasificacion, CvePSMaterial, True) Then
+ Errores = True
+ End If
+ Next
+ End If
- If Not ObjOrdenServicio.AddUpdateDetalleMateriales(-1, CveOsDetalle, CantidadMaterial, CveUnidadMedidaM, CveClasificacion, CvePSMaterial, True) Then
- Errores = True
- End If
- Next
Else
Errores = True
@@ -1453,20 +1456,25 @@ Partial Class OS_OrdenesServicios
Next
End If
- If TmpDTMaterialesDetalle.FiltraParametros(String.Format("CveOSDetalle = {0}", CveOSDetalle)).Rows.Count > 0 Then
- For Each RowM As DataRow In TmpDTMaterialesDetalle.FiltraParametros(String.Format("CveOSDetalle = {0}", CveOSDetalle)).Rows
- Dim CveMaterial As Integer = RowM("CveMaterial").ToString.ToEntero
+ If UsuarioActual.Empresa.Funcionalidad(578) = "" Then
+ If TmpDTMaterialesDetalle.FiltraParametros(String.Format("CveOSDetalle = {0}", CveOSDetalle)).Rows.Count > 0 Then
+ For Each RowM As DataRow In TmpDTMaterialesDetalle.FiltraParametros(String.Format("CveOSDetalle = {0}", CveOSDetalle)).Rows
+ Dim CveMaterial As Integer = RowM("CveMaterial").ToString.ToEntero
- Dim CveClasificacion As Integer = RowM("CveClasificacion").ToString.ToEntero
- Dim CvePSMaterial As Integer = RowM("CvePS").ToString.ToEntero
- Dim CveUnidadMedidaM As Integer = RowM("CveUM").ToString.ToEntero
- Dim CantidadMaterial As Integer = RowM("Cantidad").ToString.ToEntero
+ Dim CveClasificacion As Integer = RowM("CveClasificacion").ToString.ToEntero
+ Dim CvePSMaterial As Integer = RowM("CvePS").ToString.ToEntero
+ Dim CveUnidadMedidaM As Integer = RowM("CveUM").ToString.ToEntero
+ Dim CantidadMaterial As Integer = RowM("Cantidad").ToString.ToEntero
- If Not ObjOrdenServicio.AddUpdateDetalleMateriales(CveMaterial, CveOSDetalle, CantidadMaterial, CveUnidadMedidaM, CveClasificacion, CvePSMaterial, SeFacturara) Then
- Errores = True
- End If
- Next
+ If Not ObjOrdenServicio.AddUpdateDetalleMateriales(CveMaterial, CveOSDetalle, CantidadMaterial, CveUnidadMedidaM, CveClasificacion, CvePSMaterial, SeFacturara) Then
+ Errores = True
+ End If
+ Next
+ End If
End If
+
+
+
End If
Next