This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2020-11-03 15:07:40 -07:00
13 changed files with 112 additions and 31 deletions

View File

@@ -1140,6 +1140,8 @@ Public Class ClsContabilidad
Optional ObjConta As ClsContPAQi = Nothing, Optional pIDPoliza As Integer = -1) As Boolean
Dim StrLog As New StringBuilder
Dim Retorno As Boolean = False
Dim OcurrioError As Boolean = False
StrLog.AppendFormat("CvePrep:{0} - Inicio", CvePrePoliza)
If Empresa.TipoContabilizacion = 1 Then ' contabilidad en SIG
@@ -1154,7 +1156,7 @@ Public Class ClsContabilidad
If CvePrePoliza <= 0 Then Return False
Dim OcurrioError As Boolean = False
Dim ContaCompartida As Boolean = False
If ObjConta Is Nothing Then
@@ -1417,8 +1419,9 @@ Public Class ClsContabilidad
If Not ContaCompartida Then ObjConta.Dispose()
End If
StrLog.AppendFormat(" - Con Retorno ({0}) - OcurrioError ({1} - Mensaje: {2}: ", Retorno, OcurrioError, Mensaje)
StrLog.AppendFormat(" - Fin")
StrLog.ToString.GuardaLogAD("LogContabilidazacion")
StrLog.ToString.GuardaLogAD("LogContabilizacion")
Return Retorno
End Function

View File

@@ -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>

View File

@@ -105,7 +105,7 @@
</Style>
</TextRun>
<TextRun>
<Value>PPP885522PPP</Value>
<Value>STJ180705IV4</Value>
<Style>
<FontFamily>Calibri</FontFamily>
<FontSize>8pt</FontSize>

View File

@@ -3818,7 +3818,7 @@
</Style>
</TextRun>
<TextRun>
<Value>PPP885522PPP</Value>
<Value>STJ180705IV4</Value>
<Style>
<FontFamily>Calibri</FontFamily>
<FontSize>8pt</FontSize>

View File

@@ -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>

View File

@@ -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

View File

@@ -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>

View File

@@ -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

View File

@@ -2850,11 +2850,11 @@ Partial Class Inventarios_EntregaAlmacen
Dim ValorMultiplicador = 1
If TipoMovimiento = 1 Then
ValorMultiplicador = 1
ElseIf TipoMovimiento = 2 AndAlso TipoDocto.Contiene({"Dev"}) AndAlso (EsDevolucionVenta = 1) Then
ValorMultiplicador = 1
ElseIf TipoMovimiento = 2 Then
ValorMultiplicador = -1
ElseIf TipoMovimiento = 2 AndAlso TipoDocto.Contiene({"Dev"}) And (EsDevolucionVenta = 1) Then
ValorMultiplicador = 1
ValorMultiplicador = -1
End If
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/RecepcionEntrega", 4, TotalCosto, TotalCosto, 1, Fecha, ClienteNombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)

View File

@@ -3002,8 +3002,8 @@ Partial Class Inventarios_RecepcionAlmacen
'si es el último movimiento verifica los importes que sean igual
If cont = DtCostos.Rows.Count AndAlso (Math.Round(TotalCosto, 2) <> Math.Round(TotalCostoAcumulado, 2)) Then
TotalCostoDetalle = TotalCostoDetalle + (Math.Round(TotalCosto, 2) - Math.Round(TotalCostoAcumulado, 2))
TotalCostoExtranjero = TotalCostoExtranjero + (Math.Round(TotalCosto, 2) - Math.Round(TotalCostoAcumulado, 2))
TotalCostoDetalle = TotalCostoDetalle + (Math.Round(TotalCosto, 3) - Math.Round(TotalCostoAcumulado, 3))
TotalCostoExtranjero = TotalCostoExtranjero + (Math.Round(TotalCosto, 3) - Math.Round(TotalCostoAcumulado, 3))
End If
If CveMoneda <> 1 AndAlso UsaComplementariaFleteImportaciones Then

View File

@@ -40,7 +40,7 @@
<div class="col-sm-1" style="text-align:right">
<label>Proveedor:</label>
</div>
<div class="col-md-1">
<div class="col-sm-2">
<ADS:Dropdownlost ID="DdlProveedor" runat="server" DataValueField="CveProveedor" DataTextField="RazonSocial" CssClassDdl="select2me" Width="100%" CssStyle="width: 100%;"></ADS:Dropdownlost>
</div>
<div class="col-sm-1" style="text-align:right">
@@ -72,19 +72,28 @@
<div class="col-sm-1" style="text-align:right">
<label>Sucursal:</label>
</div>
<div class="col-md-1">
<div class="col-sm-1">
<asp:DropDownList runat="server" ID="DdlSucursal" CssClass="select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto"></asp:DropDownList>
</div>
<div class="col-sm-1" style="text-align:right">
</div>
</div>
</div>
<div class="portlet-body" style="display: none;">
<div class="row">
<div class="col-sm-1" style="text-align:right">
<label>Clasificación:</label>
</div>
<div class="col-md-1">
<asp:DropDownList runat="server" ID="DdlClasificacion" CssClass="select2me" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%"/>
<asp:DropDownList runat="server" ID="DdlClasificacion" CssClass="select2me" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" CssStyle="width: 100%;"/>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">

View File

@@ -2769,7 +2769,7 @@ Partial Class ProductosyServicios
Dim CveClasificacion As Integer = GlobalDTClasificaciones(CveEmpresa:=Franquicia).FiltroPrimeroValor("CveClasificacion", String.Format("Clasificacion = '{0}'", DdlClasificacion.SelectedItem.Text)).ToEntero
Dim CveUnidadMedida As Integer = GlobalDTUnidadesMedida(CveEmpresa:=Franquicia).FiltroPrimeroValor("CveUnidadMedida", String.Format("UnidadMedida = '{0}'", DdlUnidadMedida.SelectedItem.Text)).ToEntero
Dim CveClasificacion2 As Integer = GlobalDTClasificaciones(CveEmpresa:=Franquicia).FiltroPrimeroValor("CveClasificacion", String.Format("Clasificacion = '{0}'", DdlClasificacion2.SelectedItem.Text)).ToEntero
Dim CveTipo As Integer = GlobalDTClasificacionesDetalle(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacionDetalle", String.Format("ClasificacionDetalle = '{0}'", DdlTipoPSDes.SelectedItem.Text)).ToEntero
Dim CveTipo As Integer = GlobalDTClasificacionesDetalle(CveEmpresa:=Franquicia).FiltroPrimeroValor("CveClasificacionDetalle", String.Format("ClasificacionDetalle = '{0}'", DdlTipoPSDes.SelectedItem.Text)).ToEntero
Dim CveMarcaFranquicia As Integer = -1
If ObjPS.GetMarcas(Franquicia) Then
CveMarcaFranquicia = ObjPS.DtResultados.FiltroPrimeroValor("CveMarca", String.Format("Marca = '{0}'", DdlMarca.SelectedItem.Text)).ToEntero
@@ -2838,7 +2838,7 @@ Partial Class ProductosyServicios
End If
Else
If ObjPS.GetPS(-1, CveClasificacion, Franquicia, Codigo:=TxtCodigo.Text.Trim.ToUpper) Then
If ObjPS.GetPS(-1, -1, Franquicia, Codigo:=TxtCodigo.Text.Trim.ToUpper) Then
Dim CvePS As Integer = ObjPS.DtResultados.FiltroPrimeroValor("CvePS").ToEntero()
If Not ObjPS.UpdatePS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, "", TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble,
(TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, -1, True, ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv,

View File

@@ -23887,7 +23887,7 @@ Partial Class Ventas
If Math.Abs(difTmp) > 0.00D Then
'asusto la diferencia en el último concepto
Dim ImporteAjustado As Decimal = DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal").ToString().ToDecimal + Math.Abs(difTmp)
Dim ImporteAjustado As Decimal = DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal").ToString().ToDecimal + difTmp
DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal") = ImporteAjustado
DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImportePU") = ImporteAjustado
End If