-- cambios de seccionesAlmace,Serie,Lote,Caducidad

This commit is contained in:
rrene
2020-05-13 12:52:33 -07:00
192 changed files with 26788 additions and 34102 deletions

View File

@@ -3,6 +3,7 @@
<%@ Register Assembly="TimePicker" Namespace="MKB.TimePicker" TagPrefix="cc1" %>
<%@ Register Assembly="eWorld.UI" Namespace="eWorld.UI" TagPrefix="ew" %>
<asp:Content ID="Content4" ContentPlaceHolderID="Css" runat="Server">
<link href="/Metronic/assets/global/plugins/dropzone/css/dropzone.css" rel="stylesheet" />
<style>
@@ -290,6 +291,17 @@
</Triggers>
</asp:UpdatePanel>
<asp:UpdatePanel runat="server" ID="UpReporteGpsExcel" RenderMode="Inline" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkReporteExcel" Visible="False" OnClick="GenerarReporteExcel" data-toggle="tooltip" data-placement="left" runat="server" Text="<i class='fa fa-file-excel-o'></i> Dispositivos GPS"></asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkReporteExcel" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
<asp:Literal ID="LtlTitulo" runat="server" Text="Registro de Clientes"></asp:Literal>&nbsp;<asp:Literal ID="LtlCliente" runat="server"></asp:Literal>
@@ -493,7 +505,7 @@
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtTelefonoOtro" CssClass="form-control" runat="server" MaxLength="150"></asp:TextBox>
<ajax:MaskedEditExtender ID="MaskedEditExtender3" runat="server" TargetControlID="TxtTelefonoOtro" ClearMaskOnLostFocus="false" MaskType="None" Mask="(999) 999-9999" MessageValidatorTip="true" InputDirection="LeftToRight" ErrorTooltipEnabled="True"></ajax:MaskedEditExtender>
<label for="<%= TxtTelefonoOtro.ClientID.ToString()%>">Telefono Otro: </label>
<label for="<%= TxtTelefonoOtro.ClientID.ToString()%>">Teléfono Otro: </label>
</div>
</div>
@@ -1347,7 +1359,7 @@
<div class="portlet-body ">
<div class="table-scrollable">
<asp:GridView ID="GvCot" GridLines="None" CssClass="table table-striped table-advance table-hover widthAll" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas en el Cliente" ToolTip="Listado de Historial de Ventas">
<asp:GridView ID="GvCot" GridLines="None" CssClass="table table-striped table-advance table-hover widthAll" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron cotizaciones del Cliente" ToolTip="Listado de Historial de Ventas" Style="text-align: center; min-width: 783px; width: 100%;">
<Columns>
<asp:TemplateField>
<HeaderTemplate>Cotización</HeaderTemplate>
@@ -1476,7 +1488,7 @@
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input">
<asp:Label ID="LblDiasPago" runat="server" Text="Dias de pago:"></asp:Label>
<asp:Label ID="LblDiasPago" runat="server" Text="Días de pago:"></asp:Label>
<br />
<label><b>L</b></label>&nbsp;&nbsp;
@@ -1510,7 +1522,7 @@
<div class="col-md-6" style="margin-top: 10px;">
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtDiasEspecifico" runat="server" CssClass="form-control" Enabled="false"></asp:TextBox>
<label for="<%= TxtDiasEspecifico.ClientID.ToString()%>">Dias específicos: </label>
<label for="<%= TxtDiasEspecifico.ClientID.ToString()%>">Días específicos: </label>
</div>
</div>
</div>
@@ -2050,7 +2062,7 @@
</div>
<div class="portlet-body">
<div class="table-scrollable">
<asp:GridView ID="GVAnticipos" runat="server" ClientIDMode="Static" AutoGenerateColumns="False" EmptyDataText="No se encontraron Anticipos del Cliente" ToolTip="Listado de Anticipos" CssClass="GVAnticipos table table-striped table-hover Widthall mysmallbtn" GridLines="None" DataKeyNames="ISTotal,Saldo,Total,CveIE,Folio,Tipo,CveVenta,CveConceptoContable">
<asp:GridView ID="GVAnticipos" runat="server" ClientIDMode="Static" AutoGenerateColumns="False" EmptyDataText="No se encontraron Anticipos del Cliente" ToolTip="Listado de Anticipos" CssClass="GVAnticipos table table-striped table-hover Widthall mysmallbtn" GridLines="None" DataKeyNames="ISTotal,Saldo,Total,CveIE,Folio,Tipo,CveVenta,CveConceptoContable" Style="text-align: center; min-width: 783px; width: 100%;">
<Columns>
<asp:TemplateField HeaderText="Folio" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
@@ -2106,7 +2118,7 @@
</div>
<div class="portlet-body">
<div class="table-scrollable">
<asp:GridView ID="GVAnticiposHistorial" ClientIDMode="Static" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Anticipos del Cliente Historial" ToolTip="Listado de Anticipos Historial" CssClass="GVAnticipos table table-striped table-hover Widthall" Style="text-align: center;" GridLines="None" DataKeyNames="ISTotal,Saldo,CveIE,Folio,Total,Tipo,CveVenta,CveConceptoContable">
<asp:GridView ID="GVAnticiposHistorial" ClientIDMode="Static" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró historial en los anticipos del cliente" ToolTip="Listado de Anticipos Historial" CssClass="GVAnticipos table table-striped table-hover Widthall" Style="text-align: center;" GridLines="None" DataKeyNames="ISTotal,Saldo,CveIE,Folio,Total,Tipo,CveVenta,CveConceptoContable">
<Columns>
<asp:TemplateField HeaderText="Folio" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
@@ -4437,13 +4449,22 @@
<span class="caption-subject bold">Agregar</span>
</div>--%>
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold" data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-green' style='font-weight: 700 !important;' ><span class='caption-subject bold'>Agregar</span></i>" Style="cursor: pointer;" ToolTip="Observaciones"></asp:HyperLink><br />
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold" runat="server" Text=" <i class='fa fa-calendar-plus-o font-green' style='font-weight: 700 !important;' >Agendar</i>" Visible="false" Style="cursor: pointer;" ToolTip="Agendar"></asp:HyperLink>
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold" runat="server" Text=" <i class='fa fa-calendar-plus-o font-green' style='font-weight: 700 !important;' >Agendar</i>" Visible="false" Style="cursor: pointer;" ToolTip="Agendar"></asp:HyperLink><br />
<asp:Literal ID="LtlTareaNueva" runat="server"></asp:Literal>
<UserControl:TareaNueva runat="server" id="TareaNueva" />
<script> function OnAddedTareaNueva() {
$('.btnupEventoBitacora').click();
}
</script>
</div>
</div>
</div>
<div class="portlet-body">
<asp:UpdatePanel ID="UPEventoBitacora" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Button ID="btnupEventoBitacora" OnClick="btnupEventoBitacora_Click" UseSubmitBehavior="false" CssClass="hidden btnupEventoBitacora" runat="server" Text="Button" />
<asp:GridView ID="GvEB" runat="server" AutoGenerateColumns="False" EmptyDataText="No se han capturado comentarios o bitácora" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
<Columns>
<asp:TemplateField>
@@ -4467,7 +4488,7 @@
<asp:TemplateField>
<HeaderTemplate>Descripción</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlEventoBitacora" runat="server" Text='<%# Eval("Descripcion") %>'></asp:Literal>
<asp:Literal ID="LtlEventoBitacora" runat="server" Text='<%#If(Eval("CveTipoEvento").ToString() = "1", String.Format("Tarea :<a href=""/OI/TareaDetalle.aspx?CveEvento={0}"">{1}<a>", Eval("CveEvento"), Eval("Asunto")), Eval("Descripcion").ToString()) %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>

File diff suppressed because it is too large Load Diff

View File

@@ -226,13 +226,13 @@ Partial Class PV
Private ReadOnly Property Ruta As String
Get
Return AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\"
Return ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\"
End Get
End Property
Private ReadOnly Property RutaPruebas As String
Get
Return AppDomain.CurrentDomain.BaseDirectory & "Empresas\1\"
Return ModExtensiones.DirectorioBaseEmpresas & "Empresas\1\"
End Get
End Property
@@ -1276,6 +1276,7 @@ Partial Class PV
TmpDT.Columns.Add("EntregaDirecta", GetType(Integer))
TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
TmpDT.Columns.Add("ConsecPSPadre", GetType(Integer))
GvPS.DataSource = TmpDT
GvPS.DataBind()
@@ -1656,8 +1657,8 @@ Partial Class PV
'SI EL DETALLE NO TIENE MOVIMIENTOS DE INVENTARIO ES VISIBLE
Dim CantidadFacturadaRemision = 0.0
For Each Gvr As GridViewRow In GvPS.Rows
Gvr.FCLinkButton("imgE").Visible = Not Gvr.DataKey("CantidadFacturadaRem").ToString.ToDouble > 0 AndAlso Gvr.DataKey("EsCargo") = "True"
Gvr.FCLinkButton("imgD").Visible = Not Gvr.DataKey("CantidadInventario").ToString.ToDouble > 0 AndAlso Gvr.DataKey("EsCargo") = "True"
Gvr.FCLinkButton("imgE").Visible = Not Gvr.DataKey("CantidadFacturadaRem").ToString.ToDouble > 0 AndAlso Gvr.DataKey("EsCargo") = "False"
Gvr.FCLinkButton("imgD").Visible = Not Gvr.DataKey("CantidadInventario").ToString.ToDouble > 0 AndAlso Gvr.DataKey("EsCargo") = "False"
CantidadFacturadaRemision += Gvr.DataKey("CantidadFacturadaRem").ToString.ToDouble
Next
@@ -1694,6 +1695,8 @@ Partial Class PV
Dim ObjConta As New ClsContabilidad(ObjVentas.IniciaTransacSQL())
Dim ObjBancos As New ClsBancos(ObjVentas.IniciaTransacSQL())
Dim ObjCGame As New ClsCGame(ObjVentas.IniciaTransacSQL())
Dim ObjAcum As New ClsAcumuladores(ObjVentas.IniciaTransacSQL())
Dim ObjAC As ClsContPAQi = Nothing
Dim Moneda As Integer = DdlMoneda.SelectedValue.ToEntero
@@ -1701,8 +1704,8 @@ Partial Class PV
Try
'CONVERTIR REMISION - TIPO MONEDA -DOLARES A PESOS
If DdlMoneda.SelectedValue.ToEntero <> 2 AndAlso ChkConvertirDolares.Checked Then
For Each Row As DataRow In TmpDT.Rows
Dim TmpDTTotales As DataTable = TmpDT.FiltraParametros("EliminarDB = False")
For Each Row As DataRow In TmpDTTotales.Rows
Row("PU") = Math.Round(Row("PU").ToString.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, 6)
Row("Total") = Math.Round(Row("Cantidad").ToString.ToDecimal * Row("PU").ToString.ToDecimal, NumeroDecimales)
Row("TotalImporte") = Math.Round(Row("Cantidad").ToString.ToDecimal * Row("PU").ToString.ToDecimal, NumeroDecimales)
@@ -1721,13 +1724,13 @@ Partial Class PV
End If
Next
TxtSubTotal.Text = TmpDT.SUM("Total").ToDecimal.FormatoNumero
LblDescuentos.Text = TmpDT.SUM("Descuento").ToDecimal.FormatoNumero
TxtSubTotal.Text = TmpDTTotales.SUM("Total").ToDecimal.FormatoNumero
LblDescuentos.Text = TmpDTTotales.SUM("Descuento").ToDecimal.FormatoNumero
LblAmortizacion.Text = Math.Round(LblAmortizacion.Text.Trim.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales).FormatoNumero
TxtIVA.Text = TmpDT.SUM("ImporteIVA").ToDecimal.FormatoNumero
TxtRetIVA.Text = TmpDT.SUM("ImporteRetIVA").ToDecimal.FormatoNumero
TxtRetISR.Text = TmpDT.SUM("ImporteRetISR").ToDecimal.FormatoNumero
TxtIEPS.Text = TmpDT.SUM("ImporteIEPS").ToDecimal.FormatoNumero
TxtIVA.Text = TmpDTTotales.SUM("ImporteIVA").ToDecimal.FormatoNumero
TxtRetIVA.Text = TmpDTTotales.SUM("ImporteRetIVA").ToDecimal.FormatoNumero
TxtRetISR.Text = TmpDTTotales.SUM("ImporteRetISR").ToDecimal.FormatoNumero
TxtIEPS.Text = TmpDTTotales.SUM("ImporteIEPS").ToDecimal.FormatoNumero
TxtTotal.Text = (TxtSubTotal.Text.ToDecimal - LblDescuentos.Text.ToDecimal - LblAmortizacion.Text.ToDecimal + TxtIVA.Text.ToDecimal + TxtIEPS.Text.ToDecimal - TxtRetIVA.Text.ToDecimal - TxtRetISR.Text.ToDecimal - ImpuestosLocales).ToDecimal.FormatoNumero
TipoCambio = TxtTipoCambioDlls.Text.Trim.ToDecimal
@@ -1736,9 +1739,10 @@ Partial Class PV
'CONVERTIR REMISION - TIPO MONEDA -PESO A DOLARES
If DdlMoneda.SelectedValue.ToEntero <> 1 AndAlso ChkConvertirDoctoPesos.Checked Then
Dim TmpDTTotales As DataTable = TmpDT.FiltraParametros("EliminarDB = False")
Dim Importe As Decimal
Dim TCC As Decimal = TxtTipoCambio.Text.Trim.ToDecimal
For Each Row As DataRow In TmpDT.Rows
For Each Row As DataRow In TmpDTTotales.Rows
Row("PU") = Math.Round(Row("PU").ToString.ToDecimal * TCC, 6)
Row("Total") = Math.Round(Row("Cantidad").ToString.ToDecimal * Row("PU").ToString.ToDecimal, NumeroDecimales)
Row("TotalImporte") = Math.Round(Row("Cantidad").ToString.ToDecimal * Row("PU").ToString.ToDecimal, NumeroDecimales)
@@ -1758,13 +1762,13 @@ Partial Class PV
End If
Next
TxtSubTotal.Text = TmpDT.SUM("Total").ToDecimal.FormatoNumero
LblDescuentos.Text = TmpDT.SUM("Descuento").ToDecimal.FormatoNumero
TxtSubTotal.Text = TmpDTTotales.SUM("Total").ToDecimal.FormatoNumero
LblDescuentos.Text = TmpDTTotales.SUM("Descuento").ToDecimal.FormatoNumero
LblAmortizacion.Text = Math.Round(LblAmortizacion.Text.Trim.ToDecimal * TxtTipoCambio.Text.Trim.ToDecimal, NumeroDecimales).FormatoNumero
TxtIVA.Text = TmpDT.SUM("ImporteIVA").ToDecimal.FormatoNumero
TxtRetIVA.Text = TmpDT.SUM("ImporteRetIVA").ToDecimal.FormatoNumero
TxtRetISR.Text = TmpDT.SUM("ImporteRetISR").ToDecimal.FormatoNumero
TxtIEPS.Text = TmpDT.SUM("ImporteIEPS").ToDecimal.FormatoNumero
TxtIVA.Text = TmpDTTotales.SUM("ImporteIVA").ToDecimal.FormatoNumero
TxtRetIVA.Text = TmpDTTotales.SUM("ImporteRetIVA").ToDecimal.FormatoNumero
TxtRetISR.Text = TmpDTTotales.SUM("ImporteRetISR").ToDecimal.FormatoNumero
TxtIEPS.Text = TmpDTTotales.SUM("ImporteIEPS").ToDecimal.FormatoNumero
TxtTotal.Text = (TxtSubTotal.Text.ToDecimal - LblDescuentos.Text.ToDecimal - LblAmortizacion.Text.ToDecimal + TxtIVA.Text.ToDecimal + TxtIEPS.Text.ToDecimal - TxtRetIVA.Text.ToDecimal - TxtRetISR.Text.ToDecimal - ImpuestosLocales).ToDecimal.FormatoNumero
@@ -1802,32 +1806,99 @@ Partial Class PV
Exit For
Else
TmpDT.Rows(index)("CveVentaDetalle") = ObjVentas.CveVentaDetalle
If TmpDTRecepcionUsados IsNot Nothing Then
If TmpDTRecepcionUsados.Select($"CvePS={Row("CvePS").ToString.ToEntero}").Length > 0 Then
Dim rowInv As DataRow = TmpDTRecepcionUsados.Select($"CvePS={Row("CvePS").ToString.ToEntero}")(0)
rowInv("CveVentaDetalle") = ObjVentas.CveVentaDetalle
End If
End If
If TmpDTAjustes IsNot Nothing AndAlso TmpDTAjustes.Rows.Count > 0 Then
If TmpDTAjustes.Select($"ConsecutivoVenta={Row("Consec").ToString.ToEntero}").Length > 0 Then
Dim DrAju As DataRow = TmpDTAjustes.Select($"ConsecutivoVenta={Row("Consec").ToString.ToEntero}")(0)
DrAju("CveVentaDetalle") = ObjVentas.CveVentaDetalle
End If
End If
If TmpDTPolizaVirtual IsNot Nothing Then
If TmpDTPolizaVirtual.Select($"CvePS={Row("CvePS").ToString.ToEntero}").Length > 0 Then
Dim RowPoliza As DataRow = TmpDTPolizaVirtual.Select($"CvePS={Row("CvePS").ToString.ToEntero}")(0)
RowPoliza("CveVentaDetalle") = ObjVentas.CveVentaDetalle
End If
End If
End If
End If
index = index + 1
Next
End If
ObjFactura.DtDetalle = TmpDT
'ELIMINA LOS DETALLES
If Not OcurrioError Then
Dim DtEliminados As New DataTable
If ObjVentas.GetVentaDetalle(CveVenta) Then
DtEliminados = ObjVentas.DtResultados.FiltraParametros("", "", {"CveVentaDetalle"})
For Each Dr1 As DataRow In DtEliminados.Rows
If TmpDT.FiltraParametros($"CveVentaDetalle = {Dr1("CveVentaDetalle")}").Rows.Count = 0 Then
If Not ObjVentas.RemoveVentasDetalle(CveVenta, Dr1("CveVentaDetalle").ToString.ToEntero) Then
OcurrioError = True
End If
End If
Next
Else
OcurrioError = True
End If
Dim DtEliminados As DataTable = TmpDT.FiltraParametros("EliminarDB = True AND CveVentaDetalle > 0", "", {"CveVentaDetalle"})
For Each Dr1 As DataRow In DtEliminados.Rows
If Not ObjVentas.RemoveVentasDetalle(CveVenta, Dr1("CveVentaDetalle").ToString.ToEntero) Then
OcurrioError = True
End If
Next
End If
'OcurrioError = ProcesoPrepolizas(ObjConta, ObjFactura, -1, TmpDT, ObjAC, 1, ObjBancos, ObjVentas)
'RECARGA LOS DATOS
If ObjVentas.GetVentaDetalle(CveVenta) Then
TmpDT = ObjVentas.DtResultados.Copy()
ObjFactura.DtDetalle = TmpDT
Else
OcurrioError = True
End If
'GUARDA USADOS
If Not ObjVentas.EliminarUsados(CveVenta) Then
OcurrioError = True
End If
If TmpDTRecepcionUsados IsNot Nothing Then
For Each drow As DataRow In TmpDTRecepcionUsados.Rows
If Not ObjVentas.AddVentaUsado(CveVenta, drow("CvePS").ToString.ToEntero, drow("Cantidad").ToString.ToDecimal, drow("PU").ToString.ToDecimal, drow("CveBCIUsado").ToString.ToEntero, drow("CveModeloAuto").ToString.ToEntero) Then
OcurrioError = True
Exit For
End If
Next
End If
'GUARDAR AJUSTES'
If Not ObjAcum.EliminarGarantiasDetalle(CveVenta) Then
OcurrioError = True
End If
If TmpDTAjustes IsNot Nothing AndAlso TmpDTAjustes.Rows.Count > 0 Then
For Each Dr As DataRow In TmpDTAjustes.Rows
If Not ObjAcum.AddGarantiasDetalle(Dr("CveVentaDetalle").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("CveFolioGarantia").ToString.ToEntero, Dr("CveTipoUso").ToString.ToEntero,
Dr("CodigoEnsamble").ToString, Dr("CodigoLinea").ToString, Dr("CodigoInspeccion").ToString, Dr("CveTipoDefecto").ToString.ToEntero,
Dr("NumPoliza").ToString, Dr("Importe").ToString.ToDouble, Dr("Consecutivo").ToString, Dr("FechaAjuste").ToString.ToDateTime()) Then
ErrorList.Add("Ocurrió un error al agregar la garantia detalle.")
End If
Next
End If
'GUARDAR POLIZA VIRTUAL
If Not ObjAcum.EliminarPolizaVirtual(CveVenta) Then
OcurrioError = True
End If
If TmpDTPolizaVirtual IsNot Nothing Then
For Each drow As DataRow In TmpDTPolizaVirtual.Rows
If ObjAcum.AddPolizaVirtual(CveVenta, drow("CveVentaDetalle").ToString().ToEntero(), drow("CvePS").ToString.ToEntero, drow("Cantidad").ToString.ToDecimal, drow("PU").ToString.ToDecimal, drow("Descuento").ToString.ToDecimal,
drow("Total").ToString.ToDecimal, drow("TipoServicio").ToString.ToEntero, drow("TipoPoliza").ToString.ToEntero, drow("CveModeloAuto").ToString.ToEntero, drow("AnioVehiculo").ToString.ToEntero, CBool(drow("TieneUsado").ToString),
drow("FechaUsado").ToString().ToDateTime, drow("CvePSUsado").ToString.ToEntero, drow("CveBCIUsado").ToString.ToEntero) Then
Else
OcurrioError = True
Exit For
End If
Next
End If
'Actualizo impuestos locales
If Not OcurrioError Then
@@ -1856,7 +1927,7 @@ Partial Class PV
Else
ObjVentas.Commit()
If ObjAC IsNot Nothing Then ObjAC.Commit()
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion, JSBtnAceptar:="BtnRefrescarPagina();")
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion, JSBtnAceptar:="document.location.href=""/Ventas/PV.aspx"";")
End If
ObjVentas.Dispose()
@@ -2695,7 +2766,7 @@ Partial Class PV
TmpDT.Rows.Remove(DbRow)
GvPS.DataSource = TmpDT
GvPS.DataSource = TmpDT.FiltraParametros("EliminarDB = False")
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
GvPS.DataBind()
CargaGVInv(DtInv)
@@ -2751,7 +2822,7 @@ Partial Class PV
TmpDT = resultados.CopyToDataTable
CalculaTotalesVenta()
GvPS.DataSource = TmpDT
GvPS.DataSource = TmpDT.FiltraParametros("EliminarDB = False")
GvPS.DataBind()
UpPS.Update()
@@ -2857,7 +2928,7 @@ Partial Class PV
GvInv.Columns(5).Visible = DtTemporal.MAX("Lote", "Lote <> ''") <> ""
GvInv.Columns(6).Visible = DtTemporal.MAX("FechaCaducidad", "FechaCaducidad <> ''") <> ""
GvInv.DataSource = DtTemporal
GvInv.DataSource = DtTemporal.FiltraParametros("EliminarDB = False")
GvInv.DataBind()
UpINV.Update()
@@ -3806,6 +3877,9 @@ Partial Class PV
TmpDT.Columns.Add("PUOriginal", GetType(Decimal))
TmpDT.Columns.Add("ConsecPSPadre", GetType(Integer))
TmpDT.Columns.Add("EliminarDB", GetType(Boolean))
TmpDT.Columns("EliminarDB").DefaultValue = False
End Sub
Private Sub CreaDTmpC()
@@ -3878,7 +3952,7 @@ Partial Class PV
Row("TiempoEntrega") = TiempoEntrega
TmpDT.Rows.Add(Row)
GvPS.DataSource = TmpDT
GvPS.DataSource = TmpDT.FiltraParametros("EliminarDB = False")
GvPS.DataBind()
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
@@ -3999,7 +4073,7 @@ Partial Class PV
Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0,
Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0,
Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional EsCargo As Boolean = False,
Optional ConsecPSPadre As Integer = -1) As Integer
Optional ConsecPSPadre As Integer = -1, Optional EliminarDB As Boolean = False) As Integer
Dim Retorno As Integer = -1
If Not CvePS > 0 Then
@@ -4170,6 +4244,8 @@ Partial Class PV
Row("ConsecPSPadre") = ConsecPSPadre
End If
Row("EliminarDB") = EliminarDB
If UsuarioActual.CveEmpresa = 119 Then
If Not RemisionesLista.Count > 0 Then 'SI VIENE DE REMISION NO SE CONSIDERA
@@ -4477,8 +4553,8 @@ Partial Class PV
Else
If Me.CveVentaDetalle > 0 Then
For Each Gvr As GridViewRow In GvPS.Rows
Gvr.FCLinkButton("imgE").Visible = Not Gvr.DataKey("CantidadFacturadaRem").ToString.ToDouble > 0 AndAlso Gvr.DataKey("EsCargo") = "True"
Gvr.FCLinkButton("imgD").Visible = Not Gvr.DataKey("CantidadInventario").ToString.ToDouble > 0 AndAlso Gvr.DataKey("EsCargo") = "True"
Gvr.FCLinkButton("imgE").Visible = Not Gvr.DataKey("CantidadFacturadaRem").ToString.ToDouble > 0 AndAlso Gvr.DataKey("EsCargo") = "False"
Gvr.FCLinkButton("imgD").Visible = Not Gvr.DataKey("CantidadInventario").ToString.ToDouble > 0 AndAlso Gvr.DataKey("EsCargo") = "False"
Next
End If
UpVenta.Update()
@@ -4530,7 +4606,12 @@ Partial Class PV
If ListaPSCargo.Count > 0 Then
CalculaRecepcionUsados(GvRecepcionUsados, CvePS, ListaPSCargo)
End If
ElseIf CveVentaDetalle > 0 AndAlso Not EsCargo Then
EliminarUsados()
Dim ListaPSCargo = CalculaUsados(Consec, LimpiarUsados:=False)
If ListaPSCargo.Count > 0 Then
CalculaRecepcionUsados(GvRecepcionUsados, CvePS, ListaPSCargo)
End If
End If
Return True
@@ -4662,6 +4743,7 @@ Partial Class PV
#Region "CALCULA TOTALES"
Private Sub CalculaTotalesVenta(Optional RecalculaImpuestosLocales As Boolean = True)
Dim TmpDT = Me.TmpDT.FiltraParametros("EliminarDB = False", Orderby:="Consec")
Dim TotalSubTotal As Decimal = TmpDT.SUM("TotalImporte").ToDecimal
Dim TotalDescuentos As Decimal = TmpDT.SUM("Descuento").ToDecimal
@@ -4715,9 +4797,7 @@ Partial Class PV
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
'CVImporteContado.ValueToCompare = Total.ToString
Dim view As DataView = New DataView(TmpDT)
view.Sort = "Consec"
GvPS.DataSource = view
GvPS.DataSource = TmpDT
GvPS.DataBind()
'RECARGA GV INVENTARIO
@@ -6325,7 +6405,7 @@ Partial Class PV
Dim Total As Decimal = ((Cantidad * PU) - Descuento).RoundSQL(2)
Dim TipoServicio As Integer = DdlTipoServicio.SelectedValue.ToEntero()
Dim FechaUsado As DateTime = TxtFechaAjuste.Text.ToDateTime()
Dim FechaUsado As DateTime = If(TxtFechaAjuste.Text.ToDateTime() < MinFecha, Now, TxtFechaAjuste.Text.ToDateTime())
Dim CveModeloAuto As Integer = DdlModeloAuto.SelectedValue.ToEntero()
Dim AnioVehiculo As Integer = TxtAnioVehiculo.Text.ToEntero()
Dim TipoPoliza As Integer = 1 'VENTA
@@ -6376,6 +6456,7 @@ Partial Class PV
Return Retorno
End Function
#End Region
#Region "U S A D O S"
Private Sub CreaDTmpDTRecepcionUsados()
@@ -6388,6 +6469,8 @@ Partial Class PV
TmpDTRecepcionUsados.Columns.Add("PU", GetType(Double))
TmpDTRecepcionUsados.Columns.Add("CveBCIUsado", GetType(Integer))
TmpDTRecepcionUsados.Columns.Add("CveModeloAuto", GetType(Integer))
TmpDTRecepcionUsados.Columns.Add("EliminarDB", GetType(Boolean))
TmpDTRecepcionUsados.Columns("EliminarDB").DefaultValue = False
End Sub
@@ -6453,7 +6536,7 @@ Partial Class PV
' Exit Sub
'End If
For Each Dr As DataRow In TmpDT.FiltraParametros($"EsCargo = True AND CvePS IN ({StrCargos})").Rows
For Each Dr As DataRow In TmpDT.FiltraParametros($"EsCargo = True AND EliminarDB = False AND CvePS IN ({StrCargos})").Rows
Dim TotalAnterior As Decimal = Dr("Cantidad").ToString.ToDecimal * Dr("PU").ToString.ToDecimal
Dim PUActual As Decimal = (TotalAnterior - TotalCargos) / Dr("Cantidad").ToString.ToDecimal
@@ -6485,7 +6568,7 @@ Partial Class PV
Next
TmpDT.AcceptChanges()
If TotalCargos > 0 Then ' cuando se entrega más valor de usados, que los cargos hechos, se descuenta sobre el PU del producto de venta
For Each Dr As DataRow In TmpDT.FiltraParametros($"EsCargo = False AND CvePS={CvePS}").Rows
For Each Dr As DataRow In TmpDT.FiltraParametros($"EsCargo = False AND EliminarDB = False AND CvePS={CvePS}").Rows
Dim PUAnterior As Decimal = Dr("Cantidad").ToString.ToDecimal * Dr("PU").ToString.ToDecimal
Dim PUActual As Decimal = PUAnterior - (TotalCargos / Dr("Cantidad").ToString.ToDecimal)
@@ -6522,8 +6605,8 @@ Partial Class PV
CalculaTotalesVenta()
End Sub
Private Function CalculaUsados(Consec As Integer) As List(Of Integer)
If Modalidad = "U" Then
Private Function CalculaUsados(Consec As Integer, Optional LimpiarUsados As Boolean = True) As List(Of Integer)
If Modalidad = "U" AndAlso LimpiarUsados Then
EliminarUsados(Consec)
End If
@@ -6556,6 +6639,8 @@ Partial Class PV
DTPSTemp.Columns.Add("CveSubProyecto", GetType(Integer))
DTPSTemp.Columns.Add("SubProyecto", GetType(String))
DTPSTemp.Columns.Add("ConsecPSPadre", GetType(Integer))
DTPSTemp.Columns.Add("EliminarDB", GetType(Boolean))
DTPSTemp.Columns("EliminarDB").DefaultValue = False
Dim ObjProductosServicios As New ClsProductosServicios()
For Each DrowPartidas As DataRow In TmpDT.Select($"Consec = {Consec}")
@@ -6628,7 +6713,7 @@ Partial Class PV
Dim Concec = AgregarProductoServicio(drowPsTamaños("Cantidad").ToString.ToEntero, drowPsTamaños("CveUnidadMedida").ToString.ToEntero, drowPsTamaños("UnidadMedida").ToString,
drowPsTamaños("CveClasificacion").ToString.ToEntero, drowPsTamaños("Clasificacion").ToString, drowPsTamaños("CvePS").ToString.ToEntero,
drowPsTamaños("PS").ToString, "", drowPsTamaños("PU").ToString.ToDecimal, 0, -1, "", drowPsTamaños("CveSubProyecto").ToString.ToEntero,
drowPsTamaños("SubProyecto").ToString, EsCargo:=True, ConsecPSPadre:=drowPsTamaños("ConsecPSPadre").ToString.ToEntero)
drowPsTamaños("SubProyecto").ToString, EsCargo:=True, ConsecPSPadre:=drowPsTamaños("ConsecPSPadre").ToString.ToEntero, EliminarDB:=CBool(drowPsTamaños("EliminarDB").ToString()))
If Consec > 0 Then
ListaPScargo.Add(drowPsTamaños("CvePS").ToString.ToEntero)
End If
@@ -6655,6 +6740,25 @@ Partial Class PV
Next
Next
TmpDT.AcceptChanges()
TmpDTRecepcionUsados.AcceptChanges()
End Sub
Private Sub EliminarUsados()
'ELIMINAR EL USADO EXTRAS
For Each drow As DataRow In TmpDT.Select("EsCargo = True")
drow("EliminarDB") = True
Next
'ELIMINAR LOS USADOS QUE SE MANDAN A RECEPCION
For Each drow As DataRow In TmpDT.Select("EsCargo = True")
For Each RowRecepcionUsados As DataRow In TmpDTRecepcionUsados.Rows
If (RowRecepcionUsados("CvePSRelacionado").ToString() = drow("CvePS").ToString()) Then
RowRecepcionUsados.Delete()
End If
Next
Next
TmpDT.AcceptChanges()
TmpDTRecepcionUsados.AcceptChanges()
End Sub

View File

@@ -7,7 +7,7 @@ Partial Class PopUpBuscarFolio
Private ReadOnly Property Ruta As String
Get
Return AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\"
Return ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\"
End Get
End Property
@@ -159,8 +159,8 @@ Partial Class PopUpBuscarFolio
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Right
Dim Liga As String = String.Format("<a class='Texto' href='javascript:Ir(""{0}"");'>", e.Row.DBCampo("CveVenta"))
If UsuarioActual.CveEmpresa = 140 AndAlso e.Row.DBCampo("TipoDocto").Contiene("Rem") Then
Liga = String.Format("<a class='Texto' href='javascript:IrPV(""{0}"");'>", e.Row.DBCampo("CveVenta"))
If UsuarioActual.CveEmpresa = 140 AndAlso e.Row.DBCampo("TipoDocto").Contiene("Rem") Then
Liga = String.Format("<a class='Texto' href='javascript:IrPV(""{0}"");'>", e.Row.DBCampo("CveVenta"))
End If
e.Row.FCLiteral("LtlTipo").Text = String.Format("<div class='truncate' style='width:27px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("TipoDocto"))
@@ -172,13 +172,15 @@ Partial Class PopUpBuscarFolio
e.Row.FCLiteral("LtlSucursal").Text = String.Format("<div class='truncate' style='width:80px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("SubProyecto"))
e.Row.FCLiteral("LtlEstatus").Text = String.Format("<div class='truncate' style='width:80px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("EstatusFactura"))
e.Row.FCLiteral("LtlPedidoContrato").Text = String.Format("<div class='truncate' style='width:80px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("PedidoContrato"))
If IO.File.Exists($"{Ruta}XML\{e.Row.DBCampo("TipoDocto")}\{e.Row.DBCampo("Folio")}.xml") Then
e.Row.FCLiteral("LtlXML").Text = String.Format("<div class='truncate' style='width:23px;'><a class=""Texto"" target=""_blank"" href=""/Empresas/{0}/XML/{1}/{2}.xml"">XML</a></div>", UsuarioActual.CveEmpresa, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("Folio"))
e.Row.FCLiteral("LtlXML").Text = String.Format("<div class='truncate' style='width:23px;'><a class=""Texto"" target=""_blank"" href=""/Compras/PopUpVerFactura.aspx?TipoDocto={0}&File={1}.xml&TipoArchivo=XML"">XML</a></div>", e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("Folio"))
Else
e.Row.FCLiteral("LtlXML").Text = "<div class='truncate' style='width:23px;'></div>"
End If
If IO.File.Exists($"{Ruta}PDF\{e.Row.DBCampo("TipoDocto")}\{e.Row.DBCampo("Folio")}.pdf") Then
e.Row.FCLiteral("LtlPDF").Text = String.Format("<div class='truncate' style='width:23px;'><a class=""Texto"" target=""_blank"" href=""/Empresas/{0}/PDF/{1}/{2}.pdf"">PDF</a></div>", UsuarioActual.CveEmpresa, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("Folio"))
e.Row.FCLiteral("LtlPDF").Text = String.Format("<div class='truncate' style='width:23px;'><a class=""Texto"" target=""_blank"" href=""/Compras/PopUpVerFactura.aspx?TipoDocto={0}&File={1}.pdf&TipoArchivo=PDF"">PDF</a></div>", e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("Folio"))
Else
e.Row.FCLiteral("LtlPDF").Text = "<div class='truncate' style='width:23px;'></div>"
End If

View File

@@ -64,7 +64,7 @@ Partial Class PopUpImprimir
RegistraScript("$get('tdContenido').style.height='520px'")
Else
Dim Path As String = AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\" & Ext & "\" & CveVenta & "." & Ext
Dim Path As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\" & Ext & "\" & CveVenta & "." & Ext
Dim Archivo As New System.IO.FileInfo(Path)
If Archivo.Exists Then

View File

@@ -2281,7 +2281,7 @@ Partial Class ProductosyServicios
Dim Archivo = ""
Dim DirectorioTemporal = ""
Dim DirectorioDestino = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\{UsuarioActual.CveEmpresa}\Ecommerce\Productos\Imagenes\"
Dim DirectorioDestino = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\{UsuarioActual.CveEmpresa}\Ecommerce\Productos\Imagenes\"
If Not Directory.Exists(DirectorioDestino) Then
Directory.CreateDirectory(DirectorioDestino)
End If
@@ -2316,7 +2316,7 @@ Partial Class ProductosyServicios
If (CveImagenActivoFijo > 0) Then
Dim ObjEcommerce As New ClsECommerce
If ObjEcommerce.ProductosImagenesRemove(CveImagenActivoFijo, UsuarioActual.CveEmpresa) Then
File.Delete(String.Format("{0}Empresas\{1}\{2}", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, ObjEcommerce.DtResultados.Rows(0)("URL")))
File.Delete(String.Format("{0}Empresas\{1}\{2}", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, ObjEcommerce.DtResultados.Rows(0)("URL")))
CargarGaleriaImagenesEcommerce()
RegistraScript("initcarusel();")
End If

View File

@@ -2,13 +2,13 @@
Option Strict On
Imports Extensiones
Imports System.Data
Imports Microsoft.Reporting.WebForms
Partial Class Ventas_RepPS
Inherits ClsPaginas
#Region "P R O P I E D A D E S"
Imports System.Data
Imports Microsoft.Reporting.WebForms
Partial Class Ventas_RepPS
Inherits ClsPaginas
#Region "P R O P I E D A D E S"
Private Property DtReporte As DataTable
Get
Return DirectCast(ViewState("DtReporte"), DataTable)
@@ -16,25 +16,25 @@ Partial Class Ventas_RepPS
Set(value As DataTable)
ViewState("DtReporte") = value
End Set
End Property
#End Region
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
CargaDatosIniciales()
CargaCombos()
If Not IsPostBack Then
CargaDatosIniciales()
CargaCombos()
CargaDatos()
End If
End Sub
Private Sub CargaDatosIniciales()
txtFechaI.Text = $"01/{Now.Month}/{Now.Year}"
txtFechaF.Text = Now.ToString("dd/MM/yyyy")
End Sub
Private Sub CargaCombos()
CargaTipoCentroCosto()
End Sub
End Sub
Private Sub CargaDatosIniciales()
txtFechaI.Text = $"01/{Now.Month}/{Now.Year}"
txtFechaF.Text = Now.ToString("dd/MM/yyyy")
End Sub
Private Sub CargaCombos()
CargaTipoCentroCosto()
End Sub
Private Sub CargaTipoCentroCosto()
If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then
@@ -66,23 +66,23 @@ Partial Class Ventas_RepPS
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then
LblSubProyecto.InnerText = "Sucursal:"
End If
End Sub
Private Sub CargaDatos()
Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.ToEntero()
Dim Grupo As Integer = DdlGrupo.SelectedValue.ToEntero()
Dim CvePS As Integer = -1
Dim CveMoneda As Integer = -1
Dim TC As Integer = 1
End Sub
Private Sub CargaDatos()
Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.ToEntero()
Dim Grupo As Integer = DdlGrupo.SelectedValue.ToEntero()
Dim CvePS As Integer = -1
Dim CveMoneda As Integer = -1
Dim TC As Integer = 1
Dim TCEspecifico As Decimal = -1
Dim FechaI, FechaF As DateTime
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.ToDate, MinFecha)
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
Dim ObjVentas As New ClsVentas()
If ObjVentas.GetRepPSEcono(CveSubProyecto, CvePS, FechaI, FechaF, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, GPO:=Grupo, CveMoneda:=CveMoneda, TipoCambio:=TC, TCEspecifico:=TCEspecifico) Then
DtReporte = ObjVentas.DtResultados.Copy()
If ObjVentas.GetRepPSEcono(CveSubProyecto, CvePS, FechaI, FechaF, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, GPO:=Grupo, CveMoneda:=CveMoneda, TipoCambio:=TC, TCEspecifico:=TCEspecifico) Then
DtReporte = ObjVentas.DtResultados.Copy()
GvDatos.DataSource = DtReporte
Else
GvDatos.DataSource = Nothing
@@ -92,28 +92,28 @@ Partial Class Ventas_RepPS
GvDatos.DataBind()
UPDatos.Update()
End Sub
End Sub
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Select Case e.Row.DBCampo("Orden").ToString.ToEntero()
Case 4
e.Row.CssClass = "Totales"
Case 3
e.Row.CssClass = "SubTotales2"
Case 2
e.Row.CssClass = "SubTotales"
Case 1
e.Row.CssClass = "SubTotalesB"
Case 0
e.Row.CssClass = "Texto"
If e.Row.RowType = DataControlRowType.DataRow Then
Select Case e.Row.DBCampo("Orden").ToString.ToEntero()
Case 4
e.Row.CssClass = "Totales"
Case 3
e.Row.CssClass = "SubTotales2"
Case 2
e.Row.CssClass = "SubTotales"
Case 1
e.Row.CssClass = "SubTotalesB"
Case 0
e.Row.CssClass = "Texto"
End Select
End If
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
CargaDatos()
End Sub
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
CargaDatos()
End Sub
#Region " IMPRIMIR "
Protected Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click
If GvDatos.Rows.Count > 0 Then
@@ -128,10 +128,10 @@ Partial Class Ventas_RepPS
Private Sub GenerarPDF()
Dim FechaI, FechaF As Date
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.ToDate, MinFecha)
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
If DtReporte IsNot Nothing AndAlso DtReporte.Rows.Count > 0 Then
Dim SbParametros As New StringBuilder
SbParametros.AppendFormat("Sucursal:{0}", DdlSubProyecto.SelectedItem.Text)
SbParametros.AppendFormat("Sucursal:{0}", DdlSubProyecto.SelectedItem.Text)
SbParametros.AppendFormat(", Orden:{0}", DdlGrupo.SelectedItem.Text)
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
@@ -147,20 +147,20 @@ Partial Class Ventas_RepPS
params.Add(New ReportParameter("LogoPath", logouri))
Else
params.Add(New ReportParameter("LogoPath", ""))
End If
params.Add(New ReportParameter("Parametros", SbParametros.ToString()))
If System.IO.File.Exists($"{Server.MapPath("/")}/Empresas/{UsuarioActual.CveEmpresa}/Formatos/RepPS.rdlc") Then
ImprimirPDF($"Empresas/{UsuarioActual.CveEmpresa}/Formatos/RepPS.rdlc", DtReporte, params, "ReportePS")
Else
ImprimirPDF($"Empresas/Grales/Formatos/RepPS.rdlc", DtReporte, params, "ReportePS")
End If
params.Add(New ReportParameter("Parametros", SbParametros.ToString()))
If System.IO.File.Exists($"{ModExtensiones.DirectorioBaseEmpresas}/Empresas/{UsuarioActual.CveEmpresa}/Formatos/RepPS.rdlc") Then
ImprimirPDF($"Empresas/{UsuarioActual.CveEmpresa}/Formatos/RepPS.rdlc", DtReporte, params, "ReportePS")
Else
ImprimirPDF($"Empresas/Grales/Formatos/RepPS.rdlc", DtReporte, params, "ReportePS")
End If
Else
Alert("No hay información para mostrar.", TipoMensaje.MsgAdvertencia)
End If
End Sub
End Sub
#End Region
End Class
End Class

View File

@@ -92,8 +92,8 @@ Partial Class Ventas_RepRecuperacion
'Carga Bancos'
DdlBanco.DataSource = GlobalDTBancos().FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
DdlBanco.DataBind()
DdlBanco.Items.Insert(0, New ListItem("Todos", "-1"))
DdlBanco.DataBind()
DdlBanco.Items.Insert(0, New ListItem("Todos", "-1"))
DdlBanco.Items.Add(New ListItem("Empresa", "0"))
'Carga Clasificacion Cliente'
@@ -179,7 +179,7 @@ Partial Class Ventas_RepRecuperacion
#Region "SELECTED INDEX CHANGE"
Protected Sub DdlBanco_SelectedIndexChanged(sender As Object, e As EventArgs)
DdlCuentaBancaria.Items.Clear()
DdlCuentaBancaria.Items.Clear()
DdlCuentaBancaria.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros($"CveBanco = {DdlBanco.SelectedValue.ToEntero}")
DdlCuentaBancaria.Items.Insert(0, New ListItem("Todos", "-1"))
DdlCuentaBancaria.DataBind()
@@ -214,7 +214,7 @@ Partial Class Ventas_RepRecuperacion
If DdlResponsable.SelectedValue <> "-1" Then StrFiltro.AppendFormat("&emsp;<b>Responsable</b>: {0}", DdlResponsable.SelectedItem.Text)
Dim RutaPDF As String
Dim Ruta As String = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\{UsuarioActual.CveEmpresa}\"
Dim Ruta As String = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\{UsuarioActual.CveEmpresa}\"
RutaPDF = $"{Ruta}\Formatos\RepRecuperacion.rdlc"
If Not File.Exists(RutaPDF) Then
RutaPDF = "Empresas/Grales/Formatos/RepRecuperacion.rdlc"

View File

@@ -296,7 +296,7 @@ Partial Class Ventas_RepRecuperacionDetalle
If DdlClienteSucursal.SelectedValue <> "-1" Then StrFiltro.AppendFormat("&emsp;<b>Cliente Sucursal</b>: {0}", DdlClienteSucursal.SelectedItem.Text)
Dim RutaPDF As String
Dim Ruta As String = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\{UsuarioActual.CveEmpresa}\"
Dim Ruta As String = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\{UsuarioActual.CveEmpresa}\"
RutaPDF = $"{Ruta}\Formatos\RepRecuperacionDetalle.rdlc"
If Not File.Exists(RutaPDF) Then
RutaPDF = "Empresas/Grales/Formatos/RepRecuperacionDetalle.rdlc"

View File

@@ -122,11 +122,11 @@ public partial class Ventas_ReporteDetalle : ClsPaginas
Hashtable UrlParametros = Parametros(ModExtensiones.Decripta(Request["Op"].ToString()));
if (Request["Mod"] != null && Request["Mod"].ToString().Equals("Editar"))
{
Directorio1 = AppDomain.CurrentDomain.BaseDirectory + string.Format(@"Empresas\{0}\Formatos\Factura.mrt", UrlParametros["CVEEMPRESA"].ToString());
Directorio1 = ModExtensiones.DirectorioBaseEmpresas + string.Format(@"Empresas\{0}\Formatos\Factura.mrt", UrlParametros["CVEEMPRESA"].ToString());
}
else
{
Directorio1 = AppDomain.CurrentDomain.BaseDirectory + @"Empresas\Grales\Formatos\Factura.mrt";
Directorio1 = ModExtensiones.DirectorioBaseEmpresas + @"Empresas\Grales\Formatos\Factura.mrt";
}
CargaFactura(Directorio1, UrlParametros);
SmdDesigner.Report = Reporte;
@@ -300,7 +300,7 @@ public partial class Ventas_ReporteDetalle : ClsPaginas
{
Hashtable UrlParametros = Parametros(ModExtensiones.Decripta(Request["Op"].ToString()));
CveEmpresa = UrlParametros["CVEEMPRESA"].ToString().ToEntero();
string DirBase = AppDomain.CurrentDomain.BaseDirectory + string.Format(@"Empresas\{0}\Formatos\", CveEmpresa);
string DirBase = ModExtensiones.DirectorioBaseEmpresas + string.Format(@"Empresas\{0}\Formatos\", CveEmpresa);
if (!System.IO.Directory.Exists(DirBase))
{
System.IO.Directory.CreateDirectory(DirBase);

View File

@@ -4130,8 +4130,14 @@
<span class="caption-subject bold">Agregar</span>
</div>--%>
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold" data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-green' style='font-weight: 700 !important;' ><span class='caption-subject bold'>Agregar</span></i>" Style="cursor: pointer;" ToolTip="Observaciones"></asp:HyperLink><br />
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold" runat="server" Visible="false" Style="cursor: pointer; text-decoration: none;" ToolTip="Agendar"><i class='fa fa-calendar-plus-o font-green' style='font-weight: 700 !important;' ></i> <span class="caption-subject bold font-green">Agendar</span></asp:HyperLink>
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold" runat="server" Visible="false" Style="cursor: pointer; text-decoration: none;" ToolTip="Agendar"><i class='fa fa-calendar-plus-o font-green' style='font-weight: 700 !important;' ></i> <span class="caption-subject bold font-green">Agendar</span></asp:HyperLink><br />
<asp:Literal ID="LtlTareaNueva" runat="server"></asp:Literal>
<UserControl:TareaNueva runat="server" id="TareaNueva" />
<script> function OnAddedTareaNueva() {
$('.btnupEventoBitacora').click();
}
</script>
</div>
</div>
</div>
@@ -4140,6 +4146,7 @@
<asp:UpdatePanel ID="UPEventoBitacora" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Button ID="btnupEventoBitacora" OnClick="btnupEventoBitacora_Click" UseSubmitBehavior="false" CssClass="hidden btnupEventoBitacora" runat="server" Text="Button" />
<asp:GridView ID="GvEB" runat="server" AutoGenerateColumns="False" EmptyDataText="No se han capturado comentarios o bitácora" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
<Columns>
<asp:TemplateField>
@@ -4163,7 +4170,7 @@
<asp:TemplateField>
<HeaderTemplate>Descripción</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlEventoBitacora" runat="server" Text='<%# Eval("Descripcion") %>'></asp:Literal>
<asp:Literal ID="LtlEventoBitacora" runat="server" Text='<%#If(Eval("CveTipoEvento").ToString() = "1", String.Format("Tarea :<a href=""/OI/TareaDetalle.aspx?CveEvento={0}"">{1}<a>", Eval("CveEvento"), Eval("Asunto")), Eval("Descripcion").ToString()) %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="50px">

File diff suppressed because it is too large Load Diff

View File

@@ -48,7 +48,7 @@ Partial Class Ventas_eFacturas
txtFechaF.Text = Now.ToShortDateString 'txtFechaI.Text.ToDate.AddMonths(1).AddDays(-1).ToShortDateString
Destino = String.Format("{0}Ventas\", UsuarioActual.Empresa.Ruta) 'string.format("{0}Empresas\{1}\Compras\", AppDomain.CurrentDomain.BaseDirectory ,UsuarioActual.CveEmpresa & "\Compras\"
Destino = String.Format("{0}Ventas\", UsuarioActual.Empresa.Ruta) 'string.format("{0}Empresas\{1}\Compras\", ModExtensiones.DirectorioBaseEmpresas ,UsuarioActual.CveEmpresa & "\Compras\"
Ejecutable = String.Format("{0}\Utilerias\eeeFacturas.exe", AppDomain.CurrentDomain.BaseDirectory)
Form.DefaultButton = BtnConsultar.UniqueID
@@ -354,7 +354,7 @@ Partial Class Ventas_eFacturas
Protected Sub LnkNoRecibidas_Click(sender As Object, e As EventArgs) Handles LnkNoRecibias.Click
Dim dt As New DataTable
Dim Ruta As String = String.Format("{0}\Empresas\{1}\Compras\NoRecibidas-{1}.xml", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa)
Dim Ruta As String = String.Format("{0}\Empresas\{1}\Compras\NoRecibidas-{1}.xml", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa)
Dim Str As New StringBuilder
If IO.File.Exists(Ruta) Then
dt.ReadXml(Ruta)
@@ -440,8 +440,8 @@ Partial Class Ventas_eFacturas
'Dim ObjProcess As Process = Nothing
'Dim Mensajes As String = ""
'Dim EjecutableUtilerias = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Utilerias\UtileriasAD.exe")
'Dim Folder = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Empresas\")
'Dim EjecutableUtilerias = Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Utilerias\UtileriasAD.exe")
'Dim Folder = Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas\")
'Dim error1 As Boolean = False
'Dim en As New CultureInfo("en-US")
'Dim fechai = txtFechaI.Text.Trim.ToDate.ToString("d", en)
@@ -464,7 +464,7 @@ Partial Class Ventas_eFacturas
Dim ObjProcess As Process = Nothing
Dim Mensajes As String = ""
Dim EjecutableUtilerias = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Utilerias\ADSUtilerias.exe")
Dim Folder = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Empresas\")
Dim Folder = Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas\")
Dim error1 As Boolean = False
Dim en As New CultureInfo("en-US")
Dim fechai = txtFechaI.Text.Trim.ToDate.ToString("d", en)