This commit is contained in:
Hector
2021-07-29 10:13:57 -07:00
8 changed files with 154 additions and 43 deletions

View File

@@ -2863,12 +2863,13 @@ Public Class ClsInventarios
Return Retorno
End Function
Public Function GetInventarioFisicoResultados(CveInventarioFisico As Integer, CveEmpresa As Integer) As Boolean
Public Function GetInventarioFisicoResultados(CveInventarioFisico As Integer, CveEmpresa As Integer, Optional GPO As Integer = 1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_InventarioFisicoResultadosGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@GPO", SqlDbType.Int).Value = GPO
End With
Try
SqlAdapter.Fill(Data)

View File

@@ -2603,8 +2603,8 @@ Public Class ClsNominas
End Try
Return retorno
End Function
Public Function AddMovtoPermanente(cveConcepto As Int32, cvePersonal As Int32, descripcion As String, tipoDescuento As Int32, valor As Double, vecesAplicar As Int32, montoLimite As Decimal, fechaInicioAplicacion As String, estatus As Boolean, CveCuenta As Integer) As Boolean
Dim retorno As Boolean = False
Public Function AddMovtoPermanente(cveConcepto As Int32, cvePersonal As Int32, descripcion As String, tipoDescuento As Int32, valor As Double, vecesAplicar As Int32, montoLimite As Decimal, fechaInicioAplicacion As String, estatus As Boolean, CveCuenta As Integer) As Integer
Dim retorno As Integer = 0
DataAdapter("PA_AddMovtoPermanente", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
@@ -2618,15 +2618,16 @@ Public Class ClsNominas
.Add("@fechaInicioAplicacion", SqlDbType.VarChar).Value = (fechaInicioAplicacion)
.Add("@estatus", SqlDbType.Bit).Value = (estatus)
.Add("@CveCuenta", SqlDbType.Int).Value = (CveCuenta)
.Add("@CveMovtoPermanente", SqlDbType.Int).Direction = ParameterDirection.Output
End With
Try
SqlAdapter.Fill(Data)
retorno = True
retorno = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero
Catch sqEx As SqlException
retorno = False
retorno = -1
OnError("Ocurrió un error al agregar los movimientos permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
Catch ex As Exception
retorno = False
retorno = -1
OnError("Ocurrió un error al agregar los movimientos permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno

View File

@@ -112,8 +112,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
}
protected void TipoDevolucion_SelectedIndexChanged(object sender, EventArgs e)
{
string tipo = "";
{
switch (TipoDevolucion.SelectedValue)
{
case "1":
@@ -160,7 +159,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
}
protected void CargaPersonal()
{
DdlPersonal.DataSource = get_GlobalDTRHPersonal(UsuarioActual.CveEmpresa);
DdlPersonal.DataSource = get_GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("", "NombreCompleto");
DdlPersonal.DataBind();
DdlPersonal.Items.Insert(0, new ListItem("Seleccione", "-1"));
}
@@ -431,25 +430,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
if (OpcionDevolucion.SelectedValue.ToEntero() == 3 && TipoDevolucion.SelectedValue.ToString().ToEntero() == 2)
{
foreach (GridViewRow gvr in GvDevoluciones.Rows)
{
if (gvr.FCCheckBox("Chk").Checked)
{
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovoDevolucion, gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), Ref, CveConceptoContableDevolucion, Conc, DateTime.Now, 0, -1, CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), CveIEDevolucion: CveIE))
{
MsgError = "No se pudo insertar concepto de Devolución";
break;
}
}
}
//GUARDA PREPOLIZAS DETALLE Bancos
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, !TipoMovoDevolucion, TxtImporte.Text.ToDecimal(), Ref, 174, Conc, DateTime.Now, 0, -1, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: cveCliente, CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: TxtImporte.Text.ToDecimal()))
{
MsgError = "No se pudo insertar concepto de Devolución";
}
if (MsgError.Equals(""))
{
int cveConcepto = DdlConcepto.SelectedValue.ToEntero();
string descripcion = TxtDescripcion.Text;
@@ -462,11 +443,36 @@ public partial class Bancos_Devoluciones : ClsPaginas
bool estatus = true;
int CveCuenta = -1;
if (!ObjNom.AddMovtoPermanente(cveConcepto, cvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus, CveCuenta))
if (ObjNom.AddMovtoPermanente(cveConcepto, cvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus, CveCuenta) < 0)
{
MsgError = "No se pudo insertar movimiento permanente";
}
foreach (GridViewRow gvr in GvDevoluciones.Rows)
{
if (gvr.FCCheckBox("Chk").Checked)
{
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovoDevolucion, gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), Ref, CveConceptoContableDevolucion, Conc, DateTime.Now, 0, -1, CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), CveIEDevolucion: CveIE))
{
MsgError = "No se pudo insertar concepto de Devolución";
break;
}
else
{
//Decimal tTotal = (TxtValor.Text.ToDecimal() * TxtVecesAplicar.Text.ToDecimal()).RoundSQL();
Decimal tTotal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal();
//GUARDA PREPOLIZAS DETALLE Via Nómina
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, !TipoMovoDevolucion, tTotal, Ref, 174, Conc, DateTime.Now, 0, -1, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: cveCliente, CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: tTotal))
{
MsgError = "No se pudo insertar concepto de Devolución";
}
}
}
}
}
else
@@ -626,17 +632,20 @@ public partial class Bancos_Devoluciones : ClsPaginas
Msg.AppendFormat(@"<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza);
}
ObjIE.Commit();
if (!Msg.ToString().Equals(""))
{
string AccionJS = String.Format(@"document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery);
Alert(Msg.ToString(), TipoMensaje.MsgInformacion, String.Format(@"document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery));
}
}
else
{
ObjIE.RollBack();
Msg.Clear();
Alert(Msg.ToString(), TipoMensaje.MsgError);
}
if (!Msg.ToString().Equals(""))
{
string AccionJS = String.Format(@"document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery);
Alert(Msg.ToString(), TipoMensaje.MsgInformacion, String.Format(@"document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery));
}
ObjIE.Dispose();
ObjMov.Dispose();

View File

@@ -8595,6 +8595,50 @@ Partial Class Compras_Compras
Respuesta = True
End If
If Respuesta Then
Dim IEPSPSDetalles As Decimal = TmpDT.SUM("IEPSPS", " IEPSPS > 0 ").ToDecimal
Dim DiferenciaIEPSPS As Decimal = TxtIEPS.Text.ToDecimal - IEPSPSDetalles
Dim DTConsultaIEPSPS As New DataTable
DTConsultaIEPSPS = TmpDT.FiltraParametros(" AplicaIEPS = 'True'")
Dim IndiceContador As Integer = 0
Dim IndicePrimero As Integer = 0
For Each dRow As DataRow In TmpDT.Rows
If Boolean.Parse(dRow("AplicaIEPS").ToString) Then
IndicePrimero = IndiceContador
Exit For
End If
IndiceContador = IndiceContador + 1
Next
If DiferenciaIEPSPS <> 0 Then
If DTConsultaIEPSPS.Rows.Count > 0 Then
'Ajusta IPES en primer registro que aplique IEPS
TmpDT.Rows(IndicePrimero)("IEPSPS") = TmpDT.Rows(IndicePrimero)("IEPSPS").ToString.ToDecimal + DiferenciaIEPSPS
TmpDT.AcceptChanges()
Else
Respuesta = False
Alert("Los productos especificados en el lisado no tienen asigando impuesto IEPS, favor de realizar la correción en el producto que aplique el impúesto.", TipoMensaje.MsgAdvertencia)
End If
End If
End If
Return Respuesta
End Function

View File

@@ -121,7 +121,7 @@ Partial Class Contabilidad_ContabilidadElectronica
Str.AppendFormat("Sello=""{0}"" ", "123")
Str.AppendFormat("noCertificado=""{0}"" ", "123")
Str.AppendFormat("Certificado=""{0}"" ", "1234567890")
Str.Append("xmlns:catalogocuentas=""www.sat.gob.mx/esquemas/ContabilidadE/1_1/CatalogoCuentas""")
Str.Append("xmlns:catalogocuentas=""www.sat.gob.mx/esquemas/ContabilidadE/1_1/CatalogoCuentas"">")
'DETALLES
For Each Dr As DataRow In DtCuentas.Rows

View File

@@ -304,6 +304,50 @@
</Columns>
</asp:GridView>
<div class="row">
<div class="col-md-12">
<label style="font-size: 16px"><b>Productos Coincidentes</b></label>
<div class="row">
<div class="col-md-4" align="left" id="div1" runat="server">
<asp:Label runat="server">Número de registros: <b><asp:Literal ID="LtlCoincidentes" runat="server"></asp:Literal></b></asp:Label>
</div>
<div class="col-md-8" align="right" id="divRegistradosCoinciden" runat="server">
<input type="text" id="TxtBusqueda3" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda3','{0}')", GvC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda3','{0}')", GvS.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
</div>
</div>
<asp:GridView ID="GvC" data-sort="true" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False"
CssClass="table table-striped table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None" DataKeyNames="CvePS">
<Columns>
<asp:TemplateField Visible="false">
<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="#">
<ItemTemplate>
<asp:Label ID="LblC" runat="server" Font-Size="6pt"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="Código Barras" DataField="CodigoBarras" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Sección Almacén" DataField="SeccionAlmacen"/>
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" />
<asp:BoundField HeaderText="Existencia" DataField="CantidadAlmacen" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Inv. Físico" DataField="CantidadInventarioFisico" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Diferencia" DataField="Diferencia" DataFormatString="{0:#,###.##}" ItemStyle-Font-Bold="true" />
<asp:BoundField HeaderText="Costo" DataField="Costo" DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right" />
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<br />

View File

@@ -82,7 +82,7 @@ Partial Class Inventarios_RepAnomalias
dt = Inventario.DtResultados
End If
Else
If Inventario.GetInventarioFisicoResultados(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
If Inventario.GetInventarioFisicoResultados(CveInventarioFisico, UsuarioActual.CveEmpresa, DdlGPO.SelectedValue.ToString.ToEntero) Then
dt = Inventario.DtResultados
End If
End If
@@ -155,7 +155,7 @@ Partial Class Inventarios_RepAnomalias
If Inventario.GetInventarioFisicoDetallesProveedores(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
Dim dta As DataTable = Inventario.DtResultados
Dim str As New StringBuilder
If dta IsNot Nothing AndAlso dt.Rows.Count > 0 Then
If dta IsNot Nothing AndAlso dta.Rows.Count > 0 Then
For Each dr As DataRow In dta.FiltraParametros("Incluye = 1").Rows
str.AppendFormat("{0},", dr("RazonSocial"))
@@ -187,6 +187,11 @@ Partial Class Inventarios_RepAnomalias
GvF.DataBind()
BanderaSerieLoteCad(GvF, DtF)
Dim DtC As DataTable = dt.FiltraParametros("Diferencia = 0")
GvC.DataSource = DtC
GvC.DataBind()
BanderaSerieLoteCad(GvC, DtC)
Dim Script = ""
If (GvF.Rows.Count > 0) Then
GvF.UseAccessibleHeader = True
@@ -204,6 +209,14 @@ Partial Class Inventarios_RepAnomalias
LtlTotalRegistrosSobran.Text = GvS.Rows.Count.ToString
End If
If (GvC.Rows.Count > 0) Then
GvC.UseAccessibleHeader = True
GvC.HeaderRow.TableSection = TableRowSection.TableHeader
Script += "OrdenarGVS();"
divRegistradosCoinciden.Visible = True
LtlCoincidentes.Text = GvC.Rows.Count.ToString
End If
PSIguales()
RegistraScript(Script)
@@ -260,9 +273,9 @@ Partial Class Inventarios_RepAnomalias
'End Sub
Private Sub LnkPDF_Click(sender As Object, e As EventArgs) Handles LnkPDF.Click
ImprimirbytesPDF(Impimir, Formato:="PDF")
ImprimirbytesPDF(Imprimir, Formato:="PDF")
End Sub
Protected Function Impimir() As Byte()
Protected Function Imprimir() As Byte()
Dim retorno As Byte() = Nothing
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/RepAnomalias.rdlc", UsuarioActual.Empresa.Ruta))

View File

@@ -1395,7 +1395,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
Archivo fileItem = continuar ? Filesgral[0] : null;
if (continuar)
{
string FileExtension = fileItem.Extencion.ToUpper();
string FileExtension = fileItem.Extension.ToUpper();
if (FileExtension == "XLS" | FileExtension == "XLSX" | FileExtension == "CSV")
{
}
@@ -4586,8 +4586,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
bool Continuar;
using (ClsNominas ObjMovt = new ClsNominas())
{
Continuar = ObjMovt.AddMovtoPermanente(cveConcepto, SRCvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus, CveCuenta);
Continuar = ObjMovt.AddMovtoPermanente(cveConcepto, SRCvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus, CveCuenta) > 0;
}
if (Continuar)
{