| Usuarios con acceso a la cuenta |
@@ -398,12 +398,16 @@
-
+
+
+
+
+ ()
+
+
-
- <%----%>
+
-
diff --git a/Bancos/CuentasBancariasDetalle.aspx.vb b/Bancos/CuentasBancariasDetalle.aspx.vb
index b8a934923..5aee71c2e 100644
--- a/Bancos/CuentasBancariasDetalle.aspx.vb
+++ b/Bancos/CuentasBancariasDetalle.aspx.vb
@@ -478,8 +478,12 @@ Partial Class Bancos_CuentasBancariasDetalle
For Each row As DataRow In DTUsuarios.Rows
sUsuarios = $"{sUsuarios} {row("CveUsuario").ToString},"
Next
- If sUsuarios <> "" Then
- DdlUsuarios.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros($"CveUsuario NOT IN ({sUsuarios.Substring(0, sUsuarios.Length - 1)})", "Nombre")
+ If sUsuarios <> "" Then
+
+ ' Dim tablaUsuariosAux As DataTable = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("", "Nombre", DistinctColumns:={"CveUsuario", "Nombre", "Usuario"})
+ Dim tablaUsuariosAux As DataTable = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros($"CveUsuario NOT IN ({sUsuarios.Substring(0, sUsuarios.Length - 1)})", "Nombre")
+ DdlUsuarios.DataSource = CargarDdlUsuarios(tablaUsuariosAux)
+ 'DdlUsuarios.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros($"CveUsuario NOT IN ({sUsuarios.Substring(0, sUsuarios.Length - 1)})", "Nombre")
DdlUsuarios.DataBind()
End If
End Sub
diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx
index 0b3a38715..3bebf5677 100644
--- a/Bancos/DepositosCaja.aspx
+++ b/Bancos/DepositosCaja.aspx
@@ -219,111 +219,147 @@
-
+
+
-
-
-
-
+
+
+
+
-
+
+
-
+
+
-
-
+
-
-
-
+
+
-
-
-
-
-
-
+
-
+
+
-
@@ -671,13 +707,13 @@
function CheckFaltante(chk) {
if (chk.checked == true) {
- $('#DivComision').css("display", "block");
+ $('.DivComision').css("display", "block");
$('#DivComisioncheck').removeClass("truncate");
$("#DivDescuentocheck").css("margin-top", 0);
} else {
$('#C_TxtComision').val(0);
Recalcular();
- $('#DivComision').css("display", "none");
+ $('.DivComision').css("display", "none");
$('#DivComisioncheck').addClass("truncate");
$("#DivDescuentocheck").css("margin-top", -25);
@@ -687,7 +723,7 @@
function CheckDescuento(chk) {
if (chk.checked == true) {
- $('#DivDescuento').css("display", "block");
+ $('.DivDescuento').css("display", "block");
$('#DivDescuentocheck').removeClass("truncate");
$("#DivIntercheck").css("margin-top", 0);
@@ -695,7 +731,7 @@
} else {
$('#C_TxtDescuento').val(0);
Recalcular();
- $('#DivDescuento').css("display", "none");
+ $('.DivDescuento').css("display", "none");
$('#DivDescuentocheck').addClass("truncate");
$("#DivIntercheck").css("margin-top", -25);
@@ -719,13 +755,13 @@
}
function CheckRowCuenta(chk) {
if (chk.checked == true) {
- $('#DivRowCuenta2').css("display", "block");
+ $('.DivRowCuenta2').css("display", "block");
$('#DivRowCuenta').removeClass("truncate");
} else {
Recalcular();
- $('#DivRowCuenta2').css("display", "none");
+ $('.DivRowCuenta2').css("display", "none");
$('#DivRowCuenta').addClass("truncate");
}
}
diff --git a/Empresas/Grales/SaldosIniciales/FormatoClientes.xlsx b/Empresas/Grales/SaldosIniciales/FormatoClientes.xlsx
index 2b681f06a..e86d7a992 100644
Binary files a/Empresas/Grales/SaldosIniciales/FormatoClientes.xlsx and b/Empresas/Grales/SaldosIniciales/FormatoClientes.xlsx differ
diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb
index b04588b00..77cbe83d7 100644
--- a/General/SaldosIniciales.aspx.vb
+++ b/General/SaldosIniciales.aspx.vb
@@ -1316,6 +1316,7 @@ Partial Class General_SaldosIniciales
Dim ErrorClientes As Boolean = False
Dim ExisteCliente As Boolean = False
Dim Contador As Integer = 0
+ Dim CountRFCGenerico As Integer = 0
Dim NumRow As Integer = 0
@@ -1376,7 +1377,17 @@ Partial Class General_SaldosIniciales
Dim Vendedor As String = If(dt.Columns.Contains("Vendedor"), Row("Vendedor").ToString(), "").Trim
Dim Clasificacion As String = If(dt.Columns.Contains("ClasificacionCliente"), Row("ClasificacionCliente").ToString(), "").Trim
- Dim CveCliente As Integer = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCliente", $"RFC = '{RFC}'").ToString().ToEntero()
+
+ Dim CveCliente As Integer = -1 'GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCliente", $"RFC = '{RFC}'").ToString().ToEntero()
+
+ Dim EsRFCGenerico As Boolean = If(RFC.ToUpper = "XAXX010101000" Or RFC.ToUpper = "XEXX010101000" Or RFC.ToUpper = "AAA010101AAA", True, False)
+
+ 'If CveCliente <= 0 And Not EsRFCGenerico Then
+ ' If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa:=UsuarioActual.CveEmpresa, Estatus:=-1) Then
+ ' CveCliente = ObjClientes.DtResultados.Copy().FiltroPrimeroValor("CveCliente", $"RFC = '{RFC}'").ToString().ToEntero()
+ ' End If
+ 'End If
+
Dim CveVendedor As Integer = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveVendedor", $"Vendedor = '{Vendedor}'").ToString().ToEntero()
Dim CveClasificación As Integer = GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClienteClasificacion", $"ClienteClasificacion = '{Clasificacion}'").ToEntero()
@@ -1400,6 +1411,8 @@ Partial Class General_SaldosIniciales
Dim CveRegimenFiscal As Integer = 0
Dim TipoPersona As Boolean = If(RFC.Length = 12, True, False)
+
+
If CodigoRegimenFiscal.Trim.Length > 0 Then
CveRegimenFiscal = GlobalDTRegimenesFiscales.FiltroPrimeroValor("CveRegimenFiscal", $"CodigoRegimenFiscal= '{CodigoRegimenFiscal}' ").ToEntero()
If Not CveRegimenFiscal > 0 Then
@@ -1500,10 +1513,57 @@ Partial Class General_SaldosIniciales
'Contacto
If CveCliente > 0 Then
+
ExisteCliente = True
- Contador = Contador + 1
+
+ 'PermiteCredito As Boolean, CveSubProyecto As Integer, CveClienteCorporativo As Integer,
+
+ Dim CveSATEstado As Integer = GlobalDTGralEstados("-1").FiltroPrimeroValor("CveSATEstado", String.Format(" NombreEstado ='{0}'", Estado.ToUpper)).ToEntero()
+ CveSATEstado = If(CveSATEstado > 0, CveSATEstado, -1)
+ Dim PermiteCredito As Boolean = If(LimiteCredito > 0, True, False)
+
+
+
+ If EsRFCGenerico Then
+ CountRFCGenerico = CountRFCGenerico + 1
+ End If
+
+ Codigo = If(Codigo.Trim.Length = 0, "-1", Codigo)
+
+ If Not EsRFCGenerico AndAlso Not ObjClientes.UpdateCliente(RazonSocial, RazonSocial, Calle, NumExt.ToString(), NumInt, Colonia, Poblacion, Poblacion, Estado, Pais, RFC, CodigoPostal, Telefono, Contacto, Correo,
+ "-1", "-1", Pagina, "-1", -1, False, -1, -1, False, True, "-1", CveVendedor, PlazoCobranza, -1,
+ "-1", "-1", "-1", Codigo, LimiteCredito, False, "-1", "-1", "-1", False, "-1", "-1", "-1", "-1", "-1", False, "-1", UsuarioActual.CveUsuario, CveCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
+ "-1", "-1", PermiteCredito, -1, -1, EsDistribuidor:=EsDistribuidor, CveClienteClasificacion:=CveClasificación, CargoUsado:=CargoUsado,
+ BonificacionUsado:=BonificacionUsado, CobranzaContacto:=CobranzaContacto, CobranzaCorreo:=CobranzaCorreo, DiasEspecifico:=DiasPagoEspecifico, DiasRevision:=DìaVisita, CobranzaTelefono:=CobranzaTelefono, CveFormaPago:=CveFormaPago33, CveUsoCFDI:=CveUsoCFDI, CveSATEstado:=CveSATEstado, CveAdminTrayecto:=0,
+ RegimenSociedad:=RegimenSociedad, CveRegimenFiscal:=CveRegimenFiscal, TipoPersona:=TipoPersona) Then
+
+ ErrorClientes = True
+ RFC.GuardaLog
+ Exit For
+ Else
+ If EsRFCGenerico Then
+ CountRFCGenerico = CountRFCGenerico + 1
+ Else
+ Contador = Contador + 1
+ End If
+ End If
+
+ If CveCuentaContable > 0 Then
+
+ Dim ObjConta As New ClsContabilidad(ObjClientes.IniciaTransacSQL)
+
+ If Not ObjConta.AddCuentasAsignaciones(1, UsuarioActual.CveEmpresa, CveCuentaContable,
+ -1, ObjClientes.CveCliente, -1, -1, -1, 0, CveBancoCuenta:=-1, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=-1,
+ CveTipoGasto:=-1, RegeneraCuenta:=False) Then
+ ErrorClientes = True
+ End If
+ End If
+
+
+
Else
Dim CveSATEstado As Integer = GlobalDTGralEstados("-1").FiltroPrimeroValor("CveSATEstado", String.Format(" NombreEstado ='{0}'", Estado.ToUpper)).ToEntero()
+ CveSATEstado = If(CveSATEstado > 0, CveSATEstado, 26)
If Not ObjClientes.AddCliente(RazonSocial, RazonSocial, Calle, NumExt.ToString(), NumInt, Colonia, Poblacion, Poblacion, Estado, Pais, RFC, CodigoPostal, Telefono, Contacto, Correo, "", "", Pagina, "", -1, False, 0, 0, False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", CveVendedor, PlazoCobranza, -1,
"-1", "-1", "-1", Codigo, LimiteCredito, False, "", "", "", False, "", "", "", "", "", False, "", "", "", False, 0, -1, EsDistribuidor:=EsDistribuidor, CveClienteClasificacion:=CveClasificación, CargoUsado:=CargoUsado,
@@ -1513,6 +1573,8 @@ Partial Class General_SaldosIniciales
ErrorClientes = True
RFC.GuardaLog
Exit For
+ Else
+ GlobalDTCliente(UsuarioActual.CveEmpresa) = Nothing
End If
If CveCuentaContable > 0 Then
@@ -1533,7 +1595,7 @@ Partial Class General_SaldosIniciales
'If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, -1) Then Application("GlobalDTCliente") = ObjClientes.DtResultados
GlobalDTCliente(UsuarioActual.CveEmpresa) = Nothing
If Contador > 0 Then
- Alert(String.Format("Se agregaron: {0} Clientes correctamente. Se Omitieron: {1} Clientes ya que ya se encontraban registrados.", NumRows - Contador, Contador), TipoMensaje.MsgInformacion)
+ Alert(String.Format("Se agregaron: {0} Clientes correctamente. Se Omitieron: {1} Clientes ya que ya se encontraban registrados. RFC Genericos Omitidos {2}", NumRows - Contador, Contador, CountRFCGenerico), TipoMensaje.MsgInformacion)
Else
Alert(String.Format("Se agregaron: {0} Clientes correctamente.", NumRows), TipoMensaje.MsgInformacion)
End If
diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb
index b227f33e8..d68c92804 100644
--- a/Ventas/Clientes.aspx.vb
+++ b/Ventas/Clientes.aspx.vb
@@ -1527,7 +1527,9 @@ Partial Class Clientes
TxtRetISR.Text = ObjClientes.RetISR.ToString()
ChkRetIVAFletesAcarreos.Checked = ObjClientes.RetieneIVAFletes
If ObjClientes.CveSubProyecto > 0 Then
- DdlSubProyecto.SelectedValueExistInsert(ObjClientes.CveSubProyecto.ToString(), GlobalDTSubProyectos(UsuarioActual.CveEmpresa, CveSubProyecto:=ObjClientes.CveSubProyecto).FiltroPrimeroValor("SubProyecto"))
+ DdlSubProyecto.SelectedValueExistInsert(ObjClientes.CveSubProyecto.ToString(), GlobalDTSubProyectos(UsuarioActual.CveEmpresa, CveSubProyecto:=ObjClientes.CveSubProyecto).FiltroPrimeroValor("SubProyecto"))
+ ElseIf UsuarioActual.CveSubProyecto > 0 Then
+ DdlSubProyecto.SelectedValueExistInsert(UsuarioActual.CveSubProyecto, GlobalDTSubProyectos(UsuarioActual.CveEmpresa, CveSubProyecto:=UsuarioActual.CveSubProyecto).FiltroPrimeroValor("SubProyecto"))
End If
TxtGastosEnvio.Text = ObjClientes.GastosEnvio.FormatoNumero
DdlZonaHoraria.SelectedValueExist(ObjClientes.DtResultados(0)("CveZonaHoraria").ToString())
|