Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -423,7 +423,7 @@ Public Class ClsContratos
|
||||
Optional CveContratosEstatus As Integer = -1, Optional CveContratoTipo As Integer = -1, Optional TipoCambio As Double = 1.0, Optional CveSucursalCliente As Integer = -1, Optional CveAlmacenOrigen As Integer = -1, Optional CveAlmacenDestino As Integer = -1, Optional PorcentajeComision As Integer = -1,
|
||||
Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1,
|
||||
Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional FacturacionCicilica As Boolean = False, Optional FacturacionCiclicaAutomatico As Boolean = False,
|
||||
Optional DiaMesFacturacion As Integer = 1, Optional CvePeriodo As Integer = -1, Optional ObservacionesGenerales As String = "", Optional CveTipoAF As Integer = Nothing, Optional CveChofer As Integer = Nothing, Optional CveChofer2 As Integer = Nothing, Optional CveAF As Integer = Nothing, Optional CantidadPasajeros As Integer = Nothing, Optional CveRuta As Integer = Nothing, Optional CvePartida As Integer = Nothing, Optional CveDestino As Integer = Nothing, Optional CveMasivo As Integer = Nothing) As Boolean
|
||||
Optional DiaMesFacturacion As Integer = 1, Optional CvePeriodo As Integer = -1, Optional ObservacionesGenerales As String = "", Optional CveTipoAF As Integer = Nothing, Optional CveChofer As Integer = Nothing, Optional CveChofer2 As Integer = Nothing, Optional CveAF As Integer = Nothing, Optional CantidadPasajeros As Integer = Nothing, Optional CvePartida As Integer = Nothing, Optional CveDestino As Integer = Nothing, Optional CveMasivo As Integer = Nothing) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Con_ContratosUpdate")
|
||||
@@ -484,7 +484,6 @@ Public Class ClsContratos
|
||||
.Add("@CveChofer2", SqlDbType.Int).Value = CveChofer2
|
||||
.Add("@CveAF", SqlDbType.Int).Value = CveAF
|
||||
.Add("@CantidadPasajeros", SqlDbType.Int).Value = CantidadPasajeros
|
||||
.Add("@CveRuta", SqlDbType.Int).Value = CveRuta
|
||||
.Add("@CvePartida", SqlDbType.Int).Value = CvePartida
|
||||
.Add("@CveDestino", SqlDbType.Int).Value = CveDestino
|
||||
.Add("@CveMasivo", SqlDbType.Int).Value = CveMasivo
|
||||
|
||||
@@ -2178,7 +2178,7 @@ Public Class ClsInventarios
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetExistenciasProductosLike(PS As String, CveClasificacion As Integer, CveSubProyecto As Integer, Estatus As Integer, AplicaParaVenta As Integer, CveEmpresa As Integer, Optional CveMarca As Integer = -1, Optional MostrarTodosAlmacenes As Boolean = False) As Boolean
|
||||
Public Function GetExistenciasProductosLike(PS As String, CveClasificacion As Integer, CveSubProyecto As Integer, Estatus As Integer, AplicaParaVenta As Integer, CveEmpresa As Integer, Optional CveMarca As Integer = -1, Optional MostrarTodosAlmacenes As Boolean = False, Optional CveAlmacen As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_ProductosServiciosInventario")
|
||||
@@ -2191,6 +2191,7 @@ Public Class ClsInventarios
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||
.Add("@MostrarTodosAlmacenes", SqlDbType.Bit).Value = MostrarTodosAlmacenes
|
||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -652,7 +652,7 @@ Public Class ClsOS
|
||||
CveUsuario As Integer, CveEmpresa As Integer, CveCotizacion As Integer, CveVenta As Integer, CveOSPadre As Integer, CveOSTipo As Integer, Optional CveClienteSucursal As Integer = -1,
|
||||
Optional Direccion As String = "-1", Optional Telefono As String = "", Optional CveModeloAuto As Integer = -1, Optional Año As String = "-1", Optional Correo As String = "",
|
||||
Optional Condiciones As String = "", Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1, Optional FechaCita As DateTime = MinFecha,
|
||||
Optional Paciente As String = "-1", Optional IdentificadorCliente As String = "-1") As Boolean
|
||||
Optional Paciente As String = "-1", Optional IdentificadorCliente As String = "-1", Optional FolioAdicional As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OS_OrdenesServiciosAdd")
|
||||
@@ -686,6 +686,8 @@ Public Class ClsOS
|
||||
|
||||
.Add("@Paciente", SqlDbType.VarChar).Value = Paciente
|
||||
.Add("@IdentificadorCliente", SqlDbType.VarChar).Value = IdentificadorCliente
|
||||
.Add("@FolioAdicional", SqlDbType.VarChar).Value = FolioAdicional
|
||||
|
||||
|
||||
.Add("@CveOS", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@vFolio", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
@@ -732,7 +734,7 @@ Public Class ClsOS
|
||||
CveOSTipo As Integer, Optional CveClienteSucursal As Integer = -1, Optional Direccion As String = "-1", Optional Telefono As String = "", Optional CveModeloAuto As Integer = -1,
|
||||
Optional Año As String = "-1", Optional CveSubProyecto As Integer = -1, Optional Correo As String = "-1", Optional Condiciones As String = "",
|
||||
Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1, Optional FechaCita As DateTime = MinFecha,
|
||||
Optional Paciente As String = "-1", Optional IdentificadorCliente As String = "-1") As Boolean
|
||||
Optional Paciente As String = "-1", Optional IdentificadorCliente As String = "-1", Optional FolioAdicional As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OS_OrdenesServiciosUpdate")
|
||||
@@ -761,6 +763,7 @@ Public Class ClsOS
|
||||
.Add("@FechaCita", SqlDbType.DateTime).Value = FechaCita
|
||||
.Add("@Paciente", SqlDbType.VarChar).Value = Paciente
|
||||
.Add("@IdentificadorCliente", SqlDbType.VarChar).Value = IdentificadorCliente
|
||||
.Add("@FolioAdicional", SqlDbType.VarChar).Value = FolioAdicional
|
||||
|
||||
End With
|
||||
|
||||
|
||||
@@ -7020,6 +7020,7 @@ Public Class ClsPaginas
|
||||
params.Add(New ReportParameter("FechaCirugia", Vta.FechaEjecucion.ToString("dd/MM/yyyy HH:mm")))
|
||||
params.Add(New ReportParameter("Paciente", Vta.Paciente))
|
||||
params.Add(New ReportParameter("Episodio", Vta.Episodio))
|
||||
params.Add(New ReportParameter("Alfa1", Vta.Alfa1))
|
||||
|
||||
End If
|
||||
'VSH
|
||||
|
||||
@@ -927,6 +927,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
Dim UsoClasificacion = IfNull(context.Request("usoclasificacion"), "-1").ToString.ToEntero
|
||||
Dim AplicaParaVenta = IfNull(context.Request("aplicaparaventa"), "1").ToString.ToEntero
|
||||
Dim CveMarca = IfNull(context.Request("cvemarca"), "-1").ToString.ToEntero
|
||||
Dim CveAlmacen = IfNull(context.Request("cvealmacen"), "-1").ToString.ToEntero
|
||||
|
||||
Dim UsaGlobal As Boolean = True
|
||||
Dim MostrarTodosAlmacenes As Boolean = False
|
||||
@@ -941,7 +942,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
Dim objInv As New ClsInventarios
|
||||
Try
|
||||
If objInv.GetExistenciasProductosLike(Name, CveClasificacion, CveSubProyecto, Estatus.ToEntero, AplicaParaVenta, CveEmpresa, CveMarca, MostrarTodosAlmacenes:=MostrarTodosAlmacenes) Then
|
||||
If objInv.GetExistenciasProductosLike(Name, CveClasificacion, CveSubProyecto, Estatus.ToEntero, AplicaParaVenta, CveEmpresa, CveMarca, MostrarTodosAlmacenes:=MostrarTodosAlmacenes, CveAlmacen:=CveAlmacen) Then
|
||||
|
||||
' limpio los almacenes donde no tiene ningun producto existencia
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
<Relations isList="true" count="0" />
|
||||
<Report isRef="0" />
|
||||
<Resources isList="true" count="0" />
|
||||
<Variables isList="true" count="93">
|
||||
<Variables isList="true" count="94">
|
||||
<value>ReportParameters,ClienteCodigo,ClienteCodigo,ReportParameter1,System.String,,False,False,True,False,_x003C__x003F_xml_x0020_version_x003D__x0022_1.0_x0022__x0020_encoding_x003D__x0022_utf-16_x0022__x0020_standalone_x003D__x0022_yes_x0022__x003F__x003E__x003C_StiSerializer_x0020_version_x003D__x0022_1.02_x0022__x0020_type_x003D__x0022_Net_x0022__x0020_application_x003D__x0022_State_x0022__x003E__x003C_SortDirection_x003E_None_x003C__x002F_SortDirection_x003E__x003C_BindingVariable_x0020_isNull_x003D__x0022_true_x0022__x0020__x002F__x003E__x003C_Keys_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_Values_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_CheckedStates_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C__x002F_StiSerializer_x003E_,_x0035_4a879e0a10d464ba2f01e0372efb9ca</value>
|
||||
<value>ReportParameters,ClienteTelefono,ClienteTelefono,ReportParameter1,System.String,,False,False,True,False,,_x0036_22a3a61b2f247a6ab5d7dc6c66568db</value>
|
||||
<value>ReportParameters,ClienteContacto,ClienteContacto,ReportParameter1,System.String,,False,False,True,False,,_x0035_c52eccfce4d4681a1c62017e690c7c1</value>
|
||||
@@ -179,6 +179,7 @@
|
||||
<value>ReportParameters,FechaCirugia,FechaCirugia,,System.String,,False,False,True,False,_x003C__x003F_xml_x0020_version_x003D__x0022_1.0_x0022__x0020_encoding_x003D__x0022_utf-16_x0022__x0020_standalone_x003D__x0022_yes_x0022__x003F__x003E__x003C_StiSerializer_x0020_version_x003D__x0022_1.02_x0022__x0020_type_x003D__x0022_Net_x0022__x0020_application_x003D__x0022_State_x0022__x003E__x003C_SortDirection_x003E_None_x003C__x002F_SortDirection_x003E__x003C_BindingVariable_x0020_isNull_x003D__x0022_true_x0022__x0020__x002F__x003E__x003C_Keys_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_Values_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_CheckedStates_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_DateTimeType_x003E_DateAndTime_x003C__x002F_DateTimeType_x003E__x003C__x002F_StiSerializer_x003E_,_x0039_11bc963c59b4b6cb4b0ce36a86c40e1</value>
|
||||
<value>ReportParameters,Paciente,Paciente,ReportParameter1,System.String,,False,False,True,False,_x003C__x003F_xml_x0020_version_x003D__x0022_1.0_x0022__x0020_encoding_x003D__x0022_utf-16_x0022__x0020_standalone_x003D__x0022_yes_x0022__x003F__x003E__x003C_StiSerializer_x0020_version_x003D__x0022_1.02_x0022__x0020_type_x003D__x0022_Net_x0022__x0020_application_x003D__x0022_State_x0022__x003E__x003C_SortDirection_x003E_None_x003C__x002F_SortDirection_x003E__x003C_BindingVariable_x0020_isNull_x003D__x0022_true_x0022__x0020__x002F__x003E__x003C_Keys_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_Values_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_CheckedStates_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_DateTimeType_x003E_DateAndTime_x003C__x002F_DateTimeType_x003E__x003C_CheckedColumn_x003E_null_x003B__x003C__x002F_CheckedColumn_x003E__x003C__x002F_StiSerializer_x003E_</value>
|
||||
<value>ReportParameters,Episodio,Episodio,ReportParameter1,System.String,,False,False,True,False,_x003C__x003F_xml_x0020_version_x003D__x0022_1.0_x0022__x0020_encoding_x003D__x0022_utf-16_x0022__x0020_standalone_x003D__x0022_yes_x0022__x003F__x003E__x003C_StiSerializer_x0020_version_x003D__x0022_1.02_x0022__x0020_type_x003D__x0022_Net_x0022__x0020_application_x003D__x0022_State_x0022__x003E__x003C_SortDirection_x003E_None_x003C__x002F_SortDirection_x003E__x003C_BindingVariable_x0020_isNull_x003D__x0022_true_x0022__x0020__x002F__x003E__x003C_Keys_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_Values_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_CheckedStates_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_DateTimeType_x003E_DateAndTime_x003C__x002F_DateTimeType_x003E__x003C_CheckedColumn_x003E_null_x003B__x003C__x002F_CheckedColumn_x003E__x003C__x002F_StiSerializer_x003E_</value>
|
||||
<value>ReportParameters,Alfa1,Alfa1,ReportParameter1,System.String,,False,False,True,False,_x003C__x003F_xml_x0020_version_x003D__x0022_1.0_x0022__x0020_encoding_x003D__x0022_utf-16_x0022__x0020_standalone_x003D__x0022_yes_x0022__x003F__x003E__x003C_StiSerializer_x0020_version_x003D__x0022_1.02_x0022__x0020_type_x003D__x0022_Net_x0022__x0020_application_x003D__x0022_State_x0022__x003E__x003C_SortDirection_x003E_None_x003C__x002F_SortDirection_x003E__x003C_BindingVariable_x0020_isNull_x003D__x0022_true_x0022__x0020__x002F__x003E__x003C_Keys_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_Values_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_CheckedStates_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_DateTimeType_x003E_DateAndTime_x003C__x002F_DateTimeType_x003E__x003C_CheckedColumn_x003E_null_x003B__x003C__x002F_CheckedColumn_x003E__x003C__x002F_StiSerializer_x003E_</value>
|
||||
</Variables>
|
||||
</Dictionary>
|
||||
<EngineVersion>EngineV2</EngineVersion>
|
||||
@@ -1488,7 +1489,8 @@ Sello digital del SAT:
|
||||
<Page isRef="7" />
|
||||
<Parent isRef="62" />
|
||||
<Text>Paciente: {Paciente}
|
||||
Episodio: {Episodio}</Text>
|
||||
Episodio: {Episodio}
|
||||
Folio Remisión: {Alfa1}</Text>
|
||||
<TextBrush>Black</TextBrush>
|
||||
<Type>Expression</Type>
|
||||
</Text9>
|
||||
|
||||
@@ -1627,6 +1627,12 @@ Partial Class General_SaldosIniciales
|
||||
TotalDetalles = (CantidadDetalle * PUDetalle) + IVA - RetIVA - RetISR + IEPSDetalle
|
||||
End If
|
||||
|
||||
If Math.Abs(TotalDetalles - Total) > 0.01 Then
|
||||
ErrorCompras = True
|
||||
Alert($"Registro {CountRow} El total no councide con el calculo de los detalles, total: {Total.ToString("###,###,###.00")} calculo detatalles: {TotalDetalles.ToString("###,###,###.00")}", TipoMensaje.MsgAdvertencia)
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If Not ObjCompras.AddCompraDetalle(CveCompra, CveUnidadMedida, CvePS, CveSubProyecto, -1, 0, CantidadDetalle, PUDetalle, (CantidadDetalle * PUDetalle) * PorcentajeIVA, TotalDetalles, 0, "Carga Inicial", -1, IVAPorcentaje:=PorcentajeIVA, RetIVAPorcentaje:=RetIVAPorcentaje, RetISRPorcentaje:=RetISRPorcentaje, IEPSPS:=IEPSDetalle) Then
|
||||
ErrorCompras = True
|
||||
Exit For
|
||||
@@ -1756,6 +1762,7 @@ Partial Class General_SaldosIniciales
|
||||
Dim FolioFiscal As String = If(dt.Columns.Contains("Folio Fiscal"), Row("Folio Fiscal").ToString(), "")
|
||||
Dim PorcentajeIVA As Decimal = If(dt.Columns.Contains("PorcentajeIVA"), Round(Row("PorcentajeIVA").ToString().ToDecimal, 4), 0)
|
||||
Dim PorcentajeRetIVA As Decimal = If(dt.Columns.Contains("PorcentajeRetIVA"), Round(Row("PorcentajeRetIVA").ToString().ToDecimal, 4), 0)
|
||||
Dim PorcentajeRetISR As Decimal = If(dt.Columns.Contains("PorcentajeRetISR"), Round(Row("PorcentajeRetISR").ToString().ToDecimal, 4), 0)
|
||||
|
||||
Dim PedidoContrato As String = If(dt.Columns.Contains("Pedido"), Row("Pedido").ToString(), "")
|
||||
|
||||
@@ -1882,9 +1889,14 @@ Partial Class General_SaldosIniciales
|
||||
TotalDetalles = (CantidadDetalle * PUDetalle) + IVA - RetIVA - RetISR + IEPSDetalle
|
||||
End If
|
||||
|
||||
If Math.Abs(TotalDetalles - Total) > 0.01 Then
|
||||
ErrorVentas = True
|
||||
Alert($"Registro {CountRow} El total no councide con el calculo de los detalles, total: {Total.ToString("###,###,###.00")} calculo detatalles: {TotalDetalles.ToString("###,###,###.00")}", TipoMensaje.MsgAdvertencia)
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If Not ObjVentas.AddVentaDetalle(CveVenta, CvePS, CantidadDetalle, CveUnidadMedida, PUDetalle * CantidadDetalle, IVADetalle, TotalDetalles, "Saldo Inicial", 0, 0, Sucursal.ToEntero(), 0,
|
||||
PorcentajeIVA:=PorcentajeIVA, PorcentajeRetIVA:=PorcentajeRetIVA, ImporteRetIVA:=RetIVA, IEPS:=IEPSDetalle) Then
|
||||
PorcentajeIVA:=PorcentajeIVA, PorcentajeRetIVA:=PorcentajeRetIVA, ImporteRetIVA:=RetIVA, IEPS:=IEPSDetalle, PorcentajeRetISR:=PorcentajeRetISR) Then
|
||||
ErrorVentas = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -1926,12 +1938,12 @@ Partial Class General_SaldosIniciales
|
||||
'If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IEPS, Folio.ToString(), 38, String.Format("{0}-{1}", Serie, Folio), CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=IEPS) Then ErrorVentas = True : Exit For
|
||||
|
||||
If RetIVA > 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, RetIVA, RetIVA, 8, Folio.ToString(), String.Format("{0}-{1}", Serie, Folio), CveVenta:=CveVenta, CveCliente:=CveCliente, PorcentajeImpuesto:=PorcentajeIVA, Contabilizable:=False) Then ErrorVentas = True : Exit For
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, RetIVA, RetIVA, 8, Folio.ToString(), String.Format("{0}-{1}", Serie, Folio), CveVenta:=CveVenta, CveCliente:=CveCliente, PorcentajeImpuesto:=PorcentajeRetIVA, Contabilizable:=False) Then ErrorVentas = True : Exit For
|
||||
End If
|
||||
|
||||
'If RetISR > 0 Then
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, RetISR, RetISR, 9, Folio.ToString(), String.Format("{0}-{1}", Serie, Folio), CveVenta:=CveVenta, CveCliente:=CveCliente, PorcentajeImpuesto:=Porce, Contabilizable:=False) Then ErrorVentas = True : Exit For
|
||||
'End If
|
||||
If RetISR > 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, RetISR, RetISR, 9, Folio.ToString(), String.Format("{0}-{1}", Serie, Folio), CveVenta:=CveVenta, CveCliente:=CveCliente, PorcentajeImpuesto:=PorcentajeRetISR, Contabilizable:=False) Then ErrorVentas = True : Exit For
|
||||
End If
|
||||
|
||||
If ImpuestoLocal > 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImpuestoLocal, ImpuestoLocal, 27, Folio.ToString(), String.Format("{0}-{1}", Serie, Folio), CveVenta:=CveVenta, CveCliente:=CveCliente, PorcentajeImpuesto:=PorcentajeIVA, Contabilizable:=False) Then ErrorVentas = True : Exit For
|
||||
|
||||
@@ -297,7 +297,7 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-4" style="margin-top: 5px; text-align: left">
|
||||
<asp:Label runat="server" ID="LblFolioAdicional"></asp:Label>
|
||||
<asp:TextBox runat="server" ID="TxtFolioAdicional" MaxLength="50"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2" style="margin-top: 5px">
|
||||
|
||||
@@ -473,7 +473,7 @@ Partial Class OS_OrdenesServicios
|
||||
DVFechaCita2.Visible = True
|
||||
|
||||
DVEpisodioPaciente.Visible = True
|
||||
|
||||
DivFolioAdicional.Visible = True
|
||||
DvTxtPacienteModal.Visible = True
|
||||
DvTxtEpisodioModal.Visible = True
|
||||
DvTxtFolioRemisionModal.Visible = True
|
||||
@@ -733,8 +733,8 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
TxtPaciente.Text = ObjOS.Paciente
|
||||
TxtIdentificadorCliente.Text = ObjOS.IdentificadorCliente
|
||||
LblFolioAdicional.Text = ObjOS.FolioAdicional
|
||||
DivFolioAdicional.Visible = If(ObjOS.FolioAdicional.Trim.Length > 0, True, False)
|
||||
TxtFolioAdicional.Text = ObjOS.FolioAdicional
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1351,7 +1351,7 @@ Partial Class OS_OrdenesServicios
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCotizacion, -1, -1, DdlTipoOrdenOS.SelectedValue.ToEntero, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero,
|
||||
Direccion:=TxtDireccion.Text, Telefono:=TxtTelefono.Text, CveModeloAuto:=DdlModeloAuto.SelectedValue.ToEntero, Año:=TxtAnio.Text, CveMedico:=DdlMedico.SelectedValue.ToEntero,
|
||||
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=DdlTipoVenta.SelectedValue.ToEntero, FechaCita:=FechaCita,
|
||||
Paciente:=TxtPaciente.Text.Trim, IdentificadorCliente:=TxtIdentificadorCliente.Text.Trim) Then
|
||||
Paciente:=TxtPaciente.Text.Trim, IdentificadorCliente:=TxtIdentificadorCliente.Text.Trim, FolioAdicional:=TxtFolioAdicional.Text.Trim) Then
|
||||
Errores = True
|
||||
End If
|
||||
CargaCliente(CveCliente)
|
||||
@@ -1455,7 +1455,7 @@ Partial Class OS_OrdenesServicios
|
||||
DdlTipoOrdenOS.SelectedValue.ToEntero, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero, Direccion:=TxtDireccion.Text, Telefono:=TxtTelefono.Text,
|
||||
CveModeloAuto:=DdlModeloAuto.SelectedValue.ToEntero, Año:=TxtAnio.Text, CveMedico:=DdlMedico.SelectedValue.ToEntero,
|
||||
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=DdlTipoVenta.SelectedValue.ToEntero, FechaCita:=FechaCita,
|
||||
Paciente:=TxtPaciente.Text.Trim, IdentificadorCliente:=TxtIdentificadorCliente.Text.Trim) Then
|
||||
Paciente:=TxtPaciente.Text.Trim, IdentificadorCliente:=TxtIdentificadorCliente.Text.Trim, FolioAdicional:=TxtFolioAdicional.Text.Trim) Then
|
||||
For Each Row As DataRow In TmpDT.Rows
|
||||
If Not Errores Then
|
||||
Dim CvePS As Integer = Row("CvePS").ToString.ToEntero
|
||||
@@ -3037,7 +3037,10 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
|
||||
Select Case DdlTipoVenta.SelectedValue.ToEntero
|
||||
Case 2, 3
|
||||
Case 1, 2
|
||||
Opcion = 1
|
||||
Exit Select
|
||||
Case 3 ' por el momento ya no se usa
|
||||
Opcion = 2
|
||||
Exit Select
|
||||
Case 5
|
||||
@@ -3074,6 +3077,7 @@ Partial Class OS_OrdenesServicios
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
TxtPacienteModal.Text = TxtPaciente.Text
|
||||
TxtEpisodioModal.Text = TxtIdentificadorCliente.Text
|
||||
TxtFolioRemisionModal.Text = TxtFolioAdicional.Text
|
||||
End If
|
||||
|
||||
If DdlTipoVenta.SelectedValue.ToEntero = 5 Then
|
||||
|
||||
@@ -1274,7 +1274,8 @@ function setwebservice(idDdlWS, idhdValue, idhdText, btn) {
|
||||
aplicaparaventa: (!(DdlWS.data('aplicaparaventa')) || DdlWS.data('aplicaparaventa') == '') ? -1 : DdlWS.data('aplicaparaventa'),
|
||||
cvemarca: (!(DdlWS.data('cvemarca')) || DdlWS.data('cvemarca') == '') ? -1 : DdlWS.data('cvemarca'),
|
||||
esdistribuidor: (!(DdlWS.data('esdistribuidor')) || DdlWS.data('esdistribuidor') == '') ? -1 : DdlWS.data('esdistribuidor'),
|
||||
cveclienteclasificacion: (!(DdlWS.data('cveclienteclasificacion')) || DdlWS.data('cveclienteclasificacion') == '') ? -1 : DdlWS.data('cveclienteclasificacion')
|
||||
cveclienteclasificacion: (!(DdlWS.data('cveclienteclasificacion')) || DdlWS.data('cveclienteclasificacion') == '') ? -1 : DdlWS.data('cveclienteclasificacion'),
|
||||
cvealmacen: (!(DdlWS.data('cvealmacen')) || DdlWS.data('cvealmacen') == '') ? -1 : DdlWS.data('cvealmacen')
|
||||
|
||||
|
||||
//Metodo: metodo
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
cursor: pointer;
|
||||
color: #45b6af;
|
||||
text-align: center;
|
||||
font-weight:bold;
|
||||
border-radius:5px;
|
||||
font-weight: bold;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.disponible:hover, .disponible.activo {
|
||||
@@ -43,11 +43,11 @@
|
||||
border: 2px solid #F3565D;
|
||||
background-color: #F3565D;
|
||||
margin: .1px;
|
||||
cursor:no-drop;
|
||||
cursor: no-drop;
|
||||
color: white;
|
||||
text-align: center;
|
||||
font-weight:bold;
|
||||
border-radius:5px;
|
||||
font-weight: bold;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.nodisponible:hover {
|
||||
@@ -89,15 +89,16 @@
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpTabContainer">
|
||||
<asp:UpdatePanel runat="server" ID="UpTabContainer" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<%-- Pestañas --%>
|
||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%" ActiveTabIndex="0">
|
||||
<%-- Información General --%>
|
||||
<ajax:TabPanel runat="server" HeaderText="Información General" CssClass="tabBodyOverride">
|
||||
<ContentTemplate>
|
||||
<%-- Datos del Contrato --%>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<%-- Datos del Contrato --%>
|
||||
<div class="col-md-7">
|
||||
<div class="portlet light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="tools">
|
||||
@@ -112,8 +113,9 @@
|
||||
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row my-1">
|
||||
<label class="col-md-3 bold text-primary">Folio</label>
|
||||
<asp:Label class="col-md-9" runat="server" ID="LbFolio" Text="Folio"></asp:Label>
|
||||
<label class="col-md-4 bold text-primary">Folio</label>
|
||||
<asp:Label class="col-md-8" runat="server" ID="LbFolio" Text="Folio"></asp:Label>
|
||||
<asp:Label runat="server" ID="LbCveSubProyecto" Visible="false"></asp:Label>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
@@ -246,8 +248,45 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div style="text-align: center; padding-top: 20px;">
|
||||
<asp:Button runat="server" Text="Guardar Cambios" ValidationGroup="GrpGuardar"
|
||||
CssClass="btn btn-primary" OnClick="UpdateContrato" />
|
||||
<asp:Button runat="server" Text="Eliminar" CssClass="btn btn-danger"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro de eliminar el contrato?(Si es contrato masivo, se eliminarán todos)"
|
||||
data-btn-ok-label="si" OnClick="EliminarContrato" />
|
||||
</div>
|
||||
</div>
|
||||
<%-- Contrato Digitalizado --%>
|
||||
<div class="col-md-5">
|
||||
<div class="portlet light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="C_chkexpand1" class=" collapse" data-original-title=""
|
||||
title=""></a><span class="hidden">
|
||||
<input id="C_chkexpand1" type="checkbox" name="ctl00$C$chkexpand" checked="checked"></span>
|
||||
</div>
|
||||
<div class="caption uppercase" style="position: relative;">
|
||||
<i class="fa fa-info-circle"></i>Contrato Digitalizado
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body rowpadding">
|
||||
<asp:LinkButton runat="server" ID="BtnDescargar" class="btn btn-warning" OnClick="DescargarArchivo"
|
||||
Visible="false"><i class='fa fa-download' ></i>Descargar</asp:LinkButton>
|
||||
<asp:TextBox Style="display: none" ID="TxtArchivo" ClientIDMode="Static" runat="server"
|
||||
Width="200px"></asp:TextBox>
|
||||
<asp:Label ID="LbArchivo" ClientIDMode="Static" runat="server" Visible="false"
|
||||
Width="200px"></asp:Label>
|
||||
<button type="button" class="btn btn-primary" runat="server" clientidmode="Static"
|
||||
id="Button1" data-toggle="modal" data-target="#ModalUpload" visible="true">
|
||||
<i class="fa fa-upload"
|
||||
aria-hidden="true"></i>Subir Archivo</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
@@ -341,7 +380,6 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
<%-- Modal Editar Boleto --%>
|
||||
@@ -789,6 +827,39 @@
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<%--Modal subir archivo--%>
|
||||
<div id="ModalUpload" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Subir Archivo</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UPAddEventoBitacora" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:TextBox ID="Anexo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Button runat="server" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary"
|
||||
OnClick="GuardarArchivo" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports ADSNetLibrary.Helpers
|
||||
Imports ADSNetLibrary.SIGAPI.Helpers
|
||||
Imports Extensiones
|
||||
Imports Extensiones.ModExtensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class RepContratoDetalle
|
||||
@@ -15,6 +19,22 @@ Partial Class RepContratoDetalle
|
||||
ViewState("CveContrato") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveContratoTipo As Integer
|
||||
Get
|
||||
Return CType(ViewState("CveContratoTipo"), Integer)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveContratoTipo") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveMasivo As Integer
|
||||
Get
|
||||
Return CType(ViewState("CveMasivo"), Integer)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveMasivo") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveViajePasajero As Integer
|
||||
Get
|
||||
Return CType(ViewState("CveViajePasajero"), Integer)
|
||||
@@ -57,6 +77,7 @@ Partial Class RepContratoDetalle
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region "Carga Página"
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Request("CveContrato") Is Nothing Then
|
||||
Response.Redirect($"~/Transportes/RepContratos.aspx")
|
||||
@@ -82,8 +103,11 @@ Partial Class RepContratoDetalle
|
||||
If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||
Contrato = ObjContratos.DtResultados
|
||||
If Contrato IsNot Nothing AndAlso Contrato.Rows.Count > 0 Then
|
||||
CveContratoTipo = Contrato.Rows(0)("CveContratoTipo").ToString.ToEntero
|
||||
SubProyecto = Contrato.Rows(0)("SubProyecto").ToString
|
||||
CveMasivo = Contrato.Rows(0)("CveMasivo").ToString.ToEntero
|
||||
LbFolio.Text = Contrato.Rows(0)("NumeroContrato").ToString
|
||||
LbCveSubProyecto.Text = Contrato.Rows(0)("CveSubProyecto").ToString
|
||||
DdlClientes.SelectedText = Contrato.Rows(0)("NombreComercial").ToString
|
||||
DdlClientes.SelectedValue = Contrato.Rows(0)("CveCliente").ToString
|
||||
TxtDescripcion.Text = Contrato.Rows(0)("DescripcionContrato").ToString
|
||||
@@ -96,6 +120,12 @@ Partial Class RepContratoDetalle
|
||||
TxtDolares.Text = Contrato.Rows(0)("Importe").ToString
|
||||
TxtPesos.Text = Contrato.Rows(0)("ImporteMax").ToString
|
||||
TxtAnticipo.Text = Contrato.Rows(0)("ImporteMin").ToString
|
||||
If Not String.IsNullOrEmpty(Contrato.Rows(0)("Archivo").ToString) Then
|
||||
BtnDescargar.Visible = True
|
||||
LbArchivo.Text = Contrato.Rows(0)("Archivo").ToString
|
||||
LbArchivo.Visible = True
|
||||
ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "CONTRATOS", ObjContratos.Archivo)
|
||||
End If
|
||||
'Boletos Vendidos
|
||||
If Contrato.Rows(0)("CveContratoTipo").ToString() = "35" Then
|
||||
TabBoletos.Visible = True
|
||||
@@ -114,73 +144,133 @@ Partial Class RepContratoDetalle
|
||||
Response.Redirect($"~/Transportes/RepContratos.aspx")
|
||||
End If
|
||||
ObjContratos.Dispose()
|
||||
|
||||
End Sub
|
||||
Protected Sub BtnCancelar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
CveViajePasajero = GvRow.DataKey("CveViajePasajero").ToEntero
|
||||
LbPartida.Text = GvRow.DataKey("Partida").ToString()
|
||||
LbDestino.Text = GvRow.DataKey("Destino").ToString()
|
||||
LbImporte.Text = Convert.ToDecimal(GvRow.DataKey("Importe")).ToString("C")
|
||||
LbNombre.Text = GvRow.DataKey("Nombre").ToString()
|
||||
LbVisa.Text = GvRow.DataKey("Visa").ToString()
|
||||
LbCelular.Text = GvRow.DataKey("Celular").ToString()
|
||||
LbSexo.Text = GvRow.DataKey("Sexo").ToString()
|
||||
LbObservacion.Text = GvRow.DataKey("Observacion").ToString()
|
||||
LbEstatus.Text = GvRow.DataKey("Estatus").ToString()
|
||||
LbCreado.Text = GvRow.DataKey("FechaIng").ToString()
|
||||
TxtAsiento.Text = GvRow.DataKey("Asiento").ToString()
|
||||
Dim Estatus As Boolean = Not CBool(LbEstatus.Text)
|
||||
Dim ObjTransportes As New ClsTransportes
|
||||
#End Region
|
||||
|
||||
#Region "Información General"
|
||||
Protected Sub GuardarArchivo(sender As Object, e As EventArgs)
|
||||
Dim FileExtension As String = "-1"
|
||||
Dim Filesgral As List(Of Archivo) = Anexo.getfiles().Archivos
|
||||
Dim Filename As String = ""
|
||||
Dim folderContratosPath As String = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos")
|
||||
|
||||
If Not Directory.Exists(folderContratosPath) Then
|
||||
Directory.CreateDirectory(folderContratosPath)
|
||||
End If
|
||||
|
||||
If Not Directory.Exists(Path.Combine(folderContratosPath, "Temp")) Then
|
||||
Directory.CreateDirectory(Path.Combine(folderContratosPath, "Temp"))
|
||||
End If
|
||||
|
||||
For Each fileItem As Archivo In Filesgral
|
||||
|
||||
FileExtension = IO.Path.GetExtension($"{AppDomain.CurrentDomain.BaseDirectory}Temp\{fileItem.filename}").Replace(".", "")
|
||||
Session("FileExtension") = FileExtension
|
||||
Dim tempArray() As String
|
||||
tempArray = fileItem.filename.ToString().Split("-".ToCharArray())
|
||||
|
||||
|
||||
ViewState("extencion") = FileExtension
|
||||
ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos", "Temp", fileItem.filename)
|
||||
|
||||
File.Move(fileItem.FileUrl, ViewState("FUrl").ToString)
|
||||
TxtArchivo.Text = tempArray(1)
|
||||
' imgFileOk.Visible = True
|
||||
'ImgArchivo.Src = "/imagenes/accept.png"
|
||||
Next
|
||||
|
||||
UpTabContainer.Update()
|
||||
RegistraScript("$('#ModalUpload').modal('hide')", "hidemodal1")
|
||||
Button1.Visible = True
|
||||
If Not FileExtension = "-1" Then
|
||||
BtnDescargar.Visible = True
|
||||
End If
|
||||
UpdateContrato(sender, e)
|
||||
End Sub
|
||||
Protected Sub DescargarArchivo(sender As Object, e As EventArgs)
|
||||
Dim File As New FileInfo(ViewState("FUrl").ToString)
|
||||
|
||||
If File.Exists Then 'set appropriate headers
|
||||
Response.Clear()
|
||||
Response.ClearHeaders()
|
||||
Response.ClearContent()
|
||||
Response.AddHeader("Content-Disposition", "attachment; filename=" & LbFolio.Text & ".pdf")
|
||||
Response.AddHeader("Content-Length", File.Length.ToString())
|
||||
'Response.ContentType = "text/plain"
|
||||
Response.ContentType = "application/octet-stream"
|
||||
Response.Flush()
|
||||
' Response.TransmitFile(File.FullName)
|
||||
Response.WriteFile(File.FullName)
|
||||
Response.End()
|
||||
'if file does not exist
|
||||
|
||||
Alert("Descargado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrio un error al descargar el archivo", TipoMensaje.MsgAdvertencia, "window.close()")
|
||||
|
||||
End If 'nothing in the URL as HTTP GET
|
||||
End Sub
|
||||
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
|
||||
Dim ObjContratos As New ClsContratos
|
||||
Try
|
||||
ObjTransportes.IniciaTransacSQL()
|
||||
|
||||
If ObjTransportes.UpdateViajesPasajeros(CveViajePasajero, CveContrato, UsuarioActual.CveVendedor, LbImporte.Text.ToDecimal, TxtAsiento.Text.ToEntero, LbNombre.Text, LbVisa.Text, LbCelular.Text, LbObservacion.Text, Estatus, UsuarioActual.CveUsuario, LbSexo.Text.ToBool) Then
|
||||
Alert($"El boleto ha modificado el estatus de su boleto correctamente.")
|
||||
|
||||
ObjTransportes.Commit()
|
||||
If ObjContratos.UpdateContratos(CveContrato, LbFolio.Text, TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", LbCveSubProyecto.Text.ToEntero, -1, -1, -1, -1, LbArchivo.Text, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, -1) Then
|
||||
Alert("Contrato actualizado correctamente")
|
||||
End If
|
||||
ObjContratos.Commit()
|
||||
|
||||
Catch ex As Exception
|
||||
ObjTransportes.RollBack()
|
||||
Alert($"No se pudo cambiar el estatus del boleto", TipoMensaje.MsgError)
|
||||
Alert($"Ocurrió un ocurrió un error al actualizar su boleto", TipoMensaje.MsgError)
|
||||
ObjContratos.RollBack()
|
||||
Finally
|
||||
ObjTransportes.Dispose()
|
||||
Alert("Contrato actualizado correctamente")
|
||||
ObjContratos.Dispose()
|
||||
CargaDatos()
|
||||
End Try
|
||||
End Sub
|
||||
Protected Sub CambiarBoleto(sender As Object, e As EventArgs)
|
||||
DdlRuta.ClearSelection()
|
||||
PnEditarViaje.Visible = True
|
||||
PnEditarUsuario.Visible = False
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
CveViajePasajero = GvRow.DataKey("CveViajePasajero").ToEntero
|
||||
LbPartida.Text = GvRow.DataKey("Partida").ToString()
|
||||
LbDestino.Text = GvRow.DataKey("Destino").ToString()
|
||||
LbImporte.Text = Convert.ToDecimal(GvRow.DataKey("Importe")).ToString("C")
|
||||
LbNombre.Text = GvRow.DataKey("Nombre").ToString()
|
||||
LbVisa.Text = GvRow.DataKey("Visa").ToString()
|
||||
LbCelular.Text = GvRow.DataKey("Celular").ToString()
|
||||
LbSexo.Text = GvRow.DataKey("Sexo").ToString()
|
||||
LbObservacion.Text = GvRow.DataKey("Observacion").ToString()
|
||||
LbEstatus.Text = GvRow.DataKey("Estatus").ToString()
|
||||
LbCreado.Text = GvRow.DataKey("FechaIng").ToString()
|
||||
TxtAsiento.Text = GvRow.DataKey("Asiento").ToString()
|
||||
|
||||
'Seleccionamos la ruta que tiene el usuario actual
|
||||
DdlRuta.ClearSelection()
|
||||
Protected Sub EliminarContrato(sender As Object, e As EventArgs)
|
||||
Dim ObjContratos As New ClsContratos
|
||||
If ObjContratos.GetContratosReporte(UsuarioActual.CveEmpresa, MinFecha, MaxFecha, -1, CveEstatus:=-1, CveTipoContrato:=35) Then
|
||||
For Each row As DataRow In ObjContratos.DtResultados.Rows
|
||||
Dim fecha As DateTime = row("FechaInicial").ToString.ToDateTime
|
||||
' Asigna los valores de la columna deseada al ListItem
|
||||
Dim listItem As New ListItem(row("SubProyecto").ToString() + " - " + fecha.ToShortDateString + " - " + fecha.ToShortTimeString, row("CveContrato").ToString())
|
||||
' Agrega el ListItem al DropDownList
|
||||
DdlRuta.Items.Add(listItem)
|
||||
Next
|
||||
If (CveContratoTipo = 35) Then
|
||||
If CveMasivo <> 0 Then
|
||||
If ObjContratos.RemoveContrato(CveContrato, UsuarioActual.CveEmpresa, CveMasivo:=CveMasivo) Then
|
||||
Alert("Viajes masivos eliminados correctamente")
|
||||
ObjContratos.Dispose()
|
||||
Response.Redirect("RepViajes.aspx")
|
||||
End If
|
||||
Else
|
||||
If ObjContratos.RemoveContrato(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||
Alert("Viaje eliminado correctamente")
|
||||
ObjContratos.Dispose()
|
||||
Response.Redirect("RepViajes.aspx")
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If ObjContratos.RemoveContrato(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||
Alert("Contrato eliminado correctamente")
|
||||
ObjContratos.Dispose()
|
||||
Response.Redirect("RepContratos.aspx")
|
||||
End If
|
||||
End If
|
||||
DdlRuta.SelectedValue = GvRow.DataKey("CveViaje")
|
||||
ObjContratos.Dispose()
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Boletos"
|
||||
Protected Sub OnLinkButtonClick(sender As Object, e As EventArgs)
|
||||
'Limpiamos la selección anterior
|
||||
If AsientoSeleccionado <> "" Then
|
||||
Dim cph As ContentPlaceHolder = CType(Me.Master.FindControl("C"), ContentPlaceHolder)
|
||||
Dim lnk As LinkButton = CType(cph.FindControl(AsientoSeleccionado), LinkButton)
|
||||
lnk.CssClass = "disponible"
|
||||
End If
|
||||
'Seleccionamos un asiento
|
||||
Dim linkButton As LinkButton = DirectCast(sender, LinkButton)
|
||||
Dim buttonID As String = linkButton.ID
|
||||
linkButton.CssClass += " activo"
|
||||
AsientoSeleccionado = buttonID
|
||||
TxtAsiento.Text = buttonID.Substring(1)
|
||||
|
||||
UpBoletos.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalEditar"))
|
||||
End Sub
|
||||
Protected Sub UpdateBoleto(sender As Object, e As EventArgs)
|
||||
@@ -208,26 +298,6 @@ Partial Class RepContratoDetalle
|
||||
CargaDatos()
|
||||
End Try
|
||||
End Sub
|
||||
Protected Sub EditarBoleto(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
Protected Sub OnLinkButtonClick(sender As Object, e As EventArgs)
|
||||
'Limpiamos la selección anterior
|
||||
If AsientoSeleccionado <> "" Then
|
||||
Dim cph As ContentPlaceHolder = CType(Me.Master.FindControl("C"), ContentPlaceHolder)
|
||||
Dim lnk As LinkButton = CType(cph.FindControl(AsientoSeleccionado), LinkButton)
|
||||
lnk.CssClass = "disponible"
|
||||
End If
|
||||
'Seleccionamos un asiento
|
||||
Dim linkButton As LinkButton = DirectCast(sender, LinkButton)
|
||||
Dim buttonID As String = linkButton.ID
|
||||
linkButton.CssClass += " activo"
|
||||
AsientoSeleccionado = buttonID
|
||||
TxtAsiento.Text = buttonID.Substring(1)
|
||||
|
||||
UpBoletos.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalEditar"))
|
||||
End Sub
|
||||
Protected Sub OnChangeRuta(sender As Object, e As EventArgs)
|
||||
Dim ObjTransportes As New ClsTransportes
|
||||
|
||||
@@ -289,6 +359,79 @@ Partial Class RepContratoDetalle
|
||||
'Empresas/188/Formatos/Boleto.mrt
|
||||
|
||||
End Sub
|
||||
Protected Sub EditarBoleto(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
Protected Sub CambiarBoleto(sender As Object, e As EventArgs)
|
||||
DdlRuta.ClearSelection()
|
||||
PnEditarViaje.Visible = True
|
||||
PnEditarUsuario.Visible = False
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
CveViajePasajero = GvRow.DataKey("CveViajePasajero").ToEntero
|
||||
LbPartida.Text = GvRow.DataKey("Partida").ToString()
|
||||
LbDestino.Text = GvRow.DataKey("Destino").ToString()
|
||||
LbImporte.Text = Convert.ToDecimal(GvRow.DataKey("Importe")).ToString("C")
|
||||
LbNombre.Text = GvRow.DataKey("Nombre").ToString()
|
||||
LbVisa.Text = GvRow.DataKey("Visa").ToString()
|
||||
LbCelular.Text = GvRow.DataKey("Celular").ToString()
|
||||
LbSexo.Text = GvRow.DataKey("Sexo").ToString()
|
||||
LbObservacion.Text = GvRow.DataKey("Observacion").ToString()
|
||||
LbEstatus.Text = GvRow.DataKey("Estatus").ToString()
|
||||
LbCreado.Text = GvRow.DataKey("FechaIng").ToString()
|
||||
TxtAsiento.Text = GvRow.DataKey("Asiento").ToString()
|
||||
|
||||
'Seleccionamos la ruta que tiene el usuario actual
|
||||
DdlRuta.ClearSelection()
|
||||
Dim ObjContratos As New ClsContratos
|
||||
If ObjContratos.GetContratosReporte(UsuarioActual.CveEmpresa, MinFecha, MaxFecha, -1, CveEstatus:=-1, CveTipoContrato:=35) Then
|
||||
For Each row As DataRow In ObjContratos.DtResultados.Rows
|
||||
Dim fecha As DateTime = row("FechaInicial").ToString.ToDateTime
|
||||
' Asigna los valores de la columna deseada al ListItem
|
||||
Dim listItem As New ListItem(row("SubProyecto").ToString() + " - " + fecha.ToShortDateString + " - " + fecha.ToShortTimeString, row("CveContrato").ToString())
|
||||
' Agrega el ListItem al DropDownList
|
||||
DdlRuta.Items.Add(listItem)
|
||||
Next
|
||||
End If
|
||||
DdlRuta.SelectedValue = GvRow.DataKey("CveViaje")
|
||||
ObjContratos.Dispose()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalEditar"))
|
||||
End Sub
|
||||
Protected Sub BtnCancelar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
CveViajePasajero = GvRow.DataKey("CveViajePasajero").ToEntero
|
||||
LbPartida.Text = GvRow.DataKey("Partida").ToString()
|
||||
LbDestino.Text = GvRow.DataKey("Destino").ToString()
|
||||
LbImporte.Text = Convert.ToDecimal(GvRow.DataKey("Importe")).ToString("C")
|
||||
LbNombre.Text = GvRow.DataKey("Nombre").ToString()
|
||||
LbVisa.Text = GvRow.DataKey("Visa").ToString()
|
||||
LbCelular.Text = GvRow.DataKey("Celular").ToString()
|
||||
LbSexo.Text = GvRow.DataKey("Sexo").ToString()
|
||||
LbObservacion.Text = GvRow.DataKey("Observacion").ToString()
|
||||
LbEstatus.Text = GvRow.DataKey("Estatus").ToString()
|
||||
LbCreado.Text = GvRow.DataKey("FechaIng").ToString()
|
||||
TxtAsiento.Text = GvRow.DataKey("Asiento").ToString()
|
||||
Dim Estatus As Boolean = Not LbEstatus.Text.ToBool
|
||||
Dim ObjTransportes As New ClsTransportes
|
||||
Try
|
||||
ObjTransportes.IniciaTransacSQL()
|
||||
|
||||
If ObjTransportes.UpdateViajesPasajeros(CveViajePasajero, CveContrato, UsuarioActual.CveVendedor, LbImporte.Text.ToDecimal, TxtAsiento.Text.ToEntero, LbNombre.Text, LbVisa.Text, LbCelular.Text, LbObservacion.Text, Estatus, UsuarioActual.CveUsuario, LbSexo.Text.ToBool) Then
|
||||
Alert($"El boleto ha modificado el estatus de su boleto correctamente.")
|
||||
|
||||
ObjTransportes.Commit()
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
ObjTransportes.RollBack()
|
||||
Alert($"No se pudo cambiar el estatus del boleto", TipoMensaje.MsgError)
|
||||
Finally
|
||||
ObjTransportes.Dispose()
|
||||
CargaDatos()
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
@@ -243,7 +243,8 @@
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Cliente</label>
|
||||
<div class="col-md-8">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me form-control" ID="DdlClientes" Width="86%" data-metodo="getcliente"
|
||||
<ADS:Dropdownlost CssClassDdl="select2me form-control" ID="DdlClientes" Width="86%"
|
||||
data-metodo="getcliente"
|
||||
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 86%;"
|
||||
UsaWebService="true" Enabled="false"></ADS:Dropdownlost>
|
||||
<asp:LinkButton runat="server" CssClass="btn btn-primary fa-add" Width="12%"
|
||||
@@ -371,7 +372,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Moneda</label>
|
||||
<div class="col-md-8">
|
||||
@@ -388,13 +388,21 @@
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Archivo</label>
|
||||
<asp:Label ID="LbArchivo" runat="server" CssClass="col-md-8" Text=""></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnGuardar" OnClick="AddContrato" runat="server" CssClass="btn btn-primary"
|
||||
Text="Agregar"
|
||||
ValidationGroup="GrpGuardar"></asp:Button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
<button type="button" class="btn btn-secondary" runat="server" clientidmode="Static"
|
||||
id="BtnArchivo" data-toggle="modal" data-target="#ModalUpload" visible="true"><i class="fa fa-upload"
|
||||
aria-hidden="true"></i>Subir Archivo</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -434,7 +442,40 @@
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<%--MODAL UPLOAD--%>
|
||||
<div id="ModalUpload" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Subir Archivo</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UPAddEventoBitacora" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:TextBox ID="Anexo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Button runat="server" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary"
|
||||
OnClick="GuardarArchivo" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports Extensiones.ModExtensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
@@ -18,6 +19,8 @@ Partial Class ListadoContratos
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region "Carga Página"
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
txtFechaI.Text = DateTime.Now.AddMonths(-1).ToShortDateString
|
||||
txtFechaF.Text = DateTime.Now.AddDays(7).ToShortDateString
|
||||
@@ -71,6 +74,8 @@ Partial Class ListadoContratos
|
||||
UpTitulos.Update()
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub MostrarModal()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalAgregar"))
|
||||
End Sub
|
||||
@@ -84,6 +89,15 @@ Partial Class ListadoContratos
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'Agregamos Contrato
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
If ObjContratos.AddContratos(LbFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, LbArchivo.Text, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero, 0, CveContratoTipo:=34, CveContratosEstatus:=50, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero, Observaciones:=TxtObservaciones.Text) > 0 Then
|
||||
ObjContratos.Commit()
|
||||
Alert("Agregado Correctamente.")
|
||||
End If
|
||||
ObjContratos.Dispose()
|
||||
|
||||
'Aumentamos Folio
|
||||
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, -1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "TipoSucursal = 1").ToEntero
|
||||
Dim ObjFolios As New ClsGralFolios
|
||||
@@ -91,15 +105,6 @@ Partial Class ListadoContratos
|
||||
ObjFolios.Dispose()
|
||||
End If
|
||||
|
||||
'Agregamos Contrato
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
If ObjContratos.AddContratos(LbFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero, 0, CveContratoTipo:=34, CveContratosEstatus:=50, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero, Observaciones:=TxtObservaciones.Text) > 0 Then
|
||||
ObjContratos.Commit()
|
||||
Alert("Agregado Correctamente.")
|
||||
End If
|
||||
ObjContratos.Dispose()
|
||||
|
||||
'Reiniciamos modal
|
||||
TxtDescripcion.Text = ""
|
||||
TxtFechaSalida.Text = ""
|
||||
@@ -112,10 +117,11 @@ Partial Class ListadoContratos
|
||||
TxtPesos.Text = ""
|
||||
TxtAnticipo.Text = ""
|
||||
TxtCantidadPasajeros.Text = ""
|
||||
LbArchivo.Text = ""
|
||||
|
||||
UpModal.Update()
|
||||
CargaDatos()
|
||||
|
||||
RegistraScript("$('#ModalAgregar').modal('hide')", "hidemodal1")
|
||||
End Sub
|
||||
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
|
||||
GvContratos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString)
|
||||
@@ -153,4 +159,35 @@ Partial Class ListadoContratos
|
||||
GvContratos.Columns(8).Visible = ChkUnidad.Checked
|
||||
UpTitulos.Update()
|
||||
End Sub
|
||||
Protected Sub GuardarArchivo(sender As Object, e As EventArgs)
|
||||
Dim FileExtension As String = "-1"
|
||||
Dim Filesgral As List(Of Archivo) = Anexo.getfiles().Archivos
|
||||
Dim Filename As String = ""
|
||||
Dim folderContratosPath As String = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos")
|
||||
|
||||
If Not Directory.Exists(folderContratosPath) Then
|
||||
Directory.CreateDirectory(folderContratosPath)
|
||||
End If
|
||||
|
||||
If Not Directory.Exists(Path.Combine(folderContratosPath, "Temp")) Then
|
||||
Directory.CreateDirectory(Path.Combine(folderContratosPath, "Temp"))
|
||||
End If
|
||||
|
||||
For Each fileItem As Archivo In Filesgral
|
||||
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
||||
Session("FileExtension") = FileExtension
|
||||
Dim tempArray() As String
|
||||
tempArray = fileItem.filename.ToString().Split("-".ToCharArray())
|
||||
|
||||
|
||||
ViewState("extencion") = FileExtension
|
||||
ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos", "Temp", fileItem.filename)
|
||||
|
||||
File.Move(fileItem.FileUrl, ViewState("FUrl").ToString)
|
||||
LbArchivo.Text = fileItem.filenameO
|
||||
Next
|
||||
|
||||
UpModal.Update()
|
||||
RegistraScript("$('#ModalUpload').modal('hide')", "hidemodal1")
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -1613,7 +1613,7 @@
|
||||
<td style="border: 1px none white"><b>Amort. Ant.:</b></td>
|
||||
<td>
|
||||
<asp:Label ID="LblAmortizacion" ClientIDMode="Static" runat="server" Style="text-align: right;" Text="0.00" Width="78px"></asp:Label></td>
|
||||
<td align="right"> <asp:LinkButton ID="ImgAntiPend" runat="server" Text=" <i class='fa fa-money font-green'></i> " AlternateText="Cancelación de Anticipos" Style="cursor: pointer;" />
|
||||
<td align="right"> <asp:LinkButton ID="ImgAntiPend" runat="server" OnClick="ImgAntiPend_Click" Text=" <i class='fa fa-money font-green'></i> " AlternateText="Cancelación de Anticipos" Style="cursor: pointer;" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -10247,7 +10247,7 @@
|
||||
|
||||
$get("HdnTipoDescuento").value = "3";
|
||||
//si es con.nc,es.el.total
|
||||
var Total = ToDouble($get(TipoAnticipo == 2 ? 'TxtTotal' : 'TxtSubTotal').value);
|
||||
var Total = ToDouble($get((TipoAnticipo == 2 || TipoAnticipo == 4) ? 'TxtTotal' : 'TxtSubTotal').value);
|
||||
|
||||
var SaldoCompra = parseFloat(parseFloat($get('HdnVentaSaldo').value).toFixed(2));
|
||||
if (ToDouble($get('HdnCveVenta').value) == 0) SaldoCompra = Total;
|
||||
|
||||
@@ -157,6 +157,15 @@ Partial Class Ventas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property TmpDTAnticiposNCIxCCliente As DataTable
|
||||
Get
|
||||
Return If(IsNothing(ViewState("TmpDTAnticiposNCIxCCliente")), Nothing, CType(ViewState("TmpDTAnticiposNCIxCCliente"), DataTable))
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("TmpDTAnticiposNCIxCCliente") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property TmpDTError As DataTable
|
||||
Get
|
||||
Return If(IsNothing(ViewState("TmpDTError")), Nothing, CType(ViewState("TmpDTError"), DataTable))
|
||||
@@ -2311,6 +2320,21 @@ Partial Class Ventas
|
||||
End Property
|
||||
|
||||
|
||||
Public Property CveAlamcenFiltroDdl As Integer
|
||||
Get
|
||||
If ViewState("CveAlamcenFiltroDdl") Is Nothing Then
|
||||
ViewState("CveAlamcenFiltroDdl") = -1
|
||||
End If
|
||||
Return ViewState("CveAlamcenFiltroDdl").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveAlamcenFiltroDdl") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "VENTA MEDICA"
|
||||
|
||||
Property EsVentaMedica As Boolean
|
||||
@@ -2572,7 +2596,7 @@ Partial Class Ventas
|
||||
ImgDescTotal.Visible = False
|
||||
|
||||
ImgDescTotal.Attributes.Add("onclick", "javascript:$('#ModalDescuento').modal(); $get('LblTitulo1').style.display = ''; $get('LblTitulo2').style.display = 'none'; $get('LblTituloTipo1').style.display = ''; $get('LblTituloTipo2').style.display = 'none'; $get('HdnTipoDescuento').value = '2'; $get('LblPrecio1').style.display = 'none'; $get('LblTotalPS1').style.display = 'none'; $get('LblSubTotal1').style.display = ''; $get('LblAmort').style.display = 'none'; $get('BtnAplicarDescP').style.display = 'none'; $get('BtnAplicarDescG').style.display = ''; $get('TrMotivoDescuento').style.display = '';")
|
||||
ImgAntiPend.Attributes.Add("onclick", "$get('HdnTipoDescuento').value = '3'; MuestraAnticipos();")
|
||||
'ImgAntiPend.Attributes.Add("onclick", "$get('HdnTipoDescuento').value = '3'; MuestraAnticipos();")
|
||||
ImgOtrosConceptos.Attributes.Add("onclick", "javascript:$('#ModalOtrosConceptos').modal();")
|
||||
'LkbAgregarComplementos.Attributes.Add("onclick", "javascript:$('#ModalComplementos').modal();")
|
||||
'ImgCerrar.Attributes.Add("OnClick", "$('#DivAnticipos').hide();")
|
||||
@@ -4913,6 +4937,13 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
TxtAlfa1.Text = DbRowVenta("Alfa1").ToString
|
||||
End If
|
||||
|
||||
|
||||
End Using
|
||||
End If
|
||||
|
||||
@@ -8041,8 +8072,16 @@ Partial Class Ventas
|
||||
Objeto.ddlWS.Attributes.Add("data-pagina", "ventas/ventas")
|
||||
Objeto.ddlWS.Attributes.Add("data-AplicaparaVenta", "1")
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
Objeto.Attributes.Add("data-CveAlmacen", $"{CveAlamcenFiltroDdl}")
|
||||
Objeto.ddlWS.Attributes.Add("data-CveAlmacen", $"{CveAlamcenFiltroDdl}")
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaPSRemision(CveClasificacion As Integer, Objeto As ADServerControl.Dropdownlost)
|
||||
@@ -13471,7 +13510,17 @@ Partial Class Ventas
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso EsVentaMedica Then
|
||||
|
||||
CveAlmacenTraspasoDestino = CveAlmacenAsignado
|
||||
If DdlSucursalCliente.SelectedValue.ToEntero > 0 Then
|
||||
Dim objclientes As New ClsClientes
|
||||
If objclientes.GetSucursales(CveCliente, -1) Then
|
||||
CveAlmacenTraspasoDestino = objclientes.DtResultados.FiltroPrimeroValor("CveAlmacenAsignado", $" CveClienteSucursal = {DdlSucursalCliente.SelectedValue.ToEntero}").ToEntero
|
||||
End If
|
||||
objclientes.Dispose()
|
||||
End If
|
||||
|
||||
If Not CveAlmacenTraspasoDestino > 0 Then
|
||||
CveAlmacenTraspasoDestino = CveAlmacenAsignado
|
||||
End If
|
||||
|
||||
If RBLTipoVenta.SelectedValue.ToEntero = 2 Then
|
||||
If Not ChkRequiereTecnico.Checked Then
|
||||
@@ -14785,6 +14834,11 @@ Partial Class Ventas
|
||||
Next
|
||||
|
||||
Else
|
||||
|
||||
'If DdlTipoAmortizacionAnticipo.SelectedValue <> "4" Then
|
||||
|
||||
'End If
|
||||
|
||||
For Each row2 As GridViewRow In GVAnticipos.Rows
|
||||
|
||||
If row2.DataKey("CveConceptoContable").ToString().ToEntero() = 12 Then
|
||||
@@ -15370,6 +15424,49 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'If Not ErrorPrepoliza AndAlso UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso ObjFactura.TipoDocto = "Ing" AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "4" AndAlso ObjFactura.CveMoneda = 1 Then
|
||||
|
||||
' For Each row2 As GridViewRow In GVAnticipos.Rows
|
||||
' If row2.DataKey("CveConceptoContable").ToString().ToEntero() = 12 Then
|
||||
' If row2.FCCheckBox("Chk" & row2.RowIndex).Checked Then
|
||||
|
||||
' importeMovimiento = row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal '- ((row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal / row2.DataKey("TotalAnticipo").ToDecimal) * row2.DataKey("IVAAnticipo").ToDecimal)
|
||||
|
||||
' Dim ImporteAnticipo As Decimal = importeMovimiento
|
||||
' Dim CveMonedaAnticipo As Integer = row2.DataKey("CveMoneda").ToString().ToEntero()
|
||||
|
||||
' Dim ObjFacturaRef As New Modelos.Factura(UsuarioActual, row2.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa, CargaDTDetalle:=False, VerificaAlmacen:=False, CargaDatosCliente:=False, CargaDatosRelacionados:=False)
|
||||
|
||||
' Dim ventaRef As New Venta(ObjFacturaRef, UsuarioActual)
|
||||
|
||||
' ObjFacturaRef.Dispose()
|
||||
|
||||
' If ventaRef.TipoDocto = "Dev" Then
|
||||
' Dim Pago As New VentaPago
|
||||
' Pago.Fecha = ObjFactura.Fecha
|
||||
' Pago.FechaDocumentoRelacionado = ObjFactura.Fecha
|
||||
' Pago.ImportePagoVenta = importeMovimiento
|
||||
' Pago.ImportePago = importeMovimiento
|
||||
' Pago.CveMonedaPago = ObjFactura.CveMoneda
|
||||
' Pago.TCPago = ObjFactura.TipoCambio
|
||||
' Pago.TipoPago = "NC"
|
||||
' Pago.CveVentaAmortizacion = ObjFactura.CveVenta 'Dr("CveVenta").ToString().ToEntero()
|
||||
' Pago.AplicaTraslado = False
|
||||
' Pago.Referencia = Concepto
|
||||
' 'Pago.CveConceptoPago = 251
|
||||
' ErrorPrepoliza = AplicaPrePolizaPagoVenta(ventaRef, Pago, ObjFactura.CvePrePoliza, ObjConta)
|
||||
|
||||
' Else
|
||||
' ErrorPrepoliza = True
|
||||
' ErrorList.Add("No se puede aplicar un documento diferente a una devolución")
|
||||
' End If
|
||||
|
||||
' End If
|
||||
' End If
|
||||
' Next
|
||||
'End If
|
||||
|
||||
If ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=2, AutoConta:=AutoConta) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
If ObjConta.ValorPolizaDescuadre = 2 Then
|
||||
@@ -16054,7 +16151,9 @@ Partial Class Ventas
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente) Then
|
||||
|
||||
Dim DtMovtos As DataTable = ObjMovtos.DtResultados.FiltraParametros($"Saldo > 0 AND SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo = 'Ant' ", "")} {If(DdlTipoComprobante.SelectedValue = "Ant", "AND Tipo = 'NC'", "")}")
|
||||
Me.TmpDTAnticiposNCIxCCliente = ObjMovtos.DtResultados.Copy()
|
||||
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 AND SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo = 'Ant' ", "")} {If(DdlTipoComprobante.SelectedValue = "Ant", "AND Tipo = 'NC'", "")}")
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then
|
||||
DtMovtos = DtMovtos.FiltraParametros($"{If(CveVenta < 0, $"Tipo = 'Ant'{If(DdlTipoComprobante.SelectedValue = "Ing", $" AND CveMoneda ={DdlMoneda.SelectedValue.ToEntero()}", "")} ", "")}")
|
||||
End If
|
||||
@@ -16161,7 +16260,7 @@ Partial Class Ventas
|
||||
saldo = e.Row.DataKey("Saldo").ToString().ToDecimal
|
||||
|
||||
If CveVenta <= 0 Then
|
||||
If DdlTipoAmortizacionAnticipo.SelectedValue = "2" Then 'cuando es por NC, debe de tomar el total de su saldo respectivo
|
||||
If DdlTipoAmortizacionAnticipo.SelectedValue.Contiene("2") Then 'cuando es por NC, debe de tomar el total de su saldo respectivo
|
||||
saldo = e.Row.DataKey("SaldoConImpuestos").ToString().ToDecimal
|
||||
Else
|
||||
saldo = e.Row.DataKey("SaldoSubTotal").ToString().ToDecimal
|
||||
@@ -16173,6 +16272,10 @@ Partial Class Ventas
|
||||
e.Row.FCLiteral("LtlAnticipos").Text = saldo.FormatoNumero
|
||||
End If
|
||||
|
||||
If CveVenta <= 0 AndAlso DdlTipoAmortizacionAnticipo.SelectedValue.Contiene("4") Then
|
||||
saldo = e.Row.DataKey("Saldo").ToString().ToDecimal
|
||||
End If
|
||||
|
||||
End If
|
||||
saldo = saldo.RoundSQL()
|
||||
|
||||
@@ -16466,7 +16569,7 @@ Partial Class Ventas
|
||||
|
||||
'cuando no se ha registrado la venta
|
||||
|
||||
If DdlTipoAmortizacionAnticipo.SelectedValue.Contiene("1", "2", "3") Then
|
||||
If DdlTipoAmortizacionAnticipo.SelectedValue.Contiene("1", "2", "3", "4") Then
|
||||
|
||||
Dim Amortizacion As Decimal = 0
|
||||
Dim ImpuestosLocalesTemporal As Decimal = 0
|
||||
@@ -16612,6 +16715,27 @@ Partial Class Ventas
|
||||
HdnTieneAnticiposVinculados.Value = "1"
|
||||
|
||||
End If
|
||||
|
||||
|
||||
'cuando es PAGO CON DEVOLUCION
|
||||
If DdlTipoAmortizacionAnticipo.SelectedValue = "4" Then
|
||||
|
||||
For Each gvr As GridViewRow In GVAnticipos.Rows
|
||||
If gvr.FCCheckBox("Chk" & gvr.RowIndex) IsNot Nothing AndAlso gvr.FCCheckBox("Chk" & gvr.RowIndex).Checked AndAlso gvr.DataKey("CveConceptoContable").ToEntero().Contiene(12) Then
|
||||
Amortizacion += gvr.FCTextBox(String.Format("TxtAnticipo{0}", gvr.RowIndex)).Text.ToDecimal ' - ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("TotalAnticipo").ToDecimal) * gvr.DataKey("IVAAnticipo").ToDecimal)
|
||||
End If
|
||||
Next
|
||||
|
||||
LblAntAplicados.Text = String.Format("Pago con devolución: {0:C}", Amortizacion) : LblAntAplicados.Visible = True
|
||||
HdnAnticipos.Value = Amortizacion.RoundSQL(2).ToString()
|
||||
Amortizacion = 0
|
||||
HdnTipoDescuento.Value = "-1"
|
||||
HdnDescuento.Value = "0"
|
||||
RegistraScript("BorraDescuentos();")
|
||||
HdnTieneAnticiposVinculados.Value = "1"
|
||||
End If
|
||||
|
||||
|
||||
CalculaTotalesVenta(ValidarDescuentos:=True)
|
||||
End If
|
||||
End If
|
||||
@@ -21505,22 +21629,24 @@ Partial Class Ventas
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim ObjContrato As New ClsContratos
|
||||
If ObjContrato.GetEstimacionesPorFacturar(-1, CveCliente, DdlContrato.SelectedValue.ToEntero(), 0, UsuarioActual.CveEmpresa) Then
|
||||
GvEst.DataSource = ObjContrato.DtResultados
|
||||
If ObjContrato.DtResultados.Rows.Count > 0 Then
|
||||
'BtnEstimacion.Visible = True
|
||||
DdlContrato.Items.Clear()
|
||||
DdlContrato.Items.Add(New ListItem("Todos", "-1"))
|
||||
DdlContrato.DataSource = ObjContrato.DtResultados.FiltraParametros("CveContrato > 0", "NumeroContrato", DistinctColumns:={"CveContrato", "NumeroContrato"})
|
||||
If DdlContrato.SelectedValue.ToEntero() > 0 Then
|
||||
Dim ObjContrato As New ClsContratos
|
||||
If ObjContrato.GetEstimacionesPorFacturar(-1, CveCliente, DdlContrato.SelectedValue.ToEntero(), 0, UsuarioActual.CveEmpresa) Then
|
||||
GvEst.DataSource = ObjContrato.DtResultados
|
||||
If ObjContrato.DtResultados.Rows.Count > 0 Then
|
||||
'BtnEstimacion.Visible = True
|
||||
DdlContrato.Items.Clear()
|
||||
DdlContrato.Items.Add(New ListItem("Todos", "-1"))
|
||||
DdlContrato.DataSource = ObjContrato.DtResultados.FiltraParametros("CveContrato > 0", "NumeroContrato", DistinctColumns:={"CveContrato", "NumeroContrato"})
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjContrato.Dispose()
|
||||
|
||||
DdlContrato.DataBind()
|
||||
GvEst.DataBind()
|
||||
End If
|
||||
|
||||
ObjContrato.Dispose()
|
||||
|
||||
DdlContrato.DataBind()
|
||||
GvEst.DataBind()
|
||||
|
||||
UPEstimaciones.Update()
|
||||
End Sub
|
||||
|
||||
@@ -30502,6 +30628,22 @@ Partial Class Ventas
|
||||
|
||||
divAnticipoMsg.Visible = False
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
If DdlTipoComprobante.SelectedValue = "Ing" AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "4" Then
|
||||
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 And SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo = 'NC' ", "")}")
|
||||
divAmortizacionTipoRelacion.Visible = False
|
||||
GVAnticipos.DataSource = DtMovtos
|
||||
GVAnticipos.DataBind()
|
||||
Else
|
||||
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 AND SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo = 'Ant' ", "")} {If(DdlTipoComprobante.SelectedValue = "Ant", "AND Tipo = 'NC'", "")}")
|
||||
divAmortizacionTipoRelacion.Visible = True
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then
|
||||
DtMovtos = DtMovtos.FiltraParametros($"{If(CveVenta < 0, $"Tipo = 'Ant'{If(DdlTipoComprobante.SelectedValue = "Ing", $" AND CveMoneda ={DdlMoneda.SelectedValue.ToEntero()}", "")} ", "")}")
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If DdlTipoAmortizacionAnticipo.SelectedValue.Contiene("1", "2") Then
|
||||
'cuando es amortización por descuento, debe tener seleccionado descuentos previamente registrados
|
||||
If DdlTipoAmortizacionAnticipo.SelectedValue = "1" AndAlso LblDescuentos.Text.ToDecimal <= 0 Then
|
||||
@@ -36461,9 +36603,10 @@ Partial Class Ventas
|
||||
DdlProcedimiento.SelectedValueExist(dRow("CveProcedimiento").ToString.ToEntero)
|
||||
TxtPaciente.Text = dRow("Paciente").ToString
|
||||
TxtEpisodio.Text = dRow("Episodio").ToString
|
||||
SeEstaFActurandoVentaMedica = True
|
||||
TxtAlfa1.Text = dRow("Alfa1").ToString
|
||||
CveTipoVenta = dRow("CveTipoVenta").ToString.ToEntero
|
||||
ChkRequiereTecnico_CheckedChanged(Nothing, Nothing)
|
||||
SeEstaFActurandoVentaMedica = True
|
||||
End If
|
||||
objVenta.Dispose()
|
||||
End If
|
||||
@@ -36533,34 +36676,6 @@ Partial Class Ventas
|
||||
|
||||
End Sub
|
||||
|
||||
'Private Sub CargaSucursalesModal(CveClienteSeleccionado As Integer)
|
||||
|
||||
' DdlSucursalClienteModal.Items.Clear()
|
||||
' DdlSucursalClienteModal.ClearSelection()
|
||||
' DdlSucursalClienteModal.SelectedValue = Nothing
|
||||
|
||||
' Dim ObjCliente As New ClsClientes
|
||||
' If ObjCliente.GetSucursales(CveClienteSeleccionado) Then
|
||||
' DdlSucursalClienteModal.DataSource = ObjCliente.DtResultados
|
||||
' If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
' DvModalClientesucursal.Visible = True
|
||||
' Else
|
||||
' DvModalClientesucursal.Visible = False
|
||||
' End If
|
||||
' Else
|
||||
' DvModalClientesucursal.Visible = False
|
||||
' DdlSucursalClienteModal.DataSource = Nothing
|
||||
' End If
|
||||
' ObjCliente.Dispose()
|
||||
|
||||
' DdlSucursalClienteModal.DataBind()
|
||||
' DdlSucursalClienteModal.Items.Insert(0, New ListItem("Matriz", "-1"))
|
||||
|
||||
' UpDvModalTipoVenta.FindDataSourceControl
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub CargaDdlClientesSucursal()
|
||||
|
||||
@@ -36657,13 +36772,6 @@ Partial Class Ventas
|
||||
UpDvModalTipoVenta.Update()
|
||||
End Sub
|
||||
|
||||
'Protected Sub DdlClientesWS_selectedindexchange(sender As Object, e As EventArgs)
|
||||
|
||||
' CargaPSProcedimiento(DdlProcedimiento.SelectedValue.ToEntero, DdlClientesWS.SelectedValue.ToEntero, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
||||
' 'CargaSucursalesModal(DdlClientesWS.SelectedValue.ToEntero)
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
Protected Sub DdlClienteSucursal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
Dim CveClienteSplit As Integer = -1
|
||||
@@ -36727,9 +36835,7 @@ Partial Class Ventas
|
||||
|
||||
ChkRequiereTecnicoModal.Enabled = True
|
||||
|
||||
'DdlClientesWS.txtText.Value = ""
|
||||
'DdlClientesWS.txtValue.Value = ""
|
||||
'DdlClientesWS.ddl.SelectedValueExist(-1)
|
||||
|
||||
DdlClienteSucursal.SelectedValueExist(-1)
|
||||
|
||||
DvModalRequiereOSFecha.Visible = False
|
||||
@@ -36791,8 +36897,6 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
For Each GvRow As GridViewRow In GvProductosProcedimiento.Rows
|
||||
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
|
||||
@@ -36874,6 +36978,9 @@ Partial Class Ventas
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
DdlTipoComprobante.Enabled = False
|
||||
|
||||
CargaCliente(CveCliente)
|
||||
@@ -36926,10 +37033,17 @@ Partial Class Ventas
|
||||
UpParametros.Update()
|
||||
End If
|
||||
|
||||
If RBLTipoVenta.SelectedValue.Contiene("5", "6") Then
|
||||
AsignaAlamacenWS()
|
||||
CargaPS(-1, DdlPS)
|
||||
End If
|
||||
|
||||
RegistraScript("$('#DvModalTipoVenta').modal('hide');")
|
||||
UpCliente.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub GvProductosProcedimiento_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DataKey("Precio").ToDecimal = 0 Then
|
||||
@@ -37089,6 +37203,27 @@ Partial Class Ventas
|
||||
CargaProcedimientos(HdnCveProcedimientoNuevo.Value.ToEntero)
|
||||
End Sub
|
||||
|
||||
Private Sub AsignaAlamacenWS()
|
||||
|
||||
CveAlamcenFiltroDdl = -1
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
If DdlSucursalCliente.SelectedValue.ToEntero > 0 Then
|
||||
Dim objclientes As New ClsClientes
|
||||
If objclientes.GetSucursales(CveCliente, -1) Then
|
||||
CveAlamcenFiltroDdl = objclientes.DtResultados.FiltroPrimeroValor("CveAlmacenAsignado", $" CveClienteSucursal = {DdlSucursalCliente.SelectedValue.ToEntero}").ToEntero
|
||||
End If
|
||||
objclientes.Dispose()
|
||||
End If
|
||||
If Not CveAlamcenFiltroDdl > 0 Then
|
||||
CveAlamcenFiltroDdl = If(CveAlmacenAsignado > 0, CveAlmacenAsignado, -1)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
'Protected Sub LnkCancelarSoloCFDI_Click(sender As Object, e As EventArgs)
|
||||
@@ -37215,5 +37350,26 @@ Partial Class Ventas
|
||||
End If
|
||||
End Using
|
||||
End Sub
|
||||
Protected Sub ImgAntiPend_Click(sender As Object, e As EventArgs)
|
||||
' $get('HdnTipoDescuento').value = '3'; MuestraAnticipos();
|
||||
HdnTipoDescuento.Value = "3"
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
If DdlTipoAmortizacionAnticipo.Items.FindByValue("4") Is Nothing Then
|
||||
DdlTipoAmortizacionAnticipo.Items.Insert(1, New ListItem("Pago con devolución", "4"))
|
||||
End If
|
||||
DdlTipoAmortizacionAnticipo.SelectedValueExist("4")
|
||||
|
||||
DdlTipoRelacionAnticipo.SelectedValueExist("-1")
|
||||
|
||||
DdlTipoAmortizacionAnticipo_SelectedIndexChanged(DdlTipoAmortizacionAnticipo, EventArgs.Empty)
|
||||
|
||||
divAmortizacionTipoRelacion.Visible = False
|
||||
End If
|
||||
|
||||
UpAnticipos.Update()
|
||||
|
||||
RegistraScript("MuestraAnticipos();", "AE")
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user