-- mejora

This commit is contained in:
2023-08-18 19:06:42 -07:00
parent 3d032c7dfe
commit cd9d8346f2
18 changed files with 263 additions and 356 deletions

View File

@@ -936,10 +936,10 @@ Public Class ClsContabilidad
' Return Retorno ' Return Retorno
'End Function 'End Function
Public Function AddPrePolizasDetalle2(CvePrePoliza As Integer, TipoMovimiento As Boolean, Importe As Decimal, Referencia As String, CveConceptoContable As Integer, Concepto As String, FechaVencimiento As Date, IdCtaContable As Integer, IdSegmentoNegocio As Integer, Public Function AddPrePolizasDetalle(CvePrePoliza As Integer, TipoMovimiento As Boolean, Importe As Decimal, ImporteMN As Decimal, CveConceptoContable As Integer, Referencia As String, Concepto As String,
Optional CveIE As Integer = -1, Optional CveVenta As Integer = -1, Optional CveCompra As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional CveCliente As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveIE As Integer = -1, Optional CveVenta As Integer = -1, Optional CveCompra As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional CveCliente As Integer = -1, Optional CveProveedor As Integer = -1,
Optional CvePersonal As Integer = -1, Optional CveMovimientoAlmacen As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveCreditoDetalle As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveMovimientoAlmacen As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveCreditoDetalle As Integer = -1,
Optional CveOC As Integer = -1, Optional CveClasificacion As Integer = -1, Optional CveVentaAmortizacion As Integer = -1, Optional CveCompraAmortizacion As Integer = -1, Optional ImporteMX As Decimal = 0, Optional ImporteME As Decimal = 0, Optional CveOC As Integer = -1, Optional CveClasificacion As Integer = -1, Optional CveVentaAmortizacion As Integer = -1, Optional CveCompraAmortizacion As Integer = -1, Optional ImporteME As Decimal = 0,
Optional CvePrePolizaOriginal As Integer = -1, Optional CveIEDevolucion As Integer = -1, Optional CveCredito As Integer = -1, Optional CveCuenta As Integer = -1, Optional CveTipoGasto As Integer = -1, Optional Contabilizable As Boolean = True, Optional CvePrePolizaOriginal As Integer = -1, Optional CveIEDevolucion As Integer = -1, Optional CveCredito As Integer = -1, Optional CveCuenta As Integer = -1, Optional CveTipoGasto As Integer = -1, Optional Contabilizable As Boolean = True,
Optional TipoCambio As Decimal = 1, Optional CveOCDetalle As Integer = -1, Optional TipoCambioPago As Decimal = 1, Optional PorcentajeImpuesto As Decimal = 0, Optional CveNominaMovtoPermanente As Integer = -1) As Boolean Optional TipoCambio As Decimal = 1, Optional CveOCDetalle As Integer = -1, Optional TipoCambioPago As Decimal = 1, Optional PorcentajeImpuesto As Decimal = 0, Optional CveNominaMovtoPermanente As Integer = -1) As Boolean
@@ -961,17 +961,17 @@ Public Class ClsContabilidad
.Add("@CvePrePolizaOriginal", SqlDbType.Int).Value = CvePrePolizaOriginal .Add("@CvePrePolizaOriginal", SqlDbType.Int).Value = CvePrePolizaOriginal
.Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable .Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable
.Add("@TipoMovto", SqlDbType.Bit).Value = TipoMovimiento .Add("@TipoMovto", SqlDbType.Bit).Value = TipoMovimiento
.Add("@Importe", SqlDbType.Money).Value = Math.Round(Importe, 2) .Add("@Importe", SqlDbType.Money).Value = Importe.RoundSQL
.Add("@ImporteMX", SqlDbType.Money).Value = Math.Round(ImporteMX, 2) .Add("@ImporteMX", SqlDbType.Money).Value = ImporteMN.RoundSQL
.Add("@ImporteME", SqlDbType.Money).Value = Math.Round(ImporteME, 3) .Add("@ImporteME", SqlDbType.Money).Value = ImporteME.RoundSQL(3)
.Add("@TC", SqlDbType.Decimal).Value = TipoCambio .Add("@TC", SqlDbType.Decimal).Value = TipoCambio
.Add("@TCPago", SqlDbType.Decimal).Value = TipoCambioPago .Add("@TCPago", SqlDbType.Decimal).Value = TipoCambioPago
.Add("@Referencia", SqlDbType.VarChar).Value = Referencia .Add("@Referencia", SqlDbType.VarChar).Value = Referencia
.Add("@Concepto", SqlDbType.VarChar).Value = Concepto .Add("@Concepto", SqlDbType.VarChar).Value = Concepto
.Add("@FechaVencimiento", SqlDbType.Date).Value = FechaVencimiento '.Add("@FechaVencimiento", SqlDbType.Date).Value = FechaVencimiento
.Add("@IdCtaContable", SqlDbType.Int).Value = IdCtaContable '.Add("@IdCtaContable", SqlDbType.Int).Value = IdCtaContable
'.Add("@IdSegmentoNegocio", SqlDbType.Int).Value = IdSegmentoNegocio
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
.Add("@IdSegmentoNegocio", SqlDbType.Int).Value = IdSegmentoNegocio
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta .Add("@CveVenta", SqlDbType.Int).Value = CveVenta
.Add("@CveVentaAmortizacion", SqlDbType.Int).Value = CveVentaAmortizacion .Add("@CveVentaAmortizacion", SqlDbType.Int).Value = CveVentaAmortizacion
@@ -1053,19 +1053,6 @@ Public Class ClsContabilidad
Return Retorno Return Retorno
End Function End Function
Public Function AddPrePolizasDetalle(CvePrePoliza As Integer, TipoMovimiento As Boolean, Importe As Decimal, ImporteMN As Decimal, CveConceptoContable As Integer, Referencia As String, Concepto As String,
Optional CveIE As Integer = -1, Optional CveVenta As Integer = -1, Optional CveCompra As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional CveCliente As Integer = -1, Optional CveProveedor As Integer = -1,
Optional CvePersonal As Integer = -1, Optional CveMovimientoAlmacen As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveCreditoDetalle As Integer = -1,
Optional CveOC As Integer = -1, Optional CveClasificacion As Integer = -1, Optional CveVentaAmortizacion As Integer = -1, Optional CveCompraAmortizacion As Integer = -1, Optional ImporteME As Decimal = 0,
Optional CvePrePolizaOriginal As Integer = -1, Optional CveIEDevolucion As Integer = -1, Optional CveCredito As Integer = -1, Optional CveCuenta As Integer = -1, Optional CveTipoGasto As Integer = -1, Optional Contabilizable As Boolean = True,
Optional TipoCambio As Decimal = 1, Optional CveOCDetalle As Integer = -1, Optional TipoCambioPago As Decimal = 1, Optional PorcentajeImpuesto As Decimal = 0, Optional CveNominaMovtoPermanente As Integer = -1) As Boolean
Dim Retorno As Boolean = False
Retorno = AddPrePolizasDetalle2(CvePrePoliza, TipoMovimiento, Importe, Referencia, CveConceptoContable, Concepto, New DateTime(1900, 1, 1), 0, -1, CveIE, CveVenta, CveCompra, CveSubProyecto, CveCliente, CveProveedor, CvePersonal,
CveMovimientoAlmacen, CveActivoFijo, CveColectiva, CveCreditoDetalle, CveOC, CveClasificacion, CveVentaAmortizacion, CveCompraAmortizacion, ImporteMN, ImporteME, CvePrePoliza, CveIEDevolucion, CveCredito, CveCuenta, CveTipoGasto, Contabilizable,
TipoCambio, CveOCDetalle, TipoCambioPago, PorcentajeImpuesto, CveNominaMovtoPermanente)
Return Retorno
End Function
Public Function ObtenerConceptoEmpresa(CveEmpresa As Integer, CveConcepto As Integer, NombreComercial As String, SerieFolio As String, FolioBancario As String, Optional Adicional As String = "") As String Public Function ObtenerConceptoEmpresa(CveEmpresa As Integer, CveConcepto As Integer, NombreComercial As String, SerieFolio As String, FolioBancario As String, Optional Adicional As String = "") As String
Dim Concepto As String = "" Dim Concepto As String = ""

View File

@@ -6000,12 +6000,7 @@ Public Class ClsPaginas
If Not UsarStimulsoft Then If Not UsarStimulsoft Then
Dim Archivo As New System.IO.FileInfo(RutaFormato) Dim Archivo As New System.IO.FileInfo(RutaFormato)
If Archivo.Exists Then If Archivo.Exists Then
'If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
' RutaFormato = RutaFormato.Replace(".rdlc", ".mrt")
' retorno = StreamBytesStimulsoft("Facturas", RutaFormato, lrds, params, NombreArchivo:=NombreArchivo, Formato:="PDF")
'Else
' retorno = StreamPDF(RutaFormato, lrds, params, NombreArchivo, "PDF", MR:=Nothing)
'End If
retorno = StreamPDF(RutaFormato, lrds, params, NombreArchivo, "PDF", MR:=Nothing, SubReportData:=SubReportData) retorno = StreamPDF(RutaFormato, lrds, params, NombreArchivo, "PDF", MR:=Nothing, SubReportData:=SubReportData)
Dim ArchivoPDF As New System.IO.FileInfo(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio)) Dim ArchivoPDF As New System.IO.FileInfo(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio))
If Guardar Then If Guardar Then
@@ -6029,12 +6024,7 @@ Public Class ClsPaginas
Else Else
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC)) params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC))
'If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
' RutaFormato = RutaFormato.Replace(".rdlc", ".mrt")
' retorno = StreamBytesStimulsoft("Facturas", RutaFormatoDefault, lrds, params, NombreArchivo:=NombreArchivo, Formato:="PDF")
'Else
' retorno = StreamPDF(RutaFormatoDefault, lrds, params, NombreArchivo, "PDF", MR:=Nothing)
'End If
retorno = StreamPDF(RutaFormatoDefault, lrds, params, NombreArchivo, "PDF", MR:=Nothing, SubReportData:=SubReportData) retorno = StreamPDF(RutaFormatoDefault, lrds, params, NombreArchivo, "PDF", MR:=Nothing, SubReportData:=SubReportData)
End If End If
Else Else

View File

@@ -219,8 +219,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
} }
protected void CargaDevolucionesProveedor(int CveProveedor) protected void CargaDevolucionesProveedor(int CveProveedor)
{ {
ClsMovimientos ObjMov = new ClsMovimientos(); ClsMovimientos ObjMov = new ClsMovimientos();
ClsCompProveedores clsCompProveedores = new ClsCompProveedores();
if (ObjMov.GetEgresosSinComprobar("-1", "-1", CveProveedor, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa)) if (ObjMov.GetEgresosSinComprobar("-1", "-1", CveProveedor, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa))
{ {
@@ -228,8 +227,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
GvDevoluciones.DataSource = ObjMov.DtResultados.FiltraParametros("CveIE > 0 AND Saldo > 0 AND CveConceptoContable in (10,48,338)", "", columnas); GvDevoluciones.DataSource = ObjMov.DtResultados.FiltraParametros("CveIE > 0 AND Saldo > 0 AND CveConceptoContable in (10,48,338)", "", columnas);
GvDevoluciones.DataBind(); GvDevoluciones.DataBind();
} }
ObjMov.Dispose(); ObjMov.Dispose();
clsCompProveedores.Dispose();
UpDevoluciones.Update(); UpDevoluciones.Update();
} }
#endregion #endregion
@@ -249,7 +247,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
case "3": case "3":
if (ObjMov.GetEgresosSinComprobar("-1", "-1", -1, CvePersonal, -1, -1, -1, 1, -1, UsuarioActual.CveEmpresa)) if (ObjMov.GetEgresosSinComprobar("-1", "-1", -1, CvePersonal, -1, -1, -1, 1, -1, UsuarioActual.CveEmpresa))
{ {
string[] columnas = new string[7] { "CveIE", "IEDevolucion", "Saldo", "Importe", "Pagado", "Folio", "FechaDocumento" }; string[] columnas = new string[10] { "CveIE", "IEDevolucion", "Saldo", "Importe", "Pagado", "Folio", "FechaDocumento", "Abreviatura", "CveMoneda", "TipoCambio" };
GvDevoluciones.DataSource = ObjMov.DtResultados.FiltraParametros("CveIE > 0 AND Saldo > 0 ", "", columnas); GvDevoluciones.DataSource = ObjMov.DtResultados.FiltraParametros("CveIE > 0 AND Saldo > 0 ", "", columnas);
GvDevoluciones.DataBind(); GvDevoluciones.DataBind();
} }
@@ -257,7 +255,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
case "4": case "4":
if (ObjMov.GetPrestamosPersonalXSaldar(CvePersonal, -1, UsuarioActual.CveEmpresa)) if (ObjMov.GetPrestamosPersonalXSaldar(CvePersonal, -1, UsuarioActual.CveEmpresa))
{ {
string[] columnas = new string[7] { "CveIE", "IEDevolucion", "Saldo", "Importe", "Pagado", "Folio", "FechaDocumento" }; string[] columnas = new string[10] { "CveIE", "IEDevolucion", "Saldo", "Importe", "Pagado", "Folio", "FechaDocumento", "Abreviatura", "CveMoneda", "TipoCambio" };
GvDevoluciones.DataSource = ObjMov.DtResultados.FiltraParametros("CveIE > 0 AND Saldo > 0 ", "", columnas); GvDevoluciones.DataSource = ObjMov.DtResultados.FiltraParametros("CveIE > 0 AND Saldo > 0 ", "", columnas);
GvDevoluciones.DataBind(); GvDevoluciones.DataBind();
} }
@@ -335,9 +333,6 @@ public partial class Bancos_Devoluciones : ClsPaginas
} }
//terminan validaciones //terminan validaciones
List<Archivo> filesgral = Anexo.getfiles().Archivos; List<Archivo> filesgral = Anexo.getfiles().Archivos;
string filemove = ""; string filemove = "";
string Comprobante = ""; string Comprobante = "";
@@ -347,8 +342,6 @@ public partial class Bancos_Devoluciones : ClsPaginas
filemove = fileItem.filename; filemove = fileItem.filename;
} }
ClsBancos ObjIE = new ClsBancos(); ClsBancos ObjIE = new ClsBancos();
ClsContabilidad ObjMov = new ClsContabilidad(ObjIE.IniciaTransacSQL()); ClsContabilidad ObjMov = new ClsContabilidad(ObjIE.IniciaTransacSQL());
ClsCompras ObjComp = new ClsCompras(ObjIE.IniciaTransacSQL()); ClsCompras ObjComp = new ClsCompras(ObjIE.IniciaTransacSQL());
@@ -622,9 +615,9 @@ public partial class Bancos_Devoluciones : ClsPaginas
archivo = new System.IO.FileInfo(String.Format("{0}Formatos/ComprobanteEgreso.rdlc", UsuarioActual.Empresa.Ruta, DdlCuenta.SelectedValue.ToEntero())); archivo = new System.IO.FileInfo(String.Format("{0}Formatos/ComprobanteEgreso.rdlc", UsuarioActual.Empresa.Ruta, DdlCuenta.SelectedValue.ToEntero()));
} }
if (IDPoliza > 0) if (CvePrePoliza > 0)
{ {
Msg.AppendFormat(@"<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza); Msg.AppendFormat(@"<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizaS.aspx?CvePrePoliza={0}"">Ver Póliza</a>", CvePrePoliza);
} }
ObjIE.Commit(); ObjIE.Commit();
@@ -633,7 +626,6 @@ public partial class Bancos_Devoluciones : ClsPaginas
filemove.FilesMove(CveIE.ToString(), String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase: false); filemove.FilesMove(CveIE.ToString(), String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase: false);
} }
if (!Msg.ToString().Equals("")) if (!Msg.ToString().Equals(""))
{ {
string AccionJS = String.Format(@"document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery); string AccionJS = String.Format(@"document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery);
@@ -661,20 +653,22 @@ public partial class Bancos_Devoluciones : ClsPaginas
{ {
ClsNominas onom = new ClsNominas(); ClsNominas onom = new ClsNominas();
onom.GetConceptos(UsuarioActual.CveEmpresa); if (onom.GetConceptos(UsuarioActual.CveEmpresa))
DataTable dt = onom.DtResultados.FiltraParametros(" FormulaTotal = 'FNC.[MovimientosPermanentes]'"); {
DdlConcepto.Items.Clear(); DataTable dt = onom.DtResultados.FiltraParametros(" FormulaTotal = 'FNC.[MovimientosPermanentes]'");
DdlConcepto.Items.Clear();
DdlConcepto.DataSource = dt.FiltraParametros("Tipo ='D'"); DdlConcepto.DataSource = dt.FiltraParametros("Tipo ='D'");
DataRow drow = dt.NewRow(); DataRow drow = dt.NewRow();
drow["CveConcepto"] = "-1"; drow["CveConcepto"] = "-1";
drow["Concepto"] = "Seleccione"; drow["Concepto"] = "Seleccione";
dt.Rows.InsertAt(drow, 0); dt.Rows.InsertAt(drow, 0);
DdlConcepto.DataSource = dt; DdlConcepto.DataSource = dt;
DdlConcepto.SelectedValueExist("-1"); DdlConcepto.SelectedValueExist("-1");
DdlConcepto.DataBind();
//DdlConcepto.Items.Insert(0, new ListItem("Seleccione", "-1"));
}
onom.Dispose(); onom.Dispose();
//DdlConcepto.Items.Insert(0, new ListItem("Seleccione", "-1")); DdlConcepto.DataBind();
} }
} }

View File

@@ -3225,9 +3225,8 @@ Partial Class Bancos_IE
' 'MOVIMIENTOS CHEQUE ' 'MOVIMIENTOS CHEQUE
' 'If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then ' 'If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then
' ' Dim Textov33 As String = "" ' ' Dim Textov33 As String = ""
' ' If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then '
' ' Textov33 = "Favor de emitir complemento de pago de los siguientes documentos" ' ' Textov33 = "Favor de emitir complemento de pago de los siguientes documentos"
' ' End If
' ' strBody.AppendFormat("<div style='width: 1000px'>") ' ' strBody.AppendFormat("<div style='width: 1000px'>")
' ' strBody.AppendFormat(" <table style='width:1000px'>") ' ' strBody.AppendFormat(" <table style='width:1000px'>")

View File

@@ -213,18 +213,18 @@ Partial Class Bancos_OtrosIE
Cuenta = DRt("ConceptoContable").ToString Cuenta = DRt("ConceptoContable").ToString
'SACO LA CLAVE DE LA CUENTA BANCARIA SELECCIONADO 'SACO LA CLAVE DE LA CUENTA BANCARIA SELECCIONADO
If DdlCuenta.SelectedValue.ToEntero > 0 And DRt("CveConcepto").ToString = "30" Then 'DTCuentasContables 'If DdlCuenta.SelectedValue.ToEntero > 0 And DRt("CveConcepto").ToString = "30" Then 'DTCuentasContables
' Dim DRr As DataRow = DTCuentasContables.FiltroPrimero(String.Format("Id={0}", IdCuentaBancos(DdlCuenta.SelectedValue.ToEntero))) 'Dim DRr As DataRow = DTCuentasContables.FiltroPrimero(String.Format("Id={0}", IdCuentaBancos(DdlCuenta.SelectedValue.ToEntero)))
If DRr IsNot Nothing Then 'If DRr IsNot Nothing Then
CodigoCuenta = DRr("CuentaFormato").ToString() ' CodigoCuenta = DRr("CuentaFormato").ToString()
EsComodin = 1 ' EsComodin = 1
Else 'Else
Alert("La Cuenta Bancaria no se ha vinculado a la cuenta contable", TipoMensaje.MsgAdvertencia) ' Alert("La Cuenta Bancaria no se ha vinculado a la cuenta contable", TipoMensaje.MsgAdvertencia)
GvMov.DataBind() ' GvMov.DataBind()
UPMovs.Update() ' UPMovs.Update()
Exit Sub ' Exit Sub
End If ' End If
End If 'End If
Dim DR As DataRow = DTMovimientos.NewRow Dim DR As DataRow = DTMovimientos.NewRow
DR("IdCuenta") = 0 DR("IdCuenta") = 0

View File

@@ -2678,9 +2678,9 @@ Partial Class Bancos_PagoElectronico
' 'MOVIMIENTOS CHEQUE ' 'MOVIMIENTOS CHEQUE
' If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then ' If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then
' Dim Textov33 As String = "" ' Dim Textov33 As String = ""
' If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then
' Textov33 = "Favor de emitir complemento de pago de los siguientes documentos" ' Textov33 = "Favor de emitir complemento de pago de los siguientes documentos"
' End If
' strBody.AppendFormat("<div style='width: 1000px'>") ' strBody.AppendFormat("<div style='width: 1000px'>")
' strBody.AppendFormat(" <table style='width:1000px'>") ' strBody.AppendFormat(" <table style='width:1000px'>")

View File

@@ -3264,9 +3264,9 @@ Partial Class Bancos_PagoElectronicoGrupos
' 'MOVIMIENTOS CHEQUE ' 'MOVIMIENTOS CHEQUE
' If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then ' If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then
' Dim Textov33 As String = "" ' Dim Textov33 As String = ""
' If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then
' Textov33 = "Favor de emitir complemento de pago de los siguientes documentos" ' Textov33 = "Favor de emitir complemento de pago de los siguientes documentos"
' End If
' strBody.AppendFormat("<div style='width: 1000px'>") ' strBody.AppendFormat("<div style='width: 1000px'>")
' strBody.AppendFormat(" <table style='width:1000px'>") ' strBody.AppendFormat(" <table style='width:1000px'>")

View File

@@ -365,7 +365,7 @@ Partial Class Bancos_PolizaCheque
Cuenta = drt("ConceptoContable").ToString Cuenta = drt("ConceptoContable").ToString
IdCuenta = drt("IdCtaContable").ToString.ToEntero IdCuenta = drt("IdCtaContable").ToString.ToEntero
CveCuenta = 0 CveCuenta = drt("CveCuenta").ToString.ToEntero
CodigoCuenta = drt("Codigo").ToString CodigoCuenta = drt("Codigo").ToString
NombreCuenta = drt("Nombre").ToString NombreCuenta = drt("Nombre").ToString
@@ -717,8 +717,6 @@ Partial Class Bancos_PolizaCheque
CveProveedorSeleccionado = DdlProveedores.txtValue.Value.ToEntero CveProveedorSeleccionado = DdlProveedores.txtValue.Value.ToEntero
End If End If
If DdlCuenta.SelectedValue.ToEntero <= 0 Then If DdlCuenta.SelectedValue.ToEntero <= 0 Then
If UsuarioActual.CveEmpresa <> 126 Then If UsuarioActual.CveEmpresa <> 126 Then
Alert("Seleccione la Cuenta Bancaria", TipoMensaje.MsgAdvertencia) Alert("Seleccione la Cuenta Bancaria", TipoMensaje.MsgAdvertencia)
@@ -726,15 +724,12 @@ Partial Class Bancos_PolizaCheque
Exit Sub Exit Sub
End If End If
End If End If
For Each Gvr As GridViewRow In GvMov.Rows For Each Gvr As GridViewRow In GvMov.Rows
TotalCargos += Gvr.FCTextBox("TxtCargo").Text.ToDecimal TotalCargos += Gvr.FCTextBox("TxtCargo").Text.ToDecimal
TotalAbonos += Gvr.FCTextBox("TxtAbono").Text.ToDecimal TotalAbonos += Gvr.FCTextBox("TxtAbono").Text.ToDecimal
Next Next
For Each Gvr As GridViewRow In GvMov.Rows For Each Gvr As GridViewRow In GvMov.Rows
If Gvr.DataKey("CveConcepto").ToEntero = 30 Then If Gvr.DataKey("CveConcepto").ToEntero = 30 Then
@@ -749,8 +744,7 @@ Partial Class Bancos_PolizaCheque
If Not ValidaConcepto30 Then If Not ValidaConcepto30 Then
Alert("El importe no coincide con el concepto de bancos.", TipoMensaje.MsgAdvertencia) Alert("El importe no coincide con el concepto de bancos.", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
End If End If
Dim filesgral As List(Of Archivo) = Anexo.getfiles().Archivos Dim filesgral As List(Of Archivo) = Anexo.getfiles().Archivos
Dim filemove As String = "" Dim filemove As String = ""
@@ -763,14 +757,10 @@ Partial Class Bancos_PolizaCheque
If TotalCargos = TotalAbonos Then If TotalCargos = TotalAbonos Then
Dim ObjIE As New ClsBancos() Dim ObjIE As New ClsBancos()
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL) Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
Dim ObjNom As New ClsNominas(ObjIE.IniciaTransacSQL)
Dim IDPoliza As Integer = 0 Dim IDPoliza As Integer = 0
Dim CveIE As Integer Dim CveIE As Integer
Dim MsgError As String = "" Dim MsgError As String = ""
Dim idCuentaContabilizacion As Long = 1
If MsgError = "" Then If MsgError = "" Then
@@ -794,8 +784,6 @@ Partial Class Bancos_PolizaCheque
If CveIE > 0 Then If CveIE > 0 Then
'inserto los movimientos de la conta para abonar al saldo 'inserto los movimientos de la conta para abonar al saldo
If CvePrePoliza > 0 Then If CvePrePoliza > 0 Then
Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>" Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>"
@@ -831,10 +819,13 @@ Partial Class Bancos_PolizaCheque
Importe = Importe * TC Importe = Importe * TC
End If End If
'If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, Referencia, gvr.DataKey("CveConcepto").ToEntero, TxtObservaciones.Text, Now, gvr.DataKey("IDCuenta").ToEntero, -1, CveIE, CveProveedor:=CveProveedorSeleccionado, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, CvePersonal:=CvePersonalSeleccionado, ImporteMX:=Importe, TipoCambio:=TC, CveCuenta:=gvr.DataKey("CveCuenta").ToEntero) Then
' MsgError = "no se pudo insertar el detalle de la póliza2"
'End If
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, Importe, gvr.DataKey("CveConcepto").ToEntero, Referencia, TxtObservaciones.Text, CveIE:=CveIE, CveProveedor:=CveProveedorSeleccionado, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, CvePersonal:=CvePersonalSeleccionado, TipoCambio:=TC, CveCuenta:=gvr.DataKey("CveCuenta").ToEntero) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, Importe, gvr.DataKey("CveConcepto").ToEntero, Referencia, TxtObservaciones.Text, CveIE:=CveIE, CveProveedor:=CveProveedorSeleccionado, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, CvePersonal:=CvePersonalSeleccionado, TipoCambio:=TC, CveCuenta:=gvr.DataKey("CveCuenta").ToEntero) Then
MsgError = "no se pudo insertar el detalle de la póliza2" MsgError = "no se pudo insertar el detalle de la póliza2"
End If End If
If gvr.DataKey("CveConcepto").ToEntero = 30 Then If gvr.DataKey("CveConcepto").ToEntero = 30 Then
If CveMoneda > 1 AndAlso UsuarioActual.CveEmpresa = 119 Then If CveMoneda > 1 AndAlso UsuarioActual.CveEmpresa = 119 Then
'Agregamos complementaria 'Agregamos complementaria
@@ -843,31 +834,18 @@ Partial Class Bancos_PolizaCheque
End If End If
End If End If
End If End If
End If End If
End If End If
Next Next
If TxtAjuste.Text.ToDecimal <> 0 Then If TxtAjuste.Text.ToDecimal <> 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtAjuste.Text.ToDecimal, TxtAjuste.Text.ToDecimal, 44, "", TxtObservaciones.Text, CveIE:=CveIE, TipoCambio:=TC) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtAjuste.Text.ToDecimal, TxtAjuste.Text.ToDecimal, 44, "", TxtObservaciones.Text, CveIE:=CveIE, TipoCambio:=TC) Then
MsgError = "no se pudo insertar el detalle de la póliza2" MsgError = "no se pudo insertar el detalle de la póliza2"
End If End If
End If End If
If CvePeriodo > 0 Then
If Not ObjNom.UpdatePagoNomina(CvePeriodo, CveIE, CvePrePoliza, UsuarioActual.CveEmpresa) Then
MsgError = "No se pudo actualizar el periodo de la nómina"
End If
End If
Else Else
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
Else Else
MsgError = "No se insertó el encabezado" MsgError = "No se insertó el encabezado"
End If End If
@@ -929,21 +907,17 @@ Partial Class Bancos_PolizaCheque
Alert(StrMsg.ToString, TipoMensaje.MsgInformacion, "window.location.reload();") Alert(StrMsg.ToString, TipoMensaje.MsgInformacion, "window.location.reload();")
Else Else
Alert(MsgError.ToString, TipoMensaje.MsgError) Alert(MsgError.ToString, TipoMensaje.MsgError)
ObjIE.RollBack() ObjIE.RollBack()
End If End If
Else Else
Alert("Debe de llevar un importe", TipoMensaje.MsgAdvertencia) Alert("Debe de llevar un importe", TipoMensaje.MsgAdvertencia)
End If End If
End If End If
ObjIE.Dispose() ObjIE.Dispose()
ObjMov.Dispose() ObjMov.Dispose()
ObjNom.Dispose()
Else Else
Alert("La suma de los movimientos no son iguales", TipoMensaje.MsgAdvertencia) Alert("La suma de los movimientos no son iguales", TipoMensaje.MsgAdvertencia)

View File

@@ -1701,7 +1701,7 @@ Partial Class Compras_Compras
If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then
Dim mensajeAdvertencia As String = String.Format("El comprobante contiene productos con código SAT '01010101', revise los productos:</br></br>{0}", ProductosCodigoSATNoPermitidos.ToString) Dim mensajeAdvertencia As String = String.Format("El comprobante contiene productos con código SAT '01010101', revise los productos:</br></br>{0}", ProductosCodigoSATNoPermitidos.ToString)
Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia) Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
BtnGuardar.Enabled = False If UsuarioActual.CveEmpresa.Contiene(119, 158) Then BtnGuardar.Enabled = False
BtnGuardar.ToolTip = "No se permite registrar facturas con conceptos con código '01010101'. Solicite al proveedor un nuevo comprobante." BtnGuardar.ToolTip = "No se permite registrar facturas con conceptos con código '01010101'. Solicite al proveedor un nuevo comprobante."
End If End If
@@ -4843,7 +4843,8 @@ Partial Class Compras_Compras
End If End If
If ContadorInventario > 0 Then If ContadorInventario > 0 Then
CuentaMatrizAlmacen = CtaAlmacen
' CuentaMatrizAlmacen = CtaAlmacen
ElseIf grp.CveActivoFijo > 0 Then ElseIf grp.CveActivoFijo > 0 Then
Dim CtaAF = -1 Dim CtaAF = -1

View File

@@ -1849,14 +1849,9 @@ Partial Class Compras_Proveedores
DdlCveTipoProveedor.SelectedValue.ToEntero, DdlMonedaPrefente.SelectedValue.ToEntero, UsaLimiteCredito:=ChkUsaLimiteCredito.Checked, DIOTCveTipoTercero:=DDlDIOTTipoTercero.SelectedValue.ToEntero, DIOTCveTipoOperacion:=DdlDIOTTipoOperacion.SelectedValue.ToEntero, DIOTNumeroIDFiscal:=TxtDIOTNumIDFiscal.Text, CveUsuarioModifico:=UsuarioActual.CveUsuario, DdlCveTipoProveedor.SelectedValue.ToEntero, DdlMonedaPrefente.SelectedValue.ToEntero, UsaLimiteCredito:=ChkUsaLimiteCredito.Checked, DIOTCveTipoTercero:=DDlDIOTTipoTercero.SelectedValue.ToEntero, DIOTCveTipoOperacion:=DdlDIOTTipoOperacion.SelectedValue.ToEntero, DIOTNumeroIDFiscal:=TxtDIOTNumIDFiscal.Text, CveUsuarioModifico:=UsuarioActual.CveUsuario,
DIOTCvePais:=DdlDIOTPais.SelectedValue.ToEntero, AplicarEvaluacion:=ChkAplicarEvaluacion.Checked, FechaEvaluacion:=FechaEvaluacion, CicloEvaluacion:=CicloEvaluacion, CveUsuarioEvaluador:=DdlUsuarioEvaluador.SelectedValue.ToEntero(), CP:=TxtCP.Text.ToEntero, DIOTNacionalidad:=TxtDIOTNacionalidad.Text, DIOTCvePais:=DdlDIOTPais.SelectedValue.ToEntero, AplicarEvaluacion:=ChkAplicarEvaluacion.Checked, FechaEvaluacion:=FechaEvaluacion, CicloEvaluacion:=CicloEvaluacion, CveUsuarioEvaluador:=DdlUsuarioEvaluador.SelectedValue.ToEntero(), CP:=TxtCP.Text.ToEntero, DIOTNacionalidad:=TxtDIOTNacionalidad.Text,
CveConfianzaProveedor:=DdlConfianzaProveedor.SelectedValue.ToEntero(), CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero) Then CveConfianzaProveedor:=DdlConfianzaProveedor.SelectedValue.ToEntero(), CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero) Then
'CargaDatos()
If tIdContaProveedor > 0 AndAlso CreoCuenta Then ObjProveedores.UpdateProveedorIdCuentaAC(CveProveedor, tIdContaProveedor)
'If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = Nothing GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = Nothing
'End If
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion) Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
'HABILITA ENVIAR ACTIVACION AL PORTAL PROVEEDOR SI SE AGREGO CORREO 'HABILITA ENVIAR ACTIVACION AL PORTAL PROVEEDOR SI SE AGREGO CORREO

View File

@@ -1185,25 +1185,25 @@ Partial Class RegPoliza
Dim tCveSub As Integer = If(drt("IdSegNeg").ToString <> "", GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"SubProyecto ='{drt("SegNeg")}'").ToEntero, -1) Dim tCveSub As Integer = If(drt("IdSegNeg").ToString <> "", GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"SubProyecto ='{drt("SegNeg")}'").ToEntero, -1)
'If tCveSub <= 0 AndAlso drt("IdSegNeg").ToString.ToEntero = 0 Then 'toma el primero 'If tCveSub <= 0 AndAlso drt("IdSegNeg").ToString.ToEntero = 0 Then 'toma el primero
' tCveSub = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto").ToEntero ' tCveSub = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto").ToEntero
'End If ' Now, drt("IdCuenta").ToString.ToEntero, 0,
'If ObjConta.AddPrePolizasDetalle(tCvePrePoliza, drt("TipoMovto").ToString = "True",
' drt("Importe").ToString.ToDecimal,
' drt("Importe").ToString.ToDecimal, 299,
' drt("Concepto").ToString,
' drt("Concepto").ToString,
' CveSubProyecto:=tCveSub,
' CveCuenta:=tCveCuenta) Then
' 'registro
' If Not ObjContaq.UpdateMovimientoPrePolizaDetalle(drt("IdPoliza").ToString.ToEntero,
' drt("Id").ToString.ToEntero,
' ObjConta.CvePrePolizaDetalle) Then
' ErrorRegistro = True
' Exit For
' End If
'Else
' ErrorRegistro = True
' Exit For
'End If 'End If
If ObjConta.AddPrePolizasDetalle2(tCvePrePoliza, drt("TipoMovto").ToString = "True",
drt("Importe").ToString.ToDecimal,
drt("Concepto").ToString, 299,
drt("Concepto").ToString, Now,
drt("IdCuenta").ToString.ToEntero, 0,
CveSubProyecto:=tCveSub,
ImporteMX:=drt("Importe").ToString.ToDecimal, CveCuenta:=tCveCuenta) Then
'registro
If Not ObjContaq.UpdateMovimientoPrePolizaDetalle(drt("IdPoliza").ToString.ToEntero,
drt("Id").ToString.ToEntero,
ObjConta.CvePrePolizaDetalle) Then
ErrorRegistro = True
Exit For
End If
Else
ErrorRegistro = True
Exit For
End If
Next Next
If Not ErrorRegistro AndAlso tCvePrePolizaOriginal <= 0 AndAlso Not ObjConta.UpdatePrePoliza(dr("FechaPol").ToString.ToDate, dr("Folio").ToString.ToEntero, -1, tIdPoliza, tCvePrePoliza, UsuarioActual.CveEmpresa, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then If Not ErrorRegistro AndAlso tCvePrePolizaOriginal <= 0 AndAlso Not ObjConta.UpdatePrePoliza(dr("FechaPol").ToString.ToDate, dr("Folio").ToString.ToEntero, -1, tIdPoliza, tCvePrePoliza, UsuarioActual.CveEmpresa, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then

View File

@@ -1079,20 +1079,20 @@ Partial Class ContabilidadC_RegPrePoliza
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
If Importe <> 0 Then 'If Importe <> 0 Then
If ObjMov.AddPrePolizasDetalle2(CvePrePoliza, TipoMovto, Importe, gvr.FCLiteral("LtlReferencia").Text, gvr.DataKey("CveConcepto").ToEntero(), gvr.FCTextBox("TxtConcepto").Text, ' If ObjMov.AddPrePolizasDetalle2(CvePrePoliza, TipoMovto, Importe, gvr.FCLiteral("LtlReferencia").Text, gvr.DataKey("CveConcepto").ToEntero(), gvr.FCTextBox("TxtConcepto").Text,
TxtFecha.Text.ToDate(), IdCtaContable, -1, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero(), CveIE:=CveIE, ' TxtFecha.Text.ToDate(), IdCtaContable, -1, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero(), CveIE:=CveIE,
CveProveedor:=CveProveedor, CveCompra:=CveCompra, ' CveProveedor:=CveProveedor, CveCompra:=CveCompra,
CvePersonal:=gvr.DataKey("CvePersonal").ToEntero(), CveClasificacion:=gvr.DataKey("CveClasificacion").ToEntero(), ' CvePersonal:=gvr.DataKey("CvePersonal").ToEntero(), CveClasificacion:=gvr.DataKey("CveClasificacion").ToEntero(),
CveTipoGasto:=gvr.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero(), ' CveTipoGasto:=gvr.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero(),
CveCliente:=gvr.DataKey("CveCliente").ToEntero(), CveVenta:=gvr.DataKey("CveVenta").ToEntero(), TipoCambio:=If(gvr.DataKey("TC").ToString().ToDecimal() > 0, gvr.DataKey("TC").ToString().ToDecimal(), 1), ' CveCliente:=gvr.DataKey("CveCliente").ToEntero(), CveVenta:=gvr.DataKey("CveVenta").ToEntero(), TipoCambio:=If(gvr.DataKey("TC").ToString().ToDecimal() > 0, gvr.DataKey("TC").ToString().ToDecimal(), 1),
ImporteME:=If(gvr.DataKey("TC").ToString().ToDecimal() > 0, (Importe / (gvr.DataKey("TC").ToString().ToDecimal() - 1)).RoundSQL, 0), ' ImporteME:=If(gvr.DataKey("TC").ToString().ToDecimal() > 0, (Importe / (gvr.DataKey("TC").ToString().ToDecimal() - 1)).RoundSQL, 0),
PorcentajeImpuesto:=gvr.DataKey("PorcentajeImpuesto").ToDecimal(), CveCuenta:=gvr.DataKey("CveCuenta").ToEntero()) Then ' PorcentajeImpuesto:=gvr.DataKey("PorcentajeImpuesto").ToDecimal(), CveCuenta:=gvr.DataKey("CveCuenta").ToEntero()) Then
Else ' Else
MsgError = "No se pudo insertar el detalle de la póliza2" ' MsgError = "No se pudo insertar el detalle de la póliza2"
Exit For ' Exit For
End If ' End If
End If 'End If
If CveIE > 0 AndAlso gvr.DataKey("CveConcepto").ToEntero = 30 Then If CveIE > 0 AndAlso gvr.DataKey("CveConcepto").ToEntero = 30 Then
MensajeAlert.AppendFormat("<br/><br/>Folio Bancario: <b><a href = ""/Bancos/IE.aspx?CveIE={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", CveIE, FolioIE) MensajeAlert.AppendFormat("<br/><br/>Folio Bancario: <b><a href = ""/Bancos/IE.aspx?CveIE={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", CveIE, FolioIE)
End If End If
@@ -2257,16 +2257,16 @@ Partial Class ContabilidadC_RegPrePoliza
' CargoAbono = False ' CargoAbono = False
'End If 'End If
If YaExiste = False Then 'If YaExiste = False Then
If IdCuenta > 0 Then ' If IdCuenta > 0 Then
If Not ObjConta.AddPrePolizasDetalle2(CvePrePoliza, TipoMovto, Importe, "", CveConceptoContable, Concepto, Now.ToDate(), IdCtaContable, -1, ImporteMX:=Importe, CveSubProyecto:=CveSubProyecto, CveCuenta:=IdCuenta) Then ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, "", CveConceptoContable, Concepto, Now.ToDate(), IdCtaContable, -1, ImporteMX:=Importe, CveSubProyecto:=CveSubProyecto, CveCuenta:=IdCuenta) Then
TieneError = True ' TieneError = True
Exit For ' Exit For
End If ' End If
Else ' Else
IdCuenta = -2 ' IdCuenta = -2
End If ' End If
End If 'End If
Next Next

View File

@@ -1196,8 +1196,9 @@ Partial Class ContabilidadC_RegPrePolizaS
End If End If
If Not ObjContabilidad.UpdatePrePolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCLiteral("TxtConcepto").Text, row.DataKey("CveSubProyecto").ToEntero, If Not ObjContabilidad.UpdatePrePolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCLiteral("TxtConcepto").Text, row.DataKey("CveSubProyecto").ToEntero,
If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, -1, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True),
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal),
CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero),
CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero, CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero,
CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero,
CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text, CveCuenta:=row.DataKey("CveCuenta").ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveIE:=CveIEAgregado) Then CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text, CveCuenta:=row.DataKey("CveCuenta").ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveIE:=CveIEAgregado) Then

View File

@@ -3589,7 +3589,7 @@ Partial Class General_SaldosIniciales
If Not ObjRH.AddPersonal(Codigo, ApellidoPaterno, ApellidoMaterno, Nombre, CorreoElectronico, FechaIn, CveTipoPeriodo, NumeroSS, CBool(AltaIMSS), SalarioDiario.ToDouble, SalarioDiario.ToDouble, SDI.ToDouble, SDI.ToDouble, If Not ObjRH.AddPersonal(Codigo, ApellidoPaterno, ApellidoMaterno, Nombre, CorreoElectronico, FechaIn, CveTipoPeriodo, NumeroSS, CBool(AltaIMSS), SalarioDiario.ToDouble, SalarioDiario.ToDouble, SDI.ToDouble, SDI.ToDouble,
-1, -1, -1, CveMetodoPago, FechaIn, FechaFn.ToString(), CveTipoContrato, Direccion, CveTurno, CvePuesto, CveDepartamento, -1, CveEscolaridad, CveEstadoCivil, CveGenero, -1, FechaBaja, CveEstatusPersonal, FechaNac, -1, -1, -1, CveMetodoPago, FechaIn, FechaFn.ToString(), CveTipoContrato, Direccion, CveTurno, CvePuesto, CveDepartamento, -1, CveEscolaridad, CveEstadoCivil, CveGenero, -1, FechaBaja, CveEstatusPersonal, FechaNac,
LugarNacimiento, Direccion, "", "", "", CodigoPostal, Ciudad, CveEstado, Telefono, "", Celular, RFC, CURP, "", NombrePadre, NombreMadre, -1, CveSATRiesgoPuesto, CveSATRegimenContratacion, -1, CveSubProyecto, "", -1, LugarNacimiento, Direccion, "", "", "", CodigoPostal, Ciudad, CveEstado, Telefono, "", Celular, RFC, CURP, "", NombrePadre, NombreMadre, -1, CveSATRiesgoPuesto, CveSATRegimenContratacion, -1, CveSubProyecto, "", -1,
ClabeInterbancaria, "", CveJornada, CveJornada, "", -1, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveUsuarioNomina, "", CveRegistroPatronal:=CveRegistroPatronal, CveTipoTrabajador:=CveTipoTrabajador) Then ClabeInterbancaria, "", CveJornada, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveUsuarioNomina, "", CveRegistroPatronal:=CveRegistroPatronal, CveTipoTrabajador:=CveTipoTrabajador) Then
If (ObjRH.noguardoXcurpb) Then If (ObjRH.noguardoXcurpb) Then
Else Else
ErrorRH = True ErrorRH = True

View File

@@ -259,7 +259,7 @@ Partial Class Inventarios_CatAlmacenes
If HdnModalidad.Value = "A" Then If HdnModalidad.Value = "A" Then
If ObjAlmacen.AddAlmacen(TxtAlmacen.Text.Trim, DdlTipoAlmacen.SelectedValue.ToEntero, CuentaContable, DdlModalidad.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, If ObjAlmacen.AddAlmacen(TxtAlmacen.Text.Trim, DdlTipoAlmacen.SelectedValue.ToEntero, DdlModalidad.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
CByte(DdlInventariable.SelectedValue), DdlSubProyecto.SelectedValue.ToEntero, TxtOrden.Text.ToEntero, CveCuenta, CveUsuarioAutoriza:=DdlUsuariosAutoriza.SelectedValue.ToEntero, CByte(DdlInventariable.SelectedValue), DdlSubProyecto.SelectedValue.ToEntero, TxtOrden.Text.ToEntero, CveCuenta, CveUsuarioAutoriza:=DdlUsuariosAutoriza.SelectedValue.ToEntero,
CveAlmacenVirtual:=DdlAlmacenesVirtuales.SelectedValue.ToEntero()) Then CveAlmacenVirtual:=DdlAlmacenesVirtuales.SelectedValue.ToEntero()) Then
Alert("El nuevo Almacen se guardó correctamente.", TipoMensaje.MsgInformacion) Alert("El nuevo Almacen se guardó correctamente.", TipoMensaje.MsgInformacion)
@@ -271,7 +271,7 @@ Partial Class Inventarios_CatAlmacenes
Else Else
TieneError = True TieneError = True
End If End If
ElseIf ObjAlmacen.UpdateAlmacen(TxtAlmacen.Text.Trim, DdlTipoAlmacen.SelectedValue.ToEntero, CuentaContable, DdlModalidad.SelectedValue.ToEntero, (CByte(Estatus)), HdnID.Value.ToEntero, CByte(DdlInventariable.SelectedValue), DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, TxtOrden.Text.ToEntero, CveCuenta, CveUsuarioAutoriza:=DdlUsuariosAutoriza.SelectedValue.ToEntero, CveAlmacenVirtual:=DdlAlmacenesVirtuales.SelectedValue.ToEntero) Then ElseIf ObjAlmacen.UpdateAlmacen(TxtAlmacen.Text.Trim, DdlTipoAlmacen.SelectedValue.ToEntero, DdlModalidad.SelectedValue.ToEntero, (CByte(Estatus)), HdnID.Value.ToEntero, CByte(DdlInventariable.SelectedValue), DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, TxtOrden.Text.ToEntero, CveCuenta, CveUsuarioAutoriza:=DdlUsuariosAutoriza.SelectedValue.ToEntero, CveAlmacenVirtual:=DdlAlmacenesVirtuales.SelectedValue.ToEntero) Then
Alert("El Almacen se actualizo correctamente.", TipoMensaje.MsgInformacion) Alert("El Almacen se actualizo correctamente.", TipoMensaje.MsgInformacion)
UpDatos.Update() UpDatos.Update()
ViewState("DTAlmacenes") = ObjAlmacen.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) ViewState("DTAlmacenes") = ObjAlmacen.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)

View File

@@ -2538,11 +2538,11 @@ Partial Class Clientes
Dim NombreCuentaCuentaAltaCompaq As String = "" Dim NombreCuentaCuentaAltaCompaq As String = ""
Dim IdCuentaAltaCompaq As Integer = -1 Dim IdCuentaAltaCompaq As Integer = -1
'Si tiene contabilizacion automatica y la funcionalidad de carga cuenta automatica o UsaAC le agregamos automaticamente una cuenta al cliente 'Si tiene contabilizacion automatica y la funcionalidad de carga cuenta automatica o UsaAC le agregamos automaticamente una cuenta al cliente
If UsuarioActual.Empresa.Funcionalidad(211).ToEntero() > 0 AndAlso (UsuarioActual.Empresa.Funcionalidad(200).ToEntero() > 0 Or UsuarioActual.Empresa.UsaAC) AndAlso DdlCtaContableClientes.SelectedValue.ToEntero() < 1 Then 'If UsuarioActual.Empresa.Funcionalidad(211).ToEntero() > 0 AndAlso (UsuarioActual.Empresa.Funcionalidad(200).ToEntero() > 0 Or UsuarioActual.Empresa.UsaAC) AndAlso DdlCtaContableClientes.SelectedValue.ToEntero() < 1 Then
If Not AgregarCuentaContable(BtnActivaRegistroClientes, DdlCtaContableClientes, CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq) Then ' If Not AgregarCuentaContable(BtnActivaRegistroClientes, DdlCtaContableClientes, CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq) Then
ErrorProceso = True ' ErrorProceso = True
End If ' End If
End If 'End If
'Dim MetodoPago = DdlMetodoPago.SelectedValue.Toentero() 'Dim MetodoPago = DdlMetodoPago.SelectedValue.Toentero()
'If UsuarioActual.Empresa.CvePlataforma = 3 Then 'If UsuarioActual.Empresa.CvePlataforma = 3 Then
@@ -2612,12 +2612,11 @@ Partial Class Clientes
End If End If
End If End If
'If IdCuentaAltaCompaq > 0 Then
If IdCuentaAltaCompaq > 0 Then ' If Not AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq, 1, ObjClientes.IniciaTransacSQL) Then
If Not AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq, 1, ObjClientes.IniciaTransacSQL) Then ' ErrorProceso = True
ErrorProceso = True ' End If
End If 'End If
End If
If ErrorProceso Then If ErrorProceso Then
ObjClientes.RollBack() ObjClientes.RollBack()
@@ -2638,7 +2637,6 @@ Partial Class Clientes
End If End If
End If End If
Else Else
Dim NombreCliente As String = "" Dim NombreCliente As String = ""
If TxtRFC.Text.Length = 13 AndAlso TxtApellidoPaterno.Text <> "" AndAlso TxtApellidoMaterno.Text <> "" AndAlso TxtNombres.Text <> "" Then If TxtRFC.Text.Length = 13 AndAlso TxtApellidoPaterno.Text <> "" AndAlso TxtApellidoMaterno.Text <> "" AndAlso TxtNombres.Text <> "" Then
@@ -2672,7 +2670,6 @@ Partial Class Clientes
ObjClientes.AddClienteImpuestosLocales(CveCliente, GVR.DataKey("CveImpuestoLocal").ToEntero()) ObjClientes.AddClienteImpuestosLocales(CveCliente, GVR.DataKey("CveImpuestoLocal").ToEntero())
End If End If
Next Next
GuardarDocumentosClientes() GuardarDocumentosClientes()
'For Each gvr As GridViewRow In GvDocsVentas.Rows 'For Each gvr As GridViewRow In GvDocsVentas.Rows
@@ -2753,18 +2750,13 @@ Partial Class Clientes
#Region "G L O B L A L" #Region "G L O B L A L"
Private Sub RecargaGlobal() Private Sub RecargaGlobal()
'Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDT)
'Hilo.Start()
GeneraGlobalDT() GeneraGlobalDT()
End Sub End Sub
Private Sub GeneraGlobalDT() Private Sub GeneraGlobalDT()
GlobalDTCliente(UsuarioActual.CveEmpresa) = Nothing GlobalDTCliente(UsuarioActual.CveEmpresa) = Nothing
'Dim Objclientes As New ClsClientes
'If Objclientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, -1, Estatus:=-1) Then
' Application("GlobalDTCliente") = Objclientes.DtResultados
'End If
'Objclientes.Dispose()
End Sub End Sub
#End Region #End Region
@@ -3701,147 +3693,147 @@ Partial Class Clientes
End Sub End Sub
Public Sub BtnAgregaCuentaContable(sender As Object, e As EventArgs) Handles BtnActivaRegistroClientes.Click, BtnActivaRegistroAnticipos.Click, BtnActivaRegistroIVA.Click, BtnActivaRegistroISR.Click Public Sub BtnAgregaCuentaContable(sender As Object, e As EventArgs) Handles BtnActivaRegistroClientes.Click, BtnActivaRegistroAnticipos.Click, BtnActivaRegistroIVA.Click, BtnActivaRegistroISR.Click
Dim CuentaContable = DirectCast(sender, Button).CommandArgument.ToString() 'Dim CuentaContable = DirectCast(sender, Button).CommandArgument.ToString()
Dim Button = DirectCast(sender, Button) 'Dim Button = DirectCast(sender, Button)
Dim CodigoCuentaAltaCompaq As String = "" 'Dim CodigoCuentaAltaCompaq As String = ""
Dim NombreCuentaCuentaAltaCompaq As String = "" 'Dim NombreCuentaCuentaAltaCompaq As String = ""
Dim IdCuentaAltaCompaq As Integer = -1 'Dim IdCuentaAltaCompaq As Integer = -1
Select Case CuentaContable 'Select Case CuentaContable
Case "Clientes" ' Case "Clientes"
AgregarCuentaContable(Button, DdlCtaContableClientes, "", "", -1) ' AgregarCuentaContable(Button, DdlCtaContableClientes, "", "", -1)
Case "Anticipos" ' Case "Anticipos"
AgregarCuentaContable(Button, DdlCtaContableAnticipos, CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq) ' AgregarCuentaContable(Button, DdlCtaContableAnticipos, CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq)
AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq, 3) ' AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq, 3)
Case "RetIVA" ' Case "RetIVA"
AgregarCuentaContable(Button, DdlCtaContableRetIVA, "", "", -1) ' AgregarCuentaContable(Button, DdlCtaContableRetIVA, "", "", -1)
Case "RetISR" ' Case "RetISR"
AgregarCuentaContable(Button, DdlCtaContableRetISR, "", "", -1) ' AgregarCuentaContable(Button, DdlCtaContableRetISR, "", "", -1)
End Select 'End Select
End Sub End Sub
Private Function AgregarCuentaContable(btn As Button, ddl As DropDownList, ByRef CodigoCuentaAltaCompaq As String, ByRef NombreCuentaCuentaAltaCompaq As String, ByRef IdCuentaAltaCompaq As Integer) As Boolean 'Private Function AgregarCuentaContable(btn As Button, ddl As DropDownList, ByRef CodigoCuentaAltaCompaq As String, ByRef NombreCuentaCuentaAltaCompaq As String, ByRef IdCuentaAltaCompaq As Integer) As Boolean
Dim IdCuentaContable As Integer = -1 ' Dim IdCuentaContable As Integer = -1
Dim CtaCodigo As String = "" ' Dim CtaCodigo As String = ""
Dim TieneError = False ' Dim TieneError = False
Dim ProcesoCorrecto As Boolean ' Dim ProcesoCorrecto As Boolean
Dim ObjContaAC As New ClsContPAQi(UsuarioActual.Empresa) ' Dim ObjContaAC As New ClsContPAQi(UsuarioActual.Empresa)
ObjContaAC.IniciaTransacSQL() ' ObjContaAC.IniciaTransacSQL()
Dim CuentaPadre = -1 ' Dim CuentaPadre = -1
Select Case btn.CommandArgument.ToString() ' Select Case btn.CommandArgument.ToString()
Case "Clientes" ' Case "Clientes"
CuentaPadre = UsuarioActual.Empresa.Funcionalidad(211).ToEntero() ' CuentaPadre = UsuarioActual.Empresa.Funcionalidad(211).ToEntero()
Case "Anticipos" ' Case "Anticipos"
CuentaPadre = UsuarioActual.Empresa.Funcionalidad(212).ToEntero() ' CuentaPadre = UsuarioActual.Empresa.Funcionalidad(212).ToEntero()
Case "RetIVA" ' Case "RetIVA"
CuentaPadre = UsuarioActual.Empresa.Funcionalidad(213).ToEntero() ' CuentaPadre = UsuarioActual.Empresa.Funcionalidad(213).ToEntero()
Case "RetISR" ' Case "RetISR"
CuentaPadre = UsuarioActual.Empresa.Funcionalidad(214).ToEntero() ' CuentaPadre = UsuarioActual.Empresa.Funcionalidad(214).ToEntero()
End Select ' End Select
'SI EL NOMBRE DEL PROVEEDOR ES MAYOR DE 50 LO CORTAMOS ' 'SI EL NOMBRE DEL PROVEEDOR ES MAYOR DE 50 LO CORTAMOS
Dim NombreCuenta = If(TxtNombreComercial.Text.Trim.Length > 50, TxtNombreComercial.Text.Trim.Substring(0, 50), TxtNombreComercial.Text.Trim) ' Dim NombreCuenta = If(TxtNombreComercial.Text.Trim.Length > 50, TxtNombreComercial.Text.Trim.Substring(0, 50), TxtNombreComercial.Text.Trim)
IdCuentaContable = ObjContaAC.AddSiguienteCuentaHijo(CuentaPadre, NombreCuenta, Tipo:="A", CuentaMayor:=2) ' IdCuentaContable = ObjContaAC.AddSiguienteCuentaHijo(CuentaPadre, NombreCuenta, Tipo:="A", CuentaMayor:=2)
NombreCuentaCuentaAltaCompaq = NombreCuenta ' NombreCuentaCuentaAltaCompaq = NombreCuenta
IdCuentaAltaCompaq = IdCuentaContable ' IdCuentaAltaCompaq = IdCuentaContable
If IdCuentaContable > 0 Then ' If IdCuentaContable > 0 Then
ObjContaAC.GetCuentas(IdCuentaContable, "-1", -1) ' ObjContaAC.GetCuentas(IdCuentaContable, "-1", -1)
Dim dt = ObjContaAC.DtResultados ' Dim dt = ObjContaAC.DtResultados
If dt.Rows.Count = 1 Then ' If dt.Rows.Count = 1 Then
Dim row As DataRow = dt.Rows(0) ' Dim row As DataRow = dt.Rows(0)
CtaCodigo = CStr(row("CtaCodigo")) ' CtaCodigo = CStr(row("CtaCodigo"))
CodigoCuentaAltaCompaq = CStr(row("Codigo")) ' CodigoCuentaAltaCompaq = CStr(row("Codigo"))
Else ' Else
TieneError = True ' TieneError = True
End If ' End If
Else ' Else
TieneError = True ' TieneError = True
End If ' End If
If Not TieneError Then ' If Not TieneError Then
ObjContaAC.Commit() ' ObjContaAC.Commit()
'Alert(String.Format("Se registo la Cuenta Contable: {0}", CtaCodigo, TipoMensaje.MsgInformacion)) ' 'Alert(String.Format("Se registo la Cuenta Contable: {0}", CtaCodigo, TipoMensaje.MsgInformacion))
ddl.Items.Add(New ListItem(CtaCodigo, IdCuentaContable.ToString())) : ddl.SelectedValueExist(IdCuentaContable.ToString()) ' ddl.Items.Add(New ListItem(CtaCodigo, IdCuentaContable.ToString())) : ddl.SelectedValueExist(IdCuentaContable.ToString())
btn.Visible = False ' btn.Visible = False
ddl.Width = 206 ' ddl.Width = 206
ProcesoCorrecto = True ' ProcesoCorrecto = True
Else ' Else
ObjContaAC.RollBack() ' ObjContaAC.RollBack()
Alert("error", TipoMensaje.MsgError) ' Alert("error", TipoMensaje.MsgError)
ProcesoCorrecto = False ' ProcesoCorrecto = False
End If ' End If
ObjContaAC.Dispose() ' ObjContaAC.Dispose()
UpFiscalContable.Update() ' UpFiscalContable.Update()
Return ProcesoCorrecto ' Return ProcesoCorrecto
End Function 'End Function
Private Function AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq As String, NombreCuentaCuentaAltaCompaq As String, IdCuentaAltaCompaq As Integer, CveConceptoContable As Integer, Optional Transaccion As SqlTransaction = Nothing) As Boolean 'Private Function AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq As String, NombreCuentaCuentaAltaCompaq As String, IdCuentaAltaCompaq As Integer, CveConceptoContable As Integer, Optional Transaccion As SqlTransaction = Nothing) As Boolean
Dim Respuesta As Boolean = False ' Dim Respuesta As Boolean = False
Dim DisposeClases As Boolean = False ' Dim DisposeClases As Boolean = False
Dim ObjContabilidad As ClsContabilidad ' Dim ObjContabilidad As ClsContabilidad
If Transaccion Is Nothing Then ' If Transaccion Is Nothing Then
ObjContabilidad = New ClsContabilidad ' ObjContabilidad = New ClsContabilidad
DisposeClases = True ' DisposeClases = True
Else ' Else
ObjContabilidad = New ClsContabilidad(Transaccion) ' ObjContabilidad = New ClsContabilidad(Transaccion)
DisposeClases = False ' DisposeClases = False
End If ' End If
If UsuarioActual.CveEmpresa.Contiene(7, 11, 145, 122) Then ' If UsuarioActual.CveEmpresa.Contiene(7, 11, 145, 122) Then
Dim CvePadre As Integer = GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCuenta", $"IdCompaq = {UsuarioActual.Empresa.Funcionalidad(211).ToEntero()}").ToEntero ' Dim CvePadre As Integer = GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCuenta", $"IdCompaq = {UsuarioActual.Empresa.Funcionalidad(211).ToEntero()}").ToEntero
'If ObjContabilidad.GetCuentasGlobales(UsuarioActual.CveEmpresa, 1) Then ' 'If ObjContabilidad.GetCuentasGlobales(UsuarioActual.CveEmpresa, 1) Then
' Dim CvePadre As Integer = ObjContabilidad.DtResultados.FiltroPrimeroValor("CveCuenta").ToEntero ' ' Dim CvePadre As Integer = ObjContabilidad.DtResultados.FiltroPrimeroValor("CveCuenta").ToEntero
If CvePadre > 0 Then ' If CvePadre > 0 Then
Dim CvecuentaNueva As Integer = ObjContabilidad.AddCuenta(CvePadre, CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, "A", 2, 1, CveCliente:=CveCliente, IdCompaq:=IdCuentaAltaCompaq) ' Dim CvecuentaNueva As Integer = ObjContabilidad.AddCuenta(CvePadre, CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, "A", 2, 1, CveCliente:=CveCliente, IdCompaq:=IdCuentaAltaCompaq)
If CvecuentaNueva > 0 Then ' If CvecuentaNueva > 0 Then
If ObjContabilidad.AddCuentasAsignaciones(CveConceptoContable, UsuarioActual.CveEmpresa, CvecuentaNueva, CveCliente:=CveCliente, PorcentajeIVA:=0) Then ' If ObjContabilidad.AddCuentasAsignaciones(CveConceptoContable, UsuarioActual.CveEmpresa, CvecuentaNueva, CveCliente:=CveCliente, PorcentajeIVA:=0) Then
Respuesta = True ' Respuesta = True
End If ' End If
End If ' End If
End If ' End If
'End If ' 'End If
Else ' Else
Respuesta = True ' Respuesta = True
End If ' End If
If DisposeClases Then ' If DisposeClases Then
ObjContabilidad.Dispose() ' ObjContabilidad.Dispose()
If Not Respuesta Then ' If Not Respuesta Then
Alert("Se presento un error al agregar y asignar la cuenta (Conta SIG).", TipoMensaje.MsgAdvertencia) ' Alert("Se presento un error al agregar y asignar la cuenta (Conta SIG).", TipoMensaje.MsgAdvertencia)
End If ' End If
End If ' End If
Return Respuesta ' Return Respuesta
End Function 'End Function
#End Region #End Region

View File

@@ -8464,11 +8464,8 @@ Partial Class PV
DVRegimenSociedad.Visible = False DVRegimenSociedad.Visible = False
DivRazonSocial2.Attributes.Add("class", "col-md-12") DivRazonSocial2.Attributes.Add("class", "col-md-12")
DivRazonSocial2.Attributes.Add("class", "col-md-8")
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then DVRegimenSociedad.Visible = True
DivRazonSocial2.Attributes.Add("class", "col-md-8")
DVRegimenSociedad.Visible = True
If TxtRFCCliente.Text.ToUpper = "XAXX010101000" Then If TxtRFCCliente.Text.ToUpper = "XAXX010101000" Then
DdlRegimenFiscalCliente.DataSource = GlobalDTRegimenesFiscales().FiltraParametros("CveRegimenFiscal = 11") DdlRegimenFiscalCliente.DataSource = GlobalDTRegimenesFiscales().FiltraParametros("CveRegimenFiscal = 11")
@@ -8497,14 +8494,7 @@ Partial Class PV
DdlUsoCFDICliente.Items.Clear() DdlUsoCFDICliente.Items.Clear()
DdlUsoCFDICliente.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlUsoCFDICliente.Items.Insert(0, New ListItem("Seleccione", "-1"))
End If
MuestraOcultaGenero() MuestraOcultaGenero()
UpAgregarCliente.Update() UpAgregarCliente.Update()
End Sub End Sub

View File

@@ -79,10 +79,8 @@ Partial Class Ventas_RepProductosServiciosDetalle
CargaParametrosDetalle() CargaParametrosDetalle()
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
LblServicioDomicilioFiltro.Visible = True LblServicioDomicilioFiltro.Visible = True
DVServicioDomicilio.Visible = True DVServicioDomicilio.Visible = True
End If End If
If UsuarioActual.CveEmpresa.Contiene(7, 122) Then If UsuarioActual.CveEmpresa.Contiene(7, 122) Then
@@ -772,20 +770,12 @@ Partial Class Ventas_RepProductosServiciosDetalle
Private Sub BtnDescargarPDF_Click(sender As Object, e As EventArgs) Handles BtnDescargarZipPDF.Click Private Sub BtnDescargarPDF_Click(sender As Object, e As EventArgs) Handles BtnDescargarZipPDF.Click
'If Not Directory.Exists(AppDomain.CurrentDomain.BaseDirectory & "Temp\" & UsuarioActual.CveUsuario.ToString & "\") Then
' Directory.CreateDirectory(AppDomain.CurrentDomain.BaseDirectory & "Temp\" & UsuarioActual.CveUsuario.ToString & "\")
'End If
Dim Archivo As String = String.Empty Dim Archivo As String = String.Empty
Dim HuboInexistentes As Boolean = False Dim HuboInexistentes As Boolean = False
Dim SBInexistentes As New StringBuilder : SBInexistentes.Append("No se pudieron anexar los siguientes archivos:<br />") Dim SBInexistentes As New StringBuilder : SBInexistentes.Append("No se pudieron anexar los siguientes archivos:<br />")
Dim ArchivoDestino As String = String.Format("{0}Temp\{1}.zip", AppDomain.CurrentDomain.BaseDirectory, Now.ToString("yyyyMMddhhmmss") & UsuarioActual.CveUsuario.ToString) Dim ArchivoDestino As String = String.Format("{0}Temp\{1}.zip", AppDomain.CurrentDomain.BaseDirectory, Now.ToString("yyyyMMddhhmmss") & UsuarioActual.CveUsuario.ToString)
Dim archiveZip As ZipArchive = ZipFile.Open(ArchivoDestino, ZipArchiveMode.Create) Dim archiveZip As ZipArchive = ZipFile.Open(ArchivoDestino, ZipArchiveMode.Create)
Dim DTVentas As DataTable = TmpDT.FiltraParametros("", "", {"CveVenta", "TipoDocumento", "Folio", "SerieFolio"}) Dim DTVentas As DataTable = TmpDT.FiltraParametros("", "", {"CveVenta", "TipoDocumento", "Folio", "SerieFolio"})
Try Try
@@ -797,10 +787,8 @@ Partial Class Ventas_RepProductosServiciosDetalle
If Drow("TipoDocumento").ToString.Trim <> String.Empty Then If Drow("TipoDocumento").ToString.Trim <> String.Empty Then
Archivo = String.Format("{0}PDF/{1}/{2}.pdf", UsuarioActual.Empresa.Ruta.Replace("\", "/"), Drow("TipoDocumento").ToString, Drow("SerieFolio").ToString) Archivo = String.Format("{0}PDF/{1}/{2}.pdf", UsuarioActual.Empresa.Ruta.Replace("\", "/"), Drow("TipoDocumento").ToString, Drow("SerieFolio").ToString)
If File.Exists(Archivo) Then If File.Exists(Archivo) Then
archiveZip.CreateEntryFromFile(Archivo, Drow("SerieFolio").ToString & ".pdf") archiveZip.CreateEntryFromFile(Archivo, Drow("SerieFolio").ToString & ".pdf")
If UsuarioActual.CveRol = 1 OrElse UsuarioActual.CveEmpresa = 119 Then
If UsuarioActual.CveRol = 1 Then
Archivo = String.Format("{0}XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta.Replace("\", "/"), Drow("TipoDocumento").ToString, Drow("SerieFolio").ToString) Archivo = String.Format("{0}XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta.Replace("\", "/"), Drow("TipoDocumento").ToString, Drow("SerieFolio").ToString)
If File.Exists(Archivo) Then If File.Exists(Archivo) Then
archiveZip.CreateEntryFromFile(Archivo, Drow("SerieFolio").ToString & ".xml") archiveZip.CreateEntryFromFile(Archivo, Drow("SerieFolio").ToString & ".xml")
@@ -810,7 +798,6 @@ Partial Class Ventas_RepProductosServiciosDetalle
SBInexistentes.AppendFormat("Tipo {0}, Folio {1} - {2}<br />", Drow("TipoDocumento").ToString, SerieFolio, Archivo) SBInexistentes.AppendFormat("Tipo {0}, Folio {1} - {2}<br />", Drow("TipoDocumento").ToString, SerieFolio, Archivo)
End If End If
End If End If
Else Else
HuboInexistentes = True HuboInexistentes = True
SBInexistentes.AppendFormat("Tipo {0}, Folio {1} - {2}<br />", Drow("TipoDocumento").ToString, SerieFolio, Archivo) SBInexistentes.AppendFormat("Tipo {0}, Folio {1} - {2}<br />", Drow("TipoDocumento").ToString, SerieFolio, Archivo)
@@ -818,14 +805,11 @@ Partial Class Ventas_RepProductosServiciosDetalle
End If End If
Next Next
Catch ex As Exception Catch ex As Exception
End Try End Try
archiveZip.Dispose() archiveZip.Dispose()
Response.Clear() Response.Clear()
Response.ContentType = "application/zip" Response.ContentType = "application/zip"
Response.AddHeader("content-disposition", $"attachment; filename=facturas{Now.ToString("yyyyMMddhhmmss")}.zip") Response.AddHeader("content-disposition", $"attachment; filename=facturas{Now.ToString("yyyyMMddhhmmss")}.zip")