Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -20,17 +20,8 @@ public partial class Ventas_RepUsados : ClsPaginas
|
|||||||
|
|
||||||
private void InicializaValores()
|
private void InicializaValores()
|
||||||
{
|
{
|
||||||
CargaCliente();
|
CargaCliente();
|
||||||
txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString();
|
txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString();
|
||||||
txtFechaF.Text = DateTime.Now.LastDayOfMonth().ToShortDateString();
|
|
||||||
UpFiltros.Update();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CargaCliente()
|
|
||||||
{
|
|
||||||
if (UsuarioActual.CveEmpresa == 119) {
|
|
||||||
DdlClientes.setEsWebService(true);
|
|
||||||
}else
|
|
||||||
txtFechaF.Text = DateTime.Now.LastDayOfMonth().ToShortDateString();
|
txtFechaF.Text = DateTime.Now.LastDayOfMonth().ToShortDateString();
|
||||||
UpFiltros.Update();
|
UpFiltros.Update();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4807,7 +4807,7 @@ Public Class ClsBancos
|
|||||||
strBody.AppendFormat(" <td>Cuenta:</td>")
|
strBody.AppendFormat(" <td>Cuenta:</td>")
|
||||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", NumCuenta)
|
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", NumCuenta)
|
||||||
strBody.AppendFormat(" </tr>")
|
strBody.AppendFormat(" </tr>")
|
||||||
If CuentaDepositado.ToString <> "" Then
|
If CuentaDepositado IsNot Nothing AndAlso CuentaDepositado.ToString <> "" Then
|
||||||
strBody.AppendFormat(" <tr class='Texto'>")
|
strBody.AppendFormat(" <tr class='Texto'>")
|
||||||
strBody.AppendFormat(" <td>Cuenta Destino:</td>")
|
strBody.AppendFormat(" <td>Cuenta Destino:</td>")
|
||||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", CuentaDepositado)
|
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", CuentaDepositado)
|
||||||
@@ -4926,6 +4926,7 @@ Public Class ClsBancos
|
|||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Banc_PagosNoBancarios")
|
DataAdapter("PA_Banc_PagosNoBancarios")
|
||||||
|
|
||||||
|
SqlAdapter.SelectCommand.CommandTimeout = 0
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||||
|
|||||||
@@ -1032,6 +1032,9 @@ Public Class ClsContabilidad
|
|||||||
If dr("AplicaProveedor").ToString = "True" Then
|
If dr("AplicaProveedor").ToString = "True" Then
|
||||||
StrMsg = StrMsg + " - Proveedor: " + ClsPaginas.GlobalDTCompProveedores(tCveEmp, CveProveedor:=CveProveedor).FiltroPrimeroValor("NombreComercial", "")
|
StrMsg = StrMsg + " - Proveedor: " + ClsPaginas.GlobalDTCompProveedores(tCveEmp, CveProveedor:=CveProveedor).FiltroPrimeroValor("NombreComercial", "")
|
||||||
End If
|
End If
|
||||||
|
If dr("AplicaPersonal").ToString = "True" Then
|
||||||
|
StrMsg = StrMsg + " - Personal: " + ClsPaginas.GlobalDTRHPersonal(tCveEmp, CvePersonal:=CvePersonal).FiltroPrimeroValor("NombreCompleto", "")
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
OnError(String.Format("El concepto '{0}' no tiene especificada la cuenta. Favor de especificarla en la asignación de cuentas.", StrMsg), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError(String.Format("El concepto '{0}' no tiene especificada la cuenta. Favor de especificarla en la asignación de cuentas.", StrMsg), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
@@ -3627,7 +3630,7 @@ Public Class ClsContabilidad
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Public Function GetSituacionFinanciera(FechaI As Date, FechaF As Date, CveEmpresa As Integer, CveSubProyecto As String, TipoMovtos As Integer, Optional SAT As Integer = 0) As Boolean
|
Public Function GetSituacionFinanciera(FechaI As Date, FechaF As Date, CveEmpresa As Integer, CveSubProyecto As String, TipoMovtos As Integer, Optional SAT As Integer = 0, Optional Opcion As Integer = 1) As Boolean
|
||||||
Dim Retorno = False
|
Dim Retorno = False
|
||||||
|
|
||||||
'SqlAdapter.SelectCommand.t
|
'SqlAdapter.SelectCommand.t
|
||||||
@@ -3641,6 +3644,7 @@ Public Class ClsContabilidad
|
|||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
.Add("@SAT", SqlDbType.Int).Value = SAT
|
.Add("@SAT", SqlDbType.Int).Value = SAT
|
||||||
|
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||||
End With
|
End With
|
||||||
SqlAdapter.SelectCommand.CommandTimeout = 0
|
SqlAdapter.SelectCommand.CommandTimeout = 0
|
||||||
|
|
||||||
@@ -3851,7 +3855,7 @@ Public Class ClsContabilidad
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
'Public Function GetEstadoActividades(FechaI As Date, FechaF As Date, TipoMovtos As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional SAT As Integer = 0) As Boolean
|
'Public Function GetEstadoActividades(FechaI As Date, FechaF As Date, TipoMovtos As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional SAT As Integer = 0) As Boolean
|
||||||
Public Function GetEstadoActividades(FechaI As Date, FechaF As Date, TipoMovtos As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional SAT As Integer = 0) As Boolean
|
Public Function GetEstadoActividades(FechaI As Date, FechaF As Date, TipoMovtos As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional SAT As Integer = 0, Optional Opcion As Integer = 1) As Boolean
|
||||||
Dim Retorno = False
|
Dim Retorno = False
|
||||||
|
|
||||||
DataAdapter("PA_Conta_EstadoActividadesGet")
|
DataAdapter("PA_Conta_EstadoActividadesGet")
|
||||||
@@ -3864,6 +3868,7 @@ Public Class ClsContabilidad
|
|||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@SAT", SqlDbType.Int).Value = SAT
|
.Add("@SAT", SqlDbType.Int).Value = SAT
|
||||||
|
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||||
End With
|
End With
|
||||||
|
|
||||||
SqlAdapter.SelectCommand.CommandTimeout = 0
|
SqlAdapter.SelectCommand.CommandTimeout = 0
|
||||||
@@ -5986,7 +5991,8 @@ Public Class ClsContabilidad
|
|||||||
Public Function AddCuentasAsignaciones(Optional CveConceptoContable As Integer = -1, Optional CveEmpresa As Integer = -1, Optional CveCuenta As Integer = -1, Optional IdCtaContable As Integer = -1,
|
Public Function AddCuentasAsignaciones(Optional CveConceptoContable As Integer = -1, Optional CveEmpresa As Integer = -1, Optional CveCuenta As Integer = -1, Optional IdCtaContable As Integer = -1,
|
||||||
Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveClasificacion As Integer = -1,
|
Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveClasificacion As Integer = -1,
|
||||||
Optional CveAlmacen As Integer = -1, Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1, Optional CveBancoCuenta As Integer = -1,
|
Optional CveAlmacen As Integer = -1, Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1, Optional CveBancoCuenta As Integer = -1,
|
||||||
Optional CveSubProyecto As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveTipoGasto As Integer = -1, Optional RegeneraCuenta As Boolean = False,
|
Optional CveSubProyecto As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveTipoGasto As Integer = -1, Optional CveCredito As Integer = -1,
|
||||||
|
Optional RegeneraCuenta As Boolean = False,
|
||||||
Optional OpActualizarClasificacion As Boolean = False) As Boolean
|
Optional OpActualizarClasificacion As Boolean = False) As Boolean
|
||||||
Dim Retorno = False
|
Dim Retorno = False
|
||||||
|
|
||||||
@@ -6008,6 +6014,7 @@ Public Class ClsContabilidad
|
|||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
.Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
|
.Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
|
||||||
.Add("@CveTipoGasto", SqlDbType.Int).Value = CveTipoGasto
|
.Add("@CveTipoGasto", SqlDbType.Int).Value = CveTipoGasto
|
||||||
|
.Add("@CveCredito", SqlDbType.Int).Value = CveCredito
|
||||||
.Add("@RegeneraCuenta", SqlDbType.Bit).Value = RegeneraCuenta
|
.Add("@RegeneraCuenta", SqlDbType.Bit).Value = RegeneraCuenta
|
||||||
.Add("@OpActualizarClasificacion", SqlDbType.Bit).Value = OpActualizarClasificacion
|
.Add("@OpActualizarClasificacion", SqlDbType.Bit).Value = OpActualizarClasificacion
|
||||||
End With
|
End With
|
||||||
@@ -6027,7 +6034,7 @@ Public Class ClsContabilidad
|
|||||||
Optional CvePersonal As Integer = -1, Optional CveClasificacion As Integer = -1, Optional CveAlmacen As Integer = -1,
|
Optional CvePersonal As Integer = -1, Optional CveClasificacion As Integer = -1, Optional CveAlmacen As Integer = -1,
|
||||||
Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1, Optional CveBancoCuenta As Integer = -1,
|
Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1, Optional CveBancoCuenta As Integer = -1,
|
||||||
Optional CveSubProyecto As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveTipoGasto As Integer = -1,
|
Optional CveSubProyecto As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveTipoGasto As Integer = -1,
|
||||||
Optional RegeneraCuenta As Boolean = False) As Boolean
|
Optional CveCredito As Integer = -1, Optional RegeneraCuenta As Boolean = False) As Boolean
|
||||||
Dim Retorno = False
|
Dim Retorno = False
|
||||||
|
|
||||||
DataAdapter("PA_Conta_CuentasAsignacionesUpdate")
|
DataAdapter("PA_Conta_CuentasAsignacionesUpdate")
|
||||||
@@ -6048,6 +6055,7 @@ Public Class ClsContabilidad
|
|||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
.Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
|
.Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
|
||||||
.Add("@CveTipoGasto", SqlDbType.Int).Value = CveTipoGasto
|
.Add("@CveTipoGasto", SqlDbType.Int).Value = CveTipoGasto
|
||||||
|
.Add("@CveCredito", SqlDbType.Int).Value = CveCredito
|
||||||
.Add("@RegeneraCuenta", SqlDbType.Bit).Value = RegeneraCuenta
|
.Add("@RegeneraCuenta", SqlDbType.Bit).Value = RegeneraCuenta
|
||||||
End With
|
End With
|
||||||
|
|
||||||
|
|||||||
@@ -568,6 +568,7 @@ Public Class ClsEncuestas
|
|||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
.Add("@Fecha", SqlDbType.Date).Value = Now
|
.Add("@Fecha", SqlDbType.Date).Value = Now
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveEncuestaAplicada", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ Imports System.IO
|
|||||||
Imports System.Net.Http
|
Imports System.Net.Http
|
||||||
Imports System.Xml
|
Imports System.Xml
|
||||||
Imports CrystalDecisions.CrystalReports.Engine
|
Imports CrystalDecisions.CrystalReports.Engine
|
||||||
|
Imports CrystalDecisions.ReportSource
|
||||||
Imports CrystalDecisions.Shared
|
Imports CrystalDecisions.Shared
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports iText.Kernel.Pdf
|
Imports iText.Kernel.Pdf
|
||||||
@@ -6040,7 +6041,8 @@ Public Class ClsPaginas
|
|||||||
If UsuarioActual.CveEmpresa.Contiene(141, 152, 159, 160, 161, 162, 163) Then
|
If UsuarioActual.CveEmpresa.Contiene(141, 152, 159, 160, 161, 162, 163) Then
|
||||||
Dim QRDescarga As String = ""
|
Dim QRDescarga As String = ""
|
||||||
Dim cfdi As New RVCFDI33.GeneraCFDI()
|
Dim cfdi As New RVCFDI33.GeneraCFDI()
|
||||||
Dim b As Byte() = cfdi.ConvertirQrCode($"http://econollantas.adssistemas.mx/Ashx/E141.ashx?P={Encripta($"File={Vta.SerieFolio}.pdf")}")
|
Dim Parametros As String = Encripta($"SerieFolio={Vta.SerieFolio}&TipoDocto={Vta.TipoDocto}&CveEmpresa={Vta.CveEmpresa}")
|
||||||
|
Dim b As Byte() = cfdi.ConvertirQrCode($"http://econollantas.adssistemas.mx/Ashx/E141.ashx?PV={Parametros}")
|
||||||
QRDescarga = Convert.ToBase64String(b)
|
QRDescarga = Convert.ToBase64String(b)
|
||||||
params.Add(New ReportParameter("QRDescarga", QRDescarga))
|
params.Add(New ReportParameter("QRDescarga", QRDescarga))
|
||||||
End If
|
End If
|
||||||
@@ -7667,7 +7669,6 @@ Public Class ClsPaginas
|
|||||||
#Region "P A G O D E C O M P R A S "
|
#Region "P A G O D E C O M P R A S "
|
||||||
Public Function AplicaPrePolizaPagoCompra(CompraActual As Compra, Pago As CompraPago, CvePrePoliza As Integer, ByRef ObjConta As ClsContabilidad) As Boolean
|
Public Function AplicaPrePolizaPagoCompra(CompraActual As Compra, Pago As CompraPago, CvePrePoliza As Integer, ByRef ObjConta As ClsContabilidad) As Boolean
|
||||||
Dim ErrorMovtos As Boolean = False
|
Dim ErrorMovtos As Boolean = False
|
||||||
Dim PorcentajePago As Decimal = Pago.ImportePago / CompraActual.Total
|
|
||||||
Dim ImporteMovimiento As Decimal = 0
|
Dim ImporteMovimiento As Decimal = 0
|
||||||
Dim ImporteMN As Decimal = 0
|
Dim ImporteMN As Decimal = 0
|
||||||
Dim ImporteME As Decimal = 0
|
Dim ImporteME As Decimal = 0
|
||||||
@@ -7677,6 +7678,14 @@ Public Class ClsPaginas
|
|||||||
Dim tFechaUltimaFluctuacion As Date
|
Dim tFechaUltimaFluctuacion As Date
|
||||||
Dim tImportePago As Decimal
|
Dim tImportePago As Decimal
|
||||||
Dim tImporteCompra As Decimal = Pago.ImportePago
|
Dim tImporteCompra As Decimal = Pago.ImportePago
|
||||||
|
Dim PorcentajePago As Decimal = Pago.ImportePago / CompraActual.Total
|
||||||
|
'VALIDACIONES A CONSIDERAR
|
||||||
|
If CompraActual.CveMoneda = Pago.CveMonedaPago Then
|
||||||
|
Pago.TCCambioMoneda = 1 ' si la moneda es igual, el importe debe ser 1
|
||||||
|
ElseIf CompraActual.CveMoneda <> Pago.CveMonedaPago AndAlso Pago.TCCambioMoneda = 1 Then
|
||||||
|
ErrorMovtos = True
|
||||||
|
Return ErrorMovtos
|
||||||
|
End If
|
||||||
|
|
||||||
Dim ConPreP As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(1, CompraActual.CveMoneda, True, CompraActual.CveTipoConceptoProveedor)
|
Dim ConPreP As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(1, CompraActual.CveMoneda, True, CompraActual.CveTipoConceptoProveedor)
|
||||||
'cuando el Pago viene por NC, se utiliza un concepto
|
'cuando el Pago viene por NC, se utiliza un concepto
|
||||||
@@ -7698,28 +7707,40 @@ Public Class ClsPaginas
|
|||||||
If Pago.Fecha < tFechaUltimaFluctuacion Then TCValuacionPago = TCValuacion
|
If Pago.Fecha < tFechaUltimaFluctuacion Then TCValuacionPago = TCValuacion
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If CompraActual.CveMoneda = 1 And Pago.CveMonedaPago <> 1 Then 'factura pesos, pago en dolares
|
|
||||||
tImportePago = ((Pago.ImportePago * TCValuacionCompra / Pago.TCPago).RoundSQL * Pago.TCPago).RoundSQL
|
tImporteCompra = (Pago.ImportePagoCompra * TCValuacionCompra).RoundSQL
|
||||||
tImporteCompra = (Pago.ImportePago * TCValuacionCompra).RoundSQL
|
tImportePago = (Pago.ImportePago * Pago.TCPago).RoundSQL
|
||||||
ElseIf CompraActual.CveMoneda <> 1 And Pago.CveMonedaPago <> 1 Then 'factura dolares, pago en dolares
|
PorcentajePago = Pago.ImportePago * Pago.TCCambioMoneda / CompraActual.Total
|
||||||
tImporteCompra = (Pago.ImportePago * TCValuacionCompra).RoundSQL
|
|
||||||
tImportePago = (Pago.ImportePago * Pago.TCPago).RoundSQL
|
'If CompraActual.CveMoneda = 1 And Pago.CveMonedaPago <> 1 Then 'factura pesos, pago en dolares
|
||||||
ElseIf CompraActual.CveMoneda <> 1 And Pago.CveMonedaPago = 1 Then 'factura dolares, pago en pesos
|
' tImportePago = ((Pago.ImportePago * TCValuacionCompra / Pago.TCPago).RoundSQL * Pago.TCPago).RoundSQL
|
||||||
tImporteCompra = (Pago.ImportePago * TCValuacionCompra).RoundSQL
|
' tImporteCompra = (Pago.ImportePagoCompra * TCValuacionCompra).RoundSQL
|
||||||
tImportePago = (Pago.ImportePago * Pago.TCPago).RoundSQL
|
' PorcentajePago = Pago.ImportePago * Pago.TCCambioMoneda / CompraActual.Total
|
||||||
End If
|
'ElseIf CompraActual.CveMoneda <> 1 And Pago.CveMonedaPago = 1 Then 'factura dolares, pago en pesos
|
||||||
Dim ImportePagoMN As Decimal = Pago.ImportePago
|
' tImporteCompra = (Pago.ImportePagoCompra * TCValuacionCompra).RoundSQL
|
||||||
|
' tImportePago = (Pago.ImportePago).RoundSQL
|
||||||
|
' PorcentajePago = Pago.ImportePago * Pago.TCCambioMoneda / CompraActual.Total
|
||||||
|
'ElseIf CompraActual.CveMoneda <> 1 And Pago.CveMonedaPago <> 1 Then 'factura dolares, pago en dolares
|
||||||
|
' tImporteCompra = (Pago.ImportePagoCompra * TCValuacionCompra).RoundSQL
|
||||||
|
' tImportePago = (Pago.ImportePago * Pago.TCPago).RoundSQL
|
||||||
|
' PorcentajePago = Pago.ImportePago / CompraActual.Total
|
||||||
|
'ElseIf CompraActual.CveMoneda = 1 And Pago.CveMonedaPago = 1 Then 'factura dolares, pago en pesos
|
||||||
|
' tImporteCompra = Pago.ImportePagoCompra
|
||||||
|
' tImportePago = Pago.ImportePago
|
||||||
|
' PorcentajePago = Pago.ImportePago / CompraActual.Total
|
||||||
|
'End If
|
||||||
|
Dim ImportePagoMN As Decimal = Pago.ImportePagoCompra
|
||||||
Dim UsaComplementaria As Boolean = True
|
Dim UsaComplementaria As Boolean = True
|
||||||
If CompraActual.CveMoneda > 1 Then ImporteME = Pago.ImportePago
|
If CompraActual.CveMoneda > 1 Then ImporteME = Pago.ImportePagoCompra
|
||||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then 'caso excepcional de complementarias
|
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then 'caso excepcional de complementarias
|
||||||
UsaComplementaria = False
|
UsaComplementaria = False
|
||||||
ImportePagoMN = (Pago.ImportePago * TCValuacionCompra).RoundSQL
|
ImportePagoMN = (Pago.ImportePagoCompra * TCValuacionCompra).RoundSQL
|
||||||
End If
|
End If
|
||||||
'movimiento de pago proveedor
|
'movimiento de pago proveedor
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImportePagoMN, ConPreP.CveConcepto, CompraActual.SerieFolio, Concepto, CompraActual.IdCtaContableProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveCompraAmortizacion:=Pago.CveCompraAmortizacion, TipoCambio:=TCValuacionCompra, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto, CveVenta:=Pago.CveVentaRelacionada) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePagoCompra, ImportePagoMN, ConPreP.CveConcepto, CompraActual.SerieFolio, Concepto, CompraActual.IdCtaContableProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveCompraAmortizacion:=Pago.CveCompraAmortizacion, TipoCambio:=TCValuacionCompra, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto, CveVenta:=Pago.CveVentaRelacionada) Then ErrorMovtos = True
|
||||||
'movimiento de pago proveedor Complementaria
|
'movimiento de pago proveedor Complementaria
|
||||||
If Not ErrorMovtos AndAlso CompraActual.CveMoneda > 1 AndAlso UsaComplementaria Then
|
If Not ErrorMovtos AndAlso CompraActual.CveMoneda > 1 AndAlso UsaComplementaria Then
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, (ImporteME * TCValuacionCompra - ImporteME).RoundSQL, ConPreP.CveConceptoComplementario, CompraActual.SerieFolio, Concepto, CompraActual.IdCtaContableProvComplementaria, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveCompraAmortizacion:=Pago.CveCompraAmortizacion, TipoCambio:=TCValuacionCompra, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto, CveVenta:=Pago.CveVentaRelacionada) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePagoCompra, (ImporteME * TCValuacionCompra - ImporteME).RoundSQL, ConPreP.CveConceptoComplementario, CompraActual.SerieFolio, Concepto, CompraActual.IdCtaContableProvComplementaria, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveCompraAmortizacion:=Pago.CveCompraAmortizacion, TipoCambio:=TCValuacionCompra, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto, CveVenta:=Pago.CveVentaRelacionada) Then ErrorMovtos = True
|
||||||
End If
|
End If
|
||||||
If Pago.AplicaAcreditable Then
|
If Pago.AplicaAcreditable Then
|
||||||
'si tiene iva y su proporcion
|
'si tiene iva y su proporcion
|
||||||
@@ -7886,6 +7907,12 @@ Public Class ClsPaginas
|
|||||||
Public Property CveIE As Integer = -1
|
Public Property CveIE As Integer = -1
|
||||||
Public Property CvePersonal As Integer = -1
|
Public Property CvePersonal As Integer = -1
|
||||||
Public Property ImportePago As Decimal = 0
|
Public Property ImportePago As Decimal = 0
|
||||||
|
Public ReadOnly Property ImportePagoCompra As Decimal
|
||||||
|
Get
|
||||||
|
Return (ImportePago * TCCambioMoneda).RoundSQL
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public Property TCCambioMoneda As Decimal = 1
|
||||||
Public Property CveMonedaPago As Integer = 1
|
Public Property CveMonedaPago As Integer = 1
|
||||||
Public Property TCPago As Decimal = 1
|
Public Property TCPago As Decimal = 1
|
||||||
Public Property CveCompraAmortizacion As Integer = 0
|
Public Property CveCompraAmortizacion As Integer = 0
|
||||||
@@ -8037,43 +8064,53 @@ Public Class ClsPaginas
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
End Class
|
End Class
|
||||||
' 1. Proveedores, 11. anticipos proveedores, 15. Notas de crédito de proveedores
|
' 1. Proveedores, 11. anticipos proveedores, 15. Notas de crédito de proveedores, 6. Clientes
|
||||||
Public Shared ReadOnly Property ObtenerCveConceptoPrePoliza(CveTipoSaldo As Integer, CveMoneda As Integer, EsAplicacionPago As Boolean, CveTipoProveedor As Integer) As ConceptosTipoSaldo
|
'CveTipoProveedorTipoDocto: cuando es TipoSaldo=2: 1. Proveedor, 2. Acreedor, TipoSaldo=6: 1.Factura, 2.NC
|
||||||
|
Public Shared ReadOnly Property ObtenerCveConceptoPrePoliza(CveTipoSaldo As Integer, CveMoneda As Integer, EsAplicacionPago As Boolean, CveTipoProveedorTipoDocto As Integer) As ConceptosTipoSaldo
|
||||||
Get
|
Get
|
||||||
|
|
||||||
Dim Retorno As New ConceptosTipoSaldo
|
Dim Retorno As New ConceptosTipoSaldo
|
||||||
If EsAplicacionPago Then
|
If EsAplicacionPago Then
|
||||||
Select Case CveTipoSaldo
|
Select Case CveTipoSaldo
|
||||||
Case 1 ' proveedores/acreedores
|
Case 1 ' proveedores/acreedores
|
||||||
Select Case CveMoneda
|
Select Case CveMoneda
|
||||||
Case 1 'pesos
|
Case 1 'pesos
|
||||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 17, 308)
|
Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 17, 308)
|
||||||
Case 2 'dólares
|
Case 2 'dólares
|
||||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 312, 309)
|
Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 312, 309)
|
||||||
Retorno.CveConceptoComplementario = If(CveTipoProveedor = 1, 206, 310)
|
Retorno.CveConceptoComplementario = If(CveTipoProveedorTipoDocto = 1, 206, 310)
|
||||||
End Select
|
End Select
|
||||||
Case 11 ' anticipos
|
Case 11 ' anticipos
|
||||||
Select Case CveMoneda
|
Select Case CveMoneda
|
||||||
Case 1 'pesos
|
Case 1 'pesos
|
||||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 21, 56)
|
Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 21, 56)
|
||||||
Case 2 'dólares
|
Case 2 'dólares
|
||||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 339, 346)
|
Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 339, 346)
|
||||||
Retorno.CveConceptoComplementario = If(CveTipoProveedor = 1, 340, 347)
|
Retorno.CveConceptoComplementario = If(CveTipoProveedorTipoDocto = 1, 340, 347)
|
||||||
End Select
|
End Select
|
||||||
Case 15 ' notas de crédito
|
Case 15 ' notas de crédito
|
||||||
Select Case CveMoneda
|
Select Case CveMoneda
|
||||||
Case 1 'pesos
|
Case 1 'pesos
|
||||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 60, 324)
|
Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 60, 324)
|
||||||
Case 2 'dólares
|
Case 2 'dólares
|
||||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 342, 344)
|
Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 342, 344)
|
||||||
Retorno.CveConceptoComplementario = If(CveTipoProveedor = 1, 235, 235)
|
Retorno.CveConceptoComplementario = If(CveTipoProveedorTipoDocto = 1, 235, 235)
|
||||||
End Select
|
End Select
|
||||||
Case 17 ' deudores
|
Case 17 ' deudores
|
||||||
Select Case CveMoneda
|
Select Case CveMoneda
|
||||||
Case 1 'pesos
|
Case 1 'pesos
|
||||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 37, 37)
|
Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 37, 37)
|
||||||
Case 2 'dólares
|
Case 2 'dólares
|
||||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 37, 37)
|
Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 37, 37)
|
||||||
Retorno.CveConceptoComplementario = If(CveTipoProveedor = 1, 256, 256)
|
Retorno.CveConceptoComplementario = If(CveTipoProveedorTipoDocto = 1, 256, 256)
|
||||||
|
End Select
|
||||||
|
Case 6 ' clientes
|
||||||
|
Select Case CveMoneda
|
||||||
|
Case 1 'pesos
|
||||||
|
Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 2, 91) '1.Venta.2.NC
|
||||||
|
Case 2 'dólares
|
||||||
|
Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 292, 294) '1.Venta.2.NC
|
||||||
|
Retorno.CveConceptoComplementario = If(CveTipoProveedorTipoDocto = 1, 207, 203) '1.Venta.2.NC
|
||||||
End Select
|
End Select
|
||||||
End Select
|
End Select
|
||||||
Else 'cuando es la provisión
|
Else 'cuando es la provisión
|
||||||
@@ -8081,35 +8118,44 @@ Public Class ClsPaginas
|
|||||||
Case 1 ' proveedores/acreedores
|
Case 1 ' proveedores/acreedores
|
||||||
Select Case CveMoneda
|
Select Case CveMoneda
|
||||||
Case 1 'pesos
|
Case 1 'pesos
|
||||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 5, 305)
|
Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 5, 305)
|
||||||
Case 2 'dólares
|
Case 2 'dólares
|
||||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 311, 306)
|
Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 311, 306)
|
||||||
Retorno.CveConceptoComplementario = If(CveTipoProveedor = 1, 201, 307)
|
Retorno.CveConceptoComplementario = If(CveTipoProveedorTipoDocto = 1, 201, 307)
|
||||||
End Select
|
End Select
|
||||||
Case 11 ' anticipos
|
Case 11 ' anticipos
|
||||||
Select Case CveMoneda
|
Select Case CveMoneda
|
||||||
Case 1 'pesos
|
Case 1 'pesos
|
||||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 10, 48)
|
Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 10, 48)
|
||||||
Case 2 'dólares
|
Case 2 'dólares
|
||||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 338, 345)
|
Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 338, 345)
|
||||||
Retorno.CveConceptoComplementario = If(CveTipoProveedor = 1, 340, 347)
|
Retorno.CveConceptoComplementario = If(CveTipoProveedorTipoDocto = 1, 340, 347)
|
||||||
End Select
|
End Select
|
||||||
Case 15 ' notas de crédito
|
Case 15 ' notas de crédito
|
||||||
Select Case CveMoneda
|
Select Case CveMoneda
|
||||||
Case 1 'pesos
|
Case 1 'pesos
|
||||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 18, 323)
|
Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 18, 323)
|
||||||
Case 2 'dólares
|
Case 2 'dólares
|
||||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 341, 343)
|
Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 341, 343)
|
||||||
Retorno.CveConceptoComplementario = If(CveTipoProveedor = 1, 234, 234)
|
Retorno.CveConceptoComplementario = If(CveTipoProveedorTipoDocto = 1, 234, 234)
|
||||||
End Select
|
End Select
|
||||||
Case 17 ' deudores
|
Case 17 ' deudores
|
||||||
Select Case CveMoneda
|
Select Case CveMoneda
|
||||||
Case 1 'pesos
|
Case 1 'pesos
|
||||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 43, 43)
|
Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 43, 43)
|
||||||
Case 2 'dólares
|
Case 2 'dólares
|
||||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 43, 43)
|
Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 43, 43)
|
||||||
Retorno.CveConceptoComplementario = If(CveTipoProveedor = 1, 256, 256)
|
Retorno.CveConceptoComplementario = If(CveTipoProveedorTipoDocto = 1, 256, 256)
|
||||||
End Select
|
End Select
|
||||||
|
Case 6 ' clientes
|
||||||
|
Select Case CveMoneda
|
||||||
|
Case 1 'pesos
|
||||||
|
Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 1, 12) '1.Venta.2.NC
|
||||||
|
Case 2 'dólares
|
||||||
|
Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 291, 293) '1.Venta.2.NC
|
||||||
|
Retorno.CveConceptoComplementario = If(CveTipoProveedorTipoDocto = 1, 203, 203) '1.Venta.2.NC
|
||||||
|
End Select
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -8401,6 +8447,7 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/Nomina/ISRCalculoAnual.aspx".ToUpper(), 918)
|
PaginaDict.Add("/Nomina/ISRCalculoAnual.aspx".ToUpper(), 918)
|
||||||
PaginaDict.Add("/Nomina/MovimientosSUA.aspx".ToUpper(), 919)
|
PaginaDict.Add("/Nomina/MovimientosSUA.aspx".ToUpper(), 919)
|
||||||
PaginaDict.Add("/Nomina/Acumulados.aspx".ToUpper(), 916)
|
PaginaDict.Add("/Nomina/Acumulados.aspx".ToUpper(), 916)
|
||||||
|
|
||||||
PaginaDict.Add("/RH/CalculoSBC.aspx".ToUpper(), 915)
|
PaginaDict.Add("/RH/CalculoSBC.aspx".ToUpper(), 915)
|
||||||
PaginaDict.Add("/Inicio.aspx".ToUpper(), -1)
|
PaginaDict.Add("/Inicio.aspx".ToUpper(), -1)
|
||||||
PaginaDict.Add("/reporteador.aspx".ToUpper(), -1)
|
PaginaDict.Add("/reporteador.aspx".ToUpper(), -1)
|
||||||
|
|||||||
@@ -1325,7 +1325,7 @@ Public Class ClsVentas
|
|||||||
CvePresupuestoIngreso As Integer, Optional TiempoEntrega As String = "", Optional CveVentaDetallePadre As Integer = -1,
|
CvePresupuestoIngreso As Integer, Optional TiempoEntrega As String = "", Optional CveVentaDetallePadre As Integer = -1,
|
||||||
Optional CveContratoDetalle As Integer = -1, Optional PorcentajeIVA As Decimal = 0, Optional IEPS As Double = -1, Optional PorcentajeIEPS As Double = 0, Optional CvePromocionDetalle As Integer = -1,
|
Optional CveContratoDetalle As Integer = -1, Optional PorcentajeIVA As Decimal = 0, Optional IEPS As Double = -1, Optional PorcentajeIEPS As Double = 0, Optional CvePromocionDetalle As Integer = -1,
|
||||||
Optional CveMovimientoDetallePedido As Integer = -1, Optional ImporteRetIVA As Double = 0, Optional PorcentajeRetIVA As Double = 0,
|
Optional CveMovimientoDetallePedido As Integer = -1, Optional ImporteRetIVA As Double = 0, Optional PorcentajeRetIVA As Double = 0,
|
||||||
Optional ImporteRetISR As Double = 0, Optional PorcentajeRetISR As Double = 0, Optional CuentaPredial As String = "") As Boolean
|
Optional ImporteRetISR As Double = 0, Optional PorcentajeRetISR As Double = 0, Optional CuentaPredial As String = "", Optional CvePrecioLista As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_VentasDetalleAdd")
|
DataAdapter("PA_VentasDetalleAdd")
|
||||||
|
|
||||||
@@ -1355,6 +1355,7 @@ Public Class ClsVentas
|
|||||||
.Add("@CvePromocionDetalle", SqlDbType.Int).Value = CvePromocionDetalle
|
.Add("@CvePromocionDetalle", SqlDbType.Int).Value = CvePromocionDetalle
|
||||||
.Add("@CveMovimientoDetallePedido", SqlDbType.Int).Value = CveMovimientoDetallePedido
|
.Add("@CveMovimientoDetallePedido", SqlDbType.Int).Value = CveMovimientoDetallePedido
|
||||||
.Add("@CuentaPredial", SqlDbType.VarChar).Value = CuentaPredial
|
.Add("@CuentaPredial", SqlDbType.VarChar).Value = CuentaPredial
|
||||||
|
.Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -301,6 +301,11 @@ Namespace Modelos
|
|||||||
|
|
||||||
|
|
||||||
#Region " OBJETOS Ventas"
|
#Region " OBJETOS Ventas"
|
||||||
|
<Serializable>
|
||||||
|
Public Class MPrecioSugerido
|
||||||
|
Public Property CvePrecioLista As Integer
|
||||||
|
Public Property PrecioSugerido As Decimal
|
||||||
|
End Class
|
||||||
<Serializable>
|
<Serializable>
|
||||||
Public Class VentaDescuentos
|
Public Class VentaDescuentos
|
||||||
Public Consec As Integer
|
Public Consec As Integer
|
||||||
@@ -3324,27 +3329,12 @@ Namespace Modelos
|
|||||||
CveVentaAmortizacionAplicar = ObjFactura.CveVenta
|
CveVentaAmortizacionAplicar = ObjFactura.CveVenta
|
||||||
End If
|
End If
|
||||||
|
|
||||||
''código fijo en base el porcentaje iva, que se afecten las clasificaciones
|
|
||||||
'For i = 0 To TmpDTDetalle.Rows.Count - 1
|
|
||||||
|
|
||||||
' 'se excluyen las clasificaciones anteriores para que se asignen las de ingreso
|
|
||||||
' If Not TmpDTDetalle(i)("CveClasificacion").ToString.Contiene("19958", "19933") Then
|
|
||||||
|
|
||||||
' 'reclasifica la clasificación del producto, por la del ingreso correspondiente a su iva
|
|
||||||
' If ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString.ToDecimal).Rows.Count > 0 Then
|
|
||||||
' TmpDTDetalle(i)("CveClasificacion") = ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString.ToDecimal).Rows(0)("CveClasificacion").ToString
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' End If
|
|
||||||
|
|
||||||
'Next
|
|
||||||
|
|
||||||
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {ObjFactura.CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
|
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {ObjFactura.CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
|
||||||
|
|
||||||
If DT.Rows.Count > 0 Then
|
If DT.Rows.Count > 0 Then
|
||||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||||
For Each Row2 As DataRow In DT.Rows
|
For Each Row2 As DataRow In DT.Rows
|
||||||
importeMovimiento = ((TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString.ToDecimal) * ValorMultiplicador)
|
importeMovimiento = ((TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} AND CveSubProyecto = {1} AND PorcentajeIVA = {2}", Row2("CveClasificacion"), Row2("CveSubProyecto"), Row2("PorcentajeIVA"))).ToString.ToDecimal) * ValorMultiplicador)
|
||||||
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
||||||
FechaMovimiento = ObjFactura.FechaPago
|
FechaMovimiento = ObjFactura.FechaPago
|
||||||
Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, ClsPaginas.GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}"
|
Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, ClsPaginas.GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}"
|
||||||
@@ -3388,37 +3378,12 @@ Namespace Modelos
|
|||||||
CveVentaAmortizacionAplicar = ObjFactura.CveVenta
|
CveVentaAmortizacionAplicar = ObjFactura.CveVenta
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If UsuarioActual.CveEmpresa = 119 Then
|
|
||||||
|
|
||||||
' 'código fijo en base el porcentaje iva, que se afecten las clasificaciones
|
|
||||||
' For i = 0 To TmpDTDetalle.Rows.Count - 1
|
|
||||||
|
|
||||||
' 'se excluyen las clasificaciones anteriores para que se asignen las de ingreso
|
|
||||||
' If Not TmpDTDetalle(i)("CveClasificacion").ToString.Contiene("19958", "19933", "20242") Then
|
|
||||||
|
|
||||||
' If ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDouble).Rows.Count > 0 Then
|
|
||||||
' TmpDTDetalle(i)("CveClasificacion") = ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDouble).Rows(0)("CveClasificacion").ToString
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' Next
|
|
||||||
|
|
||||||
'End If
|
|
||||||
|
|
||||||
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {ObjFactura.CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
|
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {ObjFactura.CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
|
||||||
|
|
||||||
If DT.Rows.Count > 0 Then
|
If DT.Rows.Count > 0 Then
|
||||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||||
For Each Row2 As DataRow In DT.Rows
|
For Each Row2 As DataRow In DT.Rows
|
||||||
importeMovimiento = ((TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString.ToDecimal) * ValorMultiplicador)
|
importeMovimiento = ((TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} AND CveSubProyecto = {1} AND PorcentajeIVA = {2}", Row2("CveClasificacion"), Row2("CveSubProyecto"), Row2("PorcentajeIVA"))).ToString.ToDecimal) * ValorMultiplicador)
|
||||||
|
|
||||||
'If ObjFactura.TipoDocto = "Egs" Then
|
|
||||||
' importeMovimiento += (TmpDTDetalle.SUM("ImporteIVA", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador
|
|
||||||
' importeMovimiento += (TmpDTDetalle.SUM("ImporteIEPS", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador
|
|
||||||
' importeMovimiento -= (TmpDTDetalle.SUM("ImporteRetIVA", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador
|
|
||||||
' importeMovimiento -= (TmpDTDetalle.SUM("ImporteRetISR", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador
|
|
||||||
'End If
|
|
||||||
|
|
||||||
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
||||||
FechaMovimiento = ObjFactura.FechaPago
|
FechaMovimiento = ObjFactura.FechaPago
|
||||||
|
|||||||
@@ -865,7 +865,7 @@ Public Class Timbrado
|
|||||||
<usuario xmlns="""">{UsuarioServicio}</usuario>
|
<usuario xmlns="""">{UsuarioServicio}</usuario>
|
||||||
<passwd xmlns="""">{PassServicio}</passwd>
|
<passwd xmlns="""">{PassServicio}</passwd>
|
||||||
<rfcEmisor xmlns="""">{rfcEmisor}</rfcEmisor>
|
<rfcEmisor xmlns="""">{rfcEmisor}</rfcEmisor>
|
||||||
<arregloUUID xmlns="""">{arregloUUID}|{rfcReceptor}|{rfcEmisor}|{Total}|{MotivoCancelacion}|{FolioSustitucion}</arregloUUID>
|
<arregloUUID xmlns="""">{arregloUUID}|{rfcReceptor.ToEscapeXML()}|{rfcEmisor.ToEscapeXML()}|{Total}|{MotivoCancelacion}|{FolioSustitucion}</arregloUUID>
|
||||||
<cert xmlns="""">{certBase64}</cert>
|
<cert xmlns="""">{certBase64}</cert>
|
||||||
<key xmlns="""">{keyBase64}</key>
|
<key xmlns="""">{keyBase64}</key>
|
||||||
<keyPass xmlns="""">{keyPass}</keyPass>
|
<keyPass xmlns="""">{keyPass}</keyPass>
|
||||||
|
|||||||
@@ -3960,6 +3960,19 @@ Namespace Extensiones
|
|||||||
|
|
||||||
Return text
|
Return text
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
<Runtime.CompilerServices.Extension()>
|
||||||
|
Function ToEscapeXML(ByVal str As String) As String
|
||||||
|
Dim text As String = ""
|
||||||
|
|
||||||
|
text = str.Replace("'", "'")
|
||||||
|
text = str.Replace("<", "<")
|
||||||
|
text = str.Replace(">", ">")
|
||||||
|
text = str.Replace("&", "&")
|
||||||
|
|
||||||
|
Return text
|
||||||
|
End Function
|
||||||
End Module
|
End Module
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|||||||
@@ -99,16 +99,36 @@ Public Class E141 : Implements IHttpHandler
|
|||||||
Dim retorno As String = ""
|
Dim retorno As String = ""
|
||||||
Try
|
Try
|
||||||
Dim Params = If(context.Request("P") = Nothing, "", context.Request("P").ToString())
|
Dim Params = If(context.Request("P") = Nothing, "", context.Request("P").ToString())
|
||||||
|
Dim ParamsV = If(context.Request("PV") = Nothing, "", context.Request("PV").ToString())
|
||||||
|
|
||||||
|
Dim ParametrosNuevos As Boolean = False
|
||||||
|
If Not String.IsNullOrEmpty(ParamsV) Then
|
||||||
|
ParametrosNuevos = True
|
||||||
|
Params = ParamsV
|
||||||
|
End If
|
||||||
|
|
||||||
'DESCARGA DEL PDF
|
'DESCARGA DEL PDF
|
||||||
If Not String.IsNullOrEmpty(Params) Then
|
If Not String.IsNullOrEmpty(Params) Then
|
||||||
Try
|
Try
|
||||||
Dim UrlParametros As Hashtable = Parametros(Decripta(Params))
|
If ParametrosNuevos Then
|
||||||
|
Dim UrlParametros As Hashtable = Parametros(Decripta(Params))
|
||||||
|
|
||||||
Dim File As String = UrlParametros("FILE").ToString()
|
Dim File As String = String.Format("{0}.pdf", UrlParametros("SERIEFOLIO").ToString())
|
||||||
If Not String.IsNullOrEmpty(File) Then
|
Dim TipoDocto As String = UrlParametros("TIPODOCTO").ToString()
|
||||||
ImprimirbytesPDF(context, DescargarFactura(File), File)
|
Dim CveEmpresaParam As Integer = UrlParametros("CVEEMPRESA").ToString().ToEntero()
|
||||||
|
|
||||||
|
If Not String.IsNullOrEmpty(File) AndAlso Not String.IsNullOrEmpty(TipoDocto) AndAlso CveEmpresaParam > 0 Then
|
||||||
|
ImprimirbytesPDF(context, DescargarFactura(File, CveEmpresaParam, TipoDocto), File)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Dim UrlParametros As Hashtable = Parametros(Decripta(Params))
|
||||||
|
|
||||||
|
Dim File As String = UrlParametros("FILE").ToString()
|
||||||
|
If Not String.IsNullOrEmpty(File) Then
|
||||||
|
ImprimirbytesPDF(context, DescargarFactura(File, Me.CveEmpresa), File)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
GuardaLogAD("Ocurrió un error al descargar el pdf. " + ex.ToString() + ".parametros: " + Params, "LogE141")
|
GuardaLogAD("Ocurrió un error al descargar el pdf. " + ex.ToString() + ".parametros: " + Params, "LogE141")
|
||||||
End Try
|
End Try
|
||||||
@@ -2202,8 +2222,8 @@ Public Class E141 : Implements IHttpHandler
|
|||||||
|
|
||||||
#Region "D E S C A R G A - P D F"
|
#Region "D E S C A R G A - P D F"
|
||||||
|
|
||||||
Private Function DescargarFactura(FilePDF As String) As Byte()
|
Private Function DescargarFactura(FilePDF As String, CveEmpresa As Integer, Optional TipoDocto As String = "Ing") As Byte()
|
||||||
Dim Url = New Uri(String.Format("{0}://{1}:{2}/Compras/PopUpVerFactura.aspx?TipoDocto=Ing&File={3}&TipoArchivo=PDF", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, FilePDF))
|
Dim Url = New Uri(String.Format("{0}://{1}:{2}/Compras/PopUpVerFactura.aspx?TipoDocto={4}&File={3}&TipoArchivo=PDF", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, FilePDF, TipoDocto))
|
||||||
Dim File As Byte() = Nothing
|
Dim File As Byte() = Nothing
|
||||||
Try
|
Try
|
||||||
Using httpClient = New HttpClient()
|
Using httpClient = New HttpClient()
|
||||||
|
|||||||
@@ -493,7 +493,7 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="VCEProveedor" runat="server" HighlightCssClass="vco" TargetControlID="RFVProveedor" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCEProveedor" runat="server" HighlightCssClass="vco" TargetControlID="RFVProveedor" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr runat="server" id="trClasifContable" visible="false">
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<asp:RadioButtonList runat="server" ID="RBLClasificacionContable" AutoPostBack="true" RepeatDirection="Horizontal">
|
<asp:RadioButtonList runat="server" ID="RBLClasificacionContable" AutoPostBack="true" RepeatDirection="Horizontal">
|
||||||
<asp:ListItem Text="Doc x Pagar" Value="1" Selected="True"></asp:ListItem>
|
<asp:ListItem Text="Doc x Pagar" Value="1" Selected="True"></asp:ListItem>
|
||||||
@@ -501,7 +501,7 @@
|
|||||||
</asp:RadioButtonList>
|
</asp:RadioButtonList>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr runat="server" id="trCtaContable" visible="false">
|
||||||
<td>Cuenta Contable:</td>
|
<td>Cuenta Contable:</td>
|
||||||
<td>
|
<td>
|
||||||
<asp:UpdatePanel runat="server" ID="UpCtaContable" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" ID="UpCtaContable" UpdateMode="Conditional">
|
||||||
|
|||||||
@@ -549,7 +549,7 @@ Partial Class Bancos_Creditos
|
|||||||
DdlCtaContable.Items.Clear()
|
DdlCtaContable.Items.Clear()
|
||||||
Dim IdCuentaPadre As Integer = If(RBLClasificacionContable.SelectedValue.ToEntero = 1, UsuarioActual.Empresa.Funcionalidad(203).ToEntero, UsuarioActual.Empresa.Funcionalidad(202).ToEntero)
|
Dim IdCuentaPadre As Integer = If(RBLClasificacionContable.SelectedValue.ToEntero = 1, UsuarioActual.Empresa.Funcionalidad(203).ToEntero, UsuarioActual.Empresa.Funcionalidad(202).ToEntero)
|
||||||
|
|
||||||
If IdCuentaPadre > 0 Then
|
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso IdCuentaPadre > 0 Then
|
||||||
Dim ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa)
|
Dim ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
If ObjContabilidad.GetCuentasRecursiva(IdCuentaPadre, 1) Then
|
If ObjContabilidad.GetCuentasRecursiva(IdCuentaPadre, 1) Then
|
||||||
DdlCtaContable.DataSource = ObjContabilidad.DtResultados
|
DdlCtaContable.DataSource = ObjContabilidad.DtResultados
|
||||||
|
|||||||
@@ -1034,34 +1034,28 @@ Partial Class Bancos_IE
|
|||||||
IDPoliza = ObjIE.IDPoliza
|
IDPoliza = ObjIE.IDPoliza
|
||||||
IDCtaContable = ObjIE.IdCtaContable
|
IDCtaContable = ObjIE.IdCtaContable
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||||
|
If ObjIE.IDPoliza > 0 Then
|
||||||
|
|
||||||
If ObjIE.IDPoliza > 0 Then
|
If UsuarioActual.TienePermisoProceso(107) Then
|
||||||
|
BtnDescontabilizar.Visible = True
|
||||||
If UsuarioActual.TienePermisoProceso(107) Then
|
End If
|
||||||
BtnDescontabilizar.Visible = True
|
BtnContabilizar.Visible = False
|
||||||
|
HplIrPoliza.Visible = True
|
||||||
|
HplIrPoliza.NavigateUrl = String.Format("/Contabilidad/RegPoliza.aspx?IdPoliza={0}", ObjIE.IDPoliza)
|
||||||
|
'ImgEliminarMovimiento.OnClientClick = "return confirm('Esta seguro de eliminar el documento y su póliza?');"
|
||||||
|
LnkEliminar.OnClientClick = "return confirm('¿Está seguro de eliminar el documento y su póliza?');"
|
||||||
|
EstaContabilizado = True
|
||||||
|
TxtFechaDocumento.Enabled = False
|
||||||
|
ImgCalendario.Visible = False
|
||||||
|
Else
|
||||||
|
BtnContabilizar.Visible = True
|
||||||
|
BtnDescontabilizar.Visible = False
|
||||||
|
HplIrPoliza.Visible = False
|
||||||
|
EstaContabilizado = False
|
||||||
End If
|
End If
|
||||||
BtnContabilizar.Visible = False
|
|
||||||
HplIrPoliza.Visible = True
|
|
||||||
HplIrPoliza.NavigateUrl = String.Format("/Contabilidad/RegPoliza.aspx?IdPoliza={0}", ObjIE.IDPoliza)
|
|
||||||
'ImgEliminarMovimiento.OnClientClick = "return confirm('Esta seguro de eliminar el documento y su póliza?');"
|
|
||||||
LnkEliminar.OnClientClick = "return confirm('¿Está seguro de eliminar el documento y su póliza?');"
|
|
||||||
|
|
||||||
EstaContabilizado = True
|
|
||||||
|
|
||||||
TxtFechaDocumento.Enabled = False
|
|
||||||
ImgCalendario.Visible = False
|
|
||||||
|
|
||||||
|
|
||||||
Else
|
|
||||||
BtnContabilizar.Visible = True
|
|
||||||
BtnDescontabilizar.Visible = False
|
|
||||||
HplIrPoliza.Visible = False
|
|
||||||
EstaContabilizado = False
|
|
||||||
|
|
||||||
'TxtFechaDocumento.Enabled = True
|
|
||||||
'ImgCalendario.Visible = True
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
UPPDesContabilizar.Update()
|
UPPDesContabilizar.Update()
|
||||||
|
|
||||||
'ImgImprimir.Visible = True
|
'ImgImprimir.Visible = True
|
||||||
@@ -1416,9 +1410,9 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
IDCtaBeneficiario = ObjProveedor.IdCtaContAcreedor
|
IDCtaBeneficiario = ObjProveedor.IdCtaContAcreedor
|
||||||
|
|
||||||
If Not IDCtaBeneficiario > 0 Then
|
'If Not IDCtaBeneficiario > 0 Then
|
||||||
Alert("No se pudo cargar IDCtaBeneficiario", TipoMensaje.MsgAdvertencia)
|
' Alert("No se pudo cargar IDCtaBeneficiario", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -2651,6 +2645,7 @@ Partial Class Bancos_IE
|
|||||||
Case "P" 'Proveedores
|
Case "P" 'Proveedores
|
||||||
If CveProveedor > 0 Then
|
If CveProveedor > 0 Then
|
||||||
CveConceptoCompra = 10 'Anticipo a proveedor
|
CveConceptoCompra = 10 'Anticipo a proveedor
|
||||||
|
If CveMoneda = 2 Then CveConceptoCompra = 338
|
||||||
CveConceptoContable = 30 'Pago a Proveedor
|
CveConceptoContable = 30 'Pago a Proveedor
|
||||||
CvePlantillaPoliza = 3
|
CvePlantillaPoliza = 3
|
||||||
End If
|
End If
|
||||||
@@ -2665,6 +2660,7 @@ Partial Class Bancos_IE
|
|||||||
Case "AC" ' Acreedores Diversos
|
Case "AC" ' Acreedores Diversos
|
||||||
If CveProveedor > 0 Then
|
If CveProveedor > 0 Then
|
||||||
CveConceptoCompra = 48 'anticipo a acreedor diverso
|
CveConceptoCompra = 48 'anticipo a acreedor diverso
|
||||||
|
If CveMoneda = 2 Then CveConceptoCompra = 345
|
||||||
CveConceptoContable = 30 'Bancos
|
CveConceptoContable = 30 'Bancos
|
||||||
'limpio el iva
|
'limpio el iva
|
||||||
HdnProvPorIVA.Value = "0"
|
HdnProvPorIVA.Value = "0"
|
||||||
@@ -2720,7 +2716,11 @@ Partial Class Bancos_IE
|
|||||||
Dim FolioFijo As Integer = 0
|
Dim FolioFijo As Integer = 0
|
||||||
Dim tCveMoneda As Integer = CveMoneda
|
Dim tCveMoneda As Integer = CveMoneda
|
||||||
Dim tImporteMonedaExtranjera As Decimal = TxtImporte.Text.ToDecimal
|
Dim tImporteMonedaExtranjera As Decimal = TxtImporte.Text.ToDecimal
|
||||||
If tCveMoneda <> 1 Then tImporteMonedaExtranjera = (TxtImporte.Text.ToDecimal * GlobalTipoCambio(TxtFechaDocumento.Text.Trim.ToDate).ToString.ToDecimal).RoundSQL
|
Dim tImporteMonedaME As Decimal = 0
|
||||||
|
If tCveMoneda <> 1 Then
|
||||||
|
tImporteMonedaExtranjera = (TxtImporte.Text.ToDecimal * GlobalTipoCambio(TxtFechaDocumento.Text.Trim.ToDate).ToString.ToDecimal).RoundSQL
|
||||||
|
tImporteMonedaME = TxtImporte.Text.ToDecimal
|
||||||
|
End If
|
||||||
Dim PagueseA = ""
|
Dim PagueseA = ""
|
||||||
|
|
||||||
If HdnCveCliente.Value.ToEntero > 0 Then
|
If HdnCveCliente.Value.ToEntero > 0 Then
|
||||||
@@ -2884,7 +2884,7 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
Select Case ConceptoContable
|
Select Case ConceptoContable
|
||||||
|
|
||||||
Case 10
|
Case 10, 338, 345
|
||||||
If RBL.SelectedValue = "P" AndAlso CveProveedor > 0 Then
|
If RBL.SelectedValue = "P" AndAlso CveProveedor > 0 Then
|
||||||
importeMovimiento = TxtImporte.Text.ToDecimal
|
importeMovimiento = TxtImporte.Text.ToDecimal
|
||||||
importeMX = importeMovimiento
|
importeMX = importeMovimiento
|
||||||
@@ -3596,71 +3596,46 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
Dim ConceptoContable As Integer
|
Dim ConceptoContable As Integer
|
||||||
Dim TipoMovimiento As Boolean
|
Dim TipoMovimiento As Boolean
|
||||||
Dim importeMovimiento As Decimal
|
Dim importeMovimiento As Decimal = TxtImporte.Text.ToDecimal
|
||||||
Dim FechaMovimiento As Date = Now
|
Dim FechaMovimiento As Date = Now
|
||||||
Dim Concepto As String = ""
|
Dim Concepto As String = ""
|
||||||
Dim Referencia As String = PagueseA
|
Dim Referencia As String = PagueseA
|
||||||
|
Dim CveCredito As Integer
|
||||||
|
|
||||||
Dim importeMX As Decimal
|
CveCredito = IfNull(Request("CveCredito"), "-1").ToString.ToEntero
|
||||||
Dim Multiplicador As Integer
|
CveCreditoDetalle = IfNull(Request("CveCreditoDetalle"), "-1").ToString.ToEntero
|
||||||
|
Concepto = ObjMov.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, PagueseA, "", ObjIE.Folio)
|
||||||
|
|
||||||
If ObjMov.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPoliza) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Concepto, 57, Concepto, FechaMovimiento, If(ConceptoContable = 30, IDCtaContable, IDCtaBeneficiario), -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=importeMovimiento, ImporteME:=tImporteMonedaExtranjera, TipoCambio:=TxtTipoCambio.Text.ToDecimal, CveCredito:=CveCredito) Then
|
||||||
|
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
|
||||||
For Each Row As DataRow In ObjMov.DtResultados.Rows
|
|
||||||
|
|
||||||
ConceptoContable = Row("CveConcepto").ToString.ToEntero
|
|
||||||
TipoMovimiento = If(Row("TipoMovto").ToString = "True", True, False)
|
|
||||||
importeMovimiento = 0
|
|
||||||
Multiplicador = (Row("Multiplicador").ToString.ToEntero)
|
|
||||||
Concepto = ObjMov.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, PagueseA, "", ObjIE.Folio)
|
|
||||||
|
|
||||||
Select Case ConceptoContable
|
|
||||||
|
|
||||||
Case 30
|
|
||||||
importeMovimiento = TxtImporte.Text.ToDecimal
|
|
||||||
importeMX = importeMovimiento
|
|
||||||
If tCveMoneda > 1 Then
|
|
||||||
'Agregamos complementaria
|
|
||||||
Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal
|
|
||||||
|
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Concepto, 204, Concepto, FechaMovimiento, IDCtaContableComplementaria, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=(importeMovimiento * TC - importeMovimiento).RoundSQL, ImporteME:=importeMovimiento, TipoCambio:=TC) Then
|
|
||||||
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Case 42
|
|
||||||
|
|
||||||
importeMovimiento = TxtImporte.Text.ToDecimal
|
|
||||||
importeMX = importeMovimiento
|
|
||||||
If tCveMoneda > 1 Then
|
|
||||||
importeMovimiento = TxtImporte.Text.ToDecimal * TxtTipoCambio.Text.ToDecimal
|
|
||||||
importeMX = importeMovimiento
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
Case 46
|
|
||||||
If TxtInteresMoratorio.Text.ToDecimal > 0 Then
|
|
||||||
importeMovimiento = TxtInteresMoratorio.Text.ToDecimal
|
|
||||||
importeMX = importeMovimiento
|
|
||||||
Else
|
|
||||||
importeMovimiento = 0
|
|
||||||
importeMX = 0
|
|
||||||
End If
|
|
||||||
Case 48
|
|
||||||
|
|
||||||
importeMovimiento = TxtImporte.Text.ToDecimal
|
|
||||||
importeMX = importeMovimiento
|
|
||||||
|
|
||||||
End Select
|
|
||||||
|
|
||||||
If importeMovimiento <> 0 Then
|
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, If(ConceptoContable = 30, IDCtaContable, IDCtaBeneficiario), -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=importeMovimiento, ImporteME:=tImporteMonedaExtranjera, TipoCambio:=TxtTipoCambio.Text.ToDecimal) Then
|
|
||||||
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
Next
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, Concepto, 30, Concepto, FechaMovimiento, If(ConceptoContable = 30, IDCtaContable, IDCtaBeneficiario), -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=importeMovimiento, ImporteME:=tImporteMonedaExtranjera, TipoCambio:=TxtTipoCambio.Text.ToDecimal, CveCredito:=CveCredito) Then
|
||||||
|
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
|
||||||
|
End If
|
||||||
|
|
||||||
|
If MsgError = "" AndAlso tCveMoneda > 1 Then
|
||||||
|
'Agregamos complementaria
|
||||||
|
Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal
|
||||||
|
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Concepto, 204, Concepto, FechaMovimiento, IDCtaContableComplementaria, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=(importeMovimiento * TC - importeMovimiento).RoundSQL, ImporteME:=importeMovimiento, TipoCambio:=TC, CveCredito:=CveCredito) Then
|
||||||
|
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
' Case 46
|
||||||
|
' If TxtInteresMoratorio.Text.ToDecimal > 0 Then
|
||||||
|
' importeMovimiento = TxtInteresMoratorio.Text.ToDecimal
|
||||||
|
' importeMX = importeMovimiento
|
||||||
|
' Else
|
||||||
|
' importeMovimiento = 0
|
||||||
|
' importeMX = 0
|
||||||
|
' End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Case Else
|
Case Else
|
||||||
Dim TipoMovimiento As Boolean = True
|
Dim TipoMovimiento As Boolean = True
|
||||||
|
|
||||||
@@ -3681,7 +3656,7 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
|
|
||||||
'MOVIMIENTOS EGRESOS
|
'MOVIMIENTOS EGRESOS
|
||||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtImporte.Text.ToDecimal, Ref, CveConceptoContable, Conc, Now, IDCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=Importe30, ImporteME:=tImporteMonedaExtranjera, CveIEDevolucion:=DDlCheques.SelectedValue.ToEntero) Then
|
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtImporte.Text.ToDecimal, Ref, CveConceptoContable, Conc, Now, IDCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=Importe30, ImporteME:=tImporteMonedaME, CveIEDevolucion:=DDlCheques.SelectedValue.ToEntero) Then
|
||||||
Dim IVA As Decimal = 0 ' TxtImporte.Text.ToDouble * HdnProvPorIVA.Value.ToDouble
|
Dim IVA As Decimal = 0 ' TxtImporte.Text.ToDouble * HdnProvPorIVA.Value.ToDouble
|
||||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, TxtImporte.Text.ToDecimal - IVA - CIF, Ref, CveConceptoCompra, Conc, Now, IDCtaBeneficiario, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=If(UsaComplementariaBancos, TxtImporte.Text.ToDecimal, tImporteMonedaExtranjera), ImporteME:=TxtImporte.Text.ToDecimal, CveIEDevolucion:=DdlIEAcreedor.SelectedValue.ToEntero) Then
|
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, TxtImporte.Text.ToDecimal - IVA - CIF, Ref, CveConceptoCompra, Conc, Now, IDCtaBeneficiario, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=If(UsaComplementariaBancos, TxtImporte.Text.ToDecimal, tImporteMonedaExtranjera), ImporteME:=TxtImporte.Text.ToDecimal, CveIEDevolucion:=DdlIEAcreedor.SelectedValue.ToEntero) Then
|
||||||
If IVA > 0 AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, IVA, Ref, 19, Conc, Now, IDCtaBeneficiario, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtImporte.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, CveIEDevolucion:=DDlCheques.SelectedValue.ToEntero) Then
|
If IVA > 0 AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, IVA, Ref, 19, Conc, Now, IDCtaBeneficiario, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtImporte.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, CveIEDevolucion:=DDlCheques.SelectedValue.ToEntero) Then
|
||||||
@@ -3702,12 +3677,12 @@ Partial Class Bancos_IE
|
|||||||
If tCveMoneda > 1 And UsaComplementariaBancos Then
|
If tCveMoneda > 1 And UsaComplementariaBancos Then
|
||||||
Dim ImporteAplicar As Decimal = TxtImporte.Text.ToDecimal
|
Dim ImporteAplicar As Decimal = TxtImporte.Text.ToDecimal
|
||||||
Dim ImporteAplicarMN = (ImporteAplicar * TxtTipoCambio.Text.ToDecimal - ImporteAplicar).RoundSQL()
|
Dim ImporteAplicarMN = (ImporteAplicar * TxtTipoCambio.Text.ToDecimal - ImporteAplicar).RoundSQL()
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteAplicar, Ref, 204, Conc, Now, IDCtaContableComplementaria, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicar, TipoCambio:=TxtTipoCambio.Text.ToDecimal) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteAplicar, Ref, 204, Conc, Now, IDCtaContableComplementaria, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=ImporteAplicarMN, ImporteME:=tImporteMonedaME, TipoCambio:=TxtTipoCambio.Text.ToDecimal) Then
|
||||||
MsgError = "Ocurrió un error al registrar el asiento de bancos complementaria de devolución"
|
MsgError = "Ocurrió un error al registrar el asiento de bancos complementaria de devolución"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveConceptoCompra = 10 Then
|
If CveConceptoCompra.Contiene(10, 338, 48, 345) Then
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteAplicar, Ref, 266, Conc, Now, IdCtaAnticipoComplementaria, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicar, TipoCambio:=TxtTipoCambio.Text.ToDecimal) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteAplicar, Ref, If(CveConceptoCompra = 10, 266, 340), Conc, Now, IdCtaAnticipoComplementaria, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicar, TipoCambio:=TxtTipoCambio.Text.ToDecimal) Then
|
||||||
MsgError = "Ocurrió un error al registrar el asiento de bancos complementaria de devolución"
|
MsgError = "Ocurrió un error al registrar el asiento de bancos complementaria de devolución"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -3873,8 +3848,12 @@ Partial Class Bancos_IE
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If IDPoliza > 0 Then
|
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||||
Msg.AppendFormat("<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza)
|
Msg.AppendFormat("<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}"">Ver Póliza</a>", CvePrePoliza)
|
||||||
|
Else
|
||||||
|
If IDPoliza > 0 Then
|
||||||
|
Msg.AppendFormat("<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'AUTO DESCARGAR PDF PARA COMPU
|
'AUTO DESCARGAR PDF PARA COMPU
|
||||||
@@ -3888,7 +3867,7 @@ Partial Class Bancos_IE
|
|||||||
Else
|
Else
|
||||||
ObjIE.RollBack()
|
ObjIE.RollBack()
|
||||||
Alert(MsgError, TipoMensaje.MsgAdvertencia)
|
Alert(MsgError, TipoMensaje.MsgAdvertencia)
|
||||||
If Opcion = "INGPC" Then
|
If Opcion.Contiene("INGPC", "EGSCREDITO") Then
|
||||||
CveIE = -1
|
CveIE = -1
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-2">Tipo Mov:</label>
|
<label class="col-md-2">Tipo Mov:</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<asp:DropDownList ID="DdlTipoTransaccion" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" Width="156px" ValidationGroup="GrpGuardar">
|
<asp:DropDownList ID="DdlTipoTransaccion" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" Width="250px" ValidationGroup="GrpGuardar">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<asp:HiddenField ID="HdnTipoTransaccion" runat="server" Value="" />
|
<asp:HiddenField ID="HdnTipoTransaccion" runat="server" Value="" />
|
||||||
</div>
|
</div>
|
||||||
@@ -213,7 +213,7 @@
|
|||||||
</table>--%>
|
</table>--%>
|
||||||
<br />
|
<br />
|
||||||
<div style="width: 100%; min-height: 200px; overflow-scrolling: auto;">
|
<div style="width: 100%; min-height: 200px; overflow-scrolling: auto;">
|
||||||
<asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" DataKeyNames="IdMov,IDCuenta,Cargo,Abono,TipoMovto,CveConcepto,CveProveedor,CveSubProyecto,CvePersonal" ShowHeaderWhenEmpty="true" Width="100%" CssClass="table table-striped table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
<asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" DataKeyNames="IdMov,IDCuenta,Cargo,Abono,TipoMovto,CveConcepto,CveProveedor,CveSubProyecto,CvePersonal,CveCuenta" ShowHeaderWhenEmpty="true" Width="100%" CssClass="table table-striped table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>Código</HeaderTemplate>
|
<HeaderTemplate>Código</HeaderTemplate>
|
||||||
|
|||||||
@@ -155,6 +155,7 @@ Partial Class Bancos_PolizaCheque
|
|||||||
Dim IDMov As DataColumn = DtMovimientos.Columns.Add("IdMov", Type.GetType("System.Int32")) : IDMov.AutoIncrement = True
|
Dim IDMov As DataColumn = DtMovimientos.Columns.Add("IdMov", Type.GetType("System.Int32")) : IDMov.AutoIncrement = True
|
||||||
With DtMovimientos.Columns
|
With DtMovimientos.Columns
|
||||||
.Add("IdCuenta", Type.GetType("System.Int32"))
|
.Add("IdCuenta", Type.GetType("System.Int32"))
|
||||||
|
.Add("CveCuenta", Type.GetType("System.Int32"))
|
||||||
.Add("CodigoCuenta", Type.GetType("System.String"))
|
.Add("CodigoCuenta", Type.GetType("System.String"))
|
||||||
.Add("Cuenta", Type.GetType("System.String"))
|
.Add("Cuenta", Type.GetType("System.String"))
|
||||||
.Add("Referencia", Type.GetType("System.String"))
|
.Add("Referencia", Type.GetType("System.String"))
|
||||||
@@ -401,6 +402,7 @@ Partial Class Bancos_PolizaCheque
|
|||||||
Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(UsuarioActual.CveEmpresa, CvePlantilla).FiltraParametros("", "Orden")
|
Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(UsuarioActual.CveEmpresa, CvePlantilla).FiltraParametros("", "Orden")
|
||||||
Dim Cuenta As String = ""
|
Dim Cuenta As String = ""
|
||||||
Dim IdCuenta As Integer = 0
|
Dim IdCuenta As Integer = 0
|
||||||
|
Dim CveCuenta As Integer = 0
|
||||||
Dim CodigoCuenta As String = ""
|
Dim CodigoCuenta As String = ""
|
||||||
Dim NombreCuenta As String = ""
|
Dim NombreCuenta As String = ""
|
||||||
Dim EsComodin As Integer = 0
|
Dim EsComodin As Integer = 0
|
||||||
@@ -412,6 +414,7 @@ Partial Class Bancos_PolizaCheque
|
|||||||
|
|
||||||
Cuenta = drt("ConceptoContable").ToString
|
Cuenta = drt("ConceptoContable").ToString
|
||||||
IdCuenta = 0
|
IdCuenta = 0
|
||||||
|
CveCuenta = 0
|
||||||
CodigoCuenta = ""
|
CodigoCuenta = ""
|
||||||
NombreCuenta = ""
|
NombreCuenta = ""
|
||||||
|
|
||||||
@@ -420,7 +423,7 @@ Partial Class Bancos_PolizaCheque
|
|||||||
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("CveCuenta={0}", drt("CveCuenta").ToString))
|
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("CveCuenta={0}", drt("CveCuenta").ToString))
|
||||||
|
|
||||||
If drr IsNot Nothing Then
|
If drr IsNot Nothing Then
|
||||||
IdCuenta = drt("IdCtaContable").ToString.ToEntero
|
CveCuenta = drt("CveCuenta").ToString.ToEntero
|
||||||
CodigoCuenta = drr("CuentaFormato").ToString()
|
CodigoCuenta = drr("CuentaFormato").ToString()
|
||||||
NombreCuenta = drr("Nombre").ToString()
|
NombreCuenta = drr("Nombre").ToString()
|
||||||
'Cuenta = drr("Nombre").ToString()
|
'Cuenta = drr("Nombre").ToString()
|
||||||
@@ -469,7 +472,8 @@ Partial Class Bancos_PolizaCheque
|
|||||||
|
|
||||||
|
|
||||||
Dim dr As DataRow = DtMovimientos.NewRow
|
Dim dr As DataRow = DtMovimientos.NewRow
|
||||||
dr("IdCuenta") = IdCuenta
|
dr("IdCuenta") = IdCuenta
|
||||||
|
dr("CveCuenta") = CveCuenta
|
||||||
dr("CodigoCuenta") = CodigoCuenta & "<br>" & NombreCuenta
|
dr("CodigoCuenta") = CodigoCuenta & "<br>" & NombreCuenta
|
||||||
dr("Cuenta") = Cuenta 'TxtCuentaContable.Text
|
dr("Cuenta") = Cuenta 'TxtCuentaContable.Text
|
||||||
dr("RazonSocial") = drt("RazonSocial")
|
dr("RazonSocial") = drt("RazonSocial")
|
||||||
@@ -566,24 +570,8 @@ Partial Class Bancos_PolizaCheque
|
|||||||
dr("CvePersonal") = drt("CvePersonal")
|
dr("CvePersonal") = drt("CvePersonal")
|
||||||
|
|
||||||
DtMovimientos.Rows.Add(dr)
|
DtMovimientos.Rows.Add(dr)
|
||||||
Next
|
Next
|
||||||
'Dim drtt As DataRow = DtMovimientos.NewRow
|
|
||||||
'drtt("IdCuenta") = 0
|
|
||||||
'drtt("CodigoCuenta") = ""
|
|
||||||
'drtt("Cuenta") = Cuenta
|
|
||||||
'drtt("RazonSocial") = ""
|
|
||||||
'drtt("Concepto") = ""
|
|
||||||
'drtt("TipoMovto") = 0
|
|
||||||
'drtt("EsComodin") = EsComodin
|
|
||||||
'drtt("CveConcepto") = 44
|
|
||||||
'drtt("CveProveedor") = "-1"
|
|
||||||
'drtt("SubProyecto") = ""
|
|
||||||
'drtt("Proyecto") = ""
|
|
||||||
'drtt("Personal") = ""
|
|
||||||
'drtt("CveSubProyecto") = -1
|
|
||||||
'drtt("CvePersonal") = -1
|
|
||||||
'DtMovimientos.Rows.Add(drtt)
|
|
||||||
|
|
||||||
ObjNomina.Dispose()
|
ObjNomina.Dispose()
|
||||||
ObjConta.Dispose()
|
ObjConta.Dispose()
|
||||||
|
|
||||||
@@ -809,20 +797,8 @@ Partial Class Bancos_PolizaCheque
|
|||||||
If UsuarioActual.CveEmpresa = 119 Then
|
If UsuarioActual.CveEmpresa = 119 Then
|
||||||
e.Row.FCLiteral("LtlSP").Visible = False
|
e.Row.FCLiteral("LtlSP").Visible = False
|
||||||
e.Row.FCDropDownList("DdlSubProyecto").Visible = True
|
e.Row.FCDropDownList("DdlSubProyecto").Visible = True
|
||||||
End If
|
End If
|
||||||
'cuando se modifica el importe de la cuenta bancaria que se actualice el importe del documento
|
|
||||||
'If e.Row.DBCampo("EsComodin") = "1" Then
|
|
||||||
' If e.Row.DBCampo("TipoMovto") = "1" Then
|
|
||||||
' e.Row.FCTextBox("TxtAbono").Attributes.Add("onkeyup", "FncImporte('TxtImporte',this.id,2)")
|
|
||||||
' e.Row.FCTextBox("TxtAbono").Text = TxtImporte.Text
|
|
||||||
' Else
|
|
||||||
' e.Row.FCTextBox("TxtCargo").Attributes.Add("onkeyup", "FncImporte('TxtImporte',this.id,2)")
|
|
||||||
' e.Row.FCTextBox("TxtCargo").Text = TxtImporte.Text
|
|
||||||
' End If
|
|
||||||
' TxtImporte.Attributes.Add("onkeyup", String.Format("FncImporte(this.id,'{0}',1)", e.Row.FCTextBox(If(e.Row.DBCampo("TipoMovto") = "1", "TxtAbono", "TxtCargo")).ClientID))
|
|
||||||
|
|
||||||
' UPPImporte.Update()
|
|
||||||
'End If
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -966,7 +942,7 @@ Partial Class Bancos_PolizaCheque
|
|||||||
Importe = Importe * TC
|
Importe = Importe * TC
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, Referencia, gvr.DataKey("CveConcepto").ToEntero, TxtObservaciones.Text, Now, gvr.DataKey("IDCuenta").ToEntero, -1, CveIE, CveProveedor:=CveProveedor, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, ImporteMX:=Importe, TipoCambio:=TC) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, Referencia, gvr.DataKey("CveConcepto").ToEntero, TxtObservaciones.Text, Now, gvr.DataKey("IDCuenta").ToEntero, -1, CveIE, CveProveedor:=CveProveedor, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, ImporteMX:=Importe, TipoCambio:=TC, CveCuenta:=gvr.DataKey("CveCuenta").ToEntero) Then
|
||||||
MsgError = "no se pudo insertar el detalle de la póliza2"
|
MsgError = "no se pudo insertar el detalle de la póliza2"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -1009,12 +985,6 @@ Partial Class Bancos_PolizaCheque
|
|||||||
MsgError = "No se insertó el encabezado"
|
MsgError = "No se insertó el encabezado"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If ChkContabilizar.Checked AndAlso UsuarioActual.Empresa.UsaContabilidad Then
|
|
||||||
' If Not ObjIE.UpdateIEPrePoliza(TxtFechaDocumento.Text.ToDate, NumPoliza.ToString, IDPoliza, CvePrePoliza, CveIE, 0) Then
|
|
||||||
' MsgError = "Error al actualizar la poliza"
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgError = "Error"
|
MsgError = "Error"
|
||||||
End Try
|
End Try
|
||||||
@@ -1030,20 +1000,17 @@ Partial Class Bancos_PolizaCheque
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'El movimiento 2 es el de Pago
|
'El movimiento 2 es el de Pago
|
||||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" Then
|
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" Then
|
||||||
If idCuentaContabilizacion > 0 Then
|
|
||||||
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||||
'Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion)
|
'Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion)
|
||||||
IDPoliza = ObjMov.ContaIdPoliza
|
IDPoliza = ObjMov.ContaIdPoliza
|
||||||
Else
|
|
||||||
MsgError = "Error al contabilizar"
|
|
||||||
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
|
|
||||||
End If
|
|
||||||
Else
|
Else
|
||||||
Alert("No se puede contabilizar la Prepoliza debido a que una o mas cuentas son inválidas", TipoMensaje.MsgError)
|
MsgError = "Error al contabilizar"
|
||||||
|
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -1067,7 +1034,15 @@ Partial Class Bancos_PolizaCheque
|
|||||||
TxtImporte.Text = ""
|
TxtImporte.Text = ""
|
||||||
TxtPagueseA.Text = ""
|
TxtPagueseA.Text = ""
|
||||||
TxtObservaciones.Text = ""
|
TxtObservaciones.Text = ""
|
||||||
Alert($"El Movimiento se guardo correctamente <br><br> <a href=""/Bancos/IE.aspx?CveIE={CveIE}"" target=""_blank"">Movimiento</a><br/><a href=""/Contabilidad/RegPoliza.aspx?IdPoliza={ObjMov.ContaIdPoliza}"" target=""_blank"">{If(ObjMov.ContaIdPoliza > 0, "Ver Póliza", "")}</a>", TipoMensaje.MsgInformacion, "window.location.reload();")
|
Dim StrMsg As New StringBuilder
|
||||||
|
StrMsg.AppendFormat("El Movimiento se guardo correctamente <br><br> <a href=""/Bancos/IE.aspx?CveIE={0}"" target=""_blank"" class='Texto'>Movimiento</a><br/>", CveIE)
|
||||||
|
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||||
|
StrMsg.AppendFormat("<br/><a href=""/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}"" target=""_blank"" class='Texto'> Ver Póliza</a>", CvePrePoliza)
|
||||||
|
Else
|
||||||
|
StrMsg.AppendFormat("<br/><a href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"" target=""_blank"" class='Texto'> Ver Póliza</a>", ObjMov.ContaIdPoliza)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Alert(StrMsg.ToString, TipoMensaje.MsgInformacion, "window.location.reload();")
|
||||||
Else
|
Else
|
||||||
Alert(MsgError.ToString, TipoMensaje.MsgError)
|
Alert(MsgError.ToString, TipoMensaje.MsgError)
|
||||||
ObjIE.RollBack()
|
ObjIE.RollBack()
|
||||||
@@ -1090,8 +1065,6 @@ Partial Class Bancos_PolizaCheque
|
|||||||
Alert("La suma de los movimientos no son iguales", TipoMensaje.MsgAdvertencia)
|
Alert("La suma de los movimientos no son iguales", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
'' -------------------------------------- codigo para generar la poliza del cheque
|
'' -------------------------------------- codigo para generar la poliza del cheque
|
||||||
|
|
||||||
|
|||||||
@@ -1402,11 +1402,15 @@ Partial Class Bancos_PopIECompras
|
|||||||
'Tipos de cambio
|
'Tipos de cambio
|
||||||
If Pago.CveMonedaPago = 1 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos
|
If Pago.CveMonedaPago = 1 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos
|
||||||
Pago.TCPago = TxtTipoCambio.Text.ToDecimal
|
Pago.TCPago = TxtTipoCambio.Text.ToDecimal
|
||||||
|
Pago.TCCambioMoneda = 1 / TxtTipoCambio.Text.ToDecimal
|
||||||
ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES
|
ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES
|
||||||
Pago.TCPago = TxtTipoCambio.Text.ToDecimal
|
Pago.TCPago = TxtTipoCambio.Text.ToDecimal
|
||||||
ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
||||||
Pago.TCPago = TxtTipoCambio.Text.ToDecimal
|
Pago.TCPago = TxtTipoCambio.Text.ToDecimal
|
||||||
|
Pago.TCCambioMoneda = TxtTipoCambio.Text.ToDecimal
|
||||||
End If
|
End If
|
||||||
|
If ChkPagarPesos.Checked Then Pago.TCCambioMoneda = 1 / TxtTipoCambio.Text.ToDecimal
|
||||||
|
If ChkPagarDolares.Checked Then Pago.TCCambioMoneda = TxtTipoCambio.Text.ToDecimal
|
||||||
|
|
||||||
If TxtComision.Text.ToDecimal <> 0 Then Pago.OtroGastoIngreso = TxtComision.Text.ToDecimal Else Pago.OtroGastoIngreso = 0
|
If TxtComision.Text.ToDecimal <> 0 Then Pago.OtroGastoIngreso = TxtComision.Text.ToDecimal Else Pago.OtroGastoIngreso = 0
|
||||||
|
|
||||||
@@ -1416,6 +1420,7 @@ Partial Class Bancos_PopIECompras
|
|||||||
If Not CveIE > 0 Then
|
If Not CveIE > 0 Then
|
||||||
MsgError = "Ocurrio un Error al registrarse el movimiento bancario."
|
MsgError = "Ocurrio un Error al registrarse el movimiento bancario."
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Importe de pago
|
'Importe de pago
|
||||||
Pago.ImportePago = ImportePagado
|
Pago.ImportePago = ImportePagado
|
||||||
Pago.CveIE = CveIE
|
Pago.CveIE = CveIE
|
||||||
@@ -1473,8 +1478,6 @@ Partial Class Bancos_PopIECompras
|
|||||||
Alert("No se encontro movimientos bancarios de personal", TipoMensaje.MsgAdvertencia)
|
Alert("No se encontro movimientos bancarios de personal", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim saldo As Decimal = DtCheques.Rows(DDlCheques.SelectedIndex)("Saldo").ToString.ToDecimal
|
Dim saldo As Decimal = DtCheques.Rows(DDlCheques.SelectedIndex)("Saldo").ToString.ToDecimal
|
||||||
|
|
||||||
If TxtImporte.Text.ToDecimal > saldo Then
|
If TxtImporte.Text.ToDecimal > saldo Then
|
||||||
@@ -1503,6 +1506,8 @@ Partial Class Bancos_PopIECompras
|
|||||||
Pago.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero
|
Pago.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero
|
||||||
Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
|
Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
|
||||||
Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal
|
Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal
|
||||||
|
If ChkPagarPesos.Checked Then Pago.TCCambioMoneda = 1 / rw.DataKey("TipoCambio").ToDecimal
|
||||||
|
If ChkPagarDolares.Checked Then Pago.TCCambioMoneda = rw.DataKey("TipoCambio").ToDecimal
|
||||||
|
|
||||||
If AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjMov) Then
|
If AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjMov) Then
|
||||||
MsgError = "No se pudo insertar la póliza"
|
MsgError = "No se pudo insertar la póliza"
|
||||||
@@ -1542,14 +1547,18 @@ Partial Class Bancos_PopIECompras
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
For Each rw As GridViewRow In GvDeudores.Rows
|
For Each rw As GridViewRow In GvAcreedores.Rows
|
||||||
If rw.FCCheckBox("Chk").Checked AndAlso rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal <> 0 Then
|
If rw.FCCheckBox("Chk").Checked AndAlso rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal <> 0 Then
|
||||||
|
Dim TCC As Decimal = 1
|
||||||
|
Pago = New CompraPago
|
||||||
|
If ChkPagarPesos.Checked Then Pago.TCCambioMoneda = 1 / TxtTipoCambio.Text.ToDecimal
|
||||||
|
If ChkPagarDolares.Checked Then Pago.TCCambioMoneda = TxtTipoCambio.Text.ToDecimal
|
||||||
Pago.CveIE = rw.DataKey("CveIE").ToEntero
|
Pago.CveIE = rw.DataKey("CveIE").ToEntero
|
||||||
Pago.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero
|
Pago.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero
|
||||||
Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
|
Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
|
||||||
Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal
|
Pago.TCPago = TxtTipoCambio.Text.ToDecimal
|
||||||
Pago.CveProveedor = DdlDeudor.SelectedValue.ToEntero
|
Pago.CveProveedor = DdlAcreedor.SelectedValue.ToEntero
|
||||||
Pago.TipoPago = "DD"
|
Pago.TipoPago = "Egsc"
|
||||||
If AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjMov) Then
|
If AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjMov) Then
|
||||||
MsgError = "No se pudo insertar la póliza"
|
MsgError = "No se pudo insertar la póliza"
|
||||||
Else
|
Else
|
||||||
@@ -1624,9 +1633,14 @@ Partial Class Bancos_PopIECompras
|
|||||||
If ObjConta IsNot Nothing Then ObjConta.Commit()
|
If ObjConta IsNot Nothing Then ObjConta.Commit()
|
||||||
Dim StrMsg As New StringBuilder
|
Dim StrMsg As New StringBuilder
|
||||||
StrMsg.Append("El Documento se guardó correctamente.<br/>")
|
StrMsg.Append("El Documento se guardó correctamente.<br/>")
|
||||||
If TipoTransaccion = "Egs" AndAlso CveIE > 0 Then GeneraChequePDF(CveIE, UsuarioActual.Empresa)
|
If TipoTransaccion = "Egs" AndAlso CveIE > 0 Then GeneraChequePDF(CveIE, UsuarioActual.Empresa)
|
||||||
If IdPoliza > 0 AndAlso UsuarioActual.Empresa.TipoContabilidad = 2 Then StrMsg.AppendFormat("<br/><a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IdPoliza)
|
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||||
|
StrMsg.AppendFormat("<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}"">Ver Póliza</a>", CvePrePoliza)
|
||||||
|
Else
|
||||||
|
If IdPoliza > 0 Then
|
||||||
|
StrMsg.AppendFormat("<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IdPoliza)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
If RBLContado.SelectedValue.ToEntero = 6 And ChkEmitirComplementoPago.Checked Then GeneraTimbre(CvePrePoliza) Else Alert(StrMsg.ToString, TipoMensaje.MsgInformacion, "self.parent.tb_remove();self.parent.location.reload();")
|
If RBLContado.SelectedValue.ToEntero = 6 And ChkEmitirComplementoPago.Checked Then GeneraTimbre(CvePrePoliza) Else Alert(StrMsg.ToString, TipoMensaje.MsgInformacion, "self.parent.tb_remove();self.parent.location.reload();")
|
||||||
|
|
||||||
EnviarCorreoNotificacion(CveIE, NotificarA, "", UsuarioActual, False)
|
EnviarCorreoNotificacion(CveIE, NotificarA, "", UsuarioActual, False)
|
||||||
|
|||||||
@@ -3402,17 +3402,14 @@ Partial Class Bancos_PopIEVentas
|
|||||||
|
|
||||||
'Conta ContPAQ
|
'Conta ContPAQ
|
||||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" Then
|
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" Then
|
||||||
If idCuentaContabilizacion > 0 Then
|
|
||||||
|
|
||||||
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||||
IdPoliza = ObjMov.ContaIdPoliza
|
IdPoliza = ObjMov.ContaIdPoliza
|
||||||
' Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion)
|
' Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion)
|
||||||
Else
|
|
||||||
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico")
|
|
||||||
End If
|
|
||||||
Else
|
Else
|
||||||
Alert(String.Format("No se puede contabilizar la Prepoliza debido a que las siguientes cuentas son invalidas: {0}", CuentasContablesInvalidas))
|
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -3461,11 +3458,12 @@ Partial Class Bancos_PopIEVentas
|
|||||||
If IdPoliza > 0 Then
|
If IdPoliza > 0 Then
|
||||||
StrMsg.AppendFormat("<br/><a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IdPoliza)
|
StrMsg.AppendFormat("<br/><a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IdPoliza)
|
||||||
End If
|
End If
|
||||||
|
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||||
|
StrMsg.AppendFormat("</br> <br/>Póliza: <b> <a href='/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}' class='Texto' target='_blank'>{1}</a><br/>", CvePrePoliza, ObjMov.ContaFolio)
|
||||||
|
End If
|
||||||
|
|
||||||
Alert($"{StrMsg.ToString}<br/>", TipoMensaje.MsgInformacion, "self.parent.tb_remove();self.parent.location.reload();")
|
Alert($"{StrMsg.ToString}<br/>", TipoMensaje.MsgInformacion, "self.parent.tb_remove();self.parent.location.reload();")
|
||||||
|
|
||||||
'Limpiar
|
|
||||||
'LimpiarTodo()
|
|
||||||
Else
|
Else
|
||||||
ObjIE.RollBack()
|
ObjIE.RollBack()
|
||||||
Alert(MsgError, TipoMensaje.MsgError)
|
Alert(MsgError, TipoMensaje.MsgError)
|
||||||
|
|||||||
@@ -453,12 +453,21 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
|||||||
// Msg.AppendFormat(@"<br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">{1}</a> ", Encripta(String.Format("OP=IECHEQUE&CVEIE={0}", CveIE)), String.Format("Imprimir {0}", DdlTipoTransaccion.SelectedItem));
|
// Msg.AppendFormat(@"<br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">{1}</a> ", Encripta(String.Format("OP=IECHEQUE&CVEIE={0}", CveIE)), String.Format("Imprimir {0}", DdlTipoTransaccion.SelectedItem));
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
ObjIE.Commit();
|
||||||
|
|
||||||
|
if (UsuarioActual.Empresa.TipoContabilidad == 1)
|
||||||
|
{
|
||||||
|
Msg.AppendFormat(@"<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}"">Ver Póliza</a>", CvePrePoliza);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (IDPoliza > 0)
|
||||||
|
{
|
||||||
|
Msg.AppendFormat(@"<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (IDPoliza > 0)
|
|
||||||
{
|
|
||||||
Msg.AppendFormat(@"<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza);
|
|
||||||
}
|
|
||||||
ObjIE.Commit();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -757,10 +766,17 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
|||||||
archivo = new System.IO.FileInfo(String.Format("{0}Formatos/ComprobanteEgreso.rdlc", UsuarioActual.Empresa.Ruta, DdlCuentaPrestamo.SelectedValue.ToEntero()));
|
archivo = new System.IO.FileInfo(String.Format("{0}Formatos/ComprobanteEgreso.rdlc", UsuarioActual.Empresa.Ruta, DdlCuentaPrestamo.SelectedValue.ToEntero()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IDPoliza > 0)
|
if (UsuarioActual.Empresa.TipoContabilidad == 1)
|
||||||
{
|
{
|
||||||
Msg.AppendFormat(@"<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza);
|
Msg.AppendFormat(@"<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}"">Ver Póliza</a>", CvePrePoliza);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (IDPoliza > 0)
|
||||||
|
{
|
||||||
|
Msg.AppendFormat(@"<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1101,7 +1101,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
Msg.AppendFormat("<li> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir movimiento</a></li> ", Encripta(String.Format("OP=IECHEQUE&CVEIE={0}", CveIE)))
|
Msg.AppendFormat("<li> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir movimiento</a></li> ", Encripta(String.Format("OP=IECHEQUE&CVEIE={0}", CveIE)))
|
||||||
'End If
|
'End If
|
||||||
Msg.AppendFormat("<li><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Listado</a></li>", Encripta(String.Format("OP=ImprimeMov&CveIE={0}", CveIE)))
|
Msg.AppendFormat("<li><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Listado</a></li>", Encripta(String.Format("OP=ImprimeMov&CveIE={0}", CveIE)))
|
||||||
If IDPoliza > 0 Then Msg.AppendFormat("<li><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Póliza</a></li>", IDPoliza)
|
If IDPoliza > 0 AndAlso UsuarioActual.Empresa.TipoContabilidad = 2 Then Msg.AppendFormat("<li><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Póliza</a></li>", IDPoliza)
|
||||||
|
|
||||||
Dim Mensaje As String = String.Format("<br />El Documento se generó correctamente.<br /><br /><br />Descargas:<ul>{0}</ul>", Msg.ToString)
|
Dim Mensaje As String = String.Format("<br />El Documento se generó correctamente.<br /><br /><br />Descargas:<ul>{0}</ul>", Msg.ToString)
|
||||||
|
|
||||||
|
|||||||
@@ -5897,15 +5897,16 @@
|
|||||||
txtvalue = ToDouble(txtvalue * TCAnticipo);
|
txtvalue = ToDouble(txtvalue * TCAnticipo);
|
||||||
importevalue = ToDouble(importevalue * TCAnticipo);
|
importevalue = ToDouble(importevalue * TCAnticipo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else { TCC = 1; }
|
||||||
var DifSaldo = (TotalSaldoCompra - FnSumaValoresAnt()).toFixed(2); // le agrego lo del valor actual para validarlo
|
var DifSaldo = (TotalSaldoCompra - FnSumaValoresAnt()).toFixed(2); // le agrego lo del valor actual para validarlo
|
||||||
|
|
||||||
if (t.checked)
|
if (t.checked)
|
||||||
{
|
{
|
||||||
if (DifSaldo > importevalue) {
|
if (DifSaldo > importevalue) {
|
||||||
txt.value = ToDouble(importevalue*TCC).toFixed(2);
|
txt.value = toFixed(ToDouble(importevalue*TCC),2);
|
||||||
} else {
|
} else {
|
||||||
txt.value = ToDouble(DifSaldo*TCC).toFixed(2);
|
txt.value = toFixed(ToDouble(DifSaldo*TCC),2);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
txt.value = "";
|
txt.value = "";
|
||||||
@@ -5914,7 +5915,7 @@
|
|||||||
$("#LblTotalAnticipos").text(FormatoNumero(FnSumaValoresAnt(), 2));
|
$("#LblTotalAnticipos").text(FormatoNumero(FnSumaValoresAnt(), 2));
|
||||||
$("#LblAplicadoCompraAnt").text(FormatoNumero(FnSumaValoresAnt(), 2));
|
$("#LblAplicadoCompraAnt").text(FormatoNumero(FnSumaValoresAnt(), 2));
|
||||||
$("#LblAplicadoCompraAntComision").text(FormatoNumero(FnSumaValoresAntComisiones(), 2));
|
$("#LblAplicadoCompraAntComision").text(FormatoNumero(FnSumaValoresAntComisiones(), 2));
|
||||||
$("#LblSaldoFactura").text(FormatoNumero(TotalSaldo - FnSumaValoresAnt(), 2));
|
$("#LblSaldoFactura").text(FormatoNumero(TotalSaldoCompra - FnSumaValoresAnt(), 2));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -5948,7 +5949,7 @@
|
|||||||
txtvalue = ToDouble(txtvalue * TCAnticipo);
|
txtvalue = ToDouble(txtvalue * TCAnticipo);
|
||||||
}
|
}
|
||||||
|
|
||||||
var SaldoCompra = (TotalSaldo - FnSumaValoresAnt() + ToDouble(txtvalue)).toFixed(2); // le agrego lo del valor actual para validarlo //parseFloat(parseFloat($get('HdnCompraSaldo').value).toFixed(2));
|
var SaldoCompra = toFixed(TotalSaldo - FnSumaValoresAnt() + ToDouble(txtvalue),2); // le agrego lo del valor actual para validarlo //parseFloat(parseFloat($get('HdnCompraSaldo').value).toFixed(2));
|
||||||
|
|
||||||
if (SaldoCompra < 0) txt.value = SaldoCompra - txtvalue;
|
if (SaldoCompra < 0) txt.value = SaldoCompra - txtvalue;
|
||||||
//minimo entre saldocompra y el saldoanticipo
|
//minimo entre saldocompra y el saldoanticipo
|
||||||
@@ -5971,6 +5972,11 @@
|
|||||||
$("#LblSaldoFactura").text(FormatoNumero(TotalSaldo - FnSumaValoresAnt(), 2));
|
$("#LblSaldoFactura").text(FormatoNumero(TotalSaldo - FnSumaValoresAnt(), 2));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//funcion para truncar en lugar de redondear
|
||||||
|
function toFixed(num, fixed) {
|
||||||
|
var re = new RegExp('^-?\\d+(?:\.\\d{0,' + (fixed || -1) + '})?');
|
||||||
|
return num.toString().match(re)[0];
|
||||||
|
}
|
||||||
|
|
||||||
function FnSumaValoresAnt() {
|
function FnSumaValoresAnt() {
|
||||||
var totalPoints = 0;
|
var totalPoints = 0;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -29,6 +29,9 @@ Partial Class Contabilidad_CatCuentas
|
|||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
'inicio()
|
'inicio()
|
||||||
'RegistraScript("$('#Tsubcuenta').mask('00000-0000-0000-00000');")
|
'RegistraScript("$('#Tsubcuenta').mask('00000-0000-0000-00000');")
|
||||||
|
If UsuarioActual.Empresa.TipoContabilidad = 1 OrElse UsuarioActual.CveEmpresa = 119 Then
|
||||||
|
Server.Transfer("/Contabilidad2/CatCuentas.aspx")
|
||||||
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||||
CargaMonedas()
|
CargaMonedas()
|
||||||
|
|||||||
@@ -192,7 +192,7 @@
|
|||||||
<asp:LinkButton ID="LnkSimplificar" runat="server" OnClick="LnkSimplificarCompra_Click" ToolTip="Simplificar Póliza"><i class='fa fa-exchange'></i></asp:LinkButton>
|
<asp:LinkButton ID="LnkSimplificar" runat="server" OnClick="LnkSimplificarCompra_Click" ToolTip="Simplificar Póliza"><i class='fa fa-exchange'></i></asp:LinkButton>
|
||||||
</td>
|
</td>
|
||||||
<td style="width: 70px; text-align: left;">
|
<td style="width: 70px; text-align: left;">
|
||||||
<asp:HyperLink ID="HLPoliza" runat="server" Target="_blank" Visible="false" CssClass="Texto" Text="Ver Poliza" NavigateUrl='<%# Eval("IdPoliza", "/Contabilidad/RegPoliza.aspx?IdPoliza={0}")%>'></asp:HyperLink>
|
<asp:HyperLink ID="HLPoliza" runat="server" Target="_blank" CssClass="Texto" Text="Ver Poliza" ></asp:HyperLink>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="color: black;">
|
<tr style="color: black;">
|
||||||
@@ -296,7 +296,7 @@
|
|||||||
<asp:LinkButton ID="LnkSimplificar" runat="server" OnClick="LnkSimplificar_Click" ToolTip="Simplificar Póliza"><i class='fa fa-exchange'></i></asp:LinkButton>
|
<asp:LinkButton ID="LnkSimplificar" runat="server" OnClick="LnkSimplificar_Click" ToolTip="Simplificar Póliza"><i class='fa fa-exchange'></i></asp:LinkButton>
|
||||||
</td>
|
</td>
|
||||||
<td style="width: 70px; text-align: left;">
|
<td style="width: 70px; text-align: left;">
|
||||||
<asp:HyperLink ID="HLPoliza" runat="server" Target="_blank" Visible="false" CssClass="Texto" Text="Ver Poliza" NavigateUrl='<%# Eval("IdPoliza", "/Contabilidad/RegPoliza.aspx?IdPoliza={0}")%>'></asp:HyperLink>
|
<asp:HyperLink ID="HLPoliza" runat="server" Target="_blank" CssClass="Texto" Text="Ver Poliza"></asp:HyperLink>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="color: black; display:none;">
|
<tr style="color: black; display:none;">
|
||||||
@@ -386,7 +386,7 @@
|
|||||||
<asp:HyperLink ID="HplEdicion" runat="server" Target="_blank" CssClass="Texto" Visible="false" Text="Editar" NavigateUrl='<%# Eval("CvePrePoliza", "/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}")%>'></asp:HyperLink>
|
<asp:HyperLink ID="HplEdicion" runat="server" Target="_blank" CssClass="Texto" Visible="false" Text="Editar" NavigateUrl='<%# Eval("CvePrePoliza", "/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}")%>'></asp:HyperLink>
|
||||||
</td>
|
</td>
|
||||||
<td style="width: 70px; text-align: left;">
|
<td style="width: 70px; text-align: left;">
|
||||||
<asp:HyperLink ID="HLPoliza" runat="server" Target="_blank" Visible="false" CssClass="Texto" Text="Ver Poliza" NavigateUrl='<%# Eval("IdPoliza", "/Contabilidad/RegPoliza.aspx?IdPoliza={0}")%>'></asp:HyperLink>
|
<asp:HyperLink ID="HLPoliza" runat="server" Target="_blank" CssClass="Texto" Text="Ver Poliza" ></asp:HyperLink>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="color: black;display:none;">
|
<tr style="color: black;display:none;">
|
||||||
@@ -476,7 +476,7 @@
|
|||||||
<asp:HyperLink ID="HplEdicion" runat="server" Target="_blank" CssClass="Texto" Visible="false" Text="Editar" NavigateUrl='<%# Eval("CvePrePoliza", "/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}")%>'></asp:HyperLink>
|
<asp:HyperLink ID="HplEdicion" runat="server" Target="_blank" CssClass="Texto" Visible="false" Text="Editar" NavigateUrl='<%# Eval("CvePrePoliza", "/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}")%>'></asp:HyperLink>
|
||||||
</td>
|
</td>
|
||||||
<td style="width: 70px; text-align: left;">
|
<td style="width: 70px; text-align: left;">
|
||||||
<asp:HyperLink ID="HLPoliza" runat="server" Target="_blank" Visible="false" CssClass="Texto" Text="Ver Poliza" NavigateUrl='<%# Eval("IdPoliza", "/Contabilidad/RegPoliza.aspx?IdPoliza={0}")%>'></asp:HyperLink>
|
<asp:HyperLink ID="HLPoliza" runat="server" Target="_blank" CssClass="Texto" Text="Ver Poliza" ></asp:HyperLink>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="color: black;">
|
<tr style="color: black;">
|
||||||
|
|||||||
@@ -128,7 +128,6 @@ public partial class Contabilidad_ContabilizacionCompras : ClsPaginas
|
|||||||
e.Row.FCCheckBox("Chk").Enabled = false;
|
e.Row.FCCheckBox("Chk").Enabled = false;
|
||||||
e.Row.FCCheckBox("Chk").ToolTip = "Póliza ya contabilizada";
|
e.Row.FCCheckBox("Chk").ToolTip = "Póliza ya contabilizada";
|
||||||
}
|
}
|
||||||
|
|
||||||
GvD.DataSource = contP.DtResultados;
|
GvD.DataSource = contP.DtResultados;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -137,22 +136,31 @@ public partial class Contabilidad_ContabilizacionCompras : ClsPaginas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (TienePermisoEditar)
|
if (TienePermisoEditar)
|
||||||
{
|
{
|
||||||
e.Row.FCHyperLink("HplEdicion").Visible = true;
|
e.Row.FCHyperLink("HplEdicion").Visible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
e.Row.FCHyperLink("HLPoliza").Visible = TienePermisoVerPoliza & e.Row.DBCampo("IdPoliza").ToEntero() > 0;
|
if (UsuarioActual.Empresa.TipoContabilidad == 1) // conta SIG
|
||||||
|
{
|
||||||
|
e.Row.FCHyperLink("HLPoliza").Visible = TienePermisoVerPoliza & e.Row.DBCampo("FolioPoliza").ToEntero() > 0;
|
||||||
|
e.Row.FCHyperLink("HLPoliza").NavigateUrl = $"/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={e.Row.DBCampo("CvePrePoliza")}";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (UsuarioActual.Empresa.TipoContabilidad == 2) // conta Contpaq
|
||||||
|
{
|
||||||
|
e.Row.FCHyperLink("HLPoliza").Visible = TienePermisoVerPoliza & e.Row.DBCampo("IdPoliza").ToEntero() > 0;
|
||||||
|
e.Row.FCHyperLink("HLPoliza").NavigateUrl = $"/Contabilidad/RegPoliza.aspx?IdPoliza={e.Row.DBCampo("IdPoliza")}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
contP.Dispose();
|
contP.Dispose();
|
||||||
GvD.DataBind();
|
GvD.DataBind();
|
||||||
|
|
||||||
if (e.Row.DBCampo("Moneda") == "USD" && e.Row.FCLinkButton("LBActualizarTC") != null)
|
if (e.Row.DBCampo("Moneda") == "USD" && e.Row.FCLinkButton("LBActualizarTC") != null)
|
||||||
{
|
{
|
||||||
e.Row.FCLinkButton("LBActualizarTC").Visible = true;
|
e.Row.FCLinkButton("LBActualizarTC").Visible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ Partial Class Contabilidad_DiarioPagos
|
|||||||
DdlPolizaTipo.SelectedValue = "2"
|
DdlPolizaTipo.SelectedValue = "2"
|
||||||
'busco si se ocupa el tipo de cambio
|
'busco si se ocupa el tipo de cambio
|
||||||
|
|
||||||
CargaDatos(-1)
|
'CargaDatos(-1)
|
||||||
|
|
||||||
Cc.Dispose()
|
Cc.Dispose()
|
||||||
Else
|
Else
|
||||||
@@ -1066,16 +1066,13 @@ Partial Class Contabilidad_DiarioPagos
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
FluctuacionCambiaria += Math.Round((CompraPagadoRetISR * TipoCambioCompra) - (CompraPagadoRetISR * TipoCambioPago), 2) 'FLUCTUACION CAMBIARIA DE ISR
|
FluctuacionCambiaria += Math.Round((CompraPagadoRetISR * TipoCambioCompra) - (CompraPagadoRetISR * TipoCambioPago), 2) 'FLUCTUACION CAMBIARIA DE ISR
|
||||||
Dim Dif As Double = (CompraPagadoTotal * TipoCambioPago) - Math.Round(CompraPagadoTotal * TipoCambioCompra, 2) + FluctuacionCambiaria
|
Dim Dif As Decimal = (CompraPagadoTotal * TipoCambioPago) - Math.Round(CompraPagadoTotal * TipoCambioCompra, 2) + FluctuacionCambiaria
|
||||||
|
|
||||||
|
|
||||||
If Dif < 0 Then
|
If Dif < 0 Then
|
||||||
tempMovto = True ' ganancia cambiaria
|
CtaFluctuacion = If(UsuarioActual.CveEmpresa = 13, 579, 0) : tempMovto = True ' ganancia cambiaria
|
||||||
Else
|
Else
|
||||||
tempMovto = False ' perdida cambiaria
|
CtaFluctuacion = If(UsuarioActual.CveEmpresa = 13, 578, 0) : tempMovto = False ' perdida cambiaria
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ConceptoDetalle = String.Format("{0} TC:{1} ${2}", gvr.FCTextBox("TxtDescripcion").Text, TipoCambioPago, Math.Abs(Dif).FormatoNumero)
|
ConceptoDetalle = String.Format("{0} TC:{1} ${2}", gvr.FCTextBox("TxtDescripcion").Text, TipoCambioPago, Math.Abs(Dif).FormatoNumero)
|
||||||
|
|||||||
@@ -81,15 +81,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<br />
|
|
||||||
|
|
||||||
<div id="DivBusqueda" runat="server" align="Right">
|
<div id="DivBusqueda" runat="server" align="Right">
|
||||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", Gv.ClientID) %>" style="display: inline-block; width: 150px;" />
|
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", Gv.ClientID) %>" style="display: inline-block; width: 150px;" />
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", Gv.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", Gv.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
|
|||||||
@@ -284,32 +284,41 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
|
|
||||||
If Request("CvePrePoliza") IsNot Nothing AndAlso IsNumeric(Request("CvePrePoliza")) AndAlso Request("CvePrePoliza").ToEntero > 0 Then
|
If Request("CvePrePoliza") IsNot Nothing AndAlso IsNumeric(Request("CvePrePoliza")) AndAlso Request("CvePrePoliza").ToEntero > 0 Then
|
||||||
|
|
||||||
ViewState("CvePrePoliza") = Request("CvePrePoliza").ToEntero
|
|
||||||
CreaDT()
|
CreaDT()
|
||||||
CreaDTEliminar()
|
CreaDTEliminar()
|
||||||
CargaPrePoliza()
|
If CargaPrePoliza(Request("CvePrePoliza").ToEntero) Then
|
||||||
If IfNull(Request("Tipo"), "").ToString <> "NOMPROV" Then
|
If IfNull(Request("Tipo"), "").ToString <> "NOMPROV" Then
|
||||||
GvPrePoliza.Columns(5).Visible = False
|
GvPrePoliza.Columns(5).Visible = False
|
||||||
DivTG.Visible = False
|
DivTG.Visible = False
|
||||||
GvMov.Columns(5).Visible = False
|
GvMov.Columns(5).Visible = False
|
||||||
End If
|
End If
|
||||||
ValidaCrearAPartirDe()
|
ValidaCrearAPartirDe()
|
||||||
DvPlantilla.Visible = False
|
DvPlantilla.Visible = False
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||||
|
If Folio.ToEntero > 0 Then
|
||||||
|
BtnDescontabilizar.Visible = True
|
||||||
|
LnkFolioManual.Visible = False
|
||||||
|
Else
|
||||||
|
BtnDescontabilizar.Visible = False
|
||||||
|
LnkFolioManual.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
|
||||||
|
|
||||||
If Folio.ToEntero > 0 Then
|
|
||||||
BtnDescontabilizar.Visible = True
|
|
||||||
LnkFolioManual.Visible = False
|
|
||||||
Else
|
|
||||||
BtnDescontabilizar.Visible = False
|
|
||||||
LnkFolioManual.Visible = True
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Exit Sub
|
||||||
|
Else
|
||||||
|
BtnEliminar.Visible = False
|
||||||
|
LnkExcel.Visible = True
|
||||||
|
LnkImprimirPDF.Visible = False
|
||||||
|
DvPlantilla.Visible = True
|
||||||
|
|
||||||
|
TxtFechaDocumento.Text = Now.ToString("dd/MM/yyyy")
|
||||||
|
TxtFechaelaboracion.Text = Now.ToString("dd/MM/yyyy")
|
||||||
|
TxtConcepto.Enabled = True
|
||||||
|
TxtUsuarioElaboro.Text = UsuarioActual.Usuario
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Exit Sub
|
|
||||||
|
|
||||||
ElseIf Request("CvePrePolizaOrigen") IsNot Nothing AndAlso IsNumeric(Request("CvePrePolizaOrigen")) AndAlso Request("CvePrePolizaOrigen").ToEntero > 0 Then
|
ElseIf Request("CvePrePolizaOrigen") IsNot Nothing AndAlso IsNumeric(Request("CvePrePolizaOrigen")) AndAlso Request("CvePrePolizaOrigen").ToEntero > 0 Then
|
||||||
|
|
||||||
@@ -334,10 +343,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
TxtFechaelaboracion.Text = Now.ToString("dd/MM/yyyy")
|
TxtFechaelaboracion.Text = Now.ToString("dd/MM/yyyy")
|
||||||
TxtConcepto.Enabled = True
|
TxtConcepto.Enabled = True
|
||||||
TxtUsuarioElaboro.Text = UsuarioActual.Usuario
|
TxtUsuarioElaboro.Text = UsuarioActual.Usuario
|
||||||
DvPlantilla.Visible = True
|
|
||||||
'LnkAddConcepto.Visible = False
|
|
||||||
|
|
||||||
'UpPrePoliza.Visible = False
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -366,8 +371,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
GvMov.Columns(5).Visible = False
|
GvMov.Columns(5).Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -437,14 +440,18 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
End With
|
End With
|
||||||
DtMovimientosEliminar.AcceptChanges()
|
DtMovimientosEliminar.AcceptChanges()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaPrePoliza()
|
Private Function CargaPrePoliza(tCvePrePoliza As Integer) As Boolean
|
||||||
BtnEliminar.Visible = True
|
Dim retorno As Boolean = False
|
||||||
LblEncabezado.Text = "Edición de Póliza"
|
|
||||||
|
|
||||||
Dim ObjContabilidad As New ClsContabilidad
|
Dim ObjContabilidad As New ClsContabilidad
|
||||||
If ObjContabilidad.GetPrePoliza(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
If ObjContabilidad.GetPrePoliza(tCvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||||
|
|
||||||
Dim dr As DataRow = ObjContabilidad.DtResultados.FiltroPrimero("")
|
Dim dr As DataRow = ObjContabilidad.DtResultados.FiltroPrimero("")
|
||||||
If dr IsNot Nothing Then
|
If dr IsNot Nothing Then
|
||||||
|
retorno = True
|
||||||
|
BtnEliminar.Visible = True
|
||||||
|
LblEncabezado.Text = "Edición de Póliza"
|
||||||
|
|
||||||
|
ViewState("CvePrePoliza") = tCvePrePoliza
|
||||||
DdlTipoPoliza.SelectedValue = dr("CveTipoPoliza")
|
DdlTipoPoliza.SelectedValue = dr("CveTipoPoliza")
|
||||||
TxtFechaDocumento.Text = dr("Fecha")
|
TxtFechaDocumento.Text = dr("Fecha")
|
||||||
TxtConcepto.Text = dr("Concepto")
|
TxtConcepto.Text = dr("Concepto")
|
||||||
@@ -544,7 +551,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
|
|
||||||
ObjContabilidad.Dispose()
|
ObjContabilidad.Dispose()
|
||||||
UpPoliza.Update()
|
UpPoliza.Update()
|
||||||
End Sub
|
Return retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Sub GvPrePoliza_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvPrePoliza.RowDataBound
|
Private Sub GvPrePoliza_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvPrePoliza.RowDataBound
|
||||||
|
|
||||||
@@ -562,8 +570,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
|
|
||||||
Dim CveConceptoContable As Integer = e.Row.DataKey("CveConceptoContable").ToEntero
|
Dim CveConceptoContable As Integer = e.Row.DataKey("CveConceptoContable").ToEntero
|
||||||
|
|
||||||
If CveConceptoContable.Contiene(1, 2, 13, 38, 207, 203, 39, 61, 62, 63, 4, 278, 291, 292, 293, 294, 272, 150, 251, 301) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DataKey("CveVenta"))
|
If CveConceptoContable.Contiene(1, 2, 12, 91, 13, 38, 207, 203, 39, 61, 62, 63, 4, 278, 291, 292, 293, 294, 272, 150, 251, 301) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DataKey("CveVenta"))
|
||||||
If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 205, 225, 234, 235, 240, 305, 306, 307, 308, 309, 310, 311, 312, 201, 206, 341, 342, 304, 272, 259) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra"))
|
If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 205, 225, 234, 235, 240, 305, 306, 307, 308, 309, 310, 311, 312, 201, 206, 341, 342, 343, 344, 304, 272, 259) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra"))
|
||||||
If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen"))
|
If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen"))
|
||||||
If CveConceptoContable.Contiene(30, 204, 66, 92) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
|
If CveConceptoContable.Contiene(30, 204, 66, 92) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
|
||||||
|
|
||||||
@@ -1044,7 +1052,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
TipoMovto = True
|
TipoMovto = True
|
||||||
|
|
||||||
If gvr.DataKey("EsComplementaria") = "True" Then ImporteME = gvr.DataKey("ImporteME").ToDecimal
|
If gvr.DataKey("EsComplementaria") = "True" Then ImporteME = gvr.DataKey("ImporteME").ToDecimal
|
||||||
If gvr.DataKey("EsMonedaExtranjera") = "True" Then TipoCambio = gvr.DataKey("TC").ToDecimal
|
If gvr.DataKey("EsMonedaExtranjera") = "True" Then TipoCambio = gvr.DataKey("TxtTC").ToDecimal
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@@ -1061,7 +1069,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
TipoMovto = False
|
TipoMovto = False
|
||||||
|
|
||||||
If gvr.DataKey("EsComplementaria") = "True" Then ImporteME = gvr.DataKey("ImporteME").ToDecimal
|
If gvr.DataKey("EsComplementaria") = "True" Then ImporteME = gvr.DataKey("ImporteME").ToDecimal
|
||||||
If gvr.DataKey("EsMonedaExtranjera") = "True" Then TipoCambio = gvr.DataKey("TC").ToDecimal
|
If gvr.DataKey("EsMonedaExtranjera") = "True" Then TipoCambio = gvr.DataKey("TxtTC").ToDecimal
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -1274,7 +1282,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
ObjContabilidad.Dispose()
|
ObjContabilidad.Dispose()
|
||||||
CargaPrePoliza()
|
CargaPrePoliza(CvePrePoliza)
|
||||||
|
|
||||||
If Not OcurrioError Then
|
If Not OcurrioError Then
|
||||||
If IdPoliza > 0 AndAlso contador Then
|
If IdPoliza > 0 AndAlso contador Then
|
||||||
@@ -2310,7 +2318,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
{
|
{
|
||||||
.ConceptoAdministrativo = row.Item("ConceptoContable"),
|
.ConceptoAdministrativo = row.Item("ConceptoContable"),
|
||||||
.Cuenta = row.Item("Codigo"),
|
.Cuenta = row.Item("Codigo"),
|
||||||
.NombreCuenta = row.Item("NombreCuenta"),
|
.NombreCuenta = row.Item("CodigoNombreCuenta"),
|
||||||
.Cargo = "",
|
.Cargo = "",
|
||||||
.Abono = "",
|
.Abono = "",
|
||||||
.Referencia = "",
|
.Referencia = "",
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
<asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView runat="server" ID="GvDatos" EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover ScrollAD"
|
<asp:GridView runat="server" ID="GvDatos" EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover ScrollAD"
|
||||||
DataKeyNames="CveCuentaAsignacion,CveConceptoContable,CveCuenta,IdCuenta,CveProveedor,CveCliente,CvePersonal,CveClasificacion,CveAlmacen,PorcentajeIVA,CveConceptoNomina,CveBancoCuenta,CveActivoFijo,CveSubProyecto,CveTipoGasto" AutoGenerateColumns="False"
|
DataKeyNames="CveCuentaAsignacion,CveConceptoContable,CveCuenta,IdCuenta,CveProveedor,CveCliente,CvePersonal,CveClasificacion,CveAlmacen,PorcentajeIVA,CveConceptoNomina,CveBancoCuenta,CveActivoFijo,CveSubProyecto,CveTipoGasto,CveCredito" AutoGenerateColumns="False"
|
||||||
Style=" width:100%" GridLines="None">
|
Style=" width:100%" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="ConceptoContable" ItemStyle-Width="150px" HeaderText="Concepto Contable" ItemStyle-HorizontalAlign="Left"/>
|
<asp:BoundField DataField="ConceptoContable" ItemStyle-Width="150px" HeaderText="Concepto Contable" ItemStyle-HorizontalAlign="Left"/>
|
||||||
@@ -186,6 +186,10 @@
|
|||||||
<asp:DropDownList ID="DdlActivoFijo" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="Descripcion" DataValueField="CveActivoFijo" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
|
<asp:DropDownList ID="DdlActivoFijo" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="Descripcion" DataValueField="CveActivoFijo" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
|
||||||
<label for="<%= DdlActivoFijo.ClientID.ToString()%>">Activo Fijo: </label>
|
<label for="<%= DdlActivoFijo.ClientID.ToString()%>">Activo Fijo: </label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright" id="divCredito" runat="server" visible="false">
|
||||||
|
<asp:DropDownList ID="DdlCreditos" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="Referencia" DataValueField="CveCredito" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
|
||||||
|
<label for="<%= DdlCreditos.ClientID.ToString()%>">Crédito: </label>
|
||||||
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright" id="divSubProyectos" runat="server" visible="false">
|
<div class="form-group form-md-line-input input-iconright" id="divSubProyectos" runat="server" visible="false">
|
||||||
<asp:DropDownList ID="DdlSubProyectos" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
|
<asp:DropDownList ID="DdlSubProyectos" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
|
||||||
<label for="<%= DdlSubProyectos.ClientID.ToString()%>">Sub Proyectos: </label>
|
<label for="<%= DdlSubProyectos.ClientID.ToString()%>">Sub Proyectos: </label>
|
||||||
|
|||||||
@@ -180,6 +180,18 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
|||||||
DdlPersonal.SelectedText = drp
|
DdlPersonal.SelectedText = drp
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If GvRow.DataKey("CveCredito").ToEntero > 0 Then
|
||||||
|
DdlCreditos.Items.Clear()
|
||||||
|
DdlCreditos.ClearSelection()
|
||||||
|
Dim ObjCreditos As New ClsBancos
|
||||||
|
If ObjCreditos.GetCreditos(-1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||||
|
DdlCreditos.DataSource = ObjCreditos.DtResultados.FiltraParametros("", DistinctColumns:={"CveCredito", "Referencia"})
|
||||||
|
End If
|
||||||
|
ObjCreditos.Dispose()
|
||||||
|
DdlCreditos.DataBind()
|
||||||
|
DdlCreditos.SelectedValue = GvRow.DataKey("CveCredito")
|
||||||
|
End If
|
||||||
|
|
||||||
LbAgregar.Text = "Actualizar"
|
LbAgregar.Text = "Actualizar"
|
||||||
UpModalModulos.Update()
|
UpModalModulos.Update()
|
||||||
RegistraScript("$('#ModalCat').modal();")
|
RegistraScript("$('#ModalCat').modal();")
|
||||||
@@ -203,6 +215,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
|||||||
divAlmacen.Visible = Boolean.Parse(Dr("AplicaAlmacen").ToString)
|
divAlmacen.Visible = Boolean.Parse(Dr("AplicaAlmacen").ToString)
|
||||||
divSubProyectos.Visible = Boolean.Parse(Dr("AplicaSubProyecto").ToString)
|
divSubProyectos.Visible = Boolean.Parse(Dr("AplicaSubProyecto").ToString)
|
||||||
divActivoFijo.Visible = Boolean.Parse(Dr("AplicaActivoFijo").ToString)
|
divActivoFijo.Visible = Boolean.Parse(Dr("AplicaActivoFijo").ToString)
|
||||||
|
divCredito.Visible = Boolean.Parse(Dr("AplicaCredito").ToString)
|
||||||
|
|
||||||
DdlActivoFijo.Enabled = False
|
DdlActivoFijo.Enabled = False
|
||||||
|
|
||||||
@@ -215,10 +228,8 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
|||||||
Else
|
Else
|
||||||
DdlActivoFijo.Enabled = False
|
DdlActivoFijo.Enabled = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
divConceptoNomina.Visible = Dr("AplicaNomina").ToString = "True"
|
divConceptoNomina.Visible = Dr("AplicaNomina").ToString = "True"
|
||||||
|
|
||||||
If CveConceptoContable = 51 Then
|
If CveConceptoContable = 51 Then
|
||||||
@@ -231,6 +242,21 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
|||||||
If Dr("CveTipoSaldo").ToString = "1" Then
|
If Dr("CveTipoSaldo").ToString = "1" Then
|
||||||
divRegeneraCuenta.Visible = True
|
divRegeneraCuenta.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Dr("AplicaCredito").ToString = "True" Then
|
||||||
|
Dim ObjCreditos As New ClsBancos
|
||||||
|
If ObjCreditos.GetCreditos(-1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||||
|
DdlCreditos.DataSource = ObjCreditos.DtResultados.FiltraParametros("", DistinctColumns:={"CveCredito", "Referencia"})
|
||||||
|
End If
|
||||||
|
ObjCreditos.Dispose()
|
||||||
|
DdlCreditos.DataBind()
|
||||||
|
|
||||||
|
If OpAgregar Then
|
||||||
|
DdlCreditos.Enabled = True
|
||||||
|
Else
|
||||||
|
DdlCreditos.Enabled = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -322,7 +348,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
|||||||
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
|
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
|
||||||
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(),
|
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(),
|
||||||
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero,
|
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero,
|
||||||
CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, RegeneraCuenta:=chkRegeneraCuenta.Checked) Then
|
CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, CveCredito:=DdlCreditos.SelectedValue.ToEntero, RegeneraCuenta:=chkRegeneraCuenta.Checked) Then
|
||||||
ErrorString = "Error al agregar"
|
ErrorString = "Error al agregar"
|
||||||
End If
|
End If
|
||||||
ElseIf HdnCveCuentaAsignacion.Value.ToEntero > 0 Then
|
ElseIf HdnCveCuentaAsignacion.Value.ToEntero > 0 Then
|
||||||
@@ -330,7 +356,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
|||||||
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
|
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
|
||||||
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(),
|
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(),
|
||||||
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero,
|
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero,
|
||||||
CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, RegeneraCuenta:=chkRegeneraCuenta.Checked) Then
|
CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, CveCredito:=DdlCreditos.SelectedValue.ToEntero, RegeneraCuenta:=chkRegeneraCuenta.Checked) Then
|
||||||
ErrorString = "Error al actualizar"
|
ErrorString = "Error al actualizar"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -30,13 +30,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="titlefiltros caption ">
|
<div class="titlefiltros caption ">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-1 truncate" style="width: 90px;">Ejercicio:</label>
|
<label class="col-md-1 truncate" >Ejercicio:</label>
|
||||||
<div class="col-md-2" style="width: 125px;">
|
<div class="col-md-1" >
|
||||||
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100px">
|
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100px">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
<label class="col-md-1 truncate" style="width: 90px;">Periodo:</label>
|
|
||||||
<div class="col-md-2" style="width: 130px;">
|
<label class="col-md-1 truncate" >Periodo:</label>
|
||||||
|
<div class="col-md-1" style="width: 130px;">
|
||||||
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="100px" CssClass="select2me">
|
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="100px" CssClass="select2me">
|
||||||
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
|
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
|
||||||
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
|
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
|
||||||
@@ -53,25 +54,38 @@
|
|||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label>
|
<asp:Label ID="LblProyecto" CssClass="col-md-1" runat="server">Proyecto:</asp:Label>
|
||||||
<div class="col-md-2" id="DivProyecto" runat="server">
|
<div class="col-md-1" id="DivProyecto" runat="server">
|
||||||
<asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="95%">
|
<asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="95%">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label>
|
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label>
|
||||||
<div class="col-md-2">
|
<div class="col-md-1">
|
||||||
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
|
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<li runat="server" id="liTipoReporte" visible="false">Tipo:
|
<label class="col-md-1" >Consolidado: </label>
|
||||||
<asp:DropDownList ID="DdlTipoReporte" runat="server" Width="150px">
|
<div class="col-md-1">
|
||||||
|
<asp:DropDownList ID="DdlOpcion" runat="server" CssClass="select2me" Width="100%">
|
||||||
|
<asp:ListItem Selected="True" Value ="1">Normal</asp:ListItem>
|
||||||
|
<asp:ListItem Value ="2">Consolidado</asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<label class="col-md-1" runat="server" id="DivTipo1" visible="false" >Tipo: </label>
|
||||||
|
<div class="col-md-1" runat="server" id="DivTipo2" visible="false" >
|
||||||
|
<asp:DropDownList ID="DdlTipoReporte" runat="server" Width="150px">
|
||||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||||
<asp:ListItem Text="Contable y Complementario" Value="2"></asp:ListItem>
|
<asp:ListItem Text="Contable y Complementario" Value="2"></asp:ListItem>
|
||||||
<asp:ListItem Text="Complementario" Value="3"></asp:ListItem>
|
<asp:ListItem Text="Complementario" Value="3"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</li>
|
</div>
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -86,7 +86,8 @@ Partial Class AC_RepEstadoActividades
|
|||||||
ReporteComplementario = False
|
ReporteComplementario = False
|
||||||
Else
|
Else
|
||||||
ReporteComplementario = False
|
ReporteComplementario = False
|
||||||
liTipoReporte.Visible = False
|
DivTipo1.Visible = False
|
||||||
|
DivTipo2.Visible = False
|
||||||
LtTitulo.Text = "Estado de Resultados"
|
LtTitulo.Text = "Estado de Resultados"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -136,7 +137,7 @@ Partial Class AC_RepEstadoActividades
|
|||||||
|
|
||||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
Dim ObjConta As New ClsContabilidad
|
Dim ObjConta As New ClsContabilidad
|
||||||
If ObjConta.GetEstadoActividades(FechaI.ToDate, FechaF.ToDate, TipoReporte, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
If ObjConta.GetEstadoActividades(FechaI.ToDate, FechaF.ToDate, TipoReporte, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, Opcion:=DdlOpcion.SelectedValue.ToEntero) Then
|
||||||
DtDatos = ObjConta.DtResultados.FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)")
|
DtDatos = ObjConta.DtResultados.FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)")
|
||||||
Else
|
Else
|
||||||
DtDatos = Nothing
|
DtDatos = Nothing
|
||||||
@@ -331,6 +332,10 @@ Partial Class AC_RepEstadoActividades
|
|||||||
params.Add(New ReportParameter("SubProyecto", DdlSubproyecto.SelectedItem.Text))
|
params.Add(New ReportParameter("SubProyecto", DdlSubproyecto.SelectedItem.Text))
|
||||||
|
|
||||||
ImprimirPDF("AC/Reportes/RepEstadoActividades.rdlc", lrds, params, "EstadoActividades", Formato)
|
ImprimirPDF("AC/Reportes/RepEstadoActividades.rdlc", lrds, params, "EstadoActividades", Formato)
|
||||||
|
|
||||||
|
|
||||||
|
' UsuarioActual.Empresa.GrupoEmpresa
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -137,26 +137,18 @@
|
|||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
|
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
<div class="row" style="margin-right: 10px; margin-top: 8px;" align="right">
|
||||||
<br />
|
|
||||||
|
|
||||||
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
|
|
||||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<asp:GridView ID="GvDatos" runat="server"
|
<asp:GridView ID="GvDatos" runat="server"
|
||||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" AutoGenerateColumns="False"
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" AutoGenerateColumns="False"
|
||||||
EmptyDataText="No se encontrarios movimientos."
|
EmptyDataText="No se encontrarios movimientos."
|
||||||
|
|||||||
@@ -63,6 +63,15 @@
|
|||||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<label class="col-md-1" >Consolidado: </label>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<asp:DropDownList ID="DdlOpcion" runat="server" CssClass="select2me" Width="100%">
|
||||||
|
<asp:ListItem Selected="True" Value ="1">Normal</asp:ListItem>
|
||||||
|
<asp:ListItem Value ="2">Consolidado</asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ Partial Class AC2_SituacionFinanciera
|
|||||||
|
|
||||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||||
|
|
||||||
If ObjConta.GetSituacionFinanciera("01/01/1900".ToDate, FechaF.ToDate, UsuarioActual.CveEmpresa, CveSubProyecto, TipoReporte) Then
|
If ObjConta.GetSituacionFinanciera("01/01/1900".ToDate, FechaF.ToDate, UsuarioActual.CveEmpresa, CveSubProyecto, TipoReporte, Opcion:=DdlOpcion.SelectedValue.ToEntero) Then
|
||||||
DtDatos = ObjConta.DtResultados
|
DtDatos = ObjConta.DtResultados
|
||||||
|
|
||||||
CargaGrids()
|
CargaGrids()
|
||||||
|
|||||||
@@ -697,7 +697,7 @@
|
|||||||
<label class="col-md-3">Cliente:</label>
|
<label class="col-md-3">Cliente:</label>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<%-- <ads:DropDownLost ID="s" AutoPostBack="true" OnSelectedIndexChanged="DdlClienteCarta_SelectedIndexChanged" AppendDataBoundItems="true" runat="server" CssClass="form-control input-sm select2me" DataTextField="NombreComercial" DataValueField="CveCliente"></ads:DropDownLost>--%>
|
<%-- <ads:DropDownLost ID="s" AutoPostBack="true" OnSelectedIndexChanged="DdlClienteCarta_SelectedIndexChanged" AppendDataBoundItems="true" runat="server" CssClass="form-control input-sm select2me" DataTextField="NombreComercial" DataValueField="CveCliente"></ads:DropDownLost>--%>
|
||||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClienteCarta" Width="100%" data-metodo="getcliente" Onselectedindexchange="DdlClienteCarta_SelectedIndexChanged" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClienteCarta" Width="100%" data-metodo="getcliente" Onselectedindexchange="DdlClienteCarta_SelectedIndexChanged" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row rowpadding" >
|
<div class="row rowpadding" >
|
||||||
|
|||||||
@@ -686,8 +686,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
TxtFechaLlegada.Text = Now.ToShortDateString
|
TxtFechaLlegada.Text = Now.ToShortDateString
|
||||||
|
|
||||||
CargarCamiones()
|
CargarCamiones()
|
||||||
|
DdlClienteCarta.setEsWebService(True)
|
||||||
CargaClientesCarta()
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaPS()
|
Private Sub CargaPS()
|
||||||
@@ -1371,6 +1370,12 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not TieneError Then
|
||||||
|
If Not Conta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
|
||||||
|
TieneError = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If Inv.MovimientoRemove(CveMovimiento, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
If Inv.MovimientoRemove(CveMovimiento, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||||
If HdnIdPoliza.Value.ToEntero > 0 Then
|
If HdnIdPoliza.Value.ToEntero > 0 Then
|
||||||
If Not ObjConta.RemovePoliza(HdnIdPoliza.Value.ToEntero) Then
|
If Not ObjConta.RemovePoliza(HdnIdPoliza.Value.ToEntero) Then
|
||||||
@@ -1381,12 +1386,6 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not TieneError Then
|
|
||||||
If Not Conta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
|
|
||||||
TieneError = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
If ObjConta IsNot Nothing Then ObjConta.Commit()
|
If ObjConta IsNot Nothing Then ObjConta.Commit()
|
||||||
Inv.Commit()
|
Inv.Commit()
|
||||||
@@ -5906,18 +5905,11 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
DdlConfigAuto.Items.Clear()
|
DdlConfigAuto.Items.Clear()
|
||||||
DdlUnidadCamion.Items.Clear()
|
DdlUnidadCamion.Items.Clear()
|
||||||
|
|
||||||
'DdlUnidadCamion.DataSource = GlobalDTInvCamiones(UsuarioActual.CveEmpresa)
|
|
||||||
'DdlUnidadCamion.DataBind()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Using ObjInv As New ClsInventarios
|
Using ObjInv As New ClsInventarios
|
||||||
|
|
||||||
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1, Estatus:=1) Then
|
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1, Estatus:=1) Then
|
||||||
DdlUnidadCamion.DataSource = ObjInv.DtResultados
|
DdlUnidadCamion.DataSource = ObjInv.DtResultados
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus:=1) Then
|
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus:=1) Then
|
||||||
DdlRemolque1.DataSource = ObjInv.DtResultados
|
DdlRemolque1.DataSource = ObjInv.DtResultados
|
||||||
End If
|
End If
|
||||||
@@ -5926,13 +5918,9 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
DdlUnidadCamion.DataBind()
|
DdlUnidadCamion.DataBind()
|
||||||
DdlUnidadCamion.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
DdlUnidadCamion.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||||
|
|
||||||
|
|
||||||
DdlRemolque1.DataBind()
|
DdlRemolque1.DataBind()
|
||||||
DdlRemolque1.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
DdlRemolque1.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Using ObjGrales As New ClsGenerales
|
Using ObjGrales As New ClsGenerales
|
||||||
|
|
||||||
If ObjGrales.GetCartaPorteConfigAutoTransportes() Then
|
If ObjGrales.GetCartaPorteConfigAutoTransportes() Then
|
||||||
@@ -5940,27 +5928,9 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End Using
|
End Using
|
||||||
|
|
||||||
DdlConfigAuto.DataBind()
|
DdlConfigAuto.DataBind()
|
||||||
DdlConfigAuto.Items.Insert(0, New ListItem("Seleccione una", "-1"))
|
DdlConfigAuto.Items.Insert(0, New ListItem("Seleccione una", "-1"))
|
||||||
|
|
||||||
'Using ObjGral As New ClsGenerales
|
|
||||||
' If ObjGral.GetCartaPorteConfigAutoTransportes() Then
|
|
||||||
' DdlConfigAuto.DataSource = ObjGral.DtResultados
|
|
||||||
' End If
|
|
||||||
'End Using
|
|
||||||
|
|
||||||
'DdlConfigAuto.DataBind()
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CargaClientesCarta()
|
|
||||||
'DdlClienteCarta.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
|
||||||
'DdlClienteCarta.DataBind()
|
|
||||||
|
|
||||||
'DdlClienteCarta.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
|
||||||
DdlClienteCarta.SelectedValue = "-1"
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub EmitirTimbrado(CveTimbre As Integer, CveMovimientoTimbrado As Integer, ByRef MensajeAlert As StringBuilder)
|
Private Sub EmitirTimbrado(CveTimbre As Integer, CveMovimientoTimbrado As Integer, ByRef MensajeAlert As StringBuilder)
|
||||||
|
|||||||
@@ -135,20 +135,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body rowpadding">
|
<div class="portlet-body rowpadding">
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="form-group form-md-line-input form-md-floating-label input-iconright">
|
|
||||||
<asp:Label runat="server" Text="Tipo" AssociatedControlID="DdlTipo"></asp:Label>
|
|
||||||
<asp:DropDownList ID="DdlTipo" runat="server" AppendDataBoundItems="True" DataTextField="TipoGasto" DataValueField="TipoGasto" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVTipo" runat="server" ControlToValidate="DdlTipo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCETipo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipo" Width="300px" BehaviorID="VCETipo"></ajax:ValidatorCalloutExtender>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="form-group form-md-line-input form-md-floating-label input-iconright">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
@@ -168,6 +155,20 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group form-md-line-input form-md-floating-label input-iconright">
|
||||||
|
<asp:Label runat="server" Text="Tipo" AssociatedControlID="DdlTipo"></asp:Label>
|
||||||
|
<asp:DropDownList ID="DdlTipo" runat="server" AppendDataBoundItems="True" DataTextField="TipoGasto" DataValueField="TipoGasto" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVTipo" runat="server" ControlToValidate="DdlTipo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCETipo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipo" Width="300px" BehaviorID="VCETipo"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group form-md-line-input form-md-floating-label input-iconright">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
|||||||
}
|
}
|
||||||
protected void CargaConceptoContable()
|
protected void CargaConceptoContable()
|
||||||
{
|
{
|
||||||
DdlConceptoContable.DataSource = get_GlobalDTContaConceptosContables(-1);
|
DdlConceptoContable.DataSource = get_GlobalDTContaConceptosContables(-1).FiltraParametros("Tipo = 'Nom'");
|
||||||
DdlConceptoContable.DataBind();
|
DdlConceptoContable.DataBind();
|
||||||
DdlConceptoContable.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
DdlConceptoContable.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||||
DdlConceptoContable.SelectedValueExist("-1");
|
DdlConceptoContable.SelectedValueExist("-1");
|
||||||
|
|||||||
@@ -9453,7 +9453,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
DdlCuenta.Items.Clear();
|
DdlCuenta.Items.Clear();
|
||||||
DataTable DTCuentas = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoCuenta <> 1 AND UsaLayout = 'True' AND LEN(ConvenioPagoElectronico) > 0 ");
|
DataTable DTCuentas = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoCuenta <> 1 AND UsaLayout = 'True' AND LEN(ConvenioPagoElectronico) > 0 ");
|
||||||
DTCuentas.CaseSensitive = false;
|
DTCuentas.CaseSensitive = false;
|
||||||
DdlCuenta.DataSource = DTCuentas.FiltraParametros(" Banco IN('BANCOMER','BANORTE')");
|
DdlCuenta.DataSource = DTCuentas.FiltraParametros(" Banco IN('BANCOMER','BANORTE','BBVA Bancomer','BBVA')");
|
||||||
DdlCuenta.DataBind();
|
DdlCuenta.DataBind();
|
||||||
DdlCuenta.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
DdlCuenta.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||||
DdlCuenta.SelectedValueExist("-1");
|
DdlCuenta.SelectedValueExist("-1");
|
||||||
|
|||||||
@@ -570,7 +570,7 @@
|
|||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright" style="display: none;">
|
<div class="form-group form-md-line-input input-iconright" runat="server" visible="false" id="DvRuta" >
|
||||||
<asp:DropDownList Width="100%" ID="DdlRuta" runat="server" AppendDataBoundItems="True" DataTextField="Ruta" DataValueField="CveRuta" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
|
<asp:DropDownList Width="100%" ID="DdlRuta" runat="server" AppendDataBoundItems="True" DataTextField="Ruta" DataValueField="CveRuta" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
|
||||||
<asp:ListItem Selected="True" Text="Sin asignar Ruta" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Sin asignar Ruta" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
|
|||||||
@@ -1009,6 +1009,11 @@ Partial Class RH_Personal
|
|||||||
DVNetoPeriodo.Visible = True
|
DVNetoPeriodo.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(712) = "1" Then
|
||||||
|
DvRuta.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
AgregarEventosAsincronosGvVacaciones()
|
AgregarEventosAsincronosGvVacaciones()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -7674,6 +7679,9 @@ Partial Class RH_Personal
|
|||||||
Dim CorreoUsuario As String = GlobalDTUsuarios(CveUsuario:=UsuarioActual.CveUsuario).FiltroPrimeroValor("Correo")
|
Dim CorreoUsuario As String = GlobalDTUsuarios(CveUsuario:=UsuarioActual.CveUsuario).FiltroPrimeroValor("Correo")
|
||||||
Dim CCP As String = If(CorreoUsuario.Trim.Length > 0, CorreoUsuario, "")
|
Dim CCP As String = If(CorreoUsuario.Trim.Length > 0, CorreoUsuario, "")
|
||||||
|
|
||||||
|
'Para Pruebas
|
||||||
|
'CorreoNominista = "oscar.irigoyen@adssistemas.mx"
|
||||||
|
|
||||||
If CorreoNominista = "" Then
|
If CorreoNominista = "" Then
|
||||||
Alert("No se envio el correo de notificación a nominas, el nominista no tiene correo electronico", TipoMensaje.MsgAdvertencia)
|
Alert("No se envio el correo de notificación a nominas, el nominista no tiene correo electronico", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -7737,9 +7745,12 @@ Partial Class RH_Personal
|
|||||||
Cuerpo.AppendLine("<table border='0'>")
|
Cuerpo.AppendLine("<table border='0'>")
|
||||||
Cuerpo.AppendLine($"<tr><td style='text-align: center; font-weight:bold; font-size:medium;' colspan='2'>Datos del Candidato</td></tr>")
|
Cuerpo.AppendLine($"<tr><td style='text-align: center; font-weight:bold; font-size:medium;' colspan='2'>Datos del Candidato</td></tr>")
|
||||||
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Puesto:</td><td style=' text-align: left; font-weight:bold;'>{IIf(DdlPuesto.SelectedIndex > 0, DdlPuesto.SelectedItem.Text, "") }</td></tr>")
|
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Puesto:</td><td style=' text-align: left; font-weight:bold;'>{IIf(DdlPuesto.SelectedIndex > 0, DdlPuesto.SelectedItem.Text, "") }</td></tr>")
|
||||||
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Ruta/Servicio:</td><td style=' text-align: left; font-weight:bold;'>{ DdlRuta.SelectedItem.Text }</td></tr>")
|
|
||||||
|
|
||||||
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Fecha de { TimpoMovimiento }:</td><td style=' text-align: left; font-weight:bold;'>{TxtFechaEstatus.Text}</td></tr>")
|
If DvRuta.Visible Then
|
||||||
|
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Ruta/Servicio:</td><td style=' text-align: left; font-weight:bold;'>{ DdlRuta.SelectedItem.Text }</td></tr>")
|
||||||
|
End If
|
||||||
|
|
||||||
|
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Fecha de { TimpoMovimiento }:</td><td style=' text-align: left; font-weight:bold;'>{ If(eTipoMovimientoRH = TipoMovimientoRH.Alta, Now.ToString("dd/MM/yyyy"), TxtFechaEstatus.Text) }</td></tr>")
|
||||||
|
|
||||||
If eTipoMovimientoRH = TipoMovimientoRH.Baja Then
|
If eTipoMovimientoRH = TipoMovimientoRH.Baja Then
|
||||||
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Motivo de Baja:</td><td style=' text-align: left; font-weight:bold;'>{ DdlMotivoBaja.SelectedItem.Text }</td></tr>")
|
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Motivo de Baja:</td><td style=' text-align: left; font-weight:bold;'>{ DdlMotivoBaja.SelectedItem.Text }</td></tr>")
|
||||||
@@ -7760,12 +7771,36 @@ Partial Class RH_Personal
|
|||||||
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Nombre de la Madre:</td><td style=' text-align: left; font-weight:bold;'>{ Madre }</td></tr>")
|
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Nombre de la Madre:</td><td style=' text-align: left; font-weight:bold;'>{ Madre }</td></tr>")
|
||||||
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Dirección:</td><td style=' text-align: left; font-weight:bold;'>{ TxtCalle.Text } No Ext.{ TxtNumExt.Text} No int.{TxtNumInt.Text}</td></tr>")
|
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Dirección:</td><td style=' text-align: left; font-weight:bold;'>{ TxtCalle.Text } No Ext.{ TxtNumExt.Text} No int.{TxtNumInt.Text}</td></tr>")
|
||||||
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Escolaridad:</td><td style=' text-align: left; font-weight:bold;'>{ IIf(DdlEscolaridad.SelectedIndex > 0, DdlEscolaridad.SelectedItem.Text, "") }</td></tr>")
|
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Escolaridad:</td><td style=' text-align: left; font-weight:bold;'>{ IIf(DdlEscolaridad.SelectedIndex > 0, DdlEscolaridad.SelectedItem.Text, "") }</td></tr>")
|
||||||
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Telefono:</td><td style=' text-align: left; font-weight:bold;'>{ TxtCelular.Text},{TxtCelularPersonal.Text}</td></tr>")
|
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Telefono:</td><td style=' text-align: left; font-weight:bold;'>{ TxtCelular.Text}, {TxtCelularPersonal.Text}, {TxtTelefono.Text}</td></tr>")
|
||||||
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Tel en Caso de Emergencia:</td><td style=' text-align: left; font-weight:bold;'>{ TxtTelefonoEmergencia.Text }</td></tr>")
|
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Tel en Caso de Emergencia:</td><td style=' text-align: left; font-weight:bold;'>{ TxtTelefonoEmergencia.Text }</td></tr>")
|
||||||
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Correo:</td><td style=' text-align: left; font-weight:bold;'>{ TxtCorreo.Text }</td></tr>")
|
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Correo:</td><td style=' text-align: left; font-weight:bold;'>{ TxtCorreo.Text }</td></tr>")
|
||||||
|
|
||||||
|
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Supervisor:</td><td style=' text-align: left; font-weight:bold;'>{ DdlSupervisorOrganigrama.SelectedItem.Text }</td></tr>")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dim SBDatosBancarios As New StringBuilder
|
||||||
|
|
||||||
|
For Each GvRow As GridViewRow In GvBancosCuentas.Rows
|
||||||
|
|
||||||
|
SBDatosBancarios.Append($"Banco: {GvRow.FCLabel("LtNombreBanco").Text}, ")
|
||||||
|
SBDatosBancarios.Append(If(GvRow.FCLabel("LtNumeroCuenta").Text.Trim.Length > 0, $"Cuenta: {GvRow.FCLabel("LtNumeroCuenta").Text}, ", ""))
|
||||||
|
SBDatosBancarios.Append(If(GvRow.FCLabel("LtCLABE").Text.Trim.Length > 0, $"CLABE: {GvRow.FCLabel("LtCLABE").Text}, ", ""))
|
||||||
|
SBDatosBancarios.Append(If(GvRow.FCLabel("LtMoneda").Text.Trim.Length > 0, $"Moneda: {GvRow.FCLabel("LtMoneda").Text}, ", ""))
|
||||||
|
SBDatosBancarios.Append(If(GvRow.FCLabel("LlbEstatusTexto").Text.Trim.Length > 0, $"Estatus: {GvRow.FCLabel("LlbEstatusTexto").Text} ", ""))
|
||||||
|
SBDatosBancarios.AppendLine($"<br>")
|
||||||
|
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
If SBDatosBancarios.ToString.Trim.Length > 0 Then
|
||||||
|
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Datos Bancarios:</td><td style=' text-align: left; font-weight:bold;'>{ SBDatosBancarios.ToString }</td></tr>")
|
||||||
|
End If
|
||||||
|
|
||||||
Cuerpo.AppendLine("</table>")
|
Cuerpo.AppendLine("</table>")
|
||||||
|
|
||||||
correo.SendMail(EmpresaNotificaciones, CorreoNominista, $"Notificacion por { TimpoMovimiento }de Nomina: " & NombreCompleto, Cuerpo.ToString, CCP:=CCP)
|
correo.SendMail(EmpresaNotificaciones, CorreoNominista, $"Notificacion por { TimpoMovimiento } de Nomina: " & NombreCompleto, Cuerpo.ToString, CCP:=CCP)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-size: 15px;
|
/*
|
||||||
|
font-size: 15px;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
#C_GvDocumentos4 > tbody > tr:nth-child(2) > td:nth-child(2) {
|
#C_GvDocumentos4 > tbody > tr:nth-child(2) > td:nth-child(2) {
|
||||||
@@ -905,17 +907,23 @@
|
|||||||
<span class="caption-subject bold uppercase">Familiares</span>
|
<span class="caption-subject bold uppercase">Familiares</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
|
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
|
<input type="text" id="TxtBusquedaFam" class="form-control input-sm"
|
||||||
|
onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaFam','{0}')", GvFamiliares4.ClientID) %>"
|
||||||
|
style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaFam','{0}')", GvFamiliares4.ClientID) %>"
|
||||||
|
style="margin-top: -3px; float: inherit;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body form">
|
<div class="portlet-body form">
|
||||||
<div class="row col-md-12" style="text-align: right!important; margin-top: 2px!important; margin-bottom: 2px!important">
|
|
||||||
<input type="text" id="TxtBusquedaFam" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaFam','{0}')", GvFamiliares4.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaFam','{0}')", GvFamiliares4.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
|
||||||
</div>
|
|
||||||
<asp:UpdatePanel ID="UPTabFamiliares4" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPTabFamiliares4" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvFamiliares4" runat="server" AutoGenerateColumns="False" DataKeyNames="CveFamiliar,Parentesco,Nombre,Domicilio,Edad,Ocupacion,CveParentesco,Telefono,Observaciones"
|
<asp:GridView ID="GvFamiliares4" runat="server" AutoGenerateColumns="False" DataKeyNames="CveFamiliar,Parentesco,Nombre,Domicilio,Edad,Ocupacion,CveParentesco,Telefono,Observaciones"
|
||||||
@@ -995,6 +1003,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
|
|
||||||
|
<input type="text" id="TxtBusquedaEsc" class="form-control input-sm"
|
||||||
|
onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaEsc','{0}')", GvFamiliares4.ClientID) %>"
|
||||||
|
style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaEsc','{0}')", GvFamiliares4.ClientID) %>"
|
||||||
|
style="margin-top: -3px; float: inherit;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
@@ -1002,10 +1017,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="portlet-body form">
|
<div class="portlet-body form">
|
||||||
<div class="row col-md-12" style="text-align: right!important; margin-top: 2px!important; margin-bottom: 2px!important">
|
|
||||||
<input type="text" id="TxtBusquedaEsc" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaEsc','{0}')", GvFamiliares4.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaEsc','{0}')", GvFamiliares4.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
|
||||||
</div>
|
|
||||||
<asp:UpdatePanel ID="UPTabEscolaridad4" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPTabEscolaridad4" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
@@ -1075,16 +1087,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
|
<input type="text" id="TxtBusquedaLab" class="form-control input-sm"
|
||||||
|
onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaLap','{0}')", GvReferenciasLaborales4.ClientID) %>"
|
||||||
|
style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaLab','{0}')", GvReferenciasLaborales4.ClientID) %>"
|
||||||
|
style="margin-top: -3px; float: inherit;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body form">
|
<div class="portlet-body form">
|
||||||
<div class="row col-md-12" style="text-align: right!important; margin-bottom: 2px!important; margin-top: 2px!important">
|
|
||||||
<input type="text" id="TxtBusquedaLab" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaLap','{0}')", GvReferenciasLaborales4.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaLab','{0}')", GvReferenciasLaborales4.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UPTabReferenciasLaborales4" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPTabReferenciasLaborales4" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
@@ -1156,6 +1171,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
|
|
||||||
|
<input type="text" id="TxtBusquedaPer" class="form-control input-sm"
|
||||||
|
onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaPer','{0}')", GvReferenciasPersonales4.ClientID) %>"
|
||||||
|
style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaPer','{0}')", GvReferenciasPersonales4.ClientID) %>"
|
||||||
|
style="margin-top: -3px; float: inherit;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
@@ -1163,10 +1184,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="portlet-body form">
|
<div class="portlet-body form">
|
||||||
<div class="row col-md-12" style="text-align: right!important; margin-top: 2px!important; margin-bottom: 2px!important">
|
|
||||||
<input type="text" id="TxtBusquedaPer" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaPer','{0}')", GvReferenciasPersonales4.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaPer','{0}')", GvReferenciasPersonales4.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
|
||||||
</div>
|
|
||||||
<asp:UpdatePanel ID="UPTabReferenciasPersonales4" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPTabReferenciasPersonales4" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvReferenciasPersonales4" runat="server" AutoGenerateColumns="False"
|
<asp:GridView ID="GvReferenciasPersonales4" runat="server" AutoGenerateColumns="False"
|
||||||
@@ -3668,12 +3686,11 @@
|
|||||||
$('#<%= btnNext.ClientID %>').show();
|
$('#<%= btnNext.ClientID %>').show();
|
||||||
} else {
|
} else {
|
||||||
$('#<%= btnNext.ClientID %>').hide();
|
$('#<%= btnNext.ClientID %>').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
@@ -644,7 +644,7 @@
|
|||||||
|
|
||||||
<asp:DropDownList ID="DdlTipoDeduccion" runat="server" Width="300px">
|
<asp:DropDownList ID="DdlTipoDeduccion" runat="server" Width="300px">
|
||||||
<asp:ListItem Text="Gasto No Deducible" Value="255" Selected="True"></asp:ListItem>
|
<asp:ListItem Text="Gasto No Deducible" Value="255" Selected="True"></asp:ListItem>
|
||||||
<asp:ListItem Text="Incobrable No Deducible" Value="211"></asp:ListItem>
|
<asp:ListItem Text="Incobrable No Deducible" Value="179"></asp:ListItem>
|
||||||
<asp:ListItem Text="Incobrable Deducible" Value="263"></asp:ListItem>
|
<asp:ListItem Text="Incobrable Deducible" Value="263"></asp:ListItem>
|
||||||
<asp:ListItem Text="Reservas" Value="252"></asp:ListItem>
|
<asp:ListItem Text="Reservas" Value="252"></asp:ListItem>
|
||||||
<asp:ListItem Text="Otros Ingresos" Value="78"></asp:ListItem>
|
<asp:ListItem Text="Otros Ingresos" Value="78"></asp:ListItem>
|
||||||
|
|||||||
@@ -2443,7 +2443,7 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
Dim ConceptoPartida As String = TxtObsSaldarIncobrable.Text.Trim & " " & gr.DataKey("SerieFolio").ToString
|
Dim ConceptoPartida As String = TxtObsSaldarIncobrable.Text.Trim & " " & gr.DataKey("SerieFolio").ToString
|
||||||
|
|
||||||
If CveConceptoDeduccion = 255 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(266).ToEntero
|
If CveConceptoDeduccion = 255 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(266).ToEntero
|
||||||
If CveConceptoDeduccion = 211 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(559).ToEntero
|
If CveConceptoDeduccion = 179 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(559).ToEntero
|
||||||
If CveConceptoDeduccion = 263 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(537).ToEntero
|
If CveConceptoDeduccion = 263 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(537).ToEntero
|
||||||
If CveConceptoDeduccion = 252 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(581).ToEntero
|
If CveConceptoDeduccion = 252 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(581).ToEntero
|
||||||
If CveConceptoDeduccion = 78 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.IdCuentaOtrosIngresos
|
If CveConceptoDeduccion = 78 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.IdCuentaOtrosIngresos
|
||||||
@@ -2476,22 +2476,18 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
Else
|
Else
|
||||||
IdCtaContable = IdCuentaCliente
|
IdCtaContable = IdCuentaCliente
|
||||||
End If
|
End If
|
||||||
|
Dim ConPreP As ConceptosTipoSaldo = ClsPaginas.ObtenerCveConceptoPrePoliza(6, tCveMoneda, True, 1)
|
||||||
|
|
||||||
|
'normal
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, Saldo, gr.DataKey("SerieFolio").ToString, ConPreP.CveConcepto, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, Saldo, Saldo), TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||||
|
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||||
|
End If
|
||||||
|
|
||||||
If UsaComplementaria AndAlso tCveMoneda = 2 Then
|
If UsaComplementaria AndAlso tCveMoneda = 2 Then
|
||||||
'normal
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, Saldo, gr.DataKey("SerieFolio").ToString, CveConceptoCliente, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, Saldo, Saldo), TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
|
||||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
|
||||||
End If
|
|
||||||
'complementaria
|
'complementaria
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, 0, gr.DataKey("SerieFolio").ToString, 207, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=IdCtaContComplementaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, Saldo, (Saldo * TCVenta) - Saldo).RoundSQL, ImporteME:=Saldo, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, 0, gr.DataKey("SerieFolio").ToString, ConPreP.CveConceptoComplementario, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=IdCtaContComplementaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, Saldo, (Saldo * TCVenta) - Saldo).RoundSQL, ImporteME:=Saldo, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, Saldo, gr.DataKey("SerieFolio").ToString, CveConceptoCliente, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, Saldo, Saldo * TCVenta), TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
|
||||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'fluctuación.
|
'fluctuación.
|
||||||
@@ -2519,27 +2515,15 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
' iva
|
If (IVA > 0 Or UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) And IVA < 0) AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IVA, gr.DataKey("SerieFolio").ToString, 13, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, IVA, IVA * TCVenta), PorcentajeImpuesto:=gr.DataKey("PorcetajeIVA").ToDecimal, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||||
Dim PorcentajeImpuesto As Decimal = gr.DataKey("PorcentajeIVA").ToDecimal
|
|
||||||
|
|
||||||
Dim IdCtaIVAXTrasladar As Integer = 0
|
|
||||||
Dim CveCuentaIVAxTrasladar As Integer = 0
|
|
||||||
|
|
||||||
'If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
|
|
||||||
' IdCtaIVAXTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXTrasladar").ToString.ToEntero
|
|
||||||
' CveCuentaIVAxTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("CveCuentaIVAxTrasladar").ToString.ToEntero
|
|
||||||
'End If
|
|
||||||
|
|
||||||
|
|
||||||
If (IVA > 0 Or UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) And IVA < 0) AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IVA, gr.DataKey("SerieFolio").ToString, 13, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, IVA, IVA * TCVenta), PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
|
||||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If (RETIVA > 0 Or UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) And RETIVA < 0) AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, RETIVA, gr.DataKey("SerieFolio").ToString, 8, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContRetIVA, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, RETIVA, RETIVA * TCVenta), PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
If (RETIVA > 0 Or UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) And RETIVA < 0) AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, RETIVA, gr.DataKey("SerieFolio").ToString, 8, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContRetIVA, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, RETIVA, RETIVA * TCVenta), TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IEPS, gr.DataKey("SerieFolio").ToString, 38, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, IEPS, IEPS * TCVenta), PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IEPS, gr.DataKey("SerieFolio").ToString, 38, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, IEPS, IEPS * TCVenta), TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -152,7 +152,7 @@
|
|||||||
<asp:GridView ID="GvDatos" runat="server" OnRowDataBound="GvDatos_RowDataBound" GridLines="None"
|
<asp:GridView ID="GvDatos" runat="server" OnRowDataBound="GvDatos_RowDataBound" GridLines="None"
|
||||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" AutoGenerateColumns="False"
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" AutoGenerateColumns="False"
|
||||||
EmptyDataText="No se encontraron registros" data-sort="true" Width="99%"
|
EmptyDataText="No se encontraron registros" data-sort="true" Width="99%"
|
||||||
DataKeyNames="CveCliente,CveMoneda,Saldo,Folio,CveVenta,NombreComercial,CveVentaAmortizacion,SerieFolioAmortizacion,SerieFolio,Total,
|
DataKeyNames="CveCliente,CveMoneda,Saldo,CveVenta,NombreComercial,CveVentaAmortizacion,SerieFolioAmortizacion,SerieFolio,Total,TipoCambio,
|
||||||
Fecha,FechaAmortizacion,SubTotal,SubTotalAmortizacion,ImporteAmortizacion,CveIE,Tipo,SaldoAcumulativo,CveSubProyecto">
|
Fecha,FechaAmortizacion,SubTotal,SubTotalAmortizacion,ImporteAmortizacion,CveIE,Tipo,SaldoAcumulativo,CveSubProyecto">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Activities.Expressions;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -324,80 +325,103 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
|
|||||||
{
|
{
|
||||||
ClsContabilidad ObjConta = new ClsContabilidad();
|
ClsContabilidad ObjConta = new ClsContabilidad();
|
||||||
ObjConta.IniciaTransacSQL();
|
ObjConta.IniciaTransacSQL();
|
||||||
int CvePrePoliza = 0, ConceptoContable1 = 0, ConceptoContable2 = 0, CveVenta = -1, CveIE = -1;
|
int CvePrePoliza = 0, CveVenta = -1, CveIE = -1;
|
||||||
decimal Saldo = 0;
|
decimal Saldo = 0;
|
||||||
string MsgError = "";
|
decimal ImporteTotalGasto = 0;
|
||||||
if (Tipo == 2)
|
string MsgError = "";
|
||||||
{
|
|
||||||
ConceptoContable1 = 91;
|
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepNCXAplicar", 6, 0, 0, 1, TxtFecha.Text.ToDate(), TxtConcepto.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
|
||||||
ConceptoContable2 = 12;
|
|
||||||
}
|
|
||||||
else if (Tipo == 1)
|
|
||||||
{
|
|
||||||
ConceptoContable1 = 11;
|
|
||||||
ConceptoContable2 = 3;
|
|
||||||
}
|
|
||||||
else if (Tipo == 3)
|
|
||||||
{
|
|
||||||
ConceptoContable1 = 92;
|
|
||||||
ConceptoContable2 = 92;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (GridViewRow Gv in GvDatos.Rows)
|
if (CvePrePoliza > 0)
|
||||||
{
|
{
|
||||||
if (Gv.FCCheckBox("Chk").Checked)
|
foreach (GridViewRow Gv in GvDatos.Rows)
|
||||||
{
|
{
|
||||||
if (Tipo == 1 || Tipo == 2)
|
ConceptosTipoSaldo ConPreP = new ConceptosTipoSaldo();
|
||||||
{
|
if (Gv.FCCheckBox("Chk").Checked)
|
||||||
CveVenta = Gv.DataKey("CveVenta").ToEntero();
|
{
|
||||||
Saldo = -Gv.DataKey("Saldo").ToDecimal();
|
if (Tipo == 2)
|
||||||
}
|
{
|
||||||
else if (Tipo == 3)
|
ConPreP = ClsPaginas.get_ObtenerCveConceptoPrePoliza(6, Gv.DataKey("CveMoneda").ToEntero(), false, 2);
|
||||||
{
|
}
|
||||||
CveIE = Gv.DataKey("CveIE").ToEntero();
|
else if (Tipo == 1)
|
||||||
Saldo = Gv.DataKey("Saldo").ToDecimal();
|
{
|
||||||
}
|
ConPreP.CveConcepto = 3;
|
||||||
|
}
|
||||||
int IdCtaContable = 0;
|
|
||||||
if (ObjConta.GetRetCuenta(ConceptoContable1, Gv.DataKey("CveCliente").ToEntero()))
|
if (Tipo == 1 || Tipo == 2)
|
||||||
{
|
|
||||||
if (ObjConta.DtResultados.Rows.Count > 0)
|
|
||||||
{
|
{
|
||||||
if (Tipo == 1 || Tipo == 2)
|
CveVenta = Gv.DataKey("CveVenta").ToEntero();
|
||||||
{
|
Saldo = -Gv.DataKey("Saldo").ToDecimal();
|
||||||
IdCtaContable = ObjConta.DtResultados.Rows[0]["IdCtaContable"].ToString().ToEntero();
|
}
|
||||||
}
|
else if (Tipo == 3)
|
||||||
else if (Tipo == 3)
|
{
|
||||||
{
|
ConPreP.CveConcepto = 92;
|
||||||
IdCtaContable = ObjConta.DtResultados.Rows[0]["IdCtaContClientes"].ToString().ToEntero();
|
CveIE = Gv.DataKey("CveIE").ToEntero();
|
||||||
|
Saldo = Gv.DataKey("Saldo").ToDecimal();
|
||||||
|
}
|
||||||
|
|
||||||
|
int IdCtaContable = 0;
|
||||||
|
if (UsuarioActual.Empresa.TipoContabilidad == 2)
|
||||||
|
{
|
||||||
|
if (UsuarioActual.Empresa.TipoContabilidad == 2 && ObjConta.GetRetCuenta(ConPreP.CveConcepto, Gv.DataKey("CveCliente").ToEntero()))
|
||||||
|
{
|
||||||
|
if (ObjConta.DtResultados.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
if (Tipo == 1 || Tipo == 2)
|
||||||
|
{
|
||||||
|
IdCtaContable = ObjConta.DtResultados.Rows[0]["IdCtaContable"].ToString().ToEntero();
|
||||||
|
}
|
||||||
|
else if (Tipo == 3)
|
||||||
|
{
|
||||||
|
IdCtaContable = ObjConta.DtResultados.Rows[0]["IdCtaContClientes"].ToString().ToEntero();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ImporteTotalGasto += Saldo;
|
||||||
|
if (!ObjConta.AddPrePolizasDetalle(CvePrePoliza, true, Saldo, Gv.DataKey("SerieFolio").ToString(), ConPreP.CveConcepto, TxtConcepto.Text, TxtFecha.Text.ToDate(), IdCtaContable, -1, CveIE, CveVenta, CveCliente: Gv.DataKey("CveCliente").ToEntero(), ImporteMX: Saldo))
|
||||||
|
{
|
||||||
|
MsgError = "Ocurrio un error al saldar el movimiento";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (Gv.DataKey("CveMoneda").ToEntero() > 1 )
|
||||||
|
{
|
||||||
|
decimal ImporteMN = (Saldo * Gv.DataKey("TipoCambio").ToDecimal() - Saldo).RoundSQL();
|
||||||
|
ImporteTotalGasto += ImporteMN;
|
||||||
|
if (!ObjConta.AddPrePolizasDetalle(CvePrePoliza, true, Saldo, Gv.DataKey("SerieFolio").ToString(), ConPreP.CveConceptoComplementario, TxtConcepto.Text, TxtFecha.Text.ToDate(), IdCtaContable, -1, CveIE, CveVenta, CveCliente: Gv.DataKey("CveCliente").ToEntero(), ImporteME: Saldo, ImporteMX: ImporteMN, TipoCambio: Gv.DataKey("TipoCambio").ToDecimal()))
|
||||||
|
{
|
||||||
|
MsgError = "Ocurrio un error al saldar el movimiento";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
|
|
||||||
|
if (ImporteTotalGasto != 0)
|
||||||
|
{
|
||||||
|
ImporteTotalGasto = ImporteTotalGasto * -1; // se invierte el valor, para cuadre de prepoliza
|
||||||
|
if (!ObjConta.AddPrePolizasDetalle(CvePrePoliza, true, ImporteTotalGasto, "", 78, TxtConcepto.Text, TxtFecha.Text.ToDate(), UsuarioActual.Empresa.IdCuentaOtrosIngresos, -1, CveIE, CveVenta, ImporteMX: ImporteTotalGasto, CveSubProyecto: DdlSubProyectoSaldar.SelectedValue.ToEntero()))
|
||||||
{
|
{
|
||||||
break;
|
|
||||||
}
|
|
||||||
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepNCXAplicar", 6, Gv.DataKey("Saldo").ToDouble(), Gv.DataKey("Saldo").ToDouble(), Gv.DataKey("CveMoneda").ToEntero(), TxtFecha.Text.ToDate(), "Saldo de NC por Sistema", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
|
|
||||||
|
|
||||||
if (!ObjConta.AddPrePolizasDetalle(CvePrePoliza, true, Saldo, Gv.DataKey("Folio").ToString(), ConceptoContable2, TxtConcepto.Text, TxtFecha.Text.ToDate(), IdCtaContable, -1, CveIE, CveVenta, CveCliente: Gv.DataKey("CveCliente").ToEntero(), ImporteMX: Saldo))
|
|
||||||
{
|
|
||||||
MsgError = "Ocurrio un error al saldar el movimiento";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!ObjConta.AddPrePolizasDetalle(CvePrePoliza, true, Gv.DataKey("Saldo").ToDecimal(), Gv.DataKey("Folio").ToString(), 78, TxtConcepto.Text, TxtFecha.Text.ToDate(), UsuarioActual.Empresa.IdCuentaOtrosIngresos, -1, CveIE, CveVenta, ImporteMX: Gv.DataKey("Saldo").ToDecimal(), CveSubProyecto: DdlSubProyectoSaldar.SelectedValue.ToEntero()))
|
|
||||||
{
|
|
||||||
MsgError = "Ocurrio un error al saldar el movimiento";
|
MsgError = "Ocurrio un error al saldar el movimiento";
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MsgError = "Poliza no insertada";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MsgError == "")
|
if (MsgError == "")
|
||||||
{
|
{
|
||||||
ObjConta.Commit();
|
ObjConta.Commit();
|
||||||
Alert("Los movimientos se saldaron correctamente.");
|
string Msg = "Los movimientos se saldaron correctamente.";
|
||||||
|
Msg = Msg + $"<br/><br/><a Class='Texto' target='_blank' href='/Contabilidad/RegPrePolizaS.aspx?CvePrePoliza={CvePrePoliza}'>Ver Póliza</a> ";
|
||||||
|
Alert(Msg);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1066,12 +1066,21 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<asp:TextBox ID="TxtPrecio" runat="server" onkeypress="setFocus(event,'LbAgregar');" onkeyup="Recalcula();" CausesValidation="true" lang="nb" ClientIDMode="Static" Text="0.00" MaxLength="12" ValidationGroup="GprAgregaPS" Width="76px" Height="24px" CssClass="form-control input-sm "></asp:TextBox>
|
<div class="row" id="DivPrecioLista" runat="server" visible="false">
|
||||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="TxtPrecio" FilterType="Custom, Numbers" ValidChars="." />
|
<div class="col-md-12">
|
||||||
<asp:RequiredFieldValidator ID="RFVPrecio" runat="server" ControlToValidate="TxtPrecio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> es necesario, por favor ingréselo." ValidationGroup="GprAgregaPS"></asp:RequiredFieldValidator>
|
<asp:DropDownList ID="DdlPrecioLista" runat="server" Width="100%" CssClass="select2me" DataValueField="CvePrecioLista" DataTextField="PrecioLista" OnSelectedIndexChanged="DdlPrecioLista_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCPrecio" runat="server" HighlightCssClass="vco" TargetControlID="RFVPrecio" Width="300px"></ajax:ValidatorCalloutExtender>
|
</div>
|
||||||
<asp:CustomValidator ID="CVPrecio" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtPrecio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GprAgregaPS"></asp:CustomValidator>
|
</div>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEPrecio" runat="server" HighlightCssClass="vco" TargetControlID="CVPrecio" Width="300px"></ajax:ValidatorCalloutExtender>
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<asp:TextBox ID="TxtPrecio" runat="server" onkeypress="setFocus(event,'LbAgregar');" onkeyup="Recalcula();" CausesValidation="true" lang="nb" ClientIDMode="Static" Text="0.00" MaxLength="12" ValidationGroup="GprAgregaPS" Width="100%" Height="24px" CssClass="form-control input-sm "></asp:TextBox>
|
||||||
|
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="TxtPrecio" FilterType="Custom, Numbers" ValidChars="." />
|
||||||
|
<asp:RequiredFieldValidator ID="RFVPrecio" runat="server" ControlToValidate="TxtPrecio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> es necesario, por favor ingréselo." ValidationGroup="GprAgregaPS"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCPrecio" runat="server" HighlightCssClass="vco" TargetControlID="RFVPrecio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<asp:CustomValidator ID="CVPrecio" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtPrecio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GprAgregaPS"></asp:CustomValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEPrecio" runat="server" HighlightCssClass="vco" TargetControlID="CVPrecio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<th id="thEncDesc2" runat="server" visible="true"></th>
|
<th id="thEncDesc2" runat="server" visible="true"></th>
|
||||||
<th id="thPredial2" runat="server" visible="false">
|
<th id="thPredial2" runat="server" visible="false">
|
||||||
@@ -1207,7 +1216,16 @@
|
|||||||
<%--9--%>
|
<%--9--%>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlPU" runat="server" Text='<%# Eval("PU", "{0:N2}") %>'></asp:Literal>
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<asp:Literal ID="LtlPU" runat="server" Text='<%# Eval("PU", "{0:N2}") %>'></asp:Literal>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<asp:Literal ID="LtlPrecioLista" runat="server" Visible="false" Text='<%# Eval("PrecioLista") %>'></asp:Literal>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<EditItemTemplate>
|
<EditItemTemplate>
|
||||||
<asp:Literal ID="LtlPU" runat="server" Text='<%# Eval("PU") %>' Visible="false"></asp:Literal>
|
<asp:Literal ID="LtlPU" runat="server" Text='<%# Eval("PU") %>' Visible="false"></asp:Literal>
|
||||||
|
|||||||
@@ -2450,7 +2450,7 @@ Partial Class Ventas
|
|||||||
UpFacturar.Update()
|
UpFacturar.Update()
|
||||||
'CargaTiposDocumentos()
|
'CargaTiposDocumentos()
|
||||||
TrEmitir.Visible = False
|
TrEmitir.Visible = False
|
||||||
If UsuarioActual.CveRol = 1 OrElse UsuarioActual.CveEmpresa.Contiene(13, 83, 172, 173) Then
|
If UsuarioActual.Empresa.Funcionalidad(161) = "1" Then
|
||||||
DivCartaPorte.Visible = True
|
DivCartaPorte.Visible = True
|
||||||
End If
|
End If
|
||||||
ViewState("EstablecioFolio") = False
|
ViewState("EstablecioFolio") = False
|
||||||
@@ -2734,6 +2734,9 @@ Partial Class Ventas
|
|||||||
TmpDT.Columns.Add("TieneProntoPago", GetType(String))
|
TmpDT.Columns.Add("TieneProntoPago", GetType(String))
|
||||||
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
|
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
|
||||||
TmpDT.Columns.Add("CveMarca", GetType(Integer))
|
TmpDT.Columns.Add("CveMarca", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("CvePrecioLista", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("PrecioLista", GetType(String))
|
||||||
|
|
||||||
GvPS.DataSource = ObjVentas.DtResultados
|
GvPS.DataSource = ObjVentas.DtResultados
|
||||||
GvPS.DataBind()
|
GvPS.DataBind()
|
||||||
|
|
||||||
@@ -2758,6 +2761,9 @@ Partial Class Ventas
|
|||||||
TmpDT.Columns.Add("TieneProntoPago", GetType(String))
|
TmpDT.Columns.Add("TieneProntoPago", GetType(String))
|
||||||
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
|
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
|
||||||
TmpDT.Columns.Add("CveMarca", GetType(Integer))
|
TmpDT.Columns.Add("CveMarca", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("CvePrecioLista", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("PrecioLista", GetType(String))
|
||||||
|
|
||||||
GvPS.DataSource = ObjVentas.DtResultados
|
GvPS.DataSource = ObjVentas.DtResultados
|
||||||
GvPS.DataBind()
|
GvPS.DataBind()
|
||||||
|
|
||||||
@@ -3125,6 +3131,11 @@ Partial Class Ventas
|
|||||||
If Not ExFolioFactura Then SetPermisos()
|
If Not ExFolioFactura Then SetPermisos()
|
||||||
If CveVenta < 1 Then CargaFolios()
|
If CveVenta < 1 Then CargaFolios()
|
||||||
|
|
||||||
|
|
||||||
|
If CveVenta <= 0 AndAlso UsuarioActual.Empresa.Funcionalidad(360) = "1" Then
|
||||||
|
CargaListasPrecios()
|
||||||
|
End If
|
||||||
|
|
||||||
'SELECCIONA VENDEDOR DEL USUARIO CUANDO SEA VENTA NUEVA Y SIN CLIENTE
|
'SELECCIONA VENDEDOR DEL USUARIO CUANDO SEA VENTA NUEVA Y SIN CLIENTE
|
||||||
'If UsuarioActual.CveVendedor > 0 Then
|
'If UsuarioActual.CveVendedor > 0 Then
|
||||||
' If CveVenta = -1 AndAlso Not DdlVendedor.SelectedValue.ToEntero() > 0 Then DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString())
|
' If CveVenta = -1 AndAlso Not DdlVendedor.SelectedValue.ToEntero() > 0 Then DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString())
|
||||||
@@ -3475,6 +3486,21 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaListasPrecios()
|
||||||
|
DivPrecioLista.Visible = True
|
||||||
|
|
||||||
|
Using ObjVta As New ClsVentas
|
||||||
|
If ObjVta.GetPrecioListas(UsuarioActual.CveEmpresa) Then
|
||||||
|
DdlPrecioLista.DataSource = ObjVta.DtResultados.Copy()
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
|
||||||
|
DdlPrecioLista.DataBind()
|
||||||
|
DdlPrecioLista.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
|
UpPS.Update()
|
||||||
|
End Sub
|
||||||
Private Sub BloqueaClasificaciones()
|
Private Sub BloqueaClasificaciones()
|
||||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
|
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||||
DdlClasificacion.Enabled = False
|
DdlClasificacion.Enabled = False
|
||||||
@@ -6076,12 +6102,6 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaFormaPago(CveMetodoPago As Integer)
|
Private Sub CargaFormaPago(CveMetodoPago As Integer)
|
||||||
'EN LA VERSION 4.0 NO PERMITE DESBLOEQUEAR RELACION METODO Y FOMA DE PAGO
|
|
||||||
'If UsuarioActual.Empresa.Funcionalidad(350) <> "1" Then
|
|
||||||
' 'permiso para desbloquear la relación entre Método de pago y forma de pago
|
|
||||||
' If UsuarioActual.TienePermisoProceso(282) Then CveMetodoPago = -1
|
|
||||||
'End If
|
|
||||||
|
|
||||||
Dim dtt As DataTable = Nothing
|
Dim dtt As DataTable = Nothing
|
||||||
If CveMetodoPago > 0 Then
|
If CveMetodoPago > 0 Then
|
||||||
dtt = GlobalDTVtaFormaPago.FiltraParametros(If(CveMetodoPago = 1, " CveFormaPago <> 20 ", "CveFormaPago = 20"))
|
dtt = GlobalDTVtaFormaPago.FiltraParametros(If(CveMetodoPago = 1, " CveFormaPago <> 20 ", "CveFormaPago = 20"))
|
||||||
@@ -6117,22 +6137,13 @@ Partial Class Ventas
|
|||||||
'End If
|
'End If
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaUsoCFDI()
|
Private Sub CargaUsoCFDI()
|
||||||
If UsuarioActual.Empresa.Funcionalidad(350) <> "1" Then
|
|
||||||
RegimenFiscalCliente = "-1"
|
|
||||||
End If
|
|
||||||
|
|
||||||
DdlUsoCFDI.Items.Clear()
|
DdlUsoCFDI.Items.Clear()
|
||||||
DdlSucursalUsoCFDI.Items.Clear()
|
DdlSucursalUsoCFDI.Items.Clear()
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
Dim EsPersonaMoral As Boolean = (TipoPersona = True)
|
||||||
Dim EsPersonaMoral As Boolean = (TipoPersona = True)
|
|
||||||
|
|
||||||
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente)
|
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente)
|
||||||
DdlSucursalUsoCFDI.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente)
|
DdlSucursalUsoCFDI.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente)
|
||||||
Else
|
|
||||||
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente)
|
|
||||||
DdlSucursalUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente)
|
|
||||||
End If
|
|
||||||
|
|
||||||
DdlUsoCFDI.DataBind()
|
DdlUsoCFDI.DataBind()
|
||||||
DdlSucursalUsoCFDI.DataBind()
|
DdlSucursalUsoCFDI.DataBind()
|
||||||
@@ -6463,12 +6474,10 @@ Partial Class Ventas
|
|||||||
ViewState("CliPais") = ObjCliente.Pais
|
ViewState("CliPais") = ObjCliente.Pais
|
||||||
ImprimeNombreSucursal = ObjCliente.ImprimeNombreSucursal
|
ImprimeNombreSucursal = ObjCliente.ImprimeNombreSucursal
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
RegimenFiscalCliente = ObjCliente.DtResultados(0)("CodigoRegimenFiscal").ToString()
|
||||||
RegimenFiscalCliente = ObjCliente.DtResultados(0)("CodigoRegimenFiscal").ToString()
|
RegimenSociedad = ObjCliente.DtResultados(0)("RegimenSociedad").ToString()
|
||||||
RegimenSociedad = ObjCliente.DtResultados(0)("RegimenSociedad").ToString()
|
TipoPersona = CBool(ObjCliente.DtResultados(0)("TipoPersona"))
|
||||||
TipoPersona = CBool(ObjCliente.DtResultados(0)("TipoPersona"))
|
CargaUsoCFDI()
|
||||||
CargaUsoCFDI()
|
|
||||||
End If
|
|
||||||
'ViewState("NumCtaPago") = ObjCliente.NumCtaPago
|
'ViewState("NumCtaPago") = ObjCliente.NumCtaPago
|
||||||
ViewState("ClienteDesglosaIEPS") = ObjCliente.DesglosaIEPS
|
ViewState("ClienteDesglosaIEPS") = ObjCliente.DesglosaIEPS
|
||||||
If Not ClienteDesglosaIEPS Then
|
If Not ClienteDesglosaIEPS Then
|
||||||
@@ -6527,7 +6536,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI)
|
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI)
|
||||||
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
|
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
|
||||||
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
|
If LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
|
||||||
'S01 Sin efectos fiscales.
|
'S01 Sin efectos fiscales.
|
||||||
DdlUsoCFDI.SelectedValueExist("23")
|
DdlUsoCFDI.SelectedValueExist("23")
|
||||||
DdlUsoCFDI.Enabled = False
|
DdlUsoCFDI.Enabled = False
|
||||||
@@ -7061,7 +7070,7 @@ Partial Class Ventas
|
|||||||
Dim ValorAutorizacion As String = UsuarioActual.Empresa.Funcionalidad(595)
|
Dim ValorAutorizacion As String = UsuarioActual.Empresa.Funcionalidad(595)
|
||||||
|
|
||||||
'OBLIGAR PAGO DE CONTADO SI EL CLIENTE NO PERMITE CREDITO
|
'OBLIGAR PAGO DE CONTADO SI EL CLIENTE NO PERMITE CREDITO
|
||||||
If UsuarioActual.Empresa.Funcionalidad(570) = "1" AndAlso Me.PermiteCredito = False AndAlso ((DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem") AndAlso CveVenta < 1) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso EsCreaApartirDe) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveVenta > 0)) Then
|
If Me.PermiteCredito = False AndAlso ((DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem") AndAlso CveVenta < 1) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso EsCreaApartirDe) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveVenta > 0)) Then
|
||||||
RBLPago.SelectedValue = "2"
|
RBLPago.SelectedValue = "2"
|
||||||
RBLPago.Items(0).Enabled = False
|
RBLPago.Items(0).Enabled = False
|
||||||
RBLPago_SelectedIndexChanged(Nothing, Nothing)
|
RBLPago_SelectedIndexChanged(Nothing, Nothing)
|
||||||
@@ -7459,9 +7468,9 @@ Partial Class Ventas
|
|||||||
LblEstado.Text = ObjCliente.DtResultados.Rows(0)("Estado").ToString()
|
LblEstado.Text = ObjCliente.DtResultados.Rows(0)("Estado").ToString()
|
||||||
'TxtNumCtaPago.Text = ObjCliente.DtResultados.Rows(0)("NumCtaPago").ToString()
|
'TxtNumCtaPago.Text = ObjCliente.DtResultados.Rows(0)("NumCtaPago").ToString()
|
||||||
LblTelefono.Text = ObjCliente.DtResultados.Rows(0)("Telefono").ToString()
|
LblTelefono.Text = ObjCliente.DtResultados.Rows(0)("Telefono").ToString()
|
||||||
If Not UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
'If Not UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||||
LblCP.Text = ObjCliente.DtResultados.Rows(0)("CP").ToString()
|
' LblCP.Text = ObjCliente.DtResultados.Rows(0)("CP").ToString()
|
||||||
End If
|
'End If
|
||||||
ViewState("CliLocalidad") = ObjCliente.DtResultados.Rows(0)("Localidad").ToString()
|
ViewState("CliLocalidad") = ObjCliente.DtResultados.Rows(0)("Localidad").ToString()
|
||||||
ViewState("CliPais") = ObjCliente.DtResultados.Rows(0)("Pais").ToString()
|
ViewState("CliPais") = ObjCliente.DtResultados.Rows(0)("Pais").ToString()
|
||||||
ViewState("CliNoExt") = ObjCliente.DtResultados.Rows(0)("NoExt").ToString()
|
ViewState("CliNoExt") = ObjCliente.DtResultados.Rows(0)("NoExt").ToString()
|
||||||
@@ -7518,7 +7527,7 @@ Partial Class Ventas
|
|||||||
DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString())
|
DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString())
|
||||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString())
|
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString())
|
||||||
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
|
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
|
||||||
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
|
If LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
|
||||||
'S01 Sin efectos fiscales.
|
'S01 Sin efectos fiscales.
|
||||||
DdlUsoCFDI.SelectedValueExist("23")
|
DdlUsoCFDI.SelectedValueExist("23")
|
||||||
DdlUsoCFDI.Enabled = False
|
DdlUsoCFDI.Enabled = False
|
||||||
@@ -7560,7 +7569,7 @@ Partial Class Ventas
|
|||||||
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33)
|
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33)
|
||||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI)
|
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI)
|
||||||
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
|
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
|
||||||
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
|
If LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
|
||||||
'S01 Sin efectos fiscales.
|
'S01 Sin efectos fiscales.
|
||||||
DdlUsoCFDI.SelectedValueExist("23")
|
DdlUsoCFDI.SelectedValueExist("23")
|
||||||
DdlUsoCFDI.Enabled = False
|
DdlUsoCFDI.Enabled = False
|
||||||
@@ -8038,6 +8047,10 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(360) = "1" AndAlso e.Row.DBCampo("CvePrecioLista").ToEntero() > 0 Then
|
||||||
|
e.Row.FCLiteral("LtlPrecioLista").Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
'CANTIDAD FACTURADA
|
'CANTIDAD FACTURADA
|
||||||
Select Case e.Row.DBCampo("TipoDocto")
|
Select Case e.Row.DBCampo("TipoDocto")
|
||||||
Case "Cot"
|
Case "Cot"
|
||||||
@@ -8191,7 +8204,7 @@ Partial Class Ventas
|
|||||||
Dim Costo As Decimal = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
Dim Costo As Decimal = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
||||||
|
|
||||||
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
|
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
|
||||||
If Costo = 0 Then Costo = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
|
If Costo <= 0 Then Costo = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
|
||||||
|
|
||||||
ObjInventarios.Dispose()
|
ObjInventarios.Dispose()
|
||||||
Dim PrecioMinimo As Decimal = 0
|
Dim PrecioMinimo As Decimal = 0
|
||||||
@@ -8748,7 +8761,7 @@ Partial Class Ventas
|
|||||||
DtOCTmpDT = TmpDT.Copy
|
DtOCTmpDT = TmpDT.Copy
|
||||||
TmpDTError = TmpDT.Copy
|
TmpDTError = TmpDT.Copy
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Egs", "Dev") Then
|
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Egs", "Dev") Then
|
||||||
If RegimenFiscalCliente.Contiene("-1", "") Then
|
If RegimenFiscalCliente.Contiene("-1", "") Then
|
||||||
Alert("El cliente no tiene asignado un régimen fiscal.", TipoMensaje.MsgAdvertencia)
|
Alert("El cliente no tiene asignado un régimen fiscal.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -8759,6 +8772,7 @@ Partial Class Ventas
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ChkEmitirComercioExterior.Checked AndAlso DdlMoneda.SelectedValue.ToEntero() <> 2 Then
|
If ChkEmitirComercioExterior.Checked AndAlso DdlMoneda.SelectedValue.ToEntero() <> 2 Then
|
||||||
Alert("La moneda de la factura debe ser dolares cuando aplica comercio exterior.", TipoMensaje.MsgAdvertencia)
|
Alert("La moneda de la factura debe ser dolares cuando aplica comercio exterior.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -8769,7 +8783,7 @@ Partial Class Ventas
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Egs", "Dev") Then
|
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Egs", "Dev") Then
|
||||||
|
|
||||||
If LblRFC.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso RegimenFiscalCliente <> "616" Then
|
If LblRFC.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso RegimenFiscalCliente <> "616" Then
|
||||||
Alert("El Regimen fiscal del cliente debe ser <b>'616 - Sin obligaciones fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
Alert("El Regimen fiscal del cliente debe ser <b>'616 - Sin obligaciones fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
||||||
@@ -9396,37 +9410,37 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'Verifica versión 3.3.()
|
'Verifica versión 3.3.()
|
||||||
If (Not UsuarioActual.Empresa.Funcionalidad(350) = "1") AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("Ped", "PeC") Then
|
'If (Not UsuarioActual.Empresa.Funcionalidad(350) = "1") AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("Ped", "PeC") Then
|
||||||
Dim dttsat As DataTable = TmpDT.FiltraParametros("ISNULL(SATClaveProdServ,'') = '' OR ISNULL(SATClaveUM,'') = '' ")
|
' Dim dttsat As DataTable = TmpDT.FiltraParametros("ISNULL(SATClaveProdServ,'') = '' OR ISNULL(SATClaveUM,'') = '' ")
|
||||||
If dttsat IsNot Nothing AndAlso dttsat.Rows.Count > 0 Then
|
' If dttsat IsNot Nothing AndAlso dttsat.Rows.Count > 0 Then
|
||||||
Dim str As New StringBuilder
|
' Dim str As New StringBuilder
|
||||||
str.Append("Los siguientes productos no tiene asignado la clave Producto SAT o Unidad Medida SAT<br/><br/>")
|
' str.Append("Los siguientes productos no tiene asignado la clave Producto SAT o Unidad Medida SAT<br/><br/>")
|
||||||
For Each drt As DataRow In dttsat.Rows
|
' For Each drt As DataRow In dttsat.Rows
|
||||||
str.AppendFormat("{0} <br/>", drt("CodigoPS"))
|
' str.AppendFormat("{0} <br/>", drt("CodigoPS"))
|
||||||
Next
|
' Next
|
||||||
Alert(str.ToString(), TipoMensaje.MsgAdvertencia)
|
' Alert(str.ToString(), TipoMensaje.MsgAdvertencia)
|
||||||
dttsat.Dispose()
|
' dttsat.Dispose()
|
||||||
str.Clear()
|
' str.Clear()
|
||||||
Exit Sub
|
' Exit Sub
|
||||||
End If
|
' End If
|
||||||
dttsat.Dispose()
|
' dttsat.Dispose()
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 72 Then
|
' If UsuarioActual.CveEmpresa = 72 Then
|
||||||
Dim DtNoEncontrados As DataTable = TmpDT.FiltraParametros("ISNULL(SATClaveProdServ,'') = '01010101' ")
|
' Dim DtNoEncontrados As DataTable = TmpDT.FiltraParametros("ISNULL(SATClaveProdServ,'') = '01010101' ")
|
||||||
If DtNoEncontrados IsNot Nothing AndAlso DtNoEncontrados.Rows.Count > 0 Then
|
' If DtNoEncontrados IsNot Nothing AndAlso DtNoEncontrados.Rows.Count > 0 Then
|
||||||
Dim StrNoEncontrados As New StringBuilder
|
' Dim StrNoEncontrados As New StringBuilder
|
||||||
StrNoEncontrados.Append("Los siguientes productos no existen en el catálogo del SAT<br/><br/>")
|
' StrNoEncontrados.Append("Los siguientes productos no existen en el catálogo del SAT<br/><br/>")
|
||||||
For Each drt As DataRow In DtNoEncontrados.Rows
|
' For Each drt As DataRow In DtNoEncontrados.Rows
|
||||||
StrNoEncontrados.AppendFormat("{0} <br/>", drt("CodigoPS"))
|
' StrNoEncontrados.AppendFormat("{0} <br/>", drt("CodigoPS"))
|
||||||
Next
|
' Next
|
||||||
Alert(StrNoEncontrados.ToString(), TipoMensaje.MsgAdvertencia)
|
' Alert(StrNoEncontrados.ToString(), TipoMensaje.MsgAdvertencia)
|
||||||
DtNoEncontrados.Dispose()
|
' DtNoEncontrados.Dispose()
|
||||||
StrNoEncontrados.Clear()
|
' StrNoEncontrados.Clear()
|
||||||
Exit Sub
|
' Exit Sub
|
||||||
End If
|
' End If
|
||||||
DtNoEncontrados.Dispose()
|
' DtNoEncontrados.Dispose()
|
||||||
End If
|
' End If
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
'CREA UNA COPIA DE SEGURIDAD PARA LOS DATOS DEL TMPDT
|
'CREA UNA COPIA DE SEGURIDAD PARA LOS DATOS DEL TMPDT
|
||||||
If TmpDTError Is Nothing OrElse TmpDTError.Rows.Count = 0 Then
|
If TmpDTError Is Nothing OrElse TmpDTError.Rows.Count = 0 Then
|
||||||
@@ -10068,7 +10082,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Try
|
Try
|
||||||
If AutoConta Then
|
If AutoConta Then
|
||||||
If idCuentaContabilizacion > 0 Then
|
If idCuentaContabilizacion > 0 Or UsuarioActual.CveEmpresa.Contiene(7, 11, 12, 122, 145) Then
|
||||||
If ObjConta.ContabilizarPrePoliza(ObjFactura.CvePrePoliza, ObjFactura.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then
|
If ObjConta.ContabilizarPrePoliza(ObjFactura.CvePrePoliza, ObjFactura.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then
|
||||||
If ObjContPaq IsNot Nothing Then ObjContPaq.Commit()
|
If ObjContPaq IsNot Nothing Then ObjContPaq.Commit()
|
||||||
Else
|
Else
|
||||||
@@ -10643,23 +10657,14 @@ Partial Class Ventas
|
|||||||
|
|
||||||
ObjFacturaDevolucion.Fecha = Now
|
ObjFacturaDevolucion.Fecha = Now
|
||||||
|
|
||||||
|
ObjFacturaDevolucion.Version = "4.0"
|
||||||
|
|
||||||
|
If ObjFacturaDevolucion.Cliente Is Nothing Then
|
||||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
ObjFacturaDevolucion.Cliente = New Modelos.ClienteModel
|
||||||
ObjFacturaDevolucion.Version = "4.0"
|
|
||||||
|
|
||||||
If ObjFacturaDevolucion.Cliente Is Nothing Then
|
|
||||||
ObjFacturaDevolucion.Cliente = New Modelos.ClienteModel
|
|
||||||
End If
|
|
||||||
|
|
||||||
ObjFacturaDevolucion.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
|
|
||||||
ObjFacturaDevolucion.Cliente.RegimenFiscal = ClienteRegimenFiscal
|
|
||||||
Else
|
|
||||||
ObjFacturaDevolucion.Version = "3.3"
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
ObjFacturaDevolucion.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
|
||||||
|
ObjFacturaDevolucion.Cliente.RegimenFiscal = ClienteRegimenFiscal
|
||||||
|
|
||||||
ObjFacturaDevolucion.CveMetodoPago33 = 1
|
ObjFacturaDevolucion.CveMetodoPago33 = 1
|
||||||
ObjFacturaDevolucion.MetodoPago33 = "Pago en una sola exhibición"
|
ObjFacturaDevolucion.MetodoPago33 = "Pago en una sola exhibición"
|
||||||
@@ -10942,20 +10947,15 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
ObjFacturaBonificacion.Fecha = Now
|
ObjFacturaBonificacion.Fecha = Now
|
||||||
|
|
||||||
|
ObjFacturaBonificacion.Version = "4.0"
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
If ObjFacturaBonificacion.Cliente Is Nothing Then
|
||||||
ObjFacturaBonificacion.Version = "4.0"
|
ObjFacturaBonificacion.Cliente = New Modelos.ClienteModel
|
||||||
|
|
||||||
If ObjFacturaBonificacion.Cliente Is Nothing Then
|
|
||||||
ObjFacturaBonificacion.Cliente = New Modelos.ClienteModel
|
|
||||||
End If
|
|
||||||
|
|
||||||
ObjFacturaBonificacion.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
|
|
||||||
ObjFacturaBonificacion.Cliente.RegimenFiscal = ClienteRegimenFiscal
|
|
||||||
Else
|
|
||||||
ObjFacturaBonificacion.Version = "3.3"
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
ObjFacturaBonificacion.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
|
||||||
|
ObjFacturaBonificacion.Cliente.RegimenFiscal = ClienteRegimenFiscal
|
||||||
|
|
||||||
ObjFacturaBonificacion.CveMetodoPago33 = 1
|
ObjFacturaBonificacion.CveMetodoPago33 = 1
|
||||||
ObjFacturaBonificacion.MetodoPago33 = "Pago en una sola exhibición"
|
ObjFacturaBonificacion.MetodoPago33 = "Pago en una sola exhibición"
|
||||||
ObjFacturaBonificacion.ClaveMetodoPagoSAT = "PUE"
|
ObjFacturaBonificacion.ClaveMetodoPagoSAT = "PUE"
|
||||||
@@ -11368,18 +11368,14 @@ Partial Class Ventas
|
|||||||
ObjFactura = New Modelos.Factura
|
ObjFactura = New Modelos.Factura
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
ObjFactura.Version = "4.0"
|
||||||
ObjFactura.Version = "4.0"
|
If ObjFactura.Cliente Is Nothing Then
|
||||||
If ObjFactura.Cliente Is Nothing Then
|
ObjFactura.Cliente = New Modelos.ClienteModel
|
||||||
ObjFactura.Cliente = New Modelos.ClienteModel
|
|
||||||
End If
|
|
||||||
|
|
||||||
ObjFactura.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
|
|
||||||
ObjFactura.Cliente.RegimenFiscal = ClienteRegimenFiscal
|
|
||||||
Else
|
|
||||||
ObjFactura.Version = "3.3"
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
ObjFactura.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
|
||||||
|
ObjFactura.Cliente.RegimenFiscal = ClienteRegimenFiscal
|
||||||
|
|
||||||
ObjFactura.CveUsuario = UsuarioActual.CveUsuario
|
ObjFactura.CveUsuario = UsuarioActual.CveUsuario
|
||||||
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
|
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
|
||||||
ObjFactura.TipoCambio = If(DdlMoneda.SelectedValue.ToEntero() = 1, 1, TxtTipoCambio.Text.Trim.ToDecimal)
|
ObjFactura.TipoCambio = If(DdlMoneda.SelectedValue.ToEntero() = 1, 1, TxtTipoCambio.Text.Trim.ToDecimal)
|
||||||
@@ -12154,19 +12150,15 @@ Partial Class Ventas
|
|||||||
|
|
||||||
ObjFacturaDevolucion.SerieFolioPadre = HdnFolioFiscalNC.Value.ToString()
|
ObjFacturaDevolucion.SerieFolioPadre = HdnFolioFiscalNC.Value.ToString()
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
ObjFacturaDevolucion.Version = "4.0"
|
||||||
ObjFacturaDevolucion.Version = "4.0"
|
|
||||||
|
|
||||||
If ObjFacturaDevolucion.Cliente Is Nothing Then
|
If ObjFacturaDevolucion.Cliente Is Nothing Then
|
||||||
ObjFacturaDevolucion.Cliente = New Modelos.ClienteModel
|
ObjFacturaDevolucion.Cliente = New Modelos.ClienteModel
|
||||||
End If
|
|
||||||
|
|
||||||
ObjFacturaDevolucion.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
|
|
||||||
ObjFacturaDevolucion.Cliente.RegimenFiscal = ClienteRegimenFiscal
|
|
||||||
Else
|
|
||||||
ObjFacturaDevolucion.Version = "3.3"
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
ObjFacturaDevolucion.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
|
||||||
|
ObjFacturaDevolucion.Cliente.RegimenFiscal = ClienteRegimenFiscal
|
||||||
|
|
||||||
ObjFacturaDevolucion.CveMetodoPago33 = DdlMetodoPago33.SelectedValue.ToEntero()
|
ObjFacturaDevolucion.CveMetodoPago33 = DdlMetodoPago33.SelectedValue.ToEntero()
|
||||||
ObjFacturaDevolucion.MetodoPago33 = If(DdlMetodoPago33.SelectedValue.ToEntero() > 0, DdlMetodoPago33.SelectedItem.Text, "")
|
ObjFacturaDevolucion.MetodoPago33 = If(DdlMetodoPago33.SelectedValue.ToEntero() > 0, DdlMetodoPago33.SelectedItem.Text, "")
|
||||||
ObjFacturaDevolucion.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {DdlMetodoPago33.SelectedValue}")
|
ObjFacturaDevolucion.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {DdlMetodoPago33.SelectedValue}")
|
||||||
@@ -12412,7 +12404,7 @@ Partial Class Ventas
|
|||||||
Dim Timbre As New CFDITimbre
|
Dim Timbre As New CFDITimbre
|
||||||
|
|
||||||
|
|
||||||
Timbre.Comprobante.Version = If(UsuarioActual.Empresa.Funcionalidad(350) = "1", "4.0", "3.3")
|
Timbre.Comprobante.Version = "4.0"
|
||||||
|
|
||||||
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||||
Timbre.Comprobante.Folio = Obj.Folio.ToString()
|
Timbre.Comprobante.Folio = Obj.Folio.ToString()
|
||||||
@@ -12441,11 +12433,7 @@ Partial Class Ventas
|
|||||||
Timbre.Receptor.DomicilioFiscalReceptor = Obj.ClienteSucursal.CP
|
Timbre.Receptor.DomicilioFiscalReceptor = Obj.ClienteSucursal.CP
|
||||||
Else
|
Else
|
||||||
Timbre.Receptor.RFC = Obj.Cliente.RFC
|
Timbre.Receptor.RFC = Obj.Cliente.RFC
|
||||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
|
||||||
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
|
|
||||||
Else
|
|
||||||
Timbre.Receptor.Nombre = Obj.Cliente.Nombre + " " + Obj.Cliente.RegimenSociedad
|
|
||||||
End If
|
|
||||||
Timbre.Receptor.DomicilioFiscalReceptor = Obj.Cliente.CP
|
Timbre.Receptor.DomicilioFiscalReceptor = Obj.Cliente.CP
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -13346,11 +13334,9 @@ Partial Class Ventas
|
|||||||
For Each Row As DataRow In TmpDTDetalle.Rows
|
For Each Row As DataRow In TmpDTDetalle.Rows
|
||||||
If Not ObjVentas.AddVentaDetalle(ObjVentas.CveVenta, Row("CvePS").ToString().ToEntero(), Row("Cantidad").ToString().ToDouble, Row("CveUM").ToString().ToEntero(),
|
If Not ObjVentas.AddVentaDetalle(ObjVentas.CveVenta, Row("CvePS").ToString().ToEntero(), Row("Cantidad").ToString().ToDouble, Row("CveUM").ToString().ToEntero(),
|
||||||
Row("PU").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("ImporteIVA").ToString().ToDouble, Math.Round((Row("Total").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)) * (1 + Row("PorcentajeIVA").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)))), 6),
|
Row("PU").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("ImporteIVA").ToString().ToDouble, Math.Round((Row("Total").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)) * (1 + Row("PorcentajeIVA").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)))), 6),
|
||||||
Row("Obs").ToString(), Row("Descuento").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("TipoDescuento").ToString().ToEntero(), Row("CveSubProyecto").ToString().ToEntero(), Row("CvePresupuestoIngreso").ToString().ToEntero(),
|
Row("Obs").ToString(), Row("Descuento").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("TipoDescuento").ToString().ToEntero(), Row("CveSubProyecto").ToString().ToEntero(), Row("CvePresupuestoIngreso").ToString().ToEntero(), TiempoEntrega:=Row("TiempoEntrega").ToString(), CveVentaDetallePadre:=Row("CveVentaDetalle").ToString().ToEntero(),
|
||||||
TiempoEntrega:=Row("TiempoEntrega").ToString(), CveVentaDetallePadre:=Row("CveVentaDetalle").ToString().ToEntero(), CveContratoDetalle:=Row("CveContratoDetalle").ToString().ToEntero(), CvePromocionDetalle:=Row("CvePromocionDetalle").ToString().ToEntero(),
|
CveContratoDetalle:=Row("CveContratoDetalle").ToString().ToEntero(), CvePromocionDetalle:=Row("CvePromocionDetalle").ToString().ToEntero(), IEPS:=Row("ImporteIEPS").ToString().ToDouble, CveMovimientoDetallePedido:=Row("CveMovimientoDetallePedido").ToString().ToEntero(), ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDouble, ImporteRetISR:=Row("ImporteRetISR").ToString().ToDouble,
|
||||||
IEPS:=Row("ImporteIEPS").ToString().ToDouble, CveMovimientoDetallePedido:=Row("CveMovimientoDetallePedido").ToString().ToEntero(),
|
PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDouble, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero()) Then
|
||||||
ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDouble, ImporteRetISR:=Row("ImporteRetISR").ToString().ToDouble,
|
|
||||||
PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDouble, CuentaPredial:=Row("CuentaPredial").ToString()) Then
|
|
||||||
ErrorList.Add("Ocurrió un error al agregar un Producto o Servicio a la Factura.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
ErrorList.Add("Ocurrió un error al agregar un Producto o Servicio a la Factura.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
Else
|
||||||
@@ -14788,49 +14774,12 @@ Partial Class Ventas
|
|||||||
CveVentaAmortizacionAplicar = ObjFactura.CveVenta
|
CveVentaAmortizacionAplicar = ObjFactura.CveVenta
|
||||||
End If
|
End If
|
||||||
|
|
||||||
''Cuando se está amortizando con un anticipo y es la modalidad de NC
|
|
||||||
'If ObjFactura.TipoDocto.Contiene("Ing") AndAlso CveAnticipo > 0 AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "2" Then
|
|
||||||
' ConceptoContableAplicar = 11
|
|
||||||
' CveVentaAplicar = CveAnticipo
|
|
||||||
' CveVentaAmortizacionAplicar = ObjFactura.CveVenta
|
|
||||||
'End If
|
|
||||||
|
|
||||||
' If UsuarioActual.CveEmpresa = 119 Then
|
|
||||||
|
|
||||||
'código fijo en base el porcentaje iva, que se afecten las clasificaciones
|
|
||||||
'For i = 0 To TmpDTDetalle.Rows.Count - 1
|
|
||||||
|
|
||||||
' 'se excluyen las clasificaciones anteriores para que se asignen las de ingreso
|
|
||||||
' If Not TmpDTDetalle(i)("CveClasificacion").ToString().Contiene("19958", "19933", "18097", "24479") Then
|
|
||||||
|
|
||||||
' 'If TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDecimal > 0 Then
|
|
||||||
' ' If TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDecimal = 0.08 Then
|
|
||||||
' ' TmpDTDetalle(i)("CveClasificacion") = 20242 'clasif: ventas tasa 8%
|
|
||||||
' ' Else
|
|
||||||
' ' TmpDTDetalle(i)("CveClasificacion") = 19929 'clasif: ventas tasa 16%
|
|
||||||
' ' End If
|
|
||||||
|
|
||||||
' ' Else
|
|
||||||
' ' TmpDTDetalle(i)("CveClasificacion") = 19930 'clasif: ventas tasa 0%
|
|
||||||
' ' End If
|
|
||||||
|
|
||||||
' 'reclasifica la clasificación del producto, por la del ingreso correspondiente a su iva
|
|
||||||
' If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDecimal).Rows.Count > 0 Then
|
|
||||||
' TmpDTDetalle(i)("CveClasificacion") = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDecimal).Rows(0)("CveClasificacion").ToString()
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' End If
|
|
||||||
|
|
||||||
'Next
|
|
||||||
|
|
||||||
' End If
|
|
||||||
|
|
||||||
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
|
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
|
||||||
|
|
||||||
If DT.Rows.Count > 0 Then
|
If DT.Rows.Count > 0 Then
|
||||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||||
For Each Row2 As DataRow In DT.Rows
|
For Each Row2 As DataRow In DT.Rows
|
||||||
importeMovimiento = (TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador
|
importeMovimiento = (TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1} AND PorcentajeIVA = {2}", Row2("CveClasificacion"), Row2("CveSubProyecto"), Row2("PorcentajeIVA"))).ToString().ToDecimal()) * ValorMultiplicador
|
||||||
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
||||||
FechaMovimiento = ObjFactura.FechaPago
|
FechaMovimiento = ObjFactura.FechaPago
|
||||||
Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString().ToEntero() > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"), "")} - {If(Row2("CveSubProyecto").ToString().ToEntero() > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString()}"), "Sin SubProyecto Asignado")}"
|
Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString().ToEntero() > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"), "")} - {If(Row2("CveSubProyecto").ToString().ToEntero() > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString()}"), "Sin SubProyecto Asignado")}"
|
||||||
@@ -14844,8 +14793,6 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
|
|
||||||
|
|
||||||
If importeMovimiento <> 0 Then
|
If importeMovimiento <> 0 Then
|
||||||
|
|
||||||
If IdCtaContable <= 0 Then
|
If IdCtaContable <= 0 Then
|
||||||
@@ -14871,37 +14818,12 @@ Partial Class Ventas
|
|||||||
Dim CveVentaAplicar = ObjFactura.CveVenta
|
Dim CveVentaAplicar = ObjFactura.CveVenta
|
||||||
Dim CveVentaAmortizacionAplicar = -1
|
Dim CveVentaAmortizacionAplicar = -1
|
||||||
|
|
||||||
'If UsuarioActual.CveEmpresa = 119 Then
|
|
||||||
|
|
||||||
' 'código fijo en base el porcentaje iva, que se afecten las clasificaciones
|
|
||||||
' For i = 0 To TmpDTDetalle.Rows.Count - 1
|
|
||||||
|
|
||||||
' 'se excluyen las clasificaciones anteriores para que se asignen las de ingreso
|
|
||||||
' If Not TmpDTDetalle(i)("CveClasificacion").ToString().Contiene("19958", "19933", "18097") Then
|
|
||||||
|
|
||||||
' If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDouble).Rows.Count > 0 Then
|
|
||||||
' TmpDTDetalle(i)("CveClasificacion") = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDouble).Rows(0)("CveClasificacion").ToString()
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' Next
|
|
||||||
|
|
||||||
'End If
|
|
||||||
|
|
||||||
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
|
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
|
||||||
|
|
||||||
If DT.Rows.Count > 0 Then
|
If DT.Rows.Count > 0 Then
|
||||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||||
For Each Row2 As DataRow In DT.Rows
|
For Each Row2 As DataRow In DT.Rows
|
||||||
importeMovimiento = (TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador
|
importeMovimiento = (TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1} AND PorcentajeIVA = {2}", Row2("CveClasificacion"), Row2("CveSubProyecto"), Row2("PorcentajeIVA"))).ToString().ToDecimal) * ValorMultiplicador
|
||||||
|
|
||||||
'If ObjFactura.TipoDocto = "Egs" Then
|
|
||||||
' importeMovimiento += (TmpDTDetalle.SUM("ImporteIVA", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador
|
|
||||||
' importeMovimiento += (TmpDTDetalle.SUM("ImporteIEPS", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador
|
|
||||||
' importeMovimiento -= (TmpDTDetalle.SUM("ImporteRetIVA", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador
|
|
||||||
' importeMovimiento -= (TmpDTDetalle.SUM("ImporteRetISR", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador
|
|
||||||
'End If
|
|
||||||
|
|
||||||
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
||||||
FechaMovimiento = ObjFactura.FechaPago
|
FechaMovimiento = ObjFactura.FechaPago
|
||||||
@@ -14917,10 +14839,6 @@ Partial Class Ventas
|
|||||||
IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
|
IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 119 Then
|
|
||||||
If Row2("CveClasificacion").ToString() = "19930" Then IdCtaContable = 1141
|
|
||||||
If Row2("CveClasificacion").ToString() = "19929" Then IdCtaContable = 1142
|
|
||||||
End If
|
|
||||||
|
|
||||||
If importeMovimiento <> 0 Then
|
If importeMovimiento <> 0 Then
|
||||||
|
|
||||||
@@ -17683,7 +17601,13 @@ Partial Class Ventas
|
|||||||
Dim PrecioSugerido As Decimal = 0
|
Dim PrecioSugerido As Decimal = 0
|
||||||
Dim tPrecioSugerido As Decimal = 0
|
Dim tPrecioSugerido As Decimal = 0
|
||||||
tPrecioSugerido = drPS("Precio").ToString().ToDecimal
|
tPrecioSugerido = drPS("Precio").ToString().ToDecimal
|
||||||
PrecioSugerido = CalculaPrecioSugerido(CvePSParametro, drPS("CveClasificacion").ToString().ToEntero())
|
Dim ObjPrecioSugerido = CalculaPrecioSugerido(CvePSParametro, drPS("CveClasificacion").ToString().ToEntero())
|
||||||
|
|
||||||
|
PrecioSugerido = ObjPrecioSugerido.PrecioSugerido
|
||||||
|
|
||||||
|
If ObjPrecioSugerido.CvePrecioLista > 0 AndAlso DivPrecioLista.Visible Then
|
||||||
|
DdlPrecioLista.SelectedValueExist(ObjPrecioSugerido.CvePrecioLista)
|
||||||
|
End If
|
||||||
|
|
||||||
If PrecioSugerido <= 0 Then PrecioSugerido = tPrecioSugerido
|
If PrecioSugerido <= 0 Then PrecioSugerido = tPrecioSugerido
|
||||||
|
|
||||||
@@ -17723,7 +17647,9 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function CalculaPrecioSugerido(CvePSParametro As Integer, CveClasificacion As Integer) As Decimal
|
Private Function CalculaPrecioSugerido(CvePSParametro As Integer, CveClasificacion As Integer, Optional CvePrecioListaSugerido As Integer = -1) As Modelos.MPrecioSugerido
|
||||||
|
Dim Retorno As New Modelos.MPrecioSugerido
|
||||||
|
|
||||||
Dim PrecioSugerido As Decimal = 0
|
Dim PrecioSugerido As Decimal = 0
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(1) Then
|
If UsuarioActual.CveEmpresa.Contiene(1) Then
|
||||||
@@ -17766,6 +17692,10 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If DivPrecioLista.Visible AndAlso CvePrecioListaSugerido > 0 Then
|
||||||
|
CvePrecioListaPS = CvePrecioListaSugerido
|
||||||
|
End If
|
||||||
|
|
||||||
If CvePrecioListaPS > 0 Then
|
If CvePrecioListaPS > 0 Then
|
||||||
Dim ObjPS As New ClsProductosServicios
|
Dim ObjPS As New ClsProductosServicios
|
||||||
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
||||||
@@ -17785,7 +17715,8 @@ Partial Class Ventas
|
|||||||
PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
|
PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
CvePrecioLista = CvePrecioListaPS
|
Me.CvePrecioLista = CvePrecioListaPS
|
||||||
|
Retorno.CvePrecioLista = CvePrecioListaPS
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -17797,7 +17728,10 @@ Partial Class Ventas
|
|||||||
PrecioSugerido = PrecioSugerido * ((PrecioBaseCosto / 100) + 1)
|
PrecioSugerido = PrecioSugerido * ((PrecioBaseCosto / 100) + 1)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Return PrecioSugerido
|
|
||||||
|
Retorno.PrecioSugerido = PrecioSugerido
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Protected Sub DdlPS_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DdlPS.selectedindexchange
|
Protected Sub DdlPS_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DdlPS.selectedindexchange
|
||||||
DdlPSIndexChange(DdlPS.SelectedValue.ToEntero(), DdlPS)
|
DdlPSIndexChange(DdlPS.SelectedValue.ToEntero(), DdlPS)
|
||||||
@@ -18488,7 +18422,7 @@ Partial Class Ventas
|
|||||||
Dim Costo As Decimal = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
Dim Costo As Decimal = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
||||||
|
|
||||||
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
|
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
|
||||||
If Costo = 0 Then Costo = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
|
If Costo <= 0 Then Costo = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
|
||||||
|
|
||||||
ObjInventarios.Dispose()
|
ObjInventarios.Dispose()
|
||||||
Dim PrecioMinimo As Decimal = 0
|
Dim PrecioMinimo As Decimal = 0
|
||||||
@@ -18884,11 +18818,29 @@ Partial Class Ventas
|
|||||||
PU = ObjDescuento.PU
|
PU = ObjDescuento.PU
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim CvePrecioListaPS As Integer = -1
|
||||||
|
Dim PrecioListaPS As String = ""
|
||||||
|
|
||||||
|
'VALIDA LA ASIGNACION DE LISTA DE PRECIOS
|
||||||
|
If DivPrecioLista.Visible Then
|
||||||
|
If DdlPrecioLista.SelectedValue.ToEntero() > 0 AndAlso DdlPrecioLista.SelectedValue.ToEntero() = Me.CvePrecioLista Then
|
||||||
|
CvePrecioListaPS = Me.CvePrecioLista
|
||||||
|
PrecioListaPS = DdlPrecioLista.SelectedItem.Text
|
||||||
|
Else
|
||||||
|
Alert("La lista de precios del producto no coincide con la seleccionada", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If Me.CvePrecioLista > 0 Then
|
||||||
|
CvePrecioListaPS = Me.CvePrecioLista
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
AgregarProductoServicio(Cantidad, DdlUnidadMedida.SelectedValue.ToEntero(), DdlUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero(), DdlClasificacion.SelectedItem.Text,
|
AgregarProductoServicio(Cantidad, DdlUnidadMedida.SelectedValue.ToEntero(), DdlUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero(), DdlClasificacion.SelectedItem.Text,
|
||||||
CvePS, "", TxtObsPS.Text.TrimEnd, PU, ObjDescuento.ImporteDescuento,
|
CvePS, "", TxtObsPS.Text.TrimEnd, PU, ObjDescuento.ImporteDescuento,
|
||||||
DdlProyecto.SelectedValue.ToEntero(), DdlProyecto.SelectedItem.Text, DdlSubProyecto.SelectedValue.ToEntero(), DdlSubProyecto.SelectedItem.Text,
|
DdlProyecto.SelectedValue.ToEntero(), DdlProyecto.SelectedItem.Text, DdlSubProyecto.SelectedValue.ToEntero(), DdlSubProyecto.SelectedItem.Text,
|
||||||
Serie:=If(DIVCod.Visible, TxtCodigoSerie.Text.Trim, ""), TiempoEntrega:=TxtTiempoEntrega.Text, CuentaPredial:=TxtCuentaPredial.Text.Trim, RegeneraIEPS:=ClienteDesglosaIEPS, CvePromocionDetalle:=ObjDescuento.CvePromocionDetalle,
|
Serie:=If(DIVCod.Visible, TxtCodigoSerie.Text.Trim, ""), TiempoEntrega:=TxtTiempoEntrega.Text, CuentaPredial:=TxtCuentaPredial.Text.Trim, RegeneraIEPS:=ClienteDesglosaIEPS, CvePromocionDetalle:=ObjDescuento.CvePromocionDetalle,
|
||||||
ImporteProntoPago:=ObjDescuento.ImporteProntoPago, ObjDescuento:=ObjDescuento)
|
ImporteProntoPago:=ObjDescuento.ImporteProntoPago, ObjDescuento:=ObjDescuento, CvePrecioLista:=CvePrecioListaPS, PrecioLista:=PrecioListaPS)
|
||||||
|
|
||||||
CalculaUsados()
|
CalculaUsados()
|
||||||
|
|
||||||
@@ -19079,7 +19031,7 @@ Partial Class Ventas
|
|||||||
Optional EntregaDirecta As Integer = 0, Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0,
|
Optional EntregaDirecta As Integer = 0, Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0,
|
||||||
Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0, Optional CuentaPredial As String = "",
|
Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0, Optional CuentaPredial As String = "",
|
||||||
Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional SeActualiza As Boolean = False, Optional CvePromocionDetalle As Integer = -1, Optional EsCargo As Boolean = False,
|
Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional SeActualiza As Boolean = False, Optional CvePromocionDetalle As Integer = -1, Optional EsCargo As Boolean = False,
|
||||||
Optional ImporteProntoPago As Decimal = 0, Optional ByRef ObjDescuento As Modelos.VentaDescuentos = Nothing) As Boolean
|
Optional ImporteProntoPago As Decimal = 0, Optional ByRef ObjDescuento As Modelos.VentaDescuentos = Nothing, Optional CvePrecioLista As Integer = -1, Optional PrecioLista As String = "") As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
Try
|
Try
|
||||||
@@ -19335,6 +19287,9 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Row("CvePrecioLista") = CvePrecioLista
|
||||||
|
Row("PrecioLista") = PrecioLista
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(119, 13, 83) Then
|
If UsuarioActual.CveEmpresa.Contiene(119, 13, 83) Then
|
||||||
If Not RemisionesLista.Count > 0 Then 'SI VIENE DE REMISION NO SE CONSIDERA
|
If Not RemisionesLista.Count > 0 Then 'SI VIENE DE REMISION NO SE CONSIDERA
|
||||||
|
|
||||||
@@ -19569,6 +19524,9 @@ Partial Class Ventas
|
|||||||
TmpDT.Columns.Add("CodigoObjetoImpuesto", GetType(String))
|
TmpDT.Columns.Add("CodigoObjetoImpuesto", GetType(String))
|
||||||
TmpDT.Columns.Add("CveMarca", GetType(Integer))
|
TmpDT.Columns.Add("CveMarca", GetType(Integer))
|
||||||
|
|
||||||
|
TmpDT.Columns.Add("CvePrecioLista", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("PrecioLista", GetType(String))
|
||||||
|
|
||||||
TmpDT.Columns("EsOutSourcing").DefaultValue = False
|
TmpDT.Columns("EsOutSourcing").DefaultValue = False
|
||||||
TmpDT.Columns("EsCargo").DefaultValue = False
|
TmpDT.Columns("EsCargo").DefaultValue = False
|
||||||
|
|
||||||
@@ -22295,7 +22253,7 @@ Partial Class Ventas
|
|||||||
Row("PU").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("ImporteIVA").ToString().ToDouble, Math.Round((Row("Total").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)) * (1 + Row("PorcentajeIVA").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)))), 6),
|
Row("PU").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("ImporteIVA").ToString().ToDouble, Math.Round((Row("Total").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)) * (1 + Row("PorcentajeIVA").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)))), 6),
|
||||||
Row("Obs").ToString(), Row("Descuento").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("TipoDescuento").ToString().ToEntero(), Row("CveSubProyecto").ToString().ToEntero(), Row("CvePresupuestoIngreso").ToString().ToEntero(), PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, IEPS:=Row("ImporteIEPS").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDouble, TiempoEntrega:=Row("TiempoEntrega").ToString(),
|
Row("Obs").ToString(), Row("Descuento").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("TipoDescuento").ToString().ToEntero(), Row("CveSubProyecto").ToString().ToEntero(), Row("CvePresupuestoIngreso").ToString().ToEntero(), PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, IEPS:=Row("ImporteIEPS").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDouble, TiempoEntrega:=Row("TiempoEntrega").ToString(),
|
||||||
CveVentaDetallePadre:=Row("CveVentaDetalle").ToString().ToEntero(), CveContratoDetalle:=Row("CveContratoDetalle").ToString().ToEntero(), CvePromocionDetalle:=If(DtPromociones IsNot Nothing, DtPromociones.FiltroPrimeroValor("CvePromocionDetalle", $"CvePS={Row("CvePS").ToString()}").ToEntero(), -1),
|
CveVentaDetallePadre:=Row("CveVentaDetalle").ToString().ToEntero(), CveContratoDetalle:=Row("CveContratoDetalle").ToString().ToEntero(), CvePromocionDetalle:=If(DtPromociones IsNot Nothing, DtPromociones.FiltroPrimeroValor("CvePromocionDetalle", $"CvePS={Row("CvePS").ToString()}").ToEntero(), -1),
|
||||||
ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDouble, ImporteRetISR:=Row("ImporteRetISR").ToString().ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDouble, CuentaPredial:=Row("CuentaPredial").ToString()) Then
|
ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDouble, ImporteRetISR:=Row("ImporteRetISR").ToString().ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDouble, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero()) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
Else
|
||||||
@@ -23478,7 +23436,7 @@ Partial Class Ventas
|
|||||||
RFVCiudadC.Visible = False
|
RFVCiudadC.Visible = False
|
||||||
RFVLocalidadC.Visible = False
|
RFVLocalidadC.Visible = False
|
||||||
RFVSATPais.Visible = False
|
RFVSATPais.Visible = False
|
||||||
divRegimenCliente.Visible = UsuarioActual.Empresa.Funcionalidad(350) = "1"
|
divRegimenCliente.Visible = True
|
||||||
|
|
||||||
RdTipoPersona.SelectedValue = "0"
|
RdTipoPersona.SelectedValue = "0"
|
||||||
|
|
||||||
@@ -23508,7 +23466,7 @@ Partial Class Ventas
|
|||||||
DivCorreoCuentaCliente.Visible = True
|
DivCorreoCuentaCliente.Visible = True
|
||||||
DivBotonesAgregarCliente.Visible = True
|
DivBotonesAgregarCliente.Visible = True
|
||||||
DivFormaCliente.Visible = True
|
DivFormaCliente.Visible = True
|
||||||
divRegimenCliente.Visible = UsuarioActual.Empresa.Funcionalidad(350) = "1"
|
divRegimenCliente.Visible = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ObjCliente.Dispose()
|
ObjCliente.Dispose()
|
||||||
@@ -23541,17 +23499,13 @@ Partial Class Ventas
|
|||||||
Else
|
Else
|
||||||
Dim RegimenFiscalCliente As String = "-1"
|
Dim RegimenFiscalCliente As String = "-1"
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso DdlRegimenFiscalCliente.SelectedValue.ToEntero() > 0 Then
|
If DdlRegimenFiscalCliente.SelectedValue.ToEntero() > 0 Then
|
||||||
RegimenFiscalCliente = GlobalDTRegimenesFiscales().FiltroPrimeroValor("CodigoRegimenFiscal", $"CveRegimenFiscal = {DdlRegimenFiscalCliente.SelectedValue.ToEntero()}")
|
RegimenFiscalCliente = GlobalDTRegimenesFiscales().FiltroPrimeroValor("CodigoRegimenFiscal", $"CveRegimenFiscal = {DdlRegimenFiscalCliente.SelectedValue.ToEntero()}")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DdlUsoCFDICliente.Items.Clear()
|
DdlUsoCFDICliente.Items.Clear()
|
||||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
|
||||||
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
|
DdlUsoCFDICliente.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente)
|
||||||
DdlUsoCFDICliente.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente)
|
|
||||||
Else
|
|
||||||
DdlUsoCFDICliente.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente)
|
|
||||||
End If
|
|
||||||
|
|
||||||
DdlUsoCFDICliente.DataBind()
|
DdlUsoCFDICliente.DataBind()
|
||||||
DdlUsoCFDICliente.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlUsoCFDICliente.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
@@ -23573,44 +23527,41 @@ Partial Class Ventas
|
|||||||
Dim CveRegimenFiscal As Integer = -1
|
Dim CveRegimenFiscal As Integer = -1
|
||||||
Dim CveUsoCFDI As Integer = 3
|
Dim CveUsoCFDI As Integer = 3
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
CveRegimenFiscal = DdlRegimenFiscalCliente.SelectedValue.ToEntero()
|
||||||
CveRegimenFiscal = DdlRegimenFiscalCliente.SelectedValue.ToEntero()
|
CveUsoCFDI = DdlUsoCFDICliente.SelectedValue.ToEntero()
|
||||||
CveUsoCFDI = DdlUsoCFDICliente.SelectedValue.ToEntero()
|
|
||||||
|
|
||||||
Dim RegimenFiscalCliente As String = "-1"
|
Dim RegimenFiscalCliente As String = "-1"
|
||||||
|
|
||||||
If DdlRegimenFiscalCliente.SelectedValue.ToEntero() > 0 Then
|
If DdlRegimenFiscalCliente.SelectedValue.ToEntero() > 0 Then
|
||||||
RegimenFiscalCliente = GlobalDTRegimenesFiscales().FiltroPrimeroValor("CodigoRegimenFiscal", $"CveRegimenFiscal = {CveRegimenFiscal}")
|
RegimenFiscalCliente = GlobalDTRegimenesFiscales().FiltroPrimeroValor("CodigoRegimenFiscal", $"CveRegimenFiscal = {CveRegimenFiscal}")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscalCliente.SelectedValue <> "11" Then
|
If TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscalCliente.SelectedValue <> "11" Then
|
||||||
Alert("El Regimen fiscal del cliente debe ser <b>'616 - Sin obligaciones fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
Alert("El Regimen fiscal del cliente debe ser <b>'616 - Sin obligaciones fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDICliente.SelectedValue <> "23" Then
|
If TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDICliente.SelectedValue <> "23" Then
|
||||||
Alert("El uso cfdi del cliente debe ser <b>'S01 - Sin efectos fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
Alert("El uso cfdi del cliente debe ser <b>'S01 - Sin efectos fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscalCliente.SelectedValue = "11" Then
|
If Not TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscalCliente.SelectedValue = "11" Then
|
||||||
Alert("El Regimen fiscal del cliente no puede ser <b>'616 - Sin obligaciones fiscales'</b> si no se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
Alert("El Regimen fiscal del cliente no puede ser <b>'616 - Sin obligaciones fiscales'</b> si no se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDICliente.SelectedValue = "23" Then
|
If Not TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDICliente.SelectedValue = "23" Then
|
||||||
Alert("El uso cfdi del cliente no puede ser <b>'S01 - Sin efectos fiscales'</b> si no se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
Alert("El uso cfdi del cliente no puede ser <b>'S01 - Sin efectos fiscales'</b> si no se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
|
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
|
||||||
Dim DtUsosCFDI = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente).FiltraParametros($"CveUsoCFDI = {CveUsoCFDI}")
|
Dim DtUsosCFDI = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente).FiltraParametros($"CveUsoCFDI = {CveUsoCFDI}")
|
||||||
|
|
||||||
If DtUsosCFDI.Rows.Count = 0 Then
|
|
||||||
Alert("El Uso CFDI no corresponde con el tipo de persona (fisca, moral) y el régimen fiscal.", TipoMensaje.MsgAdvertencia)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
If DtUsosCFDI.Rows.Count = 0 Then
|
||||||
|
Alert("El Uso CFDI no corresponde con el tipo de persona (fisca, moral) y el régimen fiscal.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DdlSubProyectoDatos.SelectedValue.ToEntero() > 0 Then
|
If DdlSubProyectoDatos.SelectedValue.ToEntero() > 0 Then
|
||||||
@@ -25672,7 +25623,8 @@ Partial Class Ventas
|
|||||||
If CvePS > 0 Then
|
If CvePS > 0 Then
|
||||||
|
|
||||||
If PrecioUnitario <= 0 Then
|
If PrecioUnitario <= 0 Then
|
||||||
PrecioUnitario = CalculaPrecioSugerido(CvePS, CveClasificacion)
|
Dim ObjPrecioSugerido = CalculaPrecioSugerido(CvePS, CveClasificacion)
|
||||||
|
PrecioUnitario = ObjPrecioSugerido.PrecioSugerido
|
||||||
End If
|
End If
|
||||||
|
|
||||||
AgregarProductoServicio(Cantidad, CveUM, UM, -1, "",
|
AgregarProductoServicio(Cantidad, CveUM, UM, -1, "",
|
||||||
@@ -33056,6 +33008,10 @@ Partial Class Ventas
|
|||||||
'REMOVER EVENTO PARA RECARGAR ALMACEN
|
'REMOVER EVENTO PARA RECARGAR ALMACEN
|
||||||
'spanAlmacen.Attributes.Remove("onclick")
|
'spanAlmacen.Attributes.Remove("onclick")
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(360) = "1" Then
|
||||||
|
CargaListasPrecios()
|
||||||
|
End If
|
||||||
|
|
||||||
HdnCargarInventario.Value = "False"
|
HdnCargarInventario.Value = "False"
|
||||||
UpParametros.Update()
|
UpParametros.Update()
|
||||||
|
|
||||||
@@ -34938,19 +34894,15 @@ Partial Class Ventas
|
|||||||
ObjFacturaProntoPago.Fecha = Now
|
ObjFacturaProntoPago.Fecha = Now
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
ObjFacturaProntoPago.Version = "4.0"
|
||||||
ObjFacturaProntoPago.Version = "4.0"
|
|
||||||
|
|
||||||
If ObjFacturaProntoPago.Cliente Is Nothing Then
|
If ObjFacturaProntoPago.Cliente Is Nothing Then
|
||||||
ObjFacturaProntoPago.Cliente = New Modelos.ClienteModel
|
ObjFacturaProntoPago.Cliente = New Modelos.ClienteModel
|
||||||
End If
|
|
||||||
|
|
||||||
ObjFacturaProntoPago.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
|
|
||||||
ObjFacturaProntoPago.Cliente.RegimenFiscal = ClienteRegimenFiscal
|
|
||||||
Else
|
|
||||||
ObjFacturaProntoPago.Version = "3.3"
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
ObjFacturaProntoPago.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
|
||||||
|
ObjFacturaProntoPago.Cliente.RegimenFiscal = ClienteRegimenFiscal
|
||||||
|
|
||||||
ObjFacturaProntoPago.CveMetodoPago33 = 1
|
ObjFacturaProntoPago.CveMetodoPago33 = 1
|
||||||
ObjFacturaProntoPago.MetodoPago33 = "Pago en una sola exhibición"
|
ObjFacturaProntoPago.MetodoPago33 = "Pago en una sola exhibición"
|
||||||
ObjFacturaProntoPago.ClaveMetodoPagoSAT = "PUE"
|
ObjFacturaProntoPago.ClaveMetodoPagoSAT = "PUE"
|
||||||
@@ -35354,7 +35306,8 @@ Partial Class Ventas
|
|||||||
TmpDT.Columns.Add("CveTamaño", GetType(Integer))
|
TmpDT.Columns.Add("CveTamaño", GetType(Integer))
|
||||||
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
|
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
|
||||||
TmpDT.Columns.Add("CveMarca", GetType(Integer))
|
TmpDT.Columns.Add("CveMarca", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("CvePrecioLista", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("PrecioLista", GetType(String))
|
||||||
Return TmpDT
|
Return TmpDT
|
||||||
End Function
|
End Function
|
||||||
Private Function InicializaDTVentasNCProntoPago() As DataTable
|
Private Function InicializaDTVentasNCProntoPago() As DataTable
|
||||||
@@ -35653,40 +35606,36 @@ Partial Class Ventas
|
|||||||
DVRegimenSociedad.Visible = False
|
DVRegimenSociedad.Visible = False
|
||||||
DivRazonSocial2.Attributes.Add("class", "col-md-12")
|
DivRazonSocial2.Attributes.Add("class", "col-md-12")
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then
|
DivRazonSocial2.Attributes.Add("class", "col-md-8")
|
||||||
|
DVRegimenSociedad.Visible = True
|
||||||
|
|
||||||
DivRazonSocial2.Attributes.Add("class", "col-md-8")
|
If TxtRFCCliente.Text.ToUpper = "XAXX010101000" Then
|
||||||
DVRegimenSociedad.Visible = True
|
DdlRegimenFiscalCliente.DataSource = GlobalDTRegimenesFiscales().FiltraParametros("CveRegimenFiscal = 11")
|
||||||
|
DdlRegimenFiscalCliente.DataBind()
|
||||||
|
Else
|
||||||
|
Dim dt As DataTable = GlobalDTRegimenesFiscales(RdTipoPersona.SelectedValue.ToEntero).FiltraParametros("", "CodigoRegimenFiscal")
|
||||||
|
Dim Val As String = ""
|
||||||
|
|
||||||
If TxtRFCCliente.Text.ToUpper = "XAXX010101000" Then
|
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||||
DdlRegimenFiscalCliente.DataSource = GlobalDTRegimenesFiscales().FiltraParametros("CveRegimenFiscal = 11")
|
'verifico que sino existe el valor. lo limpie
|
||||||
DdlRegimenFiscalCliente.DataBind()
|
Val = dt.FiltroPrimeroValor("CveRegimenFiscal", "CveRegimenFiscal = " & DdlRegimenFiscalCliente.SelectedValue)
|
||||||
Else
|
If Val = "" Then 'sino encuentra valor, lo limpia
|
||||||
Dim dt As DataTable = GlobalDTRegimenesFiscales(RdTipoPersona.SelectedValue.ToEntero).FiltraParametros("", "CodigoRegimenFiscal")
|
DdlRegimenFiscalCliente.Items.Clear()
|
||||||
Dim Val As String = ""
|
DdlRegimenFiscalCliente.SelectedValue = Nothing
|
||||||
|
|
||||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
|
||||||
'verifico que sino existe el valor. lo limpie
|
|
||||||
Val = dt.FiltroPrimeroValor("CveRegimenFiscal", "CveRegimenFiscal = " & DdlRegimenFiscalCliente.SelectedValue)
|
|
||||||
If Val = "" Then 'sino encuentra valor, lo limpia
|
|
||||||
DdlRegimenFiscalCliente.Items.Clear()
|
|
||||||
DdlRegimenFiscalCliente.SelectedValue = Nothing
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DdlRegimenFiscalCliente.DataSource = dt
|
|
||||||
DdlRegimenFiscalCliente.DataBind()
|
|
||||||
DdlRegimenFiscalCliente.SelectedValueExist(Val)
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DdlRegimenFiscalCliente.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlRegimenFiscalCliente.DataSource = dt
|
||||||
|
DdlRegimenFiscalCliente.DataBind()
|
||||||
DdlUsoCFDICliente.Items.Clear()
|
DdlRegimenFiscalCliente.SelectedValueExist(Val)
|
||||||
DdlUsoCFDICliente.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
DdlRegimenFiscalCliente.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
|
DdlUsoCFDICliente.Items.Clear()
|
||||||
|
DdlUsoCFDICliente.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
UpAgregarCliente.Update()
|
UpAgregarCliente.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -36466,7 +36415,7 @@ Partial Class Ventas
|
|||||||
PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
|
PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
CvePrecioLista = CvePrecioListaPS
|
Me.CvePrecioLista = CvePrecioListaPS
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -36808,5 +36757,20 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub DdlPrecioLista_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
If DivPrecioLista.Visible AndAlso DdlPrecioLista.SelectedValue.ToEntero() > 0 Then
|
||||||
|
Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero()).FiltroPrimero("")
|
||||||
|
|
||||||
|
Dim ObjPrecioSugerido = CalculaPrecioSugerido(drPS("CvePS").ToString().ToEntero(), drPS("CveClasificacion").ToString().ToEntero(), CvePrecioListaSugerido:=DdlPrecioLista.SelectedValue.ToEntero())
|
||||||
|
|
||||||
|
If ObjPrecioSugerido.PrecioSugerido > 0 Then
|
||||||
|
TxtPrecio.Text = ObjPrecioSugerido.PrecioSugerido.ToString("#,###.####")
|
||||||
|
Else
|
||||||
|
Alert("No se encontro un precio para este producto en la lista de precios seleccionada")
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user