diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index fea2e0d27..fb1ed92d5 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -2634,6 +2634,7 @@ Partial Class Compras_Compras
DdlPS.Enabled = True
TxtObsPS.Enabled = True
LbAgregar.Enabled = True
+ LnkUpdateFechaPago.Visible = True
End If
BtnGuardar.Visible = False
@@ -2800,7 +2801,9 @@ Partial Class Compras_Compras
'TIENE AMORTIZACIÓN
If GvAnticiposSel.Rows.Count > 0 Then
BtnEliminarCompra.Visible = False
- BtnCancelarCompra.Visible = False
+ If Not DdlTipoComprobante.SelectedValue.Contiene("NC") Then
+ BtnCancelarCompra.Visible = False
+ End If
End If
CargaComplementosPago()
@@ -4158,8 +4161,10 @@ Partial Class Compras_Compras
CvePrePoliza = ObjConta.AddPrePolizas("Compras/Registrar", If(EsContado And CvePlantillaPrePoliza = 1, 2, CvePlantillaPrePoliza), ImporteCompra, TxtTotal.Text.ToDouble, DdlMoneda.SelectedValue.ToEntero, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjCompras.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjConta.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa))
- 'seria de contado, solo cuando no tenga vinculado ningun anticipo
- If RBLPago.SelectedValue.ToEntero = 2 AndAlso ArrAnticipos.Count = 0 Then 'Contado
+ If CvePrePoliza > 0 Then
+
+ 'seria de contado, solo cuando no tenga vinculado ningun anticipo
+ If RBLPago.SelectedValue.ToEntero = 2 AndAlso ArrAnticipos.Count = 0 Then 'Contado
If RBLContado.SelectedValue = "1" Then
'se registra primero el movimiento en bancos para luego vincularlo en la compra
@@ -4223,6 +4228,12 @@ Partial Class Compras_Compras
Else
CveConceptoContableAlmacen = 225
End If
+
+ 'Condiciones para los casos de facturas que son en 0 pero que se utiliza el almacen
+ ElseIf OCVinculada AndAlso Not (CveImportacion > 0 Or CveFlete > 0) AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
+ CveConceptoContableAlmacen = DdlOCVinculaInv.SelectedValue.ToEntero
+ ElseIf (CveImportacion > 0 Or CveFlete > 0) AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
+ CveConceptoContableAlmacen = CveConceptoContableAlmacen
End If
End If
@@ -6226,15 +6237,13 @@ Partial Class Compras_Compras
If ContienePSNeteoBonif Then
importeMovimiento = TmpDT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total"), $"ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1 ").ToString.ToDecimal
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
- If importeMovimiento <> 0 Then
- Dim IdCtaContableDescCompra As Integer = UsuarioActual.Empresa.Funcionalidad(405).ToEntero
- If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, Referencia, 259, Concepto, FechaMovimiento, IdCtaContableDescCompra, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -importeMovimiento, Referencia, 259, Concepto, FechaMovimiento, IdCtaContableDescCompra, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=-importeMN, ImporteME:=If(tipoCambioActual = 1, 0, -importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
- ErrorPrepoliza = True
- End If
- Else
+ Dim IdCtaContableDescCompra As Integer = UsuarioActual.Empresa.Funcionalidad(405).ToEntero
+ If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, Referencia, 259, Concepto, FechaMovimiento, IdCtaContableDescCompra, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -importeMovimiento, Referencia, 259, Concepto, FechaMovimiento, IdCtaContableDescCompra, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=-importeMN, ImporteME:=If(tipoCambioActual = 1, 0, -importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
+ Else
+ ErrorPrepoliza = True
End If
End If
@@ -6242,7 +6251,7 @@ Partial Class Compras_Compras
- If Not ChkNCInvNC.Checked Then
+ If Not ChkNCInvNC.Checked OrElse Not ListaDocumentos.Count > 0 Then
'GASTO
If UsuarioActual.CveEmpresa = 119 Then
DT = TmpDT
@@ -7003,7 +7012,7 @@ Partial Class Compras_Compras
End If
'Conta ContPAQ
- If ObjContaAC IsNot Nothing AndAlso Not ErrorPrepoliza AndAlso Not ErrorPrepolizaDescuadre AndAlso UsuarioActual.Empresa.UsaContabilidad Then
+ If ObjContaAC IsNot Nothing AndAlso Not ErrorPrepoliza AndAlso Not ErrorPrepolizaDescuadre AndAlso UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
If idCuentaContabilizacion > 0 Then
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContaAC) Then
' Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion)
@@ -7709,6 +7718,7 @@ Partial Class Compras_Compras
ObjCompras.RollBack()
End If
+ End If
Catch ex As Exception
ObjCompras.RollBack()
@@ -8569,7 +8579,7 @@ Partial Class Compras_Compras
End If
'Conta ContPAQ
- If UsuarioActual.Empresa.Funcionalidad(200) = "1" And ErrorMovtosCxP = 0 And UsuarioActual.Empresa.UsaContabilidad Then
+ If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso ErrorMovtosCxP = 0 Then
If idCuentaContabilizacion > 0 Then
If ObjConta.ContabilizarPrePoliza(CvePrePolizaNueva, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
alertaContabilizacion.AppendFormat("{1}<\a> ", ObjConta.ContaIdPoliza, ObjConta.ContaFolio)
@@ -9735,18 +9745,21 @@ Partial Class Compras_Compras
ReceptorRFC = ValorXML(node, "RFC")
End If
- 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("04", "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
- ListaDocumentos.Add(documento.Attributes("UUID").Value)
- End If
- Next
+ If UsuarioActual.CveEmpresa.Contiene(119) 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("04", "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
+ ListaDocumentos.Add(documento.Attributes("UUID").Value)
+ End If
+ 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)
@@ -9935,18 +9948,18 @@ Partial Class Compras_Compras
If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then
If e.Row.RowIndex = 0 Then
- e.Row.Cells(0).Width = Unit.Pixel(15)
- e.Row.Cells(1).Width = Unit.Pixel(45)
- e.Row.Cells(2).Width = Unit.Pixel(70)
- e.Row.Cells(3).Width = Unit.Pixel(230)
- e.Row.Cells(4).Width = Unit.Pixel(202)
- e.Row.Cells(5).Width = Unit.Pixel(155)
- e.Row.Cells(6).Width = Unit.Pixel(155)
- e.Row.Cells(7).Width = Unit.Pixel(50)
- e.Row.Cells(8).Width = Unit.Pixel(80)
- e.Row.Cells(9).Width = Unit.Pixel(80)
- e.Row.Cells(10).Width = Unit.Pixel(43)
- e.Row.Cells(11).Width = Unit.Pixel(43)
+ 'e.Row.Cells(0).Width = Unit.Pixel(15)
+ 'e.Row.Cells(1).Width = Unit.Pixel(45)
+ 'e.Row.Cells(2).Width = Unit.Pixel(70)
+ 'e.Row.Cells(3).Width = Unit.Pixel(230)
+ 'e.Row.Cells(4).Width = Unit.Pixel(202)
+ 'e.Row.Cells(5).Width = Unit.Pixel(155)
+ 'e.Row.Cells(6).Width = Unit.Pixel(155)
+ 'e.Row.Cells(7).Width = Unit.Pixel(50)
+ 'e.Row.Cells(8).Width = Unit.Pixel(80)
+ 'e.Row.Cells(9).Width = Unit.Pixel(80)
+ 'e.Row.Cells(10).Width = Unit.Pixel(43)
+ 'e.Row.Cells(11).Width = Unit.Pixel(43)
If UsuarioActual.Empresa.UsaAC Then 'AndAlso (CveFactura > 0 Or CveCompra > 0)
e.Row.Cells(12).Width = Unit.Pixel(150)
@@ -13638,7 +13651,7 @@ Partial Class Compras_Compras
RegistraScript("$('#DivCancelarCompra').modal('hide');")
Dim ObjAC As ClsContPAQi = Nothing
- If UsuarioActual.Empresa.UsaAC Then
+ If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
ObjAC.IniciaTransacSQL()
End If
@@ -13654,7 +13667,7 @@ Partial Class Compras_Compras
' MES ANTERIOR, MOVIMIENTOS CONTRARIOS (NEGATIVOS)
- If TxtFecha.Text.ToDate.Month < TxtFechaCancelacion.Text.ToDate.Month Or TxtFecha.Text.ToDate.Year < TxtFechaCancelacion.Text.ToDate.Year Then
+ If TxtFecha.Text.ToDate.Month < TxtFechaCancelacion.Text.ToDate.Month Or TxtFecha.Text.ToDate.Year < TxtFechaCancelacion.Text.ToDate.Year Or DdlTipoComprobante.SelectedValue.Contiene("NC") Then
'CREA POLIZA NEGATIVA
If IdPoliza > 0 AndAlso ObjAC IsNot Nothing Then
@@ -13685,9 +13698,9 @@ Partial Class Compras_Compras
End If
'CREA PRE-POLIZA NEGATIVA
- If CvePrePoliza > 0 Then
- If ObjContabilidad.GetPrePolizasDetalle(CvePrePoliza) Then
- dt = ObjContabilidad.DtResultados
+ If DdlTipoComprobante.SelectedValue.Contiene("NC") Then
+ If ObjCompras.GetCancelarNC(CveCompra, UsuarioActual.CveEmpresa) Then
+ dt = ObjCompras.DtResultados
CvePrePolizaNueva = ObjContabilidad.AddPrePolizas("Compras/Cancelar", dt.Rows(0)("CvePlantillaPoliza").ToString.ToEntero, dt.Rows(0)("Cargos").ToString.ToDouble * -1, dt.Rows(0)("Abonos").ToString.ToDouble * -1, dt.Rows(0)("CveMoneda").ToString.ToEntero, TxtFechaCancelacion.Text.ToDate, String.Format("Cancelación: {0}", dt.Rows(0)("Concepto").ToString), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CvePrePolizaNueva > 0 Then
@@ -13696,7 +13709,8 @@ Partial Class Compras_Compras
dr("Concepto").ToString, TxtFechaCancelacion.Text.ToDate, dr("IdCtaContable").ToString.ToEntero, dr("IdSegmentoNegocio").ToString.ToEntero, dr("CveIE").ToString.ToEntero,
dr("CveVenta").ToString.ToEntero, dr("CveCompra").ToString.ToEntero, dr("CveSubProyecto").ToString.ToEntero, dr("CveCliente").ToString.ToEntero, dr("CveProveedor").ToString.ToEntero, dr("CvePersonal").ToString.ToEntero,
dr("CveMovimientoAlmacen").ToString.ToEntero, dr("CveActivoFijo").ToString.ToEntero, dr("CveAcreedor").ToString.ToEntero, dr("CveColectiva").ToString.ToEntero, dr("CveCreditoDetalle").ToString.ToEntero, CveCuenta:=dr("CveCuenta").ToString.ToEntero,
- ImporteMX:=dr("Importe").ToString.ToDecimal * -1, ImporteME:=dr("Importe").ToString.ToDecimal * -1, CveTipoGasto:=dr("CveTipoGasto").ToString.ToEntero, CveClasificacion:=dr("CveClasificacion").ToString.ToEntero, CveOCDetalle:=dr("CveOCDetalle").ToString.ToEntero) Then
+ ImporteMX:=dr("Importe").ToString.ToDecimal * -1, ImporteME:=dr("Importe").ToString.ToDecimal * -1, CveTipoGasto:=dr("CveTipoGasto").ToString.ToEntero, CveClasificacion:=dr("CveClasificacion").ToString.ToEntero, CveOCDetalle:=dr("CveOCDetalle").ToString.ToEntero,
+ CveCompraAmortizacion:=dr("CveCompraAmortizacion").ToString.ToEntero) Then
ErrorCancelar = True
Exit For
End If
@@ -13707,6 +13721,30 @@ Partial Class Compras_Compras
Else
ErrorCancelar = True
End If
+ Else
+ If CvePrePoliza > 0 Then
+ If ObjContabilidad.GetPrePolizasDetalle(CvePrePoliza) Then
+ dt = ObjContabilidad.DtResultados
+
+ CvePrePolizaNueva = ObjContabilidad.AddPrePolizas("Compras/Cancelar", dt.Rows(0)("CvePlantillaPoliza").ToString.ToEntero, dt.Rows(0)("Cargos").ToString.ToDouble * -1, dt.Rows(0)("Abonos").ToString.ToDouble * -1, dt.Rows(0)("CveMoneda").ToString.ToEntero, TxtFechaCancelacion.Text.ToDate, String.Format("Cancelación: {0}", dt.Rows(0)("Concepto").ToString), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
+ If CvePrePolizaNueva > 0 Then
+ For Each dr As DataRow In dt.Rows
+ If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePolizaNueva, CBool(dr("TipoMovto").ToString), dr("Importe").ToString.ToDecimal * -1, dr("Referencia").ToString, dr("CveConceptoContable").ToString.ToEntero,
+ dr("Concepto").ToString, TxtFechaCancelacion.Text.ToDate, dr("IdCtaContable").ToString.ToEntero, dr("IdSegmentoNegocio").ToString.ToEntero, dr("CveIE").ToString.ToEntero,
+ dr("CveVenta").ToString.ToEntero, dr("CveCompra").ToString.ToEntero, dr("CveSubProyecto").ToString.ToEntero, dr("CveCliente").ToString.ToEntero, dr("CveProveedor").ToString.ToEntero, dr("CvePersonal").ToString.ToEntero,
+ dr("CveMovimientoAlmacen").ToString.ToEntero, dr("CveActivoFijo").ToString.ToEntero, dr("CveAcreedor").ToString.ToEntero, dr("CveColectiva").ToString.ToEntero, dr("CveCreditoDetalle").ToString.ToEntero, CveCuenta:=dr("CveCuenta").ToString.ToEntero,
+ ImporteMX:=dr("Importe").ToString.ToDecimal * -1, ImporteME:=dr("Importe").ToString.ToDecimal * -1, CveTipoGasto:=dr("CveTipoGasto").ToString.ToEntero, CveClasificacion:=dr("CveClasificacion").ToString.ToEntero, CveOCDetalle:=dr("CveOCDetalle").ToString.ToEntero) Then
+ ErrorCancelar = True
+ Exit For
+ End If
+ Next
+ Else
+ ErrorCancelar = True
+ End If
+ Else
+ ErrorCancelar = True
+ End If
+ End If
End If
'MES ACTUAL
@@ -18779,4 +18817,26 @@ Partial Class Compras_Compras
AddPS2(EsNoDeducible:=EsNoDeducible)
End Sub
+ Protected Sub LnkUpdateFechaPago_Click(sender As Object, e As EventArgs)
+ Dim ObjComp As New ClsCompras
+ Dim FechaPagoAnterior As String = ""
+
+ If ObjComp.GetCompras(CveCompra, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
+ If ObjComp.DtResultados.Rows.Count > 0 Then
+ FechaPagoAnterior = ObjComp.DtResultados.Rows(0)("FechaVencimiento").ToString.ToDate.ToShortDateString
+ End If
+ End If
+
+ If FechaPagoAnterior = TxtFechaPago.Text Then
+ Alert("La fecha de pago seleccionada es igual que la anterior.", TipoMensaje.MsgAdvertencia)
+ ObjComp.Dispose()
+ Exit Sub
+ End If
+
+ If ObjComp.UpdateFechaVencimientoCompra(CveCompra, TxtFechaPago.Text.ToDate, UsuarioActual.CveEmpresa) Then
+ Alert("Fecha de pago actualizada correctamente.")
+ End If
+
+ ObjComp.Dispose()
+ End Sub
End Class
\ No newline at end of file
diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb
index 06cf44aa7..085417382 100644
--- a/Compras/Proveedores.aspx.vb
+++ b/Compras/Proveedores.aspx.vb
@@ -1144,7 +1144,7 @@ Partial Class Compras_Proveedores
'VA POR EL CATALOGO DE CUENTAS
If Ddl.Attributes("onclick") <> "" Then
- CargaCuentasContables(If(UsuarioActual.Empresa.Funcionalidad(CveFuncionalidad).ToEntero > 0, UsuarioActual.Empresa.Funcionalidad(CveFuncionalidad).ToEntero, -1))
+ CargaCuentasContables(If(UsuarioActual.Empresa.Funcionalidad(CveFuncionalidad).ToEntero > 0, UsuarioActual.Empresa.Funcionalidad(CveFuncionalidad).ToEntero, 1))
End If
'RECARGA EL DDL
diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb
index a419f00fb..5f9f37585 100644
--- a/Compras/ReembolsosComprobaciones.aspx.vb
+++ b/Compras/ReembolsosComprobaciones.aspx.vb
@@ -1295,7 +1295,7 @@ Partial Class Compras_ReembolsosComprobaciones
End If
'Conta ContPAQ AUTOMATICA
- If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError.Trim = "" AndAlso UsuarioActual.Empresa.UsaContabilidad Then
+ If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError.Trim = "" Then
If CvePrePolizaIERegistrado > 0 Then
If IdCtaPersonal > 0 Or DdlCajaChica.Visible Then
If IdCtaProveedor > 0 Then
diff --git a/Compras/RepCompras.aspx.vb b/Compras/RepCompras.aspx.vb
index 7303258cc..3173f899a 100644
--- a/Compras/RepCompras.aspx.vb
+++ b/Compras/RepCompras.aspx.vb
@@ -285,12 +285,10 @@ Partial Class Compras_RepCompras
If e.Row.DBCampo("Orden") = "" Then
e.Row.FCLiteral("LtlGrupo").Text = e.Row.FCLiteral("LtlGrupo").Text
- e.Row.FCLiteral("LtlCantidad").Text = e.Row.FCLiteral("LtlCantidad").Text
Else
e.Row.FCLiteral("LtlGrupo").Text = String.Format("{2}", Css, Liga, e.Row.FCLiteral("LtlGrupo").Text)
- e.Row.FCLiteral("LtlCantidad").Text = String.Format("{2}", Css, Liga, e.Row.FCLiteral("LtlCantidad").Text)
End If
-
+ e.Row.FCLiteral("LtlCantidad").Text = String.Format("{2}", Css, Liga, e.Row.FCLiteral("LtlCantidad").Text)
If e.Row.DBCampo("SubTotal").ToDouble = 0 Then e.Row.FCLiteral("LtlSubTotal").Text = ""
If e.Row.DBCampo("Descuento").ToDouble = 0 Then e.Row.FCLiteral("LtlDescuento").Text = ""
@@ -399,7 +397,7 @@ Partial Class Compras_RepCompras
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", Now.ToString))
- params.Add(New ReportParameter("AgrupadoPor", $"Agrupado Por: {Proveedor}{Capturo}{Grupo}{Moneda}{FechaIn}{FechaFn}{Proyecto}{SubProyecto}{TipoGasto}{TipoProveedor}{FechaICaptura}{FechaFCaptura}{TipoDocto}"))
+ params.Add(New ReportParameter("AgrupadoPor", $"Agrupado Por: {Grupo}{Proveedor}{Capturo}{Moneda}{FechaIn}{FechaFn}{Proyecto}{SubProyecto}{TipoGasto}{TipoProveedor}{FechaICaptura}{FechaFCaptura}{TipoDocto}"))
If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri))
Else
diff --git a/Compras/RepComprasDetalle.aspx.vb b/Compras/RepComprasDetalle.aspx.vb
index c0be4ca41..ada9dcb43 100644
--- a/Compras/RepComprasDetalle.aspx.vb
+++ b/Compras/RepComprasDetalle.aspx.vb
@@ -437,7 +437,7 @@ Partial Class Compras_RepComprasDetalle
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", Now.ToString))
- params.Add(New ReportParameter("AgrupadoPor", $"Agrupado Por: {Proveedor}{Capturo}{Grupo}{FechaIn}{FechaFn}{FechaCIn}{FechaCFn}{Proyecto}{SubProyecto}{TipoGasto}{TipoProveedor}{TipoDocto}"))
+ params.Add(New ReportParameter("AgrupadoPor", $"Agrupado Por: {Grupo}{Proveedor}{Capturo}{FechaIn}{FechaFn}{FechaCIn}{FechaCFn}{Proyecto}{SubProyecto}{TipoGasto}{TipoProveedor}{TipoDocto}"))
If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri))
Else
diff --git a/Compras/RepNotasCredito.aspx.vb b/Compras/RepNotasCredito.aspx.vb
index 5605a94e5..c04fd2c3e 100644
--- a/Compras/RepNotasCredito.aspx.vb
+++ b/Compras/RepNotasCredito.aspx.vb
@@ -200,7 +200,7 @@ Partial Class Compras_RepNotasCredito
End If
End If
- If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" And UsuarioActual.Empresa.UsaContabilidad Then
+ If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
If MensajeAlert.ToString = "" Then
MensajeAlert.AppendFormat("Los siguientes movimientos fueron saldados correctamente: ")
diff --git a/Compras/RepProductosServicios.aspx.vb b/Compras/RepProductosServicios.aspx.vb
index d4ca7b2e6..7680c1dcc 100644
--- a/Compras/RepProductosServicios.aspx.vb
+++ b/Compras/RepProductosServicios.aspx.vb
@@ -309,23 +309,25 @@ Partial Class Compras_RepProductosServicios
If DdlGrupo.SelectedValue = "6" Then ' cuando es Año
'-1/01
- If e.Row.DBCampo("Anio") = "-1/01" Then
- FechaI = $"01/01/{e.Row.DBCampo("Anio")}"
+ If e.Row.DBCampo("Anio") = "-1" Then
+ FechaI = "-1"
+ FechaF = "-1"
Else
- FechaI = $"01/01/{e.Row.DBCampo("Anio")}".ToDate.FirstDayOfMonth.ToShortDateString
+ FechaI = $"01/01/{e.Row.DBCampo("Anio")}"
+ FechaF = $"01/12/{e.Row.DBCampo("Anio")}".ToDate.LastDayOfMonth.ToShortDateString
End If
- FechaF = $"01/12/{e.Row.DBCampo("Anio")}".ToDate.LastDayOfMonth.ToShortDateString
End If
If DdlGrupo.SelectedValue = "8" Then ' cuando es Año/Mes
- If e.Row.DBCampo("AnioMes") = "-1/01" Then
- FechaI = $"{e.Row.DBCampo("AnioMes")}/01"
+ If e.Row.DBCampo("AnioMes") = "-1" Then
+ FechaI = "-1"
+ FechaF = "-1"
Else
- FechaI = $"{e.Row.DBCampo("AnioMes")}/01".ToDate.FirstDayOfMonth.ToShortDateString
+ FechaI = $"{e.Row.DBCampo("AnioMes")}/01".ToDate.ToShortDateString
+ FechaF = $"{e.Row.DBCampo("AnioMes")}/01".ToDate.LastDayOfMonth.ToShortDateString
End If
- FechaF = $"{e.Row.DBCampo("AnioMes")}/01".ToDate.LastDayOfMonth.ToShortDateString
End If
@@ -337,9 +339,8 @@ Partial Class Compras_RepProductosServicios
If Not e.Row.DBCampo("GpoID") = "1" Then
e.Row.Cells(0).Text = String.Format("{1}", Liga, If(e.Row.DBCampo("GpoID") = "1", e.Row.DBCampo("Moneda"), e.Row.DBCampo("GPO")))
- e.Row.Cells(1).Text = String.Format("{1}", Liga, e.Row.DBCampo("Cantidad").FormatoNumero)
End If
-
+ e.Row.Cells(1).Text = String.Format("{1}", Liga, e.Row.DBCampo("Cantidad").FormatoNumero)
'Si son igual a cero se limpia el campo
If e.Row.DBCampo("SubTotal").ToDouble = 0 Then e.Row.Cells(2).Text = ""
@@ -482,7 +483,7 @@ Partial Class Compras_RepProductosServicios
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString()))
- params.Add(New ReportParameter("Filtros", $"{Proveedor}{FechaInicio}{FechaFin}{Grupo}{TipoGasto}{Categoria}{Clasificacion}{PS}{Proyecto}{Estatus}{Usuario}{TipoAF}{SubTipoAF}{AF}"))
+ params.Add(New ReportParameter("Filtros", $"{Grupo}{Proveedor}{FechaInicio}{FechaFin}{TipoGasto}{Categoria}{Clasificacion}{PS}{Proyecto}{Estatus}{Usuario}{TipoAF}{SubTipoAF}{AF}"))
'params.Add(New ReportParameter("Proveedor", DdlProveedor.SelectedItem.Text))
'params.Add(New ReportParameter("FechaInicio", txtFechaI.Text))
'params.Add(New ReportParameter("FechaFin", txtFechaF.Text))
diff --git a/Compras/RepRembolsoComprobaciones.aspx.vb b/Compras/RepRembolsoComprobaciones.aspx.vb
index 86983e786..50fd8aed0 100644
--- a/Compras/RepRembolsoComprobaciones.aspx.vb
+++ b/Compras/RepRembolsoComprobaciones.aspx.vb
@@ -198,7 +198,7 @@ Partial Class Compras_RepRembolsoComprobaciones
Msg.AppendFormat("Se unificaron todas las compras con éxito")
End If
- If UsuarioActual.Empresa.UsaContabilidad AndAlso Not TieneError Then
+ If UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" AndAlso Not TieneError Then
If ObjAC Is Nothing Then
TieneError = True
End If
diff --git a/Contabilidad/PopUpAuxiliar.aspx.vb b/Contabilidad/PopUpAuxiliar.aspx.vb
index e283fc11f..115d1b7b7 100644
--- a/Contabilidad/PopUpAuxiliar.aspx.vb
+++ b/Contabilidad/PopUpAuxiliar.aspx.vb
@@ -1,371 +1,371 @@
-Option Explicit On
-Option Strict On
-
-Imports Extensiones
-Imports Microsoft.Reporting.WebForms
-Imports System.Data
-
-Partial Class PopUpAuxiliar
- Inherits ClsPaginas
-
- Private Property Tipo As String
- Get
- Return ViewState("Tipo").ToString
- End Get
- Set(value As String)
- ViewState("Tipo") = value
- End Set
- End Property
-
- Private Property CveCliente As Integer
- Get
- Return ViewState("CveCliente").ToString.ToEntero
- End Get
- Set(value As Integer)
- ViewState("CveCliente") = value
- End Set
- End Property
-
- Private Property CveVenta As Integer
- Get
- Return ViewState("CveVenta").ToString.ToEntero
- End Get
- Set(value As Integer)
- ViewState("CveVenta") = value
- End Set
- End Property
-
- Private Property CveProveedor As Integer
- Get
- Return ViewState("CveProveedor").ToString.ToEntero
- End Get
- Set(value As Integer)
- ViewState("CveProveedor") = value
- End Set
- End Property
-
- Private Property CveCompra As Integer
- Get
- Return ViewState("CveCompra").ToString.ToEntero
- End Get
- Set(value As Integer)
- ViewState("CveCompra") = value
- End Set
- End Property
- Private Property DTDatos As DataTable
- Get
- Return CType(ViewState("DTDatos"), DataTable)
- End Get
- Set(value As DataTable)
- ViewState("DTDatos") = value
- End Set
- End Property
-
- Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
- If Not IsPostBack Then
- CType(Me.Master, BaseMasterPage).EsPopup = True
- CType(Me.Master, BaseMasterPage).PopupWidth = 915
- RegistraScript("$get('tdContenido').style.height='1000'")
-
- Tipo = Request("Tipo")
- CveCliente = 0
- CveProveedor = 0
- CargaDatos()
-
- End If
- End Sub
-
- Private Sub CargaDatos()
- GVAuxiliar.Columns(10).Visible = UsuarioActual.TienePermisoProceso(94)
+Option Explicit On
+Option Strict On
+
+Imports Extensiones
+Imports Microsoft.Reporting.WebForms
+Imports System.Data
+
+Partial Class PopUpAuxiliar
+ Inherits ClsPaginas
+
+ Private Property Tipo As String
+ Get
+ Return ViewState("Tipo").ToString
+ End Get
+ Set(value As String)
+ ViewState("Tipo") = value
+ End Set
+ End Property
+
+ Private Property CveCliente As Integer
+ Get
+ Return ViewState("CveCliente").ToString.ToEntero
+ End Get
+ Set(value As Integer)
+ ViewState("CveCliente") = value
+ End Set
+ End Property
+
+ Private Property CveVenta As Integer
+ Get
+ Return ViewState("CveVenta").ToString.ToEntero
+ End Get
+ Set(value As Integer)
+ ViewState("CveVenta") = value
+ End Set
+ End Property
+
+ Private Property CveProveedor As Integer
+ Get
+ Return ViewState("CveProveedor").ToString.ToEntero
+ End Get
+ Set(value As Integer)
+ ViewState("CveProveedor") = value
+ End Set
+ End Property
+
+ Private Property CveCompra As Integer
+ Get
+ Return ViewState("CveCompra").ToString.ToEntero
+ End Get
+ Set(value As Integer)
+ ViewState("CveCompra") = value
+ End Set
+ End Property
+ Private Property DTDatos As DataTable
+ Get
+ Return CType(ViewState("DTDatos"), DataTable)
+ End Get
+ Set(value As DataTable)
+ ViewState("DTDatos") = value
+ End Set
+ End Property
+
+ Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
+ If Not IsPostBack Then
+ CType(Me.Master, BaseMasterPage).EsPopup = True
+ CType(Me.Master, BaseMasterPage).PopupWidth = 915
+ RegistraScript("$get('tdContenido').style.height='1000'")
+
+ Tipo = Request("Tipo")
+ CveCliente = 0
+ CveProveedor = 0
+ CargaDatos()
+
+ End If
+ End Sub
+
+ Private Sub CargaDatos()
+ GVAuxiliar.Columns(10).Visible = UsuarioActual.TienePermisoProceso(94)
'GVAuxiliar.Columns(11).Visible = UsuarioActual.TienePermisoProceso(94)
- GVAuxiliar.Columns(12).Visible = UsuarioActual.TienePermisoProceso(94)
-
- Select Case Tipo
- Case "CxCClientes"
- CveCliente = Request("CveCliente").ToEntero
- CveVenta = Request("CveVenta").ToEntero
- CargaAuxiliarClienteCxC(CveCliente, CveVenta)
- LtlTipo1.Text = "Cuentas por Cobrar"
- LtlTipo2.Text = "Folio de la Venta"
- LtlTipo3.Text = "Fecha de la Venta"
- Case "AnticiposClientes"
- CveCliente = Request("CveCliente").ToEntero
- CveVenta = Request("CveVenta").ToEntero
- CargaAuxiliarClienteAnticipos(CveCliente, CveVenta)
- LtlTipo1.Text = "Anticipo de Clientes"
- LtlTipo2.Text = "Folio de la Venta"
- LtlTipo3.Text = "Fecha de la Venta"
- Case "CxPProveedor"
- CveProveedor = Request("CveProveedor").ToEntero
- CveCompra = Request("CveCompra").ToEntero
- CargaAuxiliarProveedor(CveProveedor, CveCompra)
- LtlTipo1.Text = "Cuentas por Pagar"
- LtlTipo2.Text = "Folio de la Compra"
- LtlTipo3.Text = "Fecha de la Compra"
- End Select
-
-
- UpDatos.Update()
- End Sub
-
- Private Sub CargaAuxiliarClienteCxC(CveCliente As Integer, CveVenta As Integer)
- Dim ObjMovtos As New ClsMovimientos()
- If ObjMovtos.GetCxCClienteAuxiliar(CveCliente, CveVenta) Then
- DTDatos = ObjMovtos.DtResultados
- GVAuxiliar.DataSource = ObjMovtos.DtResultados
- If ObjMovtos.DtResultados.Rows.Count > 0 Then
- LtlFechaVenta.Text = ObjMovtos.DtResultados.Rows(1)("FechaVenta").ToString.ToDate.ToShortDateString()
- LtlFolio.Text = ObjMovtos.DtResultados.Rows(1)("Folio").ToString
- LtlImporte.Text = ObjMovtos.DtResultados.Rows(1)("Total").ToString.FormatoNumero(2)
- LtlSaldo.Text = ObjMovtos.DtResultados.Rows(1)("Saldo").ToString.FormatoNumero(2)
- End If
- Else
- GVAuxiliar.DataSource = Nothing
- End If
- ObjMovtos.Dispose()
- GVAuxiliar.DataBind()
- End Sub
-
- Private Sub CargaAuxiliarClienteAnticipos(CveCliente As Integer, CveVenta As Integer)
- Dim ObjMovtos As New ClsMovimientos()
- If ObjMovtos.GetAnticiposClienteAuxiliar(CveCliente, CveVenta) Then
- DTDatos = ObjMovtos.DtResultados
- GVAuxiliar.DataSource = ObjMovtos.DtResultados
- If ObjMovtos.DtResultados.Rows.Count > 0 Then
- LtlFechaVenta.Text = ObjMovtos.DtResultados.Rows(1)("FechaVenta").ToString.ToDate.ToShortDateString()
- LtlFolio.Text = ObjMovtos.DtResultados.Rows(1)("Folio").ToString
- 'LtlImporte.Text = ObjMovtos.DtResultados.Rows(1)("Total").ToString.FormatoNumero(2)
- 'LtlSaldo.Text = ObjMovtos.DtResultados.Rows(1)("Saldo").ToString.FormatoNumero(2)
- End If
- Else
- GVAuxiliar.DataSource = Nothing
- End If
- ObjMovtos.Dispose()
- GVAuxiliar.DataBind()
- End Sub
-
- Private Sub CargaAuxiliarProveedor(CveProveedor As Integer, CveCompra As Integer)
- Dim ObjMovtos As New ClsContabilidad()
- If ObjMovtos.GetProveedorAuxiliar(CveProveedor, CveCompra) Then
- DTDatos = ObjMovtos.DtResultados
- GVAuxiliar.DataSource = ObjMovtos.DtResultados
- If ObjMovtos.DtResultados.Rows.Count > 0 Then
- LtlFechaVenta.Text = ObjMovtos.DtResultados.Rows(1)("FechaVenta").ToString.ToDate.ToShortDateString()
- LtlFolio.Text = ObjMovtos.DtResultados.Rows(1)("Folio").ToString
- LtlImporte.Text = ObjMovtos.DtResultados.Rows(1)("Total").ToString.FormatoNumero(2)
- LtlSaldo.Text = ObjMovtos.DtResultados.Rows(1)("Saldo").ToString.FormatoNumero(2)
- End If
- Else
- GVAuxiliar.DataSource = Nothing
- End If
- ObjMovtos.Dispose()
- GVAuxiliar.DataBind()
- End Sub
-
+ GVAuxiliar.Columns(12).Visible = UsuarioActual.TienePermisoProceso(94)
+
+ Select Case Tipo
+ Case "CxCClientes"
+ CveCliente = Request("CveCliente").ToEntero
+ CveVenta = Request("CveVenta").ToEntero
+ CargaAuxiliarClienteCxC(CveCliente, CveVenta)
+ LtlTipo1.Text = "Cuentas por Cobrar"
+ LtlTipo2.Text = "Folio de la Venta"
+ LtlTipo3.Text = "Fecha de la Venta"
+ Case "AnticiposClientes"
+ CveCliente = Request("CveCliente").ToEntero
+ CveVenta = Request("CveVenta").ToEntero
+ CargaAuxiliarClienteAnticipos(CveCliente, CveVenta)
+ LtlTipo1.Text = "Anticipo de Clientes"
+ LtlTipo2.Text = "Folio de la Venta"
+ LtlTipo3.Text = "Fecha de la Venta"
+ Case "CxPProveedor"
+ CveProveedor = Request("CveProveedor").ToEntero
+ CveCompra = Request("CveCompra").ToEntero
+ CargaAuxiliarProveedor(CveProveedor, CveCompra)
+ LtlTipo1.Text = "Cuentas por Pagar"
+ LtlTipo2.Text = "Folio de la Compra"
+ LtlTipo3.Text = "Fecha de la Compra"
+ End Select
+
+
+ UpDatos.Update()
+ End Sub
+
+ Private Sub CargaAuxiliarClienteCxC(CveCliente As Integer, CveVenta As Integer)
+ Dim ObjMovtos As New ClsMovimientos()
+ If ObjMovtos.GetCxCClienteAuxiliar(CveCliente, CveVenta) Then
+ DTDatos = ObjMovtos.DtResultados
+ GVAuxiliar.DataSource = ObjMovtos.DtResultados
+ If ObjMovtos.DtResultados.Rows.Count > 0 Then
+ LtlFechaVenta.Text = ObjMovtos.DtResultados.Rows(1)("FechaVenta").ToString.ToDate.ToShortDateString()
+ LtlFolio.Text = ObjMovtos.DtResultados.Rows(1)("Folio").ToString
+ LtlImporte.Text = ObjMovtos.DtResultados.Rows(1)("Total").ToString.FormatoNumero(2)
+ LtlSaldo.Text = ObjMovtos.DtResultados.Rows(1)("Saldo").ToString.FormatoNumero(2)
+ End If
+ Else
+ GVAuxiliar.DataSource = Nothing
+ End If
+ ObjMovtos.Dispose()
+ GVAuxiliar.DataBind()
+ End Sub
+
+ Private Sub CargaAuxiliarClienteAnticipos(CveCliente As Integer, CveVenta As Integer)
+ Dim ObjMovtos As New ClsMovimientos()
+ If ObjMovtos.GetAnticiposClienteAuxiliar(CveCliente, CveVenta) Then
+ DTDatos = ObjMovtos.DtResultados
+ GVAuxiliar.DataSource = ObjMovtos.DtResultados
+ If ObjMovtos.DtResultados.Rows.Count > 0 Then
+ LtlFechaVenta.Text = ObjMovtos.DtResultados.Rows(1)("FechaVenta").ToString.ToDate.ToShortDateString()
+ LtlFolio.Text = ObjMovtos.DtResultados.Rows(1)("Folio").ToString
+ 'LtlImporte.Text = ObjMovtos.DtResultados.Rows(1)("Total").ToString.FormatoNumero(2)
+ 'LtlSaldo.Text = ObjMovtos.DtResultados.Rows(1)("Saldo").ToString.FormatoNumero(2)
+ End If
+ Else
+ GVAuxiliar.DataSource = Nothing
+ End If
+ ObjMovtos.Dispose()
+ GVAuxiliar.DataBind()
+ End Sub
+
+ Private Sub CargaAuxiliarProveedor(CveProveedor As Integer, CveCompra As Integer)
+ Dim ObjMovtos As New ClsContabilidad()
+ If ObjMovtos.GetProveedorAuxiliar(CveProveedor, CveCompra) Then
+ DTDatos = ObjMovtos.DtResultados
+ GVAuxiliar.DataSource = ObjMovtos.DtResultados
+ If ObjMovtos.DtResultados.Rows.Count > 0 Then
+ LtlFechaVenta.Text = ObjMovtos.DtResultados.Rows(1)("FechaVenta").ToString.ToDate.ToShortDateString()
+ LtlFolio.Text = ObjMovtos.DtResultados.Rows(1)("Folio").ToString
+ LtlImporte.Text = ObjMovtos.DtResultados.Rows(1)("Total").ToString.FormatoNumero(2)
+ LtlSaldo.Text = ObjMovtos.DtResultados.Rows(1)("Saldo").ToString.FormatoNumero(2)
+ End If
+ Else
+ GVAuxiliar.DataSource = Nothing
+ End If
+ ObjMovtos.Dispose()
+ GVAuxiliar.DataBind()
+ End Sub
+
Protected Sub GVAuxiliar_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAuxiliar.RowDataBound
- If e.Row.RowType = DataControlRowType.DataRow Then
- If e.Row.RowIndex = 0 Then
- e.Row.BackColor = Drawing.Color.LightGray
- e.Row.FCLiteral("LtlFechaMovto").Text = "Totales: "
- e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Right
- e.Row.Cells(0).ColumnSpan = 2
- e.Row.Cells(1).Visible = False
- e.Row.Cells(4).ColumnSpan = 3
- e.Row.Cells(5).Visible = False
- e.Row.Cells(6).Visible = False
- e.Row.Cells(7).Visible = False
- e.Row.Cells(8).Visible = False
- e.Row.Cells(12).Visible = False
- ElseIf e.Row.RowIndex = 1 Then
- e.Row.Cells(0).Width = Unit.Pixel(95)
- e.Row.Cells(1).Width = Unit.Pixel(180)
- e.Row.Cells(2).Width = Unit.Pixel(80)
- e.Row.Cells(3).Width = Unit.Pixel(80)
- e.Row.Cells(4).Width = Unit.Pixel(83)
- e.Row.Cells(5).Width = Unit.Pixel(93)
- e.Row.Cells(6).Width = Unit.Pixel(85)
- e.Row.Cells(7).Width = Unit.Pixel(95)
- e.Row.Cells(8).Width = Unit.Pixel(70)
- End If
-
- e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
- e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Right
- e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Right
- e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Left
-
- If e.Row.FCLiteral("LtlContabilizado").Text = "Si" Then
- Dim Liga As String = String.Format("", e.Row.DBCampo("IdPoliza"))
- e.Row.FCLiteral("LtlPoliza").Text = String.Format("{0}{1}", Liga, e.Row.DBCampo("Poliza"))
- End If
-
- If e.Row.DBCampo("CveConceptoContable").ToEntero.Contiene(2) AndAlso e.Row.DBCampo("CvePersonal").ToEntero > 0 Then
- Dim Liga As String = String.Format("", e.Row.DBCampo("CvePersonal"))
- e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}", Liga, e.Row.DBCampo("ConceptoContable"))
- End If
-
- If e.Row.DBCampo("TipoReferencia").ToEntero = 1 Then
- e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Bancos/IE.aspx?CveIE={e.Row.DBCampo("CveReferencia").ToEntero}"
- 'If e.Row.DBCampo("CveReferencia").ToEntero > 0 Then
- ' e.Row.Cells(10).Text = ""
- 'End If
- ElseIf e.Row.DBCampo("TipoReferencia").ToEntero = 2 Then
- Select Case Tipo
- Case "CxCClientes"
- e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={e.Row.DBCampo("CveReferencia").ToEntero}"
- Case "CxPProveedor"
- e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Compras/Compras.aspx?CveCompra={e.Row.DBCampo("CveReferencia").ToEntero}"
- End Select
- End If
-
- 'If e.Row.DBCampo("CveConceptoContable").ToEntero.Contiene(272) AndAlso e.Row.DBCampo("CveCompraAmortizacion").ToEntero > 0 Then
- ' Dim Liga As String = String.Format("", e.Row.DBCampo("CveCompraAmortizacion"))
- ' e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}", Liga, e.Row.DBCampo("ConceptoContable"))
- 'End If
-
- If e.Row.DBCampo("CveConceptoContable").ToEntero.Contiene(275) AndAlso e.Row.DBCampo("CveVenta").ToEntero > 0 Then
- e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={e.Row.DBCampo("CveVenta").ToEntero}"
- 'Dim Liga As String = String.Format("", e.Row.DBCampo("CveVenta"))
- 'e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}", Liga, e.Row.DBCampo("ConceptoContable"))
-
- End If
-
- End If
- End Sub
-
- Protected Sub GvDatos_RowDeleting(ByVal sender As Object, ByVal e As GridViewDeleteEventArgs) Handles GVAuxiliar.RowDeleting
-
- Dim ObjContPaq As ClsContPAQi = Nothing
- Dim Conta As New ClsContabilidad()
- Conta.IniciaTransacSQL()
-
- Dim ClavePrePoliza = GVAuxiliar.Rows(e.RowIndex).DataKey("CvePrePolizaOriginal").ToEntero
- Dim IdPoliza = GVAuxiliar.Rows(e.RowIndex).DataKey("IdPoliza").ToEntero
-
- Dim TieneError = False
-
- If Not TieneError Then
- If Not Conta.UpdatePrePolizasDetalleBloquear(ClavePrePoliza, False) Then
- TieneError = True
- End If
- End If
-
- If Not Conta.RemovePrePolizas(ClavePrePoliza, UsuarioActual.CveEmpresa) Then
- TieneError = True
- End If
-
- If Conta.ValidacionPrePolizaCuadre(ClavePrePoliza, -1) Then
- If Conta.ValorPolizaDescuadre > 0 Then
- TieneError = True
- End If
- End If
-
- If Not TieneError Then
- If IdPoliza > 0 Then
- If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad Then
- ObjContPaq = New ClsContPAQi(UsuarioActual.Empresa)
- ObjContPaq.IniciaTransacSQL()
-
- If Not ObjContPaq.RemovePoliza(IdPoliza) Then
- TieneError = True
- End If
-
- End If
- End If
- End If
-
- If Not TieneError Then
- Alert("Movimiento Eliminado", TipoMensaje.MsgInformacion, "window.opener.location.reload(); window.close();")
- If ObjContPaq IsNot Nothing Then ObjContPaq.Commit()
- Conta.Commit()
- Else
- If ObjContPaq IsNot Nothing Then ObjContPaq.RollBack()
- Conta.RollBack()
- End If
- If ObjContPaq IsNot Nothing Then ObjContPaq.Dispose()
- Conta.Dispose()
- CargaDatos()
- End Sub
-
- Private Sub GVAuxiliar_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GVAuxiliar.RowUpdating
- Dim CvePrePoliza As Integer
- Dim ObjConta As New ClsContabilidad
- ObjConta.IniciaTransacSQL()
- Dim CvePlantillaPoliza As Integer = 0
- Dim Importe As Decimal
- Dim MsgError As String = ""
-
- If GVAuxiliar.Rows(e.RowIndex).DataKey("Cargo").ToDecimal > GVAuxiliar.Rows(e.RowIndex).DataKey("Abono").ToDecimal Then
- Importe = GVAuxiliar.Rows(e.RowIndex).DataKey("Cargo").ToDecimal
- Else
- Importe = GVAuxiliar.Rows(e.RowIndex).DataKey("Abono").ToDecimal
- End If
-
- If CveCliente > 0 Then CvePlantillaPoliza = 11
- If CveProveedor > 0 Then CvePlantillaPoliza = 2
-
- CvePrePoliza = ObjConta.AddPrePolizas("Contabilidad/PopUpAuxiliar", CvePlantillaPoliza, Importe, Importe, 1, Now, "Cancelacion de Pago", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
-
- If CvePlantillaPoliza = 2 Then
- If Not ObjConta.CancelarPagoCompraConAnticipo(CvePrePoliza, CveCompra, GVAuxiliar.Rows(e.RowIndex).DataKey("CveReferencia").ToEntero) Then
- MsgError = "Ocurrió un error al cancelar el pago de la compra"
- End If
- End If
-
- If CvePlantillaPoliza = 11 Then
- If Not ObjConta.CancelarPagoVentaConAnticipo(CvePrePoliza, CveVenta, GVAuxiliar.Rows(e.RowIndex).DataKey("CveReferencia").ToEntero) Then
- MsgError = "Ocurrió un error al cancelar el pago de la venta"
- End If
- End If
-
- If MsgError = "" Then
- ObjConta.Commit()
- Alert("El movimiento se canceló exitosamente.")
- Else
- ObjConta.RollBack()
- Alert(MsgError, TipoMensaje.MsgError)
- End If
-
-
- ObjConta.Dispose()
- End Sub
- Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkPagosClientesBancosExcel.Click
- GenerarPDF("Excel")
- End Sub
- Private Sub LinkPDF_Click(sender As Object, e As EventArgs) Handles LnkPagosClientesBancosPDF.Click
- GenerarPDF()
- End Sub
- Private Sub GenerarPDF(Optional Formato As String = "PDF")
- Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
- Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
-
- If DTDatos IsNot Nothing And DTDatos.Rows.Count > 0 Then
-
- Dim params As New List(Of ReportParameter)
-
- params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
- params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
- params.Add(New ReportParameter("Tipo", LtlTipo1.Text))
- params.Add(New ReportParameter("Folio", LtlFolio.Text))
- params.Add(New ReportParameter("Fecha", LtlFechaVenta.Text))
- params.Add(New ReportParameter("Importe", LtlImporte.Text))
- params.Add(New ReportParameter("Saldo", LtlSaldo.Text))
-
- If Imagen.Exists Then
- params.Add(New ReportParameter("LogoPath", logouri))
- Else
- params.Add(New ReportParameter("LogoPath", ""))
- End If
-
- ImprimirPDF("Empresas\Grales\Formatos\RepAuxiliarContable.rdlc", DTDatos, params, "RepAuxiliarContable_" & LtlFolio.Text, Formato:=Formato)
-
- Else
- Alert("No se encontró información suficiente.", TipoMensaje.MsgAdvertencia)
- End If
-
+ If e.Row.RowType = DataControlRowType.DataRow Then
+ If e.Row.RowIndex = 0 Then
+ e.Row.BackColor = Drawing.Color.LightGray
+ e.Row.FCLiteral("LtlFechaMovto").Text = "Totales: "
+ e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Right
+ e.Row.Cells(0).ColumnSpan = 2
+ e.Row.Cells(1).Visible = False
+ e.Row.Cells(4).ColumnSpan = 3
+ e.Row.Cells(5).Visible = False
+ e.Row.Cells(6).Visible = False
+ e.Row.Cells(7).Visible = False
+ e.Row.Cells(8).Visible = False
+ e.Row.Cells(12).Visible = False
+ ElseIf e.Row.RowIndex = 1 Then
+ e.Row.Cells(0).Width = Unit.Pixel(95)
+ e.Row.Cells(1).Width = Unit.Pixel(180)
+ e.Row.Cells(2).Width = Unit.Pixel(80)
+ e.Row.Cells(3).Width = Unit.Pixel(80)
+ e.Row.Cells(4).Width = Unit.Pixel(83)
+ e.Row.Cells(5).Width = Unit.Pixel(93)
+ e.Row.Cells(6).Width = Unit.Pixel(85)
+ e.Row.Cells(7).Width = Unit.Pixel(95)
+ e.Row.Cells(8).Width = Unit.Pixel(70)
+ End If
+
+ e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
+ e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Right
+ e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Right
+ e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Left
+
+ If e.Row.FCLiteral("LtlContabilizado").Text = "Si" Then
+ Dim Liga As String = String.Format("", e.Row.DBCampo("IdPoliza"))
+ e.Row.FCLiteral("LtlPoliza").Text = String.Format("{0}{1}", Liga, e.Row.DBCampo("Poliza"))
+ End If
+
+ If e.Row.DBCampo("CveConceptoContable").ToEntero.Contiene(2) AndAlso e.Row.DBCampo("CvePersonal").ToEntero > 0 Then
+ Dim Liga As String = String.Format("", e.Row.DBCampo("CvePersonal"))
+ e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}", Liga, e.Row.DBCampo("ConceptoContable"))
+ End If
+
+ If e.Row.DBCampo("TipoReferencia").ToEntero = 1 Then
+ e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Bancos/IE.aspx?CveIE={e.Row.DBCampo("CveReferencia").ToEntero}"
+ 'If e.Row.DBCampo("CveReferencia").ToEntero > 0 Then
+ ' e.Row.Cells(10).Text = ""
+ 'End If
+ ElseIf e.Row.DBCampo("TipoReferencia").ToEntero = 2 Then
+ Select Case Tipo
+ Case "CxCClientes"
+ e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={e.Row.DBCampo("CveReferencia").ToEntero}"
+ Case "CxPProveedor"
+ e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Compras/Compras.aspx?CveCompra={e.Row.DBCampo("CveReferencia").ToEntero}"
+ End Select
+ End If
+
+ 'If e.Row.DBCampo("CveConceptoContable").ToEntero.Contiene(272) AndAlso e.Row.DBCampo("CveCompraAmortizacion").ToEntero > 0 Then
+ ' Dim Liga As String = String.Format("", e.Row.DBCampo("CveCompraAmortizacion"))
+ ' e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}", Liga, e.Row.DBCampo("ConceptoContable"))
+ 'End If
+
+ If e.Row.DBCampo("CveConceptoContable").ToEntero.Contiene(275) AndAlso e.Row.DBCampo("CveVenta").ToEntero > 0 Then
+ e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={e.Row.DBCampo("CveVenta").ToEntero}"
+ 'Dim Liga As String = String.Format("", e.Row.DBCampo("CveVenta"))
+ 'e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}", Liga, e.Row.DBCampo("ConceptoContable"))
+
+ End If
+
+ End If
+ End Sub
+
+ Protected Sub GvDatos_RowDeleting(ByVal sender As Object, ByVal e As GridViewDeleteEventArgs) Handles GVAuxiliar.RowDeleting
+
+ Dim ObjContPaq As ClsContPAQi = Nothing
+ Dim Conta As New ClsContabilidad()
+ Conta.IniciaTransacSQL()
+
+ Dim ClavePrePoliza = GVAuxiliar.Rows(e.RowIndex).DataKey("CvePrePolizaOriginal").ToEntero
+ Dim IdPoliza = GVAuxiliar.Rows(e.RowIndex).DataKey("IdPoliza").ToEntero
+
+ Dim TieneError = False
+
+ If Not TieneError Then
+ If Not Conta.UpdatePrePolizasDetalleBloquear(ClavePrePoliza, False) Then
+ TieneError = True
+ End If
+ End If
+
+ If Not Conta.RemovePrePolizas(ClavePrePoliza, UsuarioActual.CveEmpresa) Then
+ TieneError = True
+ End If
+
+ If Conta.ValidacionPrePolizaCuadre(ClavePrePoliza, -1) Then
+ If Conta.ValorPolizaDescuadre > 0 Then
+ TieneError = True
+ End If
+ End If
+
+ If Not TieneError Then
+ If IdPoliza > 0 Then
+ If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad Then
+ ObjContPaq = New ClsContPAQi(UsuarioActual.Empresa)
+ ObjContPaq.IniciaTransacSQL()
+
+ If Not ObjContPaq.RemovePoliza(IdPoliza) Then
+ TieneError = True
+ End If
+
+ End If
+ End If
+ End If
+
+ If Not TieneError Then
+ Alert("Movimiento Eliminado", TipoMensaje.MsgInformacion, "window.opener.location.reload(); window.close();")
+ If ObjContPaq IsNot Nothing Then ObjContPaq.Commit()
+ Conta.Commit()
+ Else
+ If ObjContPaq IsNot Nothing Then ObjContPaq.RollBack()
+ Conta.RollBack()
+ End If
+ If ObjContPaq IsNot Nothing Then ObjContPaq.Dispose()
+ Conta.Dispose()
+ CargaDatos()
+ End Sub
+
+ Private Sub GVAuxiliar_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GVAuxiliar.RowUpdating
+ Dim CvePrePoliza As Integer
+ Dim ObjConta As New ClsContabilidad
+ ObjConta.IniciaTransacSQL()
+ Dim CvePlantillaPoliza As Integer = 0
+ Dim Importe As Decimal
+ Dim MsgError As String = ""
+
+ If GVAuxiliar.Rows(e.RowIndex).DataKey("Cargo").ToDecimal > GVAuxiliar.Rows(e.RowIndex).DataKey("Abono").ToDecimal Then
+ Importe = GVAuxiliar.Rows(e.RowIndex).DataKey("Cargo").ToDecimal
+ Else
+ Importe = GVAuxiliar.Rows(e.RowIndex).DataKey("Abono").ToDecimal
+ End If
+
+ If CveCliente > 0 Then CvePlantillaPoliza = 11
+ If CveProveedor > 0 Then CvePlantillaPoliza = 2
+
+ CvePrePoliza = ObjConta.AddPrePolizas("Contabilidad/PopUpAuxiliar", CvePlantillaPoliza, Importe, Importe, 1, Now, "Cancelacion de Pago", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
+
+ If CvePlantillaPoliza = 2 Then
+ If Not ObjConta.CancelarPagoCompraConAnticipo(CvePrePoliza, CveCompra, GVAuxiliar.Rows(e.RowIndex).DataKey("CveReferencia").ToEntero) Then
+ MsgError = "Ocurrió un error al cancelar el pago de la compra"
+ End If
+ End If
+
+ If CvePlantillaPoliza = 11 Then
+ If Not ObjConta.CancelarPagoVentaConAnticipo(CvePrePoliza, CveVenta, GVAuxiliar.Rows(e.RowIndex).DataKey("CveReferencia").ToEntero) Then
+ MsgError = "Ocurrió un error al cancelar el pago de la venta"
+ End If
+ End If
+
+ If MsgError = "" Then
+ ObjConta.Commit()
+ Alert("El movimiento se canceló exitosamente.")
+ Else
+ ObjConta.RollBack()
+ Alert(MsgError, TipoMensaje.MsgError)
+ End If
+
+
+ ObjConta.Dispose()
+ End Sub
+ Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkPagosClientesBancosExcel.Click
+ GenerarPDF("Excel")
+ End Sub
+ Private Sub LinkPDF_Click(sender As Object, e As EventArgs) Handles LnkPagosClientesBancosPDF.Click
+ GenerarPDF()
+ End Sub
+ Private Sub GenerarPDF(Optional Formato As String = "PDF")
+ Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
+ Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
+
+ If DTDatos IsNot Nothing And DTDatos.Rows.Count > 0 Then
+
+ Dim params As New List(Of ReportParameter)
+
+ params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
+ params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
+ params.Add(New ReportParameter("Tipo", LtlTipo1.Text))
+ params.Add(New ReportParameter("Folio", LtlFolio.Text))
+ params.Add(New ReportParameter("Fecha", LtlFechaVenta.Text))
+ params.Add(New ReportParameter("Importe", LtlImporte.Text))
+ params.Add(New ReportParameter("Saldo", LtlSaldo.Text))
+
+ If Imagen.Exists Then
+ params.Add(New ReportParameter("LogoPath", logouri))
+ Else
+ params.Add(New ReportParameter("LogoPath", ""))
+ End If
+
+ ImprimirPDF("Empresas\Grales\Formatos\RepAuxiliarContable.rdlc", DTDatos, params, "RepAuxiliarContable_" & LtlFolio.Text, Formato:=Formato)
+
+ Else
+ Alert("No se encontró información suficiente.", TipoMensaje.MsgAdvertencia)
+ End If
+
End Sub
Property CvePrePolizaNegativa As Integer
@@ -390,23 +390,37 @@ Partial Class PopUpAuxiliar
Dim TieneError As Boolean = False
ObjContabilidad.IniciaTransacSQL()
- If ObjContabilidad.AddPrePolizasNegativa(CvePrePoliza, UsuarioActual.CveUsuario, TxtConceptoCancelacion.Text, UsuarioActual.CveEmpresa, TxtFechaCancelacion.Text.ToDate) Then
- Alert("Se agrego polzia negativa correctamente.")
- Else
+ Dim CvePrePolizaNueva As Integer = ObjContabilidad.AddPrePolizasNegativa(CvePrePoliza, UsuarioActual.CveUsuario, TxtConceptoCancelacion.Text, UsuarioActual.CveEmpresa, TxtFechaCancelacion.Text.ToDate)
+
+ If Not CvePrePolizaNueva > 0 Then
+
+
TieneError = True
End If
- If TieneError Then
- ObjContabilidad.RollBack()
- Else
+ If Not TieneError Then
+
ObjContabilidad.Commit()
+ Dim Str As New StringBuilder
+ Str.Append("Se agrego la póliza de cancelación correctamente. ")
RegistraScript(" $('#DivCancelar').modal('hide'); ")
- CargaDatos()
+ If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
+ If ObjContabilidad.ContabilizarPrePoliza(CvePrePolizaNueva, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
+ Str.AppendFormat("Ver Poliza", ObjContabilidad.ContaIdPoliza)
+
+ End If
+ End If
+ Alert(Str.ToString)
+ Else
+ ObjContabilidad.RollBack()
+
End If
- ObjContabilidad.Dispose()
+ ObjContabilidad.Dispose()
+ CargaDatos()
+
End Sub
@@ -424,4 +438,4 @@ Partial Class PopUpAuxiliar
-End Class
+End Class
diff --git a/Contratos/Contrato.aspx.vb b/Contratos/Contrato.aspx.vb
index c75646a73..31701ab12 100644
--- a/Contratos/Contrato.aspx.vb
+++ b/Contratos/Contrato.aspx.vb
@@ -3260,7 +3260,7 @@ Partial Class Contratos_Default
Dim ProductoServicio As String = Row("Producto/Servicio").ToString.Trim.ToUpper
Dim PrecioUnitario As Double = Row("Precio Unitario").ToString.ToDouble
Dim CvePS As Integer = 0
- Dim CveUM As Integer = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUnidadMedida", $"CvePS = '{CvePS}'").ToString.ToEntero
+ Dim CveUM As Integer = 0 ' GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUnidadMedida", $"CvePS = '{CvePS}'").ToString.ToEntero
Dim CodigoPS As Integer = 0
Dim Total As Double = (Cantidad * PrecioUnitario)
diff --git a/CxC/RepCxC.aspx.vb b/CxC/RepCxC.aspx.vb
index 73cac2e84..34a9b77b2 100644
--- a/CxC/RepCxC.aspx.vb
+++ b/CxC/RepCxC.aspx.vb
@@ -694,7 +694,7 @@ Partial Class RepCxC
Dim Registro = If(DdlUsuario.SelectedValue = "-1", "", $" Registró: {DdlUsuario.SelectedItem.Text}")
Dim Responsable = If(DdlResponsable.SelectedValue = "-1", "", $" Responsable: {DdlResponsable.SelectedItem.Text}")
Dim EstatusCob = If(DdlCobranzaEstatus.SelectedValue = "-1", "", $" Estatus Cobranza: {DdlCobranzaEstatus.SelectedItem.Text}")
- 'Dim CorteA As String = If(txtCorteA.Text = "31/12/2018", "", $" Corte A: {txtCorteA.Text}")
+ Dim CorteA As String = If(txtCorteA.Text = "31/12/2019", "", $" Corte A: {txtCorteA.Text}")
Dim EstatusCli = If(DdlEstatusCliente.SelectedValue = "-1", "", $" Clientes: {DdlEstatusCliente.SelectedItem.Text}")
Dim ClasificacionCli = If(DdlClienteClasificacion.SelectedValue = "-1", "", $" Clasificación Cliente: {DdlClienteClasificacion.SelectedItem.Text}")
@@ -725,7 +725,7 @@ Partial Class RepCxC
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
params.Add(New ReportParameter("Grupo", DdlGrupo.SelectedItem.Text))
- params.Add(New ReportParameter("AgrupadoPor", $"{Cliente}{Sucursal}{Grupo}{Vendedor}{FechaIn}{FechaFn}{Registro}{Responsable}{TipoDocto}{EstatusCob}{FVI}{FVF}{EstatusCli}{ClasificacionCli}"))
+ params.Add(New ReportParameter("AgrupadoPor", $"{Cliente}{Sucursal}{Grupo}{Vendedor}{FechaIn}{FechaFn}{Registro}{Responsable}{TipoDocto}{EstatusCob}{FVI}{FVF}{EstatusCli}{ClasificacionCli}{CorteA}"))
params.Add(New ReportParameter("TituloReporte", TituloReporte))
params.Add(New ReportParameter("CantColumnas", CantidadColumnas.ToString))
diff --git a/CxC/RepCxCDetalle.aspx.vb b/CxC/RepCxCDetalle.aspx.vb
index 86922f5fa..d32b14256 100644
--- a/CxC/RepCxCDetalle.aspx.vb
+++ b/CxC/RepCxCDetalle.aspx.vb
@@ -833,7 +833,7 @@ Partial Class RepCxCDetalle
Dim Registro = If(DdlUsuario.SelectedValue = "-1", "", $" Registró: {DdlUsuario.SelectedItem.Text}")
Dim Responsable = If(DdlResponsable.SelectedValue = "-1", "", $" Responsable: {DdlResponsable.SelectedItem.Text}")
Dim EstatusCob = If(DdlCobranzaEstatusFiltro.SelectedValue = "-1", "", $" Estatus Cobranza: {DdlCobranzaEstatusFiltro.SelectedItem.Text}")
- 'Dim CorteA As String = If(txtCorteA.Text = "31/12/2018", "", $" Corte A: {txtCorteA.Text}")
+ Dim CorteA As String = If(txtCorteA.Text = "31/12/2019", "", $" Corte A: {txtCorteA.Text}")
Dim ClasificacionCli = If(DdlClienteClasificacion.SelectedValue = "-1", "", $" Clasificación Cliente: {DdlClienteClasificacion.SelectedItem.Text}")
Dim TituloReporte As String = "REPORTE DE CUENTAS POR COBRAR DEL CLIENTE CON DETALLE"
@@ -850,7 +850,7 @@ Partial Class RepCxCDetalle
params.Add(New ReportParameter("FechaFin", FechaF))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
- params.Add(New ReportParameter("AgrupadoPor", $"{Cliente}{Sucursal}{Grupo}{Vendedor}{FechaIn}{FechaFn}{Registro}{Responsable}{TipoDocto}{EstatusCob}{FVI}{FVF}{ClasificacionCli}"))
+ params.Add(New ReportParameter("AgrupadoPor", $"{Cliente}{Sucursal}{Grupo}{Vendedor}{FechaIn}{FechaFn}{Registro}{Responsable}{TipoDocto}{EstatusCob}{FVI}{FVF}{ClasificacionCli}{CorteA}"))
params.Add(New ReportParameter("TituloReporte", TituloReporte))
If Imagen.Exists Then
diff --git a/Empresas/119/Formatos/RepClientesCxC.rpt b/Empresas/119/Formatos/RepClientesCxC.rpt
index 246d65950..f8e06f121 100644
Binary files a/Empresas/119/Formatos/RepClientesCxC.rpt and b/Empresas/119/Formatos/RepClientesCxC.rpt differ
diff --git a/Empresas/137/Formatos/RepClientesCxC.rpt b/Empresas/137/Formatos/RepClientesCxC.rpt
index 132388990..e73183a2d 100644
Binary files a/Empresas/137/Formatos/RepClientesCxC.rpt and b/Empresas/137/Formatos/RepClientesCxC.rpt differ
diff --git a/Empresas/144/Formatos/Factura.rdlc b/Empresas/144/Formatos/Factura.rdlc
index a8f6d9968..6f7296e9b 100644
--- a/Empresas/144/Formatos/Factura.rdlc
+++ b/Empresas/144/Formatos/Factura.rdlc
@@ -1209,7 +1209,7 @@
- ). Valor recibido a mi (nuestra) entera satisfacción. La falta de pago de éste documento a su vencimiento dará derecho a Soluciones en Telemedición JAR 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
+ ). Valor recibido a mi (nuestra) entera satisfacción. La falta de pago de éste documento a su vencimiento dará derecho a PAOLA CASTILLO VALENZUELA 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
- Moneda
+ SerieFolio1
@@ -301,14 +301,14 @@
-
+
true
true
- =Fields!SerieFolio.Value
+ =Fields!Moneda.Value
- SerieFolio
+ Moneda
@@ -457,7 +457,7 @@
- Moneda
+ Serie/Folio
@@ -685,7 +685,7 @@
- Serie/Folio
+ Moneda
diff --git a/Empresas/Grales/Formatos/RepProductosServiciosDetalle.rdlc b/Empresas/Grales/Formatos/RepProductosServiciosDetalle.rdlc
index ce7fb0e14..c9bcd8e99 100644
--- a/Empresas/Grales/Formatos/RepProductosServiciosDetalle.rdlc
+++ b/Empresas/Grales/Formatos/RepProductosServiciosDetalle.rdlc
@@ -456,7 +456,7 @@
@@ -468,7 +468,7 @@
- =iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")
+ =iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")
2pt
2pt
2pt
@@ -490,7 +490,7 @@
8pt
=iif(Fields!CveVenta.Value = "", "Bold", "Normal")
dd/MM/yyyy
- =iif(Fields!CveVenta.Value= "", "White", "Black")
+ =iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")
@@ -504,7 +504,7 @@
- =iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")
+ =iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")
2pt
2pt
2pt
@@ -525,7 +525,7 @@
@@ -537,7 +537,7 @@
- =iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")
+ =iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")
2pt
2pt
2pt
@@ -555,11 +555,11 @@
- =Fields!Nombre.Value
+ =IIf(Fields!Nombre.Value = "", IIf(Fields!Gpo.Value = "", Fields!Moneda.Value, Fields!Gpo.Value), Fields!Nombre.Value)
@@ -571,13 +571,14 @@
- =iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")
+ =iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")
2pt
2pt
2pt
2pt
+ true
@@ -592,7 +593,7 @@
@@ -606,7 +607,7 @@
- =iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")
+ =iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")
2pt
2pt
2pt
@@ -629,7 +630,7 @@
8pt
=iif(Fields!CveVenta.Value = "", "Bold", "Normal")
f2
- =iif(Fields!CveVenta.Value= "", "White", "Black")
+ =iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")
@@ -641,7 +642,7 @@
- =iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")
+ =iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")
2pt
2pt
2pt
@@ -664,7 +665,7 @@
8pt
=iif(Fields!CveVenta.Value = "", "Bold", "Normal")
#,0.00;- #,0.00;'-'
- =iif(Fields!CveVenta.Value= "", "White", "Black")
+ =iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")
@@ -678,7 +679,7 @@
- =iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")
+ =iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")
2pt
2pt
2pt
@@ -701,7 +702,7 @@
8pt
=iif(Fields!CveVenta.Value = "", "Bold", "Normal")
#,0.00;- #,0.00;'-'
- =iif(Fields!CveVenta.Value= "", "White", "Black")
+ =iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")
@@ -715,7 +716,7 @@
- =iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")
+ =iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")
2pt
2pt
2pt
@@ -737,7 +738,7 @@
8pt
=iif(Fields!CveVenta.Value = "", "Bold", "Normal")
#,0.00;-#,0.00;'-'
- =iif(Fields!CveVenta.Value= "", "White", "Black")
+ =iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")
@@ -751,7 +752,7 @@
- =iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")
+ =iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")
2pt
2pt
2pt
@@ -773,7 +774,7 @@
8pt
=iif(Fields!CveVenta.Value = "", "Bold", "Normal")
#,0.00;- #,0.00;'-'
- =iif(Fields!CveVenta.Value= "", "White", "Black")
+ =iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")
@@ -787,7 +788,7 @@
- =iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")
+ =iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")
2pt
2pt
2pt
@@ -810,7 +811,7 @@
8pt
=iif(Fields!CveVenta.Value = "", "Bold", "Normal")
#,0.00;-#,0.00;'-'
- =iif(Fields!CveVenta.Value= "", "White", "Black")
+ =iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")
@@ -824,7 +825,7 @@
- =iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")
+ =iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")
2pt
2pt
2pt
@@ -896,14 +897,16 @@
-
+
Textbox1
0.18521cm
- 2.8349cm
+ 3.37444cm
0.6cm
- 12.60299cm
+ 21.20747cm
@@ -949,9 +952,9 @@
Textbox2
1.10271cm
- 8.17404cm
+ 9.22743cm
0.52945cm
- 10.36447cm
+ 10.12635cm
1
- 0.58209cm
+ 1.04773cm
true
true
@@ -1140,9 +1143,9 @@
Textbox10
0.0829cm
- 9.84544cm
+ 10.83183cm
0.38981cm
- 2.92333cm
+ 2.91804cm
3
+
+
+
+
+
+ Textbox11
+ 0.0829cm
+ 13.56466cm
+ 0.38981cm
+ 6.47703cm
+ 4
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ IMPRESO EN SIG, Rep. Productos Servicios
- Textbox11
- 0.0829cm
- 12.75466cm
+ Textbox9
+ 0.50799cm
+ 0.06614cm
0.38981cm
- 4.32745cm
- 4
+ 6.69369cm
+ 5
@@ -1272,6 +1309,14 @@
Nombre
System.String
+
+ Gpo
+ System.String
+
+
+ Moneda
+ System.String
+
Codigo
System.String
@@ -1331,6 +1376,7 @@
ReportParameter1
+ es-MX
Cm
40c94aad-a12a-44fb-ab0d-ea36a9656792
\ No newline at end of file
diff --git a/Empresas/Grales/Formatos/RepProductosServiciosDetalleCompra.rdlc b/Empresas/Grales/Formatos/RepProductosServiciosDetalleCompra.rdlc
index 25d996c63..e41a1122b 100644
--- a/Empresas/Grales/Formatos/RepProductosServiciosDetalleCompra.rdlc
+++ b/Empresas/Grales/Formatos/RepProductosServiciosDetalleCompra.rdlc
@@ -5,9 +5,6 @@
-
- 1.60749cm
-
1.70081cm
@@ -15,73 +12,40 @@
1.92431cm
- 3.73987cm
+ 4.71883cm
- 2.5cm
+ 1.41521cm
- 4.74981cm
+ 2.95064cm
- 1.3231cm
+ 1.69352cm
- 2.88058cm
+ 1.84871cm
- 1.70617cm
+ 1.65325cm
1.82697cm
- 1.70625cm
+ 1.65333cm
- 1.85343cm
+ 3.70551cm
+
+
+ 2.5cm
0.47879cm
-
-
-
- true
- true
-
-
-
-
- SerieFolio
-
-
-
-
-
-
- Textbox4
-
-
- Silver
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
@@ -163,7 +127,7 @@
- Proveedor
+ Producto/Servicio
-
+
- SerieFolio1
+ Textbox4
+ LightGrey
+
- =iif(Fields!CveCompra.Value = "", "#67809F", "Transparent")
+ Silver
2pt
2pt
2pt
@@ -516,6 +478,11 @@
+
+
+
+ 0.42588cm
+
@@ -587,14 +554,14 @@
-
+
true
true
- =Fields!RazonSocial.Value
+ =IIf(Fields!CveCompra.Value <= 0, IIf(Fields!GPO.Value = "", Fields!SerieFolio.Value, Fields!GPO.Value),Fields!PS.Value)
@@ -621,14 +588,14 @@
-
+
true
true
- =Fields!SubProyecto.Value
+ =Fields!CodigoAF.Value
-
+
- SubProyecto
+ CodigoAF1
@@ -655,14 +624,14 @@
-
+
true
true
- =Fields!PS.Value
+ =Fields!Clasificacion.Value
@@ -690,81 +659,7 @@
-
- true
- true
-
-
-
-
- =Fields!CodigoAF.Value
-
-
-
-
-
-
- CodigoAF
-
-
- =iif(Fields!CveCompra.Value = "", "#67809F", "Transparent")
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Fields!Clasificacion.Value
-
-
-
-
-
-
- Clasificacion
-
-
- =iif(Fields!CveCompra.Value = "", "#67809F", "Transparent")
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
+
true
true
@@ -775,7 +670,7 @@
@@ -785,7 +680,7 @@
- PU
+ PU1
@@ -801,7 +696,7 @@
-
+
true
true
@@ -812,7 +707,7 @@
@@ -822,7 +717,7 @@
- Cantidad
+ Cantidad1
@@ -838,7 +733,8 @@
-
+
+ true
true
@@ -858,7 +754,7 @@
- SubTotal
+ SubTotal1
@@ -874,7 +770,8 @@
-
+
+ true
true
@@ -884,7 +781,7 @@
@@ -894,7 +791,116 @@
- Total1
+ Total
+
+
+ =iif(Fields!CveCompra.Value = "", "#67809F", "Transparent")
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!SerieFolio.Value
+
+
+
+
+
+
+ SubProyecto
+
+
+ =iif(Fields!CveCompra.Value = "", "#67809F", "Transparent")
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+ true
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!RazonSocial.Value
+
+
+
+
+
+
+ RazonSocial1
+
+
+ =iif(Fields!CveCompra.Value = "", "#67809F", "Transparent")
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!SubProyecto.Value
+
+
+
+
+
+
+ SubProyecto1
@@ -942,7 +948,7 @@
0.70583cm
0.06614cm
0.90467cm
- 27.51879cm
+ 27.59109cm
@@ -1372,6 +1378,10 @@
GPO
System.String
+
+ Moneda
+ System.String
+
DataSet
diff --git a/Empresas/Grales/Formatos/RepVentasUtilidadPadre.rdlc b/Empresas/Grales/Formatos/RepVentasUtilidadPadre.rdlc
index e2fb28945..5e314ec69 100644
--- a/Empresas/Grales/Formatos/RepVentasUtilidadPadre.rdlc
+++ b/Empresas/Grales/Formatos/RepVentasUtilidadPadre.rdlc
@@ -51,25 +51,37 @@
- 2.51027cm
+ 1.78756cm
- 2.396cm
+ 1.7468cm
- 1.01424cm
+ 1.87995cm
- 2.3007cm
+ 1.75936cm
- 0.96542cm
+ 1.99234cm
- 2.21367cm
+ 0.7279cm
- 0.90371cm
+ 2.03612cm
+
+
+ 0.67438cm
+
+
+ 1.94909cm
+
+
+ 0.5862cm
+
+
+ 1.38875cm
@@ -112,6 +124,114 @@
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!Descuento.Value
+
+
+
+
+
+
+ Descuento
+
+
+ =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent")
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!Bonificacion.Value
+
+
+
+
+
+
+ Bonificacion
+
+
+ =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent")
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!Costo.Value
+
+
+
+
+
+
+ Costo
+
+
+ =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent")
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
@@ -328,6 +448,42 @@
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!Rentabilidad.Value
+
+
+
+
+
+
+ Rentabilidad
+
+
+ =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent")
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
@@ -373,6 +529,123 @@
+
+
+ 0.46771cm
+
+
+ true
+ true
+
+
+
+
+ Descuento
+
+
+
+
+
+
+ Textbox25
+
+
+ Gray
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 0.46771cm
+
+
+ true
+ true
+
+
+
+
+ Bonificacion
+
+
+
+
+
+
+ Textbox20
+
+
+ Gray
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 0.46771cm
+
+
+ true
+ true
+
+
+
+
+ Costo
+
+
+
+
+
+
+ Textbox17
+
+
+ Gray
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
0.46771cm
@@ -607,6 +880,45 @@
+
+
+ 0.46771cm
+
+
+ true
+ true
+
+
+
+
+ % Rent.
+
+
+
+
+
+
+ Textbox21
+
+
+ Gray
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
@@ -614,7 +926,7 @@
- 7.28314cm
+ 3.0587cm
true
@@ -725,7 +1037,7 @@
Textbox1
1.01452cm
- 6.93622cm
+ 5.03122cm
1.73771cm
5.11444cm
2
@@ -763,7 +1075,7 @@
Textbox1
1.85236cm
- 7.25372cm
+ 5.34872cm
0.58236cm
2.59949cm
3
@@ -800,7 +1112,7 @@
Textbox1
1.85236cm
- 10.04757cm
+ 8.14257cm
0.58236cm
1.68559cm
4
@@ -814,11 +1126,86 @@
2pt
+
+ true
+ true
+
+
+
+
+ = "RENTABILIDAD"
+ HTML
+
+
+
+
+
+
+ Textbox1
+ 1.01452cm
+ 10.71594cm
+ 1.73771cm
+ 5.11444cm
+ 5
+
+
+ SeaGreen
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!Rentabilidad.Value
+ HTML
+
+
+
+
+
+
+ Textbox1
+ 1.85236cm
+ 12.93844cm
+ 0.58236cm
+ 2.59949cm
+ 6
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
1.667in
|