diff --git a/App_Code/ClsCRM.vb b/App_Code/ClsCRM.vb index 2c4970f4b..5db431cb1 100644 --- a/App_Code/ClsCRM.vb +++ b/App_Code/ClsCRM.vb @@ -724,11 +724,11 @@ Public Class ClsCRM .Add("@CveUsuarioIng", SqlDbType.Int).Value = CveUsuarioIng .Add("@CvePS", SqlDbType.Int).Value = CvePS - .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue + .Add("@CveAcercamiento", SqlDbType.Int).Direction = ParameterDirection.ReturnValue End With Try SqlAdapter.Fill(Data) - _CveAcercamiento = SqlAdapter.SelectCommand.Parameters("@RETURN_VALUE").Value.ToString().ToEntero() + _CveAcercamiento = SqlAdapter.SelectCommand.Parameters("@CveAcercamiento").Value.ToString().ToEntero() Catch ex As Exception OnError("Ocurrió un error al agregar el Acercamiento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index 47bb3a961..c30973073 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -3426,6 +3426,19 @@ Public Class ClsGenerales Return Retorno End Function + + Public Function GetCartaPorteTiposRemolques() As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Gral_CP_TiposRemolqueGet") + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los tipos de remolque de carta porte.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno + End Function + #End Region @@ -3835,7 +3848,8 @@ Public Class ClsGenerales End Function Public Function AddInvEntregaAlmacenRuta(CveSubProyecto As Integer, CveDireccionOrigen As Integer, CveDireccionDestino As Integer, CveMovimientoAlmacen As Integer, CveChofer As Integer, CveCamion As Integer, FechaEntrega As Date, FechaLlegada As DateTime, Tipo As String, - FolioReferencia As String, Referencia As String, FechaLimite As Date, Orden As Integer, Estatus As Integer, Distancia As Integer) As Integer + FolioReferencia As String, Referencia As String, FechaLimite As Date, Orden As Integer, Estatus As Integer, Distancia As Integer, Optional ConfigCartaPorte As String = "-1", + Optional CveCamionRemolque1 As Integer = -1, Optional CveCamionRemolque2 As Integer = -1) As Integer Dim Retorno As Integer = -1 DataAdapter("PA_Inv_EntregaAlmacenRutaAdd") @@ -3858,7 +3872,9 @@ Public Class ClsGenerales .Add("@FechaLimite", SqlDbType.DateTime).Value = FechaLimite - + .Add("@CveCamionRemolque1", SqlDbType.Int).Value = CveCamionRemolque1 + .Add("@CveCamionRemolque2", SqlDbType.Int).Value = CveCamionRemolque2 + .Add("@ConfigCartaPorte", SqlDbType.VarChar).Value = ConfigCartaPorte .Add("@CveEntregaAlmacen", SqlDbType.Int).Direction = ParameterDirection.Output End With @@ -3872,7 +3888,9 @@ Public Class ClsGenerales Return Retorno End Function - Public Function UpdateInvEntregaAlmacenRuta(CveEntregaAlmacen As Integer, CveDireccionOrigen As Integer, CveDireccionDestino As Integer, CveChofer As Integer, CveCamion As Integer, FechaEntrega As Date, CveEmpresa As Integer) As Boolean + Public Function UpdateInvEntregaAlmacenRuta(CveEntregaAlmacen As Integer, CveDireccionOrigen As Integer, CveDireccionDestino As Integer, CveChofer As Integer, CveCamion As Integer, FechaEntrega As Date, CveEmpresa As Integer, + Optional FechaLlegada As DateTime = MinFecha, Optional CveCamionRemolque1 As Integer = -1, Optional CveCamionRemolque2 As Integer = -1, Optional Distancia As Integer = -1, + Optional ConfigCartaPorte As String = "-1") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_EntregaAlmacenRutaUpdate") @@ -3887,6 +3905,12 @@ Public Class ClsGenerales .Add("@FechaEntrega", SqlDbType.DateTime).Value = FechaEntrega .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@FechaLlegada", SqlDbType.DateTime).Value = FechaLlegada + .Add("@CveCamionRemolque1", SqlDbType.Int).Value = CveCamionRemolque1 + .Add("@CveCamionRemolque2", SqlDbType.Int).Value = CveCamionRemolque2 + .Add("@Distancia", SqlDbType.Int).Value = Distancia + .Add("@ConfigCartaPorte", SqlDbType.VarChar).Value = ConfigCartaPorte + End With Try @@ -3969,7 +3993,7 @@ Public Class ClsGenerales End Function - Public Function GetInvEntregaAlmacenRutaRep(CveSubProyecto As Integer, CveEmpresa As Integer, Estatus As Integer, FechaInicio As Date, FechaFin As Date, CveChofer As Integer) As Boolean + Public Function GetInvEntregaAlmacenRutaRep(CveSubProyecto As Integer, CveEmpresa As Integer, Estatus As Integer, FechaInicio As Date, FechaFin As Date, CveChofer As Integer, Optional CveTimbre As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -3983,6 +4007,7 @@ Public Class ClsGenerales .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio .Add("@FechaFin", SqlDbType.Date).Value = FechaFin .Add("@CveChofer", SqlDbType.Int).Value = CveChofer + .Add("@CveTimbre", SqlDbType.Int).Value = CveTimbre End With diff --git a/App_Code/Timbres.vb b/App_Code/Timbres.vb index 4690fd6a1..c5fe74c5b 100644 --- a/App_Code/Timbres.vb +++ b/App_Code/Timbres.vb @@ -185,6 +185,17 @@ Public Class Timbres End If + If drT("ClaveTipoRemolque1").ToString <> "" Then + Dim Rem1 As New CFDICartaPorteRemolque With {.SubTipoRemolque = drT("ClaveTipoRemolque1"), .Placa = drT("PlacaRemolque1")} + CartaPorte.FiguraTransporte.AutoTransporte.Remolques.Add(Rem1) + End If + + If drT("ClaveTipoRemolque2").ToString <> "" Then + Dim Rem2 As New CFDICartaPorteRemolque With {.SubTipoRemolque = drT("ClaveTipoRemolque2"), .Placa = drT("PlacaRemolque2")} + CartaPorte.FiguraTransporte.AutoTransporte.Remolques.Add(Rem2) + End If + + Dim DomOrigen As CFDICartaPorteDomicilio = Nothing DomOrigen = New CFDICartaPorteDomicilio With {.Calle = drT("DirOriCalle").ToString, .Colonia = drT("DirOriClaveSATColonia").ToString, diff --git a/CRM/Acercamiento.aspx.cs b/CRM/Acercamiento.aspx.cs index db600d989..4db633f95 100644 --- a/CRM/Acercamiento.aspx.cs +++ b/CRM/Acercamiento.aspx.cs @@ -389,6 +389,11 @@ public partial class CRM_Acercamiento : ClsPaginas DdlEtapaProceso.SelectedValueExist(CveEtapaActual); DesactivaEdicion(); + if (UsuarioActual.TienePermisoProceso(336)) //permiso para editar vendedor + { + DdlVendedor.Enabled = true; + } + if (CveEtapaActual > 0) { //CARGAMOS BITACORA @@ -732,6 +737,7 @@ public partial class CRM_Acercamiento : ClsPaginas Double Comision = TxtComision.Text.ToDouble(); int Prioridad = DdlPrioridad.SelectedValue.ToEntero(); + int CveRechazoMotivo = DdlRechazoMotivo.SelectedValue.ToEntero(); int CveUsuarioIng = UsuarioActual.CveUsuario; @@ -750,14 +756,19 @@ public partial class CRM_Acercamiento : ClsPaginas AcercaminetoModel.CveUsuarioIng = UsuarioActual.CveUsuario; AcercaminetoModel.CveEncuestaAplicadaProceso = CveEncuestaAplicadaProceso; AcercaminetoModel.FechaApertura = FechaApertura; - AcercaminetoModel.FechaCierre = (DateTime)FechaCierre; + AcercaminetoModel.FechaCierre = FechaCierre != null? (DateTime)FechaCierre : ModExtensiones.MinFecha; AcercaminetoModel.CvePS = DdlPS.SelectedValue.ToEntero(); + AcercaminetoModel.CveRechazoMotivo = CveRechazoMotivo; if (cRMService.AcercamientoUpdate(AcercaminetoModel)) { CveEtapaActual = CveEtapaProcesoActualActualizar; HdfEtapaSeleccionada.Value = CveEtapaProcesoActualActualizar.ToString(); } + else + { + Alert("No se actualizó el acercamiento.", ModExtensiones.TipoMensaje.ToastError); + } //CARGA BITACORA @@ -865,6 +876,11 @@ public partial class CRM_Acercamiento : ClsPaginas this.RegistraScript("$('#ModalCierreMotivoRechazo').modal();"); UpCierreMotivoRechazo.Update(); } + protected void EliminarFile(object sender, EventArgs e) + { + } + + protected void BtnRegistrarCierreCancelacion_Click(object sender, EventArgs e) { diff --git a/CRM/EmpresaCRM.aspx.cs b/CRM/EmpresaCRM.aspx.cs index 5b0d23fcb..9e913932a 100644 --- a/CRM/EmpresaCRM.aspx.cs +++ b/CRM/EmpresaCRM.aspx.cs @@ -1535,7 +1535,16 @@ public partial class CRM_EmpresaCRM : ClsPaginas DdlVendedor.SelectedValueExist(CveVendedor); if (CveVendedor > 0) + { DdlVendedor.Enabled = false; + DdlVendedorAsignado.Enabled = false; + } + + + if (UsuarioActual.TienePermisoProceso(336)) //permiso para editar vendedor + { + DdlVendedorAsignado.Enabled = true; + } } diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 32780864d..1cf5bd836 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -8500,8 +8500,8 @@ Partial Class Compras_Compras Catch ex As Exception ObjCompras.RollBack() If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack() - Alert("Ocurrió un error al registrar la compra y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgError) - GuardaLog($"Ocurrió un error al registrar la compra y cualquier detalle comuníquese a Soporte Técnico : {ex}") + Alert("Ocurrió un error al registrar la compra. Cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgError) + GuardaLog($"Ocurrió un error al registrar la compra. Cualquier detalle comuníquese a Soporte Técnico : {ex}") ViewState("CveCompra") = -1 End Try ObjAcar.Dispose() diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 878270f00..e50e6e1ac 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1136,8 +1136,10 @@ Partial Class PopUpVerFactura Dim NombreAseguradoraCarga As String = "" Dim NumPolizaSeguroCarga As String = "" - - + Dim RemolquePlaca1 As String = "" + Dim RemolquePlaca2 As String = "" + Dim RemolqueSubtimo1 As String = "" + Dim RemolqueSubtimo2 As String = "" Dim PlacaVM As String = "" Dim AnioModeloVM As String = "" @@ -1186,6 +1188,9 @@ Partial Class PopUpVerFactura DtMercancias.Columns.Add(New DataColumn("Descripcion", GetType(String))) DtMercancias.Columns.Add(New DataColumn("PesoEnKg", GetType(String))) + DtMercancias.Columns.Add(New DataColumn("CveMaterialPeligroso", GetType(String))) + DtMercancias.Columns.Add(New DataColumn("Embalaje", GetType(String))) + Dim DtOperadores As New DataTable() DtOperadores.Columns.Add(New DataColumn("RFC", GetType(String))) DtOperadores.Columns.Add(New DataColumn("NumLicencia", GetType(String))) @@ -1292,6 +1297,21 @@ Partial Class PopUpVerFactura NumPolizaSeguroCarga = ValorXML(nodeSeguros, "PolizaCarga", "") End If + + Dim nodeRemolques As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:Remolques", "cartaporte20"), namespaces) + + If nodeRemolques IsNot Nothing Then + If nodeRemolques.ChildNodes.Count = 1 Then + RemolquePlaca1 = ValorXML(nodeRemolques.ChildNodes(0), "Placa", "") + RemolqueSubtimo1 = ValorXML(nodeRemolques.ChildNodes(0), "SubTipoRem", "") + ElseIf nodeRemolques.ChildNodes.Count > 1 Then + RemolquePlaca1 = ValorXML(nodeRemolques.ChildNodes(0), "Placa", "") + RemolqueSubtimo1 = ValorXML(nodeRemolques.ChildNodes(0), "SubTipoRem", "") + RemolquePlaca2 = ValorXML(nodeRemolques.ChildNodes(1), "Placa", "") + RemolqueSubtimo2 = ValorXML(nodeRemolques.ChildNodes(1), "SubTipoRem", "") + End If + End If + 'Dim nodeFiguraTransporte As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:FiguraTransporte", "cartaporte20"), namespaces) 'If nodeFiguraTransporte IsNot Nothing Then ' Dim CveTransporte As String = ValorXML(nodeFiguraTransporte, "TipoFigura", "") @@ -1307,6 +1327,9 @@ Partial Class PopUpVerFactura Row("Descripcion") = ValorXML(node, "Descripcion", "") Row("PesoEnKg") = ValorXML(node, "PesoEnKg", "") + Row("CveMaterialPeligroso") = ValorXML(node, "CveMaterialPeligroso", "") + Row("Embalaje") = ValorXML(node, "Embalaje", "") + DtMercancias.Rows.Add(Row) Next @@ -1438,6 +1461,10 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Descuentos", Descuentos.ToString())) params.Add(New ReportParameter("Total", Total.ToString())) + params.Add(New ReportParameter("RemolquePlaca1", RemolquePlaca1)) + params.Add(New ReportParameter("RemolqueSubtimo1", RemolqueSubtimo1)) + params.Add(New ReportParameter("RemolquePlaca2", RemolquePlaca2)) + params.Add(New ReportParameter("RemolqueSubtimo2", RemolqueSubtimo2)) ' [@CertificadoContribuyente] diff --git a/Contabilidad/RegPrePolizaS.aspx b/Contabilidad/RegPrePolizaS.aspx index 4c6f38c09..39325be4d 100644 --- a/Contabilidad/RegPrePolizaS.aspx +++ b/Contabilidad/RegPrePolizaS.aspx @@ -242,39 +242,129 @@ + + + +
- -
- - - - - -
- -
-
- - - - + + +
+
+
+
+ + +
+
+
+
+
+
+
+ + +
+ + +
+ +
+ + + + + + +
+ + + <%--
--%> + +
+
+ + + + + + + + + + + + +
+ + + <%--
--%> + +
+ + +
+ + + + +
- - - - - - -
- -
- + +
+
+
+
+ + +
+
+
+
+
+
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + + + +
+
+ + + + + + + + + + + + +
+
@@ -285,6 +375,7 @@
+
@@ -292,6 +383,9 @@
+ + + diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 9879cf3e2..dca104de5 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -432,6 +432,12 @@ Partial Class ContabilidadC_RegPrePolizaS TipoPoliza = DdlTipoPoliza.SelectedItem.Text Folio = dr("FolioPoliza").ToString + TxtFolio.Text = dr("FolioPoliza").ToString + TxtUsuarioElaboro.Text = dr("Usuario").ToString + TxtFechaelaboracion.Text = dr("FechaIng").ToString.ToDate.ToString("dd/MM/yyyy") + TxtEstatus.Text = If(Boolean.Parse(dr("Estatus").ToString), "Activa", "Inactiva") + + If UsuarioActual.CveRol = 1 OrElse UsuarioActual.TienePermisoProceso(221) Then 'DivAgregarConceptos.Visible = True LnkAddConcepto.Visible = True @@ -2341,18 +2347,27 @@ Partial Class ContabilidadC_RegPrePolizaS params.Add(New ReportParameter("TipoPoliza", dr("TipoPoliza").ToString)) params.Add(New ReportParameter("Finicio", dr("Fecha").ToString.ToDate.ToShortDateString)) params.Add(New ReportParameter("FFin", dr("Fecha").ToString.ToDate.ToShortDateString)) - params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString)) + + If UsuarioActual.CveEmpresa.Contiene(141) Then + params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToString("dd/MM/yyyy hh:mm:ss"))) + Else + params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString)) + End If + + 'params.Add(New ReportParameter("Nombre", dr("Cuenta").ToString)) 'params.Add(New ReportParameter("Cuenta", dr("Codigo").ToString)) params.Add(New ReportParameter("Numero", dr("FolioPoliza").ToString)) params.Add(New ReportParameter("Moneda", "")) params.Add(New ReportParameter("CodigoPostal", "")) - If UsuarioActual.CveEmpresa = 119 Then + + If UsuarioActual.CveEmpresa.Contiene(119, 141) Then params.Add(New ReportParameter("UsuarioRegistro", GlobalDTUsuarios(dr("CveUsuario").ToString.ToEntero).FiltroPrimeroValor("Nombre"))) End If - If UsuarioActual.CveEmpresa = 140 Then + If UsuarioActual.CveEmpresa.Contiene(140, 141) Then params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) End If + If Archivo.Exists Then ruta = UsuarioActual.Empresa.Ruta & "Formatos/Polizas.rdlc" Else diff --git a/Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc b/Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc index 3de89a586..0c8dc838c 100644 --- a/Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc +++ b/Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc @@ -158,14 +158,14 @@ - + true true - =Fields!CodigoMaterialPeligroso.Value + =Fields!CveMaterialPeligroso.Value - CodigoMaterialPeligroso + CveMaterialPeligroso - - - 2pt 2pt 2pt @@ -1985,7 +1982,7 @@ Textbox3 - 2.33775cm + 2.27425cm 0.15116in 0.5cm 7.5137in @@ -2159,9 +2156,9 @@ Textbox2 - 1.13111in - 9.86403cm - 1.08451in + 1.09361in + 9.91989cm + 0.95951in 3.78138in 11 - - - 2pt 2pt 2pt @@ -3118,6 +3112,128 @@ 2pt + + true + true + + + + + Remolque 1 + + + + Placa: + + + + =Parameters!RemolquePlaca1.Value + + + + Tipo Rem: + + + + =Parameters!RemolqueSubtimo1.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Remolque 2 + + + + Placa: + + + + =Parameters!RemolquePlaca2.Value + + + + Tipo Rem: + + + + =Parameters!RemolqueSubtimo2.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + 7.34222in