This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2021-12-17 08:19:30 -07:00
31 changed files with 404 additions and 164 deletions

View File

@@ -178,27 +178,18 @@ Partial Class ACumuladores_RepIndicadorDiario
Dim FechaI = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", "-1", txtFechaI.Text) Dim FechaI = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", "-1", txtFechaI.Text)
Dim FechaF = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", "-1", txtFechaF.Text) Dim FechaF = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", "-1", txtFechaF.Text)
Dim FechaIn As String = $"&emsp;<b>Fecha Inicio:</b> {txtFechaI.Text}" Dim FechaIn As String = $"&emsp;<b>Fecha Inicio:</b> {txtFechaI.Text}"
Dim FechaFn As String = $"&emsp;<b>Fecha Fin:</b> {txtFechaF.Text}" Dim FechaFn As String = $"&emsp;<b>Fecha Fin:</b> {txtFechaF.Text}"
If txtFechaI.Text = "" Then FechaIn = "" If txtFechaI.Text = "" Then FechaIn = ""
If txtFechaF.Text = "" Then FechaFn = "" If txtFechaF.Text = "" Then FechaFn = ""
Dim SubProyecto = If(DdlSubProyecto.SelectedItem.Text = "", "", $"&emsp;<b>SubProyecto:</b> {DdlSubProyecto.SelectedItem.Text}") Dim SubProyecto = If(DdlSubProyecto.SelectedItem.Text = "", "", $"&emsp;<b>SubProyecto:</b> {DdlSubProyecto.SelectedItem.Text}")
Dim FechaIF, FechaFF As String Dim FechaIF, FechaFF As String
FechaIF = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1") FechaIF = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
FechaFF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1") FechaFF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then 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 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) Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)

View File

@@ -781,7 +781,7 @@ Public Class ClsGPS
Velocidad = Row("SPD").ToString.ToDouble Velocidad = Row("SPD").ToString.ToDouble
Fecha = Row("FechaTrama").ToString Fecha = Row("FechaTrama").ToString
KMRecorridos = Row("KMRecorridos").ToString.ToDouble 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 If Velocidad > 1 Then

View File

@@ -4942,14 +4942,8 @@ Public Class ClsPaginas
PaginaDict.Add("/Inventarios/RepExistenciaLote.aspx".ToUpper(), 109) PaginaDict.Add("/Inventarios/RepExistenciaLote.aspx".ToUpper(), 109)
PaginaDict.Add("/Inventarios/CatUnidades.aspx".ToUpper(), 2056) 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("/Inventarios/EntregaAlmacenRuta.aspx".ToUpper(), 1320)
PaginaDict.Add("/General/RepEntregaAlmacenRuta.aspx".ToUpper(), 1319) PaginaDict.Add("/Inventarios/RepEntregaAlmacenRuta.aspx".ToUpper(), 1319)

View File

@@ -1210,13 +1210,13 @@ Partial Class Bancos_ProveedoresAbonar
importeMX = ImporteMovimiento importeMX = ImporteMovimiento
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago) 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 ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago) ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
importeMX = ImporteMovimiento * tipoCambioCompra importeMX = ImporteMovimiento * tipoCambioCompra
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago) ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioCompra, TipoCambioPago) importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
End If End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero) ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero) importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)

View File

@@ -4618,7 +4618,7 @@ Partial Class Compras_Compras
'End If 'End If
'METODO DE PREPOLIZA DE ALMACEN '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 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 ImporteAlmacen > 0 Then
If Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then If Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
@@ -6078,7 +6078,7 @@ Partial Class Compras_Compras
End If End If
'si aplica NC sobre mov de almacen, el impuesto lo toma de la Factura.para la consideracion de mcia en tránsito '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 Dim diferenciaTransito As Decimal = 0
For Each Gvr As GridViewRow In GVNCInvAlmacen.Rows 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("CveTipoGasto").ToString.ToEntero <> row2("CveTipoGasto").ToString.ToEntero) Or
(row1("Total").ToString.ToDouble <> row2("Total").ToString.ToDouble) Or (row1("Total").ToString.ToDouble <> row2("Total").ToString.ToDouble) Or
(row1("NoDeducible").ToString <> row2("NoDeducible").ToString) 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 (row1("CvePS").ToString.ToEntero <> row2("CvePS").ToString.ToEntero) Then
Return False Return False
End If End If

View File

@@ -398,7 +398,7 @@
<asp:TemplateField Visible="false"> <asp:TemplateField Visible="false">
<HeaderTemplate>Ot. Ing.</HeaderTemplate> <HeaderTemplate>Ot. Ing.</HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtComision" Width="80px" runat="server" Style="text-align: right;"></asp:TextBox>&nbsp; <asp:TextBox ID="TxtComision" Width="80px" runat="server" Style="text-align: right;" CssClass="CsTxtComision"></asp:TextBox>&nbsp;
<asp:RangeValidator ID="RVComision" runat="server" Enabled="false" ErrorMessage="*" ControlToValidate="TxtComision" Display="Dynamic" Type="Double"></asp:RangeValidator> <asp:RangeValidator ID="RVComision" runat="server" Enabled="false" ErrorMessage="*" ControlToValidate="TxtComision" Display="Dynamic" Type="Double"></asp:RangeValidator>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
@@ -459,6 +459,21 @@
txt.value = ""; 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(); Excedente = SumaValores();
if (Excedente > 0) { if (Excedente > 0) {
@@ -666,9 +681,28 @@
$get('TxtTotal').value = FormatoNumero(Suma + (ToDouble($get('TxtOtrosImportes').value * -1)), 2); $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) { if (Excedente > 0) {
txt.value = FormatoNumero(ToDouble(txt.value) - Excedente, 2); 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);
} }

View File

@@ -744,9 +744,7 @@ Partial Class Compras_ReembolsosComprobaciones
End If End If
Dim ComisionTmp As Decimal = gvr.FCTextBox("TxtComision").Text.ToDecimal
'Otros Ingresos 'Otros Ingresos
If (ChkAjusteOI.Checked Or ChkOtrosIngresosCheque.Checked) AndAlso gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then 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 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 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 '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" MsgError = "Detalle"
End If End If
End If End If

View File

@@ -174,7 +174,7 @@
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<br /> <br />
<div class="col-md-8"> <div class="col-md-8" >
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" data-sort="true" DataKeyNames="GPO,Cantidad,Total,Moneda" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros con los filtros especificados" <asp:GridView ID="GvDatos" runat="server" data-sort="true" DataKeyNames="GPO,Cantidad,Total,Moneda" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros con los filtros especificados"

View File

@@ -192,12 +192,19 @@ Partial Class Compras_RepComprasAF
If CvePS = "" Or CvePS = "0" Then If CvePS = "" Or CvePS = "0" Then
CvePS = "-1" CvePS = "-1"
End If End If
Dim Liga As String = $"/Compras/RepComprasAFDetalle.aspx?GPO={DdlGrupo.SelectedValue}&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")}"
If e.Row.DBCampo("Orden") = "1" Then If e.Row.DBCampo("Orden") = "1" Then
Dim Liga As String = $"/Compras/RepComprasAFDetalle.aspx?GPO={DdlGrupo.SelectedValue}&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("<a class='{0}' target='_blank' href='{1}'>{2}</a>", "Texto", Liga, e.Row.DataKey("GPO").ToString) e.Row.Cells(0).Text = String.Format("<a class='{0}' target='_blank' href='{1}'>{2}</a>", "Texto", Liga, e.Row.DataKey("GPO").ToString)
Else Else
e.Row.BackColor = Drawing.Color.LightGray 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("<a style='font-weight:bold' class='{0}' target='_blank' href='{1}'>{2}</a>", "Texto", Liga, e.Row.DataKey("Moneda").ToString)
End If End If
End If End If
End Sub End Sub

View File

@@ -317,6 +317,7 @@ Partial Class Compras_RepComprasAFDetalle
e.Row.Cells(0).Text = String.Format("<a class='{0}' target='_blank' href='{1}'>{2}</a>", "Texto", Liga, e.Row.DBCampo("SerieFolio").ToString) e.Row.Cells(0).Text = String.Format("<a class='{0}' target='_blank' href='{1}'>{2}</a>", "Texto", Liga, e.Row.DBCampo("SerieFolio").ToString)
Else Else
e.Row.BackColor = Drawing.Color.LightGray e.Row.BackColor = Drawing.Color.LightGray
e.Row.Font.Bold = True
End If End If
End If End If

View File

@@ -893,7 +893,7 @@ Partial Class ContabilidadC_RegPrePolizaS
'validaciones '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) Alert($"La suma de los movimientos no son iguales ({TotalCargos}-{TotalAbonos})", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
End If End If

View File

@@ -1749,12 +1749,6 @@
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>
</Style> </Style>
</TextRun> </TextRun>
<TextRun>
<Value>=Today</Value>
<Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns> </TextRuns>
<Style /> <Style />
</Paragraph> </Paragraph>
@@ -1763,7 +1757,7 @@
<Top>3.29402cm</Top> <Top>3.29402cm</Top>
<Left>0.21596cm</Left> <Left>0.21596cm</Left>
<Height>0.46771cm</Height> <Height>0.46771cm</Height>
<Width>6.86562cm</Width> <Width>2.66687cm</Width>
<ZIndex>37</ZIndex> <ZIndex>37</ZIndex>
<Style> <Style>
<Border> <Border>
@@ -1775,6 +1769,42 @@
<PaddingBottom>2pt</PaddingBottom> <PaddingBottom>2pt</PaddingBottom>
</Style> </Style>
</Textbox> </Textbox>
<Textbox Name="Textbox75">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Today</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Normal</FontWeight>
<Format>d</Format>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox8</rd:DefaultName>
<Top>3.29402cm</Top>
<Left>2.95339cm</Left>
<Height>0.46771cm</Height>
<Width>1.91468cm</Width>
<ZIndex>38</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems> </ReportItems>
<KeepTogether>true</KeepTogether> <KeepTogether>true</KeepTogether>
<Top>17.96022cm</Top> <Top>17.96022cm</Top>

View File

@@ -1602,8 +1602,8 @@
</Style> </Style>
</Textbox> </Textbox>
<Image Name="Image1"> <Image Name="Image1">
<Source>Database</Source> <Source>External</Source>
<Value>=System.Convert.FromBase64String(Parameters!LogoPath.Value )</Value> <Value>=Parameters!LogoPath.Value</Value>
<MIMEType>image/png</MIMEType> <MIMEType>image/png</MIMEType>
<Sizing>FitProportional</Sizing> <Sizing>FitProportional</Sizing>
<Height>0.46171in</Height> <Height>0.46171in</Height>

View File

@@ -36,18 +36,18 @@
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCamion,Placa,Especificacion,ConfigCartaPorte,Anio,CveTipoPermisoSCT,NumPermisoSCT,NombreAseguradora,NumPolizaSeguro,NombreAseguradoraMedioAmbiente,NumPolizaSeguroMedioAmbiente,NombreAseguradoraCarga,NumPolizaSeguroCarga" <asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCamion,Placa,Especificacion,ConfigCartaPorte,Anio,CveTipoPermisoSCT,NumPermisoSCT,NombreAseguradora,NumPolizaSeguro,NombreAseguradoraMedioAmbiente,NumPolizaSeguroMedioAmbiente,NombreAseguradoraCarga,NumPolizaSeguroCarga"
EmptyDataText="No se Encontraron Unidades" ToolTip="Listado de Unidades" CssClass="table table-striped table-advance table-hover mysmallbtn" Style="margin-top: -10px; width: 100%" GridLines="None"> EmptyDataText="No se Encontraron Unidades" ToolTip="Listado de Unidades" CssClass="table table-striped table-advance table-hover mysmallbtn" Style="margin-top: -10px; width: 100%" GridLines="None">
<Columns> <Columns>
<asp:BoundField HeaderText="Placa" DataField="Placa" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Unidad" DataField="Especificacion" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Especificación" DataField="Especificacion" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Placa" DataField="Placa" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Config Carta Porte" DataField="ConfigCartaPorte" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Config Carta Porte" DataField="ConfigCartaPorte" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Tipo Permiso SCT" DataField="ClaveTipoPermisoSCT" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Tipo Permiso SCT" DataField="ClaveTipoPermisoSCT" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Número Permiso SCT" DataField="NumPermisoSCT" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Permiso SCT" DataField="NumPermisoSCT" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Nombre Aseguradora" DataField="NombreAseguradora" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Aseguradora" DataField="NombreAseguradora" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Numero Póliza Seguro" DataField="NumPolizaSeguro" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Póliza Seguro" DataField="NumPolizaSeguro" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataField="FechaIng" ItemStyle-Width="15%" DataFormatString="{0:G}" /> <asp:BoundField HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataField="FechaIng" ItemStyle-Width="5%" DataFormatString="{0:d}" />
<asp:BoundField HeaderText="Usuario" DataField="Usuario" /> <asp:BoundField HeaderText="Usuario" DataField="Usuario" />
<asp:TemplateField ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar"> <asp:TemplateField ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
<ItemTemplate> <ItemTemplate>
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Eitar" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" /> <asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Eitar" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" />
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Eliminar' class='icon-trash' title='Eliminar' ></i>" data-toggle="confirmation" data-popout="true" data-original-title="Eliminar" data-btn-ok-label="Si" /> <asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Eliminar' class='icon-trash' title='Eliminar' ></i>" data-toggle="confirmation" data-popout="true" data-original-title="Eliminar" data-btn-ok-label="Si" />
@@ -57,13 +57,7 @@
</asp:GridView> </asp:GridView>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<div id="DivAgregarUnidad" class="modal ADS fade" role="dialog"> <div id="DivAgregarUnidad" class="modal ADS fade" role="dialog">
<div class="modal-dialog "> <div class="modal-dialog ">
@@ -77,10 +71,15 @@
<asp:Literal runat="server" ID="LtlTituloModal" Text="Agregar Unidad"></asp:Literal></h4> <asp:Literal runat="server" ID="LtlTituloModal" Text="Agregar Unidad"></asp:Literal></h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="row">
<div class="row"> <div class="form-group form-md-line-input input-iconright col-md-12">
<asp:TextBox ID="TxtEspecificacionNuevo" CssClass="form-control" runat="server" MaxLength="100"></asp:TextBox>
<label for="<%= TxtEspecificacionNuevo.ClientID.ToString()%>">Unidad:</label>
<asp:RequiredFieldValidator runat="server" ID="RfvTxtEspecificacionNuevo" ControlToValidate="TxtEspecificacionNuevo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Especificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright col-md-6"> <div class="form-group form-md-line-input input-iconright col-md-6">
@@ -89,10 +88,7 @@
<asp:RequiredFieldValidator runat="server" ID="RfvTxtPlacaNuevo" ControlToValidate="TxtPlacaNuevo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Placa''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator runat="server" ID="RfvTxtPlacaNuevo" ControlToValidate="TxtPlacaNuevo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Placa''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator runat="server" ID="RevTxtPlacaNuevo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Placa''</b> no contiene los caracteres suficientes." ControlToValidate="TxtPlacaNuevo" ValidationExpression="^.{6,8}$" ValidationGroup="GrpUnidad"></asp:RegularExpressionValidator> <asp:RegularExpressionValidator runat="server" ID="RevTxtPlacaNuevo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Placa''</b> no contiene los caracteres suficientes." ControlToValidate="TxtPlacaNuevo" ValidationExpression="^.{6,8}$" ValidationGroup="GrpUnidad"></asp:RegularExpressionValidator>
<i></i> <i></i>
</div> </div>
<div class="form-group form-md-line-input input-iconright col-md-6"> <div class="form-group form-md-line-input input-iconright col-md-6">
<asp:TextBox ID="TxtAnio" CssClass="form-control" runat="server" MaxLength="4"></asp:TextBox> <asp:TextBox ID="TxtAnio" CssClass="form-control" runat="server" MaxLength="4"></asp:TextBox>
<label for="<%= TxtAnio.ClientID.ToString()%>">Año:</label> <label for="<%= TxtAnio.ClientID.ToString()%>">Año:</label>
@@ -104,12 +100,6 @@
</div> </div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtEspecificacionNuevo" CssClass="form-control" runat="server" MaxLength="100"></asp:TextBox>
<label for="<%= TxtEspecificacionNuevo.ClientID.ToString()%>">Especificación:</label>
<asp:RequiredFieldValidator runat="server" ID="RfvTxtEspecificacionNuevo" ControlToValidate="TxtEspecificacionNuevo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Especificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlConfigAuto" CssClass="form-control input-sm select2me" Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="false" CausesValidation="true" DataTextField="ClaveConfigAutoTransporteDescripcion" DataValueField="ClaveConfigAutoTransporte" Style="padding: 0px"> <asp:DropDownList ID="DdlConfigAuto" CssClass="form-control input-sm select2me" Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="false" CausesValidation="true" DataTextField="ClaveConfigAutoTransporteDescripcion" DataValueField="ClaveConfigAutoTransporte" Style="padding: 0px">

View File

@@ -892,6 +892,8 @@ Partial Class Inventarios_Consignaciones
End If End If
If Not ErrorMovInv Then If Not ErrorMovInv Then
'falta generar la prepoliza
ObjInventario.Commit() ObjInventario.Commit()
Dim Msg As New StringBuilder Dim Msg As New StringBuilder
Msg.AppendFormat("Se realizo con exito la devolución de consignación") Msg.AppendFormat("Se realizo con exito la devolución de consignación")

View File

@@ -163,6 +163,7 @@
<td>Dirección Envío:</td> <td>Dirección Envío:</td>
<td> <td>
<asp:Label Text="" ID="LblDirEnvio" runat="server" /> <asp:Label Text="" ID="LblDirEnvio" runat="server" />
<asp:LinkButton ID="LnkEditarDir" runat="server" OnClick="LnkEditarDir_Click" AlternateText="Editar Dirección" ToolTip="Editar Dirección" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
</td> </td>
</tr> </tr>
</table> </table>
@@ -279,6 +280,44 @@
</div> </div>
<div id="DivEditarEntrega" class="modal ADS fade" role="dialog">
<div class="modal-dialog">
<asp:UpdatePanel ID="UpModalEditarentrega" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="H1" runat="server">Editar Dirección</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="form-group col-md-6 form-md-line-input input-iconright">
<asp:HiddenField ID="HdnCveVenta" runat="server" />
<asp:DropDownList ID="DdlModalDireccionEnvio" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="DireccionEnvio" DataValueField="CveDireccionEnvio" Class="table-group-action-input form-control input-inline input-small input-sm select2me"></asp:DropDownList>
<label for="<%= DdlModalDireccionEnvio.ClientID.ToString()%>">Dirección Origen:</label>
</div>
<asp:RequiredFieldValidator ID="RfvDdlModalDireccionEnvio" runat="server" ControlToValidate="DdlModalDireccionEnvio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Dirección Origen''</b> es necesario." InitialValue="-1" ValidationGroup="GrpModalEditarentrega"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VceDdlModalDireccionEnvio" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlModalDireccionEnvio" Width="250px" PopupPosition="BottomLeft"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<asp:Button ID="BtnModalEditarentrega" runat="server" OnClick="BtnModalEditarentrega_Click" CssClass="btn btn-success" Text="Actualizar" ValidationGroup="GrpModalEditarentrega" />
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
<asp:UpdatePanel ID="UpPendientes" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpPendientes" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>

View File

@@ -221,6 +221,14 @@ Partial Class Inventarios_EntregaAlmacen
ViewState("CveCliente") = value ViewState("CveCliente") = value
End Set End Set
End Property 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 Private Property CveMovimiento As Integer
Get Get
Return CType(ViewState("CveMovimiento"), Integer) Return CType(ViewState("CveMovimiento"), Integer)
@@ -598,20 +606,21 @@ Partial Class Inventarios_EntregaAlmacen
trObsAlmacen.Visible = drE("ObservacionesAlmacen").ToString() <> "" trObsAlmacen.Visible = drE("ObservacionesAlmacen").ToString() <> ""
LbObservacionesAlmacen.Text = drE("ObservacionesAlmacen").ToString() LbObservacionesAlmacen.Text = drE("ObservacionesAlmacen").ToString()
CveVentaSurtir = CveVenta CveVentaSurtir = CveVenta
CveAlmacenTraspasoDestino = DtDatos.Rows(0)(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem", "CveAlmacenTraspasoOrigen", "CveAlmacenTraspasoDestino")).ToString().ToEntero() CveAlmacenTraspasoDestino = drE(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem", "CveAlmacenTraspasoOrigen", "CveAlmacenTraspasoDestino")).ToString().ToEntero()
CveAlmacenTraspasoOrigen = DtDatos.Rows(0)(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem", "CveAlmacenTraspasoDestino", "CveAlmacenTraspasoOrigen")).ToString().ToEntero() CveAlmacenTraspasoOrigen = drE(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem", "CveAlmacenTraspasoDestino", "CveAlmacenTraspasoOrigen")).ToString().ToEntero()
CveContrato = DtDatos.Rows(0)("CveContrato").ToString().ToEntero() CveContrato = drE("CveContrato").ToString().ToEntero()
CveVendedor = DtDatos.Rows(0)("CveVendedor").ToString().ToEntero() CveVendedor = drE("CveVendedor").ToString().ToEntero()
CveCliente = DtDatos.Rows(0)("CveCliente").ToString().ToEntero() CveCliente = drE("CveCliente").ToString().ToEntero()
ClienteEntregaPersonal(CveCliente) ClienteEntregaPersonal(CveCliente)
CveSubProyecto = DtDatos.Rows(0)("CveSubProyecto").ToString().ToEntero() CveSubProyecto = drE("CveSubProyecto").ToString().ToEntero()
EsInterno = CBool(DtDatos.Rows(0)("EsInterno").ToString()) 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 trDireccionEnvio.Visible = True
'carga la dirección de envío 'carga la dirección de envío
Dim ObjClientes As New ClsClientes 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("") Dim drenvio As DataRow = ObjClientes.DtResultados.FiltroPrimero("")
LblDirEnvio.Text = drenvio("SucursalClienteVentaDireccion").ToString LblDirEnvio.Text = drenvio("SucursalClienteVentaDireccion").ToString
End If End If
@@ -3988,4 +3997,69 @@ Partial Class Inventarios_EntregaAlmacen
End Sub End Sub
#End Region #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 End Class

View File

@@ -112,13 +112,12 @@
<asp:RangeValidator ID="RVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" Type="Date" MinimumValue="01/01/2000" MaximumValue="01/01/2000" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no puede ser mayor al dia actual. Por favor verifcar." ValidationGroup="GrpGuardar"></asp:RangeValidator> <asp:RangeValidator ID="RVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" Type="Date" MinimumValue="01/01/2000" MaximumValue="01/01/2000" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no puede ser mayor al dia actual. Por favor verifcar." ValidationGroup="GrpGuardar"></asp:RangeValidator>
<ajax:ValidatorCalloutExtender ID="VCOFecha3" runat="server" HighlightCssClass="vco" TargetControlID="RVFecha" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCOFecha3" runat="server" HighlightCssClass="vco" TargetControlID="RVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div>
</div> <label class="col-md-2">Transitorio:</label>
<label class="col-md-2">Transitorio:</label>
<div class="col-md-1" style="padding-left: 7px;"> <div class="col-md-1" style="padding-left: 7px;">
<asp:CheckBox ID="ChkTransitorio" AutoPostBack="true" OnCheckedChanged="ChkTransitorio_CheckedChanged" CssClass="md-checksd" runat="server" /> <asp:CheckBox ID="ChkTransitorio" AutoPostBack="true" OnCheckedChanged="ChkTransitorio_CheckedChanged" CssClass="md-checksd" runat="server" />
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<label class="col-md-2">Almacén Origen:</label> <label class="col-md-2">Almacén Origen:</label>
@@ -146,15 +145,12 @@
</div> </div>
<div id="DivTransitorio" style="display: none;"> <div id="DivResponsable" runat="server" visible="false">
<div class="row"> <div class="row">
<label class="col-md-2">Responsable:</label>
<asp:Label AssociatedControlID="TxtResponsable" ID="LblResponsable" runat="server" Text="Responsable:" CssClass="col-md-2"></asp:Label> <div class="col-md-2" id="div1" >
<asp:Panel CssClass="col-md-2" ID="divResponsable" runat="server">
<asp:TextBox runat="server" Text="" CssClass="form-control input-sm" ID="TxtResponsable" /> <asp:TextBox runat="server" Text="" CssClass="form-control input-sm" ID="TxtResponsable" />
</asp:Panel> </div>
</div> </div>
</div> </div>
@@ -175,14 +171,11 @@
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
<asp:UpdatePanel ID="UpEmitirTransitorio" runat="server" UpdateMode="Conditional">
<div id="DivDocChofer" class="col-md-4 " style="display: none;" >
<asp:UpdatePanel ID="UpDocChofer" runat="server">
<ContentTemplate> <ContentTemplate>
<div id="DivEmitirTransitorio" class="col-md-4 " runat="server" visible="false" >
<div class="portlet light xspadding traspasorow bordered"> <div class="portlet light xspadding traspasorow bordered">
<div class="portlet-title"> <div class="portlet-title">
<div class="caption font-green"> <div class="caption font-green">
@@ -225,7 +218,7 @@
<ajax:ValidatorCalloutExtender ID="VceDdlChofer" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlChofer" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VceDdlChofer" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlChofer" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<div class="row" class="rowpadding"> <div class="row rowpadding">
<label class="col-md-3">Unidad:</label> <label class="col-md-3">Unidad:</label>
<div class="col-md-9"> <div class="col-md-9">
<asp:DropDownList runat="server" ID="DdlUnidadCamion" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca"></asp:DropDownList> <asp:DropDownList runat="server" ID="DdlUnidadCamion" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca"></asp:DropDownList>
@@ -247,10 +240,10 @@
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator1" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
</div> </div>
<div class="row rowpadding" runat="server" id="divFechaEnvio" visible="false"> <div class="row rowpadding" runat="server" id="divFechaLlegada" >
<label class="col-md-3">F. Llegada:</label> <label class="col-md-3">F. Llegada:</label>
<div class="col-md-9" style="padding-top: 0px;" > <div class="col-md-4" style="padding-top: 0px;" >
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 125px !important;"> <div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 125px !important;">
<asp:TextBox ID="TxtFechaLlegada" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="80px" ClientIDMode="Static"></asp:TextBox> <asp:TextBox ID="TxtFechaLlegada" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="80px" ClientIDMode="Static"></asp:TextBox>
<span class="input-group-btn "> <span class="input-group-btn ">
@@ -262,13 +255,20 @@
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator2" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator2" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<label class="col-md-1">Dist:</label>
<div class="col-md-3">
<asp:TextBox ID="TxtDistancia" runat="server" CssClass="form-control input-sm" Width="100%" Text="1"></asp:TextBox>
<ajax:TextBoxWatermarkExtender ID="TBWEDistancia" runat="server" TargetControlID="TxtDistancia" WatermarkText="Distancia" WatermarkCssClass="watermarked" />
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</ContentTemplate>
</div>
</ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</div>
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpMov"> <asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpMov">
<ContentTemplate> <ContentTemplate>

View File

@@ -178,14 +178,8 @@ Partial Class Inventarios_TraspasoAlmacen
divGastoIndirecto.Visible = False divGastoIndirecto.Visible = False
LblGastoIndirecto.Visible = False LblGastoIndirecto.Visible = False
divResponsable.Visible = False divResponsable.Visible = False
LblResponsable.Visible = False
End If End If
If UsuarioActual.Empresa.Funcionalidad(161) = "1" Then
divFechaEnvio.Visible = True
End If
CargaCombos() CargaCombos()
CreaDT() CreaDT()
AlmacenTransitorioDefaults() AlmacenTransitorioDefaults()
@@ -200,7 +194,8 @@ Partial Class Inventarios_TraspasoAlmacen
DivCodigoSeriePS.Visible = False DivCodigoSeriePS.Visible = False
End If End If
If ChkTransitorio.Checked Then If ChkTransitorio.Checked Then
RegistraScript("$('#DivTransitorio').show(0);$('#DivGastoIndirecto').show(0);$('#DivDocChofer').show(0);") RegistraScript(" $('#DivGastoIndirecto').show(0); ")
DivResponsable.Visible = True
DivTransitorio2.Visible = True DivTransitorio2.Visible = True
End If End If
@@ -217,16 +212,10 @@ Partial Class Inventarios_TraspasoAlmacen
ChkEmitirCartaPorte.Visible = True ChkEmitirCartaPorte.Visible = True
Dim HabilitarValidators As Boolean = UsuarioActual.CveEmpresa.Contiene(119)
RfvDdlChofer.Enabled = HabilitarValidators
RfvDdlUnidadCamion.Enabled = HabilitarValidators
End If End If
CantidadTotal = 0 CantidadTotal = 0
CvePS = 0 CvePS = 0
TipoSeccionAlmacen = 0 TipoSeccionAlmacen = 0
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 Then If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 Then
@@ -241,7 +230,8 @@ Partial Class Inventarios_TraspasoAlmacen
Else Else
If ChkTransitorio.Checked Then If ChkTransitorio.Checked Then
RegistraScript("$('#DivTransitorio').show(0);$('#DivGastoIndirecto').show(0);$('#DivDocChofer').show(0);") RegistraScript(" $('#DivGastoIndirecto').show(0); ")
DivResponsable.Visible = True
DivTransitorio2.Visible = True DivTransitorio2.Visible = True
End If End If
End If End If
@@ -741,16 +731,12 @@ Partial Class Inventarios_TraspasoAlmacen
#Region " GUARDAR " #Region " GUARDAR "
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
If ChkEmitirTimbrado.Checked Then If ChkEmitirTimbrado.Checked Then
If DdlChofer.SelectedValue.ToEntero <= 0 Then If DdlChofer.SelectedValue.ToEntero <= 0 Then
Alert("Debe de seleccionar un chofer") Alert("Debe de seleccionar un chofer")
Exit Sub Exit Sub
End If End If
If DdlUnidadCamion.SelectedValue.ToEntero <= 0 Then If DdlUnidadCamion.SelectedValue.ToEntero <= 0 Then
Alert("Debe de seleccionar una unidad") Alert("Debe de seleccionar una unidad")
Exit Sub Exit Sub
@@ -770,21 +756,21 @@ Partial Class Inventarios_TraspasoAlmacen
If TxtResponsable.Text.Trim = "" And Not UsuarioActual.CveEmpresa.Contiene(119) Then If TxtResponsable.Text.Trim = "" And Not UsuarioActual.CveEmpresa.Contiene(119) Then
Alert("Debe seleccionar un responsable para el traspaso transitorio.", TipoMensaje.MsgAdvertencia) Alert("Debe seleccionar un responsable para el traspaso transitorio.", TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')") 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 Exit Sub
End If End If
If DdlAlmacenTransitorio.SelectedValue.ToEntero <= 0 Then If DdlAlmacenTransitorio.SelectedValue.ToEntero <= 0 Then
Alert("Debe seleccionar un almacen transitorio.", TipoMensaje.MsgAdvertencia) Alert("Debe seleccionar un almacen transitorio.", TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')") 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 Exit Sub
End If End If
If DdlChofer.SelectedValue.ToEntero <= 0 And UsuarioActual.CveEmpresa.Contiene(119) Then If DdlChofer.SelectedValue.ToEntero <= 0 And UsuarioActual.CveEmpresa.Contiene(119) Then
Alert("Debe seleccionar un Chofer", TipoMensaje.MsgAdvertencia) Alert("Debe seleccionar un Chofer", TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')") 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 Exit Sub
End If End If
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) 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") RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'');", "SonidoError")
ChkTransitorio.Checked = True 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 Exit Sub
End If End If
End If End If
@@ -850,7 +836,7 @@ Partial Class Inventarios_TraspasoAlmacen
For Each dr As DataRow In DtMovimientos.Rows For Each dr As DataRow In DtMovimientos.Rows
If dr("EstatusExistencia").ToString = "-1" Then If dr("EstatusExistencia").ToString = "-1" Then
Alert("Tiene que rectificar los movimientos con error.", TipoMensaje.MsgError) 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 Exit Sub
End If End If
Next Next
@@ -1197,7 +1183,7 @@ Partial Class Inventarios_TraspasoAlmacen
MensajeAlert.AppendFormat("<br/> Folio de Salida: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{0}</a></b>", FolioSalida, CveMovimientoSalida) MensajeAlert.AppendFormat("<br/> Folio de Salida: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{0}</a></b>", FolioSalida, CveMovimientoSalida)
MensajeAlert.AppendFormat("<br/><a target='_blank' class='Texto' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Reporte</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoSalida))) MensajeAlert.AppendFormat("<br/><a target='_blank' class='Texto' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Reporte</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoSalida)))
If CveMovimientoVirtualSalida > 0 Then MensajeAlert.AppendFormat("<br/>Folio Virtual: <b><a class='Texto' href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{2}</a></b>&nbsp;<br/><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Salida Virtual</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtualSalida)), CveMovimientoVirtualSalida, FolioVirtualSalida) If CveMovimientoVirtualSalida > 0 Then MensajeAlert.AppendFormat("<br/>Folio Virtual: <b><a class='Texto' href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{2}</a></b>&nbsp;<br/><a class='Texto' target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Salida Virtual</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtualSalida)), CveMovimientoVirtualSalida, FolioVirtualSalida)
If Not ChkTransitorio.Checked Then If Not ChkTransitorio.Checked Then
MensajeAlert.AppendFormat("<br/><br/> Folio de Entrada: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{0}</a></b>", FolioEntrada, CveMovimientoEntrada) MensajeAlert.AppendFormat("<br/><br/> Folio de Entrada: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{0}</a></b>", FolioEntrada, CveMovimientoEntrada)
@@ -1652,12 +1638,21 @@ Partial Class Inventarios_TraspasoAlmacen
'DdlResponsable.SelectedValue = "-1" 'DdlResponsable.SelectedValue = "-1"
TxtResponsable.Text = "" TxtResponsable.Text = ""
TxtGastoIndirecto.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 DivTransitorio2.Visible = True
If UsuarioActual.CveEmpresa.Contiene(119) Then
ChkEmitirTimbrado.Checked = True
End If
Else Else
RegistraScript("$('#DivTransitorio').hide(500);$('#DivGastoIndirecto').hide(500);$('#DivDocChofer').hide(500);") RegistraScript(" $('#DivGastoIndirecto').hide(500);")
DivResponsable.Visible = False
DivTransitorio2.Visible = True DivTransitorio2.Visible = True
DivEmitirTransitorio.Visible = False
ChkEmitirTimbrado.Checked = False
End If End If
UpEmitirTransitorio.Update()
CargaAlmacenDestino() CargaAlmacenDestino()
SiguienteFolio(If(ChkTransitorio.Checked, 9, 8)) SiguienteFolio(If(ChkTransitorio.Checked, 9, 8))
@@ -2258,7 +2253,7 @@ Partial Class Inventarios_TraspasoAlmacen
CargaRecepcion() CargaRecepcion()
Else Else
Alert("No hay movimientos para el traspaso", TipoMensaje.MsgAdvertencia) 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 If
End Sub End Sub

View File

@@ -870,14 +870,14 @@ Partial Class CatSubProyectos
Protected Sub DdlPais_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlPais_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaEstado() CargaEstado()
CargaMunicipio() CargaMunicipio()
CargaColonia() ' CargaColonia()
CargaLocalidad() ' CargaLocalidad()
End Sub End Sub
Protected Sub DdlEstado_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlEstado_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaMunicipio() CargaMunicipio()
CargaColonia() 'CargaColonia()
CargaLocalidad() 'CargaLocalidad()
End Sub End Sub
Protected Sub DdlMunicipio_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlMunicipio_SelectedIndexChanged(sender As Object, e As EventArgs)

View File

@@ -30,6 +30,7 @@
<asp:ListItem Text="Estados" Value="GlobalDTGralEstados"></asp:ListItem> <asp:ListItem Text="Estados" Value="GlobalDTGralEstados"></asp:ListItem>
<asp:ListItem Text="Municipios" Value="GlobalDTGralMunicipios"></asp:ListItem> <asp:ListItem Text="Municipios" Value="GlobalDTGralMunicipios"></asp:ListItem>
<asp:ListItem Text="Poblaciones" Value="GlobalDTGralPoblaciones"></asp:ListItem> <asp:ListItem Text="Poblaciones" Value="GlobalDTGralPoblaciones"></asp:ListItem>
<asp:ListItem Text="Colonias" Value="GlobalDTGralColonias"></asp:ListItem>
<asp:ListItem Text="Escolaridades" Value="GlobalDTGralEscolaridades"></asp:ListItem> <asp:ListItem Text="Escolaridades" Value="GlobalDTGralEscolaridades"></asp:ListItem>
<asp:ListItem Text="Almacen" Value="GlobalDTAlmacen"></asp:ListItem> <asp:ListItem Text="Almacen" Value="GlobalDTAlmacen"></asp:ListItem>
<asp:ListItem Text="Impuestos Locales" Value="GlobalDTImpuestosLocales"></asp:ListItem> <asp:ListItem Text="Impuestos Locales" Value="GlobalDTImpuestosLocales"></asp:ListItem>

View File

@@ -35,7 +35,9 @@ Partial Class Sistemas_CatSesiones
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTGralPaises" Then ElseIf DdlVariable.SelectedItem.Value = "GlobalDTGralPaises" Then
CargaPaises() CargaPaises()
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTGralEstados" Then ElseIf DdlVariable.SelectedItem.Value = "GlobalDTGralEstados" Then
CargaEstados() CargaEstados()
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTGralColonias" Then
CargaColonias()
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTGralMunicipios" Then ElseIf DdlVariable.SelectedItem.Value = "GlobalDTGralMunicipios" Then
CargaMunicipios() CargaMunicipios()
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTGralPoblaciones" Then ElseIf DdlVariable.SelectedItem.Value = "GlobalDTGralPoblaciones" Then
@@ -400,22 +402,33 @@ Partial Class Sistemas_CatSesiones
Private Sub CargaPaises() Private Sub CargaPaises()
Dim Gral As New ClsGenerales 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 If Gral.GetClasificacionPorcentaje(-1, -1, -1, -1, 1) Then Application("GlobalDTClasificacionPorcentaje") = Gral.DtResultados Else Application("GlobalDTClasificacionPorcentaje") = Nothing
Gral.Dispose() Gral.Dispose()
End Sub End Sub
Private Sub CargaEstados() Private Sub CargaEstados()
Dim Gral As New ClsGenerales GlobalDTGralEstados("") = Nothing
If Gral.GetGralEstados Then Application("GlobalDTGralEstados") = Gral.DtResultados Else Application("GlobalDTGralEstados") = Nothing 'Dim Gral As New ClsGenerales
Gral.Dispose() 'If Gral.GetGralEstados Then Application("GlobalDTGralEstados") = Gral.DtResultados Else Application("GlobalDTGralEstados") = Nothing
'Gral.Dispose()
End Sub 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() Private Sub CargaMunicipios()
Dim Gral As New ClsGenerales GlobalDTGralMunicipios("") = Nothing
If Gral.GetGralMunicipios Then Application("GlobalDTGralMunicipios") = Gral.DtResultados Else Application("GlobalDTGralMunicipios") = Nothing 'Dim Gral As New ClsGenerales
Gral.Dispose() 'If Gral.GetGralMunicipios Then Application("GlobalDTGralMunicipios") = Gral.DtResultados Else Application("GlobalDTGralMunicipios") = Nothing
'Gral.Dispose()
End Sub End Sub
Private Sub CargaPoblaciones() Private Sub CargaPoblaciones()

View File

@@ -262,7 +262,7 @@ Partial Class CatPS
End Sub End Sub
Protected Sub LBExcelPersonalizado_Click(Sender As Object, e As EventArgs) Handles LBExcelPersonalizado.Click 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 End Sub
Public Overrides Sub VerifyRenderingInServerForm(control As Control) Public Overrides Sub VerifyRenderingInServerForm(control As Control)

View File

@@ -107,7 +107,7 @@
<div class="row"> <div class="row">
<label class="col-md-2 truncate">Cliente:</label> <label class="col-md-2 truncate">Cliente:</label>
<div class="col-md-4"> <div class="col-md-4">
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"> <ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width:350px;">
</ADS:Dropdownlost> </ADS:Dropdownlost>
</div> </div>
</div> </div>

View File

@@ -257,7 +257,24 @@ Partial Class Ventas_Promociones
DdlSubProyecto.SelectedValue = Dr("CveSubProyecto").ToString DdlSubProyecto.SelectedValue = Dr("CveSubProyecto").ToString
DdlMarca.SelectedValue = Dr("CveMarca").ToString DdlMarca.SelectedValue = Dr("CveMarca").ToString
If Dr("CveVendedor").ToString.ToEntero > 0 Then DdlVendedor.SelectedValue = Dr("CveVendedor").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) ChkEstatus.Checked = If(Dr("Estatus").ToString = "True", True, False)
DdlMoneda.SelectedValueExist(Dr("CveMoneda").ToString) DdlMoneda.SelectedValueExist(Dr("CveMoneda").ToString)
DdlMarca.SelectedValueExist(Dr("CveMarca").ToString) DdlMarca.SelectedValueExist(Dr("CveMarca").ToString)

View File

@@ -906,8 +906,20 @@ Partial Class Ventas_RepProductosServiciosDetalle
If Drow("TipoDocumento").ToString.Trim <> String.Empty Then 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) Archivo = String.Format("{0}PDF/{1}/{2}.pdf", UsuarioActual.Empresa.Ruta.Replace("\", "/"), Drow("TipoDocumento").ToString, Drow("SerieFolio").ToString)
If File.Exists(Archivo) Then If File.Exists(Archivo) Then
archiveZip.CreateEntryFromFile(Archivo, Drow("SerieFolio").ToString & ".pdf") 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}<br />", Drow("TipoDocumento").ToString, SerieFolio, Archivo)
End If
End If
Else Else
HuboInexistentes = True HuboInexistentes = True
SBInexistentes.AppendFormat("Tipo {0}, Folio {1} - {2}<br />", Drow("TipoDocumento").ToString, SerieFolio, Archivo) SBInexistentes.AppendFormat("Tipo {0}, Folio {1} - {2}<br />", Drow("TipoDocumento").ToString, SerieFolio, Archivo)

View File

@@ -271,6 +271,14 @@
<asp:Literal ID="LtlSubTotal" runat="server" Text='<%# Eval("SubTotal", "{0:N2}") %>'></asp:Literal> <asp:Literal ID="LtlSubTotal" runat="server" Text='<%# Eval("SubTotal", "{0:N2}") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right" Visible="false">
<HeaderTemplate>
<asp:Label Text="Descuento" runat="server" CausesValidation="false"> </asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlDescuento" runat="server" Text='<%# Eval("Descuento", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right"> <asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate> <HeaderTemplate>
<asp:Label Text="IVA" runat="server" CausesValidation="false"> </asp:Label> <asp:Label Text="IVA" runat="server" CausesValidation="false"> </asp:Label>

View File

@@ -5,9 +5,8 @@ Imports System.Data
Imports Microsoft.Reporting.WebForms Imports Microsoft.Reporting.WebForms
Imports Extensiones Imports Extensiones
Partial Class RepRemisiones Partial Class RepRemisiones
Inherits ClsPaginas Inherits ClsPaginas
Private Shared missing As Object = System.Reflection.Missing.Value
#Region "PROPIEDADES" #Region "PROPIEDADES"
Private Property FechaI As String Private Property FechaI As String
Get Get
@@ -96,6 +95,7 @@ Partial Class RepRemisiones
GvDatos.DataSource = ObjVentas.DtResultados GvDatos.DataSource = ObjVentas.DtResultados
DtVentas = ObjVentas.DtResultados DtVentas = ObjVentas.DtResultados
End If End If
GvDatos.Columns(7).Visible = ObjVentas.DtResultados.SUMD("Descuento") > 0
ObjVentas.Dispose() ObjVentas.Dispose()
GvDatos.DataBind() GvDatos.DataBind()
@@ -131,17 +131,17 @@ Partial Class RepRemisiones
#End Region #End Region
#Region "CARGA COMBOS FILTRO" #Region "CARGA COMBOS FILTRO"
Private Sub CargaCliente() Private Sub CargaCliente()
'CargaClientes 'CargaClientes
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False) 'Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
If EsWS Then 'If EsWS Then
DdlClientes.setEsWebService(True) DdlClientes.setEsWebService(True)
Else ' Else
DdlClientes.setEsWebService(False) 'DdlClientes.setEsWebService(False)
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1) 'DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
DdlClientes.DataBind() 'DdlClientes.DataBind()
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1")) 'DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
End If 'End If
End Sub End Sub
Private Sub CargaSucursales() Private Sub CargaSucursales()

View File

@@ -876,7 +876,8 @@ Partial Class RepVentaDetalle
'D E S C A R G A I O N I C ! 'D E S C A R G A I O N I C !
Dim DescargaZIP As Ionic.Zip.ZipFile = New Ionic.Zip.ZipFile() Dim DescargaZIP As Ionic.Zip.ZipFile = New Ionic.Zip.ZipFile()
Using DescargaZIP Using DescargaZIP
DescargaZIP.UseZip64WhenSaving = Ionic.Zip.Zip64Option.AsNecessary
For Each gvr As GridViewRow In GvDatos.Rows For Each gvr As GridViewRow In GvDatos.Rows
If gvr.DataKey("CveVenta").ToEntero > 0 Then If gvr.DataKey("CveVenta").ToEntero > 0 Then
Select Case gvr.DataKey("TipoDocumento").ToString Select Case gvr.DataKey("TipoDocumento").ToString

View File

@@ -496,7 +496,8 @@
<asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</span> </span>
<asp:LinkButton ID="LnkEditarDir" runat="server" OnClick="LnkEditarDir_Click" AlternateText="Editar Dirección" Visible="false" ToolTip="Editar Dirección" CausesValidation="False" CssClass="btn btn-circle btn-xs green" Text="<i class='fa fa-pencil'></i>" />
<asp:LinkButton ID="LnkAplicarDir" runat="server" OnClick="LnkAplicarDir_Click" AlternateText="Actualizar Dirección" Visible="false" ToolTip="Actualizar Dirección" CausesValidation="False" CssClass="btn btn-circle btn-xs blue" Text="<i class='fa fa-check'></i>" />
<asp:LinkButton ID="LnkOtraDireccion" runat="server" Text="Otra dirección?" Visible="false"></asp:LinkButton> <asp:LinkButton ID="LnkOtraDireccion" runat="server" Text="Otra dirección?" Visible="false"></asp:LinkButton>
</table> </table>
</td> </td>

View File

@@ -4673,6 +4673,7 @@ Partial Class Ventas
ChkDireccionEnvio.Enabled = False ChkDireccionEnvio.Enabled = False
DdlDireccionEnvio.Visible = True DdlDireccionEnvio.Visible = True
trDireccionEnvio.Visible = True trDireccionEnvio.Visible = True
If UsuarioActual.TienePermisoProceso(333) Then LnkEditarDir.Visible = True
End If End If
'ESTATUS FACTURA 'ESTATUS FACTURA
@@ -5766,7 +5767,7 @@ Partial Class Ventas
End If End If
'HABILITA LA OPCION DE DIRECCION DE ENVIO '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 trDireccionEnvio.Visible = True
CargaDireccionesEnvio() CargaDireccionesEnvio()
End If End If
@@ -32632,5 +32633,28 @@ Partial Class Ventas
Public Property CveVenta As Integer Public Property CveVenta As Integer
Public Property FolioFiscal As String Public Property FolioFiscal As String
End Class 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 End Class