This commit is contained in:
2023-08-03 17:49:20 -07:00
14 changed files with 3319 additions and 86 deletions

View File

@@ -109,21 +109,30 @@ Partial Class Ventas_FacturacionAcarreos
Try
Dim DtPS As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
For Each row As DataRow In dt.Rows
Dim msg As String = ObjVentas.AddFacturacionAcarreos(row("Sucursal").ToString(), row("RFC").ToString(), row("Cantidad").ToString().ToDecimal(), row("ProductoGeneral").ToString(),
row("Origen").ToString(), row("Destino").ToString(), row("FechaSalida").ToString().ToDateTime(), row("FechaLlegada").ToString().ToDateTime(),
row("Unidad").ToString(), row("Chofer").ToString(), row("Configuración").ToString(), row("Remolque1").ToString(), row("Remolque2").ToString(),
row("Distancia").ToString().ToDecimal(), UsuarioActual.CveEmpresa)
Dim FechaSalida As DateTime = MinFecha
Dim FechaLlegada As DateTime = MinFecha
If row("FechaSalida").ToString().ToDateTime() > FechaSalida Then
FechaSalida = row("FechaSalida").ToString().ToDateTime()
End If
If row("FechaLlegada").ToString().ToDateTime() > FechaLlegada Then
FechaLlegada = row("FechaLlegada").ToString().ToDateTime()
End If
Dim msg As String = ObjVentas.AddFacturacionAcarreos(row("Sucursal").ToString(), row("RFC").ToString(), row("Cantidad").ToString().ToDecimal(), row("ProductoGeneral").ToString(), row("Origen").ToString(),
row("Destino").ToString(), FechaSalida, FechaLlegada, row("Unidad").ToString(), row("Chofer").ToString(), row("Configuración").ToString(),
row("Remolque1").ToString(), row("Remolque2").ToString(), row("Distancia").ToString().ToDecimal(), UsuarioActual.CveEmpresa)
If msg = "Correcto" Then
RowsCargados += 1
Else
TieneError = True
MsgFacturacionAcarreos.AppendFormat("{0}", msg)
MsgFacturacionAcarreos.AppendFormat("Ocurrió un error al procesar la fila: {0}<br/>{1}", row("NoExcel"), msg)
RowsNoCargados += 1
Exit For
End If
Next
Catch ex As Exception
OnError("Ocurrió un error al cargar los precios.", ex)
OnError("Ocurrió un error al cargar los datos.", ex)
Finally
Dim MensajeFinal As New StringBuilder()
If RowsNoCargados = 0 AndAlso RowsCargados > 0 Then
@@ -179,15 +188,21 @@ Partial Class Ventas_FacturacionAcarreos
End If
Next
dataTable.Columns.Add("NoExcel", GetType(String))
While curRow < worksheet.Rows.Count
columns = New String(cols - 1) {}
columns = New String(cols) {}
For curCol = 0 To cols - 1
If worksheet.Rows(curRow).Cells(curCol).Value Is Nothing Then
columns(curCol) = ""
Else
columns(curCol) = worksheet.Rows(curRow).Cells(curCol).Value.ToString()
For curCol = 0 To cols
If curCol = cols Then
columns(curCol) = worksheet.Rows(curRow).Name
Else
If worksheet.Rows(curRow).Cells(curCol).Value Is Nothing Then
columns(curCol) = ""
Else
columns(curCol) = worksheet.Rows(curRow).Cells(curCol).Value.ToString()
End If
End If
Next

View File

@@ -625,72 +625,74 @@
<table class="table table-striped nobordertop table-advance table-hover">
<tbody>
<tr>
<td style="text-align: left;"><asp:CheckBox ID="ChkTipoDocto" runat="server" Text="*Tipo Documento" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkSucursal" runat="server" Text="*Sucursal" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkSucursalCobranza" runat="server" Text="Sucursal Cobranza" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkTipoDocto" runat="server" Text="&nbsp;*Tipo Documento" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkSucursal" runat="server" Text="&nbsp;*Sucursal" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkSucursalCobranza" runat="server" Text="&nbsp;Sucursal Cobranza" /></td>
</tr>
<tr>
<td style="text-align: left;"><asp:CheckBox ID="ChkFolio" runat="server" Text="*Folio" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkEstatusFactura" runat="server" Text="*Estatus de Factura" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkSucursalEjecucion" runat="server" Text="Sucursal Ejecución" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkFolio" runat="server" Text="&nbsp;*Folio" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkEstatusFactura" runat="server" Text="&nbsp;*Estatus de Factura" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkSucursalEjecucion" runat="server" Text="&nbsp;Sucursal Ejecución" /></td>
</tr>
<tr>
<td style="text-align: left;"><asp:CheckBox ID="ChkFecha" runat="server" Text="*Fecha" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkVendedor" runat="server" Text="Vendedor" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkMotivoCancelacion" runat="server" Text="Motivo Cancelacion" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkFecha" runat="server" Text="&nbsp;*Fecha" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkVendedor" runat="server" Text="&nbsp;Vendedor" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkMotivoCancelacion" runat="server" Text="&nbsp;Motivo Cancelacion" /></td>
</tr>
<tr>
<td style="text-align: left;"><asp:CheckBox ID="ChkSubTotal" runat="server" Text="*SubTotal" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkCodigo" runat="server" Text="Código Cliente" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkUsuario" runat="server" Text="Usuario" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkSubTotal" runat="server" Text="&nbsp;*SubTotal" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkCodigo" runat="server" Text="&nbsp;Código Cliente" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkUsuario" runat="server" Text="&nbsp;Usuario" /></td>
</tr>
<tr>
<td style="text-align: left;"><asp:CheckBox ID="ChkDescuento" runat="server" Text="*Descuento" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkCliente" runat="server" Text="*Cliente" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkEstatusFacturacion" runat="server" Text="Estatus Facturación" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkDescuento" runat="server" Text="&nbsp;*Descuento" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkCliente" runat="server" Text="&nbsp;*Cliente" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkEstatusFacturacion" runat="server" Text="&nbsp;Estatus Facturación" /></td>
</tr>
<tr>
<td style="text-align: left;"><asp:CheckBox ID="ChkIVA" runat="server" Text="*IVA" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkMailCliente" runat="server" Text="Mail Cliente" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkFolioFacturacion" runat="server" Text="Factura Cotización" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkIVA" runat="server" Text="&nbsp;*IVA" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkMailCliente" runat="server" Text="&nbsp;Mail Cliente" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkFolioFacturacion" runat="server" Text="&nbsp;Factura Cotización" /></td>
</tr>
<tr>
<td style="text-align: left;"><asp:CheckBox ID="ChkIEPS" runat="server" Text="*IEPS" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkCuentaContable" runat="server" Text="Cuenta Contable" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkObservaciones" runat="server" Text="Observaciones" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkRetIVA" runat="server" Text="&nbsp;Ret. IVA" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkCuentaContable" runat="server" Text="&nbsp;Cuenta Contable" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkObservaciones" runat="server" Text="&nbsp;Observaciones" /></td>
</tr>
<tr>
<td style="text-align: left;"><asp:CheckBox ID="ChkRetIVA" runat="server" Text="Ret. IVA" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkSucursalCliente" runat="server" Text="Sucursal Cliente" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkOrdenCompra" runat="server" Text="OrdenCompra" /></td>
<tr>
<td style="text-align: left;"><asp:CheckBox ID="ChkRetISR" runat="server" Text="&nbsp;Ret. ISR" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkSucursalCliente" runat="server" Text="&nbsp;Sucursal Cliente" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkOrdenCompra" runat="server" Text="&nbsp;OrdenCompra" /></td>
</tr>
<tr>
<td style="text-align: left;"><asp:CheckBox ID="ChkRetISR" runat="server" Text="Ret. ISR" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkSaldo" runat="server" Text="Saldo" Checked="false" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkPedidoContrato" runat="server" Text="Pedido Contrato" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkTotalImpuestos" runat="server" Text="&nbsp;Impuestos Locales" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkSaldo" runat="server" Text="&nbsp;Saldo" Checked="false" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkPedidoContrato" runat="server" Text="&nbsp;Pedido Contrato" /></td>
</tr>
<tr>
<td style="text-align: left;"><asp:CheckBox ID="ChkTotalImpuestos" runat="server" Text="Impuestos Locales" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkFolioFiscal" runat="server" Text="Folio Fiscal (UUID)" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChlMotivoDescuento" runat="server" Text="Motivo Descuento" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkTotal" runat="server" Text="&nbsp;*Total" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkFolioFiscal" runat="server" Text="&nbsp;Folio Fiscal (UUID)" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChlMotivoDescuento" runat="server" Text="&nbsp;Motivo Descuento" /></td>
</tr>
<tr>
<td style="text-align: left;"><asp:CheckBox ID="ChkTotal" runat="server" Text="*Total" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkMoneda" runat="server" Text="&nbsp;*Moneda" Checked="true" /></td>
<td style="text-align: left;"></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkAmortizacion" runat="server" Text="Amortización" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkAmortizacion" runat="server" Text="&nbsp;Amortización" /></td>
</tr>
<tr>
<td style="text-align: left;"><asp:CheckBox ID="ChkMoneda" runat="server" Text="*Moneda" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkIEPS" runat="server" Text="&nbsp;*IEPS" /></td>
<td style="text-align: left;"></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkSeTimbro" runat="server" Text="Se Timbró" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkSeTimbro" runat="server" Text="&nbsp;Se Timbró" /></td>
</tr>
<tr>
<td style="text-align: left;"></td>
<td style="text-align: left;"></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkSeEnvioMail" runat="server" Text="Se envió Mail" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkSeEnvioMail" runat="server" Text="&nbsp; Se envió Mail" />&nbst</td>
</tr>
</tbody>

View File

@@ -423,66 +423,69 @@
<tbody>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkCantidad" runat="server" Text="*Cantidad" /></td>
<asp:CheckBox ID="ChkCantidad" runat="server" Text="&nbsp;*Cantidad" /></td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkMaxSub" runat="server" Text="SubTotal Máximo" />
<asp:CheckBox ID="ChkMaxSub" runat="server" Text="&nbsp;SubTotal Máximo" />
</td>
</tr>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkSubtotal" runat="server" Text="Sub total" /></td>
<asp:CheckBox ID="ChkSubtotal" runat="server" Text="&nbsp;Sub total" /></td>
</td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkAVGSub" runat="server" Text="SubTotal Promedio" />
<asp:CheckBox ID="ChkAVGSub" runat="server" Text="&nbsp;SubTotal Promedio" />
</td>
</tr>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkDescuentos" runat="server" Text="*Descuentos" /></td>
<asp:CheckBox ID="ChkDescuentos" runat="server" Text="&nbsp;*Descuentos" /></td>
</td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkMinSub" runat="server" Text="SubTotal Mínimo" />
<asp:CheckBox ID="ChkMinSub" runat="server" Text="&nbsp;SubTotal Mínimo" />
</td>
</tr>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkSubTotal2" runat="server" Text="*Subtotal 2" />
<asp:CheckBox ID="ChkSubTotal2" runat="server" Text="&nbsp;*Subtotal 2" />
</td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkMaxTot" runat="server" Text="Total Máximo" />
<asp:CheckBox ID="ChkMaxTot" runat="server" Text="&nbsp;Total Máximo" />
</td>
</tr>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkIVA" runat="server" Text="*IVA" />
<asp:CheckBox ID="ChkIVA" runat="server" Text="&nbsp;*IVA" />
</td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkAvgTot" runat="server" Text="Total Promedio" />
<asp:CheckBox ID="ChkAvgTot" runat="server" Text="&nbsp;Total Promedio" />
</td>
</tr>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkIEPS" runat="server" Text="*IEPS" />
<asp:CheckBox ID="ChkRetIVA" runat="server" Text="&nbsp;Ret. IVA" />
</td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkMinTot" runat="server" Text="Total Mínimo" />
<asp:CheckBox ID="ChkMinTot" runat="server" Text="&nbsp;Total Mínimo" />
</td>
</tr>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkRetIVA" runat="server" Text="Ret. IVA" />
<asp:CheckBox ID="ChkRetISR" runat="server" Text="&nbsp;Ret. ISR" />
</td>
<td style="text-align: left;">
<asp:CheckBox ID="CheckRefacturado" runat="server" Text="Refacturado" />
<asp:CheckBox ID="CheckRefacturado" runat="server" Text="&nbsp;Refacturado" />
</td>
</tr>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkRetISR" runat="server" Text="Ret. ISR" />
<asp:CheckBox ID="ChkImpLoc" runat="server" Text="&nbsp;Impuestos Locales" />
</td>
<td style="text-align: left;">
@@ -491,7 +494,8 @@
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkImpLoc" runat="server" Text="Impuestos Locales" />
<asp:CheckBox ID="ChkTotal" runat="server" Text="&nbsp;*Total" />
</td>
<td style="text-align: left;">
@@ -500,7 +504,9 @@
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkTotal" runat="server" Text="*Total" />
<asp:CheckBox ID="ChkIEPS" runat="server" Text="&nbsp;*IEPS" />
</td>
<td style="text-align: left;">