Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
99
Agropecuaria/CierreCultivo.aspx
Normal file
99
Agropecuaria/CierreCultivo.aspx
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
<%@ Page Title="Catálogo de Unidades" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CierreCultivo.aspx.vb" Inherits="Agrupecuaria_CierreCultivo" EnableEventValidation="false" %>
|
||||||
|
|
||||||
|
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#DivAgregarUnidad > div.modal-dialog > div label input {
|
||||||
|
padding: 0px !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
Cierre de Cultivo
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||||
|
<ContentTemplate>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
|
||||||
|
|
||||||
|
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||||
|
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px; position: relative;">
|
||||||
|
<div class="tools">
|
||||||
|
<asp:Button ID="btConsultar" CssClass="btn btn-primary" runat="server" ValidationGroup="GrpConsultar" Text="Consultar" OnClick="btConsultar_Click" /></td>
|
||||||
|
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||||
|
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||||
|
</div>
|
||||||
|
<div class="titlefiltros caption magindate">
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-1 truncate">Temporada:</div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlTemporada" CssClass="form-control input-sm select2me" runat="server" Width="100%"
|
||||||
|
DataTextField="Temporada" DataValueField="CveTemporada">
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body magindate" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>> 1
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
|
||||||
|
DataKeyNames="CveClasificacion"
|
||||||
|
EmptyDataText="No se Encontraron datos" CssClass="table table-striped table-advance table-hover mysmallbtn " data-sort="true" Style="width: 100%" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField HeaderText="Clasificación" DataField="Clasificacion" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:BoundField HeaderText="Importe" DataField="Importe" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:n2}" />
|
||||||
|
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
|
||||||
78
Agropecuaria/CierreCultivo.aspx.vb
Normal file
78
Agropecuaria/CierreCultivo.aspx.vb
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
Imports Extensiones
|
||||||
|
Partial Class Agrupecuaria_CierreCultivo
|
||||||
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
Private Property CveCamion As Integer
|
||||||
|
Get
|
||||||
|
|
||||||
|
If ViewState("CveCamion") Is Nothing Then
|
||||||
|
Return -1
|
||||||
|
Else
|
||||||
|
Return ViewState("CveCamion").ToString().ToEntero()
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As Integer)
|
||||||
|
ViewState("CveCamion") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Sub Agrupecuaria_CierreCultivo_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
|
If Not Page.IsPostBack Then
|
||||||
|
CargaCombos()
|
||||||
|
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub CargaCombos()
|
||||||
|
|
||||||
|
Dim ObjGral As New ClsGenerales
|
||||||
|
|
||||||
|
If ObjGral.GetTempordas(-1, UsuarioActual.CveEmpresa) Then
|
||||||
|
DdlTemporada.DataSource = ObjGral.DtResultados
|
||||||
|
End If
|
||||||
|
DdlTemporada.DataBind()
|
||||||
|
DdlTemporada.Items.Insert(0, New ListItem("Seleccione Una", "-1"))
|
||||||
|
|
||||||
|
UpFiltros.Update()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Public Sub CargaDatos()
|
||||||
|
|
||||||
|
If Not DdlTemporada.SelectedValue.ToEntero > 0 Then
|
||||||
|
Alert("Debe de seleccionar una temporada", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim ObjGral As New ClsGenerales
|
||||||
|
|
||||||
|
If ObjGral.GetCierreCultivos(DdlTemporada.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
|
GvDatos.DataSource = ObjGral.DtResultados
|
||||||
|
Else
|
||||||
|
GvDatos.DataSource = Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjGral.Dispose()
|
||||||
|
GvDatos.DataBind()
|
||||||
|
UpDatos.Update()
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub CierraCultivo()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub btConsultar_Click(sender As Object, e As EventArgs)
|
||||||
|
CargaDatos()
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
@@ -3602,6 +3602,48 @@ Public Class ClsGenerales
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Public Function GetTempordas(CveTemporada As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_AgroTemporadaGet")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@cveTemporada", SqlDbType.Int).Value = CveTemporada
|
||||||
|
.Add("@cveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError($"Ocurrió un error al obtener los datos de las temporadas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Public Function GetCierreCultivos(CveTemporada As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Agro_CierreCultivosGet")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveTemporada", SqlDbType.Int).Value = CveTemporada
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError($"Ocurrió un error al obtener los datos de cultivo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -4011,7 +4053,7 @@ Public Class ClsGenerales
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Public Function AddEntregaAlmacenRutaDetalle(CveEntregaAlmacen As Integer, CvePS As Integer, Cantidad As Decimal, CveUnidadMedida As Integer, CveUsuario As Integer) As Boolean
|
Public Function AddEntregaAlmacenRutaDetalle(CveEntregaAlmacen As Integer, CvePS As Integer, Cantidad As Decimal, CveUnidadMedida As Integer, CveUsuario As Integer, Optional PesoKg As Decimal = -1D) As Boolean
|
||||||
|
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
@@ -4025,6 +4067,7 @@ Public Class ClsGenerales
|
|||||||
.Add("@Cantidad", SqlDbType.Float).Value = Cantidad
|
.Add("@Cantidad", SqlDbType.Float).Value = Cantidad
|
||||||
.Add("@CveUnidadMedida", SqlDbType.Int).Value = CveUnidadMedida
|
.Add("@CveUnidadMedida", SqlDbType.Int).Value = CveUnidadMedida
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
|
.Add("@PesoKg", SqlDbType.SmallMoney).Value = CveUsuario
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
|
|||||||
@@ -5602,6 +5602,8 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/Planeacion/Presupuestos.aspx".ToUpper(), -1)
|
PaginaDict.Add("/Planeacion/Presupuestos.aspx".ToUpper(), -1)
|
||||||
PaginaDict.Add("/Contabilidad/OCDetalleAlmacen.aspx".ToUpper(), -1)
|
PaginaDict.Add("/Contabilidad/OCDetalleAlmacen.aspx".ToUpper(), -1)
|
||||||
|
|
||||||
|
PaginaDict.Add("/Agropecuaria/CierreCultivo.aspx".ToUpper(), 1326)
|
||||||
|
|
||||||
|
|
||||||
PaginaDict.Add("/testApi.aspx".ToUpper(), -1)
|
PaginaDict.Add("/testApi.aspx".ToUpper(), -1)
|
||||||
|
|
||||||
|
|||||||
@@ -10415,6 +10415,7 @@ Partial Class Compras_Compras
|
|||||||
(row1("NoDeducible").ToString <> row2("NoDeducible").ToString) Or
|
(row1("NoDeducible").ToString <> row2("NoDeducible").ToString) Or
|
||||||
(row1("CveActivoFijo").ToString.ToEntero <> row2("CveActivoFijo").ToString.ToEntero) Or
|
(row1("CveActivoFijo").ToString.ToEntero <> row2("CveActivoFijo").ToString.ToEntero) Or
|
||||||
(row1("AFMedida").ToString.ToEntero <> row2("AFMedida").ToString.ToEntero) Or
|
(row1("AFMedida").ToString.ToEntero <> row2("AFMedida").ToString.ToEntero) Or
|
||||||
|
(row1("TipoAF").ToString.ToEntero <> row2("TipoAF").ToString.ToEntero) Or
|
||||||
(row1("CvePS").ToString.ToEntero <> row2("CvePS").ToString.ToEntero) Then
|
(row1("CvePS").ToString.ToEntero <> row2("CvePS").ToString.ToEntero) Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
@@ -10546,7 +10547,7 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
'AF
|
'AF
|
||||||
DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) = 2")
|
DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) = 2")
|
||||||
If DT.Rows.Count > 0 AndAlso DdlTipoComprobante.SelectedValue <> "NC" And ConceptoContabilizacionAlmacen = 0 Then
|
If DT.Rows.Count > 0 AndAlso DdlTipoComprobante.SelectedValue <> "NC" Then
|
||||||
For Each Row2 As DataRow In DT.Rows
|
For Each Row2 As DataRow In DT.Rows
|
||||||
importeMovimiento = Row2("Total").ToString.ToDecimal
|
importeMovimiento = Row2("Total").ToString.ToDecimal
|
||||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||||
|
|||||||
@@ -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">
|
||||||
|
|||||||
@@ -456,6 +456,7 @@
|
|||||||
<th style="width: 88px" runat="server" id="ThSerie" visible="false">Serie</th>
|
<th style="width: 88px" runat="server" id="ThSerie" visible="false">Serie</th>
|
||||||
<th style="width: 88px" runat="server" id="ThLote" visible="false">Lote</th>
|
<th style="width: 88px" runat="server" id="ThLote" visible="false">Lote</th>
|
||||||
<th style="width: 88px" runat="server" id="ThFechaCaducidad" visible="false">Fecha Caducidad</th>
|
<th style="width: 88px" runat="server" id="ThFechaCaducidad" visible="false">Fecha Caducidad</th>
|
||||||
|
<th style="width: 88px" runat="server" id="THPesoKG" visible="true">Peso KG</th>
|
||||||
|
|
||||||
<th width="160px">Comandos</th>
|
<th width="160px">Comandos</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -511,14 +512,17 @@
|
|||||||
<asp:CheckBox ID="ChkSugiereFechaCaducidad" runat="server" Text="Auto Sugiere" ToolTip="Auto Sugiere Fecha de caducidad" AutoPostBack="true" OnCheckedChanged="ChkSugiereFechaCaducidad_CheckedChanged" />
|
<asp:CheckBox ID="ChkSugiereFechaCaducidad" runat="server" Text="Auto Sugiere" ToolTip="Auto Sugiere Fecha de caducidad" AutoPostBack="true" OnCheckedChanged="ChkSugiereFechaCaducidad_CheckedChanged" />
|
||||||
<asp:TextBox ID="TxtnFechaCaducidad" CssClass="form-control input-sm" runat="server" Width="80px" Visible="false"></asp:TextBox>
|
<asp:TextBox ID="TxtnFechaCaducidad" CssClass="form-control input-sm" runat="server" Width="80px" Visible="false"></asp:TextBox>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td runat="server" id="TDPesoKG">
|
||||||
|
<asp:TextBox ID="TxtPesoKg" runat="server" Width="60px" Class="form-control input-sm" Style="text-align: right;" onkeyup="FormatoMoneda(this)" AutoComplete="off" ></asp:TextBox>
|
||||||
|
</td>
|
||||||
|
<td align="center" style="width:160px!important">
|
||||||
<asp:LinkButton ID="LbAgregar" runat="server" CssClass="Texto" ValidationGroup="GrpAgregar" TabIndex="3" Text="Agregar" />
|
<asp:LinkButton ID="LbAgregar" runat="server" CssClass="Texto" ValidationGroup="GrpAgregar" TabIndex="3" Text="Agregar" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div style="max-height: 300px; overflow-y: auto;">
|
<div style="max-height: 300px; overflow-y: auto;">
|
||||||
<asp:GridView ID="GvDatos" DataKeyNames="No,PS,CvePS,CveUM,Serie,CveSeccionAlmacen,Cantidad" runat="server" ShowHeader="false" AutoGenerateColumns="False" EmptyDataText="" ToolTip="Listado de Movimientos" CssClass="Widthall table table-striped table-hover" GridLines="None">
|
<asp:GridView ID="GvDatos" DataKeyNames="No,PS,CvePS,CveUM,Serie,CveSeccionAlmacen,Cantidad,PesoKg" runat="server" ShowHeader="false" AutoGenerateColumns="False" EmptyDataText="" ToolTip="Listado de Movimientos" CssClass="Widthall table table-striped table-hover" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField HeaderText="#" DataField="No" ItemStyle-Width="23px" />
|
<asp:BoundField HeaderText="#" DataField="No" ItemStyle-Width="23px" />
|
||||||
<asp:TemplateField ItemStyle-Width="93px" ItemStyle-HorizontalAlign="Right">
|
<asp:TemplateField ItemStyle-Width="93px" ItemStyle-HorizontalAlign="Right">
|
||||||
@@ -535,12 +539,14 @@
|
|||||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="90px" />
|
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="90px" />
|
||||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="90px" />
|
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="90px" />
|
||||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" DataFormatString="{0:d}" ItemStyle-Width="90px" />
|
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" DataFormatString="{0:d}" ItemStyle-Width="90px" />
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal runat="server" Text='<%# Eval("SeccionAlmacen") %>' ID="ltlSec"></asp:Literal>
|
<asp:Literal runat="server" Text='<%# Eval("SeccionAlmacen") %>' ID="ltlSec"></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:BoundField HeaderText="Peso" DataField="PesoKg" ItemStyle-Width="90px" />
|
||||||
|
<asp:TemplateField ItemStyle-Width="160px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="lnkRemove" runat="server" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" CommandName="Delete" CommandArgument='<%# Eval("No")%>' data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar el concepto?" data-btn-ok-label="si"></asp:LinkButton>
|
<asp:LinkButton ID="lnkRemove" runat="server" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" CommandName="Delete" CommandArgument='<%# Eval("No")%>' data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar el concepto?" data-btn-ok-label="si"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
|
|||||||
@@ -372,7 +372,7 @@ Partial Class Inventarios_CartaPorteManual
|
|||||||
tCaducidad = If(TxtnFechaCaducidad.Visible, TxtnFechaCaducidad.Text.ToDate, MinFecha)
|
tCaducidad = If(TxtnFechaCaducidad.Visible, TxtnFechaCaducidad.Text.ToDate, MinFecha)
|
||||||
|
|
||||||
|
|
||||||
AgregarPS(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, "", CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(TxtnSerie.Visible, TxtnSerie.Text, ""), Lote:=If(tLote = "-1", "", tLote), FechaCaducidad:=tCaducidad, CveSeccionAlmacenDestino:=DdlSeccionAlmacenDestino.SelectedValue.ToEntero, Limpia:=FuncionalidadSinSerie)
|
AgregarPS(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, "", CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(TxtnSerie.Visible, TxtnSerie.Text, ""), Lote:=If(tLote = "-1", "", tLote), FechaCaducidad:=tCaducidad, CveSeccionAlmacenDestino:=DdlSeccionAlmacenDestino.SelectedValue.ToEntero, Limpia:=FuncionalidadSinSerie, PesoKg:=TxtPesoKg.Text.ToDecimal)
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -382,7 +382,7 @@ Partial Class Inventarios_CartaPorteManual
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Private Sub AgregarPS(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, Optional Observaciones As String = "", Optional CveSeccionAlmacen As Integer = -1, Optional SeccionAlmacen As String = "", Optional Serie As String = "", Optional Lote As String = "", Optional FechaCaducidad As Date = MinFecha, Optional Limpia As Boolean = True, Optional CveSeccionAlmacenDestino As Integer = -1)
|
Private Sub AgregarPS(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, Optional Observaciones As String = "", Optional CveSeccionAlmacen As Integer = -1, Optional SeccionAlmacen As String = "", Optional Serie As String = "", Optional Lote As String = "", Optional FechaCaducidad As Date = MinFecha, Optional Limpia As Boolean = True, Optional CveSeccionAlmacenDestino As Integer = -1, Optional PesoKg As Decimal = 0D)
|
||||||
If Cantidad <= 0 Then
|
If Cantidad <= 0 Then
|
||||||
Alert("La cantidad debe ser mayor a cero (0). Por favor verifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
Alert("La cantidad debe ser mayor a cero (0). Por favor verifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
@@ -426,7 +426,7 @@ Partial Class Inventarios_CartaPorteManual
|
|||||||
registro.Item("PorcentajeIVA") = 0
|
registro.Item("PorcentajeIVA") = 0
|
||||||
registro("ClaveMaterialPeligroso") = DrPS("ClaveMaterialPeligroso")
|
registro("ClaveMaterialPeligroso") = DrPS("ClaveMaterialPeligroso")
|
||||||
registro("ClaveEmbalaje") = DrPS("ClaveEmbalaje")
|
registro("ClaveEmbalaje") = DrPS("ClaveEmbalaje")
|
||||||
registro("PesoKg") = DrPS("PesoKg")
|
registro("PesoKg") = PesoKg
|
||||||
|
|
||||||
DtMovimientos.Rows.Add(registro)
|
DtMovimientos.Rows.Add(registro)
|
||||||
RegistraScript("playsonidito('beep-07.wav')")
|
RegistraScript("playsonidito('beep-07.wav')")
|
||||||
@@ -456,6 +456,8 @@ Partial Class Inventarios_CartaPorteManual
|
|||||||
TxtnFechaCaducidad.Text = ""
|
TxtnFechaCaducidad.Text = ""
|
||||||
|
|
||||||
txtCantidad.Focus()
|
txtCantidad.Focus()
|
||||||
|
TxtPesoKg.Text = ""
|
||||||
|
|
||||||
'If TxtCodigoPS.Visible Then
|
'If TxtCodigoPS.Visible Then
|
||||||
' TxtCodigoPS.Focus()
|
' TxtCodigoPS.Focus()
|
||||||
'End If
|
'End If
|
||||||
@@ -567,7 +569,7 @@ Partial Class Inventarios_CartaPorteManual
|
|||||||
If CveEntregaAlmacen > 0 Then
|
If CveEntregaAlmacen > 0 Then
|
||||||
|
|
||||||
For Each GvRowPS As GridViewRow In GvDatos.Rows
|
For Each GvRowPS As GridViewRow In GvDatos.Rows
|
||||||
If Not ObjGral.AddEntregaAlmacenRutaDetalle(CveEntregaAlmacen, GvRowPS.DataKey("CvePS").ToEntero, GvRowPS.DataKey("Cantidad").ToEntero, GvRowPS.DataKey("CveUM").ToEntero, UsuarioActual.CveUsuario) Then
|
If Not ObjGral.AddEntregaAlmacenRutaDetalle(CveEntregaAlmacen, GvRowPS.DataKey("CvePS").ToEntero, GvRowPS.DataKey("Cantidad").ToEntero, GvRowPS.DataKey("CveUM").ToEntero, UsuarioActual.CveUsuario, PesoKg:=GvRowPS.DataKey("PesoKg").ToDecimal) Then
|
||||||
ErrorProceso = True
|
ErrorProceso = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -630,31 +632,34 @@ Partial Class Inventarios_CartaPorteManual
|
|||||||
Dim drP As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltroPrimero("", "PS")
|
Dim drP As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltroPrimero("", "PS")
|
||||||
If drP IsNot Nothing Then
|
If drP IsNot Nothing Then
|
||||||
|
|
||||||
ThSeccionAlmacen.Visible = CBool(drP("AplicaSeccion"))
|
'ThSeccionAlmacen.Visible = CBool(drP("AplicaSeccion"))
|
||||||
TdSeccionAlmacen.Visible = CBool(drP("AplicaSeccion"))
|
'TdSeccionAlmacen.Visible = CBool(drP("AplicaSeccion"))
|
||||||
DdlSeccionAlmacen.Visible = CBool(drP("AplicaSeccion"))
|
'DdlSeccionAlmacen.Visible = CBool(drP("AplicaSeccion"))
|
||||||
'GvDatos.Columns(5).Visible = CBool(drP("AplicaSeccion"))
|
'GvDatos.Columns(5).Visible = CBool(drP("AplicaSeccion"))
|
||||||
|
|
||||||
|
|
||||||
ThSerie.Visible = CBool(drP("AplicaSerie"))
|
'ThSerie.Visible = CBool(drP("AplicaSerie"))
|
||||||
TdSerie.Visible = CBool(drP("AplicaSerie"))
|
'TdSerie.Visible = CBool(drP("AplicaSerie"))
|
||||||
TxtnSerie.Visible = CBool(drP("AplicaSerie"))
|
'TxtnSerie.Visible = CBool(drP("AplicaSerie"))
|
||||||
'GvDatos.Columns(6).Visible = CBool(drP("AplicaSerie"))
|
'GvDatos.Columns(6).Visible = CBool(drP("AplicaSerie"))
|
||||||
|
|
||||||
|
|
||||||
TxtnLote.Visible = CBool(drP("AplicaLote"))
|
'TxtnLote.Visible = CBool(drP("AplicaLote"))
|
||||||
ThLote.Visible = CBool(drP("AplicaLote"))
|
'ThLote.Visible = CBool(drP("AplicaLote"))
|
||||||
TdLote.Visible = CBool(drP("AplicaLote"))
|
'TdLote.Visible = CBool(drP("AplicaLote"))
|
||||||
'GvDatos.Columns(7).Visible = CBool(drP("AplicaLote"))
|
'GvDatos.Columns(7).Visible = CBool(drP("AplicaLote"))
|
||||||
|
|
||||||
|
|
||||||
TxtnFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
'TxtnFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
||||||
ThFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
'ThFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
||||||
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then ThFechaCaducidad.InnerText = UsuarioActual.Empresa.Funcionalidad(147)
|
'If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then ThFechaCaducidad.InnerText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||||
'ThFechaCaducidad.InnerText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
'ThFechaCaducidad.InnerText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||||
TdFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
'TdFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
||||||
'GvDatos.Columns(8).Visible = CBool(drP("AplicaCaducidad"))
|
'GvDatos.Columns(8).Visible = CBool(drP("AplicaCaducidad"))
|
||||||
|
|
||||||
|
|
||||||
|
TxtPesoKg.Text = drP("PesoKg").ToString.ToDecimal.ToString("###,###,###.00")
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -697,11 +702,11 @@ Partial Class Inventarios_CartaPorteManual
|
|||||||
|
|
||||||
Private Sub EscondeColumnasGVM(DtTemp As DataTable)
|
Private Sub EscondeColumnasGVM(DtTemp As DataTable)
|
||||||
|
|
||||||
GvDatos.Columns(5).Visible = DtTemp.MAX("Serie").ToString <> ""
|
'GvDatos.Columns(5).Visible = DtTemp.MAX("Serie").ToString <> ""
|
||||||
GvDatos.Columns(6).Visible = DtTemp.MAX("Lote").ToString <> ""
|
'GvDatos.Columns(6).Visible = DtTemp.MAX("Lote").ToString <> ""
|
||||||
GvDatos.Columns(7).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
'GvDatos.Columns(7).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||||
GvDatos.Columns(7).Visible = DtTemp.MAX("FechaCaducidad").ToString.ToDate > MinFecha
|
'GvDatos.Columns(7).Visible = DtTemp.MAX("FechaCaducidad").ToString.ToDate > MinFecha
|
||||||
GvDatos.Columns(8).Visible = DtTemp.MAX("CveSeccionAlmacen").ToString.ToEntero > 0
|
'GvDatos.Columns(8).Visible = DtTemp.MAX("CveSeccionAlmacen").ToString.ToEntero > 0
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -3383,7 +3383,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
Private Sub CargaCultivos()
|
Private Sub CargaCultivos()
|
||||||
DdlModalCultivosCuadro.Items.Clear()
|
DdlModalCultivosCuadro.Items.Clear()
|
||||||
DdlModalCultivosCuadro.DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {DdlSubProyecto.SelectedValue} AND Estatus = 1 ")
|
DdlModalCultivosCuadro.DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {DdlSubProyecto.SelectedValue} AND Estatus = 1 ", "TemporadaCuadro")
|
||||||
DdlModalCultivosCuadro.DataBind()
|
DdlModalCultivosCuadro.DataBind()
|
||||||
DdlModalCultivosCuadro.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
DdlModalCultivosCuadro.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -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