From a17bed5c8bb62600c760dfaaa3f74edbf77c6ccd Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 31 May 2023 02:32:07 -0700 Subject: [PATCH 01/20] - --- Contabilidad/RegPrePolizaS.aspx | 46 +++++---------------------------- 1 file changed, 7 insertions(+), 39 deletions(-) diff --git a/Contabilidad/RegPrePolizaS.aspx b/Contabilidad/RegPrePolizaS.aspx index 4ba7be742..26240fae6 100644 --- a/Contabilidad/RegPrePolizaS.aspx +++ b/Contabilidad/RegPrePolizaS.aspx @@ -107,14 +107,11 @@ - -
- -
+
@@ -127,13 +124,8 @@
- -
- -
-
@@ -147,9 +139,7 @@ -
-
@@ -168,16 +158,10 @@ - - -
-
- -
@@ -188,13 +172,10 @@
-
- - -
+
@@ -232,17 +213,13 @@
- -
-
Si
-
@@ -258,11 +235,8 @@ -
-
- - +
@@ -290,7 +264,6 @@ - @@ -526,8 +499,9 @@ TC -
+
+
Cargo @@ -555,17 +529,11 @@ - - - - - - - + - + From c85e79ca3ac503bf73c586c7fcb86714b4443b30 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 31 May 2023 14:33:40 -0700 Subject: [PATCH 02/20] -- acomodo visual --- Inventarios/InventarioFisico.aspx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Inventarios/InventarioFisico.aspx b/Inventarios/InventarioFisico.aspx index 25fb1c7ac..ab41787cf 100644 --- a/Inventarios/InventarioFisico.aspx +++ b/Inventarios/InventarioFisico.aspx @@ -155,13 +155,13 @@
- SubProyecto: + SubProyecto:
- + Almacen:
From 7a14dec8153b3e844341d3d8773d421a6a08a552 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 31 May 2023 14:33:58 -0700 Subject: [PATCH 03/20] =?UTF-8?q?--=20mejora=20en=20manejo=20de=20garant?= =?UTF-8?q?=C3=ADas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/Compras.aspx | 10 +--------- Compras/Compras.aspx.vb | 26 +++++++------------------- 2 files changed, 8 insertions(+), 28 deletions(-) diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index 8ff5dbd78..43b15033c 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -4485,15 +4485,7 @@
-
-
-
- - - - -
-
+

diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index dc0f5f61a..1df16acb0 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -10561,7 +10561,7 @@ Partial Class Compras_Compras TxtPrecio.Attributes.Add("onKeyUp ", "Recalcula();") TxtCantidad.Attributes.Add("onKeyUp ", "Recalcula();") TxtDescuentoModal.Attributes.Add("onKeyUp ", "Recalcula();") - TxtOtrosGastos.Attributes.Add("onKeyUp ", "Recalcula();") + 'ImgAmort.Attributes.Add("onclick", "javascript:$('#DivDescP').show(1000); PosicionaObjeto(this.id,'DivDescP');") ' $get('LblTitulo1').style.display = 'none'; $get('LblTituloTipo1').style.display = 'none'; $get('LblTituloTipo2').style.display = ''; $get('LblPrecio1').style.display = 'none'; $get('LblTotalPS1').style.display = 'none'; $get('LblSubTotal1').style.display = 'none'; $get('LblAmort').style.display = ''; $get('BtnAplicarDescP').style.display = 'none'; $get('BtnAplicarDescG').style.display = ''; $get('TrMotivoDescuento').style.display = 'none';") 'If um.GetUnidadesMedida() Then @@ -16569,7 +16569,6 @@ Partial Class Compras_Compras TxtRetISRModal.Text = "" TxtIEPSModal.Text = "" TxtDescuentoModal.Text = "" - TxtOtrosGastos.Text = "" DivAddProductoAliasPS.Visible = False @@ -16694,7 +16693,6 @@ Partial Class Compras_Compras TxtPrecio.Text = GvRow.DataKey("PU").FormatoNumero(6) TxtDescuentoModal.Text = GvRow.DataKey("Descuento").FormatoNumero(6) - TxtOtrosGastos.Text = GvRow.DataKey("OtrosGastos").FormatoNumero LblTotalPS.Text = GvRow.DataKey("Total").FormatoNumero 'FUNCIONALIDAD DE SEGUIR AGREGANDO (NO CERRAR MODAL) @@ -16988,7 +16986,7 @@ Partial Class Compras_Compras End Select - Dim Total As Decimal = (TxtCantidad.Text.ToDecimal * TxtPrecio.Text.ToDecimal) - TxtDescuentoModal.Text.ToDecimal + TxtOtrosGastos.Text.ToDecimal + Dim Total As Decimal = (TxtCantidad.Text.ToDecimal * TxtPrecio.Text.ToDecimal) - TxtDescuentoModal.Text.ToDecimal If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then Dim ObjCon As New ClsContratos @@ -17115,7 +17113,7 @@ Partial Class Compras_Compras End If AddPS(TxtCantidad.Text.Trim.ToDecimal, ddlUM.SelectedValue.ToEntero, ddlUM.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text, DdlPS.SelectedValue.ToEntero, DdlPS.SelectedText, HdnTipoPS.Value.ToEntero, DdlSubProyecto.SelectedValue.ToString, DdlSubProyecto.SelectedItem.Text, DdlProyecto.SelectedItem.Text, DdlProyecto.SelectedValue.ToString, TxtObsPS.Text.Trim, TxtPrecio.Text.Trim.ToDecimal, Total, IVA, - TxtRetIVAModal.Text.ToDecimal / 100, TxtRetISRModal.Text.ToDecimal / 100, TxtIEPSModal.Text.ToDecimal / 100, 0, TxtDescuentoModal.Text.ToDecimal, OtrosGastos:=TxtOtrosGastos.Text.ToDecimal, CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, TipoGasto:=DdlTipoGasto.SelectedItem.Text, + TxtRetIVAModal.Text.ToDecimal / 100, TxtRetISRModal.Text.ToDecimal / 100, TxtIEPSModal.Text.ToDecimal / 100, 0, TxtDescuentoModal.Text.ToDecimal, OtrosGastos:=0, CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, TipoGasto:=DdlTipoGasto.SelectedItem.Text, NoDeducible:=ChkEsNoDeduciblePS.Checked, CveSATPS:=SATClavePS, CveContratoDetalle:=CveContratoDetalle, CveCultivoCuadroDetalle:=If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedValue.ToEntero, -1), TemporadaCuadro:=If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedItem.Text, "")) @@ -17426,8 +17424,7 @@ Partial Class Compras_Compras Dim Cantidad = DrPS("Cantidad").ToString.ToDouble Dim PU = DrPS("PU").ToString.ToDouble Dim Descuento = DrPS("Descuento").ToString.ToDouble - Dim OtrosGastos = DrPS("OtrosGastos").ToString.ToDouble - Dim Total = (Cantidad * PU) - Descuento + OtrosGastos + Dim Total = (Cantidad * PU) - Descuento DrPS("NoDeducible") = ChkEsNoDeduciblePS.Checked Dim ActualizarIva As Boolean = False @@ -17435,25 +17432,20 @@ Partial Class Compras_Compras ActualizarIva = True End If - - If Cantidad <> TxtCantidad.Text.Trim.ToDouble OrElse PU <> TxtPrecio.Text.Trim.ToDouble OrElse Descuento <> TxtDescuentoModal.Text.ToDouble OrElse OtrosGastos <> TxtOtrosGastos.Text.ToDouble Then + If Cantidad <> TxtCantidad.Text.Trim.ToDouble OrElse PU <> TxtPrecio.Text.Trim.ToDouble OrElse Descuento <> TxtDescuentoModal.Text.ToDouble Then Cantidad = TxtCantidad.Text.Trim.ToDouble PU = TxtPrecio.Text.Trim.ToDouble Descuento = TxtDescuentoModal.Text.ToDouble - OtrosGastos = TxtOtrosGastos.Text.ToDouble - Total = (Cantidad * PU) - Descuento + OtrosGastos + Total = (Cantidad * PU) - Descuento DrPS("Cantidad") = Cantidad DrPS("PU") = PU DrPS("Descuento") = Descuento - DrPS("OtrosGastos") = OtrosGastos + DrPS("OtrosGastos") = 0 DrPS("Total") = Total AplicaCalculaTotales = True End If - - - 'PS - CLASIFICACION If DdlPS.SelectedValue.ToEntero > 0 Then @@ -17532,10 +17524,6 @@ Partial Class Compras_Compras DrPS("CveCultivoCuadroDetalle") = If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedValue.ToEntero, -1) DrPS("TemporadaCuadro") = If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedItem.Text, "") - - - - 'Esta parte es para validar cuando la factura tenga ieps en o se asignara el ieps como una partida ya no se considere If (CveFactura > 0 Or CveCompra > 0) And TxtIEPS.Text.ToDecimal = 0 Then DrPS("IEPSPS") = 0 From 7e0e7cd5f8211a7b3fd9ed8c04436a232de1cfae Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 31 May 2023 14:34:21 -0700 Subject: [PATCH 04/20] -- candado con chk para validar ante el SAT, solo para rafa y ADS --- Bancos/ProveedoresAbonar.aspx | 1 + Bancos/ProveedoresAbonar.aspx.vb | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Bancos/ProveedoresAbonar.aspx b/Bancos/ProveedoresAbonar.aspx index ea7236cd2..d097419c2 100644 --- a/Bancos/ProveedoresAbonar.aspx +++ b/Bancos/ProveedoresAbonar.aspx @@ -348,6 +348,7 @@ + diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 152534d86..da0db2b0c 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -264,6 +264,10 @@ Partial Class Bancos_ProveedoresAbonar ViewState("IdCtaContRetISR") = 0 End If + 'temporal + If UsuarioActual.CveUsuario.Contiene(1803, 100) Then + ChkNoValidaSAT.Visible = True + End If IdCuenta = 0 PermiteModificarImporte = True @@ -666,7 +670,10 @@ Partial Class Bancos_ProveedoresAbonar End If Dim ImporteSeleccionado As Decimal = 0 - If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then + Dim ValidaSAT As Boolean = True + If UsuarioActual.Empresa.Funcionalidad(529) = "1" OrElse ChkNoValidaSAT.Checked Then ValidaSAT = False + + If ValidaSAT Then Dim Validada As Boolean = False Dim MsgValidadas As New StringBuilder Dim Valida As New ClsValidaCFDi() From b5c77a7e3b862351a6d7259027b9816a9c4ff002 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 31 May 2023 14:34:43 -0700 Subject: [PATCH 05/20] -- poner redirect. --- Contabilidad/CatCuentas.aspx.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Contabilidad/CatCuentas.aspx.vb b/Contabilidad/CatCuentas.aspx.vb index e29f87d00..04346da23 100644 --- a/Contabilidad/CatCuentas.aspx.vb +++ b/Contabilidad/CatCuentas.aspx.vb @@ -29,7 +29,8 @@ Partial Class Contabilidad_CatCuentas If Not Page.IsPostBack Then If Not UsuarioActual.CveEmpresa.Contiene(13, 83) Then - Server.Transfer("/Contabilidad2/CatCuentas.aspx") + Response.Redirect("/Contabilidad2/CatCuentas.aspx") + Exit Sub End If If UsuarioActual.Empresa.UsaContabilidad Then From 018d7a21166b1feaa7b21fda6ed46b24628da1a4 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 1 Jun 2023 16:44:28 -0700 Subject: [PATCH 06/20] -- acomodo de filtros --- Bancos/RepEgresosSinComprobante.aspx | 108 ++++++++++++------------ Bancos/RepEgresosSinComprobante.aspx.vb | 28 +++--- 2 files changed, 64 insertions(+), 72 deletions(-) diff --git a/Bancos/RepEgresosSinComprobante.aspx b/Bancos/RepEgresosSinComprobante.aspx index e8ca5c719..7091a53bf 100644 --- a/Bancos/RepEgresosSinComprobante.aspx +++ b/Bancos/RepEgresosSinComprobante.aspx @@ -46,70 +46,57 @@ - - - - -
-
-
-
    -
  • Proveedor: - - - -
  • -
  • Personal: - -
  • -
  • - - - -
  • -
  •  F.I.: -
    - + +
    +
    +
    + + +
    +
    +
    +
    Proveedor:
    +
    +
    + +
    + Fecha Inicio: +
    +
    +
    + - - - - - -
    -
  • -
  •    F.F.: -
    - + + + + + + +
    +
    + Fecha Fin: +
    +
    +
    + - - - - - -
    -
  • -
  •    Con Saldo: - -
  • -
  •    Movimiento: - - - -
  • -
-
-
- - -
+ + + + + + +
+ + +
+
diff --git a/Bancos/RepEgresosSinComprobante.aspx.vb b/Bancos/RepEgresosSinComprobante.aspx.vb index 411c89859..4b23ae67d 100644 --- a/Bancos/RepEgresosSinComprobante.aspx.vb +++ b/Bancos/RepEgresosSinComprobante.aspx.vb @@ -52,9 +52,14 @@ Partial Class Bancos_RepEgresosSinComprobante DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros("Tipo='Egs'") DdlTipoTransaccion.DataBind() - DdlUsuarioSolicito.DataSource = GlobalDTUsuarios.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa), "Nombre") + DdlUsuarioSolicito.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "Nombre") DdlUsuarioSolicito.DataBind() + DdlProveedores.setEsWebService(True) + DdlProveedores.Attributes.Add("data-metodo", "getproveedores") + DdlProveedores.SelectedText = "Todos" + DdlProveedores.SelectedValue = "-1" + CargaDatos() End If @@ -67,7 +72,7 @@ Partial Class Bancos_RepEgresosSinComprobante If txtFechaI.Text <> "" Then FechaI = txtFechaI.Text Else FechaI = "-1" If txtFechaF.Text <> "" Then FechaF = txtFechaF.Text Else FechaF = "-1" - If Mov.GetEgresosSinComprobar(FechaI, FechaF, DdlProveedores.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlProveedoresClasificaciones.SelectedValue.ToEntero, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlUsuarioResponsable.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, If(ChkSaldo.Checked, 1, 0), UsuarioActual.CveEmpresa, DdlTipoTransaccion.SelectedValue.ToEntero, DdlUsuarioSolicito.SelectedValue.ToEntero) Then + If Mov.GetEgresosSinComprobar(FechaI, FechaF, DdlProveedores.SelectedValue.ToEntero, -1, DdlProveedoresClasificaciones.SelectedValue.ToEntero, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlUsuarioResponsable.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, If(ChkSaldo.Checked, 1, 0), UsuarioActual.CveEmpresa, DdlTipoTransaccion.SelectedValue.ToEntero, DdlUsuarioSolicito.SelectedValue.ToEntero) Then DtDatos = Mov.DtResultados CargaGrid("") CargaGridPersonal("") @@ -77,18 +82,9 @@ Partial Class Bancos_RepEgresosSinComprobante Mov.Dispose() - End Sub - Protected Sub BtnCargarProveedores_Click(sender As Object, e As System.EventArgs) Handles BtnCargarProveedores.Click - DdlProveedores.CssClass += " select2me" - DdlProveedores.Items.Clear() - DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) - - DdlProveedores.DataBind() - DdlProveedores.Items.Insert(0, New ListItem("Todos", "-1")) - DdlProveedores.Attributes.Remove("onclick") - - End Sub - + End Sub + + Protected Sub GvESC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvESC.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then @@ -209,8 +205,8 @@ Partial Class Bancos_RepEgresosSinComprobante For Each gr As GridViewRow In GvESC.Rows If gr.FCCheckBox("Chk").Checked Then Dim IdCtaContable As Integer = 0 - Dim TipoMovtoOtIngresos As Boolean = True - Dim TipoMovtoConcepto As Boolean = False + Dim TipoMovtoOtIngresos As Boolean = False + Dim TipoMovtoConcepto As Boolean = True Dim CveConceptoContable As Integer Select Case gr.DataKey("CveConceptoContable").ToEntero From 17a5fc9c800c44fabde18eff924a5f09a378902b Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 1 Jun 2023 17:37:12 -0700 Subject: [PATCH 07/20] =?UTF-8?q?--=20se=20quit=C3=B3=20banner.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sistemas/Empresa.aspx | 57 +++++++--------------------------------- Sistemas/Empresa.aspx.vb | 15 ++--------- 2 files changed, 12 insertions(+), 60 deletions(-) diff --git a/Sistemas/Empresa.aspx b/Sistemas/Empresa.aspx index 5e2c2ed6d..db5bef7fe 100644 --- a/Sistemas/Empresa.aspx +++ b/Sistemas/Empresa.aspx @@ -309,7 +309,7 @@
- CDS + CSD
@@ -513,7 +513,7 @@
- +
@@ -571,7 +571,7 @@ SSL: - +
@@ -618,7 +618,7 @@ SSL: - + @@ -700,7 +700,7 @@
- +
@@ -1424,10 +1424,10 @@ Tipo Centro de Costos: - - - - + + + + @@ -1579,44 +1579,7 @@
- -
-
-
- - Archivos -
-
-
-
-
-
- -
-
-
- - - - - - - - - - - -
Banner: - - - -
Cargar Banner
- - - - Descargar Banner
-
-
+
diff --git a/Sistemas/Empresa.aspx.vb b/Sistemas/Empresa.aspx.vb index c980a831c..f09547665 100644 --- a/Sistemas/Empresa.aspx.vb +++ b/Sistemas/Empresa.aspx.vb @@ -182,9 +182,6 @@ Partial Class Sistemas_Empresa 'Configuración de Modalidad Update TxtTimbres.Enabled = False - TrDescargaBanner.Visible = True - LnkBanner.InnerText = "Reemplazar Banner" - LbArchivoKeyDescarga.Visible = True LbArchivoCerDescarga.Visible = True LbArchivoPfxDescarga.Visible = True @@ -261,7 +258,6 @@ Partial Class Sistemas_Empresa TxtArchivoKey.Text = .ArchivoKey TxtArchivoCer.Text = .ArchivoCer TxtArchivoPfx.Text = .ArchivoPfx - TxtBanner.Text = .Banner ChkEstatus.Checked = .Estatus TxtFecha.Text = .FechaIng.ToString TxtCveUsuario.Text = .Usuario @@ -462,16 +458,9 @@ Partial Class Sistemas_Empresa 'CargaFuncionalidad(243, DdlFyESIG) 'CargaFuncionalidad(244, DdlActivoFijoSIG) - LbBannerDescarga.OnClientClick = "javascript:AbrirVentana('/Banners/" & .Banner & "', 500, 500, 'N', 'Banner Empresa');" Session("FileUpload") = .Banner - - Session("FileUpload") = .ArchivoKey - - LbBannerDescarga.OnClientClick = "javascript:AbrirVentana('/Cer/" & .ArchivoCer & "', 500, 500, 'N', 'ArchivoCer Empresa');" Session("FileUpload") = .ArchivoCer - - Session("FileUpload") = .ArchivoPfx End With InicializaClasificacionIVA(ObjEmpresas) @@ -530,7 +519,7 @@ Partial Class Sistemas_Empresa If ObjEmpresas.AddEmpresa(TxtCveEmpresa.Text.Trim.ToEntero, TxtEmpresa.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, TxtCiudad.Text.Trim, TxtEstado.Text.Trim, TxtRFC.Text.Trim, TxtCP.Text.Trim.ToEntero, TxtTelefono.Text.Trim, TxtContacto.Text.Trim, TxtMail.Text.Trim, DdlTipoFacturacion.SelectedValue, TxtBIUsuario.Text.Trim, TxtBIContraseña.Text.Trim, TxtContraseñaKey.Text.Trim, TxtArchivoKey.Text.Trim, - TxtArchivoCer.Text.Trim, TxtArchivoPfx.Text.Trim, TxtBanner.Text.Trim, UsuarioActual.CveUsuario, ChkFacturaProduccion.Checked, ChkMostrarRetIVA.Checked, + TxtArchivoCer.Text.Trim, TxtArchivoPfx.Text.Trim, "", UsuarioActual.CveUsuario, ChkFacturaProduccion.Checked, ChkMostrarRetIVA.Checked, ChkMostrarRetISR.Checked, "-1", ChkEstatusFacturacion.Checked, TxtSendMail.Text.Trim, TxtSendMailPassword.Text.Trim, TxtSendMailServer.Text.Trim, TxtSendMailPort.Text.Trim.ToEntero, ChkSendMailSSL.Checked, ChkUsaContabilidad.Checked, ChkUsaBancos.Checked, ChkUsaVentas.Checked, ChkUsaCxC.Checked, ChkUsaCompras.Checked, ChkUsaInventarios.Checked, ChkUsaRH.Checked, ChkUsaNomina.Checked, ChkUsaOS.Checked, TxtBDContPAQi.Text.Trim, TxtServerContPAQi.Text.Trim, @@ -577,7 +566,7 @@ Partial Class Sistemas_Empresa Else If ObjEmpresas.UpdateEmpresa(TxtEmpresa.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, TxtCiudad.Text.Trim, TxtEstado.Text.Trim, TxtRFC.Text.Trim, TxtCP.Text.Trim.ToEntero, TxtTelefono.Text.Trim, TxtContacto.Text.Trim, TxtMail.Text.Trim, DdlTipoFacturacion.SelectedItem.ToString, TxtBIUsuario.Text.Trim, - TxtBIContraseña.Text.Trim, TxtContraseñaKey.Text.Trim, TxtArchivoKey.Text.Trim, TxtArchivoCer.Text.Trim, TxtArchivoPfx.Text.Trim, TxtBanner.Text.Trim, ChkEstatus.Checked, + TxtBIContraseña.Text.Trim, TxtContraseñaKey.Text.Trim, TxtArchivoKey.Text.Trim, TxtArchivoCer.Text.Trim, TxtArchivoPfx.Text.Trim, "", ChkEstatus.Checked, ChkFacturaProduccion.Checked, ChkMostrarRetIVA.Checked, ChkMostrarRetISR.Checked, "-1", ChkEstatusFacturacion.Checked, TxtSendMail.Text.Trim, TxtSendMailPassword.Text.Trim, TxtSendMailServer.Text.Trim, TxtSendMailPort.Text.Trim.ToEntero, ChkSendMailSSL.Checked, ChkUsaContabilidad.Checked, ChkUsaBancos.Checked, ChkUsaVentas.Checked, ChkUsaCxC.Checked, ChkUsaCompras.Checked, ChkUsaInventarios.Checked, ChkUsaRH.Checked, ChkUsaNomina.Checked, ChkUsaOS.Checked, TxtBDContPAQi.Text.Trim, From ef0f27ac391ec82617c29a3174d398617a6128c5 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Thu, 1 Jun 2023 17:49:51 -0700 Subject: [PATCH 08/20] --Correciones de TC de fluctuacion --- App_Code/Modelos.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 83f46e6bd..df54b086e 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -2404,7 +2404,7 @@ Namespace Modelos ' Verificar si la fecha es del mes anterior a la fecha actual Dim esMesAnterior As Boolean = False - If ObjFactura.TipoDocto = "Egs" AndAlso ValorMultiplicador = -1 AndAlso FechaCancelacion > MinFecha AndAlso tipoCambio > 1 AndAlso UsuarioActual.Empresa.Funcionalidad(703) = "1" Then + If ValorMultiplicador = -1 AndAlso FechaCancelacion > MinFecha AndAlso tipoCambio > 1 AndAlso UsuarioActual.Empresa.Funcionalidad(703) = "1" Then ' Obtener el mes y año de la fecha actual Dim mesActual As Integer = FechaCancelacion.Month Dim añoActual As Integer = FechaCancelacion.Year @@ -2480,11 +2480,11 @@ Namespace Modelos Dim TCCliente As Decimal = tipoCambio Dim TCFluctuacion As Decimal = tipoCambio 'TOMA EL TC DE LA ULTIMA FLUCTUACION - If ValorMultiplicador = -1 AndAlso UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso ObjFactura.CveMoneda = 2 Then + If ValorMultiplicador = -1 AndAlso esMesAnterior AndAlso UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso ObjFactura.CveMoneda = 2 Then Dim UltimaFluctuacion As ClsPaginas.MTipoCambioFluctuacion = ClsPaginas.GlobalTipoCambioUltimaFluctuacion(Now) If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then - If UltimaFluctuacion.FechaFluctuacion <= Now Then + If UltimaFluctuacion.FechaFluctuacion <= FechaCancelacion Then TCCliente = UltimaFluctuacion.TCFluctuacion TCFluctuacion = UltimaFluctuacion.TCFluctuacion End If From bf35af6218ca5c432e5ba50304768954921cd8e9 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Thu, 1 Jun 2023 17:50:25 -0700 Subject: [PATCH 09/20] --Subproyecto en facturacion de remisiones --- Ventas/Ventas.aspx.vb | 65 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 62 insertions(+), 3 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index beed05ef0..7ea26166e 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -20940,6 +20940,13 @@ Partial Class Ventas If Not OcurrioError Then If MovimientoPrePoliza AndAlso CveMovimientoInventario > 0 Then 'OcurrioError = Not GeneraPrePolizaMovimientoAlmacen(ObjInventario, ObjConta, ObjContPaq, ObjFactura, ObjFactura.CvePrePoliza, CveMovimientoInventario, CveAlmacen) + Dim CveSubProyectoPrePoliza As Integer = ObjFactura.CveSubProyecto + If CveAlmacen > 0 Then + Dim CveSubProyectoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacen).FiltroPrimeroValor("CveSubProyecto").ToString().ToEntero() + If CveSubProyectoAlmacen > 0 Then + CveSubProyectoPrePoliza = CveSubProyectoAlmacen + End If + End If If ObjInventario.GetMovimientosDetalle(CveMovimientoInventario, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then Dim DtCostos = ObjInventario.DtResultados.Copy @@ -20968,8 +20975,13 @@ Partial Class Ventas End If Try + Dim CveSubProyecto69 As Integer = CveSubProyectoPrePoliza + If UsuarioActual.CveEmpresa = 119 Then + CveSubProyecto69 = ObjFactura.CveSubProyecto + End If + 'If ValorInventario <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovto69, ValorInventario, ValorInventario, 69, ObjFactura.SerieFolio, ObjFactura.SerieFolio, IdCtaContable, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, CveSubProyecto:=ObjFactura.CveSubProyecto) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovto69, ValorInventario, ValorInventario, 69, ObjFactura.SerieFolio, ObjFactura.SerieFolio, IdCtaContable, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, CveSubProyecto:=CveSubProyecto69) Then OcurrioError = True Exit For End If @@ -20984,7 +20996,7 @@ Partial Class Ventas If Not OcurrioError Then IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero() - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovto69, TotalCosto, TotalCosto, 68, ObjFactura.SerieFolio, ObjFactura.SerieFolio, IdCtaContable, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, CveSubProyecto:=ObjFactura.CveSubProyecto) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovto69, TotalCosto, TotalCosto, 68, ObjFactura.SerieFolio, ObjFactura.SerieFolio, IdCtaContable, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, CveSubProyecto:=CveSubProyectoPrePoliza) Then OcurrioError = True End If End If @@ -22723,6 +22735,13 @@ Partial Class Ventas End If End If + + If NuevaFactura = 1 Then + 'SI ES REFACTURACION CON PAGOS NO PERMITIR AGREGAR PAGO + If ObjFacturaNC.Pagado > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(586).ToEntero() = 2 Then + BtnAgregarPago.Visible = False + End If + End If Case 3 ' TERMINAL DivTerminal.Visible = True TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza)).ToShortDateString @@ -22871,6 +22890,14 @@ Partial Class Ventas UpContado.Update() End Sub Private Sub BtnAgregarPago_Click(sender As Object, e As EventArgs) Handles BtnAgregarPago.Click + If NuevaFactura = 1 Then + 'SI ES REFACTURACION CON PAGOS NO PERMITIR AGREGAR PAGO + If ObjFacturaNC.Pagado > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(586).ToEntero() = 2 Then + Alert("No se puede agregar un pago a una refacturación con pagos", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + End If + Dim abonado, saldo As Double Dim total As Decimal = TxtImporteEfectivo.Text.ToDecimal + TxtImporteCredito.Text.ToDecimal + TxtImporteDebito.Text.ToDecimal + TxtImporteCheque.Text.ToDecimal + TxtImporteTransferencia.Text.ToDecimal @@ -32327,13 +32354,45 @@ Partial Class Ventas End If ObjClientes.Dispose() + Dim CveSubProyectoVenta As Integer = DdlSubProyectoDatos.SelectedValue.ToEntero() + Dim SubProyectoVenta As String = DdlSubProyectoDatos.SelectedItem.Text + + Dim CveProyectoVenta As Integer = -1 + Dim ProyectoVenta As String = "" + + If UsuarioActual.CveEmpresa = 119 AndAlso CveSubProyectoVenta > 0 Then + Dim RowSP = GlobalDTSubProyectos(-1, CveSubProyecto:=CveSubProyectoVenta, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("") + If RowSP IsNot Nothing Then + CveProyectoVenta = RowSP("CveProyecto").ToString().ToEntero() + ProyectoVenta = RowSP("Proyecto").ToString() + End If + End If + If DtRemisionesPS IsNot Nothing Then Dim tCantidad As Decimal = 0 For Each Dr As DataRow In DtRemisionesPS.Select() + Dim CveProyecto As Integer = -1 + Dim Proyecto As String = "" + + Dim CveSubProyecto As Integer = -1 + Dim SubProyecto As String = "" + + If UsuarioActual.CveEmpresa = 119 Then + CveProyecto = CveProyectoVenta + Proyecto = ProyectoVenta + CveSubProyecto = CveSubProyectoVenta + SubProyecto = SubProyectoVenta + Else + CveProyecto = Dr("CveProyecto").ToString().ToEntero() + Proyecto = Dr("Proyecto").ToString() + CveSubProyecto = Dr("CveSubProyecto").ToString().ToEntero() + SubProyecto = Dr("SubProyecto").ToString() + End If + tCantidad = If(ChkRemProductos.Checked, GvRemPS.Rows(IndiceGVDataKey(GvRemPS, "CveVentaDetalle", $"{Dr("CveVentaDetalle")}")).FCTextBox("TxtCantidadRem").Text, Dr("Cantidad")).ToString().ToDecimal AgregarProductoServicio(tCantidad, Dr("CveUM").ToString().ToEntero(), Dr("UM").ToString(), Dr("CveClasificacion").ToString().ToEntero(), Dr("Clasificacion").ToString(), Dr("CvePS").ToString().ToEntero(), Dr("PS").ToString(), Dr("Obs").ToString(), Dr("PU").ToString().ToDecimal, Dr("Descuento").ToString().ToDecimal, - Dr("CveProyecto").ToString().ToEntero(), Dr("Proyecto").ToString(), Dr("CveSubProyecto").ToString().ToEntero(), Dr("SubProyecto").ToString(), + CveProyecto, Proyecto, CveSubProyecto, SubProyecto, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), CveContratoDetalle:=Dr("CveContratoDetalle").ToString().ToEntero(), CveVentaDetalleRemision:=Dr("CveVentaDetalle").ToString().ToEntero(), RegeneraIEPS:=True) Next From e527a5f8aa87bed82a0b5cb04f59bb2e369b73c1 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 1 Jun 2023 18:55:19 -0700 Subject: [PATCH 10/20] -- mensaje al cargar ventas, que sino existe producto que mande mensaje --- General/SaldosIniciales.aspx.vb | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index 90bf0620b..864c9de7e 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -1605,6 +1605,15 @@ Partial Class General_SaldosIniciales #Region "C L I E N T E S - F A C T U R A S" + + Dim NoEncontrados As Integer = 0 + Dim Encontrados As Integer = 0 + Dim StrRFCNoencontrados As New StringBuilder + Dim drr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero("AplicaParaVenta = 1") + If drr Is Nothing Then + Alert("No existen productos para venta. favor de crear uno e intentar de nuevo", TipoMensaje.MsgAdvertencia) + Exit Sub + End If Dim ObjVentas As New ClsVentas Dim ObjConta As New ClsContabilidad(ObjVentas.IniciaTransacSQL()) Dim ObjIE As New ClsBancos(ObjVentas.IniciaTransacSQL()) @@ -1614,10 +1623,6 @@ Partial Class General_SaldosIniciales 'Dim ExisteVenta As Boolean = False 'Dim Contador As Integer = 0 DtClientes = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1) - Dim NoEncontrados As Integer = 0 - Dim Encontrados As Integer = 0 - Dim StrRFCNoencontrados As New StringBuilder - Dim drr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero("AplicaParaVenta = 1") Dim CvePS As Integer = drr("CvePS").ToString().ToEntero() Dim CveUnidadMedida As Integer = drr("CveUnidadMedida").ToString().ToEntero() Dim CveClasificacion As Integer = drr("CveClasificacion").ToString().ToEntero() @@ -1712,7 +1717,7 @@ Partial Class General_SaldosIniciales End If CveVenta = ObjVentas.CveVenta - If Not ObjVentas.AddVentaDetalle(CveVenta, CvePS, 1, CveUnidadMedida, SubTotal, IVA, SubTotal * PorcentajeIVA, "Saldo Inicial", 0, 0, Sucursal.ToEntero(), 0, PorcentajeIVA:=PorcentajeIVA, PorcentajeRetIVA:=PorcentajeRetIVA, ImporteRetIVA:=RetIVA) Then + If Not ObjVentas.AddVentaDetalle(CveVenta, CvePS, 1, CveUnidadMedida, SubTotal, IVA, SubTotal * PorcentajeIVA, "Saldo Inicial", 0, 0, Sucursal.ToEntero(), 0, PorcentajeIVA:=PorcentajeIVA, PorcentajeRetIVA:=PorcentajeRetIVA, ImporteRetIVA:=RetIVA, IEPS:=0) Then ErrorVentas = True Exit For End If From 170ae316769c5afe3a38bffdcee60fd03959e671 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 1 Jun 2023 19:10:19 -0700 Subject: [PATCH 11/20] -- codigo en regimen --- Sistemas/Empresa.aspx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sistemas/Empresa.aspx b/Sistemas/Empresa.aspx index db5bef7fe..b843b95f0 100644 --- a/Sistemas/Empresa.aspx +++ b/Sistemas/Empresa.aspx @@ -164,7 +164,7 @@ Régimen: - + From 03dbf0edf92259853696fcb355705e7a970597f5 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 1 Jun 2023 19:23:35 -0700 Subject: [PATCH 12/20] -- se quita propiedad: EsOutSourcing --- Ventas/Ventas.aspx.vb | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index beed05ef0..14ff18af9 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -8496,13 +8496,7 @@ Partial Class Ventas Dim ClienteRetIVA = Me.ClienteRetIVA If ClienteRetIVA <= 0 Then - If TmpDT.Rows(e.RowIndex)("EsOutSourcing").ToString() <> "" AndAlso CBool(TmpDT.Rows(e.RowIndex)("EsOutSourcing").ToString()) Then - ClienteRetIVA = 0.06D - DdlTipoRetencion.SelectedValueExist("4") - LblRetIVA.Text = (ClienteRetIVA * 100).FormatoNumero - TrRetIVA.Style.Add("display", "") - DdlTipoRetencion.Visible = True - ElseIf DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then + If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then ClienteRetIVA = 0.106667D ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then ClienteRetIVA = 0.04D @@ -19200,10 +19194,7 @@ Partial Class Ventas End If If ClienteRetIVA <= 0 Then - If CBool(DrPS("EsOutSourcing").ToString()) Then - ClienteRetIVA = 0.06D - DdlTipoRetencion.SelectedValueExist("4") - ElseIf DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then + If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then ClienteRetIVA = 0.106667D ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then ClienteRetIVA = 0.04D @@ -19258,7 +19249,6 @@ Partial Class Ventas Row("CveVentaDetalleCotizacion") = CveVentaDetalleCotizacion Row("CveVentaDetallePedido2") = CveVentaDetallePedido2 Row("CuentaPredial") = CuentaPredial - Row("EsOutSourcing") = DrPS("EsOutSourcing") Row("EsCargo") = EsCargo If TmpDT.Columns.Contains("CveMarca") Then @@ -19510,8 +19500,6 @@ Partial Class Ventas TmpDT.Columns.Add("CveTamaño", GetType(Integer)) TmpDT.Columns.Add("CveConcepto", GetType(Integer)) - - TmpDT.Columns.Add("EsOutSourcing", GetType(Boolean)) TmpDT.Columns.Add("EsCargo", GetType(Boolean)) TmpDT.Columns.Add("CveVentaDetalleRNC", GetType(Integer)) @@ -19526,14 +19514,11 @@ Partial Class Ventas TmpDT.Columns.Add("CveActivoFijo", GetType(Integer)) TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal)) TmpDT.Columns.Add("AFValorInicial", GetType(Decimal)) - - TmpDT.Columns("EsOutSourcing").DefaultValue = False TmpDT.Columns("EsCargo").DefaultValue = False TmpDT.Columns("TieneProntoPago").DefaultValue = "No" TmpDT.Columns("ImporteProntoPago").DefaultValue = 0 - End Sub Private Sub CreaDTmpC() DTmpC = New DataTable @@ -34446,8 +34431,6 @@ Partial Class Ventas tClienteRetIVA = 0.106667D ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then tClienteRetIVA = 0.04D - ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso CBool(RowServicio("EsOutSourcing").ToString()) Then - tClienteRetIVA = 0.06D ElseIf DdlTipoRetencion.SelectedValue.Contiene("0") Then tClienteRetIVA = 0.00D End If From c215fdb018a1250d5a9423fe3aaeb5276c693edb Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 1 Jun 2023 20:05:29 -0700 Subject: [PATCH 13/20] =?UTF-8?q?--=20se=20quit=C3=B3=20esoutsourcing.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsProductosServicios.vb | 29 +----- Ventas/ProductosServicios.aspx | 162 ++++++++---------------------- Ventas/ProductosServicios.aspx.vb | 41 +++----- 3 files changed, 59 insertions(+), 173 deletions(-) diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index f3ae17edc..1e8338e20 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -103,8 +103,6 @@ Public Class ClsProductosServicios Public Property ClaveImpuestoEmpaque As String Public Property ClaveImpuestoUnidadMedida As String Public Property ClaveCategoriaToxicidad As String - - Public Property EsOutSourcing As Boolean Public Property PrecioLibre As Boolean Public ReadOnly Property DtResultados() As DataTable @@ -314,7 +312,6 @@ Public Class ClsProductosServicios ClaveImpuestoEmpaque = Data.Rows(0)("ClaveImpuestoEmpaque").ToString ClaveImpuestoUnidadMedida = Data.Rows(0)("ClaveImpuestoUM").ToString ClaveCategoriaToxicidad = Data.Rows(0)("ClaveCategoriaToxicidad").ToString - EsOutSourcing = Data.Rows(0)("EsOutSourcing").ToString = "True" PrecioLibre = Data.Rows(0)("PrecioLibre").ToString = "True" End If @@ -410,11 +407,11 @@ Public Class ClsProductosServicios AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, CveUsuario As Integer, CveEmpresa As Integer, CveMetodoInventario As Integer, EsPaquete As Integer, Optional CveTipoPS As Integer = -1, Optional FuePorXML As Boolean = True, Optional TipoServicio As Integer = -1, Optional CveClasificacion2 As Integer = -1, Optional CveMarca As Integer = -1, Optional AlmacenSeccion As String = "", Optional AplicaIEPS As Boolean = False, Optional IEPSPorcentaje As Decimal = -1, - Optional CveConceptoContable As Integer = -1, Optional CveCompuesto As Integer = -1, Optional CveSATPS As Integer = -1, Optional IEPSGrabaIVA As Boolean = False, Optional VentaMinima As Decimal = 0, + Optional CveCompuesto As Integer = -1, Optional CveSATPS As Integer = -1, Optional IEPSGrabaIVA As Boolean = False, Optional VentaMinima As Decimal = 0, Optional CveMoneda As Integer = 1, Optional RetISR As Double = 0, Optional PrecioMinimo As Decimal = Nothing, Optional CveTipoFactor As Integer = 1, Optional CveFraccionArancelaria As Integer = -1, Optional CveClasificacionDetalle As Integer = -1, Optional CveTamaño As Integer = -1, Optional CveModelo As Integer = -1, Optional CveMedida As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional ClaveImpuestoEmpaque As String = "", Optional ClaveImpuestoUM As String = "", - Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, + Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False, Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0, Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1) As Integer @@ -492,7 +489,6 @@ Public Class ClsProductosServicios .Add("@ClaveImpuestoUM", SqlDbType.VarChar).Value = ClaveImpuestoUM .Add("@ClaveCategoriaToxicidad", SqlDbType.VarChar).Value = ClaveCategoriaToxicidad .Add("@Litraje", SqlDbType.Float).Value = Litraje - .Add("@EsOutSourcing", SqlDbType.Bit).Value = EsOutSourcing .Add("@AplicaSerie", SqlDbType.Bit).Value = AplicaSerie .Add("@AplicaLote", SqlDbType.Bit).Value = AplicaLote @@ -569,35 +565,20 @@ Public Class ClsProductosServicios .Add("@AplicaIEPS", SqlDbType.Bit).Value = PS.AplicaIEPS .Add("@IEPSGrabaIVA", SqlDbType.Bit).Value = PS.IEPSGrabaIVA .Add("@IEPSPorcentaje", SqlDbType.SmallMoney).Value = PS.IEPSPorcentaje - .Add("@CveConceptoContable", SqlDbType.Int).Value = PS.CveConceptoContable .Add("@CveCompuesto", SqlDbType.Int).Value = PS.CveCompuesto .Add("@CveSATPS", SqlDbType.Int).Value = PS.CveSATPS - 'Nuevo R: 26/09/2017' .Add("@Inventariable", SqlDbType.Bit).Value = PS.Inventariable .Add("@CveProveedorCompra", SqlDbType.Int).Value = PS.CveProveedorCompra .Add("@VentaMinima", SqlDbType.Decimal).Value = PS.VentaMinima - 'Nuevo R: 08/11/2017' .Add("@CveMoneda", SqlDbType.Int).Value = PS.CveMoneda - 'Nuevo R: 30/11/2017 .Add("@RetISR", SqlDbType.Float).Value = PS.RetISR - - 'Nuevo Oscar 29/12/2017 .Add("@PrecioMinimo", SqlDbType.Money).Value = PS.PrecioMinimo - - 'Nuevo Rigo 12/01/2018 - .Add("@CveTipoFactor", SqlDbType.Int).Value = PS.CveTipoFactor - - 'Nuevo Raul 08/03/2018 .Add("@CveFraccionArancelaria", SqlDbType.Int).Value = PS.CveFraccionArancelaria - - 'Nuevo Raul 11/09/2018 .Add("@CveClasificacionDetalle", SqlDbType.Int).Value = PS.CveClasificacionDetalle - - 'Nuevo Oscar 31/10/2018 .Add("@CveTamaño", SqlDbType.Int).Value = PS.CveTamaño End With @@ -658,11 +639,11 @@ Public Class ClsProductosServicios Public Function UpdatePS(CveClasificacion As Integer, CveClasificacionCosto As Integer, CveUnidadMedida As Integer, Codigo As String, Codigo2 As String, CodigoBarras As String, PS As String, Precio As Double, IVA As Double, RetIVA As Double, Inventariable As Boolean, CveProveedorCompra As Integer, AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, Estado As Boolean, CveUsuario As Integer, CvePS As Integer, CveMetodoInventario As Integer, EsPaquete As Integer, CveSATPS As Integer, Optional CveTipoPS As Integer = -1, Optional TipoServicio As Integer = -1, Optional CveClasificacion2 As Integer = -1, Optional CveMarca As Integer = -1, Optional AlmacenSeccion As String = "", Optional AplicaIEPS As Boolean = False, Optional IEPSPorcentaje As Decimal = -1, - Optional CveConceptoContable As Integer = -1, Optional CveCompuesto As Integer = -1, Optional IEPSGrabaIVA As Boolean = False, Optional VentaMinima As Decimal = 0, + Optional CveCompuesto As Integer = -1, Optional IEPSGrabaIVA As Boolean = False, Optional VentaMinima As Decimal = 0, Optional CveMoneda As Integer = 1, Optional RetISR As Double = 0, Optional PrecioMinimo As Decimal = Nothing, Optional CveTipoFactor As Integer = 1, Optional CveFraccionArancelaria As Integer = -1, Optional CveUsuarioModifico As Integer = -1, Optional CveClasificacionDetalle As Integer = -1, Optional CveTamaño As Integer = -1, Optional CveModelo As Integer = -1, Optional CveMedida As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional ClaveImpuestoEmpaque As String = "", Optional ClaveImpuestoUM As String = "", - Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False, + Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False, Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0, Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1) As Boolean @@ -697,7 +678,6 @@ Public Class ClsProductosServicios .Add("@AplicaIEPS", SqlDbType.Bit).Value = AplicaIEPS .Add("@IEPSGrabaIVA", SqlDbType.Bit).Value = IEPSGrabaIVA .Add("@IEPSPorcentaje", SqlDbType.SmallMoney).Value = IEPSPorcentaje - .Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable .Add("@CveCompuesto", SqlDbType.Int).Value = CveCompuesto .Add("@CveSATPS", SqlDbType.Int).Value = CveSATPS @@ -740,7 +720,6 @@ Public Class ClsProductosServicios .Add("@ClaveImpuestoUM", SqlDbType.VarChar).Value = ClaveImpuestoUM .Add("@ClaveCategoriaToxicidad", SqlDbType.VarChar).Value = ClaveCategoriaToxicidad .Add("@Litraje", SqlDbType.Float).Value = Litraje - .Add("@EsOutSourcing", SqlDbType.Bit).Value = EsOutSourcing .Add("@AplicaSerie", SqlDbType.Bit).Value = AplicaSerie .Add("@AplicaLote", SqlDbType.Bit).Value = AplicaLote diff --git a/Ventas/ProductosServicios.aspx b/Ventas/ProductosServicios.aspx index 6e33f38b6..a01c06afc 100644 --- a/Ventas/ProductosServicios.aspx +++ b/Ventas/ProductosServicios.aspx @@ -242,7 +242,10 @@
- +
+ + +
<%----%> @@ -252,7 +255,6 @@
-
@@ -262,8 +264,7 @@
-
-
+
@@ -299,22 +300,15 @@ - -
-
-
-
-
- - -
+
+
@@ -541,15 +535,15 @@ - +
-
+
- Costos del Producto + Impuestos
@@ -557,7 +551,7 @@
-
+ -
+
-
+
- +
@@ -603,51 +597,32 @@
- - <%--
- - - - - - -
--%> -
- - - - - - % -
-
- - - - - - % -
- <%-- -
- - - - -
--%> - +
+
+ + + + + + % +
+
+ + + + + + % +
+
- - - +
- - - +
@@ -660,12 +635,7 @@ -
- -
- - -
+
@@ -673,7 +643,7 @@
-
+
@@ -719,8 +689,7 @@
- -
+
@@ -882,7 +851,7 @@ - + @@ -1031,30 +1000,6 @@
- -
-
-
- - Concepto Relacionado -
-
-
-
-
-
-
-
- -
- - - -
-
-
-
-
@@ -1093,47 +1038,24 @@
+ Limpiar datos
-
- - - -
-
- - - - - - - -
- Limpiar datos
- -
- - - -
-
- - - +
-
+
-
+
diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index b87dce484..5caced717 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -248,7 +248,6 @@ Partial Class ProductosyServicios 'CargaFamilia(ViewState("CveSubFamilia").ToString.ToEntero) CargaSucursaless() CargaImpuestosLocales() - CargaConceptoRelacionado() If UsuarioActual.TienePermisoProceso(122) Then BtnEliminar.Visible = False @@ -365,6 +364,10 @@ Partial Class ProductosyServicios CargaPSAdicionalesVigencias() End If + If UsuarioActual.Empresa.Funcionalidad(713) = "1" Then '' empresa deduce IEPS + divIEPS.Visible = True + End If + If UsuarioActual.CveEmpresa = 13 Then DivPSAdicionalVigencia.Visible = True LtlPSAdicionalVigencia.Text = "Producto Relacionado:" @@ -383,7 +386,6 @@ Partial Class ProductosyServicios CargaCombosSeccionAlmacen() - DivObjetoImpuesto.Visible = True DdlObjetoImpuesto.DataSource = GlobalDTSATObjetosImpuestos DdlObjetoImpuesto.DataBind() DdlObjetoImpuesto.SelectedValue = "2" 'se sugiere este valor, que sería el más utilizado @@ -794,10 +796,6 @@ Partial Class ProductosyServicios End If End If End Sub - Private Sub CargaConceptoRelacionado() - DdlConceptoRelacionado.DataSource = GlobalDTContaConceptosContables(-1) - DdlConceptoRelacionado.DataBind() - End Sub Private Sub CargarMetodosInv() ddlMetodos.DataSource = If(UsuarioActual.CveEmpresa.Contiene(72, 80), GlobalDTInvMetodosInventario.FiltraParametros("CveMetodoInventario IN (1,5)"), GlobalDTInvMetodosInventario) ddlMetodos.DataBind() @@ -948,7 +946,6 @@ Partial Class ProductosyServicios lbTitulo.Text = $"{lbTitulo.Text}{ObjProductosServicios.PS}" LtProductoUnificar.Text = ObjProductosServicios.PS ddlMetodos.SelectedValue = ObjProductosServicios.CveMetodoInventario.ToString - DdlConceptoRelacionado.SelectedValueExist(ObjProductosServicios.CveConceptoContable.ToString) DdlProveedor.SelectedValue = ObjProductosServicios.CveProveedorCompra.ToString DdlProveedor.SelectedText = ObjProductosServicios.ProveedorCompra @@ -1045,21 +1042,16 @@ Partial Class ProductosyServicios CargaCaracteristicas() LnkUnificar.Visible = True - ChkEsOutSourcing.Checked = ObjProductosServicios.EsOutSourcing ChkPrecioLibre.Checked = ObjProductosServicios.PrecioLibre - - If UsuarioActual.Empresa.Funcionalidad(143) = "1" Then TxtRegistroRSCO.Text = ObjProductosServicios.DtResultados.Rows(0)("RegistroRSCO").ToString ChkFechaIndeterminadaRSCO.Checked = Boolean.Parse(ObjProductosServicios.DtResultados.Rows(0)("VigenciaIndeterminadaRSCO").ToString) - DivRegistroRSCO1.Visible = True DivRegistroRSCO2.Visible = True - If ChkFechaIndeterminadaRSCO.Checked Then TxtFechaVigenciaRSCO.Text = "01/01/1900" Else @@ -1070,18 +1062,11 @@ Partial Class ProductosyServicios TxtFechaVigenciaRSCO.Text = "" End If End If - - - - Else TxtRegistroRSCO.Text = "" TxtFechaVigenciaRSCO.Text = "" ChkFechaIndeterminadaRSCO.Checked = False End If - - - Else Alert("El Producto o Servicio Solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia) RegistraScript("$('#C_Tab_TabPaquetes_tab').css('display' , 'none')") @@ -1467,7 +1452,7 @@ Partial Class ProductosyServicios TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, CveProveedor, True, ChkAplicaParaVenta.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveMetodoInv, EsPaquete, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, FuePorXML:=False, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarca, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, - AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal, CveConceptoContable:=DdlConceptoRelacionado.SelectedValue.ToEntero, + AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal, CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal, CveMoneda:=DdlMoneda.SelectedValue.ToEntero, RetISR:=(TxtRetISR.Text.Trim.ToDouble / 100), PrecioMinimo:=TxtPrecioMinimo.Text.ToDecimal, CveTipoFactor:=DdlTipoFactor.SelectedValue.ToEntero, CveFraccionArancelaria:=DdlFraccionArancelaria.SelectedValue.ToEntero, @@ -1475,7 +1460,7 @@ Partial Class ProductosyServicios CveModelo:=DdlModelo.SelectedValue.ToEntero(), CveMedida:=DdlMedida.SelectedValue.ToEntero(), CveRinTamaño:=DdlRin.SelectedValue.ToEntero(), CveTipoEmpacado:=DdlEmpacado.SelectedValue.ToEntero(), CveTipoOrganico:=DdlTipoOrganico.SelectedValue.ToEntero(), ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, - ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked, + ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked, CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim, @@ -1538,7 +1523,7 @@ Partial Class ProductosyServicios TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, CveProveedor, True, ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv, EsPaquete, DdlSATPS.SelectedValue.ToEntero, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarca, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, - AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal, CveConceptoContable:=DdlConceptoRelacionado.SelectedValue.ToEntero, + AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal, CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal, CveMoneda:=DdlMoneda.SelectedValue.ToEntero, RetISR:=(TxtRetISR.Text.Trim.ToDouble / 100), PrecioMinimo:=TxtPrecioMinimo.Text.ToDecimal, CveTipoFactor:=DdlTipoFactor.SelectedValue.ToEntero, CveFraccionArancelaria:=DdlFraccionArancelaria.SelectedValue.ToEntero, @@ -1546,7 +1531,7 @@ Partial Class ProductosyServicios CveModelo:=DdlModelo.SelectedValue.ToEntero(), CveMedida:=DdlMedida.SelectedValue.ToEntero(), CveRinTamaño:=DdlRin.SelectedValue.ToEntero(), CveTipoEmpacado:=DdlEmpacado.SelectedValue.ToEntero(), CveTipoOrganico:=DdlTipoOrganico.SelectedValue.ToEntero(), ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, - ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked, + ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked, CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim, CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal, @@ -3136,14 +3121,14 @@ Partial Class ProductosyServicios (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, DdlProveedor.txtValue.Value.ToEntero, True, ChkAplicaParaVenta.Checked, UsuarioActual.CveUsuario, CveEmpresaFranquicia, CveMetodoInv, EsPaquete, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, FuePorXML:=False, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarcaFranquicia, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal, - CveConceptoContable:=DdlConceptoRelacionado.SelectedValue.ToEntero, CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero, + CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal, CveMoneda:=DdlMoneda.SelectedValue.ToEntero, RetISR:=(TxtRetISR.Text.Trim.ToDouble / 100), PrecioMinimo:=TxtPrecioMinimo.Text.ToDecimal, CveTipoFactor:=DdlTipoFactor.SelectedValue.ToEntero, CveFraccionArancelaria:=DdlFraccionArancelaria.SelectedValue.ToEntero, CveClasificacionDetalle:=CveTipo, CveTamaño:=DdlTamanio.SelectedValue.ToEntero, CveModelo:=CveModelo, CveMedida:=CveMedida, CveRinTamaño:=CveRin, ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, - CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, + CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, - EsOutSourcing:=ChkEsOutSourcing.Checked, TiempoCaducidad:=TxtTiempoCaducidad.Text.ToEntero()) > 0 Then + TiempoCaducidad:=TxtTiempoCaducidad.Text.ToEntero()) > 0 Then 'Alert(String.Format("Error al agregar el nuevo producto en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa"))) Return True @@ -3156,14 +3141,14 @@ Partial Class ProductosyServicios (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, -1, True, ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv, EsPaquete, DdlSATPS.SelectedValue.ToEntero, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarcaFranquicia, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal, - CveConceptoContable:=DdlConceptoRelacionado.SelectedValue.ToEntero, CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked, + CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal, CveMoneda:=DdlMoneda.SelectedValue.ToEntero, RetISR:=(TxtRetISR.Text.Trim.ToDouble / 100), PrecioMinimo:=TxtPrecioMinimo.Text.ToDecimal, CveTipoFactor:=DdlTipoFactor.SelectedValue.ToEntero, CveFraccionArancelaria:=DdlFraccionArancelaria.SelectedValue.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveClasificacionDetalle:=CveTipo, CveTamaño:=DdlTamanio.SelectedValue.ToEntero, CveModelo:=CveModelo, CveMedida:=CveMedida, CveRinTamaño:=CveRin, ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, - EsOutSourcing:=ChkEsOutSourcing.Checked, AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, + AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TxtTiempoCaducidad.Text.ToEntero()) Then Return True From 09a4f7f02120055871fe1c56613a247df9823701 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 1 Jun 2023 20:14:50 -0700 Subject: [PATCH 14/20] -- cambios en valida y contabiliza --- App_Code/ClsContabilidad.vb | 14 ++++++++++---- App_Code/ClsPaginas.vb | 6 +++--- Bancos/PopIECompras.aspx.vb | 2 +- Bancos/ProveedoresAbonar.aspx.vb | 8 +++----- Compras/PopUpVerFactura.aspx.vb | 27 +++++++++++++++------------ 5 files changed, 32 insertions(+), 25 deletions(-) diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 69145f2ca..18b04303a 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -1350,7 +1350,7 @@ Public Class ClsContabilidad ContaFolio = ObjConta.Folio.ToString End If - If tIdPoliza > 0 AndAlso GetContabilizacionDiarioDetalle(CvePrePoliza) Then + If tIdPoliza > 0 AndAlso GetContabilizacionDiarioDetalle(CvePrePoliza, Empresa.CveEmpresa) Then Dim tipoMovimiento As Boolean = False Dim CveConceptoContable As Integer Dim SigReferencia As String = "" @@ -2007,12 +2007,13 @@ Public Class ClsContabilidad Return Retorno End Function - Public Function GetContabilizacionDiarioDetalle(CvePrePoliza As Integer) As Boolean 'Editado por charlie + Public Function GetContabilizacionDiarioDetalle(CvePrePoliza As Integer, CveEmpresa As Integer) As Boolean 'Editado por charlie Dim Retorno As Boolean = False DataAdapter("PA_Conta_ContabilizacionDiariosDetalleGet") With SqlAdapter.SelectCommand.Parameters .Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With Try @@ -6375,7 +6376,9 @@ Public Class ClsContabilidad Return Retorno End Function - Public Function ValidacionesPrePoliza(CvePrePoliza As Integer, Opcion As Integer, ByRef UsuarioActual As Usuario, Optional CveVenta As Integer = -1, Optional AutoConta As Boolean = True) As Boolean + Public Function ValidacionesPrePoliza(CvePrePoliza As Integer, ByRef UsuarioActual As Usuario, Optional Opcion As Integer = 1, + Optional CveVenta As Integer = -1, Optional AutoConta As Boolean = True, + Optional ObjConta As ClsContPAQi = Nothing) As Boolean Dim Retorno = False DataAdapter("PA_Conta_PrePolizasValidacion") @@ -6402,10 +6405,13 @@ Public Class ClsContabilidad If MensajePolizaDescuadre = "" AndAlso AutoConta Then If UsuarioActual.Empresa.TipoContabilidad = 2 Then ' el tipocontabilidad deberá activarse en el PA - If Not ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then + If Not ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjConta) Then MensajePolizaDescuadre = Mensaje.ToString ' regresa el mensaje de contabilización + Retorno = False End If End If + Else + Retorno = False End If Catch ex As Exception diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 984ed624c..f1f164ec2 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4306,15 +4306,15 @@ Public Class ClsPaginas End If Else LocalStopwatch.Value.Restart() + If EsProduccion Then + If UsuarioActual.CveEmpresa.Contiene(141, 152, 159, 160, 161, 162, 166) Then System.Threading.Thread.Sleep(750) + End If If Not Page.IsPostBack Then 'If Not CType(Session("UsuarioSIG"), Usuario).SeleccionoEmpresa AndAlso Request.ServerVariables("URL") <> "/Sistemas/PopUpSeleccionarEmpresa.aspx" Then ' Response.Redirect("/Sistemas/PopUpSeleccionarEmpresa.aspx") ' 'Alert(Request.ServerVariables("URL")) 'End If ''codigo temporal - If EsProduccion Then - If UsuarioActual.CveEmpresa.Contiene(141, 152, 159, 160, 161, 162, 166) Then System.Threading.Thread.Sleep(750) - End If Dim i As Integer = Obt_ClavePagina(Request.ServerVariables("URL")) Dim FailURL As String = $"{FormsAuthentication.DefaultUrl}?ADCod={Encripta($"CveModulo={i}")}" diff --git a/Bancos/PopIECompras.aspx.vb b/Bancos/PopIECompras.aspx.vb index 9c608cf81..835763b90 100644 --- a/Bancos/PopIECompras.aspx.vb +++ b/Bancos/PopIECompras.aspx.vb @@ -1607,7 +1607,7 @@ Partial Class Bancos_PopIECompras End Select Dim ObjConta As ClsContPAQi = Nothing - If MsgError = "" AndAlso ObjMov.ValidacionesPrePoliza(CvePrePoliza, 5, UsuarioActual) Then + If MsgError = "" AndAlso ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=5) Then If ObjMov.ValorPolizaDescuadre > 0 Then MsgError = ObjMov.MensajePolizaDescuadre GuardaLogAD($"Bancos/PopIECompras | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index da0db2b0c..79c04fe66 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -972,16 +972,14 @@ Partial Class Bancos_ProveedoresAbonar 'Conta ContPAQ If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then - If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjConta) Then - ' Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion) + 'If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjConta) Then + If ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, ObjConta:=ObjConta) Then IDPoliza = ObjMov.ContaIdPoliza Else Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError) MsgError = "Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico" End If - End If - Else MsgError = "No se pudo insertar la póliza" End If @@ -1699,7 +1697,7 @@ Partial Class Bancos_ProveedoresAbonar Next If MsgError.Trim.Length = 0 AndAlso CvePrePoliza > 0 Then - If MsgError = "" AndAlso ObjConta.ValidacionesPrePoliza(CvePrePoliza, 5, UsuarioActual) Then + If MsgError = "" AndAlso ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, 5) Then If ObjConta.ValorPolizaDescuadre > 0 Then MsgError = ObjConta.MensajePolizaDescuadre + " " + ObjConta.ValorDiferencia GuardaLogAD($"Bancos/ProveedoresAbonar | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index fd381693d..931cf3ea0 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -13,7 +13,6 @@ Imports Stimulsoft.Report.Web Partial Class PopUpVerFactura Inherits ClsPaginas - Private Shared missing As Object = System.Reflection.Missing.Value #Region " PROPIEDADES " Public Property DtMovimientos() As DataTable @@ -6818,6 +6817,7 @@ Partial Class PopUpVerFactura Dim DtDetalle As New DataTable Dim CveTipoPolizaImp As Integer Dim FolioPoliza As String + Dim Fecha As Date Dim ConceptoPolizaImp As String Dim CveMonedaImp As Integer Dim TipoPolImp As String @@ -6828,6 +6828,7 @@ Partial Class PopUpVerFactura CveTipoPolizaImp = drp("CveTipoPoliza").ToString.ToEntero ConceptoPolizaImp = drp("Concepto").ToString FolioPoliza = drp("FolioPoliza").ToString + Fecha = drp("Fecha").ToString.ToDate CveMonedaImp = drp("CveMoneda").ToString.ToEntero Dim TipoPolizaString As String = If(CveTipoPolizaImp = 1, "I", If(CveTipoPolizaImp = 2, "E", "D")).ToString @@ -6856,35 +6857,37 @@ Partial Class PopUpVerFactura ObjConta.Dispose() Else RutaReporte = RutaFormatoReporte("Polizas.rdlc") + 'If ObjConta.GetPrePolizasImpresion(UsuarioActual.CveEmpresa, Fecha, Fecha, CVePrePoliza:=CvePrePoliza) Then If ObjConta.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then - Dim dr As DataRow + 'DtDetalle = ObjConta.DtResultados + 'Dim dr As DataRow DtDetalle = ObjConta.DtResultados.FiltraParametros("Contabilizable = 1", "Orden") - dr = DtDetalle.Rows(0) + 'dr = DtDetalle.Rows(0) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) - params.Add(New ReportParameter("TipoPoliza", dr("TipoPoliza").ToString)) - params.Add(New ReportParameter("Finicio", dr("Fecha").ToString.ToDate.ToShortDateString)) - params.Add(New ReportParameter("FFin", dr("Fecha").ToString.ToDate.ToShortDateString)) - params.Add(New ReportParameter("Numero", dr("FolioPoliza").ToString)) + params.Add(New ReportParameter("TipoPoliza", TipoPolImp)) + params.Add(New ReportParameter("Finicio", Fecha.ToShortDateString)) + params.Add(New ReportParameter("FFin", Fecha.ToShortDateString)) + params.Add(New ReportParameter("Numero", FolioPoliza)) params.Add(New ReportParameter("Moneda", If(CveMonedaImp = 2, "Dolar", "Peso Mexicano"))) params.Add(New ReportParameter("CodigoPostal", "")) If UsuarioActual.CveEmpresa.Contiene(141) Then - params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToString("dd/MM/yyyy hh:mm:ss"))) + params.Add(New ReportParameter("Fecha", Fecha.ToString("dd/MM/yyyy hh:mm:ss"))) Else - params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString)) + params.Add(New ReportParameter("Fecha", Fecha.ToShortDateString)) End If If UsuarioActual.CveEmpresa.Contiene(119, 141) Then - params.Add(New ReportParameter("UsuarioRegistro", GlobalDTUsuarios(dr("CveUsuario").ToString.ToEntero).FiltroPrimeroValor("Nombre"))) + params.Add(New ReportParameter("UsuarioRegistro", GlobalDTUsuarios(drp("CveUsuario").ToString.ToEntero).FiltroPrimeroValor("Nombre"))) End If If UsuarioActual.CveEmpresa.Contiene(140, 141) Then params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) End If End If ObjConta.Dispose() - End If + End If - ImprimirPDF(RutaReporte, DtDetalle, params, $"P{TipoPolizaString}{FolioPoliza}", Formato:="PDF") + ImprimirPDF(RutaReporte, DtDetalle, params, $"P{TipoPolizaString}{FolioPoliza}", Formato:="PDF") Else Alert("El documento solicitado no existe, favor de revisar su búsqueda.", TipoMensaje.MsgAdvertencia) From 8f79a060084d1ae54772190d77a835b3f6c140c8 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 1 Jun 2023 20:15:18 -0700 Subject: [PATCH 15/20] -- si la empresa no deduce ieps, no la carga --- Contabilidad/RepIVA.aspx.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Contabilidad/RepIVA.aspx.cs b/Contabilidad/RepIVA.aspx.cs index f8c0f1cde..87d51dbeb 100644 --- a/Contabilidad/RepIVA.aspx.cs +++ b/Contabilidad/RepIVA.aspx.cs @@ -85,10 +85,14 @@ public partial class Contabilidad_RepIVA : ClsPaginas { GvT.DataSource = ObjCont.DtResultados; DtIVATrasladado = ObjCont.DtResultados; - if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 1, DdlCuenta.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) - { - GvIEPSA.DataSource = ObjCont.DtResultados; - DtIEPSA = ObjCont.DtResultados; + + if (UsuarioActual.Empresa.Funcionalidad(713) == "1") + { + if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 1, DdlCuenta.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) + { + GvIEPSA.DataSource = ObjCont.DtResultados; + DtIEPSA = ObjCont.DtResultados; + } } if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 2, DdlCuenta.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) From 70218d26f3dd388060e3054a8fe5cd0045e4c16f Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 1 Jun 2023 20:16:02 -0700 Subject: [PATCH 16/20] -- cambio en valida-contabiliza --- Bancos/FluctuacionCambiaria.aspx.vb | 117 +++++++++++++--------------- 1 file changed, 52 insertions(+), 65 deletions(-) diff --git a/Bancos/FluctuacionCambiaria.aspx.vb b/Bancos/FluctuacionCambiaria.aspx.vb index 48bb923cc..47361b78d 100644 --- a/Bancos/FluctuacionCambiaria.aspx.vb +++ b/Bancos/FluctuacionCambiaria.aspx.vb @@ -451,7 +451,13 @@ Partial Class Bancos_FluctuacionCambiaria End If Next - Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 1, CveBitacora, UsuarioActual.CveEmpresa) + If Not ErrorRegistrar AndAlso Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 1, CveBitacora, UsuarioActual.CveEmpresa) Then + ErrorRegistrar = True + End If + + If Not ErrorRegistrar AndAlso Not Conta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then + ErrorRegistrar = True + End If End If @@ -529,10 +535,11 @@ Partial Class Bancos_FluctuacionCambiaria End If Next - If Not ErrorRegistrar Then - If Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 2, CveBitacora, UsuarioActual.CveEmpresa) Then - ErrorRegistrar = True - End If + If Not ErrorRegistrar AndAlso Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 2, CveBitacora, UsuarioActual.CveEmpresa) Then + ErrorRegistrar = True + End If + If Not ErrorRegistrar AndAlso Not Conta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then + ErrorRegistrar = True End If End If @@ -631,7 +638,10 @@ Partial Class Bancos_FluctuacionCambiaria Next - If Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 3, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then + If Not ErrorRegistrar AndAlso Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 3, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then + ErrorRegistrar = True + End If + If Not ErrorRegistrar AndAlso Not Conta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then ErrorRegistrar = True End If @@ -723,10 +733,12 @@ Partial Class Bancos_FluctuacionCambiaria ErrorRegistrar = True Exit For End If - Next - If Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 4, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then + If Not ErrorRegistrar AndAlso Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 4, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then + ErrorRegistrar = True + End If + If Not ErrorRegistrar AndAlso Not Conta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then ErrorRegistrar = True End If @@ -809,22 +821,13 @@ Partial Class Bancos_FluctuacionCambiaria End If Next - Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 5, CveBitacora, UsuarioActual.CveEmpresa) + If Not ErrorRegistrar AndAlso Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 5, CveBitacora, UsuarioActual.CveEmpresa) Then + ErrorRegistrar = True + End If + If Not ErrorRegistrar AndAlso Not Conta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then + ErrorRegistrar = True + End If - - If Not ErrorRegistrar Then - - If Conta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then - If Conta.ValorPolizaDescuadre > 0 Then - ErrorRegistrar = True - GuardaLogAD($"Banc/FluctuaA | Error:{Conta.MensajePolizaDescuadre} Diferencia:{Conta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") - End If - Else - Alert("No se pudo validar la prepoliza de cuadre.", TipoMensaje.MsgAdvertencia) - End If - - End If - If Not ErrorRegistrar Then Conta.Commit() BtnGeneraAcreedores.Visible = False @@ -896,7 +899,12 @@ Partial Class Bancos_FluctuacionCambiaria End If Next - Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 6, CveBitacora, UsuarioActual.CveEmpresa) + If Not ErrorRegistrar AndAlso Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 6, CveBitacora, UsuarioActual.CveEmpresa) Then + ErrorRegistrar = True + End If + If Not ErrorRegistrar AndAlso Not Conta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then + ErrorRegistrar = True + End If If Not ErrorRegistrar Then Conta.Commit() @@ -981,32 +989,21 @@ Partial Class Bancos_FluctuacionCambiaria ErrorRegistrar = True End If End If - Next - - Dim SeContabilizo As Boolean = False - - Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1" - If AutoConta Then - If Conta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then - SeContabilizo = True - Else - ErrorRegistrar = True - Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError) - End If + Next + + If Not ErrorRegistrar AndAlso Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 7, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then + ErrorRegistrar = True + End If + If Not ErrorRegistrar AndAlso Not Conta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then + ErrorRegistrar = True End If - If Not ErrorRegistrar Then - - If Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 7, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then - ErrorRegistrar = True - End If - - If Not ErrorRegistrar Then - Conta.Commit() - ' ObjContPaq.Commit() - Alert(String.Format("La Fluctuación se ha generado
Ver PrePóliza", CvePrePoliza), TipoMensaje.MsgInformacion) - CargaDatosBancosCuentas() - End If + If Not ErrorRegistrar Then + Conta.Commit() + ' ObjContPaq.Commit() + Alert(String.Format("La Fluctuación se ha generado
Ver PrePóliza", CvePrePoliza), TipoMensaje.MsgInformacion) + CargaDatosBancosCuentas() + Else Conta.RollBack() ' ObjContPaq.Dispose() @@ -1145,27 +1142,17 @@ Partial Class Bancos_FluctuacionCambiaria End If Else 'actualizar el TC del IE, al nuevo TC de la fluctuación - Banco.UpdateBancosTipoCambioValuacion(TCCierreFluctuacion, gvr.DataKey("CveIE").ToEntero, UsuarioActual.CveEmpresa) - + Banco.UpdateBancosTipoCambioValuacion(TCCierreFluctuacion, gvr.DataKey("CveIE").ToEntero, UsuarioActual.CveEmpresa) + End If Next - If Not ErrorRegistrar Then - - 'Inicio auto conta - Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1" - If AutoConta Then - - If Conta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then - Else - Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError) - End If - End If - - ' If ObjContPaq IsNot Nothing Then ObjContPaq.Commit() - 'Fin autoconta - Conta.Commit() + If Not ErrorRegistrar AndAlso Not Conta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then + ErrorRegistrar = True + End If + If Not ErrorRegistrar Then + Conta.Commit() Alert(String.Format("La Fluctuación se ha generado
Ver Póliza", CvePrePoliza), TipoMensaje.MsgInformacion) Else Conta.RollBack() From f31d239caf259515f70e84cdcf46b193055c3f3f Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 1 Jun 2023 20:16:14 -0700 Subject: [PATCH 17/20] =?UTF-8?q?--=20vsta=20de=20retenci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/Compras.aspx | 8 ++++---- Compras/Compras.aspx.vb | 44 +++++++++++++---------------------------- 2 files changed, 18 insertions(+), 34 deletions(-) diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index 43b15033c..7fd632990 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -1045,7 +1045,7 @@ - % + @@ -4429,7 +4429,7 @@
- + <%----%> <%-- @@ -4439,7 +4439,7 @@
- + <%-- @@ -4526,7 +4526,7 @@
-
+
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 1df16acb0..81b9f6012 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1149,7 +1149,6 @@ Partial Class Compras_Compras End Set End Property - Private Property UUIDSList As List(Of String) Get If ViewState("UUIDSList") Is Nothing Then @@ -1163,8 +1162,6 @@ Partial Class Compras_Compras ViewState("UUIDSList") = value End Set End Property - - Private Property NumeroReembolsoOriginal As String Get If ViewState("NumeroReembolsoOriginal") Is Nothing Then @@ -1227,6 +1224,9 @@ Partial Class Compras_Compras If UsuarioActual.Empresa.Funcionalidad(117) <> "" Then btnProrateo.Visible = True End If + If UsuarioActual.Empresa.Funcionalidad(713) = "1" Then + divIEPSModal.Visible = True + End If If UsuarioActual.Empresa.Funcionalidad(303) <> "" Then btnProrateo2.Visible = True @@ -2344,7 +2344,7 @@ Partial Class Compras_Compras If OtrosImpuestos > 0 Or TrasladoIEPS > 0 Then - If UsuarioActual.Empresa.Funcionalidad(713).ToEntero = 1 Then + If UsuarioActual.Empresa.Funcionalidad(713) = "1" Then 'Si tiene funcionalidad y es Acreedor se muestra modal If CveTipoProveedor.Contiene(2, 3) Then ' Acreedor RegistraScript("$('#ModalIEPS').modal({ backdrop: 'static', keyboard: false },'show');") @@ -2416,8 +2416,8 @@ Partial Class Compras_Compras HdnCompraSaldo.Value = TotalTemp.ToString CompraSaldo = TotalTemp - LblRetIVA.Text = If(RetIVATemp > 0, (TmpDT.MAX("RetIVAPorcentaje").ToDecimal() * 100).FormatoNumero(3), "") - LblRetISR.Text = If(RetISRTemp > 0, (TmpDT.MAX("RetISRPorcentaje").ToDecimal() * 100).FormatoNumero(3), "") + LblRetIVA.Text = If(RetIVATemp > 0, (TmpDT.MAX("RetIVAPorcentaje").ToDecimal() * 100).FormatoNumero(4), "") + LblRetISR.Text = If(RetISRTemp > 0, (TmpDT.MAX("RetISRPorcentaje").ToDecimal() * 100).FormatoNumero(4), "") 'ASIGNA VALORES ORIGINALES PARA GUARDAR AsignaValoresOriginales(SubtotalTemp, Subtotal2Temp, IVATemp, RetIVATemp, RetISRTemp, Total) @@ -2626,8 +2626,8 @@ Partial Class Compras_Compras LblUsuarioCaptura.Text = dr("Usuario").ToString LitFechCaptura.Text = dr("FechaIng").ToString.ToDate.ToShortDateString LitFechCaptura.ToolTip = dr("FechaIng").ToString - LblRetIVA.Text = If(dr("RetIVA").ToString.ToDecimal > 0, TmpDT.MAX("RetIVAPorcentaje").ToDecimal * 100, 0).ToString.FormatoNumero(3) '(If(SubTotal2 > 0, (RetencionIVA / SubTotal2), 0) * 100).FormatoNumero(3) + "%" - LblRetISR.Text = If(dr("RetISR").ToString.ToDecimal > 0, TmpDT.MAX("RetISRPorcentaje").ToDecimal * 100, 0).ToString.FormatoNumero(3) '(If(SubTotal2 > 0, (RetencionISR / SubTotal2), 0) * 100).FormatoNumero(3) + LblRetIVA.Text = If(dr("RetIVA").ToString.ToDecimal > 0, TmpDT.MAX("RetIVAPorcentaje").ToDecimal * 100, 0).ToString.FormatoNumero(4) '(If(SubTotal2 > 0, (RetencionIVA / SubTotal2), 0) * 100).FormatoNumero(3) + "%" + LblRetISR.Text = If(dr("RetISR").ToString.ToDecimal > 0, TmpDT.MAX("RetISRPorcentaje").ToDecimal * 100, 0).ToString.FormatoNumero(4) '(If(SubTotal2 > 0, (RetencionISR / SubTotal2), 0) * 100).FormatoNumero(3) If dr("TipoFactura").ToString <> "CFDi" Then LblTipoFact.Text = dr("TipoFactura").ToString : divTipoFactura.Visible = True ViewState("CveFactura") = dr("CveFactura").ToString.ToEntero ViewState("IdPoliza") = dr("IdPoliza").ToString.ToEntero @@ -16286,8 +16286,8 @@ Partial Class Compras_Compras UpAnticipos.Update() End If - LblRetIVA.Text = TmpDT.MAX("RetIVAPorcentaje").ToString '(If(SubTotal2 > 0, (RetencionIVA / SubTotal2), 0) * 100).FormatoNumero(3) + "%" - LblRetISR.Text = TmpDT.MAX("RetISRPorcentaje").ToString '(If(SubTotal2 > 0, (RetencionISR / SubTotal2), 0) * 100).FormatoNumero(3) + LblRetIVA.Text = If(TxtRetIVA.Text.ToDecimal > 0, (TmpDT.MAX("RetIVAPorcentaje").ToDecimal() * 100).FormatoNumero(4), "") + LblRetISR.Text = If(TxtRetISR.Text.ToDecimal > 0, (TmpDT.MAX("RetISRPorcentaje").ToDecimal() * 100).FormatoNumero(4), "") 'IMPORTES DE RESTRICCION TxtDocumentoImporteFE.Text = Total.ToString.FormatoNumero(2) @@ -16641,12 +16641,7 @@ Partial Class Compras_Compras DdlProyecto.SelectedValueExist("-1") End If - CargaSubProyecto() - - - 'DdlProyecto.SelectedValueExist(GvRow.DataKey("CveProyecto")) - DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto")) DdlSubProyecto_SelectedIndexChanged(Nothing, Nothing) @@ -16661,7 +16656,6 @@ Partial Class Compras_Compras If PS("IVA").ToString.ToEntero() <> -1 Then ' DdlIVA.Enabled = False Else - 'DdlIVA.Enabled = If(CveCompra > 0 Or CveFactura > 0 Or OCVinculada, False, True) End If End If @@ -16675,24 +16669,14 @@ Partial Class Compras_Compras DdlIVA.SelectedValue = "1.08" End Select - - - 'TxtIVAModal.Text = FormatoNumero(GvRow.DataKey("IVAPorcentaje").ToDouble * 100, 0) - - - - TxtRetIVAModal.Text = FormatoNumero(GvRow.DataKey("RetIVAPorcentaje").ToDouble * 100, 2) - TxtRetISRModal.Text = FormatoNumero(GvRow.DataKey("RetISRPorcentaje").ToDouble * 100, 2) + TxtRetIVAModal.Text = FormatoNumero(GvRow.DataKey("RetIVAPorcentaje").ToDouble * 100, 4) + TxtRetISRModal.Text = FormatoNumero(GvRow.DataKey("RetISRPorcentaje").ToDouble * 100, 4) TxtIEPSModal.Text = FormatoNumero(GvRow.DataKey("IEPSPSPorcentaje").ToDouble * 100, 2) - ViewState("RetIVA") = GvRow.DataKey("RetIVAPorcentaje").ToDouble ViewState("RetISR") = GvRow.DataKey("RetISRPorcentaje").ToDouble - 'TxtRetIVAModal.Text = FormatoNumero(ViewState("RetIVA").ToString().ToDouble * 100, 0) - 'TxtRetISRModal.Text = FormatoNumero(ViewState("RetISR").ToString().ToDouble * 100, 0) - - TxtPrecio.Text = GvRow.DataKey("PU").FormatoNumero(6) - TxtDescuentoModal.Text = GvRow.DataKey("Descuento").FormatoNumero(6) + TxtPrecio.Text = GvRow.DataKey("PU").ToDecimal.ToString("#,##0.00####") + TxtDescuentoModal.Text = GvRow.DataKey("Descuento").ToDecimal.ToString("#,##0.00####") LblTotalPS.Text = GvRow.DataKey("Total").FormatoNumero 'FUNCIONALIDAD DE SEGUIR AGREGANDO (NO CERRAR MODAL) From 38316192d0893da2403f743c5794ca5270070fc9 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 1 Jun 2023 20:16:27 -0700 Subject: [PATCH 18/20] -mandar cvesubproyecto de almacen --- Inventarios/EntregaAlmacen.aspx.vb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index aebc628f5..79d6dd7ab 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -3128,13 +3128,11 @@ Partial Class Inventarios_EntregaAlmacen cont += 1 Next - - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ValorMultiplicador * TotalCosto, Serie, 68, Serie, Fecha, IdCtaContableAlmacen, -1, CveVenta:=CveVentaSurtir, CveCliente:=CveCliente, CveMovimientoAlmacen:=CveMovimiento, CveSubProyecto:=CveSubProyecto, ImporteMX:=ValorMultiplicador * TotalCosto) Then + Dim tCveSubProyectoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero).FiltroPrimeroValor("CveSubProyecto").ToEntero() + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ValorMultiplicador * TotalCosto, Serie, 68, Serie, Fecha, IdCtaContableAlmacen, -1, CveVenta:=CveVentaSurtir, CveCliente:=CveCliente, CveMovimientoAlmacen:=CveMovimiento, CveSubProyecto:=tCveSubProyectoAlmacen, ImporteMX:=ValorMultiplicador * TotalCosto) Then ErrorMovInv = True End If - - If Not ErrorMovInv AndAlso ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then If ObjConta.ValorPolizaDescuadre > 0 Then GuardaLogAD($"Inventario/EntregaAlmacen | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") @@ -3142,8 +3140,6 @@ Partial Class Inventarios_EntregaAlmacen End If End If - - Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1" If AutoConta And Not ErrorMovInv Then From f321ef41fdc1dc355b25434969bc5edf98d9fecb Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 1 Jun 2023 20:17:20 -0700 Subject: [PATCH 19/20] -- parametro empresa. contabilzaciondiariodetalle --- Contabilidad/RegPrePolizaS.aspx.vb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 90208a628..169028c41 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -475,7 +475,7 @@ Partial Class ContabilidadC_RegPrePolizaS CargaCuentasContables() End If - ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza) + ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}") If dr("Modulo").ToString.Contiene("Banc/FluctuaA", "Banc/FluctuaC", "Banc/FluctuaV", "Banc/FluctuaFilial", "Banc/FluctuaAD") Then @@ -1181,7 +1181,6 @@ Partial Class ContabilidadC_RegPrePolizaS Try - Dim Retorno As Boolean = ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario) If Retorno Then @@ -1846,8 +1845,6 @@ Partial Class ContabilidadC_RegPrePolizaS GvPrePoliza.DataBind() UpPrePoliza.Update() GvPrePoliza.Visible = True - - GvPrePoliza.Columns(11).Visible = True GvPrePoliza.Rows(IndiceGrid).FCCheckBox("chkModificado").Checked = True TxtTotalCargos.Text = DtMovimientos.SUMD("Cargo").ToString.FormatoNumero @@ -2770,7 +2767,7 @@ Partial Class ContabilidadC_RegPrePolizaS CargaCuentasContables() End If - ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePolizaOrigen) + ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePolizaOrigen, UsuarioActual.CveEmpresa) DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}") From 7dc9f46e5b5efb76bb77393a75e28c2319470e25 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Fri, 2 Jun 2023 09:22:13 -0700 Subject: [PATCH 20/20] Compras decimales retenciones, popcambairta empresa --- App_Code/ClsBancos.vb | 1 + Compras/Compras.aspx.vb | 18 +++++----- Sistemas/PopUpSeleccionarEmpresa.aspx.vb | 9 +++-- Sistemas/UsuarioDetalle.aspx.vb | 1 + Ventas/Clientes.aspx.vb | 44 ++++++++++++++++++++---- 5 files changed, 56 insertions(+), 17 deletions(-) diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 254b0477c..81d76146e 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -2966,6 +2966,7 @@ Public Class ClsBancos SqlAdapter.SelectCommand.Parameters.Add("@CveCredito", SqlDbType.Int).Value = CveCredito Try + SqlAdapter.SelectCommand.CommandTimeout = 0 SqlAdapter.Fill(Data) Retorno = True Catch Ex1 As SqlException diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index cbeea38ae..fdf190806 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -8082,7 +8082,7 @@ Partial Class Compras_Compras End If Else - Alert("existe una diferencia de más de 0.05 entre el IVA de la compra y los detalles.", TipoMensaje.MsgAdvertencia) + Alert($"existe una diferencia de {DiferenciaIVas} entre el IVA de la compra y los detalles.", TipoMensaje.MsgAdvertencia) Respuesta = False End If Else @@ -8169,7 +8169,7 @@ Partial Class Compras_Compras End If Else - Alert("existe una diferencia de más de 0.05 entre el RetIVA de la compra y los detalles.", TipoMensaje.MsgAdvertencia) + Alert($"existe una diferencia de {DiferenciaRetIVA} entre el RetIVA de la compra y los detalles.", TipoMensaje.MsgAdvertencia) Respuesta = False End If Else @@ -8259,7 +8259,7 @@ Partial Class Compras_Compras End If Else - Alert("existe una diferencia de más de 0.05 entre el RetISR de la compra y los detalles.", TipoMensaje.MsgAdvertencia) + Alert($"existe una diferencia de {DiferenciaRetISR} entre el RetISR de la compra y los detalles.", TipoMensaje.MsgAdvertencia) Respuesta = False End If Else @@ -16696,9 +16696,9 @@ Partial Class Compras_Compras - TxtRetIVAModal.Text = FormatoNumero(GvRow.DataKey("RetIVAPorcentaje").ToDouble * 100, 2) - TxtRetISRModal.Text = FormatoNumero(GvRow.DataKey("RetISRPorcentaje").ToDouble * 100, 2) - TxtIEPSModal.Text = FormatoNumero(GvRow.DataKey("IEPSPSPorcentaje").ToDouble * 100, 2) + TxtRetIVAModal.Text = FormatoNumero(GvRow.DataKey("RetIVAPorcentaje").ToDouble * 100, 6) + TxtRetISRModal.Text = FormatoNumero(GvRow.DataKey("RetISRPorcentaje").ToDouble * 100, 6) + TxtIEPSModal.Text = FormatoNumero(GvRow.DataKey("IEPSPSPorcentaje").ToDouble * 100, 6) ViewState("RetIVA") = GvRow.DataKey("RetIVAPorcentaje").ToDouble ViewState("RetISR") = GvRow.DataKey("RetISRPorcentaje").ToDouble @@ -16901,14 +16901,14 @@ Partial Class Compras_Compras End If If TxtIEPSModal.Text = "" Then - TxtIEPSModal.Text = FormatoNumero(PS("IEPSPorcentaje").ToString.ToDecimal * 100, 2) + TxtIEPSModal.Text = FormatoNumero(PS("IEPSPorcentaje").ToString.ToDecimal * 100, 6) End If ViewState("IEPSPSIVA") = If(PS("IEPSGrabaIVA").ToString = "True", PS("IEPSPorcentaje").ToString.ToDouble, 0) 'TxtIVAModal.Text = FormatoNumero(ViewState("IVAPS").ToString().ToDouble * 100, 0) - TxtRetIVAModal.Text = FormatoNumero(ViewState("RetIVA").ToString().ToDouble * 100, 2) - TxtRetISRModal.Text = FormatoNumero(ViewState("RetISR").ToString().ToDouble * 100, 2) + TxtRetIVAModal.Text = FormatoNumero(ViewState("RetIVA").ToString().ToDouble * 100, 6) + TxtRetISRModal.Text = FormatoNumero(ViewState("RetISR").ToString().ToDouble * 100, 6) If (CveFactura > 0 Or CveCompra > 0) And TxtIEPS.Text.ToDecimal = 0 And PS("IEPSPorcentaje").ToString.ToDecimal > 0 Then diff --git a/Sistemas/PopUpSeleccionarEmpresa.aspx.vb b/Sistemas/PopUpSeleccionarEmpresa.aspx.vb index 684dd4553..4e7e19c10 100644 --- a/Sistemas/PopUpSeleccionarEmpresa.aspx.vb +++ b/Sistemas/PopUpSeleccionarEmpresa.aspx.vb @@ -16,7 +16,10 @@ Partial Class PopUpSeleccionarEmpresa End If End Sub - Private Sub GetEmpresas() + Private Sub GetEmpresas() + + + GlobalDTUsuarios(-1, -1) = Nothing 'Esto es por los cambios de contaseña Dim Dt As Data.DataTable = GlobalDTUsuarios(UsuarioActual.CveUsuario) If Dt IsNot Nothing Then @@ -87,7 +90,9 @@ Partial Class PopUpSeleccionarEmpresa RegistraScript("Ir3();") End If End If - dt.Dispose() + dt.Dispose() + Else + Alert($"Usuario Nulo {gvr.DataKey("Usuario")} , {gvr.DataKey("Contraseña")}, {IMEI}, {gvr.DataKey("CveEmpresa").ToEntero}", TipoMensaje.MsgAdvertencia) End If End If diff --git a/Sistemas/UsuarioDetalle.aspx.vb b/Sistemas/UsuarioDetalle.aspx.vb index 8cdcf4ad9..663ea64a8 100644 --- a/Sistemas/UsuarioDetalle.aspx.vb +++ b/Sistemas/UsuarioDetalle.aspx.vb @@ -1385,6 +1385,7 @@ Partial Class Sistemas_UsuarioDetalle GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa) = Nothing GlobalDTUsuarios(CveEmpresa:=-1) = Nothing + 'If ObjUsuarios.GetUsuariosEmpresas(-1, UsuarioActual.CveEmpresa) Then ' Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados ' Application("GlobalDTUsuarioResponsable") = ObjUsuarios.DtResultados.FiltraParametros("ProveedoresResponsables > 0") diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index a30689857..43a0427be 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -2750,7 +2750,7 @@ Partial Class Clientes End If End If - If Not AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq, ObjClientes.IniciaTransacSQL) Then + If Not AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq, 1, ObjClientes.IniciaTransacSQL) Then ErrorProceso = True End If @@ -3843,12 +3843,23 @@ Partial Class Clientes 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 Button = DirectCast(sender, Button) + + + Dim CodigoCuentaAltaCompaq As String = "" + Dim NombreCuentaCuentaAltaCompaq As String = "" + Dim IdCuentaAltaCompaq As Integer = -1 + + Select Case CuentaContable Case "Clientes" AgregarCuentaContable(Button, DdlCtaContableClientes, "", "", -1) Case "Anticipos" - AgregarCuentaContable(Button, DdlCtaContableAnticipos, "", "", -1) + + AgregarCuentaContable(Button, DdlCtaContableAnticipos, CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq) + AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq, 3) + Case "RetIVA" + AgregarCuentaContable(Button, DdlCtaContableRetIVA, "", "", -1) Case "RetISR" AgregarCuentaContable(Button, DdlCtaContableRetISR, "", "", -1) @@ -3957,14 +3968,23 @@ Partial Class Clientes Return ProcesoCorrecto End Function - Private Function AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq As String, NombreCuentaCuentaAltaCompaq As String, IdCuentaAltaCompaq As Integer, Transaccion As SqlTransaction) 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 ObjContabilidad As New ClsContabilidad(Transaccion) Dim Respuesta As Boolean = False + Dim DisposeClases As Boolean = False + + Dim ObjContabilidad As ClsContabilidad + + If Transaccion Is Nothing Then + ObjContabilidad = New ClsContabilidad + DisposeClases = True + Else + ObjContabilidad = New ClsContabilidad(Transaccion) + DisposeClases = False + End If If UsuarioActual.CveEmpresa.Contiene(7, 11, 145, 122) Then - If ObjContabilidad.GetCuentasGlobales(UsuarioActual.CveEmpresa, 1) Then Dim CvePadre As Integer = ObjContabilidad.DtResultados.FiltroPrimeroValor("CveCuenta").ToEntero If CvePadre > 0 Then @@ -3972,7 +3992,7 @@ Partial Class Clientes Dim CvecuentaNueva As Integer = ObjContabilidad.AddCuenta(CvePadre, CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, "A", 2, 1, CveCliente:=CveCliente, IdCompaq:=IdCuentaAltaCompaq) If CvecuentaNueva > 0 Then - If ObjContabilidad.AddCuentasAsignaciones(1, UsuarioActual.CveEmpresa, CvecuentaNueva, CveCliente:=CveCliente) Then + If ObjContabilidad.AddCuentasAsignaciones(CveConceptoContable, UsuarioActual.CveEmpresa, CvecuentaNueva, CveCliente:=CveCliente, PorcentajeIVA:=0) Then Respuesta = True End If End If @@ -3982,6 +4002,18 @@ Partial Class Clientes Respuesta = True End If + If DisposeClases Then + ObjContabilidad.Dispose() + + If Not Respuesta Then + Alert("Se presento un error al agregar y asignar la cuenta (Conta SIG).", TipoMensaje.MsgAdvertencia) + End If + + End If + + + + Return Respuesta End Function