Commit del IE
This commit is contained in:
@@ -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")
|
DataAdapter("PA_Conta_PrePolizasNegativaAdd")
|
||||||
|
|
||||||
@@ -240,11 +240,12 @@ Public Class ClsContabilidad
|
|||||||
.Add("@Concepto", SqlDbType.VarChar).Value = Concepto
|
.Add("@Concepto", SqlDbType.VarChar).Value = Concepto
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@Fecha", SqlDbType.Date).Value = Fecha
|
.Add("@Fecha", SqlDbType.Date).Value = Fecha
|
||||||
|
.Add("@CvePrePolizaNueva", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = SqlAdapter.SelectCommand.Parameters("@CvePrePolizaNueva").Value.ToString.ToEntero
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al Guardar", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al Guardar", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
End Try
|
||||||
|
|||||||
@@ -4225,6 +4225,12 @@ Partial Class Compras_Compras
|
|||||||
Else
|
Else
|
||||||
CveConceptoContableAlmacen = 225
|
CveConceptoContableAlmacen = 225
|
||||||
End If
|
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
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -6228,15 +6234,13 @@ Partial Class Compras_Compras
|
|||||||
If ContienePSNeteoBonif Then
|
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
|
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
|
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||||
If importeMovimiento <> 0 Then
|
Dim IdCtaContableDescCompra As Integer = UsuarioActual.Empresa.Funcionalidad(405).ToEntero
|
||||||
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 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
|
||||||
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
|
ErrorPrepoliza = True
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
ErrorPrepoliza = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -1,371 +1,371 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
|
|
||||||
Partial Class PopUpAuxiliar
|
Partial Class PopUpAuxiliar
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
Private Property Tipo As String
|
Private Property Tipo As String
|
||||||
Get
|
Get
|
||||||
Return ViewState("Tipo").ToString
|
Return ViewState("Tipo").ToString
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
ViewState("Tipo") = value
|
ViewState("Tipo") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private Property CveCliente As Integer
|
Private Property CveCliente As Integer
|
||||||
Get
|
Get
|
||||||
Return ViewState("CveCliente").ToString.ToEntero
|
Return ViewState("CveCliente").ToString.ToEntero
|
||||||
End Get
|
End Get
|
||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
ViewState("CveCliente") = value
|
ViewState("CveCliente") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private Property CveVenta As Integer
|
Private Property CveVenta As Integer
|
||||||
Get
|
Get
|
||||||
Return ViewState("CveVenta").ToString.ToEntero
|
Return ViewState("CveVenta").ToString.ToEntero
|
||||||
End Get
|
End Get
|
||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
ViewState("CveVenta") = value
|
ViewState("CveVenta") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private Property CveProveedor As Integer
|
Private Property CveProveedor As Integer
|
||||||
Get
|
Get
|
||||||
Return ViewState("CveProveedor").ToString.ToEntero
|
Return ViewState("CveProveedor").ToString.ToEntero
|
||||||
End Get
|
End Get
|
||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
ViewState("CveProveedor") = value
|
ViewState("CveProveedor") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private Property CveCompra As Integer
|
Private Property CveCompra As Integer
|
||||||
Get
|
Get
|
||||||
Return ViewState("CveCompra").ToString.ToEntero
|
Return ViewState("CveCompra").ToString.ToEntero
|
||||||
End Get
|
End Get
|
||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
ViewState("CveCompra") = value
|
ViewState("CveCompra") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Private Property DTDatos As DataTable
|
Private Property DTDatos As DataTable
|
||||||
Get
|
Get
|
||||||
Return CType(ViewState("DTDatos"), DataTable)
|
Return CType(ViewState("DTDatos"), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
ViewState("DTDatos") = value
|
ViewState("DTDatos") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
CType(Me.Master, BaseMasterPage).EsPopup = True
|
CType(Me.Master, BaseMasterPage).EsPopup = True
|
||||||
CType(Me.Master, BaseMasterPage).PopupWidth = 915
|
CType(Me.Master, BaseMasterPage).PopupWidth = 915
|
||||||
RegistraScript("$get('tdContenido').style.height='1000'")
|
RegistraScript("$get('tdContenido').style.height='1000'")
|
||||||
|
|
||||||
Tipo = Request("Tipo")
|
Tipo = Request("Tipo")
|
||||||
CveCliente = 0
|
CveCliente = 0
|
||||||
CveProveedor = 0
|
CveProveedor = 0
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
GVAuxiliar.Columns(10).Visible = UsuarioActual.TienePermisoProceso(94)
|
GVAuxiliar.Columns(10).Visible = UsuarioActual.TienePermisoProceso(94)
|
||||||
'GVAuxiliar.Columns(11).Visible = UsuarioActual.TienePermisoProceso(94)
|
'GVAuxiliar.Columns(11).Visible = UsuarioActual.TienePermisoProceso(94)
|
||||||
GVAuxiliar.Columns(12).Visible = UsuarioActual.TienePermisoProceso(94)
|
GVAuxiliar.Columns(12).Visible = UsuarioActual.TienePermisoProceso(94)
|
||||||
|
|
||||||
Select Case Tipo
|
Select Case Tipo
|
||||||
Case "CxCClientes"
|
Case "CxCClientes"
|
||||||
CveCliente = Request("CveCliente").ToEntero
|
CveCliente = Request("CveCliente").ToEntero
|
||||||
CveVenta = Request("CveVenta").ToEntero
|
CveVenta = Request("CveVenta").ToEntero
|
||||||
CargaAuxiliarClienteCxC(CveCliente, CveVenta)
|
CargaAuxiliarClienteCxC(CveCliente, CveVenta)
|
||||||
LtlTipo1.Text = "Cuentas por Cobrar"
|
LtlTipo1.Text = "Cuentas por Cobrar"
|
||||||
LtlTipo2.Text = "Folio de la Venta"
|
LtlTipo2.Text = "Folio de la Venta"
|
||||||
LtlTipo3.Text = "Fecha de la Venta"
|
LtlTipo3.Text = "Fecha de la Venta"
|
||||||
Case "AnticiposClientes"
|
Case "AnticiposClientes"
|
||||||
CveCliente = Request("CveCliente").ToEntero
|
CveCliente = Request("CveCliente").ToEntero
|
||||||
CveVenta = Request("CveVenta").ToEntero
|
CveVenta = Request("CveVenta").ToEntero
|
||||||
CargaAuxiliarClienteAnticipos(CveCliente, CveVenta)
|
CargaAuxiliarClienteAnticipos(CveCliente, CveVenta)
|
||||||
LtlTipo1.Text = "Anticipo de Clientes"
|
LtlTipo1.Text = "Anticipo de Clientes"
|
||||||
LtlTipo2.Text = "Folio de la Venta"
|
LtlTipo2.Text = "Folio de la Venta"
|
||||||
LtlTipo3.Text = "Fecha de la Venta"
|
LtlTipo3.Text = "Fecha de la Venta"
|
||||||
Case "CxPProveedor"
|
Case "CxPProveedor"
|
||||||
CveProveedor = Request("CveProveedor").ToEntero
|
CveProveedor = Request("CveProveedor").ToEntero
|
||||||
CveCompra = Request("CveCompra").ToEntero
|
CveCompra = Request("CveCompra").ToEntero
|
||||||
CargaAuxiliarProveedor(CveProveedor, CveCompra)
|
CargaAuxiliarProveedor(CveProveedor, CveCompra)
|
||||||
LtlTipo1.Text = "Cuentas por Pagar"
|
LtlTipo1.Text = "Cuentas por Pagar"
|
||||||
LtlTipo2.Text = "Folio de la Compra"
|
LtlTipo2.Text = "Folio de la Compra"
|
||||||
LtlTipo3.Text = "Fecha de la Compra"
|
LtlTipo3.Text = "Fecha de la Compra"
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
|
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaAuxiliarClienteCxC(CveCliente As Integer, CveVenta As Integer)
|
Private Sub CargaAuxiliarClienteCxC(CveCliente As Integer, CveVenta As Integer)
|
||||||
Dim ObjMovtos As New ClsMovimientos()
|
Dim ObjMovtos As New ClsMovimientos()
|
||||||
If ObjMovtos.GetCxCClienteAuxiliar(CveCliente, CveVenta) Then
|
If ObjMovtos.GetCxCClienteAuxiliar(CveCliente, CveVenta) Then
|
||||||
DTDatos = ObjMovtos.DtResultados
|
DTDatos = ObjMovtos.DtResultados
|
||||||
GVAuxiliar.DataSource = ObjMovtos.DtResultados
|
GVAuxiliar.DataSource = ObjMovtos.DtResultados
|
||||||
If ObjMovtos.DtResultados.Rows.Count > 0 Then
|
If ObjMovtos.DtResultados.Rows.Count > 0 Then
|
||||||
LtlFechaVenta.Text = ObjMovtos.DtResultados.Rows(1)("FechaVenta").ToString.ToDate.ToShortDateString()
|
LtlFechaVenta.Text = ObjMovtos.DtResultados.Rows(1)("FechaVenta").ToString.ToDate.ToShortDateString()
|
||||||
LtlFolio.Text = ObjMovtos.DtResultados.Rows(1)("Folio").ToString
|
LtlFolio.Text = ObjMovtos.DtResultados.Rows(1)("Folio").ToString
|
||||||
LtlImporte.Text = ObjMovtos.DtResultados.Rows(1)("Total").ToString.FormatoNumero(2)
|
LtlImporte.Text = ObjMovtos.DtResultados.Rows(1)("Total").ToString.FormatoNumero(2)
|
||||||
LtlSaldo.Text = ObjMovtos.DtResultados.Rows(1)("Saldo").ToString.FormatoNumero(2)
|
LtlSaldo.Text = ObjMovtos.DtResultados.Rows(1)("Saldo").ToString.FormatoNumero(2)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
GVAuxiliar.DataSource = Nothing
|
GVAuxiliar.DataSource = Nothing
|
||||||
End If
|
End If
|
||||||
ObjMovtos.Dispose()
|
ObjMovtos.Dispose()
|
||||||
GVAuxiliar.DataBind()
|
GVAuxiliar.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaAuxiliarClienteAnticipos(CveCliente As Integer, CveVenta As Integer)
|
Private Sub CargaAuxiliarClienteAnticipos(CveCliente As Integer, CveVenta As Integer)
|
||||||
Dim ObjMovtos As New ClsMovimientos()
|
Dim ObjMovtos As New ClsMovimientos()
|
||||||
If ObjMovtos.GetAnticiposClienteAuxiliar(CveCliente, CveVenta) Then
|
If ObjMovtos.GetAnticiposClienteAuxiliar(CveCliente, CveVenta) Then
|
||||||
DTDatos = ObjMovtos.DtResultados
|
DTDatos = ObjMovtos.DtResultados
|
||||||
GVAuxiliar.DataSource = ObjMovtos.DtResultados
|
GVAuxiliar.DataSource = ObjMovtos.DtResultados
|
||||||
If ObjMovtos.DtResultados.Rows.Count > 0 Then
|
If ObjMovtos.DtResultados.Rows.Count > 0 Then
|
||||||
LtlFechaVenta.Text = ObjMovtos.DtResultados.Rows(1)("FechaVenta").ToString.ToDate.ToShortDateString()
|
LtlFechaVenta.Text = ObjMovtos.DtResultados.Rows(1)("FechaVenta").ToString.ToDate.ToShortDateString()
|
||||||
LtlFolio.Text = ObjMovtos.DtResultados.Rows(1)("Folio").ToString
|
LtlFolio.Text = ObjMovtos.DtResultados.Rows(1)("Folio").ToString
|
||||||
'LtlImporte.Text = ObjMovtos.DtResultados.Rows(1)("Total").ToString.FormatoNumero(2)
|
'LtlImporte.Text = ObjMovtos.DtResultados.Rows(1)("Total").ToString.FormatoNumero(2)
|
||||||
'LtlSaldo.Text = ObjMovtos.DtResultados.Rows(1)("Saldo").ToString.FormatoNumero(2)
|
'LtlSaldo.Text = ObjMovtos.DtResultados.Rows(1)("Saldo").ToString.FormatoNumero(2)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
GVAuxiliar.DataSource = Nothing
|
GVAuxiliar.DataSource = Nothing
|
||||||
End If
|
End If
|
||||||
ObjMovtos.Dispose()
|
ObjMovtos.Dispose()
|
||||||
GVAuxiliar.DataBind()
|
GVAuxiliar.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaAuxiliarProveedor(CveProveedor As Integer, CveCompra As Integer)
|
Private Sub CargaAuxiliarProveedor(CveProveedor As Integer, CveCompra As Integer)
|
||||||
Dim ObjMovtos As New ClsContabilidad()
|
Dim ObjMovtos As New ClsContabilidad()
|
||||||
If ObjMovtos.GetProveedorAuxiliar(CveProveedor, CveCompra) Then
|
If ObjMovtos.GetProveedorAuxiliar(CveProveedor, CveCompra) Then
|
||||||
DTDatos = ObjMovtos.DtResultados
|
DTDatos = ObjMovtos.DtResultados
|
||||||
GVAuxiliar.DataSource = ObjMovtos.DtResultados
|
GVAuxiliar.DataSource = ObjMovtos.DtResultados
|
||||||
If ObjMovtos.DtResultados.Rows.Count > 0 Then
|
If ObjMovtos.DtResultados.Rows.Count > 0 Then
|
||||||
LtlFechaVenta.Text = ObjMovtos.DtResultados.Rows(1)("FechaVenta").ToString.ToDate.ToShortDateString()
|
LtlFechaVenta.Text = ObjMovtos.DtResultados.Rows(1)("FechaVenta").ToString.ToDate.ToShortDateString()
|
||||||
LtlFolio.Text = ObjMovtos.DtResultados.Rows(1)("Folio").ToString
|
LtlFolio.Text = ObjMovtos.DtResultados.Rows(1)("Folio").ToString
|
||||||
LtlImporte.Text = ObjMovtos.DtResultados.Rows(1)("Total").ToString.FormatoNumero(2)
|
LtlImporte.Text = ObjMovtos.DtResultados.Rows(1)("Total").ToString.FormatoNumero(2)
|
||||||
LtlSaldo.Text = ObjMovtos.DtResultados.Rows(1)("Saldo").ToString.FormatoNumero(2)
|
LtlSaldo.Text = ObjMovtos.DtResultados.Rows(1)("Saldo").ToString.FormatoNumero(2)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
GVAuxiliar.DataSource = Nothing
|
GVAuxiliar.DataSource = Nothing
|
||||||
End If
|
End If
|
||||||
ObjMovtos.Dispose()
|
ObjMovtos.Dispose()
|
||||||
GVAuxiliar.DataBind()
|
GVAuxiliar.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub GVAuxiliar_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAuxiliar.RowDataBound
|
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.RowType = DataControlRowType.DataRow Then
|
||||||
If e.Row.RowIndex = 0 Then
|
If e.Row.RowIndex = 0 Then
|
||||||
e.Row.BackColor = Drawing.Color.LightGray
|
e.Row.BackColor = Drawing.Color.LightGray
|
||||||
e.Row.FCLiteral("LtlFechaMovto").Text = "Totales: "
|
e.Row.FCLiteral("LtlFechaMovto").Text = "Totales: "
|
||||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Right
|
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Right
|
||||||
e.Row.Cells(0).ColumnSpan = 2
|
e.Row.Cells(0).ColumnSpan = 2
|
||||||
e.Row.Cells(1).Visible = False
|
e.Row.Cells(1).Visible = False
|
||||||
e.Row.Cells(4).ColumnSpan = 3
|
e.Row.Cells(4).ColumnSpan = 3
|
||||||
e.Row.Cells(5).Visible = False
|
e.Row.Cells(5).Visible = False
|
||||||
e.Row.Cells(6).Visible = False
|
e.Row.Cells(6).Visible = False
|
||||||
e.Row.Cells(7).Visible = False
|
e.Row.Cells(7).Visible = False
|
||||||
e.Row.Cells(8).Visible = False
|
e.Row.Cells(8).Visible = False
|
||||||
e.Row.Cells(12).Visible = False
|
e.Row.Cells(12).Visible = False
|
||||||
ElseIf e.Row.RowIndex = 1 Then
|
ElseIf e.Row.RowIndex = 1 Then
|
||||||
e.Row.Cells(0).Width = Unit.Pixel(95)
|
e.Row.Cells(0).Width = Unit.Pixel(95)
|
||||||
e.Row.Cells(1).Width = Unit.Pixel(180)
|
e.Row.Cells(1).Width = Unit.Pixel(180)
|
||||||
e.Row.Cells(2).Width = Unit.Pixel(80)
|
e.Row.Cells(2).Width = Unit.Pixel(80)
|
||||||
e.Row.Cells(3).Width = Unit.Pixel(80)
|
e.Row.Cells(3).Width = Unit.Pixel(80)
|
||||||
e.Row.Cells(4).Width = Unit.Pixel(83)
|
e.Row.Cells(4).Width = Unit.Pixel(83)
|
||||||
e.Row.Cells(5).Width = Unit.Pixel(93)
|
e.Row.Cells(5).Width = Unit.Pixel(93)
|
||||||
e.Row.Cells(6).Width = Unit.Pixel(85)
|
e.Row.Cells(6).Width = Unit.Pixel(85)
|
||||||
e.Row.Cells(7).Width = Unit.Pixel(95)
|
e.Row.Cells(7).Width = Unit.Pixel(95)
|
||||||
e.Row.Cells(8).Width = Unit.Pixel(70)
|
e.Row.Cells(8).Width = Unit.Pixel(70)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
|
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
|
||||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Right
|
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Right
|
||||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Right
|
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Right
|
||||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Left
|
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Left
|
||||||
|
|
||||||
If e.Row.FCLiteral("LtlContabilizado").Text = "Si" Then
|
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"))
|
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"))
|
e.Row.FCLiteral("LtlPoliza").Text = String.Format("{0}{1}</a>", Liga, e.Row.DBCampo("Poliza"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If e.Row.DBCampo("CveConceptoContable").ToEntero.Contiene(2) AndAlso e.Row.DBCampo("CvePersonal").ToEntero > 0 Then
|
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"))
|
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"))
|
e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}</a>", Liga, e.Row.DBCampo("ConceptoContable"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If e.Row.DBCampo("TipoReferencia").ToEntero = 1 Then
|
If e.Row.DBCampo("TipoReferencia").ToEntero = 1 Then
|
||||||
e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Bancos/IE.aspx?CveIE={e.Row.DBCampo("CveReferencia").ToEntero}"
|
e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Bancos/IE.aspx?CveIE={e.Row.DBCampo("CveReferencia").ToEntero}"
|
||||||
'If e.Row.DBCampo("CveReferencia").ToEntero > 0 Then
|
'If e.Row.DBCampo("CveReferencia").ToEntero > 0 Then
|
||||||
' e.Row.Cells(10).Text = ""
|
' e.Row.Cells(10).Text = ""
|
||||||
'End If
|
'End If
|
||||||
ElseIf e.Row.DBCampo("TipoReferencia").ToEntero = 2 Then
|
ElseIf e.Row.DBCampo("TipoReferencia").ToEntero = 2 Then
|
||||||
Select Case Tipo
|
Select Case Tipo
|
||||||
Case "CxCClientes"
|
Case "CxCClientes"
|
||||||
e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={e.Row.DBCampo("CveReferencia").ToEntero}"
|
e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={e.Row.DBCampo("CveReferencia").ToEntero}"
|
||||||
Case "CxPProveedor"
|
Case "CxPProveedor"
|
||||||
e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Compras/Compras.aspx?CveCompra={e.Row.DBCampo("CveReferencia").ToEntero}"
|
e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Compras/Compras.aspx?CveCompra={e.Row.DBCampo("CveReferencia").ToEntero}"
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If e.Row.DBCampo("CveConceptoContable").ToEntero.Contiene(272) AndAlso e.Row.DBCampo("CveCompraAmortizacion").ToEntero > 0 Then
|
'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"))
|
' 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"))
|
' e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}</a>", Liga, e.Row.DBCampo("ConceptoContable"))
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
If e.Row.DBCampo("CveConceptoContable").ToEntero.Contiene(275) AndAlso e.Row.DBCampo("CveVenta").ToEntero > 0 Then
|
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}"
|
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"))
|
'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"))
|
'e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}</a>", Liga, e.Row.DBCampo("ConceptoContable"))
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub GvDatos_RowDeleting(ByVal sender As Object, ByVal e As GridViewDeleteEventArgs) Handles GVAuxiliar.RowDeleting
|
Protected Sub GvDatos_RowDeleting(ByVal sender As Object, ByVal e As GridViewDeleteEventArgs) Handles GVAuxiliar.RowDeleting
|
||||||
|
|
||||||
Dim ObjContPaq As ClsContPAQi = Nothing
|
Dim ObjContPaq As ClsContPAQi = Nothing
|
||||||
Dim Conta As New ClsContabilidad()
|
Dim Conta As New ClsContabilidad()
|
||||||
Conta.IniciaTransacSQL()
|
Conta.IniciaTransacSQL()
|
||||||
|
|
||||||
Dim ClavePrePoliza = GVAuxiliar.Rows(e.RowIndex).DataKey("CvePrePolizaOriginal").ToEntero
|
Dim ClavePrePoliza = GVAuxiliar.Rows(e.RowIndex).DataKey("CvePrePolizaOriginal").ToEntero
|
||||||
Dim IdPoliza = GVAuxiliar.Rows(e.RowIndex).DataKey("IdPoliza").ToEntero
|
Dim IdPoliza = GVAuxiliar.Rows(e.RowIndex).DataKey("IdPoliza").ToEntero
|
||||||
|
|
||||||
Dim TieneError = False
|
Dim TieneError = False
|
||||||
|
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
If Not Conta.UpdatePrePolizasDetalleBloquear(ClavePrePoliza, False) Then
|
If Not Conta.UpdatePrePolizasDetalleBloquear(ClavePrePoliza, False) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not Conta.RemovePrePolizas(ClavePrePoliza, UsuarioActual.CveEmpresa) Then
|
If Not Conta.RemovePrePolizas(ClavePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Conta.ValidacionPrePolizaCuadre(ClavePrePoliza, -1) Then
|
If Conta.ValidacionPrePolizaCuadre(ClavePrePoliza, -1) Then
|
||||||
If Conta.ValorPolizaDescuadre > 0 Then
|
If Conta.ValorPolizaDescuadre > 0 Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
If IdPoliza > 0 Then
|
If IdPoliza > 0 Then
|
||||||
If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad Then
|
If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad Then
|
||||||
ObjContPaq = New ClsContPAQi(UsuarioActual.Empresa)
|
ObjContPaq = New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
ObjContPaq.IniciaTransacSQL()
|
ObjContPaq.IniciaTransacSQL()
|
||||||
|
|
||||||
If Not ObjContPaq.RemovePoliza(IdPoliza) Then
|
If Not ObjContPaq.RemovePoliza(IdPoliza) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
Alert("Movimiento Eliminado", TipoMensaje.MsgInformacion, "window.opener.location.reload(); window.close();")
|
Alert("Movimiento Eliminado", TipoMensaje.MsgInformacion, "window.opener.location.reload(); window.close();")
|
||||||
If ObjContPaq IsNot Nothing Then ObjContPaq.Commit()
|
If ObjContPaq IsNot Nothing Then ObjContPaq.Commit()
|
||||||
Conta.Commit()
|
Conta.Commit()
|
||||||
Else
|
Else
|
||||||
If ObjContPaq IsNot Nothing Then ObjContPaq.RollBack()
|
If ObjContPaq IsNot Nothing Then ObjContPaq.RollBack()
|
||||||
Conta.RollBack()
|
Conta.RollBack()
|
||||||
End If
|
End If
|
||||||
If ObjContPaq IsNot Nothing Then ObjContPaq.Dispose()
|
If ObjContPaq IsNot Nothing Then ObjContPaq.Dispose()
|
||||||
Conta.Dispose()
|
Conta.Dispose()
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub GVAuxiliar_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GVAuxiliar.RowUpdating
|
Private Sub GVAuxiliar_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GVAuxiliar.RowUpdating
|
||||||
Dim CvePrePoliza As Integer
|
Dim CvePrePoliza As Integer
|
||||||
Dim ObjConta As New ClsContabilidad
|
Dim ObjConta As New ClsContabilidad
|
||||||
ObjConta.IniciaTransacSQL()
|
ObjConta.IniciaTransacSQL()
|
||||||
Dim CvePlantillaPoliza As Integer = 0
|
Dim CvePlantillaPoliza As Integer = 0
|
||||||
Dim Importe As Decimal
|
Dim Importe As Decimal
|
||||||
Dim MsgError As String = ""
|
Dim MsgError As String = ""
|
||||||
|
|
||||||
If GVAuxiliar.Rows(e.RowIndex).DataKey("Cargo").ToDecimal > GVAuxiliar.Rows(e.RowIndex).DataKey("Abono").ToDecimal Then
|
If GVAuxiliar.Rows(e.RowIndex).DataKey("Cargo").ToDecimal > GVAuxiliar.Rows(e.RowIndex).DataKey("Abono").ToDecimal Then
|
||||||
Importe = GVAuxiliar.Rows(e.RowIndex).DataKey("Cargo").ToDecimal
|
Importe = GVAuxiliar.Rows(e.RowIndex).DataKey("Cargo").ToDecimal
|
||||||
Else
|
Else
|
||||||
Importe = GVAuxiliar.Rows(e.RowIndex).DataKey("Abono").ToDecimal
|
Importe = GVAuxiliar.Rows(e.RowIndex).DataKey("Abono").ToDecimal
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveCliente > 0 Then CvePlantillaPoliza = 11
|
If CveCliente > 0 Then CvePlantillaPoliza = 11
|
||||||
If CveProveedor > 0 Then CvePlantillaPoliza = 2
|
If CveProveedor > 0 Then CvePlantillaPoliza = 2
|
||||||
|
|
||||||
CvePrePoliza = ObjConta.AddPrePolizas("Contabilidad/PopUpAuxiliar", CvePlantillaPoliza, Importe, Importe, 1, Now, "Cancelacion de Pago", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
CvePrePoliza = ObjConta.AddPrePolizas("Contabilidad/PopUpAuxiliar", CvePlantillaPoliza, Importe, Importe, 1, Now, "Cancelacion de Pago", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
If CvePlantillaPoliza = 2 Then
|
If CvePlantillaPoliza = 2 Then
|
||||||
If Not ObjConta.CancelarPagoCompraConAnticipo(CvePrePoliza, CveCompra, GVAuxiliar.Rows(e.RowIndex).DataKey("CveReferencia").ToEntero) 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"
|
MsgError = "Ocurrió un error al cancelar el pago de la compra"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CvePlantillaPoliza = 11 Then
|
If CvePlantillaPoliza = 11 Then
|
||||||
If Not ObjConta.CancelarPagoVentaConAnticipo(CvePrePoliza, CveVenta, GVAuxiliar.Rows(e.RowIndex).DataKey("CveReferencia").ToEntero) 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"
|
MsgError = "Ocurrió un error al cancelar el pago de la venta"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If MsgError = "" Then
|
If MsgError = "" Then
|
||||||
ObjConta.Commit()
|
ObjConta.Commit()
|
||||||
Alert("El movimiento se canceló exitosamente.")
|
Alert("El movimiento se canceló exitosamente.")
|
||||||
Else
|
Else
|
||||||
ObjConta.RollBack()
|
ObjConta.RollBack()
|
||||||
Alert(MsgError, TipoMensaje.MsgError)
|
Alert(MsgError, TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
ObjConta.Dispose()
|
ObjConta.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkPagosClientesBancosExcel.Click
|
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkPagosClientesBancosExcel.Click
|
||||||
GenerarPDF("Excel")
|
GenerarPDF("Excel")
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub LinkPDF_Click(sender As Object, e As EventArgs) Handles LnkPagosClientesBancosPDF.Click
|
Private Sub LinkPDF_Click(sender As Object, e As EventArgs) Handles LnkPagosClientesBancosPDF.Click
|
||||||
GenerarPDF()
|
GenerarPDF()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub GenerarPDF(Optional Formato As String = "PDF")
|
Private Sub GenerarPDF(Optional Formato As String = "PDF")
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
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)
|
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
|
If DTDatos IsNot Nothing And DTDatos.Rows.Count > 0 Then
|
||||||
|
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
|
|
||||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||||
params.Add(New ReportParameter("Tipo", LtlTipo1.Text))
|
params.Add(New ReportParameter("Tipo", LtlTipo1.Text))
|
||||||
params.Add(New ReportParameter("Folio", LtlFolio.Text))
|
params.Add(New ReportParameter("Folio", LtlFolio.Text))
|
||||||
params.Add(New ReportParameter("Fecha", LtlFechaVenta.Text))
|
params.Add(New ReportParameter("Fecha", LtlFechaVenta.Text))
|
||||||
params.Add(New ReportParameter("Importe", LtlImporte.Text))
|
params.Add(New ReportParameter("Importe", LtlImporte.Text))
|
||||||
params.Add(New ReportParameter("Saldo", LtlSaldo.Text))
|
params.Add(New ReportParameter("Saldo", LtlSaldo.Text))
|
||||||
|
|
||||||
If Imagen.Exists Then
|
If Imagen.Exists Then
|
||||||
params.Add(New ReportParameter("LogoPath", logouri))
|
params.Add(New ReportParameter("LogoPath", logouri))
|
||||||
Else
|
Else
|
||||||
params.Add(New ReportParameter("LogoPath", ""))
|
params.Add(New ReportParameter("LogoPath", ""))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ImprimirPDF("Empresas\Grales\Formatos\RepAuxiliarContable.rdlc", DTDatos, params, "RepAuxiliarContable_" & LtlFolio.Text, Formato:=Formato)
|
ImprimirPDF("Empresas\Grales\Formatos\RepAuxiliarContable.rdlc", DTDatos, params, "RepAuxiliarContable_" & LtlFolio.Text, Formato:=Formato)
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Alert("No se encontró información suficiente.", TipoMensaje.MsgAdvertencia)
|
Alert("No se encontró información suficiente.", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Property CvePrePolizaNegativa As Integer
|
Property CvePrePolizaNegativa As Integer
|
||||||
@@ -390,23 +390,37 @@ Partial Class PopUpAuxiliar
|
|||||||
Dim TieneError As Boolean = False
|
Dim TieneError As Boolean = False
|
||||||
ObjContabilidad.IniciaTransacSQL()
|
ObjContabilidad.IniciaTransacSQL()
|
||||||
|
|
||||||
If ObjContabilidad.AddPrePolizasNegativa(CvePrePoliza, UsuarioActual.CveUsuario, TxtConceptoCancelacion.Text, UsuarioActual.CveEmpresa, TxtFechaCancelacion.Text.ToDate) Then
|
Dim CvePrePolizaNueva As Integer = ObjContabilidad.AddPrePolizasNegativa(CvePrePoliza, UsuarioActual.CveUsuario, TxtConceptoCancelacion.Text, UsuarioActual.CveEmpresa, TxtFechaCancelacion.Text.ToDate)
|
||||||
Alert("Se agrego polzia negativa correctamente.")
|
|
||||||
Else
|
If Not CvePrePolizaNueva > 0 Then
|
||||||
|
|
||||||
|
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If TieneError Then
|
If Not TieneError Then
|
||||||
ObjContabilidad.RollBack()
|
|
||||||
Else
|
|
||||||
ObjContabilidad.Commit()
|
ObjContabilidad.Commit()
|
||||||
|
Dim Str As New StringBuilder
|
||||||
|
Str.Append("Se agrego la póliza de cancelación correctamente.<br/>")
|
||||||
RegistraScript(" $('#DivCancelar').modal('hide'); ")
|
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
|
End If
|
||||||
|
|
||||||
ObjContabilidad.Dispose()
|
|
||||||
|
|
||||||
|
|
||||||
|
ObjContabilidad.Dispose()
|
||||||
|
CargaDatos()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
@@ -424,4 +438,4 @@ Partial Class PopUpAuxiliar
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -694,7 +694,7 @@ Partial Class RepCxC
|
|||||||
Dim Registro = If(DdlUsuario.SelectedValue = "-1", "", $" <b>Registró:</b> {DdlUsuario.SelectedItem.Text}")
|
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 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 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 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}")
|
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("UsuarioImprimio", UsuarioActual.Nombre))
|
||||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||||
params.Add(New ReportParameter("Grupo", DdlGrupo.SelectedItem.Text))
|
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("TituloReporte", TituloReporte))
|
||||||
params.Add(New ReportParameter("CantColumnas", CantidadColumnas.ToString))
|
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 Registro = If(DdlUsuario.SelectedValue = "-1", "", $" <b>Registró:</b> {DdlUsuario.SelectedItem.Text}")
|
||||||
Dim Responsable = If(DdlResponsable.SelectedValue = "-1", "", $" <b>Responsable:</b> {DdlResponsable.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 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 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"
|
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("FechaFin", FechaF))
|
||||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
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))
|
params.Add(New ReportParameter("TituloReporte", TituloReporte))
|
||||||
|
|
||||||
If Imagen.Exists Then
|
If Imagen.Exists Then
|
||||||
|
|||||||
@@ -1419,7 +1419,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td><b>T.C.:</b></td>
|
<td><b>T.C.:</b></td>
|
||||||
<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>
|
<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>
|
<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>
|
<asp:Label runat="server" ID="LblTCValuacion" ToolTip="Última Valuación" Text="" Visible="false"></asp:Label>
|
||||||
|
|||||||
@@ -20758,13 +20758,19 @@ Partial Class Ventas
|
|||||||
CalculaTotalesVenta(True)
|
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
|
'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
|
If Not AplicaNCMasiva Then
|
||||||
Dim TT As Decimal = TxtNCImporte.Text.ToDecimal
|
Dim TT As Decimal = TxtNCImporte.Text.ToDecimal
|
||||||
If TT > TxtTotal.Text.ToDecimal Then TT = TxtTotal.Text.ToDecimal
|
If TT > TxtTotal.Text.ToDecimal Then TT = TxtTotal.Text.ToDecimal
|
||||||
CargaNCDT(CveVenta, TT)
|
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()
|
UpPS.Update()
|
||||||
|
|
||||||
LBNotaCredito.Visible = False
|
LBNotaCredito.Visible = False
|
||||||
|
|||||||
Reference in New Issue
Block a user