Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -995,9 +995,10 @@ Partial Class PopUpVerFactura
|
|||||||
'IMPRIME FACTURA
|
'IMPRIME FACTURA
|
||||||
If UrlParametros("OP").ToString = "VTA" Then
|
If UrlParametros("OP").ToString = "VTA" Then
|
||||||
If UrlParametros("CVEVENTA") IsNot Nothing AndAlso UrlParametros("CVEVENTA").ToString.ToEntero > 0 Then
|
If UrlParametros("CVEVENTA") IsNot Nothing AndAlso UrlParametros("CVEVENTA").ToString.ToEntero > 0 Then
|
||||||
|
Dim AplicaPagare As String = If(UrlParametros("PAG") IsNot Nothing AndAlso UrlParametros("PAG").ToString <> "", UrlParametros("PAG").ToString, "0")
|
||||||
Dim Guardar As Boolean = UrlParametros("GUARDAR") IsNot Nothing AndAlso UrlParametros("GUARDAR").ToString() = "1"
|
Dim Guardar As Boolean = UrlParametros("GUARDAR") IsNot Nothing AndAlso UrlParametros("GUARDAR").ToString() = "1"
|
||||||
|
Dim RegenerarPDF As Boolean = UrlParametros("REGENERAR") IsNot Nothing AndAlso UrlParametros("REGENERAR").ToString() = "1"
|
||||||
imprimirFacturaVenta(UrlParametros("CVEVENTA").ToString.ToEntero, If(UrlParametros("PAG") IsNot Nothing AndAlso UrlParametros("PAG").ToString <> "", UrlParametros("PAG").ToString, "0"), GuardarPDF:=Guardar)
|
imprimirFacturaVenta(UrlParametros("CVEVENTA").ToString.ToEntero, AplicaPagare, GuardarPDF:=Guardar, RegenerarPDF:=RegenerarPDF)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -2055,7 +2056,12 @@ Partial Class PopUpVerFactura
|
|||||||
Dim nodeMercanciaPadre As XmlNodeList = nodeComp.SelectNodes(String.Format("//{0}:Mercancias", "cartaporte20"), namespaces)
|
Dim nodeMercanciaPadre As XmlNodeList = nodeComp.SelectNodes(String.Format("//{0}:Mercancias", "cartaporte20"), namespaces)
|
||||||
If UsuarioActual.CveEmpresa = 13 AndAlso nodeMercanciaPadre IsNot Nothing Then
|
If UsuarioActual.CveEmpresa = 13 AndAlso nodeMercanciaPadre IsNot Nothing Then
|
||||||
Dim PesoNetoTotal = ValorXML(nodeMercanciaPadre(0), "PesoNetoTotal", "")
|
Dim PesoNetoTotal = ValorXML(nodeMercanciaPadre(0), "PesoNetoTotal", "")
|
||||||
|
Dim UnidadPeso = ValorXML(nodeMercanciaPadre(0), "UnidadPeso", "")
|
||||||
|
Dim NumTotalMercancias = ValorXML(nodeMercanciaPadre(0), "NumTotalMercancias", "")
|
||||||
|
|
||||||
params.Add(New ReportParameter("PesoNetoTotal", PesoNetoTotal))
|
params.Add(New ReportParameter("PesoNetoTotal", PesoNetoTotal))
|
||||||
|
params.Add(New ReportParameter("UnidadPeso", UnidadPeso))
|
||||||
|
params.Add(New ReportParameter("NumTotalMercancias", NumTotalMercancias))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim nodeOperadores As XmlNodeList = nodeComp.SelectNodes(String.Format("//{0}:TiposFigura", "cartaporte20"), namespaces)
|
Dim nodeOperadores As XmlNodeList = nodeComp.SelectNodes(String.Format("//{0}:TiposFigura", "cartaporte20"), namespaces)
|
||||||
@@ -2589,6 +2595,9 @@ Partial Class PopUpVerFactura
|
|||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
Dim Vta As Modelos.Factura = Nothing
|
Dim Vta As Modelos.Factura = Nothing
|
||||||
|
|
||||||
|
Dim PathArchivo As String = "" 'String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio)
|
||||||
|
|
||||||
|
|
||||||
Dim TmpDTImpuestos = New DataTable
|
Dim TmpDTImpuestos = New DataTable
|
||||||
TmpDTImpuestos.Columns.Add("ImpuestoLocal", GetType(String))
|
TmpDTImpuestos.Columns.Add("ImpuestoLocal", GetType(String))
|
||||||
TmpDTImpuestos.Columns.Add("Importe", GetType(Double))
|
TmpDTImpuestos.Columns.Add("Importe", GetType(Double))
|
||||||
@@ -2607,6 +2616,11 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
Vta = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.Factura)
|
Vta = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.Factura)
|
||||||
|
|
||||||
|
PathArchivo = String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio)
|
||||||
|
Dim Archivo As New System.IO.FileInfo(PathArchivo)
|
||||||
|
|
||||||
|
'SI EL ARCHIVO NO EXISTE O SE VA REGENERA EL PDF, SE DEBEN LLENAR LOS DATOS
|
||||||
|
If Not Archivo.Exists OrElse RegenerarPDF Then
|
||||||
Vta.MonedaAbreviatura = dtVentas(0)("Abreviatura").ToString
|
Vta.MonedaAbreviatura = dtVentas(0)("Abreviatura").ToString
|
||||||
'se rellena la sucursal
|
'se rellena la sucursal
|
||||||
'Vta.Subproyecto = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.SucursalModel)
|
'Vta.Subproyecto = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.SucursalModel)
|
||||||
@@ -2847,12 +2861,6 @@ Partial Class PopUpVerFactura
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
'If dtVentas(0)("TipoDocto").ToString.Contiene("Ing", "Ant", "Rem") Then
|
|
||||||
' 'carga as notas de credito vinculadas
|
|
||||||
' If ObjVentas.GetVentasAntNC(CveVenta, -1) Then
|
|
||||||
' Vta.DtDocumentosRelacionados = ObjVentas.DtResultados.FiltraParametros("FolioFiscal IS NOT NULL")
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
If dtVentas(0)("TipoDocto").ToString.Contiene("Egs", "Dev", "Ant") Then
|
If dtVentas(0)("TipoDocto").ToString.Contiene("Egs", "Dev", "Ant") Then
|
||||||
|
|
||||||
@@ -2904,23 +2912,20 @@ Partial Class PopUpVerFactura
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'End If
|
End If
|
||||||
|
|
||||||
'If Vta.TipoDocto.Contiene("Egs", "Dev", "Ant") Then
|
|
||||||
' 'If ObjVentas.GetVentasAntNC(-1, CveVenta) Then
|
|
||||||
' ' Vta.DtNCVinculadas = ObjVentas.DtResultados
|
|
||||||
' 'End If
|
|
||||||
' If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa) Then
|
|
||||||
' Vta.DtNCVinculadas = ObjVentas.DtResultados
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
|
If Not IsNothing(Vta) Then
|
||||||
|
Dim Archivo As New System.IO.FileInfo(PathArchivo)
|
||||||
|
|
||||||
|
Dim Guardar As Boolean = If(GuardarPDF, True, If(AplicaPagare = "1", False, True))
|
||||||
|
|
||||||
Dim CveTimbreCartaPorteVenta As Integer = -1
|
Dim CveTimbreCartaPorteVenta As Integer = -1
|
||||||
Dim CartaPorte As Modelos.MSubReportData = Nothing
|
Dim CartaPorte As Modelos.MSubReportData = Nothing
|
||||||
|
'SI EL ARCHIVO NO EXISTE O SE VA REGENERA EL PDF, SE DEBEN LLENAR LOS DATOS
|
||||||
|
If Not Archivo.Exists OrElse RegenerarPDF Then
|
||||||
If UsuarioActual.CveEmpresa = 13 AndAlso Vta.TipoDocto = "Ing" Then
|
If UsuarioActual.CveEmpresa = 13 AndAlso Vta.TipoDocto = "Ing" Then
|
||||||
Using ObjGral As New ClsGenerales
|
Using ObjGral As New ClsGenerales
|
||||||
If ObjGral.GetGralTimbre(-1, "Ing", MinFecha, MaxFecha, 0, UsuarioActual.CveEmpresa, -1, CveVenta:=CveVenta) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
|
If ObjGral.GetGralTimbre(-1, "Ing", MinFecha, MaxFecha, 0, UsuarioActual.CveEmpresa, -1, CveVenta:=CveVenta) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
|
||||||
@@ -2930,32 +2935,13 @@ Partial Class PopUpVerFactura
|
|||||||
End Using
|
End Using
|
||||||
|
|
||||||
If CveTimbreCartaPorteVenta > 0 Then
|
If CveTimbreCartaPorteVenta > 0 Then
|
||||||
'CartaPorte = New Modelos.MSubReportData
|
|
||||||
'CartaPorte.Parametros.Add(New ReportParameter("SRP_ParametroPrueba", "Rarametro pasado"))
|
|
||||||
'Dim dt As New DataTable()
|
|
||||||
'dt.Columns.Add(New DataColumn("Cantidad", GetType(Decimal)))
|
|
||||||
'dt.Columns.Add(New DataColumn("Unidad", GetType(String)))
|
|
||||||
|
|
||||||
'Dim row As DataRow = dt.NewRow()
|
|
||||||
'row("Cantidad") = 2.3D
|
|
||||||
'row("Unidad") = "PIEZAS"
|
|
||||||
|
|
||||||
'dt.Rows.Add(row)
|
|
||||||
'CartaPorte.DataSources.Add(New ReportDataSource() With {.Name = "DataSet1", .Value = dt})
|
|
||||||
|
|
||||||
CartaPorte = PreParaImpresionCartaPorte(CveTimbreCartaPorteVenta, AplicaSubReporte:=True)
|
CartaPorte = PreParaImpresionCartaPorte(CveTimbreCartaPorteVenta, AplicaSubReporte:=True)
|
||||||
Else
|
Else
|
||||||
CartaPorte = New Modelos.MSubReportData()
|
CartaPorte = New Modelos.MSubReportData()
|
||||||
CartaPorte.Parametros.Add(New ReportParameter($"TieneCartaPorte", "False"))
|
CartaPorte.Parametros.Add(New ReportParameter($"TieneCartaPorte", "False"))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
Dim Guardar As Boolean = If(GuardarPDF, True, If(AplicaPagare = "1", False, True))
|
|
||||||
|
|
||||||
If Not IsNothing(Vta) Then
|
|
||||||
|
|
||||||
Dim PathArchivo As String = String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio)
|
|
||||||
Dim Archivo As New System.IO.FileInfo(PathArchivo)
|
|
||||||
|
|
||||||
If Archivo.Exists Then
|
If Archivo.Exists Then
|
||||||
If RegenerarPDF Then
|
If RegenerarPDF Then
|
||||||
|
|||||||
@@ -92,11 +92,6 @@
|
|||||||
<Border>
|
<Border>
|
||||||
<Style>None</Style>
|
<Style>None</Style>
|
||||||
</Border>
|
</Border>
|
||||||
<BottomBorder>
|
|
||||||
<Color>Black</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
<Width>1pt</Width>
|
|
||||||
</BottomBorder>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
<PaddingRight>2pt</PaddingRight>
|
<PaddingRight>2pt</PaddingRight>
|
||||||
<PaddingTop>2pt</PaddingTop>
|
<PaddingTop>2pt</PaddingTop>
|
||||||
@@ -131,11 +126,6 @@
|
|||||||
<Border>
|
<Border>
|
||||||
<Style>None</Style>
|
<Style>None</Style>
|
||||||
</Border>
|
</Border>
|
||||||
<BottomBorder>
|
|
||||||
<Color>Black</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
<Width>1pt</Width>
|
|
||||||
</BottomBorder>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
<PaddingRight>2pt</PaddingRight>
|
<PaddingRight>2pt</PaddingRight>
|
||||||
<PaddingTop>2pt</PaddingTop>
|
<PaddingTop>2pt</PaddingTop>
|
||||||
@@ -170,11 +160,6 @@
|
|||||||
<Border>
|
<Border>
|
||||||
<Style>None</Style>
|
<Style>None</Style>
|
||||||
</Border>
|
</Border>
|
||||||
<BottomBorder>
|
|
||||||
<Color>Black</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
<Width>1pt</Width>
|
|
||||||
</BottomBorder>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
<PaddingRight>2pt</PaddingRight>
|
<PaddingRight>2pt</PaddingRight>
|
||||||
<PaddingTop>2pt</PaddingTop>
|
<PaddingTop>2pt</PaddingTop>
|
||||||
@@ -209,11 +194,6 @@
|
|||||||
<Border>
|
<Border>
|
||||||
<Style>None</Style>
|
<Style>None</Style>
|
||||||
</Border>
|
</Border>
|
||||||
<BottomBorder>
|
|
||||||
<Color>Black</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
<Width>1pt</Width>
|
|
||||||
</BottomBorder>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
<PaddingRight>2pt</PaddingRight>
|
<PaddingRight>2pt</PaddingRight>
|
||||||
<PaddingTop>2pt</PaddingTop>
|
<PaddingTop>2pt</PaddingTop>
|
||||||
@@ -248,11 +228,6 @@
|
|||||||
<Border>
|
<Border>
|
||||||
<Style>None</Style>
|
<Style>None</Style>
|
||||||
</Border>
|
</Border>
|
||||||
<BottomBorder>
|
|
||||||
<Color>Black</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
<Width>1pt</Width>
|
|
||||||
</BottomBorder>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
<PaddingRight>2pt</PaddingRight>
|
<PaddingRight>2pt</PaddingRight>
|
||||||
<PaddingTop>2pt</PaddingTop>
|
<PaddingTop>2pt</PaddingTop>
|
||||||
@@ -430,7 +405,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Peso (KG)</Value>
|
<Value>Peso </Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>Calibri</FontFamily>
|
<FontFamily>Calibri</FontFamily>
|
||||||
<FontSize>7pt</FontSize>
|
<FontSize>7pt</FontSize>
|
||||||
@@ -491,11 +466,6 @@
|
|||||||
<Border>
|
<Border>
|
||||||
<Style>None</Style>
|
<Style>None</Style>
|
||||||
</Border>
|
</Border>
|
||||||
<BottomBorder>
|
|
||||||
<Color>Black</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
<Width>1pt</Width>
|
|
||||||
</BottomBorder>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
<PaddingRight>2pt</PaddingRight>
|
<PaddingRight>2pt</PaddingRight>
|
||||||
<PaddingTop>2pt</PaddingTop>
|
<PaddingTop>2pt</PaddingTop>
|
||||||
@@ -553,6 +523,10 @@
|
|||||||
<Color>White</Color>
|
<Color>White</Color>
|
||||||
<Style>Solid</Style>
|
<Style>Solid</Style>
|
||||||
</Border>
|
</Border>
|
||||||
|
<BottomBorder>
|
||||||
|
<Color>Black</Color>
|
||||||
|
<Width>1pt</Width>
|
||||||
|
</BottomBorder>
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
<PaddingRight>2pt</PaddingRight>
|
<PaddingRight>2pt</PaddingRight>
|
||||||
<PaddingTop>2pt</PaddingTop>
|
<PaddingTop>2pt</PaddingTop>
|
||||||
@@ -650,22 +624,9 @@
|
|||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
<Color>White</Color>
|
<Color>White</Color>
|
||||||
<Style>Solid</Style>
|
<Style>None</Style>
|
||||||
<Width>2pt</Width>
|
<Width>2pt</Width>
|
||||||
</Border>
|
</Border>
|
||||||
<TopBorder>
|
|
||||||
<Style>None</Style>
|
|
||||||
</TopBorder>
|
|
||||||
<BottomBorder>
|
|
||||||
<Color>Black</Color>
|
|
||||||
<Width>1pt</Width>
|
|
||||||
</BottomBorder>
|
|
||||||
<LeftBorder>
|
|
||||||
<Style>None</Style>
|
|
||||||
</LeftBorder>
|
|
||||||
<RightBorder>
|
|
||||||
<Style>None</Style>
|
|
||||||
</RightBorder>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
<PaddingRight>2pt</PaddingRight>
|
<PaddingRight>2pt</PaddingRight>
|
||||||
<PaddingTop>2pt</PaddingTop>
|
<PaddingTop>2pt</PaddingTop>
|
||||||
@@ -699,22 +660,9 @@
|
|||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
<Color>White</Color>
|
<Color>White</Color>
|
||||||
<Style>Solid</Style>
|
<Style>None</Style>
|
||||||
<Width>2pt</Width>
|
<Width>2pt</Width>
|
||||||
</Border>
|
</Border>
|
||||||
<TopBorder>
|
|
||||||
<Style>None</Style>
|
|
||||||
</TopBorder>
|
|
||||||
<BottomBorder>
|
|
||||||
<Color>Black</Color>
|
|
||||||
<Width>1pt</Width>
|
|
||||||
</BottomBorder>
|
|
||||||
<LeftBorder>
|
|
||||||
<Style>None</Style>
|
|
||||||
</LeftBorder>
|
|
||||||
<RightBorder>
|
|
||||||
<Style>None</Style>
|
|
||||||
</RightBorder>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
<PaddingRight>2pt</PaddingRight>
|
<PaddingRight>2pt</PaddingRight>
|
||||||
<PaddingTop>2pt</PaddingTop>
|
<PaddingTop>2pt</PaddingTop>
|
||||||
@@ -751,11 +699,6 @@
|
|||||||
<Style>None</Style>
|
<Style>None</Style>
|
||||||
<Width>5pt</Width>
|
<Width>5pt</Width>
|
||||||
</Border>
|
</Border>
|
||||||
<BottomBorder>
|
|
||||||
<Color>Black</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
<Width>1pt</Width>
|
|
||||||
</BottomBorder>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
<PaddingRight>2pt</PaddingRight>
|
<PaddingRight>2pt</PaddingRight>
|
||||||
<PaddingTop>2pt</PaddingTop>
|
<PaddingTop>2pt</PaddingTop>
|
||||||
@@ -793,11 +736,6 @@
|
|||||||
<Style>None</Style>
|
<Style>None</Style>
|
||||||
<Width>5pt</Width>
|
<Width>5pt</Width>
|
||||||
</Border>
|
</Border>
|
||||||
<BottomBorder>
|
|
||||||
<Color>Black</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
<Width>1pt</Width>
|
|
||||||
</BottomBorder>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
<PaddingRight>2pt</PaddingRight>
|
<PaddingRight>2pt</PaddingRight>
|
||||||
<PaddingTop>2pt</PaddingTop>
|
<PaddingTop>2pt</PaddingTop>
|
||||||
@@ -834,11 +772,6 @@
|
|||||||
<Style>None</Style>
|
<Style>None</Style>
|
||||||
<Width>5pt</Width>
|
<Width>5pt</Width>
|
||||||
</Border>
|
</Border>
|
||||||
<BottomBorder>
|
|
||||||
<Color>Black</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
<Width>1pt</Width>
|
|
||||||
</BottomBorder>
|
|
||||||
<RightBorder>
|
<RightBorder>
|
||||||
<Style>Solid</Style>
|
<Style>Solid</Style>
|
||||||
<Width>1pt</Width>
|
<Width>1pt</Width>
|
||||||
@@ -1097,8 +1030,7 @@
|
|||||||
<Style>None</Style>
|
<Style>None</Style>
|
||||||
</TopBorder>
|
</TopBorder>
|
||||||
<BottomBorder>
|
<BottomBorder>
|
||||||
<Color>Black</Color>
|
<Style>None</Style>
|
||||||
<Width>1pt</Width>
|
|
||||||
</BottomBorder>
|
</BottomBorder>
|
||||||
<LeftBorder>
|
<LeftBorder>
|
||||||
<Width>1pt</Width>
|
<Width>1pt</Width>
|
||||||
@@ -1163,6 +1095,10 @@
|
|||||||
<Color>White</Color>
|
<Color>White</Color>
|
||||||
<Style>Solid</Style>
|
<Style>Solid</Style>
|
||||||
</Border>
|
</Border>
|
||||||
|
<BottomBorder>
|
||||||
|
<Color>Black</Color>
|
||||||
|
<Width>1pt</Width>
|
||||||
|
</BottomBorder>
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
<PaddingRight>2pt</PaddingRight>
|
<PaddingRight>2pt</PaddingRight>
|
||||||
<PaddingTop>2pt</PaddingTop>
|
<PaddingTop>2pt</PaddingTop>
|
||||||
@@ -1251,22 +1187,9 @@
|
|||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
<Color>White</Color>
|
<Color>White</Color>
|
||||||
<Style>Solid</Style>
|
<Style>None</Style>
|
||||||
<Width>2pt</Width>
|
<Width>2pt</Width>
|
||||||
</Border>
|
</Border>
|
||||||
<TopBorder>
|
|
||||||
<Style>None</Style>
|
|
||||||
</TopBorder>
|
|
||||||
<BottomBorder>
|
|
||||||
<Color>Black</Color>
|
|
||||||
<Width>1pt</Width>
|
|
||||||
</BottomBorder>
|
|
||||||
<LeftBorder>
|
|
||||||
<Style>None</Style>
|
|
||||||
</LeftBorder>
|
|
||||||
<RightBorder>
|
|
||||||
<Style>None</Style>
|
|
||||||
</RightBorder>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
<PaddingRight>2pt</PaddingRight>
|
<PaddingRight>2pt</PaddingRight>
|
||||||
<PaddingTop>2pt</PaddingTop>
|
<PaddingTop>2pt</PaddingTop>
|
||||||
@@ -1303,11 +1226,6 @@
|
|||||||
<Style>None</Style>
|
<Style>None</Style>
|
||||||
<Width>5pt</Width>
|
<Width>5pt</Width>
|
||||||
</Border>
|
</Border>
|
||||||
<BottomBorder>
|
|
||||||
<Color>Black</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
<Width>1pt</Width>
|
|
||||||
</BottomBorder>
|
|
||||||
<RightBorder>
|
<RightBorder>
|
||||||
<Style>Solid</Style>
|
<Style>Solid</Style>
|
||||||
<Width>1pt</Width>
|
<Width>1pt</Width>
|
||||||
@@ -1446,8 +1364,7 @@
|
|||||||
<Style>None</Style>
|
<Style>None</Style>
|
||||||
</TopBorder>
|
</TopBorder>
|
||||||
<BottomBorder>
|
<BottomBorder>
|
||||||
<Color>Black</Color>
|
<Style>None</Style>
|
||||||
<Width>1pt</Width>
|
|
||||||
</BottomBorder>
|
</BottomBorder>
|
||||||
<LeftBorder>
|
<LeftBorder>
|
||||||
<Width>1pt</Width>
|
<Width>1pt</Width>
|
||||||
@@ -1512,6 +1429,10 @@
|
|||||||
<Color>White</Color>
|
<Color>White</Color>
|
||||||
<Style>Solid</Style>
|
<Style>Solid</Style>
|
||||||
</Border>
|
</Border>
|
||||||
|
<BottomBorder>
|
||||||
|
<Color>Black</Color>
|
||||||
|
<Width>1pt</Width>
|
||||||
|
</BottomBorder>
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
<PaddingRight>2pt</PaddingRight>
|
<PaddingRight>2pt</PaddingRight>
|
||||||
<PaddingTop>2pt</PaddingTop>
|
<PaddingTop>2pt</PaddingTop>
|
||||||
@@ -1662,6 +1583,11 @@
|
|||||||
<Border>
|
<Border>
|
||||||
<Style>None</Style>
|
<Style>None</Style>
|
||||||
</Border>
|
</Border>
|
||||||
|
<BottomBorder>
|
||||||
|
<Color>Black</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
<Width>1pt</Width>
|
||||||
|
</BottomBorder>
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
<PaddingRight>2pt</PaddingRight>
|
<PaddingRight>2pt</PaddingRight>
|
||||||
<PaddingTop>2pt</PaddingTop>
|
<PaddingTop>2pt</PaddingTop>
|
||||||
@@ -3500,7 +3426,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Pesto Neto Total (KG):</Value>
|
<Value>Total Mercancías:</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>Calibri</FontFamily>
|
<FontFamily>Calibri</FontFamily>
|
||||||
<FontSize>7pt</FontSize>
|
<FontSize>7pt</FontSize>
|
||||||
@@ -3508,9 +3434,11 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>=Parameters!PesoNetoTotal.Value</Value>
|
<Value>=Parameters!NumTotalMercancias.Value</Value>
|
||||||
<Style>
|
<Style>
|
||||||
|
<FontFamily>Calibri</FontFamily>
|
||||||
<FontSize>7pt</FontSize>
|
<FontSize>7pt</FontSize>
|
||||||
|
<Format>#,0.00;(#,0.00)</Format>
|
||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
@@ -3757,6 +3685,72 @@
|
|||||||
<PaddingBottom>2pt</PaddingBottom>
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
</Style>
|
</Style>
|
||||||
</Textbox>
|
</Textbox>
|
||||||
|
<Textbox Name="Textbox54">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Peso Neto Total :</Value>
|
||||||
|
<Style>
|
||||||
|
<FontFamily>calibri</FontFamily>
|
||||||
|
<FontSize>7pt</FontSize>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Parameters!PesoNetoTotal.Value</Value>
|
||||||
|
<Style>
|
||||||
|
<FontFamily>calibri</FontFamily>
|
||||||
|
<FontSize>7pt</FontSize>
|
||||||
|
<Format>#,0.00;(#,0.00)</Format>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
<TextRun>
|
||||||
|
<Value xml:space="preserve"> </Value>
|
||||||
|
<Style>
|
||||||
|
<FontFamily>calibri</FontFamily>
|
||||||
|
<FontSize>7pt</FontSize>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Unidad de peso :</Value>
|
||||||
|
<Style>
|
||||||
|
<FontFamily>calibri</FontFamily>
|
||||||
|
<FontSize>7pt</FontSize>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Parameters!UnidadPeso.Value</Value>
|
||||||
|
<Style>
|
||||||
|
<FontFamily>calibri</FontFamily>
|
||||||
|
<FontSize>7pt</FontSize>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style>
|
||||||
|
<TextAlign>Right</TextAlign>
|
||||||
|
</Style>
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox46</rd:DefaultName>
|
||||||
|
<Top>5.72244cm</Top>
|
||||||
|
<Left>13.28458cm</Left>
|
||||||
|
<Height>0.3768cm</Height>
|
||||||
|
<Width>7.09598cm</Width>
|
||||||
|
<ZIndex>18</ZIndex>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
</ReportItems>
|
</ReportItems>
|
||||||
<Height>7.00495in</Height>
|
<Height>7.00495in</Height>
|
||||||
<Style />
|
<Style />
|
||||||
@@ -4008,7 +4002,7 @@
|
|||||||
<PrintOnLastPage>true</PrintOnLastPage>
|
<PrintOnLastPage>true</PrintOnLastPage>
|
||||||
<ReportItems>
|
<ReportItems>
|
||||||
<Line Name="Line1">
|
<Line Name="Line1">
|
||||||
<Top>0.03523cm</Top>
|
<Top>0.03522cm</Top>
|
||||||
<Left>0.06623cm</Left>
|
<Left>0.06623cm</Left>
|
||||||
<Height>0cm</Height>
|
<Height>0cm</Height>
|
||||||
<Width>20.38566cm</Width>
|
<Width>20.38566cm</Width>
|
||||||
@@ -4038,7 +4032,7 @@
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox13</rd:DefaultName>
|
<rd:DefaultName>Textbox13</rd:DefaultName>
|
||||||
<Top>0.14106cm</Top>
|
<Top>0.14105cm</Top>
|
||||||
<Left>0.71425cm</Left>
|
<Left>0.71425cm</Left>
|
||||||
<Height>0.54708cm</Height>
|
<Height>0.54708cm</Height>
|
||||||
<Width>1.55632cm</Width>
|
<Width>1.55632cm</Width>
|
||||||
@@ -4072,7 +4066,7 @@
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox14</rd:DefaultName>
|
<rd:DefaultName>Textbox14</rd:DefaultName>
|
||||||
<Top>0.14106cm</Top>
|
<Top>0.14105cm</Top>
|
||||||
<Left>2.27057cm</Left>
|
<Left>2.27057cm</Left>
|
||||||
<Height>0.54708cm</Height>
|
<Height>0.54708cm</Height>
|
||||||
<Width>4.96223cm</Width>
|
<Width>4.96223cm</Width>
|
||||||
@@ -4107,7 +4101,7 @@
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox13</rd:DefaultName>
|
<rd:DefaultName>Textbox13</rd:DefaultName>
|
||||||
<Top>0.14106cm</Top>
|
<Top>0.14105cm</Top>
|
||||||
<Left>7.33864cm</Left>
|
<Left>7.33864cm</Left>
|
||||||
<Height>0.54708cm</Height>
|
<Height>0.54708cm</Height>
|
||||||
<Width>2.84562cm</Width>
|
<Width>2.84562cm</Width>
|
||||||
@@ -4142,7 +4136,7 @@
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox14</rd:DefaultName>
|
<rd:DefaultName>Textbox14</rd:DefaultName>
|
||||||
<Top>0.14106cm</Top>
|
<Top>0.14105cm</Top>
|
||||||
<Left>10.18425cm</Left>
|
<Left>10.18425cm</Left>
|
||||||
<Height>0.54708cm</Height>
|
<Height>0.54708cm</Height>
|
||||||
<Width>4.68641cm</Width>
|
<Width>4.68641cm</Width>
|
||||||
@@ -4176,7 +4170,7 @@
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox14</rd:DefaultName>
|
<rd:DefaultName>Textbox14</rd:DefaultName>
|
||||||
<Top>0.14459cm</Top>
|
<Top>0.14458cm</Top>
|
||||||
<Left>14.99343cm</Left>
|
<Left>14.99343cm</Left>
|
||||||
<Height>0.54708cm</Height>
|
<Height>0.54708cm</Height>
|
||||||
<Width>4.04906cm</Width>
|
<Width>4.04906cm</Width>
|
||||||
@@ -4208,7 +4202,7 @@
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox14</rd:DefaultName>
|
<rd:DefaultName>Textbox14</rd:DefaultName>
|
||||||
<Top>0.68814cm</Top>
|
<Top>0.68813cm</Top>
|
||||||
<Left>0.71425cm</Left>
|
<Left>0.71425cm</Left>
|
||||||
<Height>0.54708cm</Height>
|
<Height>0.54708cm</Height>
|
||||||
<Width>6.21751cm</Width>
|
<Width>6.21751cm</Width>
|
||||||
@@ -4679,6 +4673,18 @@
|
|||||||
<AllowBlank>true</AllowBlank>
|
<AllowBlank>true</AllowBlank>
|
||||||
<Prompt>ReportParameter1</Prompt>
|
<Prompt>ReportParameter1</Prompt>
|
||||||
</ReportParameter>
|
</ReportParameter>
|
||||||
|
<ReportParameter Name="UnidadPeso">
|
||||||
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
|
<AllowBlank>true</AllowBlank>
|
||||||
|
<Prompt>ReportParameter1</Prompt>
|
||||||
|
</ReportParameter>
|
||||||
|
<ReportParameter Name="NumTotalMercancias">
|
||||||
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
|
<AllowBlank>true</AllowBlank>
|
||||||
|
<Prompt>ReportParameter1</Prompt>
|
||||||
|
</ReportParameter>
|
||||||
</ReportParameters>
|
</ReportParameters>
|
||||||
<Language>es-MX</Language>
|
<Language>es-MX</Language>
|
||||||
<ConsumeContainerWhitespace>true</ConsumeContainerWhitespace>
|
<ConsumeContainerWhitespace>true</ConsumeContainerWhitespace>
|
||||||
|
|||||||
@@ -3263,6 +3263,12 @@
|
|||||||
<Parameter Name="DistanciaTotal">
|
<Parameter Name="DistanciaTotal">
|
||||||
<Value>=Parameters!SRP_DistanciaTotal.Value</Value>
|
<Value>=Parameters!SRP_DistanciaTotal.Value</Value>
|
||||||
</Parameter>
|
</Parameter>
|
||||||
|
<Parameter Name="UnidadPeso">
|
||||||
|
<Value>=Parameters!SRP_UnidadPeso.Value</Value>
|
||||||
|
</Parameter>
|
||||||
|
<Parameter Name="NumTotalMercancias">
|
||||||
|
<Value>=Parameters!SRP_NumTotalMercancias.Value</Value>
|
||||||
|
</Parameter>
|
||||||
</Parameters>
|
</Parameters>
|
||||||
<Top>0.06863cm</Top>
|
<Top>0.06863cm</Top>
|
||||||
<Height>1.11461cm</Height>
|
<Height>1.11461cm</Height>
|
||||||
@@ -4644,6 +4650,18 @@
|
|||||||
<Nullable>true</Nullable>
|
<Nullable>true</Nullable>
|
||||||
<Prompt>ReportParameter1</Prompt>
|
<Prompt>ReportParameter1</Prompt>
|
||||||
</ReportParameter>
|
</ReportParameter>
|
||||||
|
<ReportParameter Name="SRP_UnidadPeso">
|
||||||
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
|
<AllowBlank>true</AllowBlank>
|
||||||
|
<Prompt>ReportParameter1</Prompt>
|
||||||
|
</ReportParameter>
|
||||||
|
<ReportParameter Name="SRP_NumTotalMercancias">
|
||||||
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
|
<AllowBlank>true</AllowBlank>
|
||||||
|
<Prompt>ReportParameter1</Prompt>
|
||||||
|
</ReportParameter>
|
||||||
</ReportParameters>
|
</ReportParameters>
|
||||||
<EmbeddedImages>
|
<EmbeddedImages>
|
||||||
<EmbeddedImage Name="Logo">
|
<EmbeddedImage Name="Logo">
|
||||||
|
|||||||
@@ -706,6 +706,20 @@ Partial Class PV
|
|||||||
ViewState("CveAutorizacion") = value
|
ViewState("CveAutorizacion") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property ClienteCodigoRegimenFiscal As String
|
||||||
|
Get
|
||||||
|
|
||||||
|
If ViewState("ClienteCodigoRegimenFiscal") Is Nothing Then
|
||||||
|
ViewState("ClienteCodigoRegimenFiscal") = ""
|
||||||
|
End If
|
||||||
|
Return ViewState("ClienteCodigoRegimenFiscal").ToString
|
||||||
|
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("ClienteCodigoRegimenFiscal") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "PROPIEDADES DE PUNTO DE VENTA"
|
#Region "PROPIEDADES DE PUNTO DE VENTA"
|
||||||
@@ -2428,8 +2442,10 @@ Partial Class PV
|
|||||||
'End If
|
'End If
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaUsoCFDI()
|
Private Sub CargaUsoCFDI()
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(350) <> "1" Then
|
||||||
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica)
|
ClienteCodigoRegimenFiscal = "-1"
|
||||||
|
End If
|
||||||
|
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=ClienteCodigoRegimenFiscal)
|
||||||
DdlUsoCFDI.DataBind()
|
DdlUsoCFDI.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaNuevaFactura(OVenta As ClsVentas)
|
Private Sub CargaNuevaFactura(OVenta As ClsVentas)
|
||||||
@@ -2632,6 +2648,7 @@ Partial Class PV
|
|||||||
ViewState("IdCtaContRetISR") = ObjCliente.IdCtaContRetISR
|
ViewState("IdCtaContRetISR") = ObjCliente.IdCtaContRetISR
|
||||||
ViewState("CodCliente") = ObjCliente.Codigo
|
ViewState("CodCliente") = ObjCliente.Codigo
|
||||||
ViewState("ClienteDesglosaIEPS") = ObjCliente.DesglosaIEPS
|
ViewState("ClienteDesglosaIEPS") = ObjCliente.DesglosaIEPS
|
||||||
|
ClienteCodigoRegimenFiscal = ObjCliente.DtResultados.Rows(0)("CodigoRegimenFiscal").ToString()
|
||||||
|
|
||||||
If (Boolean.Parse(ObjCliente.DtResultados(0)("EsDistribuidor").ToString)) Then
|
If (Boolean.Parse(ObjCliente.DtResultados(0)("EsDistribuidor").ToString)) Then
|
||||||
TrEsDistribuidor.Visible = True
|
TrEsDistribuidor.Visible = True
|
||||||
@@ -2684,6 +2701,13 @@ Partial Class PV
|
|||||||
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33.ToString)
|
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33.ToString)
|
||||||
'DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString)
|
'DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString)
|
||||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString)
|
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString)
|
||||||
|
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
|
||||||
|
'S01 Sin efectos fiscales.
|
||||||
|
DdlUsoCFDI.SelectedValueExist("23")
|
||||||
|
DdlUsoCFDI.Enabled = False
|
||||||
|
ClienteCodigoRegimenFiscal = "616"
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
TxtFechaPago.Text = (Now.AddDays(ObjCliente.PlazoCobranza)).ToShortDateString
|
TxtFechaPago.Text = (Now.AddDays(ObjCliente.PlazoCobranza)).ToShortDateString
|
||||||
|
|
||||||
@@ -2862,6 +2886,13 @@ Partial Class PV
|
|||||||
DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString)
|
DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString)
|
||||||
DdlMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString)
|
DdlMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString)
|
||||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString)
|
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString)
|
||||||
|
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
|
||||||
|
'S01 Sin efectos fiscales.
|
||||||
|
DdlUsoCFDI.SelectedValueExist("23")
|
||||||
|
DdlUsoCFDI.Enabled = False
|
||||||
|
ClienteCodigoRegimenFiscal = "616"
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveVenta < 0 Then TxtAtencionA.Text = ObjCliente.DtResultados.Rows(0)("Contacto").ToString
|
If CveVenta < 0 Then TxtAtencionA.Text = ObjCliente.DtResultados.Rows(0)("Contacto").ToString
|
||||||
@@ -2891,6 +2922,13 @@ Partial Class PV
|
|||||||
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33)
|
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33)
|
||||||
DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33)
|
DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33)
|
||||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI)
|
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI)
|
||||||
|
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
|
||||||
|
'S01 Sin efectos fiscales.
|
||||||
|
DdlUsoCFDI.SelectedValueExist("23")
|
||||||
|
DdlUsoCFDI.Enabled = False
|
||||||
|
ClienteCodigoRegimenFiscal = "616"
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -4201,12 +4239,18 @@ Partial Class PV
|
|||||||
HdnDescuentoOriginal.Value = TxtDescuento.Text.ToDecimal().ToString()
|
HdnDescuentoOriginal.Value = TxtDescuento.Text.ToDecimal().ToString()
|
||||||
LblDescuentoIncluido.Text = TxtDescuento.Text.ToDecimal().FormatoNumero(2)
|
LblDescuentoIncluido.Text = TxtDescuento.Text.ToDecimal().FormatoNumero(2)
|
||||||
|
|
||||||
If PrecioSugerido > 0 AndAlso TxtDescuento.Text.ToDecimal() > 0 Then
|
If PrecioSugerido > 0 Then
|
||||||
TxtPrecio.Text = PrecioSugerido.FormatoNumero()
|
TxtPrecio.Text = PrecioSugerido.FormatoNumero()
|
||||||
LblPrecio1.Text = PrecioSugerido.FormatoNumero()
|
LblPrecio1.Text = PrecioSugerido.FormatoNumero()
|
||||||
'RegistraScript("$get('LblPrecio1').innerText = formato_numero(" + PrecioSugerido.ToString() + ", 2, '.', ',');", "A1")
|
'RegistraScript("$get('LblPrecio1').innerText = formato_numero(" + PrecioSugerido.ToString() + ", 2, '.', ',');", "A1")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If IsNumeric(TxtCantidad.Text.Trim) Then
|
||||||
|
LblTotalPS.Text = (TxtCantidad.Text.Trim.ToDouble * TxtPrecio.Text.ToDouble).ToString.FormatoNumero(2)
|
||||||
|
Else
|
||||||
|
LblTotalPS.Text = "0.00"
|
||||||
|
End If
|
||||||
|
|
||||||
If ChkAjuste.Checked Then
|
If ChkAjuste.Checked Then
|
||||||
CalculaMesesUso()
|
CalculaMesesUso()
|
||||||
UpAjuste.Update()
|
UpAjuste.Update()
|
||||||
@@ -4402,6 +4446,27 @@ Partial Class PV
|
|||||||
Descuento = 0
|
Descuento = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
'LTH AA Paq. 2 baterias, LTH AAA Paq. 02 baterias, LTH AA Paq. 4 baterias, LTH AAA Paq. 4 Baterias
|
||||||
|
If CvePS.Contiene(521445, 521448, 402917, 402918) Then
|
||||||
|
'SI TIENE BATERIAS AGREGADAS CON LA MARCA LTH, APLICAR PROMOCION, LA CLASIFICACION DEBE SER ACUMULADORES
|
||||||
|
If TmpDT.SUMD("Cantidad", "CveMarca IN (819,826,1085,1052) AND CveClasificacion IN (20520,20522,20513,20521,20512,20514,20229)") >= 1D Then
|
||||||
|
Descuento = 0
|
||||||
|
SeAjustoPU = True
|
||||||
|
'Paq. 2 baterias
|
||||||
|
If CvePS.Contiene(521445, 521448) Then
|
||||||
|
PUPromocion = 25D
|
||||||
|
End If
|
||||||
|
'Paq. 4 baterias
|
||||||
|
If CvePS.Contiene(402917, 402918) Then
|
||||||
|
PUPromocion = 40D
|
||||||
|
End If
|
||||||
|
PUModificado = Math.Round(PUPromocion / (1 + If(IncluyeImpuestos, PorcentajeIVA, 0)), 6)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
ObjDescuento.ImporteDescuento = Descuento
|
ObjDescuento.ImporteDescuento = Descuento
|
||||||
ObjDescuento.CvePromocionDetalle = CvePromocionDetalle
|
ObjDescuento.CvePromocionDetalle = CvePromocionDetalle
|
||||||
If SeAjustoPU Then
|
If SeAjustoPU Then
|
||||||
@@ -4639,6 +4704,7 @@ Partial Class PV
|
|||||||
TmpDT.Columns("EliminarDB").DefaultValue = False
|
TmpDT.Columns("EliminarDB").DefaultValue = False
|
||||||
|
|
||||||
TmpDT.Columns.Add("AplicaSerie", GetType(Boolean))
|
TmpDT.Columns.Add("AplicaSerie", GetType(Boolean))
|
||||||
|
TmpDT.Columns.Add("CveMarca", GetType(Integer))
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -5011,6 +5077,11 @@ Partial Class PV
|
|||||||
|
|
||||||
Row("EliminarDB") = EliminarDB
|
Row("EliminarDB") = EliminarDB
|
||||||
|
|
||||||
|
If TmpDT.Columns.Contains("CveMarca") Then
|
||||||
|
Row("CveMarca") = DrPS("CveMarca")
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 119 Then
|
If UsuarioActual.CveEmpresa = 119 Then
|
||||||
If Not RemisionesLista.Count > 0 Then 'SI VIENE DE REMISION NO SE CONSIDERA
|
If Not RemisionesLista.Count > 0 Then 'SI VIENE DE REMISION NO SE CONSIDERA
|
||||||
|
|
||||||
|
|||||||
@@ -2619,6 +2619,7 @@ Partial Class Ventas
|
|||||||
TmpDT.Columns.Add("CveVentaDetalleRNC", GetType(Integer))
|
TmpDT.Columns.Add("CveVentaDetalleRNC", GetType(Integer))
|
||||||
TmpDT.Columns.Add("TieneProntoPago", GetType(String))
|
TmpDT.Columns.Add("TieneProntoPago", GetType(String))
|
||||||
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
|
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("CveMarca", GetType(Integer))
|
||||||
GvPS.DataSource = ObjVentas.DtResultados
|
GvPS.DataSource = ObjVentas.DtResultados
|
||||||
GvPS.DataBind()
|
GvPS.DataBind()
|
||||||
|
|
||||||
@@ -2640,6 +2641,7 @@ Partial Class Ventas
|
|||||||
TmpDT.Columns.Add("CveVentaDetalleRNC", GetType(Integer))
|
TmpDT.Columns.Add("CveVentaDetalleRNC", GetType(Integer))
|
||||||
TmpDT.Columns.Add("TieneProntoPago", GetType(String))
|
TmpDT.Columns.Add("TieneProntoPago", GetType(String))
|
||||||
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
|
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("CveMarca", GetType(Integer))
|
||||||
GvPS.DataSource = ObjVentas.DtResultados
|
GvPS.DataSource = ObjVentas.DtResultados
|
||||||
GvPS.DataBind()
|
GvPS.DataBind()
|
||||||
|
|
||||||
@@ -7666,12 +7668,18 @@ Partial Class Ventas
|
|||||||
|
|
||||||
'EN BDH NO DEBE PODER EDITAR LOS PS
|
'EN BDH NO DEBE PODER EDITAR LOS PS
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
If ModalidadEdicion Then
|
||||||
|
e.Row.FCLinkButton("imgE").Visible = True
|
||||||
|
e.Row.FCLinkButton("imgD").Visible = False
|
||||||
|
Else
|
||||||
e.Row.FCLinkButton("imgE").Visible = False
|
e.Row.FCLinkButton("imgE").Visible = False
|
||||||
e.Row.FCLinkButton("imgD").Visible = False
|
e.Row.FCLinkButton("imgD").Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
'CANTIDAD FACTURADA
|
'CANTIDAD FACTURADA
|
||||||
Select Case e.Row.DBCampo("TipoDocto")
|
Select Case e.Row.DBCampo("TipoDocto")
|
||||||
Case "Cot"
|
Case "Cot"
|
||||||
@@ -7707,6 +7715,22 @@ Partial Class Ventas
|
|||||||
If Me.CveVenta > 0 AndAlso UsuarioActual.CveEmpresa = 119 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot") Then
|
If Me.CveVenta > 0 AndAlso UsuarioActual.CveEmpresa = 119 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot") Then
|
||||||
GvPS.Rows(e.NewEditIndex).FCTextBox("TxtDescuento").Enabled = False
|
GvPS.Rows(e.NewEditIndex).FCTextBox("TxtDescuento").Enabled = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If CveVenta > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
GvPS.Rows(e.NewEditIndex).FCTextBox("TxtCantidad").Enabled = False
|
||||||
|
|
||||||
|
GvPS.Rows(e.NewEditIndex).FCDropDownList("DdlUnidadMedida").Enabled = False
|
||||||
|
GvPS.Rows(e.NewEditIndex).FCDropDownLost("DdlPS").Enabled = False
|
||||||
|
GvPS.Rows(e.NewEditIndex).FCDropDownLost("DdlPS").ddlWS.Attributes.Add("disabled", "disabled")
|
||||||
|
GvPS.Rows(e.NewEditIndex).FCDropDownList("DdlUnidadMedida").Enabled = False
|
||||||
|
GvPS.Rows(e.NewEditIndex).FCDropDownList("DdlClasificacion").Enabled = False
|
||||||
|
GvPS.Rows(e.NewEditIndex).FCDropDownList("DdlProyecto").Enabled = False
|
||||||
|
GvPS.Rows(e.NewEditIndex).FCDropDownList("DdlSubProyecto").Enabled = False
|
||||||
|
|
||||||
|
GvPS.Rows(e.NewEditIndex).FCTextBox("TxtObsPS").Enabled = True
|
||||||
|
GvPS.Rows(e.NewEditIndex).FCTextBox("TxtPrecio").Enabled = False
|
||||||
|
GvPS.Rows(e.NewEditIndex).FCTextBox("TxtDescuento").Enabled = False
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub GvPS_RowCancelingEdit(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvPS.RowCancelingEdit
|
Protected Sub GvPS_RowCancelingEdit(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvPS.RowCancelingEdit
|
||||||
GvPS.EditIndex = -1
|
GvPS.EditIndex = -1
|
||||||
@@ -9493,8 +9517,15 @@ Partial Class Ventas
|
|||||||
If File.Exists(ArchivoXML) Then
|
If File.Exists(ArchivoXML) Then
|
||||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", ObjFactura.SerieFolio, ObjFactura.TipoDocto)))
|
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", ObjFactura.SerieFolio, ObjFactura.TipoDocto)))
|
||||||
End If
|
End If
|
||||||
GeneraPDFFactura(ChkEnviarFactura.Checked) 'MANDA CORREO
|
|
||||||
|
|
||||||
|
Try
|
||||||
|
'MANDA CORREO
|
||||||
|
Dim strURLHOST = String.Format("{0}://{1}:{2}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port)
|
||||||
|
Dim Hilo As New System.Threading.Thread(Sub() GeneraPDFFactura(ChkEnviarFactura.Checked, CveVenta, UsuarioActual, strURLHOST))
|
||||||
|
Hilo.Start()
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al enviar el PDF", ex)
|
||||||
|
End Try
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'DESCARGA PDF
|
'DESCARGA PDF
|
||||||
@@ -14980,54 +15011,33 @@ Partial Class Ventas
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "¡ P D F R E P O R T V I E W E R !"
|
#Region "¡ P D F R E P O R T V I E W E R !"
|
||||||
Private Sub GeneraPDFFactura(EnviaCorreo As Boolean)
|
Private Sub GeneraPDFFactura(EnviaCorreo As Boolean, CveVenta As Integer, UsuarioActual As Usuario, strURLHOST As String)
|
||||||
|
|
||||||
'CASO ESPECIAL
|
|
||||||
If UsuarioActual.CveEmpresa = 8 AndAlso ObjFactura.TipoDocto.Contiene("Cot") Then
|
|
||||||
Dim params As New List(Of ReportParameter)
|
|
||||||
params.Add(New ReportParameter("Sucursal", DdlSubProyectoDatos.SelectedItem.Text))
|
|
||||||
'params.Add(New ReportParameter("Fecha", FechaCotizacion.ToString()))
|
|
||||||
params.Add(New ReportParameter("Folio", ObjFactura.Folio.ToString()))
|
|
||||||
params.Add(New ReportParameter("Cliente", LtlCliente.Text))
|
|
||||||
params.Add(New ReportParameter("PersonaDirige", TxtAtencionA.Text))
|
|
||||||
params.Add(New ReportParameter("Total", TxtTotal.Text))
|
|
||||||
params.Add(New ReportParameter("Observaciones", TxtObsFact.Text))
|
|
||||||
params.Add(New ReportParameter("Vendedor", DdlVendedor.SelectedItem.Text))
|
|
||||||
params.Add(New ReportParameter("PersonaDirige", TxtAtencionA.Text.Trim))
|
|
||||||
'params.Add(New ReportParameter("Folio", ""))
|
|
||||||
ImprimirPDF(String.Format("{0}Formatos\Cotizacion.rdlc", UsuarioActual.Empresa.Ruta), TmpDT, params, "Cotización", RDSName:="DsCotizacion")
|
|
||||||
End If
|
|
||||||
|
|
||||||
'Dim pdf As Byte() = Nothing
|
|
||||||
|
|
||||||
'GUARDA PDF
|
'GUARDA PDF
|
||||||
Dim LocalSerieFolio As String = String.Empty
|
Dim LocalSerieFolio As String = String.Empty
|
||||||
Dim LocalTipoDocto As String = String.Empty
|
Dim LocalTipoDocto As String = String.Empty
|
||||||
|
|
||||||
|
Dim Factura As Modelos.Factura
|
||||||
'TIMBRADO NUEVO
|
'TIMBRADO NUEVO
|
||||||
Try
|
Try
|
||||||
Dim ObjetoPDF As Byte() = DescargarFactura(ObjFactura.CveVenta, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, Regenerar:=True)
|
Dim ObjetoPDF As Byte() = DescargarFactura(CveVenta, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, Regenerar:=True, strURLHOST:=strURLHOST)
|
||||||
|
|
||||||
If ObjetoPDF Is Nothing OrElse ObjetoPDF.Length = 0 Then
|
If ObjetoPDF Is Nothing OrElse ObjetoPDF.Length = 0 Then
|
||||||
PdfFactura(ObjFactura, AplicaPagare:=If(ObjFactura.TipoDocto.Contiene("Ing", "Rem", "Ant"), "1", "0"))
|
PdfFactura(ObjFactura, AplicaPagare:=If(ObjFactura.TipoDocto.Contiene("Ing", "Rem", "Ant"), "1", "0"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgError)
|
OnError("Ocurrió un error al generar el PDF", ex)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
If CveVenta > 0 Then
|
Dim ErrorCorreo As Boolean = False
|
||||||
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False)
|
|
||||||
End If
|
|
||||||
|
|
||||||
LocalSerieFolio = ObjFactura.SerieFolio
|
|
||||||
LocalTipoDocto = ObjFactura.TipoDocto
|
|
||||||
'End If
|
|
||||||
|
|
||||||
|
|
||||||
|
If EnviaCorreo Then
|
||||||
|
Factura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False)
|
||||||
|
If Factura IsNot Nothing Then
|
||||||
'MANDA CORREO
|
'MANDA CORREO
|
||||||
If EnviaCorreo Then
|
If EnviaCorreo Then
|
||||||
|
LocalSerieFolio = Factura.SerieFolio
|
||||||
|
LocalTipoDocto = Factura.TipoDocto
|
||||||
|
|
||||||
Dim ArchivoAdjunto As String = ""
|
Dim ArchivoAdjunto As String = ""
|
||||||
Dim ArchivoXML = String.Format("{0}XML\{1}\{2}.xml", UsuarioActual.Empresa.Ruta, LocalTipoDocto, LocalSerieFolio)
|
Dim ArchivoXML = String.Format("{0}XML\{1}\{2}.xml", UsuarioActual.Empresa.Ruta, LocalTipoDocto, LocalSerieFolio)
|
||||||
Dim ArchivoPDF = String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, LocalTipoDocto, LocalSerieFolio)
|
Dim ArchivoPDF = String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, LocalTipoDocto, LocalSerieFolio)
|
||||||
@@ -15036,19 +15046,31 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Try
|
Try
|
||||||
' BytesPdfCotizacion(CveVenta)
|
Dim FIXML As New FileInfo(ArchivoXML)
|
||||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(UsuarioActual, CveVenta, DdlTipoComprobante.SelectedValue.ToString(), LocalSerieFolio, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF, ArchivoAdjunto))
|
Dim FIPDF As New FileInfo(ArchivoPDF)
|
||||||
Hilo.Start()
|
If FIXML.Exists AndAlso FIPDF.Exists Then
|
||||||
|
MandaMails(UsuarioActual, CveVenta, Factura.TipoDocto, LocalSerieFolio, EnviaCorreo, ArchivoXML, ArchivoPDF, ArchivoAdjunto)
|
||||||
|
Else
|
||||||
|
ErrorCorreo = True
|
||||||
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió error al mandar Mail", ex)
|
ErrorCorreo = True
|
||||||
|
End Try
|
||||||
|
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
ErrorCorreo = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ErrorCorreo Then
|
||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
If ChkEnviarFactura.Checked Then
|
If EnviaCorreo Then
|
||||||
ObjVentas.UpdateVentaMail(3, CveVenta)
|
ObjVentas.UpdateVentaMail(3, CveVenta)
|
||||||
Else
|
Else
|
||||||
ObjVentas.UpdateVentaMail(0, CveVenta)
|
ObjVentas.UpdateVentaMail(0, CveVenta)
|
||||||
End If
|
End If
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
End Try
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -16351,7 +16373,14 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'IMPRESION
|
'IMPRESION
|
||||||
GeneraPDFFactura(ChkEnviarFactura.Checked)
|
Try
|
||||||
|
'MANDA CORREO
|
||||||
|
Dim strURLHOST = String.Format("{0}://{1}:{2}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port)
|
||||||
|
Dim Hilo As New System.Threading.Thread(Sub() GeneraPDFFactura(ChkEnviarFactura.Checked, CveVenta, UsuarioActual, strURLHOST))
|
||||||
|
Hilo.Start()
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al enviar el PDF", ex)
|
||||||
|
End Try
|
||||||
|
|
||||||
If ObjFactura.TipoDocto = "Ing" AndAlso ObjFactura.Timbre.CFDIRelacionados.TipoRelacion = "07" Then
|
If ObjFactura.TipoDocto = "Ing" AndAlso ObjFactura.Timbre.CFDIRelacionados.TipoRelacion = "07" Then
|
||||||
CreaObjetosVentaAmortizacion(Nothing, ObjTimbrado.UUID, ObjFactura.CveVentaRelacion, CveVenta)
|
CreaObjetosVentaAmortizacion(Nothing, ObjTimbrado.UUID, ObjFactura.CveVentaRelacion, CveVenta)
|
||||||
@@ -18059,6 +18088,27 @@ Partial Class Ventas
|
|||||||
Alert("No se calculó el descuento correctamente", TipoMensaje.MsgAdvertencia)
|
Alert("No se calculó el descuento correctamente", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
'LTH AA Paq. 2 baterias, LTH AAA Paq. 02 baterias, LTH AA Paq. 4 baterias, LTH AAA Paq. 4 Baterias
|
||||||
|
If CvePS.Contiene(521445, 521448, 402917, 402918) Then
|
||||||
|
'SI TIENE BATERIAS AGREGADAS CON LA MARCA LTH, APLICAR PROMOCION, LA CLASIFICACION DEBE SER ACUMULADORES
|
||||||
|
If TmpDT.SUMD("Cantidad", "CveMarca IN (819,826,1085,1052) AND CveClasificacion IN (20520,20522,20513,20521,20512,20514,20229)") >= 1D Then
|
||||||
|
Descuento = 0
|
||||||
|
SeAjustoPU = True
|
||||||
|
'Paq. 2 baterias
|
||||||
|
If CvePS.Contiene(521445, 521448) Then
|
||||||
|
PUPromocion = 25D
|
||||||
|
End If
|
||||||
|
'Paq. 4 baterias
|
||||||
|
If CvePS.Contiene(402917, 402918) Then
|
||||||
|
PUPromocion = 40D
|
||||||
|
End If
|
||||||
|
PUModificado = Math.Round(PUPromocion / (1 + If(IncluyeImpuestos, PorcentajeIVA, 0)), 6)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
ObjDescuento.ImporteDescuento = Descuento.RoundSQL(2)
|
ObjDescuento.ImporteDescuento = Descuento.RoundSQL(2)
|
||||||
ObjDescuento.CvePromocionDetalle = CvePromocionDetalle
|
ObjDescuento.CvePromocionDetalle = CvePromocionDetalle
|
||||||
If SeAjustoPU Then
|
If SeAjustoPU Then
|
||||||
@@ -18462,6 +18512,10 @@ Partial Class Ventas
|
|||||||
Row("EsOutSourcing") = DrPS("EsOutSourcing")
|
Row("EsOutSourcing") = DrPS("EsOutSourcing")
|
||||||
Row("EsCargo") = EsCargo
|
Row("EsCargo") = EsCargo
|
||||||
|
|
||||||
|
If TmpDT.Columns.Contains("CveMarca") Then
|
||||||
|
Row("CveMarca") = DrPS("CveMarca")
|
||||||
|
End If
|
||||||
|
|
||||||
If ImporteProntoPago > 0 Then
|
If ImporteProntoPago > 0 Then
|
||||||
Row("ImporteProntoPago") = ImporteProntoPago
|
Row("ImporteProntoPago") = ImporteProntoPago
|
||||||
Row("TieneProntoPago") = "Si"
|
Row("TieneProntoPago") = "Si"
|
||||||
@@ -18701,6 +18755,7 @@ Partial Class Ventas
|
|||||||
TmpDT.Columns.Add("TieneProntoPago", GetType(String))
|
TmpDT.Columns.Add("TieneProntoPago", GetType(String))
|
||||||
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
|
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
|
||||||
TmpDT.Columns.Add("CodigoObjetoImpuesto", GetType(String))
|
TmpDT.Columns.Add("CodigoObjetoImpuesto", GetType(String))
|
||||||
|
TmpDT.Columns.Add("CveMarca", GetType(Integer))
|
||||||
|
|
||||||
TmpDT.Columns("EsOutSourcing").DefaultValue = False
|
TmpDT.Columns("EsOutSourcing").DefaultValue = False
|
||||||
TmpDT.Columns("EsCargo").DefaultValue = False
|
TmpDT.Columns("EsCargo").DefaultValue = False
|
||||||
@@ -20595,13 +20650,12 @@ Partial Class Ventas
|
|||||||
Private Sub MandaMails(UsuarioActual As Usuario, CveVenta As Integer, TipoDocto As String, SerieFolio As String, EnviarFactura As Boolean, XML As String, PDF As String, Adjunto As String)
|
Private Sub MandaMails(UsuarioActual As Usuario, CveVenta As Integer, TipoDocto As String, SerieFolio As String, EnviarFactura As Boolean, XML As String, PDF As String, Adjunto As String)
|
||||||
|
|
||||||
Dim ObjMail As New ClsSisMail()
|
Dim ObjMail As New ClsSisMail()
|
||||||
Dim ObjVentas As New ClsVentas
|
Dim ResultadoMail As Integer = 0
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|
||||||
Dim Asunto As String = String.Empty
|
Dim Asunto As String = String.Empty
|
||||||
Dim Cuerpo As String = String.Empty
|
Dim Cuerpo As String = String.Empty
|
||||||
Dim ResultadoMail As Integer = 0
|
|
||||||
|
|
||||||
Dim TipoComprobante = ""
|
Dim TipoComprobante = ""
|
||||||
|
|
||||||
@@ -20631,7 +20685,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If Not EnviarFactura Then
|
If Not EnviarFactura Then
|
||||||
ObjVentas.UpdateVentaMail(0, CveVenta)
|
ResultadoMail = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
|
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
|
||||||
@@ -20654,7 +20708,7 @@ Partial Class Ventas
|
|||||||
Else
|
Else
|
||||||
ResultadoMail = 3
|
ResultadoMail = 3
|
||||||
End If
|
End If
|
||||||
ObjVentas.UpdateVentaMail(ResultadoMail, CveVenta)
|
|
||||||
|
|
||||||
'CASO ESPECIAL
|
'CASO ESPECIAL
|
||||||
If CveUsuarioActual = 1446 Then ' Flora
|
If CveUsuarioActual = 1446 Then ' Flora
|
||||||
@@ -20669,8 +20723,10 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió error al mandar el Mail", ex)
|
OnError("Ocurrió error al mandar el Mail", ex)
|
||||||
ObjVentas.UpdateVentaMail(3, CveVenta)
|
ResultadoMail = 3
|
||||||
Finally
|
Finally
|
||||||
|
Dim ObjVentas As New ClsVentas
|
||||||
|
ObjVentas.UpdateVentaMail(ResultadoMail, CveVenta)
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
@@ -21148,7 +21204,7 @@ Partial Class Ventas
|
|||||||
'EN BDH NO DEBE PERMITIR EDITAR EL PU
|
'EN BDH NO DEBE PERMITIR EDITAR EL PU
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
For Each Gvr As GridViewRow In GvPS.Rows
|
For Each Gvr As GridViewRow In GvPS.Rows
|
||||||
Gvr.FCLinkButton("imgE").Visible = False
|
Gvr.FCLinkButton("imgE").Visible = True
|
||||||
Gvr.FCLinkButton("imgD").Visible = False
|
Gvr.FCLinkButton("imgD").Visible = False
|
||||||
CantidadFacturadaRemision += Gvr.DataKey("CantidadFacturadaRem").ToString().ToDouble
|
CantidadFacturadaRemision += Gvr.DataKey("CantidadFacturadaRem").ToString().ToDouble
|
||||||
Next
|
Next
|
||||||
@@ -21396,9 +21452,23 @@ Partial Class Ventas
|
|||||||
|
|
||||||
'REGENERAR EL PDF
|
'REGENERAR EL PDF
|
||||||
If Not OcurrioError Then
|
If Not OcurrioError Then
|
||||||
DescargarFactura(CveVenta, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, Regenerar:=True)
|
Try
|
||||||
|
Dim strURLHOST = String.Format("{0}://{1}:{2}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port)
|
||||||
|
Dim Hilo As New System.Threading.Thread(Sub() RegenerarPDF(CveVenta, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, strURLHOST))
|
||||||
|
Hilo.Start()
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al regenerar el PDF", ex)
|
||||||
|
End Try
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RegenerarPDF(CveVenta As Integer, CveEmpresa As Integer, CveUsuario As Integer, strURLHOST As String)
|
||||||
|
Try
|
||||||
|
DescargarFactura(CveVenta, CveEmpresa, CveUsuario, Regenerar:=True, strURLHOST:=strURLHOST)
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió error al regenerar el PDF", ex)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
Private Sub BtnActualizarCuentaTerminal_Click(sender As Object, e As EventArgs) Handles BtnActualizarCuentaTerminal.Click
|
Private Sub BtnActualizarCuentaTerminal_Click(sender As Object, e As EventArgs) Handles BtnActualizarCuentaTerminal.Click
|
||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
ObjVentas.IniciaTransacSQL()
|
ObjVentas.IniciaTransacSQL()
|
||||||
@@ -32914,8 +32984,13 @@ Partial Class Ventas
|
|||||||
|
|
||||||
' Return File
|
' Return File
|
||||||
'End Function
|
'End Function
|
||||||
Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer, CveUsuarioCreo As Integer, Optional GetBytes As Boolean = True, Optional Regenerar As Boolean = False) As Byte()
|
Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer, CveUsuarioCreo As Integer, Optional GetBytes As Boolean = True, Optional Regenerar As Boolean = False, Optional strURLHOST As String = "") As Byte()
|
||||||
Dim Url = New Uri(String.Format("{0}://{1}:{2}/Compras/PopUpVerFactura.aspx?P={3}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1®ENERAR={1}", CveVenta, If(Regenerar, "1", "0")))))
|
|
||||||
|
If String.IsNullOrEmpty(strURLHOST) Then
|
||||||
|
strURLHOST = String.Format("{0}://{1}:{2}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim Url = New Uri(String.Format("{0}/Compras/PopUpVerFactura.aspx?P={1}", strURLHOST, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1®ENERAR={1}", CveVenta, If(Regenerar, "1", "0")))))
|
||||||
Dim File As Byte() = Nothing
|
Dim File As Byte() = Nothing
|
||||||
Try
|
Try
|
||||||
Using httpClient = New HttpClient()
|
Using httpClient = New HttpClient()
|
||||||
@@ -33681,6 +33756,7 @@ Partial Class Ventas
|
|||||||
TmpDT.Columns.Add("CodigoObjetoImpuesto", GetType(String))
|
TmpDT.Columns.Add("CodigoObjetoImpuesto", GetType(String))
|
||||||
TmpDT.Columns.Add("CveTamaño", GetType(Integer))
|
TmpDT.Columns.Add("CveTamaño", GetType(Integer))
|
||||||
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
|
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
|
||||||
|
TmpDT.Columns.Add("CveMarca", GetType(Integer))
|
||||||
|
|
||||||
Return TmpDT
|
Return TmpDT
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
@@ -1150,6 +1150,44 @@ Public Class WSGPSApp
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
<WebMethod>
|
||||||
|
Public Function GetGeoRutas(CveCliente As Integer, CveDispositivo As Integer) As String
|
||||||
|
Dim CveGeoReferencia As Integer = -1
|
||||||
|
Dim DtRutas As DataTable = Nothing
|
||||||
|
Using ObjGPS As New ClsGPS
|
||||||
|
If ObjGPS.GetReferenciaDetalle(-1, -1, CveDispositivo, CveCliente) Then
|
||||||
|
CveGeoReferencia = ObjGPS.DtResultados.FiltroPrimeroValor("CveGeoReferencia", "Tipo = 'Ruta'").ToEntero()
|
||||||
|
End If
|
||||||
|
If CveGeoReferencia > 0 Then
|
||||||
|
If ObjGPS.GeoReferenciaGet(CveGeoReferencia, -1, "Ruta", CveCliente) Then
|
||||||
|
DtRutas = ObjGPS.DtResultados.Copy()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
|
||||||
|
Dim Rutas As New List(Of Object)
|
||||||
|
If CveGeoReferencia > 0 Then
|
||||||
|
|
||||||
|
For Each Row As DataRow In DtRutas.Rows
|
||||||
|
Dim Coordenadas As List(Of MWSGeolocation2) = SQLToGmapsPolyline(Row("Coordenadas").ToString())
|
||||||
|
|
||||||
|
Rutas.Add(New With {
|
||||||
|
.CveRuta = CveGeoReferencia,
|
||||||
|
.Ruta = Row("GeoReferencia").ToString(),
|
||||||
|
.Folio = "",
|
||||||
|
.Fecha = Row("FechaInicio").ToString(),
|
||||||
|
.CveDispositivo = CveDispositivo,
|
||||||
|
.CveUsuarioIngreso = -1,
|
||||||
|
.Coordenadas = Coordenadas
|
||||||
|
})
|
||||||
|
Next
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return JsonConvert.SerializeObject(Rutas)
|
||||||
|
|
||||||
|
End Function
|
||||||
<WebMethod>
|
<WebMethod>
|
||||||
Public Function GetRutas(CveCliente As Integer, CveRuta As Integer, MostrarPuntos As Boolean) As String
|
Public Function GetRutas(CveCliente As Integer, CveRuta As Integer, MostrarPuntos As Boolean) As String
|
||||||
Dim DtRutas As DataTable = Nothing
|
Dim DtRutas As DataTable = Nothing
|
||||||
|
|||||||
Reference in New Issue
Block a user