-- mejoras
This commit is contained in:
@@ -100,16 +100,15 @@
|
||||
<asp:CheckBox runat="server" ID="chk" CssClass="ChkAllEvt" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Cliente" DataField="Nombre" ItemStyle-Width="200px" />
|
||||
<asp:BoundField HeaderText="Servicio" DataField="Servicio" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Mercancia" DataField="Mercancia" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Fecha Salida" DataField="FechaSalida" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="80px" />
|
||||
<asp:BoundField HeaderText="Fecha Llegada" DataField="FechaLlegada" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="80px" />
|
||||
<asp:BoundField HeaderText="Cliente" DataField="Nombre" />
|
||||
<asp:BoundField HeaderText="Servicio" DataField="Servicio" />
|
||||
<asp:BoundField HeaderText="Mercancia" DataField="Mercancia" />
|
||||
<asp:BoundField HeaderText="Fecha Salida" DataField="FechaSalida" DataFormatString="{0:dd/MM/yyyy HH:mm}" ItemStyle-Width="80px" />
|
||||
<asp:BoundField HeaderText="Fecha Llegada" DataField="FechaLlegada" DataFormatString="{0:dd/MM/yyyy HH:mm}" ItemStyle-Width="80px" />
|
||||
<asp:BoundField HeaderText="Cant." DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Origen" DataField="DireccionOrigen" ItemStyle-Width="200px" />
|
||||
<asp:BoundField HeaderText="Destino" DataField="DireccionDestino" ItemStyle-Width="200px" />
|
||||
<asp:HyperLinkField HeaderText="Serie Folio" DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" ItemStyle-Width="100px" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||
<asp:BoundField HeaderText="Folio Fiscal" DataField="FolioFiscal" ItemStyle-Width="265px" />
|
||||
<asp:BoundField HeaderText="Origen" DataField="DireccionOrigen" />
|
||||
<asp:BoundField HeaderText="Destino" DataField="DireccionDestino" />
|
||||
<asp:HyperLinkField HeaderText="Serie Folio" DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
|
||||
@@ -4,6 +4,7 @@ Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports ADSTimbrado
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
|
||||
@@ -22,7 +23,7 @@ Partial Class Ventas_FacturacionAcarreos
|
||||
CveCliente = DdlClientes.SelectedValue.ToEntero()
|
||||
End If
|
||||
Using ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetFacturacionAcarreos(-1, CveCliente, -1, DdlEstatus.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetFacturacionAcarreos(-1, CveCliente, -1, DdlEstatus.SelectedValue.ToEntero(), Now, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
End If
|
||||
End Using
|
||||
@@ -57,7 +58,7 @@ Partial Class Ventas_FacturacionAcarreos
|
||||
|
||||
Dim FileExcel As New ExcelFile()
|
||||
|
||||
Dim worksheet = FileExcel.Worksheets.Add(DtExcel.TableName)
|
||||
Dim worksheet As ExcelWorksheet = FileExcel.Worksheets.Add(DtExcel.TableName)
|
||||
worksheet.InsertDataTable(DtExcel, New InsertDataTableOptions() With
|
||||
{
|
||||
.ColumnHeaders = True,
|
||||
@@ -67,8 +68,8 @@ Partial Class Ventas_FacturacionAcarreos
|
||||
worksheet.Rows(0).Style.FillPattern.SetPattern(FillPatternStyle.Solid, SpreadsheetColor.FromArgb(75, 119, 190), SpreadsheetColor.FromArgb(255, 255, 255))
|
||||
worksheet.Rows(0).Style.Font.Color = SpreadsheetColor.FromArgb(255, 255, 255)
|
||||
|
||||
Dim columnCount = worksheet.CalculateMaxUsedColumns()
|
||||
For i = 0 To columnCount
|
||||
Dim columnCount As Integer = worksheet.CalculateMaxUsedColumns()
|
||||
For i As Integer = 0 To columnCount
|
||||
worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1))
|
||||
Next
|
||||
|
||||
@@ -88,7 +89,7 @@ Partial Class Ventas_FacturacionAcarreos
|
||||
Private Sub CargarArchivo(Ruta As String, FileName As String)
|
||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||
Dim dt As DataTable = Nothing
|
||||
Dim ErrorArchivo = False
|
||||
Dim ErrorArchivo As Boolean = False
|
||||
|
||||
Try
|
||||
dt = ReadExcelFile(Ruta + FileName, True)
|
||||
@@ -257,7 +258,7 @@ Partial Class Ventas_FacturacionAcarreos
|
||||
|
||||
Dim CvePSMercancia As Integer = GvRow.DataKey("CvePSRelacionado").ToEntero()
|
||||
|
||||
Dim ObjFactura = Modelos.Factura.CrearVentaNueva(UsuarioActual, CveSubProyecto, CveCliente, CveMoneda)
|
||||
Dim ObjFactura As Modelos.Factura = Modelos.Factura.CrearVentaNueva(UsuarioActual, CveSubProyecto, CveCliente, CveMoneda)
|
||||
ObjFactura.EmitirCartaPorte = True
|
||||
ObjFactura.CveFacturacionAcarreo = GvRow.DataKey("CveFacturacionAcarreo").ToEntero()
|
||||
|
||||
@@ -267,7 +268,7 @@ Partial Class Ventas_FacturacionAcarreos
|
||||
ObjFactura.CalculaTotales()
|
||||
ObjFactura.PreparaTimbre()
|
||||
|
||||
Dim resp = ObjFactura.EmitirFactura(Timbrar:=True, Modulo:="FacturacionAcarreos")
|
||||
Dim resp As Modelos.Factura.MMensajeFactura = ObjFactura.EmitirFactura(Timbrar:=True, Modulo:="FacturacionAcarreos")
|
||||
|
||||
For Each m As String In resp.Mensajes
|
||||
msg.AppendFormat("{0}<br/>", m)
|
||||
@@ -338,7 +339,7 @@ Partial Class Ventas_FacturacionAcarreos
|
||||
End Sub
|
||||
|
||||
Private Function CreaDTMercancias(CvePS As Integer, Cantidad As Decimal) As DataTable
|
||||
Dim DtMercancias = New DataTable()
|
||||
Dim DtMercancias As New DataTable()
|
||||
DtMercancias.Columns.Add(New DataColumn("Consec", GetType(Integer)))
|
||||
DtMercancias.Columns.Add(New DataColumn("Cantidad", GetType(Decimal)))
|
||||
DtMercancias.Columns.Add(New DataColumn("CvePS", GetType(Integer)))
|
||||
|
||||
Reference in New Issue
Block a user