diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb
index 2c8d4284b..a4f596a68 100644
--- a/App_Code/ClsInventarios.vb
+++ b/App_Code/ClsInventarios.vb
@@ -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)
diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb
index 71020a7ac..3295fce89 100644
--- a/App_Code/ClsNominas.vb
+++ b/App_Code/ClsNominas.vb
@@ -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
diff --git a/Bancos/Devoluciones.aspx.cs b/Bancos/Devoluciones.aspx.cs
index 7acb92737..f8131736a 100644
--- a/Bancos/Devoluciones.aspx.cs
+++ b/Bancos/Devoluciones.aspx.cs
@@ -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(@"
Ver Póliza", 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();
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index f65919d08..e10a8b627 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -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
diff --git a/Contabilidad/ContabilidadElectronica.aspx.vb b/Contabilidad/ContabilidadElectronica.aspx.vb
index 961b19ad8..e59728d33 100644
--- a/Contabilidad/ContabilidadElectronica.aspx.vb
+++ b/Contabilidad/ContabilidadElectronica.aspx.vb
@@ -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
diff --git a/Inventarios/RepAnomalias.aspx b/Inventarios/RepAnomalias.aspx
index 1b930ed61..3b7ee3bef 100644
--- a/Inventarios/RepAnomalias.aspx
+++ b/Inventarios/RepAnomalias.aspx
@@ -304,6 +304,50 @@
+