Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -590,7 +590,7 @@ End Class
|
|||||||
|
|
||||||
<Serializable>
|
<Serializable>
|
||||||
Public Class CFDICartaPorteAutoTransporte
|
Public Class CFDICartaPorteAutoTransporte
|
||||||
Public Property PermSCT As String = ""
|
Public Property PermisoSCT As String = ""
|
||||||
Public Property NumPermisoSCT As String = ""
|
Public Property NumPermisoSCT As String = ""
|
||||||
Public Property NombreSeguroResponsabilidadCivil As String = ""
|
Public Property NombreSeguroResponsabilidadCivil As String = ""
|
||||||
Public Property PolizaSeguroResponsabilidadCivil As String = ""
|
Public Property PolizaSeguroResponsabilidadCivil As String = ""
|
||||||
|
|||||||
@@ -3770,7 +3770,8 @@ Public Class ClsGenerales
|
|||||||
|
|
||||||
End Function
|
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, Orden As Integer, Estatus As Integer, Distancia As Integer) As Integer
|
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
|
||||||
Dim Retorno As Integer = -1
|
Dim Retorno As Integer = -1
|
||||||
DataAdapter("PA_Inv_EntregaAlmacenRutaAdd")
|
DataAdapter("PA_Inv_EntregaAlmacenRutaAdd")
|
||||||
|
|
||||||
@@ -3784,6 +3785,9 @@ Public Class ClsGenerales
|
|||||||
.Add("@CveCamion", SqlDbType.Int).Value = CveCamion
|
.Add("@CveCamion", SqlDbType.Int).Value = CveCamion
|
||||||
.Add("@FechaEntrega", SqlDbType.DateTime).Value = FechaEntrega
|
.Add("@FechaEntrega", SqlDbType.DateTime).Value = FechaEntrega
|
||||||
.Add("@FechaLlegada", SqlDbType.DateTime).Value = FechaLlegada
|
.Add("@FechaLlegada", SqlDbType.DateTime).Value = FechaLlegada
|
||||||
|
.Add("@FolioReferencia", SqlDbType.VarChar).Value = FolioReferencia
|
||||||
|
.Add("@Referencia", SqlDbType.VarChar).Value = Referencia
|
||||||
|
.Add("@FechaLimite", SqlDbType.DateTime).Value = FechaLimite
|
||||||
.Add("@Orden", SqlDbType.Int).Value = Orden
|
.Add("@Orden", SqlDbType.Int).Value = Orden
|
||||||
.Add("@Tipo", SqlDbType.VarChar).Value = Tipo
|
.Add("@Tipo", SqlDbType.VarChar).Value = Tipo
|
||||||
.Add("@Estatus", SqlDbType.VarChar).Value = Estatus
|
.Add("@Estatus", SqlDbType.VarChar).Value = Estatus
|
||||||
@@ -3826,6 +3830,28 @@ Public Class ClsGenerales
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function AsignaEntregaAlmacenRuta(CveCamion As Integer, CveChofer As Integer, FechaEntrega As Date, CveEntregaAlmacen As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Inv_EntregaAlmacenRutaAsignar")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveCamion", SqlDbType.Int).Value = CveCamion
|
||||||
|
.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
|
||||||
|
.Add("@FechaEntrega", SqlDbType.DateTime).Value = FechaEntrega
|
||||||
|
.Add("@CveEntregaAlmacen", SqlDbType.Int).Value = CveEntregaAlmacen
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al actualizar la entrega almacen", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Function GetInvEntregaAlmacenRuta(CveSubProyecto As Integer, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, Opcion As Integer, Optional Estatus As Integer = -1) As Boolean
|
Public Function GetInvEntregaAlmacenRuta(CveSubProyecto As Integer, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, Opcion As Integer, Optional Estatus As Integer = -1) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|||||||
@@ -2171,7 +2171,7 @@ Public Class Timbrado
|
|||||||
|
|
||||||
If Carta.FiguraTransporte.AutoTransporte IsNot Nothing Then
|
If Carta.FiguraTransporte.AutoTransporte IsNot Nothing Then
|
||||||
|
|
||||||
cfdi.CartaPorteAutotransporte(Carta.FiguraTransporte.AutoTransporte.PermSCT, Carta.FiguraTransporte.AutoTransporte.NumPermisoSCT)
|
cfdi.CartaPorteAutotransporte(Carta.FiguraTransporte.AutoTransporte.PermisoSCT, Carta.FiguraTransporte.AutoTransporte.NumPermisoSCT)
|
||||||
|
|
||||||
cfdi.CartaPorteIdentificacionVehicular(Carta.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular, Carta.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM, Carta.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM)
|
cfdi.CartaPorteIdentificacionVehicular(Carta.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular, Carta.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM, Carta.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM)
|
||||||
|
|
||||||
@@ -3918,8 +3918,8 @@ Public Class Timbrado
|
|||||||
|
|
||||||
ComCartaPorte.FiguraTransporte.CveTransporte = ProfactCartaPorte.c_CveTransporte.Item02
|
ComCartaPorte.FiguraTransporte.CveTransporte = ProfactCartaPorte.c_CveTransporte.Item02
|
||||||
ComCartaPorte.Mercancias.AutotransporteFederal = New ProfactCartaPorte.CartaPorteMercanciasAutotransporteFederal
|
ComCartaPorte.Mercancias.AutotransporteFederal = New ProfactCartaPorte.CartaPorteMercanciasAutotransporteFederal
|
||||||
If Carta.FiguraTransporte.AutoTransporte.PermSCT <> "" Then
|
If Carta.FiguraTransporte.AutoTransporte.PermisoSCT <> "" Then
|
||||||
ComCartaPorte.Mercancias.AutotransporteFederal.PermSCT = CType([Enum].Parse(GetType(ProfactCartaPorte.c_TipoPermiso), Carta.FiguraTransporte.AutoTransporte.PermSCT), ProfactCartaPorte.c_TipoPermiso)
|
ComCartaPorte.Mercancias.AutotransporteFederal.PermSCT = CType([Enum].Parse(GetType(ProfactCartaPorte.c_TipoPermiso), Carta.FiguraTransporte.AutoTransporte.PermisoSCT), ProfactCartaPorte.c_TipoPermiso)
|
||||||
End If
|
End If
|
||||||
ComCartaPorte.Mercancias.AutotransporteFederal.NumPermisoSCT = Carta.FiguraTransporte.AutoTransporte.NumPermisoSCT
|
ComCartaPorte.Mercancias.AutotransporteFederal.NumPermisoSCT = Carta.FiguraTransporte.AutoTransporte.NumPermisoSCT
|
||||||
'pendiente RMF
|
'pendiente RMF
|
||||||
|
|||||||
@@ -136,25 +136,32 @@ Public Class Timbres
|
|||||||
Timbre.Comprobante.Serie = Obj.Serie
|
Timbre.Comprobante.Serie = Obj.Serie
|
||||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||||
|
|
||||||
If ObjGrales.GetGralMovimientosDetalleTimbre(CveTimbre, UsuarioActual.CveEmpresa) Then
|
If drT("FolioFiscalRelacionado").ToString <> "" Then
|
||||||
DtMovimientos = ObjGrales.DtResultados
|
|
||||||
Else
|
Timbre.CFDIRelacionados.TipoRelacion = "05"
|
||||||
TieneError = True
|
Timbre.CFDIRelacionados.UUID.Add(drT("FolioFiscalRelacionado").ToString)
|
||||||
_MsgError.AppendLine("Error al obtener Movimientos")
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjFactura.DtDetalle = DtMovimientos
|
If ObjGrales.GetGralMovimientosDetalleTimbre(CveTimbre, UsuarioActual.CveEmpresa) Then
|
||||||
|
DtMovimientos = ObjGrales.DtResultados
|
||||||
|
Else
|
||||||
|
TieneError = True
|
||||||
|
_MsgError.AppendLine("Error al obtener Movimientos")
|
||||||
|
End If
|
||||||
|
|
||||||
AplicaCP = Boolean.Parse(drT("AplicaCP").ToString)
|
ObjFactura.DtDetalle = DtMovimientos
|
||||||
|
|
||||||
ObjFactura.CveSubProyecto = drT("CveSubProyecto").ToString.ToEntero
|
AplicaCP = Boolean.Parse(drT("AplicaCP").ToString)
|
||||||
|
|
||||||
ObjFactura.SetSubProyecto()
|
ObjFactura.CveSubProyecto = drT("CveSubProyecto").ToString.ToEntero
|
||||||
ObjFactura.SetSubProyectoMatriz()
|
|
||||||
|
ObjFactura.SetSubProyecto()
|
||||||
|
ObjFactura.SetSubProyectoMatriz()
|
||||||
|
|
||||||
If AplicaCP Then
|
If AplicaCP Then
|
||||||
|
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.PermSCT = drT("TipoPermisoSCT").ToString '"TPAF01"
|
CartaPorte.FiguraTransporte.AutoTransporte.PermisoSCT = drT("ClaveTipoPermisoSCT").ToString '"TPAF01"
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.NumPermisoSCT = drT("NumPermisoSCT").ToString
|
CartaPorte.FiguraTransporte.AutoTransporte.NumPermisoSCT = drT("NumPermisoSCT").ToString
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroResponsabilidadCivil = drT("NombreAseguradora").ToString
|
CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroResponsabilidadCivil = drT("NombreAseguradora").ToString
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.PolizaSeguroResponsabilidadCivil = drT("NumPolizaSeguro").ToString
|
CartaPorte.FiguraTransporte.AutoTransporte.PolizaSeguroResponsabilidadCivil = drT("NumPolizaSeguro").ToString
|
||||||
@@ -166,8 +173,6 @@ Public Class Timbres
|
|||||||
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM = drT("Placa").ToString
|
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM = drT("Placa").ToString
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM = drT("Anio").ToString.ToEntero
|
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM = drT("Anio").ToString.ToEntero
|
||||||
|
|
||||||
CPCliente = drT("CPCliente").ToString.ToEntero
|
|
||||||
|
|
||||||
|
|
||||||
Dim DomOrigen As CFDICartaPorteDomicilio = Nothing
|
Dim DomOrigen As CFDICartaPorteDomicilio = Nothing
|
||||||
DomOrigen = New CFDICartaPorteDomicilio With {.Calle = drT("DirOriCalle").ToString,
|
DomOrigen = New CFDICartaPorteDomicilio With {.Calle = drT("DirOriCalle").ToString,
|
||||||
@@ -192,14 +197,14 @@ Public Class Timbres
|
|||||||
|
|
||||||
Dim Ubica As New CFDICartaPorteUbicacion
|
Dim Ubica As New CFDICartaPorteUbicacion
|
||||||
Ubica.TipoEstacion = ""
|
Ubica.TipoEstacion = ""
|
||||||
Ubica = New CFDICartaPorteUbicacion With {.TipoUbicacion = "Origen", .IDUbicacion = "OR000001", .RFCRemitenteDestinatario = UsuarioActual.Empresa.RFC,'UsuarioActual.Empresa.RFC,
|
Ubica = New CFDICartaPorteUbicacion With {.TipoUbicacion = "Origen", .IDUbicacion = "OR000001", .RFCRemitenteDestinatario = drT("RemitenteRFC").ToString,
|
||||||
.FechaHoraSalidaLlegada = FechaSalida.ToString("yyyy-MM-ddTHH:mm:ss"),' "2021-08-23T11:13:01",
|
.FechaHoraSalidaLlegada = FechaSalida.ToString("yyyy-MM-ddTHH:mm:ss"),' "2021-08-23T11:13:01",
|
||||||
.NombreRemitenteDestinatario = UsuarioActual.Empresa.Empresa,
|
.NombreRemitenteDestinatario = drT("RemitenteNombre").ToString,
|
||||||
.Domicilio = DomOrigen}
|
.Domicilio = DomOrigen}
|
||||||
CartaPorte.Ubicaciones.Add(Ubica)
|
CartaPorte.Ubicaciones.Add(Ubica)
|
||||||
Ubica = New CFDICartaPorteUbicacion With {.TipoUbicacion = "Destino", .IDUbicacion = "DE000001", .RFCRemitenteDestinatario = UsuarioActual.Empresa.RFC,'UsuarioActual.Empresa.RFC,'"CAMJ841219I33",
|
Ubica = New CFDICartaPorteUbicacion With {.TipoUbicacion = "Destino", .IDUbicacion = "DE000001", .RFCRemitenteDestinatario = drT("DestinatarioRFC").ToString,
|
||||||
.FechaHoraSalidaLlegada = FechaLlegada.ToString("yyyy-MM-ddTHH:mm:ss"),
|
.FechaHoraSalidaLlegada = FechaLlegada.ToString("yyyy-MM-ddTHH:mm:ss"),
|
||||||
.NombreRemitenteDestinatario = UsuarioActual.Empresa.Empresa,
|
.NombreRemitenteDestinatario = drT("DestinatarioNombre").ToString,
|
||||||
.Domicilio = DomDestino,
|
.Domicilio = DomDestino,
|
||||||
.DistanciaRecorrida = Distancia}
|
.DistanciaRecorrida = Distancia}
|
||||||
|
|
||||||
@@ -303,33 +308,33 @@ Public Class Timbres
|
|||||||
If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" 'LES COMENTAN QUE NO DEBE IR LA ETIQUETA DE LA UNIDAD EN EL PRODUCTO
|
If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" 'LES COMENTAN QUE NO DEBE IR LA ETIQUETA DE LA UNIDAD EN EL PRODUCTO
|
||||||
|
|
||||||
Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString.ToDecimal,
|
Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString.ToDecimal,
|
||||||
.Descripcion = tPS,
|
.Descripcion = tPS,
|
||||||
.ValorUnitario = drr("PU").ToString.ToDecimal,
|
.ValorUnitario = drr("PU").ToString.ToDecimal,
|
||||||
.Importe = drr("TotalImporte").ToString.ToDecimal,
|
.Importe = drr("TotalImporte").ToString.ToDecimal,
|
||||||
.Descuento = drr("Descuento").ToString.ToDecimal,
|
.Descuento = drr("Descuento").ToString.ToDecimal,
|
||||||
.Unidad = drr("UM").ToString,
|
.Unidad = drr("UM").ToString,
|
||||||
.ClaveUnidad = drr("SATClaveUM").ToString,
|
.ClaveUnidad = drr("SATClaveUM").ToString,
|
||||||
.ClaveProdServ = drr("SATClaveProdServ").ToString,
|
.ClaveProdServ = drr("SATClaveProdServ").ToString,
|
||||||
.Noidentificacion = drr("Noidentificacion").ToString,
|
.Noidentificacion = drr("Noidentificacion").ToString,
|
||||||
.CuentaPredial = drr("CuentaPredial").ToString}
|
.CuentaPredial = ""}
|
||||||
'VERIFICA SUMA SUBTOTALES
|
'VERIFICA SUMA SUBTOTALES
|
||||||
If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'PROCESO DE AJUSTA DE DECIMALES
|
If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'PROCESO DE AJUSTA DE DECIMALES
|
||||||
concepto.Importe = totSubTotal
|
concepto.Importe = totSubTotal
|
||||||
End If
|
End If
|
||||||
totSubTotal = totSubTotal - concepto.Importe
|
totSubTotal = totSubTotal - concepto.Importe
|
||||||
|
|
||||||
'SIEMPRE ESTAMOS AGREGANDO EL IVA
|
|
||||||
'concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal})
|
|
||||||
|
|
||||||
Timbre.Conceptos.Add(concepto)
|
Timbre.Conceptos.Add(concepto)
|
||||||
i += 1
|
i += 1
|
||||||
Next
|
Next
|
||||||
|
Else
|
||||||
|
TieneError = True
|
||||||
|
_MsgError.AppendLine("timbrado son detalle de productos")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
TieneError = True
|
TieneError = True
|
||||||
_MsgError.AppendLine("Consultar datos de timbrado")
|
_MsgError.AppendLine("Consultar datos de timbrado")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -1797,7 +1797,7 @@ Partial Class Bancos_PopIECompras
|
|||||||
Funcionalidad = 313
|
Funcionalidad = 313
|
||||||
ConceptoContable = 248
|
ConceptoContable = 248
|
||||||
ElseIf MovimientoPagar.ConceptoRetIVA = 5 Then
|
ElseIf MovimientoPagar.ConceptoRetIVA = 5 Then
|
||||||
Funcionalidad = 578
|
Funcionalidad = 577
|
||||||
ConceptoContable = 285
|
ConceptoContable = 285
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -1055,7 +1055,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
Funcionalidad = 313
|
Funcionalidad = 313
|
||||||
ConceptoContable = 248
|
ConceptoContable = 248
|
||||||
ElseIf gvr.DataKey("CveRetIVAConcepto").ToEntero = 5 Then
|
ElseIf gvr.DataKey("CveRetIVAConcepto").ToEntero = 5 Then
|
||||||
Funcionalidad = 578
|
Funcionalidad = 577
|
||||||
ConceptoContable = 285
|
ConceptoContable = 285
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -1386,7 +1386,7 @@ Partial Class PopUpVerFactura
|
|||||||
DescargarArchivoPDFTraslado(Archivo, Path)
|
DescargarArchivoPDFTraslado(Archivo, Path)
|
||||||
Else
|
Else
|
||||||
If Exten = "pdf" Then
|
If Exten = "pdf" Then
|
||||||
Dim ObjTimbres As New Timbres("Rec", cvetimbre, UsuarioActual)
|
Dim ObjTimbres As New Timbres(Parametros("TIPODOCTO").ToString, cvetimbre, UsuarioActual)
|
||||||
|
|
||||||
GeneraPDFFactura(ObjTimbres.ObjFactura)
|
GeneraPDFFactura(ObjTimbres.ObjFactura)
|
||||||
Archivo = New System.IO.FileInfo(Path)
|
Archivo = New System.IO.FileInfo(Path)
|
||||||
|
|||||||
@@ -2467,7 +2467,7 @@ Partial Class General_SaldosIniciales
|
|||||||
Catalogos.Cell(crow, ccol).Value = "Estado"
|
Catalogos.Cell(crow, ccol).Value = "Estado"
|
||||||
For Each row As DataRow In GlobalDTGralEstados("MEX").Rows
|
For Each row As DataRow In GlobalDTGralEstados("MEX").Rows
|
||||||
crow = crow + 1
|
crow = crow + 1
|
||||||
Catalogos.Cell(crow, ccol).Value = String.Format("{0}: {1}", row("CveEstado"), row("Estado"))
|
Catalogos.Cell(crow, ccol).Value = String.Format("{0}: {1}", row("CveEstado"), row("NombreEstado"))
|
||||||
Next
|
Next
|
||||||
colEstado = ccol
|
colEstado = ccol
|
||||||
rowEstado = crow
|
rowEstado = crow
|
||||||
|
|||||||
@@ -666,6 +666,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
TxtHoraInicio.SelectedTime = Mov.Fecha
|
TxtHoraInicio.SelectedTime = Mov.Fecha
|
||||||
EstatusAlmacenCompra = Mov.EstatusAlmacenCompra
|
EstatusAlmacenCompra = Mov.EstatusAlmacenCompra
|
||||||
Folio = Mov.Folio
|
Folio = Mov.Folio
|
||||||
|
Dim drM As DataRow = DtMov.Rows(0)
|
||||||
|
|
||||||
|
|
||||||
If DtMov.Rows(0)("CveConcepto").ToString.ToEntero = 2 Then
|
If DtMov.Rows(0)("CveConcepto").ToString.ToEntero = 2 Then
|
||||||
@@ -773,13 +774,13 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
CveCompra = Mov.CveCompra
|
CveCompra = Mov.CveCompra
|
||||||
CveConcepto = Mov.CveConcepto
|
CveConcepto = Mov.CveConcepto
|
||||||
|
|
||||||
If DtMov.Rows(0)("CveEstatusTimbrado").ToString.ToEntero > 0 Then
|
If drM("CveEstatusTimbrado").ToString.ToEntero > 0 Then
|
||||||
HplDescargaXml.Visible = True
|
HplDescargaXml.Visible = True
|
||||||
HplDescargaXml.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimiento, "XML", $"Tra-{Folio}", "Tra")))
|
HplDescargaXml.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimiento, "XML", drM("TimbreSerieFolio"), "Tra")))
|
||||||
HplDescargaPdf.Visible = True
|
HplDescargaPdf.Visible = True
|
||||||
HplDescargaPdf.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesPdfTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimiento, "PDF", $"Tra-{Folio}", "Tra")))
|
HplDescargaPdf.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesPdfTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimiento, "PDF", drM("TimbreSerieFolio"), "Tra")))
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(161) = "1" Then
|
If drM("AplicaCP").ToString = "True" Then
|
||||||
HplCartaPorteTimbre.Visible = True
|
HplCartaPorteTimbre.Visible = True
|
||||||
HplCartaPorteTimbre.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CARPOTIMBRE&CVEMOV={0}", CveMovimiento)))
|
HplCartaPorteTimbre.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CARPOTIMBRE&CVEMOV={0}", CveMovimiento)))
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -2536,7 +2536,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Else
|
Else
|
||||||
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||||
ImporteAlmacen = ObjInventario.DtResultados.SUMD("Total")
|
ImporteAlmacen = ObjInventario.DtResultados.SUMD("Total").RoundSQL
|
||||||
|
|
||||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString().ToDouble, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), Dr("PU").ToString().ToDecimal, CveAF:=Dr("CveAF").ToString().ToEntero(), CveSeccionAlmacen:=-3, Serie:=Dr("Serie").ToString(), Lote:=Dr("Lote").ToString(), FechaCaducidad:=Dr("FechaCaducidad").ToString().ToDate, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), EsInterno:=EsInterno, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero()) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString().ToDouble, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), Dr("PU").ToString().ToDecimal, CveAF:=Dr("CveAF").ToString().ToEntero(), CveSeccionAlmacen:=-3, Serie:=Dr("Serie").ToString(), Lote:=Dr("Lote").ToString(), FechaCaducidad:=Dr("FechaCaducidad").ToString().ToDate, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), EsInterno:=EsInterno, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero()) Then
|
||||||
@@ -2954,7 +2954,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Dim TotalCostoAcumulado As Decimal = 0
|
Dim TotalCostoAcumulado As Decimal = 0
|
||||||
Dim cont As Integer = 1
|
Dim cont As Integer = 1
|
||||||
|
|
||||||
Dim ValorMultiplicador = 1
|
Dim ValorMultiplicador As Decimal = 1
|
||||||
|
|
||||||
If TipoMovimiento = 1 Then
|
If TipoMovimiento = 1 Then
|
||||||
ValorMultiplicador = 1
|
ValorMultiplicador = 1
|
||||||
|
|||||||
@@ -170,7 +170,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<asp:GridView ID="GvEntregas" runat="server" AutoGenerateColumns="False"
|
<asp:GridView ID="GvEntregas" runat="server" AutoGenerateColumns="False"
|
||||||
DataKeyNames="SerieFolio,FechaIng,Nombre,CveVenta,CveCliente,NombreComercial,TipoDocto,CorreoNotificacion,CveVendedor,Orden,CveMovimiento,CveDireccionEnvio,CveSubProyectoOrigen"
|
DataKeyNames="SerieFolio,Nombre,CveVenta,CveCliente,NombreComercial,TipoDocto,CorreoNotificacion,CveVendedor,Orden,CveMovimiento,CveDireccionEnvio,CveSubProyectoOrigen"
|
||||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de entregas"
|
EmptyDataText="No se encontraron registros" ToolTip="Listado de entregas"
|
||||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||||
data-sort="true"
|
data-sort="true"
|
||||||
@@ -289,10 +289,53 @@
|
|||||||
|
|
||||||
<ajax:TabPanel ID="TabRecoleccion" runat="server" HeaderText="Recolección">
|
<ajax:TabPanel ID="TabRecoleccion" runat="server" HeaderText="Recolección">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<asp:LinkButton runat="server" CssClass="btn btn-primary" ID="LnkGeneraRecoleccion" OnClick="LnkGeneraRecoleccion_Click">Recoleccion</asp:LinkButton>
|
|
||||||
<asp:UpdatePanel ID="UpDatosRecoleccion" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpDatosRecoleccion" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-2 form-group form-md-line-input input-iconright" runat="server" id="Div1" >
|
||||||
|
<asp:DropDownList ID="DdlChoferRec" runat="server" DataTextField="ChoferLicencia" DataValueField="CveChofer" CssClass="form-control input-sm select2me" Width="100%" CausesValidation="true"></asp:DropDownList>
|
||||||
|
|
||||||
|
<asp:RequiredFieldValidator ID="RFVChoferRec" runat="server" Enabled="false" ControlToValidate="DdlChoferRec" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEChoferRec" runat="server" HighlightCssClass="vco" TargetControlID="RFVChoferRec" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<label for="<%= DdlChoferRec.ClientID.ToString()%>">Chofer:</label>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2 form-group form-md-line-input input-iconright" runat="server" id="Div2" >
|
||||||
|
<asp:DropDownList runat="server" ID="DdlUnidadRec" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" CausesValidation="true"></asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVUnidadRec" runat="server" Enabled="false" ControlToValidate="DdlUnidadRec" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEUnidadRec" runat="server" HighlightCssClass="vco" TargetControlID="RFVUnidadRec" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<label for="<%= DdlUnidadRec.ClientID.ToString()%>"> Unidad:</label>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2 form-group form-md-line-input input-iconright" runat="server" id="Div3" >
|
||||||
|
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 125px !important;">
|
||||||
|
<asp:TextBox ID="TxtFechaRec" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="80px" ClientIDMode="Static"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton runat="server" ID="ImgFechaEntregaRec" class="btn default"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaRec" runat="server" TargetControlID="TxtFechaRec" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="CEFechaRec" TargetControlID="TxtFechaRec" PopupButtonID="ImgFechaEntregaRec" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:CompareValidator ID="CVFechaRec" runat="server" ControlToValidate="TxtFechaRec" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Entrega''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEFechaRec" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaRec" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<label for="<%= TxtFechaRec.ClientID.ToString()%>"> F. Entrega:</label>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-2 form-group form-md-line-input input-iconright" runat="server" id="Div4" >
|
||||||
|
<asp:CheckBox ID="ChkEmitirPorteRec" runat="server" Text="Carta Porte" />
|
||||||
|
<label for="<%= ChkEmitirPorteRec.ClientID.ToString()%>"> Emitir:</label>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1" runat="server" id="Div5">
|
||||||
|
</div>
|
||||||
|
<asp:LinkButton runat="server" CssClass="btn btn-primary" ID="LnkGeneraRecoleccion" OnClick="LnkGeneraRecoleccion_Click">Recoleccion</asp:LinkButton>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@@ -314,7 +357,12 @@
|
|||||||
<%--<asp:BoundField HeaderText="SerieFolio" DataField="Serie Folio" HeaderStyle-Width="150px" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" />--%>
|
<%--<asp:BoundField HeaderText="SerieFolio" DataField="Serie Folio" HeaderStyle-Width="150px" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" />--%>
|
||||||
<asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" HeaderStyle-Width="10%">
|
<asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" HeaderStyle-Width="10%">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LblFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:dd/MM/yyyy}") %>'></asp:Literal>
|
<asp:Literal ID="LblFechaEntrega" runat="server" Text='<%# Eval("FechaEntrega", "{0:dd/MM/yyyy}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Folio" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" HeaderStyle-Width="10%">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LblFolio" runat="server" Text='<%# Eval("FolioReferencia") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Cliente" HeaderStyle-HorizontalAlign="Left">
|
<asp:TemplateField HeaderText="Cliente" HeaderStyle-HorizontalAlign="Left">
|
||||||
@@ -441,6 +489,44 @@
|
|||||||
<asp:Label runat="server" ID="LblSubProyectoRecoleccion" AssociatedControlID="DdlSubProyectoRecoleccion"></asp:Label>
|
<asp:Label runat="server" ID="LblSubProyectoRecoleccion" AssociatedControlID="DdlSubProyectoRecoleccion"></asp:Label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
|
||||||
|
<asp:TextBox ID="TxtFechaLimite" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="ImgFechaLimite" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaLimite" runat="server" TargetControlID="TxtFechaLimite" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="CEFechaLimite" TargetControlID="TxtFechaLimite" PopupButtonID="ImgFechaLimite" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:CompareValidator ID="CVFechaLimite" runat="server" ControlToValidate="TxtFechaLimite" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCOFechaLimite" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaLimite" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVFechaLimite" runat="server" ControlToValidate="TxtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEFechaLimite" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaLimite" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<asp:Label runat="server" ID="Label3" AssociatedControlID="TxtFechaLimite" Text="Fecha Límite"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
|
||||||
|
<asp:TextBox runat="server" ID="TxtFolioReferencia" CssClass="form-control" Width="100%" ></asp:TextBox>
|
||||||
|
<asp:Label runat="server" ID="Label1" AssociatedControlID="TxtFolioReferencia" Text="Folio"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
|
||||||
|
<asp:TextBox runat="server" ID="TxtReferencia" CssClass="form-control" Width="100%" ></asp:TextBox>
|
||||||
|
<asp:Label runat="server" ID="Label2" AssociatedControlID="TxtReferencia" Text="Referencia"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
DateTime fechallegada = (TxtFechaEntrega.Text + " 23:59").ToDate();
|
DateTime fechallegada = (TxtFechaEntrega.Text + " 23:59").ToDate();
|
||||||
int CveEntregaAlmacen = ObjGeneral.AddInvEntregaAlmacenRuta(row.DataKey("CveSubProyectoOrigen").ToEntero(), CveDireccionOrigen, CveDireccionDestino, row.DataKey("CveMovimiento").ToEntero(), DdlChofer.SelectedValue.ToEntero(), DdlUnidadCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), fechallegada, "E",Orden,0,1);
|
int CveEntregaAlmacen = ObjGeneral.AddInvEntregaAlmacenRuta(row.DataKey("CveSubProyectoOrigen").ToEntero(), CveDireccionOrigen, CveDireccionDestino, row.DataKey("CveMovimiento").ToEntero(), DdlChofer.SelectedValue.ToEntero(), DdlUnidadCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), fechallegada, "E", "","", "1900-01-01".ToDate(), Orden,0, 1);
|
||||||
CveDireccionOrigen = row.DataKey("CveDireccionEnvio").ToEntero();
|
CveDireccionOrigen = row.DataKey("CveDireccionEnvio").ToEntero();
|
||||||
|
|
||||||
if (CveEntregaAlmacen > 0)
|
if (CveEntregaAlmacen > 0)
|
||||||
@@ -249,13 +249,13 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
if (DdlChofer.SelectedValue.ToEntero() <= 0)
|
if (DdlChoferRec.SelectedValue.ToEntero() <= 0)
|
||||||
{
|
{
|
||||||
Alert("Debe seleccionar un chofer.", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
Alert("Debe seleccionar un chofer.", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DdlUnidadCamion.SelectedValue.ToEntero() <= 0)
|
if (DdlUnidadRec.SelectedValue.ToEntero() <= 0)
|
||||||
{
|
{
|
||||||
Alert("Debe seleccionar una unidad", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
Alert("Debe seleccionar una unidad", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||||
return;
|
return;
|
||||||
@@ -284,22 +284,32 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
|
|
||||||
if (CveEntregaAlmacen > 0)
|
if (CveEntregaAlmacen > 0)
|
||||||
{
|
{
|
||||||
int CveTimbre = ObjGeneral.AddGralTimbre("Rec", row.DataKey("CveSubProyecto").ToEntero(), TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen:CveEntregaAlmacen , AplicaCP: ChkEmitirCartaPorte.Checked);
|
// se actualizan los datos de unidad, chofer, fechas y Carta porte
|
||||||
|
if (ObjGeneral.AsignaEntregaAlmacenRuta(DdlUnidadRec.SelectedValue.ToEntero(), DdlChoferRec.SelectedValue.ToEntero(), TxtFechaRec.Text.ToDate(), CveEntregaAlmacen, UsuarioActual.CveEmpresa))
|
||||||
if (CveTimbre <= 0)
|
|
||||||
{
|
{
|
||||||
SBError.AppendLine($"Factura {row.DataKey("SerieFolio")} error al agregar timbre. ");
|
int CveTimbre = ObjGeneral.AddGralTimbre("Rec", row.DataKey("CveSubProyecto").ToEntero(), TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen: CveEntregaAlmacen, AplicaCP: ChkEmitirPorteRec.Checked);
|
||||||
TieneError = true;
|
|
||||||
break;
|
if (CveTimbre <= 0)
|
||||||
|
{
|
||||||
|
SBError.AppendLine($"Factura {row.DataKey("SerieFolio")} error al agregar timbre. ");
|
||||||
|
TieneError = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ListaTimbres.Add(CveTimbre);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ListaTimbres.Add(CveTimbre);
|
SBError.AppendLine($"Factura {row.DataKey("SerieFolio")} error al aplicar condiciones de entrega. ");
|
||||||
|
TieneError = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SBError.AppendLine($"Factura {row.DataKey("SerieFolio")} error al agregar entrega alamcen. ");
|
SBError.AppendLine($"Factura {row.DataKey("SerieFolio")} error al agregar entrega almacen. ");
|
||||||
TieneError = true;
|
TieneError = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -405,10 +415,12 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
private void CargaCombos()
|
private void CargaCombos()
|
||||||
{
|
{
|
||||||
|
|
||||||
DdlUnidadCamion.DataSource = get_GlobalDTInvCamiones(UsuarioActual.CveEmpresa);
|
DdlUnidadCamion.DataSource = get_GlobalDTInvCamiones(UsuarioActual.CveEmpresa);
|
||||||
|
|
||||||
DdlUnidadCamion.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
DdlUnidadCamion.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||||
DdlUnidadCamion.DataBind();
|
DdlUnidadCamion.DataBind();
|
||||||
|
DdlUnidadRec.DataSource = get_GlobalDTInvCamiones(UsuarioActual.CveEmpresa);
|
||||||
|
DdlUnidadRec.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||||
|
DdlUnidadRec.DataBind();
|
||||||
|
|
||||||
TxtFechaI.Text = DateTime.Now.AddDays(-1).ToShortDateString();
|
TxtFechaI.Text = DateTime.Now.AddDays(-1).ToShortDateString();
|
||||||
TxtFechaF.Text = DateTime.Now.ToShortDateString();
|
TxtFechaF.Text = DateTime.Now.ToShortDateString();
|
||||||
@@ -416,6 +428,9 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
DdlChofer.DataSource = get_GlobalDTChoferes(UsuarioActual.CveEmpresa);
|
DdlChofer.DataSource = get_GlobalDTChoferes(UsuarioActual.CveEmpresa);
|
||||||
DdlChofer.DataBind();
|
DdlChofer.DataBind();
|
||||||
DdlChofer.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
DdlChofer.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||||
|
DdlChoferRec.DataSource = get_GlobalDTChoferes(UsuarioActual.CveEmpresa);
|
||||||
|
DdlChoferRec.DataBind();
|
||||||
|
DdlChoferRec.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||||
|
|
||||||
TxtFechaEntrega.Text = DateTime.Now.ToShortDateString();
|
TxtFechaEntrega.Text = DateTime.Now.ToShortDateString();
|
||||||
|
|
||||||
@@ -799,7 +814,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
if( CveEntregaAlmacen == -1)
|
if( CveEntregaAlmacen == -1)
|
||||||
{
|
{
|
||||||
DateTime fechallegada = (TxtFechaEntrega.Text + " 23:59").ToDate();
|
DateTime fechallegada = (TxtFechaEntrega.Text + " 23:59").ToDate();
|
||||||
CveEntregaAlmacen = ObjGenerales.AddInvEntregaAlmacenRuta(DdlSubProyectoRecoleccion.SelectedValue.ToEntero(), DdlmodalRecoleccionDireccion.SelectedValue.ToEntero(), -1,-1, DdlChofer.SelectedValue.ToEntero(), DdlUnidadCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), fechallegada , "R", 1,0,1);
|
CveEntregaAlmacen = ObjGenerales.AddInvEntregaAlmacenRuta(DdlSubProyectoRecoleccion.SelectedValue.ToEntero(), DdlmodalRecoleccionDireccion.SelectedValue.ToEntero(), -1,-1, DdlChofer.SelectedValue.ToEntero(), DdlUnidadCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), fechallegada, "R",TxtFolioReferencia.Text, TxtReferencia.Text, TxtFechaLimite.Text.ToDate(), 1,0,1) ;
|
||||||
if (CveEntregaAlmacen > 0)
|
if (CveEntregaAlmacen > 0)
|
||||||
{
|
{
|
||||||
//CveTimbrenuevo = ObjGenerales.AddGralTimbre("Rec", "-1", -1, "-1", TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, -1, ChkEmitirCartaPorte.Checked, CveEntregaAlmacen, -1);
|
//CveTimbrenuevo = ObjGenerales.AddGralTimbre("Rec", "-1", -1, "-1", TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, -1, ChkEmitirCartaPorte.Checked, CveEntregaAlmacen, -1);
|
||||||
|
|||||||
@@ -339,7 +339,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
Timbres ObjTimbres = new Timbres("Tra", cvetimbre, UsuarioActual);
|
Timbres ObjTimbres = new Timbres("Tra", cvetimbre, UsuarioActual);
|
||||||
StringBuilder MensajeAlert = new StringBuilder();
|
StringBuilder MensajeAlert = new StringBuilder();
|
||||||
MensajeAlert.AppendFormat("Folio: <b>{0}</b> ", ObjTimbres.ObjFactura.SerieFolio);
|
MensajeAlert.AppendFormat("Folio: <b>{0}</b> ", ObjTimbres.ObjFactura.SerieFolio);
|
||||||
if (ObjTimbres.Timbrar())
|
if (ObjTimbres.MsgError =="" && ObjTimbres.Timbrar())
|
||||||
{
|
{
|
||||||
MensajeAlert.AppendFormat("<a class='texto' style='color:#337ab7' href='/Compras/PopUpVerFactura.aspx?P={0}' target='_blank'>XML <i class='fa fa-file'></i></i></a> ", ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CveTimbre={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", cvetimbre, "XML", ObjTimbres.ObjFactura.SerieFolio, ObjTimbres.ObjFactura.TipoDocto)));
|
MensajeAlert.AppendFormat("<a class='texto' style='color:#337ab7' href='/Compras/PopUpVerFactura.aspx?P={0}' target='_blank'>XML <i class='fa fa-file'></i></i></a> ", ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CveTimbre={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", cvetimbre, "XML", ObjTimbres.ObjFactura.SerieFolio, ObjTimbres.ObjFactura.TipoDocto)));
|
||||||
Alert(MensajeAlert.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
Alert(MensajeAlert.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||||
|
|||||||
@@ -1154,8 +1154,9 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
|
|
||||||
Dim ObjGral As New ClsGenerales(ObjInventario.IniciaTransacSQL)
|
Dim ObjGral As New ClsGenerales(ObjInventario.IniciaTransacSQL)
|
||||||
Dim CveSubProyectoTimbre As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {DdlAlmacenOrigen.SelectedValue}").Rows(0)("CveSubProyecto").ToString.ToEntero
|
Dim CveSubProyectoTimbre As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {DdlAlmacenOrigen.SelectedValue}").Rows(0)("CveSubProyecto").ToString.ToEntero
|
||||||
|
Dim Fechallegada As DateTime = (TxtFechaLlegada.Text & " 23:59:59").ToDateTime
|
||||||
|
|
||||||
Dim CveEntregaAlmacen As Integer = ObjGral.AddInvEntregaAlmacenRuta(CveSubProyectoTimbre, -1, -1, CveMovimientoSalida, DdlChofer.SelectedValue.ToEntero, DdlUnidadCamion.SelectedValue.ToEntero, TxtFechaEntrega.Text.ToDate, TxtFechaLlegada.Text.ToDatetime, "T", 1, 1, 1)
|
Dim CveEntregaAlmacen As Integer = ObjGral.AddInvEntregaAlmacenRuta(CveSubProyectoTimbre, -1, -1, CveMovimientoSalida, DdlChofer.SelectedValue.ToEntero, DdlUnidadCamion.SelectedValue.ToEntero, TxtFechaEntrega.Text.ToDate, Fechallegada, "T", 1, 1, 1)
|
||||||
|
|
||||||
If CveEntregaAlmacen > 0 Then
|
If CveEntregaAlmacen > 0 Then
|
||||||
CveTimbre = ObjGral.AddGralTimbre("Tra", CveSubProyectoTimbre, TxtFechaEntrega.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen:=CveEntregaAlmacen, AplicaCP:=ChkEmitirCartaPorte.Checked)
|
CveTimbre = ObjGral.AddGralTimbre("Tra", CveSubProyectoTimbre, TxtFechaEntrega.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen:=CveEntregaAlmacen, AplicaCP:=ChkEmitirCartaPorte.Checked)
|
||||||
|
|||||||
@@ -904,7 +904,7 @@ Partial Class RH_CatPersonal
|
|||||||
Catalogos.Cell(crow, ccol).Value = "Estado"
|
Catalogos.Cell(crow, ccol).Value = "Estado"
|
||||||
For Each row As DataRow In GlobalDTGralEstados("MEX").Rows
|
For Each row As DataRow In GlobalDTGralEstados("MEX").Rows
|
||||||
crow = crow + 1
|
crow = crow + 1
|
||||||
Catalogos.Cell(crow, ccol).Value = String.Format("{0}: {1}", row("CveEstado"), row("Estado"))
|
Catalogos.Cell(crow, ccol).Value = String.Format("{0}: {1}", row("CveEstado"), row("NombreEstado"))
|
||||||
Next
|
Next
|
||||||
colEstado = ccol
|
colEstado = ccol
|
||||||
rowEstado = crow
|
rowEstado = crow
|
||||||
|
|||||||
Reference in New Issue
Block a user