From 4d5fcf6719865adb14c51dd26be1129281ae822d Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 10 Jul 2023 21:33:46 -0700 Subject: [PATCH 01/34] -- mejora en complemento de pagos. --- App_Code/Timbrado.vb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb index aa758b05f..a08c72b27 100644 --- a/App_Code/Timbrado.vb +++ b/App_Code/Timbrado.vb @@ -1472,8 +1472,14 @@ Public Class Timbrado If concep.Unidad <> "" Then comprobante.Conceptos(i).Unidad = concep.Unidad comprobante.Conceptos(i).ClaveUnidad = concep.ClaveUnidad comprobante.Conceptos(i).Descripcion = concep.Descripcion - comprobante.Conceptos(i).ValorUnitario = Decimal.Parse(concep.ValorUnitario.ToString("0.00####")) ' formateo forzoso, ej,2543.1 - comprobante.Conceptos(i).Importe = Decimal.Parse(concep.Importe.RoundSQL(NumDecimalesImporte).ToString("0.00")) ' formateo forzoso, ej,2543.1 + If ObjCFDITimbre.Comprobante.TipoComprobante.Contiene("P") Then ' consideración especial para pagos, debe ser "0" sin decimales + comprobante.Conceptos(i).ValorUnitario = 0 + comprobante.Conceptos(i).Importe = 0 + Else + comprobante.Conceptos(i).ValorUnitario = Decimal.Parse(concep.ValorUnitario.ToString("0.00####")) ' formateo forzoso, ej,2543.1 + comprobante.Conceptos(i).Importe = Decimal.Parse(concep.Importe.RoundSQL(NumDecimalesImporte).ToString("0.00")) ' formateo forzoso, ej,2543.1 + End If + comprobante.Conceptos(i).ClaveProdServ = concep.ClaveProdServ comprobante.Conceptos(i).ObjetoImp = concep.ObjetoImpuesto From 991ea5c1d1e45eeccaf480a7d66214d8935caf71 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 14 Jul 2023 16:45:02 -0700 Subject: [PATCH 02/34] Filtros de estatus para NC --- Ventas/RepVentas.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ventas/RepVentas.aspx.vb b/Ventas/RepVentas.aspx.vb index 0ae957414..65a96a42d 100644 --- a/Ventas/RepVentas.aspx.vb +++ b/Ventas/RepVentas.aspx.vb @@ -284,7 +284,7 @@ Partial Class Ventas_RepVentas Protected Sub DdlTipoComprobante_SelectedIndexChanged(sender As Object, e As EventArgs) DdlEstatus.Items.Clear() If DdlTipoComprobante.GetSelectedValuesM <> "" Then - DdlEstatus.DataSource = GlobalDTEstatusFactura.FiltraParametros(String.Format("TipoDocto IN ({0}) OR ('Cot' IN ({0}) AND CveEstatusFactura = 2)", DdlTipoComprobante.GetSelectedValuesM(True).Replace("Ant", "Ing"))) + DdlEstatus.DataSource = GlobalDTEstatusFactura.FiltraParametros(String.Format("TipoDocto IN ({0}) OR ('Cot' IN ({0}) AND CveEstatusFactura = 2)", DdlTipoComprobante.GetSelectedValuesM(True).Replace("Ant", "Ing").Replace("Egs", "Ing"))) Else DdlEstatus.DataSource = GlobalDTEstatusFactura End If From 2064bfd13cd56e89c46b43a693f667bb82d70e3f Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 14 Jul 2023 16:45:27 -0700 Subject: [PATCH 03/34] Mostrar impuestos locales en refacturacion --- Ventas/Ventas.aspx | 2 +- Ventas/Ventas.aspx.vb | 31 ++++++++++++------------------- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 38d20fbab..205201a92 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -1551,7 +1551,7 @@ SubTotal 2: - + <%-- --%> diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 61376ad6f..7a7c8b88a 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2939,6 +2939,7 @@ Partial Class Ventas End If ObjInv.Dispose() + End If 'regenrea el tipo de cambio CargaNuevaFactura(Nothing) @@ -3199,15 +3200,6 @@ Partial Class Ventas TxtRetIVA.Attributes.Add("onKeyUp", "FnSuma()") TxtRetISR.Attributes.Add("onKeyUp", "FnSuma()") - 'Permitir Edicion de Iva - If UsuarioActual.Empresa.Funcionalidad(509) = "1" Then - TxtIVA.Enabled = True - 'TxtTotal.Enabled = True - RegistraScript("SetDisabledTxtTotal(false);") - TxtSubTotal.Enabled = True - TxtSubTotal2.Enabled = True - End If - 'Cortes de Caja If UsuarioActual.TienePermisoProceso(160) Then CargaCorteCaja() @@ -6031,7 +6023,12 @@ Partial Class Ventas GvImpuestosLocales2.DataSource = ObjVentas.DtResultados GvImpuestosLocales2.DataBind() - GvImpuestosLocales2.Enabled = False + If (NuevaFactura = 1) Then + GvImpuestosLocales2.Enabled = True + Else + GvImpuestosLocales2.Enabled = False + End If + GvImpuestosLocales2.Visible = True End If End If @@ -24264,14 +24261,6 @@ Partial Class Ventas RegistraScript("SetDisabledTxtTotal(true);") If TxtFolio.Text.Trim = "" Then TxtFolio.Enabled = True - If UsuarioActual.TienePermisoProceso(112) Then - TxtSubTotal.Enabled = True - TxtSubTotal2.Enabled = True - TxtIVA.Enabled = True - 'TxtTotal.Enabled = True - RegistraScript("SetDisabledTxtTotal(false);") - End If - TxtIVA.Text = IVA.FormatoNumero TxtRetIVA.Text = RetencionIVA.FormatoNumero LblDescuentos.Text = Descuentos.FormatoNumero @@ -29104,7 +29093,11 @@ Partial Class Ventas GvImpuestosLocales2.DataSource = ObjVentas.DtResultados GvImpuestosLocales2.DataBind() - GvImpuestosLocales2.Enabled = False + If (NuevaFactura = 1) Then + GvImpuestosLocales2.Enabled = True + Else + GvImpuestosLocales2.Enabled = False + End If GvImpuestosLocales2.Visible = True End If End If From fcebe3f60c459bc86a755550dfeeb6711f04ded7 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 14 Jul 2023 18:44:40 -0700 Subject: [PATCH 04/34] =?UTF-8?q?--=20que=20filtre=20M=C3=A9todo=20y=20For?= =?UTF-8?q?ma,=20seg=C3=BAn=20su=20valor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Clientes.aspx | 162 ++++++++++++++++++---------------------- Ventas/Clientes.aspx.vb | 59 ++++++++------- Ventas/PV.aspx | 2 +- Ventas/PV.aspx.vb | 11 +++ Ventas/Ventas.aspx | 2 +- Ventas/Ventas.aspx.vb | 18 +++-- 6 files changed, 133 insertions(+), 121 deletions(-) diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index fa1f6c881..51f99e6e1 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -392,10 +392,7 @@ - - - - +
@@ -415,9 +412,7 @@
-
- - +
@@ -432,15 +427,21 @@
-
- - -
-
- - +
+
+
+ + +
+
+
+
+ + -
+
+
+
@@ -531,7 +532,7 @@
- + @@ -577,41 +578,38 @@
-
-
- - - +
+
+
+ + + +
+
+
+
+ + +
-
-
- - -
-
-
- -
- -
-
- - - -
-
- -
+ +
+
+
+ + + +
+
-
+
-
@@ -1028,7 +1026,7 @@ - + @@ -1051,30 +1049,20 @@
-
- <%--
- - -
--%> -
- - -
- <%--
- - - -
--%> - <%--
- - - - - - -
--%> +
+ +
-
+
+
+
+ + + + + % +
+
-
-
-
- - - - - % -
-
@@ -1118,9 +1096,12 @@ ¿El Cliente nos retiene IVA por Fletes y Acarreos?:
+
-
- +
CFDI Versión @@ -1148,16 +1129,21 @@
- -
- El cliente desglosa IEPS: +
+
+
+ El cliente desglosa IEPS: - -
-
- El cliente No desglosa IVA: - -
+ +
+
+
+
+ El cliente No desglosa IVA: + +
+
+

@@ -4636,7 +4622,7 @@ - + diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 9d7fbb575..9f376cfb1 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -1436,7 +1436,7 @@ Partial Class Clientes DdlMonedaExtranjeraAnticipos.SelectedValue = IdCtaMonedaExtranjeraAnticipos ActivarRegistroAutomatico() - HeedarContable.Attributes.Remove("onclick") + HeaderContable.Attributes.Remove("onclick") UpFiscalContable.Update() End Sub @@ -2061,30 +2061,40 @@ Partial Class Clientes End Sub Private Sub CargaFormaPago33() - DdlFormaPago33.Items.Clear() - DdlFormaPago33.DataSource = GlobalDTVtaFormaPago - DdlFormaPago33.DataBind() + 'DdlFormaPago33.Items.Clear() + 'DdlFormaPago33.DataSource = GlobalDTVtaFormaPago + 'DdlFormaPago33.DataBind() + CargaFormaDePago() DdlSucursalFormaPago33.Items.Clear() DdlSucursalFormaPago33.DataSource = GlobalDTVtaFormaPago DdlSucursalFormaPago33.DataBind() End Sub Private Sub CargaComboCFDI() - Dim RegimenFiscalCliente = DdlRegimenFiscal.SelectedValue.ToString() - 'If Not UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then - ' RegimenFiscalCliente = "-1" - 'End If + Dim RegimenFiscalCliente As String = "-1" + If DdlRegimenFiscal.SelectedValue <> "-1" Then RegimenFiscalCliente = GlobalDTRegimenesFiscales(-1).FiltroPrimeroValor("CodigoRegimenFiscal", $"CveRegimenFiscal = {DdlRegimenFiscal.SelectedValue}") + Dim tcveuso As Integer = DdlUsoCFDI.SelectedValue.ToEntero - DdlUsoCFDI.Items.Clear() + DdlUsoCFDI.SelectedIndex = -1 + DdlUsoCFDI.Items.Clear() + DdlUsoCFDI.ClearSelection() Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1") - DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente) + DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente) + DdlUsoCFDI.ClearSelection() - DdlUsoCFDI.DataBind() + Try + DdlUsoCFDI.DataBind() + Catch ex As Exception + + End Try + DdlUsoCFDI.Items.Insert(0, New ListItem("Seleccione", "-1")) + If tcveuso > 0 Then DdlUsoCFDI.SelectedValueExist(tcveuso) DdlSucursalUsoCFDI.Items.Clear() DdlSucursalUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente) DdlSucursalUsoCFDI.DataBind() + UpFiscalContable.Update() End Sub #End Region @@ -10322,6 +10332,7 @@ Partial Class Clientes DdlRegimenFiscal.DataSource = dt DdlRegimenFiscal.DataBind() DdlRegimenFiscal.SelectedValueExist(Val) + CargaComboCFDI() UpDatos.Update() End Sub @@ -10480,10 +10491,8 @@ Partial Class Clientes UpLineaAdicionalmodal.Update() - End Sub - - - + End Sub + Protected Sub LnkEliminarLineaAdicional_Click(sender As Object, e As EventArgs) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim CveLineaAdicionalEliminar = GvRow.DataKey("CveLineaAdicional").ToEntero @@ -10503,10 +10512,8 @@ Partial Class Clientes GetLineasAdicionales() End If - End Sub - - - + End Sub + Protected Sub DdlTipoLineaAdicionalModal_SelectedIndexChanged(sender As Object, e As EventArgs) DvLineaAdicionalDiasVenciemientoModal.Visible = If(DdlTipoLineaAdicionalModal.SelectedValue.ToEntero = 2, True, False) @@ -10525,7 +10532,7 @@ Partial Class Clientes DdlFormaPago33.Items.Clear() - If DdlMetodoPago33.SelectedValue.ToEntero = 3 Then + If DdlMetodoPago33.SelectedValue = "3" Then DdlFormaPago33.DataSource = GlobalDTVtaFormaPago.FiltraParametros("CveFormaPago = 20") Else DdlFormaPago33.DataSource = GlobalDTVtaFormaPago.FiltraParametros("CveFormaPago <> 20") @@ -10572,11 +10579,8 @@ Partial Class Clientes If Not ErrorCambio Then Alert("Vendedor Cambiado Correctamente.", TipoMensaje.MsgInformacion, $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}""") - End If - - - - + End If + End Sub @@ -10589,7 +10593,10 @@ Partial Class Clientes UpDatos.Update() + End Sub + + Private Sub DdlRegimenFiscal_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlRegimenFiscal.SelectedIndexChanged + CargaComboCFDI() End Sub - End Class diff --git a/Ventas/PV.aspx b/Ventas/PV.aspx index 5c97355a1..1b1b48cfc 100644 --- a/Ventas/PV.aspx +++ b/Ventas/PV.aspx @@ -2605,7 +2605,7 @@
- + diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index d5374cd1e..c964184aa 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -8661,4 +8661,15 @@ Partial Class PV RegistraScript("AbrirModalDescuentoAdicional();") End Sub + + Private Sub DdlMetodoCliente_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlMetodoCliente.SelectedIndexChanged + DdlFormaCliente.Items.Clear() + If DdlMetodoCliente.SelectedValue = "3" Then + DdlFormaCliente.DataSource = GlobalDTVtaFormaPago.FiltraParametros("CveFormaPago = 20") + Else + DdlFormaCliente.DataSource = GlobalDTVtaFormaPago.FiltraParametros("CveFormaPago <> 20") + End If + DdlFormaCliente.DataBind() + + End Sub End Class diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 38d20fbab..add126eba 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -7899,7 +7899,7 @@
- + diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 61376ad6f..0d52520b8 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -6154,14 +6154,10 @@ Partial Class Ventas dtt = GlobalDTVtaFormaPago End If DdlFormaPago33.Items.Clear() - 'DdlFormaPago33.ClearSelection() - 'DdlFormaPago33.DataBind() DdlFormaPago33.DataSource = dtt DdlFormaPago33.SelectedValue = dtt.FiltroPrimeroValor("CveFormaPago", "") DdlFormaPago33.DataBind() - DdlFormaCliente.DataSource = GlobalDTVtaFormaPago - DdlFormaCliente.DataBind() DdlMetodoCliente.DataSource = GlobalDTVtaMetodoPago DdlMetodoCliente.DataBind() @@ -23508,7 +23504,8 @@ Partial Class Ventas RdTipoPersona.SelectedValue = "0" DdlMetodoCliente.SelectedValueExist(1) - DdlFormaCliente.SelectedValueExist(1) + + 'DdlFormaCliente.SelectedValueExist(1) DdlRegimenFiscalCliente.DataSource = GlobalDTRegimenesFiscales().FiltraParametros("CveRegimenFiscal = 11") DdlRegimenFiscalCliente.DataBind() @@ -37116,5 +37113,16 @@ Partial Class Ventas Tab.ActiveTabIndex = 0 Updatetabs.Update() End Sub + + Private Sub DdlMetodoCliente_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlMetodoCliente.SelectedIndexChanged + DdlFormaCliente.Items.Clear() + If DdlMetodoCliente.SelectedValue = "3" Then + DdlFormaCliente.DataSource = GlobalDTVtaFormaPago.FiltraParametros("CveFormaPago = 20") + Else + DdlFormaCliente.DataSource = GlobalDTVtaFormaPago.FiltraParametros("CveFormaPago <> 20") + End If + DdlFormaCliente.DataBind() + + End Sub End Class From 78afa1cc41615be12aa0d1db1200b21793267935 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 15 Jul 2023 10:17:51 -0700 Subject: [PATCH 05/34] +- filtrad de PPD/PUE ,solo sus datos y mejora en usocfdi --- Ventas/Clientes.aspx | 6 +++--- Ventas/Clientes.aspx.vb | 9 +-------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 51f99e6e1..030bf901b 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -1107,7 +1107,7 @@ CFDI Versión
- + @@ -1116,7 +1116,7 @@
- @@ -1124,7 +1124,7 @@
- + diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 9f376cfb1..ce5467765 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -2077,16 +2077,9 @@ Partial Class Clientes DdlUsoCFDI.SelectedIndex = -1 DdlUsoCFDI.Items.Clear() - DdlUsoCFDI.ClearSelection() Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1") DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente) - DdlUsoCFDI.ClearSelection() - - Try - DdlUsoCFDI.DataBind() - Catch ex As Exception - - End Try + DdlUsoCFDI.DataBind() DdlUsoCFDI.Items.Insert(0, New ListItem("Seleccione", "-1")) If tcveuso > 0 Then DdlUsoCFDI.SelectedValueExist(tcveuso) From 26bbdb3491a2b645bf65699d5157af6e96d924a5 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 15 Jul 2023 10:24:16 -0700 Subject: [PATCH 06/34] -- visualizar lo pendiente por recibir y fecha para E141 --- Inventarios/PopUpExistenciasAlmacen.aspx | 26 ++++++++++----------- Inventarios/PopUpExistenciasAlmacen.aspx.vb | 4 ++++ 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/Inventarios/PopUpExistenciasAlmacen.aspx b/Inventarios/PopUpExistenciasAlmacen.aspx index b72e43d20..fbf6c963d 100644 --- a/Inventarios/PopUpExistenciasAlmacen.aspx +++ b/Inventarios/PopUpExistenciasAlmacen.aspx @@ -159,17 +159,10 @@ - + <%----%> <%-- --%> - - - - - - - - - + + <%----%> @@ -180,8 +173,7 @@ - <%----%> - + @@ -189,8 +181,16 @@ - + + + + + +
+ +
+
diff --git a/Inventarios/PopUpExistenciasAlmacen.aspx.vb b/Inventarios/PopUpExistenciasAlmacen.aspx.vb index 06de2d38f..4f276a596 100644 --- a/Inventarios/PopUpExistenciasAlmacen.aspx.vb +++ b/Inventarios/PopUpExistenciasAlmacen.aspx.vb @@ -274,10 +274,14 @@ Partial Class Inventarios_Default Dim ObjInventarios As New ClsInventarios If ObjInventarios.GetExistenciasMedRin(DDlPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlRin.SelectedValue.ToEntero, DdlMedidas.SelectedValue.ToEntero) Then GvMedRin.DataSource = ObjInventarios.DtResultados + If ObjInventarios.DtResultados.Rows.Count > 0 Then + GvMedRin.Columns(5).Visible = ObjInventarios.DtResultados.MAX("CantidadMinimaPromo") <> "" + End If End If ObjInventarios.Dispose() GvMedRin.DataBind() UPDatos.Update() + DivMedRin.Visible = True End Sub From 354306e5a5584045d7394330e31e7e3453bf616e Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 15 Jul 2023 10:25:11 -0700 Subject: [PATCH 07/34] =?UTF-8?q?--=20comentado=20de=20c=C3=B3digo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/IE.aspx.vb | 1153 +++++++++++++++++++++++---------------------- 1 file changed, 577 insertions(+), 576 deletions(-) diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 4067c7eb5..06f55f91d 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -1897,585 +1897,586 @@ Partial Class Bancos_IE #End Region -#Region "VIATICOS" + '#Region "VIATICOS" - Private Function TimbrarNomina12(CvePersonal As Integer) As String + ' Private Function TimbrarNomina12(CvePersonal As Integer) As String - Dim Retorno As String = "" - UsuarioActual.Empresa.CvePAC = 2 - Dim sw As New Diagnostics.Stopwatch - sw.Start() - Select Case UsuarioActual.Empresa.CvePAC - Case 1 - 'Retorno = TimbrarBIInformNomina12(CveNomina, CvePersonal, CvePeriodo) - Case 2, 4 - Dim cfdi As CFDITimbre = PreTimbrar(CvePersonal) - If cfdi Is Nothing Then - sw.Stop() - Return "No tiene asignado un folio de viaticos" - End If - If cfdi IsNot Nothing AndAlso cfdi.Mensaje = "" Then - Dim ObjTimbrado As New Timbrado - Dim ObjFactura As New Modelos.Factura - ObjFactura.TipoDocto = "Viaticos" - ObjFactura.Folio = cfdi.Comprobante.Folio.ToEntero - ObjFactura.Serie = cfdi.Comprobante.Serie - ObjFactura.Timbre = cfdi - If Not ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura) Then - Retorno = ObjTimbrado.MensajeErrorCFDI - End If + ' Dim Retorno As String = "" + ' UsuarioActual.Empresa.CvePAC = 2 + ' Dim sw As New Diagnostics.Stopwatch + ' sw.Start() + ' Select Case UsuarioActual.Empresa.CvePAC + ' Case 1 + ' 'Retorno = TimbrarBIInformNomina12(CveNomina, CvePersonal, CvePeriodo) + ' Case 2, 4 + ' Dim cfdi As CFDITimbre = PreTimbrar(CvePersonal) + ' If cfdi Is Nothing Then + ' sw.Stop() + ' Return "No tiene asignado un folio de viaticos" + ' End If + ' If cfdi IsNot Nothing AndAlso cfdi.Mensaje = "" Then + ' Dim ObjTimbrado As New Timbrado + ' Dim ObjFactura As New Modelos.Factura + ' ObjFactura.TipoDocto = "Viaticos" + ' ObjFactura.Folio = cfdi.Comprobante.Folio.ToEntero + ' ObjFactura.Serie = cfdi.Comprobante.Serie + ' ObjFactura.Timbre = cfdi + ' If Not ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura) Then + ' Retorno = ObjTimbrado.MensajeErrorCFDI + ' End If - 'Retorno = TimbrarFacturaRealVirtual(cfdi, UsuarioActual) - If Retorno <> "" Then - Retorno = $"{Retorno} - {cfdi.Receptor.Nombre}" - Else - 'Genero la addenda Ford - ' GeneraPDFNuevo(String.Format("{0}XML\Nomina\{1}.xml", Ruta, NominaFolio), CvePersonal, CvePeriodo) - End If - Else - Retorno = $"No se pudo generar el pretimbre:
{cfdi.Mensaje}" - End If - End Select - sw.Stop() - GuardaLogTimbrado(sw.ElapsedMilliseconds.ToString, UsuarioActual.Empresa.CvePAC, "Nomina") - - Return Retorno - - End Function - - - - - Private Function PreTimbrar(CvePersonal As Integer) As CFDITimbre - Dim cfdi As New CFDITimbre - Dim ObjFolio As New ClsGralFolios - If ObjFolio.GetFolios("VIA", UsuarioActual.CveEmpresa) Then - If ObjFolio.DtResultados.Rows.Count > 0 Then - Folio = ObjFolio.DtResultados.Rows(0)("FActual").ToString - Else - ObjFolio.Dispose() - Return Nothing - End If - End If - ObjFolio.Dispose() - - Dim objPersonal As New ClsRH - objPersonal.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa) - - Dim AntiguedadSemanas As Integer = DateDiff(DateInterval.Weekday, objPersonal.FechaIngreso, Now).ToEntero - - cfdi.Nomina = New CFDINomina - cfdi.Nomina.Version = "1.2" - cfdi.Nomina.TipoNomina = "E" - cfdi.Nomina.FechaPago = TxtFechaDocumento.Text.ToDate - cfdi.Nomina.FechaInicio = TxtFechaDocumento.Text - cfdi.Nomina.FechaFin = TxtFechaDocumento.Text - cfdi.Nomina.NumDiasPagados = 1 - cfdi.Emisor.Nombre = UsuarioActual.Empresa.Empresa - cfdi.Emisor.RFC = UsuarioActual.Empresa.RFC - cfdi.Emisor.RegistroPatronal = objPersonal.DtResultados.Rows(0)("RegistroPatronal").ToString() - cfdi.Emisor.RegimenFiscal = UsuarioActual.Empresa.CodigoRegimenFiscal - - 'aplica persona fisica debe de tener CURP - If cfdi.Emisor.RegimenFiscal.Contiene("605", "606", "608", "611", "612", "614", "616", "621", "622", "629", "630", "615") Then - cfdi.Emisor.CURP = UsuarioActual.Empresa.CURP - End If - - - cfdi.Receptor.UsoCFDI = "P01" - cfdi.Receptor.RFC = objPersonal.RFC - cfdi.Receptor.Nombre = objPersonal.NombreCompleto - - Dim ObjOtrosPagos As New List(Of CFDINominaOtrosPagos) - ObjOtrosPagos.Add(New CFDINominaOtrosPagos With {.TipoOtroPago = "003", - .Clave = "003", - .Concepto = "Viáticos (entregados al trabajador).", - .Importe = TxtImporte.Text.ToString.ToDecimal - } - ) - If ObjOtrosPagos IsNot Nothing AndAlso ObjOtrosPagos.Count > 0 Then cfdi.Nomina.OtrosPagos = ObjOtrosPagos - - cfdi.Comprobante.Version = "3.3" - cfdi.Comprobante.Serie = "VIA" - cfdi.Comprobante.Folio = Folio - cfdi.Comprobante.Fecha = Now - cfdi.Comprobante.Subtotal = TxtImporte.Text.ToDecimal - cfdi.Comprobante.Descuentos = 0 - cfdi.Comprobante.Total = TxtImporte.Text.ToDecimal - cfdi.Comprobante.MotivoDescuento = "" - cfdi.Comprobante.Moneda = "MXN" - cfdi.Comprobante.TipoComprobante = "N" - cfdi.Comprobante.TipoDocto = "Egs" - cfdi.Comprobante.MetodoPago = "PUE" - cfdi.Comprobante.CondicionesdePago = "" - cfdi.Comprobante.FormadePago = "99" - cfdi.Comprobante.LugarExpedicion = UsuarioActual.Empresa.CP.ToString - cfdi.Comprobante.NumCuentaPago = "" - - - cfdi.Nomina.Receptor.CURP = objPersonal.CURP - cfdi.Nomina.Receptor.NSS = objPersonal.NumeroSS - cfdi.Nomina.Receptor.FechaInicioContrato = objPersonal.FechaInicioContrato.ToShortDateString - cfdi.Nomina.Receptor.Antiguedad = $"P{AntiguedadSemanas}W" - cfdi.Nomina.Receptor.TipoContrato = objPersonal.CodigoTipoContrato - cfdi.Nomina.Receptor.CodigoTipoJornada = objPersonal.ClaveTipoJornada - cfdi.Nomina.Receptor.CodigoRegimenContratacion = If(objPersonal.CveRegimenContratacion = "", "99", objPersonal.CveRegimenContratacion) - cfdi.Nomina.Receptor.CodigoEmpleado = objPersonal.Codigo - cfdi.Nomina.Receptor.Departamento = objPersonal.Departamento - cfdi.Nomina.Receptor.Puesto = objPersonal.Puesto - cfdi.Nomina.Receptor.CodigoRiesgoPuesto = If(objPersonal.CveSATRiesgoPuesto.ToString = "0", "99", objPersonal.CveSATRiesgoPuesto.ToString) - cfdi.Nomina.Receptor.TipoPeriodo = objPersonal.TipoPeriodoPago - cfdi.Nomina.Receptor.CodigoBanco = objPersonal.ClaveBanco - cfdi.Nomina.Receptor.NumeroCuenta = objPersonal.BancoNumCuenta - cfdi.Nomina.Receptor.SDI = objPersonal.SDI - cfdi.Nomina.Receptor.SBC = objPersonal.SDI - cfdi.Nomina.Receptor.Sindicalizado = "" - cfdi.Nomina.Receptor.CodigoEntidadFederativa = objPersonal.ClaveEstado - - - cfdi.Conceptos.Add(New CFDIConceptos With {.Cantidad = 1, .ClaveUnidad = "ACT", .ClaveProdServ = "84111505", .Descripcion = "Pago de nómina", .ValorUnitario = cfdi.Comprobante.Subtotal, .Importe = cfdi.Comprobante.Subtotal, .Descuento = cfdi.Nomina.TotalDeducciones.ToDecimal}) - - objPersonal.Dispose() - Return cfdi - End Function - - 'Private Function TimbrarBIInformNomina12(CveNomina As Integer, CvePersonal As Integer, CvePeriodo As Integer) As String - - ' If UsuarioActual.CveEmpresa = 8 Then - ' UsuarioActual.Empresa.FacturaProduccion = True - ' End If - ' 'UsuarioActual.Empresa.FacturaProduccion = False - - ' Dim MsgError As String = String.Empty - - ' Dim CFDi As New ClbNegBICFDv3_2.ClsNegEDI - ' CFDi.ObjCompNomina12 = New ClbNegBICFDv3_2.ClsNegComplementoNomina12() - ' 'CFDi.ObjCompNomina = New ClbNegBICFDv3_2.ClsNegCompNomina - - ' Dim objPersonal As New ClsRH - ' 'Dim objNomina As New ClsNominas - ' objPersonal.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa) - ' 'objNomina.GetNom_Nominas(CveNomina, CvePersonal, CvePeriodo, -1, UsuarioActual.CveEmpresa) - - - ' Dim Total As Decimal = 0 - ' Dim SubTotal As Decimal = 0 - ' Dim Descuentos As Decimal = 0 - ' Dim RetISR As Decimal = 0 - ' Dim TotalExcento As Decimal = 0 - ' Dim TotalGravado As Decimal = 0 - ' Dim TotalPercepciones As Decimal = 0 - ' Dim TotalDeducciones As Decimal = 0 - ' Dim TotalOtrosPagos As Decimal = 0 - - ' Dim Serie As String = "" - ' Dim Folio As String = "" - ' Dim NominaFolio As String = Serie & "-" & Folio - ' Dim RFC As String = objPersonal.RFC.Trim - ' Dim Nombre As String = objPersonal.NombreCompleto.Trim - ' Dim Direccion As String = String.Format("{0} {1} {2}", objPersonal.Calle.Trim, objPersonal.NumExt.Trim, objPersonal.NumInt.Trim).Trim - ' Dim Ciudad As String = objPersonal.Ciudad.Trim - ' Dim Estado As String = objPersonal.Estado.Trim - ' Dim CP As String = objPersonal.CP.Trim - - - - ' 'Dim TipoContrato As String = GlobalDTTiposContrato.FiltraParametros("CveTipoContrato = " + objPersonal.CveTipoContrato.ToString)(0)("TipoContrato").ToString - ' 'Dim TipoPeriodo As String = GlobalDTTipoPeriodo.FiltraParametros("CveTipoPeriodo = " + objPersonal.CveTipoPeriodo.ToString)(0)("TipoPeriodo").ToString - ' Dim AntiguedadSemanas As Integer = DateDiff(DateInterval.Weekday, objPersonal.FechaIngreso, Now).ToEntero - ' Dim FormatoReciboCFDi As String = objPersonal.FormatoReciboCFDi - - ' Dim FechaInicio, FechaFin, FechaPago As Date - ' Dim DiasPagados As Integer = 0 - ' Dim Msg As String = String.Empty - ' Dim DiasIncapacitados As Integer = 0 - ' Dim DrPeriodo As DataRow = Nothing - - ' Dim ObjFolio As New ClsGralFolios - ' If ObjFolio.GetFolios("VIA", UsuarioActual.CveEmpresa) Then - ' If ObjFolio.DtResultados.Rows.Count > 0 Then - ' Folio = ObjFolio.DtResultados.Rows(0)("FActual").ToString - ' End If - ' End If - - - ' 'If objNomina.GetPeriodos(-1, -1, -1, -1, CvePeriodo) Then - ' ' If objNomina.DtResultados.Rows().Count > 0 Then - ' ' DrPeriodo = objNomina.DtResultados.Rows(0) - ' ' End If - ' 'End If - ' 'Dim DrPeriodo As DataRow = GlobalDTNominasPeriodos(-1, CvePeriodo, -1).FiltroPrimero("") - ' If DrPeriodo IsNot Nothing Then - ' FechaInicio = DrPeriodo("FechaInicio").ToString.ToDate - ' FechaFin = DrPeriodo("FechaFin").ToString.ToDate - ' FechaPago = DrPeriodo("FechaPago").ToString.ToDate - ' If objPersonal.GetAsistencias(CvePersonal, -1, -1, -1, -1, -1, FechaInicio, FechaFin, UsuarioActual.CveEmpresa) Then - - ' Dim Asistencias As Integer = objPersonal.DtResultados.SUM("AplicaAsistencia").ToEntero - ' Dim Vacaciones As Integer = objPersonal.DtResultados.SUM("AplicaVacacion").ToEntero - ' DiasIncapacitados = objPersonal.DtResultados.SUM("AplicaIncapacidad").ToEntero - ' DiasPagados = Asistencias - Vacaciones - ' If DiasPagados < 0 Then DiasPagados = 0 - - ' End If - - ' End If - - ' Dim DtPercepciones As Data.DataTable = Nothing - ' Dim DtDeducciones As Data.DataTable = Nothing - ' Dim DtOtrosPagos As Data.DataTable = Nothing - ' 'If objNomina.GetNom_NominasDetalles(CveNomina, CvePersonal, CvePeriodo, "-1") Then - ' ' If objNomina.DtResultados.Rows.Count > 0 Then - ' ' DtPercepciones = objNomina.DtResultados.FiltraParametros("Tipo = 'P' AND EsPadre = 1 ") - ' ' DtDeducciones = objNomina.DtResultados.FiltraParametros("Tipo = 'D' AND EsPadre = 1 ") - ' ' TotalPercepciones = DtPercepciones.SUM("Importe") - ' ' TotalDeducciones = DtDeducciones.SUM("Importe") - ' ' Total = CType((Total + DtPercepciones.SUM("Importe")), Decimal) - ' ' End If - ' 'End If - - ' 'Tipo Nomina O de Ordinaria o E de extraordinaria - ' 'Dim FechaPago As Date = Now - ' Dim TotalSueldos As Decimal = 0 - ' Dim TotalIndemnizacion As Decimal = 0 - ' Dim TotalJubilacion As Decimal = 0 - ' Msg = CFDi.ObjCompNomina12.Cargar("O", FechaPago, FechaInicio, FechaFin, DiasPagados, TotalPercepciones, TotalDeducciones, 0) - - - - ' If Msg = String.Empty Then - ' If DtPercepciones IsNot Nothing Then - ' If DtPercepciones.Rows.Count > 0 Then - ' TotalSueldos = DtPercepciones.SUM("Importe", "SATCveConcepto = '001'") - ' TotalIndemnizacion = DtPercepciones.SUM("Importe", "SATCveConcepto IN ('022','023','025')") ' https://www.ccpm.org.mx/avisos/nuevo-complemento-de-nomina-version-1.2-puntos-finos-diciembre-2016.pdf - ' TotalJubilacion = DtPercepciones.SUM("Importe", "SATCveConcepto IN ('039','044')") 'https://www.ccpm.org.mx/avisos/nuevo-complemento-de-nomina-version-1.2-puntos-finos-diciembre-2016.pdf - ' Msg = CFDi.ObjCompNomina12.CargarPercepciones(TotalSueldos, TotalIndemnizacion, TotalJubilacion, DtPercepciones.SUM("ImporteGravado").ToDecimal, DtPercepciones.SUM("ImporteExento").ToDecimal) - ' End If - ' For Each Row As DataRow In DtPercepciones.Rows - ' If Row("Importe").ToString.ToDecimal > 0 Then - ' If Row("CveSATConcepto").ToString = "" Then - ' Msg = String.Format("Concepto No registrado ({0})", Row("Concepto").ToString) + ' 'Retorno = TimbrarFacturaRealVirtual(cfdi, UsuarioActual) + ' If Retorno <> "" Then + ' Retorno = $"{Retorno} - {cfdi.Receptor.Nombre}" ' Else - ' Msg = CFDi.ObjCompNomina12.AgregarPercepcion(Row("SATCveConcepto").ToString, Row("Codigo").ToString, Row("Concepto").ToString, Row("ImporteGravado").ToString.ToDecimal, Row("ImporteExento").ToString.ToDecimal) - ' TotalExcento = TotalExcento + Row("ImporteExento").ToString.ToDecimal - ' TotalGravado = TotalGravado + Row("ImporteGravado").ToString.ToDecimal - ' SubTotal = SubTotal + Row("Importe").ToString.ToDecimal - ' End If - - ' If Msg <> String.Empty Then - ' Me.OnError("El SAT regresó el siguiente mensaje: " & Msg & ". Objeto: Percepcion", New Exception) - ' Exit For - ' End If - ' End If - ' 'RMF, falta poner el numero de horas pagadas - ' If Row("CveSATConcepto").ToString.ToEntero = 19 Then 'cuando son horas extras - - ' 'Obtengo el desglose de horas extras - - ' If objNomina.GetHorasExtras(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa) Then - - ' Dim dr As DataRow = objNomina.DtResultados.FiltroPrimero("") - ' If dr IsNot Nothing Then - - ' If dr("HorasDobles").ToString.ToDouble > 0 Then CFDi.ObjCompNomina12.AgregarHorasExtra(dr("DiasHorasDobles").ToString.ToEntero, ClbNegBICFDv3_2.TipoHoras.Dobles, dr("HorasDobles").ToString.ToEntero, Row("Importe").ToString.ToDecimal) - ' If dr("HorasTriples").ToString.ToDouble > 0 Then CFDi.ObjCompNomina12.AgregarHorasExtra(dr("DiasHorasTriples").ToString.ToEntero, ClbNegBICFDv3_2.TipoHoras.Triples, dr("HorasTriples").ToString.ToEntero, Row("Importe").ToString.ToDecimal) - - - ' End If - - - ' End If - - ' End If - ' Next - ' If Msg = "" Then - ' CFDi.ObjCompNomina12.ObjPercepciones.TotalExento = TotalExcento - ' CFDi.ObjCompNomina12.ObjPercepciones.TotalGravado = TotalGravado - ' End If - - ' End If - - ' 'cargo las incapacidades - ' If DiasIncapacitados > 0 Then - - ' If objNomina.GetIncapacidades(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa) Then - - ' CFDi.ObjCompNomina12.CargarIncapacidades() - ' For Each dr As DataRow In objNomina.DtResultados.Rows - ' CFDi.ObjCompNomina12.AgregarIncapacidad(dr("Dias").ToString.ToDecimal, dr("ClaveTipoIncapacidad").ToString.ToEntero, dr("Descuento").ToString.ToDecimal) - ' Next - - ' End If - - ' End If - - - - ' TotalExcento = 0 - ' TotalGravado = 0 - - ' If Msg = String.Empty Then - ' If DtDeducciones IsNot Nothing Then - ' If DtDeducciones.Rows.Count > 0 Then - ' Total = CType((Total - DtDeducciones.SUM("Importe")), Decimal) - ' CFDi.ObjCompNomina12.CargarDeducciones(CType(DtDeducciones.SUM("ImporteGravado"), Decimal), CType(DtDeducciones.SUM("ImporteExento"), Decimal)) - ' End If - ' For Each Row As DataRow In DtDeducciones.Rows - - ' If Row("Importe").ToString.ToDecimal > 0 Then - ' If Row("CveSATConcepto").ToString = "" Then - ' Msg = String.Format("Concepto No registrado ({0})", Row("Concepto").ToString) - ' Else - - ' Msg = CFDi.ObjCompNomina12.AgregarDeduccion(Row("SATCveConcepto").ToString, Row("Codigo").ToString, Row("Concepto").ToString, 0) - ' TotalExcento = TotalExcento + Row("ImporteExento").ToString.ToDecimal - ' TotalGravado = TotalGravado + Row("ImporteGravado").ToString.ToDecimal - - ' If Row("CveSATConcepto").ToString.ToEntero = 3 Then - ' RetISR = RetISR + Row("Importe").ToString.ToDecimal - ' Else - ' Descuentos = Descuentos + Row("Importe").ToString.ToDecimal - ' End If - ' End If - - ' If Msg <> String.Empty Then - ' Me.OnError("El SAT regresó el siguiente mensaje: " & Msg & ". Objeto: Deduccion", New Exception) - ' Exit For - ' End If - ' End If - ' Next - ' If Msg = "" Then - ' If CFDi.ObjCompNomina12.ObjDeducciones IsNot Nothing Then - ' CFDi.ObjCompNomina12.ObjDeducciones.TotalOtrasDeducciones = Descuentos - ' CFDi.ObjCompNomina12.ObjDeducciones.TotalImpuestosRetenidos = RetISR - ' End If - - ' End If - ' End If - - ' If Msg = String.Empty Then - ' If DtOtrosPagos IsNot Nothing Then - ' If DtOtrosPagos.Rows.Count > 0 Then - ' Total = CType((Total - DtOtrosPagos.SUM("Importe")), Decimal) - ' CFDi.ObjCompNomina12.CargarOtrosPagos() - ' End If - - ' For Each Row As DataRow In DtOtrosPagos.Rows - ' If Row("Importe").ToString.ToDecimal > 0 Then - ' If Row("CveSATConcepto").ToString = "" Then - ' Msg = String.Format("Concepto No registrado ({0})", Row("Concepto").ToString) - ' Else - ' Msg = CFDi.ObjCompNomina12.AgregarOtroPago(Row("SATCveConcepto").ToString, Row("Codigo").ToString, Row("Concepto").ToString, 0) - ' 'Msg = CFDi.ObjCompNomina12.CargarSubsidioAlEmpleo(0) - ' 'Msg = CFDi.ObjCompNomina12.CargarCompensacionSaldosAFavor(0, 0, 0) - ' End If - - ' If Msg <> String.Empty Then - ' Me.OnError("El SAT regresó el siguiente mensaje: " & Msg & ". Objeto: Otros Pagos", New Exception) - ' Exit For - ' End If - ' End If - ' Next - - ' End If - - ' If Msg = String.Empty Then - ' Dim x As Integer = 0 - - ' Dim Moneda As String = "MXN" - ' Dim LugarExp As String = String.Format("{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8} ", SucCalle, SucNoExt, SucNoInt, SucColonia, SucLocalidad, SucMunicipio, SucEstado, SucPais, SucCP) - ' Dim FechaFactura As DateTime = Now - ' 'Nodo Comprobante - - ' Dim TipoComprobante As ClbNegBICFDv3_2.TipoDeComprobante = ClbNegBICFDv3_2.TipoDeComprobante.egreso - ' Msg = CFDi.comprobantecfd(0, 0, Serie, Folio, FechaFactura, "PAGO EN UNA SOLA EXHIBICION", "CONTADO", SubTotal, Descuentos, "Deducciones nómina", "1", Moneda, Total, objPersonal.MetodoPagoSAT, ClbNegBICFDv3_2.TipoDeComprobante.egreso, LugarExp, "", "", "", New Date(1900, 1, 1), 0) - - ' If Msg = String.Empty Then - ' 'Nodo emisor - ' Msg = CFDi.ObjCompNomina12.CargarEmisor("", objPersonal.DtResultados.Rows(0)("RegistroPatronal").ToString(), UsuarioActual.Empresa.RFC) - ' 'If Msg = String.Empty Then Msg = CFDi.EmisorRegimen(UsuarioActual.Empresa.CodigoRegimenFiscal) - ' If Msg = String.Empty Then - ' 'Nodo Entidad SNCF - ' If 1 = 2 Then 'cuando es gobierno - ' Msg = CFDi.ObjCompNomina12.CargarEntidadSNCF("", 0) - ' End If - - ' If Msg = String.Empty Then - ' 'Nodo Receptor - ' Msg = CFDi.ObjCompNomina12.CargarReceptor(objPersonal.CURP, objPersonal.NumeroSS, objPersonal.FechaInicioContrato, AntiguedadSemanas, objPersonal.TipoContrato, "", objPersonal.ClaveTipoJornada, objPersonal.CveRegimenContratacion, objPersonal.Codigo.ToString, - ' objPersonal.Departamento, objPersonal.Puesto, objPersonal.CveRiesgoPuesto, objPersonal.TipoPeriodo, objPersonal.ClaveBanco, objPersonal.BancoNumCuenta, Total, objPersonal.SDI.ToString.ToDecimal, objPersonal.ClaveEstado) - ' If Msg = String.Empty Then - ' 'Nodo SubContratacion - ' If 1 = 2 Then Msg = CFDi.ObjCompNomina12.AgregarSubContratacion("", 0) - ' If Msg = String.Empty Then - - ' CFDi.LstCompNomina12.Add(CFDi.ObjCompNomina12) - - ' Dim HasErrorConceptos As Boolean = False - ' 'Dim Importe As Decimal = 0 - - - ' Msg = CFDi.ConceptosCfd(1, "ACT", "", "Pago de nómina", SubTotal, SubTotal) - - ' 'Timbrado - - ' 'Web Services de producción: http://biinform.com.mx/srvCFDi/service1.asmx - ' 'Web Services de pruebasd: http://biinform.com.mx/srvCFDiPrueba/service1.asmx - - - ' Dim WS As String = String.Empty - ' If UsuarioActual.Empresa.FacturaProduccion Then - ' WS = "http://portalbiinform.com.mx/srvCFDiPrueba/service1.asmx" - ' Else - ' WS = "http://portalbiinform.com.mx/srvCFDiPrueba/service1.asmx" - ' End If - - ' If Not System.IO.Directory.Exists(Ruta & "XML\") Then System.IO.Directory.CreateDirectory(Ruta & "XML\") - ' If Not System.IO.Directory.Exists(Ruta & "XML\Nomina\") Then System.IO.Directory.CreateDirectory(Ruta & "XML\Nomina\") - - ' 'Generar Timbre - ' 'If UsuarioActual.Empresa.FacturaProduccion Then - ' If 1 = 2 Then - ' CFDi.Generar(String.Format("{0}Certificados\{1}", Ruta, UsuarioActual.Empresa.ArchivoPfx), - ' UsuarioActual.Empresa.ContraseñaKey, - ' String.Format("{0}Certificados\{1}", Ruta, UsuarioActual.Empresa.ArchivoCer), - ' String.Format("{0}XML\Nomina\{1}.xml", Ruta, NominaFolio), - ' String.Format("{0}Certificados\", Ruta), - ' UsuarioActual.Empresa.BIUsuario, - ' UsuarioActual.Empresa.BIContraseña, - ' WS, - ' True) - ' Else - ' If Not System.IO.Directory.Exists(Ruta & "XML\Nomina\Demo\") Then System.IO.Directory.CreateDirectory(Ruta & "XML\Nomina\Demo\") - ' 'RutaPruebas & "XML\Demo\" & NominaFolio & ".xml", - ' CFDi.Generar(String.Format("{0}Certificados\aaa010101aaa__csd_01.pfx", RutaPruebas), - ' "12345678a", - ' String.Format("{0}Certificados\aaa010101aaa__csd_01.cer", RutaPruebas), - ' String.Format("{0}XML\Nomina\Demo\{1}.xml", Ruta, NominaFolio), - ' String.Format("{0}Certificados\", RutaPruebas), - ' "prueba", - ' "123", - ' WS, - ' True) - ' End If - - - ' If CFDi.MsgError <> String.Empty Then - - ' 'OnError("Ocurrió un error al generar el timbre: " & CFDi.MsgError, New Exception) - - ' Dim params As New ActualizaTimbre - ' params.Estatus = False - ' params.CveNomina = CveNomina - ' params.CvePAC = 1 - - ' 'Dim Hilo As New System.Threading.Thread(AddressOf ActualizaTimbrado) - ' 'Hilo.Start(params) - ' BtnAutorizar.Enabled = False - ' MsgError = "Nombre: " & Nombre & ". Error: " & CFDi.MsgError - ' Else - ' 'Actualiza Estatus Timbrado - ' Dim params As New ActualizaTimbre - ' params.Estatus = True - ' params.CveNomina = CveNomina - ' params.CvePAC = 1 - - ' 'Dim Hilo As New System.Threading.Thread(AddressOf ActualizaTimbrado) - ' 'Hilo.Start(params) - - ' Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar() - ' Dim FechaCertificacion As DateTime - ' Dim FolioFiscal, NoSerieCertificado, NoSerieCertificadoContribuyente, SelloCFDi, SelloSAT As String - - ' FolioFiscal = CFDi.Timbrado.UUDI 'XmlDoc.DocumentElement("cfdi:Complemento").FirstChild.Attributes("UUID").InnerText - ' NoSerieCertificado = CFDi.Timbrado.NoCertificadoSAT - ' FechaCertificacion = CFDi.Timbrado.FechaTimbrado - ' SelloCFDi = CFDi.Timbrado.SelloCFD - ' SelloSAT = CFDi.Timbrado.SelloSAT - ' NoSerieCertificadoContribuyente = CFDi.Timbrado.NoCertificado - ' ViewState("FolioFiscal") = FolioFiscal - - ' 'Actualiza Estatus Factura - ' CveNominaT = CveNomina - - ' Dim Rastro As String = String.Format("Nomina: CvePeriodo:{0}, CvePersonal:{1}, UUID: {2}, RFC:{3}", CvePeriodo, CvePersonal, FolioFiscal, objPersonal.RFC) - ' Rastro.GuardaLog() - - ' If FolioFiscal <> "" Then - - ' 'If UsuarioActual.Empresa.FacturaProduccion Then - ' ' Dim ObjNomina2 As New ClsNominas() - ' ' ObjNomina2.UpdateEstatusNomNominas(3, UsuarioActual.Empresa.CvePAC, FolioFiscal, "", ("01/01/2000").ToDate, CveNomina, SubTotal, Descuentos, RetISR, Total, DiasPagados) - ' ' ObjNomina2.Dispose() - ' 'End If - ' Rastro = "--Estatus" & Rastro - ' Rastro.GuardaLog() - ' 'Dim Hilo1 As New System.Threading.Thread(AddressOf ActualizaEstatus) - ' 'Hilo1.Start(3) - ' End If - - - ' Dim RutaCBB As String = String.Empty - ' If Not System.IO.Directory.Exists(Ruta & "CBB\") Then System.IO.Directory.CreateDirectory(Ruta & "CBB\") - ' If Not System.IO.Directory.Exists(Ruta & "CBB\Nomina\") Then System.IO.Directory.CreateDirectory(Ruta & "CBB\Nomina\") - - ' If UsuarioActual.Empresa.FacturaProduccion Then - ' RutaCBB = Ruta & "CBB\Nomina\" & NominaFolio & ".jpg" - ' Else - ' If Not System.IO.Directory.Exists(Ruta & "CBB\Nomina\Demo\") Then System.IO.Directory.CreateDirectory(Ruta & "CBB\Nomina\Demo\") - ' RutaCBB = Ruta & "CBB\Nomina\Demo\" & NominaFolio & ".jpg" - ' End If - ' CBB.GenerarCBB(UsuarioActual.Empresa.RFC, RFC, Total, FolioFiscal, RutaCBB) - - - ' 'GeneraPDF(FechaFactura, FolioFiscal, NoSerieCertificado, FechaCertificacion, NoSerieCertificadoContribuyente, TmpDT, SelloCFDi, SelloSAT, RutaCBB, VentaFolio, Ruta & "XML\" & VentaFolio & ".xml", False, CFDi.CadenaOriginal) - ' 'GeneraPDF(CveNomina, CvePersonal, CvePeriodo, FechaFactura, FolioFiscal, NoSerieCertificado, FechaCertificacion, NoSerieCertificadoContribuyente, SelloCFDi, SelloSAT, RutaCBB, Ruta & "Nomina\XML\" & NominaFolio & ".xml", False, CFDi.Timbrado.CadenaOriginal, FormatoReciboCFDi) - ' GeneraPDFNuevo(String.Format("{0}XML\Nomina\{1}.xml", Ruta, NominaFolio), CvePersonal, CvePeriodo) - ' End If - ' Else - ' 'Me.OnError(String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: EmisorRegimen", Msg, Nombre), New Exception) - ' MsgError = String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: EmisorRegimen", Msg, Nombre) - ' End If - ' Else - ' 'Me.OnError(String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: EmisorDomicilioExpedidoEn", Msg, Nombre), New Exception) - ' MsgError = String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: EmisorDomicilioExpedidoEn", Msg, Nombre) - ' End If - ' Else - ' 'Me.OnError(String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: EmisorDomicilioFiscalCfd", Msg, Nombre), New Exception) - ' MsgError = String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: EmisorDomicilioFiscalCfd", Msg, Nombre) - ' End If - ' Else - ' 'Me.OnError(String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: EmisorCfd", Msg, Nombre), New Exception) - ' MsgError = String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: EmisorCfd", Msg, Nombre) - ' End If - ' Else - ' 'Me.OnError(String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: Comprobante", Msg, Nombre), New Exception) - ' MsgError = String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: Comprobante", Msg, Nombre) + ' 'Genero la addenda Ford + ' ' GeneraPDFNuevo(String.Format("{0}XML\Nomina\{1}.xml", Ruta, NominaFolio), CvePersonal, CvePeriodo) ' End If ' Else - ' 'Me.OnError(String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: Comprobante", Msg, Nombre), New Exception) - ' MsgError = String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: Comprobante", Msg, Nombre) + ' Retorno = $"No se pudo generar el pretimbre:
{cfdi.Mensaje}" ' End If + ' End Select + ' sw.Stop() + ' GuardaLogTimbrado(sw.ElapsedMilliseconds.ToString, UsuarioActual.Empresa.CvePAC, "Nomina") + + ' Return Retorno + + ' End Function + + + + + ' Private Function PreTimbrar(CvePersonal As Integer) As CFDITimbre + ' Dim cfdi As New CFDITimbre + ' Dim ObjFolio As New ClsGralFolios + ' If ObjFolio.GetFolios("VIA", UsuarioActual.CveEmpresa) Then + ' If ObjFolio.DtResultados.Rows.Count > 0 Then + ' Folio = ObjFolio.DtResultados.Rows(0)("FActual").ToString ' Else - ' 'Me.OnError(String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: Comprobante", Msg, Nombre), New Exception) - ' MsgError = String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: Comprobante", Msg, Nombre) + ' ObjFolio.Dispose() + ' Return Nothing ' End If - ' Else - ' 'Me.OnError(String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: Comprobante", Msg, Nombre), New Exception) - ' MsgError = String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: Comprobante", Msg, Nombre) ' End If - ' Else - ' 'Me.OnError(String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: Comprobante", Msg, Nombre), New Exception) - ' MsgError = String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: Comprobante", Msg, Nombre) - ' End If - ' objPersonal.Dispose() - ' objNomina.Dispose() + ' ObjFolio.Dispose() - ' Return MsgError - 'End Function + ' Dim objPersonal As New ClsRH + ' objPersonal.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa) + + ' Dim AntiguedadSemanas As Integer = DateDiff(DateInterval.Weekday, objPersonal.FechaIngreso, Now).ToEntero + + ' cfdi.Nomina = New CFDINomina + ' cfdi.Nomina.Version = "1.2" + ' cfdi.Nomina.TipoNomina = "E" + ' cfdi.Nomina.FechaPago = TxtFechaDocumento.Text.ToDate + ' cfdi.Nomina.FechaInicio = TxtFechaDocumento.Text + ' cfdi.Nomina.FechaFin = TxtFechaDocumento.Text + ' cfdi.Nomina.NumDiasPagados = 1 + ' cfdi.Emisor.Nombre = UsuarioActual.Empresa.Empresa + ' cfdi.Emisor.RFC = UsuarioActual.Empresa.RFC + ' cfdi.Emisor.RegistroPatronal = objPersonal.DtResultados.Rows(0)("RegistroPatronal").ToString() + ' cfdi.Emisor.RegimenFiscal = UsuarioActual.Empresa.CodigoRegimenFiscal + + ' 'aplica persona fisica debe de tener CURP + ' If cfdi.Emisor.RegimenFiscal.Contiene("605", "606", "608", "611", "612", "614", "616", "621", "622", "629", "630", "615") Then + ' cfdi.Emisor.CURP = UsuarioActual.Empresa.CURP + ' End If -#End Region + ' cfdi.Receptor.UsoCFDI = "P01" + ' cfdi.Receptor.RFC = objPersonal.RFC + ' cfdi.Receptor.Nombre = objPersonal.NombreCompleto + + ' Dim ObjOtrosPagos As New List(Of CFDINominaOtrosPagos) + ' ObjOtrosPagos.Add(New CFDINominaOtrosPagos With {.TipoOtroPago = "003", + ' .Clave = "003", + ' .Concepto = "Viáticos (entregados al trabajador).", + ' .Importe = TxtImporte.Text.ToString.ToDecimal + ' } + ' ) + ' If ObjOtrosPagos IsNot Nothing AndAlso ObjOtrosPagos.Count > 0 Then cfdi.Nomina.OtrosPagos = ObjOtrosPagos + + ' cfdi.Comprobante.Version = "3.3" + ' cfdi.Comprobante.Serie = "VIA" + ' cfdi.Comprobante.Folio = Folio + ' cfdi.Comprobante.Fecha = Now + ' cfdi.Comprobante.Subtotal = TxtImporte.Text.ToDecimal + ' cfdi.Comprobante.Descuentos = 0 + ' cfdi.Comprobante.Total = TxtImporte.Text.ToDecimal + ' cfdi.Comprobante.MotivoDescuento = "" + ' cfdi.Comprobante.Moneda = "MXN" + ' cfdi.Comprobante.TipoComprobante = "N" + ' cfdi.Comprobante.TipoDocto = "Egs" + ' cfdi.Comprobante.MetodoPago = "PUE" + ' cfdi.Comprobante.CondicionesdePago = "" + ' cfdi.Comprobante.FormadePago = "99" + ' cfdi.Comprobante.LugarExpedicion = UsuarioActual.Empresa.CP.ToString + ' cfdi.Comprobante.NumCuentaPago = "" + + + ' cfdi.Nomina.Receptor.CURP = objPersonal.CURP + ' cfdi.Nomina.Receptor.NSS = objPersonal.NumeroSS + ' cfdi.Nomina.Receptor.FechaInicioContrato = objPersonal.FechaInicioContrato.ToShortDateString + ' cfdi.Nomina.Receptor.Antiguedad = $"P{AntiguedadSemanas}W" + ' cfdi.Nomina.Receptor.TipoContrato = objPersonal.CodigoTipoContrato + ' cfdi.Nomina.Receptor.CodigoTipoJornada = objPersonal.ClaveTipoJornada + ' cfdi.Nomina.Receptor.CodigoRegimenContratacion = If(objPersonal.CveRegimenContratacion = "", "99", objPersonal.CveRegimenContratacion) + ' cfdi.Nomina.Receptor.CodigoEmpleado = objPersonal.Codigo + ' cfdi.Nomina.Receptor.Departamento = objPersonal.Departamento + ' cfdi.Nomina.Receptor.Puesto = objPersonal.Puesto + ' cfdi.Nomina.Receptor.CodigoRiesgoPuesto = If(objPersonal.CveSATRiesgoPuesto.ToString = "0", "99", objPersonal.CveSATRiesgoPuesto.ToString) + ' cfdi.Nomina.Receptor.TipoPeriodo = objPersonal.TipoPeriodoPago + ' cfdi.Nomina.Receptor.CodigoBanco = objPersonal.ClaveBanco + ' cfdi.Nomina.Receptor.NumeroCuenta = objPersonal.BancoNumCuenta + ' cfdi.Nomina.Receptor.SDI = objPersonal.SDI.ToDecimal + ' cfdi.Nomina.Receptor.SBC = objPersonal.SDI.ToDecimal + + ' cfdi.Nomina.Receptor.Sindicalizado = "" + ' cfdi.Nomina.Receptor.CodigoEntidadFederativa = objPersonal.ClaveEstado + + + ' cfdi.Conceptos.Add(New CFDIConceptos With {.Cantidad = 1, .ClaveUnidad = "ACT", .ClaveProdServ = "84111505", .Descripcion = "Pago de nómina", .ValorUnitario = cfdi.Comprobante.Subtotal, .Importe = cfdi.Comprobante.Subtotal, .Descuento = cfdi.Nomina.TotalDeducciones.ToDecimal}) + + ' objPersonal.Dispose() + ' Return cfdi + ' End Function + + ' 'Private Function TimbrarBIInformNomina12(CveNomina As Integer, CvePersonal As Integer, CvePeriodo As Integer) As String + + ' ' If UsuarioActual.CveEmpresa = 8 Then + ' ' UsuarioActual.Empresa.FacturaProduccion = True + ' ' End If + ' ' 'UsuarioActual.Empresa.FacturaProduccion = False + + ' ' Dim MsgError As String = String.Empty + + ' ' Dim CFDi As New ClbNegBICFDv3_2.ClsNegEDI + ' ' CFDi.ObjCompNomina12 = New ClbNegBICFDv3_2.ClsNegComplementoNomina12() + ' ' 'CFDi.ObjCompNomina = New ClbNegBICFDv3_2.ClsNegCompNomina + + ' ' Dim objPersonal As New ClsRH + ' ' 'Dim objNomina As New ClsNominas + ' ' objPersonal.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa) + ' ' 'objNomina.GetNom_Nominas(CveNomina, CvePersonal, CvePeriodo, -1, UsuarioActual.CveEmpresa) + + + ' ' Dim Total As Decimal = 0 + ' ' Dim SubTotal As Decimal = 0 + ' ' Dim Descuentos As Decimal = 0 + ' ' Dim RetISR As Decimal = 0 + ' ' Dim TotalExcento As Decimal = 0 + ' ' Dim TotalGravado As Decimal = 0 + ' ' Dim TotalPercepciones As Decimal = 0 + ' ' Dim TotalDeducciones As Decimal = 0 + ' ' Dim TotalOtrosPagos As Decimal = 0 + + ' ' Dim Serie As String = "" + ' ' Dim Folio As String = "" + ' ' Dim NominaFolio As String = Serie & "-" & Folio + ' ' Dim RFC As String = objPersonal.RFC.Trim + ' ' Dim Nombre As String = objPersonal.NombreCompleto.Trim + ' ' Dim Direccion As String = String.Format("{0} {1} {2}", objPersonal.Calle.Trim, objPersonal.NumExt.Trim, objPersonal.NumInt.Trim).Trim + ' ' Dim Ciudad As String = objPersonal.Ciudad.Trim + ' ' Dim Estado As String = objPersonal.Estado.Trim + ' ' Dim CP As String = objPersonal.CP.Trim + + + + ' ' 'Dim TipoContrato As String = GlobalDTTiposContrato.FiltraParametros("CveTipoContrato = " + objPersonal.CveTipoContrato.ToString)(0)("TipoContrato").ToString + ' ' 'Dim TipoPeriodo As String = GlobalDTTipoPeriodo.FiltraParametros("CveTipoPeriodo = " + objPersonal.CveTipoPeriodo.ToString)(0)("TipoPeriodo").ToString + ' ' Dim AntiguedadSemanas As Integer = DateDiff(DateInterval.Weekday, objPersonal.FechaIngreso, Now).ToEntero + ' ' Dim FormatoReciboCFDi As String = objPersonal.FormatoReciboCFDi + + ' ' Dim FechaInicio, FechaFin, FechaPago As Date + ' ' Dim DiasPagados As Integer = 0 + ' ' Dim Msg As String = String.Empty + ' ' Dim DiasIncapacitados As Integer = 0 + ' ' Dim DrPeriodo As DataRow = Nothing + + ' ' Dim ObjFolio As New ClsGralFolios + ' ' If ObjFolio.GetFolios("VIA", UsuarioActual.CveEmpresa) Then + ' ' If ObjFolio.DtResultados.Rows.Count > 0 Then + ' ' Folio = ObjFolio.DtResultados.Rows(0)("FActual").ToString + ' ' End If + ' ' End If + + + ' ' 'If objNomina.GetPeriodos(-1, -1, -1, -1, CvePeriodo) Then + ' ' ' If objNomina.DtResultados.Rows().Count > 0 Then + ' ' ' DrPeriodo = objNomina.DtResultados.Rows(0) + ' ' ' End If + ' ' 'End If + ' ' 'Dim DrPeriodo As DataRow = GlobalDTNominasPeriodos(-1, CvePeriodo, -1).FiltroPrimero("") + ' ' If DrPeriodo IsNot Nothing Then + ' ' FechaInicio = DrPeriodo("FechaInicio").ToString.ToDate + ' ' FechaFin = DrPeriodo("FechaFin").ToString.ToDate + ' ' FechaPago = DrPeriodo("FechaPago").ToString.ToDate + ' ' If objPersonal.GetAsistencias(CvePersonal, -1, -1, -1, -1, -1, FechaInicio, FechaFin, UsuarioActual.CveEmpresa) Then + + ' ' Dim Asistencias As Integer = objPersonal.DtResultados.SUM("AplicaAsistencia").ToEntero + ' ' Dim Vacaciones As Integer = objPersonal.DtResultados.SUM("AplicaVacacion").ToEntero + ' ' DiasIncapacitados = objPersonal.DtResultados.SUM("AplicaIncapacidad").ToEntero + ' ' DiasPagados = Asistencias - Vacaciones + ' ' If DiasPagados < 0 Then DiasPagados = 0 + + ' ' End If + + ' ' End If + + ' ' Dim DtPercepciones As Data.DataTable = Nothing + ' ' Dim DtDeducciones As Data.DataTable = Nothing + ' ' Dim DtOtrosPagos As Data.DataTable = Nothing + ' ' 'If objNomina.GetNom_NominasDetalles(CveNomina, CvePersonal, CvePeriodo, "-1") Then + ' ' ' If objNomina.DtResultados.Rows.Count > 0 Then + ' ' ' DtPercepciones = objNomina.DtResultados.FiltraParametros("Tipo = 'P' AND EsPadre = 1 ") + ' ' ' DtDeducciones = objNomina.DtResultados.FiltraParametros("Tipo = 'D' AND EsPadre = 1 ") + ' ' ' TotalPercepciones = DtPercepciones.SUM("Importe") + ' ' ' TotalDeducciones = DtDeducciones.SUM("Importe") + ' ' ' Total = CType((Total + DtPercepciones.SUM("Importe")), Decimal) + ' ' ' End If + ' ' 'End If + + ' ' 'Tipo Nomina O de Ordinaria o E de extraordinaria + ' ' 'Dim FechaPago As Date = Now + ' ' Dim TotalSueldos As Decimal = 0 + ' ' Dim TotalIndemnizacion As Decimal = 0 + ' ' Dim TotalJubilacion As Decimal = 0 + ' ' Msg = CFDi.ObjCompNomina12.Cargar("O", FechaPago, FechaInicio, FechaFin, DiasPagados, TotalPercepciones, TotalDeducciones, 0) + + + + ' ' If Msg = String.Empty Then + ' ' If DtPercepciones IsNot Nothing Then + ' ' If DtPercepciones.Rows.Count > 0 Then + ' ' TotalSueldos = DtPercepciones.SUM("Importe", "SATCveConcepto = '001'") + ' ' TotalIndemnizacion = DtPercepciones.SUM("Importe", "SATCveConcepto IN ('022','023','025')") ' https://www.ccpm.org.mx/avisos/nuevo-complemento-de-nomina-version-1.2-puntos-finos-diciembre-2016.pdf + ' ' TotalJubilacion = DtPercepciones.SUM("Importe", "SATCveConcepto IN ('039','044')") 'https://www.ccpm.org.mx/avisos/nuevo-complemento-de-nomina-version-1.2-puntos-finos-diciembre-2016.pdf + ' ' Msg = CFDi.ObjCompNomina12.CargarPercepciones(TotalSueldos, TotalIndemnizacion, TotalJubilacion, DtPercepciones.SUM("ImporteGravado").ToDecimal, DtPercepciones.SUM("ImporteExento").ToDecimal) + ' ' End If + ' ' For Each Row As DataRow In DtPercepciones.Rows + ' ' If Row("Importe").ToString.ToDecimal > 0 Then + ' ' If Row("CveSATConcepto").ToString = "" Then + ' ' Msg = String.Format("Concepto No registrado ({0})", Row("Concepto").ToString) + ' ' Else + ' ' Msg = CFDi.ObjCompNomina12.AgregarPercepcion(Row("SATCveConcepto").ToString, Row("Codigo").ToString, Row("Concepto").ToString, Row("ImporteGravado").ToString.ToDecimal, Row("ImporteExento").ToString.ToDecimal) + ' ' TotalExcento = TotalExcento + Row("ImporteExento").ToString.ToDecimal + ' ' TotalGravado = TotalGravado + Row("ImporteGravado").ToString.ToDecimal + ' ' SubTotal = SubTotal + Row("Importe").ToString.ToDecimal + ' ' End If + + ' ' If Msg <> String.Empty Then + ' ' Me.OnError("El SAT regresó el siguiente mensaje: " & Msg & ". Objeto: Percepcion", New Exception) + ' ' Exit For + ' ' End If + ' ' End If + ' ' 'RMF, falta poner el numero de horas pagadas + ' ' If Row("CveSATConcepto").ToString.ToEntero = 19 Then 'cuando son horas extras + + ' ' 'Obtengo el desglose de horas extras + + ' ' If objNomina.GetHorasExtras(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa) Then + + ' ' Dim dr As DataRow = objNomina.DtResultados.FiltroPrimero("") + ' ' If dr IsNot Nothing Then + + ' ' If dr("HorasDobles").ToString.ToDouble > 0 Then CFDi.ObjCompNomina12.AgregarHorasExtra(dr("DiasHorasDobles").ToString.ToEntero, ClbNegBICFDv3_2.TipoHoras.Dobles, dr("HorasDobles").ToString.ToEntero, Row("Importe").ToString.ToDecimal) + ' ' If dr("HorasTriples").ToString.ToDouble > 0 Then CFDi.ObjCompNomina12.AgregarHorasExtra(dr("DiasHorasTriples").ToString.ToEntero, ClbNegBICFDv3_2.TipoHoras.Triples, dr("HorasTriples").ToString.ToEntero, Row("Importe").ToString.ToDecimal) + + + ' ' End If + + + ' ' End If + + ' ' End If + ' ' Next + ' ' If Msg = "" Then + ' ' CFDi.ObjCompNomina12.ObjPercepciones.TotalExento = TotalExcento + ' ' CFDi.ObjCompNomina12.ObjPercepciones.TotalGravado = TotalGravado + ' ' End If + + ' ' End If + + ' ' 'cargo las incapacidades + ' ' If DiasIncapacitados > 0 Then + + ' ' If objNomina.GetIncapacidades(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa) Then + + ' ' CFDi.ObjCompNomina12.CargarIncapacidades() + ' ' For Each dr As DataRow In objNomina.DtResultados.Rows + ' ' CFDi.ObjCompNomina12.AgregarIncapacidad(dr("Dias").ToString.ToDecimal, dr("ClaveTipoIncapacidad").ToString.ToEntero, dr("Descuento").ToString.ToDecimal) + ' ' Next + + ' ' End If + + ' ' End If + + + + ' ' TotalExcento = 0 + ' ' TotalGravado = 0 + + ' ' If Msg = String.Empty Then + ' ' If DtDeducciones IsNot Nothing Then + ' ' If DtDeducciones.Rows.Count > 0 Then + ' ' Total = CType((Total - DtDeducciones.SUM("Importe")), Decimal) + ' ' CFDi.ObjCompNomina12.CargarDeducciones(CType(DtDeducciones.SUM("ImporteGravado"), Decimal), CType(DtDeducciones.SUM("ImporteExento"), Decimal)) + ' ' End If + ' ' For Each Row As DataRow In DtDeducciones.Rows + + ' ' If Row("Importe").ToString.ToDecimal > 0 Then + ' ' If Row("CveSATConcepto").ToString = "" Then + ' ' Msg = String.Format("Concepto No registrado ({0})", Row("Concepto").ToString) + ' ' Else + + ' ' Msg = CFDi.ObjCompNomina12.AgregarDeduccion(Row("SATCveConcepto").ToString, Row("Codigo").ToString, Row("Concepto").ToString, 0) + ' ' TotalExcento = TotalExcento + Row("ImporteExento").ToString.ToDecimal + ' ' TotalGravado = TotalGravado + Row("ImporteGravado").ToString.ToDecimal + + ' ' If Row("CveSATConcepto").ToString.ToEntero = 3 Then + ' ' RetISR = RetISR + Row("Importe").ToString.ToDecimal + ' ' Else + ' ' Descuentos = Descuentos + Row("Importe").ToString.ToDecimal + ' ' End If + ' ' End If + + ' ' If Msg <> String.Empty Then + ' ' Me.OnError("El SAT regresó el siguiente mensaje: " & Msg & ". Objeto: Deduccion", New Exception) + ' ' Exit For + ' ' End If + ' ' End If + ' ' Next + ' ' If Msg = "" Then + ' ' If CFDi.ObjCompNomina12.ObjDeducciones IsNot Nothing Then + ' ' CFDi.ObjCompNomina12.ObjDeducciones.TotalOtrasDeducciones = Descuentos + ' ' CFDi.ObjCompNomina12.ObjDeducciones.TotalImpuestosRetenidos = RetISR + ' ' End If + + ' ' End If + ' ' End If + + ' ' If Msg = String.Empty Then + ' ' If DtOtrosPagos IsNot Nothing Then + ' ' If DtOtrosPagos.Rows.Count > 0 Then + ' ' Total = CType((Total - DtOtrosPagos.SUM("Importe")), Decimal) + ' ' CFDi.ObjCompNomina12.CargarOtrosPagos() + ' ' End If + + ' ' For Each Row As DataRow In DtOtrosPagos.Rows + ' ' If Row("Importe").ToString.ToDecimal > 0 Then + ' ' If Row("CveSATConcepto").ToString = "" Then + ' ' Msg = String.Format("Concepto No registrado ({0})", Row("Concepto").ToString) + ' ' Else + ' ' Msg = CFDi.ObjCompNomina12.AgregarOtroPago(Row("SATCveConcepto").ToString, Row("Codigo").ToString, Row("Concepto").ToString, 0) + ' ' 'Msg = CFDi.ObjCompNomina12.CargarSubsidioAlEmpleo(0) + ' ' 'Msg = CFDi.ObjCompNomina12.CargarCompensacionSaldosAFavor(0, 0, 0) + ' ' End If + + ' ' If Msg <> String.Empty Then + ' ' Me.OnError("El SAT regresó el siguiente mensaje: " & Msg & ". Objeto: Otros Pagos", New Exception) + ' ' Exit For + ' ' End If + ' ' End If + ' ' Next + + ' ' End If + + ' ' If Msg = String.Empty Then + ' ' Dim x As Integer = 0 + + ' ' Dim Moneda As String = "MXN" + ' ' Dim LugarExp As String = String.Format("{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8} ", SucCalle, SucNoExt, SucNoInt, SucColonia, SucLocalidad, SucMunicipio, SucEstado, SucPais, SucCP) + ' ' Dim FechaFactura As DateTime = Now + ' ' 'Nodo Comprobante + + ' ' Dim TipoComprobante As ClbNegBICFDv3_2.TipoDeComprobante = ClbNegBICFDv3_2.TipoDeComprobante.egreso + ' ' Msg = CFDi.comprobantecfd(0, 0, Serie, Folio, FechaFactura, "PAGO EN UNA SOLA EXHIBICION", "CONTADO", SubTotal, Descuentos, "Deducciones nómina", "1", Moneda, Total, objPersonal.MetodoPagoSAT, ClbNegBICFDv3_2.TipoDeComprobante.egreso, LugarExp, "", "", "", New Date(1900, 1, 1), 0) + + ' ' If Msg = String.Empty Then + ' ' 'Nodo emisor + ' ' Msg = CFDi.ObjCompNomina12.CargarEmisor("", objPersonal.DtResultados.Rows(0)("RegistroPatronal").ToString(), UsuarioActual.Empresa.RFC) + ' ' 'If Msg = String.Empty Then Msg = CFDi.EmisorRegimen(UsuarioActual.Empresa.CodigoRegimenFiscal) + ' ' If Msg = String.Empty Then + ' ' 'Nodo Entidad SNCF + ' ' If 1 = 2 Then 'cuando es gobierno + ' ' Msg = CFDi.ObjCompNomina12.CargarEntidadSNCF("", 0) + ' ' End If + + ' ' If Msg = String.Empty Then + ' ' 'Nodo Receptor + ' ' Msg = CFDi.ObjCompNomina12.CargarReceptor(objPersonal.CURP, objPersonal.NumeroSS, objPersonal.FechaInicioContrato, AntiguedadSemanas, objPersonal.TipoContrato, "", objPersonal.ClaveTipoJornada, objPersonal.CveRegimenContratacion, objPersonal.Codigo.ToString, + ' ' objPersonal.Departamento, objPersonal.Puesto, objPersonal.CveRiesgoPuesto, objPersonal.TipoPeriodo, objPersonal.ClaveBanco, objPersonal.BancoNumCuenta, Total, objPersonal.SDI.ToString.ToDecimal, objPersonal.ClaveEstado) + ' ' If Msg = String.Empty Then + ' ' 'Nodo SubContratacion + ' ' If 1 = 2 Then Msg = CFDi.ObjCompNomina12.AgregarSubContratacion("", 0) + ' ' If Msg = String.Empty Then + + ' ' CFDi.LstCompNomina12.Add(CFDi.ObjCompNomina12) + + ' ' Dim HasErrorConceptos As Boolean = False + ' ' 'Dim Importe As Decimal = 0 + + + ' ' Msg = CFDi.ConceptosCfd(1, "ACT", "", "Pago de nómina", SubTotal, SubTotal) + + ' ' 'Timbrado + + ' ' 'Web Services de producción: http://biinform.com.mx/srvCFDi/service1.asmx + ' ' 'Web Services de pruebasd: http://biinform.com.mx/srvCFDiPrueba/service1.asmx + + + ' ' Dim WS As String = String.Empty + ' ' If UsuarioActual.Empresa.FacturaProduccion Then + ' ' WS = "http://portalbiinform.com.mx/srvCFDiPrueba/service1.asmx" + ' ' Else + ' ' WS = "http://portalbiinform.com.mx/srvCFDiPrueba/service1.asmx" + ' ' End If + + ' ' If Not System.IO.Directory.Exists(Ruta & "XML\") Then System.IO.Directory.CreateDirectory(Ruta & "XML\") + ' ' If Not System.IO.Directory.Exists(Ruta & "XML\Nomina\") Then System.IO.Directory.CreateDirectory(Ruta & "XML\Nomina\") + + ' ' 'Generar Timbre + ' ' 'If UsuarioActual.Empresa.FacturaProduccion Then + ' ' If 1 = 2 Then + ' ' CFDi.Generar(String.Format("{0}Certificados\{1}", Ruta, UsuarioActual.Empresa.ArchivoPfx), + ' ' UsuarioActual.Empresa.ContraseñaKey, + ' ' String.Format("{0}Certificados\{1}", Ruta, UsuarioActual.Empresa.ArchivoCer), + ' ' String.Format("{0}XML\Nomina\{1}.xml", Ruta, NominaFolio), + ' ' String.Format("{0}Certificados\", Ruta), + ' ' UsuarioActual.Empresa.BIUsuario, + ' ' UsuarioActual.Empresa.BIContraseña, + ' ' WS, + ' ' True) + ' ' Else + ' ' If Not System.IO.Directory.Exists(Ruta & "XML\Nomina\Demo\") Then System.IO.Directory.CreateDirectory(Ruta & "XML\Nomina\Demo\") + ' ' 'RutaPruebas & "XML\Demo\" & NominaFolio & ".xml", + ' ' CFDi.Generar(String.Format("{0}Certificados\aaa010101aaa__csd_01.pfx", RutaPruebas), + ' ' "12345678a", + ' ' String.Format("{0}Certificados\aaa010101aaa__csd_01.cer", RutaPruebas), + ' ' String.Format("{0}XML\Nomina\Demo\{1}.xml", Ruta, NominaFolio), + ' ' String.Format("{0}Certificados\", RutaPruebas), + ' ' "prueba", + ' ' "123", + ' ' WS, + ' ' True) + ' ' End If + + + ' ' If CFDi.MsgError <> String.Empty Then + + ' ' 'OnError("Ocurrió un error al generar el timbre: " & CFDi.MsgError, New Exception) + + ' ' Dim params As New ActualizaTimbre + ' ' params.Estatus = False + ' ' params.CveNomina = CveNomina + ' ' params.CvePAC = 1 + + ' ' 'Dim Hilo As New System.Threading.Thread(AddressOf ActualizaTimbrado) + ' ' 'Hilo.Start(params) + ' ' BtnAutorizar.Enabled = False + ' ' MsgError = "Nombre: " & Nombre & ". Error: " & CFDi.MsgError + ' ' Else + ' ' 'Actualiza Estatus Timbrado + ' ' Dim params As New ActualizaTimbre + ' ' params.Estatus = True + ' ' params.CveNomina = CveNomina + ' ' params.CvePAC = 1 + + ' ' 'Dim Hilo As New System.Threading.Thread(AddressOf ActualizaTimbrado) + ' ' 'Hilo.Start(params) + + ' ' Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar() + ' ' Dim FechaCertificacion As DateTime + ' ' Dim FolioFiscal, NoSerieCertificado, NoSerieCertificadoContribuyente, SelloCFDi, SelloSAT As String + + ' ' FolioFiscal = CFDi.Timbrado.UUDI 'XmlDoc.DocumentElement("cfdi:Complemento").FirstChild.Attributes("UUID").InnerText + ' ' NoSerieCertificado = CFDi.Timbrado.NoCertificadoSAT + ' ' FechaCertificacion = CFDi.Timbrado.FechaTimbrado + ' ' SelloCFDi = CFDi.Timbrado.SelloCFD + ' ' SelloSAT = CFDi.Timbrado.SelloSAT + ' ' NoSerieCertificadoContribuyente = CFDi.Timbrado.NoCertificado + ' ' ViewState("FolioFiscal") = FolioFiscal + + ' ' 'Actualiza Estatus Factura + ' ' CveNominaT = CveNomina + + ' ' Dim Rastro As String = String.Format("Nomina: CvePeriodo:{0}, CvePersonal:{1}, UUID: {2}, RFC:{3}", CvePeriodo, CvePersonal, FolioFiscal, objPersonal.RFC) + ' ' Rastro.GuardaLog() + + ' ' If FolioFiscal <> "" Then + + ' ' 'If UsuarioActual.Empresa.FacturaProduccion Then + ' ' ' Dim ObjNomina2 As New ClsNominas() + ' ' ' ObjNomina2.UpdateEstatusNomNominas(3, UsuarioActual.Empresa.CvePAC, FolioFiscal, "", ("01/01/2000").ToDate, CveNomina, SubTotal, Descuentos, RetISR, Total, DiasPagados) + ' ' ' ObjNomina2.Dispose() + ' ' 'End If + ' ' Rastro = "--Estatus" & Rastro + ' ' Rastro.GuardaLog() + ' ' 'Dim Hilo1 As New System.Threading.Thread(AddressOf ActualizaEstatus) + ' ' 'Hilo1.Start(3) + ' ' End If + + + ' ' Dim RutaCBB As String = String.Empty + ' ' If Not System.IO.Directory.Exists(Ruta & "CBB\") Then System.IO.Directory.CreateDirectory(Ruta & "CBB\") + ' ' If Not System.IO.Directory.Exists(Ruta & "CBB\Nomina\") Then System.IO.Directory.CreateDirectory(Ruta & "CBB\Nomina\") + + ' ' If UsuarioActual.Empresa.FacturaProduccion Then + ' ' RutaCBB = Ruta & "CBB\Nomina\" & NominaFolio & ".jpg" + ' ' Else + ' ' If Not System.IO.Directory.Exists(Ruta & "CBB\Nomina\Demo\") Then System.IO.Directory.CreateDirectory(Ruta & "CBB\Nomina\Demo\") + ' ' RutaCBB = Ruta & "CBB\Nomina\Demo\" & NominaFolio & ".jpg" + ' ' End If + ' ' CBB.GenerarCBB(UsuarioActual.Empresa.RFC, RFC, Total, FolioFiscal, RutaCBB) + + + ' ' 'GeneraPDF(FechaFactura, FolioFiscal, NoSerieCertificado, FechaCertificacion, NoSerieCertificadoContribuyente, TmpDT, SelloCFDi, SelloSAT, RutaCBB, VentaFolio, Ruta & "XML\" & VentaFolio & ".xml", False, CFDi.CadenaOriginal) + ' ' 'GeneraPDF(CveNomina, CvePersonal, CvePeriodo, FechaFactura, FolioFiscal, NoSerieCertificado, FechaCertificacion, NoSerieCertificadoContribuyente, SelloCFDi, SelloSAT, RutaCBB, Ruta & "Nomina\XML\" & NominaFolio & ".xml", False, CFDi.Timbrado.CadenaOriginal, FormatoReciboCFDi) + ' ' GeneraPDFNuevo(String.Format("{0}XML\Nomina\{1}.xml", Ruta, NominaFolio), CvePersonal, CvePeriodo) + ' ' End If + ' ' Else + ' ' 'Me.OnError(String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: EmisorRegimen", Msg, Nombre), New Exception) + ' ' MsgError = String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: EmisorRegimen", Msg, Nombre) + ' ' End If + ' ' Else + ' ' 'Me.OnError(String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: EmisorDomicilioExpedidoEn", Msg, Nombre), New Exception) + ' ' MsgError = String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: EmisorDomicilioExpedidoEn", Msg, Nombre) + ' ' End If + ' ' Else + ' ' 'Me.OnError(String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: EmisorDomicilioFiscalCfd", Msg, Nombre), New Exception) + ' ' MsgError = String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: EmisorDomicilioFiscalCfd", Msg, Nombre) + ' ' End If + ' ' Else + ' ' 'Me.OnError(String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: EmisorCfd", Msg, Nombre), New Exception) + ' ' MsgError = String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: EmisorCfd", Msg, Nombre) + ' ' End If + ' ' Else + ' ' 'Me.OnError(String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: Comprobante", Msg, Nombre), New Exception) + ' ' MsgError = String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: Comprobante", Msg, Nombre) + ' ' End If + ' ' Else + ' ' 'Me.OnError(String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: Comprobante", Msg, Nombre), New Exception) + ' ' MsgError = String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: Comprobante", Msg, Nombre) + ' ' End If + ' ' Else + ' ' 'Me.OnError(String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: Comprobante", Msg, Nombre), New Exception) + ' ' MsgError = String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: Comprobante", Msg, Nombre) + ' ' End If + ' ' Else + ' ' 'Me.OnError(String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: Comprobante", Msg, Nombre), New Exception) + ' ' MsgError = String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: Comprobante", Msg, Nombre) + ' ' End If + ' ' Else + ' ' 'Me.OnError(String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: Comprobante", Msg, Nombre), New Exception) + ' ' MsgError = String.Format("El SAT regresó el siguiente mensaje: {0} Nombre: {1}. Objeto: Comprobante", Msg, Nombre) + ' ' End If + ' ' objPersonal.Dispose() + ' ' objNomina.Dispose() + + ' ' Return MsgError + ' 'End Function + + + '#End Region #Region " GUARDAR - ACTUALIZAR " Private Function ValidaGuardar() As Boolean @@ -3770,16 +3771,16 @@ Partial Class Bancos_IE MsgError = GuardaSolicitudAnticipoOC(ObjOC) End If - If MsgError = "" Then - 'VIATICOS - If ChkAplicaViatico.Checked Then - Dim Retorno As String = TimbrarNomina12(CvePersonal) - If Retorno <> "" Then MsgError = $"{MsgError} {Retorno}" : Msg.Clear() : CveIE = -1 - If Retorno <> "" Then - Alert(Retorno, TipoMensaje.MsgError) - End If - End If - End If + 'If MsgError = "" Then + ' 'VIATICOS + ' If ChkAplicaViatico.Checked Then + ' Dim Retorno As String = TimbrarNomina12(CvePersonal) + ' If Retorno <> "" Then MsgError = $"{MsgError} {Retorno}" : Msg.Clear() : CveIE = -1 + ' If Retorno <> "" Then + ' Alert(Retorno, TipoMensaje.MsgError) + ' End If + ' End If + 'End If If MsgError = "" Then If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then From 3f6d0ea5b6da659c8719ea781d5644d9a217eb16 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 15 Jul 2023 10:26:48 -0700 Subject: [PATCH 08/34] -- mejora en timbrado --- Inventarios/RepEntregaAlmacenRuta.aspx.cs | 37 +++++++++++++++-------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/Inventarios/RepEntregaAlmacenRuta.aspx.cs b/Inventarios/RepEntregaAlmacenRuta.aspx.cs index bb7aa24d7..8ce5fc4b8 100644 --- a/Inventarios/RepEntregaAlmacenRuta.aspx.cs +++ b/Inventarios/RepEntregaAlmacenRuta.aspx.cs @@ -188,7 +188,22 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas } } + private int CveCliente + { + get + { + if (ViewState["CveCliente"] == null) + { + ViewState["CveCliente"] = -1; + } + return ViewState["CveCliente"].ToString().ToEntero(); + } + set + { + ViewState["CveCliente"] = value; + } + } private int CveDireccionOrigen { @@ -356,10 +371,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); CveEntregaAlmacen = GvRow.DataKey("CveEntregaAlmacen").ToEntero(); - CveTimbre = GvRow.DataKey("CveTimbre").ToEntero(); - - int CveCliente = GvRow.DataKey("CveCliente").ToEntero(); - int CveAlmacen = GvRow.DataKey("CveAlmacen").ToEntero(); + CveTimbre = GvRow.DataKey("CveTimbre").ToEntero(); DdlModalCamion.SelectedValueExist(GvRow.DataKey("CveCamion")); DdlModalChofer.SelectedValueExist(GvRow.DataKey("CveChofer")); @@ -383,6 +395,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas } CveDireccionOrigen = GvRow.DataKey("CveDireccionOrigen").ToEntero(); CveDireccionDestino = GvRow.DataKey("CveDireccionDestino").ToEntero(); + CveCliente = GvRow.DataKey("CveCliente").ToEntero(); ModalActualizaDirecciones(CveTimbre); @@ -398,15 +411,12 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas DVDireccionDestino.Visible = true; LnkDireccionDestino.Text = GvRow.DataKey("Direccion") + " "; } - - + UpModalEditarentrega.Update(); RegistraScript("$('#DivEditarEntrega').modal({ backdrop: 'static', keyboard: false });"); - - + } - - + private void ModalActualizaDirecciones(int CveTimbre) { ClsGenerales ObjGeneral = new ClsGenerales(); @@ -1028,9 +1038,10 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas public void EditDireccionOrigen_Click(object sender, EventArgs e) { - //GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); + //GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); //int CveDireccionOrigen = GvRow.DataKey("CveDireccionOrigen").ToEntero(); CveDireccionEditar = CveDireccionOrigen; + //CveCliente = GvRow.DataKey("CveCliente").ToEntero(); LblTitulodireccion.Text = "Actualizar dirección origen"; CargaDatosDireccion(CveDireccionOrigen); } @@ -1067,7 +1078,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas TxtEnvioNoInt.Text = DT.Rows[0]["EnvioNoInt"].ToString(); TxtEnvioCP.Text = DT.Rows[0]["EnvioCP"].ToString(); - // TxtEnvioTel.Text = GvRow.DataKey("EnvioTel") + CveCliente = DT.Rows[0]["CveCliente"].ToString().ToEntero(); DdlDirClientePais.SelectedValueExist(DT.Rows[0]["CvePais"].ToString()); CargaDirClienteEstado(); @@ -1094,7 +1105,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas bool ErrorProceso = false; //CveDireccionEditar - if (!ObjCli.DireccionEnvioUpdate(-1, TxtEnvioDireccion.Text, TxtEnvioNoExt.Text, TxtEnvioNoInt.Text, "-1", "-1", "-1", TxtEnvioCP.Text, "-1", UsuarioActual.CveUsuario, -1, CveDireccionEditar, "-1", -1, "-1", + if (!ObjCli.DireccionEnvioUpdate(CveCliente, TxtEnvioDireccion.Text, TxtEnvioNoExt.Text, TxtEnvioNoInt.Text, "-1", "-1", "-1", TxtEnvioCP.Text, "-1", UsuarioActual.CveUsuario, -1, CveDireccionEditar, "-1", -1, "-1", DdlDirClientePais.SelectedValue.ToEntero(), DdlDirClienteEstado.SelectedValue.ToEntero(), DdlDirClienteMunicipio.SelectedValue.ToEntero(), DdlDirClienteLocalidad.SelectedValue.ToEntero(), DdlDirClienteColonia.SelectedValue.ToEntero())) { ErrorProceso = true; From 9c71d8536a2d96dbf8ee8f835765bb3229817d8b Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 15 Jul 2023 10:27:18 -0700 Subject: [PATCH 09/34] -- comentado de redireccionamiento --- Contabilidad/CatCuentas.aspx.vb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Contabilidad/CatCuentas.aspx.vb b/Contabilidad/CatCuentas.aspx.vb index 1f8142139..86d29fae6 100644 --- a/Contabilidad/CatCuentas.aspx.vb +++ b/Contabilidad/CatCuentas.aspx.vb @@ -28,10 +28,10 @@ Partial Class Contabilidad_CatCuentas Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then - If Not UsuarioActual.CveEmpresa.Contiene(13, 83) AndAlso EsProduccion Then - Response.Redirect("/Contabilidad2/CatCuentas.aspx") - Exit Sub - End If + 'If Not UsuarioActual.CveEmpresa.Contiene(13, 83) AndAlso EsProduccion Then + ' Response.Redirect("/Contabilidad2/CatCuentas.aspx") + ' Exit Sub + 'End If If UsuarioActual.Empresa.UsaContabilidad Then CargaMonedas() From 5197f2a1dbe6fa73139ef24b20ed0fa4436e05bf Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 15 Jul 2023 10:28:28 -0700 Subject: [PATCH 10/34] --- func 509, para ver solo clientes relacionados al personal -- acomodo visual --- RH/Personal.aspx | 88 +++++++++++++++++++++++---------------------- RH/Personal.aspx.vb | 59 ++++++++++++++++-------------- 2 files changed, 79 insertions(+), 68 deletions(-) diff --git a/RH/Personal.aspx b/RH/Personal.aspx index 9f87b141b..b18c06677 100644 --- a/RH/Personal.aspx +++ b/RH/Personal.aspx @@ -292,16 +292,22 @@
-
- - - -
+
+
+
+ + + +
+
+
+
+
@@ -592,23 +598,20 @@ -
- - - -
+
+
-
+
-
+
@@ -625,7 +628,7 @@
-
+
@@ -642,7 +645,7 @@
-
+
@@ -660,7 +663,6 @@
-
@@ -1530,19 +1532,22 @@
- -
- - - +
+
+
+ + + +
+
+
+
+ + + % +
+
- -
- - - % -
-
@@ -2398,7 +2403,7 @@
-
+
<%-- @@ -2456,10 +2461,10 @@ <%----%> - - --%> -
+ + @@ -2501,7 +2506,7 @@ <%--
-
+
@@ -2514,9 +2519,8 @@
+ - @@ -2529,7 +2533,7 @@ - @@ -2542,7 +2546,7 @@ - + @@ -2563,7 +2567,7 @@ - + Cliente @@ -2584,39 +2588,39 @@ Asistencia - + % Pago - + Hrs Dob. - + Hrs Trip. - + Motivo H. Extras - + Obs. - + diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index b17d22ae3..a96c4ffc3 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -1048,22 +1048,14 @@ Partial Class RH_Personal End Sub Private Sub SetValues() ViewState("Orden") = String.Empty - 'DdlClienteAsignado.Attributes.Add("onclick", "CargaClientes();") - 'DdlClienteAsistenciaC.Attributes.Add("onclick", "CargaClientes();") - 'DdlClienteAsistenciaA.Attributes.Add("onclick", "CargaClientes();") CargaClientes() Dim fechainicioasistencia As String Dim fechaFinasistencia As String If Now.Day >= 15 Then - 'fechainicioasistencia = String.Format("{0:01/MM/yyyy}", Now) - 'fechaFinasistencia = String.Format("{0:15/MM/yyyy}", Now) fechainicioasistencia = String.Format("{0:16/MM/yyyy}", Now) Dim dateendasis As DateTime = String.Format("{0:01/MM/yyyy}", Now).ToDateTime().AddMonths(1).AddDays(-1) fechaFinasistencia = String.Format("{0:dd/MM/yyyy}", dateendasis) Else - 'Dim dateendasis As DateTime = String.Format("{0:01/MM/yyyy}", Now).ToDateTime().AddDays(-1) - 'fechainicioasistencia = String.Format("{0:16/MM/yyyy}", dateendasis) - 'fechaFinasistencia = String.Format("{0:dd/MM/yyyy}", dateendasis) fechainicioasistencia = String.Format("{0:01/MM/yyyy}", Now) fechaFinasistencia = String.Format("{0:15/MM/yyyy}", Now) End If @@ -1089,12 +1081,18 @@ Partial Class RH_Personal DdlSubProyectoAsistenciasC.SelectedValue = Request("CveSubProyecto") End If End If - 'DdlProyectoAsistenciaC - 'DdlSubProyectoAsistenciasC End If TxtFechaICredito.Text = $"01/01/{Now.Year}" TxtFechaFCredito.Text = Now.ToShortDateString + + If UsuarioActual.Empresa.Funcionalidad(509) = "1" Then + divCliente.Visible = True + tdCliente1.Visible = True + tdCliente2.Visible = True + GVAsistencia.Columns(1).Visible = True + End If + End Sub Private Sub SetPermisos() 'Permisos @@ -1147,20 +1145,29 @@ Partial Class RH_Personal End Sub Protected Sub cargaagrodeptos() - Using objrh As New ClsRH() - If (objrh.AgroDepartamentosGet(UsuarioActual.CveEmpresa, -1, -1)) Then - Dim dt As DataTable = objrh.DtResultados.FiltraParametros(String.Format("CveTipoTrabajador ={0}", DdlTipoTrabajador.SelectedValue.ToEntero())) - Dim drow As DataRow = dt.NewRow() - drow("CveDepartamento") = "-1" - drow("Departamento") = "Seleccione" - dt.Rows.InsertAt(drow, 0) - If DDlAgroDepartamento.Items.Count() > 0 Then - DDlAgroDepartamento.SelectedValueExist("-1") + + If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then 'empresa agricola + Using objrh As New ClsRH() + divAgroTipoTrabajador.Visible = True + divAgroDepto.Visible = True + divMedioTransporte.Visible = True + divAgro1.Visible = True + divAgro2.Visible = True + If (objrh.AgroDepartamentosGet(UsuarioActual.CveEmpresa, -1, -1)) Then + Dim dt As DataTable = objrh.DtResultados.FiltraParametros(String.Format("CveTipoTrabajador ={0}", DdlTipoTrabajador.SelectedValue.ToEntero())) + Dim drow As DataRow = dt.NewRow() + drow("CveDepartamento") = "-1" + drow("Departamento") = "Seleccione" + dt.Rows.InsertAt(drow, 0) + If DDlAgroDepartamento.Items.Count() > 0 Then + DDlAgroDepartamento.SelectedValueExist("-1") + End If + DDlAgroDepartamento.DataSource = dt + DDlAgroDepartamento.DataBind() End If - DDlAgroDepartamento.DataSource = dt - DDlAgroDepartamento.DataBind() - End If - End Using + End Using + End If + End Sub Private Sub CargaEscolaridad() DdlEscolaridad.DataSource = GlobalDTEscolaridad @@ -1786,7 +1793,7 @@ Partial Class RH_Personal salarioVariable = If(salarioVariable > 0, salarioVariable, 0) TxtSalarioCotizado.Text = ObjPersonal.SalarioDiarioSS.ToString() TxtFISalariodiario.Text = ObjPersonal.SalarioDiario.ToString() - TxtBono.Text = ObjPersonal.Bono.ToString() + 'TxtBono.Text = ObjPersonal.Bono.ToString() TxtNumDiasAguinaldo.Text = ObjPersonal.NumDiasAguinaldo.ToString() TxtFIAguinaldo.Text = ObjPersonal.NumDiasAguinaldo.ToString() TxtPorPrimaVacacional.Text = ObjPersonal.PorPrimaVacacional.ToString() @@ -3746,7 +3753,7 @@ Partial Class RH_Personal params.Add(New ReportParameter("SDD", ObjPersonal.SalarioDiario.ToString())) params.Add(New ReportParameter("SDI", ObjPersonal.SDI.ToString())) params.Add(New ReportParameter("SalarioIMSS", ObjPersonal.SalarioDiarioSS.ToString())) - params.Add(New ReportParameter("Bono", ObjPersonal.Bono.ToString())) + params.Add(New ReportParameter("Bono", "")) params.Add(New ReportParameter("DiasAguinaldo", ObjPersonal.NumDiasAguinaldo.ToString())) params.Add(New ReportParameter("PrimaVacacional", ObjPersonal.PorPrimaVacacional.ToString())) params.Add(New ReportParameter("MetodoPago", If(DdlMetodoPago.SelectedValue = "-1", "", DdlMetodoPago.SelectedItem.Text))) @@ -3836,7 +3843,7 @@ Partial Class RH_Personal params.Add(New ReportParameter("SDD", ObjPersonal.SalarioDiario.ToString())) params.Add(New ReportParameter("SDI", ObjPersonal.SDI.ToString())) params.Add(New ReportParameter("SalarioIMSS", ObjPersonal.SalarioDiarioSS.ToString())) - params.Add(New ReportParameter("Bono", ObjPersonal.Bono.ToString())) + params.Add(New ReportParameter("Bono", "")) params.Add(New ReportParameter("DiasAguinaldo", ObjPersonal.NumDiasAguinaldo.ToString())) params.Add(New ReportParameter("PrimaVacacional", ObjPersonal.PorPrimaVacacional.ToString())) params.Add(New ReportParameter("MetodoPago", If(DdlMetodoPago.SelectedValue = "-1", "", DdlMetodoPago.SelectedItem.Text))) From df2442e0e3a80460c3d57726abf9409858aec1e8 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 15 Jul 2023 10:29:53 -0700 Subject: [PATCH 11/34] =?UTF-8?q?--=20mejora=20en=20timbrado=20de=20n?= =?UTF-8?q?=C3=B3mina=20en=20PAC=203?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/CFDITimbre.vb | 6 +- App_Code/ClsPaginas.vb | 17 ++++++ App_Code/ClsRH.vb | 40 ++++++------- App_Code/ClsSisUsuarios.vb | 3 +- App_Code/LogicNominas.vb | 4 +- App_Code/Timbrado.vb | 37 +++++++----- Documentacion/TableroMaterialidad.aspx.cs | 4 +- Documentacion/TableroMaterialidad2.aspx.cs | 4 +- Nomina/Nomina.aspx.cs | 68 +++++----------------- 9 files changed, 84 insertions(+), 99 deletions(-) diff --git a/App_Code/CFDITimbre.vb b/App_Code/CFDITimbre.vb index baa5ff738..8de6639ec 100644 --- a/App_Code/CFDITimbre.vb +++ b/App_Code/CFDITimbre.vb @@ -308,8 +308,8 @@ Public Class CFDINominaReceptor Public Property TipoPeriodo As String = "" Public Property CodigoBanco As String = "" Public Property NumeroCuenta As String = "" - Public Property SDI As Double = 0 - Public Property SBC As Double = 0 + Public Property SDI As Decimal = 0 + Public Property SBC As Decimal = 0 Public Property CodigoEntidadFederativa As String = "" End Class @@ -486,7 +486,7 @@ Public Class CFDIComplementoPagos20 Get Dim Ret As Decimal = 0 For Each cfd As CFDIComplementoPago In ComplementoPagos - Ret = Ret + ((From c In cfd.Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.0 Select c.BaseMN).Sum() * cfd.TipoCambioP) + Ret = Ret + ((From c In cfd.Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.0 Select c.BaseMN).Sum() * cfd.TipoCambioP.RoundSQL(4)) 'temporal redondeo a 4, 2023.07.07 Next Return Ret.RoundSQL() End Get diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 8dfcc177b..b9e209946 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -1972,6 +1972,23 @@ Public Class ClsPaginas End Set End Property + + Property GlobalDTTipoPeriodos(CveEmpresa As Integer) As DataTable + Get + Dim AppNombre As String = $"GlobalDTTipoPeriodo-{CveEmpresa}" + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim dtt As DataTable = GlobalDTNominasPeriodos(-1, -1, CveEmpresa) + If dtt IsNot Nothing Then + Application(AppNombre) = dtt.FiltraParametros("", DistinctColumns:={"CveTipoPeriodo", "TipoPeriodo"}) + End If + End If + GlobalDTTipoPeriodos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) + End Get + Set(value As DataTable) + Dim AppNombre As String = $"GlobalDTTipoPeriodo-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value + End Set + End Property 'Fin TipoPeriodo 'Periodos Property GlobalDTNominasPeriodos(CveTipoPeriodo As Integer, CvePeriodo As Integer, CveEmpresa As Integer) As DataTable diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb index f0bbd4fc1..744ccdac5 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -1523,16 +1523,14 @@ Public Class ClsRH Public Property TipoPeriodoPago As String Public Property NumeroSS As String Public Property SeInscribioSS As Boolean - Public Property SalarioDiarioPago As Double - Public Property NetoPeriodo As Double - - - Public Property SalarioDiario As Double - Public Property SDI As Double - Public Property SalarioDiarioSS As Double + Public Property SalarioDiarioPago As Decimal + Public Property NetoPeriodo As Decimal + Public Property SalarioDiario As Decimal + Public Property SDI As Decimal + Public Property SalarioDiarioSS As Decimal Public Property NumDiasAguinaldo As Integer - Public Property PorPrimaVacacional As Double - Public Property Bono As Double + Public Property PorPrimaVacacional As Decimal + 'Public Property Bono As Double Public Property CveMetodoPago As Integer Public Property MetodoPago As String Public Property MetodoPagoSAT As String @@ -1644,14 +1642,14 @@ Public Class ClsRH TipoPeriodoPago = Data.Rows(0)("TipoPerioricidadPago").ToString Me.NumeroSS = Data.Rows(0)("NumeroSS").ToString Me.SeInscribioSS = CBool(Data.Rows(0)("SeInscribioSS").ToString) - Me.SalarioDiarioPago = Data.Rows(0)("SalarioDiarioPago").ToString.ToDouble + Me.SalarioDiarioPago = Data.Rows(0)("SalarioDiarioPago").ToString.ToDecimal Me.NetoPeriodo = Data.Rows(0)("NetoPeriodo").ToString.ToDecimal - Me.SalarioDiario = Data.Rows(0)("SalarioDiario").ToString.ToDouble - Me.SDI = Data.Rows(0)("SDI").ToString.ToDouble - Me.Bono = Data.Rows(0)("Bono").ToString.ToDouble - Me.SalarioDiarioSS = Data.Rows(0)("SalarioDiarioSS").ToString.ToDouble + Me.SalarioDiario = Data.Rows(0)("SalarioDiario").ToString.ToDecimal + Me.SDI = Data.Rows(0)("SDI").ToString.ToDecimal + 'Me.Bono = Data.Rows(0)("Bono").ToString.ToDouble + Me.SalarioDiarioSS = Data.Rows(0)("SalarioDiarioSS").ToString.ToDecimal Me.NumDiasAguinaldo = Data.Rows(0)("NumDiasAguinaldo").ToString.ToEntero - Me.PorPrimaVacacional = Data.Rows(0)("PorPrimaVacacional").ToString.ToDouble + Me.PorPrimaVacacional = Data.Rows(0)("PorPrimaVacacional").ToString.ToDecimal Me.CveMetodoPago = Data.Rows(0)("CveMetodoPago").ToString.ToEntero Me.MetodoPago = Data.Rows(0)("MetodoPago").ToString Me.MetodoPagoSAT = Data.Rows(0)("MetodoPagoSAT").ToString @@ -1824,13 +1822,13 @@ Public Class ClsRH Me.TipoPeriodo = Data.Rows(0)("TipoPeriodo").ToString Me.NumeroSS = Data.Rows(0)("NumeroSS").ToString Me.SeInscribioSS = CBool(Data.Rows(0)("SeInscribioSS").ToString) - Me.SalarioDiarioPago = Data.Rows(0)("SalarioDiarioPago").ToString.ToDouble - Me.SalarioDiario = Data.Rows(0)("SalarioDiario").ToString.ToDouble - Me.SDI = Data.Rows(0)("SDI").ToString.ToDouble - Me.Bono = Data.Rows(0)("Bono").ToString.ToDouble - Me.SalarioDiarioSS = Data.Rows(0)("SalarioDiarioSS").ToString.ToDouble + Me.SalarioDiarioPago = Data.Rows(0)("SalarioDiarioPago").ToString.ToDecimal + Me.SalarioDiario = Data.Rows(0)("SalarioDiario").ToString.ToDecimal + Me.SDI = Data.Rows(0)("SDI").ToString.ToDecimal + 'Me.Bono = Data.Rows(0)("Bono").ToString.ToDouble + Me.SalarioDiarioSS = Data.Rows(0)("SalarioDiarioSS").ToString.ToDecimal Me.NumDiasAguinaldo = Data.Rows(0)("NumDiasAguinaldo").ToString.ToEntero - Me.PorPrimaVacacional = Data.Rows(0)("PorPrimaVacacional").ToString.ToDouble + Me.PorPrimaVacacional = Data.Rows(0)("PorPrimaVacacional").ToString.ToDecimal Me.CveMetodoPago = Data.Rows(0)("CveMetodoPago").ToString.ToEntero Me.MetodoPago = Data.Rows(0)("MetodoPago").ToString Me.MetodoPagoSAT = Data.Rows(0)("MetodoPagoSAT").ToString diff --git a/App_Code/ClsSisUsuarios.vb b/App_Code/ClsSisUsuarios.vb index 46296e77d..299054caa 100644 --- a/App_Code/ClsSisUsuarios.vb +++ b/App_Code/ClsSisUsuarios.vb @@ -1845,7 +1845,7 @@ Public Class ClsSisUsuarios #Region " CLONAR USUARIOS " - Public Function ClonarUsuario(CveUsuario As Integer, CveUsuarioClonado As Integer, UsuariosEmpresas As Boolean, UsuariosModulos As Boolean, UsuariosProcesos As Boolean, UsuariosSubProyectos As Boolean, UsuariosAlmacenes As Boolean, UsuariosOC As Boolean, UsuariosOS As Boolean) As Boolean + Public Function ClonarUsuario(CveUsuario As Integer, CveUsuarioClonado As Integer, UsuariosEmpresas As Boolean, UsuariosModulos As Boolean, UsuariosProcesos As Boolean, UsuariosSubProyectos As Boolean, UsuariosAlmacenes As Boolean, UsuariosOC As Boolean, UsuariosOS As Boolean, CveUsuarioModifico As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Sis_ClonarUsuario") @@ -1860,6 +1860,7 @@ Public Class ClsSisUsuarios .Add("@UsuariosAlmacenes", SqlDbType.Bit).Value = UsuariosAlmacenes .Add("@UsuariosOC", SqlDbType.Bit).Value = UsuariosOC .Add("@UsuariosOS", SqlDbType.Bit).Value = UsuariosOS + .Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico End With Try diff --git a/App_Code/LogicNominas.vb b/App_Code/LogicNominas.vb index 4fac911f2..30212760e 100644 --- a/App_Code/LogicNominas.vb +++ b/App_Code/LogicNominas.vb @@ -140,8 +140,8 @@ Public Class LogicNominas Dim TipoPeriodoPago As String = "" Dim ClaveBanco As String = "" Dim BancoNumCuenta As String = "" - Dim SDI As Double = 0 - Dim SalarioDiarioSS As Double = 0 + Dim SDI As Decimal = 0 + Dim SalarioDiarioSS As Decimal = 0 Dim ClaveEstado As String = "" Dim MetodoPagoFijo As Boolean Dim totalDb As Decimal diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb index a08c72b27..64cca2945 100644 --- a/App_Code/Timbrado.vb +++ b/App_Code/Timbrado.vb @@ -1403,7 +1403,7 @@ Public Class Timbrado comprobante.Version = "4.0" comprobante.Fecha = ObjCFDITimbre.Comprobante.Fecha comprobante.FormaPago = ObjCFDITimbre.Comprobante.FormadePago - If ObjCFDITimbre.Comprobante.TipoComprobante.Contiene("I", "E", "N") Then comprobante.CondicionesDePago = ObjCFDITimbre.Comprobante.CondicionesdePago + If ObjCFDITimbre.Comprobante.TipoComprobante.Contiene("I", "E") Then comprobante.CondicionesDePago = ObjCFDITimbre.Comprobante.CondicionesdePago comprobante.SubTotal = ObjCFDITimbre.Comprobante.SubTotal.RoundSQL(NumDecimalesImporte) If ObjCFDITimbre.Comprobante.TipoComprobante.Contiene("I", "E", "N") AndAlso ObjCFDITimbre.Comprobante.Descuentos > 0 Then @@ -2224,8 +2224,8 @@ Public Class Timbrado Nom.Percepciones.Percepcion(i).TipoPercepcion = percep.TipoPercepcion Nom.Percepciones.Percepcion(i).Clave = percep.Clave Nom.Percepciones.Percepcion(i).Concepto = percep.Concepto - Nom.Percepciones.Percepcion(i).ImporteGravado = Math.Round(percep.ImporteGravado, 2).ToString.ToDecimal - Nom.Percepciones.Percepcion(i).ImporteExento = Math.Round(percep.ImporteExento, 2).ToString.ToDecimal + Nom.Percepciones.Percepcion(i).ImporteGravado = percep.ImporteGravado.RoundSQL + Nom.Percepciones.Percepcion(i).ImporteExento = percep.ImporteExento.RoundSQL If ObjCFDITimbre.Nomina.HorasExtras IsNot Nothing AndAlso ObjCFDITimbre.Nomina.HorasExtras.Count > 0 Then Nom.Percepciones.Percepcion(i).HorasExtra = New Profact.TimbraCFDI33.Complementos.Nomina12.NominaPercepcionesPercepcionHorasExtra(ObjCFDITimbre.Nomina.HorasExtras.Count - 1) {} @@ -2265,10 +2265,15 @@ Public Class Timbrado If ObjCFDITimbre.Nomina.Deducciones IsNot Nothing AndAlso ObjCFDITimbre.Nomina.Deducciones.Count > 0 Then Nom.Deducciones = New Profact.TimbraCFDI33.Complementos.Nomina12.NominaDeducciones() - Nom.Deducciones.TotalOtrasDeduccionesSpecified = True - Nom.Deducciones.TotalOtrasDeducciones = Math.Round(ObjCFDITimbre.Nomina.TotalDeduccionesOtras, 2) - Nom.Deducciones.TotalImpuestosRetenidosSpecified = True - Nom.Deducciones.TotalImpuestosRetenidos = Math.Round(ObjCFDITimbre.Nomina.TotalDeduccionesImpuestosRetenidos, 2) + If ObjCFDITimbre.Nomina.TotalDeduccionesOtras > 0 Then + Nom.Deducciones.TotalOtrasDeduccionesSpecified = True + Nom.Deducciones.TotalOtrasDeducciones = ObjCFDITimbre.Nomina.TotalDeduccionesOtras.RoundSQL + End If + If ObjCFDITimbre.Nomina.TotalDeduccionesImpuestosRetenidos > 0 Then + Nom.Deducciones.TotalImpuestosRetenidosSpecified = True + Nom.Deducciones.TotalImpuestosRetenidos = ObjCFDITimbre.Nomina.TotalDeduccionesImpuestosRetenidos.RoundSQL + End If + Nom.Deducciones.Deduccion = New Profact.TimbraCFDI33.Complementos.Nomina12.NominaDeduccionesDeduccion(ObjCFDITimbre.Nomina.Deducciones.Count - 1) {} Dim i As Integer = 0 For Each deduc As CFDINominaDeducciones In ObjCFDITimbre.Nomina.Deducciones @@ -2276,7 +2281,7 @@ Public Class Timbrado Nom.Deducciones.Deduccion(i).TipoDeduccion = deduc.TipoDeduccion Nom.Deducciones.Deduccion(i).Clave = deduc.Clave Nom.Deducciones.Deduccion(i).Concepto = deduc.Concepto - Nom.Deducciones.Deduccion(i).Importe = Math.Round(deduc.Importe, 2) + Nom.Deducciones.Deduccion(i).Importe = deduc.Importe.RoundSQL i += 1 Next End If @@ -2292,10 +2297,10 @@ Public Class Timbrado Nom.OtrosPagos(i).TipoOtroPago = otpag.TipoOtroPago Nom.OtrosPagos(i).Clave = otpag.Clave Nom.OtrosPagos(i).Concepto = otpag.Concepto - Nom.OtrosPagos(i).Importe = otpag.Importe + Nom.OtrosPagos(i).Importe = otpag.Importe.RoundSQL If otpag.TipoOtroPago = "002" Then Nom.OtrosPagos(i).SubsidioAlEmpleo = New Profact.TimbraCFDI33.Complementos.Nomina12.NominaOtroPagoSubsidioAlEmpleo() - Nom.OtrosPagos(i).SubsidioAlEmpleo.SubsidioCausado = otpag.Importe + Nom.OtrosPagos(i).SubsidioAlEmpleo.SubsidioCausado = otpag.Importe.RoundSQL End If i += 1 Next @@ -2322,13 +2327,15 @@ Public Class Timbrado Nom.Receptor.RiesgoPuestoSpecified = True Nom.Receptor.RiesgoPuesto = ObjCFDITimbre.Nomina.Receptor.CodigoRiesgoPuesto Nom.Receptor.PeriodicidadPago = ObjCFDITimbre.Nomina.Receptor.TipoPeriodo - Nom.Receptor.BancoSpecified = True - Nom.Receptor.Banco = ObjCFDITimbre.Nomina.Receptor.CodigoBanco - Nom.Receptor.CuentaBancaria = ObjCFDITimbre.Nomina.Receptor.NumeroCuenta + If ObjCFDITimbre.Nomina.Receptor.CodigoBanco <> "" Then + Nom.Receptor.BancoSpecified = True + Nom.Receptor.Banco = ObjCFDITimbre.Nomina.Receptor.CodigoBanco + Nom.Receptor.CuentaBancaria = ObjCFDITimbre.Nomina.Receptor.NumeroCuenta + End If Nom.Receptor.SalarioBaseCotAporSpecified = True - Nom.Receptor.SalarioBaseCotApor = Decimal.Round(ObjCFDITimbre.Nomina.Receptor.SBC.ToDecimal(), 2) + Nom.Receptor.SalarioBaseCotApor = ObjCFDITimbre.Nomina.Receptor.SBC.RoundSQL Nom.Receptor.SalarioDiarioIntegradoSpecified = True - Nom.Receptor.SalarioDiarioIntegrado = Decimal.Round(ObjCFDITimbre.Nomina.Receptor.SDI.ToDecimal(), 2) + Nom.Receptor.SalarioDiarioIntegrado = ObjCFDITimbre.Nomina.Receptor.SDI.RoundSQL Nom.Receptor.ClaveEntFed = ObjCFDITimbre.Nomina.Receptor.CodigoEntidadFederativa Dim nsNom As New System.Xml.Serialization.XmlSerializerNamespaces() diff --git a/Documentacion/TableroMaterialidad.aspx.cs b/Documentacion/TableroMaterialidad.aspx.cs index fb1099367..799367bb0 100644 --- a/Documentacion/TableroMaterialidad.aspx.cs +++ b/Documentacion/TableroMaterialidad.aspx.cs @@ -1128,8 +1128,8 @@ namespace ADSistemaLibrary3.SatXml case "TIPOJORNADA": xmlCFDI.complemento.nomina12.Receptor.CodigoTipoJornada = xtr.Value; break; case "PUESTO": xmlCFDI.complemento.nomina12.Receptor.Puesto = xtr.Value; break; case "RIESGOPUESTO": xmlCFDI.complemento.nomina12.Receptor.CodigoRiesgoPuesto = xtr.Value; break; - case "SALARIOBASECOTAPOR": xmlCFDI.complemento.nomina12.Receptor.SBC = xtr.Value.ToDouble(); break; - case "SALARIODIARIOINTEGRADO": xmlCFDI.complemento.nomina12.Receptor.SDI = xtr.Value.ToDouble(); break; + case "SALARIOBASECOTAPOR": xmlCFDI.complemento.nomina12.Receptor.SBC = xtr.Value.ToDecimal(); break; + case "SALARIODIARIOINTEGRADO": xmlCFDI.complemento.nomina12.Receptor.SDI = xtr.Value.ToDecimal(); break; case "CLAVEENTFED": xmlCFDI.complemento.nomina12.Receptor.CodigoEntidadFederativa = xtr.Value; break; case "PERIODICIDADPAGO": xmlCFDI.complemento.nomina12.Receptor.TipoPeriodo = xtr.Value; break; case "CUENTABANCARIA": xmlCFDI.complemento.nomina12.Receptor.NumeroCuenta = xtr.Value; break; diff --git a/Documentacion/TableroMaterialidad2.aspx.cs b/Documentacion/TableroMaterialidad2.aspx.cs index 4be48e720..c0992e8d3 100644 --- a/Documentacion/TableroMaterialidad2.aspx.cs +++ b/Documentacion/TableroMaterialidad2.aspx.cs @@ -1047,8 +1047,8 @@ namespace ADSistemaLibrary43.SatXml case "TIPOJORNADA": xmlCFDI.complemento.nomina12.Receptor.CodigoTipoJornada = xtr.Value; break; case "PUESTO": xmlCFDI.complemento.nomina12.Receptor.Puesto = xtr.Value; break; case "RIESGOPUESTO": xmlCFDI.complemento.nomina12.Receptor.CodigoRiesgoPuesto = xtr.Value; break; - case "SALARIOBASECOTAPOR": xmlCFDI.complemento.nomina12.Receptor.SBC = xtr.Value.ToDouble(); break; - case "SALARIODIARIOINTEGRADO": xmlCFDI.complemento.nomina12.Receptor.SDI = xtr.Value.ToDouble(); break; + case "SALARIOBASECOTAPOR": xmlCFDI.complemento.nomina12.Receptor.SBC = xtr.Value.ToDecimal(); break; + case "SALARIODIARIOINTEGRADO": xmlCFDI.complemento.nomina12.Receptor.SDI = xtr.Value.ToDecimal(); break; case "CLAVEENTFED": xmlCFDI.complemento.nomina12.Receptor.CodigoEntidadFederativa = xtr.Value; break; case "PERIODICIDADPAGO": xmlCFDI.complemento.nomina12.Receptor.TipoPeriodo = xtr.Value; break; case "CUENTABANCARIA": xmlCFDI.complemento.nomina12.Receptor.NumeroCuenta = xtr.Value; break; diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index e02203aaa..94e7df386 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -1,12 +1,7 @@ - -using AjaxControlToolkit.HtmlEditor.ToolbarButtons; -using ClbNegBICFDv3_3; -using Extensiones; +using Extensiones; using iTextSharp.text.pdf; -using Profact.TimbraCFDI40; using System; using System.Collections.Generic; -using System.Collections.Specialized; using System.Data; using System.Drawing; using System.IO; @@ -328,11 +323,7 @@ public partial class Nomina_Nomina2 : ClsPaginas DdlTipoTrabajador.SelectedValueExist("-1"); } } - if (UsuarioActual.CveUsuario == 100) - { - Alert("recuerda que solo la empresa (119) tiene activado el timbrado 4.0", TipoMensaje.ToastAdventencia); - } - //CreaObjetoEmpresa(UsuarioActual); + DataTable dtperinc = null; using (ClsNominas objnom = new ClsNominas()) { @@ -490,7 +481,7 @@ public partial class Nomina_Nomina2 : ClsPaginas } private void CargaTiposPeriodo() { - DdlTipoPeriodo.DataSource = GlobalDTTipoPeriodo.FiltraParametros("Estatus = 'Activo'"); + DdlTipoPeriodo.DataSource = get_GlobalDTTipoPeriodos(UsuarioActual.CveEmpresa) ; DdlTipoPeriodoCM.DataSource = DdlTipoPeriodo.DataSource; DdlTipoPeriodoSim.DataSource = DdlTipoPeriodo.DataSource; DdlTipoPeriodoSim.DataBind(); @@ -1442,7 +1433,7 @@ public partial class Nomina_Nomina2 : ClsPaginas LogicNominas lognom = new LogicNominas(); string Msg = ""; - Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: VersionTimbradoEnum.Version4_0); + Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, UsuarioActual.Empresa.CvePAC); if (Msg != null && Msg.Length > 0) { @@ -8947,12 +8938,20 @@ public partial class Nomina_Nomina2 : ClsPaginas if (CvePrePolizaasmilidos > 0) { mensaje = string.Format("{0} Asimilados
", mensaje, CvePrePolizaasmilidos); - } if (CvePrePolizaProrrateo > 0) { mensaje = string.Format("{0} Prorrateo
", mensaje, CvePrePolizaProrrateo); - + } + if (CvePrePolizaProvision > 0) + { + using (ClsContabilidad objconta = new ClsContabilidad()) + { + var objUsuario = UsuarioActual; + if (objconta.ValidacionesPrePoliza(CvePrePolizaProvision, ref objUsuario)) + { + } + } } Alert(mensaje); } @@ -8966,9 +8965,7 @@ public partial class Nomina_Nomina2 : ClsPaginas if (ObjContaz.GetConta_ConceptosContables()) { ContaConceptossource = ObjContaz.DtResultados; - } - } if (UsuarioActual.Empresa.TipoContabilidad == 1) @@ -9003,42 +9000,7 @@ public partial class Nomina_Nomina2 : ClsPaginas GVProvision.DataBind(); RegistraScript("$('#ModalRegistraProvision').modal();"); UpRegistroProvision.Update(); - /* - StringBuilder str = new StringBuilder(); - str.Append(""); - str.Append(""); - //ConceptoContable ConceptoNomina CodigoNombreCompleto - - str.Append(""); - str.Append(""); - str.Append(""); - str.Append(""); - str.Append(""); - foreach (DataRow item in objnom.DTSetResultados.Tables[1].Rows) - { - - str.Append(""); - str.Append(""); - str.Append(""); - str.Append(""); - str.Append(""); - } - str.Append(""); - str.Append("
"); - str.Append("Concepto Contable"); - str.Append(""); - str.Append("Concepto Nomina"); - str.Append(""); - str.Append("Personal"); - str.Append("
"); - str.Append(item["ConceptoContable"]); - str.Append(""); - str.Append(item["ConceptoNomina"]); - str.Append(""); - str.Append(item["CodigoNombreCompleto"]); - str.Append("
"); - Alert(string.Format("
no se pudo registrar la provisión, existen cuentas sin vincular.
{0}", str)); - */ + } } } From 9611704f4990140ee4a5c44138531c3ac275d6b6 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 15 Jul 2023 10:30:07 -0700 Subject: [PATCH 12/34] =?UTF-8?q?--=20se=20quit=C3=B3=20la=20opci=C3=B3n?= =?UTF-8?q?=20de=20saldado?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/ClientesAbonar.aspx | 3 +-- Ventas/ClientesAbonar.aspx.vb | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Ventas/ClientesAbonar.aspx b/Ventas/ClientesAbonar.aspx index 310e1a3ed..429225312 100644 --- a/Ventas/ClientesAbonar.aspx +++ b/Ventas/ClientesAbonar.aspx @@ -652,8 +652,7 @@ - - + diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index d3de55de8..8310c9301 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -2450,7 +2450,6 @@ Partial Class Ventas_ClientesAbonar If CveConceptoDeduccion = 179 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(559).ToEntero If CveConceptoDeduccion = 263 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(537).ToEntero If CveConceptoDeduccion = 252 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(581).ToEntero - If CveConceptoDeduccion = 78 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.IdCuentaOtrosIngresos If UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) Then From 5af9cdbe905bf1c99d1f60dbbb92fee315a05883 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 15 Jul 2023 10:30:50 -0700 Subject: [PATCH 13/34] -- comentado de cuentas de contpaq --- Inventarios/RecepcionAlmacen.aspx.vb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index 6c57c0feb..0d8130362 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -4054,7 +4054,6 @@ Partial Class Inventarios_RecepcionAlmacen ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Dim TotalCosto As Decimal = ObjInventario.DtResultados.SUMD("Total").RoundSQL() - Dim IdCtaContableCostoInd As Integer = 0 'si reciben parcialidades de producto. en base al total de la importacion y lo recibido. Dim PorcentajeRecepcionCompras As Decimal = TotalCosto / DtTempCompras.SUMD("SubTotalTC") Dim ConceptoPartida As String = String.Format("{0}- Inv#{1}", HLFolio.Text, InvFolio) @@ -4071,19 +4070,15 @@ Partial Class Inventarios_RecepcionAlmacen Dim ImporteAbonoME As Decimal = 0 Dim CveConceptoCostoIndirecto As Integer = If(CveImportacionSurtir > 0, 240, 237) - If ObjConta.GetRetCuenta(CveConceptoCostoIndirecto, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then - IdCtaContableCostoInd = ObjConta.DtResultados.FiltroPrimeroValor("IdCtaContable").ToEntero - End If - If UsaComplementariaCostoIndirecto Then CveConceptoCostoIndirecto = If(CveImportacionSurtir > 0, 241, 238) ImporteAbono = SubTotalPartida ImporteAbonoME = (SubTotalPartida * dr("TipoCambio").ToString.ToDecimal) - SubTotalPartida End If - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteAbono, ConceptoPartida, CveConceptoCostoIndirecto, ConceptoPartida, FechaMovto, IdCtaContableCostoInd, -1, CveCompra:=CveComp, CveProveedor:=dr("CveProveedor").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ImporteAbono, CveSubProyecto:=CveSubProyecto) Then + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteAbono, ConceptoPartida, CveConceptoCostoIndirecto, ConceptoPartida, FechaMovto, 0, -1, CveCompra:=CveComp, CveProveedor:=dr("CveProveedor").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ImporteAbono, CveSubProyecto:=CveSubProyecto) Then ' si tiene valor es que hay complementaria If ImporteAbonoME > 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteAbono, ConceptoPartida, If(CveImportacionSurtir > 0, 242, 239), ConceptoPartida, FechaMovto, IdCtaContableCostoInd, -1, CveCompra:=CveComp, CveProveedor:=dr("CveProveedor").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ImporteAbono) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteAbono, ConceptoPartida, If(CveImportacionSurtir > 0, 242, 239), ConceptoPartida, FechaMovto, 0, -1, CveCompra:=CveComp, CveProveedor:=dr("CveProveedor").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ImporteAbono) Then ErrorMovInv = True End If End If From 7bc71149cb915fb8c9d80e55f780380e93537242 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 15 Jul 2023 10:31:08 -0700 Subject: [PATCH 14/34] -- reacomodo --- Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx b/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx index db716dc83..04022a204 100644 --- a/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx +++ b/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx @@ -37,10 +37,8 @@ - -
@@ -97,7 +95,7 @@
-
> +
>
Tipo Movto @@ -136,6 +134,7 @@
+
From 75a628acd487bdd741f3aa2bc71593d4340a2691 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 15 Jul 2023 10:31:46 -0700 Subject: [PATCH 15/34] -- mejora en tipoconta --- Ventas/CatClasificacionesDetalle.aspx.vb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Ventas/CatClasificacionesDetalle.aspx.vb b/Ventas/CatClasificacionesDetalle.aspx.vb index 47e242f3b..c8899794d 100644 --- a/Ventas/CatClasificacionesDetalle.aspx.vb +++ b/Ventas/CatClasificacionesDetalle.aspx.vb @@ -40,10 +40,7 @@ Partial Class CatClasificacionesDetalle If CargaDatos() Then - DdlCategoria.DataSource = GlobalDTGralCategorias(UsuarioActual.CveEmpresa) - DdlCategoria.DataBind() - - If UsuarioActual.Empresa.UsaContabilidad Then + If UsuarioActual.Empresa.TipoContabilidad = 2 Then Dim Cuenta As New ClsContPAQi(UsuarioActual.Empresa) If Cuenta.GetCuentas(-1, "-1", -1) Then @@ -100,8 +97,8 @@ Partial Class CatClasificacionesDetalle Dim Retorno As Boolean = False Dim ObjClasificaciones As New ClsClasificaciones - If ObjClasificaciones.GetClasificaciones() Then - Dim dr As DataRow = ObjClasificaciones.DtResultados.FiltraParametros(String.Format("CveClasificacion = {0} AND CveEmpresa = {1}", CveClasificacion, UsuarioActual.CveEmpresa)).FiltroPrimero("") + If ObjClasificaciones.GetClasificaciones(CveEmpresa:=UsuarioActual.CveEmpresa) Then + Dim dr As DataRow = ObjClasificaciones.DtResultados.FiltraParametros(String.Format("CveClasificacion = {0} ", CveClasificacion)).FiltroPrimero("") If dr IsNot Nothing Then TxtClasificacion.Text = dr("Clasificacion").ToString @@ -110,6 +107,8 @@ Partial Class CatClasificacionesDetalle DdlCuentaCostos.SelectedValue = dr("IdCuentaCostos").ToString DdlCuentaIngresos.SelectedValue = dr("IdCuentaIngresos").ToString + DdlCategoria.DataSource = GlobalDTGralCategorias(UsuarioActual.CveEmpresa) + DdlCategoria.DataBind() DdlCategoria.SelectedValue = dr("CveCategoria").ToString ChkEstado.Checked = dr("Estatus").ToString = "Activo" @@ -123,6 +122,7 @@ Partial Class CatClasificacionesDetalle Me.GvDatos.DataSource = Nothing End If + End If End If From 06e41a255ad02a8ea98f6ca5802f2b4696f5e9a9 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 15 Jul 2023 10:44:36 -0700 Subject: [PATCH 16/34] -- condiconal para descarga de OI, Para E13,83 --- SigAyuda.aspx | 42 +++++++++++++++++++++++++++++++++++++++ SigAyuda.aspx.vb | 51 ++++++++++++++++++++++++++++++------------------ 2 files changed, 74 insertions(+), 19 deletions(-) diff --git a/SigAyuda.aspx b/SigAyuda.aspx index d54b7103e..fcf0a1a56 100644 --- a/SigAyuda.aspx +++ b/SigAyuda.aspx @@ -621,6 +621,48 @@
+ <%-- O I --%> +
+
+ +
+ <%--
diff --git a/SigAyuda.aspx.vb b/SigAyuda.aspx.vb index 5172f53a7..1acdde30e 100644 --- a/SigAyuda.aspx.vb +++ b/SigAyuda.aspx.vb @@ -1,32 +1,45 @@ - -Partial Class Metronic_SigAyuda - Inherits System.Web.UI.Page +Option Explicit On +Option Strict On +Imports Extensiones + +Partial Class Metronic_SigAyuda + Inherits ClsPaginas + + Private Sub Metronic_SigAyuda_Load(sender As Object, e As EventArgs) Handles Me.Load + If Not Page.IsPostBack Then + If usuarioActual.CveEmpresa.Contiene(13, 83) Then + divtaskOI.Visible = True + End If + + End If + End Sub Protected Sub btnDownload_Click(sender As Object, e As EventArgs) Try Dim docto As String = TxtDocto.Text.Replace("/", "\") Dim path As String = $"{AppDomain.CurrentDomain.BaseDirectory}{docto}" - Dim file As New System.IO.FileInfo(path) - Dim mimeType As String = "text/plain" - Try - mimeType = MimeMapping.GetMimeMapping(path) - Catch ex As Exception - End Try - 'Response.Write(path) - Response.Clear() - Response.ClearHeaders() - Response.ClearContent() - Response.AddHeader("Content-Disposition", $"attachment; filename= {Uri.EscapeDataString(file.Name)}") - Response.AddHeader("Content-Length", file.Length.ToString()) - Response.ContentType = mimeType - Response.Flush() - Response.TransmitFile(file.FullName) - Response.End() + Dim mimeType As String = "text/plain" + Try + mimeType = MimeMapping.GetMimeMapping(path) + Catch ex As Exception + End Try + 'Response.Write(path) + Response.Clear() + Response.ClearHeaders() + Response.ClearContent() + Response.AddHeader("Content-Disposition", $"attachment; filename= {Uri.EscapeDataString(file.Name)}") + Response.AddHeader("Content-Length", file.Length.ToString()) + Response.ContentType = mimeType + Response.Flush() + Response.TransmitFile(file.FullName) + Response.End() Catch ex As Exception 'GuardaLog($"GenerateFile: {ex.ToString()}") End Try End Sub + + End Class From a8d8386a6de95d220e821d5a4c00745074846965 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 15 Jul 2023 10:46:11 -0700 Subject: [PATCH 17/34] =?UTF-8?q?-=20=20limpieza=20de=20c=C3=B3digo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Site.master.vb | 122 +------------------------------------------------ 1 file changed, 1 insertion(+), 121 deletions(-) diff --git a/Site.master.vb b/Site.master.vb index b2f3c993b..7e08a10dc 100644 --- a/Site.master.vb +++ b/Site.master.vb @@ -1,17 +1,12 @@ Option Explicit On Option Strict On -Imports System.Activities.Statements Imports System.Data Imports System.IO Imports System.Security.Cryptography.X509Certificates Imports ADSNetLibrary.SIGAPI.Services.SAT.DescargaCFDI -Imports DocumentFormat.OpenXml.Math -Imports DocumentFormat.OpenXml.Packaging Imports DocumentFormat.OpenXml.Spreadsheet Imports Extensiones -'Imports Microsoft.AspNet.SignalR.Client -'Imports ChatHub Partial Class Site Inherits BaseMasterPage @@ -383,19 +378,6 @@ Partial Class Site dt.ReadXml(String.Format("{0}\Menu\ERP\{1}.xml", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveUsuario)) End If - 'Dim Inicio = From i In dt.AsEnumerable Where i!CvePadre.Equals(0) Order By i!Orden - 'Dim CveModuloPadre, CveModuloPadreSeleccionado, CveModuloHijoSeleccionado, CveModuloNietoSeleccionado As Integer - 'Dim CveModulo As Integer = CveModulomasterpage.Text.ToEntero() - 'Dim ScriptColorGrupoModulo As String = "" - 'Dim LinkBase = "javascript:;" - 'Dim HeaderBar As New StringBuilder("
  • Inicio") - 'Dim LinkPadre = "" - 'Dim Linkpapa As String = "" - 'Dim LinkHijo = "" - 'Dim Linkson As String = "" - 'Dim LinkNieto = "" - 'Dim ClassActive As String - 'CveModuloPadreSeleccionado = 0 : CveModuloHijoSeleccionado = 0 : CveModuloNietoSeleccionado = 0 Dim menuobj = New MenuModal() menuobj.dt = dt menuobj.CveModuloSeleccionado = CveModulomasterpage.Text.ToEntero() @@ -408,116 +390,14 @@ Partial Class Site menuobj.HeaderBar.Append(stritem) Next - 'Dim MenuHTML As New StringBuilder - 'For Each drP As DataRow In Inicio - ' CveModuloPadre = drP("CveModulo").ToString().ToEntero() - ' LinkPadre = drP("LIGA").ToString() - ' If drP("PopUp").ToString() = "S" Then LinkPadre = String.Format("javascript:AbrirVentana('{0}',{1},{2},'N');", drP("LIGA"), drP("ANCHO"), drP("ALTO")) - - ' Dim Hijos = From h In dt.AsEnumerable Where h!CvePadre.Equals(CveModuloPadre) Order By h!Orden - ' If CveModulo = drP("CveModulo").ToString().ToEntero() Then - ' HeaderBar.AppendFormat("
  • {1}", LinkPadre, drP("Modulo").ToString()) - ' ScriptColorGrupoModulo = ColorPage(drP("CveGrupoModulo").ToString().ToEntero()) - ' End If - ' If Hijos.Count > 0 Then - ' Linkpapa = LinkPadre - ' LinkPadre = LinkBase - ' MenuHTML.AppendFormat("
  • {2}{1}
  • ") - ' Else - ' MenuHTML.AppendFormat("
  • {2}{1}
  • ", LinkPadre, drP("Modulo"), If(drP("Estilo").ToString() <> "", String.Format("", drP("Estilo")), "")) - ' End If - 'Next - - 'If CveModuloPadreSeleccionado > 0 Then - ' menuobj.MenuHTML = menuobj.MenuHTML.Replace(String.Format("id='m{0}'", CveModuloPadreSeleccionado), String.Format("id='m{0}' class='active open'", CveModuloPadreSeleccionado)) - ' menuobj.MenuHTML = menuobj.MenuHTML.Replace(String.Format("id='j{0}'", CveModuloPadreSeleccionado), String.Format("id='j{0}' class='selected'", CveModuloPadreSeleccionado)) - 'Else - 'End If - 'If CveModuloHijoSeleccionado > 0 Then - ' menuobj.MenuHTML = menuobj.MenuHTML.Replace(String.Format("id='m{0}'", CveModuloHijoSeleccionado), String.Format("id='m{0}' class='open'", CveModuloHijoSeleccionado)) - ' menuobj.MenuHTML = menuobj.MenuHTML.Replace(String.Format("id='j{0}'", CveModuloHijoSeleccionado), String.Format("id='j{0}' class='selected'", CveModuloHijoSeleccionado)) - 'End If - 'HeaderBar.AppendFormat("") menuobj.HeaderBar.AppendFormat("{0}", menuobj.ScriptColorGrupoModulo) BarraNavegacion.Text = menuobj.HeaderBar.ToString() - 'CargaMenu(MenuHTML) + Menu.Text = menuobj.MenuHTML.ToString() menuobj.MenuHTML.Clear() menuobj.HeaderBar.Clear() End Sub - Private Function ColorPage(value As Integer) As String Select Case value From 95c5a3a06337a76d5d24efa5550435c416fe0e7f Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 15 Jul 2023 10:46:37 -0700 Subject: [PATCH 18/34] -- agergado de ayuda --- App_Code/ClsPaginas.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index b9e209946..11cfaaee2 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -6,7 +6,6 @@ Imports System.IO Imports System.Net.Http Imports System.Xml Imports CrystalDecisions.CrystalReports.Engine -Imports CrystalDecisions.ReportSource Imports CrystalDecisions.Shared Imports Extensiones Imports iText.Kernel.Pdf @@ -8174,6 +8173,7 @@ Public Class ClsPaginas PaginaDict.Add("/RH/CalculoSBC.aspx".ToUpper(), 915) PaginaDict.Add("/Inicio.aspx".ToUpper(), -1) PaginaDict.Add("/reporteador.aspx".ToUpper(), -1) + PaginaDict.Add("/SigAyuda.aspx".ToUpper(), -1) PaginaDict.Add("/General/CATIEPSxEntidadFed.aspx".ToUpper(), 719) PaginaDict.Add("/GPS/ReporteUnidadesnoTransmiten.aspx".ToUpper(), 917) PaginaDict.Add("/GPS/RepArrastre.aspx".ToUpper(), 718) From e730548651cfcfaf7dbf937d14664f95b35ec892 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 15 Jul 2023 10:47:33 -0700 Subject: [PATCH 19/34] - --- Bancos/ProveedoresAbonar.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 79c04fe66..09310593f 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -895,7 +895,7 @@ Partial Class Bancos_ProveedoresAbonar IdCuenta = ObjCreditos.DtResultados.Rows(0)("IdCtaContableTarjeta").ToString.ToEntero End If - Dim Importe42 As Decimal = Pago.ImportePago + Pago.OtroGastoIngreso + Dim Importe42 As Decimal = Pago.ImportePago tImporteMN = If(Pago.CveMonedaPago = 2, If(DivTC.Visible, Importe42 / TxtTC.Text.ToDecimal * Pago.TCPago, Importe42 * Pago.TCPago), Importe42) If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Importe42, tImporteMN, 42, Referencia, ConceptoMovimiento, IdCuenta, CveIE:=CveIE, CveProveedor:=CveProveedor, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto) Then From d236ce0b34d5c7c8bdd11af61804f20ba576ac21 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 15 Jul 2023 10:47:55 -0700 Subject: [PATCH 20/34] -- aumento de tolerancia --- Bancos/RepComplementoPago.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bancos/RepComplementoPago.aspx.vb b/Bancos/RepComplementoPago.aspx.vb index 77615c98a..603e2c53b 100644 --- a/Bancos/RepComplementoPago.aspx.vb +++ b/Bancos/RepComplementoPago.aspx.vb @@ -241,7 +241,7 @@ Partial Class Bancos_RepComplementoPago e.Row.FCLabel("LblImp").ForeColor = Drawing.Color.Red e.Row.FCLabel("LblImp").ToolTip = String.Format("Importe Pagado:{0} Importe Pagado PUE: {1}, Ot. Ingresos {2}", e.Row.DBCampo("Importe").FormatoNumero, e.Row.DBCampo("PagadoPUE").FormatoNumero, e.Row.DBCampo("PagadoOtIngresos").FormatoNumero) ' VentasTotalPagado 'si hay una diferencia generado por el tipo de cambio o alguna situación especial, detendrá el timbrado - If Math.Abs(e.Row.DBCampo("Importe").ToDecimal - e.Row.DBCampo("VentasTotalPagado").ToDecimal) > 11 Then + If Math.Abs(e.Row.DBCampo("Importe").ToDecimal - e.Row.DBCampo("VentasTotalPagado").ToDecimal) > 20 Then ' si tiene pagado PUE, habilitamos la condición porque esa puede ser la diferencia If e.Row.DBCampo("PagadoPUE").ToDecimal > 0 OrElse e.Row.DBCampo("PagadoOtIngresos").ToDecimal > 0 Then e.Row.FCCheckBox("Chk").Visible = True From 92a11869677148fdfbb4101e2bcbb9b2f91c6435 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 15 Jul 2023 10:54:04 -0700 Subject: [PATCH 21/34] =?UTF-8?q?--=20parametro=20usuario=20modific=C3=B3?= =?UTF-8?q?=20en=20cloar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sistemas/UsuarioDetalle.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sistemas/UsuarioDetalle.aspx.vb b/Sistemas/UsuarioDetalle.aspx.vb index ce4094a74..d0b30a1a9 100644 --- a/Sistemas/UsuarioDetalle.aspx.vb +++ b/Sistemas/UsuarioDetalle.aspx.vb @@ -3838,7 +3838,7 @@ Partial Class Sistemas_UsuarioDetalle Dim Retorno = False If CveUsuarioClonado > 0 Then - If ObjUsuarios.ClonarUsuario(CveUsuario, CveUsuarioClonado, ChkEmpresas.Checked, ChkModulos.Checked, ChkPermisos.Checked, ChkProyectos.Checked, ChkAlmacenes.Checked, ChkEstatusOC.Checked, ChkEstatusOS.Checked) Then + If ObjUsuarios.ClonarUsuario(CveUsuario, CveUsuarioClonado, ChkEmpresas.Checked, ChkModulos.Checked, ChkPermisos.Checked, ChkProyectos.Checked, ChkAlmacenes.Checked, ChkEstatusOC.Checked, ChkEstatusOS.Checked, UsuarioActual.CveUsuario) Then Alert("El usuario fue clonado con exito.", TipoMensaje.MsgInformacion, "document.location.href=""/Sistemas/Usuarios.aspx"";") Retorno = True Else From 7072c2304716c50d1ffe82e349e4ab38883e7456 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 15 Jul 2023 11:39:30 -0700 Subject: [PATCH 22/34] -- error al usocfdi. no existe en el listado --- Ventas/Clientes.aspx | 2 +- Ventas/Clientes.aspx.vb | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 030bf901b..daa330f9b 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -1108,7 +1108,7 @@
    - + diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index ce5467765..1bd927b65 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -2075,11 +2075,16 @@ Partial Class Clientes If DdlRegimenFiscal.SelectedValue <> "-1" Then RegimenFiscalCliente = GlobalDTRegimenesFiscales(-1).FiltroPrimeroValor("CodigoRegimenFiscal", $"CveRegimenFiscal = {DdlRegimenFiscal.SelectedValue}") Dim tcveuso As Integer = DdlUsoCFDI.SelectedValue.ToEntero - DdlUsoCFDI.SelectedIndex = -1 - DdlUsoCFDI.Items.Clear() + DdlUsoCFDI.SelectedIndex = 0 Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1") DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente) - DdlUsoCFDI.DataBind() + DdlUsoCFDI.Items.Clear() + DdlUsoCFDI.ClearSelection() + Try + DdlUsoCFDI.DataBind() + Catch ex As Exception + + End Try DdlUsoCFDI.Items.Insert(0, New ListItem("Seleccione", "-1")) If tcveuso > 0 Then DdlUsoCFDI.SelectedValueExist(tcveuso) From 6fc8ea8ac095d8a845573fbc22ac2605d2eb23e8 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Sat, 15 Jul 2023 15:05:21 -0700 Subject: [PATCH 23/34] Personal vacaciones calculo dias feriados y fecha fin --- Bancos/IE.aspx.vb | 6 + Compras/ReembolsosComprobaciones.aspx.vb | 22 +- Compras/eFacturas.aspx | 206 +- Compras/eFacturas.aspx.vb | 2299 ++++++++++++++++- Contabilidad/RepAnexoCatalogoSegmento.aspx | 329 ++- Contabilidad/RepAnexoCatalogoSegmento.aspx.vb | 14 +- RH/CatTurno.aspx.vb | 8 +- RH/Personal.aspx | 77 +- RH/Personal.aspx.vb | 57 + 9 files changed, 2761 insertions(+), 257 deletions(-) diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 06f55f91d..19e05fdb1 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -2575,6 +2575,12 @@ Partial Class Bancos_IE Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:

    " Dim Msg As New StringBuilder + + If RBL.SelectedValue = "C" AndAlso DdlCliente.SelectedValue.ToEntero > 0 Then ' Clientes + CveConceptoCompra = 66 + End If + + If CveIE = -1 Then diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index 95a0f5c77..ab0edc788 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -402,8 +402,10 @@ Partial Class Compras_ReembolsosComprobaciones Protected Sub BtnIEGuardar_Click(sender As Object, e As EventArgs) Handles BtnIEGuardar.Click Dim ValFechaDocumento As Boolean = False - Dim FoliosFechasValFechaDocumento As New StringBuilder - FoliosFechasValFechaDocumento.AppendLine("Se seleccionaron facturas con fecha de mes superior al mes del pago:
    ") + + Dim FoliosFechasValFechaDocumentoAnio As New StringBuilder + Dim FoliosFechasValFechaDocumentoPagoMesSuperior As New StringBuilder + Dim FoliosFechasValFechaDocumentoMesInferior As New StringBuilder For Each gvRowVal As GridViewRow In GvCxP.Rows @@ -422,12 +424,16 @@ Partial Class Compras_ReembolsosComprobaciones Dim MesDocumento As Integer = FechaDocumento.Month If AnioFactura > AnioDocumento Then - FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("FechaCompra").ToDate.ToString("dd/MM/yyyy") }
    ") + FoliosFechasValFechaDocumentoAnio.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("FechaCompra").ToDate.ToString("dd/MM/yyyy") }
    ") ValFechaDocumento = True ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then - FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("FechaCompra").ToDate.ToString("dd/MM/yyyy") }
    ") + FoliosFechasValFechaDocumentoMesInferior.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("FechaCompra").ToDate.ToString("dd/MM/yyyy") }
    ") + ValFechaDocumento = True + ElseIf AnioFactura = AnioDocumento And MesDocumento > MesFactura Then + FoliosFechasValFechaDocumentoPagoMesSuperior.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("FechaCompra").ToDate.ToString("dd/MM/yyyy") }
    ") ValFechaDocumento = True End If + End If Next @@ -437,7 +443,13 @@ Partial Class Compras_ReembolsosComprobaciones End If If ValFechaDocumento Then - Alert(FoliosFechasValFechaDocumento.ToString, TipoMensaje.MsgAdvertencia) + + Dim strMensajeValFechas As String = "" + strMensajeValFechas = $"{strMensajeValFechas}{If(FoliosFechasValFechaDocumentoAnio.Length > 0, "Se seleccionarón facturas con fecha de año superior al año del pago:
    " & FoliosFechasValFechaDocumentoAnio.ToString, "")}" + strMensajeValFechas = $"{strMensajeValFechas}{If(FoliosFechasValFechaDocumentoPagoMesSuperior.Length > 0, "Se seleccionarón facturas con fecha de mes inferior al mes del pago:
    " & FoliosFechasValFechaDocumentoPagoMesSuperior.ToString, "")}" + strMensajeValFechas = $"{strMensajeValFechas}{If(FoliosFechasValFechaDocumentoMesInferior.Length > 0, "Se seleccionarón facturas con fecha de mes superior al mes del pago:
    " & FoliosFechasValFechaDocumentoMesInferior.ToString, "")}" + + Alert(strMensajeValFechas, TipoMensaje.MsgAdvertencia) Exit Sub End If diff --git a/Compras/eFacturas.aspx b/Compras/eFacturas.aspx index d5ac164f8..09a6f4be6 100644 --- a/Compras/eFacturas.aspx +++ b/Compras/eFacturas.aspx @@ -80,6 +80,9 @@ Personalizar +
  • + Registar Compras +
  • @@ -184,11 +187,157 @@ +
    +
    + + +
    +
    +
    + + Registro de Facturas +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + + +
    +
    + + + + + +
    +
    + + +
    + + + Caja Chica + Viáticos + + +
    + + +
    +
    + + + + +
    +
    + + +
    + + +
    + +
    +
    + +
    +
    + + + +
    +
    + + + + +
    +
    + +
    +
    + + + + +
    +
    + + +
    +
    + +
    +
    + + + + + +
    +
    + + +
    + +
    + + + + + + + +
    + +
    + + + + + +
    + + + +
    + + + + +
    + +
    + +
    + +
    +
    +
    +
    +
    +
    + + - + + @@ -201,50 +350,22 @@
    + - - -
    -
    - - - - -
    -
    -
    - - - - - -
    -
    - -
    -
    - - -
    -
    - -
    - -
    -
    -
    - -
    -
    +
    - + + + + + + @@ -268,16 +389,7 @@ - <%-- - - - - -
    --%> - <%----%> - -
    diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index f844f6e0c..2596308da 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -13,9 +13,15 @@ Imports System.Threading.Tasks Imports System.Xml Imports ADSistemaLibrary.SatXml Imports ADSistemaLibrary.SatXml.XmlSatCFDI +'Imports ADSNetLibrary.SIGAPI.Helpers +Imports ClsPaginas +'Imports DocumentFormat.OpenXml.Spreadsheet +'Imports DocumentFormat.OpenXml.Wordprocessing Imports Extensiones Imports Microsoft.Reporting.WebForms Imports Newtonsoft.Json.Linq +Imports Telerik.Web.Apoc + Partial Class Compras_eFacturas Inherits ClsPaginas @@ -773,9 +779,9 @@ Partial Class Compras_eFacturas 'If UsuarioActual.TienePermisoProceso(206) Then GvD.Columns(10).Visible = False 'If UsuarioActual.Empresa.Funcionalidad(156) = "1" Then GvD.Columns(5).Visible = True - If UsuarioActual.TienePermisoProceso(81) Then GvD.Columns(13).Visible = True : GvD.Columns(14).Visible = True - If UsuarioActual.TienePermisoProceso(206) Then GvD.Columns(12).Visible = False - If UsuarioActual.Empresa.Funcionalidad(156) = "1" Then GvD.Columns(6).Visible = True + If UsuarioActual.TienePermisoProceso(81) Then GvD.Columns(14).Visible = True : GvD.Columns(15).Visible = True + If UsuarioActual.TienePermisoProceso(206) Then GvD.Columns(13).Visible = False + If UsuarioActual.Empresa.Funcionalidad(156) = "1" Then GvD.Columns(7).Visible = True CargaGvBitacora() @@ -786,6 +792,21 @@ Partial Class Compras_eFacturas GVSolicitudesPendientes.Columns(8).Visible = True End If + 'CARGA REGISTRO DE FACTURA + + + CargaClasificacionesComprobaciones() + CargaClasificaciones() + CargaPS(-1) + CargaPersoanlCajaChica() + CargaPersonalViaticos() + CargaDdlRetIVA() + CargaDdlRetISR() + + Dim LblSubProyectoTemp As New Label + CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyectoTemp, "Seleccione") + LblSubProyecto.InnerText = $"{LblSubProyectoTemp.Text}:" + End If removeasincevent() End Sub @@ -999,7 +1020,7 @@ Partial Class Compras_eFacturas Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvD.RowDataBound If e.Row.RowType = DataControlRowType.Header Then - e.Row.Cells(4).Attributes.Add("data-tipodato", "numeric") + e.Row.Cells(5).Attributes.Add("data-tipodato", "numeric") End If If e.Row.RowType = DataControlRowType.DataRow Then @@ -1025,7 +1046,7 @@ Partial Class Compras_eFacturas End Select - e.Row.Cells(2).Attributes.Add("data-order", e.Row.DBCampo("FechaFactura").ToDate.Ticks.ToString) + e.Row.Cells(3).Attributes.Add("data-order", e.Row.DBCampo("FechaFactura").ToDate.Ticks.ToString) 'e.Row.Cells(4).Attributes.Add("data-order", Convert.ToInt64(e.Row.DBCampo("Total").ToDecimal).ToString.PadLeft(10, "0"c)) @@ -1057,12 +1078,12 @@ Partial Class Compras_eFacturas e.Row.FCLiteral("LtlValidado").Visible = True If e.Row.DBCampo("FueValidado") = "2" Then e.Row.FCLiteral("LtlValidado").Text = "Cancelada" - e.Row.ForeColor = Drawing.Color.Red - e.Row.FCHyperLink("HplProveedor").ForeColor = Drawing.Color.Red + e.Row.ForeColor = System.Drawing.Color.Red + e.Row.FCHyperLink("HplProveedor").ForeColor = System.Drawing.Color.Red ElseIf e.Row.DBCampo("FueValidado") = "3" Then e.Row.FCLiteral("LtlValidado").Text = "Omitida" - e.Row.ForeColor = Drawing.Color.Gray - e.Row.FCHyperLink("HplProveedor").ForeColor = Drawing.Color.Gray + e.Row.ForeColor = System.Drawing.Color.Gray + e.Row.FCHyperLink("HplProveedor").ForeColor = System.Drawing.Color.Gray End If Else If e.Row.DBCampo("TipoFactura") = "CFD" Then @@ -1114,6 +1135,13 @@ Partial Class Compras_eFacturas If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then End If + + If Not e.Row.DataKey("CveProveedor").ToEntero > 0 Then + + e.Row.FCCheckBox("chkRegistraFactura").Visible = False + + End If + End If End Sub Protected Sub GvDatos_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvD.RowUpdating @@ -1221,12 +1249,12 @@ Partial Class Compras_eFacturas e.Row.FCLiteral("LtlValidado").Visible = True If e.Row.DBCampo("FueValidado") = "2" Then e.Row.FCLiteral("LtlValidado").Text = "Cancelada" - e.Row.ForeColor = Drawing.Color.Red - e.Row.FCHyperLink("HplProveedor").ForeColor = Drawing.Color.Red + e.Row.ForeColor = System.Drawing.Color.Red + e.Row.FCHyperLink("HplProveedor").ForeColor = System.Drawing.Color.Red ElseIf e.Row.DBCampo("FueValidado") = "3" Then e.Row.FCLiteral("LtlValidado").Text = "Omitida" - e.Row.ForeColor = Drawing.Color.Gray - e.Row.FCHyperLink("HplProveedor").ForeColor = Drawing.Color.Gray + e.Row.ForeColor = System.Drawing.Color.Gray + e.Row.FCHyperLink("HplProveedor").ForeColor = System.Drawing.Color.Gray End If Else If e.Row.DBCampo("TipoFactura") = "CFD" Then @@ -5022,7 +5050,7 @@ Partial Class Compras_eFacturas Protected Sub LnkModalPersonalizar_Click(sender As Object, e As EventArgs) - GvD.Columns(11).Visible = ChkModalPersonalzarFolioFiscal.Checked + GvD.Columns(12).Visible = ChkModalPersonalzarFolioFiscal.Checked GvPagos.Columns(9).Visible = ChkModalPersonalzarFolioFiscal.Checked GvTraslados.Columns(9).Visible = ChkModalPersonalzarFolioFiscal.Checked @@ -5059,8 +5087,2251 @@ Partial Class Compras_eFacturas End Sub + + +#Region "REGISTRO DE FACTURAS" + + Private Property DTClasificacionesComprobaciones As DataTable + Get + + If ViewState("DTClasificacionesComprobaciones") Is Nothing Then + Return New DataTable + Else + Return DirectCast(ViewState("DTClasificacionesComprobaciones"), DataTable) + End If + + End Get + Set(value As DataTable) + ViewState("DTClasificacionesComprobaciones") = value + End Set + End Property + + + Private Property EstaAsociadoACajaChica() As Boolean + Get + Return If(IsNothing(ViewState("EstaAsociadoACajaChica")), False, CBool(ViewState("EstaAsociadoACajaChica"))) + End Get + Set + ViewState("EstaAsociadoACajaChica") = Value + End Set + End Property + + Private Property EstaAsociadoAPersonal() As Boolean + Get + Return If(IsNothing(ViewState("EstaAsociadoAPersonal")), False, CBool(ViewState("EstaAsociadoAPersonal"))) + End Get + Set + ViewState("EstaAsociadoAPersonal") = Value + End Set + End Property + + Private Property CveMoneda As Integer + Get + Return ViewState("CveMoneda").ToString.ToEntero + End Get + Set(value As Integer) + ViewState("CveMoneda") = value + End Set + End Property + Private Property IdCuentaBancaria As Integer + Get + Return ViewState("IdCuentaBancaria").ToString.ToEntero + End Get + Set(value As Integer) + ViewState("IdCuentaBancaria") = value + End Set + End Property + + + + Private Sub CargaClasificacionesComprobaciones() + + If UsuarioActual.TienePermisoProceso(300) Or UsuarioActual.TienePermisoProceso(301) Then + + Dim ObjClasificaciones As New ClsClasificaciones() + + If ObjClasificaciones.GetClasificacionesComprobaciones(UsuarioActual.CveEmpresa) Then + + If UsuarioActual.TienePermisoProceso(300) And UsuarioActual.TienePermisoProceso(301) Then + DTClasificacionesComprobaciones = ObjClasificaciones.DtResultados + Else + + If UsuarioActual.TienePermisoProceso(300) Then 'TipoComprobacion = 1 Biaticos + DTClasificacionesComprobaciones = ObjClasificaciones.DtResultados.FiltraParametros("TipoComprobacion = 1") + ElseIf UsuarioActual.TienePermisoProceso(301) Then 'TipoComprobacion = 2 Comprobaciones + DTClasificacionesComprobaciones = ObjClasificaciones.DtResultados.FiltraParametros("TipoComprobacion = 2") + End If + + End If + End If + + ObjClasificaciones.Dispose() + + End If + + End Sub + + Private Sub CargaClasificaciones() + DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion") + DdlClasificacion.DataBind() + End Sub + + Private Sub CargaPS(CveClasificacion As Integer) + + DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1") + + If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then + DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue) + DdlPS.SelectedText = "" + DdlPS.SelectedValue = "-1" + Else + DdlPS.ddl.Items.Clear() + + 'DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacion) + + If UsuarioActual.TienePermisoProceso(300) Or UsuarioActual.TienePermisoProceso(301) Then + + Dim DTTemp As New DataTable + DTTemp.Columns.Add("CvePS", GetType(Integer)) + DTTemp.Columns.Add("PSCodigo", GetType(String)) + DTTemp.Columns.Add("CveClasificacion", GetType(Integer)) + + For Each dRow As DataRow In GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).Rows + For Each drowCla As DataRow In DTClasificacionesComprobaciones.Rows + + If drowCla("CveClasificacion").ToString.ToEntero = dRow("CveClasificacion").ToString.ToEntero Then + + Dim InRow As DataRow = DTTemp.NewRow + InRow("CvePS") = dRow("CvePS").ToString.ToEntero + InRow("PSCodigo") = dRow("PSCodigo").ToString + InRow("CveClasificacion") = dRow("CveClasificacion").ToString.ToEntero + DTTemp.Rows.Add(InRow) + + End If + Next + Next + + + DdlPS.DataSource = If(CveClasificacion > 0, DTTemp.FiltraParametros($"CveClasificacion = {CveClasificacion}"), DTTemp) + + Else + DdlPS.DataSource = If(CveClasificacion > 0, GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros($"CveClasificacion = {CveClasificacion}"), GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)) + End If + + DdlPS.ddl.DataBind() + DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1")) + End If + + + + End Sub + + + Protected Sub RBLContado_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RBLContado.SelectedIndexChanged + + CargaContado() + End Sub + + Private Sub CargaContado() + + + DivPersonalReembolso.Visible = False + DivCuentaCajaChicaReembolso.Visible = False + + + Select Case RBLContado.SelectedValue + + Case "2" ' F y E + DivPersonalReembolso.Visible = True + RfvTxtNumeroReembolso.Enabled = True + TxtNumeroReembolso.Text = "" + Case "6" ' Caja Chica + DivCuentaCajaChicaReembolso.Visible = True + RfvTxtNumeroReembolso.Enabled = True + TxtNumeroReembolso.Text = "" + End Select + + UpRegistroFacturas.Update() + + End Sub + + Private Sub CargaPersoanlCajaChica() + Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa) + dt = dt.FiltraParametros(String.Format("CveTipoCuenta = 1")) + DdlCuentaCajaChicaReembolso.DataSource = dt + DdlCuentaCajaChicaReembolso.DataBind() + End Sub + + Private Sub CargaPersonalViaticos() + Dim dtpersonal As DataTable = GlobalDTRHPersonal(UsuarioActual.CveEmpresa) + DdlPersonalReembolso.DataSource = dtpersonal.FiltraParametros("CveEstatusPersonal = 1") + DdlPersonalReembolso.DataBind() + End Sub + + Private Sub CargaDdlRetIVA() + DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1")) + DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4")) + DdlRetIVAConcepto.Items.Insert(0, New ListItem("Fletes P.F.", "2")) + DdlRetIVAConcepto.Items.Add(New ListItem("Resico", "5")) + DdlRetIVAConcepto.Items.Add(New ListItem("General", "6")) + End Sub + + + Private Sub CargaDdlRetISR() + DdlRetISRConcepto.Items.Insert(0, New ListItem("Honorarios", "1")) + DdlRetISRConcepto.Items.Insert(1, New ListItem("Arrendamiento", "2")) + DdlRetISRConcepto.Items.Insert(1, New ListItem("Resico", "3")) + End Sub + + + + Protected Sub DdlPersonal2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlPersonalReembolso.SelectedIndexChanged + ViewState("CvePersonal") = DdlPersonalReembolso.SelectedValue + If DdlPersonalReembolso.SelectedValue.ToEntero > 0 Then + EstaAsociadoAPersonal = True + End If + End Sub + Protected Sub DdlCajaChica2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCuentaCajaChicaReembolso.SelectedIndexChanged + Dim dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("CveCuenta = " & DdlCuentaCajaChicaReembolso.SelectedValue) + + If dr IsNot Nothing Then + CveMoneda = dr("CveMoneda").ToString.ToEntero + IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero + EstaAsociadoACajaChica = True + End If + ViewState("CveCajaChica") = DdlCuentaCajaChicaReembolso.SelectedValue + End Sub + +#End Region + + + + + Protected Sub LnkRegistarFactura_Click(sender As Object, e As EventArgs) + DVRegistraFacturas.Visible = True + GvD.Columns(0).Visible = True + + UpRegistroFacturas.Update() + UpDatos.Update() + End Sub + + Protected Sub BtnGuardarFacturas_Click(sender As Object, e As EventArgs) + + + + For Each GvRow As GridViewRow In GvD.Rows + If GvRow.FCCheckBox("").Checked Then + + Dim CFDIXmlPath As String = $"{UsuarioActual.Empresa.Ruta}Compras\{GvRow.DataKey("RFCDe")}\{GvRow.DataKey("XML")}" + If Not File.Exists(CFDIXmlPath) Then + Exit For + End If + + Dim CompraActual As New Compra2(CFDIXmlPath, Compra2.EnumCargaCompra.DesdeArchivo, GlobalDTTiposGastos(UsuarioActual.CveEmpresa), UsuarioActual) + + CompraActual.CveProveedor = GvRow.DataKey("CveProveedor").ToEntero + CompraActual.CveTipoProveedor = GvRow.DataKey("CveTipoProveedor").ToEntero + CompraActual.CveEstatusFactura = -1 + CompraActual.CvePrePoliza = -1 + CompraActual.TipoCompra = Compra2.EnumTipoCompra.Sin_definir + CompraActual.IEPSGasto = True + + + + Dim ObjCompras As New ClsCompras + Dim ObjConta As New ClsContabilidad(ObjCompras.IniciaTransacSQL) + + Dim ConceptoPoliza As String = String.Format("{0} - {1} - {2}", GvRow.DataKey("NombreProveedor"), GvRow.DataKey("SerieFolio"), "") + + CompraActual.CvePrePoliza = ObjConta.AddPrePolizas("eFacturas/Registrar", 1, CompraActual.Total, CompraActual.Total, CompraActual.CveMoneda, CompraActual.Fecha, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, "", CveTipoPoliza:=3) + + CompraActual.ConfiguraRegistroRapidoReembolso(DdlPS.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero, DdlPersonalReembolso.SelectedValue.ToEntero, + DdlRetIVAConcepto.SelectedValue.ToEntero, DdlRetISRConcepto.SelectedValue.ToEntero) + + 'CompraActual.AddCompra() + + + + + 'If ObjCompras.AddCompra"Fac", TxtDescripcion.Text.Trim, CompraActual.SerieFolio, CompraActual.Folio, CompraActual.FolioSecundario, CompraActual.CveProveedor, CompraActual.SubTotal, CompraActual.Descuentos, + ' CompraActual.Amortizacion, CompraActual.IVA, CompraActual.RetIVA, CompraActual.RetISR, CompraActual.IEPS, CompraActual.OtrosImpuestos, + ' CompraActual.Redondeo, CompraActual.Total, CompraActual.Fecha, CompraActual.CveMoneda, CompraActual.TipoCambio, If(CompraActual.FechaPago = Nothing, CompraActual.Fecha, CompraActual.FechaPago), CompraActual.AplicaNotaCredito, CompraActual.Observaciones, CompraActual.CveEstatusFactura, + ' CompraActual.CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CompraActual.IdPoliza, CveCajaChica:=CompraActual.CveCajaChica, CvePersonal:=CompraActual.CvePersonal, NumeroReembolso:=CompraActual.NumeroReembolso, CveProveedorSucursal:=CompraActual.CveProveedorSucursal, + ' AplicoPromocion:=CompraActual.AplicoPromocion, PorcentajeIVA:=CompraActual.PorcentajeIVA, CveMetodoPago:=CompraActual.CveMetodoPago, CveRetIVAConcepto:=CompraActual.CveRetIVAConcepto, + ' CveConceptoContableAlmacen:=CompraActual.CveConceptoContableAlmacen, + ' CveRetISRConcepto:=CompraActual.CveRetISRConcepto, NoDeducible:=CompraActual.NoDeducible, CveTipoCompra:=CompraActual.CveTipoCompra, TotalOriginal:=CompraActual.TotalOriginal, CveTipoConcepto:=CompraActual.CveTipoConcepto, + ' EsImportacion:=CompraActual.EsImportacion, CveFactura:=CompraActual.CveFactura, CveSubProyecto:=CompraActual.CveSubProyectoPrincipal, DoctosRelacionados:=CompraActual.DocumentosRelacionadosUUIDSString, CveFolioGarantia:=CompraActual.CveFolioGarantia) Then + + + ' CompraActual.CveCompra = ObjCompras.CveCompra + + ' If CompraActual.CveCompra > 0 Then + + + ' 'For Each Row As DataRow In CompraActual.TmpDT.Rows + ' ' If Not ObjCompras.AddCompraDetalle(CompraActual.CveCompra, Row("CveUM").ToString.ToEntero, Row("CvePS").ToString.ToEntero, Row("CveSubProyecto").ToString.ToEntero, -1, CveAF, + ' ' Row("Cantidad").ToString.ToDecimal, Row("PU").ToString.ToDecimal, Row("IVA").ToString.ToDecimal, Row("Total").ToString.ToDecimal, Row("Descuento").ToString.ToDecimal, + ' ' Row("Obs").ToString, Row("CveOrdenCompraDetalle").ToString.ToEntero, TipoRecepcion, Row("CveContrato").ToString.ToEntero, Row("CvePresupuestoEgreso").ToString.ToEntero, + ' ' AplicaCostoIndirecto:=Row("AplicaCostoIndirecto").ToString.ToEntero, EstatusAlmacen:=Row("EntregaDirecta").ToString.ToEntero, CvePersonal:=CvePersonal, + ' ' CveTipoGasto:=Row("CveTipoGasto").ToString.ToEntero, AF_Medida:=Row("AFMedida").ToString.ToEntero, AF_TipoMantenimiento:=Row("AFTipoMantenimiento").ToString.ToEntero, Referencia:=Referencia, OtrosGastos:=Row("OtrosGastos").ToString.ToDecimal, + ' ' RetIVA:=Row("RetIVA").ToString.ToDecimal, RetISR:=Row("RetISR").ToString.ToDecimal, IEPSPS:=Row("IEPSPS").ToString.ToDecimal.RoundSQL, IEPSPSIVA:=Row("IEPSPSIVA").ToString.ToDecimal, + ' ' IVAPorcentaje:=Row("IVAPorcentaje").ToString.ToDecimal, RetIVAPorcentaje:=Row("RetIVAPorcentaje").ToString.ToDecimal, RetISRPorcentaje:=Row("RetISRPorcentaje").ToString.ToDecimal, + ' ' IEPSPSPorcentaje:=Row("IEPSPSPorcentaje").ToString.ToDecimal, IEPSPSIVAPorcentaje:=Row("IEPSPSIVAPorcentaje").ToString.ToDecimal, NoDeducible:=If((Row("NoDeducible").ToString().ToUpper().Contiene("TRUE", "1")) AndAlso EsNoDeducible, True, False), + ' ' CveContratoDetalle:=Row("CveContratoDetalle").ToString.ToEntero, CveCultivoCuadroDetalle:=Row("CveCultivoCuadroDetalle").ToString.ToEntero, CveActivoFijoCompra:=CveAFC) Then + + ' ' ErrorDetalles = True + ' ' Exit For + ' ' End If + ' 'Next + + + + ' End If + + + 'End If + + + + ObjCompras.RollBack() + End If + Next + + End Sub End Class +Public Class Compra2 + + Enum EnumCargaCompra + DesdeXML + DesdeArchivo + End Enum + Public Enum EnumCFDIVersion + v32 + V33 + V40 + End Enum + + Public Enum EnumTipoCompra + Sin_definir = -1 + Gasto_con_almacen = 10 + Activo_Fijo = 1 + 'Costo_Indirecto = 2 + Almacen = 3 + Almacen_con_costo_indirecto = 8 + Costo_Indirecto = 4 + Importación = 5 + NC_Con_Productos = 6 + Apoyo_Logístico = 9 + NC_Por_Devolución = 11 + Garantia = 12 + End Enum + + + Public Enum EnumModalidadAccionPS + Agregar + Actualizar + End Enum + + Public Property CveCompra As Integer = -1 + Public Property CveProveedor As Integer + Public Property CveTipoConceptoProveedor As Integer + Public Property CveMoneda As Integer + Public Property Fecha As Date + Public ReadOnly Property SerieFolio As String + Get + If Serie.Length > 0 Then + Return $"{Serie}-{Folio}" + Else + Return $"{Folio}" + End If + End Get + End Property + + Public Property Serie As String = "" + Public Property Folio As String = "" + Public Property FolioSecundario As String = "" + Public Property Descripcion As String = "" + Public Property CFDIVersion As EnumCFDIVersion = EnumCFDIVersion.V40 + Public Property ProveedorNombre As String = "" + Public Property EsImportacion As Boolean = False + Public Property TC As Decimal = 1 + Public Property SubTotal As Decimal = 0D + Public Property SubTotal2 As Decimal = 0D + Public Property Descuentos As Decimal = 0D + Public Property Total As Decimal = 0D + Public Property Moneda As String = "" + Public Property TipoComprobante As String + Public Property TipoCambio As Decimal = 1 + Public Property CompraNoDeducible As Integer = 0 + Public Property IVA As Decimal = 0D + Public Property IVADeducible As Decimal = 0D + Public Property IVANoDeducible As Decimal = 0 + Public Property IEPS As Decimal = 0D + Public Property RetIVA As Decimal = 0D + Public Property RetISR As Decimal = 0D + Public Property PorcentajeIVA As Decimal = 0 + Public Property PorcentajeISR As Decimal = 0 + Public Property CveRetIVAConcepto As Integer = -1 + Public Property CveRetISRConcepto As Integer = -1 + Public Property CveSubProyecto As Integer = -1 + Public Property UsuarioActual As Usuario + Public Property IdCtaContableProv As Integer = -1 + Public Property IdCtaContableProvComplementaria As Integer = -1 + Public Property IdCtaContableAnticipoProv As Integer = -1 + Public Property IdCtaContableAnticipoProvComplementaria As Integer = -1 + Public ReadOnly Property ConceptoPrePolizaIVA As ConceptosRetenciones + Get + Dim Ret As New ConceptosRetenciones + If EsImportacion Then + Ret.CveConceptoAcreditable = 288 + Ret.CveConceptoxAcreditar = 287 + Else + Ret.CveConceptoAcreditable = 19 + Ret.CveConceptoxAcreditar = 14 + End If + Return Ret + End Get + End Property + Public ReadOnly Property ConceptoPrePolizaRetIVA As ConceptosRetenciones + Get + Dim Ret As New ConceptosRetenciones + Dim Funcionalidad, FuncionalidadxAcred As Integer + If CveRetIVAConcepto = 1 Then + Funcionalidad = 308 : FuncionalidadxAcred = 307 + Ret.CveConceptoAcreditable = 22 + Ret.CveConceptoxAcreditar = 15 + ElseIf CveRetIVAConcepto = 2 Then + Funcionalidad = 310 : FuncionalidadxAcred = 309 + Ret.CveConceptoAcreditable = 184 + Ret.CveConceptoxAcreditar = 183 + ElseIf CveRetIVAConcepto = 3 Then + Funcionalidad = 312 : FuncionalidadxAcred = 311 + Ret.CveConceptoAcreditable = 186 + Ret.CveConceptoxAcreditar = 185 + ElseIf CveRetIVAConcepto = 4 Then + Funcionalidad = 314 : FuncionalidadxAcred = 313 + Ret.CveConceptoAcreditable = 249 + Ret.CveConceptoxAcreditar = 248 + ElseIf CveRetIVAConcepto = 5 Then + Funcionalidad = 578 : FuncionalidadxAcred = 578 + Ret.CveConceptoAcreditable = 286 + Ret.CveConceptoxAcreditar = 285 + ElseIf CveRetIVAConcepto = 6 Then + Funcionalidad = 578 : FuncionalidadxAcred = 578 + Ret.CveConceptoAcreditable = 333 + Ret.CveConceptoxAcreditar = 334 + End If + If UsuarioActual.Empresa.TipoContabilidad = 2 Then + Dim ObjConta As New ClsContabilidad + If UsuarioActual.Empresa.Funcionalidad(FuncionalidadxAcred).ToEntero > 0 Then + Ret.IdCtaContablexAcreditar = UsuarioActual.Empresa.Funcionalidad(FuncionalidadxAcred).ToEntero + Else + If ObjConta.GetRetCuenta(Ret.CveConceptoxAcreditar, UsuarioActual.CveEmpresa) Then + If ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero + End If + End If + If UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero > 0 Then + Ret.IdCtaContableAcreditable = UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero + Else + If ObjConta.GetRetCuenta(Ret.CveConceptoAcreditable, UsuarioActual.CveEmpresa) Then + If ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero + End If + End If + ObjConta.Dispose() + End If + Return Ret + End Get + End Property + Public ReadOnly Property ConceptoPrePolizaRetISR As ConceptosRetenciones + Get + Dim Ret As New ConceptosRetenciones + Dim Funcionalidad, FuncionalidadxAcred As Integer + If CveRetISRConcepto = 1 Then + Funcionalidad = 316 : FuncionalidadxAcred = 315 + Ret.CveConceptoAcreditable = 23 + Ret.CveConceptoxAcreditar = 16 + ElseIf CveRetISRConcepto = 2 Then + Funcionalidad = 318 : FuncionalidadxAcred = 317 + Ret.CveConceptoAcreditable = 244 + Ret.CveConceptoxAcreditar = 243 + ElseIf CveRetISRConcepto = 3 Then + Funcionalidad = 349 : FuncionalidadxAcred = 348 + Ret.CveConceptoAcreditable = 328 + Ret.CveConceptoxAcreditar = 327 + End If + If UsuarioActual.Empresa.TipoContabilidad = 2 Then + Dim ObjConta As New ClsContabilidad + If UsuarioActual.Empresa.Funcionalidad(FuncionalidadxAcred).ToEntero > 0 Then + Ret.IdCtaContablexAcreditar = UsuarioActual.Empresa.Funcionalidad(FuncionalidadxAcred).ToEntero + Else + If ObjConta.GetRetCuenta(Ret.CveConceptoxAcreditar, UsuarioActual.CveEmpresa) Then + If ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero + End If + End If + If UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero > 0 Then + Ret.IdCtaContableAcreditable = UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero + Else + If ObjConta.GetRetCuenta(Ret.CveConceptoAcreditable, UsuarioActual.CveEmpresa) Then + If ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero + End If + End If + ObjConta.Dispose() + End If + Return Ret + End Get + End Property + + Public Property CveMetodoPago As Integer + Public Property MetodoPago As String + Public Property DocumentosRelacionadosUUIDSList As List(Of String) + Public ReadOnly Property DocumentosRelacionadosUUIDSString As String + Get + Return GeneraStringDoctosRelacionados() + End Get + End Property + + Public Property DocumentosRelacionadosAnticiposUUIDList As List(Of String) + Public Property TieneAnticiposXML As Boolean = False + Public Property EmisorRFC As String + Public Property ReceptorRFC As String + Public Property UUID As String = "" + Public Property TotalRetenciones As Decimal = 0D + Public Property RetencionIVA As Decimal = 0D + Public Property RetencionISR As Decimal = 0D + Public Property SumaTotalRetenciones As Decimal = 0D + Public Property TotalTraslados As Decimal = 0D + Public Property TrasladoIVA As Decimal = 0D + Public Property TrasladoIEPS As Decimal = 0D + Public Property TrasladoIEP As Decimal = 0D + Public Property SumaTotalTraslados As Decimal = 0D + Public Property OtrosImpuestos As Decimal = 0D + Private Property OtrosImpuestosRetenciones As Decimal = 0D + Public Property Amortizacion As Decimal = 0D + Public Property FechaPago As Date 'FIX ME corregir usando fecha interna calculada por los dias de credito del proveedor + Public Property AplicaNotaCredito As Boolean = False + + Public Property XMlStr As String + Public Property XMLCargaExistosa As Boolean = True + + + Public Property Observaciones As String = "" + Public Property CveEstatusFactura As Integer = -1 + Public Property CvePrePoliza As Integer = -1 + Public Property Redondeo As Decimal = 0 + Public Property IdPoliza As Integer = -1 + Public Property CveCajaChica As Integer = -1 + Public Property CvePersonal As Integer = -1 + Public Property NumeroReembolso As String = "" + Public Property CveProveedorSucursal As Integer = -1 + Public Property AplicoPromocion As Boolean = False + Public Property CveConceptoContableAlmacen As Integer = -1 + Public Property NoDeducible As Integer = 0 + Public Property CveTipoCompra As Integer = 1 + Public Property TotalOriginal As Decimal = 0D + Public Property CveTipoConcepto As Integer = 1 'FIX ME Esto tiene que ver con el CveTipoProveedor 1 y 3 es CveTipoConcepto 1 y 2 es CveTipoConcepto 2 + Public Property CveSubProyectoPrincipal As Integer = -1 + Public Property CveFactura As Integer = -1 + Public Property CveFolioGarantia As Integer = -1 + Public Property TmpDT As DataTable = New DataTable + Public Property SubTotalConceptos As Decimal = 0D + + Private Errores As StringBuilder + + Public ReadOnly Property MSG_Error As String + Get + Return Errores.ToString() + End Get + End Property + + Public Property CompraSaldo As Decimal = 0D + Public Property SubTotalOriginal As Decimal = 0D + Public Property SubTotal2Original As Double = 0D + Public Property IVAOriginal As Decimal = 0D + Public Property RetIVAOriginal As Decimal = 0D + Public Property RetISROriginal As Decimal = 0D + Public Property Proyecto As String = "" + Public Property CveProyecto As Integer = -1 + Public Property SubProyecto As String = "" + Public Property TipoCompra As EnumTipoCompra = EnumTipoCompra.Sin_definir + Private Property DTTiposGastos() As DataTable + Public Property CveTipoProveedor As Integer = -1 + Public Property IEPSGasto As Boolean = False + Public Property OtrosImpuestosGasto As Boolean = False + Public Property OCVinculada As Boolean = False + Public Property NumNoDed As Integer = 0 + + Public Sub New(XmlFuente As String, OpcionCarga As EnumCargaCompra, DTTiposGastos As DataTable, UsuarioActual As Usuario) + + Errores = New StringBuilder + + Me.DTTiposGastos = DTTiposGastos + Me.UsuarioActual = UsuarioActual + + If OpcionCarga = EnumCargaCompra.DesdeArchivo Then + CargaDesdeArchivo(XmlFuente) + Else + CargaDesdeString(XmlFuente) + End If + + + End Sub + + Private Sub CargaDesdeArchivo(XmlFuenteRuta As String) + + Dim XMLDoc As New XmlDocument + + If IO.File.Exists(XmlFuenteRuta) Then + XMlStr = File.ReadAllText(XmlFuenteRuta).Replace("<br>", "").Replace("<", "").Replace("o;?", "") + Try + XMLDoc.LoadXml(XMlStr) + XMLCargaExistosa = True + Catch ex As Exception + Try + Dim oReader = New StreamReader(XmlFuenteRuta, Encoding.GetEncoding("ISO-8859-1")) + XMLDoc.Load(oReader) + oReader.Dispose() + XMLCargaExistosa = True + Catch ex2 As Exception + GuardaLog("Error al intentar leer el XML del SAT. Error:" & ex2.ToString()) + Errores.AppendLine("Error al intentar leer el XML. Error:" & ex2.ToString()) + XMLCargaExistosa = False + End Try + End Try + End If + + If XMLCargaExistosa Then + CargaComprobanteXML(XMLDoc) + End If + + + End Sub + Private Sub CargaDesdeString(XmlFuente As String) + XMlStr = XmlFuente.Replace("<br>", "").Replace("<", "").Replace("o;?", "") + Dim XMLDoc As New XmlDocument + Try + XMLDoc.LoadXml(XMlStr) + XMLCargaExistosa = True + Catch ex As Exception + GuardaLog("Error al intentar leer . Error:" & ex.ToString()) + Errores.AppendLine("Error al intentar leer el XML. Error:" & ex.ToString()) + XMLCargaExistosa = False + End Try + + If XMLCargaExistosa Then + CargaComprobanteXML(XMLDoc) + End If + + + End Sub + + + Private Sub CargaComprobanteXML(XMLDoc As XmlDocument) + Dim nodo As XmlNode = XMLDoc.DocumentElement + + Serie = ValorXML(nodo, "serie") + + Dim StrCFDIVerion As String = ValorXML(nodo, "version") + + + If StrCFDIVerion = "3.2" Then + CFDIVersion = EnumCFDIVersion.v32 + ElseIf StrCFDIVerion = "3.3" Then + CFDIVersion = EnumCFDIVersion.V33 + ElseIf StrCFDIVerion = "4.0" Then + CFDIVersion = EnumCFDIVersion.V40 + Else + GuardaLog($"CFDI Versión {StrCFDIVerion} no soportada") + Errores.AppendLine($"CFDI Versión {StrCFDIVerion} no soportada") + XMLCargaExistosa = False + Exit Sub + End If + + + Folio = ValorXML(nodo, "folio") + Fecha = ValorXML(nodo, "fecha").ToDate + SubTotal = ValorXML(nodo, "subTotal").ToDecimal + Total = ValorXML(nodo, "total").ToDecimal + Descuentos = ValorXML(nodo, "descuento").ToDecimal + Moneda = ValorXML(nodo, "Moneda") + + CveMoneda = GlobalDTMonedas().FiltroPrimeroValor("CveMoneda", $" AbreviaturaSAT = '{Moneda}' ").ToEntero + If Not CveMoneda > 0 Then + GuardaLog($"Moneda {Moneda} no se obtuvo la clabe") + Errores.AppendLine($"Moneda {Moneda} no se obtuvo la clabe") + XMLCargaExistosa = False + Exit Sub + End If + + TipoComprobante = ValorXML(nodo, "tipoDeComprobante") + TipoCambio = ValorXML(nodo, "TipoCambio", "1").ToDecimal + + If CFDIVersion = EnumCFDIVersion.V33 Or CFDIVersion = EnumCFDIVersion.V40 Then + Dim drm As DataRow = GlobalDTVtaMetodoPago.FiltroPrimero(String.Format("ClaveMetodoPagoSAT = '{0}'", ValorXML(nodo, "MetodoPago"))) + If drm IsNot Nothing Then + CveMetodoPago = drm("CveMetodoPago").ToString.ToEntero + MetodoPago = drm("MetodoPagoSAT").ToString + End If + End If + + Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable) + Dim Prefijo As String = If(XMLDoc.DocumentElement.Prefix = "", "cfd", XMLDoc.DocumentElement.Prefix) + Dim cfdVer As String = "" + + If CFDIVersion = EnumCFDIVersion.v32 Then + Prefijo = "cfd" + cfdVer = "http://www.sat.gob.mx/cfd/2" + ElseIf CFDIVersion = EnumCFDIVersion.V33 Then + cfdVer = "http://www.sat.gob.mx/cfd/3" + Else ' se considera que es la version 4.0 + cfdVer = "http://www.sat.gob.mx/cfd/4" + End If + + namespaces.AddNamespace(Prefijo, cfdVer) + namespaces.AddNamespace("aerolineas", "http://www.sat.gob.mx/aerolineas") + namespaces.AddNamespace("tfd", "http://www.sat.gob.mx/TimbreFiscalDigital") + namespaces.AddNamespace("implocal", "http://www.sat.gob.mx/implocal") + namespaces.AddNamespace("registrofiscal", "http://www.sat.gob.mx/registrofiscal") + + + If TipoComprobante.ToUpper = "E" And (CFDIVersion = EnumCFDIVersion.V33 Or CFDIVersion = EnumCFDIVersion.V40) Then + Dim UUIDS As String = "" + + Dim UUIDSLista As New List(Of String) + Dim nodeCFDIRelacionados As XmlNode + nodeCFDIRelacionados = XMLDoc.SelectSingleNode(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces) + + If nodeCFDIRelacionados IsNot Nothing Then + For Each CFDIRelacionados As XmlNode In nodeCFDIRelacionados + UUIDSLista.Add("" & CFDIRelacionados.Attributes("UUID").Value.ToString & "") + Next + End If + DocumentosRelacionadosUUIDSList = UUIDSLista + + End If + + Dim node As XmlNode + node = XMLDoc.SelectSingleNode(String.Format("//{0}:Emisor", Prefijo), namespaces) + + If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then + EmisorRFC = ValorXML(node, "RFC") + End If + + node = XMLDoc.SelectSingleNode(String.Format("//{0}:Receptor", Prefijo), namespaces) + + If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then + ReceptorRFC = ValorXML(node, "RFC") + End If + + If UsuarioActual.CveEmpresa.Contiene(119, 7) Then + node = XMLDoc.SelectSingleNode(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces) + If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then + If ValorXML(node, "TipoRelacion").ToString.Contiene("07") Then + Dim nodeDocumentosRelacionados As XmlNodeList = XMLDoc.SelectNodes(String.Format("//{0}:CfdiRelacionado", Prefijo), namespaces) + For Each documento As XmlNode In nodeDocumentosRelacionados + If documento.Attributes("UUID").Value <> "" Then + DocumentosRelacionadosAnticiposUUIDList.Add(documento.Attributes("UUID").Value) + End If + TieneAnticiposXML = True + Next + End If + End If + End If + + node = XMLDoc.SelectSingleNode(String.Format("//{0}:Impuestos", Prefijo), namespaces) + If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then + Dim nodeRetenciones As XmlNodeList = XMLDoc.SelectNodes(String.Format("//{0}:Comprobante/{0}:Impuestos/{0}:Retenciones/{0}:Retencion", Prefijo), namespaces) + + TotalRetenciones = ValorXML(node, "totalImpuestosRetenidos", "0").ToDecimal + + If CFDIVersion = EnumCFDIVersion.V33 OrElse CFDIVersion = EnumCFDIVersion.V40 Then + + For Each retencion As XmlNode In nodeRetenciones + If retencion.Attributes("Impuesto").Value = "002" Then RetencionIVA += retencion.Attributes("Importe").Value.ToDecimal + If retencion.Attributes("Impuesto").Value = "001" Then RetencionISR += retencion.Attributes("Importe").Value.ToDecimal + Next + + Else + + For Each retencion As XmlNode In nodeRetenciones + If retencion.Attributes("impuesto").Value = "IVA" Then RetencionIVA += retencion.Attributes("importe").Value.ToDecimal + If retencion.Attributes("impuesto").Value = "ISR" Then RetencionISR += retencion.Attributes("importe").Value.ToDecimal + Next + End If + SumaTotalRetenciones += RetencionIVA + SumaTotalRetenciones += RetencionISR + + TotalTraslados = ValorXML(node, "totalImpuestosTrasladados", "0").ToDecimal + Dim nodeTraslados As XmlNodeList = XMLDoc.SelectNodes(String.Format("//{0}:Comprobante/{0}:Impuestos/{0}:Traslados/{0}:Traslado", Prefijo), namespaces) + + If CFDIVersion = EnumCFDIVersion.V33 OrElse CFDIVersion = EnumCFDIVersion.V40 Then + + For Each traslado As XmlNode In nodeTraslados + + If traslado.Attributes("Importe") IsNot Nothing Then + If traslado.Attributes("Impuesto").Value = "002" Then TrasladoIVA += traslado.Attributes("Importe").Value.ToDecimal + If traslado.Attributes("Impuesto").Value = "003" Then TrasladoIEPS += traslado.Attributes("Importe").Value.ToDecimal + End If + Next + Else + + For Each traslado As XmlNode In nodeTraslados + If traslado.Attributes("Importe") IsNot Nothing Then + If traslado.Attributes("impuesto").Value = "IVA" Then TrasladoIVA += traslado.Attributes("importe").Value.ToDecimal + + If traslado.Attributes("impuesto").Value = "IEPS" Then TrasladoIEPS += traslado.Attributes("importe").Value.ToDecimal + End If + Next + End If + + SumaTotalTraslados += TrasladoIVA + SumaTotalTraslados += TrasladoIEPS + End If + + Dim nodeComp As XmlNode = XMLDoc.SelectSingleNode(String.Format("//{0}:Complemento", Prefijo), namespaces) + If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then + + Dim nodeTFD As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:TimbreFiscalDigital", "tfd"), namespaces) + + UUID = ValorXML(nodeTFD, "UUID", "") + + Dim nodeRF As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:CFDIRegistroFiscal ", "registrofiscal"), namespaces) + If nodeRF IsNot Nothing Then + Folio = ValorXML(nodeRF, "folio").TrimStart("0"c) + End If + + node = node.SelectSingleNode(String.Format("//{0}:ImpuestosLocales", "implocal"), namespaces) + + If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then + OtrosImpuestos = ValorXML(node, "TotaldeTraslados", "0").ToDecimal + '2022.06.04-- se quitan los datos de retenciones de impuestos locales, generan conflicto. RMF + 'OtrosImpuestosRetenciones = ValorXML(node, "TotaldeRetenciones", "0").ToDecimal + End If + End If + + + If XMLCargaExistosa Then + If Not ValidateUUID(UUID) Then + GuardaLog($"UUID Invalido {UUID} .") + Errores.AppendLine($"UUID Invalido {UUID} .") + XMLCargaExistosa = False + End If + End If + + +#Region "DETALLES" + + + Dim ObjeFacturas As New ClsCompras + Dim AjustaUltimoConcepto = False + + Dim nodeconceptos As XmlNode = XMLDoc.SelectSingleNode(String.Format("//{0}:Conceptos", Prefijo), namespaces) + Dim XML = Replace(nodeconceptos.OuterXml, "", "") 'salto de linea html + XML = XML.Replace("<br>", "") + XML = XML.Replace("<", "") + + XML = XML.Replace("&", "") 'adicional, si hay otros + + If ObjeFacturas.GetFacturasComparacionXML(StrCFDIVerion, XML, UsuarioActual.CveEmpresa) Then + TmpDT = ObjeFacturas.DtResultados + TmpDT.Columns.Add("CveSATPSActualizado") + SubTotalConceptos = TmpDT.SUMD("Total").RoundSQL + + If Not TmpDT.Columns.Contains("Amortizacion") Then + TmpDT.Columns.Add("Amortizacion", GetType(Decimal)) + End If + 'VALIDA QUE EL XML SI VIENE CON EL CODIGO SAT 01010101 + Dim ProductosCodigoSATNoPermitidos As New StringBuilder("") + For Each drr As DataRow In TmpDT.FiltraParametros("ClaveProdServ = '01010101'").Rows + ProductosCodigoSATNoPermitidos.AppendFormat("{0}
    ", drr("PS")) + Next + + If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then + Dim mensajeAdvertencia As String = String.Format("El comprobante contiene productos con código SAT '01010101', revise los productos:

    {0}", ProductosCodigoSATNoPermitidos.ToString) + Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia) + End If + Else + GuardaLog($"Error al cargar detalles GetFacturasComparacionXML.") + Errores.AppendLine($"Error al cargar detalles GetFacturasComparacionXML.") + XMLCargaExistosa = False + End If + + ObjeFacturas.Dispose() + + If CFDIVersion = EnumCFDIVersion.V33 OrElse CFDIVersion = EnumCFDIVersion.V40 Then + If Not TmpDT.Columns.Contains("Amortizacion") Then + TmpDT.Columns.Add("Amortizacion", GetType(Decimal)) + End If + TmpDT.AcceptChanges() + ValidacionesTotalesXml() + + + End If + + + + +#End Region + End Sub + + Public Function ConfiguraRegistroRapidoReembolso(CvePS As Integer, CveSubProyecto As Integer, CveCajaChica As Integer, CvePersonal As Integer, CveRetIVAConcepto As Integer, CveRetISRConcepto As Integer) As Boolean + + Dim respuesta As Boolean = True + Me.CveSubProyecto = CveSubProyecto + Me.CveCajaChica = CveCajaChica + Me.CvePersonal = CvePersonal + Me.CveRetIVAConcepto = CveRetIVAConcepto + Me.CveRetISRConcepto = CveRetISRConcepto + + Dim dRowSubProyecto As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("") + + If dRowSubProyecto IsNot Nothing Then + Me.Proyecto = dRowSubProyecto("Proyecto").ToString + Me.CveProyecto = (dRowSubProyecto("CveProyecto").ToString).ToEntero + Me.SubProyecto = dRowSubProyecto("SubProyecto").ToString + Else + Errores.AppendLine($"Error al cargar el Sub Proyecto CveSubProyecto: {CveSubProyecto}") + Return False + End If + + Dim DTIndex As DataTable = TmpDT.FiltraParametros("", DistinctColumns:={"Consec"}) + + For Each dRowIndex As DataRow In DTIndex.Rows + + If Not UpdatePSReembolso(dRowIndex("Consec").ToString.ToEntero, CvePS) Then + respuesta = False + End If + + Next + + If respuesta AndAlso IEPS > 0 Then + If Not AgregaIEPSReembolso(CvePS:=CvePS) Then + respuesta = False + End If + End If + + If respuesta Then + + 'VALIDA IMPORTES + If Not ValidaTotalesGuardar() Then + respuesta = False + End If + + If Not AjustaCombustibles() Then + respuesta = False + End If + + If Not AjustaIVA() Then + respuesta = False + End If + + If Not AjustaRetIVA() Then + respuesta = False + End If + + If Not AjustaRetISR() Then + respuesta = False + End If + + End If + + Return respuesta + + End Function + + Private Function ValidaTotalesGuardar() As Boolean + Dim EsValido = True + + 'VALIDA IMPORTES + 'VALIDA TOTAL CON LOS IMPORTES TOTALES + Dim TempSubTotal, TempDescuentos, TempIVA, TempSubTotal2, TempRetIVA, TempRetISR, TempTotal, DifTotales, TempIEPS As Decimal + + Dim Amortizacion As Decimal = 0 + Dim TieneAmortizacion As Boolean = False + If DocumentosRelacionadosAnticiposUUIDList IsNot Nothing AndAlso DocumentosRelacionadosAnticiposUUIDList.Count > 0 Then 'Fix me + ' AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 Then + 'TieneAmortizacion = True + End If + + 'If CveCompra < 0 AndAlso Not TieneAmortizacion Then + ' LblAmortizacion.Text = "0.00" + 'End If + + 'If UsuarioActual.CveEmpresa = 119 AndAlso TieneAmortizacion Then + ' Amortizacion = LblAmortizacion.Text.Trim.ToDecimal + ' TxtSubTotal.Text = (TxtSubTotal.Text.ToDouble + Amortizacion).ToString + 'End If + + + TempSubTotal = SubTotal + SubTotalOriginal = SubTotal + SubTotal2Original = SubTotal2 + TempDescuentos = Descuentos + Amortizacion + TempSubTotal2 = TempSubTotal - TempDescuentos + TempIVA = IVA + TempIEPS = IEPS + TempRetIVA = RetIVA + TempRetISR = RetISR + TempTotal = Math.Round(TempSubTotal2 + TempIVA + TempIEPS - TempRetIVA - TempRetISR + OtrosImpuestos - Amortizacion, 2) + DifTotales = Total - TempTotal + Dim DiferenciaPermitida = 0.6 + + If Math.Abs(DifTotales) > DiferenciaPermitida Then + Errores.AppendLine($"Los importes de los conceptos (Productos/Servicios) no cuadran con el total. Por favor verifique y vuelva a intentar.[{Math.Abs(DifTotales) - DiferenciaPermitida}]") + EsValido = False + ElseIf DifTotales <> 0 Then + SubTotal2 = (SubTotal2 + DifTotales) + SubTotal = (SubTotal + DifTotales) + SubTotalOriginal = SubTotal + SubTotal2Original = SubTotal2 + End If + + Dim DiferenciaSubtotales = 0.0D + If CveCompra > 0 Or CveFactura > 0 Or OCVinculada Then + + If SubTotalOriginal = Nothing Then + SubTotalOriginal = 0 + End If + + If SubTotal2Original = Nothing Then + SubTotal2Original = 0 + End If + + DiferenciaSubtotales = SubTotal2Original.ToString.ToDecimal - TmpDT.SUM("Total").ToString.ToDecimal + '[IPP] PARCHE: Factura TELMEX para APH 12/ENERO/2018 + If CveFactura = 286290 Then + DiferenciaSubtotales += Descuentos + End If + If Math.Abs(DiferenciaSubtotales) > 1 And Not CompraNoDeducible = 1 Then 'EsNoDeducible + Errores.AppendLine("Los importes de los conceptos (Productos/Servicios) no cuadran con el total. Por favor verifique y vuelva a intentar.") + EsValido = False + Else + AjustaImporteUltimoConcepto(DiferenciaSubtotales) + End If + Else + DiferenciaSubtotales = (SubTotal2 - TmpDT.SUMD("Total")).ToString.ToDecimal + If Math.Abs(DiferenciaSubtotales) > 1 Then + Errores.AppendLine("Los importes de los conceptos (Productos/Servicios) no cuadran con el total. Por favor verifique y vuelva a intentar.") + EsValido = False + Else + AjustaImporteUltimoConcepto(DiferenciaSubtotales) + End If + End If + + Return EsValido + End Function + + + + Private Function AjustaCombustibles() As Boolean + + Dim Respuesta As Boolean = False + + Dim IVADetalles As Decimal = TmpDT.SUMD("IVA", " IVA > 0 ") + Dim DiferenciaIVas As Decimal = IVA - IVADetalles + + + If Not TmpDT.Columns.Contains("AplicaIEPS") Then + TmpDT.Columns.Add(New DataColumn("AplicaIEPS", GetType(Boolean))) + End If + + If Not TmpDT.Columns.Contains("IEPSGrabaIVA") Then + TmpDT.Columns.Add(New DataColumn("IEPSGrabaIVA", GetType(Boolean))) + End If + + For Each dRow As DataRow In TmpDT.Rows + Dim DttPS As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=dRow("CvePS").ToString.ToEntero) + If DttPS IsNot Nothing AndAlso DttPS.Rows.Count > 0 Then + Dim DrPS As DataRow = DttPS.Rows(0) + dRow("AplicaIEPS") = Boolean.Parse(DrPS("AplicaIEPS").ToString) + dRow("IEPSGrabaIVA") = Boolean.Parse(DrPS("IEPSGrabaIVA").ToString) + Else + dRow("AplicaIEPS") = False + dRow("IEPSGrabaIVA") = False + End If + Next + + Dim DTConsulta As New DataTable + DTConsulta = TmpDT.FiltraParametros(" AplicaIEPS = 'True' AND IEPSGrabaIVA = 'False' AND IVA > 0 ") + + If DTConsulta.Rows.Count > 0 Then + + Dim IndiceContador As Integer = 0 + Dim IndiceUltimo As Integer = 0 + Dim CantidadRegistroConIVA As Decimal + + For Each dRow As DataRow In TmpDT.Rows + If Boolean.Parse(dRow("AplicaIEPS").ToString) And Boolean.Parse(dRow("IEPSGrabaIVA").ToString) = False And dRow("IVA").ToString.ToDecimal > 0 Then + IndiceUltimo = IndiceContador + CantidadRegistroConIVA = CantidadRegistroConIVA + 1 + End If + IndiceContador = IndiceContador + 1 + Next + + IVADetalles = TmpDT.SUMD("IVA", " IVA > 0 ") + DiferenciaIVas = IVA - IVADetalles + + If Math.Abs(DiferenciaIVas) > 0.01D Then + + If (TmpDT.Rows(IndiceUltimo)("IVA").ToString.ToDecimal + DiferenciaIVas) < 0 Then + + Dim AjusteteDividido As Decimal = Math.Abs(DiferenciaIVas) / CantidadRegistroConIVA + + For Each dRow As DataRow In TmpDT.Rows + If Boolean.Parse(dRow("AplicaIEPS").ToString) And Boolean.Parse(dRow("IEPSGrabaIVA").ToString) = False And dRow("IVA").ToString.ToDecimal > 0 Then + dRow("IVA") = dRow("IVA").ToString.ToDecimal - AjusteteDividido + End If + Next + + + Else + TmpDT.Rows(IndiceUltimo)("IVA") = TmpDT.Rows(IndiceUltimo)("IVA").ToString.ToDecimal + DiferenciaIVas + End If + + TmpDT.AcceptChanges() + + End If + + End If + + 'Revalidacion de ajuste + IVADetalles = TmpDT.SUMD("IVA", " IVA > 0 ") + DiferenciaIVas = IVA - IVADetalles + + If Math.Abs(DiferenciaIVas) > 0.01D Then + Respuesta = False + If IVADetalles > 0 Then + + For Each dRow As DataRow In TmpDT.Rows + If dRow("IVA").ToString.ToDecimal > 0 Then + dRow("IVA") = dRow("IVA").ToString.ToDecimal + DiferenciaIVas + TmpDT.AcceptChanges() + Respuesta = True + Exit For + End If + Next + + Else + Alert("Los productos especificados en el listado no tienen asignado impuesto IVA, favor de realizar la corrección en el producto que aplique el impuesto.", TipoMensaje.MsgAdvertencia) + Respuesta = False + End If + Else + Respuesta = True + End If + + If Respuesta Then + + Dim IEPSPSDetalles As Decimal = TmpDT.SUMD("IEPSPS", " IEPSPS > 0 ") + Dim DiferenciaIEPSPS As Decimal = IEPS - IEPSPSDetalles + + Dim DTConsultaIEPSPS As New DataTable + DTConsultaIEPSPS = TmpDT.FiltraParametros(" AplicaIEPS = 'True'") + + + + Dim IndiceContador As Integer = 0 + Dim IndicePrimero As Integer = 0 + + For Each dRow As DataRow In TmpDT.Rows + If Boolean.Parse(dRow("AplicaIEPS").ToString) And dRow("IEPSPS").ToString.ToDecimal > 0 Then + IndicePrimero = IndiceContador + Exit For + End If + IndiceContador = IndiceContador + 1 + Next + + If DiferenciaIEPSPS.RoundAD(2) <> 0 Then + + + TmpDT.Rows(IndicePrimero)("IEPSPS") = TmpDT.Rows(IndicePrimero)("IEPSPS").ToString.ToDecimal + DiferenciaIEPSPS + TmpDT.AcceptChanges() + + End If + + + + For Each dRow As DataRow In TmpDT.Rows + + If dRow("IEPSPSPorcentaje").ToString.ToDecimal > 0 AndAlso dRow("IEPSPS").ToString.ToDecimal = 0 Then + dRow("IEPSPSPorcentaje") = 0 + End If + + Next + + TmpDT.AcceptChanges() + + End If + + Return Respuesta + + End Function + + + Private Function AjustaIVA() As Boolean + + Dim Respuesta As Boolean = False + + Dim IVADetalles As Decimal = TmpDT.SUMD("IVA", " IVA > 0 ") + Dim DiferenciaIVas As Decimal = IVA - IVADetalles + + If Math.Abs(DiferenciaIVas) > 0 Then + If Math.Abs(DiferenciaIVas) <= 0.05 Then + + Dim DTConsulta As New DataTable + DTConsulta = TmpDT.FiltraParametros(" IVA > 0 ") + + If DTConsulta.Rows.Count > 0 Then + + Dim IndiceContador As Integer = 0 + Dim IndiceUltimo As Integer = 0 + Dim CantidadRegistroConIVA As Decimal + + For Each dRow As DataRow In TmpDT.Rows + If dRow("IVA").ToString.ToDecimal > 0 Then + IndiceUltimo = IndiceContador + CantidadRegistroConIVA = CantidadRegistroConIVA + 1 + End If + IndiceContador = IndiceContador + 1 + Next + + IVADetalles = TmpDT.SUMD("IVA", " IVA > 0 ") + DiferenciaIVas = IVA - IVADetalles + + If Math.Abs(DiferenciaIVas) > 0.0D Then + + If (TmpDT.Rows(IndiceUltimo)("IVA").ToString.ToDecimal + DiferenciaIVas) < 0 Then + + Dim AjusteteDividido As Decimal = Math.Abs(DiferenciaIVas) / CantidadRegistroConIVA + + For Each dRow As DataRow In TmpDT.Rows + dRow("IVA") = dRow("IVA").ToString.ToDecimal - AjusteteDividido + Next + + Else + TmpDT.Rows(IndiceUltimo)("IVA") = TmpDT.Rows(IndiceUltimo)("IVA").ToString.ToDecimal + DiferenciaIVas + End If + + TmpDT.AcceptChanges() + + End If + + End If + + 'Revalidacion de ajuste + IVADetalles = TmpDT.SUMD("IVA", " IVA > 0 ") + DiferenciaIVas = IVA - IVADetalles + + If Math.Abs(DiferenciaIVas) > 0.01D Then + Respuesta = False + If IVADetalles > 0 Then + + For Each dRow As DataRow In TmpDT.Rows + If dRow("IVA").ToString.ToDecimal > 0 Then + dRow("IVA") = dRow("IVA").ToString.ToDecimal + DiferenciaIVas + TmpDT.AcceptChanges() + Respuesta = True + Exit For + End If + Next + + Else + Errores.AppendLine("Los productos especificados en el listado no tienen asignado impuesto IVA, favor de realizar la corrección en el producto que aplique el impuesto.") + Respuesta = False + End If + Else + Respuesta = True + End If + + Else + Errores.AppendLine($"existe una diferencia de {DiferenciaIVas} entre el IVA de la compra y los detalles.") + Respuesta = False + End If + Else + Respuesta = True + End If + + Return Respuesta + + End Function + + Private Function AjustaRetIVA() As Boolean + + Dim Respuesta As Boolean = False + + Dim RetIVADetalles As Decimal = TmpDT.SUMD("RetIVA", " RetIVA > 0 ") + Dim DiferenciaRetIVA As Decimal = RetIVA - RetIVADetalles + + If Math.Abs(DiferenciaRetIVA) > 0 Then + If Math.Abs(DiferenciaRetIVA) <= 0.05 Then + + Dim DTConsulta As New DataTable + DTConsulta = TmpDT.FiltraParametros(" RetIVA > 0 ") + + If DTConsulta.Rows.Count > 0 Then + + Dim IndiceContador As Integer = 0 + Dim IndiceUltimo As Integer = 0 + Dim CantidadRegistroConRetIVA As Decimal + + For Each dRow As DataRow In TmpDT.Rows + If dRow("RetIVA").ToString.ToDecimal > 0 Then + IndiceUltimo = IndiceContador + CantidadRegistroConRetIVA = CantidadRegistroConRetIVA + 1 + End If + IndiceContador = IndiceContador + 1 + Next + + RetIVADetalles = TmpDT.SUMD("RetIVA", " RetIVA > 0 ") + DiferenciaRetIVA = RetIVA - RetIVADetalles + + If Math.Abs(DiferenciaRetIVA) > 0.0D Then + + If (TmpDT.Rows(IndiceUltimo)("RetIVA").ToString.ToDecimal + DiferenciaRetIVA) < 0 Then + + Dim AjusteteDividido As Decimal = Math.Abs(DiferenciaRetIVA) / CantidadRegistroConRetIVA + + For Each dRow As DataRow In TmpDT.Rows + dRow("RetIVA") = dRow("RetIVA").ToString.ToDecimal - AjusteteDividido + Next + + Else + TmpDT.Rows(IndiceUltimo)("RetIVA") = TmpDT.Rows(IndiceUltimo)("RetIVA").ToString.ToDecimal + DiferenciaRetIVA + End If + + TmpDT.AcceptChanges() + + End If + + End If + + 'Revalidacion de ajuste + RetIVADetalles = TmpDT.SUMD("RetIVA", " RetIVA > 0 ") + DiferenciaRetIVA = RetIVA - RetIVADetalles + + If Math.Abs(DiferenciaRetIVA) > 0.01D Then + Respuesta = False + If RetIVADetalles > 0 Then + + For Each dRow As DataRow In TmpDT.Rows + If dRow("RetIVA").ToString.ToDecimal > 0 Then + dRow("RetIVA") = dRow("RetIVA").ToString.ToDecimal + DiferenciaRetIVA + TmpDT.AcceptChanges() + Respuesta = True + Exit For + End If + Next + + Else + Errores.AppendLine("Los productos especificados en el listado no tienen asignado impuesto RetIVA, favor de realizar la corrección en el producto que aplique el impuesto.") + Respuesta = False + End If + Else + Respuesta = True + End If + + Else + Errores.AppendLine($"existe una diferencia de {DiferenciaRetIVA} entre el RetIVA de la compra y los detalles.") + End If + Else + Respuesta = True + + End If + + Return Respuesta + + End Function + + + + Private Function AjustaRetISR() As Boolean + + Dim Respuesta As Boolean = False + + Dim RetISRDetalles As Decimal = TmpDT.SUMD("RetISR", " RetISR > 0 ") + Dim DiferenciaRetISR As Decimal = RetISR - RetISRDetalles + + If Math.Abs(DiferenciaRetISR) > 0 Then + If Math.Abs(DiferenciaRetISR) <= 0.05 Then + + Dim DTConsulta As New DataTable + DTConsulta = TmpDT.FiltraParametros(" RetISR > 0 ") + + If DTConsulta.Rows.Count > 0 Then + + Dim IndiceContador As Integer = 0 + Dim IndiceUltimo As Integer = 0 + Dim CantidadRegistroConRetISR As Decimal + + For Each dRow As DataRow In TmpDT.Rows + If dRow("RetISR").ToString.ToDecimal > 0 Then + IndiceUltimo = IndiceContador + CantidadRegistroConRetISR = CantidadRegistroConRetISR + 1 + End If + IndiceContador = IndiceContador + 1 + Next + + RetISRDetalles = TmpDT.SUMD("RetISR", " RetISR > 0 ") + DiferenciaRetISR = RetISR - RetISRDetalles + + If Math.Abs(DiferenciaRetISR) > 0.0D Then + + If (TmpDT.Rows(IndiceUltimo)("RetISR").ToString.ToDecimal + DiferenciaRetISR) < 0 Then + + Dim AjusteteDividido As Decimal = Math.Abs(DiferenciaRetISR) / CantidadRegistroConRetISR + + For Each dRow As DataRow In TmpDT.Rows + dRow("RetISR") = dRow("RetISR").ToString.ToDecimal - AjusteteDividido + Next + + Else + TmpDT.Rows(IndiceUltimo)("RetISR") = TmpDT.Rows(IndiceUltimo)("RetISR").ToString.ToDecimal + DiferenciaRetISR + End If + + TmpDT.AcceptChanges() + + End If + + End If + + 'Revalidacion de ajuste + RetISRDetalles = TmpDT.SUMD("RetISR", " RetISR > 0 ") + DiferenciaRetISR = RetISR - RetISRDetalles + + If Math.Abs(DiferenciaRetISR) > 0.01D Then + Respuesta = False + If RetISRDetalles > 0 Then + + For Each dRow As DataRow In TmpDT.Rows + If dRow("RetISR").ToString.ToDecimal > 0 Then + dRow("RetISR") = dRow("RetISR").ToString.ToDecimal + DiferenciaRetISR + TmpDT.AcceptChanges() + Respuesta = True + Exit For + End If + Next + + Else + Errores.AppendLine(("Los productos especificados en el listado no tienen asignado impuesto RetISR, favor de realizar la corrección en el producto que aplique el impuesto.") + Respuesta = False + End If + Else + Respuesta = True + End If + + Else + Errores.AppendLine(($"existe una diferencia de {DiferenciaRetISR} entre el RetISR de la compra y los detalles.") + Respuesta = False + End If + Else + Respuesta = True + End If + + Return Respuesta + + End Function + + Private Function AgregaIEPSReembolso(CvePS As Integer) As Boolean + + Dim respuesta As Boolean = True + + If IEPSGasto Or OtrosImpuestosGasto Then + + 'AGREGA IEPS COMO CONCEPTO + If IEPSGasto Then + AgregarConceptoIEPS(TrasladoIEPS, CvePS) + For Each Dr As DataRow In TmpDT.Rows + Dr("IEPSPS") = 0 + Dr("IEPSPSPorcentaje") = 0 + Next + TmpDT.AcceptChanges() + End If + 'AGREGA OTROS IMPUESTOS COMO CONCEPTO + If OtrosImpuestosGasto Then + AgregarConceptoIEPS(OtrosImpuestos, CvePS) + End If + + Else + respuesta = False + Errores.AppendLine("Debe seleccionar al menos un impuesto. ") + End If + + Return respuesta + + End Function + + + Private Sub AgregarConceptoIEPS(IEPS As Decimal, CvePS1 As Integer) + Dim SubTotalR As Decimal = TmpDT.SUM("Total").ToString.ToDecimal + + Dim PSS As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CvePS = {0} ", CvePS1), "PS") + Dim PSS2 As DataTable = TmpDT.FiltraParametros(String.Format("CvePS = {0} ", CvePS1), "PS") + + If PSS.Rows.Count > 0 Or PSS2.Rows.Count > 0 Then + Dim CveUM As Integer = 0 + Dim UM As String = "" + Dim CveClasificacion As Integer = 0 + Dim Clasificacion As String = "" + Dim CvePS As Integer = 0 + Dim PS As String = "" + Dim CveTipoPS As Integer = 0 + + If PSS.Rows.Count > 0 Then + CveUM = PSS.Rows(0)("CveUM").ToString.ToEntero + UM = PSS.Rows(0)("UnidadMedida").ToString + CveClasificacion = PSS.Rows(0)("CveClasificacion").ToString.ToEntero + Clasificacion = PSS.Rows(0)("Clasificacion").ToString + CvePS = PSS.Rows(0)("CvePS").ToString.ToEntero + PS = PSS.Rows(0)("PS").ToString + CveTipoPS = PSS.Rows(0)("CveTipoPS").ToString.ToEntero + End If + + Dim Cantidad As Decimal = 1 + Dim CveSubProyectoContrato As String = "-1" + Dim CveProyecto As String = "-1" + Dim SubProyecto As String = "SE" + Dim Proyecto As String = "SE" + Dim Obs As String = "" + Dim PU As Decimal = IEPS + Dim Total As Decimal = Cantidad * PU + Dim IVA As Decimal = 0 + Dim Descuento As Decimal = 0 + + If PSS2.Rows.Count > 0 Then + CveUM = PSS2.Rows(0)("CveUM").ToString.ToEntero + UM = PSS2.Rows(0)("UM").ToString + CveClasificacion = PSS2.Rows(0)("CveClasificacion").ToString.ToEntero + Clasificacion = PSS2.Rows(0)("Clasificacion").ToString + CvePS = PSS2.Rows(0)("CvePS").ToString.ToEntero + PS = PSS2.Rows(0)("PS").ToString + CveTipoPS = PSS2.Rows(0)("CveTipoPS").ToString.ToEntero + + CveSubProyectoContrato = PSS2.Rows(0)("CveSubProyecto").ToString + CveProyecto = PSS2.Rows(0)("CveProyecto").ToString + SubProyecto = PSS2.Rows(0)("SubProyecto").ToString + Proyecto = PSS2.Rows(0)("Proyecto").ToString + Obs = PSS2.Rows(0)("Obs").ToString + + Dim CveTipoGasto As Integer = PSS2.Rows(0)("CveTipoGasto").ToString.ToEntero + Dim TipoGasto As String = PSS2.Rows(0)("TipoGasto").ToString + + AddPS(Cantidad, CveUM, UM, CveClasificacion, Clasificacion, CvePS, PS, CveTipoPS, CveSubProyectoContrato, SubProyecto, Proyecto, CveProyecto, Obs, PU, Total, IVA, 0, 0, 0, 0, Descuento, TCalculaTotales:=False, CveTipoGasto:=CveTipoGasto, + TipoGasto:=TipoGasto, ModalidadAccionPS:=EnumModalidadAccionPS.Agregar) + + Else + AddPS(Cantidad, CveUM, UM, CveClasificacion, Clasificacion, CvePS, PS, CveTipoPS, CveSubProyectoContrato, SubProyecto, Proyecto, CveProyecto, Obs, PU, Total, IVA, 0, 0, 0, 0, Descuento, TCalculaTotales:=False) + End If + End If + + Dim SubTotalIEPS = TmpDT.SUM("Total").ToString.ToDecimal + + Me.SubTotal = Math.Round(SubTotalIEPS, 2) + Me.SubTotalConceptos = Math.Round(SubTotalIEPS, 2) + + 'If SubTotalR <> SubTotalIEPS Then + ' Dim IA As Decimal = SubTotalR - SubTotalIEPS + ' AjustaImporteUltimoConcepto(IA) + 'End If + + PSS.Dispose() + End Sub + + + Private Function AddPS(Cantidad As Decimal, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, CvePS As Integer, PS As String, CveTipoPS As Integer, CveSubProyectoContrato As String, SubProyecto As String, Proyecto As String, CveProyecto As String, + Obs As String, PU As Decimal, Total As Decimal, IVA As Decimal, RetIVA As Decimal, RetISR As Decimal, IEPSPS As Decimal, IEPSPSIVA As Decimal, Descuento As Decimal, Optional CveOrdenCompraDetalle As Integer = -1, Optional TCalculaTotales As Boolean = True, + Optional PSCodigo As String = "-", Optional PSDescripcion As String = "-", Optional CantidadF As Double = -1, Optional EntregaDirecta As Integer = -1, Optional OtrosGastos As Decimal = 0, + Optional CveSATPS As Integer = -1, Optional CargaXml As Boolean = False, Optional CveTipoGasto As Integer = -1, Optional TipoGasto As String = "", Optional PorcentajeIVA As Decimal = 0, + Optional PorcentajeIEPS As Decimal = 0, Optional PorcentajeRetIVA As Decimal = 0, Optional PorcentajeRetISR As Decimal = 0, Optional NoDeducible As Boolean = False, Optional CveContratoDetalle As Integer = -1, Optional CveCultivoCuadroDetalle As Integer = -1, + Optional CveSATPSActualizado As Boolean = False, Optional TemporadaCuadro As String = "", Optional ModalidadAccionPS As EnumModalidadAccionPS = EnumModalidadAccionPS.Agregar, Optional Con As Integer = -1, + Optional CveProgramaOperativo As Integer = -1, Optional CveUnidadAdministrativa As Integer = -1, Optional CveFuenteFinanciamiento As Integer = -1, Optional CveTipoGastoAC As Integer = -1, Optional CveClasificacionOG As Integer = -1) As Integer + + Dim Row As DataRow = Nothing + + Row = TmpDT.NewRow() + Dim Retorno As Integer = 0 + Dim CveContrato = -1 + Dim CveSubProyecto = -1 + Dim Valores As String() + + ''CONTRATOS + If CveSubProyectoContrato.Contains("|"c) Then + Valores = CveSubProyectoContrato.Split("|"c) + CveContrato = Valores(1).ToEntero + CveSubProyecto = Valores(0).ToEntero + Else + CveSubProyecto = CveSubProyectoContrato.ToEntero + End If + + 'DR PS + Dim DrPS As DataRow = Nothing + If CvePS > 0 Then + DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).Rows(0) + End If + + If DrPS IsNot Nothing Then + Row("PSCodigo") = If(PSCodigo = "", DrPS("PSCodigo").ToString, PSCodigo) + Row("CveMetodoInventario") = DrPS("Inv_CveMetodoInventario").ToString.ToEntero + + If CveTipoCompra = EnumTipoCompra.Garantia AndAlso DrPS("AplicaSerie").ToString = "True" Then + Row("CveMetodoInventario") = "1" + End If + + Else + Row("PSCodigo") = PSCodigo + Row("CveMetodoInventario") = 0 + End If + + If ModalidadAccionPS = EnumModalidadAccionPS.Actualizar Then + Row("Consec") = Con + Else + Row("Consec") = TmpDT.Rows.Count + 1 + End If + + If (CFDIVersion = EnumCFDIVersion.V33 Or CFDIVersion = EnumCFDIVersion.V40) And CveSATPS > 0 Then + Dim DrPSSAT As DataRow = Nothing + If CargaXml Then + DrPSSAT = GlobalDTPSATPS("-1", CveSATPS.ToString).FiltroPrimero("") + Else + DrPSSAT = GlobalDTPSATPS("-1", CveSATPS.ToString).FiltroPrimero("") + End If + If DrPSSAT IsNot Nothing Then + Row("SATClaveProductoServicio") = DrPSSAT("SATClaveProductoServicio").ToString + Row("CveSATPS") = DrPSSAT("CveSATPS").ToString + If CveSATPSActualizado Then + Row("CveSATPSActualizado") = 1 + Else + Row("CveSATPSActualizado") = 0 + End If + End If + End If + + Try + If (DrPS("CvePSCargo").ToString <> "") Then 'si es un producto de usado. que se registre contablemente como alamcen(como producto) + CveTipoPS = 2 + End If + Catch ex As Exception + + End Try + + Dim DecimalesPermitidos = 6 + + Row("CveConcepto") = TmpDT.Rows.Count + 1 + Row("Cantidad") = Math.Round(Cantidad, DecimalesPermitidos) + Row("CantidadF") = If(CantidadF = -1, Math.Round(Cantidad, DecimalesPermitidos), Math.Round(CantidadF, DecimalesPermitidos)) + Row("CveUM") = CveUM + Row("UM") = UM + Row("CveClasificacion") = CveClasificacion + Row("CveClasificacionActualizar") = CveClasificacion + Row("Clasificacion") = Clasificacion + Row("CvePS") = CvePS + Row("PS") = PS + Row("CveTipoPS") = CveTipoPS + + Row("PSDescripcion") = PSDescripcion + Row("CveSubProyecto") = CveSubProyecto.ToEntero + Row("CveProyecto") = CveProyecto.ToEntero + Row("CveContrato") = CveContrato.ToEntero + Row("SubProyecto") = If(SubProyecto = "Seleccione", "Sin Sub Proyecto", SubProyecto) + Row("Proyecto") = If(Proyecto = "Seleccione", "Sin Proyecto", Proyecto) + Row("CveActivoFijo") = -1 + Row("Obs") = Obs + Row("CveActivoFijo") = -1 + Row("CodAF") = "-1" + Row("TipoAF") = -1 + Row("CveOrdenCompraDetalle") = CveOrdenCompraDetalle + Row("EntregaDirecta") = EntregaDirecta + 'If GlobalDTProductosServiciosEquivalencias(CvePS, CveUM).Rows.Count = 0 Then Row("CveEq") = 1 Else Row("CveEq") = 0 + Row("NoDeducible") = NoDeducible + + + Total = Math.Round(PU, DecimalesPermitidos) * Cantidad - Descuento + Row("PU") = Math.Round(PU, DecimalesPermitidos) + If CargaXml And (CFDIVersion = EnumCFDIVersion.V33 Or CFDIVersion = EnumCFDIVersion.V40) Then + + If CveFactura > 0 And IVA = 0 Then + Row("IVA") = 0 + Row("IVAPorcentaje") = 0 + Else + Row("IVA") = Math.Round(IVA, DecimalesPermitidos) + Row("IVAPorcentaje") = PorcentajeIVA + End If + + Row("RetIVA") = Math.Round(RetIVA, DecimalesPermitidos) + Row("RetIVAPorcentaje") = PorcentajeRetIVA + Row("RetISR") = Math.Round(RetISR, DecimalesPermitidos) + Row("RetISRPorcentaje") = PorcentajeRetISR + Row("IEPSPS") = Math.Round(IEPSPS, DecimalesPermitidos) + Row("IEPSPSPorcentaje") = PorcentajeIEPS + Else + 'If DdlIVA.SelectedValue.ToDouble = 0 Then Row("IVA") = 0 Else Row("IVA") = Math.Round(IVA * Total, DecimalesPermitidos) + + If CveFactura > 0 And IVA = 0 Then + Row("IVA") = 0 + Row("IVAPorcentaje") = 0 + Else + Row("IVA") = (IVA * Total).RoundSQL + Row("IVAPorcentaje") = IVA + End If + + + Row("RetIVA") = (RetIVA * Total).RoundSQL + Row("RetIVAPorcentaje") = RetIVA + Row("RetISR") = (RetISR * Total).RoundSQL + Row("RetISRPorcentaje") = RetISR + Row("IEPSPS") = (IEPSPS * Total).RoundSQL + Row("IEPSPSPorcentaje") = IEPSPS + End If + + Row("ImporteConImpuestos") = (Row("Cantidad").ToString.ToDecimal * Row("PU").ToString.ToDecimal) + Row("IVA").ToString.ToDecimal + Row("IEPSPS").ToString.ToDecimal - (Row("RetIVA").ToString.ToDecimal + Row("RetISR").ToString.ToDecimal) + Row("ImporteSinImpuestos") = Row("Cantidad").ToString.ToDecimal * Row("PU").ToString.ToDecimal + + Row("IEPSPSIVA") = Math.Round(IEPSPSIVA * Total, DecimalesPermitidos) + Row("IEPSPSIVAPorcentaje") = IEPSPSIVA + Row("Descuento") = Math.Round(Descuento, DecimalesPermitidos) + Row("OtrosGastos") = Math.Round(OtrosGastos, DecimalesPermitidos) + Row("Total") = Math.Round(Total, DecimalesPermitidos) + + Row("CveTipoGasto") = CveTipoGasto + Row("TipoGasto") = If(CveTipoGasto > 0, TipoGasto, "") + + Row("CveContratoDetalle") = CveContratoDetalle + + Row("CveCultivoCuadroDetalle") = CveCultivoCuadroDetalle + Row("TemporadaCuadro") = TemporadaCuadro + + If UsuarioActual.Empresa.UsaAC Then + Row("CveProgramaOperativo") = CveProgramaOperativo + Row("CveUnidadAdministrativa") = CveUnidadAdministrativa + Row("CveFuenteFinanciamiento") = CveFuenteFinanciamiento + Row("CveTipoGastoAC") = CveTipoGastoAC + Row("CveClasificacionOG") = CveClasificacionOG + End If + + ' CveProgramaOperativo AS Integer = -1, Optional CveUnidadAdministrativa, Optional CveUnidadAdministrativa AS Integer = -1,, Optional CveFuenteFinanciamiento AS Integer = -1, Optional CveTipoGastoAC AS Integer = -1, Optional CveClasificacionOG AS Integer = -1, + + '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 IEPS = 0 Then + Row("IEPSPS") = 0 + Row("IEPSPSPorcentaje") = 0 + End If + + + + TmpDT.Rows.Add(Row) + TmpDT.Rows.IndexOf(Row) + + If TCalculaTotales Then + CalculaTotales(True) + End If + + Return Retorno + End Function + + Private Sub CalculaTotales(Optional CalculaIVA As Boolean = False, Optional EsNoDeducible As Boolean = False) + 'VARIABLES DE CALCULO + Dim LocalSubTotal, LocalDescuentos, LocalAmortizacion, LocalIVA, LocalSubTotal2, LocalRetIVA, LocalRetISR, LocalIEPSPS, LocalTotal, LocalSubTotalIVA, LocalSubTotalIEPSIVA As Decimal + + 'HACEMOS CALCULOS + LocalSubTotalIVA = TmpDT.SUMD("IVA") + LocalSubTotalIEPSIVA = TmpDT.SUMD("IEPSPSIVA") + LocalSubTotal = (TmpDT.SUMD("Total") + TmpDT.SUMD("Descuento")).RoundSQL(8) + LocalRetIVA = TmpDT.SUMD("RetIVA") + LocalRetISR = TmpDT.SUMD("RetISR") + LocalIEPSPS = TmpDT.SUMD("IEPSPS") + + If CveCompra > 0 AndAlso CveFactura > 0 Then + LocalIVA = IVA + Else + LocalIVA = If(TmpDT.SUM("IVA") > 0, LocalSubTotalIVA + LocalSubTotalIEPSIVA, 0) + End If + + + 'If CalculaIVA Then IVA = TxtIVA.Text.ToDouble + LocalDescuentos = TmpDT.SUMD("Descuento") + + '[IPP] SI YA ES COMPRA REGISTRADA NO CONSIDERA LA AMORTIZACIÓN PARA EL CALCULO DE TOTAL + If Not CveCompra > 0 Then + LocalAmortizacion = Me.Amortizacion + End If + + 'RETENCIONES + Dim Retenciones = 0D + Retenciones = LocalRetIVA + Retenciones += LocalRetISR + + + LocalSubTotal2 = LocalSubTotal - LocalDescuentos ' - Amortizacion '[IPP] COMENTADO CASO JAM 12653 CON NC 27122 | 23/MAYO/2018 + LocalTotal = LocalSubTotal2 + LocalIVA + LocalIEPSPS - Retenciones + + 'ASIGNAMOS VALORES A VISTA + If CveCompra > 0 Or CveFactura > 0 Or Me.OCVinculada Then + SubTotal = LocalSubTotal + SubTotal2 = LocalSubTotal2 + Descuentos = LocalDescuentos + + If EsNoDeducible Then + IVA = LocalIVA + RetIVA = LocalRetIVA + RetISR = LocalRetISR + IEPS = LocalIEPSPS + End If + + Total = LocalTotal + Else + SubTotal = LocalSubTotal + SubTotal2 = LocalSubTotal2 + IVA = LocalIVA + Descuentos = LocalDescuentos + RetIVA = LocalRetIVA + RetISR = LocalRetISR + IEPS = LocalIEPSPS + Total = LocalTotal + 'VALORES PROPIEDAD + CompraSaldo = LocalTotal + + End If + + 'CUANDO SEA COMPRA, FACTURA O VENGA DE VINCULACIÓN OC NO SE MODIFICAN VALORES + 'SE VERIFICA SI ALGUN DATO ES DIFERENTE PARA MOSTRAR COLUMNA CON VALORES ORIGINALES + 'If (CveCompra > 0 Or CveFactura > 0 Or OCVinculada) And Not EsNoDeducible Then + ' If LocalSubTotal <> SubTotalOriginal Then + ' OriginalesVisible(True) + ' LbSubTotalOriginal.Text = SubTotalOriginal.ToString.FormatoNumero(2) + ' Else + ' OriginalesVisible(False) + ' End If + 'End If + + 'If Not CveCompra > 0 Then 'cuando se está registrando manualmente y se va amortizar + ' LblSaldoFactura.Text = TxtTotal.Text.FormatoNumero + ' UpAnticipos.Update() + 'End If + + '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 = LocalTotal.ToString.FormatoNumero(2) + 'RVDocumentoImporte.MaximumValue = LocalTotal.ToString.FormatoNumero(2) + 'RVDocumentoImporteFE.MaximumValue = RVDocumentoImporte.MaximumValue + 'RVDocumentoImporteCaja.MaximumValue = RVDocumentoImporte.MaximumValue + + 'CargaRetIVAConcepto() + 'CargaRetISRConcepto() + + Me.NumNoDed = TmpDT.COUNT("CvePS", "NoDeducible = True ") + + 'If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") And CveFactura <= 0 Then + ' InicializaAplicaNCFact() + 'End If + + End Sub + + Private Function UpdatePSReembolso(Index As Integer, CvePS As Integer) As Boolean + + Dim Respuesta As Boolean = True + + Dim DrPS As DataRow = Nothing + Try + DrPS = TmpDT.Select($"Consec = {Index}")(0) + If DrPS Is Nothing Then + Errores.AppendLine($"No se encontrol el producto con index {Index}") + Return False + End If + Catch ex As Exception + Errores.AppendLine($"No se encontrol el producto con index {Index}") + Return False + End Try + + + 'BANDERA + 'Dim AplicaCalculaTotales = False + + 'DATOS GENERALES + DrPS("Obs") = "" + DrPS("Proyecto") = Proyecto + DrPS("CveProyecto") = CveProyecto + DrPS("SubProyecto") = SubProyecto + DrPS("CveSubProyecto") = CveSubProyecto + DrPS("CveContratoDetalle") = -1 + + 'IMPORTES - [CANTIDAD Y PRECIO] + Dim Cantidad = DrPS("Cantidad").ToString.ToDouble + Dim PU = DrPS("PU").ToString.ToDouble + Dim Descuento = DrPS("Descuento").ToString.ToDouble + Dim Total = (Cantidad * PU) - Descuento + DrPS("NoDeducible") = NoDeducible + + Dim PSRow As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") + If PSRow IsNot Nothing Then + Dim CveTipoPS As Integer = PSRow("CveTipoPS").ToString.ToEntero + If PSRow("CvePSCargo").ToString <> "" Then 'si es un producto de usado. que se registre contablemente como alamcen(como producto) + CveTipoPS = 2 + End If + + DrPS("CveClasificacion") = PSRow("CveClasificacion").ToString + DrPS("Clasificacion") = PSRow("Clasificacion").ToString + DrPS("CvePS") = CvePS + DrPS("PS") = PSRow("PS").ToString + DrPS("CveTipoPS") = CveTipoPS + DrPS("CveSATPS") = PSRow("CveSATPS").ToString.ToEntero + DrPS("SATClaveProductoServicio") = PSRow("SATClaveProductoServicio").ToString + DrPS("CveSATPSActualizado") = 0 + + DrPS("CveUM") = PSRow("CveUnidadMedida").ToString.ToEntero + DrPS("UM") = PSRow("UnidadMedida").ToString + + Dim DrTipoGasto As DataRow = Me.DTTiposGastos.FiltroPrimero("") + + DrPS("CveTipoGasto") = DrTipoGasto("CveTipoGasto") + DrPS("TipoGasto") = DrTipoGasto("TipoGasto") + + If UsuarioActual.Empresa.Funcionalidad(562).ToEntero > 0 Then + DrPS("AplicaCostoIndirecto") = "0" + End If + + DrPS("CveCultivoCuadroDetalle") = -1 + DrPS("TemporadaCuadro") = "" + + 'RESPETAR VALORES DE LA PANTALLA + 'IVA = PSRow("IVA").ToString.ToDouble + 'If IVA = -1 Then + ' IVA = GlobalDTSubProyectos(-1, DdlSubProyecto.SelectedValue.ToEntero()).FiltroPrimeroValor("IVA").ToDouble + 'End If + 'RetIVA = If(PSRow("RetIVA").ToString = "-1", ViewState("RetIVA"), PSRow("RetIVA").ToString).ToString.ToDouble + 'RetISR = If(PSRow("RetISR").ToString = "-1", ViewState("RetISR"), PSRow("RetISR").ToString).ToString.ToDouble + 'IEPSPS = If(PSRow("IEPSPorcentaje").ToString = "-1", ViewState("IEPSPS"), PSRow("IEPSPorcentaje").ToString).ToString.ToDouble + 'IEPSPSIVA = If(PSRow("IEPSGrabaIVA").ToString = "True", PSRow("IEPSPorcentaje").ToString.ToDouble, 0) + Else + Errores.AppendLine($"No se encontrol el producto con CvePS {CvePS}") + Respuesta = False + End If + + + 'UM + + + 'TIPO DE GASTO + + + + + 'IMPUESTOS: SI ES COMPRA, FACUTRA O CON OC, NO MODIFICA IMPUESTOS!! + 'Dim IVA = (TxtIVAModal.Text.ToDouble / 100) + 'Dim IVA = Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2) + 'Dim RetISR = (TxtRetISRModal.Text.ToDecimal / 100) + 'Dim RetIVA = (TxtRetIVAModal.Text.ToDecimal / 100) + 'Dim IEPSPS = (TxtIEPSModal.Text.ToDecimal / 100) + 'Dim IEPSPSIVA = 0 + + 'I f Not (CveCompra > 0 Or CveFactura > 0 Or OCVinculada) Then + 'If DdlIVA.SelectedValue.ToDouble = 0 Then DrPS("IVA") = 0 Else DrPS("IVA") = IVA * Total + + 'If CveFactura > 0 And TxtIVA.Text.ToDecimal = 0 Then + ' DrPS("IVA") = 0 + ' DrPS("IVAPorcentaje") = 0 + 'Else + + ' If ActualizarIva Then + ' DrPS("IVA") = (IVA * Total).RoundSQL + ' End If + + ' DrPS("IVAPorcentaje") = IVA + 'End If + + 'DrPS("RetIVA") = (RetIVA * Total).RoundSQL + 'DrPS("RetIVAPorcentaje") = RetIVA + 'DrPS("RetISR") = RetISR * Total + 'DrPS("RetISRPorcentaje") = RetISR + 'DrPS("IEPSPS") = (IEPSPS * Total).RoundSQL + 'DrPS("IEPSPSPorcentaje") = IEPSPS + 'DrPS("IEPSPSIVA") = (IEPSPSIVA * Total).RoundSQL + 'DrPS("IEPSPSIVAPorcentaje") = IEPSPSIVA + + + + '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 + ' DrPS("IEPSPSPorcentaje") = 0 + 'End If + + + + + 'AplicaCalculaTotales = True + TmpDT.AcceptChanges() + Return Respuesta + End Function + + + + + 'Private Function AsignarPSReembolso(CvePS As Integer) As Boolean + + ' Dim respuesta As Boolean + + ' If Not CvePS > 0 Then + ' Errores.AppendLine("AsignarPSReembolso el CvePS debe de ser matoy a 0,") + ' Return False + ' End If + + + ' Return respuesta + + 'End Function + + + Private Sub ValidacionesTotalesXml() + + If Not TmpDT.Columns.Contains("Amortizacion") Then + TmpDT.Columns.Add("Amortizacion", GetType(Decimal)) + End If + + Dim Msg As String = "" + Dim SubtotalTemp = TmpDT.SUMD("Total") + Math.Round(TmpDT.SUM("Descuento") + Math.Round(TmpDT.SUM("Amortizacion")), 2).ToDecimal + Dim DescuentosTemp = TmpDT.SUMD("Descuento") + Dim Subtotal2Temp = TmpDT.SUMD("Total") + Dim IVATemp = TmpDT.SUMD("IVA") + Dim IEPSTemp = TmpDT.SUMD("IEPSPS") + Dim RetIVATemp = TmpDT.SUMD("RetIVA") + Dim RetISRTemp = TmpDT.SUMD("RetISR") + Dim TotalTemp As Decimal = Subtotal2Temp - RetIVATemp - RetISRTemp + Math.Round(IVATemp, 6) + IEPSTemp + OtrosImpuestos - OtrosImpuestosRetenciones + + + If Math.Abs(Math.Round(DescuentosTemp, 6) - Math.Round(Descuentos, 6)) > 0.01 Then + Msg &= String.Format("- Los descuentos del detalle no coinciden con el descuento general
    ") + End If + + If Math.Abs(Math.Round(IVATemp, 6) - Math.Round(TrasladoIVA, 6)) > 0.01 Then + Msg &= String.Format("- Los IVAS del detalle no coinciden con el IVA general
    ") + End If + + If Math.Abs(Math.Round(IEPSTemp, 6) - Math.Round(TrasladoIEPS, 6)) > 0.01 Then + Msg &= String.Format("- Los IEPS del detalle no coinciden con el IEPS general
    ") + End If + + If Math.Abs(Math.Round(RetIVATemp, 6) - Math.Round(RetencionIVA, 6)) > 0.01 Then + Msg &= String.Format("- Los RetIVA del detalle no coinciden con el RetIVA general
    ") + End If + + If Math.Abs(Math.Round(RetISRTemp, 6) - Math.Round(RetencionISR, 6)) > 0.01 Then + Msg &= String.Format("- Las RetISR del detalle no coinciden con el RetIVA general
    ") + End If + + If Math.Abs(Math.Round(TotalTemp, 2) - Math.Round(Total, 2)) > 0.01 Then + Msg &= String.Format("- El total generado por los detalles no coincide con el total general
    ({0}-{1})", Math.Round(TotalTemp, 2), Math.Round(Total, 2)) + End If + + If Msg <> "" Then + Errores.AppendLine($" El comprobante XML presenta las siguientes inconsistencias:{Msg}. ") + Else + '[IPP] IGUALAMOS VALORES PARA RESPETAR LOS DEL XML EN CASO DE DIF DE 0.01 + DescuentosTemp = Descuentos + IVATemp = TrasladoIVA + TotalTemp = Total + RetIVATemp = RetencionIVA + RetISRTemp = RetencionISR + IEPSTemp = TrasladoIEPS + End If + + If TrasladoIEPS > 0 Or OtrosImpuestos > 0 Then + + If OtrosImpuestos > 0 Or TrasladoIEPS > 0 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');") + ' End If + 'Else + ' 'Si no tiene funcionalidad y es proveedor se muestra + ' RegistraScript("$('#ModalIEPS').modal({ backdrop: 'static', keyboard: false },'show');") + + 'End If + + 'Else + ' RegistraScript("$('#ModalIEPS').modal('show');") + 'BtnCancelarotrosImpuestos.Visible = True + End If + + + If TrasladoIEPS > 0 Then + 'ChkIEPS.Visible = True + 'ChkIEPS.Checked = True + 'DdlConceptoIEPS.Visible = True + 'CargaProductos(DdlConceptoIEPS, If(UsuarioActual.Empresa.Funcionalidad(112).ToString.ToEntero > 0, UsuarioActual.Empresa.Funcionalidad(112).ToString.ToEntero, -1)) + 'LbImporte.Text = "$" + TrasladoIEPS.ToString + End If + If OtrosImpuestos > 0 Then + 'ChkOtrosI.Visible = True + 'ChkOtrosI.Checked = True + 'DdlConceptoOI.Visible = True + 'CargaProductos(DdlConceptoOI, If(UsuarioActual.Empresa.Funcionalidad(305).ToString.ToEntero > 0, UsuarioActual.Empresa.Funcionalidad(305).ToString.ToEntero, -1)) + 'LbImporte2.Text = "$" + OtrosImpuestos.ToString + End If + End If + + 'TxtSubTotal.Text = SubtotalTemp.FormatoNumero + 'TxtDescuento.Text = DescuentosTemp.FormatoNumero + 'TxtSubTotal2.Text = Subtotal2Temp.FormatoNumero + 'TxtIVA.Text = IVATemp.FormatoNumero + 'TxtTotal.Text = TotalTemp.FormatoNumero + 'TxtRetIVA.Text = RetIVATemp.FormatoNumero + 'TxtRetISR.Text = RetISRTemp.FormatoNumero + 'TxtIEPS.Text = IEPSTemp.FormatoNumero + + 'TrDescuento.Visible = DescuentosTemp > 0 + 'TrIEPS.Visible = IEPSTemp > 0 + 'TrRetIVA.Visible = RetIVATemp > 0 + 'TrRetISR.Visible = RetISRTemp > 0 + + 'TxtSubTotal.Enabled = False + 'TxtDescuento.Enabled = False + 'TxtSubTotal2.Enabled = False + 'TxtIVA.Enabled = False + 'TxtTotal.Enabled = False + 'TxtRetIVA.Enabled = False + 'TxtRetISR.Enabled = False + 'TxtIEPS.Enabled = False + + 'HfTotalCompra.Value = TotalTemp.ToString + 'CompraSaldo = TotalTemp + 'CalculaTotalPorDevengar() + 'TxtDocumentoImporteFE.Text = TotalTemp.ToString + 'RVDocumentoImporte.MaximumValue = Math.Round(TotalTemp, 2).ToString + 'RVDocumentoImporteFE.MaximumValue = RVDocumentoImporte.MaximumValue + 'RVDocumentoImporteCaja.MaximumValue = RVDocumentoImporte.MaximumValue + 'TxtDocumentoImporte.Text = TotalTemp.FormatoNumero + 'TxtDocumentoImporteCaja.Text = TotalTemp.FormatoNumero + 'TxtOtrosImpuestos.Text = OtrosImpuestos.FormatoNumero + 'If OtrosImpuestos > 0 Then TrOtrosImpuestos.Visible = True + 'If OtrosImpuestosRetenciones > 0 Then TrOtrosImpuestos.Visible = True : TxtOtrosImpuestos.Text = (-OtrosImpuestosRetenciones).FormatoNumero + 'HFDiferenciaCompra.Value = TxtTotal.Text + 'HdnCompraSaldo.Value = TotalTemp.ToString + + CompraSaldo = TotalTemp + + '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) + + End Sub + + Private Sub AsignaValoresOriginales(SubTotal As Decimal, SubTotal2 As Double, IVA As Decimal, RetIVA As Decimal, RetISR As Decimal, Total As Decimal) + SubTotalOriginal = SubTotal + SubTotal2Original = SubTotal2 + IVAOriginal = IVA + RetIVAOriginal = RetIVA + RetISROriginal = RetISR + TotalOriginal = Total + End Sub + + Private Sub AjustaImporteUltimoConcepto(ImporteAjuste As Decimal, Optional EsCarga As Boolean = False) + + If ImporteAjuste = 0 Then Exit Sub + + Dim Amortizacion As Decimal = 0 + 'If ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 Then + ' Amortizacion = LblAmortizacion.Text.ToDecimal + 'End If + + If TmpDT.Rows.Count > 0 Then ' si hay movimientos y si esta afectando al total, que se haga el ajuste + Dim Indice As Integer = If(TmpDT.Rows(TmpDT.Rows.Count - 1)("CvePS").ToString = UsuarioActual.Empresa.Funcionalidad(112).ToString, TmpDT.Rows.Count - 2, TmpDT.Rows.Count - 1) + Dim tPU As Decimal + + If TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal > 0 Then + tPU = ImporteAjuste / TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal + Else + tPU = 0 + End If + + If TmpDT.Rows(Indice)("PU").ToString.ToDecimal + tPU < 0 Then 'si es negativo, que tome el dato anterior + Indice = Indice - 1 + If TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal > 0 Then + tPU = ImporteAjuste / TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal + Else + tPU = 0 + End If + End If + + TmpDT.Rows(Indice)("PU") = TmpDT.Rows(Indice)("PU").ToString.ToDecimal + tPU + TmpDT.Rows(Indice)("Total") = TmpDT.Rows(Indice)("Total").ToString.ToDecimal + ImporteAjuste + TmpDT.Rows(Indice)("IEPSPS") = (TmpDT.Rows(Indice)("Total").ToString.ToDecimal() * TmpDT.Rows(Indice)("IEPSPSPorcentaje").ToString.ToDecimal()).RoundAD(2) + 'TmpDT.Rows(Indice)("IVA") = TmpDT.Rows(Indice)("PU").ToString.ToDecimal * TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal * TmpDT.Rows(Indice)("IVAPorcentaje").ToString.ToDecimal + TmpDT.Rows(Indice)("IVA") = (TmpDT.Rows(Indice)("PU").ToString.ToDecimal * TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal - TmpDT.Rows(Indice)("Descuento").ToString.ToDecimal) * TmpDT.Rows(Indice)("IVAPorcentaje").ToString.ToDecimal + 'Row("IEPSPS") = Math.Round(IEPSPS, DecimalesPermitidos) + 'Row("IEPSPSPorcentaje") = PorcentajeIEPS + TmpDT.AcceptChanges() + End If + + SubTotal = TmpDT.SUMD("Total") + If Not EsCarga Then + Descuentos = TmpDT.SUMD("Descuento") + End If + + SubTotalConceptos = SubTotal + + + End Sub + + + + Public Function ValidateUUID(ByVal uuid As String) As Boolean + Dim pattern As String = "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" + Dim regex As New Regex(pattern) + Return regex.IsMatch(uuid) + End Function + Private Function GeneraStringDoctosRelacionados() As String + + Dim DoctosRelacionados As String = "-1" + Dim listaUUIDSRelacionados As New List(Of String) + + If DocumentosRelacionadosUUIDSList.Count > 0 Then + For Each s As String In DocumentosRelacionadosUUIDSList + If s.Trim.Length > 0 Then + listaUUIDSRelacionados.Add(s.Trim) + End If + Next + End If + + If listaUUIDSRelacionados.Count > 0 Then + DoctosRelacionados = String.Join(",", listaUUIDSRelacionados.ToArray()) + End If + + Return DoctosRelacionados + End Function + + + Private Function ValorXML(n As XmlNode, Campo As String, Optional Retorno As String = "") As String + Dim o As XmlNode = n.Attributes.Cast(Of XmlAttribute)().SingleOrDefault(Function(a) String.Compare(a.Name, Campo, True) = 0) + If o Is Nothing Then + Return Retorno + Else + Return o.Value + End If + End Function + +End Class + + + + + + + + + + Public Class GeneralesAPIeFacturas diff --git a/Contabilidad/RepAnexoCatalogoSegmento.aspx b/Contabilidad/RepAnexoCatalogoSegmento.aspx index dfcf45a3c..7110105ca 100644 --- a/Contabilidad/RepAnexoCatalogoSegmento.aspx +++ b/Contabilidad/RepAnexoCatalogoSegmento.aspx @@ -145,171 +145,170 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    diff --git a/Contabilidad/RepAnexoCatalogoSegmento.aspx.vb b/Contabilidad/RepAnexoCatalogoSegmento.aspx.vb index 84f411697..c22931cc4 100644 --- a/Contabilidad/RepAnexoCatalogoSegmento.aspx.vb +++ b/Contabilidad/RepAnexoCatalogoSegmento.aspx.vb @@ -3,6 +3,7 @@ Option Strict On Imports System.Data Imports Extensiones +Imports Microsoft.Extensions.Primitives Imports Microsoft.Reporting.WebForms Partial Class AC_RepAnexoCatalogoSegmento @@ -339,10 +340,19 @@ Partial Class AC_RepAnexoCatalogoSegmento Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click 'GvDatos.ExportToExcelG("RepAnexoCatalogoSegmento", "RepAnexoCatalogoSegmento", UsuarioActual) - GvDatos.ExportToExcelX("RepAnexoCatalogoSegmento") + 'GvDatos.ExportToExcelX("RepAnexoCatalogoSegmento") + Dim SbFiltros As New StringBuilder() + SbFiltros.Append($"Fecha Inicio: {TxtFechaDel.Text} Fecha Fin: {TxtFechaAl.Text} ") + SbFiltros.Append($" Cuenta: {TxtCuenta.Text}") + + GvDatos.ExportToExcelGembox($"RepAnexoCatalogoSegmento{Now.ToString("yyyyMMddhhss")}", UsuarioActual, "Anexo del Catálogo Por Segmento", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString()) End Sub + + + + 'Private Sub ImprimirReporte(Optional Formato As String = "PDF") - ' Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") + ' Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") ' 'ubicacion del rdlc ' Dim reportpath As String = "Contabilidad/Reportes/RepAnexoCatalogo.rdlc" ' 'nombre del reporte diff --git a/RH/CatTurno.aspx.vb b/RH/CatTurno.aspx.vb index f2bf474c2..db8defe5d 100644 --- a/RH/CatTurno.aspx.vb +++ b/RH/CatTurno.aspx.vb @@ -127,13 +127,7 @@ Partial Class RH_CatTurno Private Sub CargaGlobalDTTurno() - Dim ObjRH As New ClsRH - If ObjRH.GetTurnos() Then - Application("GlobalDTTurno") = ObjRH.DtResultados - Else - Application("GlobalDTTurno") = Nothing - End If - ObjRH.Dispose() + GlobalDTTurno(UsuarioActual.CveEmpresa) = Nothing End Sub Public Sub Delete_Click(sender As Object, e As EventArgs) diff --git a/RH/Personal.aspx b/RH/Personal.aspx index b18c06677..d576de5e0 100644 --- a/RH/Personal.aspx +++ b/RH/Personal.aspx @@ -2876,10 +2876,11 @@
    -
    - +
    + Solicitar Vacaciones + <%-- Solicitar Vacaciones - + --%>
    @@ -3038,7 +3039,7 @@
    -
    -
    +
    + +
    - + @@ -3078,13 +3080,25 @@
    + +
    + + + +
    + + Días pago +
    +
    + +
    - - - + + + @@ -3097,7 +3111,7 @@
    - + Días feriados
    @@ -3123,12 +3137,7 @@
    - -
    - - Días pago -
    -
    + @@ -3145,6 +3154,9 @@
    + + +
    @@ -5748,6 +5760,7 @@
    + @@ -5762,6 +5775,30 @@ height: 50 }); $('[data-toggle="tooltip"]').tooltip(); + + + + $("#Txtdiasinabiles").prop("readonly", true); + $("#Txtdiasinabiles").on("paste", function (event) { + event.preventDefault(); + }); + $("#Txtdiasinabiles").on("contextmenu", function (event) { + if (event.which === 3) { + event.preventDefault(); + } + }); + + + $("#TxtFechaFinVac").prop("readonly", true); + $("#TxtFechaFinVac").on("paste", function (event) { + event.preventDefault(); + }); + $("#TxtFechaFinVac").on("contextmenu", function (event) { + if (event.which === 3) { + event.preventDefault(); + } + }); + }); } @@ -7276,5 +7313,11 @@ return pstCURP } + + + function calculaFechasVacaciones(){ + $('#LnkCalculaFechasVacaciones').click(); + } + diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index a96c4ffc3..4feea3f48 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -1896,6 +1896,8 @@ Partial Class RH_Personal TxtFechaFinVac.Text = Now.AddDays(VacDiasDisponibles).ToString("dd/MM/yyyy") + + 'PERSONAL ALTAS If ObjPersonal.GetPersonalAltas(CvePersonal) Then GvPersonalAltas.DataSource = ObjPersonal.DtResultados @@ -7814,5 +7816,60 @@ Partial Class RH_Personal #End Region + + + Protected Sub LnkSolicitarVacaciones_Click(sender As Object, e As EventArgs) + + TxtVacDiasPago.Text = VacDiasDisponibles.ToString + + Dim diaDescanso As Integer = GlobalDTTurno(UsuarioActual.CveEmpresa).FiltroPrimeroValor("DiaDescanso", $" CveTurno = {DdlTurno.SelectedValue.ToEntero}").ToEntero + diaDescanso = If(diaDescanso <= 0, 1, diaDescanso) + + ContarDiasDeLaSemana(TxtFechaInicioVac.Text.ToDate, TxtVacDiasPago.Text.ToEntero) + + If Not diaDescanso > 0 Then + Alert("El turno no tiene día de descanso, provisionalmente se tomara el domingo.", TipoMensaje.MsgAdvertencia) + End If + + RegistraScript("$('#ModalAddVacaciones').modal('show');") + End Sub + + + Private Sub ContarDiasDeLaSemana(fechaInicio As Date, diasVacaciones As Integer) + + Dim diaDescanso As Integer = GlobalDTTurno(UsuarioActual.CveEmpresa).FiltroPrimeroValor("DiaDescanso", $" CveTurno = {DdlTurno.SelectedValue.ToEntero}").ToEntero + diaDescanso = If(diaDescanso <= 0, 1, diaDescanso) + + Dim DiasAgregados As Integer = 0 + Dim FechaFin As Date = fechaInicio + + For x = 2 To diasVacaciones + Dim day_of_week = CType(FechaFin.DayOfWeek, Integer) + 1 + If day_of_week = diaDescanso Then + FechaFin = FechaFin.AddDays(2) + DiasAgregados = DiasAgregados + 1 + Else + FechaFin = FechaFin.AddDays(1) + day_of_week = CType(FechaFin.DayOfWeek, Integer) + 1 + If day_of_week = diaDescanso Then + DiasAgregados = DiasAgregados + 1 + End If + + End If + + Next + + TxtFechaFinVac.Text = FechaFin.ToString + Txtdiasinabiles.Text = DiasAgregados.ToString + + UpSolicitarVacaciones.Update() + + End Sub + + Protected Sub LnkCalculaFechasVacaciones_Click(sender As Object, e As EventArgs) + + ContarDiasDeLaSemana(TxtFechaInicioVac.Text.ToDate, TxtVacDiasPago.Text.ToEntero) + + End Sub End Class From db22ffbcf178bfedfe845363c13a68f7f8afed01 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Sat, 15 Jul 2023 15:14:40 -0700 Subject: [PATCH 24/34] Correcion maximo de dias de vacaiones permitidos --- RH/Personal.aspx.vb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index 4feea3f48..4f9b277b3 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -7837,6 +7837,11 @@ Partial Class RH_Personal Private Sub ContarDiasDeLaSemana(fechaInicio As Date, diasVacaciones As Integer) + + If TxtVacDiasPago.Text.ToEntero > VacDiasDisponibles Then + TxtVacDiasPago.Text = VacDiasDisponibles.ToString + End If + Dim diaDescanso As Integer = GlobalDTTurno(UsuarioActual.CveEmpresa).FiltroPrimeroValor("DiaDescanso", $" CveTurno = {DdlTurno.SelectedValue.ToEntero}").ToEntero diaDescanso = If(diaDescanso <= 0, 1, diaDescanso) From 24ba71bfe21f464a1bcf5041cce0dac1a6b143d5 Mon Sep 17 00:00:00 2001 From: rrene Date: Sun, 16 Jul 2023 17:02:02 -0700 Subject: [PATCH 25/34] -- liga --- Nomina/Nomina.aspx.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index 94e7df386..9f6a31874 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -8934,14 +8934,14 @@ public partial class Nomina_Nomina2 : ClsPaginas CvePrePolizaasmilidos = objnom.DtResultados.Rows[0]["CvePrePolizaAsimilables"].ToString().ToEntero(); CvePrePolizaProrrateo = objnom.DtResultados.Rows[0]["CvePrePolizaProrrateo"].ToString().ToEntero(); } - string mensaje = string.Format("La provision a sido autorizada.
    Provision
    ", CvePrePolizaProvision); + string mensaje = string.Format("La provisión a sido generada.
    Provisión
    ", CvePrePolizaProvision); if (CvePrePolizaasmilidos > 0) { - mensaje = string.Format("{0} Asimilados
    ", mensaje, CvePrePolizaasmilidos); + mensaje = string.Format("{0} Asimilados
    ", mensaje, CvePrePolizaasmilidos); } if (CvePrePolizaProrrateo > 0) { - mensaje = string.Format("{0} Prorrateo
    ", mensaje, CvePrePolizaProrrateo); + mensaje = string.Format("{0} Prorrateo
    ", mensaje, CvePrePolizaProrrateo); } if (CvePrePolizaProvision > 0) { From bff73be8a81b076a703119842e5bdf1fcf643913 Mon Sep 17 00:00:00 2001 From: rrene Date: Sun, 16 Jul 2023 17:02:17 -0700 Subject: [PATCH 26/34] -- mensaje para E141 --- OC/OC.aspx.vb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index 9980a85e2..216e04505 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -2401,7 +2401,15 @@ Partial Class OC_OC TieneError = True End If + ''validación que para empresas llanteras, y la clasif son llantas, que requiere la fecha de estimación + If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then + Dim dtc As DataTable = DtDetalle.FiltraParametros("Clasificacion like '%Llanta%'") + If dtc IsNot Nothing AndAlso dtc.Rows.Count > 0 AndAlso TxtFechaEstimadaEntrega.Text.ToDate <= MinFecha Then + Alert("Cuando se incluyan productos llantas, deberán especificar fecha estimada de entrega.", TipoMensaje.MsgAdvertencia) + TieneError = True + End If + End If 'SI ES REQUISICION, NO REQUIERE COTIZACION Y ES ESTATUSFINALOK... ENTONCES DEBE DE TENER UN PROVEEDOR SELECCIONADO Y LOS PRECIOS CAPTURADOS 'If (TipoOC = "REQ" And ChkCotizacion.Checked = False And CboE.SelectedValue.ToEntero = CveEstatusFinalOK) OrElse TipoOC = "OC" Then @@ -2590,9 +2598,6 @@ Partial Class OC_OC 'VALIDACIONES PARA GUARDAR If ValidaGuardar() Then Exit Sub - - - Dim MsgError As String = "Hubo un error al registrar" 'VARIABLES Dim CveProveedorSucursal As Integer = -1 From c0333953ce48aa9db8ba0941ae7ae9fd545e2b48 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 17 Jul 2023 09:07:56 -0700 Subject: [PATCH 27/34] habilitar opciones al editar --- Ventas/Ventas.aspx.vb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 7a7c8b88a..23138df2b 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2825,7 +2825,7 @@ Partial Class Ventas BtnCrearApartirDe.Visible = True If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then BtnCrearApartirDe.Visible = False - If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Egs") AndAlso LblSeTimbro.Text = "No" Then BtnEditar.Visible = True + If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Egs") Then BtnEditar.Visible = True DivFechaAnticipoCliente.Visible = True TxtFechaAnticipoCliente.Text = Now.ToShortDateString @@ -34786,6 +34786,17 @@ Partial Class Ventas DdlUsoCFDI.Enabled = True End If + If Not UsuarioActual.TienePermisoProceso(289) Then + If LblSeTimbro.Text = "No" Then + DdlUsoCFDI.Enabled = False + DdlMetodoPago33.Enabled = False + DdlFormaPago33.Enabled = False + End If + + TxtFechaPago.Enabled = True + imgCalendario.Enabled = True + End If + If LblSeTimbro.Text = "No" AndAlso DdlMoneda.SelectedValue.ToEntero() = 2 AndAlso ChkEmitirComercioExterior.Checked AndAlso DdlTipoComprobante.SelectedValue = "Ing" Then TxtTipoCambio.Enabled = True TxtTipoCambio.ReadOnly = False From aa1d793cb1fd2968dfe1ab1040503bc2cc579a23 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Mon, 17 Jul 2023 10:30:35 -0700 Subject: [PATCH 28/34] =?UTF-8?q?Personal=20solicitud=20vacaiones=20correc?= =?UTF-8?q?ion=20d=C3=ADas=20feriados?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- RH/Personal.aspx.vb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index 4f9b277b3..ab70b76b3 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -7847,7 +7847,7 @@ Partial Class RH_Personal Dim DiasAgregados As Integer = 0 Dim FechaFin As Date = fechaInicio - + Dim Contador As Integer = 0 For x = 2 To diasVacaciones Dim day_of_week = CType(FechaFin.DayOfWeek, Integer) + 1 If day_of_week = diaDescanso Then @@ -7856,12 +7856,13 @@ Partial Class RH_Personal Else FechaFin = FechaFin.AddDays(1) day_of_week = CType(FechaFin.DayOfWeek, Integer) + 1 - If day_of_week = diaDescanso Then + If (diasVacaciones = Contador + 2) AndAlso day_of_week = diaDescanso Then + FechaFin = FechaFin.AddDays(1) DiasAgregados = DiasAgregados + 1 End If End If - + Contador = Contador + 1 Next TxtFechaFinVac.Text = FechaFin.ToString From 89fb1aba6438af59664705ec9f91f7a0eb7e5819 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 17 Jul 2023 11:41:49 -0700 Subject: [PATCH 29/34] -- que al asociar folios fiscales, considerar Ant --- Ventas/Ventas.aspx.vb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 2b337b218..c8a2179ac 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -6898,8 +6898,6 @@ Partial Class Ventas UpModalRemisionesNC.Update() End If - CargaFacturasARelacionar() - If RequiereOC Then Dim Documentacion As String = "" 'RegistraScript("$('#DivDocsCliente').modal({ backdrop: 'static', keyboard: false });", "ModalArchivos") @@ -7066,9 +7064,14 @@ Partial Class Ventas End Sub Private Sub CargaFacturasARelacionar() Using ObjClientes As New ClsClientes + Dim dtt As New DataTable If ObjClientes.GetHistorialVentas(Me.CveCliente, UsuarioActual.CveEmpresa, TipoDocto:="Ing") Then - DdlFacturaARelacionar.DataSource = ObjClientes.DtResultados + dtt = ObjClientes.DtResultados End If + If ObjClientes.GetHistorialVentas(Me.CveCliente, UsuarioActual.CveEmpresa, TipoDocto:="Ant") Then + dtt.Merge(ObjClientes.DtResultados) + End If + DdlFacturaARelacionar.DataSource = dtt End Using DdlFacturaARelacionar.DataBind() From 6f4a33c6c2e5ccffa7d17efd08b22be924f4ff98 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Mon, 17 Jul 2023 15:55:02 -0700 Subject: [PATCH 30/34] Correciones formatos rdlc --- AC/Reportes/RepSituacionFinanciera.rdlc | 3066 ------- Compras/eFacturas.aspx.vb | 4 +- .../Reportes/_RepSituacionFinanciera.rdlc | 3080 ------- Empresas/25/Formatos/Factura.rdlc | 7460 ++++++++-------- Empresas/35/Formatos/Factura.rdlc | 11 +- Empresas/60/Formatos/Factura.rdlc | 7485 +++++++++-------- Empresas/Grales/Formatos/Kardex.rdlc | 2992 +++---- 7 files changed, 8630 insertions(+), 15468 deletions(-) delete mode 100644 AC/Reportes/RepSituacionFinanciera.rdlc delete mode 100644 Contabilidad2/Reportes/_RepSituacionFinanciera.rdlc diff --git a/AC/Reportes/RepSituacionFinanciera.rdlc b/AC/Reportes/RepSituacionFinanciera.rdlc deleted file mode 100644 index 3723ffd7a..000000000 --- a/AC/Reportes/RepSituacionFinanciera.rdlc +++ /dev/null @@ -1,3066 +0,0 @@ - - - 0 - - - - System.Data.DataSet - /* Local Connection */ - - 3560db3f-20af-4776-9f09-85925745c52f - - - - - - DataSet1 - /* Local Query */ - - - - Nombre - System.String - - - ImporteActual - System.Int16 - - - ImporteAnterior - System.Int16 - - - CtaMayor - System.Int16 - - - Orden - System.String - - - Tipo - System.String - - - Sup - System.String - - - Level - System.Int16 - - - TipoCuenta - System.Int16 - - - - DataSet1 - c:\users\caudillo\documents\visual studio 2013\Projects\WebApplication1\WebApplication1\DataSet1.xsd - ActivoCirculante - - - - - - - - - - - - - - - 6cm - - - 2.5cm - - - 2.20896cm - - - - - 0.6cm - - - - - true - true - - - - - ACTIVO CIRCULANTE - - - - - - - Textbox7 - - - 2pt - 2pt - 2pt - 2pt - - - 3 - - - - - - - - 0.45cm - - - - - true - - - - - =Fields!Nombre.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ImporteActual.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ImporteAnterior.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - - - - - TOTAL ACTIVO CIRCULANTE - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(IIf(Fields!Level.Value < 2, Fields!ImporteActual.Value, 0)) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(IIf(Fields!Level.Value < 2, Fields!ImporteAnterior.Value, 0)) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - After - true - - - - - - - - - Before - - - - DataSet1 - - - =Fields!Tipo.Value - In - - =CStr("A,B,C").Split(",") - - - - =Fields!Orden.Value - Like - - =IIf(Parameters!CveEmpresa.Value = 48, "00011*", "011*") - - - - =Fields!Nombre.Value - NotEqual - - ACTIVO CIRCULANTE - - - - 2.6512cm - 0.06568cm - 1.65cm - 10.70896cm - - - Verdana - 8pt - - - - - - - 6cm - - - 2.5cm - - - 2.20896cm - - - - - 0.6cm - - - - - true - true - - - - - ACTIVO NO CIRCULANTE - - - - - - - Textbox7 - - - 2pt - 2pt - 2pt - 2pt - - - 3 - - - - - - - - 0.45cm - - - - - true - - - - - =Fields!Nombre.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ImporteActual.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ImporteAnterior.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - TOTAL ACTIVO NO CIRCULANTE - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(IIf(Fields!Level.Value < 2, Fields!ImporteActual.Value, 0)) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(IIf(Fields!Level.Value < 2, Fields!ImporteAnterior.Value, 0)) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - After - true - - - - - - Before - - - - DataSet1 - - - =Fields!Tipo.Value - In - - =CStr("A,B,C").Split(",") - - - - =Fields!Orden.Value - Like - - =IIf(Parameters!CveEmpresa.Value = 48, "00012*", "012*") - - - - =Fields!Nombre.Value - NotEqual - - ACTIVO NO CIRCULANTE - - - - 4.74417cm - 0.06568cm - 1.65cm - 10.70896cm - 1 - - - Verdana - 8pt - - - - - - - 5.10007cm - - - 2.1825cm - - - 2.17523cm - - - - - 0.6cm - - - - - true - true - - - - - PASIVO CIRCULANTE - - - - - - - Textbox7 - - - 2pt - 2pt - 2pt - 2pt - - - 3 - - - - - - - - 0.45cm - - - - - true - - - - - =Fields!Nombre.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ImporteActual.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ImporteAnterior.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - TOTAL PASIVO CIRCULANTE - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(IIf(Fields!Level.Value < 2, Fields!ImporteActual.Value, 0)) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(IIf(Fields!Level.Value < 2, Fields!ImporteAnterior.Value, 0)) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - After - true - - - - - - Before - - - - DataSet1 - - - =Fields!Tipo.Value - Equal - - D - - - - =Fields!Nombre.Value - NotEqual - - PASIVO CIRCULANTE - - - - =Fields!Orden.Value - Like - - =IIf(Parameters!CveEmpresa.Value = 48, "00021*", "021*") - - - - 2.6512cm - 10.88047cm - 1.65cm - 9.4578cm - 2 - - - Verdana - 8pt - - - - - - - 5.14411cm - - - 2.1825cm - - - 2.13119cm - - - - - 0.6cm - - - - - true - true - - - - - PASIVO NO CIRCULANTE - - - - - - - Textbox7 - - - 2pt - 2pt - 2pt - 2pt - - - 3 - - - - - - - - 0.45cm - - - - - true - - - - - =Fields!Nombre.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ImporteActual.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ImporteAnterior.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - TOTAL PASIVO NO CIRCULANTE - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(IIf(Fields!Level.Value < 2, Fields!ImporteActual.Value, 0)) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(IIf(Fields!Level.Value < 2, Fields!ImporteAnterior.Value, 0)) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - After - true - - - - - - Before - - - - DataSet1 - - - =Fields!Tipo.Value - Equal - - D - - - - =Fields!Nombre.Value - NotEqual - - PASIVO NO CIRCULANTE - - - - =Fields!Orden.Value - Like - - =IIf(Parameters!CveEmpresa.Value = 48, "00022*", "022*") - - - - 4.74417cm - 10.88047cm - 1.65cm - 9.4578cm - 3 - - - Verdana - 8pt - - - - true - true - - - - - ACTIVO - - - - - - - Textbox28 - 1.84891cm - 0.27028cm - 0.6cm - 9.7954cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - PASIVO - - - - - - - Textbox28 - 1.91009cm - 10.88047cm - 0.6cm - 8.40286cm - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 5.18815cm - - - 2.13846cm - - - 2.13119cm - - - - - 0.6cm - - - - - true - true - - - - - CAPITAL CONTABLE - - - - - - - Textbox7 - - - 2pt - 2pt - 2pt - 2pt - - - 3 - - - - - - - - 0.45cm - - - - - true - - - - - =Fields!Nombre.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ImporteActual.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ImporteAnterior.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - TOTAL CAPITAL - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(IIf(Fields!Level.Value < 2, Fields!ImporteActual.Value, 0)) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(IIf(Fields!Level.Value < 2, Fields!ImporteAnterior.Value, 0)) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - After - true - - - - - - Before - - - - DataSet1 - - - =Fields!Tipo.Value - Equal - - F - - - - =Fields!Nombre.Value - NotEqual - - PATRIMONIO GENERADO - - - - =Fields!Nombre.Value - NotEqual - - PATRIMONIO CONTRIBUIDO - - - - 8.30193cm - 10.88047cm - 1.65cm - 9.4578cm - 6 - - - Verdana - 8pt - - - - true - true - - - - - CAPITAL - - - - - - - Textbox28 - 7.52554cm - 10.92451cm - 0.6cm - 9.41376cm - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Total del Activo - - - - - - - Textbox45 - 11.31317cm - 0.27027cm - 0.6cm - 4.34021cm - 8 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Variables!TotalActivoAnterior.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Variables!TotalActivoActual.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Total CAPITAL - - - - - - - Textbox45 - 10.22837cm - 10.88047cm - 0.6cm - 3.1816cm - 11 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Variables!TotalPatrimonioHAnterior.Value + Variables!TotalPatrimonioCAnterior.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Variables!TotalPatrimonioHActual.Value + Variables!TotalPatrimonioCActual.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Total Pasivo y Patrimonio - - - - - - - Textbox45 - 11.31317cm - 10.26312cm - 0.6cm - 4.61265cm - 14 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Variables!TotalpasivoYHaciendaAnterior.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Variables!TotalpasivoYHaciendaActual.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Total del Pasivo: - - - - - - - Textbox45 - 6.57056cm - 10.88047cm - 0.6cm - 3.1816cm - 17 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Variables!TotalPasivoAnterior.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Variables!TotalPasivoActual.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Iif(round(Math.Abs(Variables!TotalActivoAnterior.Value-Variables!TotalpasivoYHaciendaAnterior.Value),2) <.005 AND Round(Math.Abs(Variables!TotalActivoActual.Value-Variables!TotalpasivoYHaciendaActual.Value),2) <.005,"" ,"La suma de los totales estan descuadradas." & round(Math.Abs(Variables!TotalActivoAnterior.Value-Variables!TotalpasivoYHaciendaAnterior.Value),2)) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - External - = Parameters!pImg.Value - FitProportional - 0.03141cm - 0.31432cm - 1.5cm - 1.5cm - 21 - - - - - - true - true - - - - - =Parameters!pEmp.Value - - - - - - - Textbox1 - 0.03141cm - 3.40996cm - 0.81167cm - 12.91455cm - 22 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Estado de Situación Financiera al - - - - =Parameters!pFechaFin.Value - - - - - - - Textbox5 - 0.89924cm - 3.40996cm - 0.6cm - 12.91455cm - 23 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ="Fecha Impresión:" & vbcrlf & Format( Globals!ExecutionTime,"dd/MM/yyyy") - - - - - - - Textbox8 - 0.03141cm - 16.58113cm - 0.81167cm - 3.49249cm - 24 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 6cm - - - 2.5cm - - - 2.20896cm - - - - - 0.6cm - - - - - true - true - - - - - ACTIVO DIFERIDO - - - - - - - Textbox7 - - - 2pt - 2pt - 2pt - 2pt - - - 3 - - - - - - - - 0.45cm - - - - - true - - - - - =Fields!Nombre.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ImporteActual.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ImporteAnterior.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - TOTAL ACTIVO DIFERIDO - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(IIf(Fields!Level.Value < 2, Fields!ImporteActual.Value, 0)) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(IIf(Fields!Level.Value < 2, Fields!ImporteAnterior.Value, 0)) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - After - true - - - - - - Before - - - - DataSet1 - - - =Fields!CtaMayor.Value - NotEqual - - 3 - - - - 6.92554cm - 0.06568cm - 1.65cm - 10.70896cm - 25 - - =IIf(Parameters!CveEmpresa.Value = 48 Or Parameters!CveEmpresa.Value = 120,True,False) - - - - Verdana - 8pt - - - - 5.1587in - - - - =Parameters!pFechaFin.Value - - - - - - - Textbox5 - 3.454cm - 0.6cm - 12.91455cm - - = (Globals.PageNumber=1) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ="Fecha Impresión:" & vbcrlf & Format( Globals!ExecutionTime,"dd/MM/yyyy") - - - - - - - Textbox8 - 0.02088cm - 16.62517cm - 0.57912cm - 3.49249cm - 1 - - = (Globals.PageNumber=1) - - - - 2pt - 2pt - - - - - - - - - 2.27541cm - true - true - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox3 - 1.41083cm - 16.37931cm - 0.6cm - 3.95896cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!pFirma2.Value - - - - Textbox2 - 0.10583cm - 1.71666cm - 0.99688cm - 8.02269cm - 1 - - = Iif((Globals.PageNumber=Globals.TotalPages) and (Parameters!pFirma2.Value <> ""),false,true) - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!pFirma1.Value - - - - Textbox2 - 0.07056cm - 10.88047cm - 0.99688cm - 8.02269cm - 2 - - = Iif((Globals.PageNumber=Globals.TotalPages) and (Parameters!pFirma1.Value <> ""),false,true) - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0.5cm - 1cm - 1cm - 0.13cm - - - - - - - Textbox7 - - - 2pt - 2pt - 2pt - 2pt - - - 3 - - - - - - - - 0.45cm - - - - - true - - - - - =Fields!Nombre.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ImporteActual.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ImporteAnterior.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - - - - - TOTAL ACTIVO CIRCULANTE - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(Fields!ImporteActual.Value) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(Fields!ImporteAnterior.Value) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - After - true - - - - - - - - - Before - - - - DataSet1 - - - =Fields!Tipo.Value - In - - =CStr("A,B,C").Split(",") - - - - =Fields!TipoCuenta.Value - Equal - - 1 - - - - 2.6512cm - 0.31432cm - 1.65cm - 10.42504cm - - - Verdana - 8pt - - - - - - - 5.36361cm - - - 2.86585cm - - - 2.19558cm - - - - - 0.6cm - - - - - true - true - - - - - ACTIVO NO CIRCULANTE - - - - - - - Textbox7 - - - 2pt - 2pt - 2pt - 2pt - - - 3 - - - - - - - - 0.45cm - - - - - true - - - - - =Fields!Nombre.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ImporteActual.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ImporteAnterior.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - TOTAL ACTIVO NO CIRCULANTE - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(Fields!ImporteActual.Value) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum( Fields!ImporteAnterior.Value) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - After - true - - - - - - Before - - - - DataSet1 - - - =Fields!Tipo.Value - In - - =CStr("A,B,C").Split(",") - - - - =Fields!TipoCuenta.Value - Equal - - 2 - - - - 4.74417cm - 0.31432cm - 1.65cm - 10.42504cm - 1 - - - Verdana - 8pt - - - - - - - 5.21467cm - - - 2.56871cm - - - 1.91058cm - - - - - 0.6cm - - - - - true - true - - - - - PASIVO CIRCULANTE - - - - - - - Textbox7 - - - 2pt - 2pt - 2pt - 2pt - - - 3 - - - - - - - - 0.45cm - - - - - true - - - - - =Fields!Nombre.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ImporteActual.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ImporteAnterior.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - TOTAL PASIVO CIRCULANTE - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(Fields!ImporteActual.Value) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(Fields!ImporteAnterior.Value) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - After - true - - - - - - Before - - - - DataSet1 - - - =Fields!Tipo.Value - Equal - - D - - - - =Fields!TipoCuenta.Value - Equal - - 3 - - - - 2.6512cm - 10.77464cm - 1.65cm - 9.69396cm - 2 - - - Verdana - 8pt - - - - - - - 5.21467cm - - - 2.56871cm - - - 1.91058cm - - - - - 0.6cm - - - - - true - true - - - - - PASIVO NO CIRCULANTE - - - - - - - Textbox7 - - - 2pt - 2pt - 2pt - 2pt - - - 3 - - - - - - - - 0.45cm - - - - - true - - - - - =Fields!Nombre.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ImporteActual.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ImporteAnterior.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - TOTAL PASIVO NO CIRCULANTE - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(Fields!ImporteActual.Value) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(Fields!ImporteAnterior.Value) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - After - true - - - - - - Before - - - - DataSet1 - - - =Fields!Tipo.Value - Equal - - D - - - - =Fields!TipoCuenta.Value - Equal - - 4 - - - - 4.74417cm - 10.77464cm - 1.65cm - 9.69396cm - 3 - - - Verdana - 8pt - - - - true - true - - - - - ACTIVO - - - - - - - Textbox28 - 1.91009cm - 0.31432cm - 0.6cm - 10.46032cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - PASIVO - - - - - - - Textbox28 - 1.91009cm - 10.77464cm - 0.6cm - 9.69395cm - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 5.21467cm - - - 2.56871cm - - - 1.91058cm - - - - - 0.6cm - - - - - true - true - - - - - CAPITAL CONTABLE - - - - - - - Textbox7 - - - 2pt - 2pt - 2pt - 2pt - - - 3 - - - - - - - - 0.45cm - - - - - true - - - - - =Fields!Nombre.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ImporteActual.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ImporteAnterior.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - TOTAL CAPITAL - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(Fields!ImporteActual.Value) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(Fields!ImporteAnterior.Value) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - After - true - - - - - - Before - - - - DataSet1 - - - =Fields!Tipo.Value - Equal - - F - - - - =Fields!TipoCuenta.Value - In - - 5 - 6 - 7 - 8 - - - - 8.30193cm - 10.77464cm - 1.65cm - 9.69396cm - 6 - - - Verdana - 8pt - - - - true - true - - - - - CAPITAL - - - - - - - Textbox28 - 7.52554cm - 10.77464cm - 0.6cm - 9.69395cm - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Total CAPITAL - - - - - - - Textbox45 - 10.22837cm - 10.77464cm - 0.6cm - 4.89717cm - 8 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Variables!TotalPatrimonioHAnterior.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Variables!TotalPatrimonioHActual.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Total Pasivo y Patrimonio - - - - - - - Textbox45 - 11.12267cm - 10.77464cm - 0.6cm - 4.89717cm - 11 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Variables!TotalpasivoYHaciendaAnterior.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Variables!TotalpasivoYHaciendaActual.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Total del Pasivo: - - - - - - - Textbox45 - 6.57056cm - 10.77464cm - 0.6cm - 5.21467cm - 14 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Variables!TotalPasivoAnterior.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Variables!TotalPasivoActual.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Iif( Round(Math.Abs(Variables!TotalActivoActual.Value-Variables!TotalpasivoYHaciendaActual.Value),2) <.005,"" ,"La suma de los totales estan descuadradas." & Round(Math.Abs(Variables!TotalActivoActual.Value-Variables!TotalpasivoYHaciendaActual.Value),2)) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - External - = Parameters!pImg.Value - FitProportional - 0.03141cm - 0.31432cm - 1.5cm - 5.36361cm - 18 - - - - - - true - true - - - - - =Parameters!pEmp.Value - - - - - - - Textbox1 - 0.03141cm - 5.67793cm - 0.81167cm - 10.31137cm - 19 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Estado de Situación Financiera - - - - =Parameters!periodo.Value - - - - - - - Textbox5 - 0.89924cm - 5.67793cm - 0.6cm - 10.31137cm - 20 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ="Fecha Impresión:" & vbcrlf & Format( Globals!ExecutionTime,"dd/MM/yyyy") - - - - - - - Textbox8 - 0.07056cm - 15.98931cm - 0.81167cm - 4.47928cm - 21 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 5.36361cm - - - 2.86585cm - - - 2.19558cm - - - - - 0.6cm - - - - - true - true - - - - - ACTIVO DIFERIDO - - - - - - - Textbox7 - - - 2pt - 2pt - 2pt - 2pt - - - 3 - - - - - - - - 0.45cm - - - - - true - - - - - =Fields!Nombre.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ImporteActual.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ImporteAnterior.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - TOTAL ACTIVO DIFERIDO - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(Fields!ImporteActual.Value) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(Fields!ImporteAnterior.Value) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - After - true - - - - - - Before - - - - DataSet1 - - - =Fields!TipoCuenta.Value - Equal - - 9 - - - - 6.92554cm - 0.31432cm - 1.65cm - 10.42504cm - 22 - - - Verdana - 8pt - - - - true - true - - - - - Total del Activo - - - - - - - Textbox45 - 11.12267cm - 0.31432cm - 0.6cm - 5.36361cm - 23 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Variables!TotalActivoAnterior.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Variables!TotalActivoActual.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 4.88706in - - - - =Parameters!pFechaFin.Value - - - - - - - Textbox5 - 3.454cm - 0.6cm - 12.91455cm - - = (Globals.PageNumber=1) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ="Fecha Impresión:" & vbcrlf & Format( Globals!ExecutionTime,"dd/MM/yyyy") - - - - - - - Textbox8 - 0.02088cm - 16.62517cm - 0.57912cm - 3.49249cm - 1 - - = (Globals.PageNumber=1) - - - - 2pt - 2pt - - - - - - - - - 2.46062cm - true - true - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox3 - 1.86062cm - 16.37931cm - 0.6cm - 3.95896cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!pFirma2.Value - - - - Textbox2 - 0.10583cm - 1.71666cm - 0.99688cm - 8.02269cm - 1 - - = Iif((Globals.PageNumber=Globals.TotalPages) and (Parameters!pFirma2.Value <> ""),false,true) - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!pFirma1.Value - - - - Textbox2 - 1.46374cm - 6.03938cm - 0.99688cm - 8.02269cm - 2 - - = Iif((Globals.PageNumber=Globals.TotalPages) and (Parameters!pFirma1.Value <> ""),false,true) - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - - - Textbox2 - 0.10582cm - 10.37435cm - 0.99688cm - 8.02269cm - 3 - - =Microsoft.VisualBasic.Interaction.Iif((Globals!PageNumber = Globals!TotalPages) And (Parameters!pFirma1.Value <> ""), False, True) - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0.5cm - 0.5cm - 0.5cm - 0.13cm - - - - - - - Textbox3 - 0.90692in - 5.662in - 0.5cm - 2.24597in - - - #e2ab67 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Fecha y hora de emisión - - - - - - - - - - - - - - - - Textbox3 - 0.46414in - 5.662in - 0.5cm - 2.24597in - 1 - - - #e2ab67 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =IIF(Parameters!Serie.Value.ToString="",Parameters!Folio.Value,Parameters!Serie.Value & "-" &Parameters!Folio.Value) - - - - - - - Textbox3 - 0.22455in - 5.662in - 0.60856cm - 2.24597in - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!TipoDocumento.Value - - - - - - - Textbox3 - 0.0412cm - 5.662in - 0.52916cm - 2.24597in - 3 - - - #e2ab67 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Innovación y Desarrollo en Telemetría SA de CV - - - - - - - - - R.F.C IDT130809KA5 - - - - - - - - - raul@argustecnologias.com - - - - - - - Textbox4 - 1.93416in - 0.66099in - 3.62386in - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!CadenaOriginal.Value - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - Embedded - Logo1 - FitProportional - 0.07204cm - 0.06139cm - 2.88998cm - 4.56434cm - 6 - - - - - - true - - - - - =Parameters!Fecha.Value - - - - - - - Textbox3 - 0.66099in - 5.662in - 0.25114in - 2.24597in - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!Tipo.Value & Parameters!Ref.Value - - - - - - - Textbox3 - 1.10364in - 5.662in - 0.25635in - 2.24597in - 8 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Domicilio Fiscal - - - - - - - - - Poder Legislativo, #75, Col Misión del Sol, - - - - - - - - - C.P 83100 Hermosillo, Sonora, México, - - - - - - - - - Tel.: (662)-210-1899 - - - - - - - Textbox10 - 0.51102in - 1.80916in - 0.65513in - 1.92119in - 9 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Lugar de Expedición - - - - - - - - - =Parameters!DomicilioSucursal.Value - - - - - - - Textbox10 - 0.51102in - 3.77202in - 0.65513in - 1.88998in - 10 - - - Top - - - - true - true - - - - - Nombre - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!ClienteNombre.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Dirección - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!ClienteDireccion.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Ciudad - - - - - - - - 1.25pt - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!ClienteLugar.Value - - - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - true - true - - - - - P A G A R E con Folio - - - - =Parameters!Serie.Value - - - - - - - - - =Parameters!Folio.Value - - - - Por éste pagare prometo (emos) pagar incondicionalmente a la orden de Innovación y Desarrollo en Telemetría SA de CV, a su vencimiento el - - - - =Parameters!Vencimiento.Value - - - - , en Hermosillo, Sonora o en el domicilio señalado a elección del acreedor o tenedor la cantidad de $ - - - - =Parameters!Total.Value - - - - SON: ( - - - - =Microsoft.VisualBasic.Strings.UCase(Parameters!ImporteLetra.Value) - - - - ). Valor recibido a mi (nuestra) entera satisfacción. la falta de pago de éste documento a su vencimiento dará derecho a Innovación y Desarrollo en Telemetría SA de CV o tenedor, desde el día siguiente a cobrar el 10% mensual de interes moratorios hasta su total liquidación y los gastos judiciales que se ocasionen. Lugar y Fecha de Suscripción: Hermosillo, Sonora a - - - - =CDATE(Parameters!Fecha.Value).ToString("dd/MM/yyyy") - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Nombre: - - - - =Parameters!ClienteNombre.Value - - - - - - - =Parameters!ClienteDireccion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Acepto de conformidad - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 0.29357cm - 0.09963cm - 0cm - 0.57653cm - 3 - - - - - - 0.29357cm - 0.73559cm - 0cm - 0.57653cm - 4 - - - - - - 0.29357cm - 1.35545cm - 0cm - 0.57653cm - 5 - - - - - - 0.29357cm - 1.80439cm - 0cm - 0.57653cm - 6 - - - - - - 0.29357cm - 2.37686cm - 0cm - 0.57653cm - 7 - - - - - - 0.29357cm - 3.01789cm - 0cm - 0.57653cm - 8 - - - - - - 0.29357cm - 3.65558cm - 0cm - 0.57653cm - 9 - - - - - - 0.29357cm - 4.29154cm - 0cm - 0.57653cm - 10 - - - - - - 0.29357cm - 4.92728cm - 0cm - 0.57653cm - 11 - - - - - - 0.29357cm - 5.25981cm - 0cm - 0.57653cm - 12 - - - - - - 0.29357cm - 5.89576cm - 0cm - 0.57653cm - 13 - - - - - - 0.29357cm - 6.50505cm - 0cm - 0.57653cm - 14 - - - - - - 0.29357cm - 7.18531cm - 0cm - 0.57653cm - 15 - - - - - - 0.29357cm - 7.82127cm - 0cm - 0.57653cm - 16 - - - - - - 0.29357cm - 8.48346cm - 0cm - 0.57653cm - 17 - - - - - - 0.29357cm - 8.81599cm - 0cm - 0.57653cm - 18 - - - - - - 0.29357cm - 9.45195cm - 0cm - 0.57653cm - 19 - - - - - - 0.29357cm - 10.11415cm - 0cm - 0.57653cm - 20 - - - - - - 0.29357cm - 14.08927cm - 0cm - 0.57653cm - 21 - - - - - - 0.29357cm - 14.72523cm - 0cm - 0.57653cm - 22 - - - - - - 0.29357cm - 15.33451cm - 0cm - 0.57653cm - 23 - - - - - - 0.29357cm - 15.64058cm - 0cm - 0.57653cm - 24 - - - - - - 0.29357cm - 16.27654cm - 0cm - 0.57653cm - 25 - - - - - - 0.29357cm - 16.91228cm - 0cm - 0.57653cm - 26 - - - - - - 0.29357cm - 10.76463cm - 0cm - 0.57653cm - 27 - - - - - - 0.29357cm - 11.42705cm - 0cm - 0.57653cm - 28 - - - - - - 0.29357cm - 12.06279cm - 0cm - 0.57653cm - 29 - - - - - - 0.29357cm - 12.36886cm - 0cm - 0.57653cm - 30 - - - - - - 0.29357cm - 12.89898cm - 0cm - 0.57653cm - 31 - - - - - - 0.29357cm - 13.53472cm - 0cm - 0.57653cm - 32 - - - - - - 0.29357cm - 18.40663cm - 0cm - 0.57653cm - 33 - - - - - - 0.29357cm - 19.04259cm - 0cm - 0.57653cm - 34 - - - - - - 0.29357cm - 17.74353cm - 0cm - 0.57653cm - 35 - - - - - - 3.29402cm - 15.33451cm - 0cm - 4.58211cm - 36 - - - - - - true - 15.85586cm - 0.13016cm - 4.24605cm - 20.06179cm - 17 - - = (Parameters!AplicaPagare.Value="0" ORelse Parameters!AplicaPagare.Value="") - - - - - - - - - - 2.12527cm - - - 2.02474cm - - - 10.17786cm - - - 2.52862cm - - - 3.15415cm - - - - - 0.52063cm - - - - - true - - - - - Cantidad - - - - - - - Textbox34 - - - #e2ab67 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - Unidad - - - - - - - Textbox53 - - - #e2ab67 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - Descripción - - - - - - - Textbox79 - - - #e2ab67 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - P. Unitario - - - - - - - Textbox84 - - - #e2ab67 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - Importe - - - - - - - - - - - - - - - #e2ab67 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.4148cm - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!UM.Value - - - - - - - UM1 - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PS.Value &Fields!Obs.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PU.Value - - - - - - - PU1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Cantidad.Value*Fields!PU.Value - - - - - - - Textbox88 - - - - - - - - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - 0.08406cm - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - After - - - - - - Before - - - - DsOC - 4.5569cm - 0.11468cm - 1.01949cm - 20.01064cm - 18 - - - - - - true - - - - - RFC: - - - - =Parameters!ClienteRFC.Value - - - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - true - - - - - Sub Total 1 - - - - - - - Textbox19 - 5.64799in - 0.23622in - 1.00941in - - - #e2ab67 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Descuento - - - - - - - Textbox19 - 0.23066in - 5.64799in - 0.23622in - 1.00941in - 1 - - - #e2ab67 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Amort. Ant - - - - - - - Textbox19 - 0.47383in - 5.64799in - 0.23622in - 1.00941in - 2 - - - #e2ab67 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Sub Total 2 - - - - - - - Textbox19 - 0.70771in - 5.64799in - 0.23622in - 1.00941in - 3 - - - - White - - 1pt - - #e2ab67 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - IVA (16%) - - - - - - - Textbox19 - 0.93607in - 5.64799in - 0.23622in - 1.00941in - 4 - - - - White - - 1pt - - #e2ab67 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Total - - - - - - - Textbox19 - 1.16732in - 5.64799in - 0.23622in - 1.00941in - 5 - - - - White - - 1pt - - #e2ab67 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =IIF(Parameters!SubTotal.Value= 0 ,"-",Parameters!SubTotal.Value) - - - - - - - Textbox42 - 6.6574in - 0.23622in - 1.24179in - 6 - - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - true - - - - - =IIF(Parameters!Amortizacion.Value = 0,"-",Parameters!Amortizacion.Value) - - - - - - - Textbox42 - 0.47383in - 6.6574in - 0.23622in - 1.24179in - 7 - - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - true - - - - - =iif(Parameters!Descuento.Value= 0, "-",Parameters!Descuento.Value) - - - - - - - Textbox42 - 0.23066in - 6.6574in - 0.23622in - 1.24179in - 8 - - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - true - - - - - =IIF(Parameters!SubTotal2.Value = 0,"-",Parameters!SubTotal2.Value) - - - - - - - Textbox42 - 0.70771in - 6.6574in - 0.23622in - 1.24179in - 9 - - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - true - - - - - =iif(Parameters!IVA.Value = 0,"-",Parameters!IVA.Value) - - - - - - - Textbox42 - 0.93607in - 6.6574in - 0.23622in - 1.24179in - 10 - - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - true - - - - - =Parameters!Total.Value - - - - - - - Textbox42 - 1.16732in - 6.6574in - 0.23622in - 1.24179in - 11 - - - 2pt - 2pt - 2pt - 2pt - - - - Embedded - Logo2 - FitProportional - 3.67083cm - 14.2824cm - 1.14078cm - 5.6653cm - 12 - - - - - - - - - 3.32301cm - - - 10.98938cm - - - - - 0.6cm - - - - - true - true - - - - - =Parameters!Observaciones.Value - - - - - - - Textbox128 - - - - - - - - - - - - - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - 0.6cm - - - - - true - true - - - - - Importe con letra: - - - - - - - Textbox126 - - - - - 1pt - - - - 1pt - - - - 1pt - - - - 1pt - - #e2ab67 - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - ="SON: " & Microsoft.VisualBasic.Strings.UCase(Parameters!ImporteLetra.Value) - - - - - - - Textbox127 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - Forma de pago: - - - - - - - Textbox130 - - - - - 1pt - - - - 1pt - - - - 1pt - - - - 1pt - - #e2ab67 - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!FormaPago.Value - - - - - - - Textbox131 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 1.8cm - - - - - true - true - - - - - Sello digital del CFDI: - - - - - - - Textbox132 - - - - - 1pt - - - - 1pt - - - - 1pt - - - - 1pt - - #e2ab67 - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!SelloCFDI.Value - - - - - - - Textbox133 - - - Top - 2pt - 2pt - 2pt - 2pt - - - - - - - - 1.2cm - - - - - true - true - - - - - Sello del SAT: - - - - - - - Textbox134 - - - - - 1pt - - - - 1pt - - - - 1pt - - - - 1pt - - #e2ab67 - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!SelloSAT.Value - - - - - - - Textbox135 - - - Top - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - Cadena original del complemento de certificación digital del SAT: - - - - - - - Textbox136 - - - - - - - - - - - - - - 1pt - - #e2ab67 - Middle - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - - - - - - - - - - - - - - - - - - DsOC - 5.4cm - 14.31239cm - 13 - - - - - - true - 5.65289cm - 0.09908cm - 5.43688cm - 20.06395cm - 20 - - - - - - - - External - =Parameters!QR.Value - FitProportional - 0.03465in - 1.07261in - 1.49755in - - - - - - true - true - - - - - Folio Fiscal: - - - - - - - Textbox54 - 0.0125in - 1.60386in - 0.18056in - 4.03672in - 1 - - - - - - - White - - - - - - - - #e2ab67 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - No. Serie del Certificado del SAT: - - - - - - - Textbox54 - 0.20695in - 1.60386in - 0.18056in - 4.03672in - 2 - - - #e2ab67 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha y Hora de certificación: - - - - - - - Textbox54 - 0.4055in - 1.60386in - 0.19444in - 4.03672in - 3 - - - #e2ab67 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Certificado del Contribuyente: - - - - - - - Textbox54 - 0.61111in - 1.60386in - 0.19445in - 4.03672in - 4 - - - #e2ab67 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FolioFiscal.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!SerieCertificadoSAT.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FechaCertificacion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!CertificadoContribuyente.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Regímen: Regímen Fiscal General de Ley Personas Morales; Condiciones de pago: - - - - =IIF(Parameters!CondicionPago.Value.ToString="","No Identificado",Parameters!CondicionPago.Value) - - - - ; Método de Pago: - - - - =IIF(Parameters!MetodoPago.Value.ToString="","No Identificado",Parameters!MetodoPago.Value) - - - - ; Num. Cta Pago: - - - - =IIF(Parameters!NumCta.Value="0" Orelse Parameters!NumCta.Value="","No Identificado",Parameters!NumCta.Value) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Éste documento es una representacion impresa de un CFDi - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - 12.53522cm - 0.13347cm - 3.24007cm - 20.05848cm - 21 - - - - - - 20.27124cm - - - - - - - Textbox3 - 0.17639cm - 16.23299cm - 0.6cm - 3.95896cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - - - - - =Today - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0.5cm - 1cm - 0.5cm - 1.27cm - + + + + + + Textbox3 + 0.90692in + 5.662in + 0.5cm + 2.24597in + + + #e2ab67 + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Fecha y hora de emisión + + + + + + + + + + + + + + + + Textbox3 + 0.46414in + 5.662in + 0.5cm + 2.24597in + 1 + + + #e2ab67 + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =IIF(Parameters!Serie.Value.ToString="",Parameters!Folio.Value,Parameters!Serie.Value & "-" &Parameters!Folio.Value) + + + + + + + Textbox3 + 0.22455in + 5.662in + 0.60856cm + 2.24597in + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!TipoDocumento.Value + + + + + + + Textbox3 + 0.0412cm + 5.662in + 0.52916cm + 2.24597in + 3 + + + #e2ab67 + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Innovación y Desarrollo en Telemetría SA de CV + + + + + + + + + R.F.C IDT130809KA5 + + + + + + + + + raul@argustecnologias.com + + + + + + + Textbox4 + 1.93416in + 0.66099in + 3.62386in + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!CadenaOriginal.Value + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + Logo1 + FitProportional + 0.07204cm + 0.06139cm + 2.88998cm + 4.56434cm + 6 + + + + + + true + + + + + =Parameters!Fecha.Value + + + + + + + Textbox3 + 0.66099in + 5.662in + 0.25114in + 2.24597in + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!Tipo.Value & Parameters!Ref.Value + + + + + + + Textbox3 + 1.10364in + 5.662in + 0.25635in + 2.24597in + 8 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Domicilio Fiscal + + + + + + + + + Poder Legislativo, #75, Col Misión del Sol, + + + + + + + + + C.P 83100 Hermosillo, Sonora, México, + + + + + + + + + Tel.: (662)-210-1899 + + + + + + + Textbox10 + 0.51102in + 1.80916in + 0.65513in + 1.92119in + 9 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Lugar de Expedición + + + + + + + + + =Parameters!DomicilioSucursal.Value + + + + + + + Textbox10 + 0.51102in + 3.77202in + 0.65513in + 1.88998in + 10 + + + Top + + + + true + true + + + + + Nombre + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!ClienteNombre.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Dirección + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!ClienteDireccion.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Ciudad + + + + + + + + 1.25pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!ClienteLugar.Value + + + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + true + true + + + + + P A G A R E con Folio + + + + =Parameters!Serie.Value + + + + - + + + + =Parameters!Folio.Value + + + + Por éste pagare prometo (emos) pagar incondicionalmente a la orden de Innovación y Desarrollo en Telemetría SA de CV, a su vencimiento el + + + + =Parameters!Vencimiento.Value + + + + , en Hermosillo, Sonora o en el domicilio señalado a elección del acreedor o tenedor la cantidad de $ + + + + =Parameters!Total.Value + + + + SON: ( + + + + =Microsoft.VisualBasic.Strings.UCase(Parameters!ImporteLetra.Value) + + + + ). Valor recibido a mi (nuestra) entera satisfacción. la falta de pago de éste documento a su vencimiento dará derecho a Innovación y Desarrollo en Telemetría SA de CV o tenedor, desde el día siguiente a cobrar el 10% mensual de interes moratorios hasta su total liquidación y los gastos judiciales que se ocasionen. Lugar y Fecha de Suscripción: Hermosillo, Sonora a + + + + =CDATE(Parameters!Fecha.Value).ToString("dd/MM/yyyy") + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Nombre: + + + + =Parameters!ClienteNombre.Value + + + + + + + =Parameters!ClienteDireccion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Acepto de conformidad + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 0.29357cm + 0.09963cm + 0cm + 0.57653cm + 3 + + + + + + 0.29357cm + 0.73559cm + 0cm + 0.57653cm + 4 + + + + + + 0.29357cm + 1.35545cm + 0cm + 0.57653cm + 5 + + + + + + 0.29357cm + 1.80439cm + 0cm + 0.57653cm + 6 + + + + + + 0.29357cm + 2.37686cm + 0cm + 0.57653cm + 7 + + + + + + 0.29357cm + 3.01789cm + 0cm + 0.57653cm + 8 + + + + + + 0.29357cm + 3.65558cm + 0cm + 0.57653cm + 9 + + + + + + 0.29357cm + 4.29154cm + 0cm + 0.57653cm + 10 + + + + + + 0.29357cm + 4.92728cm + 0cm + 0.57653cm + 11 + + + + + + 0.29357cm + 5.25981cm + 0cm + 0.57653cm + 12 + + + + + + 0.29357cm + 5.89576cm + 0cm + 0.57653cm + 13 + + + + + + 0.29357cm + 6.50505cm + 0cm + 0.57653cm + 14 + + + + + + 0.29357cm + 7.18531cm + 0cm + 0.57653cm + 15 + + + + + + 0.29357cm + 7.82127cm + 0cm + 0.57653cm + 16 + + + + + + 0.29357cm + 8.48346cm + 0cm + 0.57653cm + 17 + + + + + + 0.29357cm + 8.81599cm + 0cm + 0.57653cm + 18 + + + + + + 0.29357cm + 9.45195cm + 0cm + 0.57653cm + 19 + + + + + + 0.29357cm + 10.11415cm + 0cm + 0.57653cm + 20 + + + + + + 0.29357cm + 14.08927cm + 0cm + 0.57653cm + 21 + + + + + + 0.29357cm + 14.72523cm + 0cm + 0.57653cm + 22 + + + + + + 0.29357cm + 15.33451cm + 0cm + 0.57653cm + 23 + + + + + + 0.29357cm + 15.64058cm + 0cm + 0.57653cm + 24 + + + + + + 0.29357cm + 16.27654cm + 0cm + 0.57653cm + 25 + + + + + + 0.29357cm + 16.91228cm + 0cm + 0.57653cm + 26 + + + + + + 0.29357cm + 10.76463cm + 0cm + 0.57653cm + 27 + + + + + + 0.29357cm + 11.42705cm + 0cm + 0.57653cm + 28 + + + + + + 0.29357cm + 12.06279cm + 0cm + 0.57653cm + 29 + + + + + + 0.29357cm + 12.36886cm + 0cm + 0.57653cm + 30 + + + + + + 0.29357cm + 12.89898cm + 0cm + 0.57653cm + 31 + + + + + + 0.29357cm + 13.53472cm + 0cm + 0.57653cm + 32 + + + + + + 0.29357cm + 18.40663cm + 0cm + 0.57653cm + 33 + + + + + + 0.29357cm + 19.04259cm + 0cm + 0.57653cm + 34 + + + + + + 0.29357cm + 17.74353cm + 0cm + 0.57653cm + 35 + + + + + + 3.29402cm + 15.33451cm + 0cm + 4.58211cm + 36 + + + + + + true + 15.85586cm + 0.13016cm + 4.24605cm + 20.06179cm + 17 + + = (Parameters!AplicaPagare.Value="0" ORelse Parameters!AplicaPagare.Value="") + + + + + + + + + + 2.12527cm + + + 2.02474cm + + + 10.17786cm + + + 2.52862cm + + + 3.15415cm + + + + + 0.52063cm + + + + + true + + + + + Cantidad + + + + + + + Textbox34 + + + #e2ab67 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Unidad + + + + + + + Textbox53 + + + #e2ab67 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Descripción + + + + + + + Textbox79 + + + #e2ab67 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + P. Unitario + + + + + + + Textbox84 + + + #e2ab67 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Importe + + + + + + + + + + + + + + + #e2ab67 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.4148cm + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!UM.Value + + + + + + + UM1 + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PS.Value &Fields!Obs.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PU.Value + + + + + + + PU1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cantidad.Value*Fields!PU.Value + + + + + + + Textbox88 + + + + + + + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + 0.08406cm + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + After + + + + + + Before + + + + DsOC + 4.5569cm + 0.11468cm + 1.01949cm + 20.01064cm + 18 + + + + + + true + + + + + RFC: + + + + =Parameters!ClienteRFC.Value + + + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + true + + + + + Sub Total 1 + + + + + + + Textbox19 + 5.64799in + 0.23622in + 1.00941in + + + #e2ab67 + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Descuento + + + + + + + Textbox19 + 0.23066in + 5.64799in + 0.23622in + 1.00941in + 1 + + + #e2ab67 + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Amort. Ant + + + + + + + Textbox19 + 0.47383in + 5.64799in + 0.23622in + 1.00941in + 2 + + + #e2ab67 + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Sub Total 2 + + + + + + + Textbox19 + 0.70771in + 5.64799in + 0.23622in + 1.00941in + 3 + + + + White + + 1pt + + #e2ab67 + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + IVA (16%) + + + + + + + Textbox19 + 0.93607in + 5.64799in + 0.23622in + 1.00941in + 4 + + + + White + + 1pt + + #e2ab67 + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Total + + + + + + + Textbox19 + 1.16732in + 5.64799in + 0.23622in + 1.00941in + 5 + + + + White + + 1pt + + #e2ab67 + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =IIF(Parameters!SubTotal.Value= 0 ,"-",Parameters!SubTotal.Value) + + + + + + + Textbox42 + 6.6574in + 0.23622in + 1.24179in + 6 + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + true + + + + + =IIF(Parameters!Amortizacion.Value = 0,"-",Parameters!Amortizacion.Value) + + + + + + + Textbox42 + 0.47383in + 6.6574in + 0.23622in + 1.24179in + 7 + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + true + + + + + =iif(Parameters!Descuento.Value= 0, "-",Parameters!Descuento.Value) + + + + + + + Textbox42 + 0.23066in + 6.6574in + 0.23622in + 1.24179in + 8 + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + true + + + + + =IIF(Parameters!SubTotal2.Value = 0,"-",Parameters!SubTotal2.Value) + + + + + + + Textbox42 + 0.70771in + 6.6574in + 0.23622in + 1.24179in + 9 + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + true + + + + + =iif(Parameters!IVA.Value = 0,"-",Parameters!IVA.Value) + + + + + + + Textbox42 + 0.93607in + 6.6574in + 0.23622in + 1.24179in + 10 + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + true + + + + + =Parameters!Total.Value + + + + + + + Textbox42 + 1.16732in + 6.6574in + 0.23622in + 1.24179in + 11 + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + Logo1 + FitProportional + 3.67083cm + 14.2824cm + 1.14078cm + 5.6653cm + 12 + + + + + + + + + 3.32301cm + + + 10.98938cm + + + + + 0.6cm + + + + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + + Textbox128 + + + + + + + + + + + + + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.6cm + + + + + true + true + + + + + Importe con letra: + + + + + + + Textbox126 + + + + + 1pt + + + + 1pt + + + + 1pt + + + + 1pt + + #e2ab67 + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + ="SON: " & Microsoft.VisualBasic.Strings.UCase(Parameters!ImporteLetra.Value) + + + + + + + Textbox127 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + Forma de pago: + + + + + + + Textbox130 + + + + + 1pt + + + + 1pt + + + + 1pt + + + + 1pt + + #e2ab67 + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!FormaPago.Value + + + + + + + Textbox131 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 1.8cm + + + + + true + true + + + + + Sello digital del CFDI: + + + + + + + Textbox132 + + + + + 1pt + + + + 1pt + + + + 1pt + + + + 1pt + + #e2ab67 + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!SelloCFDI.Value + + + + + + + Textbox133 + + + Top + 2pt + 2pt + 2pt + 2pt + + + + + + + + 1.2cm + + + + + true + true + + + + + Sello del SAT: + + + + + + + Textbox134 + + + + + 1pt + + + + 1pt + + + + 1pt + + + + 1pt + + #e2ab67 + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!SelloSAT.Value + + + + + + + Textbox135 + + + Top + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + Cadena original del complemento de certificación digital del SAT: + + + + + + + Textbox136 + + + + + + + + + + + + + + 1pt + + #e2ab67 + Middle + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + DsOC + 5.4cm + 14.31239cm + 13 + + + + + + true + 5.65289cm + 0.09908cm + 5.43688cm + 20.06395cm + 20 + + + + + + + + External + =Parameters!QR.Value + FitProportional + 0.03465in + 1.07261in + 1.49755in + + + + + + true + true + + + + + Folio Fiscal: + + + + + + + Textbox54 + 0.0125in + 1.60386in + 0.18056in + 4.03672in + 1 + + + + + + + White + + + + + + + + #e2ab67 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + No. Serie del Certificado del SAT: + + + + + + + Textbox54 + 0.20695in + 1.60386in + 0.18056in + 4.03672in + 2 + + + #e2ab67 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha y Hora de certificación: + + + + + + + Textbox54 + 0.4055in + 1.60386in + 0.19444in + 4.03672in + 3 + + + #e2ab67 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Certificado del Contribuyente: + + + + + + + Textbox54 + 0.61111in + 1.60386in + 0.19445in + 4.03672in + 4 + + + #e2ab67 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FolioFiscal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!SerieCertificadoSAT.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaCertificacion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!CertificadoContribuyente.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Regímen: Regímen Fiscal General de Ley Personas Morales; Condiciones de pago: + + + + =IIF(Parameters!CondicionPago.Value.ToString="","No Identificado",Parameters!CondicionPago.Value) + + + + ; Método de Pago: + + + + =IIF(Parameters!MetodoPago.Value.ToString="","No Identificado",Parameters!MetodoPago.Value) + + + + ; Num. Cta Pago: + + + + =IIF(Parameters!NumCta.Value="0" Orelse Parameters!NumCta.Value="","No Identificado",Parameters!NumCta.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Éste documento es una representacion impresa de un CFDi + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + 12.53522cm + 0.13347cm + 3.24007cm + 20.05848cm + 21 + + + + + + 20.27124cm + + + + + + + Textbox3 + 0.17639cm + 16.23299cm + 0.6cm + 3.95896cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + + + =Today + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 1cm + 0.5cm + 1.27cm + - - - - - - Textbox3 - 0.90692in - 5.662in - 0.5cm - 2.24597in - - - #a52288 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Fecha y hora de emisión - - - - - - - - - - - - - - - - Textbox3 - 0.46414in - 5.662in - 0.5cm - 2.24597in - 1 - - - #a52288 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =IIF(Parameters!Serie.Value.ToString="",Parameters!Folio.Value,Parameters!Serie.Value & "-" &Parameters!Folio.Value) - - - - - - - Textbox3 - 0.22455in - 5.662in - 0.60856cm - 2.24597in - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!TipoDocumento.Value - - - - - - - Textbox3 - 0.0412cm - 5.662in - 0.5cm - 2.24597in - 3 - - - #a52288 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Rose's Rain flores, novias y más - - - - - - - - - Dora Estela Gutierrez Luzanilla, R.F.C GULD790511Q38 -| dora.gutierrez@adsistemas.mx | - - - - - - - Textbox4 - 1.93416in - 0.53361in - 3.62386in - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - SON: ( - - - - =Microsoft.VisualBasic.Strings.UCase(Parameters!ImporteLetra.Value) - - - - ) - - - - - - - ImporteLetra - 2.45237in - 1.40437in - 0.2053in - 4.28167in - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!SelloCFDI.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!SelloSAT.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!CadenaOriginal.Value - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - External - =Parameters!QR.Value - FitProportional - 4.58097in - 0.04026in - 0.95455in - 1.49755in - 9 - - - - - - true - - - - - =Parameters!Fecha.Value - - - - - - - Textbox3 - 0.66099in - 5.662in - 0.25114in - 2.24597in - 10 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!Tipo.Value & Parameters!Ref.Value - - - - - - - Textbox3 - 1.10364in - 5.662in - 0.25635in - 2.24597in - 11 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Domicilio Fiscal - - - - - - - - - Jalisco, 6, Col.:Centro, -C.P: 83000, Hermosillo, Sonora, México. -Tel.: (662) 360-1366 - - - - - - - Textbox10 - 0.53361in - 1.93416in - 0.63254in - 1.79619in - 12 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Lugar de Expedición - - - - - - - - - =Parameters!DomicilioSucursal.Value - - - - - - - Textbox10 - 0.53361in - 3.77202in - 0.63254in - 1.786in - 13 - - - Top - - - - true - true - - - - - Nombre - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!ClienteNombre.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Dirección - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!ClienteDireccion.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Ciudad - - - - - - - #4f81bd - - 1.25pt - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!ClienteLugar.Value - - - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Importe con letra: - - - - - - - Textbox19 - 2.45237in - 0.04458in - 0.2053in - 1.35979in - 20 - - - #a52288 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Forma de pago: - - - - - - - Textbox19 - 2.65772in - 0.04458in - 0.22222in - 1.35979in - 21 - - - #a52288 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - - - - - - - - - - - - - - - - - - - Sello digital del CFDI: - - - - - - - Textbox19 - 2.86952in - 0.04458in - 0.47749in - 1.35979in - 22 - - - #a52288 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - - - - - - - - - - Sello del SAT: - - - - - - - Textbox19 - 3.33868in - 0.04515in - 0.47749in - 1.36417in - 23 - - - #a52288 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Cadena original del complemento de certificación digital del SAT: - - - - - - - Textbox19 - 3.80598in - 0.02417in - 0.28604in - 5.66187in - 24 - - - #a52288 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!FormaPago.Value - - - - - - - ImporteLetra - 2.65772in - 1.40437in - 0.22222in - 4.28167in - 25 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Folio Fiscal: - - - - - - - Textbox54 - 4.55882in - 1.64412in - 0.18056in - 4.03672in - 26 - - - - - - - - - - - - #a52288 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - No. Serie del Certificado del SAT: - - - - - - - Textbox54 - 4.75327in - 1.64412in - 0.18056in - 4.03672in - 27 - - - #a52288 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha y Hora de certificación: - - - - - - - Textbox54 - 4.95182in - 1.64412in - 0.19444in - 4.03672in - 28 - - - #a52288 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Certificado del Contribuyente: - - - - - - - Textbox54 - 5.15743in - 1.64412in - 0.19445in - 4.03672in - 29 - - - #a52288 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FolioFiscal.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!SerieCertificadoSAT.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FechaCertificacion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!CertificadoContribuyente.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Regímen: Regímen General de Ley Personas Morales; Condiciones de pago: - - - - =IIF(Parameters!CondicionPago.Value.ToString="","No Identificado",Parameters!CondicionPago.Value) - - - - ; Método de Pago: - - - - =IIF(Parameters!MetodoPago.Value.ToString="","No Identificado",Parameters!MetodoPago.Value) - - - - ; Num. Cta Pago: - - - - =IIF(Parameters!NumCta.Value="0" Orelse Parameters!NumCta.Value="","No Identificado",Parameters!NumCta.Value) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Éste documento es una representacion impresa de un CFDi - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - true - true - - - - - P A G A R E con Folio - - - - =Parameters!Serie.Value - - - - - - - - - =Parameters!Folio.Value - - - - Por éste pagare prometo (emos) pagar incondicionalmente a la orden de Dora Estela Gutierrez Luzanilla, a su vencimiento el - - - - =Parameters!Vencimiento.Value - - - - , en Hermosillo, Sonora o en el domicilio señalado a elección del acreedor o tenedor la cantidad de $ - - - - =Parameters!Total.Value - - - - SON: ( - - - - =Microsoft.VisualBasic.Strings.UCase(Parameters!ImporteLetra.Value) - - - - ). Valor recibido a mi (nuestra) entera satisfacción. la falta de pago de éste documento a su vencimiento dará derecho a Dora Estela Gutierrez Luzanilla o tenedor, desde el día siguiente a cobrar el 10% mensual de interes moratorios hasta su total liquidación y los gastos judiciales que se ocasionen. Lugar y Fecha de Suscripción: Hermosillo, Sonora a - - - - =CDATE(Parameters!Fecha.Value).ToString("dd/MM/yyyy") - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Nombre: - - - - =Parameters!ClienteNombre.Value - - - - - - - =Parameters!ClienteDireccion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - - - - - 1pt - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Acepto de conformidad - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 0.29357cm - 0.09963cm - 0cm - 0.57653cm - 4 - - - - - - 0.29357cm - 0.73559cm - 0cm - 0.57653cm - 5 - - - - - - 0.29357cm - 1.35545cm - 0cm - 0.57653cm - 6 - - - - - - 0.29357cm - 1.80439cm - 0cm - 0.57653cm - 7 - - - - - - 0.29357cm - 2.37686cm - 0cm - 0.57653cm - 8 - - - - - - 0.29357cm - 3.01789cm - 0cm - 0.57653cm - 9 - - - - - - 0.29357cm - 3.65558cm - 0cm - 0.57653cm - 10 - - - - - - 0.29357cm - 4.29154cm - 0cm - 0.57653cm - 11 - - - - - - 0.29357cm - 4.92728cm - 0cm - 0.57653cm - 12 - - - - - - 0.29357cm - 5.25981cm - 0cm - 0.57653cm - 13 - - - - - - 0.29357cm - 5.89576cm - 0cm - 0.57653cm - 14 - - - - - - 0.29357cm - 6.50505cm - 0cm - 0.57653cm - 15 - - - - - - 0.29357cm - 7.18531cm - 0cm - 0.57653cm - 16 - - - - - - 0.29357cm - 7.82127cm - 0cm - 0.57653cm - 17 - - - - - - 0.29357cm - 8.48346cm - 0cm - 0.57653cm - 18 - - - - - - 0.29357cm - 8.81599cm - 0cm - 0.57653cm - 19 - - - - - - 0.29357cm - 9.45195cm - 0cm - 0.57653cm - 20 - - - - - - 0.29357cm - 10.11415cm - 0cm - 0.57653cm - 21 - - - - - - 0.29357cm - 14.08927cm - 0cm - 0.57653cm - 22 - - - - - - 0.29357cm - 14.72523cm - 0cm - 0.57653cm - 23 - - - - - - 0.29357cm - 15.33451cm - 0cm - 0.57653cm - 24 - - - - - - 0.29357cm - 15.64058cm - 0cm - 0.57653cm - 25 - - - - - - 0.29357cm - 16.27654cm - 0cm - 0.57653cm - 26 - - - - - - 0.29357cm - 16.91228cm - 0cm - 0.57653cm - 27 - - - - - - 0.29357cm - 10.76463cm - 0cm - 0.57653cm - 28 - - - - - - 0.29357cm - 11.42705cm - 0cm - 0.57653cm - 29 - - - - - - 0.29357cm - 12.06279cm - 0cm - 0.57653cm - 30 - - - - - - 0.29357cm - 12.36886cm - 0cm - 0.57653cm - 31 - - - - - - 0.29357cm - 12.89898cm - 0cm - 0.57653cm - 32 - - - - - - 0.29357cm - 13.53472cm - 0cm - 0.57653cm - 33 - - - - - - 0.29357cm - 18.40663cm - 0cm - 0.57653cm - 34 - - - - - - 0.29357cm - 19.04259cm - 0cm - 0.57653cm - 35 - - - - - - 0.29357cm - 17.74353cm - 0cm - 0.57653cm - 36 - - - - - - true - 14.39536cm - 0.13016cm - 6.82655cm - 20.06179cm - 36 - - = (Parameters!AplicaPagare.Value="0" ORelse Parameters!AplicaPagare.Value="") - - - - - - - true - - - - - =Parameters!Observaciones.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 2.12527cm - - - 2.02474cm - - - 10.17786cm - - - 2.52862cm - - - 3.15415cm - - - - - 0.52063cm - - - - - true - - - - - Cantidad - - - - - - - Textbox34 - - - #a52288 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - Unidad - - - - - - - Textbox53 - - - #a52288 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - Descripción - - - - - - - Textbox79 - - - #a52288 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - P. Unitario - - - - - - - Textbox84 - - - #a52288 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - Importe - - - - - - - - - - - - - - - #a52288 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.4148cm - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - - - - - - - #4f81bd - - - #4f81bd - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!UM.Value - - - - - - - UM1 - - - - - - - - - - - - - #4f81bd - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PS.Value &Fields!Obs.Value - - - - - - - - - - - - - - - - #4f81bd - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PU.Value - - - - - - - PU1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Cantidad.Value*Fields!PU.Value - - - - - - - Textbox88 - - - - - - - - - - #4f81bd - - - #4f81bd - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - 0.08406cm - - - - - true - true - - - - - - - - - #4f81bd - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - #4f81bd - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - #4f81bd - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - #4f81bd - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - #4f81bd - - - - #4f81bd - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - After - - - - - - Before - - - - DsOC - 4.5569cm - 0.11468cm - 1.01949cm - 20.01064cm - 38 - - - - - - true - - - - - RFC: - - - - =Parameters!ClienteRFC.Value - - - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 2.52862cm - - - 3.15415cm - - - - - 0.6cm - - - - - true - true - - - - - Sub Total 1 - - - - - - - Textbox5 - - - #a52288 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Microsoft.VisualBasic.Interaction.IIF(Parameters!SubTotal.Value = 0, "-", Parameters!SubTotal.Value) - - - - - - - Textbox8 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - Descuento - - - - - - - Textbox21 - - - #a52288 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Microsoft.VisualBasic.Interaction.iif(Parameters!Descuento.Value = 0, "-", Parameters!Descuento.Value) - - - - - - - Textbox23 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - Amort. Ant - - - - - - - Textbox15 - - - #a52288 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Microsoft.VisualBasic.Interaction.IIF(Parameters!Amortizacion.Value = 0, "-", Parameters!Amortizacion.Value) - - - - - - - Textbox17 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - Sub Total 2 - - - - - - - Textbox24 - - - #a52288 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Microsoft.VisualBasic.Interaction.IIF(Parameters!SubTotal2.Value = 0, "-", Parameters!SubTotal2.Value) - - - - - - - Textbox26 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - IVA (16%) - - - - - - - Textbox33 - - - #a52288 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Microsoft.VisualBasic.Interaction.iif(Parameters!IVA.Value = 0, "-", Parameters!IVA.Value) - - - - - - - Textbox35 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - Ret. IVA - - - - - - - Textbox36 - - - #a52288 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Microsoft.VisualBasic.Interaction.iif(Microsoft.VisualBasic.Information.isnothing(Parameters!Otros.Value) OrElse Parameters!Otros.Value = 0, "-", Parameters!Otros.Value) - - - - - - - Textbox37 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - Ret. ISR - - - - - - - Textbox1 - - - #a52288 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Microsoft.VisualBasic.Interaction.iif(Microsoft.VisualBasic.Information.isnothing(Parameters!Otros.Value) OrElse Parameters!Otros.Value = 0, "-", Parameters!Otros.Value) - - - - - - - Textbox2 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - Total - - - - - - - Textbox38 - - - #a52288 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!Total.Value - - - - - - - Textbox39 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - - - - - DsOC - 5.59373cm - 14.46459cm - 4.8cm - 5.68277cm - 40 - - - - - - Embedded - loga - FitProportional - 0.09595cm - 0.22979cm - 2.70762cm - 4.0349cm - 41 - - - - - - 21.22191cm - - - - - - - - =Today - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0.5cm - 1cm - 0.5cm - 1.27cm - + + + + + + Textbox3 + 0.90692in + 5.662in + 0.5cm + 2.24597in + + + #a52288 + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Fecha y hora de emisión + + + + + + + + + + + + + + + + Textbox3 + 0.46414in + 5.662in + 0.5cm + 2.24597in + 1 + + + #a52288 + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =IIF(Parameters!Serie.Value.ToString="",Parameters!Folio.Value,Parameters!Serie.Value & "-" &Parameters!Folio.Value) + + + + + + + Textbox3 + 0.22455in + 5.662in + 0.60856cm + 2.24597in + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!TipoDocumento.Value + + + + + + + Textbox3 + 0.0412cm + 5.662in + 0.5cm + 2.24597in + 3 + + + #a52288 + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Rose's Rain flores, novias y más + + + + + + + + + Dora Estela Gutierrez Luzanilla, R.F.C GULD790511Q38 +| dora.gutierrez@adsistemas.mx | + + + + + + + Textbox4 + 1.93416in + 0.53361in + 3.62386in + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + SON: ( + + + + =Microsoft.VisualBasic.Strings.UCase(Parameters!ImporteLetra.Value) + + + + ) + + + + + + + ImporteLetra + 2.45237in + 1.40437in + 0.2053in + 4.28167in + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!SelloCFDI.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!SelloSAT.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!CadenaOriginal.Value + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!QR.Value + FitProportional + 4.58097in + 0.04026in + 0.95455in + 1.49755in + 9 + + + + + + true + + + + + =Parameters!Fecha.Value + + + + + + + Textbox3 + 0.66099in + 5.662in + 0.25114in + 2.24597in + 10 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!Tipo.Value & Parameters!Ref.Value + + + + + + + Textbox3 + 1.10364in + 5.662in + 0.25635in + 2.24597in + 11 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Domicilio Fiscal + + + + + + + + + Jalisco, 6, Col.:Centro, +C.P: 83000, Hermosillo, Sonora, México. +Tel.: (662) 360-1366 + + + + + + + Textbox10 + 0.53361in + 1.93416in + 0.63254in + 1.79619in + 12 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Lugar de Expedición + + + + + + + + + =Parameters!DomicilioSucursal.Value + + + + + + + Textbox10 + 0.53361in + 3.77202in + 0.63254in + 1.786in + 13 + + + Top + + + + true + true + + + + + Nombre + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!ClienteNombre.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Dirección + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!ClienteDireccion.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Ciudad + + + + + + + #4f81bd + + 1.25pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!ClienteLugar.Value + + + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Importe con letra: + + + + + + + Textbox19 + 2.45237in + 0.04458in + 0.2053in + 1.35979in + 20 + + + #a52288 + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Forma de pago: + + + + + + + Textbox19 + 2.65772in + 0.04458in + 0.22222in + 1.35979in + 21 + + + #a52288 + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + + + + + + + + + + + + + + + + + + + Sello digital del CFDI: + + + + + + + Textbox19 + 2.86952in + 0.04458in + 0.47749in + 1.35979in + 22 + + + #a52288 + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + + + + + + + + + + Sello del SAT: + + + + + + + Textbox19 + 3.33868in + 0.04515in + 0.47749in + 1.36417in + 23 + + + #a52288 + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Cadena original del complemento de certificación digital del SAT: + + + + + + + Textbox19 + 3.80598in + 0.02417in + 0.28604in + 5.66187in + 24 + + + #a52288 + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!FormaPago.Value + + + + + + + ImporteLetra + 2.65772in + 1.40437in + 0.22222in + 4.28167in + 25 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Folio Fiscal: + + + + + + + Textbox54 + 4.55882in + 1.64412in + 0.18056in + 4.03672in + 26 + + + + + + + + + + + + #a52288 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + No. Serie del Certificado del SAT: + + + + + + + Textbox54 + 4.75327in + 1.64412in + 0.18056in + 4.03672in + 27 + + + #a52288 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha y Hora de certificación: + + + + + + + Textbox54 + 4.95182in + 1.64412in + 0.19444in + 4.03672in + 28 + + + #a52288 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Certificado del Contribuyente: + + + + + + + Textbox54 + 5.15743in + 1.64412in + 0.19445in + 4.03672in + 29 + + + #a52288 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FolioFiscal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!SerieCertificadoSAT.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaCertificacion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!CertificadoContribuyente.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Regímen: Regímen General de Ley Personas Morales; Condiciones de pago: + + + + =IIF(Parameters!CondicionPago.Value.ToString="","No Identificado",Parameters!CondicionPago.Value) + + + + ; Método de Pago: + + + + =IIF(Parameters!MetodoPago.Value.ToString="","No Identificado",Parameters!MetodoPago.Value) + + + + ; Num. Cta Pago: + + + + =IIF(Parameters!NumCta.Value="0" Orelse Parameters!NumCta.Value="","No Identificado",Parameters!NumCta.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Éste documento es una representacion impresa de un CFDi + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + true + true + + + + + P A G A R E con Folio + + + + =Parameters!Serie.Value + + + + - + + + + =Parameters!Folio.Value + + + + Por éste pagare prometo (emos) pagar incondicionalmente a la orden de Dora Estela Gutierrez Luzanilla, a su vencimiento el + + + + =Parameters!Vencimiento.Value + + + + , en Hermosillo, Sonora o en el domicilio señalado a elección del acreedor o tenedor la cantidad de $ + + + + =Parameters!Total.Value + + + + SON: ( + + + + =Microsoft.VisualBasic.Strings.UCase(Parameters!ImporteLetra.Value) + + + + ). Valor recibido a mi (nuestra) entera satisfacción. la falta de pago de éste documento a su vencimiento dará derecho a Dora Estela Gutierrez Luzanilla o tenedor, desde el día siguiente a cobrar el 10% mensual de interes moratorios hasta su total liquidación y los gastos judiciales que se ocasionen. Lugar y Fecha de Suscripción: Hermosillo, Sonora a + + + + =CDATE(Parameters!Fecha.Value).ToString("dd/MM/yyyy") + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Nombre: + + + + =Parameters!ClienteNombre.Value + + + + + + + =Parameters!ClienteDireccion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + + + + 1pt + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Acepto de conformidad + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 0.29357cm + 0.09963cm + 0cm + 0.57653cm + 4 + + + + + + 0.29357cm + 0.73559cm + 0cm + 0.57653cm + 5 + + + + + + 0.29357cm + 1.35545cm + 0cm + 0.57653cm + 6 + + + + + + 0.29357cm + 1.80439cm + 0cm + 0.57653cm + 7 + + + + + + 0.29357cm + 2.37686cm + 0cm + 0.57653cm + 8 + + + + + + 0.29357cm + 3.01789cm + 0cm + 0.57653cm + 9 + + + + + + 0.29357cm + 3.65558cm + 0cm + 0.57653cm + 10 + + + + + + 0.29357cm + 4.29154cm + 0cm + 0.57653cm + 11 + + + + + + 0.29357cm + 4.92728cm + 0cm + 0.57653cm + 12 + + + + + + 0.29357cm + 5.25981cm + 0cm + 0.57653cm + 13 + + + + + + 0.29357cm + 5.89576cm + 0cm + 0.57653cm + 14 + + + + + + 0.29357cm + 6.50505cm + 0cm + 0.57653cm + 15 + + + + + + 0.29357cm + 7.18531cm + 0cm + 0.57653cm + 16 + + + + + + 0.29357cm + 7.82127cm + 0cm + 0.57653cm + 17 + + + + + + 0.29357cm + 8.48346cm + 0cm + 0.57653cm + 18 + + + + + + 0.29357cm + 8.81599cm + 0cm + 0.57653cm + 19 + + + + + + 0.29357cm + 9.45195cm + 0cm + 0.57653cm + 20 + + + + + + 0.29357cm + 10.11415cm + 0cm + 0.57653cm + 21 + + + + + + 0.29357cm + 14.08927cm + 0cm + 0.57653cm + 22 + + + + + + 0.29357cm + 14.72523cm + 0cm + 0.57653cm + 23 + + + + + + 0.29357cm + 15.33451cm + 0cm + 0.57653cm + 24 + + + + + + 0.29357cm + 15.64058cm + 0cm + 0.57653cm + 25 + + + + + + 0.29357cm + 16.27654cm + 0cm + 0.57653cm + 26 + + + + + + 0.29357cm + 16.91228cm + 0cm + 0.57653cm + 27 + + + + + + 0.29357cm + 10.76463cm + 0cm + 0.57653cm + 28 + + + + + + 0.29357cm + 11.42705cm + 0cm + 0.57653cm + 29 + + + + + + 0.29357cm + 12.06279cm + 0cm + 0.57653cm + 30 + + + + + + 0.29357cm + 12.36886cm + 0cm + 0.57653cm + 31 + + + + + + 0.29357cm + 12.89898cm + 0cm + 0.57653cm + 32 + + + + + + 0.29357cm + 13.53472cm + 0cm + 0.57653cm + 33 + + + + + + 0.29357cm + 18.40663cm + 0cm + 0.57653cm + 34 + + + + + + 0.29357cm + 19.04259cm + 0cm + 0.57653cm + 35 + + + + + + 0.29357cm + 17.74353cm + 0cm + 0.57653cm + 36 + + + + + + true + 14.39536cm + 0.13016cm + 6.82655cm + 20.06179cm + 36 + + = (Parameters!AplicaPagare.Value="0" ORelse Parameters!AplicaPagare.Value="") + + + + + + + true + + + + + =Parameters!Observaciones.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 2.12527cm + + + 2.02474cm + + + 10.17786cm + + + 2.52862cm + + + 3.15415cm + + + + + 0.52063cm + + + + + true + + + + + Cantidad + + + + + + + Textbox34 + + + #a52288 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Unidad + + + + + + + Textbox53 + + + #a52288 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Descripción + + + + + + + Textbox79 + + + #a52288 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + P. Unitario + + + + + + + Textbox84 + + + #a52288 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Importe + + + + + + + + + + + + + + + #a52288 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.4148cm + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + + + + + + + #4f81bd + + + #4f81bd + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!UM.Value + + + + + + + UM1 + + + + + + + + + + + + + #4f81bd + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PS.Value &Fields!Obs.Value + + + + + + + + + + + + + + + + #4f81bd + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PU.Value + + + + + + + PU1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cantidad.Value*Fields!PU.Value + + + + + + + Textbox88 + + + + + + + + + + #4f81bd + + + #4f81bd + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + 0.08406cm + + + + + true + true + + + + + + + + + #4f81bd + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + #4f81bd + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + #4f81bd + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + #4f81bd + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + #4f81bd + + + + #4f81bd + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + After + + + + + + Before + + + + DsOC + 4.5569cm + 0.11468cm + 1.01949cm + 20.01064cm + 38 + + + + + + true + + + + + RFC: + + + + =Parameters!ClienteRFC.Value + + + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 2.52862cm + + + 3.15415cm + + + + + 0.6cm + + + + + true + true + + + + + Sub Total 1 + + + + + + + Textbox5 + + + #a52288 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Microsoft.VisualBasic.Interaction.IIF(Parameters!SubTotal.Value = 0, "-", Parameters!SubTotal.Value) + + + + + + + Textbox8 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + Descuento + + + + + + + Textbox21 + + + #a52288 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Microsoft.VisualBasic.Interaction.iif(Parameters!Descuento.Value = 0, "-", Parameters!Descuento.Value) + + + + + + + Textbox23 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + Amort. Ant + + + + + + + Textbox15 + + + #a52288 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Microsoft.VisualBasic.Interaction.IIF(Parameters!Amortizacion.Value = 0, "-", Parameters!Amortizacion.Value) + + + + + + + Textbox17 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + Sub Total 2 + + + + + + + Textbox24 + + + #a52288 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Microsoft.VisualBasic.Interaction.IIF(Parameters!SubTotal2.Value = 0, "-", Parameters!SubTotal2.Value) + + + + + + + Textbox26 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + IVA (16%) + + + + + + + Textbox33 + + + #a52288 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Microsoft.VisualBasic.Interaction.iif(Parameters!IVA.Value = 0, "-", Parameters!IVA.Value) + + + + + + + Textbox35 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + Ret. IVA + + + + + + + Textbox36 + + + #a52288 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Microsoft.VisualBasic.Interaction.iif(Microsoft.VisualBasic.Information.isnothing(Parameters!RetIVA.Value) OrElse Parameters!RetIVA.Value = 0, "-", Parameters!RetIVA.Value) + + + + + + + Textbox37 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + Ret. ISR + + + + + + + Textbox1 + + + #a52288 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Microsoft.VisualBasic.Interaction.iif(Microsoft.VisualBasic.Information.isnothing(Parameters!RetISR.Value) OrElse Parameters!RetISR.Value = 0, "-", Parameters!RetISR.Value) + + + + + + + Textbox2 + + + 2pt + 2pt + 2pt + 2pt + + + true + + + + + + 0.6cm + + + + + true + true + + + + + Total + + + + + + + Textbox38 + + + #a52288 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Total.Value + + + + + + + Textbox39 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + + + DsOC + 5.59373cm + 14.46459cm + 4.8cm + 5.68277cm + 40 + + + + + + Embedded + loga + FitProportional + 0.09595cm + 0.22979cm + 2.70762cm + 4.0349cm + 41 + + + + + + 21.22191cm + + + + + + + + =Today + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 1cm + 0.5cm + 1.27cm + - - - - - - Textbox37 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Movimiento - - - - - - - Textbox1 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Almacen - - - - - - - Textbox3 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Folio - - - - - - - Textbox5 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - FolioDcto - - - - - - - Textbox7 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Serie/Lote - - - - - - - Textbox9 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - F. Cad. - - - - - - - Textbox11 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Entrada - - - - - - - Textbox13 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Salida - - - - - - - Textbox15 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Costo - - - - - - - Textbox26 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Importe - - - - - - - Textbox17 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Existencia - - - - - - - Textbox19 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.5cm - - - - - true - true - - - - - - - - - - - - PS - - - #fafafa - 2pt - 2pt - 2pt - 2pt - - - 6 - - - - - - - - - - - true - true - - - - - - - - - - - - ImporteE1 - - - #fafafa - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox18 - - - #fafafa - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox25 - - - #fafafa - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox27 - - - #fafafa - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - ExistenciaIniCant - - - #fafafa - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox30 - - - #fafafa - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.5cm - - - - - true - true - - - - - =Fields!FechaMovto.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Movimiento.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Almacen.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Folio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!FolioDcto.Value - - - - - - - Entradas - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!SerieLote.Value - - - - - - - CostoE - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!FechaCaducidad.Value - - - - - - - ImporteE - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Entrada.Value - - - - - - - Salidas - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Salida.Value - - - - - - - CostoS - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Costo.Value - - - - - - - Textbox28 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Importe.Value - - - - - - - ImporteS - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Existencias.Value - - - - - - - ExistenciaAcum - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.5cm - - - - - true - true - - - - - =Fields!FechaMovto.Value - - - - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - [Movimiento] - - - - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Almacen.Value - - - - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Folio.Value - - - - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!FolioDcto.Value - - - - - - - Entradas1 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!SerieLote.Value - - - - - - - CostoE1 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!FechaCaducidad.Value - - - - - - - ImporteE2 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Entrada.Value - - - - - - - Salidas2 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Salida.Value - - - - - - - CostoS1 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Costo.Value - - - - - - - - - - - - - - - - Textbox29 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Importe.Value - - - - - - - ImporteS1 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Existencias.Value - - - - - - - ExistenciaTotal2 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - - - - - - After - - - - - - - =Fields!Orden.Value<>10 - - - - - =Fields!Orden.Value<>15 - - - - - =Fields!Orden.Value<>20 - - - - - - - DataSet1 - 2.1175cm - 0.18357cm - 2.1cm - 24.56415cm - - - - - - true - true - - - - - Empresa DEMO - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Reporte Kardex - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Clasificación: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - - - - - Textbox3 - 1.37639cm - 4.71779cm - 0.6cm - 2.32031cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - 1.84375in - - - - =Today - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 29.7cm - 21cm - 0.5cm - 0.5cm - 1cm - 1cm - 0.13cm - + + + + + + Textbox37 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Concepto + + + + + + + Textbox1 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Almacen + + + + + + + Textbox3 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Folio + + + + + + + Textbox5 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + FolioDcto + + + + + + + Textbox7 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Serie/Lote + + + + + + + Textbox9 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + F. Cad. + + + + + + + Textbox11 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Entrada + + + + + + + Textbox13 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Salida + + + + + + + Textbox15 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Costo + + + + + + + Textbox26 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox17 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Existencia + + + + + + + Textbox19 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.5cm + + + + + true + true + + + + + =Fields!FechaMovto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Concepto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Almacen.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Folio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!FolioDcto.Value + + + + + + + Entradas + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Serie.Value + + + + + + + Serie1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!FechaCaducidad.Value + + + + + + + ImporteE + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Entrada.Value + + + + + + + Salidas + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Salida.Value + + + + + + + CostoS + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Costo.Value + + + + + + + Textbox28 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + ImporteS + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Existencias.Value + + + + + + + ExistenciaAcum + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + =Fields!FolioDocto.Value<>15 + + + + + + + DataSet1 + 2.15278cm + 0.18358cm + 1.1cm + 24.56415cm + + + + + + true + true + + + + + Empresa DEMO + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Reporte Kardex + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Clasificación: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + + + + Textbox3 + 1.37639cm + 4.71779cm + 0.6cm + 2.32031cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + 1.4375in + + + + =Today + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 29.7cm + 21cm + 0.5cm + 0.5cm + 1cm + 1cm + 0.13cm + @@ -215,7 +216,7 @@ ImporteAnterior - true + =IIf(Parameters!CveEmpresa.Value = 48 Or Parameters!CveEmpresa.Value = 120,False,True) @@ -398,13 +406,13 @@ - 5.36361cm + 6cm - 2.86585cm + 2.5cm - 2.19558cm + 2.20896cm @@ -464,6 +472,7 @@ =Fields!Nombre.Value @@ -538,7 +547,7 @@ ImporteAnterior - true + =IIf(Parameters!CveEmpresa.Value = 48 Or Parameters!CveEmpresa.Value = 120,False,True) @@ -633,10 +642,10 @@ - =Sum( Fields!ImporteAnterior.Value) + =Sum(IIf(Fields!Level.Value < 2, Fields!ImporteAnterior.Value, 0)) @@ -647,7 +656,7 @@ Textbox12 - true + =IIf(Parameters!CveEmpresa.Value = 48 Or Parameters!CveEmpresa.Value = 120,False,True) @@ -863,7 +880,7 @@ ImporteAnterior - true + =IIf(Parameters!CveEmpresa.Value = 48 Or Parameters!CveEmpresa.Value = 120,False,True) @@ -1185,7 +1210,7 @@ ImporteAnterior - true + =IIf(Parameters!CveEmpresa.Value = 48 Or Parameters!CveEmpresa.Value = 120,False,True) @@ -1278,9 +1303,9 @@ - =Sum(Fields!ImporteAnterior.Value) + =Sum(IIf(Fields!Level.Value < 2, Fields!ImporteAnterior.Value, 0)) @@ -1291,7 +1316,7 @@ Textbox12 - true + =IIf(Parameters!CveEmpresa.Value = 48 Or Parameters!CveEmpresa.Value = 120,False,True) @@ -1574,7 +1607,7 @@ ImporteAnterior - true + =IIf(Parameters!CveEmpresa.Value = 48 Or Parameters!CveEmpresa.Value = 120,False,True) + + true + true + + + + + Total del Activo + + + + + + + Textbox45 + 11.31317cm + 0.27027cm + 0.6cm + 4.34021cm + 8 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Variables!TotalActivoAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Variables!TotalActivoActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + true true @@ -1806,16 +1955,16 @@ Textbox45 10.22837cm - 10.77464cm + 10.88047cm 0.6cm - 4.89717cm - 8 + 3.1816cm + 11 @@ -1833,10 +1982,10 @@ - =Variables!TotalPatrimonioHAnterior.Value + =Variables!TotalPatrimonioHAnterior.Value + Variables!TotalPatrimonioCAnterior.Value @@ -1920,16 +2069,16 @@ Textbox45 - 11.12267cm - 10.77464cm + 11.31317cm + 10.26312cm 0.6cm - 4.89717cm - 11 + 4.61265cm + 14 @@ -1950,7 +2099,7 @@ =Variables!TotalpasivoYHaciendaAnterior.Value @@ -2034,16 +2183,16 @@ Textbox45 6.57056cm - 10.77464cm + 10.88047cm 0.6cm - 5.21467cm - 14 + 3.1816cm + 17 @@ -2064,7 +2213,7 @@ =Variables!TotalPasivoAnterior.Value @@ -2138,10 +2287,10 @@ - =Iif( Round(Math.Abs(Variables!TotalActivoActual.Value-Variables!TotalpasivoYHaciendaActual.Value),2) <.005,"" ,"La suma de los totales estan descuadradas." & Round(Math.Abs(Variables!TotalActivoActual.Value-Variables!TotalpasivoYHaciendaActual.Value),2)) + =Iif(round(Math.Abs(Variables!TotalActivoAnterior.Value-Variables!TotalpasivoYHaciendaAnterior.Value),2) <.005 AND Round(Math.Abs(Variables!TotalActivoActual.Value-Variables!TotalpasivoYHaciendaActual.Value),2) <.005,"" ,"La suma de los totales estan descuadradas." & round(Math.Abs(Variables!TotalActivoAnterior.Value-Variables!TotalpasivoYHaciendaAnterior.Value),2)) @@ -2151,11 +2300,11 @@ Textbox73 - 11.81312cm - 10.77464cm + 12.16237cm + 0.74653cm 0.6cm - 9.69395cm - 17 + 15.93957cm + 20 @@ -2173,8 +2322,8 @@ 0.03141cm 0.31432cm 1.5cm - 5.36361cm - 18 + 1.5cm + 21 @@ -2194,6 +2343,13 @@ Bold + + + + @@ -2223,14 +2379,14 @@ - Estado de Situación Financiera + Estado de Situación Financiera al - =Parameters!periodo.Value + =Parameters!pFechaFin.Value @@ -2278,11 +2434,11 @@ Textbox8 - 0.07056cm - 15.98931cm + 0.03141cm + 16.58113cm 0.81167cm - 4.47928cm - 21 + 3.49249cm + 24 @@ -2297,13 +2453,13 @@ - 5.36361cm + 6cm - 2.86585cm + 2.5cm - 2.19558cm + 2.20896cm @@ -2363,6 +2519,7 @@ =Fields!Nombre.Value @@ -2437,7 +2594,7 @@ ImporteAnterior - true + =IIf(Parameters!CveEmpresa.Value = 48,False,True) @@ -2532,10 +2689,10 @@ - =Sum(Fields!ImporteAnterior.Value) + =Sum(IIf(Fields!Level.Value < 2, Fields!ImporteAnterior.Value, 0)) @@ -2546,7 +2703,7 @@ Textbox12 - true + =IIf(Parameters!CveEmpresa.Value = 48,False,True) @@ -2608,122 +2768,8 @@ 8pt - - true - true - - - - - Total del Activo - - - - - - - Textbox45 - 11.12267cm - 0.31432cm - 0.6cm - 5.36361cm - 23 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Variables!TotalActivoAnterior.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Variables!TotalActivoActual.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - 4.88706in + 5.1587in - 2.46062cm + 2.27541cm true true @@ -2837,6 +2883,13 @@ 8pt + + . + + - - true - true - - - - - - - - - - Textbox2 - 0.10582cm - 10.37435cm - 0.99688cm - 8.02269cm - 3 - - =Microsoft.VisualBasic.Interaction.Iif((Globals!PageNumber = Globals!TotalPages) And (Parameters!pFirma1.Value <> ""), False, True) - - - - - - - 2pt - 2pt - 2pt - 2pt - - + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.45cm + + + + + true + + + + + =Fields!Nombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + + + + + TOTAL ACTIVO CIRCULANTE + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteActual.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteAnterior.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + true + + + + + + + + + Before + + + + DataSet1 + + + =Fields!Tipo.Value + In + + =CStr("A,B,C").Split(",") + + + + =Fields!TipoCuenta.Value + Equal + + 1 + + + + 2.6512cm + 0.31432cm + 1.65cm + 10.42504cm + + + Verdana + 8pt + + + + + + + 5.36361cm + + + 2.86585cm + + + 2.19558cm + + + + + 0.6cm + + + + + true + true + + + + + ACTIVO NO CIRCULANTE + + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.45cm + + + + + true + + + + + =Fields!Nombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + TOTAL ACTIVO NO CIRCULANTE + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteActual.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum( Fields!ImporteAnterior.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + true + + + + + + Before + + + + DataSet1 + + + =Fields!Tipo.Value + In + + =CStr("A,B,C").Split(",") + + + + =Fields!TipoCuenta.Value + Equal + + 2 + + + + 4.74417cm + 0.31432cm + 1.65cm + 10.42504cm + 1 + + + Verdana + 8pt + + + + + + + 5.21467cm + + + 2.56871cm + + + 1.91058cm + + + + + 0.6cm + + + + + true + true + + + + + PASIVO CIRCULANTE + + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.45cm + + + + + true + + + + + =Fields!Nombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + TOTAL PASIVO CIRCULANTE + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteActual.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteAnterior.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + true + + + + + + Before + + + + DataSet1 + + + =Fields!Tipo.Value + Equal + + D + + + + =Fields!TipoCuenta.Value + Equal + + 3 + + + + 2.6512cm + 10.77464cm + 1.65cm + 9.69396cm + 2 + + + Verdana + 8pt + + + + + + + 5.21467cm + + + 2.56871cm + + + 1.91058cm + + + + + 0.6cm + + + + + true + true + + + + + PASIVO NO CIRCULANTE + + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.45cm + + + + + true + + + + + =Fields!Nombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + TOTAL PASIVO NO CIRCULANTE + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteActual.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteAnterior.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + true + + + + + + Before + + + + DataSet1 + + + =Fields!Tipo.Value + Equal + + D + + + + =Fields!TipoCuenta.Value + Equal + + 4 + + + + 4.74417cm + 10.77464cm + 1.65cm + 9.69396cm + 3 + + + Verdana + 8pt + + + + true + true + + + + + ACTIVO + + + + + + + Textbox28 + 1.91009cm + 0.31432cm + 0.6cm + 10.46032cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + PASIVO + + + + + + + Textbox28 + 1.91009cm + 10.77464cm + 0.6cm + 9.69395cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 5.21467cm + + + 2.56871cm + + + 1.91058cm + + + + + 0.6cm + + + + + true + true + + + + + CAPITAL CONTABLE + + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.45cm + + + + + true + + + + + =Fields!Nombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + TOTAL CAPITAL + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteActual.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteAnterior.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + true + + + + + + Before + + + + DataSet1 + + + =Fields!Tipo.Value + Equal + + F + + + + =Fields!TipoCuenta.Value + In + + 5 + 6 + 7 + 8 + + + + 8.30193cm + 10.77464cm + 1.65cm + 9.69396cm + 6 + + + Verdana + 8pt + + + + true + true + + + + + CAPITAL + + + + + + + Textbox28 + 7.52554cm + 10.77464cm + 0.6cm + 9.69395cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Total CAPITAL + + + + + + + Textbox45 + 10.22837cm + 10.77464cm + 0.6cm + 4.89717cm + 8 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Variables!TotalPatrimonioHAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Variables!TotalPatrimonioHActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Total Pasivo y Patrimonio + + + + + + + Textbox45 + 11.12267cm + 10.77464cm + 0.6cm + 4.89717cm + 11 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Variables!TotalpasivoYHaciendaAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Variables!TotalpasivoYHaciendaActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Total del Pasivo: + + + + + + + Textbox45 + 6.57056cm + 10.77464cm + 0.6cm + 5.21467cm + 14 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Variables!TotalPasivoAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Variables!TotalPasivoActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Iif( Round(Math.Abs(Variables!TotalActivoActual.Value-Variables!TotalpasivoYHaciendaActual.Value),2) <.005,"" ,"La suma de los totales estan descuadradas." & Round(Math.Abs(Variables!TotalActivoActual.Value-Variables!TotalpasivoYHaciendaActual.Value),2)) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + External + = Parameters!pImg.Value + FitProportional + 0.03141cm + 0.31432cm + 1.5cm + 5.36361cm + 18 + + + + + + true + true + + + + + =Parameters!pEmp.Value + + + + + + + Textbox1 + 0.03141cm + 5.67793cm + 0.81167cm + 10.31137cm + 19 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Estado de Situación Financiera + + + + =Parameters!periodo.Value + + + + + + + Textbox5 + 0.89924cm + 5.67793cm + 0.6cm + 10.31137cm + 20 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Fecha Impresión:" & vbcrlf & Format( Globals!ExecutionTime,"dd/MM/yyyy") + + + + + + + Textbox8 + 0.07056cm + 15.98931cm + 0.81167cm + 4.47928cm + 21 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 5.36361cm + + + 2.86585cm + + + 2.19558cm + + + + + 0.6cm + + + + + true + true + + + + + ACTIVO DIFERIDO + + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.45cm + + + + + true + + + + + =Fields!Nombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + TOTAL ACTIVO DIFERIDO + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteActual.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteAnterior.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + true + + + + + + Before + + + + DataSet1 + + + =Fields!TipoCuenta.Value + Equal + + 9 + + + + 6.92554cm + 0.31432cm + 1.65cm + 10.42504cm + 22 + + + Verdana + 8pt + + + + true + true + + + + + Total del Activo + + + + + + + Textbox45 + 11.12267cm + 0.31432cm + 0.6cm + 5.36361cm + 23 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Variables!TotalActivoAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Variables!TotalActivoActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 4.88706in + + + + =Parameters!pFechaFin.Value + + + + + + + Textbox5 + 3.454cm + 0.6cm + 12.91455cm + + = (Globals.PageNumber=1) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Fecha Impresión:" & vbcrlf & Format( Globals!ExecutionTime,"dd/MM/yyyy") + + + + + + + Textbox8 + 0.02088cm + 16.62517cm + 0.57912cm + 3.49249cm + 1 + + = (Globals.PageNumber=1) + + + + 2pt + 2pt + + + + + + + + + 2.46062cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 1.86062cm + 16.37931cm + 0.6cm + 3.95896cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!pFirma2.Value + + + + Textbox2 + 0.10583cm + 1.71666cm + 0.99688cm + 8.02269cm + 1 + + = Iif((Globals.PageNumber=Globals.TotalPages) and (Parameters!pFirma2.Value <> ""),false,true) + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!pFirma1.Value + + + + Textbox2 + 1.46374cm + 6.03938cm + 0.99688cm + 8.02269cm + 2 + + = Iif((Globals.PageNumber=Globals.TotalPages) and (Parameters!pFirma1.Value <> ""),false,true) + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + + Textbox2 + 0.10582cm + 10.37435cm + 0.99688cm + 8.02269cm + 3 + + =Microsoft.VisualBasic.Interaction.Iif((Globals!PageNumber = Globals!TotalPages) And (Parameters!pFirma1.Value <> ""), False, True) + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 0.5cm + 0.5cm + 0.13cm +