diff --git a/Acumuladores/RepIndicadorDiario.aspx.vb b/Acumuladores/RepIndicadorDiario.aspx.vb
index 31156c0e1..74b9e0cf3 100644
--- a/Acumuladores/RepIndicadorDiario.aspx.vb
+++ b/Acumuladores/RepIndicadorDiario.aspx.vb
@@ -178,27 +178,18 @@ Partial Class ACumuladores_RepIndicadorDiario
Dim FechaI = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", "-1", txtFechaI.Text)
Dim FechaF = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", "-1", txtFechaF.Text)
-
-
Dim FechaIn As String = $" Fecha Inicio: {txtFechaI.Text}"
Dim FechaFn As String = $" Fecha Fin: {txtFechaF.Text}"
If txtFechaI.Text = "" Then FechaIn = ""
- If txtFechaF.Text = "" Then FechaFn = ""
-
-
+ If txtFechaF.Text = "" Then FechaFn = ""
Dim SubProyecto = If(DdlSubProyecto.SelectedItem.Text = "", "", $" SubProyecto: {DdlSubProyecto.SelectedItem.Text}")
-
Dim FechaIF, FechaFF As String
FechaIF = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
FechaFF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
-
-
If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then
-
-
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
diff --git a/App_Code/ClsGPS.vb b/App_Code/ClsGPS.vb
index 21ddfea1e..4cdc9e7f2 100644
--- a/App_Code/ClsGPS.vb
+++ b/App_Code/ClsGPS.vb
@@ -781,7 +781,7 @@ Public Class ClsGPS
Velocidad = Row("SPD").ToString.ToDouble
Fecha = Row("FechaTrama").ToString
KMRecorridos = Row("KMRecorridos").ToString.ToDouble
- Info = InfoWindowReader($" Vehículo: {Vehiculo}", "-1", CveDispositivo, Row, TienePermisoComandos)
+ Info = InfoWindowReader($" Vehiculo: {Vehiculo}", "-1", CveDispositivo, Row, TienePermisoComandos)
If Velocidad > 1 Then
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index a4eca4a81..4bb7de6c7 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -4942,14 +4942,8 @@ Public Class ClsPaginas
PaginaDict.Add("/Inventarios/RepExistenciaLote.aspx".ToUpper(), 109)
PaginaDict.Add("/Inventarios/CatUnidades.aspx".ToUpper(), 2056)
-
-
-
- 'PaginaDict.Add("/Inventarios/EntregasPorRealizarRuta.aspx".ToUpper(), -1)
- 'PaginaDict.Add("/General/RepPaqueteriasGuiasRuta.aspx".ToUpper(), -1)
-
PaginaDict.Add("/Inventarios/EntregaAlmacenRuta.aspx".ToUpper(), 1320)
- PaginaDict.Add("/General/RepEntregaAlmacenRuta.aspx".ToUpper(), 1319)
+ PaginaDict.Add("/Inventarios/RepEntregaAlmacenRuta.aspx".ToUpper(), 1319)
diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb
index 468b3e084..8e950e3fc 100644
--- a/Bancos/ProveedoresAbonar.aspx.vb
+++ b/Bancos/ProveedoresAbonar.aspx.vb
@@ -1210,13 +1210,13 @@ Partial Class Bancos_ProveedoresAbonar
importeMX = ImporteMovimiento
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
- importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioCompra, TipoCambioPago)
+ importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
importeMX = ImporteMovimiento * tipoCambioCompra
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
- importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioCompra, TipoCambioPago)
+ importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index 7a895576b..4384944a1 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -4618,7 +4618,7 @@ Partial Class Compras_Compras
'End If
'METODO DE PREPOLIZA DE ALMACEN
- If UsuarioActual.CveEmpresa.Contiene(1, 119, 72, 80, 140, 141, 152, 153, 154, 159, 160, 161, 162, 163) And UsuarioActual.Empresa.UsaInventarios And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
+ If UsuarioActual.CveEmpresa.Contiene(1, 119, 72, 80, 140, 141, 145, 152, 153, 154, 159, 160, 161, 162, 163) And UsuarioActual.Empresa.UsaInventarios And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
Dim ImporteAlmacen = TmpDT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0, "ImporteSinImpuestos", "Total"), $"ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND CveTipoPS = 2").ToString.ToDecimal
If ImporteAlmacen > 0 Then
If Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
@@ -6078,7 +6078,7 @@ Partial Class Compras_Compras
End If
'si aplica NC sobre mov de almacen, el impuesto lo toma de la Factura.para la consideracion de mcia en tránsito
- If ChkNCInvNC.Checked And CveMoneda <> 1 AndAlso importeMovimiento > 0 Then
+ If ChkNCInvNC.Checked And CveMoneda > 1 AndAlso importeMovimiento > 0 Then
Dim diferenciaTransito As Decimal = 0
For Each Gvr As GridViewRow In GVNCInvAlmacen.Rows
@@ -10392,7 +10392,8 @@ Partial Class Compras_Compras
(row1("CveTipoGasto").ToString.ToEntero <> row2("CveTipoGasto").ToString.ToEntero) Or
(row1("Total").ToString.ToDouble <> row2("Total").ToString.ToDouble) 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("CvePS").ToString.ToEntero <> row2("CvePS").ToString.ToEntero) Then
Return False
End If
diff --git a/Compras/ReembolsosComprobaciones.aspx b/Compras/ReembolsosComprobaciones.aspx
index 501e2f58e..165b2899a 100644
--- a/Compras/ReembolsosComprobaciones.aspx
+++ b/Compras/ReembolsosComprobaciones.aspx
@@ -398,7 +398,7 @@
Ot. Ing.
-
+
@@ -459,6 +459,21 @@
txt.value = "";
}
+ //let chequeSeleccionado = parseInt($('#C_DDlCheques option:selected').val());
+
+ //if (chequeSeleccionado > 0) {
+
+
+ // let TotalOtrosEgresos = 0.0;
+ // $('.CsTxtComision').each(function () {
+ // TotalOtrosEgresos = parseFloat($(this).val());
+ // });
+
+ // alert("Excedente " + Excedente + " TotalOtrosEgresos " + TotalOtrosEgresos);
+
+ //}
+
+
Excedente = SumaValores();
if (Excedente > 0) {
@@ -666,9 +681,28 @@
$get('TxtTotal').value = FormatoNumero(Suma + (ToDouble($get('TxtOtrosImportes').value * -1)), 2);
}
+
+ let chequeSeleccionado = parseInt($('#C_DDlCheques option:selected').val());
+ let TotalOtrosEgresos = 0.0;
+
+ if (chequeSeleccionado > 0) {
+
+
+
+ $('.CsTxtComision').each(function () {
+ TotalOtrosEgresos = parseFloat($(this).val());
+ });
+
+ //alert("Excedente " + Excedente + " TotalOtrosEgresos " + TotalOtrosEgresos); EEEEEEEEEEEEEEEEEEEEEEEEE
+
+ Excedente = Excedente + TotalOtrosEgresos;
+
+ }
+
+
if (Excedente > 0) {
txt.value = FormatoNumero(ToDouble(txt.value) - Excedente, 2);
- alert("El Importe no debe de exceder a el saldo del cheque");
+ alert("Excedente " + Excedente + " TotalOtrosEgresos " + TotalOtrosEgresos);
}
diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb
index da89c665e..748d2bd4c 100644
--- a/Compras/ReembolsosComprobaciones.aspx.vb
+++ b/Compras/ReembolsosComprobaciones.aspx.vb
@@ -744,9 +744,7 @@ Partial Class Compras_ReembolsosComprobaciones
End If
-
-
-
+ Dim ComisionTmp As Decimal = gvr.FCTextBox("TxtComision").Text.ToDecimal
'Otros Ingresos
If (ChkAjusteOI.Checked Or ChkOtrosIngresosCheque.Checked) AndAlso gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then
@@ -764,8 +762,15 @@ Partial Class Compras_ReembolsosComprobaciones
If gvr.DataKey("Original").ToDecimal > 0 Then PorcentajePago = (ImporteMovto / gvr.DataKey("Original").ToDecimal) Else PorcentajePago = 1
If Not ChkReembolsarSinBancos.Checked AndAlso (Not HdnCheque.Value.ToEntero > 0 Or Not UsuarioActual.CveEmpresa.Contiene(119, 158)) Then
+
+
+ Dim ImporteMovtoTmp As Decimal = ImporteMovto
+ If ComisionTmp < 0 Then
+ ImporteMovtoTmp = ImporteMovto + ComisionTmp
+ End If
+
'Si es caja chica metemos el concepto 30, si es funcionario metemos 29
- If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, ImporteMovto, Referencia, If(CveCajaChica > 0, 30, 29), ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(CveCajaChica > 0, IdCuentaBancaria, IdCtaPersonal), -1, CveIE:=CveIEPago, CveIEDevolucion:=If(CveCajaChica > 0, If(DDlCheques.SelectedValue.ToEntero = -1, CveIECajaChica, DDlCheques.SelectedValue.ToEntero), -1), CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteMovto), ImporteMX:=ImporteMovto * tipoCambio, CveCuenta:=CveCuentaPersonal, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, Contabilizable:=If(CveCajaChica > 0 Or CvePersonal > 0, Not UsaSimplificacionCajaChica, True)) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, ImporteMovtoTmp, Referencia, If(CveCajaChica > 0, 30, 29), ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(CveCajaChica > 0, IdCuentaBancaria, IdCtaPersonal), -1, CveIE:=CveIEPago, CveIEDevolucion:=If(CveCajaChica > 0, If(DDlCheques.SelectedValue.ToEntero = -1, CveIECajaChica, DDlCheques.SelectedValue.ToEntero), -1), CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteMovtoTmp), ImporteMX:=ImporteMovtoTmp * tipoCambio, CveCuenta:=CveCuentaPersonal, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, Contabilizable:=If(CveCajaChica > 0 Or CvePersonal > 0, Not UsaSimplificacionCajaChica, True)) Then
MsgError = "Detalle"
End If
End If
diff --git a/Compras/RepComprasAF.aspx b/Compras/RepComprasAF.aspx
index c77ccf991..07177fb93 100644
--- a/Compras/RepComprasAF.aspx
+++ b/Compras/RepComprasAF.aspx
@@ -174,7 +174,7 @@
-
+
{2}", "Texto", Liga, e.Row.DataKey("GPO").ToString)
Else
e.Row.BackColor = Drawing.Color.LightGray
+ Dim Liga As String = $"/Compras/RepComprasAFDetalle.aspx?GPO=-1&Anio={e.Row.DBCampo("Anio")}&Mes={e.Row.DBCampo("Mes")}&AnioMes={ e.Row.DBCampo("AnioMes")}&Fecha={e.Row.DBCampo("Fecha")}&CveProveedor={ e.Row.DBCampo("CveProveedor")}&CveActivoFijo={e.Row.DBCampo("CveActivoFijo")}&CveTipoActivoFijo={e.Row.DBCampo("CveTipoActivoFijo")}&CveSubTipoActivoFijo={e.Row.DBCampo("CveSubTipoActivoFijo")}&CveProyecto={ DdlProyecto.SelectedValue}&CveSubProyecto={DdlSubProyecto.SelectedValue}&CvePS={CvePS}&CveClasificacion={e.Row.DBCampo("CveClasificacion")}&CveMoneda={ e.Row.DBCampo("CveMoneda")}&FechaI={FechaI}&FechaF={FechaF}&PS={PS}&CveClasificacion2={e.Row.DBCampo("CveClasificacion2")}"
+
+ e.Row.Cells(0).Text = String.Format("{2}", "Texto", Liga, e.Row.DataKey("Moneda").ToString)
+
End If
+
End If
End Sub
diff --git a/Compras/RepComprasAFDetalle.aspx.vb b/Compras/RepComprasAFDetalle.aspx.vb
index d903d5b4d..ea9336f1b 100644
--- a/Compras/RepComprasAFDetalle.aspx.vb
+++ b/Compras/RepComprasAFDetalle.aspx.vb
@@ -317,6 +317,7 @@ Partial Class Compras_RepComprasAFDetalle
e.Row.Cells(0).Text = String.Format("{2}", "Texto", Liga, e.Row.DBCampo("SerieFolio").ToString)
Else
e.Row.BackColor = Drawing.Color.LightGray
+ e.Row.Font.Bold = True
End If
End If
diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb
index aa0875392..9879cf3e2 100644
--- a/Contabilidad/RegPrePolizaS.aspx.vb
+++ b/Contabilidad/RegPrePolizaS.aspx.vb
@@ -893,7 +893,7 @@ Partial Class ContabilidadC_RegPrePolizaS
'validaciones
- If Not (TotalCargos = TotalAbonos AndAlso (GvPrePoliza.Rows.Count > 0 Or GvMov.Rows.Count > 0)) Then
+ If Not (TotalCargos = TotalAbonos AndAlso (GvPrePoliza.Rows.Count > 0 Or GvMov.Rows.Count > 0)) AndAlso UsuarioActual.CveRol <> 1 Then
Alert($"La suma de los movimientos no son iguales ({TotalCargos}-{TotalAbonos})", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
diff --git a/Empresas/132/Formatos/Factura.rdlc b/Empresas/132/Formatos/Factura.rdlc
index 319a612b8..f56a59d45 100644
--- a/Empresas/132/Formatos/Factura.rdlc
+++ b/Empresas/132/Formatos/Factura.rdlc
@@ -1749,12 +1749,6 @@
8pt
-
- =Today
-
-
@@ -1763,7 +1757,7 @@
3.29402cm0.21596cm0.46771cm
- 6.86562cm
+ 2.66687cm37
+
+ true
+ true
+
+
+
+
+ =Today
+
+
+
+
+
+
+ Textbox8
+ 3.29402cm
+ 2.95339cm
+ 0.46771cm
+ 1.91468cm
+ 38
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+ true17.96022cm
diff --git a/Empresas/Grales/Formatos/CartaPorte.rdlc b/Empresas/Grales/Formatos/CartaPorte.rdlc
index 5870d72ed..c05f3e8c2 100644
--- a/Empresas/Grales/Formatos/CartaPorte.rdlc
+++ b/Empresas/Grales/Formatos/CartaPorte.rdlc
@@ -1602,8 +1602,8 @@
- Database
- =System.Convert.FromBase64String(Parameters!LogoPath.Value )
+ External
+ =Parameters!LogoPath.Valueimage/pngFitProportional0.46171in
diff --git a/Inventarios/CatUnidades.aspx b/Inventarios/CatUnidades.aspx
index b0680b5a0..73281e77f 100644
--- a/Inventarios/CatUnidades.aspx
+++ b/Inventarios/CatUnidades.aspx
@@ -36,18 +36,18 @@
-
-
-
+
+
+
-
-
-
+
+
+
-
+
-
+
@@ -57,13 +57,7 @@
-
-
-
-
-
-
-
+
@@ -77,10 +71,15 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -89,10 +88,7 @@
-
-
-
-
+
@@ -104,12 +100,6 @@
-
-
-
-
-
-
diff --git a/Inventarios/Consignaciones.aspx.vb b/Inventarios/Consignaciones.aspx.vb
index 43ef04fd9..47b74bd96 100644
--- a/Inventarios/Consignaciones.aspx.vb
+++ b/Inventarios/Consignaciones.aspx.vb
@@ -892,6 +892,8 @@ Partial Class Inventarios_Consignaciones
End If
If Not ErrorMovInv Then
+ 'falta generar la prepoliza
+
ObjInventario.Commit()
Dim Msg As New StringBuilder
Msg.AppendFormat("Se realizo con exito la devolución de consignación")
diff --git a/Inventarios/EntregaAlmacen.aspx b/Inventarios/EntregaAlmacen.aspx
index 92c12c3b0..c63c3587b 100644
--- a/Inventarios/EntregaAlmacen.aspx
+++ b/Inventarios/EntregaAlmacen.aspx
@@ -163,6 +163,7 @@
Dirección Envío:
+
@@ -279,6 +280,44 @@
+
+
+
+
+
+
+
+
Editar Dirección
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb
index fe7e8b337..605de65fd 100644
--- a/Inventarios/EntregaAlmacen.aspx.vb
+++ b/Inventarios/EntregaAlmacen.aspx.vb
@@ -221,6 +221,14 @@ Partial Class Inventarios_EntregaAlmacen
ViewState("CveCliente") = value
End Set
End Property
+ Private Property CveDireccionEnvio As Integer
+ Get
+ Return CType(ViewState("CveDireccionEnvio"), Integer)
+ End Get
+ Set(value As Integer)
+ ViewState("CveDireccionEnvio") = value
+ End Set
+ End Property
Private Property CveMovimiento As Integer
Get
Return CType(ViewState("CveMovimiento"), Integer)
@@ -598,20 +606,21 @@ Partial Class Inventarios_EntregaAlmacen
trObsAlmacen.Visible = drE("ObservacionesAlmacen").ToString() <> ""
LbObservacionesAlmacen.Text = drE("ObservacionesAlmacen").ToString()
CveVentaSurtir = CveVenta
- CveAlmacenTraspasoDestino = DtDatos.Rows(0)(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem", "CveAlmacenTraspasoOrigen", "CveAlmacenTraspasoDestino")).ToString().ToEntero()
- CveAlmacenTraspasoOrigen = DtDatos.Rows(0)(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem", "CveAlmacenTraspasoDestino", "CveAlmacenTraspasoOrigen")).ToString().ToEntero()
- CveContrato = DtDatos.Rows(0)("CveContrato").ToString().ToEntero()
- CveVendedor = DtDatos.Rows(0)("CveVendedor").ToString().ToEntero()
- CveCliente = DtDatos.Rows(0)("CveCliente").ToString().ToEntero()
+ CveAlmacenTraspasoDestino = drE(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem", "CveAlmacenTraspasoOrigen", "CveAlmacenTraspasoDestino")).ToString().ToEntero()
+ CveAlmacenTraspasoOrigen = drE(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem", "CveAlmacenTraspasoDestino", "CveAlmacenTraspasoOrigen")).ToString().ToEntero()
+ CveContrato = drE("CveContrato").ToString().ToEntero()
+ CveVendedor = drE("CveVendedor").ToString().ToEntero()
+ CveCliente = drE("CveCliente").ToString().ToEntero()
ClienteEntregaPersonal(CveCliente)
- CveSubProyecto = DtDatos.Rows(0)("CveSubProyecto").ToString().ToEntero()
+ CveSubProyecto = drE("CveSubProyecto").ToString().ToEntero()
EsInterno = CBool(DtDatos.Rows(0)("EsInterno").ToString())
+ CveDireccionEnvio = drE("CveDireccionEnvio").ToString.ToEntero
- If drE("CveDireccionEnvio").ToString.ToEntero > 0 Then
+ If CveDireccionEnvio > 0 Then
trDireccionEnvio.Visible = True
'carga la dirección de envío
Dim ObjClientes As New ClsClientes
- If ObjClientes.DireccionEnvioGet(drE("CveDireccionEnvio").ToString.ToEntero, CveCliente, -1) Then
+ If ObjClientes.DireccionEnvioGet(CveDireccionEnvio, CveCliente, -1) Then
Dim drenvio As DataRow = ObjClientes.DtResultados.FiltroPrimero("")
LblDirEnvio.Text = drenvio("SucursalClienteVentaDireccion").ToString
End If
@@ -3988,4 +3997,69 @@ Partial Class Inventarios_EntregaAlmacen
End Sub
#End Region
+
+
+ 'Protected void LnkEditarDir_Click(Object sender, EventArgs e)
+ '{
+
+
+ ' int CveCliente = GvRow.DataKey("CveCliente").ToEntero();
+ ' int CveDireccion = GvRow.DataKey("CveDireccionEnvio").ToEntero();
+
+ ' HdnCveVenta.Value = GvRow.DataKey("CveVenta");
+ ' CargaModalCombosDirecciones(CveCliente, CveDireccion);
+
+ ' UpModalEditarentrega.Update();
+ ' this.RegistraScript("$('#DivEditarEntrega').modal('show');");
+ '}
+
+
+
+ Protected Sub LnkEditarDir_Click(sender As Object, e As EventArgs)
+
+ HdnCveVenta.Value = CveVentaSurtir.ToString
+ CargaModalCombosDirecciones(CveCliente, CveDireccionEnvio)
+
+ RegistraScript("$('#DivEditarEntrega').modal('show');")
+
+ End Sub
+
+
+ Private Sub CargaModalCombosDirecciones(CveCliente As Integer, CveDireccionEnvio As Integer)
+
+ DdlModalDireccionEnvio.Items.Clear()
+
+ Dim dtt As New DataTable()
+ Dim ObjClientes As New ClsClientes()
+ If (ObjClientes.DireccionEnvioGet(-1, CveCliente, -1)) Then
+ dtt = ObjClientes.DtResultados
+ End If
+ ObjClientes.Dispose()
+
+ DdlModalDireccionEnvio.DataSource = dtt
+ DdlModalDireccionEnvio.DataBind()
+ DdlModalDireccionEnvio.SelectedValueExist(CveDireccionEnvio)
+ UpModalEditarentrega.Update()
+ dtt.Dispose()
+
+ End Sub
+
+
+ Protected Sub BtnModalEditarentrega_Click(sender As Object, e As EventArgs)
+ Dim ProcesoOK As Boolean = True
+
+ Dim ObjVentas As New ClsVentas()
+ If Not ObjVentas.UpdateDireccionEnvioVenta(HdnCveVenta.Value.ToEntero(), DdlModalDireccionEnvio.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then
+ ProcesoOK = False
+ End If
+ ObjVentas.Dispose()
+
+ If ProcesoOK Then
+ RegistraScript("$('#DivEditarEntrega').modal('hide');")
+ Alert("Dirección Actualizada correctamente.", ModExtensiones.TipoMensaje.ToastInformacion)
+ 'CargaDatos()
+ End If
+
+
+ End Sub
End Class
diff --git a/Inventarios/TraspasoAlmacen.aspx b/Inventarios/TraspasoAlmacen.aspx
index 4a082e289..62ecdfc35 100644
--- a/Inventarios/TraspasoAlmacen.aspx
+++ b/Inventarios/TraspasoAlmacen.aspx
@@ -112,13 +112,12 @@
-
-
-
-
+
+
+
-
+
@@ -146,15 +145,12 @@
-
-
-
-
-
+
+
+
+
-
-
-
+
@@ -175,14 +171,11 @@
-
+
-
-
-
-
+
-
+
@@ -225,7 +218,7 @@
-
+
@@ -247,10 +240,10 @@
-
-
+
+
-
+
@@ -262,13 +255,20 @@
+
+
+
+
+
-
+
+
+
-
+
diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb
index b19bf109d..eba6867e5 100644
--- a/Inventarios/TraspasoAlmacen.aspx.vb
+++ b/Inventarios/TraspasoAlmacen.aspx.vb
@@ -178,14 +178,8 @@ Partial Class Inventarios_TraspasoAlmacen
divGastoIndirecto.Visible = False
LblGastoIndirecto.Visible = False
divResponsable.Visible = False
- LblResponsable.Visible = False
End If
- If UsuarioActual.Empresa.Funcionalidad(161) = "1" Then
- divFechaEnvio.Visible = True
- End If
-
-
CargaCombos()
CreaDT()
AlmacenTransitorioDefaults()
@@ -200,7 +194,8 @@ Partial Class Inventarios_TraspasoAlmacen
DivCodigoSeriePS.Visible = False
End If
If ChkTransitorio.Checked Then
- RegistraScript("$('#DivTransitorio').show(0);$('#DivGastoIndirecto').show(0);$('#DivDocChofer').show(0);")
+ RegistraScript(" $('#DivGastoIndirecto').show(0); ")
+ DivResponsable.Visible = True
DivTransitorio2.Visible = True
End If
@@ -217,16 +212,10 @@ Partial Class Inventarios_TraspasoAlmacen
ChkEmitirCartaPorte.Visible = True
- Dim HabilitarValidators As Boolean = UsuarioActual.CveEmpresa.Contiene(119)
- RfvDdlChofer.Enabled = HabilitarValidators
- RfvDdlUnidadCamion.Enabled = HabilitarValidators
-
End If
CantidadTotal = 0
-
CvePS = 0
-
TipoSeccionAlmacen = 0
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 Then
@@ -241,7 +230,8 @@ Partial Class Inventarios_TraspasoAlmacen
Else
If ChkTransitorio.Checked Then
- RegistraScript("$('#DivTransitorio').show(0);$('#DivGastoIndirecto').show(0);$('#DivDocChofer').show(0);")
+ RegistraScript(" $('#DivGastoIndirecto').show(0); ")
+ DivResponsable.Visible = True
DivTransitorio2.Visible = True
End If
End If
@@ -741,16 +731,12 @@ Partial Class Inventarios_TraspasoAlmacen
#Region " GUARDAR "
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
-
-
If ChkEmitirTimbrado.Checked Then
If DdlChofer.SelectedValue.ToEntero <= 0 Then
Alert("Debe de seleccionar un chofer")
Exit Sub
End If
-
-
If DdlUnidadCamion.SelectedValue.ToEntero <= 0 Then
Alert("Debe de seleccionar una unidad")
Exit Sub
@@ -770,21 +756,21 @@ Partial Class Inventarios_TraspasoAlmacen
If TxtResponsable.Text.Trim = "" And Not UsuarioActual.CveEmpresa.Contiene(119) Then
Alert("Debe seleccionar un responsable para el traspaso transitorio.", TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
- If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);") : DivTransitorio2.Visible = True
+ If ChkTransitorio.Checked Then DivResponsable.Visible = True : DivTransitorio2.Visible = True
Exit Sub
End If
If DdlAlmacenTransitorio.SelectedValue.ToEntero <= 0 Then
Alert("Debe seleccionar un almacen transitorio.", TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
- If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);") : DivTransitorio2.Visible = True
+ If ChkTransitorio.Checked Then DivResponsable.Visible = True : DivTransitorio2.Visible = True
Exit Sub
End If
If DdlChofer.SelectedValue.ToEntero <= 0 And UsuarioActual.CveEmpresa.Contiene(119) Then
Alert("Debe seleccionar un Chofer", TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
- If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);") : DivTransitorio2.Visible = True
+ If ChkTransitorio.Checked Then DivResponsable.Visible = True : DivTransitorio2.Visible = True
Exit Sub
End If
End If
@@ -832,7 +818,7 @@ Partial Class Inventarios_TraspasoAlmacen
Alert("Por ser un traspaso entre sucursales es necesario indicar que el traspaso es transitorio.", TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'');", "SonidoError")
ChkTransitorio.Checked = True
- If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);", "MuestraDivTransitorio") : DivTransitorio2.Visible = True
+ If ChkTransitorio.Checked Then DivResponsable.Visible = True : DivTransitorio2.Visible = True
Exit Sub
End If
End If
@@ -850,7 +836,7 @@ Partial Class Inventarios_TraspasoAlmacen
For Each dr As DataRow In DtMovimientos.Rows
If dr("EstatusExistencia").ToString = "-1" Then
Alert("Tiene que rectificar los movimientos con error.", TipoMensaje.MsgError)
- If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);") : DivTransitorio2.Visible = True
+ If ChkTransitorio.Checked Then DivResponsable.Visible = True : DivTransitorio2.Visible = True
Exit Sub
End If
Next
@@ -1197,7 +1183,7 @@ Partial Class Inventarios_TraspasoAlmacen
MensajeAlert.AppendFormat(" Folio de Salida: {0}", FolioSalida, CveMovimientoSalida)
MensajeAlert.AppendFormat(" Imprimir Reporte", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoSalida)))
- If CveMovimientoVirtualSalida > 0 Then MensajeAlert.AppendFormat(" Folio Virtual: {2} Imprimir Salida Virtual", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtualSalida)), CveMovimientoVirtualSalida, FolioVirtualSalida)
+ If CveMovimientoVirtualSalida > 0 Then MensajeAlert.AppendFormat(" Folio Virtual: {2} Imprimir Salida Virtual", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtualSalida)), CveMovimientoVirtualSalida, FolioVirtualSalida)
If Not ChkTransitorio.Checked Then
MensajeAlert.AppendFormat("
Folio de Entrada: {0}", FolioEntrada, CveMovimientoEntrada)
@@ -1652,12 +1638,21 @@ Partial Class Inventarios_TraspasoAlmacen
'DdlResponsable.SelectedValue = "-1"
TxtResponsable.Text = ""
TxtGastoIndirecto.Text = ""
- RegistraScript("$('#DivTransitorio').show(200);$('#DivGastoIndirecto').show(100);$('#DivDocChofer').show(100);")
+ DivEmitirTransitorio.Visible = True
+ RegistraScript(" $('#DivGastoIndirecto').show(100);")
+ DivResponsable.Visible = True
DivTransitorio2.Visible = True
+ If UsuarioActual.CveEmpresa.Contiene(119) Then
+ ChkEmitirTimbrado.Checked = True
+ End If
Else
- RegistraScript("$('#DivTransitorio').hide(500);$('#DivGastoIndirecto').hide(500);$('#DivDocChofer').hide(500);")
+ RegistraScript(" $('#DivGastoIndirecto').hide(500);")
+ DivResponsable.Visible = False
DivTransitorio2.Visible = True
+ DivEmitirTransitorio.Visible = False
+ ChkEmitirTimbrado.Checked = False
End If
+ UpEmitirTransitorio.Update()
CargaAlmacenDestino()
SiguienteFolio(If(ChkTransitorio.Checked, 9, 8))
@@ -2258,7 +2253,7 @@ Partial Class Inventarios_TraspasoAlmacen
CargaRecepcion()
Else
Alert("No hay movimientos para el traspaso", TipoMensaje.MsgAdvertencia)
- If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);") : DivTransitorio2.Visible = True
+ If ChkTransitorio.Checked Then DivResponsable.Visible = True : DivTransitorio2.Visible = True
End If
End Sub
diff --git a/Planeacion/CatSubProyectos.aspx.vb b/Planeacion/CatSubProyectos.aspx.vb
index 6b1be4d73..c9ceb11f6 100644
--- a/Planeacion/CatSubProyectos.aspx.vb
+++ b/Planeacion/CatSubProyectos.aspx.vb
@@ -870,14 +870,14 @@ Partial Class CatSubProyectos
Protected Sub DdlPais_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaEstado()
- CargaMunicipio()
- CargaColonia()
- CargaLocalidad()
+ CargaMunicipio()
+ ' CargaColonia()
+ ' CargaLocalidad()
End Sub
Protected Sub DdlEstado_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaMunicipio()
- CargaColonia()
- CargaLocalidad()
+ 'CargaColonia()
+ 'CargaLocalidad()
End Sub
Protected Sub DdlMunicipio_SelectedIndexChanged(sender As Object, e As EventArgs)
diff --git a/Sistemas/CatSesiones.aspx b/Sistemas/CatSesiones.aspx
index 4f55c1a69..663e54e63 100644
--- a/Sistemas/CatSesiones.aspx
+++ b/Sistemas/CatSesiones.aspx
@@ -30,6 +30,7 @@
+
diff --git a/Sistemas/CatSesiones.aspx.vb b/Sistemas/CatSesiones.aspx.vb
index 4bdb52791..219ec8aed 100644
--- a/Sistemas/CatSesiones.aspx.vb
+++ b/Sistemas/CatSesiones.aspx.vb
@@ -35,7 +35,9 @@ Partial Class Sistemas_CatSesiones
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTGralPaises" Then
CargaPaises()
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTGralEstados" Then
- CargaEstados()
+ CargaEstados()
+ ElseIf DdlVariable.SelectedItem.Value = "GlobalDTGralColonias" Then
+ CargaColonias()
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTGralMunicipios" Then
CargaMunicipios()
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTGralPoblaciones" Then
@@ -400,22 +402,33 @@ Partial Class Sistemas_CatSesiones
Private Sub CargaPaises()
Dim Gral As New ClsGenerales
- If Gral.GetGralPaises Then Application("GlobalDTGralPaises") = Gral.DtResultados Else Application("GlobalDTGralPaises") = Nothing
+ GlobalDTGralPaises = Nothing
+ 'If Gral.GetGralPaises Then Application("GlobalDTGralPaises") = Gral.DtResultados Else Application("GlobalDTGralPaises") = Nothing
If Gral.GetClasificacionPorcentaje(-1, -1, -1, -1, 1) Then Application("GlobalDTClasificacionPorcentaje") = Gral.DtResultados Else Application("GlobalDTClasificacionPorcentaje") = Nothing
Gral.Dispose()
End Sub
Private Sub CargaEstados()
- Dim Gral As New ClsGenerales
- If Gral.GetGralEstados Then Application("GlobalDTGralEstados") = Gral.DtResultados Else Application("GlobalDTGralEstados") = Nothing
- Gral.Dispose()
+ GlobalDTGralEstados("") = Nothing
+ 'Dim Gral As New ClsGenerales
+ 'If Gral.GetGralEstados Then Application("GlobalDTGralEstados") = Gral.DtResultados Else Application("GlobalDTGralEstados") = Nothing
+ 'Gral.Dispose()
End Sub
+ Private Sub CargaColonias()
+ GlobalDTGralColonias("", "", "") = Nothing
+ 'Dim Gral As New ClsGenerales
+ 'If Gral.GetGralEstados Then Application("GlobalDTGralEstados") = Gral.DtResultados Else Application("GlobalDTGralEstados") = Nothing
+ 'Gral.Dispose()
+ End Sub
+
+
Private Sub CargaMunicipios()
- Dim Gral As New ClsGenerales
- If Gral.GetGralMunicipios Then Application("GlobalDTGralMunicipios") = Gral.DtResultados Else Application("GlobalDTGralMunicipios") = Nothing
- Gral.Dispose()
+ GlobalDTGralMunicipios("") = Nothing
+ 'Dim Gral As New ClsGenerales
+ 'If Gral.GetGralMunicipios Then Application("GlobalDTGralMunicipios") = Gral.DtResultados Else Application("GlobalDTGralMunicipios") = Nothing
+ 'Gral.Dispose()
End Sub
Private Sub CargaPoblaciones()
diff --git a/Ventas/CatPS.aspx.vb b/Ventas/CatPS.aspx.vb
index 9462aa72a..a4a87b343 100644
--- a/Ventas/CatPS.aspx.vb
+++ b/Ventas/CatPS.aspx.vb
@@ -262,7 +262,7 @@ Partial Class CatPS
End Sub
Protected Sub LBExcelPersonalizado_Click(Sender As Object, e As EventArgs) Handles LBExcelPersonalizado.Click
- ExportToExcelGembox(GvDatos, "Catálogo de Productos y Servicios", UsuarioActual, "", "", "Catálogo de Productos y Servicios", "", -1)
+ ExportToExcelGembox(GvDatos, "Catálogo de Productos y Servicios", UsuarioActual, "Catálogo de Productos y Servicios")
End Sub
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
diff --git a/Ventas/Promociones.aspx b/Ventas/Promociones.aspx
index 7a09fdfad..7607a8ec7 100644
--- a/Ventas/Promociones.aspx
+++ b/Ventas/Promociones.aspx
@@ -107,7 +107,7 @@
-
+
diff --git a/Ventas/Promociones.aspx.vb b/Ventas/Promociones.aspx.vb
index 8a9295822..beffb6cab 100644
--- a/Ventas/Promociones.aspx.vb
+++ b/Ventas/Promociones.aspx.vb
@@ -257,7 +257,24 @@ Partial Class Ventas_Promociones
DdlSubProyecto.SelectedValue = Dr("CveSubProyecto").ToString
DdlMarca.SelectedValue = Dr("CveMarca").ToString
If Dr("CveVendedor").ToString.ToEntero > 0 Then DdlVendedor.SelectedValue = Dr("CveVendedor").ToString
- If Dr("CveCliente").ToString.ToEntero > 0 Then DdlClientes.SelectedValue = Dr("CveCliente").ToString
+
+ If Dr("CveCliente").ToString.ToEntero > 0 Then
+
+ If DdlClientes.UsaWebService Then
+
+ DdlClientes.txtText.Value = Dr("NombreComercial").ToString
+ DdlClientes.txtValue.Value = Dr("CveCliente").ToString
+
+ Else
+ DdlClientes.SelectedValue = Dr("CveCliente").ToString
+ End If
+
+
+
+
+
+ End If
+
ChkEstatus.Checked = If(Dr("Estatus").ToString = "True", True, False)
DdlMoneda.SelectedValueExist(Dr("CveMoneda").ToString)
DdlMarca.SelectedValueExist(Dr("CveMarca").ToString)
diff --git a/Ventas/RepProductosServiciosDetalle.aspx.vb b/Ventas/RepProductosServiciosDetalle.aspx.vb
index 9774ff465..022ce96af 100644
--- a/Ventas/RepProductosServiciosDetalle.aspx.vb
+++ b/Ventas/RepProductosServiciosDetalle.aspx.vb
@@ -906,8 +906,20 @@ Partial Class Ventas_RepProductosServiciosDetalle
If Drow("TipoDocumento").ToString.Trim <> String.Empty Then
Archivo = String.Format("{0}PDF/{1}/{2}.pdf", UsuarioActual.Empresa.Ruta.Replace("\", "/"), Drow("TipoDocumento").ToString, Drow("SerieFolio").ToString)
If File.Exists(Archivo) Then
+
archiveZip.CreateEntryFromFile(Archivo, Drow("SerieFolio").ToString & ".pdf")
- ' Exit For
+
+ If UsuarioActual.CveRol = 1 Then
+ Archivo = String.Format("{0}XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta.Replace("\", "/"), Drow("TipoDocumento").ToString, Drow("SerieFolio").ToString)
+ If File.Exists(Archivo) Then
+ archiveZip.CreateEntryFromFile(Archivo, Drow("SerieFolio").ToString & ".xml")
+ ' Exit For
+ Else
+ HuboInexistentes = True
+ SBInexistentes.AppendFormat("Tipo {0}, Folio {1} - {2} ", Drow("TipoDocumento").ToString, SerieFolio, Archivo)
+ End If
+ End If
+
Else
HuboInexistentes = True
SBInexistentes.AppendFormat("Tipo {0}, Folio {1} - {2} ", Drow("TipoDocumento").ToString, SerieFolio, Archivo)
diff --git a/Ventas/RepRemisiones.aspx b/Ventas/RepRemisiones.aspx
index 02dddae68..ab2a17b23 100644
--- a/Ventas/RepRemisiones.aspx
+++ b/Ventas/RepRemisiones.aspx
@@ -271,6 +271,14 @@
+
+
+
+
+
+
+
+
diff --git a/Ventas/RepRemisiones.aspx.vb b/Ventas/RepRemisiones.aspx.vb
index 009ba5416..6325b7acc 100644
--- a/Ventas/RepRemisiones.aspx.vb
+++ b/Ventas/RepRemisiones.aspx.vb
@@ -5,9 +5,8 @@ Imports System.Data
Imports Microsoft.Reporting.WebForms
Imports Extensiones
Partial Class RepRemisiones
- Inherits ClsPaginas
- Private Shared missing As Object = System.Reflection.Missing.Value
-
+ Inherits ClsPaginas
+
#Region "PROPIEDADES"
Private Property FechaI As String
Get
@@ -96,6 +95,7 @@ Partial Class RepRemisiones
GvDatos.DataSource = ObjVentas.DtResultados
DtVentas = ObjVentas.DtResultados
End If
+ GvDatos.Columns(7).Visible = ObjVentas.DtResultados.SUMD("Descuento") > 0
ObjVentas.Dispose()
GvDatos.DataBind()
@@ -131,17 +131,17 @@ Partial Class RepRemisiones
#End Region
#Region "CARGA COMBOS FILTRO"
- Private Sub CargaCliente()
- 'CargaClientes
- Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
- If EsWS Then
- DdlClientes.setEsWebService(True)
- Else
- DdlClientes.setEsWebService(False)
- DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
- DdlClientes.DataBind()
- DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
- End If
+ Private Sub CargaCliente()
+ 'CargaClientes
+ 'Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
+ 'If EsWS Then
+ DdlClientes.setEsWebService(True)
+ ' Else
+ 'DdlClientes.setEsWebService(False)
+ 'DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
+ 'DdlClientes.DataBind()
+ 'DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
+ 'End If
End Sub
Private Sub CargaSucursales()
diff --git a/Ventas/RepVentaDetalle.aspx.vb b/Ventas/RepVentaDetalle.aspx.vb
index 3be7ba9e4..2dbfea164 100644
--- a/Ventas/RepVentaDetalle.aspx.vb
+++ b/Ventas/RepVentaDetalle.aspx.vb
@@ -876,7 +876,8 @@ Partial Class RepVentaDetalle
'D E S C A R G A I O N I C !
Dim DescargaZIP As Ionic.Zip.ZipFile = New Ionic.Zip.ZipFile()
Using DescargaZIP
-
+ DescargaZIP.UseZip64WhenSaving = Ionic.Zip.Zip64Option.AsNecessary
+
For Each gvr As GridViewRow In GvDatos.Rows
If gvr.DataKey("CveVenta").ToEntero > 0 Then
Select Case gvr.DataKey("TipoDocumento").ToString
diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx
index b74acaff7..56113522c 100644
--- a/Ventas/Ventas.aspx
+++ b/Ventas/Ventas.aspx
@@ -496,7 +496,8 @@
-
+
+
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index 3ce4c3d19..40ec22a04 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -4673,6 +4673,7 @@ Partial Class Ventas
ChkDireccionEnvio.Enabled = False
DdlDireccionEnvio.Visible = True
trDireccionEnvio.Visible = True
+ If UsuarioActual.TienePermisoProceso(333) Then LnkEditarDir.Visible = True
End If
'ESTATUS FACTURA
@@ -5766,7 +5767,7 @@ Partial Class Ventas
End If
'HABILITA LA OPCION DE DIRECCION DE ENVIO
- If UsuarioActual.CveEmpresa.Contiene(1, 72, 119) Then
+ If UsuarioActual.CveEmpresa.Contiene(1, 72, 119, 140) Then
trDireccionEnvio.Visible = True
CargaDireccionesEnvio()
End If
@@ -32632,5 +32633,28 @@ Partial Class Ventas
Public Property CveVenta As Integer
Public Property FolioFiscal As String
End Class
+
+ Protected Sub LnkEditarDir_Click(sender As Object, e As EventArgs)
+ DdlDireccionEnvio.Enabled = True
+ LnkEditarDir.Visible = False
+ LnkAplicarDir.Visible = True
+ End Sub
+
+ Protected Sub LnkAplicarDir_Click(sender As Object, e As EventArgs)
+ Dim ProcesoOK As Boolean = True
+
+ Dim ObjVentas As New ClsVentas()
+ If Not ObjVentas.UpdateDireccionEnvioVenta(CveVenta, DdlDireccionEnvio.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
+ ProcesoOK = False
+ End If
+ ObjVentas.Dispose()
+
+ If ProcesoOK Then
+ Alert("Dirección Actualizada correctamente.", ModExtensiones.TipoMensaje.ToastInformacion)
+ LnkAplicarDir.Visible = False
+ LnkEditarDir.Visible = True
+ End If
+
+ End Sub
End Class