This commit is contained in:
rrene
2020-06-18 21:32:12 -07:00
35 changed files with 1399 additions and 350 deletions

View File

@@ -121,7 +121,7 @@ Partial Class Ventas_AuxiliarCliente
' Next
'End If
worksheet.Rows.InsertEmpty(0, 6)
worksheet.Rows.InsertEmpty(0, 7)
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", Usuario.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, Usuario.CveEmpresa)
@@ -149,12 +149,20 @@ Partial Class Ventas_AuxiliarCliente
RangoTitulo.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
Dim FiltroCliente = worksheet.Cells.GetSubrangeAbsolute(5, celdasConTexto.FirstColumnIndex, 5, celdasConTexto.LastColumnIndex)
FiltroCliente.Merged = True
FiltroCliente.Value = String.Format("Cliente: {0} Fecha Inicio: {1} Fecha Fin: {2} Opción: {3}", DdlClientes.SelectedText, txtFechaI.Text, txtFechaF.Text, DdlOpcion.SelectedItem.Text)
FiltroCliente.Style.Font.Size = 12 * 20
FiltroCliente.Style.Font.Name = "Calibri Light"
FiltroCliente.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Left
FiltroCliente.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
For i = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
worksheet.Rows(6).Cells(i).Style.Font.Size = 12 * 20
worksheet.Rows(6).Cells(i).Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
worksheet.Rows(6).Cells(i).Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
worksheet.Rows(6).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
worksheet.Rows(6).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)
worksheet.Rows(7).Cells(i).Style.Font.Size = 12 * 20
worksheet.Rows(7).Cells(i).Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
worksheet.Rows(7).Cells(i).Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
worksheet.Rows(7).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
worksheet.Rows(7).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)
'If i > 0 Then
' Try
' worksheet.Columns(i).AutoFit(1)
@@ -164,13 +172,15 @@ Partial Class Ventas_AuxiliarCliente
Next
Dim IndexEndTable As Integer = Gv.Rows.Count + 8
Dim IndexEndTable As Integer = Gv.Rows.Count + 9
worksheet.Rows(IndexEndTable).Cells(2).Value = "Usuario Imprimió"
worksheet.Rows(IndexEndTable + 1).Cells(2).Value = Usuario.Nombre
worksheet.Rows(IndexEndTable).Cells(0).Value = "Usuario Imprimió:"
worksheet.Rows(IndexEndTable + 1).Cells(0).Value = Usuario.Nombre
worksheet.Rows(IndexEndTable).Cells(6).Value = "Fecha Impresión"
worksheet.Rows(IndexEndTable + 1).Cells(6).Value = DateTime.Now.ToString("dd/MM/yyyy")
worksheet.Rows(IndexEndTable).Cells(4).Value = "Fecha Impresión: "
worksheet.Rows(IndexEndTable + 1).Cells(4).Value = DateTime.Now.ToString()
worksheet.Rows(IndexEndTable).Cells(8).Value = "Impreso en SIG"
End If
End Using

View File

@@ -3837,7 +3837,7 @@ Partial Class PV
TmpDT.Columns.Add("NoIdentificacion", GetType(String))
TmpDT.Columns.Add("CveTipoPS", GetType(Integer))
TmpDT.Columns.Add("CveTipoInvPS", GetType(Integer))
TmpDT.Columns.Add("SerieLote", GetType(String))
TmpDT.Columns.Add("Serie", GetType(String))
TmpDT.Columns.Add("CuentaPredial", GetType(String))
TmpDT.Columns.Add("Obs", GetType(String))
TmpDT.Columns.Add("TiempoEntrega", GetType(String))

View File

@@ -3294,6 +3294,19 @@
<td>
<asp:TextBox ID="TxtCorreoNotificaciones" runat="server" Width="100%" CssClass="form-control"></asp:TextBox></td>
</tr>
<tr align="left" id="trOCRelacionadasLabel" runat="server" visible="false">
<td id="Td3" runat="server">Ordenes de Compra Relacionadas:&nbsp;</td>
</tr>
<tr align="left" id="trOCRelacionadas" runat="server" visible="false">
<td>
<asp:GridView runat="server" ID="GvOCRelacionadas" AutoGenerateColumns="False" DataKeyNames="CveOrdenCompra,Folio"
CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None" ShowHeader="False">
<Columns>
<asp:HyperLinkField DataTextField="Folio" DataNavigateUrlFields="CveOrdenCompra" DataNavigateUrlFormatString="/OC/OC.aspx?OC={0}" />
</Columns>
</asp:GridView>
</td>
</tr>
<tr align="left" id="trPaqueteriOpcionesLabel" runat="server" visible="false">
<td id="Td2" runat="server">Tipo de Entrega:&nbsp;</td>
</tr>

View File

@@ -2106,6 +2106,8 @@ Partial Class Ventas
DivDevAlm.Visible = True
End If
'CARGA GV DE OC RELACIONADAS
CargarOCRelacionadas()
End If
Else
If Request("CveOS") IsNot Nothing AndAlso IsNumeric(Request("CveOS")) AndAlso Request("CveOS").ToEntero() > 0 Then
@@ -2306,9 +2308,9 @@ Partial Class Ventas
ViewState("CveRemision") = IfNull(Request("CveRemision").ToEntero(), 0)
ViewState("CveCotizacion") = IfNull(Request("CveCotizacion").ToEntero(), 0)
If ViewState("CveCotizacion").ToString().ToEntero() > 0 Then
EsCreaApartirDe = True
End If
'If ViewState("CveCotizacion").ToString().ToEntero() > 0 Then
' EsCreaApartirDe = True
'End If
If ViewState("CveRemision").ToString().ToEntero() > 0 Or ViewState("CveCotizacion").ToString().ToEntero() > 0 Then
'ViewState("CveRemision") = Request("CveRemision")
@@ -2346,6 +2348,20 @@ Partial Class Ventas
'CargaDetalle de Almacen
InventarioMov()
If ViewState("CveCotizacion").ToString().ToEntero() > 0 Then
CargaCotizaciones()
If DtCotizaciones IsNot Nothing Then
For Each Row As DataRow In DtCotizaciones.Select($"CveVenta={ViewState("CveCotizacion").ToString().ToEntero()}")
Row("Aplicado") = True
Next
End If
CargarCotizacionesAFacturar()
End If
End If
If Not ExFolioFactura Then SetPermisos()
@@ -16239,6 +16255,11 @@ Partial Class Ventas
If Not OcurrioError Then
OcurrioError = Not GeneroMovimientoAlmacen
End If
If OcurrioError Then
Exit For
End If
End If
End If
@@ -16250,6 +16271,10 @@ Partial Class Ventas
Exit For
End If
End If
If OcurrioError Then
Exit For
End If
Next
@@ -23598,6 +23623,15 @@ Partial Class Ventas
'MARCA LAS SELECCIONADAS
VerificaCotizaciones(DtCotizaciones)
CargarCotizacionesAFacturar()
RegistraScript("$('#DivCotizaciones').modal('hide');")
End Sub
Private Sub CargarCotizacionesAFacturar()
Dim DTSeleccionadas = DtCotizaciones.FiltraParametros("Aplicado = True")
If DTSeleccionadas.Rows.Count = 0 Then
@@ -23684,9 +23718,6 @@ Partial Class Ventas
UpFacturar.Update()
UpPS.Update()
UpParametros.Update()
RegistraScript("$('#DivCotizaciones').modal('hide');")
End Sub
Private Sub VerificaCotizaciones(ByRef dt As DataTable)
If ChkCotProductos.Checked Then
@@ -25699,4 +25730,24 @@ Partial Class Ventas
MailCls.SendMail(ClsPaginas.EmpresaNotificaciones, CorreoVendedor, "Entrega en mostrador", "Pendiente", CorreosCC)
MailCls = Nothing
End Sub
Private Sub CargarOCRelacionadas()
Dim GridViewPSAux As GridView = GvPS
Dim CveVentasDetalle As New StringBuilder()
For Each vd As GridViewRow In GridViewPSAux.Rows
Dim CveVentaDetalle As String = vd.DataKey("CveVentaDetalle")
CveVentasDetalle.AppendFormat("{0},", CveVentaDetalle)
Next
Dim ObjVentas As New ClsVentas()
If ObjVentas.GetOCRelacionadas(CveVentasDetalle.ToString) Then
Dim OC As DataTable = ObjVentas.DtResultados
If OC.Rows.Count > 0 Then
trOCRelacionadasLabel.Visible = True
trOCRelacionadas.Visible = True
GvOCRelacionadas.DataSource = OC
GvOCRelacionadas.DataBind()
End If
End If
ObjVentas.Dispose()
End Sub
End Class