reporte de jar actualizado y ahora se puede ajustar la existencia del producto en almacen, se pueden ajustar lote y fecha caducidad
This commit is contained in:
@@ -183,7 +183,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value> R.F.C PPP885522PPP</Value>
|
||||
<Value> R.F.C STJ180705IV4</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>PPP885522PPP</Value>
|
||||
<Value>STJ180705IV4</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
|
||||
@@ -3818,7 +3818,7 @@
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>PPP885522PPP</Value>
|
||||
<Value>STJ180705IV4</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value> R.F.C PPP885522PPP</Value>
|
||||
<Value> R.F.C STJ180705IV4</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
|
||||
@@ -276,7 +276,7 @@
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'SAT
|
||||
Using ObjGrales As New ClsGenerales
|
||||
'If ObjGrales.GetSATProductosServicios Then Application("GlobalDTPSATPS") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATPS") = Nothing
|
||||
If ObjGrales.GetSATProductosServicios Then Application("GlobalDTPSATPS") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATPS") = Nothing
|
||||
'If ObjGrales.GetSATUnidadMedida Then Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATUM") = Nothing
|
||||
If ObjGrales.GetSATUsosCFDI Then Application("GlobalDTSATUsosCFDI") = ObjGrales.DtResultados Else Application("GlobalDTSATUsosCFDI") = Nothing
|
||||
If ObjGrales.GetSATFraccionArancelaria Then Application("GlobalDTFraccionArancelaria") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTFraccionArancelaria") = Nothing
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
</div>
|
||||
|
||||
<label class="col-sm-1" style="text-align: right">Folio:</label>
|
||||
<div class="col-sm-1" style="width:60px">
|
||||
<div class="col-sm-1" style="width: 60px">
|
||||
<asp:TextBox runat="server" ID="TxtFolioFiltro" Width="60px" />
|
||||
</div>
|
||||
|
||||
@@ -59,7 +59,6 @@
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row" style="margin-left: 0px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -84,6 +83,37 @@
|
||||
<asp:RangeValidator ID="RVR" Display="Dynamic" ControlToValidate="TxtCantidad" runat="server" MinimumValue="0" Type="Double" ErrorMessage="No cumple con la cantidad especificada"></asp:RangeValidator>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkLote" Checked="false" runat="server" OnCheckedChanged="Chk_Click" AutoPostBack="true"></asp:CheckBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nuevo Lote" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox runat="server" ID="TxtLote" Text='<%# Eval("Lote").ToString()%>' CssClass="form-control" ClientIDMode="Static" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkEditCaducidad" Checked="false" runat="server" OnCheckedChanged="Chk_Click" AutoPostBack="true"></asp:CheckBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nueva Fecha Cad." ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox runat="server" ID="TxtFechaCadNueva" Text='<%# Eval("FechaCaducidad").ToString()%>' CssClass="form-control" ClientIDMode="Static" />
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgFecha" class="btn default"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFechaCadNueva" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFecha" TargetControlID="TxtFechaCadNueva" PopupButtonID="ImgFecha" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<%--<asp:DropDownList ID="DDlS" runat="server" Width="150px" DataValueField="CveSeccionAlmacen" DataTextField="SeccionAlmacen" class="select2me"></asp:DropDownList>--%>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="Chk" Checked="false" runat="server" OnCheckedChanged="Chk_Click" AutoPostBack="true"></asp:CheckBox>
|
||||
|
||||
@@ -25,6 +25,9 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
DdlClasificaciones.DataBind()
|
||||
DdlClasificaciones.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
GvD.Columns(4).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||
GvD.Columns(10).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Nueva Fecha Elaboración", "Nueva Fecha Caducidad")
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
@@ -48,8 +51,8 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
CargaSeccionesAlmacen(e.Row.FCDropDownList("DDlS"), DdlAlmacen.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero, UsuarioActual.CveEmpresa)
|
||||
|
||||
'e.Row.FCDropDownList("DDlS").DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero)
|
||||
'e.Row.FCDropDownList("DDlS").DataBind()
|
||||
e.Row.FCDropDownList("DDlS").DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero)
|
||||
e.Row.FCDropDownList("DDlS").DataBind()
|
||||
|
||||
Dim ExistenciasAux As Decimal = e.Row.DataKey("Existencia").ToDecimal
|
||||
e.Row.FCRangeValidator("RVR").Enabled = ExistenciasAux > 0
|
||||
@@ -90,28 +93,51 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
Dim CveMovimientoDetalleEntrada As Integer = 0
|
||||
Dim Cont As Integer = 0
|
||||
Dim Lista As New Hashtable
|
||||
Dim ListaCaducidad As New Hashtable
|
||||
Dim ListaLote As New Hashtable
|
||||
Dim Cantidad As Decimal = 0
|
||||
For Each gvr As GridViewRow In GvD.Rows
|
||||
|
||||
Dim FechaCaducidadOriginal As String = gvr.DataKey("FechaCaducidad")
|
||||
Dim FechaCaducidadNueva As String = gvr.FCTextBox("TxtFechaCadNueva").Text
|
||||
|
||||
Dim LoteOriginal As String = gvr.DataKey("Lote")
|
||||
Dim LoteNuevo As String = gvr.FCTextBox("TxtLote").Text
|
||||
|
||||
'que este seleccionado y que tenga diferente seccion
|
||||
Dim Modificar As Boolean = False
|
||||
If gvr.FCCheckBox("Chk").Checked AndAlso gvr.FCDropDownList("DDlS").SelectedValue.ToEntero <> gvr.DataKey("CveSeccionAlmacen").ToEntero Then
|
||||
Cantidad = gvr.FCTextBox("TxtCantidad").Text.ToDecimal()
|
||||
If gvr.DataKey("CveSeccionAlmacen").ToEntero > 0 Then
|
||||
ObjPS.UpdateAplicaSeccionAlmacen(gvr.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, True)
|
||||
Else
|
||||
ObjPS.UpdateAplicaSeccionAlmacen(gvr.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, False)
|
||||
End If
|
||||
If Not Lista.ContainsKey(gvr.DataKey("CvePS").ToEntero) Then Lista.Add(gvr.DataKey("CvePS").ToEntero, gvr.FCDropDownList("DDlS").SelectedValue.ToEntero) 'guardo que dato le corresponde
|
||||
|
||||
If Not Lista.ContainsKey(gvr.DataKey("CvePS").ToEntero) Then Lista.Add(gvr.DataKey("CvePS").ToEntero, gvr.FCDropDownList("DDlS").SelectedValue.ToEntero) 'guardo que dato le corresponde
|
||||
Modificar = True
|
||||
End If
|
||||
|
||||
If gvr.FCCheckBox("ChkEditCaducidad").Checked And FechaCaducidadNueva.Length > 0 And FechaCaducidadNueva <> FechaCaducidadOriginal Then
|
||||
If Not ListaCaducidad.ContainsKey(gvr.DataKey("CvePS").ToEntero) Then ListaCaducidad.Add(gvr.DataKey("CvePS").ToEntero, FechaCaducidadNueva) 'guardo que dato le corresponde
|
||||
Modificar = True
|
||||
End If
|
||||
|
||||
If gvr.FCCheckBox("ChkLote").Checked And LoteNuevo.Length > 0 And LoteNuevo <> LoteOriginal Then
|
||||
If Not ListaLote.ContainsKey(gvr.DataKey("CvePS").ToEntero) Then ListaLote.Add(gvr.DataKey("CvePS").ToEntero, LoteNuevo) 'guardo que dato le corresponde
|
||||
Modificar = True
|
||||
End If
|
||||
|
||||
If Modificar Then
|
||||
Cantidad = gvr.FCTextBox("TxtCantidad").Text.ToDecimal()
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Cantidad, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, 0, -1, CveSeccionAlmacen:=gvr.DataKey("CveSeccionAlmacen").ToEntero, Serie:=gvr.DataKey("Serie"), Lote:=gvr.DataKey("Lote"), FechaCaducidad:=gvr.DataKey("FechaCaducidad").ToDate) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al guardar los movimientos de salida"
|
||||
Exit For
|
||||
End If
|
||||
Contador += 1
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
|
||||
If Not ErrorMovInv AndAlso Contador > 0 Then
|
||||
@@ -131,11 +157,24 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
Dim CostoIndirecto As Decimal = Row("CostoIndirecto").ToString().ToDecimal()
|
||||
Dim Serie As String = Row("Serie").ToString()
|
||||
Dim Lote As String = Row("Lote").ToString()
|
||||
Dim FechaCaducidad As Date = IfNull(Row("FechaCaducidad"), MinFecha).ToString.ToDate
|
||||
Dim FechaCaducidad As Date = MinFecha
|
||||
|
||||
If ListaCaducidad.ContainsKey(CvePS) Then
|
||||
FechaCaducidad = ListaCaducidad(CvePS).ToString.ToDate
|
||||
Else
|
||||
FechaCaducidad = IfNull(Row("FechaCaducidad"), MinFecha).ToString.ToDate
|
||||
End If
|
||||
|
||||
If ListaLote.ContainsKey(CvePS) Then
|
||||
Lote = ListaLote(CvePS).ToString
|
||||
Else
|
||||
Lote = Row("Lote").ToString()
|
||||
End If
|
||||
'actualizamos el PS, para que tenga el aplica seccion
|
||||
|
||||
ObjPS.UpdateAplicaSeccionAlmacen(Row("CvePS").ToString().ToEntero(), UsuarioActual.CveEmpresa, True)
|
||||
If Lista.ContainsKey(CvePS) Then
|
||||
ObjPS.UpdateAplicaSeccionAlmacen(Row("CvePS").ToString().ToEntero(), UsuarioActual.CveEmpresa, True)
|
||||
End If
|
||||
'If Not ObjInventario.AddProductosServiciosAlmacenSeccion(CvePS, CveAlmacen, CveSeccionAlmacen) Then
|
||||
' ErrorMovInv = True
|
||||
'End If
|
||||
@@ -154,12 +193,12 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/AjusteAlmacen", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Dim importe As Decimal = resultado.SUMD("Total").RoundSQL
|
||||
Dim contabilizable As Boolean = False
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, Concepto, 68, Concepto, Fecha, IdCtaContableOrigen, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=contabilizable, ImporteMX:=importe) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, Concepto, 68, Concepto, Fecha, IdCtaContableOrigen, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, Contabilizable:=contabilizable, ImporteMX:=importe) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
'If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, Concepto, 68, Concepto, Fecha, IdCtaContableOrigen, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=contabilizable, ImporteMX:=importe) Then
|
||||
' ErrorMovInv = True
|
||||
'End If
|
||||
'If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, Concepto, 68, Concepto, Fecha, IdCtaContableOrigen, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, Contabilizable:=contabilizable, ImporteMX:=importe) Then
|
||||
' ErrorMovInv = True
|
||||
'End If
|
||||
End If
|
||||
|
||||
resultado.Dispose()
|
||||
|
||||
@@ -118,6 +118,14 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user