Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -1178,13 +1178,14 @@ Public Class ClsContabilidad
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Public Function ContabilizaDesContabilizaPrePoliza(CvePrePoliza As Integer, Contabilizar As Boolean, CveEmpresa As Integer) As Boolean
|
Public Function ContabilizaDesContabilizaPrePoliza(CvePrePoliza As Integer, Contabilizar As Boolean, CveEmpresa As Integer, Optional Folio As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Conta_PrePolizasContabilizarDescontabilizar")
|
DataAdapter("PA_Conta_PrePolizasContabilizarDescontabilizar")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
||||||
.Add("@Contabilizar", SqlDbType.Bit).Value = Contabilizar
|
.Add("@Contabilizar", SqlDbType.Bit).Value = Contabilizar
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@Folio", SqlDbType.Int).Value = Folio
|
||||||
.Add("@FolioPoliza", SqlDbType.Int).Direction = ParameterDirection.Output
|
.Add("@FolioPoliza", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -3243,7 +3243,7 @@ Public Class ClsNominas
|
|||||||
|
|
||||||
Public Function GetLayoutAltaBanorte(CvePeriodo As Integer, CveEmpresa As Integer) As Boolean
|
Public Function GetLayoutAltaBanorte(CvePeriodo As Integer, CveEmpresa As Integer) As Boolean
|
||||||
Dim retorno As Boolean = False
|
Dim retorno As Boolean = False
|
||||||
DataAdapter("PA_Nom_Dispersionnomina", CommandType.StoredProcedure)
|
DataAdapter("PA_Nom_LayoutAltaBanorteGet", CommandType.StoredProcedure)
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
|
.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
@@ -3258,6 +3258,22 @@ Public Class ClsNominas
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Public Function GetDispersionNominaBanorte(CvePeriodo As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Nom_DispersionNominaBanorteGet", CommandType.StoredProcedure)
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener el layout de nominas Banorte.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
#Region "IDisposable Support"
|
#Region "IDisposable Support"
|
||||||
' IDisposable
|
' IDisposable
|
||||||
|
|||||||
@@ -6356,16 +6356,34 @@ Public Class ClsPaginas
|
|||||||
|
|
||||||
Try
|
Try
|
||||||
bytes = bytes
|
bytes = bytes
|
||||||
|
|
||||||
|
|
||||||
|
'Response.Clear()
|
||||||
|
'Response.ContentType = "application/pdf"
|
||||||
|
'Response.Cache.SetCacheability(HttpCacheability.Private)
|
||||||
|
'Response.Expires = -1
|
||||||
|
'Response.Buffer = True
|
||||||
|
''Uncomment to handle the file as attachment
|
||||||
|
'Response.AddHeader("Content-Disposition", String.Format("inline; filename={0}.{1}", NombreArchivo, If(Formato = "PDF", "pdf", "xls")))
|
||||||
|
''Response.BinaryWrite(bytes)
|
||||||
|
'bytes = Nothing
|
||||||
|
'Response.End()
|
||||||
|
|
||||||
|
|
||||||
Response.Buffer = True
|
Response.Buffer = True
|
||||||
Response.Clear()
|
Response.Clear()
|
||||||
Response.ContentType = mimeType
|
If Formato = "PDF" Then
|
||||||
|
Response.ContentType = "application/pdf"
|
||||||
|
Else
|
||||||
|
Response.ContentType = mimeType
|
||||||
|
End If
|
||||||
Response.AddHeader("content-disposition", String.Format("{0}; filename={1}.{2}", Content_Disposition, NombreArchivo, If(Formato = "PDF", "pdf", "xls")))
|
Response.AddHeader("content-disposition", String.Format("{0}; filename={1}.{2}", Content_Disposition, NombreArchivo, If(Formato = "PDF", "pdf", "xls")))
|
||||||
Response.BinaryWrite(bytes) ' create the file
|
Response.BinaryWrite(bytes) ' create the file
|
||||||
Response.Flush() ' send it to the client to download
|
Response.Flush() ' send it to the client to download
|
||||||
HttpContext.Current.Response.SuppressContent = True
|
HttpContext.Current.Response.SuppressContent = True
|
||||||
HttpContext.Current.ApplicationInstance.CompleteRequest()
|
HttpContext.Current.ApplicationInstance.CompleteRequest()
|
||||||
HttpContext.Current.Response.End()
|
|
||||||
bytes = Nothing
|
bytes = Nothing
|
||||||
|
'HttpContext.Current.Response.End()
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
|
||||||
If UsuarioActual.CveRol = 1 Then
|
If UsuarioActual.CveRol = 1 Then
|
||||||
|
|||||||
@@ -4559,15 +4559,24 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
Dim TipoMovimiento As Integer = 1
|
Dim TipoMovimiento As Integer = 1
|
||||||
|
|
||||||
|
Dim CveTipoTransaccionCancelacion As Integer = DdlTipoTransaccionCancelacion.SelectedValue.ToEntero
|
||||||
|
|
||||||
If ChkGeneraCancelacion.Checked AndAlso GeneraCancelacionEnCero Then
|
If ChkGeneraCancelacion.Checked AndAlso GeneraCancelacionEnCero Then
|
||||||
GeneraCancelacionEnCero = False
|
GeneraCancelacionEnCero = False
|
||||||
TipoMovimiento = 2
|
TipoMovimiento = 2
|
||||||
|
|
||||||
|
If DdlTipoTransaccionCancelacion.SelectedValue.ToEntero = -1 Then
|
||||||
|
CveTipoTransaccionCancelacion = 16 'Validacion manual para solo enviar el correcto
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CvePrePolizaCancelacion As Integer = 0
|
Dim CvePrePolizaCancelacion As Integer = 0
|
||||||
|
|
||||||
If Not GeneraCancelacionEnCero Then
|
If Not GeneraCancelacionEnCero Then
|
||||||
'CANCELA IE MES ANTERIOR
|
'CANCELA IE MES ANTERIOR
|
||||||
CvePrePolizaCancelacion = Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate, TipoMovimiento:=TipoMovimiento, CveTipoTransaccionCancelacion:=DdlTipoTransaccionCancelacion.SelectedValue.ToEntero)
|
CvePrePolizaCancelacion = Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate, TipoMovimiento:=TipoMovimiento,
|
||||||
|
CveTipoTransaccionCancelacion:=CveTipoTransaccionCancelacion)
|
||||||
If CvePrePolizaCancelacion <= 0 Then
|
If CvePrePolizaCancelacion <= 0 Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
MensajeError = "Error al cancelar IE MES ANTERIOR"
|
MensajeError = "Error al cancelar IE MES ANTERIOR"
|
||||||
@@ -4582,7 +4591,8 @@ Partial Class Bancos_IE
|
|||||||
MensajeError = "Error al desbloquear prepoliza."
|
MensajeError = "Error al desbloquear prepoliza."
|
||||||
Else
|
Else
|
||||||
'CANCELA IE MES ACTUAL
|
'CANCELA IE MES ACTUAL
|
||||||
CvePrePolizaCancelacion = Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate, CveTipoTransaccionCancelacion:=DdlTipoTransaccionCancelacion.SelectedValue.ToEntero)
|
CvePrePolizaCancelacion = Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate,
|
||||||
|
CveTipoTransaccionCancelacion:=CveTipoTransaccionCancelacion)
|
||||||
If CvePrePolizaCancelacion <= 0 Then
|
If CvePrePolizaCancelacion <= 0 Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
MensajeError = "Error al cancelar IE MES ACTUAL"
|
MensajeError = "Error al cancelar IE MES ACTUAL"
|
||||||
@@ -4797,7 +4807,7 @@ Partial Class Bancos_IE
|
|||||||
Else
|
Else
|
||||||
|
|
||||||
'siempre se hace una cancelación
|
'siempre se hace una cancelación
|
||||||
If Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaDevuelto.Text.ToDate, 2) <= 0 Then
|
If Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaDevuelto.Text.ToDate, 2, 16) <= 0 Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -4041,9 +4041,7 @@ Partial Class Compras_Compras
|
|||||||
Protected Sub BtnGuardar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnGuardar.Click
|
Protected Sub BtnGuardar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnGuardar.Click
|
||||||
|
|
||||||
|
|
||||||
'If Not AjustaCombustibles() Then
|
|
||||||
' Exit Sub
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'------------------ INICIA VALIDACIONES ------------------
|
'------------------ INICIA VALIDACIONES ------------------
|
||||||
|
|
||||||
@@ -4465,6 +4463,10 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
'------------------TERMINA VALIDACIONES------------------
|
'------------------TERMINA VALIDACIONES------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'si hay necesidad de actualizar el globaldtps
|
'si hay necesidad de actualizar el globaldtps
|
||||||
If RegeneraPS Then
|
If RegeneraPS Then
|
||||||
'Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDT)
|
'Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDT)
|
||||||
@@ -5922,7 +5924,10 @@ Partial Class Compras_Compras
|
|||||||
Dim IdCtaContable As Integer = 0
|
Dim IdCtaContable As Integer = 0
|
||||||
Dim Concepto As String = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, NombreProveedor, $"{TxtSerie.Text}-{TxtFolio.Text}", If(TxtDocumentoFolio.Visible, TxtDocumentoFolio.Text, If(TxtDocumentoFolioCaja.Visible, TxtDocumentoFolioCaja.Text, ConceptoPersonal)))
|
Dim Concepto As String = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, NombreProveedor, $"{TxtSerie.Text}-{TxtFolio.Text}", If(TxtDocumentoFolio.Visible, TxtDocumentoFolio.Text, If(TxtDocumentoFolioCaja.Visible, TxtDocumentoFolioCaja.Text, ConceptoPersonal)))
|
||||||
Dim importeMN As Decimal = 0
|
Dim importeMN As Decimal = 0
|
||||||
Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, 1, -1)
|
|
||||||
|
Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, -1, 1)
|
||||||
|
|
||||||
|
|
||||||
Dim Referencia As String = $"{TxtSerie.Text}-{TxtFolio.Text}" ' concatenation interpolation
|
Dim Referencia As String = $"{TxtSerie.Text}-{TxtFolio.Text}" ' concatenation interpolation
|
||||||
Dim PorcentajeImpuesto As Decimal = 0
|
Dim PorcentajeImpuesto As Decimal = 0
|
||||||
CveConceptoOriginal = ConceptoContable
|
CveConceptoOriginal = ConceptoContable
|
||||||
@@ -8967,7 +8972,7 @@ Partial Class Compras_Compras
|
|||||||
IdCtaContable = 0
|
IdCtaContable = 0
|
||||||
Dim Concepto As String = String.Format("{0}-{1}", TxtSerie.Text, TxtFolio.Text)
|
Dim Concepto As String = String.Format("{0}-{1}", TxtSerie.Text, TxtFolio.Text)
|
||||||
Dim importeMN As Decimal = 0
|
Dim importeMN As Decimal = 0
|
||||||
Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, 1, -1)
|
Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, -1, 1)
|
||||||
Dim PorcentajeImpuesto As Decimal = 0
|
Dim PorcentajeImpuesto As Decimal = 0
|
||||||
Dim ConceptoPartida As String = String.Format("{0}-{1}", TxtSerie.Text, TxtFolio.Text)
|
Dim ConceptoPartida As String = String.Format("{0}-{1}", TxtSerie.Text, TxtFolio.Text)
|
||||||
|
|
||||||
@@ -10586,7 +10591,7 @@ Partial Class Compras_Compras
|
|||||||
Dim importeMovimiento As Decimal = 0
|
Dim importeMovimiento As Decimal = 0
|
||||||
Dim IdCtaContable As Integer = 0
|
Dim IdCtaContable As Integer = 0
|
||||||
Dim importeMN As Decimal = 0
|
Dim importeMN As Decimal = 0
|
||||||
Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, 1, -1)
|
Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, -1, 1)
|
||||||
Dim Referencia As String = $"{TxtSerie.Text}-{TxtFolio.Text}" ' concatenation interpolation
|
Dim Referencia As String = $"{TxtSerie.Text}-{TxtFolio.Text}" ' concatenation interpolation
|
||||||
|
|
||||||
Select Case ConceptoContable
|
Select Case ConceptoContable
|
||||||
|
|||||||
@@ -212,11 +212,15 @@ Partial Class PopUpVerFactura
|
|||||||
If Request("onlyPrint").ToString() = "manifiestoRemision" Then
|
If Request("onlyPrint").ToString() = "manifiestoRemision" Then
|
||||||
imprimirManifiestoRemision(Request("cveEmbarqueManifiesto").ToString.ToEntero())
|
imprimirManifiestoRemision(Request("cveEmbarqueManifiesto").ToString.ToEntero())
|
||||||
End If
|
End If
|
||||||
|
If Request("onlyPrint").ToString() = "manifiestoCartaPorte" Then
|
||||||
|
imprimirManifiestoCartaPorte(Request("cveEmbarqueManifiesto").ToString.ToEntero())
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Private Sub imprimirManifiesto(cveEmbarqueManifiesto As Integer)
|
Private Sub imprimirManifiesto(cveEmbarqueManifiesto As Integer)
|
||||||
Dim NoEmbarque As String = ""
|
Dim NoEmbarque As String = ""
|
||||||
Dim Fecha As String = ""
|
Dim Fecha As String = ""
|
||||||
@@ -235,6 +239,8 @@ Partial Class PopUpVerFactura
|
|||||||
Dim NoKgManifiesto As String = ""
|
Dim NoKgManifiesto As String = ""
|
||||||
Dim Mercado As String = ""
|
Dim Mercado As String = ""
|
||||||
Dim NoFactura As String = ""
|
Dim NoFactura As String = ""
|
||||||
|
Dim Cliente As String = ""
|
||||||
|
Dim Direccion As String = ""
|
||||||
|
|
||||||
Dim LongitudCaja As String = ""
|
Dim LongitudCaja As String = ""
|
||||||
Dim LineaTransportacion As String = ""
|
Dim LineaTransportacion As String = ""
|
||||||
@@ -254,6 +260,8 @@ Partial Class PopUpVerFactura
|
|||||||
If objnom.PA_AGRO_Embarque_ManifiestoGet(-1, -1, -1, cveEmbarqueManifiesto) And objnom.DtResultados.Rows.Count > 0 Then
|
If objnom.PA_AGRO_Embarque_ManifiestoGet(-1, -1, -1, cveEmbarqueManifiesto) And objnom.DtResultados.Rows.Count > 0 Then
|
||||||
Dim row As DataRow = objnom.DtResultados.Rows(0)
|
Dim row As DataRow = objnom.DtResultados.Rows(0)
|
||||||
NoEmbarque = row("NoEmbarque").ToString()
|
NoEmbarque = row("NoEmbarque").ToString()
|
||||||
|
Cliente = row("Cliente").ToString()
|
||||||
|
Direccion = row("Direccion").ToString()
|
||||||
Fecha = String.Format("{0:dd/MM/yyyy}", row("Fecha"))
|
Fecha = String.Format("{0:dd/MM/yyyy}", row("Fecha"))
|
||||||
SubProyecto = row("SubProyecto").ToString()
|
SubProyecto = row("SubProyecto").ToString()
|
||||||
AgenciaAduanalUSA = row("AgenciaAduanalUSA").ToString()
|
AgenciaAduanalUSA = row("AgenciaAduanalUSA").ToString()
|
||||||
@@ -288,6 +296,7 @@ Partial Class PopUpVerFactura
|
|||||||
NoPallets = objnom.DtResultados.Rows.Count.ToString()
|
NoPallets = objnom.DtResultados.Rows.Count.ToString()
|
||||||
NoKgManifiesto = objnom.DtResultados.SUM("Peso").ToString("N2")
|
NoKgManifiesto = objnom.DtResultados.SUM("Peso").ToString("N2")
|
||||||
NoBultos = objnom.DtResultados.SUM("NoCajas").ToString("N0")
|
NoBultos = objnom.DtResultados.SUM("NoCajas").ToString("N0")
|
||||||
|
|
||||||
tablaReporte = objnom.DtResultados
|
tablaReporte = objnom.DtResultados
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -295,6 +304,8 @@ Partial Class PopUpVerFactura
|
|||||||
End Using
|
End Using
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
params.Add(New ReportParameter("NoEmbarque", NoEmbarque))
|
params.Add(New ReportParameter("NoEmbarque", NoEmbarque))
|
||||||
|
params.Add(New ReportParameter("Cliente", Cliente))
|
||||||
|
params.Add(New ReportParameter("Direccion", Direccion))
|
||||||
params.Add(New ReportParameter("Fecha", Fecha))
|
params.Add(New ReportParameter("Fecha", Fecha))
|
||||||
params.Add(New ReportParameter("SubProyecto", SubProyecto))
|
params.Add(New ReportParameter("SubProyecto", SubProyecto))
|
||||||
params.Add(New ReportParameter("AgenciaAduanalUSA", AgenciaAduanalUSA))
|
params.Add(New ReportParameter("AgenciaAduanalUSA", AgenciaAduanalUSA))
|
||||||
@@ -335,8 +346,7 @@ Partial Class PopUpVerFactura
|
|||||||
ImprimirPDF("GPS/EmbarqueManifiesto.rdlc", lrds, params, "Manifesto")
|
ImprimirPDF("GPS/EmbarqueManifiesto.rdlc", lrds, params, "Manifesto")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub imprimirManifiestoRemision(cveEmbarqueManifiesto As Integer)
|
||||||
Private Sub imprimirManifiestoRemisionRemision(cveEmbarqueManifiesto As Integer)
|
|
||||||
Dim NoEmbarque As String = ""
|
Dim NoEmbarque As String = ""
|
||||||
Dim Fecha As String = ""
|
Dim Fecha As String = ""
|
||||||
Dim SubProyecto As String = ""
|
Dim SubProyecto As String = ""
|
||||||
@@ -361,6 +371,8 @@ Partial Class PopUpVerFactura
|
|||||||
Dim RPC As String = ""
|
Dim RPC As String = ""
|
||||||
Dim BINSDECARTON As String = ""
|
Dim BINSDECARTON As String = ""
|
||||||
Dim TotalDlls As String = ""
|
Dim TotalDlls As String = ""
|
||||||
|
Dim Cliente As String = ""
|
||||||
|
Dim Direccion As String = ""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -382,6 +394,8 @@ Partial Class PopUpVerFactura
|
|||||||
If objnom.PA_AGRO_Embarque_ManifiestoGet(-1, -1, -1, cveEmbarqueManifiesto) And objnom.DtResultados.Rows.Count > 0 Then
|
If objnom.PA_AGRO_Embarque_ManifiestoGet(-1, -1, -1, cveEmbarqueManifiesto) And objnom.DtResultados.Rows.Count > 0 Then
|
||||||
Dim row As DataRow = objnom.DtResultados.Rows(0)
|
Dim row As DataRow = objnom.DtResultados.Rows(0)
|
||||||
NoEmbarque = row("NoEmbarque").ToString()
|
NoEmbarque = row("NoEmbarque").ToString()
|
||||||
|
Cliente = row("Cliente").ToString()
|
||||||
|
Direccion = row("Direccion").ToString()
|
||||||
Fecha = String.Format("{0:dd/MM/yyyy}", row("Fecha"))
|
Fecha = String.Format("{0:dd/MM/yyyy}", row("Fecha"))
|
||||||
DivisoresdeCarton = String.Format("{0:N0}", row("DivisoresdeCarton"))
|
DivisoresdeCarton = String.Format("{0:N0}", row("DivisoresdeCarton"))
|
||||||
BolsasdePlastico = String.Format("{0:N0}", row("BolsasdePlastico"))
|
BolsasdePlastico = String.Format("{0:N0}", row("BolsasdePlastico"))
|
||||||
@@ -389,6 +403,7 @@ Partial Class PopUpVerFactura
|
|||||||
CAJASDECARTON = String.Format("{0:N0}", row("CAJASDECARTON"))
|
CAJASDECARTON = String.Format("{0:N0}", row("CAJASDECARTON"))
|
||||||
RPC = String.Format("{0:N0}", row("RPC"))
|
RPC = String.Format("{0:N0}", row("RPC"))
|
||||||
BINSDECARTON = String.Format("{0:N0}", row("BINSDECARTON"))
|
BINSDECARTON = String.Format("{0:N0}", row("BINSDECARTON"))
|
||||||
|
TotalDlls = String.Format("{0:N0}", row("TotalDlls"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -402,7 +417,7 @@ Partial Class PopUpVerFactura
|
|||||||
Camion = String.Format("{0} {1}", row("CamEspecificacion"), row("CamAnio"))
|
Camion = String.Format("{0} {1}", row("CamEspecificacion"), row("CamAnio"))
|
||||||
Rem1Placa = row("Rem1Placa").ToString()
|
Rem1Placa = row("Rem1Placa").ToString()
|
||||||
NoFactura = row("NoFactura").ToString()
|
NoFactura = row("NoFactura").ToString()
|
||||||
Remolque1 = String.Format("{0} ", row("NumeroTrailer"), row("Rem1Anio"))
|
Remolque1 = String.Format("{0} ", row("NumeroTrailer"))
|
||||||
Mercado = If(row("CveDestino").ToString() = "2", "Extranjero", "Nacional")
|
Mercado = If(row("CveDestino").ToString() = "2", "Extranjero", "Nacional")
|
||||||
|
|
||||||
NumeroTrailer = String.Format("No. {0}", row("NumeroTrailer").ToString())
|
NumeroTrailer = String.Format("No. {0}", row("NumeroTrailer").ToString())
|
||||||
@@ -432,6 +447,8 @@ Partial Class PopUpVerFactura
|
|||||||
End Using
|
End Using
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
params.Add(New ReportParameter("NoEmbarque", NoEmbarque))
|
params.Add(New ReportParameter("NoEmbarque", NoEmbarque))
|
||||||
|
params.Add(New ReportParameter("Cliente", Cliente))
|
||||||
|
params.Add(New ReportParameter("Direccion", Direccion))
|
||||||
params.Add(New ReportParameter("Fecha", Fecha))
|
params.Add(New ReportParameter("Fecha", Fecha))
|
||||||
params.Add(New ReportParameter("SubProyecto", SubProyecto))
|
params.Add(New ReportParameter("SubProyecto", SubProyecto))
|
||||||
params.Add(New ReportParameter("AgenciaAduanalUSA", AgenciaAduanalUSA))
|
params.Add(New ReportParameter("AgenciaAduanalUSA", AgenciaAduanalUSA))
|
||||||
@@ -476,8 +493,178 @@ Partial Class PopUpVerFactura
|
|||||||
lrds.Add(rds)
|
lrds.Add(rds)
|
||||||
'"Empresas/Grales/Formatos/EquiposGPS.rdlc"
|
'"Empresas/Grales/Formatos/EquiposGPS.rdlc"
|
||||||
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
||||||
ImprimirPDF("GPS/EmbarqueManifiestoRemision.rdlc", lrds, params, "Manifesto")
|
ImprimirPDF("GPS/EmbarqueManifiestoRemision.rdlc", lrds, params, "Remisión")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub imprimirManifiestoCartaPorte(cveEmbarqueManifiesto As Integer)
|
||||||
|
Dim NoEmbarque As String = ""
|
||||||
|
Dim Fecha As String = ""
|
||||||
|
Dim SubProyecto As String = ""
|
||||||
|
Dim AgenciaAduanalUSA As String = ""
|
||||||
|
Dim AgenciaAduanalMEX As String = ""
|
||||||
|
Dim Temperatura As String = ""
|
||||||
|
Dim Hora As String = ""
|
||||||
|
Dim Chofer As String = ""
|
||||||
|
Dim CamPlaca As String = ""
|
||||||
|
Dim Camion As String = ""
|
||||||
|
Dim Rem1Placa As String = ""
|
||||||
|
Dim Remolque1 As String = ""
|
||||||
|
Dim NoPallets As String = ""
|
||||||
|
Dim NoBultos As String = ""
|
||||||
|
Dim NoKgManifiesto As String = ""
|
||||||
|
Dim Mercado As String = ""
|
||||||
|
Dim NoFactura As String = ""
|
||||||
|
Dim DivisoresdeCarton As String = ""
|
||||||
|
Dim BolsasdePlastico As String = ""
|
||||||
|
Dim TapaderasdeCarton As String = ""
|
||||||
|
Dim CAJASDECARTON As String = ""
|
||||||
|
Dim RPC As String = ""
|
||||||
|
Dim BINSDECARTON As String = ""
|
||||||
|
Dim TotalDlls As String = ""
|
||||||
|
Dim Cliente As String = ""
|
||||||
|
Dim Direccion As String = ""
|
||||||
|
Dim Correo As String = ""
|
||||||
|
|
||||||
|
|
||||||
|
Dim LongitudCaja As String = ""
|
||||||
|
Dim LineaTransportacion As String = ""
|
||||||
|
Dim SCAC As String = ""
|
||||||
|
Dim CAAT As String = ""
|
||||||
|
Dim NumeroTrailer As String = ""
|
||||||
|
|
||||||
|
|
||||||
|
Dim tablaReporte As New DataTable
|
||||||
|
|
||||||
|
'Envase = "1 1/9"
|
||||||
|
'Tamano = "Small"
|
||||||
|
'Cultivo = "Tomate"
|
||||||
|
'noPallet = "000001"
|
||||||
|
'Variedad = "Golden"
|
||||||
|
Using objnom As New ClsNominas
|
||||||
|
If objnom.PA_AGRO_Embarque_ManifiestoGet(-1, -1, -1, cveEmbarqueManifiesto) And objnom.DtResultados.Rows.Count > 0 Then
|
||||||
|
Dim row As DataRow = objnom.DtResultados.Rows(0)
|
||||||
|
NoEmbarque = row("NoEmbarque").ToString()
|
||||||
|
Cliente = row("Cliente").ToString()
|
||||||
|
Direccion = row("Direccion").ToString()
|
||||||
|
Correo = row("Correo").ToString()
|
||||||
|
Fecha = String.Format("{0:dd/MM/yyyy}", row("Fecha"))
|
||||||
|
DivisoresdeCarton = String.Format("{0:N0}", row("DivisoresdeCarton"))
|
||||||
|
BolsasdePlastico = String.Format("{0:N0}", row("BolsasdePlastico"))
|
||||||
|
TapaderasdeCarton = String.Format("{0:N0}", row("TapaderasdeCarton"))
|
||||||
|
CAJASDECARTON = String.Format("{0:N0}", row("CAJASDECARTON"))
|
||||||
|
RPC = String.Format("{0:N0}", row("RPC"))
|
||||||
|
BINSDECARTON = String.Format("{0:N0}", row("BINSDECARTON"))
|
||||||
|
TotalDlls = String.Format("{0:N0}", row("TotalDlls"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
SubProyecto = row("SubProyecto").ToString()
|
||||||
|
AgenciaAduanalUSA = row("AgenciaAduanalUSA").ToString()
|
||||||
|
AgenciaAduanalMEX = row("AgenciaAduanalMEX").ToString()
|
||||||
|
Temperatura = row("Temperatura").ToString()
|
||||||
|
Hora = String.Format("{0:hh }:{0:mm }:{0:ss tt}:", row("FechaIng"))
|
||||||
|
Chofer = row("Chofer").ToString()
|
||||||
|
CamPlaca = row("CamPlaca").ToString()
|
||||||
|
Camion = String.Format("{0} {1}", row("CamEspecificacion"), row("CamAnio"))
|
||||||
|
Rem1Placa = row("Rem1Placa").ToString()
|
||||||
|
NoFactura = row("NoFactura").ToString()
|
||||||
|
Remolque1 = String.Format("{0} ", row("NumeroTrailer"))
|
||||||
|
Mercado = If(row("CveDestino").ToString() = "2", "Extranjero", "Nacional")
|
||||||
|
|
||||||
|
NumeroTrailer = String.Format("No. {0}", row("NumeroTrailer").ToString())
|
||||||
|
|
||||||
|
LongitudCaja = row("LongitudCaja").ToString()
|
||||||
|
LineaTransportacion = row("LineaTransportacion").ToString()
|
||||||
|
SCAC = row("SCAC").ToString()
|
||||||
|
CAAT = row("CAAT").ToString()
|
||||||
|
|
||||||
|
'If row("CveCamionRemolque1").ToString() = "1" Then
|
||||||
|
' Rem1Placa = "12-TF-5E"
|
||||||
|
' Remolque1 = "Remolque 1"
|
||||||
|
'Else
|
||||||
|
' Rem1Placa = "15-TF-7f"
|
||||||
|
' Remolque1 = "Remolque 2"
|
||||||
|
|
||||||
|
'End If
|
||||||
|
|
||||||
|
If objnom.PA_Agro_Embarque_PalletGet(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, cveEmbarqueManifiesto, -1) And objnom.DtResultados.Rows.Count > 0 Then
|
||||||
|
NoPallets = objnom.DtResultados.Rows.Count.ToString()
|
||||||
|
NoKgManifiesto = objnom.DtResultados.SUM("Peso").ToString("N2")
|
||||||
|
NoBultos = objnom.DtResultados.SUM("NoCajas").ToString("N0")
|
||||||
|
tablaReporte = objnom.DtResultados
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
'Remolque 1 12-TF-5E' }, { cveCamion: 2, placa: 'Remolque 2 15-TF-7f
|
||||||
|
End Using
|
||||||
|
Dim params As New List(Of ReportParameter)
|
||||||
|
params.Add(New ReportParameter("NoEmbarque", NoEmbarque))
|
||||||
|
params.Add(New ReportParameter("Cliente", Cliente))
|
||||||
|
params.Add(New ReportParameter("Direccion", Direccion))
|
||||||
|
params.Add(New ReportParameter("Fecha", Fecha))
|
||||||
|
params.Add(New ReportParameter("SubProyecto", SubProyecto))
|
||||||
|
params.Add(New ReportParameter("AgenciaAduanalUSA", AgenciaAduanalUSA))
|
||||||
|
params.Add(New ReportParameter("AgenciaAduanalMEX", AgenciaAduanalMEX))
|
||||||
|
params.Add(New ReportParameter("Temperatura", Temperatura))
|
||||||
|
params.Add(New ReportParameter("Hora", Hora))
|
||||||
|
params.Add(New ReportParameter("Chofer", Chofer))
|
||||||
|
params.Add(New ReportParameter("CamPlaca", CamPlaca))
|
||||||
|
params.Add(New ReportParameter("Camion", Camion))
|
||||||
|
params.Add(New ReportParameter("Rem1Placa", Rem1Placa))
|
||||||
|
params.Add(New ReportParameter("Remolque1", Remolque1))
|
||||||
|
|
||||||
|
|
||||||
|
params.Add(New ReportParameter("LongitudCaja", LongitudCaja))
|
||||||
|
params.Add(New ReportParameter("LineaTransportacion", LineaTransportacion))
|
||||||
|
params.Add(New ReportParameter("SCAC", SCAC))
|
||||||
|
params.Add(New ReportParameter("CAAT", CAAT))
|
||||||
|
params.Add(New ReportParameter("NumeroTrailer", NumeroTrailer))
|
||||||
|
|
||||||
|
|
||||||
|
params.Add(New ReportParameter("NoFactura", NoFactura))
|
||||||
|
params.Add(New ReportParameter("Mercado", Mercado))
|
||||||
|
params.Add(New ReportParameter("NoBultos", NoBultos))
|
||||||
|
params.Add(New ReportParameter("NoPallets", NoPallets))
|
||||||
|
params.Add(New ReportParameter("NoKgManifiesto", NoKgManifiesto))
|
||||||
|
|
||||||
|
|
||||||
|
'params.Add(New ReportParameter("DivisoresdeCarton", DivisoresdeCarton))
|
||||||
|
'params.Add(New ReportParameter("BolsasdePlastico", BolsasdePlastico))
|
||||||
|
'params.Add(New ReportParameter("TapaderasdeCarton", TapaderasdeCarton))
|
||||||
|
'params.Add(New ReportParameter("CAJASDECARTON", CAJASDECARTON))
|
||||||
|
'params.Add(New ReportParameter("RPC", RPC))
|
||||||
|
'params.Add(New ReportParameter("BINSDECARTON", BINSDECARTON))
|
||||||
|
'params.Add(New ReportParameter("TotalDlls", TotalDlls))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dim lrds As New List(Of ReportDataSource)
|
||||||
|
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = tablaReporte}
|
||||||
|
lrds.Add(rds)
|
||||||
|
'"Empresas/Grales/Formatos/EquiposGPS.rdlc"
|
||||||
|
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
||||||
|
Dim pdf = StreamPDF("GPS/EmbarqueManifiestoCartaPorte.rdlc", lrds, params, "DatosCartaPorte")
|
||||||
|
|
||||||
|
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
|
||||||
|
LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = pdf, .NombreArchivo = String.Format("{0}.pdf", "DatosCartaPorte")})
|
||||||
|
|
||||||
|
Dim ObjMail As New ClsSisMail()
|
||||||
|
|
||||||
|
If ObjMail.SendMail(UsuarioActual.Empresa, Correo, "Datos carta porte", "", "", LSRutasMail) Then
|
||||||
|
'ResultadoMail = 1
|
||||||
|
Else
|
||||||
|
'GuardaLogFacturacion($"No se envio el correo {Mail}, {Asunto}, {Cuerpo}, {MailCC},")
|
||||||
|
'GuardaLogFacturacion($"Ruta XML {ArchivoXML}")
|
||||||
|
'ResultadoMail = 3
|
||||||
|
End If
|
||||||
|
ImprimirPDF("GPS/EmbarqueManifiestoCartaPorte.rdlc", lrds, params, "DatosCartaPorte", Content_Disposition:="inline")
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Private Sub imprimirpallet2(cvePallet As Integer)
|
Private Sub imprimirpallet2(cvePallet As Integer)
|
||||||
Dim Envase As String = ""
|
Dim Envase As String = ""
|
||||||
Dim Tamano As String = ""
|
Dim Tamano As String = ""
|
||||||
|
|||||||
@@ -713,18 +713,36 @@ Partial Class Compras_Proveedores
|
|||||||
Dim Prefijo As String = If(XMLDoc.DocumentElement.Prefix = "", "cfd", XMLDoc.DocumentElement.Prefix)
|
Dim Prefijo As String = If(XMLDoc.DocumentElement.Prefix = "", "cfd", XMLDoc.DocumentElement.Prefix)
|
||||||
Dim cfdVer As String = "http://www.sat.gob.mx/cfd/3"
|
Dim cfdVer As String = "http://www.sat.gob.mx/cfd/3"
|
||||||
Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable)
|
Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable)
|
||||||
Dim nodo As XmlNode = XMLDoc.DocumentElement
|
|
||||||
|
|
||||||
If Prefijo.ToLower <> "cfdi" Then cfdVer = "http://www.sat.gob.mx/cfd/2"
|
Dim nodo As XmlNode = XMLDoc.DocumentElement
|
||||||
namespaces.AddNamespace(Prefijo, cfdVer)
|
|
||||||
Dim Version As String = ValorXml(nodo, "Version")
|
Dim Version As String = ValorXml(nodo, "Version")
|
||||||
|
|
||||||
|
|
||||||
|
If Version = "3.2" Then
|
||||||
|
Prefijo = "cfd"
|
||||||
|
cfdVer = "http://www.sat.gob.mx/cfd/2"
|
||||||
|
ElseIf Version = "3.3" Then
|
||||||
|
cfdVer = "http://www.sat.gob.mx/cfd/3"
|
||||||
|
|
||||||
|
Else ' se considera que es la version 4.0
|
||||||
|
cfdVer = "http://www.sat.gob.mx/cfd/4"
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'If Prefijo.ToLower <> "cfdi" Then cfdVer = "http://www.sat.gob.mx/cfd/2"
|
||||||
|
namespaces.AddNamespace(Prefijo, cfdVer)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim node As XmlNode
|
Dim node As XmlNode
|
||||||
node = XMLDoc.SelectSingleNode(String.Format("//{0}:Emisor", Prefijo), namespaces)
|
node = XMLDoc.SelectSingleNode(String.Format("//{0}:Emisor", Prefijo), namespaces)
|
||||||
If node IsNot Nothing Then
|
If node IsNot Nothing Then
|
||||||
TxtRFC.Text = ValorXml(node, "rfc")
|
TxtRFC.Text = ValorXml(node, "rfc")
|
||||||
|
|
||||||
If Version = "3.3" Then
|
If Version = "3.3" Or Version = "4.0" Then
|
||||||
TxtRazonSocial.Text = HttpUtility.HtmlDecode(ValorXml(node, "Nombre"))
|
TxtRazonSocial.Text = HttpUtility.HtmlDecode(ValorXml(node, "Nombre"))
|
||||||
TxtNombreComercial.Text = HttpUtility.HtmlDecode(ValorXml(node, "Nombre"))
|
TxtNombreComercial.Text = HttpUtility.HtmlDecode(ValorXml(node, "Nombre"))
|
||||||
ChkEstado.Checked = True
|
ChkEstado.Checked = True
|
||||||
|
|||||||
@@ -1700,7 +1700,7 @@ Partial Class Compras_eFacturas
|
|||||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalFacturas"))
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalFacturas"))
|
||||||
|
|
||||||
|
|
||||||
asdasd
|
|
||||||
'Alert(String.Format("Se cargaron {0} Facturas", Arreglo.Count), TipoMensaje.MsgInformacion)
|
'Alert(String.Format("Se cargaron {0} Facturas", Arreglo.Count), TipoMensaje.MsgInformacion)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -88,9 +88,9 @@
|
|||||||
|
|
||||||
<asp:LinkButton ID="LnkAddConcepto" runat="server" OnClick="LnkAddConcepto_Click" Visible="true"><i class="fa fa-plus" ></i> Agregar Concepto</asp:LinkButton>
|
<asp:LinkButton ID="LnkAddConcepto" runat="server" OnClick="LnkAddConcepto_Click" Visible="true"><i class="fa fa-plus" ></i> Agregar Concepto</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkCrearAPartirDe" runat="server" Visible="false" OnClick="LnkCrearAPartirDe_Click" Style="color: #686868;"><i class="fa fa-plus" style="color:#686868;" ></i>Crear a partir de</asp:LinkButton>
|
<asp:LinkButton ID="LnkCrearAPartirDe" runat="server" Visible="false" OnClick="LnkCrearAPartirDe_Click" Style="color: #686868;"><i class="fa fa-plus" style="color:#686868;" ></i>Crear a partir de</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
@@ -156,8 +156,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-group input-small ">
|
||||||
<asp:TextBox CssClass="form-control" ID="TxtFolio" runat="server" MaxLength="15" Enabled="false"></asp:TextBox>
|
<asp:TextBox CssClass="form-control" ID="TxtFolio" runat="server" MaxLength="15" Enabled="false" Width="100%"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton runat="server" ID="LnkFolioManual" CssClass="blue" Visible="false"> <i class="fa fa-pencil" aria-hidden="true"></i></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<label for="<%= TxtFolio.ClientID.ToString()%>">Folio: </label>
|
<label for="<%= TxtFolio.ClientID.ToString()%>">Folio: </label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -711,6 +717,8 @@
|
|||||||
<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />
|
<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />
|
||||||
<asp:Button ID="BtnEliminar" runat="server" Text="Eliminar" class="btn btn-danger" />
|
<asp:Button ID="BtnEliminar" runat="server" Text="Eliminar" class="btn btn-danger" />
|
||||||
<asp:Button ID="BtnContabilizar" runat="server" Text="Contabilizar" CssClass="btn btn-primary green" Visible="false" />
|
<asp:Button ID="BtnContabilizar" runat="server" Text="Contabilizar" CssClass="btn btn-primary green" Visible="false" />
|
||||||
|
<asp:Button ID="BtnDescontabilizar" runat="server" Text="Descontabilizar" CssClass="btn btn-primary" Visible="false"
|
||||||
|
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -277,6 +277,21 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
ValidaCrearAPartirDe()
|
ValidaCrearAPartirDe()
|
||||||
DvPlantilla.Visible = False
|
DvPlantilla.Visible = False
|
||||||
UPPDocumento.Visible = False
|
UPPDocumento.Visible = False
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||||
|
|
||||||
|
If Folio.ToEntero > 0 Then
|
||||||
|
BtnDescontabilizar.Visible = True
|
||||||
|
LnkFolioManual.Visible = False
|
||||||
|
Else
|
||||||
|
BtnDescontabilizar.Visible = False
|
||||||
|
LnkFolioManual.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Exit Sub
|
Exit Sub
|
||||||
|
|
||||||
ElseIf Request("CvePrePolizaOrigen") IsNot Nothing AndAlso IsNumeric(Request("CvePrePolizaOrigen")) AndAlso Request("CvePrePolizaOrigen").ToEntero > 0 Then
|
ElseIf Request("CvePrePolizaOrigen") IsNot Nothing AndAlso IsNumeric(Request("CvePrePolizaOrigen")) AndAlso Request("CvePrePolizaOrigen").ToEntero > 0 Then
|
||||||
@@ -2707,22 +2722,51 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
|
|
||||||
Dim ObjConta As New ClsContabilidad
|
Dim ObjConta As New ClsContabilidad
|
||||||
|
|
||||||
If IdPoliza > 0 Then 'si está bloqueada, lo desbloqueaprimero
|
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||||
ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False)
|
|
||||||
End If
|
If Folio.ToEntero = 0 Then
|
||||||
|
|
||||||
|
Dim FolioManual As Integer = If(TxtFolio.Text.ToEntero > 0, TxtFolio.Text.ToEntero, -1)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If ObjConta.ContabilizaDesContabilizaPrePoliza(CvePrePoliza, True, UsuarioActual.CveEmpresa, Folio:=FolioManual) Then
|
||||||
|
|
||||||
|
Alert($"Contabilizado Correctamente Folio <b>{ ObjConta.ContaFolio.ToString()}.</b>", TipoMensaje.MsgInformacion)
|
||||||
|
|
||||||
|
TxtFolio.Text = ObjConta.ContaFolio.ToString()
|
||||||
|
LnkFolioManual.Visible = False
|
||||||
|
UpPoliza.Update()
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, pIDPoliza:=If(IdPoliza > 0, IdPoliza, -1), Concepto:=TxtConcepto.Text, Fecha:=TxtFechaDocumento.Text.ToDateTime()) Then
|
|
||||||
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
|
|
||||||
Alert(String.Format("Prepóliza contabilizada. <br/><br/>Folio: <b>{0}</b> ", ObjConta.FolioPoliza), ModExtensiones.TipoMensaje.MsgInformacion)
|
|
||||||
Else
|
|
||||||
Alert(String.Format("Prepóliza contabilizada. <br/><br/>Folio:<a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", ObjConta.ContaIdPoliza), ModExtensiones.TipoMensaje.MsgInformacion)
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|
||||||
Alert($"Ocurrio un error al contabilizar {ObjConta.AlertaMensaje}", TipoMensaje.MsgAdvertencia)
|
|
||||||
|
If IdPoliza > 0 Then 'si está bloqueada, lo desbloqueaprimero
|
||||||
|
ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, pIDPoliza:=If(IdPoliza > 0, IdPoliza, -1), Concepto:=TxtConcepto.Text, Fecha:=TxtFechaDocumento.Text.ToDateTime()) Then
|
||||||
|
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
|
||||||
|
Alert(String.Format("Prepóliza contabilizada. <br/><br/>Folio: <b>{0}</b> ", ObjConta.FolioPoliza), ModExtensiones.TipoMensaje.MsgInformacion)
|
||||||
|
Else
|
||||||
|
Alert(String.Format("Prepóliza contabilizada. <br/><br/>Folio:<a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", ObjConta.ContaIdPoliza), ModExtensiones.TipoMensaje.MsgInformacion)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
|
||||||
|
Alert($"Ocurrio un error al contabilizar {ObjConta.AlertaMensaje}", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ObjConta.Dispose()
|
ObjConta.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -3171,13 +3215,38 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub BtnDescontabilizar_Click(sender As Object, e As EventArgs) Handles BtnDescontabilizar.Click
|
||||||
|
|
||||||
|
Dim ObjConta As New ClsContabilidad
|
||||||
|
|
||||||
|
|
||||||
|
If ObjConta.ContabilizaDesContabilizaPrePoliza(CvePrePoliza, False, UsuarioActual.CveEmpresa) Then
|
||||||
|
Alert("Descontabilizado Correctamente.", TipoMensaje.MsgInformacion)
|
||||||
|
TxtFolio.Text = ""
|
||||||
|
LnkFolioManual.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjConta.Dispose()
|
||||||
|
|
||||||
|
UpPoliza.Update()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub LnkFolioManual_Click(sender As Object, e As EventArgs) Handles LnkFolioManual.Click
|
||||||
|
|
||||||
|
TxtFolio.Enabled = True
|
||||||
|
TxtFolio.Focus()
|
||||||
|
UpPoliza.Update()
|
||||||
|
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
@@ -910,8 +910,13 @@ Partial Class RepCxCDetalle
|
|||||||
'End If
|
'End If
|
||||||
|
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
|
||||||
|
|
||||||
|
Dim logouri As String = ""
|
||||||
|
If Imagen.Exists Then
|
||||||
|
logouri = String.Format("file://{0}", Imagen.FullName)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||||
params.Add(New ReportParameter("FechaInicio", FechaI))
|
params.Add(New ReportParameter("FechaInicio", FechaI))
|
||||||
|
|||||||
@@ -41,6 +41,10 @@
|
|||||||
<DataField>Cultivo</DataField>
|
<DataField>Cultivo</DataField>
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
</Field>
|
</Field>
|
||||||
|
<Field Name="Manifiesto">
|
||||||
|
<DataField>Manifiesto</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
<Field Name="CultivoVariedad">
|
<Field Name="CultivoVariedad">
|
||||||
<DataField>CultivoVariedad</DataField>
|
<DataField>CultivoVariedad</DataField>
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
@@ -1497,7 +1501,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>GROWER ALLIANCE</Value>
|
<Value>=Parameters!Cliente.Value</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontSize>8pt</FontSize>
|
<FontSize>8pt</FontSize>
|
||||||
</Style>
|
</Style>
|
||||||
@@ -1688,7 +1692,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>947 E. FRONTAGE RD.</Value>
|
<Value>=Parameters!Direccion.Value</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontSize>8pt</FontSize>
|
<FontSize>8pt</FontSize>
|
||||||
</Style>
|
</Style>
|
||||||
@@ -1879,7 +1883,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>RIO RICO</Value>
|
<Value />
|
||||||
<Style>
|
<Style>
|
||||||
<FontSize>8pt</FontSize>
|
<FontSize>8pt</FontSize>
|
||||||
</Style>
|
</Style>
|
||||||
@@ -6833,13 +6837,13 @@
|
|||||||
<TablixBody>
|
<TablixBody>
|
||||||
<TablixColumns>
|
<TablixColumns>
|
||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>2.5cm</Width>
|
<Width>1.73271cm</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>2.5cm</Width>
|
<Width>1.68042cm</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>5.74021cm</Width>
|
<Width>7.32708cm</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>3.69064cm</Width>
|
<Width>3.69064cm</Width>
|
||||||
@@ -7122,7 +7126,9 @@
|
|||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>=Fields!NoPallets.Value</Value>
|
<Value>=Fields!NoPallets.Value</Value>
|
||||||
<Style />
|
<Style>
|
||||||
|
<FontSize>8pt</FontSize>
|
||||||
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
<Style />
|
<Style />
|
||||||
@@ -7140,6 +7146,7 @@
|
|||||||
<PaddingBottom>2pt</PaddingBottom>
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
</Style>
|
</Style>
|
||||||
</Textbox>
|
</Textbox>
|
||||||
|
<rd:Selected>true</rd:Selected>
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCell>
|
</TablixCell>
|
||||||
<TablixCell>
|
<TablixCell>
|
||||||
@@ -7152,7 +7159,9 @@
|
|||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>=Fields!NoCajas.Value</Value>
|
<Value>=Fields!NoCajas.Value</Value>
|
||||||
<Style />
|
<Style>
|
||||||
|
<FontSize>8pt</FontSize>
|
||||||
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
<Style />
|
<Style />
|
||||||
@@ -7170,25 +7179,28 @@
|
|||||||
<PaddingBottom>2pt</PaddingBottom>
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
</Style>
|
</Style>
|
||||||
</Textbox>
|
</Textbox>
|
||||||
|
<rd:Selected>true</rd:Selected>
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCell>
|
</TablixCell>
|
||||||
<TablixCell>
|
<TablixCell>
|
||||||
<CellContents>
|
<CellContents>
|
||||||
<Textbox Name="Cultivo">
|
<Textbox Name="Manifiesto">
|
||||||
<CanGrow>true</CanGrow>
|
<CanGrow>true</CanGrow>
|
||||||
<KeepTogether>true</KeepTogether>
|
<KeepTogether>true</KeepTogether>
|
||||||
<Paragraphs>
|
<Paragraphs>
|
||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>=Fields!Cultivo.Value & " " & Fields!CultivoVariedad.Value</Value>
|
<Value>=Fields!Manifiesto.Value</Value>
|
||||||
<Style />
|
<Style>
|
||||||
|
<FontSize>8pt</FontSize>
|
||||||
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
<Style />
|
<Style />
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Cultivo</rd:DefaultName>
|
<rd:DefaultName>Manifiesto</rd:DefaultName>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
<Color>LightGrey</Color>
|
<Color>LightGrey</Color>
|
||||||
@@ -7200,6 +7212,7 @@
|
|||||||
<PaddingBottom>2pt</PaddingBottom>
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
</Style>
|
</Style>
|
||||||
</Textbox>
|
</Textbox>
|
||||||
|
<rd:Selected>true</rd:Selected>
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCell>
|
</TablixCell>
|
||||||
<TablixCell>
|
<TablixCell>
|
||||||
@@ -7212,7 +7225,9 @@
|
|||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>=Fields!Etiqueta.Value</Value>
|
<Value>=Fields!Etiqueta.Value</Value>
|
||||||
<Style />
|
<Style>
|
||||||
|
<FontSize>8pt</FontSize>
|
||||||
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
<Style />
|
<Style />
|
||||||
@@ -7230,6 +7245,7 @@
|
|||||||
<PaddingBottom>2pt</PaddingBottom>
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
</Style>
|
</Style>
|
||||||
</Textbox>
|
</Textbox>
|
||||||
|
<rd:Selected>true</rd:Selected>
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCell>
|
</TablixCell>
|
||||||
<TablixCell>
|
<TablixCell>
|
||||||
@@ -7242,7 +7258,9 @@
|
|||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>=Fields!Envase.Value</Value>
|
<Value>=Fields!Envase.Value</Value>
|
||||||
<Style />
|
<Style>
|
||||||
|
<FontSize>8pt</FontSize>
|
||||||
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
<Style />
|
<Style />
|
||||||
@@ -7260,6 +7278,7 @@
|
|||||||
<PaddingBottom>2pt</PaddingBottom>
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
</Style>
|
</Style>
|
||||||
</Textbox>
|
</Textbox>
|
||||||
|
<rd:Selected>true</rd:Selected>
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCell>
|
</TablixCell>
|
||||||
</TablixCells>
|
</TablixCells>
|
||||||
@@ -7447,6 +7466,18 @@
|
|||||||
<AllowBlank>true</AllowBlank>
|
<AllowBlank>true</AllowBlank>
|
||||||
<Prompt>ReportParameter1</Prompt>
|
<Prompt>ReportParameter1</Prompt>
|
||||||
</ReportParameter>
|
</ReportParameter>
|
||||||
|
<ReportParameter Name="Direccion">
|
||||||
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
|
<AllowBlank>true</AllowBlank>
|
||||||
|
<Prompt>ReportParameter1</Prompt>
|
||||||
|
</ReportParameter>
|
||||||
|
<ReportParameter Name="Cliente">
|
||||||
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
|
<AllowBlank>true</AllowBlank>
|
||||||
|
<Prompt>ReportParameter1</Prompt>
|
||||||
|
</ReportParameter>
|
||||||
</ReportParameters>
|
</ReportParameters>
|
||||||
<EmbeddedImages>
|
<EmbeddedImages>
|
||||||
<EmbeddedImage Name="logojam">
|
<EmbeddedImage Name="logojam">
|
||||||
|
|||||||
2489
GPS/EmbarqueManifiestoCartaPorte.rdlc
Normal file
2489
GPS/EmbarqueManifiestoCartaPorte.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -41,6 +41,10 @@
|
|||||||
<DataField>Cultivo</DataField>
|
<DataField>Cultivo</DataField>
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
</Field>
|
</Field>
|
||||||
|
<Field Name="Manifiesto">
|
||||||
|
<DataField>Manifiesto</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
<Field Name="CultivoVariedad">
|
<Field Name="CultivoVariedad">
|
||||||
<DataField>CultivoVariedad</DataField>
|
<DataField>CultivoVariedad</DataField>
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
@@ -307,10 +311,8 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>GROWER ALLIANCE</Value>
|
<Value>=Parameters!Cliente.Value</Value>
|
||||||
<Style>
|
<Style />
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
</TextRun>
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
<Style />
|
<Style />
|
||||||
@@ -413,9 +415,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>12 Ave. Acaponeta
|
<Value>=Parameters!Direccion.Value</Value>
|
||||||
|
|
||||||
Rio Rico, AZ 85648</Value>
|
|
||||||
<Style />
|
<Style />
|
||||||
</TextRun>
|
</TextRun>
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
@@ -437,138 +437,7 @@ Rio Rico, AZ 85648</Value>
|
|||||||
</TablixCell>
|
</TablixCell>
|
||||||
<TablixCell>
|
<TablixCell>
|
||||||
<CellContents>
|
<CellContents>
|
||||||
<Textbox Name="Textbox38">
|
<Textbox Name="Textbox50">
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value />
|
|
||||||
<Style />
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox38</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox39">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value />
|
|
||||||
<Style />
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox39</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<RightBorder>
|
|
||||||
<Color>Black</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
<Width>2pt</Width>
|
|
||||||
</RightBorder>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
</TablixCells>
|
|
||||||
</TablixRow>
|
|
||||||
<TablixRow>
|
|
||||||
<Height>0.6cm</Height>
|
|
||||||
<TablixCells>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox32">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value />
|
|
||||||
<Style />
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox32</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<LeftBorder>
|
|
||||||
<Color>Black</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
<Width>2pt</Width>
|
|
||||||
</LeftBorder>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox43">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value />
|
|
||||||
<Style />
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox43</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox33">
|
|
||||||
<CanGrow>true</CanGrow>
|
<CanGrow>true</CanGrow>
|
||||||
<KeepTogether>true</KeepTogether>
|
<KeepTogether>true</KeepTogether>
|
||||||
<Paragraphs>
|
<Paragraphs>
|
||||||
@@ -597,7 +466,7 @@ Rio Rico, AZ 85648</Value>
|
|||||||
</TablixCell>
|
</TablixCell>
|
||||||
<TablixCell>
|
<TablixCell>
|
||||||
<CellContents>
|
<CellContents>
|
||||||
<Textbox Name="Textbox44">
|
<Textbox Name="Textbox51">
|
||||||
<CanGrow>true</CanGrow>
|
<CanGrow>true</CanGrow>
|
||||||
<KeepTogether>true</KeepTogether>
|
<KeepTogether>true</KeepTogether>
|
||||||
<Paragraphs>
|
<Paragraphs>
|
||||||
@@ -672,6 +541,7 @@ Rio Rico, AZ 85648</Value>
|
|||||||
</Style>
|
</Style>
|
||||||
</Textbox>
|
</Textbox>
|
||||||
<ColSpan>2</ColSpan>
|
<ColSpan>2</ColSpan>
|
||||||
|
<rd:Selected>true</rd:Selected>
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCell>
|
</TablixCell>
|
||||||
<TablixCell />
|
<TablixCell />
|
||||||
@@ -739,12 +609,11 @@ Rio Rico, AZ 85648</Value>
|
|||||||
<TablixMember />
|
<TablixMember />
|
||||||
<TablixMember />
|
<TablixMember />
|
||||||
<TablixMember />
|
<TablixMember />
|
||||||
<TablixMember />
|
|
||||||
</TablixMembers>
|
</TablixMembers>
|
||||||
</TablixRowHierarchy>
|
</TablixRowHierarchy>
|
||||||
<Top>4.15396cm</Top>
|
<Top>3.38667cm</Top>
|
||||||
<Left>2.00862cm</Left>
|
<Left>1.98216cm</Left>
|
||||||
<Height>3.6cm</Height>
|
<Height>3cm</Height>
|
||||||
<Width>14.9871cm</Width>
|
<Width>14.9871cm</Width>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
@@ -2370,7 +2239,15 @@ Hermosillo, Sonora, Mexico
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>CAAT: 32VU
|
<Value>CAAT:</Value>
|
||||||
|
<Style />
|
||||||
|
</TextRun>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Parameters!CAAT.Value</Value>
|
||||||
|
<Style />
|
||||||
|
</TextRun>
|
||||||
|
<TextRun>
|
||||||
|
<Value xml:space="preserve">
|
||||||
</Value>
|
</Value>
|
||||||
<Style />
|
<Style />
|
||||||
</TextRun>
|
</TextRun>
|
||||||
@@ -2531,7 +2408,7 @@ Hermosillo, Sonora, Mexico
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>LCT-03</Value>
|
<Value>=Parameters!Remolque1.Value</Value>
|
||||||
<Style />
|
<Style />
|
||||||
</TextRun>
|
</TextRun>
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
@@ -2774,8 +2651,8 @@ Hermosillo, Sonora, Mexico
|
|||||||
<TablixMember />
|
<TablixMember />
|
||||||
</TablixMembers>
|
</TablixMembers>
|
||||||
</TablixRowHierarchy>
|
</TablixRowHierarchy>
|
||||||
<Top>9.57248cm</Top>
|
<Top>6.74144cm</Top>
|
||||||
<Left>1.44748cm</Left>
|
<Left>1.39456cm</Left>
|
||||||
<Height>6cm</Height>
|
<Height>6cm</Height>
|
||||||
<Width>16.05095cm</Width>
|
<Width>16.05095cm</Width>
|
||||||
<ZIndex>3</ZIndex>
|
<ZIndex>3</ZIndex>
|
||||||
@@ -2786,7 +2663,7 @@ Hermosillo, Sonora, Mexico
|
|||||||
</Style>
|
</Style>
|
||||||
</Tablix>
|
</Tablix>
|
||||||
</ReportItems>
|
</ReportItems>
|
||||||
<Height>8.9547in</Height>
|
<Height>5.96512in</Height>
|
||||||
<Style />
|
<Style />
|
||||||
</Body>
|
</Body>
|
||||||
<Width>7.64435in</Width>
|
<Width>7.64435in</Width>
|
||||||
@@ -2977,6 +2854,18 @@ Hermosillo, Sonora, Mexico
|
|||||||
<AllowBlank>true</AllowBlank>
|
<AllowBlank>true</AllowBlank>
|
||||||
<Prompt>ReportParameter1</Prompt>
|
<Prompt>ReportParameter1</Prompt>
|
||||||
</ReportParameter>
|
</ReportParameter>
|
||||||
|
<ReportParameter Name="Cliente">
|
||||||
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
|
<AllowBlank>true</AllowBlank>
|
||||||
|
<Prompt>ReportParameter1</Prompt>
|
||||||
|
</ReportParameter>
|
||||||
|
<ReportParameter Name="Direccion">
|
||||||
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
|
<AllowBlank>true</AllowBlank>
|
||||||
|
<Prompt>ReportParameter1</Prompt>
|
||||||
|
</ReportParameter>
|
||||||
</ReportParameters>
|
</ReportParameters>
|
||||||
<EmbeddedImages>
|
<EmbeddedImages>
|
||||||
<EmbeddedImage Name="logojam">
|
<EmbeddedImage Name="logojam">
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCamion,Placa,Especificacion,CveConfigAutoTransporte,Anio,CveTipoCamion,CveTipoPermisoSCT,NumPermisoSCT,NombreAseguradora,NumPolizaSeguro,NombreAseguradoraMedioAmbiente,NumPolizaSeguroMedioAmbiente,NombreAseguradoraCarga,NumPolizaSeguroCarga,LongitudCaja,LineaTransportacion,SCAC,CAAT,CveTipoRemolque,NumeroTrailer"
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCamion,Placa,Especificacion,CveConfigAutoTransporte,Anio,CveTipoCamion,CveProveedor,CveTipoPermisoSCT,NumPermisoSCT,NombreAseguradora,NumPolizaSeguro,NombreAseguradoraMedioAmbiente,NumPolizaSeguroMedioAmbiente,NombreAseguradoraCarga,NumPolizaSeguroCarga,LongitudCaja,LineaTransportacion,SCAC,CAAT,CveTipoRemolque,NumeroTrailer"
|
||||||
EmptyDataText="No se Encontraron Unidades" ToolTip="Listado de Unidades" CssClass="table table-striped table-advance table-hover mysmallbtn " data-sort="true" Style="width: 100%" GridLines="None">
|
EmptyDataText="No se Encontraron Unidades" ToolTip="Listado de Unidades" CssClass="table table-striped table-advance table-hover mysmallbtn " data-sort="true" Style="width: 100%" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField HeaderText="Unidad" DataField="Especificacion" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Unidad" DataField="Especificacion" ItemStyle-HorizontalAlign="Left" />
|
||||||
@@ -97,11 +97,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright col-md-12" runat="server" visible="false" id="DvNumeroTrailler">
|
<div class="form-group form-md-line-input input-iconright col-md-12" runat="server" visible="false" id="DvNumeroTrailler">
|
||||||
<asp:TextBox ID="TxtNumeroTrailer" CssClass="form-control" runat="server" MaxLength="100"></asp:TextBox>
|
<asp:TextBox ID="TxtNumeroTrailer" CssClass="form-control" runat="server" MaxLength="100"></asp:TextBox>
|
||||||
<asp:Label AssociatedControlID="TxtNumeroTrailer" runat="server" Text="Número De Unidad"></asp:Label>
|
<asp:Label AssociatedControlID="TxtNumeroTrailer" runat="server" Text="Número De Unidad"></asp:Label>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright col-md-6">
|
<div class="form-group form-md-line-input input-iconright col-md-6">
|
||||||
|
|
||||||
@@ -230,8 +230,8 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" runat="server" id="DVSCACCAAT" visible="false">
|
<div class="row" runat="server" id="DVSCACCAAT" visible="false">
|
||||||
<div class="col-md-6" >
|
<div class="col-md-6">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtSCAC" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
<asp:TextBox ID="TxtSCAC" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||||
<label for="<%= TxtSCAC.ClientID.ToString()%>">SCAC:</label>
|
<label for="<%= TxtSCAC.ClientID.ToString()%>">SCAC:</label>
|
||||||
@@ -248,10 +248,19 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="form-group form-md-line-input input-iconright" runat="server" id="Div1">
|
||||||
|
<asp:DropDownList ID="DdlProveedor" CssClass="form-control input-sm select2me " Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="false" CausesValidation="true" DataValueField="CveProveedor" DataTextField="RazonSocial" Style="padding: 0px">
|
||||||
|
</asp:DropDownList>
|
||||||
|
<label for="<%= DdlProveedor.ClientID.ToString()%>">Proveedor:</label>
|
||||||
|
<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator3" ControlToValidate="DdlTipoPermisoSCT" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Permiso SCT''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<%--<asp:CheckBox ID="ChkesRemolque" Checked="true" TextAlign="Left" Text="¿Es remolque?:" runat="server" AutoPostBack="true" OnCheckedChanged="ChkesRemolque_CheckedChanged" />--%>
|
<%--<asp:CheckBox ID="ChkesRemolque" Checked="true" TextAlign="Left" Text="¿Es remolque?:" runat="server" AutoPostBack="true" OnCheckedChanged="ChkesRemolque_CheckedChanged" />--%>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
|||||||
@@ -19,11 +19,17 @@ Partial Class Inventarios_CatUnidades
|
|||||||
Private Sub Catalogos_CatPtoSubFunsion_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Private Sub Catalogos_CatPtoSubFunsion_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
CargaCombos()
|
CargaCombos()
|
||||||
|
CargaDdlProveedor()
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub CargaDdlProveedor()
|
||||||
|
DdlProveedor.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||||
|
DdlProveedor.DataBind()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -88,6 +94,7 @@ Partial Class Inventarios_CatUnidades
|
|||||||
TxtEspecificacionNuevo.Text = ""
|
TxtEspecificacionNuevo.Text = ""
|
||||||
TxtEspecificacionNuevo.Text = ""
|
TxtEspecificacionNuevo.Text = ""
|
||||||
DdlConfigAuto.SelectedValueExist(-1)
|
DdlConfigAuto.SelectedValueExist(-1)
|
||||||
|
DdlProveedor.SelectedValueExist(-1)
|
||||||
|
|
||||||
TxtAnio.Text = ""
|
TxtAnio.Text = ""
|
||||||
'TxtTipoPermisoSCT.Text = ""
|
'TxtTipoPermisoSCT.Text = ""
|
||||||
@@ -137,8 +144,9 @@ Partial Class Inventarios_CatUnidades
|
|||||||
TxtNumPolizaSeguroMedioAmbiente.Text = GvRow.DataKey("NumPolizaSeguroMedioAmbiente")
|
TxtNumPolizaSeguroMedioAmbiente.Text = GvRow.DataKey("NumPolizaSeguroMedioAmbiente")
|
||||||
TxtNombreAseguradoraCarga.Text = GvRow.DataKey("NombreAseguradoraCarga")
|
TxtNombreAseguradoraCarga.Text = GvRow.DataKey("NombreAseguradoraCarga")
|
||||||
TxtNumPolizaSeguroCarga.Text = GvRow.DataKey("NumPolizaSeguroCarga")
|
TxtNumPolizaSeguroCarga.Text = GvRow.DataKey("NumPolizaSeguroCarga")
|
||||||
|
|
||||||
DdlTiposRemolque.SelectedValueExist(CveTipoRemolque)
|
DdlTiposRemolque.SelectedValueExist(CveTipoRemolque)
|
||||||
|
DdlProveedor.SelectedValueExist(-1)
|
||||||
|
DdlProveedor.SelectedValueExist(GvRow.DataKey("CveProveedor"))
|
||||||
|
|
||||||
TxtNumeroTrailer.Text = GvRow.DataKey("NumeroTrailer")
|
TxtNumeroTrailer.Text = GvRow.DataKey("NumeroTrailer")
|
||||||
TxtLongitudCaja.Text = GvRow.DataKey("LongitudCaja")
|
TxtLongitudCaja.Text = GvRow.DataKey("LongitudCaja")
|
||||||
@@ -207,6 +215,9 @@ Partial Class Inventarios_CatUnidades
|
|||||||
If ObjInventarios.UpdateCamiones(CveCamion, TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, DdlConfigAuto.SelectedValue.ToEntero, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero(), TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
If ObjInventarios.UpdateCamiones(CveCamion, TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, DdlConfigAuto.SelectedValue.ToEntero, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero(), TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||||
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text) Then
|
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text) Then
|
||||||
Alert("Unidad actualizada correctamente")
|
Alert("Unidad actualizada correctamente")
|
||||||
|
Using objbase = New ClsClaseBase()
|
||||||
|
objbase.runQuerystr(String.Format("UPDATE Inv_Camiones SET CveProveedor={1} WHERE CveCamion={0}", CveCamion, DdlProveedor.SelectedValue))
|
||||||
|
End Using
|
||||||
Else
|
Else
|
||||||
ErrorPrceso = True
|
ErrorPrceso = True
|
||||||
End If
|
End If
|
||||||
@@ -214,6 +225,8 @@ Partial Class Inventarios_CatUnidades
|
|||||||
End Using
|
End Using
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Not ErrorPrceso Then
|
If Not ErrorPrceso Then
|
||||||
GlobalDTInvCamiones(UsuarioActual.CveEmpresa) = Nothing
|
GlobalDTInvCamiones(UsuarioActual.CveEmpresa) = Nothing
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
|
|||||||
@@ -4227,13 +4227,13 @@
|
|||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group form-md-line-input">
|
<%-- <div class="form-group form-md-line-input">
|
||||||
<asp:RadioButtonList runat="server" ID="RBLModalBancosLayout" RepeatDirection="Horizontal" CssClass=" form-control input-sm" >
|
<asp:RadioButtonList runat="server" ID="RBLModalBancosLayout" RepeatDirection="Horizontal" CssClass=" form-control input-sm" >
|
||||||
<asp:ListItem Value="1" Selected="True">Generar Layout</asp:ListItem>
|
<asp:ListItem Value="1" Selected="True">Generar Layout</asp:ListItem>
|
||||||
<asp:ListItem Value="2">Altas Nomina</asp:ListItem>
|
<asp:ListItem Value="2">Altas Nomina</asp:ListItem>
|
||||||
</asp:RadioButtonList>
|
</asp:RadioButtonList>
|
||||||
<asp:Label runat="server" AssociatedControlID="RBLModalBancosLayout">Tipo Operacóon:</asp:Label>
|
<asp:Label runat="server" AssociatedControlID="RBLModalBancosLayout">Tipo Operacóon:</asp:Label>
|
||||||
</div>
|
</div>--%>
|
||||||
|
|
||||||
<div class="form-group form-md-line-input">
|
<div class="form-group form-md-line-input">
|
||||||
<asp:DropDownList ID="DdlModalBancosLayout" CssClass=" form-control input-sm select2me" runat="server" Width="100%">
|
<asp:DropDownList ID="DdlModalBancosLayout" CssClass=" form-control input-sm select2me" runat="server" Width="100%">
|
||||||
|
|||||||
@@ -1298,8 +1298,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
string RFCReceptor = Nom.RFC;
|
string RFCReceptor = Nom.RFC;
|
||||||
string RFCEmisor = UsuarioActual.Empresa.RFC;
|
string RFCEmisor = UsuarioActual.Empresa.RFC;
|
||||||
string SerieFolio = Nom.SerieFolio;
|
string SerieFolio = Nom.SerieFolio;
|
||||||
string SerieFolioFiniquito = string.Format ("{0}F-{1}", nrow["Serie"], nrow["Folio"]);
|
string SerieFolioFiniquito = string.Format("{0}F-{1}", nrow["Serie"], nrow["Folio"]);
|
||||||
bool SeTimbroFiniquito = nrow["SeTimbroFiniquito"].ToString().ToUpper().Contiene(new string[] {"1","TRUE"});
|
bool SeTimbroFiniquito = nrow["SeTimbroFiniquito"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||||
string FolioFiscalFiniquito = nrow["FolioFiscalFiniquito"].ToString();
|
string FolioFiscalFiniquito = nrow["FolioFiscalFiniquito"].ToString();
|
||||||
//SeTimbroFiniquito,N.FolioFiscalFiniquito
|
//SeTimbroFiniquito,N.FolioFiscalFiniquito
|
||||||
DataRow rowc = get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveMotivoCancelacion={0}", DdlMotivoCancelacion.SelectedValue));
|
DataRow rowc = get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveMotivoCancelacion={0}", DdlMotivoCancelacion.SelectedValue));
|
||||||
@@ -1341,33 +1341,33 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
reultado = ObjTimbrado.CFDICancelar(UsuarioActual.Empresa, FolioFiscalFiniquito, Total, RFCReceptor, RFCEmisor, 4, CveSATMotivoCancelacion: CveMotivoCancelacion);
|
reultado = ObjTimbrado.CFDICancelar(UsuarioActual.Empresa, FolioFiscalFiniquito, Total, RFCReceptor, RFCEmisor, 4, CveSATMotivoCancelacion: CveMotivoCancelacion);
|
||||||
if (reultado.Verificado)//,CveSATMotivoCancelacion:=
|
if (reultado.Verificado)//,CveSATMotivoCancelacion:=
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
string ruta = string.Format("{0}XML\\Nomina\\", UsuarioActual.Empresa.Ruta);
|
try
|
||||||
string archivo = string.Format("{0}{1}.xml", ruta, SerieFolioFiniquito);
|
|
||||||
int contador = 1;
|
|
||||||
string archivonew = string.Format("{0}{1}_{2}.xml", ruta, SerieFolioFiniquito, contador++);
|
|
||||||
while (System.IO.File.Exists(archivonew))
|
|
||||||
{
|
{
|
||||||
archivonew = string.Format("{0}{1}_{2}.xml", ruta, SerieFolioFiniquito, contador++);
|
string ruta = string.Format("{0}XML\\Nomina\\", UsuarioActual.Empresa.Ruta);
|
||||||
|
string archivo = string.Format("{0}{1}.xml", ruta, SerieFolioFiniquito);
|
||||||
|
int contador = 1;
|
||||||
|
string archivonew = string.Format("{0}{1}_{2}.xml", ruta, SerieFolioFiniquito, contador++);
|
||||||
|
while (System.IO.File.Exists(archivonew))
|
||||||
|
{
|
||||||
|
archivonew = string.Format("{0}{1}_{2}.xml", ruta, SerieFolioFiniquito, contador++);
|
||||||
|
}
|
||||||
|
File.Move(archivo, archivonew);
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
Alert("Ocurrió un error al mover el archivo fiscal cancelado");
|
||||||
}
|
}
|
||||||
File.Move(archivo, archivonew);
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
Alert("Ocurrió un error al mover el archivo fiscal cancelado");
|
|
||||||
}
|
|
||||||
|
|
||||||
secancelo12 = true;
|
secancelo12 = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string.Format("Error al cancelar nomina {0}", FolioFiscalFiniquito).GuardaLog();
|
string.Format("Error al cancelar nomina {0}", FolioFiscalFiniquito).GuardaLog();
|
||||||
//ObjTimbrado.MensajeErrorCFDI.GuardaLog();
|
//ObjTimbrado.MensajeErrorCFDI.GuardaLog();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (secancelo11 && secancelo12)
|
if (secancelo11 && secancelo12)
|
||||||
@@ -1375,7 +1375,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
|
|
||||||
Nom.UpdateEstatusNomNominas(2, UsuarioActual.Empresa.CvePAC, "", ("01/01/2000").ToDate(), ("01/01/2000").ToDate(), CveNomina);
|
Nom.UpdateEstatusNomNominas(2, UsuarioActual.Empresa.CvePAC, "", ("01/01/2000").ToDate(), ("01/01/2000").ToDate(), CveNomina);
|
||||||
Alert($"La nómina con folio fiscal '{FolioFiscal}' fue cancelada ante el SAT", TipoMensaje.MsgInformacion);
|
Alert($"La nómina con folio fiscal '{FolioFiscal}' fue cancelada ante el SAT", TipoMensaje.MsgInformacion);
|
||||||
}else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
Alert($"no se pudo cancelar el folio fiscal<br>{ObjTimbrado.MensajeErrorCFDI}", TipoMensaje.MsgAdvertencia);
|
Alert($"no se pudo cancelar el folio fiscal<br>{ObjTimbrado.MensajeErrorCFDI}", TipoMensaje.MsgAdvertencia);
|
||||||
|
|
||||||
@@ -5636,7 +5637,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
ChkEstatus.Checked = true;
|
ChkEstatus.Checked = true;
|
||||||
UpMovtosPermanentesModal.Update();
|
UpMovtosPermanentesModal.Update();
|
||||||
RegistraScript("$('#ModalMovtoPermanente').modal()");
|
RegistraScript("$('#ModalMovtoPermanente').modal()");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void LnkAddMovto_Click(object sender, EventArgs e)
|
protected void LnkAddMovto_Click(object sender, EventArgs e)
|
||||||
@@ -5718,7 +5719,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
this.Alert("Se ha eliminadó el movimiento permanente");
|
this.Alert("Se ha eliminadó el movimiento permanente");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
protected void LnkEditarMovtoPermanente_Click(object sender, EventArgs e)
|
protected void LnkEditarMovtoPermanente_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||||
@@ -7662,9 +7663,9 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
}
|
}
|
||||||
loadtablas();
|
loadtablas();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected void LnkAsistenciaIncidencias_Click(object sender, EventArgs e)
|
protected void LnkAsistenciaIncidencias_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -8112,7 +8113,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
|
|
||||||
protected void LnkLayoutContable_Click(object sender, EventArgs e)
|
protected void LnkLayoutContable_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
RBLModalBancosLayout.SelectedValue = "1";
|
// RBLModalBancosLayout.SelectedValue = "1";
|
||||||
DdlModalBancosLayout.SelectedValueExist("-1");
|
DdlModalBancosLayout.SelectedValueExist("-1");
|
||||||
this.RegistraScript("$('#ModalLayoutBancos').modal('show');");
|
this.RegistraScript("$('#ModalLayoutBancos').modal('show');");
|
||||||
UpModalBancosLayout.Update();
|
UpModalBancosLayout.Update();
|
||||||
@@ -8127,35 +8128,51 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
|
|
||||||
protected void BtnModalBancosProcesar_Click(object sender, EventArgs e)
|
protected void BtnModalBancosProcesar_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if(RBLModalBancosLayout.SelectedValue.ToEntero() == 1)
|
//if (RBLModalBancosLayout.SelectedValue.ToEntero() == 1)
|
||||||
|
//{
|
||||||
|
if (DdlModalBancosLayout.SelectedValue.ToEntero() == 1)
|
||||||
{
|
{
|
||||||
if (DdlModalBancosLayout.SelectedValue.ToEntero() == 1)
|
using (ClsNominas objnom = new ClsNominas())
|
||||||
{
|
{
|
||||||
using (ClsNominas objnom = new ClsNominas())
|
if (objnom.GetDispersionnomina(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa))
|
||||||
{
|
{
|
||||||
if (objnom.GetDispersionnomina(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa))
|
CrearLayoutNominaBancomer(objnom.DtResultados);
|
||||||
{
|
|
||||||
CrearLayoutNominaBancomer(objnom.DtResultados);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (DdlModalBancosLayout.SelectedValue.ToEntero() == 2)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (RBLModalBancosLayout.SelectedValue.ToEntero() == 2)
|
else if (DdlModalBancosLayout.SelectedValue.ToEntero() == 2)
|
||||||
{
|
{
|
||||||
if(DdlModalBancosLayout.SelectedValue.ToEntero() == 1 )
|
using (ClsNominas objnom = new ClsNominas())
|
||||||
{
|
{
|
||||||
|
if (objnom.GetDispersionNominaBanorte(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa))
|
||||||
}
|
{
|
||||||
else if (DdlModalBancosLayout.SelectedValue.ToEntero() == 2)
|
CrearLayoutNominaBanorte(objnom.DtResultados, "1234");
|
||||||
{
|
}
|
||||||
//Banorte
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//}
|
||||||
|
//else if (RBLModalBancosLayout.SelectedValue.ToEntero() == 2)
|
||||||
|
//{
|
||||||
|
// if (DdlModalBancosLayout.SelectedValue.ToEntero() == 1)
|
||||||
|
// {
|
||||||
|
// //Sin Alta
|
||||||
|
// }
|
||||||
|
// else if (DdlModalBancosLayout.SelectedValue.ToEntero() == 2)
|
||||||
|
// {
|
||||||
|
// //Banorte
|
||||||
|
|
||||||
|
// using (ClsNominas objnom = new ClsNominas())
|
||||||
|
// {
|
||||||
|
// if (objnom.GetLayoutAltaBanorte(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa))
|
||||||
|
// {
|
||||||
|
// CrearLayoutAltaBanorte(objnom.DtResultados, " 04539871", "12345", UsuarioActual.Empresa.Empresa);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -8255,109 +8272,594 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void CrearLayoutAltaBanorte(DataTable DTNomina, string Promotor, string NIE, string RazonSocial)
|
//private void CrearLayoutAltaBanorte(DataTable DTNomina, string Promotor, string NIE, string RazonSocial)
|
||||||
|
//{
|
||||||
|
// StringBuilder sb = new StringBuilder();
|
||||||
|
// StringBuilder SbErrores = new StringBuilder();
|
||||||
|
|
||||||
|
// char Cero = '0';
|
||||||
|
// char Espacio = ' ';
|
||||||
|
|
||||||
|
// bool ErrorProceso = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Promotor = Promotor.Trim();
|
||||||
|
// NIE = NIE.Trim();
|
||||||
|
// RazonSocial = RazonSocial.Trim();
|
||||||
|
|
||||||
|
// //SbErrores.AppendLine("Se detectaron los siguientes errores en la generación del layout");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// if (DTNomina.Rows.Count > 0)
|
||||||
|
// {
|
||||||
|
|
||||||
|
// //Tip oRegistro 1 1-1
|
||||||
|
// //Clave servicio 2 2-3
|
||||||
|
// sb.Append($"HNE");
|
||||||
|
|
||||||
|
|
||||||
|
// //Promotor 8 4-11
|
||||||
|
// if (Promotor.Length > 0 && Promotor.Length <= 8)
|
||||||
|
// {
|
||||||
|
// sb.Append(Promotor.PadLeft(8, Cero));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"Promotor {Promotor} debe de tener una logitud de entre 1 y 8<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //NIE 5 12-26
|
||||||
|
// if (ErrorProceso == false && NIE.Length > 0 && NIE.Length <= 5)
|
||||||
|
// {
|
||||||
|
// sb.Append(NIE.PadLeft(5, Espacio));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"NIE {NIE} debe de tener una logitud de entre 1 y 8<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// //Nombre de Empresa ó Razón Social 40 17-56
|
||||||
|
// if (ErrorProceso == false && RazonSocial.Length > 0 && RazonSocial.Length <= 40)
|
||||||
|
// {
|
||||||
|
// sb.Append(RazonSocial.PadLeft(40, Espacio));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"RazonSocial {RazonSocial} debe de tener una logitud de entre 1 y 40<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //57-58consecutivo 1
|
||||||
|
// sb.Append("1");
|
||||||
|
|
||||||
|
|
||||||
|
// //Número de registros N 6 59-64
|
||||||
|
// sb.Append(DTNomina.Rows.ToString().PadRight(6, Espacio));
|
||||||
|
|
||||||
|
// //Filler A 283 65-347
|
||||||
|
// sb.Append(DTNomina.Rows.ToString().PadLeft(283, Espacio));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// if (!ErrorProceso)
|
||||||
|
// {
|
||||||
|
// foreach (DataRow dRow in DTNomina.Rows)
|
||||||
|
// {
|
||||||
|
|
||||||
|
|
||||||
|
// string CodigoEmpleado = dRow["Codigo"].ToString().Trim();
|
||||||
|
// string Nombres = dRow["Nombres"].ToString().Trim();
|
||||||
|
// string APaterno = dRow["APaterno"].ToString().Trim();
|
||||||
|
// string Amaterno = dRow["AMaterno"].ToString().Trim();
|
||||||
|
// string CodigoNacionalOperacion = dRow["CodigoNacionalOperacion"].ToString().Trim();
|
||||||
|
// string NombreCorto = dRow["NombreCorto"].ToString().Trim();
|
||||||
|
// string TipoDeVia = dRow["TipoDeVia"].ToString().Trim();
|
||||||
|
// string Direccion = dRow["Direccion"].ToString().Trim();
|
||||||
|
// string NumExt = dRow["NumExt"].ToString().Trim();
|
||||||
|
// string TipoDeVivienda = dRow["TipoDeVivienda"].ToString().Trim();
|
||||||
|
// string Colonia = dRow["Colonia"].ToString().Trim();
|
||||||
|
// string DelegacionMunicipio = dRow["DelegacionMunicipio"].ToString().Trim();
|
||||||
|
// string ClaveEstado = dRow["ClaveEstado"].ToString().Trim();
|
||||||
|
// string CP = dRow["CP"].ToString().Trim();
|
||||||
|
// string Sexo = dRow["Sexo"].ToString().Trim();
|
||||||
|
// DateTime FechaNacimiento = dRow["FechaNacimiento"].ToString().ToDate();
|
||||||
|
// string Nacionalidad = dRow["Nacionalidad"].ToString().Trim();
|
||||||
|
// string EstadoCivil = dRow["EstadoCivil"].ToString().Trim();
|
||||||
|
// string Escolaridad = dRow["Escolaridad"].ToString().Trim();
|
||||||
|
// string TipoEmpleado = dRow["TipoEmpleado"].ToString().Trim();
|
||||||
|
// string RFC = dRow["RFC"].ToString().Trim();
|
||||||
|
// string TipoAlta = dRow["TipoAlta"].ToString().Trim();
|
||||||
|
// string TipoDeTarjeta = dRow["TipoDeTarjeta"].ToString().Trim();
|
||||||
|
// string CodigoDeBanco = dRow["CodigoDeBanco"].ToString().Trim();
|
||||||
|
// string TipoCuenta = dRow["TipoCuenta"].ToString().Trim();
|
||||||
|
// string Cuenta = dRow["Cuenta"].ToString().Trim();
|
||||||
|
// string ImpresionContrato = dRow["ImpresionContrato"].ToString().Trim();
|
||||||
|
|
||||||
|
|
||||||
|
// //Tipo de registro A 1 1-1
|
||||||
|
// sb.AppendLine("D");
|
||||||
|
|
||||||
|
|
||||||
|
// //CodigoEmpleado A 10 2-11
|
||||||
|
// if (ErrorProceso == false && CodigoEmpleado.Length > 0 && CodigoEmpleado.Trim().Length <= 10)
|
||||||
|
// {
|
||||||
|
// sb.Append(CodigoEmpleado.PadLeft(10, Cero));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"Codigo {CodigoEmpleado} debe de tener una logitud de entre 1 y 10<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// //Nombres A 20 12-31
|
||||||
|
// if (ErrorProceso == false && Nombres.Length > 0 && Nombres.Trim().Length <= 20)
|
||||||
|
// {
|
||||||
|
// sb.Append(Nombres.PadRight(20, Espacio));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Nombre {Nombres} debe de tener una logitud de entre 1 y 20<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// //Apellido Paterno A 20 32-51
|
||||||
|
// if (ErrorProceso == false && APaterno.Length > 0 && APaterno.Trim().Length <= 20)
|
||||||
|
// {
|
||||||
|
// sb.Append(APaterno.PadRight(20, Espacio));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Apellido Paterno {APaterno} debe de tener una logitud de entre 1 y 20<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// //Aperllido Materno A 20 52-71
|
||||||
|
// if (ErrorProceso == false && Amaterno.Length > 0 && Amaterno.Trim().Length <= 20)
|
||||||
|
// {
|
||||||
|
// sb.Append(Amaterno.PadRight(20, Espacio));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Apellido Materno {Amaterno} debe de tener una logitud de entre 1 y 20<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // Dependencia A 5 72-76
|
||||||
|
// sb.Append(string.Empty.PadRight(5, Espacio)); // No requerido
|
||||||
|
|
||||||
|
|
||||||
|
// //CodigoNacionalOperacion N 2 77-78 Anexo 1
|
||||||
|
// if (ErrorProceso == false && CodigoNacionalOperacion.Length > 0 && CodigoNacionalOperacion.Trim().Length <= 2)
|
||||||
|
// {
|
||||||
|
// sb.Append(CodigoNacionalOperacion.PadLeft(2, Cero));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Codigo Nacional de Operación {CodigoNacionalOperacion} debe de tener una logitud de entre 1 y 20<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// //NombreCorto A 19 79-97
|
||||||
|
// if (ErrorProceso == false && NombreCorto.Length > 0 && NombreCorto.Trim().Length <= 19)
|
||||||
|
// {
|
||||||
|
// sb.Append(NombreCorto.PadRight(19, Espacio));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Nombre Corto{NombreCorto} debe de tener una logitud de entre 1 y 19<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// //TipoDeVia A 2 98-99 Anexo 2
|
||||||
|
// if (ErrorProceso == false && TipoDeVia.Length > 0 && TipoDeVia.Trim().Length <= 2)
|
||||||
|
// {
|
||||||
|
// sb.Append(TipoDeVia.PadRight(2, Espacio));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Tipo De Via {TipoDeVia} debe de tener una logitud de entre 1 y 2<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// //Calle A 24 100-123
|
||||||
|
// if (ErrorProceso == false && Direccion.Length > 0 && Direccion.Trim().Length <= 24)
|
||||||
|
// {
|
||||||
|
// sb.Append(Direccion.PadRight(24, Espacio));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Calle {Direccion} debe de tener una logitud de entre 1 y 24<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// //Numero A 7 124-130
|
||||||
|
// if (ErrorProceso == false && NumExt.Length > 0 && NumExt.Trim().Length <= 7)
|
||||||
|
// {
|
||||||
|
// sb.Append(NumExt.PadRight(7, Espacio));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Tipo De Via {NumExt} debe de tener una logitud de entre 1 y 7<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //TipoDeVivienda N 2 131-132
|
||||||
|
// if (ErrorProceso == false && TipoDeVivienda.Length > 0 && TipoDeVivienda.Trim().Length <= 2)
|
||||||
|
// {
|
||||||
|
// sb.Append(TipoDeVivienda.PadLeft(2, Cero));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Tipo de Vivienda {TipoDeVivienda} debe de tener una logitud de entre 1 y 2<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //Entrada A 2 133-134
|
||||||
|
// sb.Append(string.Empty.PadRight(2, Espacio)); // No requerido
|
||||||
|
|
||||||
|
// //Piso A 5 135-136
|
||||||
|
// sb.Append(string.Empty.PadRight(2, Espacio)); // No requerido
|
||||||
|
|
||||||
|
// //Deparatmento A 4 137-140
|
||||||
|
// sb.Append(string.Empty.PadRight(4, Espacio)); // No requerido
|
||||||
|
|
||||||
|
|
||||||
|
// //Colonia A 40 141-180
|
||||||
|
// if (ErrorProceso == false && Colonia.Length > 0 && Colonia.Trim().Length <= 40)
|
||||||
|
// {
|
||||||
|
// sb.Append(Colonia.PadRight(40, Espacio));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Colonia Municipio {Colonia} debe de tener una logitud de entre 1 y 40<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// //DelegacionMunicipio N 3 181-183
|
||||||
|
// if (ErrorProceso == false && DelegacionMunicipio.Length > 0 && DelegacionMunicipio.Trim().Length <= 3)
|
||||||
|
// {
|
||||||
|
// sb.Append(DelegacionMunicipio.PadLeft(3, Cero));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Delegacion Municipio {DelegacionMunicipio} debe de tener una logitud de entre 1 y 3<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //ClaveEstado N 2 184-185
|
||||||
|
// if (ErrorProceso == false && ClaveEstado.Length > 0 && ClaveEstado.Trim().Length <= 2)
|
||||||
|
// {
|
||||||
|
// sb.Append(ClaveEstado.PadLeft(2, Cero));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Clave Estado {ClaveEstado} debe de tener una logitud de entre 1 y 2<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //Codigo Postal N 5 186-190
|
||||||
|
// if (ErrorProceso == false && CP.Length > 0 && CP.Trim().Length <= 5)
|
||||||
|
// {
|
||||||
|
// sb.Append(CP.PadLeft(5, Cero));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Codigo Postal {CP} debe de tener una logitud de entre 1 y 5<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //Telefono A 12 191-202
|
||||||
|
// sb.Append(string.Empty.PadRight(12, Espacio)); // No requerido
|
||||||
|
|
||||||
|
// //Sexo A 1 203-203
|
||||||
|
// sb.Append(Sexo); // No requerido
|
||||||
|
|
||||||
|
|
||||||
|
// //Fecha Nacimiento A N 204-211
|
||||||
|
// sb.Append(FechaNacimiento.ToString("yyyyMMdd"));
|
||||||
|
|
||||||
|
// //Nacionalidad N 3 212-214 Anexo 6
|
||||||
|
// if (ErrorProceso == false && Nacionalidad.Length > 0 && Nacionalidad.Trim().Length <= 3)
|
||||||
|
// {
|
||||||
|
// sb.Append(Nacionalidad.PadLeft(3, Cero));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Nacionalidad {Nacionalidad} debe de tener una logitud de entre 1 y 2<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //Estado Civil N 3 215-215 Anexo 7
|
||||||
|
// if (ErrorProceso == false && EstadoCivil.Length > 0 && EstadoCivil.Trim().Length <= 1)
|
||||||
|
// {
|
||||||
|
// sb.Append(EstadoCivil);
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Estado Civil {EstadoCivil} debe de tener una logitud de 1<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //Regimen Matrimonial A 1 216-216
|
||||||
|
// sb.Append(string.Empty.PadRight(1, Espacio)); // No requerido Anexo 8
|
||||||
|
|
||||||
|
|
||||||
|
// //Escolaridad N 3 217-219 Anexo 9
|
||||||
|
// if (ErrorProceso == false && Escolaridad.Length > 0 && Escolaridad.Trim().Length <= 3)
|
||||||
|
// {
|
||||||
|
// sb.Append(Escolaridad.PadLeft(3, Cero));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Escolaridad {Escolaridad} debe de tener una logitud de entre 1 y 3<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //Titulo Profecional N 5 220-223
|
||||||
|
// sb.Append(string.Empty.PadLeft(3, Cero)); // No requerido Anexo 10
|
||||||
|
|
||||||
|
|
||||||
|
// //RFC N 13 225-237
|
||||||
|
// if (ErrorProceso == false && RFC.Length > 0 && RFC.Trim().Length <= 13)
|
||||||
|
// {
|
||||||
|
// sb.Append(RFC.PadRight(13, Espacio));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} RFC {RFC} debe de tener una logitud de entre 1 y 13<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //Curp A 18 238-255
|
||||||
|
// sb.Append(string.Empty.PadLeft(18, Espacio)); // No requerido
|
||||||
|
|
||||||
|
|
||||||
|
// //Tipo de Alta N 2 256-257
|
||||||
|
// if (ErrorProceso == false && TipoAlta.Length > 0 && TipoAlta.Trim().Length <= 2)
|
||||||
|
// {
|
||||||
|
// sb.Append(TipoAlta.PadLeft(3, Cero));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Tipo de Alta {TipoAlta} debe de tener una logitud de entre 1 y 2<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //TipoDeTarjeta N 1 258-258
|
||||||
|
// sb.Append(TipoDeTarjeta);
|
||||||
|
|
||||||
|
|
||||||
|
// //Número de Tarjeta de Débito N 16 259-274
|
||||||
|
// sb.Append(string.Empty.PadLeft(16, Cero)); // No requerido
|
||||||
|
|
||||||
|
// //Clave del Producto de la Cuenta N 4 275-278
|
||||||
|
// sb.Append(string.Empty.PadLeft(4, Cero)); // No requerido
|
||||||
|
|
||||||
|
|
||||||
|
// //Código de Banco de la Cuenta N 3 279-281
|
||||||
|
// if (ErrorProceso == false && CodigoDeBanco.Length > 0 && CodigoDeBanco.Trim().Length <= 3)
|
||||||
|
// {
|
||||||
|
// sb.Append(CodigoDeBanco.PadLeft(3, Cero));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Codigo De Banco {CodigoDeBanco} debe de tener una logitud de entre 1 y 3<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //Tipo Cuenta N 2 282-283
|
||||||
|
// if (ErrorProceso == false && TipoCuenta.Length > 0 && TipoCuenta.Trim().Length <= 2)
|
||||||
|
// {
|
||||||
|
// sb.Append(TipoCuenta.PadLeft(2, Cero));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Tipo Cuenta {TipoCuenta} debe de tener una logitud de entre 1 y 2<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// //Numero cuenta 18 284-301
|
||||||
|
// if (ErrorProceso == false && Cuenta.Length > 0 && Cuenta.Trim().Length <= 18)
|
||||||
|
// {
|
||||||
|
// sb.Append(Cuenta.PadRight(18, Espacio));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Numero cuenta {Cuenta} debe de tener una logitud de entre 1 y 18<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //CR Chequera N 4 302-305
|
||||||
|
// sb.Append(string.Empty.PadLeft(4, Cero)); // No requerido
|
||||||
|
|
||||||
|
// //Impresion Contrato A 1 306-306
|
||||||
|
// sb.Append("S");
|
||||||
|
|
||||||
|
// //Sueldo N 15 307-321
|
||||||
|
// sb.Append(string.Empty.PadLeft(15, Cero)); // No requerido
|
||||||
|
|
||||||
|
// //Numero targeta N 16 307-321
|
||||||
|
// sb.Append(string.Empty.PadLeft(16, Cero)); // No requerido
|
||||||
|
|
||||||
|
// //Filler A 10 338-347
|
||||||
|
// sb.Append(string.Empty.PadLeft(10, Cero)); // Relleno
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// if (!ErrorProceso)
|
||||||
|
// {
|
||||||
|
// Response.Clear();
|
||||||
|
// Response.ClearHeaders();
|
||||||
|
// Response.AppendHeader("Content-Length", sb.ToString());
|
||||||
|
// Response.ContentType = "text/plain";
|
||||||
|
// //Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina{DateTime.Now.ToString("yyyyMMddhhmmss").ToString()}.txt\"");
|
||||||
|
// Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Alta_Banorte_{DdlPeriodo.SelectedItem.Text }.txt\"");
|
||||||
|
// Response.Write(sb.ToString());
|
||||||
|
// this.RegistraScript("$('#ModalLayoutBancos').modal('hide');");
|
||||||
|
// Response.Flush();
|
||||||
|
// Response.End();
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// this.Alert($"Errores {SbErrores.ToString()}", TipoMensaje.ToastAdventencia);
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
// #endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void CrearLayoutNominaBanorte(DataTable DTNomina, string Emisora)
|
||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
StringBuilder SbErrores = new StringBuilder();
|
StringBuilder SbErrores = new StringBuilder();
|
||||||
|
|
||||||
|
char Cero = '0';
|
||||||
|
char Espacio = ' ';
|
||||||
|
|
||||||
bool ErrorProceso = false;
|
bool ErrorProceso = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Promotor = Promotor.Trim();
|
|
||||||
NIE = NIE.Trim();
|
|
||||||
RazonSocial = RazonSocial.Trim();
|
|
||||||
|
|
||||||
//SbErrores.AppendLine("Se detectaron los siguientes errores en la generación del layout");
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (DTNomina.Rows.Count > 0)
|
if (DTNomina.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
|
//Tipo Registro A 1 1-1
|
||||||
|
sb.Append("H");
|
||||||
|
//Cleve de Servicio A 2 2-3
|
||||||
|
sb.Append("NE");
|
||||||
|
//Emisora N 5 4-8
|
||||||
|
sb.Append(Emisora.PadLeft(5, Cero));
|
||||||
|
//FechaProceso N 8 9-16
|
||||||
|
sb.Append(DateTime.Now.ToString("yyyyMMdd"));
|
||||||
|
//Conmsecutivo N 2 17-18
|
||||||
|
sb.Append("01");
|
||||||
|
//Numero Total de Registros N 6 19-24
|
||||||
|
sb.Append(DTNomina.Rows.Count.ToString().PadLeft(6, Cero));
|
||||||
|
|
||||||
//Tip oRegistro 1 1-1
|
//Importe Total de Registros N 15 25-39
|
||||||
//Clave servicio 2 2-3
|
sb.Append(DTNomina.SUMD("Importe").ToString("0000000000000.00").Replace(".", ""));
|
||||||
sb.Append($"HNE");
|
|
||||||
|
|
||||||
|
|
||||||
//Promotor 8 4-11
|
|
||||||
if (Promotor.Length > 0 && Promotor.Length <= 8)
|
|
||||||
{
|
|
||||||
sb.Append(Promotor.PadLeft(8, '0'));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SbErrores.AppendLine($"Promotor {Promotor} debe de tener una logitud de entre 1 y 8<br/>");
|
|
||||||
ErrorProceso = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//NIE 5 12-26
|
|
||||||
if (ErrorProceso == false && NIE.Length > 0 && NIE.Length <= 5)
|
|
||||||
{
|
|
||||||
sb.Append(NIE.PadLeft(5, ' '));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SbErrores.AppendLine($"NIE {NIE} debe de tener una NIE de entre 1 y 8<br/>");
|
|
||||||
ErrorProceso = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//Nombre de Empresa ó Razón Social 40 17-56
|
|
||||||
if (ErrorProceso == false && RazonSocial.Length > 0 && RazonSocial.Length <= 40)
|
|
||||||
{
|
|
||||||
sb.Append(RazonSocial.PadLeft(40, ' '));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SbErrores.AppendLine($"RazonSocial {RazonSocial} debe de tener una NIE de entre 1 y 40<br/>");
|
|
||||||
ErrorProceso = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//57-58consecutivo 1
|
|
||||||
sb.Append("1");
|
|
||||||
|
|
||||||
|
|
||||||
//Número de registros N 6 59-64
|
|
||||||
sb.Append(DTNomina.Rows.ToString().PadRight(6, ' '));
|
|
||||||
|
|
||||||
//Filler A 283 65-347
|
|
||||||
sb.Append(DTNomina.Rows.ToString().PadLeft(283, ' '));
|
|
||||||
|
|
||||||
|
|
||||||
|
//Numero Total altas N 6 40-45
|
||||||
|
sb.Append("000000");
|
||||||
|
//Importe Total altas N 15 46-60
|
||||||
|
sb.Append("000000000000000");
|
||||||
|
//Numero Total Bajas N 6 61-66
|
||||||
|
sb.Append("000000");
|
||||||
|
//Importe Total Bajas N 15 67-81
|
||||||
|
sb.Append("000000000000000");
|
||||||
|
//Numero Total de cuentas a verificar N 6 82-87
|
||||||
|
sb.Append("000000");
|
||||||
|
//Accion N 1 88-88
|
||||||
|
sb.Append("0");
|
||||||
|
//filler 77 89-165
|
||||||
|
sb.Append(string.Empty.PadLeft(77, Espacio));
|
||||||
|
|
||||||
if (!ErrorProceso)
|
if (!ErrorProceso)
|
||||||
{
|
{
|
||||||
foreach (DataRow dRow in DTNomina.Rows)
|
foreach (DataRow dRow in DTNomina.Rows)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Codigo ReferenciaDelServicio ReferenciaLeyendaDelOrdenante Importe NumeroBancoReceptor TipoCuenta NumeroCuenta TipoMovimiento Accion ImporteIvaOperacion
|
||||||
|
string Codigo = dRow["Codigo"].ToString().Trim();
|
||||||
|
string ReferenciaDelServicio = dRow["ReferenciaDelServicio"].ToString().Trim();
|
||||||
|
string ReferenciaLeyendaDelOrdenante = dRow["ReferenciaLeyendaDelOrdenante"].ToString().Trim();
|
||||||
|
decimal Importe = dRow["Importe"].ToString().ToDecimal();
|
||||||
|
string NumeroBancoReceptor = dRow["NumeroBancoReceptor"].ToString().Trim();
|
||||||
|
string TipoCuenta = dRow["TipoCuenta"].ToString().Trim();
|
||||||
|
string NumeroCuenta = dRow["NumeroCuenta"].ToString().Trim();
|
||||||
|
string TipoMovimiento = dRow["TipoMovimiento"].ToString().Trim();
|
||||||
|
string Accion = dRow["Accion"].ToString().Trim();
|
||||||
|
string ImporteIvaOperacion = dRow["ImporteIvaOperacion"].ToString().Trim();
|
||||||
|
|
||||||
string CodigoEmpleado = dRow["CodigoEmpleado"].ToString().Trim();
|
|
||||||
|
|
||||||
//Tipo de registro A 1 1-1
|
//Tipo de registro A 1 1-1
|
||||||
sb.AppendLine("D");
|
sb.AppendLine("D");
|
||||||
|
//Fecha Aplicacion N 8 2-9
|
||||||
|
sb.Append(DateTime.Now.ToString("yyyyMMdd"));
|
||||||
|
|
||||||
|
//CodigoEmpleado A 10 10-19
|
||||||
//CodigoEmpleado A 10 2-11
|
if (ErrorProceso == false && Codigo.Length > 0 && Codigo.Trim().Length <= 10)
|
||||||
if (ErrorProceso == false && CodigoEmpleado.Length > 0 && CodigoEmpleado.Trim().Length <= 10)
|
|
||||||
{
|
{
|
||||||
sb.Append(CodigoEmpleado.PadLeft(10, '0'));
|
sb.Append(Codigo.PadLeft(10, Cero));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SbErrores.AppendLine($"RazonSocial {RazonSocial} debe de tener una NIE de entre 1 y 40<br/>");
|
SbErrores.AppendLine($"{Codigo} Codigo {Codigo} debe de tener una logitud de entre 1 y 10<br/>");
|
||||||
ErrorProceso = true;
|
ErrorProceso = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//ReferenciaDelServicio A 40 20-29
|
||||||
|
sb.Append(ReferenciaDelServicio.PadLeft(40, Espacio));
|
||||||
|
//ReferenciaLeyendaDelOrdenante A 40 60-99
|
||||||
|
sb.Append(ReferenciaLeyendaDelOrdenante.PadLeft(40, Espacio));
|
||||||
|
//Importe N 15 100-114
|
||||||
|
sb.Append(Importe.ToString("0000000000000.00").Replace(".", ""));
|
||||||
|
//NumeroBancoReceptor N 3 115-117
|
||||||
|
sb.Append(NumeroBancoReceptor.PadLeft(3, Cero));
|
||||||
|
//TipoCuenta N 2 118-119
|
||||||
|
sb.Append(TipoCuenta.PadLeft(2, Cero));
|
||||||
|
//NumeroCuenta N 18 120-137
|
||||||
|
sb.Append(NumeroCuenta.PadLeft(18, Cero));
|
||||||
|
//Tipo movimiento N 1 138-138
|
||||||
|
sb.Append(TipoCuenta.PadLeft(1, Cero));
|
||||||
|
//Accion N 1 139-139
|
||||||
|
sb.Append(Accion.PadLeft(1, Espacio));
|
||||||
|
//ImporteIvaOperacion 140-147
|
||||||
|
sb.Append(ImporteIvaOperacion.PadLeft(8, Cero));
|
||||||
|
//filler 18 148-165
|
||||||
|
sb.Append(string.Empty.PadLeft(77, Espacio));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!ErrorProceso)
|
||||||
|
{
|
||||||
|
Response.Clear();
|
||||||
|
Response.ClearHeaders();
|
||||||
|
Response.AppendHeader("Content-Length", sb.ToString());
|
||||||
|
Response.ContentType = "text/plain";
|
||||||
|
Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina_Banorte_{DdlPeriodo.SelectedItem.Text }.txt\"");
|
||||||
|
Response.Write(sb.ToString());
|
||||||
|
this.RegistraScript("$('#ModalLayoutBancos').modal('hide');");
|
||||||
|
Response.Flush();
|
||||||
|
Response.End();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.Alert($"Errores {SbErrores.ToString()}", TipoMensaje.ToastAdventencia);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
@@ -6231,7 +6231,13 @@ Partial Class Ventas
|
|||||||
|
|
||||||
'SI LA VENTA YA ESTA REGISTRADA NO DEBE HABILITAR ACCIONES
|
'SI LA VENTA YA ESTA REGISTRADA NO DEBE HABILITAR ACCIONES
|
||||||
If CveVenta <= 0 Then
|
If CveVenta <= 0 Then
|
||||||
LnkRemisiones.Visible = If(UsuarioActual.TienePermisoProceso(199), True, False) : LnkOCs.Visible = True : LnkCotizaciones.Visible = True : LnkPedido2SinFacturar.Visible = True : InicializaAplicarNCMasiva()
|
Dim EsModuloCotizacion As Boolean = False
|
||||||
|
If Request("Op") IsNot Nothing AndAlso Request("Op").ToString() = "Cot" Then
|
||||||
|
EsModuloCotizacion = True
|
||||||
|
End If
|
||||||
|
If Not EsModuloCotizacion Then
|
||||||
|
LnkRemisiones.Visible = If(UsuarioActual.TienePermisoProceso(199), True, False) : LnkOCs.Visible = True : LnkCotizaciones.Visible = True : LnkPedido2SinFacturar.Visible = True : InicializaAplicarNCMasiva()
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.CvePlataforma = 2 Then LnkOCs.Visible = False
|
If UsuarioActual.Empresa.CvePlataforma = 2 Then LnkOCs.Visible = False
|
||||||
@@ -7120,7 +7126,13 @@ Partial Class Ventas
|
|||||||
|
|
||||||
'SI LA VENTA YA ESTA REGISTRADA NO DEBE HABILITAR ACCIONES
|
'SI LA VENTA YA ESTA REGISTRADA NO DEBE HABILITAR ACCIONES
|
||||||
If CveVenta <= 0 Then
|
If CveVenta <= 0 Then
|
||||||
LnkRemisiones.Visible = If(UsuarioActual.TienePermisoProceso(199), True, False) : LnkOCs.Visible = True : LnkCotizaciones.Visible = True : LnkPedido2SinFacturar.Visible = True : InicializaAplicarNCMasiva()
|
Dim EsModuloCotizacion As Boolean = False
|
||||||
|
If Request("Op") IsNot Nothing AndAlso Request("Op").ToString() = "Cot" Then
|
||||||
|
EsModuloCotizacion = True
|
||||||
|
End If
|
||||||
|
If Not EsModuloCotizacion Then
|
||||||
|
LnkRemisiones.Visible = If(UsuarioActual.TienePermisoProceso(199), True, False) : LnkOCs.Visible = True : LnkCotizaciones.Visible = True : LnkPedido2SinFacturar.Visible = True : InicializaAplicarNCMasiva()
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjCliente.Dispose()
|
ObjCliente.Dispose()
|
||||||
@@ -7693,10 +7705,31 @@ Partial Class Ventas
|
|||||||
If ValidaExistencia AndAlso DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False AndAlso Not RegistroxOC Then
|
If ValidaExistencia AndAlso DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False AndAlso Not RegistroxOC Then
|
||||||
'VALIDA EXISTENCIA
|
'VALIDA EXISTENCIA
|
||||||
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119, 140, 153}) Then
|
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119, 140, 153}) Then
|
||||||
If Existencia - TmpDT.SUM("Cantidad", $"CvePS = {CvePS} AND (EntregaDirecta IS NULL OR EntregaDirecta < 1)") < TxtCantidad.Text.ToDouble Then
|
'SI ES VENTA NUEVA TOMA EN CUENTA LO DEL TMPDT
|
||||||
Alert("No cuenta con la cantidad suficiente en inventario. Cuenta con " + Existencia.FormatoNumero(2) + ".", TipoMensaje.MsgAdvertencia)
|
If CveVenta <= 0 Then
|
||||||
Exit Sub
|
If Existencia - TmpDT.SUM("Cantidad", $"CvePS = {CvePS} AND (EntregaDirecta IS NULL OR EntregaDirecta < 1)") < TxtCantidad.Text.ToDouble Then
|
||||||
|
Alert("No cuenta con la cantidad suficiente en inventario. Cuenta con " + Existencia.FormatoNumero(2) + ".", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If DdlTipoComprobante.SelectedValue = "Rem" Then
|
||||||
|
Dim CantidadVenta As Double = 0
|
||||||
|
Using ObjVentas As New ClsVentas
|
||||||
|
If ObjVentas.GetVentaDetalle(CveVenta) Then
|
||||||
|
CantidadVenta = ObjVentas.DtResultados.SUM("Cantidad", $"CvePS = {CvePS}")
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
|
||||||
|
'SUMA LO YA RESTADO EN PENDIENTE POR SURTIR QUE PERTENESCA A LA VENTA.
|
||||||
|
'PARA QUE NO RESTE LA EXISTENCIA 2 VECES Y PUEDAS COMPARAR LO REAL
|
||||||
|
If (Existencia + CantidadVenta) - TmpDT.SUM("Cantidad", $"CvePS = {CvePS} AND (EntregaDirecta IS NULL OR EntregaDirecta < 1)") < TxtCantidad.Text.ToDouble Then
|
||||||
|
Alert("No cuenta con la cantidad suficiente en inventario. Cuenta con " + Existencia.FormatoNumero(2) + ".", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -14353,7 +14386,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Dim DebeGenerarMovimiento As Boolean = TmpDT.COUNT("CvePS", "CveTipoPS = 2") > 0
|
Dim DebeGenerarMovimiento As Boolean = TmpDT.COUNT("CvePS", "CveTipoPS = 2") > 0
|
||||||
'VERIFICA QUE SE REALIZO EL MOVIMIENTO DE ALMACEN
|
'VERIFICA QUE SE REALIZO EL MOVIMIENTO DE ALMACEN
|
||||||
If DebeGenerarMovimiento AndAlso UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso UsuarioActual.Empresa.Funcionalidad(567) = "1" AndAlso factura.TipoDocto.Contiene("Ing", "Egs", "Rem") Then
|
If DebeGenerarMovimiento AndAlso UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso UsuarioActual.Empresa.Funcionalidad(567) = "1" AndAlso factura.TipoDocto.Contiene("Ing", "Rem") Then
|
||||||
If Not (ObjInventario.GetInv_Mov(factura.CveVenta, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0) Then
|
If Not (ObjInventario.GetInv_Mov(factura.CveVenta, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
ErrorList.Add("Ocurrió un error al verificar inventario.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
ErrorList.Add("Ocurrió un error al verificar inventario.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||||
@@ -17584,10 +17617,29 @@ Partial Class Ventas
|
|||||||
If DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False Then
|
If DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False Then
|
||||||
'VALIDA EXISTENCIA
|
'VALIDA EXISTENCIA
|
||||||
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119, 153, 140}) Then
|
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119, 153, 140}) Then
|
||||||
If Existencia - TmpDT.SUM("Cantidad", $"CvePS = {CvePS} AND (EntregaDirecta IS NULL OR EntregaDirecta < 1)") < TxtCantidad.Text.ToDouble Then
|
If CveVenta <= 0 OrElse Me.EsCreaApartirDe Then
|
||||||
Alert("No cuenta con la cantidad suficiente en inventario. Cuenta con " + Existencia.FormatoNumero(2) + ".", TipoMensaje.MsgAdvertencia)
|
If Existencia - TmpDT.SUM("Cantidad", $"CvePS = {CvePS} AND (EntregaDirecta IS NULL OR EntregaDirecta < 1)") < TxtCantidad.Text.ToDouble Then
|
||||||
Return False
|
Alert("No cuenta con la cantidad suficiente en inventario. Cuenta con " + Existencia.FormatoNumero(2) + ".", TipoMensaje.MsgAdvertencia)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If DdlTipoComprobante.SelectedValue = "Rem" Then
|
||||||
|
Dim CantidadVenta As Double = 0
|
||||||
|
Using ObjVentasE As New ClsVentas
|
||||||
|
If ObjVentasE.GetVentaDetalle(CveVenta) Then
|
||||||
|
CantidadVenta = ObjVentasE.DtResultados.SUM("Cantidad", $"CvePS = {CvePS}")
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
|
||||||
|
'SUMA LO YA RESTADO EN PENDIENTE POR SURTIR QUE PERTENESCA A LA VENTA.
|
||||||
|
'PARA QUE NO RESTE LA EXISTENCIA 2 VECES Y PUEDAS COMPARAR LO REAL
|
||||||
|
If (Existencia + CantidadVenta) - TmpDT.SUM("Cantidad", $"CvePS = {CvePS} And (EntregaDirecta Is NULL Or EntregaDirecta < 1)") < TxtCantidad.Text.ToDouble Then
|
||||||
|
Alert("No cuenta con la cantidad suficiente en inventario. Cuenta con " + Existencia.FormatoNumero(2) + ".", TipoMensaje.MsgAdvertencia)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -474,6 +474,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user