Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -15,8 +15,8 @@ Imports Stimulsoft.Report.Web
|
||||
Partial Class PopUpVerFactura
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Shared missing As Object = System.Reflection.Missing.Value
|
||||
|
||||
Private Shared missing As Object = System.Reflection.Missing.Value
|
||||
|
||||
#Region " PROPIEDADES "
|
||||
Public Property DtMovimientos() As DataTable
|
||||
Get
|
||||
@@ -211,9 +211,9 @@ Partial Class PopUpVerFactura
|
||||
UsuarioToken.Empresa = ObjEmpresa.Empresa
|
||||
End If
|
||||
ObjEmpresa.Dispose()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
Private Sub SeleccionaReporte(UrlParametros As Hashtable)
|
||||
'DESCARGA DOCUMENTO XML O PDF DE LA FACTURA COMPRA
|
||||
If UrlParametros("OP").ToString = "Fact" Then
|
||||
@@ -448,10 +448,10 @@ Partial Class PopUpVerFactura
|
||||
URLParametros.Add(P2(0).ToString.ToUpper, P2(1))
|
||||
Next
|
||||
Return URLParametros
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
#Region "OP = CORT - IMPRIMIR CORTE"
|
||||
|
||||
|
||||
Private Sub ImprimeCorte(CveCorte As Integer, Formato As String)
|
||||
Dim ObjVenta As New ClsVentas
|
||||
Dim ObjPuntoVenta As New ClsPuntoVenta
|
||||
@@ -494,10 +494,10 @@ Partial Class PopUpVerFactura
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepCortes.rdlc", lrds, params, "ReporteCortes", Formato)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " OP = FACTURA - IMPRIME COMPRA"
|
||||
Private Sub DescargaFactura(Parametros As Hashtable)
|
||||
If Parametros("CVEFACTURA") IsNot Nothing AndAlso Parametros("CVEFACTURA").ToString.ToEntero > 0 Then
|
||||
@@ -517,9 +517,9 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
Archivo = Nothing
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP DesXmlVIA- DESCARGAR XML DE VIATICOS"
|
||||
Private Sub DescargaXMLViaticos(Parametros As Hashtable)
|
||||
If Parametros("SERIEFOLIO") IsNot Nothing AndAlso Parametros("SERIEFOLIO").ToString <> "" Then
|
||||
@@ -539,10 +539,10 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
Archivo = Nothing
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP DesXmlNom- DESCARGAR XML DE UTILIDADES"
|
||||
Private Sub DescargaXMLUtilidades(Parametros As Hashtable)
|
||||
If Parametros("SERIEFOLIO") IsNot Nothing AndAlso Parametros("SERIEFOLIO").ToString <> "" Then
|
||||
@@ -562,9 +562,9 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
Archivo = Nothing
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = 'CONG' - IMPRIME GASTO DE CONTRATO"
|
||||
Private Sub ImprimeGastoContrato(CveContrato As Integer, CveContratoGasto As Integer)
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
@@ -606,10 +606,10 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
ImprimirPDF("Empresas/Grales/Formatos/ContratoGasto.rdlc", dt, params, $"{Nombre}-Gastos", Formato:="PDF")
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "OP = 'CIC' - IMPRIME FORMATO CICOVISA"
|
||||
Private Sub ImprimeFormatoCICOVISA(CveVenta As Integer)
|
||||
If CveVenta > 0 Then
|
||||
@@ -646,10 +646,10 @@ Partial Class PopUpVerFactura
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Cicovisa.rdlc", Dt, params, String.Format("Formato Cicovisa -{0}", Now.ToDateTime.ToShortDateString))
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = 'CARPO' - IMPRIME FORMATO CARTA PORTE"
|
||||
Private Sub ImprimeFormatoCartaPorte(CveMovimiento As Integer)
|
||||
If CveMovimiento > 0 Then
|
||||
@@ -774,12 +774,12 @@ Partial Class PopUpVerFactura
|
||||
ImprimirPDF("Empresas/Grales/Formatos/CartaPorte.rdlc", Dt, params, String.Format("Carta Porte -{0}", Now.ToDateTime.ToShortDateString))
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = 'DesXmlTra' - IMPRIME XML TRASLADO"
|
||||
|
||||
|
||||
Private Sub DescargaXMLTraslado(Parametros As Hashtable)
|
||||
If Parametros("CVEMOVIMIENTO") IsNot Nothing AndAlso Parametros("CVEMOVIMIENTO").ToString.ToEntero > 0 Then
|
||||
Dim Exten As String = If(Parametros("EXT").ToString.ToLower = "xml", "xml", "pdf")
|
||||
@@ -798,12 +798,12 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
Archivo = Nothing
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = 'DesPdfTra' - IMPRIME PDF TRASLADO"
|
||||
|
||||
|
||||
Private Sub DescargaPDFTraslado(Parametros As Hashtable)
|
||||
If Parametros("CVEMOVIMIENTO") IsNot Nothing AndAlso Parametros("CVEMOVIMIENTO").ToString.ToEntero > 0 Then
|
||||
Dim Exten As String = If(Parametros("EXT").ToString.ToLower = "xml", "xml", "pdf")
|
||||
@@ -822,10 +822,10 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
Archivo = Nothing
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " OP = 'Vta,Fact' - IMPRIME PDF VENTAS"
|
||||
Private Sub DescargaFacturaVenta(Parametros As Hashtable)
|
||||
If Parametros("CVEVENTA") IsNot Nothing AndAlso Parametros("CVEVENTA").ToString.ToEntero > 0 Then
|
||||
@@ -1184,7 +1184,7 @@ Partial Class PopUpVerFactura
|
||||
Dim DepartamentoEntrega As String = ObjInventarios.DepartamentoEntrega
|
||||
Dim FechaMovimiento As Date = ObjInventarios.FechaRegistro
|
||||
|
||||
If CveConcepto = 3 Or CveConcepto = 18 Or CveConcepto = 30 Or CveConcepto = 34 Or CveConcepto = 35 Or CveConcepto = 16 Then 'SALIDA Y DEVOLUCION DEL CLIENTE
|
||||
If CveConcepto = 3 Or CveConcepto = 18 Or CveConcepto = 30 Or CveConcepto = 34 Or CveConcepto = 35 Or CveConcepto = 16 Or CveConcepto = 7 Then 'SALIDA Y DEVOLUCION DEL CLIENTE
|
||||
If ObjInventarios.GetMovimientosDetalleImpresion(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
DtMovimientos = ObjInventarios.DtResultados
|
||||
|
||||
@@ -2362,6 +2362,37 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/DevolucionCliente.rdlc", DtMovimientos, params, String.Format("Devolucion del Cliente - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
'End If
|
||||
Else
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
Dim CiudadSucursal As String = ""
|
||||
Dim DomicilioSucursal As String = ""
|
||||
|
||||
If DtMovimientos(0)("CveVenta").ToString <> "" Then
|
||||
CiudadSucursal = String.Format("{0}, {1}", DtMovimientos(0)("Municipio").ToString, DtMovimientos(0)("Estado").ToString)
|
||||
DomicilioSucursal = String.Format("{0} #{1}, {2}, Col. {3}, CP: {4}, {5}, {6}", DtMovimientos(0)("Calle").ToString, DtMovimientos(0)("NoExt").ToString, DtMovimientos(0)("NoInt").ToString, DtMovimientos(0)("Colonia"), DtMovimientos(0)("CP").ToString, CiudadSucursal, DtMovimientos(0)("Pais").ToString)
|
||||
End If
|
||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("Folio", Folio))
|
||||
params.Add(New ReportParameter("Concepto", "DEVOLUCIÓN DEL CLIENTE"))
|
||||
params.Add(New ReportParameter("Fecha", Fecha))
|
||||
params.Add(New ReportParameter("Almacen", Almacen))
|
||||
params.Add(New ReportParameter("FacturaProveedor", FolioVenta))
|
||||
params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
params.Add(New ReportParameter("NombreRecibio", Recibio))
|
||||
params.Add(New ReportParameter("ExpedidoEn", DomicilioSucursal))
|
||||
params.Add(New ReportParameter("FacturadoA", DtMovimientos(0)("Nombre").ToString))
|
||||
params.Add(New ReportParameter("EnviarA", DtMovimientos(0)("Mail").ToString))
|
||||
params.Add(New ReportParameter("Entrega", DtMovimientos(0)("Entrega").ToString))
|
||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/DevolucionCliente.rdlc", DtMovimientos, params, String.Format("Devolucion del Cliente - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
'End If
|
||||
End If
|
||||
|
||||
Case 19 'ARMADO DE PAQUETE
|
||||
@@ -2929,8 +2960,34 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("Sucursal", "Sucursal"))
|
||||
params.Add(New ReportParameter("Cliente", NombreCliente))
|
||||
|
||||
ImprimirPDF(String.Format("Empresas/{0}/Formatos/RepUsadosEntradas.rdlc", UsuarioActual.CveEmpresa), DtMovimientos, params, "Reporte entrada usados", "PDF", "DsInventarios")
|
||||
|
||||
ImprimirPDF(String.Format("Empresas/{0}/Formatos/RepUsadosEntradas.rdlc", UsuarioActual.CveEmpresa), DtMovimientos, params, "Reporte entrada usados", "PDF", "DsInventarios")
|
||||
Case 7
|
||||
Dim params As New List(Of ReportParameter)
|
||||
Dim CiudadSucursal As String = ""
|
||||
Dim DomicilioSucursal As String = ""
|
||||
|
||||
If DtMovimientos(0)("CveVenta").ToString <> "" Then
|
||||
CiudadSucursal = String.Format("{0}, {1}", DtMovimientos(0)("Municipio").ToString, DtMovimientos(0)("Estado").ToString)
|
||||
DomicilioSucursal = String.Format("{0} #{1}, {2}, Col. {3}, CP: {4}, {5}, {6}", DtMovimientos(0)("Calle").ToString, DtMovimientos(0)("NoExt").ToString, DtMovimientos(0)("NoInt").ToString, DtMovimientos(0)("Colonia"), DtMovimientos(0)("CP").ToString, CiudadSucursal, DtMovimientos(0)("Pais").ToString)
|
||||
End If
|
||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("Folio", Folio))
|
||||
params.Add(New ReportParameter("Concepto", "DEVOLUCIÓN DEL CLIENTE"))
|
||||
params.Add(New ReportParameter("Fecha", Fecha))
|
||||
params.Add(New ReportParameter("Almacen", Almacen))
|
||||
params.Add(New ReportParameter("FacturaProveedor", FolioVenta))
|
||||
params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
params.Add(New ReportParameter("NombreRecibio", Recibio))
|
||||
params.Add(New ReportParameter("ExpedidoEn", DomicilioSucursal))
|
||||
params.Add(New ReportParameter("FacturadoA", DtMovimientos(0)("Nombre").ToString))
|
||||
params.Add(New ReportParameter("EnviarA", DtMovimientos(0)("Mail").ToString))
|
||||
params.Add(New ReportParameter("Entrega", DtMovimientos(0)("Entrega").ToString))
|
||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
|
||||
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/DevolucionCliente.rdlc", DtMovimientos, params, String.Format("Devolucion del Cliente - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
'End If
|
||||
|
||||
End Select
|
||||
|
||||
If CveConcepto = 2 Then
|
||||
@@ -3130,9 +3187,9 @@ Partial Class PopUpVerFactura
|
||||
TmpDTMaterialesOS.Columns.Add("Clasificacion", GetType(String))
|
||||
TmpDTMaterialesOS.Columns.Add("PS", GetType(String))
|
||||
TmpDTMaterialesOS.Columns.Add("UM", GetType(String))
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = 'OI' - Crear Archivo "
|
||||
Private Sub CrearArchivo(Archivo As String)
|
||||
Dim ObjEventos As New ClsOIEventos
|
||||
@@ -3141,11 +3198,11 @@ Partial Class PopUpVerFactura
|
||||
Dim file As System.IO.FileInfo = New System.IO.FileInfo(path) '-- if the file exists on the server
|
||||
|
||||
DescargarArchivo(file)
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = 'Contratos' - Crear Archivo "
|
||||
Private Sub CrearArchivoContratos(Archivo As String)
|
||||
|
||||
@@ -3153,11 +3210,11 @@ Partial Class PopUpVerFactura
|
||||
Dim file As System.IO.FileInfo = New System.IO.FileInfo(Archivo) '-- if the file exists on the server
|
||||
|
||||
DescargarArchivo(file)
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = 'OI' - Descargar Archivo "
|
||||
Private Sub DescargarArchivo(File As System.IO.FileInfo)
|
||||
If File.Exists Then 'set appropriate headers
|
||||
@@ -3187,11 +3244,11 @@ Partial Class PopUpVerFactura
|
||||
Alert("Ocurrio un error al descargar el archivo", TipoMensaje.MsgAdvertencia, "window.close()")
|
||||
|
||||
End If 'nothing in the URL as HTTP GET
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = 'AFR' - AF"
|
||||
|
||||
|
||||
Private Sub ImprimirPDFAFR(CveAFR As Integer, Tipo As Integer)
|
||||
Dim ObjAF As New ClsAF
|
||||
'Dim ObjSubProyecto As New ClsSubProyectos
|
||||
@@ -3377,9 +3434,9 @@ Partial Class PopUpVerFactura
|
||||
|
||||
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/ResguardoAF.rdlc", dtVC, params, NomArchivo)
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = 'POL' "
|
||||
Private Sub ImprimirPolizaPDF(IdPoliza As Integer)
|
||||
'Dim ObjConta As New ClsContabilidad
|
||||
@@ -3418,9 +3475,9 @@ Partial Class PopUpVerFactura
|
||||
|
||||
ObjPoliza.Dispose()
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = 'CAN' - CANCELACION"
|
||||
Public Sub ImprimeCancelacion(CveVenta As Integer)
|
||||
Dim ObjVentas As New ClsVentas
|
||||
@@ -3445,9 +3502,9 @@ Partial Class PopUpVerFactura
|
||||
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = 'DC' - DEPOSITOS CAJA"
|
||||
Private Sub CargaDepositosCaja(CveIE As Integer, CuentaCaja As String, CuentaDeposito As String)
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/DepositoCaja.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
@@ -3474,11 +3531,11 @@ Partial Class PopUpVerFactura
|
||||
|
||||
ObjIE.Dispose()
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "I E C H E Q U E S"
|
||||
|
||||
|
||||
Private Sub ImprimirIE(CveIE As Integer, CveEmpresa As Integer)
|
||||
Dim CveTipoTransaccion = -1
|
||||
Dim ObjIE As New ClsBancos()
|
||||
@@ -3724,21 +3781,21 @@ Partial Class PopUpVerFactura
|
||||
|
||||
ObjIE.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = RECIBO DE PAGOS"
|
||||
Private Sub ImprimirReciboDePagos(CveIE As Integer, CveVenta As Integer)
|
||||
|
||||
PDFReciboDePagos(CveVenta, CveIE, -1)
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = VTA - PyME"
|
||||
|
||||
' 04/05/2018 - Pruebas de impresion de factura PyME
|
||||
|
||||
' 04/05/2018 - Pruebas de impresion de factura PyME
|
||||
Private Sub GeneraPDFVtaPyMe(Venta As Modelos.Factura, Optional Formato As String = "PDF")
|
||||
Dim Directorio1 As String = String.Format("{0}Empresas\{1}\Formatos\Factura.mrt", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa)
|
||||
Dim File As FileInfo = New FileInfo(Directorio1)
|
||||
@@ -3793,7 +3850,7 @@ Partial Class PopUpVerFactura
|
||||
Else
|
||||
RegistraScript("alert('No hay un formato de factura predefinido,favor de comunicar a soporte tecnico')")
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -496,8 +496,8 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
End If
|
||||
Else
|
||||
Dim Importe28 As Decimal = TxtImporte.Text.ToDecimal
|
||||
If chkajusteoi.checked Then
|
||||
Importe28 = txttotal.text.todecimal
|
||||
If ChkAjusteOI.Checked Then
|
||||
Importe28 = TxtTotal.Text.ToDecimal
|
||||
End If
|
||||
'AGREGO PREPOLIZA FyE
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaIERegistrado, False, Importe28, TxtObservaciones.Text, 28, TxtObservaciones.Text, TxtFechaDocumento.Text.ToDate, IdCtaPersonal, -1, CvePersonal:=CvePersonal, CveIE:=CveIERegistrado, ImporteME:=If(tipoCambio = 1, 0, TxtImporte.Text.ToDecimal), ImporteMX:=Importe28 * tipoCambio, Contabilizable:=If(CveCajaChica > 0 Or CvePersonal > 0, Not UsaSimplificacionCajaChica, True)) Then
|
||||
@@ -505,7 +505,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
Else
|
||||
CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones", 9, TxtImporte.Text.ToDecimal, TxtImporte.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
'SI ES CAJA CHICA REGISTRO IE CAJA CHICA
|
||||
@@ -524,7 +524,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
End If
|
||||
Else
|
||||
'AGREGO PREPOLIZA FyE
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaIERegistrado, True, TxtImporte.Text.ToDecimal, TxtObservaciones.Text, 29, TxtObservaciones.Text, TxtFechaDocumento.Text.ToDate, IdCtaPersonal, -1, CvePersonal:=CvePersonal, CveIE:=CveIERegistrado, ImporteME:=If(tipoCambio = 1, 0, TxtImporte.Text.ToDecimal), ImporteMX:=TxtImporte.Text.ToDecimal * tipoCambio) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaIERegistrado, True, TxtImporteVinculado.Text.ToDecimal, TxtObservaciones.Text, 29, TxtObservaciones.Text, TxtFechaDocumento.Text.ToDate, IdCtaPersonal, -1, CvePersonal:=CvePersonal, CveIE:=CveIERegistrado, ImporteME:=If(tipoCambio = 1, 0, TxtImporte.Text.ToDecimal), ImporteMX:=TxtImporte.Text.ToDecimal * tipoCambio) Then
|
||||
MsgError = "Error al registrar detalle de concepto bancario"
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -80,10 +80,10 @@
|
||||
<TablixBody>
|
||||
<TablixColumns>
|
||||
<TablixColumn>
|
||||
<Width>3.65896cm</Width>
|
||||
<Width>3.20728cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>10.4809cm</Width>
|
||||
<Width>12.42242cm</Width>
|
||||
</TablixColumn>
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
@@ -271,7 +271,7 @@
|
||||
<TablixMember>
|
||||
<Group Name="GPO" />
|
||||
<TablixHeader>
|
||||
<Size>2.56862cm</Size>
|
||||
<Size>2.01883cm</Size>
|
||||
<CellContents>
|
||||
<Textbox Name="Cantidad">
|
||||
<CanGrow>true</CanGrow>
|
||||
@@ -284,7 +284,7 @@
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<Format>#,0.00</Format>
|
||||
<Format>#,0</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -324,7 +324,7 @@
|
||||
<TablixMembers>
|
||||
<TablixMember>
|
||||
<TablixHeader>
|
||||
<Size>2.5cm</Size>
|
||||
<Size>1.46419cm</Size>
|
||||
<CellContents>
|
||||
<Textbox Name="Codigo">
|
||||
<CanGrow>true</CanGrow>
|
||||
@@ -381,10 +381,10 @@
|
||||
<RepeatColumnHeaders>true</RepeatColumnHeaders>
|
||||
<FixedColumnHeaders>true</FixedColumnHeaders>
|
||||
<DataSetName>DataSet1</DataSetName>
|
||||
<Top>6.0914cm</Top>
|
||||
<Top>5.46866cm</Top>
|
||||
<Left>0.21008cm</Left>
|
||||
<Height>1.14708cm</Height>
|
||||
<Width>19.20848cm</Width>
|
||||
<Width>19.11272cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -460,7 +460,7 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>0.9533cm</Top>
|
||||
<Left>0.21008cm</Left>
|
||||
<Left>0.23022cm</Left>
|
||||
<Height>0.66127cm</Height>
|
||||
<Width>9.36417cm</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
@@ -1013,7 +1013,7 @@
|
||||
<TablixMembers>
|
||||
<TablixMember>
|
||||
<TablixHeader>
|
||||
<Size>0.86458cm</Size>
|
||||
<Size>0.52062cm</Size>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox41">
|
||||
<CanGrow>true</CanGrow>
|
||||
@@ -1050,7 +1050,7 @@
|
||||
</TablixMember>
|
||||
<TablixMember>
|
||||
<TablixHeader>
|
||||
<Size>0.86458cm</Size>
|
||||
<Size>0.52062cm</Size>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox32">
|
||||
<CanGrow>true</CanGrow>
|
||||
@@ -1087,7 +1087,7 @@
|
||||
</TablixMember>
|
||||
<TablixMember>
|
||||
<TablixHeader>
|
||||
<Size>0.86458cm</Size>
|
||||
<Size>0.52062cm</Size>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox64">
|
||||
<CanGrow>true</CanGrow>
|
||||
@@ -1185,9 +1185,9 @@
|
||||
<RepeatColumnHeaders>true</RepeatColumnHeaders>
|
||||
<FixedColumnHeaders>true</FixedColumnHeaders>
|
||||
<DataSetName>DataSet1</DataSetName>
|
||||
<Top>4.25682cm</Top>
|
||||
<Top>4.17165cm</Top>
|
||||
<Left>0.21008cm</Left>
|
||||
<Height>1.46458cm</Height>
|
||||
<Height>1.12062cm</Height>
|
||||
<Width>19.20849cm</Width>
|
||||
<ZIndex>10</ZIndex>
|
||||
<Style>
|
||||
@@ -1214,7 +1214,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>8.25268cm</Top>
|
||||
<Top>7.62994cm</Top>
|
||||
<Left>0.20001cm</Left>
|
||||
<Height>0.62599cm</Height>
|
||||
<Width>19.21855cm</Width>
|
||||
@@ -1267,7 +1267,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>8.87867cm</Top>
|
||||
<Top>8.25593cm</Top>
|
||||
<Left>0.20001cm</Left>
|
||||
<Height>1.50794cm</Height>
|
||||
<Width>19.21855cm</Width>
|
||||
@@ -1854,7 +1854,7 @@
|
||||
</TablixMember>
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<Top>7.37959cm</Top>
|
||||
<Top>6.75685cm</Top>
|
||||
<Left>0.21008cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>19.11272cm</Width>
|
||||
@@ -2115,7 +2115,7 @@
|
||||
<PrintOnLastPage>true</PrintOnLastPage>
|
||||
<ReportItems>
|
||||
<Line Name="Line1">
|
||||
<Top>0.03527cm</Top>
|
||||
<Top>0.03526cm</Top>
|
||||
<Left>0.22015cm</Left>
|
||||
<Height>0cm</Height>
|
||||
<Width>19.22862cm</Width>
|
||||
@@ -2145,7 +2145,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox13</rd:DefaultName>
|
||||
<Top>0.1411cm</Top>
|
||||
<Top>0.14109cm</Top>
|
||||
<Left>0.22015cm</Left>
|
||||
<Height>0.54708cm</Height>
|
||||
<Width>1.55632cm</Width>
|
||||
@@ -2179,7 +2179,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox14</rd:DefaultName>
|
||||
<Top>0.1411cm</Top>
|
||||
<Top>0.14109cm</Top>
|
||||
<Left>1.77647cm</Left>
|
||||
<Height>0.54708cm</Height>
|
||||
<Width>4.96223cm</Width>
|
||||
@@ -2214,7 +2214,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox13</rd:DefaultName>
|
||||
<Top>0.1411cm</Top>
|
||||
<Top>0.14109cm</Top>
|
||||
<Left>6.84454cm</Left>
|
||||
<Height>0.54708cm</Height>
|
||||
<Width>2.84562cm</Width>
|
||||
@@ -2249,7 +2249,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox14</rd:DefaultName>
|
||||
<Top>0.1411cm</Top>
|
||||
<Top>0.14109cm</Top>
|
||||
<Left>9.69015cm</Left>
|
||||
<Height>0.54708cm</Height>
|
||||
<Width>4.68641cm</Width>
|
||||
@@ -2283,7 +2283,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox14</rd:DefaultName>
|
||||
<Top>0.17638cm</Top>
|
||||
<Top>0.17637cm</Top>
|
||||
<Left>14.62633cm</Left>
|
||||
<Height>0.54708cm</Height>
|
||||
<Width>4.8023cm</Width>
|
||||
@@ -2315,7 +2315,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox14</rd:DefaultName>
|
||||
<Top>0.68818cm</Top>
|
||||
<Top>0.68817cm</Top>
|
||||
<Left>0.22015cm</Left>
|
||||
<Height>0.54708cm</Height>
|
||||
<Width>6.21751cm</Width>
|
||||
|
||||
@@ -666,6 +666,16 @@ Partial Class Inventarios_RecepcionUsados
|
||||
TxtRemision.Text = ""
|
||||
DivRemision.Visible = False
|
||||
|
||||
If ObjFactura IsNot Nothing Then
|
||||
ObjFactura.Dispose()
|
||||
ObjFactura = Nothing
|
||||
End If
|
||||
|
||||
If ObjRemisionNC IsNot Nothing Then
|
||||
ObjRemisionNC.Dispose()
|
||||
ObjRemisionNC = Nothing
|
||||
End If
|
||||
|
||||
UpRegistroTipoCambio.Update()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
@@ -1021,16 +1031,17 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
Dim GenerarRNC As Boolean = False
|
||||
'SI ES DISTRIBUIDOR Y NO VIENE DE REMISION, GENERA UNA REMISION DE NOTA DE CREDITO
|
||||
If EsDistribuidor AndAlso Me.CveRemisionRecibida <= 0 Then
|
||||
GenerarRNC = True
|
||||
Dim CveCliente As Integer = DdlClientes.SelectedValue.ToEntero()
|
||||
Dim CveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue}").ToEntero
|
||||
|
||||
CreaRemisionNC(CveCliente, CveSubProyecto, 1)
|
||||
End If
|
||||
|
||||
If Me.ObjRemisionNC IsNot Nothing Then
|
||||
If GenerarRNC AndAlso Me.ObjRemisionNC IsNot Nothing Then
|
||||
Dim sb As New StringBuilder()
|
||||
sb.Append($"Se va a generar un documento de tipo 'Remisión de nota de crédito'.<br> ¿Esta seguro que desea guardar?:<br/>")
|
||||
|
||||
@@ -1115,13 +1126,13 @@ Partial Class Inventarios_RecepcionUsados
|
||||
ImporteConcepto = Dr("PU").ToString.ToDouble * GlobalTipoCambio(TxtFecha.Text.ToDate)
|
||||
Else
|
||||
ImporteConcepto = Dr("PU").ToString.ToDouble
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
Mensaje = "Error al guardar los movimientos"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
Mensaje = "Error al guardar los movimientos"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If CveVenta > 0 AndAlso Not ObjVentas.UpdateVentaUsadoRecibido(CveVenta, Dr("CvePS").ToString.ToEntero, True) Then
|
||||
Mensaje = "Error al actualizar el recibo de los usados"
|
||||
@@ -1143,34 +1154,34 @@ Partial Class Inventarios_RecepcionUsados
|
||||
End If
|
||||
Next
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
If Not ErrorMovInv Then
|
||||
|
||||
|
||||
Msg.AppendFormat("<br/>El Movimiento se registro con el Folio: <b>{0}</b>", ObjInventario.Folio)
|
||||
Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
|
||||
Msg.AppendFormat("<br/>El Movimiento se registro con el Folio: <b>{0}</b>", ObjInventario.Folio)
|
||||
Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
|
||||
|
||||
If IDPoliza > 0 Then Msg = Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza)
|
||||
If IDPoliza > 0 Then Msg = Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza)
|
||||
|
||||
ObjInventario.Commit() ' aplica los movimientos insertados
|
||||
ObjInventario.Commit() ' aplica los movimientos insertados
|
||||
|
||||
'Limpia Valores cuando inserta de campos especiales
|
||||
If UsuarioActual.CveEmpresa = 66 Then
|
||||
DdlSubProyecto.SelectedValueExist("-1")
|
||||
End If
|
||||
|
||||
EnvioCorreo()
|
||||
|
||||
CargaPendientesRecibir()
|
||||
UPDatos.Update()
|
||||
|
||||
Else
|
||||
ObjInventario.RollBack() 'deshace lo insertado
|
||||
CveMovimiento = 0
|
||||
Alert("ocurrió un Error al registrar los movimientos", TipoMensaje.MsgError)
|
||||
'Limpia Valores cuando inserta de campos especiales
|
||||
If UsuarioActual.CveEmpresa = 66 Then
|
||||
DdlSubProyecto.SelectedValueExist("-1")
|
||||
End If
|
||||
|
||||
EnvioCorreo()
|
||||
|
||||
CargaPendientesRecibir()
|
||||
UPDatos.Update()
|
||||
|
||||
Else
|
||||
ObjInventario.RollBack() 'deshace lo insertado
|
||||
CveMovimiento = 0
|
||||
Alert("ocurrió un Error al registrar los movimientos", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ObjInventario.RollBack() 'deshace lo insertado
|
||||
CveMovimiento = 0
|
||||
@@ -2033,8 +2044,8 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Private Sub CreaRemisionNC(CveCliente As Integer, CveSubProyecto As Integer, CveMoneda As Integer)
|
||||
Me.ObjRemisionNC = New Modelos.Factura(UsuarioActual)
|
||||
|
||||
Dim Folio As String = ""
|
||||
Dim Serie As String = ""
|
||||
'Dim Folio As String = ""
|
||||
'Dim Serie As String = ""
|
||||
|
||||
'Dim ObjFolios As New ClsGralFolios()
|
||||
'If ObjFolios.GetFolios("RNC", UsuarioActual.CveEmpresa) Then
|
||||
@@ -2647,7 +2658,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Protected Sub CargaTipoDefecto()
|
||||
DdlTipoDefecto.DataSource = GlobalDTAcumTiposDefecto.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
|
||||
DdlTipoDefecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlTipoDefecto.DataBind
|
||||
DdlTipoDefecto.DataBind()
|
||||
End Sub
|
||||
Private Sub CalculaPorcentajeAjuste()
|
||||
Try
|
||||
|
||||
@@ -176,6 +176,14 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
ViewState("FolioBusqueda") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtCamiones As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtCamiones"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtCamiones") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
@@ -635,7 +643,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
'VALIDA TRANSITORIO
|
||||
If ChkTransitorio.Checked Then
|
||||
If TxtResponsable.Text.Trim = "" Then
|
||||
If TxtResponsable.Text.Trim = "" And Not UsuarioActual.CveEmpresa.Contiene(119) Then
|
||||
Alert("Debe seleccionar un responsable para el traspaso transitorio.", TipoMensaje.MsgAdvertencia)
|
||||
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
|
||||
If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);")
|
||||
@@ -648,6 +656,13 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If DdlChofer.SelectedValue.ToEntero <= 0 And UsuarioActual.CveEmpresa.Contiene(119) Then
|
||||
Alert("Debe seleccionar un Chofer", TipoMensaje.MsgAdvertencia)
|
||||
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
|
||||
If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);")
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
'VALIDA ALMACEN DISTINTA SUCURSAL DEBE SER TRANSITORIO
|
||||
@@ -2790,6 +2805,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
If ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
DdlUnidadCamion.DataSource = ObjInventarios.DtResultados
|
||||
DtCamiones = ObjInventarios.DtResultados
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
DdlUnidadCamion.Items.Insert(0, New ListItem("Otro", "-1"))
|
||||
@@ -2808,11 +2824,13 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
Private Sub DdlUnidadCamion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlUnidadCamion.SelectedIndexChanged
|
||||
If DdlUnidadCamion.SelectedValue = "-1" Then
|
||||
divPlacaEspecificacion.Visible = True
|
||||
Else
|
||||
divPlacaEspecificacion.Visible = False
|
||||
'divPlacaEspecificacion.Visible = True
|
||||
TxtPlaca.Text = ""
|
||||
TxtEspecifUnidad.Text = ""
|
||||
Else
|
||||
'divPlacaEspecificacion.Visible = False
|
||||
TxtPlaca.Text = DtCamiones.FiltroPrimeroValor("Placa", String.Format("CveCamion = {0}", DdlUnidadCamion.SelectedValue))
|
||||
TxtEspecifUnidad.Text = DtCamiones.FiltroPrimeroValor("Especificacion", String.Format("CveCamion = {0}", DdlUnidadCamion.SelectedValue))
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -10430,18 +10430,23 @@ Partial Class Ventas
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
|
||||
'Contabilidad ContPAQ
|
||||
If IdCtaContRetIVA > 0 Then
|
||||
IdCtaContable = IdCtaContRetIVA
|
||||
'CONTABILIDAD CONTPAQ
|
||||
'SI LA RETENCION ES AL 6% DEBE USAR ESTA CUENTA
|
||||
If UsuarioActual.Empresa.Funcionalidad(580).ToEntero() > 0 AndAlso (DdlTipoRetencion.SelectedValue = "4") Then
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(580).ToEntero()
|
||||
Else
|
||||
If ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
If IdCtaContRetIVA > 0 Then
|
||||
IdCtaContable = IdCtaContRetIVA
|
||||
Else
|
||||
If ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'Contabilidad SIG
|
||||
'CONTABILIDAD SIG
|
||||
If CveCuentaRetIVA > 0 Then
|
||||
CveCuenta = CveCuentaRetIVA
|
||||
Else
|
||||
@@ -10451,6 +10456,8 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Case 9 'Ret ISR por Trasladar
|
||||
|
||||
Reference in New Issue
Block a user