This commit is contained in:
@@ -97,8 +97,9 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
If DdlMarca.SelectedValue <> -1 Then DdlMarcaM.SelectedValueExist(DdlMarca.SelectedValue.ToEntero)
|
||||
If DdlTipoUso.SelectedValue <> -1 Then DdlTipoUsoM.SelectedValueExist(DdlTipoUso.SelectedValue.ToEntero)
|
||||
|
||||
TxtMes.Text = ""
|
||||
TxtMes.Text = TxtMes.Text.ToEntero + 1
|
||||
TxtValor.Text = ""
|
||||
TxtMes.Focus()
|
||||
|
||||
Actualizar = False
|
||||
UpGral.Update()
|
||||
@@ -129,8 +130,9 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
If Not Actualizar Then
|
||||
If ObjAcum.GarantiasMesesAdd(DdlMarcaM.SelectedValue.ToEntero, DdlTipoUsoM.SelectedValue.ToEntero, TxtMes.Text.ToEntero, TxtValor.Text.ToDecimal, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
TxtMes.Text = ""
|
||||
TxtMes.Text = TxtMes.Text.ToEntero + 1
|
||||
TxtValor.Text = ""
|
||||
TxtMes.Focus()
|
||||
|
||||
CargadatosGvFolioGarantia()
|
||||
|
||||
|
||||
@@ -2886,8 +2886,8 @@ Public Class ClsCompras
|
||||
OnError("Ocurrió un error al obtener el reporte de anticipos - nc - exc detalle .", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
Public Function GetCxPProgramado(CveCompra As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -2903,9 +2903,43 @@ Public Class ClsCompras
|
||||
OnError("Ocurrió un error al obtener la información de la compra programada.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
|
||||
Public Function GetCancelarNC(CveCompra As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Conta_CancelarNCGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los datos para cancelar la nc.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateFechaVencimientoCompra(CveCompra As Integer, FechaVencimiento As Date, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Comp_ComprasFechaVencimientoUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
|
||||
.Add("@FechaVencimiento", SqlDbType.Date).Value = FechaVencimiento
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar la fecha de vencimiento de la compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
#Region "REPORTE PUE SIN PAGO"
|
||||
|
||||
|
||||
Public Function GetPUESinPago(FI As DateTime, FF As DateTime, CveProveedor As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional CveUsuario As Integer = -1) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_Comp_PUESinPagoGet", CommandType.StoredProcedure)
|
||||
|
||||
@@ -228,9 +228,9 @@ Public Class ClsContabilidad
|
||||
|
||||
|
||||
|
||||
Public Function AddPrePolizasNegativa(CvePrePoliza As Integer, CveUsuario As Integer, Concepto As String, CveEmpresa As Integer, Fecha As Date) As Boolean
|
||||
Public Function AddPrePolizasNegativa(CvePrePoliza As Integer, CveUsuario As Integer, Concepto As String, CveEmpresa As Integer, Fecha As Date) As Integer
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
DataAdapter("PA_Conta_PrePolizasNegativaAdd")
|
||||
|
||||
@@ -240,11 +240,12 @@ Public Class ClsContabilidad
|
||||
.Add("@Concepto", SqlDbType.VarChar).Value = Concepto
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Fecha", SqlDbType.Date).Value = Fecha
|
||||
.Add("@CvePrePolizaNueva", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Retorno = SqlAdapter.SelectCommand.Parameters("@CvePrePolizaNueva").Value.ToString.ToEntero
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al Guardar", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
@@ -1355,12 +1355,12 @@ Public Class ClsPaginas
|
||||
Application("GlobalDTTipoTransacciones") = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTEstatusIE() As DataTable
|
||||
Property GlobalDTBancosEstatusIE() As DataTable
|
||||
Get
|
||||
GlobalDTEstatusIE = DirectCast(Application("GlobalDTEstatusIE"), DataTable)
|
||||
GlobalDTBancosEstatusIE = DirectCast(Application("GlobalDTBancosEstatusIE"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTEstatusIE") = value
|
||||
Application("GlobalDTBancosEstatusIE") = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTBancosIE() As DataTable
|
||||
|
||||
@@ -1805,7 +1805,7 @@ Namespace Modelos
|
||||
CvePlantilaPoliza = 4
|
||||
ElseIf ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
|
||||
CvePlantilaPoliza = 7
|
||||
ElseIf ObjFactura.TipoDocto = "Rem" Then
|
||||
ElseIf ObjFactura.TipoDocto.Contiene("Rem", "RNC") Then
|
||||
CvePlantilaPoliza = 4
|
||||
End If
|
||||
|
||||
@@ -1871,35 +1871,34 @@ Namespace Modelos
|
||||
|
||||
|
||||
Select Case ConceptoContable
|
||||
Case 1 'Cliente
|
||||
If Not ObjFactura.TipoDocto.Contiene("Egs", "Rem") Then
|
||||
importeMovimiento = (ObjFactura.Total - TotalOtrosConceptos) * ValorMultiplicador
|
||||
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
|
||||
If tipoCambio = 1 Then
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContClientes
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaClientes
|
||||
Else
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContComplementaria
|
||||
CveCuenta = 0
|
||||
|
||||
If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsaComplementariaClientes) Then
|
||||
importeMX = importeMovimiento
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, 0, Referencia, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=Math.Round(importeMovimiento * tipoCambio - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera
|
||||
End If
|
||||
|
||||
IdCtaContableCliente = IdCtaContable
|
||||
CveCuentaCliente = CveCuenta
|
||||
Case 1 'Cliente
|
||||
If Not ObjFactura.TipoDocto.Contiene("Egs", "Rem", "RNC") Then
|
||||
importeMovimiento = ((ObjFactura.Total - ObjFactura.TotalOtrosConceptos) * ValorMultiplicador)
|
||||
importeMX = (importeMovimiento * tipoCambio * Multiplicador)
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
|
||||
If tipoCambio = 1 Then
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContClientes
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaClientes
|
||||
Else
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContComplementaria
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaComplementaria
|
||||
If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsuarioActual.CveEmpresa = 119) Then
|
||||
importeMX = importeMovimiento
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, 0, Referencia, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta,
|
||||
CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento),
|
||||
TipoCambio:=tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera
|
||||
End If
|
||||
IdCtaContableCliente = IdCtaContable
|
||||
CveCuentaCliente = CveCuenta
|
||||
End If
|
||||
|
||||
Case 3 'Cliente
|
||||
@@ -1945,6 +1944,37 @@ Namespace Modelos
|
||||
importeMovimiento = 0
|
||||
ObjFactura.SeGuardoPrePoliza = True
|
||||
End If
|
||||
Case 277 'Remisión del cliente
|
||||
|
||||
If ObjFactura.TipoDocto = "RNC" Then
|
||||
importeMovimiento = ((ObjFactura.Total - TotalOtrosConceptos) * ValorMultiplicador)
|
||||
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
|
||||
If tipoCambio = 1 Then
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContClientes
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaClientes
|
||||
Else
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera
|
||||
End If
|
||||
IdCtaContableCliente = IdCtaContable
|
||||
CveCuentaCliente = CveCuenta
|
||||
|
||||
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 278, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
Else
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
importeMovimiento = 0
|
||||
ObjFactura.SeGuardoPrePoliza = True
|
||||
End If
|
||||
|
||||
|
||||
Case 12 'Nota de Credito
|
||||
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
|
||||
@@ -2344,7 +2374,7 @@ Namespace Modelos
|
||||
importeMovimiento = 0
|
||||
|
||||
Case 4 'Venta Clasificacion
|
||||
If Not ObjFactura.TipoDocto.Contiene("Rem", "Ant", "Egs", "Dev") Then
|
||||
If Not ObjFactura.TipoDocto.Contiene("Rem", "Ant", "Egs", "Dev", "RNC") Then
|
||||
|
||||
Dim ConceptoContableAplicar = 4
|
||||
Dim CveVentaAplicar = ObjFactura.CveVenta
|
||||
@@ -2499,7 +2529,7 @@ Namespace Modelos
|
||||
|
||||
importeMovimiento = 0
|
||||
Case 103 'Descuento
|
||||
If Not ObjFactura.TipoDocto.Contiene("Rem") AndAlso ObjFactura.CveTipoAmortizacionAnticipo = -1 Then
|
||||
If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso ObjFactura.CveTipoAmortizacionAnticipo = -1 Then
|
||||
|
||||
importeMovimiento = (ObjFactura.Descuento * ValorMultiplicador)
|
||||
importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador
|
||||
@@ -2537,7 +2567,7 @@ Namespace Modelos
|
||||
End If
|
||||
|
||||
Case 8 'Ret IVA por Trasladar
|
||||
If Not ObjFactura.TipoDocto.Contiene("Rem") Then
|
||||
If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") Then
|
||||
importeMovimiento = (ObjFactura.RetIVA * ValorMultiplicador)
|
||||
importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
@@ -2568,7 +2598,7 @@ Namespace Modelos
|
||||
End If
|
||||
|
||||
Case 9 'Ret ISR por Trasladar
|
||||
If Not ObjFactura.TipoDocto.Contiene("Rem") Then
|
||||
If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") Then
|
||||
importeMovimiento = (ObjFactura.RetISR * ValorMultiplicador)
|
||||
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
@@ -2598,7 +2628,7 @@ Namespace Modelos
|
||||
End If
|
||||
End If
|
||||
Case 13 'Iva por Trasladar
|
||||
If Not ObjFactura.TipoDocto.Contiene("Rem") Then
|
||||
If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") Then
|
||||
importeMovimiento = (ObjFactura.IVA * ValorMultiplicador)
|
||||
importeMX = Math.Round(importeMovimiento * tipoCambio * Multiplicador, 2)
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
@@ -2611,7 +2641,7 @@ Namespace Modelos
|
||||
|
||||
|
||||
Case 38 'IEPS por Trasladar
|
||||
If Not ObjFactura.TipoDocto.Contiene("Rem") Then
|
||||
If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") Then
|
||||
importeMovimiento = (ObjFactura.IEPS * ValorMultiplicador)
|
||||
importeMX = Math.Round(importeMovimiento * tipoCambio * Multiplicador, 2)
|
||||
FechaMovimiento = ObjFactura.Fecha
|
||||
@@ -2809,7 +2839,7 @@ Namespace Modelos
|
||||
End If
|
||||
|
||||
'ContPAQ El movimiento 1 es el de Venta
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And UsuarioActual.Empresa.UsaContabilidad = True And Not ErrorPrepoliza Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso Not ErrorPrepoliza Then
|
||||
If idCuentaContabilizacion > 0 Then
|
||||
If ObjConta.ContabilizarPrePoliza(ObjFactura.CvePrePoliza, ObjFactura.CveUsuario, UsuarioActual.Empresa, ObjConta:=objContPaqi) Then
|
||||
Else
|
||||
|
||||
@@ -25,8 +25,8 @@ Partial Class Bancos_CatBancosEstatusIE
|
||||
Dim ObjEstatusIE As New ClsBancos
|
||||
If ObjEstatusIE.GetBancos_EstatusIE() Then
|
||||
ViewState("DTEstatusIE") = ObjEstatusIE.DtResultados
|
||||
GlobalDTEstatusIE = ObjEstatusIE.DtResultados
|
||||
Else
|
||||
GlobalDTBancosEstatusIE = ObjEstatusIE.DtResultados
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
@@ -47,9 +47,9 @@ Partial Class Bancos_CatBancosEstatusIE
|
||||
Alert("El nuevo Estatus de Ingresos y Egresos se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTEstatusIE") = ObjEstatusIE.DtResultados
|
||||
GlobalDTEstatusIE = ObjEstatusIE.DtResultados
|
||||
GlobalDTBancosEstatusIE = ObjEstatusIE.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
@@ -145,8 +145,8 @@ Partial Class Bancos_CatBancosEstatusIE
|
||||
TxtCveEstatusIE.Text = ""
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTEstatusIE") = ObjEstatusIE.DtResultados
|
||||
GlobalDTEstatusIE = ObjEstatusIE.DtResultados
|
||||
Alert("El Estatus de Ingresos y Egresos se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
GlobalDTBancosEstatusIE = ObjEstatusIE.DtResultados
|
||||
Alert("El Estatus de Ingresos y Egresos se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjEstatusIE.Dispose()
|
||||
@@ -178,8 +178,8 @@ Partial Class Bancos_CatBancosEstatusIE
|
||||
If ObjEstatusIE.UpdateBancos_EstatusIE(EstatusIE, Estatus, CveEstatusIE) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTEstatusIE") = ObjEstatusIE.DtResultados
|
||||
GlobalDTEstatusIE = ObjEstatusIE.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
GlobalDTBancosEstatusIE = ObjEstatusIE.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjEstatusIE.Dispose()
|
||||
|
||||
@@ -42,8 +42,8 @@ Partial Class Bancos_CatEstatusIE
|
||||
Dim ObjEstatusIE As New ClsBancos
|
||||
If ObjEstatusIE.GetBancos_EstatusIE() Then
|
||||
ViewState("DTEstatusIE") = ObjEstatusIE.DtResultados
|
||||
GlobalDTEstatusIE = ObjEstatusIE.DtResultados
|
||||
GvDatos.DataSource = GlobalDTEstatusIE
|
||||
GlobalDTBancosEstatusIE = ObjEstatusIE.DtResultados
|
||||
GvDatos.DataSource = GlobalDTBancosEstatusIE
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
@@ -36,8 +36,6 @@ Partial Class Bancos_CuentasBancariasDetalle
|
||||
DdlUsuarios.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "Nombre")
|
||||
DdlUsuarios.DataBind()
|
||||
|
||||
|
||||
|
||||
If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then
|
||||
ViewState("CveCuenta") = Request("CveCuenta")
|
||||
|
||||
|
||||
@@ -467,7 +467,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
||||
}
|
||||
|
||||
//CONTABILIZA
|
||||
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("") && UsuarioActual.Empresa.UsaContabilidad)
|
||||
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals(""))
|
||||
{
|
||||
if (IDCtaContableDevolucion > 0 && IDCtaContableBancos > 0)
|
||||
{
|
||||
|
||||
6784
Bancos/IE.aspx.vb
6784
Bancos/IE.aspx.vb
File diff suppressed because it is too large
Load Diff
@@ -527,7 +527,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
}
|
||||
|
||||
//CONTABILIZA
|
||||
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("") && UsuarioActual.Empresa.UsaContabilidad)
|
||||
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals(""))
|
||||
{
|
||||
if (IDCtaContableAcreedor > 0 && IDCtaContableBancos > 0)
|
||||
{
|
||||
@@ -801,7 +801,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
}
|
||||
|
||||
//CONTABILIZA
|
||||
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("") && UsuarioActual.Empresa.UsaContabilidad)
|
||||
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("") )
|
||||
{
|
||||
if (IDCtaContableAcreedor > 0 && IDCtaContableBancos > 0)
|
||||
{
|
||||
|
||||
@@ -447,7 +447,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
||||
bool AutoConta = UsuarioActual.Empresa.Funcionalidad(200).Equals("1");
|
||||
if (UsuarioActual.CveEmpresa == 119) AutoConta = false;
|
||||
|
||||
if (AutoConta && MsgError.Equals("") && UsuarioActual.Empresa.UsaContabilidad)
|
||||
if (AutoConta && MsgError.Equals(""))
|
||||
{
|
||||
//JJMQ:20190103: Cambio la siguiente linea porque esta validando siempre una complementaria aunque el movto sea dlls
|
||||
//if (IDCtaContableDeudorPrestamo > 0 && IDCtaContableBancosPrestamo > 0 && IDCtaContableBancosComplementariaPrestamo > 0 && IDCtaContableDeudorCompPrestamo > 0)
|
||||
@@ -838,7 +838,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
||||
bool AutoConta = UsuarioActual.Empresa.Funcionalidad(200).Equals("1");
|
||||
if (UsuarioActual.CveEmpresa == 119) AutoConta = false;
|
||||
|
||||
if (AutoConta && MsgError.Equals("") && UsuarioActual.Empresa.UsaContabilidad)
|
||||
if (AutoConta && MsgError.Equals(""))
|
||||
{
|
||||
if (IDCtaContableDeudor > 0 && IDCtaContableBancos > 0)
|
||||
{
|
||||
|
||||
@@ -3090,7 +3090,7 @@ Partial Class Bancos_PopIECompras
|
||||
End If
|
||||
|
||||
'Conta ContPAQ
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" AndAlso UsuarioActual.Empresa.UsaContabilidad Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
|
||||
If idCuentaContabilizacion > 0 Then
|
||||
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
IdPoliza = ObjMov.ContaIdPoliza
|
||||
|
||||
@@ -3390,7 +3390,7 @@ Partial Class Bancos_PopIEVentas
|
||||
End If
|
||||
|
||||
'Conta ContPAQ
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" AndAlso UsuarioActual.Empresa.UsaContabilidad Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" Then
|
||||
If idCuentaContabilizacion > 0 Then
|
||||
|
||||
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
|
||||
@@ -366,7 +366,7 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
}
|
||||
|
||||
//CONTABILIZA
|
||||
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("") && UsuarioActual.Empresa.UsaContabilidad)
|
||||
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("") )
|
||||
{
|
||||
if (IDCtaContablePrestamo > 0 && IDCtaContableBancos > 0)
|
||||
{
|
||||
@@ -626,7 +626,7 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
}
|
||||
|
||||
//CONTABILIZA
|
||||
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("") && UsuarioActual.Empresa.UsaContabilidad)
|
||||
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("") )
|
||||
{
|
||||
if (IDCtaContablePrestamo > 0 && IDCtaContableBancosPrestamo > 0)
|
||||
{
|
||||
|
||||
@@ -1823,7 +1823,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
End If
|
||||
|
||||
'Conta ContPAQ
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" And UsuarioActual.Empresa.UsaContabilidad Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
|
||||
If idCuentaContabilizacion > 0 Then
|
||||
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjConta) Then
|
||||
' Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion)
|
||||
|
||||
@@ -423,7 +423,7 @@ Partial Class Bancos_RepIE
|
||||
DdlMoneda.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
End Sub
|
||||
Private Sub CargaEstatusIE()
|
||||
DdlEstatusIE.DataSource = GlobalDTEstatusIE
|
||||
DdlEstatusIE.DataSource = GlobalDTBancosEstatusIE
|
||||
DdlEstatusIE.DataBind()
|
||||
End Sub
|
||||
Private Sub CargaUsuarioConcilio()
|
||||
|
||||
@@ -412,7 +412,7 @@ Partial Class Bancos_Transferencias
|
||||
End If
|
||||
|
||||
'Conta ContPAQ
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" AndAlso UsuarioActual.Empresa.UsaContabilidad Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" Then
|
||||
If (IdCtaContableOrigen > 0 AndAlso IdCtaContableDestino > 0) OrElse (IdCtaContableDestino > 0 AndAlso Opcion = 1) Then
|
||||
|
||||
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, Fecha:=TxtFechaDocumento.Text) Then
|
||||
|
||||
@@ -654,23 +654,23 @@
|
||||
<asp:GridView ID="GvPS" ShowHeader="false" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePS,Cantidad,CveUM,UM,PU,Descuento,OtrosGastos,CvePresupuestoEgreso,PS,Clasificacion,CveClasificacion,CveOrdenCompraDetalle,IVA,IVAPorcentaje,RetIVAPorcentaje,RetISRPorcentaje,IEPSPSPorcentaje,Obs,Total,CveProyecto,CveSubProyecto,Proyecto,SubProyecto,Consec,CveTipoGasto,NoDeducible" GridLines="none" BorderWidth="0" EmptyDataText="Sin Productos o Servicios agregados" CssClass="table GvPS table-striped table-hover table-advance Widthall ScrollAD mysmallbtn">
|
||||
<Columns>
|
||||
<%-- 0 --%>
|
||||
<asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="15px" >
|
||||
<ItemTemplate>
|
||||
<label data-toogle="tooltip" class=' <%# IIf(Eval("CvePS").ToString() = "0", "label label-sm label-danger manita", "")%>'>
|
||||
<asp:Label ID="LtlConsecutivo" runat="server" Text='<%# Eval("Consec", "{0:N0}") %>' Font-Size="6pt"></asp:Label></label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 1 --%>
|
||||
<asp:BoundField DataField="Cantidad" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Cantidad" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="45px" />
|
||||
<%-- 2 --%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle">
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle" ItemStyle-Width="70px">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlUnidadMedida" CssClass="centrarUM" runat="server" Text='<%# Eval("UM") %>'></asp:Label>
|
||||
<asp:LinkButton ID="LBAplicarEquivalencia" OnClick="LBAplicarEquivalencia_Click" data-toggle="tooltip" title="Aplicar conversión de equivalencia" Text="" runat="server" Visible="false"> <i class="fa fa-magic"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 3 --%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Top">
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Top" ItemStyle-Width="300px">
|
||||
<ItemTemplate>
|
||||
<div style="float: left; width: 100%;">
|
||||
<span style="width: 100%; border-bottom: 1px solid gray;">
|
||||
@@ -683,9 +683,9 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 4 --%>
|
||||
<asp:BoundField DataField="Obs" />
|
||||
<asp:BoundField DataField="Obs" ItemStyle-Width="350px" />
|
||||
<%-- 5 --%>
|
||||
<asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="200px" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<span style="width: 145px; border-bottom: 1px solid gray;">
|
||||
<asp:Label ID="LblProyecto" runat="server" Text='<%# Eval("Proyecto", "{0}<br />") %>' Visible='<%# if(UsuarioActual.Empresa.Tipo_CentroCosto <> 1 And UsuarioActual.Empresa.Tipo_CentroCosto <> 2, True, False) %>'></asp:Label>
|
||||
@@ -694,11 +694,11 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 6 --%>
|
||||
<asp:BoundField DataField="TipoGasto" />
|
||||
<asp:BoundField DataField="TipoGasto" ItemStyle-Width="180px" />
|
||||
<%-- 7 --%>
|
||||
<asp:BoundField DataField="PU" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="PU" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
|
||||
<%-- 8 --%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="80px">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblIVAPorcentaje" runat="server" Text='<%# String.Format("{0} {1}", (CDbl(Eval("IVAPorcentaje").ToString) * 100).ToString("#####"), If(CDbl(Eval("IVAPorcentaje").ToString) * 100 > 0, "%", "")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
@@ -2228,7 +2228,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" style="width: 75px">Fecha Pago:</td>
|
||||
<td align="left">
|
||||
<td align="left" style="width: 100px">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||
<asp:TextBox ID="TxtFechaPago" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" ClientIDMode="Static"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
@@ -2248,6 +2248,9 @@
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<td align="left" >
|
||||
<asp:LinkButton runat="server" Visible="false" ID="LnkUpdateFechaPago" OnClick="LnkUpdateFechaPago_Click" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea actualizar la fecha de pago de la compra?" data-btn-ok-label="si" Text="<i class='fa fa-check' style='color:green'></i>" CssClass="btn btn-default btn-circle btn-xs" ToolTip="Actualizar Fecha de Pago" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
|
||||
@@ -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("<a class='Texto' href = '/Contabilidad/RegPoliza.aspx?IdPoliza={0}'>{1}<\a><br>", 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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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("<a class='{0}' target=""_blank"" href='{1}'>{2}</a>", Css, Liga, e.Row.FCLiteral("LtlGrupo").Text)
|
||||
e.Row.FCLiteral("LtlCantidad").Text = String.Format("<a class='{0}' target=""_blank"" href='{1}'>{2}</a>", Css, Liga, e.Row.FCLiteral("LtlCantidad").Text)
|
||||
End If
|
||||
|
||||
e.Row.FCLiteral("LtlCantidad").Text = String.Format("<a class='{0}' target=""_blank"" href='{1}'>{2}</a>", 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", $"<b>Agrupado Por:</b> {Proveedor}{Capturo}{Grupo}{Moneda}{FechaIn}{FechaFn}{Proyecto}{SubProyecto}{TipoGasto}{TipoProveedor}{FechaICaptura}{FechaFCaptura}{TipoDocto}"))
|
||||
params.Add(New ReportParameter("AgrupadoPor", $"<b>Agrupado Por:</b> {Grupo}{Proveedor}{Capturo}{Moneda}{FechaIn}{FechaFn}{Proyecto}{SubProyecto}{TipoGasto}{TipoProveedor}{FechaICaptura}{FechaFCaptura}{TipoDocto}"))
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
|
||||
@@ -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", $"<b>Agrupado Por:</b> {Proveedor}{Capturo}{Grupo}{FechaIn}{FechaFn}{FechaCIn}{FechaCFn}{Proyecto}{SubProyecto}{TipoGasto}{TipoProveedor}{TipoDocto}"))
|
||||
params.Add(New ReportParameter("AgrupadoPor", $"<b>Agrupado Por:</b> {Grupo}{Proveedor}{Capturo}{FechaIn}{FechaFn}{FechaCIn}{FechaCFn}{Proyecto}{SubProyecto}{TipoGasto}{TipoProveedor}{TipoDocto}"))
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
|
||||
@@ -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: <br/>")
|
||||
|
||||
@@ -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("<a class=""Texto"" target=""_blank"" href=""{0}"">{1}</a>", Liga, If(e.Row.DBCampo("GpoID") = "1", e.Row.DBCampo("Moneda"), e.Row.DBCampo("GPO")))
|
||||
e.Row.Cells(1).Text = String.Format("<a class=""Texto"" target=""_blank"" href=""{0}"">{1}</a>", Liga, e.Row.DBCampo("Cantidad").FormatoNumero)
|
||||
End If
|
||||
|
||||
e.Row.Cells(1).Text = String.Format("<a class=""Texto"" target=""_blank"" href=""{0}"">{1}</a>", 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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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("<a class=""Texto"" href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">", e.Row.DBCampo("IdPoliza"))
|
||||
e.Row.FCLiteral("LtlPoliza").Text = String.Format("{0}{1}</a>", 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("<a class=""Texto"" href=""/RH/Personal.aspx?CvePersonal={0}"">", e.Row.DBCampo("CvePersonal"))
|
||||
e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}</a>", 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("<a class=""Texto"" href=""/Compras/Compras.aspx?CveCompra={0}"">", e.Row.DBCampo("CveCompraAmortizacion"))
|
||||
' e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}</a>", 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("<a class=""Texto"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">", e.Row.DBCampo("CveVenta"))
|
||||
'e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}</a>", 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("<a class=""Texto"" href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">", e.Row.DBCampo("IdPoliza"))
|
||||
e.Row.FCLiteral("LtlPoliza").Text = String.Format("{0}{1}</a>", 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("<a class=""Texto"" href=""/RH/Personal.aspx?CvePersonal={0}"">", e.Row.DBCampo("CvePersonal"))
|
||||
e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}</a>", 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("<a class=""Texto"" href=""/Compras/Compras.aspx?CveCompra={0}"">", e.Row.DBCampo("CveCompraAmortizacion"))
|
||||
' e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}</a>", 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("<a class=""Texto"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">", e.Row.DBCampo("CveVenta"))
|
||||
'e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}</a>", 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.<br/>")
|
||||
RegistraScript(" $('#DivCancelar').modal('hide'); ")
|
||||
CargaDatos()
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||
If ObjContabilidad.ContabilizarPrePoliza(CvePrePolizaNueva, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
Str.AppendFormat("<a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' target='_blank' class='Texto'>Ver Poliza</a>", 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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -694,7 +694,7 @@ Partial Class RepCxC
|
||||
Dim Registro = If(DdlUsuario.SelectedValue = "-1", "", $" <b>Registró:</b> {DdlUsuario.SelectedItem.Text}")
|
||||
Dim Responsable = If(DdlResponsable.SelectedValue = "-1", "", $" <b>Responsable:</b> {DdlResponsable.SelectedItem.Text}")
|
||||
Dim EstatusCob = If(DdlCobranzaEstatus.SelectedValue = "-1", "", $" <b>Estatus Cobranza:</b> {DdlCobranzaEstatus.SelectedItem.Text}")
|
||||
'Dim CorteA As String = If(txtCorteA.Text = "31/12/2018", "", $" <b>Corte A:</b> {txtCorteA.Text}")
|
||||
Dim CorteA As String = If(txtCorteA.Text = "31/12/2019", "", $" <b>Corte A:</b> {txtCorteA.Text}")
|
||||
Dim EstatusCli = If(DdlEstatusCliente.SelectedValue = "-1", "", $" <b>Clientes:</b> {DdlEstatusCliente.SelectedItem.Text}")
|
||||
Dim ClasificacionCli = If(DdlClienteClasificacion.SelectedValue = "-1", "", $" <b>Clasificación Cliente:</b> {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))
|
||||
|
||||
|
||||
@@ -833,7 +833,7 @@ Partial Class RepCxCDetalle
|
||||
Dim Registro = If(DdlUsuario.SelectedValue = "-1", "", $" <b>Registró:</b> {DdlUsuario.SelectedItem.Text}")
|
||||
Dim Responsable = If(DdlResponsable.SelectedValue = "-1", "", $" <b>Responsable:</b> {DdlResponsable.SelectedItem.Text}")
|
||||
Dim EstatusCob = If(DdlCobranzaEstatusFiltro.SelectedValue = "-1", "", $" <b>Estatus Cobranza:</b> {DdlCobranzaEstatusFiltro.SelectedItem.Text}")
|
||||
'Dim CorteA As String = If(txtCorteA.Text = "31/12/2018", "", $" <b>Corte A:</b> {txtCorteA.Text}")
|
||||
Dim CorteA As String = If(txtCorteA.Text = "31/12/2019", "", $" <b>Corte A:</b> {txtCorteA.Text}")
|
||||
Dim ClasificacionCli = If(DdlClienteClasificacion.SelectedValue = "-1", "", $" <b>Clasificación Cliente:</b> {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
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1209,7 +1209,7 @@
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value> ). 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 </Value>
|
||||
<Value> ). 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 </Value>
|
||||
<Style>
|
||||
<FontStyle>Normal</FontStyle>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -50,7 +50,7 @@
|
||||
<TablixBody>
|
||||
<TablixColumns>
|
||||
<TablixColumn>
|
||||
<Width>1.25345cm</Width>
|
||||
<Width>1.862cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.29144cm</Width>
|
||||
@@ -68,7 +68,7 @@
|
||||
<Width>1.69804cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.03728cm</Width>
|
||||
<Width>1.42874cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>3.5848cm</Width>
|
||||
@@ -86,14 +86,14 @@
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Moneda">
|
||||
<Textbox Name="SerieFolio1">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Moneda.Value</Value>
|
||||
<Value>=Fields!SerieFolio.Value</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
<Color>=IIF(CInt(Fields!CveCompra.Value) < 1, "White","Black")</Color>
|
||||
@@ -105,7 +105,7 @@
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Moneda</rd:DefaultName>
|
||||
<rd:DefaultName>SerieFolio1</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -301,14 +301,14 @@
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="SerieFolio">
|
||||
<Textbox Name="Moneda">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!SerieFolio.Value</Value>
|
||||
<Value>=Fields!Moneda.Value</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
<Color>=IIF(CInt(Fields!CveCompra.Value) < 1, "White","Black")</Color>
|
||||
@@ -320,7 +320,7 @@
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>SerieFolio</rd:DefaultName>
|
||||
<rd:DefaultName>Moneda</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -457,7 +457,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Moneda</Value>
|
||||
<Value>Serie/Folio</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
@@ -685,7 +685,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Serie/Folio</Value>
|
||||
<Value>Moneda</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
|
||||
@@ -456,7 +456,7 @@
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=iif(Fields!CveVenta.Value = "", "Bold", "Normal")</FontWeight>
|
||||
<Color>=iif(Fields!CveVenta.Value= "", "White", "Black")</Color>
|
||||
<Color>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -468,7 +468,7 @@
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")</BackgroundColor>
|
||||
<BackgroundColor>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
@@ -490,7 +490,7 @@
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=iif(Fields!CveVenta.Value = "", "Bold", "Normal")</FontWeight>
|
||||
<Format>dd/MM/yyyy</Format>
|
||||
<Color>=iif(Fields!CveVenta.Value= "", "White", "Black")</Color>
|
||||
<Color>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -504,7 +504,7 @@
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")</BackgroundColor>
|
||||
<BackgroundColor>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
@@ -525,7 +525,7 @@
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=iif(Fields!CveVenta.Value = "", "Bold", "Normal")</FontWeight>
|
||||
<Color>=iif(Fields!CveVenta.Value= "", "White", "Black")</Color>
|
||||
<Color>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -537,7 +537,7 @@
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")</BackgroundColor>
|
||||
<BackgroundColor>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
@@ -555,11 +555,11 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Nombre.Value</Value>
|
||||
<Value>=IIf(Fields!Nombre.Value = "", IIf(Fields!Gpo.Value = "", Fields!Moneda.Value, Fields!Gpo.Value), Fields!Nombre.Value)</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=iif(Fields!CveVenta.Value = "", "Bold", "Normal")</FontWeight>
|
||||
<Color>=iif(Fields!CveVenta.Value= "", "White", "Black")</Color>
|
||||
<Color>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -571,13 +571,14 @@
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")</BackgroundColor>
|
||||
<BackgroundColor>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
@@ -592,7 +593,7 @@
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=iif(Fields!CveVenta.Value = "", "Bold", "Normal")</FontWeight>
|
||||
<Color>=iif(Fields!CveVenta.Value= "", "White", "Black")</Color>
|
||||
<Color>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -606,7 +607,7 @@
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")</BackgroundColor>
|
||||
<BackgroundColor>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
@@ -629,7 +630,7 @@
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=iif(Fields!CveVenta.Value = "", "Bold", "Normal")</FontWeight>
|
||||
<Format>f2</Format>
|
||||
<Color>=iif(Fields!CveVenta.Value= "", "White", "Black")</Color>
|
||||
<Color>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -641,7 +642,7 @@
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")</BackgroundColor>
|
||||
<BackgroundColor>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
@@ -664,7 +665,7 @@
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=iif(Fields!CveVenta.Value = "", "Bold", "Normal")</FontWeight>
|
||||
<Format>#,0.00;- #,0.00;'-'</Format>
|
||||
<Color>=iif(Fields!CveVenta.Value= "", "White", "Black")</Color>
|
||||
<Color>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -678,7 +679,7 @@
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")</BackgroundColor>
|
||||
<BackgroundColor>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
@@ -701,7 +702,7 @@
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=iif(Fields!CveVenta.Value = "", "Bold", "Normal")</FontWeight>
|
||||
<Format>#,0.00;- #,0.00;'-'</Format>
|
||||
<Color>=iif(Fields!CveVenta.Value= "", "White", "Black")</Color>
|
||||
<Color>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -715,7 +716,7 @@
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")</BackgroundColor>
|
||||
<BackgroundColor>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
@@ -737,7 +738,7 @@
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=iif(Fields!CveVenta.Value = "", "Bold", "Normal")</FontWeight>
|
||||
<Format>#,0.00;-#,0.00;'-'</Format>
|
||||
<Color>=iif(Fields!CveVenta.Value= "", "White", "Black")</Color>
|
||||
<Color>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -751,7 +752,7 @@
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")</BackgroundColor>
|
||||
<BackgroundColor>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
@@ -773,7 +774,7 @@
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=iif(Fields!CveVenta.Value = "", "Bold", "Normal")</FontWeight>
|
||||
<Format>#,0.00;- #,0.00;'-'</Format>
|
||||
<Color>=iif(Fields!CveVenta.Value= "", "White", "Black")</Color>
|
||||
<Color>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -787,7 +788,7 @@
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")</BackgroundColor>
|
||||
<BackgroundColor>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
@@ -810,7 +811,7 @@
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=iif(Fields!CveVenta.Value = "", "Bold", "Normal")</FontWeight>
|
||||
<Format>#,0.00;-#,0.00;'-'</Format>
|
||||
<Color>=iif(Fields!CveVenta.Value= "", "White", "Black")</Color>
|
||||
<Color>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -824,7 +825,7 @@
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")</BackgroundColor>
|
||||
<BackgroundColor>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
@@ -896,14 +897,16 @@
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>0.18521cm</Top>
|
||||
<Left>2.8349cm</Left>
|
||||
<Left>3.37444cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>12.60299cm</Width>
|
||||
<Width>21.20747cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -949,9 +952,9 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>1.10271cm</Top>
|
||||
<Left>8.17404cm</Left>
|
||||
<Left>9.22743cm</Left>
|
||||
<Height>0.52945cm</Height>
|
||||
<Width>10.36447cm</Width>
|
||||
<Width>10.12635cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -1018,7 +1021,7 @@
|
||||
</Style>
|
||||
</PageHeader>
|
||||
<PageFooter>
|
||||
<Height>0.58209cm</Height>
|
||||
<Height>1.04773cm</Height>
|
||||
<PrintOnFirstPage>true</PrintOnFirstPage>
|
||||
<PrintOnLastPage>true</PrintOnLastPage>
|
||||
<ReportItems>
|
||||
@@ -1140,9 +1143,9 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox10</rd:DefaultName>
|
||||
<Top>0.0829cm</Top>
|
||||
<Left>9.84544cm</Left>
|
||||
<Left>10.83183cm</Left>
|
||||
<Height>0.38981cm</Height>
|
||||
<Width>2.92333cm</Width>
|
||||
<Width>2.91804cm</Width>
|
||||
<ZIndex>3</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -1161,22 +1164,56 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!FechaImpresion.Value</Value>
|
||||
<Value>=Globals!ExecutionTime</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<Format>g</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox11</rd:DefaultName>
|
||||
<Top>0.0829cm</Top>
|
||||
<Left>13.56466cm</Left>
|
||||
<Height>0.38981cm</Height>
|
||||
<Width>6.47703cm</Width>
|
||||
<ZIndex>4</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox14">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>IMPRESO EN SIG, Rep. Productos Servicios</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<Format>D</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox11</rd:DefaultName>
|
||||
<Top>0.0829cm</Top>
|
||||
<Left>12.75466cm</Left>
|
||||
<rd:DefaultName>Textbox9</rd:DefaultName>
|
||||
<Top>0.50799cm</Top>
|
||||
<Left>0.06614cm</Left>
|
||||
<Height>0.38981cm</Height>
|
||||
<Width>4.32745cm</Width>
|
||||
<ZIndex>4</ZIndex>
|
||||
<Width>6.69369cm</Width>
|
||||
<ZIndex>5</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -1272,6 +1309,14 @@
|
||||
<DataField>Nombre</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Gpo">
|
||||
<DataField>Gpo</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Moneda">
|
||||
<DataField>Moneda</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Codigo">
|
||||
<DataField>Codigo</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
@@ -1331,6 +1376,7 @@
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<Language>es-MX</Language>
|
||||
<rd:ReportUnitType>Cm</rd:ReportUnitType>
|
||||
<rd:ReportID>40c94aad-a12a-44fb-ab0d-ea36a9656792</rd:ReportID>
|
||||
</Report>
|
||||
@@ -5,9 +5,6 @@
|
||||
<Tablix Name="Tablix1">
|
||||
<TablixBody>
|
||||
<TablixColumns>
|
||||
<TablixColumn>
|
||||
<Width>1.60749cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.70081cm</Width>
|
||||
</TablixColumn>
|
||||
@@ -15,73 +12,40 @@
|
||||
<Width>1.92431cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>3.73987cm</Width>
|
||||
<Width>4.71883cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.5cm</Width>
|
||||
<Width>1.41521cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>4.74981cm</Width>
|
||||
<Width>2.95064cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.3231cm</Width>
|
||||
<Width>1.69352cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.88058cm</Width>
|
||||
<Width>1.84871cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.70617cm</Width>
|
||||
<Width>1.65325cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.82697cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.70625cm</Width>
|
||||
<Width>1.65333cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.85343cm</Width>
|
||||
<Width>3.70551cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.5cm</Width>
|
||||
</TablixColumn>
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
<TablixRow>
|
||||
<Height>0.47879cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox4">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>SerieFolio</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox4</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<BackgroundColor>Silver</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox16">
|
||||
@@ -163,7 +127,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Proveedor</Value>
|
||||
<Value>Producto/Servicio</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
@@ -199,7 +163,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Sub Proyecto</Value>
|
||||
<Value>AF</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
@@ -235,7 +199,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Producto/Servicio</Value>
|
||||
<Value>Clasificación</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
@@ -271,7 +235,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>AF</Value>
|
||||
<Value>PU</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
@@ -307,7 +271,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Clasificación</Value>
|
||||
<Value>Cantidad</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
@@ -343,7 +307,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>PU</Value>
|
||||
<Value>SubTotal</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
@@ -379,7 +343,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Cantidad</Value>
|
||||
<Value>Total</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
@@ -415,7 +379,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>SubTotal</Value>
|
||||
<Value>SerieFolio</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
@@ -451,7 +415,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Total</Value>
|
||||
<Value>Proveedor</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
@@ -478,36 +442,34 @@
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.42588cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="SerieFolio1">
|
||||
<Textbox Name="Textbox4">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=iif(CInt(Fields!CveCompra.Value)<1, Fields!GPO.Value,Fields!SerieFolio.Value)</Value>
|
||||
<Value>SubProyecto</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>=iif(Fields!CveCompra.Value = "", "Bold", "Normal")</FontWeight>
|
||||
<Color>=iif(Fields!CveCompra.Value= "", "White", "Black")</Color>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>SerieFolio1</rd:DefaultName>
|
||||
<rd:DefaultName>Textbox4</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=iif(Fields!CveCompra.Value = "", "#67809F", "Transparent")</BackgroundColor>
|
||||
<BackgroundColor>Silver</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
@@ -516,6 +478,11 @@
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.42588cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="FechaCompra">
|
||||
@@ -587,14 +554,14 @@
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="RazonSocial">
|
||||
<Textbox Name="PS1">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!RazonSocial.Value</Value>
|
||||
<Value>=IIf(Fields!CveCompra.Value <= 0, IIf(Fields!GPO.Value = "", Fields!SerieFolio.Value, Fields!GPO.Value),Fields!PS.Value)</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>=iif(Fields!CveCompra.Value = "", "Bold", "Normal")</FontWeight>
|
||||
@@ -605,7 +572,7 @@
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>RazonSocial</rd:DefaultName>
|
||||
<rd:DefaultName>PS1</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -621,14 +588,14 @@
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="SubProyecto">
|
||||
<Textbox Name="CodigoAF1">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!SubProyecto.Value</Value>
|
||||
<Value>=Fields!CodigoAF.Value</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>=iif(Fields!CveCompra.Value = "", "Bold", "Normal")</FontWeight>
|
||||
@@ -636,10 +603,12 @@
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
<Style>
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>SubProyecto</rd:DefaultName>
|
||||
<rd:DefaultName>CodigoAF1</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -655,14 +624,14 @@
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="PS">
|
||||
<Textbox Name="Clasificacion1">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!PS.Value</Value>
|
||||
<Value>=Fields!Clasificacion.Value</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>=iif(Fields!CveCompra.Value = "", "Bold", "Normal")</FontWeight>
|
||||
@@ -674,7 +643,7 @@
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>PS</rd:DefaultName>
|
||||
<rd:DefaultName>Clasificacion1</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -690,81 +659,7 @@
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="CodigoAF">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!CodigoAF.Value</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>=iif(Fields!CveCompra.Value = "", "Bold", "Normal")</FontWeight>
|
||||
<Format>#,0.00;- #,0.00;'-'</Format>
|
||||
<Color>=iif(Fields!CveCompra.Value= "", "White", "Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>CodigoAF</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=iif(Fields!CveCompra.Value = "", "#67809F", "Transparent")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Clasificacion">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Clasificacion.Value</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>=iif(Fields!CveCompra.Value = "", "Bold", "Normal")</FontWeight>
|
||||
<Format>#,0.00;- #,0.00;'-'</Format>
|
||||
<Color>=iif(Fields!CveCompra.Value= "", "White", "Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Clasificacion</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=iif(Fields!CveCompra.Value = "", "#67809F", "Transparent")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="PU">
|
||||
<Textbox Name="PU1">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
@@ -775,7 +670,7 @@
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>=iif(Fields!CveCompra.Value = "", "Bold", "Normal")</FontWeight>
|
||||
<Format>#,0.00;-#,0.00;'-'</Format>
|
||||
<Format>#,0.00;- #,0.00;'-'</Format>
|
||||
<Color>=iif(Fields!CveCompra.Value= "", "White", "Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -785,7 +680,7 @@
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>PU</rd:DefaultName>
|
||||
<rd:DefaultName>PU1</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -801,7 +696,7 @@
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Cantidad">
|
||||
<Textbox Name="Cantidad1">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
@@ -812,7 +707,7 @@
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>=iif(Fields!CveCompra.Value = "", "Bold", "Normal")</FontWeight>
|
||||
<Format>#,0.00;(#,0.00);'-'</Format>
|
||||
<Format>#,0.00;- #,0.00;'-'</Format>
|
||||
<Color>=iif(Fields!CveCompra.Value= "", "White", "Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -822,7 +717,7 @@
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Cantidad</rd:DefaultName>
|
||||
<rd:DefaultName>Cantidad1</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -838,7 +733,8 @@
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="SubTotal">
|
||||
<Textbox Name="SubTotal1">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
@@ -858,7 +754,7 @@
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>SubTotal</rd:DefaultName>
|
||||
<rd:DefaultName>SubTotal1</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -874,7 +770,8 @@
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Total1">
|
||||
<Textbox Name="Total">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
@@ -884,7 +781,7 @@
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>=iif(Fields!CveCompra.Value = "", "Bold", "Normal")</FontWeight>
|
||||
<Format>#,0.00;- #,0.00;'-'</Format>
|
||||
<Format>#,0.00;(#,0.00);'-'</Format>
|
||||
<Color>=iif(Fields!CveCompra.Value= "", "White", "Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -894,7 +791,116 @@
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Total1</rd:DefaultName>
|
||||
<rd:DefaultName>Total</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=iif(Fields!CveCompra.Value = "", "#67809F", "Transparent")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="SubProyecto">
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!SerieFolio.Value</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>=iif(Fields!CveCompra.Value = "", "Bold", "Normal")</FontWeight>
|
||||
<Format>#,0.00;-#,0.00;'-'</Format>
|
||||
<Color>=iif(Fields!CveCompra.Value= "", "White", "Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>SubProyecto</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=iif(Fields!CveCompra.Value = "", "#67809F", "Transparent")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="RazonSocial1">
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!RazonSocial.Value</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>=iif(Fields!CveCompra.Value = "", "Bold", "Normal")</FontWeight>
|
||||
<Format>#,0.00;- #,0.00;'-'</Format>
|
||||
<Color>=iif(Fields!CveCompra.Value= "", "White", "Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>RazonSocial1</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=iif(Fields!CveCompra.Value = "", "#67809F", "Transparent")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="SubProyecto1">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!SubProyecto.Value</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>=iif(Fields!CveCompra.Value = "", "Bold", "Normal")</FontWeight>
|
||||
<Color>=iif(Fields!CveCompra.Value= "", "White", "Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>SubProyecto1</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -942,7 +948,7 @@
|
||||
<Top>0.70583cm</Top>
|
||||
<Left>0.06614cm</Left>
|
||||
<Height>0.90467cm</Height>
|
||||
<Width>27.51879cm</Width>
|
||||
<Width>27.59109cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -1372,6 +1378,10 @@
|
||||
<DataField>GPO</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Moneda">
|
||||
<DataField>Moneda</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
</Fields>
|
||||
<rd:DataSetInfo>
|
||||
<rd:DataSetName>DataSet</rd:DataSetName>
|
||||
|
||||
@@ -51,25 +51,37 @@
|
||||
<TablixBody>
|
||||
<TablixColumns>
|
||||
<TablixColumn>
|
||||
<Width>2.51027cm</Width>
|
||||
<Width>1.78756cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.396cm</Width>
|
||||
<Width>1.7468cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.01424cm</Width>
|
||||
<Width>1.87995cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.3007cm</Width>
|
||||
<Width>1.75936cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>0.96542cm</Width>
|
||||
<Width>1.99234cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.21367cm</Width>
|
||||
<Width>0.7279cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>0.90371cm</Width>
|
||||
<Width>2.03612cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>0.67438cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.94909cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>0.5862cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.38875cm</Width>
|
||||
</TablixColumn>
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
@@ -112,6 +124,114 @@
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Descuento">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Descuento.Value</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
<Format>#,0.00</Format>
|
||||
<Color>=IIF(Fields!GPO.Value="", "White", "Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Descuento</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Bonificacion">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Bonificacion.Value</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
<Format>#,0.00</Format>
|
||||
<Color>=IIF(Fields!GPO.Value="", "White", "Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Bonificacion</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Costo">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Costo.Value</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
<Format>#,0.00</Format>
|
||||
<Color>=IIF(Fields!GPO.Value="", "White", "Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Costo</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Utilidad">
|
||||
@@ -328,6 +448,42 @@
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Rentabilidad">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Rentabilidad.Value</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
<Format>#,0.00</Format>
|
||||
<Color>=IIF(Fields!GPO.Value="", "White", "Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Rentabilidad</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
</TablixRows>
|
||||
@@ -373,6 +529,123 @@
|
||||
</CellContents>
|
||||
</TablixHeader>
|
||||
</TablixMember>
|
||||
<TablixMember>
|
||||
<TablixHeader>
|
||||
<Size>0.46771cm</Size>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox25">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Descuento</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
<Color>White</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox25</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>DimGray</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<BackgroundColor>Gray</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixHeader>
|
||||
</TablixMember>
|
||||
<TablixMember>
|
||||
<TablixHeader>
|
||||
<Size>0.46771cm</Size>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox20">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Bonificacion</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
<Color>White</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox20</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>DimGray</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<BackgroundColor>Gray</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixHeader>
|
||||
</TablixMember>
|
||||
<TablixMember>
|
||||
<TablixHeader>
|
||||
<Size>0.46771cm</Size>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox17">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Costo</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
<Color>White</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox17</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>DimGray</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<BackgroundColor>Gray</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixHeader>
|
||||
</TablixMember>
|
||||
<TablixMember>
|
||||
<TablixHeader>
|
||||
<Size>0.46771cm</Size>
|
||||
@@ -607,6 +880,45 @@
|
||||
</CellContents>
|
||||
</TablixHeader>
|
||||
</TablixMember>
|
||||
<TablixMember>
|
||||
<TablixHeader>
|
||||
<Size>0.46771cm</Size>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox21">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>% Rent.</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
<Color>White</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox21</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>DimGray</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<BackgroundColor>Gray</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixHeader>
|
||||
</TablixMember>
|
||||
</TablixMembers>
|
||||
</TablixColumnHierarchy>
|
||||
<TablixRowHierarchy>
|
||||
@@ -614,7 +926,7 @@
|
||||
<TablixMember>
|
||||
<Group Name="GPO" />
|
||||
<TablixHeader>
|
||||
<Size>7.28314cm</Size>
|
||||
<Size>3.0587cm</Size>
|
||||
<CellContents>
|
||||
<Textbox Name="GPO">
|
||||
<CanGrow>true</CanGrow>
|
||||
@@ -725,7 +1037,7 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>1.01452cm</Top>
|
||||
<Left>6.93622cm</Left>
|
||||
<Left>5.03122cm</Left>
|
||||
<Height>1.73771cm</Height>
|
||||
<Width>5.11444cm</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
@@ -763,7 +1075,7 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>1.85236cm</Top>
|
||||
<Left>7.25372cm</Left>
|
||||
<Left>5.34872cm</Left>
|
||||
<Height>0.58236cm</Height>
|
||||
<Width>2.59949cm</Width>
|
||||
<ZIndex>3</ZIndex>
|
||||
@@ -800,7 +1112,7 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>1.85236cm</Top>
|
||||
<Left>10.04757cm</Left>
|
||||
<Left>8.14257cm</Left>
|
||||
<Height>0.58236cm</Height>
|
||||
<Width>1.68559cm</Width>
|
||||
<ZIndex>4</ZIndex>
|
||||
@@ -814,11 +1126,86 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox23">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>= "RENTABILIDAD"</Value>
|
||||
<MarkupType>HTML</MarkupType>
|
||||
<Style>
|
||||
<FontSize>12pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
<Color>White</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>1.01452cm</Top>
|
||||
<Left>10.71594cm</Left>
|
||||
<Height>1.73771cm</Height>
|
||||
<Width>5.11444cm</Width>
|
||||
<ZIndex>5</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<BackgroundColor>SeaGreen</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox24">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!Rentabilidad.Value</Value>
|
||||
<MarkupType>HTML</MarkupType>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
<Color>White</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>1.85236cm</Top>
|
||||
<Left>12.93844cm</Left>
|
||||
<Height>0.58236cm</Height>
|
||||
<Width>2.59949cm</Width>
|
||||
<ZIndex>6</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Height>1.667in</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>7.76343in</Width>
|
||||
<Width>7.75973in</Width>
|
||||
<Page>
|
||||
<PageHeader>
|
||||
<Height>2.22362cm</Height>
|
||||
@@ -1153,6 +1540,22 @@
|
||||
<DataField>Ventas</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Costo">
|
||||
<DataField>Costo</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Rentabilidad">
|
||||
<DataField>Rentabilidad</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Descuento">
|
||||
<DataField>Descuento</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Bonificacion">
|
||||
<DataField>Bonificacion</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="PorUtilidad">
|
||||
<DataField>PorUtilidad</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
@@ -1223,6 +1626,12 @@
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="Rentabilidad">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<rd:ReportUnitType>Cm</rd:ReportUnitType>
|
||||
<rd:ReportID>40c94aad-a12a-44fb-ab0d-ea36a9656792</rd:ReportID>
|
||||
|
||||
@@ -5,6 +5,8 @@ Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports System.Xml
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports GemBox.Spreadsheet
|
||||
|
||||
Partial Class General_SaldosIniciales
|
||||
Inherits ClsPaginas
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
@@ -25,44 +27,46 @@ Partial Class General_SaldosIniciales
|
||||
|
||||
Private Sub CargarArchivo(Ruta As String, FileName As String, Tipo As String)
|
||||
Dim dt As New DataTable
|
||||
Dim Conexion As Odbc.OdbcConnection = Nothing
|
||||
' Conexion As Odbc.OdbcConnection = Nothing
|
||||
Dim ErrorArchivo = False
|
||||
Dim ErrorExcel = False
|
||||
Dim strConnString As String = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" + Ruta + FileName + ";Extended Properties=""Excel 12.0 Xml;HDR=YES;IMEX=1;"""
|
||||
Dim objDbFactory As Common.DbProviderFactory = Common.DbProviderFactories.GetFactory("System.Data.OleDb")
|
||||
Dim objDbAdapter As Common.DbDataAdapter = objDbFactory.CreateDataAdapter()
|
||||
Dim objDbConnection As Common.DbConnection = objDbFactory.CreateConnection()
|
||||
objDbConnection.ConnectionString = strConnString
|
||||
objDbConnection.Open()
|
||||
Dim objSheetNames As DataTable = objDbConnection.GetSchema("Tables")
|
||||
Dim HojaExcel As String = objSheetNames.FiltroPrimeroValor("TABLE_NAME")
|
||||
Try
|
||||
Select Case Tipo
|
||||
Case "CSV"
|
||||
Conexion = New Odbc.OdbcConnection("Driver={Microsoft Access Text Driver (*.txt, *.csv)};Dbq=" + Ruta + ";Extensions=asc,csv,tab,txt;")
|
||||
Conexion.Open()
|
||||
Dim cmd = Conexion.CreateCommand()
|
||||
cmd.CommandType = CommandType.Text
|
||||
cmd.CommandText = $"SELECT * FROM [{FileName}]"
|
||||
Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
||||
DataAdapter.Fill(dt)
|
||||
Case "EXCEL"
|
||||
Conexion = New Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + Ruta + FileName + ";")
|
||||
Conexion.Open()
|
||||
Dim cmd = Conexion.CreateCommand()
|
||||
cmd.CommandType = CommandType.Text
|
||||
cmd.CommandText = $"SELECT * FROM [{HojaExcel}]"
|
||||
Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
||||
DataAdapter.Fill(dt)
|
||||
Case Else
|
||||
Alert("El archivo no tiene el formato correcto", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
ErrorArchivo = True
|
||||
OnError("Ocurrio un error al leer el archivo <br/>" & ex.Message, ex)
|
||||
End Try
|
||||
Conexion.Close()
|
||||
|
||||
dt = ReadExcelFile(Ruta + FileName, True)
|
||||
'Dim strConnString As String = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" + Ruta + FileName + ";Extended Properties=""Excel 12.0 Xml;HDR=YES;IMEX=1;"""
|
||||
'Dim objDbFactory As Common.DbProviderFactory = Common.DbProviderFactories.GetFactory("System.Data.OleDb")
|
||||
'Dim objDbAdapter As Common.DbDataAdapter = objDbFactory.CreateDataAdapter()
|
||||
'Dim objDbConnection As Common.DbConnection = objDbFactory.CreateConnection()
|
||||
'objDbConnection.ConnectionString = strConnString
|
||||
'objDbConnection.Open()
|
||||
'Dim objSheetNames As DataTable = objDbConnection.GetSchema("Tables")
|
||||
'Dim HojaExcel As String = objSheetNames.FiltroPrimeroValor("TABLE_NAME")
|
||||
'Try
|
||||
' Select Case Tipo
|
||||
' Case "CSV"
|
||||
' Conexion = New Odbc.OdbcConnection("Driver={Microsoft Access Text Driver (*.txt, *.csv)};Dbq=" + Ruta + ";Extensions=asc,csv,tab,txt;")
|
||||
' Conexion.Open()
|
||||
' Dim cmd = Conexion.CreateCommand()
|
||||
' cmd.CommandType = CommandType.Text
|
||||
' cmd.CommandText = $"SELECT * FROM [{FileName}]"
|
||||
' Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
||||
' DataAdapter.Fill(dt)
|
||||
' Case "EXCEL"
|
||||
' Conexion = New Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + Ruta + FileName + ";")
|
||||
' Conexion.Open()
|
||||
' Dim cmd = Conexion.CreateCommand()
|
||||
' cmd.CommandType = CommandType.Text
|
||||
' cmd.CommandText = $"SELECT * FROM [{HojaExcel}]"
|
||||
' Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
||||
' DataAdapter.Fill(dt)
|
||||
' Case Else
|
||||
' Alert("El archivo no tiene el formato correcto", TipoMensaje.MsgError)
|
||||
' Exit Sub
|
||||
' End Select
|
||||
'Catch ex As Exception
|
||||
' ErrorArchivo = True
|
||||
' OnError("Ocurrio un error al leer el archivo <br/>" & ex.Message, ex)
|
||||
'End Try
|
||||
'Conexion.Close()
|
||||
If Not ErrorArchivo Then
|
||||
If RblFormato.SelectedValue = "1" Or RblFormato.SelectedValue = "2" Then
|
||||
If Not dt.Columns(0).ColumnName = "Codigo" Then
|
||||
@@ -1523,57 +1527,68 @@ Partial Class General_SaldosIniciales
|
||||
ElseIf RblFormato.SelectedValue = "12" Then
|
||||
Dim ObjMovimientos As New ClsInventarios
|
||||
ObjMovimientos.IniciaTransacSQL()
|
||||
Dim OcurrioError As Boolean = False
|
||||
|
||||
Dim ProductosServiciosRef As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||
Dim AlmacenRef As DataTable = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
Dim contadorMovimientos As Integer = 0
|
||||
Dim listadoMovimientos As String = ""
|
||||
Dim mensajeError As String = ""
|
||||
Try
|
||||
For Each almacenSinRepetir As DataRow In dt.FiltraParametros("", DistinctColumns:={"Almacen"}).Rows
|
||||
For Each almacenSinRepetir As DataRow In dt.FiltraParametros("Almacen <> ''", DistinctColumns:={"Almacen"}).Rows
|
||||
Dim almacenActual As String = almacenSinRepetir("Almacen").ToString
|
||||
Dim CveAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"Almacen = '{almacenActual}'").ToEntero
|
||||
'Dim CveAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"Almacen = '{almacenActual}'").ToEntero
|
||||
Dim CveAlmacen As Integer = AlmacenRef.FiltroPrimeroValor("CveAlmacen", $"Almacen = '{almacenActual}'").ToEntero
|
||||
Dim movimientoCabecera As Integer = ObjMovimientos.AddMovimiento(CveAlmacen, 1, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1)
|
||||
listadoMovimientos += $"movimiento con folio <a href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={movimientoCabecera}' target='_blank' style='color:blue'>{ObjMovimientos.Folio}</a><br/>"
|
||||
If CveAlmacen > 0 Then
|
||||
contadorMovimientos += 1
|
||||
For Each nuevaEntrada As DataRow In dt.FiltraParametros($"Almacen = '{almacenActual}'").Rows
|
||||
Dim CvePS As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePS", $"Codigo = '{nuevaEntrada("CodigoPS")}'").ToEntero
|
||||
Dim CveUM As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUnidadMedida", $"Codigo = '{nuevaEntrada("CodigoPS")}'").ToEntero
|
||||
If CvePS > 0 Then
|
||||
Dim RowPS As DataRow = ProductosServiciosRef.FiltroPrimero($"Codigo = '{nuevaEntrada("CodigoPS")}' AND CveEmpresa = {UsuarioActual.CveEmpresa}")
|
||||
If RowPS IsNot Nothing Then
|
||||
Dim CvePS As Integer = RowPS("CvePS").ToString().ToEntero
|
||||
Dim CveUM As Integer = RowPS("CveUnidadMedida").ToString().ToEntero
|
||||
If CveUM > 0 Then
|
||||
Dim Cantidad As Decimal = nuevaEntrada("Existencia").ToString.ToDecimal
|
||||
Dim Valor As Decimal = nuevaEntrada("Valor").ToString.ToDecimal
|
||||
|
||||
If Not ObjMovimientos.AddMovimientoDetalle(movimientoCabecera, Cantidad, CveUM, CvePS, (Valor / Cantidad), -1, -1) Then
|
||||
OcurrioError = True
|
||||
mensajeError = "No se logró generar el detalle del movimiento"
|
||||
Throw New Exception()
|
||||
End If
|
||||
Else
|
||||
OcurrioError = True
|
||||
mensajeError = $"La unidad de medida no se reconoce para el producto servicio:{nuevaEntrada("CodigoPS")}"
|
||||
Throw New Exception()
|
||||
End If
|
||||
Else
|
||||
OcurrioError = True
|
||||
|
||||
mensajeError = $"No se encontró el producto o servicio con código ""{nuevaEntrada("CodigoPS")}"""
|
||||
Throw New Exception()
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
OcurrioError = True
|
||||
'alert amacén no existe
|
||||
mensajeError = $"No se encontró el almacén con nombre ""{almacenActual}"""
|
||||
Throw New Exception()
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
Catch ex As Exception
|
||||
OcurrioError = True
|
||||
If mensajeError = "" Then
|
||||
mensajeError = "Error técnico, informar a soporte"
|
||||
End If
|
||||
ObjMovimientos.RollBack()
|
||||
End Try
|
||||
|
||||
If Not OcurrioError Then
|
||||
If mensajeError = "" Then
|
||||
ObjMovimientos.Commit()
|
||||
Alert($"Se cargaron correctamente {contadorMovimientos} movimientos<br/><br/>{listadoMovimientos}")
|
||||
Else
|
||||
Alert("Ocurrió un error al cargar las existencias", TipoMensaje.MsgError)
|
||||
Alert(mensajeError, TipoMensaje.MsgError)
|
||||
ObjMovimientos.RollBack()
|
||||
End If
|
||||
|
||||
ObjMovimientos.Dispose()
|
||||
ProductosServiciosRef.Dispose()
|
||||
AlmacenRef.Dispose()
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -1618,5 +1633,51 @@ Partial Class General_SaldosIniciales
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable
|
||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||
Dim excelFile As ExcelFile = ExcelFile.Load(flatFilePath)
|
||||
|
||||
Dim unnamed As Integer = 0
|
||||
Dim cols As Integer
|
||||
Dim columns As String()
|
||||
Dim curRow As Integer = 0
|
||||
Dim curCol As Integer = 0
|
||||
Dim dataTable As DataTable = New DataTable()
|
||||
Dim worksheet As ExcelWorksheet = excelFile.Worksheets(0)
|
||||
|
||||
For cols = 0 To worksheet.Rows(0).AllocatedCells.Count - 1
|
||||
|
||||
If firstRowHasHeaders Then
|
||||
|
||||
If worksheet.Rows(0).Cells(cols).Value IsNot Nothing Then
|
||||
dataTable.Columns.Add(worksheet.Rows(0).Cells(cols).Value.ToString())
|
||||
Else
|
||||
dataTable.Columns.Add("Unnamed Column " & (System.Threading.Interlocked.Increment(unnamed)))
|
||||
End If
|
||||
|
||||
curRow = 1
|
||||
Else
|
||||
dataTable.Columns.Add("Column " & (cols + 1))
|
||||
End If
|
||||
Next
|
||||
|
||||
While curRow < worksheet.Rows.Count
|
||||
columns = New String(cols - 1) {}
|
||||
|
||||
For curCol = 0 To cols - 1
|
||||
|
||||
If worksheet.Rows(curRow).Cells(curCol).Value Is Nothing Then
|
||||
columns(curCol) = ""
|
||||
Else
|
||||
columns(curCol) = worksheet.Rows(curRow).Cells(curCol).Value.ToString()
|
||||
End If
|
||||
Next
|
||||
|
||||
dataTable.Rows.Add(columns)
|
||||
curRow += 1
|
||||
End While
|
||||
|
||||
Return dataTable
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
'If ObjBancos.GetBancosCuentasUsuarios(-1) Then Application("GlobalDTBancosCuentas") = ObjBancos.DtResultados Else Application("GlobalDTBancosCuentas") = Nothing
|
||||
If ObjBancos.GetBancosCuentasUsuarios(-1) Then Application("GlobalDTBancosCuentas") = ObjBancos.DtResultados Else Application("GlobalDTBancosCuentas") = Nothing
|
||||
If ObjBancos.GetBancos_TiposTransaccion(-1) Then Application("GlobalDTTipoTransacciones") = ObjBancos.DtResultados Else Application("GlobalDTTipoTransacciones") = Nothing
|
||||
If ObjBancos.GetBancos_EstatusIE() Then Application("GlobalDTEstatusIE") = ObjBancos.DtResultados Else Application("GlobalDTEstatusIE") = Nothing
|
||||
If ObjBancos.GetBancos_EstatusIE() Then Application("GlobalDTBancosEstatusIE") = ObjBancos.DtResultados Else Application("GlobalDTBancosEstatusIE") = Nothing
|
||||
If ObjBancos.GetBancos() Then Application("GlobalDTBancos") = ObjBancos.DtResultados Else Application("GlobalDTBancos") = Nothing
|
||||
If ObjBancos.GetBancos_TiposCuenta() Then Application("GlobalDTTipoCuenta") = ObjBancos.DtResultados Else Application("GlobalDTTipoCuenta") = Nothing
|
||||
ObjBancos.Dispose()
|
||||
|
||||
@@ -1528,7 +1528,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
If UsuarioActual.Empresa.Funcionalidad(342).ToEntero > 0 Then
|
||||
IdCtaContableOtro = UsuarioActual.Empresa.Funcionalidad(342).ToEntero
|
||||
End If
|
||||
Case 13
|
||||
Case 13, 29
|
||||
CveConceptoContable = 69
|
||||
Dim drr As DataRow = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimero("")
|
||||
If drr IsNot Nothing Then
|
||||
@@ -1881,7 +1881,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Dim filtro As String = ""
|
||||
Dim CveTipoAlmacen = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {DdlAlmacen.SelectedValue}").ToEntero
|
||||
|
||||
filtro = If(UsuarioActual.TienePermisoProceso(144), "CveConcepto NOT IN (1,4,5,8,9,10,12,26,27,29)", "CveConcepto NOT IN (1,2,4,5,8,9,10,12,26,27,29)")
|
||||
filtro = If(UsuarioActual.TienePermisoProceso(144), "CveConcepto NOT IN (1,4,5,8,9,10,12,26,27)", "CveConcepto NOT IN (1,2,4,5,8,9,10,12,26,27)")
|
||||
|
||||
If DdlAlmacen.SelectedValue = "-1" Then
|
||||
filtro = IIf(UsuarioActual.CveEmpresa.Contiene(72, 1, 80), "CveConcepto NOT IN (4,5,10)", filtro).ToString
|
||||
|
||||
@@ -95,15 +95,18 @@
|
||||
<td>
|
||||
<asp:GridView ID="GvDatos" runat="server" data-sort="true" AutoGenerateColumns="False" EmptyDataText="No hay movimientos." ToolTip="Listado de Movimientos" CssClass="table table-striped table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:HyperLinkField HeaderText="Folio Almacen" DataTextField="FolioAlmacen" DataNavigateUrlFields="CveMovimiento" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" ItemStyle-Width="7.5%" />
|
||||
<asp:HyperLinkField HeaderText="Folio Almacen" DataTextField="FolioAlmacen" DataNavigateUrlFields="CveMovimiento" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" ItemStyle-Width="7.5%" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Almacen" DataField="Almacen" ItemStyle-Width="20%" />
|
||||
<asp:BoundField HeaderText="Fecha Movto" DataField="FechaMovto" DataFormatString="{0:d}" ItemStyle-Width="7.5%" />
|
||||
<asp:HyperLinkField HeaderText="Folio Compra" DataTextField="FolioCompra" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" ItemStyle-Width="7.5%" />
|
||||
<asp:BoundField HeaderText="Total" DataField="TotalAlmacen" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
|
||||
<asp:HyperLinkField HeaderText="Folio Compra" DataTextField="FolioCompra" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" ItemStyle-Width="7.5%" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Proveedor" DataField="RazonSocial" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" />
|
||||
<asp:BoundField HeaderText="SubTotal" DataField="SubTotal" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
|
||||
<asp:BoundField HeaderText="Descuentos" DataField="Descuentos" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
|
||||
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
|
||||
<asp:BoundField HeaderText="Diferencia" DataField="Diferencia" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</td>
|
||||
|
||||
@@ -43,12 +43,15 @@ Partial Class Inventarios_RepAlmacenCompras
|
||||
#Region " CARGA VALORES INICIALES "
|
||||
Private Sub CargaPermisos()
|
||||
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
||||
GvDatos.Columns(6).Visible = TienePermisoImportes
|
||||
GvDatos.Columns(3).Visible = TienePermisoImportes
|
||||
GvDatos.Columns(7).Visible = TienePermisoImportes
|
||||
GvDatos.Columns(8).Visible = TienePermisoImportes
|
||||
GvDatos.Columns(9).Visible = TienePermisoImportes
|
||||
GvDatos.Columns(10).Visible = TienePermisoImportes
|
||||
GvDatos.Columns(11).Visible = TienePermisoImportes
|
||||
|
||||
If TienePermisoImportes Then
|
||||
CabeceraAlmacen.Width = "35%"
|
||||
CabeceraAlmacen.Width = "36%"
|
||||
CabeceraCompra.Width = "65%"
|
||||
Else
|
||||
CabeceraAlmacen.Width = "45%"
|
||||
|
||||
@@ -70,6 +70,7 @@ Partial Class CatFolios
|
||||
DdlTipoDocto.Items.Insert(31, New ListItem("Proveedor", "Pro"))
|
||||
DdlTipoDocto.Items.Insert(32, New ListItem("Acreedor", "Acr"))
|
||||
DdlTipoDocto.Items.Insert(33, New ListItem("Productos/Servicios", "PS"))
|
||||
DdlTipoDocto.Items.Insert(34, New ListItem("NC de Remisión", "RNC"))
|
||||
ElseIf UsuarioActual.Empresa.CvePlataforma = 2 Then
|
||||
DdlTipoDocto.Items.Insert(1, New ListItem("Facturas", "Ing"))
|
||||
DdlTipoDocto.Items.Insert(2, New ListItem("Notas de Crédito", "Egs"))
|
||||
|
||||
@@ -69,7 +69,6 @@
|
||||
<div style="margin-top: 3px;">
|
||||
<asp:CheckBox runat="server" ID="ChkEstatus" CssClass="make-switchsd" data-size="small" Checked="true"></asp:CheckBox>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row" style="margin-left: 1px; margin-top: 10px;">
|
||||
<asp:Button runat="server" ID="BtnDefaultPWD" Text="Reestablecer Contraseña" CssClass="btn btn-primary" Visible="false" />
|
||||
|
||||
@@ -716,6 +716,7 @@ Partial Class Sistemas_PopUpAddUsuario
|
||||
GvModulosPermiso.DataSource = ObjProcesos.DtResultados.FiltraParametros($"CvePlataforma = 6")
|
||||
ElseIf UsuarioActual.Empresa.CvePlataforma = 1 And CveProveedor > 0 Then
|
||||
GvModulosPermiso.DataSource = ObjProcesos.DtResultados.FiltraParametros($"CvePlataforma = 7")
|
||||
BtnDefaultPWD.Visible = True
|
||||
ElseIf UsuarioActual.Empresa.CvePlataforma = 3 Then
|
||||
GvModulosPermiso.DataSource = ObjProcesos.DtResultados.FiltraParametros("CveModulo = 433")
|
||||
End If
|
||||
@@ -855,4 +856,5 @@ Partial Class Sistemas_PopUpAddUsuario
|
||||
CargaComandos()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -266,7 +266,7 @@
|
||||
<asp:UpdatePanel runat="server" ID="UpReporteGpsButton" RenderMode="Inline" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="ReporteDispositivos" Visible="False" OnClick="GenerarReporte" data-toggle="tooltip" data-placement="left" runat="server" Text="<i class='fa fa-file-pdf-o'></i> Dispositivos GPS"></asp:LinkButton>
|
||||
<asp:LinkButton ID="ReporteDispositivos" Visible="False" OnClick="GenerarReporte" data-toggle="tooltip" data-placement="left" runat="server" Text="<i class='fa fa-file-pdf-o'></i> Dispositivos GPS"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
@@ -1129,9 +1129,9 @@
|
||||
<asp:GridView ID="GVHistorial" runat="server" DataKeyNames="CveVenta, Folio, TipoDocto" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas en el Cliente" ToolTip="Listado de Historial de Ventas" CssClass="table table-striped table-advance table-hover" Style="text-align: center; min-width: 783px; width: 100%;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Tipo" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:TemplateField >
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Factura</HeaderTemplate>
|
||||
<ItemTemplate >
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFactura" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
@@ -1678,7 +1678,7 @@
|
||||
<asp:ListItem Selected="True" Value="Ing" Text="Ingresos"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="Rem" Text="Remisión"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="Ant" Text="Anticipos"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="Egs" Text="NC"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="NC" Text="NC"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="IxC" Text="Ingresos X Comp"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="Dev" Text="Devolución"></asp:ListItem>
|
||||
</asp:ListBox>
|
||||
@@ -5483,13 +5483,12 @@
|
||||
<tbody>
|
||||
<tr class="Titulos">
|
||||
<th style="width: 28px">#</th>
|
||||
<th style="width: 200px">Clasificación<br />
|
||||
Producto </th>
|
||||
<th width="73px">Precio<br />
|
||||
General </th>
|
||||
<th style="width: 200px">Marca</th>
|
||||
<%-- <th width="73px">Precio<br />
|
||||
General </th>--%>
|
||||
<th width="73px">%</th>
|
||||
<th width="73px">Precio<br />
|
||||
Aplicado </th>
|
||||
<%-- <th width="73px">Precio<br />
|
||||
Aplicado </th>--%>
|
||||
<th style="width: 73px;"></th>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
@@ -5497,35 +5496,36 @@
|
||||
<td style="text-align: center;">
|
||||
<div class="psagregar">
|
||||
<div class="comboxes">
|
||||
<asp:DropDownList ID="DdlClasificacion2" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" Class="form-control input-sm select2me">
|
||||
<asp:DropDownList ID="DdlMarcaPS" CssClass="form-control input-sm select2me" runat="server" DataTextField="Marca" DataValueField="CveMarca" Width="100%" Height="22px"/>
|
||||
<%-- <asp:DropDownList ID="DdlClasificacion2" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" Class="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<br />
|
||||
<ADS:Dropdownlost runat="server" ID="DdlProducto2" CssStyle="width: 100%;" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
<ADS:Dropdownlost runat="server" ID="DdlProducto2" CssStyle="width: 100%;" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" />--%>
|
||||
<%-- <asp:RequiredFieldValidator ID="RFVProducto2" InitialValue="-1" runat="server" ControlToValidate="DdlProducto2" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Producto''</b> es necesario, por favor ingréselo." ValidationGroup="GprAgregaPS"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEProducto2" runat="server" HighlightCssClass="vco" TargetControlID="RFVProducto2" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<%-- <td>
|
||||
<asp:Label ID="LbPrecioG" DataFormatString="{0:N2}" Width="55px" MaxLength="15" runat="server"></asp:Label>
|
||||
</td>
|
||||
</td>--%>
|
||||
<td>
|
||||
<asp:TextBox ID="txtPorcentaje" CssClass="form-control input-sm" Width="55px" MaxLength="15" runat="server" ValidationGroup="GprAgregaPS" Style="text-align: right"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="ftbe" runat="server" TargetControlID="txtPorcentaje" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
<asp:RequiredFieldValidator ID="RFVPorcentaje" runat="server" ControlToValidate="txtPorcentaje" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''%'' Porcentaje</b> es necesario, por favor ingréselo." ValidationGroup="GprAgregaPS"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPorcentaje" runat="server" HighlightCssClass="vco" TargetControlID="RFVPorcentaje" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<%-- <td>
|
||||
<asp:Label ID="LbPrecioA" Width="55px" MaxLength="15" runat="server" ClientIDMode="Static"></asp:Label>
|
||||
</td>
|
||||
</td>--%>
|
||||
<td align="center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CssClass="btn btn-default" ValidationGroup="GprAgregaPS" Text="Agregar" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<asp:Button ID="BtnCambiaPorcentaje" Text="" OnClick="BtnCambiaPorcentaje_Click" ClientIDMode="Static" Style="display: none;" runat="server" />
|
||||
<%--<asp:Button ID="BtnCambiaPorcentaje" Text="" OnClick="BtnCambiaPorcentaje_Click" ClientIDMode="Static" Style="display: none;" runat="server" />--%>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
@@ -5546,7 +5546,7 @@
|
||||
<ItemStyle Width="28px"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="" ReadOnly="true" DataField="Producto" ItemStyle-Width="200px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="" ReadOnly="true" DataField="PrecioG" ItemStyle-Width="73px" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<%-- <asp:BoundField HeaderText="" ReadOnly="true" DataField="PrecioG" ItemStyle-Width="73px" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />--%>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="">
|
||||
@@ -5562,7 +5562,7 @@
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:BoundField HeaderText="" ReadOnly="true" DataField="PrecioA" ItemStyle-Width="73px" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<%-- <asp:BoundField HeaderText="" ReadOnly="true" DataField="PrecioA" ItemStyle-Width="73px" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />--%>
|
||||
|
||||
<asp:TemplateField>
|
||||
<EditItemTemplate>
|
||||
|
||||
@@ -1253,7 +1253,7 @@ Partial Class Clientes
|
||||
'CargaFormaPago33()
|
||||
'CargaComboCFDI()
|
||||
|
||||
'LnkPorcentajePrecios.Visible = True
|
||||
LnkPorcentajePrecios.Visible = True
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(261) Then LnkVerGrafica.Visible = True
|
||||
|
||||
@@ -3643,14 +3643,14 @@ Partial Class Clientes
|
||||
Dim FechaVencimientoF As String = If(TxtFechaVFCxP.Text = "", "-1", TxtFechaVFCxP.Text).ToString
|
||||
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
If ObjMovtos.GetCxCDetalle(FI, FF, CveCliente, -1, -1, -1, -1, -1, "-1", "-1", DdlSucursalCliente.SelectedValue.ToEntero(), "S", -1, "-1", 1, UsuarioActual.CveEmpresa, -1, 1, TipoDocto:=TipoDocto, FechaCorte:=FechaCorte, FechaVI:=FechaVencimientoI, FechaVF:=FechaVencimientoF, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
|
||||
DtCxCFact = ObjMovtos.DtResultados '.FiltraParametros("Tipo = 'Act'").Copy ' If(DdlTipoCuentasCxC.SelectedValue = "-1", ObjMovtos.DtResultados.FiltraParametros("CveVentaAmortizacion IS NULL", "TipoDocto").Copy, ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act' AND CveVentaAmortizacion IS NULL", "TipoDocto"))
|
||||
If ObjMovtos.GetCxCClienteDetalle(CveCliente, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, DdlSucursalCliente.SelectedValue.ToEntero) Then
|
||||
DtCxCFact = If(DdlTipoCuentasCxC.SelectedValue = "-1", ObjMovtos.DtResultados.FiltraParametros("", "TipoDocto").Copy, ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'", "TipoDocto"))
|
||||
'cargo los anticipos NC
|
||||
DtCxCFact.Columns.Add("SaldoAnticipo", GetType(Decimal))
|
||||
|
||||
Dim dtt As DataTable = Nothing
|
||||
If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente, -1, -1) Then
|
||||
dtt = ObjMovtos.DtResultados.FiltraParametros("Saldo > 0 AND SaldoVentaAnticipo = 0 AND ((Tipo = 'IxC' AND CveIE > 0) OR (Tipo = 'Ant' AND CveVenta > 0) )") ' que tenga saldo de anticipo y no de cliente
|
||||
dtt = If(DdlTipoCuentasCxC.SelectedValue = "-1", ObjMovtos.DtResultados.FiltraParametros("SaldoVentaAnticipo = 0 AND ((Tipo = 'IxC' AND CveIE > 0) OR (Tipo = 'Ant' AND CveVenta > 0) OR (Tipo = 'NC' AND CveVenta > 0) OR (Tipo = 'Egs' AND CveVenta > 0) )"), ObjMovtos.DtResultados.FiltraParametros("Saldo > 0 AND SaldoVentaAnticipo = 0 AND ((Tipo = 'IxC' AND CveIE > 0) OR (Tipo = 'Ant' AND CveVenta > 0) OR (Tipo = 'NC' AND CveVenta > 0) OR (Tipo = 'Egs' AND CveVenta > 0) )")) ' que tenga saldo de anticipo y no de cliente
|
||||
If dtt IsNot Nothing AndAlso dtt.Rows.Count > 0 Then
|
||||
For Each drt As DataRow In dtt.Rows
|
||||
Dim drr As DataRow = DtCxCFact.NewRow
|
||||
@@ -3685,7 +3685,7 @@ Partial Class Clientes
|
||||
SaldoIngDolaresPesos = SaldoIngDolaresPesos + (Row("Saldo").ToString.ToDouble * Row("TipoCambio").ToString.ToDouble)
|
||||
End If
|
||||
|
||||
ElseIf (Row("TipoDocto").ToString = "Ant" And Row("Saldo").ToString.ToDouble = 0) Or Row("TipoDocto").ToString = "IxC" Or Row("TipoDocto").ToString = "Egs" Or Row("TipoDocto").ToString = "Dev" Then 'Anticipos, NC, IxC
|
||||
ElseIf (Row("TipoDocto").ToString = "Ant" And Row("Saldo").ToString.ToDouble = 0) Or Row("TipoDocto").ToString = "IxC" Or Row("TipoDocto").ToString = "NC" Or Row("TipoDocto").ToString = "Dev" Then 'Anticipos, NC, IxC
|
||||
ContaAnt = ContaAnt + 1
|
||||
If Row("CveMoneda").ToString.ToEntero = 1 Then
|
||||
If Row("TipoDocto").ToString = "Dev" Then
|
||||
@@ -8138,8 +8138,9 @@ Partial Class Clientes
|
||||
|
||||
CreaDT()
|
||||
|
||||
txtPorcentaje.Attributes.Add("onchange", String.Format("FnCambiaPorcentaje({0});", "5"))
|
||||
CargaPorcentajesProductos()
|
||||
'txtPorcentaje.Attributes.Add("onchange", String.Format("FnCambiaPorcentaje({0});", "5"))
|
||||
'CargaPorcentajesProductos()
|
||||
CargaMarcas()
|
||||
LimpiaModalPorcentaje()
|
||||
End Sub
|
||||
Private Sub CreaDT()
|
||||
@@ -8154,61 +8155,69 @@ Partial Class Clientes
|
||||
End With
|
||||
|
||||
DTPorcentajeTemp.Columns.Add(column)
|
||||
DTPorcentajeTemp.Columns.Add("CvePS", GetType(Integer))
|
||||
DTPorcentajeTemp.Columns.Add("Producto", GetType(String))
|
||||
DTPorcentajeTemp.Columns.Add("PrecioG", GetType(Decimal))
|
||||
DTPorcentajeTemp.Columns.Add("CveMarca", GetType(Integer))
|
||||
DTPorcentajeTemp.Columns.Add("PorcentajeProducto", GetType(Decimal))
|
||||
DTPorcentajeTemp.Columns.Add("PrecioA", GetType(Decimal))
|
||||
DTPorcentajeTemp.Columns.Add("Estatus", GetType(String))
|
||||
DTPorcentajePrecios = DTPorcentajeTemp.Clone
|
||||
End Sub
|
||||
Private Sub CargaPorcentajesProductos()
|
||||
'Llenar el dropdownlist de Secciones
|
||||
If UsuarioActual.CveEmpresa = 66 Then
|
||||
DdlClasificacion2.DataSource = GlobalDTSubFamilias(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
|
||||
Else
|
||||
Dim ObjClasificaciones As New ClsClasificaciones
|
||||
If ObjClasificaciones.GetClasificacionesExistencias(UsuarioActual.CveEmpresa) Then
|
||||
DdlClasificacion2.DataSource = ObjClasificaciones.DtResultados
|
||||
End If
|
||||
ObjClasificaciones.Dispose()
|
||||
End If
|
||||
DdlClasificacion2.DataBind()
|
||||
Private Sub CargaMarcas()
|
||||
Dim ObjMarcas As New ClsProductosServicios
|
||||
ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa)
|
||||
DdlMarcaPS.DataSource = ObjMarcas.DtResultados
|
||||
ObjMarcas.Dispose()
|
||||
DdlMarcaPS.DataBind()
|
||||
DdlMarcaPS.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
CargaPS()
|
||||
CargaGridPorcentajes()
|
||||
|
||||
UpPorcentaje.Update()
|
||||
End Sub
|
||||
Private Sub CargaPS()
|
||||
DdlProducto2.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
'Private Sub CargaPorcentajesProductos()
|
||||
' 'Llenar el dropdownlist de Secciones
|
||||
' If UsuarioActual.CveEmpresa = 66 Then
|
||||
' DdlClasificacion2.DataSource = GlobalDTSubFamilias(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
|
||||
' Else
|
||||
' Dim ObjClasificaciones As New ClsClasificaciones
|
||||
' If ObjClasificaciones.GetClasificacionesExistencias(UsuarioActual.CveEmpresa) Then
|
||||
' DdlClasificacion2.DataSource = ObjClasificaciones.DtResultados
|
||||
' End If
|
||||
' ObjClasificaciones.Dispose()
|
||||
' End If
|
||||
' DdlClasificacion2.DataBind()
|
||||
|
||||
If UsuarioActual.CveEmpresa = 66 Then
|
||||
DdlProducto2.ddlWS.Attributes.Add("data-pagina", "Inventarios")
|
||||
End If
|
||||
' CargaPS()
|
||||
' CargaGridPorcentajes()
|
||||
|
||||
If Not DdlProducto2.UsaWebService AndAlso CType(DdlProducto2.DataSource, DataTable) Is Nothing Then
|
||||
DdlProducto2.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoPS = 2")
|
||||
' UpPorcentaje.Update()
|
||||
'End Sub
|
||||
'Private Sub CargaPS()
|
||||
' DdlProducto2.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
|
||||
DdlProducto2.DataBind()
|
||||
' If UsuarioActual.CveEmpresa = 66 Then
|
||||
' DdlProducto2.ddlWS.Attributes.Add("data-pagina", "Inventarios")
|
||||
' End If
|
||||
|
||||
DdlProducto2.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End If
|
||||
' If Not DdlProducto2.UsaWebService AndAlso CType(DdlProducto2.DataSource, DataTable) Is Nothing Then
|
||||
' DdlProducto2.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoPS = 2")
|
||||
|
||||
End Sub
|
||||
' DdlProducto2.DataBind()
|
||||
|
||||
Protected Sub DdlProducto2_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DdlProducto2.selectedindexchange
|
||||
DdlProducto2IndexChange(DdlProducto2.SelectedValue.ToEntero, DdlProducto2)
|
||||
End Sub
|
||||
Private Sub DdlProducto2IndexChange(CvePSParametro As Integer, Ddl As ADServerControl.Dropdownlost)
|
||||
Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("")
|
||||
' DdlProducto2.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
' End If
|
||||
|
||||
If drPS IsNot Nothing Then
|
||||
Dim Precio = drPS("Precio").ToString.ToDouble
|
||||
LbPrecioG.Text = Precio.FormatoNumero()
|
||||
LbPrecioA.Text = ((Precio * txtPorcentaje.Text.ToDecimal) / 100).FormatoNumero
|
||||
End If
|
||||
End Sub
|
||||
'End Sub
|
||||
|
||||
'Protected Sub DdlProducto2_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DdlProducto2.selectedindexchange
|
||||
' DdlProducto2IndexChange(DdlProducto2.SelectedValue.ToEntero, DdlProducto2)
|
||||
'End Sub
|
||||
'Private Sub DdlProducto2IndexChange(CvePSParametro As Integer, Ddl As ADServerControl.Dropdownlost)
|
||||
' Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("")
|
||||
|
||||
' If drPS IsNot Nothing Then
|
||||
' Dim Precio = drPS("Precio").ToString.ToDouble
|
||||
' LbPrecioG.Text = Precio.FormatoNumero()
|
||||
' LbPrecioA.Text = ((Precio * txtPorcentaje.Text.ToDecimal) / 100).FormatoNumero
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
Private Sub CargaGridPorcentajes()
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
@@ -8232,31 +8241,22 @@ Partial Class Clientes
|
||||
|
||||
Private Sub LimpiaModalPorcentaje()
|
||||
txtPorcentaje.Text = ""
|
||||
DdlClasificacion2.SelectedValue = "-1"
|
||||
DdlProducto2.SelectedText = ""
|
||||
DdlMarcaPS.SelectedValue = "-1"
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
|
||||
If txtPorcentaje.Text.ToDecimal >= 0 And txtPorcentaje.Text.ToDecimal <= 100 Then
|
||||
|
||||
If DdlProducto2.SelectedText <> "" Then
|
||||
If txtPorcentaje.Text.ToDecimal >= 0 And txtPorcentaje.Text.ToDecimal <= 100 Then
|
||||
Dim registro As DataRow = DTPorcentajePrecios.NewRow
|
||||
|
||||
Dim registro As DataRow = DTPorcentajePrecios.NewRow
|
||||
|
||||
registro.Item("No") = DTPorcentajePrecios.Rows.Count + 1
|
||||
registro.Item("CvePS") = DdlProducto2.SelectedValue.ToEntero
|
||||
registro.Item("Producto") = DdlProducto2.SelectedText
|
||||
registro.Item("PrecioG") = 0
|
||||
registro.Item("PrecioA") = 0 * txtPorcentaje.Text.ToDecimal / 100
|
||||
registro.Item("PorcentajeProducto") = txtPorcentaje.Text.ToDecimal
|
||||
registro.Item("Estatus") = "I"
|
||||
DTPorcentajePrecios.Rows.Add(registro)
|
||||
CargaDTPorcentajePrecios(DTPorcentajePrecios.FiltraParametros("Estatus <> 'D' "))
|
||||
Else
|
||||
Alert("El Porcentaje debe estar en un rango entre 0 y 100", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
registro.Item("No") = DTPorcentajePrecios.Rows.Count + 1
|
||||
registro.Item("CveMarca") = DdlMarcaPS.SelectedValue.ToEntero
|
||||
registro.Item("PorcentajeProducto") = txtPorcentaje.Text.ToDecimal
|
||||
registro.Item("Estatus") = "I"
|
||||
DTPorcentajePrecios.Rows.Add(registro)
|
||||
CargaDTPorcentajePrecios(DTPorcentajePrecios.FiltraParametros("Estatus <> 'D' "))
|
||||
Else
|
||||
Alert("El campo <b>''Producto''</b> es necesario, por favor ingréselo.", TipoMensaje.MsgAdvertencia)
|
||||
Alert("El Porcentaje debe estar en un rango entre 0 y 100", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
LimpiaModalPorcentaje()
|
||||
@@ -8272,7 +8272,7 @@ Partial Class Clientes
|
||||
i = lnkRemove.CommandArgument.ToString.ToEntero
|
||||
Dim Drs As DataRow() = DTPorcentajePrecios.Select(String.Format("No = {0}", i))
|
||||
If Drs.Count > 0 Then
|
||||
If CveCliente > 0 AndAlso Drs(0)("CvePS").ToString.ToEntero > 0 Then
|
||||
If CveCliente > 0 AndAlso Drs(0)("CveMarca").ToString.ToEntero > 0 Then
|
||||
Drs(0)("Estatus") = "D"
|
||||
Else
|
||||
Drs(0).Delete()
|
||||
@@ -8309,7 +8309,6 @@ Partial Class Clientes
|
||||
|
||||
If Drs.Count > 0 Then
|
||||
Drs(0)("PorcentajeProducto") = PorcentajeProducto
|
||||
Drs(0)("PrecioA") = Drs(0)("PrecioG").ToString.ToDouble * PorcentajeProducto / 100
|
||||
Drs(0)("Estatus") = "U"
|
||||
End If
|
||||
|
||||
@@ -8363,9 +8362,9 @@ Partial Class Clientes
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnCambiaPorcentaje_Click(sender As Object, e As EventArgs)
|
||||
DdlProducto2IndexChange(DdlProducto2.SelectedValue.ToEntero, DdlProducto2)
|
||||
End Sub
|
||||
'Protected Sub BtnCambiaPorcentaje_Click(sender As Object, e As EventArgs)
|
||||
' DdlProducto2IndexChange(DdlProducto2.SelectedValue.ToEntero, DdlProducto2)
|
||||
'End Sub
|
||||
#End Region
|
||||
|
||||
#Region " A C U M U L A D O R E S"
|
||||
@@ -8473,7 +8472,7 @@ Partial Class Clientes
|
||||
End Sub
|
||||
|
||||
|
||||
Function FolioNotaCredito() As Boolean
|
||||
Function FolioNotaCredito(Tipo As Integer) As Boolean
|
||||
|
||||
FolioNotaAcumulador = 0
|
||||
SerieNotaAcumulador = ""
|
||||
@@ -8485,7 +8484,7 @@ Partial Class Clientes
|
||||
|
||||
If DTSucursales.Rows.Count > 0 Then
|
||||
|
||||
If ObjFolios.GetFolios("Egs", UsuarioActual.CveEmpresa) Then
|
||||
If ObjFolios.GetFolios(If(Tipo = 1, "RNC", "Egs"), UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Dim DT As DataTable
|
||||
If UsuarioActual.CveSubProyecto > 0 Then
|
||||
@@ -8862,7 +8861,7 @@ Partial Class Clientes
|
||||
Dim Folio As Integer = 0
|
||||
Dim Serie As String = ""
|
||||
|
||||
If FolioNotaCredito() Then
|
||||
If FolioNotaCredito(Tipo) Then
|
||||
Folio = FolioNotaAcumulador
|
||||
Serie = SerieNotaAcumulador
|
||||
End If
|
||||
@@ -8879,7 +8878,7 @@ Partial Class Clientes
|
||||
ObjFactura.CveMoneda = 1
|
||||
ObjFactura.Moneda = "Pesos"
|
||||
ObjFactura.MonedaSAT = "MXN"
|
||||
ObjFactura.TipoDocto = "Egs"
|
||||
ObjFactura.TipoDocto = If(Tipo = 1, "RNC", "Egs")
|
||||
|
||||
ObjFactura.Folio = Folio
|
||||
|
||||
@@ -9013,7 +9012,7 @@ Partial Class Clientes
|
||||
|
||||
End If
|
||||
|
||||
If ObjFactura.TipoDocto = "Egs" Then
|
||||
If ObjFactura.TipoDocto.Contiene("Egs", "RNC") Then
|
||||
ObjFactura.CveTipoRelacion = -1
|
||||
End If
|
||||
|
||||
|
||||
@@ -1538,7 +1538,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
|
||||
'Conta ContPAQ
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" AndAlso UsuarioActual.Empresa.UsaContabilidad Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
|
||||
If idCuentaContabilizacion > 0 Then
|
||||
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
IDPoliza = ObjMov.ContaIdPoliza
|
||||
|
||||
@@ -2719,8 +2719,8 @@
|
||||
<asp:TextBox ID="TxtPUFactura" CssClass="form-control" runat="server" MaxLength="50" ></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVPUFactura" runat="server" ControlToValidate="TxtPUFactura" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''PU Factura''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPUFactura" runat="server" HighlightCssClass="vco" TargetControlID="RFVPUFactura"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBEPUFactura" runat="server" TargetControlID="TxtPUFactura" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<label for="<%= TxtPUFactura.ClientID.ToString()%>">PU Factura:</label>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBEPUFactura" runat="server" TargetControlID="TxtPUFactura" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
<label for="<%= TxtPUFactura.ClientID.ToString()%>">P.U.:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2830,7 +2830,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPoliza" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVPoliza" runat="server" ControlToValidate="TxtPoliza" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Poliza''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%>
|
||||
@@ -2838,7 +2838,7 @@
|
||||
<label for="<%= TxtPoliza.ClientID.ToString()%>">Poliza:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtImporteAjuste" CssClass="form-control" runat="server" Enabled="false" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVImporteAjuste" runat="server" ControlToValidate="TxtImporteAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||
@@ -2847,6 +2847,15 @@
|
||||
<label for="<%= TxtImporteAjuste.ClientID.ToString()%>">Importe:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDescuentoAjuste" CssClass="form-control" runat="server" Enabled="false" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescuentoAjuste" runat="server" ControlToValidate="TxtDescuentoAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descuento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDescuentoAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVDescuentoAjuste"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBEDescuentoAjuste" runat="server" TargetControlID="TxtDescuentoAjuste" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
<label for="<%= TxtImporteAjuste.ClientID.ToString()%>">Descuento:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:Button ID="BtnCalcularImporteAjuste" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnCalcularImporteAjuste_Click" runat="server" Text="Recalcular" />
|
||||
</div>
|
||||
|
||||
@@ -4853,7 +4853,7 @@ Partial Class PV
|
||||
TmpDTAjustes.Columns.Add("CodigoInspeccion", GetType(String))
|
||||
TmpDTAjustes.Columns.Add("Consecutivo", GetType(String))
|
||||
TmpDTAjustes.Columns.Add("ConsecutivoVenta", GetType(Integer))
|
||||
TmpDTAjustes.Columns.Add("FechaAjuste", GetType(String))
|
||||
TmpDTAjustes.Columns.Add("FechaAjuste", GetType(Date))
|
||||
TmpDTAjustes.Columns.Add("Meses", GetType(String))
|
||||
TmpDTAjustes.Columns.Add("PorcentajeAjuste", GetType(Double))
|
||||
TmpDTAjustes.Columns.Add("NumPoliza", GetType(String))
|
||||
@@ -4925,6 +4925,7 @@ Partial Class PV
|
||||
If ObjVenta.GetVentaDetalle(DdlFacturas.SelectedValue.ToEntero) Then
|
||||
DdlPSAjuste.DataSource = ObjVenta.DtResultados
|
||||
DtPUFacturas = ObjVenta.DtResultados
|
||||
TxtFechaAjuste.Text = ObjVenta.DtResultados.Rows(0)("Fecha").ToString.ToDate.ToShortDateString
|
||||
End If
|
||||
ObjVenta.Dispose()
|
||||
Else
|
||||
@@ -4936,6 +4937,7 @@ Partial Class PV
|
||||
DdlPSAjuste.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DtPUFacturas.AcceptChanges()
|
||||
UpAjuste.Update()
|
||||
CalculaPorcentajeAjuste()
|
||||
End Sub
|
||||
|
||||
Private Sub Ajuste()
|
||||
@@ -4987,7 +4989,6 @@ Partial Class PV
|
||||
TxtCodEnsamble.Text = Dr("CodigoEnsamble").ToString
|
||||
DdlTipoUso.SelectedValueExist(Dr("CveTipoUso").ToString)
|
||||
TxtCodLinea.Text = Dr("CodigoLinea").ToString
|
||||
TxtFechaAjuste.Text = Dr("FechaAjuste").ToString
|
||||
TxtCodInspeccion.Text = Dr("CodigoInspeccion").ToString
|
||||
TxtMesesUso.Text = Dr("Meses").ToString
|
||||
DdlTipoDefecto.SelectedValueExist(Dr("CveTipoDefecto").ToString)
|
||||
@@ -4997,7 +4998,8 @@ Partial Class PV
|
||||
DdlFacturas.SelectedValueExist(Dr("CveVenta").ToString)
|
||||
CargaPSAjuste()
|
||||
DdlPSAjuste.SelectedValueExist(Dr("CvePS").ToString)
|
||||
TxtPUFactura.Text = Dr("PUFactura").ToString.ToDecimal.FormatoNumero(4)
|
||||
TxtFechaAjuste.Text = Dr("FechaAjuste").ToString.ToDate.ToShortDateString
|
||||
TxtPUFactura.Text = Dr("PUFactura").ToString.ToDecimal.FormatoNumero(2)
|
||||
TxtPUFactura.Enabled = Not Dr("CveVenta").ToString.ToEntero > 0
|
||||
End If
|
||||
End Sub
|
||||
@@ -5021,7 +5023,7 @@ Partial Class PV
|
||||
End If
|
||||
Contador += 1
|
||||
Next
|
||||
TxtPUFactura.Text = PUFactura.FormatoNumero(4)
|
||||
TxtPUFactura.Text = PUFactura.FormatoNumero(2)
|
||||
End If
|
||||
|
||||
If Not DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso DdlFacturas.SelectedValue.ToEntero > 0 Then
|
||||
@@ -5040,7 +5042,7 @@ Partial Class PV
|
||||
End Sub
|
||||
|
||||
Private Sub CalculaPorcentajeAjuste()
|
||||
If DdlTipoUso.SelectedValue.ToEntero > 0 AndAlso DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso TxtMesesUso.Text <> "" Then
|
||||
If DdlTipoUso.SelectedValue.ToEntero > 0 AndAlso DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso TxtMesesUso.Text <> "" AndAlso DdlPS.SelectedValue.ToEntero > 0 Then
|
||||
Dim CveMarca As Integer = -1
|
||||
If GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).Rows.Count > 0 Then
|
||||
CveMarca = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).Rows(0)("CveMarca").ToString.ToEntero
|
||||
@@ -5050,6 +5052,36 @@ Partial Class PV
|
||||
If ObjAcum.DtResultados.Rows.Count > 0 Then
|
||||
TxtPorcentajeAjuste.Text = (ObjAcum.DtResultados.Rows(0)("Valor").ToString.ToDouble / 100).ToString
|
||||
TxtImporteAjuste.Text = (TxtPorcentajeAjuste.Text.ToDouble * TxtPUFactura.Text.ToDouble).FormatoNumero
|
||||
|
||||
Dim CargoActual As Decimal = 0
|
||||
Dim CargoAnterior As Decimal = 0
|
||||
Dim CveTamaño As Integer = 0
|
||||
|
||||
If DdlPSAjuste.SelectedValue.ToEntero > 0 Then
|
||||
Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).Rows(0)
|
||||
If Dr IsNot Nothing Then
|
||||
CargoAnterior = Dr("Cargo").ToString.ToDecimal
|
||||
End If
|
||||
End If
|
||||
|
||||
If DdlPS.SelectedValue.ToEntero > 0 Then
|
||||
Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero).Rows(0)
|
||||
If Dr IsNot Nothing Then
|
||||
CveTamaño = Dr("CveTamaño").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {CveTamaño}").Rows(0) IsNot Nothing AndAlso GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {CveTamaño}").Rows.Count > 0 Then
|
||||
Dim DrCargo As DataRow = GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {CveTamaño}").Rows(0)
|
||||
If DrCargo IsNot Nothing Then
|
||||
CargoActual = DrCargo("Cargo").ToString.ToDecimal
|
||||
End If
|
||||
End If
|
||||
|
||||
TxtDescuentoAjuste.Text = ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoActual - CargoAnterior)).FormatoNumero
|
||||
TxtDescuentoAjuste.ToolTip = $"La diferencia de ajuste fue: {(TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble).FormatoNumero()}. La diferencia de tamaños fue: {(CargoActual - CargoAnterior).FormatoNumero}."
|
||||
End If
|
||||
End If
|
||||
ObjAcum.Dispose()
|
||||
@@ -5095,7 +5127,7 @@ Partial Class PV
|
||||
Row("CodigoLinea") = TxtCodLinea.Text
|
||||
Row("CodigoInspeccion") = TxtCodInspeccion.Text
|
||||
Row("Consecutivo") = TxtConsecutivoAjuste.Text
|
||||
Row("FechaAjuste") = TxtFechaAjuste.Text
|
||||
Row("FechaAjuste") = TxtFechaAjuste.Text.ToDate
|
||||
Row("Meses") = TxtMesesUso.Text.ToEntero
|
||||
Row("PorcentajeAjuste") = TxtPorcentajeAjuste.Text.ToDouble
|
||||
Row("NumPoliza") = TxtPoliza.Text
|
||||
@@ -5125,7 +5157,7 @@ Partial Class PV
|
||||
TmpDTAjustes.Rows(IndexAjuste)("CodigoLinea") = TxtCodLinea.Text
|
||||
TmpDTAjustes.Rows(IndexAjuste)("CodigoInspeccion") = TxtCodInspeccion.Text
|
||||
TmpDTAjustes.Rows(IndexAjuste)("Consecutivo") = TxtConsecutivoAjuste.Text
|
||||
TmpDTAjustes.Rows(IndexAjuste)("FechaAjuste") = TxtFechaAjuste.Text.ToEntero
|
||||
TmpDTAjustes.Rows(IndexAjuste)("FechaAjuste") = TxtFechaAjuste.Text.ToDate
|
||||
TmpDTAjustes.Rows(IndexAjuste)("Meses") = TxtMesesUso.Text.ToDouble
|
||||
TmpDTAjustes.Rows(IndexAjuste)("PorcentajeAjuste") = TxtPorcentajeAjuste.Text
|
||||
TmpDTAjustes.Rows(IndexAjuste)("NumPoliza") = TxtPoliza.Text.ToDouble
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
<asp:ListItem Text="Pedido" Value="Ped"></asp:ListItem>
|
||||
<asp:ListItem Text="Autorización" Value="PA"></asp:ListItem>
|
||||
<asp:ListItem Text="Pedido2" Value="Pd2"></asp:ListItem>
|
||||
<asp:ListItem Text="NC de Remisión" Value="RNC"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
<td class="text-right"><b>Estatus Factura:</b></td>
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPS" CssClass="form-control Mayuscula" runat="server" MaxLength="846"></asp:TextBox>
|
||||
<label class="truncate" for="<%= TxtPS.ClientID.ToString()%>">Descripción del Producto / Servicio:</label>
|
||||
|
||||
@@ -212,6 +212,14 @@ Partial Class ProductosyServicios
|
||||
|
||||
InicializaEcommerce()
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(141) Then
|
||||
'DivDatos.Attributes("class") = "col-md-12"
|
||||
|
||||
DivDdlTipo.Visible = True
|
||||
DdlTipoPSDes.Attributes.Add("onChange", "CreaDescripcionPS();")
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) And CvePS = -1 Then
|
||||
'DivDatos.Attributes("class") = "col-md-12"
|
||||
TxtPS.Enabled = False
|
||||
|
||||
@@ -661,6 +661,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepProductosServiciosDetalle.rdlc", TmpDT, params, "ReportePS")
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
<tr>
|
||||
<td id="dvInv" runat="server" class="dataTables_scrollHead" style="text-align: center!important; width: 42%; font-size: 14px;"><b>Venta</b></td>
|
||||
<td id="dvVen" runat="server" class="dataTables_scrollHead" style="text-align: center!important; font-size: 14px; border-right-color: white!important; border-left-color: white!important; width: 25%; border-style: solid;"><b>Costo</b></td>
|
||||
<td id="dvUt" runat="server" class="dataTables_scrollHead" style="text-align: center!important; width: 40%; font-size: 14px;"><b>Utilidad/Pérdida</b></td>
|
||||
<td id="dvUt" runat="server" class="dataTables_scrollHead" style="text-align: center!important; width: 42%; font-size: 14px;"><b>Utilidad/Pérdida</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@@ -287,7 +287,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Center" HeaderText="% Rentabilidad" DataTextFormatString="{0:N}" DataTextField="Rentabilidad" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}"/>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -180,7 +180,9 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
e.Row.BackColor = ColorTranslator.FromHtml("#95A5A6")
|
||||
End If
|
||||
|
||||
If Not e.Row.RowIndex = 0 AndAlso e.Row.DBCampo("CveVenta") <> "" Then
|
||||
If Not e.Row.RowIndex = 0 AndAlso e.Row.DBCampo("SubTotal").ToDecimal = 0 AndAlso e.Row.DBCampo("CveVenta").ToEntero > 0 Then
|
||||
e.Row.CssClass = "danger"
|
||||
ElseIf Not e.Row.RowIndex = 0 AndAlso e.Row.DBCampo("CveVenta") <> "" Then
|
||||
e.Row.Cells(0).BackColor = ColorTranslator.FromHtml("#e9e9e9")
|
||||
e.Row.Cells(1).BackColor = ColorTranslator.FromHtml("#e9e9e9")
|
||||
e.Row.Cells(2).BackColor = ColorTranslator.FromHtml("#e9e9e9")
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||
<style>
|
||||
.gvFull tr td:nth-child(4) {
|
||||
/*.gvFull tr td:nth-child(4) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
.gvFull tr th:nth-child(7) {
|
||||
display: none;
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
.Widthall {
|
||||
@@ -64,7 +64,8 @@
|
||||
.white a {
|
||||
color: white !important;
|
||||
}
|
||||
.select2 .select2-selection__rendered {
|
||||
|
||||
.select2 .select2-selection__rendered {
|
||||
line-height: 1;
|
||||
color: #111;
|
||||
}
|
||||
@@ -279,6 +280,48 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpBonificacion" runat="server" UpdateMode="Conditional" class="col-md-4">
|
||||
<ContentTemplate>
|
||||
<div class="portlet smmallpadding light bordered" id="Div2" runat="server">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase"><a id="A2" runat="server" class="Texto">Bonificación </a></span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form-horizontal form-row-sepe formnombottom" style="padding-top: 0px; margin-top: -5px;">
|
||||
<div class="form-body">
|
||||
<asp:GridView ID="GvBonificacion" runat="server" CssClass="table table-striped table-hover Widthall"
|
||||
AutoGenerateColumns="False" ClientIDMode="Static" EmptyDataText=""
|
||||
GridLines="None" DataKeyNames="CveVenta,Serie,Folio,SerieFolio,FolioFiscal,TipoDocto,CveConceptoContable,Importe">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>Factura</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplFactura" runat="server" Target="_blank" CssClass="Texto" Text='<%# Eval("SerieFolio") %>' NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="TipoDocto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaAplicado" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Total" DataField="SubTotal" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Anticipo/NC/IxC" DataField="Importe" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Mon" DataField="Moneda" ItemStyle-HorizontalAlign="Center" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpDetallesCosto" runat="server" UpdateMode="Conditional" class="col-md-4">
|
||||
<ContentTemplate>
|
||||
<div class="portlet smmallpadding light bordered" id="Div1" runat="server">
|
||||
@@ -320,7 +363,7 @@
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
<asp:UpdatePanel ID="UpIndicador" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivUtilidad" visible="False" runat="server" class="col-md-3">
|
||||
@@ -371,10 +414,10 @@
|
||||
<ContentTemplate>
|
||||
<div id="dvCa" style="width:100%;top:40px">
|
||||
<table id="dTable" class="correcto table Widthall Titulos"><tr>
|
||||
<td id="Td1" runat="server" class="dataTables_scrollHead" style="text-align:center!important; font-size:14px; width:30%;"><b>Producto</b></td>
|
||||
<td id="dvInv" runat="server" class="dataTables_scrollHead" style="text-align:center!important; font-size:14px; width:25%; border-left-color: white!important;border-style: solid;border-right-color: white!important;"><b>Venta</b></td>
|
||||
<td id="dvVen" runat="server" class="dataTables_scrollHead" style="text-align:center!important; font-size:14px; border-right-color: white!important;border-left-color: white!important;width:18%;border-style: solid;"><b>Costo</b></td>
|
||||
<td id="dvUt" runat="server" class="dataTables_scrollHead" style="text-align:center!important;width: 35%;font-size:14px; "><b>Utilidad/Pérdida</b></td>
|
||||
<td id="Td1" runat="server" class="dataTables_scrollHead" style="text-align:center!important; font-size:14px; width:25%;"><b>Producto</b></td>
|
||||
<td id="dvInv" runat="server" class="dataTables_scrollHead" style="text-align:center!important; font-size:14px; width:30%; border-left-color: white!important;border-style: solid;border-right-color: white!important;"><b>Venta</b></td>
|
||||
<td id="dvVen" runat="server" class="dataTables_scrollHead" style="text-align:center!important; font-size:14px; border-right-color: white!important;border-left-color: white!important;width:15%;border-style: solid;"><b>Costo</b></td>
|
||||
<td id="dvUt" runat="server" class="dataTables_scrollHead" style="text-align:center!important;width: 15%;font-size:14px; "><b>Utilidad/Pérdida</b></td>
|
||||
</tr></table>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -383,51 +426,72 @@
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas Utilidad con los filtros especificados" ToolTip="Listado de Ventas" CssClass="table table-striped table-hover Widthall ScrollAD" data-sort="true" GridLines="None">
|
||||
<asp:GridView ID="GvDatos" runat="server" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas Utilidad con los filtros especificados" ToolTip="Listado de Ventas" CssClass="table table-striped table-hover Widthall ScrollAD" data-sort="true" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cant." ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
|
||||
|
||||
<asp:BoundField HeaderText="TipoDocto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
|
||||
|
||||
<asp:TemplateField HeaderText="Cant." ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCantVenta" runat="server" Text='<%# If(Eval("CantVta").ToString() = "0", "-", Eval("CantVta", "{0:#,###.00}")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Código" ItemStyle-Width="10%">
|
||||
<asp:TemplateField HeaderText="Código" >
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCodigo" runat="server" Text='<%# If(Eval("Codigo").ToString() = "0", "-", Eval("Codigo", "{0:#,###.##}")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="PS" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Left">
|
||||
<asp:TemplateField HeaderText="PS" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbPS" runat="server" Text='<%# If(Eval("PS").ToString() = "0", "-", Eval("PS", "{0:#,###.##}")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:HyperLinkField HeaderText="Folio" ItemStyle-Width="5%" DataNavigateUrlFields="CveVenta" DataTextField="SerieFolio" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}"/>
|
||||
<asp:HyperLinkField HeaderText="Folio" DataNavigateUrlFields="CveVenta" DataTextField="SerieFolio" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}"/>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="P.U" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField HeaderText="P.U" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbPU1" runat="server" Text='<%# If(Eval("PUVta").ToString() = "0", "-", Eval("PUVta", "{0:#,###.00}")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Total" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField HeaderText="SubTotal" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbTotal1" runat="server" Text='<%# If(Eval("TotalVta").ToString() = "0", "-", Eval("TotalVta", "{0:#,###.00}")) %>'></asp:Label>
|
||||
<asp:Label ID="LbSubTotal" runat="server" Text='<%# If(Eval("SubTotal").ToString() = "0", "-", Eval("SubTotal", "{0:#,###.00}")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Descuento" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbDescuento" runat="server" Text='<%# If(Eval("Descuento").ToString() = "0", "-", Eval("Descuento", "{0:#,###.00}")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Bonificacion" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbBonificacion" runat="server" Text='<%# If(Eval("Bonificacion").ToString() = "0", "-", Eval("Bonificacion", "{0:#,###.00}")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="SubTotal2" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbSubTotal2" runat="server" Text='<%# If(Eval("SubTotal2").ToString() = "0", "-", Eval("SubTotal2", "{0:#,###.00}")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:HyperLinkField HeaderText="Folio" ItemStyle-Width="5%" DataNavigateUrlFields="CveMovimiento" DataTextField="FolioMovto" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"/>
|
||||
<asp:HyperLinkField HeaderText="Folio" DataNavigateUrlFields="CveMovimiento" DataTextField="FolioMovto" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"/>
|
||||
|
||||
<asp:TemplateField HeaderText="P.U " ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField HeaderText="P.U " ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbPUs" runat="server" Text='<%# If(Eval("PUInv").ToString() = "0", "-", Eval("PUInv", "{0:#,###.##}")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Total" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbTotal" runat="server" Text='<%# If(Eval("TotalInv").ToString() = "0", "-", Eval("TotalInv", "{0:#,###.00}")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
@@ -437,25 +501,25 @@
|
||||
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Utilidad" ItemStyle-Width="8%" ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField HeaderText="Utilidad" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbUt" runat="server" Text='<%# If(Eval("Utilidad").ToString() = "0", "-", Eval("Utilidad", "{0:#,###.00}")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="%" ItemStyle-Width="8%" ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField HeaderText="%" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbPorUtilidad" runat="server" Text='<%# If(Eval("PorUtilidad").ToString() = "0", "-", Eval("PorUtilidad", "{0:#,###.00}")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Pérdida" ItemStyle-Width="8%" ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField HeaderText="Pérdida" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbPerdida" runat="server" Text='<%# If(Eval("Perdida").ToString() = "0", "-", Eval("Perdida", "{0:#,###.00}")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="%" ItemStyle-Width="8%" ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField HeaderText="%" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbPorPerdida" runat="server" Text='<%# If(Eval("PorPerdida").ToString() = "0", "-", Eval("PorPerdida", "{0:#,###.00}")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -196,7 +196,14 @@ Partial Class Ventas_RepVentasUtilidadDetalle
|
||||
LblPorUtilidad.Text = ((ObjVentas.Utilidad - ObjVentas.Perdida) / ObjVentas.SubTotalVenta * 100).ToString("N2")
|
||||
LblPerdida.Text = "$" + (ObjVentas.Perdida - ObjVentas.Utilidad).ToString("N2")
|
||||
LblPorPerdida.Text = ((ObjVentas.Perdida - ObjVentas.Utilidad) / ObjVentas.SubTotalVenta * 100).ToString("N2")
|
||||
|
||||
If ObjVentas.GetVentasAntNC(CveVenta, -1) Then
|
||||
GvBonificacion.DataSource = ObjVentas.DtResultados
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
GvBonificacion.DataBind()
|
||||
|
||||
|
||||
If ObjVentas.SubTotalVenta <> ObjVentas.SubTotalVentaDolares Then
|
||||
LbSubTotalDolares.Visible = True
|
||||
@@ -220,10 +227,12 @@ Partial Class Ventas_RepVentasUtilidadDetalle
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Or e.Row.DBCampo("CveVentaDetalle") = "" Then
|
||||
If e.Row.DBCampo("CveVentaDetalle") = "" AndAlso e.Row.DBCampo("CveVenta") = "" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
Else
|
||||
'e.Row.Cells(0).BackColor = ColorTranslator.FromHtml("#e9e9e9")
|
||||
|
||||
@@ -39,8 +39,10 @@
|
||||
|
||||
#chartdiv {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
height: 600px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
@@ -170,8 +172,9 @@
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpIndicador" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row" >
|
||||
<div id="DivNeto" runat="server" class="col-md-offset-4 col-md-3">
|
||||
<div class="row" >
|
||||
<div class="col-md-3"></div>
|
||||
<div id="DivNeto" runat="server" class="col-md-3">
|
||||
<div id="DivClaseNeto" runat="server" class="dashboard-stat dashboard-stat-v2 green">
|
||||
<div class="visual"><i class="fa fa-bar-chart-o" '=""></i></div>
|
||||
<div class="details"><div class="number"><asp:Label ID="LblNombreNeto" runat="server"></asp:Label></div>
|
||||
@@ -183,6 +186,18 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="DivRentabilidad" runat="server" class=" col-md-3">
|
||||
<div id="DivClaseRentabilidad" runat="server" class="dashboard-stat dashboard-stat-v2 green">
|
||||
<div class="visual"><i class="fa fa-bar-chart-o" '=""></i></div>
|
||||
<div class="details"><div class="number"><asp:Label ID="LblNombreRentabilidad" runat="server"></asp:Label></div>
|
||||
<div class="desc"><label id="LblRentabilidadIndicador" runat="server" class="indicadortipo2 col-md-6 tooltips" data-original-title="Rentabilidad">
|
||||
<asp:Label ID="LblRentabilidad" runat="server"></asp:Label>%</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br />
|
||||
</ContentTemplate>
|
||||
@@ -194,12 +209,16 @@
|
||||
<Columns>
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Left" Target="_blank" HeaderText="Grupo" DataTextField="GPO" DataNavigateUrlFields="FechaI,FechaF,CveSubProyecto,CveCliente,CveVendedor,Grupo,GPO,CvePS,CveClasificacion" DataNavigateUrlFormatString="RepVentasUtilidad.aspx?FechaI={0}&FechaF={1}&CveSubProyecto={2}&CveCliente={3}&CveVendedor={4}&Gpo={5}&CveGpo={6}&CvePS={7}&CveClasificacion={8}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Ventas" DataField="Ventas" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Descuento" DataField="Descuento" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Bonificacion" DataField="Bonificacion" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Costo" DataField="Costo" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Utilidad" DataField="Utilidad" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="%" DataField="PorUtilidad" ItemStyle-Width="7px" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Perdida" DataField="Perdida" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="%" DataField="PorPerdida" ItemStyle-Width="7px" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Neto" DataField="Neto" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="%" DataField="PorNeto" ItemStyle-Width="7px" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="% Rentabilidad" DataField="Rentabilidad" ItemStyle-Width="7px" DataFormatString="{0:N2}" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
@@ -215,8 +234,20 @@
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="chartdiv"></div>
|
||||
<div class="row">
|
||||
|
||||
<label class="col-md-1 truncate">Ver:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlVer" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlVer_SelectedIndexChanged" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Neto" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Rentabilidad" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<br />
|
||||
<div id="chartdiv"></div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
@@ -232,7 +263,7 @@
|
||||
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
||||
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
|
||||
<script>
|
||||
function CargaGraficaCompracion(data) {
|
||||
function CargaGraficaBarrasNeto(data) {
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"theme": "light",
|
||||
"type": "serial",
|
||||
@@ -251,21 +282,12 @@
|
||||
"startDuration": 1,
|
||||
"graphs": [
|
||||
{
|
||||
"balloonText": "Perdida [[category]]: <b>[[value]] [[moneda]]</b>",
|
||||
"balloonText": "Neto [[category]]: <b>[[value]] [[moneda]]</b>",
|
||||
"fillAlphas": 0.9,
|
||||
"lineAlpha": 0.2,
|
||||
"type": "column",
|
||||
"valueField": "perdida",
|
||||
"title": "Perdida"
|
||||
|
||||
},
|
||||
{
|
||||
"balloonText": "Utilidad [[category]]: <b>[[value]] [[moneda]]</b>",
|
||||
"fillAlphas": 0.9,
|
||||
"lineAlpha": 0.2,
|
||||
"type": "column",
|
||||
"valueField": "utilidad",
|
||||
"title": "Utilidad"
|
||||
"valueField": "neto",
|
||||
"title": "Neto"
|
||||
}],
|
||||
"plotAreaFillAlphas": 0.1,
|
||||
"depth3D": 60,
|
||||
@@ -295,6 +317,62 @@
|
||||
chart.validateNow();
|
||||
});
|
||||
}
|
||||
|
||||
function CargaGraficaBarrasRentabilidad(data) {
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"theme": "light",
|
||||
"type": "serial",
|
||||
"dataProvider": data,
|
||||
"legend": {
|
||||
"horizontalGap": 10,
|
||||
"maxColumns": 1,
|
||||
"position": "right",
|
||||
"useGraphSettings": true,
|
||||
"markerSize": 10
|
||||
},
|
||||
"valueAxes": [{
|
||||
"stackType": "3d",
|
||||
"position": "left"
|
||||
}],
|
||||
"startDuration": 1,
|
||||
"graphs": [
|
||||
{
|
||||
"balloonText": "Rentabilidad [[category]]: <b>[[value]] [[moneda]]</b>",
|
||||
"fillAlphas": 0.9,
|
||||
"lineAlpha": 0.2,
|
||||
"type": "column",
|
||||
"valueField": "rentabilidad",
|
||||
"title": "Rentabilidad"
|
||||
}],
|
||||
"plotAreaFillAlphas": 0.1,
|
||||
"depth3D": 60,
|
||||
"angle": 30,
|
||||
"categoryField": "gpo",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"labelRotation": 90
|
||||
},
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
jQuery('.chart-input').off().on('input change', function () {
|
||||
var property = jQuery(this).data('property');
|
||||
var target = chart;
|
||||
chart.startDuration = 0;
|
||||
|
||||
if (property == 'topRadius') {
|
||||
target = chart.graphs[0];
|
||||
if (this.value == 0) {
|
||||
this.value = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
target[property] = this.value;
|
||||
chart.validateNow();
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -136,6 +136,12 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
LblNeto.Text = Neto.ToString("N2")
|
||||
LblPorNeto.Text = PorNeto.ToString("N2")
|
||||
End If
|
||||
|
||||
LblNombreRentabilidad.Text = "Rentabilidad"
|
||||
DivClaseRentabilidad.Attributes.Add("class", "dashboard-stat dashboard-stat-v2 green")
|
||||
LblRentabilidadIndicador.Attributes.Add("data-original-title", "Rentabilidad")
|
||||
LblRentabilidad.Text = DtDatos.Rows(0)("Rentabilidad").ToString.ToDouble.ToString("N2")
|
||||
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
@@ -161,26 +167,52 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
|
||||
LblTituloGrafica.Text = $"Agrupado por: {Agrupador}"
|
||||
RegistraScript("$('#DivModalGrafica').modal('show')")
|
||||
Dim Dt As New DataTable()
|
||||
Dt.Columns.Add("gpo")
|
||||
Dt.Columns.Add("utilidad")
|
||||
Dt.Columns.Add("perdida")
|
||||
For Each Dr As DataRow In DtDatos.Rows
|
||||
If Dr("GPO").ToString <> "" Then
|
||||
Dim Row As DataRow = Nothing
|
||||
Row = Dt.NewRow()
|
||||
Row("gpo") = Dr("GPO").ToString
|
||||
Row("utilidad") = Dr("Utilidad").ToString.FormatoNumero
|
||||
Row("perdida") = Dr("Perdida").ToString.FormatoNumero
|
||||
Dt.Rows.Add(Row)
|
||||
End If
|
||||
Next
|
||||
CargaGrafica()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrafica()
|
||||
If DdlVer.SelectedValue.ToEntero = 1 Then
|
||||
Dim Dt As New DataTable()
|
||||
Dt.Columns.Add("gpo")
|
||||
Dt.Columns.Add("neto")
|
||||
For Each Dr As DataRow In DtDatos.Rows
|
||||
If Dr("GPO").ToString <> "" Then
|
||||
Dim Row As DataRow = Nothing
|
||||
Row = Dt.NewRow()
|
||||
Row("gpo") = Dr("GPO").ToString
|
||||
Row("neto") = Dr("Neto").ToString.FormatoNumero
|
||||
Dt.Rows.Add(Row)
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim query = From s In Dt.AsEnumerable() Select New With {.gpo = s("gpo").ToString(), .neto = s("neto").ToString().ToDouble()}
|
||||
Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(query)
|
||||
RegistraScript($"CargaGraficaBarrasNeto({json})", "22")
|
||||
ElseIf DdlVer.SelectedValue.ToEntero = 2 Then
|
||||
Dim Dt2 As New DataTable()
|
||||
Dt2.Columns.Add("gpo")
|
||||
Dt2.Columns.Add("rentabilidad")
|
||||
For Each Dr As DataRow In DtDatos.Rows
|
||||
If Dr("GPO").ToString <> "" Then
|
||||
Dim Row As DataRow = Nothing
|
||||
Row = Dt2.NewRow()
|
||||
Row("gpo") = Dr("GPO").ToString
|
||||
Row("rentabilidad") = Dr("Rentabilidad").ToString.FormatoNumero
|
||||
Dt2.Rows.Add(Row)
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim query2 = From s In Dt2.AsEnumerable() Select New With {.gpo = s("gpo").ToString(), .rentabilidad = s("rentabilidad").ToString().ToDouble()}
|
||||
Dim json2 As String = Newtonsoft.Json.JsonConvert.SerializeObject(query2)
|
||||
RegistraScript($"CargaGraficaBarrasRentabilidad({json2})", "23")
|
||||
End If
|
||||
|
||||
Dim query = From s In Dt.AsEnumerable() Select New With {.gpo = s("gpo").ToString(), .utilidad = s("utilidad").ToString().ToDouble(), .perdida = s("perdida").ToString().ToDouble}
|
||||
Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(query)
|
||||
RegistraScript($"CargaGraficaCompracion({json})", "22")
|
||||
UPModalProd.Update()
|
||||
End Sub
|
||||
Protected Sub DdlVer_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaGrafica()
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
@@ -197,7 +229,12 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
e.Row.DBCampo("FechaI"), e.Row.DBCampo("FechaF"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveVendedor"),
|
||||
e.Row.DBCampo("Grupo"), e.Row.DBCampo("GPO"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveClasificacion"))
|
||||
e.Row.Cells(0).Text = "<a class=""" & Css & """ href=""" & Liga & """>" & e.Row.Cells(0).Text & "</a>"
|
||||
Else
|
||||
e.Row.Cells(9).BackColor = Drawing.Color.LightGray
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -234,6 +271,7 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
|
||||
params.Add(New ReportParameter("Neto", LblNeto.Text))
|
||||
params.Add(New ReportParameter("PorNeto", $"{LblPorNeto.Text}%"))
|
||||
params.Add(New ReportParameter("Rentabilidad", $"{LblRentabilidad.Text}%"))
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
@@ -248,4 +286,5 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1238,6 +1238,7 @@
|
||||
<asp:HyperLink ID="HplFactura" runat="server" Target="_blank" CssClass="Texto" Text='<%# Eval("SerieFolio") %>' NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="TipoDocto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaAplicado" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Total" DataField="SubTotal" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Anticipo/NC/IxC" DataField="Importe" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
@@ -1252,6 +1253,7 @@
|
||||
<asp:HyperLink ID="HplFactura" runat="server" Target="_blank" CssClass="Texto" Text='<%# Eval("SerieFolio") %>' NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="TipoDocto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaAplicado" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Total" DataField="SubTotal" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Anticipo/NC/IxC" DataField="Importe" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
@@ -1419,7 +1421,7 @@
|
||||
</td>
|
||||
<td><b>T.C.:</b></td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtTipoCambio" onkeyup="ConvertirDllsPesos();" runat="server" CssClass="form-control input-sm" MaxLength="7" Text="1" Enabled="true" Width="70px" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtTipoCambio" onkeyup="ConvertirDllsPesos();" runat="server" CssClass="form-control input-sm" MaxLength="7" Text="1" Enabled="true" Width="70px" ClientIDMode="Static" Readonly ="true"></asp:TextBox>
|
||||
<asp:CompareValidator ID="CVTipoCambio" runat="server" ControlToValidate="TxtTipoCambio" Display="None" ErrorMessage="El campo <b>''Tipo de Cambio''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Double" ValidationGroup="GrpEmitirImprimir"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTipoCambio" runat="server" HighlightCssClass="vco" TargetControlID="CVTipoCambio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:Label runat="server" ID="LblTCValuacion" ToolTip="Última Valuación" Text="" Visible="false"></asp:Label>
|
||||
|
||||
@@ -1727,6 +1727,10 @@ Partial Class Ventas
|
||||
|
||||
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Pedido", "Pd2"))
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(344).ToString = "1" Then
|
||||
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("NC de Remisión", "RNC"))
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(528) = "1" Then 'FUNCIONALIDAD. DE REGISTRO DE CUENTA PREDIAL.
|
||||
GvPS.Columns(ColumnaPredial).Visible = True
|
||||
thPredial1.Visible = True
|
||||
@@ -3772,7 +3776,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
TxtTipoCambio.Text = DbRowVenta("TipoCambio").ToString
|
||||
If DbRowVenta("TipoCambio").ToString.ToDecimal <> DbRowVenta("TipoCambioValuacion").ToString.ToDecimal Then
|
||||
If DbRowVenta("UltimasFluctuaciones").ToString <> "" Then
|
||||
LblTCValuacion.Text = String.Format("Ult. Val:{0}", DbRowVenta("UltimasFluctuaciones").ToString)
|
||||
LblTCValuacion.Visible = True
|
||||
End If
|
||||
@@ -6568,11 +6572,11 @@ Partial Class Ventas
|
||||
'ContPAQ El movimiento 1 es el de Venta
|
||||
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ant", "Rem", "Cot", "Ped", "Pd2", "PA", "NC") Then
|
||||
If UsuarioActual.CveEmpresa = 119 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ant", "Rem", "RNC", "Cot", "Ped", "Pd2", "PA", "NC") Then
|
||||
AutoConta = False
|
||||
End If
|
||||
|
||||
If AutoConta And UsuarioActual.Empresa.UsaContabilidad = True Then
|
||||
If AutoConta Then
|
||||
If idCuentaContabilizacion > 0 Then
|
||||
If ObjConta.ContabilizarPrePoliza(ObjFactura.CvePrePoliza, ObjFactura.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then
|
||||
|
||||
@@ -6623,7 +6627,7 @@ Partial Class Ventas
|
||||
Dim EstatusSMS = 0
|
||||
|
||||
'TIMBRADO Y CASO ESPECIAL NOTA DE CREDITO
|
||||
If (TipoDoctoDevolucion = "" OrElse Not TipoDoctoDevolucion.Contiene("Rem", "Cot", "Ped", "DPe", "PA", "Pd2")) Then
|
||||
If (TipoDoctoDevolucion = "" OrElse Not TipoDoctoDevolucion.Contiene("Rem", "RNC", "Cot", "Ped", "DPe", "PA", "Pd2")) Then
|
||||
|
||||
Dim DebeTimbrar As Boolean = True
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then
|
||||
@@ -9110,7 +9114,7 @@ Partial Class Ventas
|
||||
CvePlantilaPoliza = 4
|
||||
ElseIf ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
|
||||
CvePlantilaPoliza = 7
|
||||
ElseIf ObjFactura.TipoDocto = "Rem" Then
|
||||
ElseIf ObjFactura.TipoDocto.Contiene("Rem", "RNC") Then
|
||||
CvePlantilaPoliza = 4
|
||||
End If
|
||||
|
||||
@@ -9179,7 +9183,7 @@ Partial Class Ventas
|
||||
|
||||
Select Case ConceptoContable
|
||||
Case 1 'Cliente
|
||||
If Not ObjFactura.TipoDocto.Contiene("Egs", "Rem") Then
|
||||
If Not ObjFactura.TipoDocto.Contiene("Egs", "Rem", "RNC") Then
|
||||
importeMovimiento = (ObjFactura.Total - TotalOtrosConceptos) * ValorMultiplicador
|
||||
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
@@ -9253,6 +9257,37 @@ Partial Class Ventas
|
||||
ViewState("SeGuardoPrePoliza") = True
|
||||
End If
|
||||
|
||||
Case 277 'Remisión del cliente
|
||||
|
||||
If ObjFactura.TipoDocto = "RNC" Then
|
||||
importeMovimiento = (ObjFactura.Total - TotalOtrosConceptos) * ValorMultiplicador
|
||||
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
|
||||
If tipoCambio = 1 Then
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContClientes
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaClientes
|
||||
Else
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera
|
||||
End If
|
||||
IdCtaContableCliente = IdCtaContable
|
||||
CveCuentaCliente = CveCuenta
|
||||
|
||||
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 278, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
Else
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
importeMovimiento = 0
|
||||
ViewState("SeGuardoPrePoliza") = True
|
||||
End If
|
||||
|
||||
Case 12 'Nota de Credito
|
||||
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
|
||||
importeMovimiento = ObjFactura.Total * ValorMultiplicador
|
||||
@@ -9718,7 +9753,7 @@ Partial Class Ventas
|
||||
importeMovimiento = 0
|
||||
|
||||
Case 4 'Venta Clasificacion
|
||||
If Not ObjFactura.TipoDocto.Contiene("Rem", "Ant", "Egs", "Dev") Then
|
||||
If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC", "Ant", "Egs", "Dev") Then
|
||||
|
||||
Dim ConceptoContableAplicar = 4
|
||||
Dim CveVentaAplicar = ObjFactura.CveVenta
|
||||
@@ -9896,7 +9931,7 @@ Partial Class Ventas
|
||||
|
||||
importeMovimiento = 0
|
||||
Case 103 'Descuento
|
||||
If Not ObjFactura.TipoDocto.Contiene("Rem") AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "-1" Then
|
||||
If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "-1" Then
|
||||
|
||||
importeMovimiento = ObjFactura.Descuento * ValorMultiplicador
|
||||
importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador
|
||||
@@ -9943,7 +9978,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
Case 8 'Ret IVA por Trasladar
|
||||
If Not ObjFactura.TipoDocto.Contiene("Rem") Then
|
||||
If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") Then
|
||||
importeMovimiento = ObjFactura.RetIVA * ValorMultiplicador
|
||||
importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
@@ -9974,7 +10009,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
Case 9 'Ret ISR por Trasladar
|
||||
If Not ObjFactura.TipoDocto.Contiene("Rem") Then
|
||||
If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") Then
|
||||
importeMovimiento = ObjFactura.RetISR * ValorMultiplicador
|
||||
importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
@@ -10004,7 +10039,7 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
Case 13 'Iva por Trasladar
|
||||
If Not ObjFactura.TipoDocto.Contiene("Rem") Then
|
||||
If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") Then
|
||||
importeMovimiento = ObjFactura.IVA * ValorMultiplicador
|
||||
importeMX = Math.Round(importeMovimiento * tipoCambio * Multiplicador, 2)
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
@@ -11154,6 +11189,7 @@ Partial Class Ventas
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
Dim ObjVenta As New ClsVentas(ObjConta.IniciaTransacSQL())
|
||||
Dim ObjIE As New ClsBancos(ObjConta.IniciaTransacSQL())
|
||||
Dim ObjContpaq As ClsContPAQi = Nothing
|
||||
|
||||
Dim CvePrepoliza As Integer
|
||||
@@ -11186,11 +11222,16 @@ Partial Class Ventas
|
||||
' FechaMaxima = "01/01/2018".ToDate
|
||||
'End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
CvePrepoliza = ObjConta.AddPrePolizas("Ventas/Anticipos", CvePlantillaPoliza, TxtTotal.Text.ToDecimal, TxtTotal.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero, TxtFechaAnticipoCliente.Text.ToDate, String.Format("{0} {1} {2}-{3}", If(EsAnticipo2017Jam, "Aplicación Anticipo 2017", ""), NombreCliente, Serie, TxtFolio.Text), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If CvePrepoliza > 0 Then
|
||||
Dim tipoCambioPago As Decimal = 1
|
||||
Dim tipoCambioVenta As Decimal = 1
|
||||
Dim tipoCambioVentaValuacion As Decimal = 1
|
||||
Dim PorcentajePago As Decimal = 100
|
||||
Dim dtConceptos As DataTable = Nothing
|
||||
Dim CveMonedaVenta = DdlMoneda.SelectedValue.ToEntero
|
||||
@@ -11214,21 +11255,42 @@ Partial Class Ventas
|
||||
For Each gvr As GridViewRow In GVAnticipos.Rows
|
||||
If gvr.FCCheckBox("Chk" & gvr.RowIndex).Checked Then
|
||||
|
||||
|
||||
Dim FechaUltimaFluctuacion As Date = MinFecha
|
||||
Dim TipoCambioFluctuacion As Decimal = 1
|
||||
If ObjIE.GetFluctuacionesBitacora(UsuarioActual.CveEmpresa) Then
|
||||
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||
Dim tFecha As Date = gvr.DataKey("Fecha").ToDate
|
||||
Dim Fecha As String = String.Format("{0}/{1}/{2}", tFecha.Year, tFecha.Month, tFecha.Day)
|
||||
Dim drr As DataRow = ObjIE.DtResultados.FiltroPrimero("Fecha < #" & Fecha & "#", "Fecha DESC")
|
||||
|
||||
If drr IsNot Nothing Then
|
||||
FechaUltimaFluctuacion = drr("Fecha").ToString.ToDate
|
||||
TipoCambioFluctuacion = drr("TipoCambio").ToString.ToDecimal
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
If DdlMoneda.SelectedValue.ToEntero = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then 'Si la venta viene en Pesos y se va a pagar en Pesos
|
||||
tipoCambioPago = 1
|
||||
tipoCambioVenta = 1
|
||||
tipoCambioVentaValuacion = 1
|
||||
PorcentajePago = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("Original").ToDecimal
|
||||
ElseIf DdlMoneda.SelectedValue.ToEntero = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then 'Si la venta viene en Dolares y se va a pagar en Pesos
|
||||
tipoCambioPago = gvr.FCTextBox("TxtTC" & gvr.RowIndex).Text.ToDecimal
|
||||
tipoCambioVenta = TxtTipoCambio.Text.ToDecimal
|
||||
tipoCambioVentaValuacion = If(TxtFecha.Text.ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, TxtTipoCambio.Text.ToDecimal)
|
||||
PorcentajePago = (gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal) / gvr.DataKey("Original").ToDecimal
|
||||
ElseIf DdlMoneda.SelectedValue.ToEntero = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES
|
||||
tipoCambioPago = gvr.DataKey("TipoCambio").ToString.ToDecimal
|
||||
tipoCambioVenta = TxtTipoCambio.Text.ToDecimal
|
||||
tipoCambioVentaValuacion = If(TxtFecha.Text.ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, TxtTipoCambio.Text.ToDecimal)
|
||||
PorcentajePago = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("Original").ToDecimal
|
||||
ElseIf DdlMoneda.SelectedValue.ToEntero = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
||||
tipoCambioPago = gvr.FCTextBox("TxtTC" & gvr.RowIndex).Text.ToDecimal
|
||||
tipoCambioVenta = 1
|
||||
tipoCambioVentaValuacion = 1
|
||||
PorcentajePago = (gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal) / gvr.DataKey("Original").ToDecimal
|
||||
End If
|
||||
|
||||
@@ -11255,17 +11317,17 @@ Partial Class Ventas
|
||||
importeMX = importeMovimiento
|
||||
ElseIf DdlMoneda.SelectedValue.ToEntero = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal
|
||||
importeMX = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal * tipoCambioVenta
|
||||
importeMX = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal * tipoCambioVentaValuacion
|
||||
ElseIf DdlMoneda.SelectedValue.ToEntero = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal
|
||||
importeMX = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal * tipoCambioVenta
|
||||
importeMX = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal * tipoCambioVentaValuacion
|
||||
ElseIf DdlMoneda.SelectedValue.ToEntero = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal
|
||||
importeMX = importeMovimiento
|
||||
End If
|
||||
importeMovimiento = Math.Round(importeMovimiento, 2)
|
||||
importeMX = Math.Round(importeMX, 2)
|
||||
TipoCambioGeneral = tipoCambioVenta
|
||||
TipoCambioGeneral = tipoCambioVentaValuacion
|
||||
|
||||
If CveMonedaVenta = 1 Then
|
||||
IdCtaContable = IdCtaContClientes
|
||||
@@ -11286,7 +11348,7 @@ Partial Class Ventas
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, TipoMovimiento, 0, Concepto, 207, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Math.Round(importeMovimiento * tipoCambioVenta - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioVenta) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, TipoMovimiento, 0, Concepto, 207, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Math.Round(importeMovimiento * tipoCambioVenta - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioVentaValuacion) Then
|
||||
ErrorConta = True
|
||||
End If
|
||||
|
||||
@@ -11514,13 +11576,14 @@ Partial Class Ventas
|
||||
If CveMonedaVenta <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
|
||||
Dim TipoCambioGanancia As Decimal = If(Not (gvr.DataKey("CveIE").ToString.ToEntero > 0 AndAlso gvr.DataKey("CveConceptoContable").ToString().ToEntero = 66), tipoCambioVentaValuacion, tipoCambioVenta)
|
||||
|
||||
If tipoCambioPago > tipoCambioVenta AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
importeMovimiento = (gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal * tipoCambioPago) - (gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal * tipoCambioVenta) 'Añadimos la diferencia de ganancia en la venta
|
||||
If tipoCambioPago > TipoCambioGanancia AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
importeMovimiento = (gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal * tipoCambioPago) - (gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal * TipoCambioGanancia) 'Añadimos la diferencia de ganancia en la venta
|
||||
importeMovimiento = Math.Abs(Math.Round(importeMovimiento, 2))
|
||||
importeMX = importeMovimiento
|
||||
End If
|
||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioVenta, tipoCambioPago)
|
||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioGanancia, tipoCambioPago)
|
||||
TipoCambioGeneral = TCImpuestos
|
||||
Else
|
||||
importeMovimiento = 0
|
||||
@@ -11529,13 +11592,14 @@ Partial Class Ventas
|
||||
If CveMonedaVenta <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
||||
Dim TipoCambioPerdida As Decimal = If(Not (gvr.DataKey("CveIE").ToString.ToEntero > 0 AndAlso gvr.DataKey("CveConceptoContable").ToString().ToEntero = 66), tipoCambioVentaValuacion, tipoCambioVenta)
|
||||
|
||||
If tipoCambioPago < tipoCambioVenta AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
importeMovimiento = (gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal * tipoCambioVenta) - (gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
|
||||
If tipoCambioPago < TipoCambioPerdida AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
importeMovimiento = (gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal * TipoCambioPerdida) - (gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
|
||||
importeMovimiento = Math.Abs(Math.Round(importeMovimiento, 2))
|
||||
importeMX = importeMovimiento
|
||||
End If
|
||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioVenta, tipoCambioPago)
|
||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPerdida, tipoCambioPago)
|
||||
TipoCambioGeneral = TCImpuestos
|
||||
Else
|
||||
importeMovimiento = 0
|
||||
@@ -11598,6 +11662,8 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
ObjIE.Dispose()
|
||||
|
||||
Else
|
||||
|
||||
'cuando no se ha registrado la venta
|
||||
@@ -19932,13 +19998,19 @@ Partial Class Ventas
|
||||
CalculaTotalesVenta(True)
|
||||
|
||||
|
||||
|
||||
'condicióon, en la que se verifica que el importe total de aplicación de la nota de crédito sea igual al del total de la nota de crédito, ej. saldo de la factura 1000.01 y la nota de crédito se generó po 1000.00
|
||||
If Not AplicaNCMasiva Then
|
||||
Dim TT As Decimal = TxtNCImporte.Text.ToDecimal
|
||||
If TT > TxtTotal.Text.ToDecimal Then TT = TxtTotal.Text.ToDecimal
|
||||
CargaNCDT(CveVenta, TT)
|
||||
End If
|
||||
|
||||
End If
|
||||
'verifica el tipo de cambio que se actualice
|
||||
If DdlMoneda.SelectedValue <> "1" Then
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(Now).ToString
|
||||
End If
|
||||
LblTCValuacion.Visible = False
|
||||
UpPS.Update()
|
||||
|
||||
LBNotaCredito.Visible = False
|
||||
@@ -20337,6 +20409,26 @@ Partial Class Ventas
|
||||
TrFolioFiscal.Visible = False
|
||||
TxtFecha.Text = Now.ToShortDateString()
|
||||
TipoCambioFactura = TxtTipoCambio.Text.ToDecimal
|
||||
|
||||
If DdlMoneda.SelectedValue.ToEntero > 1 Then
|
||||
Dim ObjIE As New ClsBancos
|
||||
If ObjIE.GetFluctuacionesBitacora(UsuarioActual.CveEmpresa) Then
|
||||
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||
Dim tFecha As Date = TxtFecha.Text.ToDate
|
||||
Dim Fecha As String = String.Format("{0}/{1}/{2}", tFecha.Year, tFecha.Month, tFecha.Day)
|
||||
Dim drr As DataRow = ObjIE.DtResultados.FiltroPrimero("Fecha < #" & Fecha & "#", "Fecha DESC")
|
||||
|
||||
If drr IsNot Nothing Then
|
||||
TipoCambioFactura = drr("TipoCambio").ToString.ToDecimal
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
ObjIE.Dispose()
|
||||
Else
|
||||
TipoCambioFactura = 1
|
||||
End If
|
||||
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(Now).ToString
|
||||
DivEstatusFac.Visible = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user