diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index bc8479a7f..34a615a32 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -2810,8 +2810,9 @@ Partial Class Bancos_IE 'CANCELA NC IdCtaContableAplicar = IDCtaBeneficiario ImporteAplicarMN = ImporteAplicar ' (ImporteAplicar * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL() - - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, (ImporteAplicar), ReferenciaAplicar, 18, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=(ImporteAplicarMN), ImporteME:=ImporteAplicarME, TipoCambio:=TCCompra) Then + Dim Importe = If(DdlTipoTransaccion.SelectedValue.ToEntero = 7, ImporteAplicar * -1, ImporteAplicar) 'ImporteAplicar * -1 + + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, (Importe), ReferenciaAplicar, 18, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=(ImporteAplicarMN), ImporteME:=ImporteAplicarME, TipoCambio:=TCCompra) Then MsgError = "Ocurrió un error al registrar el asiento de pago de devolución" Exit Select End If diff --git a/OC/OC.aspx b/OC/OC.aspx index d43c018cc..c0448c64b 100644 --- a/OC/OC.aspx +++ b/OC/OC.aspx @@ -795,8 +795,8 @@ - - + <%----%> + <%----%> Activo Fijo diff --git a/OS/OrdenesServicios.aspx.vb b/OS/OrdenesServicios.aspx.vb index e586d230e..4a954e7ea 100644 --- a/OS/OrdenesServicios.aspx.vb +++ b/OS/OrdenesServicios.aspx.vb @@ -247,6 +247,24 @@ Partial Class OS_OrdenesServicios ViewState("CveTecnico") = value End Set End Property + + Private Property ClienteRFC As String + Get + Return ViewState("ClienteRFC").ToString + End Get + Set(value As String) + ViewState("ClienteRFC") = value + End Set + End Property + + Private Property ClienteMail As String + Get + Return ViewState("ClienteMail").ToString + End Get + Set(value As String) + ViewState("ClienteMail") = value + End Set + End Property #End Region Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then @@ -340,7 +358,6 @@ Partial Class OS_OrdenesServicios hdnEsThickbox.Value = "S" hdnClientIDLink.Value = "NoDefinido" - End If End Sub @@ -708,6 +725,8 @@ Partial Class OS_OrdenesServicios ClienteEstado = ObjCliente.Estado TelefonoCliente = ObjCliente.Telefono TxtSolicito.Text = ObjCliente.Contacto + ClienteRFC = ObjCliente.RFC + ClienteMail = ObjCliente.Mail If ObjCliente.GetSucursales(CveCliente) Then DdlSucursalCliente.DataSource = ObjCliente.DtResultados @@ -979,7 +998,7 @@ Partial Class OS_OrdenesServicios If Not ObjOrdenServicio.AddOrdenesServicios(CveCliente, DdlSubProyecto.SelectedValue.ToEntero, TxtSolicito.Text, TxtFechaRecibido.Text.ToDateTime, TxtDescripcion.Text, UsuarioActual.CveUsuario, DdlEstatusOS.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCotizacion, -1, -1, DdlTipoOrdenOS.SelectedValue.ToEntero, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) Then Errores = True End If - + CargaCliente(CveCliente) For Each Row As DataRow In TmpDT.Rows If Not Errores Then Dim Consecutivo As Integer = Row("Consecutivo").ToString.ToEntero @@ -1046,6 +1065,8 @@ Partial Class OS_OrdenesServicios Dim Liga = $"document.location.href=""/OS/RepOrdenesServicios.aspx"";" + ImprimirAlGenerar() + ObjOrdenServicio.Commit() Alert(MensajeAlert.ToString, TipoMensaje.MsgInformacion, Liga) @@ -2423,6 +2444,46 @@ Partial Class OS_OrdenesServicios ImprimirPDF("Empresas/Grales/Formatos/OrdenServicio.rdlc", lrds, params, NombreArchivo:=String.Format("OrdenServicio-{0}", CveFolio)) End Sub + + Private Sub ImprimirAlGenerar() + Dim params As New List(Of ReportParameter) + Dim report As LocalReport = New LocalReport() + + Dim dt As DataTable = TmpDT + Dim DtMateriales As DataTable = TmpDTMaterialesDetalle + + report.ReportPath = String.Format("Empresas/{0}/Formatos/FormatoOS.rdlc", UsuarioActual.CveEmpresa) + + params.Add(New ReportParameter("Cliente", NombreCliente)) + params.Add(New ReportParameter("Direccion", ClienteDireccion)) + params.Add(New ReportParameter("NoDeCliente", TxtCodigo.Text)) + params.Add(New ReportParameter("RFC", ClienteRFC)) + params.Add(New ReportParameter("Poblacion", ClienteCiudad)) + params.Add(New ReportParameter("Vendedor", UsuarioActual.Nombre)) + params.Add(New ReportParameter("Contacto", TxtSolicito.Text)) + params.Add(New ReportParameter("Correo", ClienteMail)) + params.Add(New ReportParameter("Sucursal", DdlSubProyecto.SelectedItem.Value)) + params.Add(New ReportParameter("TipoServicio", "Reparación/Diagnostico")) + params.Add(New ReportParameter("DiaFecha", Date.Today.Day.ToString)) + params.Add(New ReportParameter("MesFecha", Date.Today.Month.ToString)) + params.Add(New ReportParameter("AñoFecha", Date.Today.Year.ToString)) + params.Add(New ReportParameter("DiaVigencia", Date.Today.Day.ToString)) + params.Add(New ReportParameter("MesVigencia", Date.Today.Month.ToString)) + params.Add(New ReportParameter("AñoVigencia", Date.Today.Year.ToString)) + params.Add(New ReportParameter("Folio", CveFolio.ToString)) + params.Add(New ReportParameter("CodigoDeServicio", CveOS.ToString)) + params.Add(New ReportParameter("FallaReportada", TxtDescripcion.Text)) + params.Add(New ReportParameter("Copia", "Copia: Cliente")) + + Dim lrds As New List(Of ReportDataSource) + Dim rds As New ReportDataSource With {.Name = "DataSet2", .Value = DtMateriales} + Dim rds2 As New ReportDataSource With {.Name = "DataSet1", .Value = dt} + + lrds.Add(rds) + lrds.Add(rds2) + + ImprimirPDF(String.Format("Empresas/{0}/Formatos/FormatoOS.rdlc", UsuarioActual.CveEmpresa), lrds, params, NombreArchivo:=String.Format("OrdenServicio-{0}", CveFolio)) + End Sub #End Region #Region "S O L I C I T A R M A T E R I A L" diff --git a/Ventas/ProductosServicios.aspx b/Ventas/ProductosServicios.aspx index 2541f0c6d..c0a918e0c 100644 --- a/Ventas/ProductosServicios.aspx +++ b/Ventas/ProductosServicios.aspx @@ -557,7 +557,7 @@
- + diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index caf2ca126..50e8551cf 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -2597,5 +2597,16 @@ Partial Class ProductosyServicios #End Region - + Protected Sub DdlIEPSPorcentaje_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlIEPSPorcentaje.SelectedIndexChanged + Select Case DdlIEPSPorcentaje.SelectedValue + Case "0.09" + DdlCategoriaToxicidad.SelectedValueExist("001") + Case "0.07" + DdlCategoriaToxicidad.SelectedValueExist("002") + Case "0.06" + DdlCategoriaToxicidad.SelectedValueExist("003") + Case Else + DdlCategoriaToxicidad.SelectedValueExist("000") + End Select + End Sub End Class