diff --git a/AF/AF.aspx.vb b/AF/AF.aspx.vb
index 2205fdfb2..0bc3e00f1 100644
--- a/AF/AF.aspx.vb
+++ b/AF/AF.aspx.vb
@@ -2394,10 +2394,10 @@ Partial Class AF_AF
End If
NewName = String.Format("{0}{1}", NewName, IO.Path.GetExtension(DirectorioOld.ToString()))
DirectorioNew.Append(NewName)
- If ObjActivosFijos.AddActivosFijosImagenes(CveActivoFijo, String.Format("AF/{0}", NewName), UsuarioActual.CveUsuario) Then
+ If ObjActivosFijos.AddActivosFijosImagenes(CveActivoFijo, String.Format("AF/{0}", NewName), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) > 0 Then
CargarArchivo()
- My.Computer.FileSystem.MoveFile(DirectorioOld.ToString, DirectorioNew.ToString)
- Else
+ My.Computer.FileSystem.MoveFile(DirectorioOld.ToString, DirectorioNew.ToString)
+
End If
Retorno = True
Catch ex As Exception
@@ -2409,8 +2409,6 @@ Partial Class AF_AF
UpUpFotos.Update()
Next
-
-
End Sub
Protected Sub BtnEliminarFoto_Click(sender As Object, e As System.EventArgs)
diff --git a/App_Code/ClsAF.vb b/App_Code/ClsAF.vb
index eb935027b..45ba33114 100644
--- a/App_Code/ClsAF.vb
+++ b/App_Code/ClsAF.vb
@@ -698,20 +698,21 @@ Public Class ClsAF
Return Retorno
End Function
- Public Function AddActivosFijosImagenes(CveActivoFijo As Integer, URL As String, CveUsuario As Integer) As Boolean
- Dim Retorno As Boolean = False
+ Public Function AddActivosFijosImagenes(CveActivoFijo As Integer, URL As String, CveUsuario As Integer, CveEmpresa As Integer) As Integer
+ Dim Retorno As Integer = 0
DataAdapter("PA_AF_ActivosFijosImagenesAdd")
-
With SqlAdapter.SelectCommand.Parameters
.Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
.Add("@URL", SqlDbType.VarChar).Value = URL
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@CveImagenActivoFijo", SqlDbType.Int).Direction = ParameterDirection.Output
End With
Try
SqlAdapter.Fill(Data)
- Retorno = True
+ Retorno = SqlAdapter.SelectCommand.Parameters("@CveImagenActivoFijo").Value.ToString().ToEntero()
Catch Ex1 As SqlException
If Ex1.Message.Contains("Número: 2627;") Then
Alert("Ya existe una Imagen en Fijo Imagenes con el mismo nombre: " & Descripcion & ".", TipoMensaje.MsgAdvertencia)
diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb
index e21cb2136..cda545d68 100644
--- a/App_Code/ClsContabilidad.vb
+++ b/App_Code/ClsContabilidad.vb
@@ -437,19 +437,17 @@ Public Class ClsContabilidad
Return Retorno
End Function
- Public Function GetClienteAuxiliar(CveCliente As Integer, CveConceptoContable As Integer, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, Optional Opcion As Integer = 1) As Boolean
+ Public Function GetClienteAuxiliar(CveCliente As Integer, CveConceptoContable As Integer, CveSubProyecto As Integer, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, Optional Opcion As Integer = 1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_ClienteAuxiliar")
With SqlAdapter.SelectCommand.Parameters
-
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable
-
+ .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
-
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Opcion", SqlDbType.Int).Value = Opcion
End With
diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb
index 70e923f48..231b52111 100644
--- a/App_Code/ClsInventarios.vb
+++ b/App_Code/ClsInventarios.vb
@@ -1035,18 +1035,8 @@ Public Class ClsInventarios
.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
.Add("@PedidoContrato", SqlDbType.VarChar).Value = PedidoContrato
.Add("@GastoIndirecto", SqlDbType.Money).Value = GastoIndirecto
- '.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
- '.Add("@CveCamion", SqlDbType.Int).Value = CveCamion
- '.Add("@Placa", SqlDbType.VarChar).Value = Placa
- '.Add("@FechaEntrega", SqlDbType.VarChar).Value = FechaEntrega
- '.Add("@EspecifUnidad", SqlDbType.VarChar).Value = EspecifUnidad
.Add("@ResponsableCarga", SqlDbType.VarChar).Value = ResponsableCarga
.Add("@ResponsableRecibio", SqlDbType.VarChar).Value = ResponsableRecibio
- '.Add("@Identificacion", SqlDbType.VarChar).Value = Identificacion
- '.Add("@Domicilio", SqlDbType.VarChar).Value = Domicilio
- '.Add("@Telefono", SqlDbType.VarChar).Value = Telefono
- '.Add("@Ciudad", SqlDbType.VarChar).Value = Ciudad
- '.Add("@Licencia", SqlDbType.VarChar).Value = Licencia
.Add("@Modulo", SqlDbType.VarChar).Value = Modulo
.Add("@CveOP", SqlDbType.Int).Value = CveOP
.Add("@CveEntregaAlmacen", SqlDbType.Int).Value = CveEntregaAlmacen
@@ -1077,7 +1067,6 @@ Public Class ClsInventarios
CveVenta As Integer, CveSubProyecto As Integer, CveActivoFijo As Integer, Optional CvePersonal As Integer = -1, Optional Guia As String = "", Optional Observaciones As String = "", Optional Recibio As String = "", Optional TipoCambio As Decimal = -1, Optional CveCliente As Integer = -1, Optional CveProveedor As Integer = -1, Optional Remision As String = "") As Boolean
Dim Retorno As Boolean = False
-
DataAdapter("PA_Inv_MovimientosUpdate")
With SqlAdapter.SelectCommand.Parameters
@@ -1118,7 +1107,6 @@ Public Class ClsInventarios
Public Function UpdateMovimientoPoliza(IDPoliza As Integer, CveMovimiento As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
-
DataAdapter("PA_Inv_MovimientosPolizaUpdate")
With SqlAdapter.SelectCommand.Parameters
@@ -1140,7 +1128,6 @@ Public Class ClsInventarios
Public Function UpdateMovimientoGuia(Guia As String, CveMovimiento As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
-
DataAdapter("PA_Inv_MovimientosPolizaUpdate")
With SqlAdapter.SelectCommand.Parameters
@@ -1162,7 +1149,6 @@ Public Class ClsInventarios
Public Function MovimientoRemove(CveMovimiento As Integer, CveEmpresa As Integer, Optional CveUsuario As Integer = -1) As Boolean
Dim Retorno As Boolean = False
-
DataAdapter("PA_Inv_MovimientosRemove")
With SqlAdapter.SelectCommand.Parameters
diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb
index 9aa7eb1a1..ecf2cdbd3 100644
--- a/App_Code/ClsNominas.vb
+++ b/App_Code/ClsNominas.vb
@@ -3787,6 +3787,19 @@ Public Class ClsNominas
Return retorno
End Function
+ Public Function SolicitudesDetalleSATGet(CveSolicitud As Integer, CveEmpresa As Integer, Estatus As Integer, CveTipoSolicitud As Integer, Optional CveSolicitudDetalle As Integer = -1) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_Gral_Sat_SolicitudesDetalleGet")
+ addParameters("@CveSolicitudDetalle", SqlDbType.Int, CveSolicitudDetalle)
+ addParameters("@CveSolicitud", SqlDbType.Int, CveSolicitud)
+ addParameters("@CveEmpresa", SqlDbType.Int, CveEmpresa)
+ addParameters("@Estatus", SqlDbType.Int, Estatus)
+ addParameters("@CveTipoSolicitud", SqlDbType.Int, CveTipoSolicitud)
+
+ retorno = RunQuery("Ocurrió un error al cancelar la Solicitude.")
+
+ Return retorno
+ End Function
#End Region
diff --git a/Bin/ja/Microsoft.ReportViewer.WebForms.resources.dll b/Bin/ja/Microsoft.ReportViewer.WebForms.resources.dll
deleted file mode 100644
index 7a96469e4..000000000
Binary files a/Bin/ja/Microsoft.ReportViewer.WebForms.resources.dll and /dev/null differ
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index 4c790a109..81eb592ba 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -11632,12 +11632,16 @@ Partial Class Compras_Compras
If TmpDT.Rows(Indice)("PU").ToString.ToDecimal + tPU < 0 Then 'si es negativo, que tome el dato anterior
Indice = Indice - 1
- If TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal > 0 Then
- tPU = ImporteAjuste / TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal
- Else
- tPU = 0
+ 'VALIDACION ADICIONAL DE OTRO PRODUCTO CON LA MISMA SITUACIÓN
+ If TmpDT.Rows(Indice)("PU").ToString.ToDecimal + tPU < 0 AndAlso Indice > 0 Then 'si es negativo, que tome el dato anterior
+ Indice = Indice - 1
End If
End If
+ If TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal > 0 Then
+ tPU = ImporteAjuste / TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal
+ Else
+ tPU = 0
+ End If
TmpDT.Rows(Indice)("PU") = TmpDT.Rows(Indice)("PU").ToString.ToDecimal + tPU
TmpDT.Rows(Indice)("Total") = TmpDT.Rows(Indice)("Total").ToString.ToDecimal + ImporteAjuste
diff --git a/Contabilidad/PopUpAuxiliar.aspx.vb b/Contabilidad/PopUpAuxiliar.aspx.vb
index 9cdaaff03..1f7a89315 100644
--- a/Contabilidad/PopUpAuxiliar.aspx.vb
+++ b/Contabilidad/PopUpAuxiliar.aspx.vb
@@ -219,6 +219,12 @@ Partial Class PopUpAuxiliar
Else
e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}|{3}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveCompraAmortizacion"), e.Row.DBCampo("CveCompra"), e.Row.DBCampo("CveIE"))
End If
+ ElseIf e.Row.DBCampo("CveConceptoContable").Contiene("37") Then 'desaplicar Deudores Diversos- Compra
+
+ e.Row.FCLinkButton("LnkDesAplicar").Visible = True
+ e.Row.FCLinkButton("LnkDesAplicar").CommandName = "DesAplicarDeudorDiversoCompra"
+ e.Row.FCLinkButton("imgD").Visible = False
+ e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveCompra"), e.Row.DBCampo("CveIE"))
ElseIf e.Row.DBCampo("CveConceptoContable").Contiene("21") Then 'desaplicar anticipo de compra
@@ -552,5 +558,40 @@ Partial Class PopUpAuxiliar
End If
+ If e.CommandName = "DesAplicarDeudorDiversoCompra" Then
+
+ Dim CvePrePoliza, CveCompra, CveIE As Integer
+ Dim TieneError As Boolean = False
+
+ Dim St As String() = e.CommandArgument.ToString.Split("|"c)
+ If St.Length > 0 Then
+ CvePrePoliza = St(0).ToEntero
+ CveCompra = St(1).ToEntero
+ CveIE = St(2).ToEntero
+ End If
+
+ If CvePrePoliza > 0 Then
+ Dim Conta As New ClsContabilidad()
+ Conta.IniciaTransacSQL()
+
+ If Not Conta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
+ TieneError = True
+ End If
+
+ If Not TieneError AndAlso Not Conta.DesAplicarPago(CvePrePoliza, 37, CveCompra, CveIE) Then
+ TieneError = True
+ End If
+
+ If Not TieneError Then
+ Conta.Commit()
+ Alert("Pago Desaplicado.", TipoMensaje.ToastInformacion)
+ Else
+ Conta.RollBack()
+ Alert("Pago no fue desaplicado.", TipoMensaje.ToastError)
+ End If
+ End If
+
+ End If
+
End Sub
End Class
diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb
index 786b351da..db74efea7 100644
--- a/General/SaldosIniciales.aspx.vb
+++ b/General/SaldosIniciales.aspx.vb
@@ -1799,6 +1799,21 @@ Partial Class General_SaldosIniciales
Dim CveClasificacion As Integer = drr("CveClasificacion").ToString().ToEntero()
Dim dtsubp As DataTable = GlobalDTSubProyectos(UsuarioActual.CveEmpresa)
+ If UsuarioActual.CveEmpresa = 189 Then
+ For Each Row As DataRow In dt.FiltraParametros("RFC <> ''").Rows
+ Dim SubTotal = Row("SubTotal").ToString().ToDecimal.RoundSQL
+ Dim IVA = Row("IVA").ToString().ToDecimal.RoundSQL
+ Dim Total = Row("Total").ToString().ToDecimal.RoundSQL
+ Dim Cantidad = Row("Cantidad").ToString.ToDecimal
+ Dim PU = Row("PU").ToString.ToDecimal
+
+ If Total - SubTotal - IVA <> 0 Then
+ Row("PU") = (Total - IVA) / Cantidad
+ Row("SubTotal") = Row("PU").ToString.ToDecimal * Cantidad
+ End If
+ Next
+ End If
+
Dim CountRow As Integer = 1
Dim LastSerieFolioTipoDoc As String = String.Empty
Dim EsDetalle As Boolean = False
diff --git a/Inventarios/EntradasSalidas.aspx b/Inventarios/EntradasSalidas.aspx
index 6a2dbe295..8f60930cd 100644
--- a/Inventarios/EntradasSalidas.aspx
+++ b/Inventarios/EntradasSalidas.aspx
@@ -1566,14 +1566,14 @@
-
-
diff --git a/UserControl/AddMedico.ascx.vb b/UserControl/AddMedico.ascx.vb
index a2ede09ae..899791bfd 100644
--- a/UserControl/AddMedico.ascx.vb
+++ b/UserControl/AddMedico.ascx.vb
@@ -350,16 +350,11 @@ Partial Class UserControl_AddMedico
ProcesoOK = False
Exit For
End If
-
Next
-
ProcesoOK = True
-
End If
End If
-
-
If ProcesoOK Then
ObjVentas.Commit()
ClsPaginas.Alert($"Medico {If(CveMedico > 0, "Actualizado", "Guardado")} Correctamente.")
@@ -425,7 +420,7 @@ Partial Class UserControl_AddMedico
IndexSeleccionado = -1
DdlClienteSucursal.SelectedValueExist(-1)
'TxtDiasAtencion.Text = ""
- TxtHorario.Text = ""
+ DdlHorario.ClearSelection()
TxtConsultorio.Text = ""
TxtTorre.Text = ""
TxtAsistenteNombre.Text = ""
@@ -446,51 +441,28 @@ Partial Class UserControl_AddMedico
Protected Sub BtnGaurdarMedicoClienteSucursal_Click(sender As Object, e As EventArgs)
Dim TieneError As Boolean = False
-
Dim DiasAtencion As String = ""
Dim ListaDiasAntencion As New List(Of String)
- If ChkLunes.Checked Then
- ListaDiasAntencion.Add("L")
- End If
-
- If ChkMartes.Checked Then
- ListaDiasAntencion.Add("M")
- End If
-
- If ChkMiercoles.Checked Then
- ListaDiasAntencion.Add("MI")
- End If
-
- If ChkJueves.Checked Then
- ListaDiasAntencion.Add("J")
- End If
-
- If ChkViernes.Checked Then
- ListaDiasAntencion.Add("V")
- End If
-
- If ChkSabado.Checked Then
- ListaDiasAntencion.Add("S")
- End If
-
- If ChkDomingo.Checked Then
- ListaDiasAntencion.Add("D")
- End If
-
+ If ChkLunes.Checked Then ListaDiasAntencion.Add("L")
+ If ChkMartes.Checked Then ListaDiasAntencion.Add("M")
+ If ChkMiercoles.Checked Then ListaDiasAntencion.Add("MI")
+ If ChkJueves.Checked Then ListaDiasAntencion.Add("J")
+ If ChkViernes.Checked Then ListaDiasAntencion.Add("V")
+ If ChkSabado.Checked Then ListaDiasAntencion.Add("S")
+ If ChkDomingo.Checked Then ListaDiasAntencion.Add("D")
DiasAtencion = String.Join(", ", ListaDiasAntencion)
-
If CveMedico > 0 Then
Dim objVenta As New ClsVentas
If CveMedicoClienteSucursal > 0 Then
- If Not (objVenta.UpdateMedicosClientesSucursales(CveMedicoClienteSucursal, CveMedico, DdlClienteSucursalCliente, DdlClienteSucursalSucursal, DiasAtencion, TxtHorario.Text.Trim, TxtConsultorio.Text.Trim, TxtTorre.Text.Trim, TxtAsistenteNombre.Text.Trim,
+ If Not (objVenta.UpdateMedicosClientesSucursales(CveMedicoClienteSucursal, CveMedico, DdlClienteSucursalCliente, DdlClienteSucursalSucursal, DiasAtencion, DdlHorario.GetSelectedValuesM, TxtConsultorio.Text.Trim, TxtTorre.Text.Trim, TxtAsistenteNombre.Text.Trim,
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) Then
TieneError = True
End If
Else
- If Not (objVenta.AddMedicosClientesSucursales(CveMedico, DdlClienteSucursalCliente, DdlClienteSucursalSucursal, DiasAtencion, TxtHorario.Text.Trim, TxtConsultorio.Text.Trim, TxtTorre.Text.Trim, TxtAsistenteNombre.Text.Trim,
+ If Not (objVenta.AddMedicosClientesSucursales(CveMedico, DdlClienteSucursalCliente, DdlClienteSucursalSucursal, DiasAtencion, DdlHorario.GetSelectedValuesM, TxtConsultorio.Text.Trim, TxtTorre.Text.Trim, TxtAsistenteNombre.Text.Trim,
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) Then
TieneError = True
End If
@@ -508,7 +480,7 @@ Partial Class UserControl_AddMedico
DTMedicosClientesSucursales.Rows(IndexSeleccionado)("CveClienteSucursal") = DdlClienteSucursalSucursal()
DTMedicosClientesSucursales.Rows(IndexSeleccionado)("ClienteSucursal") = DdlClienteSucursal.SelectedItem.Text
DTMedicosClientesSucursales.Rows(IndexSeleccionado)("DiasAtencion") = DiasAtencion
- DTMedicosClientesSucursales.Rows(IndexSeleccionado)("Horario") = TxtHorario.Text
+ DTMedicosClientesSucursales.Rows(IndexSeleccionado)("Horario") = DdlHorario.GetSelectedValuesM
DTMedicosClientesSucursales.Rows(IndexSeleccionado)("Consultorio") = TxtConsultorio.Text
DTMedicosClientesSucursales.Rows(IndexSeleccionado)("Torre") = TxtTorre.Text
DTMedicosClientesSucursales.Rows(IndexSeleccionado)("AsistenteNombre") = TxtAsistenteNombre.Text
@@ -526,7 +498,7 @@ Partial Class UserControl_AddMedico
nRow("CveClienteSucursal") = DdlClienteSucursalSucursal()
nRow("ClienteSucursal") = DdlClienteSucursal.SelectedItem.Text
nRow("DiasAtencion") = DiasAtencion
- nRow("Horario") = TxtHorario.Text
+ nRow("Horario") = DdlHorario.GetSelectedValuesM
nRow("Consultorio") = TxtConsultorio.Text
nRow("Torre") = TxtTorre.Text
nRow("AsistenteNombre") = TxtAsistenteNombre.Text
@@ -574,9 +546,7 @@ Partial Class UserControl_AddMedico
Protected Sub LnkEditarClienteSucursal_Click(sender As Object, e As EventArgs)
LimpiarcontrolesDetalle()
-
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
-
Dim CveCliente As Integer = GvRow.DataKey("CveCliente").ToEntero
Dim CveClienteSucursal As Integer = GvRow.DataKey("CveClienteSucursal").ToEntero
@@ -593,7 +563,18 @@ Partial Class UserControl_AddMedico
End If
'TxtDiasAtencion.Text = GvRow.DataKey("DiasAtencion")
- TxtHorario.Text = GvRow.DataKey("Horario")
+ If GvRow.DataKey("Horario") <> "" Then
+
+ For Each tipoDocto As String In GvRow.DataKey("Horario").Split(","c)
+ DdlHorario.Items.FindByValue(tipoDocto).Selected = True
+ Next
+ 'For Each itemTipoDocto As ListItem In DdlHorario.Items
+ ' For Each tipoDocto As String In GvRow.DataKey("Horario").Split(","c)
+ ' itemTipoDocto.Selected = (tipoDocto.ToUpper = itemTipoDocto.Value.ToUpper)
+ ' Next
+ 'Next
+ End If
+
TxtConsultorio.Text = GvRow.DataKey("Consultorio")
TxtTorre.Text = GvRow.DataKey("Torre")
TxtAsistenteNombre.Text = GvRow.DataKey("AsistenteNombre")
diff --git a/Ventas/AuxiliarCliente.aspx b/Ventas/AuxiliarCliente.aspx
index 86e5822cd..b7fac9e64 100644
--- a/Ventas/AuxiliarCliente.aspx
+++ b/Ventas/AuxiliarCliente.aspx
@@ -119,6 +119,11 @@
+
+ Sucursal:
+
+
+
diff --git a/Ventas/AuxiliarCliente.aspx.vb b/Ventas/AuxiliarCliente.aspx.vb
index 780126fa8..27a80e32b 100644
--- a/Ventas/AuxiliarCliente.aspx.vb
+++ b/Ventas/AuxiliarCliente.aspx.vb
@@ -40,8 +40,6 @@ Partial Class Ventas_AuxiliarCliente
End If
End Sub
-
-
Private Sub CargaFiltros()
If (UsuarioActual.Empresa.Funcionalidad(105) = "1") Then
@@ -59,7 +57,9 @@ Partial Class Ventas_AuxiliarCliente
'DdlConceptosContables.DataSource = GlobalDTContaConceptosContables(-1)
'DdlConceptosContables.DataBind()
'DdlConceptosContables.Items.Insert(0, New ListItem("Todos", "-1"))
-
+ CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
+ DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
+ DdlSubProyecto.SelectedValuesIfExist("-1")
txtFechaI.Text = NowADS().AddDays(-30).ToString("dd/MM/yyyy")
txtFechaF.Text = NowADS().ToString("dd/MM/yyyy")
@@ -71,7 +71,7 @@ Partial Class Ventas_AuxiliarCliente
Dim ObjConta As New ClsContabilidad
'Falta PA
- If ObjConta.GetClienteAuxiliar(DdlClientes.SelectedValue.ToEntero, -1, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, DdlOpcion.SelectedValue.ToEntero) Then
+ If ObjConta.GetClienteAuxiliar(DdlClientes.SelectedValue.ToEntero, -1, DdlSubProyecto.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, DdlOpcion.SelectedValue.ToEntero) Then
If DdlOpcion.SelectedValue.ToEntero = 2 Then
GvAuxCliente.DataSource = ObjConta.DtResultados.FiltraParametros($" IIF(ISNULL(CveConceptoContable,0) = 1 AND Importe >= 0,0,1) = 1")
Else
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index b5c588b7b..1efebbdae 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -12296,7 +12296,6 @@ Partial Class Ventas
Return ProcesoCorrecto
End Function
-
Private Sub CreaObjetosVenta(Optional VistaPrevia As Boolean = False, Optional EsCancelacion As Boolean = False, Optional TipoDoctoViejo As String = "", Optional TipoDoctoVistaPrevia As String = "")
If Me.CveVenta > 0 AndAlso NuevaFactura <> 1 Then
@@ -12344,7 +12343,6 @@ Partial Class Ventas
'ObjFactura.Folio = If(ExFolioFactura, FolioXML.ToEntero(), -1)
ObjFactura.Serie = If(VistaPrevia, "VistaPrevia", LblSerie.Text)
-
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
Dim ObjFolios As New ClsGralFolios()
Dim TipoDoctoConsulta As String = If(ObjFactura.TipoDocto = "Ant", "Ing", If(ObjFactura.TipoDocto = "PA", "Rem", ObjFactura.TipoDocto))
@@ -12387,10 +12385,8 @@ Partial Class Ventas
ObjFactura.CondicionEntrega = If(DdlFormaEntrega.SelectedItem IsNot Nothing, DdlFormaEntrega.SelectedItem.Text, "")
ObjFactura.CondicionesPago = If(RBLPago.SelectedValue = "2", 0, If(RBLPago.SelectedValue = "1", 1, 2)) ' 0 - Contado, 1 - Credito, 2 - termianl
ObjFactura.FormaPago = 0 'DdlFormaPago.SelectedValue.ToEntero()
-
ObjFactura.AtencionA = TxtAtencionA.Text
ObjFactura.FordGSDB = ""
-
ObjFactura.NumeroContrato = NumeroContrato
ObjFactura.DescripcionContrato = DescripcionContrato
ObjFactura.NumeroDescripcionContrato = If($"{NumeroContrato} - {NumeroLicitacion}" = " - ", "", $"{NumeroContrato} {If(NumeroLicitacion = "", "", $" - Licitación: {NumeroLicitacion}")}")
@@ -12419,9 +12415,6 @@ Partial Class Ventas
ObjFactura.Fech1 = TxtFech1.Text.Trim.ToDate
ObjFactura.Fech2 = TxtFech2.Text.Trim.ToDate
ObjFactura.Fech3 = TxtFech3.Text.Trim.ToDate
-
-
-
ObjFactura.Alfa2 = TxtAlfa2.Text.Trim
ObjFactura.Alfa3 = TxtAlfa3.Text.Trim
ObjFactura.Num1 = TxtNum1.Text.Trim.ToDouble
@@ -12442,17 +12435,12 @@ Partial Class Ventas
ObjFactura.DiasCredito = DiasCredito
ObjFactura.EsDiasCreditoFijo = EsDiasCreditoFijo
-
ObjFactura.CveCorte = CveCorte
- 'ObjFactura.CveMesa = -1
ObjFactura.NumeroPersonas = 0
-
If ObjFactura.TipoDocto = "Ant" And DdlContratosModal.SelectedValue.ToEntero > 0 Or ObjFactura.TipoDocto = "Ing" And DdlContratosModal.SelectedValue.ToEntero > 0 Or ObjFactura.TipoDocto = "Egs" And DdlContratosModal.SelectedValue.ToEntero > 0 Then
CveContrato = DdlContratosModal.SelectedValue.ToEntero
End If
-
-
ObjFactura.CveContrato = If(CveContrato > 0, CveContrato, CvePresupuesto)
ObjFactura.CveClienteSucursal = DdlSucursalCliente.SelectedValue.ToEntero()
@@ -12488,24 +12476,13 @@ Partial Class Ventas
ObjFactura.Det_OrdenCompra = TxtDet_OrdenCompra.Text.Trim
ObjFactura.Det_FechaOrdenCompra = TxtDet_FechaOrdenCompra.Text.Trim
ObjFactura.Det_ContraRecibo = TxtDet_ContraRecibo.Text.Trim
- ObjFactura.MonedaAbreviatura = ""
-
- Try
- ObjFactura.MonedaAbreviatura = GlobalDTMonedas().FiltroPrimeroValor("Moneda", $"CveMoneda = {DdlMoneda.SelectedValue.ToEntero}")
- Catch ex As Exception
-
- End Try
-
- If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso DvModalRequiereOSFecha.Visible Then
- ObjFactura.FechaEjecucion = TxtFechaOS.Text.Trim.ToDateTime
- ObjFactura.FechaParaSurtir = TxtFechaOS.Text.Trim.ToDateTime
- Else
- ObjFactura.Alfa1 = TxtAlfa1.Text.Trim
- End If
+ ObjFactura.MonedaAbreviatura = GlobalDTMonedas().FiltroPrimeroValor("Moneda", $"CveMoneda = {DdlMoneda.SelectedValue.ToEntero}")
+ ObjFactura.Alfa1 = TxtAlfa1.Text.Trim
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
ObjFactura.Medico = DdlMedico.SelectedItem.Text
ObjFactura.Procedimiento = DdlProcedimiento.SelectedItem.Text
+ ObjFactura.FechaParaSurtir = TxtFechaOS.Text.Trim.ToDateTime
End If
'CONVERTIR REMISION - TIPO MONEDA -DOLARES A PESOS
@@ -16880,7 +16857,18 @@ Partial Class Ventas
CartaPorte.Parametros.Add(New ReportParameter($"TieneCartaPorte", "False"))
End If
- ImprimirbytesPDF(PdfFactura(ObjFactura, Guardar:=False, SubReportData:=CartaPorte), "Factura", "PDF")
+ Dim tNombreSugerido As String = "Vista Previa - Factura"
+ Select Case DdlTipoComprobante.SelectedValue
+ Case "Cot"
+ tNombreSugerido = "Vista Previa - Cotización"
+ Case "Egs"
+ tNombreSugerido = "Vista Previa - Egreso"
+ Case "Ant"
+ tNombreSugerido = "Vista Previa - Anticipo"
+ End Select
+ tNombreSugerido = tNombreSugerido & " - " & LblSerie.Text & "-" & TxtFolio.Text
+
+ ImprimirbytesPDF(PdfFactura(ObjFactura, Guardar:=False, SubReportData:=CartaPorte), tNombreSugerido, "PDF")
End Sub
@@ -38507,11 +38495,11 @@ Partial Class Ventas
item.Text = $"  {item.Text}"
Next
- If Opcion <> "Cot" Then
- RegistraScript("$('#DvModalTipoVenta').modal({ backdrop: 'static', keyboard: false });")
- Else
- TrVentasMedicas2.Visible = False
+ If Opcion = "Cot" Then
+ 'TrVentasMedicas2.Visible = False
TrVentasMedicas3.Visible = False
+ Else
+ RegistraScript("$('#DvModalTipoVenta').modal({ backdrop: 'static', keyboard: false });")
End If
End Sub