Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -893,14 +893,15 @@ Public Class ClsAcumuladores
|
|||||||
End Try
|
End Try
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function UpdateEnvioPolizaVirutal(CvePolizaVirtual As Integer, Envio As Boolean, FechaEnvio As DateTime, CodigoUnico As String) As Boolean
|
Public Function UpdateEnvioPolizaVirtual(CvePolizaVirtual As Integer, Envio As Boolean, FechaEnvio As DateTime, CodigoUnico As String, RespuestaEnvio As String) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
SqlDataAdapter("PA_Vta_PolizaVirtualEnvioUpdate")
|
SqlDataAdapter("PA_Vta_PolizaVirtualEnvioUpdate")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CvePolizaVirtual", SqlDbType.Int).Value = CvePolizaVirtual
|
.Add("@CvePolizaVirtual", SqlDbType.Int).Value = CvePolizaVirtual
|
||||||
.Add("@Envio", SqlDbType.TinyInt).Value = Envio
|
.Add("@Envio", SqlDbType.TinyInt).Value = Envio
|
||||||
.Add("@FechaEnvio", SqlDbType.DateTime).Value = FechaEnvio
|
.Add("@FechaEnvio", SqlDbType.DateTime).Value = FechaEnvio
|
||||||
.Add("@CodigoUnico", SqlDbType.VarChar).Value = CodigoUnico
|
.Add("@CodigoUnico", SqlDbType.VarChar).Value = CodigoUnico
|
||||||
|
.Add("@RespuestaEnvio", SqlDbType.VarChar).Value = RespuestaEnvio
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
|
|||||||
@@ -3613,11 +3613,13 @@ Public Class ClsGenerales
|
|||||||
|
|
||||||
|
|
||||||
#Region " P O L I Z A V I R T U A L "
|
#Region " P O L I Z A V I R T U A L "
|
||||||
Public Function ModelosAutosGet(CveEmpresa As Integer) As Boolean
|
Public Function ModelosAutosGet(Estatus As Integer, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Gral_ModelosAutosGet")
|
DataAdapter("PA_Gral_ModelosAutosGet")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
|
|||||||
@@ -1564,8 +1564,8 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If DtPolizasVirtuales IsNot Nothing Then
|
If DtPolizasVirtuales IsNot Nothing Then
|
||||||
If DtPolizasVirtuales.Select($"CvePS={Row("CvePS").ToString.ToEntero}").Length > 0 Then
|
If DtPolizasVirtuales.Select($"Consec = {Row("Consec").ToString()} AND CvePS={Row("CvePS").ToString.ToEntero}").Length > 0 Then
|
||||||
Dim RowPoliza As DataRow = DtPolizasVirtuales.Select($"CvePS={Row("CvePS").ToString.ToEntero}")(0)
|
Dim RowPoliza As DataRow = DtPolizasVirtuales.Select($"Consec = {Row("Consec").ToString()} AND CvePS={Row("CvePS").ToString.ToEntero}")(0)
|
||||||
RowPoliza("CveVentaDetalle") = ObjVentas.CveVentaDetalle
|
RowPoliza("CveVentaDetalle") = ObjVentas.CveVentaDetalle
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -1625,7 +1625,7 @@ Namespace Modelos
|
|||||||
|
|
||||||
'POLIZA VIRTUAL
|
'POLIZA VIRTUAL
|
||||||
If factura.DtPolizasVirtuales IsNot Nothing AndAlso factura.DtPolizasVirtuales.Rows.Count > 0 Then
|
If factura.DtPolizasVirtuales IsNot Nothing AndAlso factura.DtPolizasVirtuales.Rows.Count > 0 Then
|
||||||
If Not GuardarPolizasVirtuales(ObjVentas.IniciaTransacSQL(), ObjFactura:=factura) Then
|
If Not GuardarPolizasVirtuales(ObjAcum, ObjFactura:=factura) Then
|
||||||
ErrorList.Add("Ocurrió un error al actualizar el distribuidor.")
|
ErrorList.Add("Ocurrió un error al actualizar el distribuidor.")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -2225,13 +2225,11 @@ Namespace Modelos
|
|||||||
|
|
||||||
Return CveMovimiento
|
Return CveMovimiento
|
||||||
End Function
|
End Function
|
||||||
Private Function GuardarPolizasVirtuales(SqlTransaccion As SqlClient.SqlTransaction, ObjFactura As Modelos.Factura) As Boolean
|
Private Function GuardarPolizasVirtuales(ByRef ObjAcum As ClsAcumuladores, ObjFactura As Modelos.Factura) As Boolean
|
||||||
Dim Resultado As Boolean = True
|
Dim Resultado As Boolean = True
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531).ToEntero > 0 AndAlso ObjFactura.TipoDocto.Contiene("Rem") Then
|
If UsuarioActual.Empresa.Funcionalidad(531).ToEntero > 0 AndAlso ObjFactura.TipoDocto.Contiene("Rem") Then
|
||||||
|
|
||||||
Dim ObjAcum As New ClsAcumuladores(SqlTransaccion)
|
|
||||||
|
|
||||||
For Each drow As DataRow In ObjFactura.DtPolizasVirtuales.Rows
|
For Each drow As DataRow In ObjFactura.DtPolizasVirtuales.Rows
|
||||||
If ObjAcum.AddPolizaVirtual(ObjFactura.CveVenta, drow("CveVentaDetalle").ToString().ToEntero(), drow("CvePS").ToString.ToEntero, drow("Cantidad").ToString.ToDecimal, drow("PU").ToString.ToDecimal, drow("Descuento").ToString.ToDecimal,
|
If ObjAcum.AddPolizaVirtual(ObjFactura.CveVenta, drow("CveVentaDetalle").ToString().ToEntero(), drow("CvePS").ToString.ToEntero, drow("Cantidad").ToString.ToDecimal, drow("PU").ToString.ToDecimal, drow("Descuento").ToString.ToDecimal,
|
||||||
drow("Total").ToString.ToDecimal, drow("TipoServicio").ToString.ToEntero, drow("TipoPoliza").ToString.ToEntero, drow("CveModeloAuto").ToString.ToEntero, drow("AnioVehiculo").ToString.ToEntero, CBool(drow("TieneUsado").ToString),
|
drow("Total").ToString.ToDecimal, drow("TipoServicio").ToString.ToEntero, drow("TipoPoliza").ToString.ToEntero, drow("CveModeloAuto").ToString.ToEntero, drow("AnioVehiculo").ToString.ToEntero, CBool(drow("TieneUsado").ToString),
|
||||||
|
|||||||
2100
App_Code/Timbrado.vb
2100
App_Code/Timbrado.vb
File diff suppressed because it is too large
Load Diff
@@ -635,8 +635,8 @@ Partial Class Bancos_PopIECompras
|
|||||||
CveMonedaFiltros = dr("CveMoneda").ToString.ToEntero
|
CveMonedaFiltros = dr("CveMoneda").ToString.ToEntero
|
||||||
SerieFolio = dr("SerieFolio").ToString
|
SerieFolio = dr("SerieFolio").ToString
|
||||||
TipoCambioOriginal = dr("TipoCambioOriginal").ToString.ToDecimal
|
TipoCambioOriginal = dr("TipoCambioOriginal").ToString.ToDecimal
|
||||||
NombreProveedor = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("RazonSocial", String.Format("CveProveedor = {0}", CveProveedor))
|
NombreProveedor = dr("RazonSocial").ToString 'GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("RazonSocial", String.Format("CveProveedor = {0}", CveProveedor))
|
||||||
|
|
||||||
CveSubProyecto = dr("CveSubProyecto").ToString.ToEntero
|
CveSubProyecto = dr("CveSubProyecto").ToString.ToEntero
|
||||||
|
|
||||||
LtlTitulo.Text = "Cuentas por Pagar"
|
LtlTitulo.Text = "Cuentas por Pagar"
|
||||||
@@ -1908,7 +1908,11 @@ Partial Class Bancos_PopIECompras
|
|||||||
ElseIf MovimientoPagar.ConceptoRetISR = 2 Then
|
ElseIf MovimientoPagar.ConceptoRetISR = 2 Then
|
||||||
funcionalidad = 317
|
funcionalidad = 317
|
||||||
ConceptoContable = 243
|
ConceptoContable = 243
|
||||||
|
ElseIf MovimientoPagar.ConceptoRetISR = 3 Then
|
||||||
|
funcionalidad = 348
|
||||||
|
ConceptoContable = 327
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then
|
If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then
|
||||||
ImporteMovimiento = MovimientoPagar.RetISR * PorcentajePago
|
ImporteMovimiento = MovimientoPagar.RetISR * PorcentajePago
|
||||||
ImporteMX = ImporteMovimiento
|
ImporteMX = ImporteMovimiento
|
||||||
@@ -1951,6 +1955,9 @@ Partial Class Bancos_PopIECompras
|
|||||||
ElseIf MovimientoPagar.ConceptoRetISR = 2 Then
|
ElseIf MovimientoPagar.ConceptoRetISR = 2 Then
|
||||||
funcionalidad = 318
|
funcionalidad = 318
|
||||||
ConceptoContable = 244
|
ConceptoContable = 244
|
||||||
|
ElseIf MovimientoPagar.ConceptoRetISR = 3 Then
|
||||||
|
funcionalidad = 348
|
||||||
|
ConceptoContable = 328
|
||||||
End If
|
End If
|
||||||
If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then
|
If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then
|
||||||
ImporteMovimiento = MovimientoPagar.RetISR * PorcentajePago
|
ImporteMovimiento = MovimientoPagar.RetISR * PorcentajePago
|
||||||
|
|||||||
@@ -1172,6 +1172,9 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ElseIf gvr.DataKey("CveRetISRConcepto").ToEntero = 2 Then
|
ElseIf gvr.DataKey("CveRetISRConcepto").ToEntero = 2 Then
|
||||||
funcionalidad = 317
|
funcionalidad = 317
|
||||||
ConceptoContable = 243
|
ConceptoContable = 243
|
||||||
|
ElseIf gvr.DataKey("CveRetISRConcepto").ToEntero = 3 Then
|
||||||
|
funcionalidad = 348
|
||||||
|
ConceptoContable = 328
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
@@ -1214,6 +1217,9 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ElseIf gvr.DataKey("CveRetISRConcepto").ToEntero = 2 Then
|
ElseIf gvr.DataKey("CveRetISRConcepto").ToEntero = 2 Then
|
||||||
funcionalidad = 318
|
funcionalidad = 318
|
||||||
ConceptoContable = 244
|
ConceptoContable = 244
|
||||||
|
ElseIf gvr.DataKey("CveRetISRConcepto").ToEntero = 3 Then
|
||||||
|
funcionalidad = 348
|
||||||
|
ConceptoContable = 328
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
@@ -1229,8 +1235,8 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
End If
|
End If
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
importeMX = importeMX.RoundSQL
|
||||||
TipoCambioGeneral = TipoCambioPago
|
TipoCambioGeneral = TipoCambioPago
|
||||||
|
|
||||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
@@ -1272,8 +1278,8 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
End If
|
End If
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||||
importeMX = Math.Round(importeMX, 2)
|
importeMX = importeMX.RoundSQL
|
||||||
|
|
||||||
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -573,7 +573,7 @@
|
|||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlConceptoContable" runat="server" Text='<%# Eval("ConceptoContable") %>'></asp:Literal><br />
|
<asp:Literal ID="LtlConceptoContable" runat="server" Text='<%# Eval("ConceptoContable") %>'></asp:Literal><br />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Left" Width="150px" />
|
<ItemStyle HorizontalAlign="Left" Width="125px" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
@@ -581,8 +581,7 @@
|
|||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:HyperLink ID="HlReferencia" Target="_blank" runat="server" Text='<%# Eval("FolioFactura") %>'></asp:HyperLink>
|
<asp:HyperLink ID="HlReferencia" Target="_blank" runat="server" Text='<%# Eval("FolioFactura") %>'></asp:HyperLink>
|
||||||
<br />
|
<br />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Left" Width="150px" />
|
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
|
|||||||
@@ -360,8 +360,9 @@ Partial Class RepCxCDetalle
|
|||||||
DdlGrupo.SelectedValueExist(CveAgrupador)
|
DdlGrupo.SelectedValueExist(CveAgrupador)
|
||||||
|
|
||||||
'Carga Vendedor
|
'Carga Vendedor
|
||||||
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltraParametros("VendedorTipo in (1,4)")
|
||||||
DdlVendedor.DataBind()
|
DdlVendedor.DataBind()
|
||||||
|
DdlVendedor.SelectedValueExist(CveVendedor)
|
||||||
If UsuarioActual.CveVendedor > 0 AndAlso Not UsuarioActual.TienePermisoProceso(263) Then
|
If UsuarioActual.CveVendedor > 0 AndAlso Not UsuarioActual.TienePermisoProceso(263) Then
|
||||||
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString())
|
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString())
|
||||||
DdlVendedor.Attributes.Add("disabled", "disabled")
|
DdlVendedor.Attributes.Add("disabled", "disabled")
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SBError.AppendLine($"Factura {row.DataKey("SerieFolio")} error al agregar entrega alamcen. ");
|
SBError.AppendLine($"Factura {row.DataKey("SerieFolio")} error al agregar entrega almacen. ");
|
||||||
TieneError = true;
|
TieneError = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -205,6 +205,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
StringBuilder MensajeAlert = new StringBuilder();
|
StringBuilder MensajeAlert = new StringBuilder();
|
||||||
//recorrer para timbrar
|
//recorrer para timbrar
|
||||||
MensajeAlert.Append(" Entregas creadas correctamente <br/><br/>");
|
MensajeAlert.Append(" Entregas creadas correctamente <br/><br/>");
|
||||||
|
bool huboerror = false;
|
||||||
|
|
||||||
foreach (int cvetimbre in ListaTimbres)
|
foreach (int cvetimbre in ListaTimbres)
|
||||||
{
|
{
|
||||||
@@ -216,9 +217,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
MensajeAlert.AppendFormat("<a class='texto' style='color:#337ab7' href='/Compras/PopUpVerFactura.aspx?P={0}' target='_blank'>XML <i class='fa fa-file'></i></i></a> ", ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CveTimbre={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", cvetimbre, "XML", ObjTimbres.ObjFactura.SerieFolio, ObjTimbres.ObjFactura.TipoDocto)));
|
MensajeAlert.AppendFormat("<a class='texto' style='color:#337ab7' href='/Compras/PopUpVerFactura.aspx?P={0}' target='_blank'>XML <i class='fa fa-file'></i></i></a> ", ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CveTimbre={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", cvetimbre, "XML", ObjTimbres.ObjFactura.SerieFolio, ObjTimbres.ObjFactura.TipoDocto)));
|
||||||
MensajeAlert.AppendFormat("<a class='texto' style='color:#337ab7' href='/Compras/PopUpVerFactura.aspx?P={0}' target='_blank'>PDF <i class='fa fa-ad-pdf'></i></i></i></a> ", ModExtensiones.Encripta(String.Format("OP=CARPOTIMBRE&CVETIMBRE={0}", cvetimbre)));
|
MensajeAlert.AppendFormat("<a class='texto' style='color:#337ab7' href='/Compras/PopUpVerFactura.aspx?P={0}' target='_blank'>PDF <i class='fa fa-ad-pdf'></i></i></i></a> ", ModExtensiones.Encripta(String.Format("OP=CARPOTIMBRE&CVETIMBRE={0}", cvetimbre)));
|
||||||
MensajeAlert.Append("<br/>");
|
MensajeAlert.Append("<br/>");
|
||||||
|
|
||||||
Alert(MensajeAlert.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
|
||||||
CargaDatos();
|
|
||||||
DdlChofer.SelectedValueExist("-1");
|
DdlChofer.SelectedValueExist("-1");
|
||||||
DdlUnidadCamion.SelectedValueExist("-1");
|
DdlUnidadCamion.SelectedValueExist("-1");
|
||||||
ChkEmitirCartaPorte.Checked = false;
|
ChkEmitirCartaPorte.Checked = false;
|
||||||
@@ -228,9 +227,12 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
huboerror = true;
|
||||||
MensajeAlert.AppendFormat("<ul><li>{0}</li></ul>", ObjTimbres.MsgError);
|
MensajeAlert.AppendFormat("<ul><li>{0}</li></ul>", ObjTimbres.MsgError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Alert(MensajeAlert.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||||
|
CargaDatos();
|
||||||
UpDatos.Update();
|
UpDatos.Update();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -762,6 +762,10 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
ObjRemisionNC = Nothing
|
ObjRemisionNC = Nothing
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If TmpDTAjustes IsNot Nothing Then
|
||||||
|
TmpDTAjustes.Rows.Clear()
|
||||||
|
End If
|
||||||
|
|
||||||
CveRemisionRecibida = -1
|
CveRemisionRecibida = -1
|
||||||
EsDistribuidor = False
|
EsDistribuidor = False
|
||||||
DdlClientes.SelectedValueExist("-1")
|
DdlClientes.SelectedValueExist("-1")
|
||||||
|
|||||||
@@ -107,12 +107,12 @@ Partial Class Inventarios_RepAnomalias
|
|||||||
GvF.Columns(3).Visible = True 'proveedor
|
GvF.Columns(3).Visible = True 'proveedor
|
||||||
GvS.Columns(3).Visible = True 'proveedor
|
GvS.Columns(3).Visible = True 'proveedor
|
||||||
GvC.Columns(3).Visible = True 'proveedor
|
GvC.Columns(3).Visible = True 'proveedor
|
||||||
GvF.Columns(16).Visible = UsuarioActual.Procesos(201) 'costo
|
GvF.Columns(17).Visible = UsuarioActual.Procesos(201) 'costo
|
||||||
GvS.Columns(16).Visible = UsuarioActual.Procesos(201) 'costo
|
GvS.Columns(17).Visible = UsuarioActual.Procesos(201) 'costo
|
||||||
GvC.Columns(16).Visible = UsuarioActual.Procesos(201) 'costo
|
GvC.Columns(17).Visible = UsuarioActual.Procesos(201) 'costo
|
||||||
GvGrupos.Columns(1).Visible = True 'clasificación
|
GvGrupos.Columns(1).Visible = True 'clasificación
|
||||||
GvGrupos.Columns(2).Visible = True 'proveedor
|
GvGrupos.Columns(2).Visible = True 'proveedor
|
||||||
GvGrupos.Columns(15).Visible = UsuarioActual.Procesos(201) 'costo
|
GvGrupos.Columns(17).Visible = UsuarioActual.Procesos(201) 'costo
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Inventario.GetInventarioFisico(CveInventarioFisico, UsuarioActual.CveEmpresa, -1, -1, UsuarioActual.CveUsuario) Then
|
If Inventario.GetInventarioFisico(CveInventarioFisico, UsuarioActual.CveEmpresa, -1, -1, UsuarioActual.CveUsuario) Then
|
||||||
|
|||||||
@@ -236,7 +236,7 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
|
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Exist. Final">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Exist. Final" ItemStyle-CssClass="LightGray">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lbSaldoF" runat="server" Text='<%# If(Eval("SaldoFCant").ToString() = "0", "-", Eval("SaldoFCant", "{0:#,###.######}")) %>'></asp:Label>
|
<asp:Label ID="lbSaldoF" runat="server" Text='<%# If(Eval("SaldoFCant").ToString() = "0", "-", Eval("SaldoFCant", "{0:#,###.######}")) %>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
@@ -261,7 +261,7 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
|
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Saldo Final">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Saldo Final" >
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lbSaldoF2" runat="server" Text='<%# If(Eval("SaldoFImp").ToString() = "0", "-", Eval("SaldoFImp", "{0:N2}")) %>'></asp:Label>
|
<asp:Label ID="lbSaldoF2" runat="server" Text='<%# If(Eval("SaldoFImp").ToString() = "0", "-", Eval("SaldoFImp", "{0:N2}")) %>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
|||||||
GvM.Columns(15).Visible = TienePermisoImportes
|
GvM.Columns(15).Visible = TienePermisoImportes
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
GvM.Columns(10).Visible = TienePermisoImportes
|
GvM.Columns(10).Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -309,7 +309,7 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
|||||||
|
|
||||||
Else
|
Else
|
||||||
e.Row.Cells(9).BackColor = Drawing.Color.LightGray
|
e.Row.Cells(9).BackColor = Drawing.Color.LightGray
|
||||||
e.Row.Cells(13).BackColor = Drawing.Color.LightGray
|
e.Row.Cells(14).BackColor = Drawing.Color.LightGray
|
||||||
|
|
||||||
'e.Row.FCLabel("lbSaldoI").Text = If(e.Row.DBCampo("SaldoIniCant").ToString().ToEntero = 0, "-", e.Row.DBCampo("SaldoIniCant").ToDouble.ToString("N2"))
|
'e.Row.FCLabel("lbSaldoI").Text = If(e.Row.DBCampo("SaldoIniCant").ToString().ToEntero = 0, "-", e.Row.DBCampo("SaldoIniCant").ToDouble.ToString("N2"))
|
||||||
'e.Row.FCLabel("lbEntradasCant").Text = If(e.Row.DBCampo("EntradaCant").ToString().ToEntero = 0, "-", e.Row.DBCampo("EntradaCant").ToDouble.ToString("N2"))
|
'e.Row.FCLabel("lbEntradasCant").Text = If(e.Row.DBCampo("EntradaCant").ToString().ToEntero = 0, "-", e.Row.DBCampo("EntradaCant").ToDouble.ToString("N2"))
|
||||||
|
|||||||
@@ -527,7 +527,9 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptor, RFCEmisor, CvePACCancelacion,CveSATMotivoCancelacion: 3)) {
|
ModExtensiones.RespuestaCancelacionSAT Resp = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptor, RFCEmisor, CvePACCancelacion, CveSATMotivoCancelacion: 3);
|
||||||
|
|
||||||
|
if (Resp.Verificado) {
|
||||||
|
|
||||||
if (ObjGenerales.CancelarTimbreTimbrado(CveTimbre, DateTime.Now, CvePACCancelacion, ObjCancelacion.CancelacionAcuse, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
if (ObjGenerales.CancelarTimbreTimbrado(CveTimbre, DateTime.Now, CvePACCancelacion, ObjCancelacion.CancelacionAcuse, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1449,26 +1449,26 @@ Partial Class Clientes
|
|||||||
' CargaGridRetenciones()
|
' CargaGridRetenciones()
|
||||||
' CargaDocs()
|
' CargaDocs()
|
||||||
CargaCombos()
|
CargaCombos()
|
||||||
CargaDocumentacionCliente()
|
CargaDocumentacionCliente()
|
||||||
'CargaMetodosPago33()
|
'CargaMetodosPago33()
|
||||||
'CargaFormaPago33()
|
'CargaFormaPago33()
|
||||||
'CargaComboCFDI()
|
'CargaComboCFDI()
|
||||||
'CargarPagosNoBancarios()
|
'CargarPagosNoBancarios()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
LnkPorcentajeMarcas.Visible = True
|
LnkPorcentajeMarcas.Visible = True
|
||||||
LnkPorcentajePrecios.Visible = True
|
LnkPorcentajePrecios.Visible = True
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(279) Then
|
If UsuarioActual.TienePermisoProceso(279) Then
|
||||||
TrPreciosPP.Visible = True
|
TrPreciosPP.Visible = True
|
||||||
TrAgregarPMarca.Visible = True
|
TrAgregarPMarca.Visible = True
|
||||||
|
|
||||||
BtnGuardarPorcentajesMarca.Visible = True
|
BtnGuardarPorcentajesMarca.Visible = True
|
||||||
BtnGuardarPorcentajes.Visible = True
|
BtnGuardarPorcentajes.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -8972,27 +8972,27 @@ Partial Class Clientes
|
|||||||
|
|
||||||
CargaDTPorcentajePrecios(DTPorcentajePrecios.FiltraParametros("Estatus <> 'D' "))
|
CargaDTPorcentajePrecios(DTPorcentajePrecios.FiltraParametros("Estatus <> 'D' "))
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub GvM_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvM.RowDataBound
|
Protected Sub GvM_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvM.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow AndAlso Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(279) Then
|
If UsuarioActual.TienePermisoProceso(279) Then
|
||||||
e.Row.FCLinkButton("imgE").Visible = True
|
e.Row.FCLinkButton("imgE").Visible = True
|
||||||
e.Row.FCLinkButton("lnkRemove").Visible = True
|
e.Row.FCLinkButton("lnkRemove").Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub GvP_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvP.RowDataBound
|
Protected Sub GvP_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvP.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow AndAlso Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(279) Then
|
If UsuarioActual.TienePermisoProceso(279) Then
|
||||||
e.Row.FCLinkButton("imgE").Visible = True
|
e.Row.FCLinkButton("imgE").Visible = True
|
||||||
e.Row.FCLinkButton("lnkRemove").Visible = True
|
e.Row.FCLinkButton("lnkRemove").Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub GvM_RowEditing(sender As Object, e As GridViewEditEventArgs) Handles GvM.RowEditing
|
Protected Sub GvM_RowEditing(sender As Object, e As GridViewEditEventArgs) Handles GvM.RowEditing
|
||||||
GvM.EditIndex = e.NewEditIndex
|
GvM.EditIndex = e.NewEditIndex
|
||||||
@@ -10466,7 +10466,7 @@ Partial Class Clientes
|
|||||||
Alert("Los cambios se guardaron satisfactoriamente.")
|
Alert("Los cambios se guardaron satisfactoriamente.")
|
||||||
End Using
|
End Using
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
@@ -2872,7 +2872,7 @@
|
|||||||
<label>Año:</label>
|
<label>Año:</label>
|
||||||
<br />
|
<br />
|
||||||
<asp:TextBox ID="TxtAnioVehiculo" type="number" runat="server" Height="100%" Width="100%" CssClass="form-control" ></asp:TextBox>
|
<asp:TextBox ID="TxtAnioVehiculo" type="number" runat="server" Height="100%" Width="100%" CssClass="form-control" ></asp:TextBox>
|
||||||
<asp:CustomValidator ID="CVAnio" runat="server" ClientValidationFunction="ValidaAnioVehiculo" ValidateEmptyText="true" ControlToValidate="TxtAnioVehiculo" Display="Dynamic" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Año''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:CustomValidator>
|
<asp:CustomValidator ID="CVAnio" runat="server" ClientValidationFunction="ValidaAnioVehiculo" ValidateEmptyText="true" ControlToValidate="TxtAnioVehiculo" Display="Dynamic" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Año''</b> esta vacío o no tiene el formato correcto, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:CustomValidator>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -3281,7 +3281,19 @@
|
|||||||
//VALIDA SOLO SI SE SELECCIONO UN USADO
|
//VALIDA SOLO SI SE SELECCIONO UN USADO
|
||||||
var cveUsado = ToDouble($get("C_DdlRecepcionUsados").value);
|
var cveUsado = ToDouble($get("C_DdlRecepcionUsados").value);
|
||||||
if (cveUsado > 0) {
|
if (cveUsado > 0) {
|
||||||
args.IsValid = (ToDouble(args.Value) > 0);
|
var anio = ToDouble(args.Value);
|
||||||
|
if (anio > 0) {
|
||||||
|
var valido = true;
|
||||||
|
if (anio < 1900) {
|
||||||
|
valido = false;
|
||||||
|
}
|
||||||
|
if (anio.toString().length != 4) {
|
||||||
|
valido = false;
|
||||||
|
}
|
||||||
|
args.IsValid = valido;
|
||||||
|
} else {
|
||||||
|
args.IsValid = false;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
args.IsValid = true;
|
args.IsValid = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3430,27 +3430,27 @@ Partial Class PV
|
|||||||
|
|
||||||
If Retorno IsNot Nothing AndAlso Retorno.CveVenta > 0 Then
|
If Retorno IsNot Nothing AndAlso Retorno.CveVenta > 0 Then
|
||||||
|
|
||||||
If ObjFactura.TipoDocto = "Rem" Then
|
'If ObjFactura.TipoDocto = "Rem" Then
|
||||||
If ObjAcum.GetPolizasVirtuales(Retorno.CveVenta) Then
|
' If ObjAcum.GetPolizasVirtuales(Retorno.CveVenta) Then
|
||||||
Dim DtPoliza As DataTable = ObjAcum.DtResultados.Copy()
|
' Dim DtPoliza As DataTable = ObjAcum.DtResultados.Copy()
|
||||||
|
|
||||||
For Each Row As DataRow In ObjFactura.DtPolizasVirtuales.Rows
|
' For Each Row As DataRow In ObjFactura.DtPolizasVirtuales.Rows
|
||||||
Dim CvePolizaVirtual As Integer = DtPoliza.FiltroPrimeroValor("CvePolizaVirtual", $"CveVentaDetalle={Row("CveVentaDetalle")}").ToEntero()
|
' Dim CvePolizaVirtual As Integer = DtPoliza.FiltroPrimeroValor("CvePolizaVirtual", $"CveVentaDetalle={Row("CveVentaDetalle")}").ToEntero()
|
||||||
|
|
||||||
If Not ObjAcum.UpdatePolizaVirtual(CvePolizaVirtual, Row("CveMarcaUsado").ToString().ToEntero(), Row("FechaUsado").ToString().ToDateTime()) Then
|
' If Not ObjAcum.UpdatePolizaVirtual(CvePolizaVirtual, Row("CveMarcaUsado").ToString().ToEntero(), Row("FechaUsado").ToString().ToDateTime()) Then
|
||||||
SbAlert.Append("Error al guardar la póliza virtual")
|
' SbAlert.Append("Error al guardar la póliza virtual")
|
||||||
TieneError = True
|
' TieneError = True
|
||||||
Exit For
|
' Exit For
|
||||||
End If
|
' End If
|
||||||
Next
|
' Next
|
||||||
|
|
||||||
DtPoliza.Dispose()
|
' DtPoliza.Dispose()
|
||||||
Else
|
' Else
|
||||||
SbAlert.Append("Error al obtener la póliza virtual")
|
' SbAlert.Append("Error al obtener la póliza virtual")
|
||||||
TieneError = True
|
' TieneError = True
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If ObjAcum.GetGarantiasDetalle(Retorno.CveVenta) Then
|
If ObjAcum.GetGarantiasDetalle(Retorno.CveVenta) Then
|
||||||
Dim RowGarantia As DataRow = ObjAcum.DtResultados.FiltroPrimero("")
|
Dim RowGarantia As DataRow = ObjAcum.DtResultados.FiltroPrimero("")
|
||||||
@@ -4790,6 +4790,9 @@ Partial Class PV
|
|||||||
DdlRecepcionUsados.SelectedValueExist("-1")
|
DdlRecepcionUsados.SelectedValueExist("-1")
|
||||||
DivRecepcionUsados.Visible = False
|
DivRecepcionUsados.Visible = False
|
||||||
|
|
||||||
|
DdlMarca.SelectedValueExist("-1")
|
||||||
|
TxtFechaVigencia.Text = Now.ToString("dd/MM/yyyy")
|
||||||
|
|
||||||
LimpiaAjuste()
|
LimpiaAjuste()
|
||||||
|
|
||||||
UPPDescuento.Update()
|
UPPDescuento.Update()
|
||||||
@@ -5295,7 +5298,7 @@ Partial Class PV
|
|||||||
divagregrarotrops.Visible = False
|
divagregrarotrops.Visible = False
|
||||||
|
|
||||||
Ajuste()
|
Ajuste()
|
||||||
AddPolizaVirtual(DdlPS.SelectedValue.ToEntero())
|
'AddPolizaVirtual(DdlPS.SelectedValue.ToEntero())
|
||||||
|
|
||||||
'BUSCA EN TMPDT LOS DATOS DE USADOS
|
'BUSCA EN TMPDT LOS DATOS DE USADOS
|
||||||
If TmpDT.Rows.Count > 0 AndAlso TmpDTRecepcionUsados IsNot Nothing AndAlso TmpDTRecepcionUsados.Rows.Count > 0 Then
|
If TmpDT.Rows.Count > 0 AndAlso TmpDTRecepcionUsados IsNot Nothing AndAlso TmpDTRecepcionUsados.Rows.Count > 0 Then
|
||||||
@@ -5334,11 +5337,29 @@ Partial Class PV
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If String.IsNullOrEmpty(TxtAnioVehiculo.Text.Trim()) Then
|
||||||
|
Alert("El campo año esta vacío.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If TxtAnioVehiculo.Text.ToDecimal() < 1900 Then
|
||||||
|
Alert("El campo año debe ser mayor a 1900.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
If Not String.IsNullOrEmpty(TxtAnioVehiculo.Text.Trim()) Then
|
||||||
|
If TxtAnioVehiculo.Text.ToDecimal() < 1900 Then
|
||||||
|
Alert("El año del vehiculo del vehículo no tiene el formato correcto.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If AgregarPS() Then
|
If AgregarPS() Then
|
||||||
If ChkAjuste.Checked Then GuardaAjuste()
|
If ChkAjuste.Checked Then GuardaAjuste()
|
||||||
AddPolizaVirtual(DdlPS.SelectedValue.ToEntero())
|
|
||||||
CalculaTotalesVenta()
|
CalculaTotalesVenta()
|
||||||
|
|
||||||
If ChkAgregar.Checked = True And Modalidad = "A" Then
|
If ChkAgregar.Checked = True And Modalidad = "A" Then
|
||||||
@@ -5404,17 +5425,19 @@ Partial Class PV
|
|||||||
CveProyecto, Proyecto, DdlSubProyectoDatos.SelectedValue.ToEntero, DdlSubProyectoDatos.SelectedItem.Text,
|
CveProyecto, Proyecto, DdlSubProyectoDatos.SelectedValue.ToEntero, DdlSubProyectoDatos.SelectedItem.Text,
|
||||||
Serie:="", TiempoEntrega:="", CuentaPredial:="", RegeneraIEPS:=ClienteDesglosaIEPS, CveVentaDetalle:=CveVentaDetalle, EsCargo:=EsCargo)
|
Serie:="", TiempoEntrega:="", CuentaPredial:="", RegeneraIEPS:=ClienteDesglosaIEPS, CveVentaDetalle:=CveVentaDetalle, EsCargo:=EsCargo)
|
||||||
|
|
||||||
|
Dim ListaPSCargo As List(Of MConceptoUsado) = Nothing
|
||||||
If CveVentaDetalle <= 0 AndAlso Not EsCargo Then
|
If CveVentaDetalle <= 0 AndAlso Not EsCargo Then
|
||||||
Dim ListaPSCargo = CalculaUsados(Consec)
|
ListaPSCargo = CalculaUsados(Consec)
|
||||||
If ListaPSCargo.Count > 0 Then
|
|
||||||
CalculaRecepcionUsados(CvePS, ListaPSCargo, Cantidad, Consec)
|
|
||||||
End If
|
|
||||||
ElseIf CveVentaDetalle > 0 AndAlso Not EsCargo Then
|
ElseIf CveVentaDetalle > 0 AndAlso Not EsCargo Then
|
||||||
EliminarUsados()
|
EliminarUsados()
|
||||||
Dim ListaPSCargo = CalculaUsados(Consec, LimpiarUsados:=False)
|
ListaPSCargo = CalculaUsados(Consec, LimpiarUsados:=False)
|
||||||
If ListaPSCargo.Count > 0 Then
|
End If
|
||||||
CalculaRecepcionUsados(CvePS, ListaPSCargo, Cantidad, Consec)
|
|
||||||
End If
|
If ListaPSCargo IsNot Nothing AndAlso ListaPSCargo.Count > 0 Then
|
||||||
|
CalculaRecepcionUsados(CvePS, ListaPSCargo, Cantidad, Consec)
|
||||||
|
For Each Usado As MConceptoUsado In ListaPSCargo
|
||||||
|
AddPolizaVirtual(DdlPS.SelectedValue.ToEntero(), Usado.Consecutivo)
|
||||||
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
@@ -7386,6 +7409,7 @@ Partial Class PV
|
|||||||
#Region "P O L I Z A - V I R T U A L"
|
#Region "P O L I Z A - V I R T U A L"
|
||||||
Private Sub CreaDTmpDTPolizaVirtual()
|
Private Sub CreaDTmpDTPolizaVirtual()
|
||||||
TmpDTPolizaVirtual = New DataTable
|
TmpDTPolizaVirtual = New DataTable
|
||||||
|
TmpDTPolizaVirtual.Columns.Add("Consec", GetType(Integer))
|
||||||
TmpDTPolizaVirtual.Columns.Add("CvePS", GetType(Integer))
|
TmpDTPolizaVirtual.Columns.Add("CvePS", GetType(Integer))
|
||||||
TmpDTPolizaVirtual.Columns.Add("Cantidad", GetType(Decimal))
|
TmpDTPolizaVirtual.Columns.Add("Cantidad", GetType(Decimal))
|
||||||
TmpDTPolizaVirtual.Columns.Add("PU", GetType(Decimal))
|
TmpDTPolizaVirtual.Columns.Add("PU", GetType(Decimal))
|
||||||
@@ -7402,14 +7426,14 @@ Partial Class PV
|
|||||||
TmpDTPolizaVirtual.Columns.Add("CveBCIUsado", GetType(Integer))
|
TmpDTPolizaVirtual.Columns.Add("CveBCIUsado", GetType(Integer))
|
||||||
TmpDTPolizaVirtual.Columns.Add("CveMarcaUsado", GetType(Integer))
|
TmpDTPolizaVirtual.Columns.Add("CveMarcaUsado", GetType(Integer))
|
||||||
End Sub
|
End Sub
|
||||||
Private Function AddPolizaVirtual(CvePS As Integer) As Boolean
|
Private Function AddPolizaVirtual(CvePS As Integer, Consec As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = True
|
Dim Retorno As Boolean = True
|
||||||
|
|
||||||
If Modalidad = "U" Then
|
If Modalidad = "U" Then
|
||||||
If TmpDTPolizaVirtual.Rows.Count > 0 Then
|
If TmpDTPolizaVirtual.Rows.Count > 0 Then
|
||||||
Dim Elimino As Boolean = False
|
Dim Elimino As Boolean = False
|
||||||
For Each RowPoliza As DataRow In TmpDTPolizaVirtual.Rows
|
For Each RowPoliza As DataRow In TmpDTPolizaVirtual.Rows
|
||||||
If RowPoliza("CvePS").ToString().ToEntero() = CvePS Then
|
If RowPoliza("Consec").ToString().ToEntero() = Consec AndAlso RowPoliza("CvePS").ToString().ToEntero() = CvePS Then
|
||||||
RowPoliza.Delete()
|
RowPoliza.Delete()
|
||||||
Elimino = True
|
Elimino = True
|
||||||
Exit For
|
Exit For
|
||||||
@@ -7475,6 +7499,8 @@ Partial Class PV
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Row As DataRow = TmpDTPolizaVirtual.NewRow()
|
Dim Row As DataRow = TmpDTPolizaVirtual.NewRow()
|
||||||
|
|
||||||
|
Row("Consec") = Consec
|
||||||
Row("CvePS") = CvePS
|
Row("CvePS") = CvePS
|
||||||
Row("Cantidad") = Cantidad
|
Row("Cantidad") = Cantidad
|
||||||
Row("PU") = PU
|
Row("PU") = PU
|
||||||
@@ -7524,7 +7550,7 @@ Partial Class PV
|
|||||||
|
|
||||||
EmitirImprimirNew()
|
EmitirImprimirNew()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CalculaRecepcionUsados(CvePS As Integer, ListaPSCargo As List(Of Integer), CantidadUsado As Decimal, ConsecPSPadre As Integer)
|
Private Sub CalculaRecepcionUsados(CvePS As Integer, ListaPSCargo As List(Of MConceptoUsado), CantidadUsado As Decimal, ConsecPSPadre As Integer)
|
||||||
|
|
||||||
If Modalidad = "U" Then
|
If Modalidad = "U" Then
|
||||||
If TmpDTRecepcionUsados.Rows.Count > 0 Then
|
If TmpDTRecepcionUsados.Rows.Count > 0 Then
|
||||||
@@ -7600,8 +7626,8 @@ Partial Class PV
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim StrCargos As New StringBuilder
|
Dim StrCargos As New StringBuilder
|
||||||
For Each CvePSCargo As Integer In ListaPSCargo
|
For Each Usado As MConceptoUsado In ListaPSCargo
|
||||||
StrCargos.AppendFormat(" {0},", CvePSCargo)
|
StrCargos.AppendFormat(" {0},", Usado.CvePS)
|
||||||
Next
|
Next
|
||||||
StrCargos.Remove(StrCargos.Length - 1, 1)
|
StrCargos.Remove(StrCargos.Length - 1, 1)
|
||||||
|
|
||||||
@@ -7718,12 +7744,16 @@ Partial Class PV
|
|||||||
|
|
||||||
CalculaTotalesVenta()
|
CalculaTotalesVenta()
|
||||||
End Sub
|
End Sub
|
||||||
Private Function CalculaUsados(Consec As Integer, Optional LimpiarUsados As Boolean = True) As List(Of Integer)
|
Public Class MConceptoUsado
|
||||||
|
Public Property Consecutivo As Integer
|
||||||
|
Public Property CvePS As Integer
|
||||||
|
End Class
|
||||||
|
Private Function CalculaUsados(Consec As Integer, Optional LimpiarUsados As Boolean = True) As List(Of MConceptoUsado)
|
||||||
If Modalidad = "U" AndAlso LimpiarUsados Then
|
If Modalidad = "U" AndAlso LimpiarUsados Then
|
||||||
EliminarUsados(Consec)
|
EliminarUsados(Consec)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim ListaPScargo As New List(Of Integer)
|
Dim ListaPScargo As New List(Of MConceptoUsado)
|
||||||
|
|
||||||
Dim DTTamanios As DataTable = GlobalDTAcumTamaños()
|
Dim DTTamanios As DataTable = GlobalDTAcumTamaños()
|
||||||
Dim DTCvePSCostos = DTTamanios.FiltraParametros("", "", {"CvePSCargo"})
|
Dim DTCvePSCostos = DTTamanios.FiltraParametros("", "", {"CvePSCargo"})
|
||||||
@@ -7828,7 +7858,7 @@ Partial Class PV
|
|||||||
drowPsTamaños("PS").ToString, "", drowPsTamaños("PU").ToString.ToDecimal, 0, -1, "", drowPsTamaños("CveSubProyecto").ToString.ToEntero,
|
drowPsTamaños("PS").ToString, "", drowPsTamaños("PU").ToString.ToDecimal, 0, -1, "", drowPsTamaños("CveSubProyecto").ToString.ToEntero,
|
||||||
drowPsTamaños("SubProyecto").ToString, EsCargo:=True, ConsecPSPadre:=drowPsTamaños("ConsecPSPadre").ToString.ToEntero, EliminarDB:=CBool(drowPsTamaños("EliminarDB").ToString()))
|
drowPsTamaños("SubProyecto").ToString, EsCargo:=True, ConsecPSPadre:=drowPsTamaños("ConsecPSPadre").ToString.ToEntero, EliminarDB:=CBool(drowPsTamaños("EliminarDB").ToString()))
|
||||||
If Consec > 0 Then
|
If Consec > 0 Then
|
||||||
ListaPScargo.Add(drowPsTamaños("CvePS").ToString.ToEntero)
|
ListaPScargo.Add(New MConceptoUsado() With {.Consecutivo = Consec, .CvePS = drowPsTamaños("CvePS").ToString.ToEntero})
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|||||||
@@ -4985,6 +4985,11 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'NO DEBE IMPRIMIR PDF DE COTIZACION
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DbRowVenta("TipoDocto").ToString() = "Cot" Then
|
||||||
|
HplDownPDF.Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
If DbRowVenta("SeTimbro").ToString() = "Si" Then
|
If DbRowVenta("SeTimbro").ToString() = "Si" Then
|
||||||
TrEmitir.Visible = False
|
TrEmitir.Visible = False
|
||||||
End If
|
End If
|
||||||
@@ -7504,6 +7509,13 @@ Partial Class Ventas
|
|||||||
e.Row.FCLinkButton("imgE").Visible = False
|
e.Row.FCLinkButton("imgE").Visible = False
|
||||||
e.Row.FCLinkButton("imgD").Visible = False
|
e.Row.FCLinkButton("imgD").Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'EN BDH NO DEBE PODER EDITAR LOS PS
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
e.Row.FCLinkButton("imgE").Visible = False
|
||||||
|
e.Row.FCLinkButton("imgD").Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'CANTIDAD FACTURADA
|
'CANTIDAD FACTURADA
|
||||||
@@ -8164,6 +8176,12 @@ Partial Class Ventas
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'VENDEDOR OBLIGATORIO
|
||||||
|
If DdlVendedor.SelectedValue.ToEntero() <= 0 AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Ing" Then
|
||||||
|
Alert("Debe seleccionar un vendedor.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
'SI TIENE ANTICIPOS Y ESTA AMORTIZADO AL 100% EL DOCUMENTO (SALDO = 0) | NO VALIDA PU DEL CONCEPTO
|
'SI TIENE ANTICIPOS Y ESTA AMORTIZADO AL 100% EL DOCUMENTO (SALDO = 0) | NO VALIDA PU DEL CONCEPTO
|
||||||
If Not (LblAmortizacion.Text.ToDouble > 0 And TxtTotal.Text.ToDouble <= 0) Then
|
If Not (LblAmortizacion.Text.ToDouble > 0 And TxtTotal.Text.ToDouble <= 0) Then
|
||||||
If Not DdlTipoComprobante.SelectedValue.Contiene("Ped", "Ant", "DPe") Then
|
If Not DdlTipoComprobante.SelectedValue.Contiene("Ped", "Ant", "DPe") Then
|
||||||
@@ -8543,6 +8561,11 @@ Partial Class Ventas
|
|||||||
HplDownPDF.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta)))
|
HplDownPDF.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta)))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'NO DEBE IMPRIMIR PDF DE COTIZACION
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||||
|
HplDownPDF.Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
UpnTools.Update()
|
UpnTools.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -9272,17 +9295,21 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If DdlTipoComprobante.SelectedValue = "Cot" Then
|
If DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||||
If Not CveEmpresaCRM > 0 Then
|
If Not CveEmpresaCRM > 0 Then
|
||||||
If CveVenta > 0 Then MensajeAlert = New StringBuilder
|
|
||||||
Dim ArchivoCotizacion As New System.IO.FileInfo(String.Format("{0}Formatos/Cotizacion.rdlc", UsuarioActual.Empresa.Ruta))
|
|
||||||
|
|
||||||
If Opcion = "Cot" And UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
'EN EMPRESA DE ACUMULADORES NO DESCARGAR EL PDF
|
||||||
MensajeAlert.AppendFormat("<b><a class='Texto' href=""Ventas.aspx?CveVenta={0}"">Facturar</a></b><br/><br/>", CveVenta)
|
If UsuarioActual.Empresa.Funcionalidad(531) <> "1" Then
|
||||||
End If
|
If CveVenta > 0 Then MensajeAlert = New StringBuilder
|
||||||
|
Dim ArchivoCotizacion As New System.IO.FileInfo(String.Format("{0}Formatos/Cotizacion.rdlc", UsuarioActual.Empresa.Ruta))
|
||||||
|
|
||||||
If ArchivoCotizacion.Exists Then
|
If Opcion = "Cot" And UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=0", CveVenta)))
|
MensajeAlert.AppendFormat("<b><a class='Texto' href=""Ventas.aspx?CveVenta={0}"">Facturar</a></b><br/><br/>", CveVenta)
|
||||||
Else
|
End If
|
||||||
MensajeAlert.Append("Ocurrió un error al generar el PDF. Por favor vuelva a entrar a la factura para imprimir el PDF. ")
|
|
||||||
|
If ArchivoCotizacion.Exists Then
|
||||||
|
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=0", CveVenta)))
|
||||||
|
Else
|
||||||
|
MensajeAlert.Append("Ocurrió un error al generar el PDF. Por favor vuelva a entrar a la factura para imprimir el PDF. ")
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
GeneraPDFCotizacion(ChkEnviarFactura.Checked) ' MANDA CORREO
|
GeneraPDFCotizacion(ChkEnviarFactura.Checked) ' MANDA CORREO
|
||||||
@@ -17235,7 +17262,7 @@ Partial Class Ventas
|
|||||||
DdlVendedorSucursal.SelectedValue = Nothing
|
DdlVendedorSucursal.SelectedValue = Nothing
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(302) = "1" AndAlso DdlSubProyectoDatos.SelectedValue.ToEntero() > 0 Then
|
If UsuarioActual.Empresa.Funcionalidad(302) = "1" AndAlso DdlSubProyectoDatos.SelectedValue.ToEntero() > 0 Then
|
||||||
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("(CveSubProyecto IS NULL OR CveSubProyecto = {0})", DdlSubProyectoDatos.SelectedValue)).FiltraParametros("VendedorTipo = 1")
|
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltraParametros(String.Format("VendedorTipo IN (1,4) AND (CveSubProyecto IS NULL OR CveSubProyecto = {0})", DdlSubProyectoDatos.SelectedValue))
|
||||||
Else
|
Else
|
||||||
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltraParametros("VendedorTipo = 1")
|
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltraParametros("VendedorTipo = 1")
|
||||||
End If
|
End If
|
||||||
@@ -17281,11 +17308,11 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If CveVendedorActual > 0 Then
|
If CveVendedorActual > 0 Then
|
||||||
Dim VendedorActual As String = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Vendedor", $"CveVendedor = {CveVendedorActual}")
|
Dim VendedorActual As String = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltroPrimeroValor("Vendedor", $"CveVendedor = {CveVendedorActual}")
|
||||||
'SI NO ENCUENTRA BUSCA EN LOS VENDEDORES DEL PV
|
'SI NO ENCUENTRA BUSCA EN LOS VENDEDORES DEL PV
|
||||||
If String.IsNullOrEmpty(VendedorActual) Then
|
'If String.IsNullOrEmpty(VendedorActual) Then
|
||||||
VendedorActual = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=4).FiltroPrimeroValor("Vendedor", String.Format("CveVendedor = {0}", CveVendedorActual))
|
' VendedorActual = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=4).FiltroPrimeroValor("Vendedor", String.Format("CveVendedor = {0}", CveVendedorActual))
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If String.IsNullOrEmpty(VendedorActual) Then
|
If String.IsNullOrEmpty(VendedorActual) Then
|
||||||
DdlVendedor.SelectedValueExist(CveVendedorActual)
|
DdlVendedor.SelectedValueExist(CveVendedorActual)
|
||||||
@@ -17294,17 +17321,10 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 140 Then
|
If DdlVendedor.SelectedValue.ToEntero() > 0 AndAlso Not UsuarioActual.TienePermisoProceso(161) Then
|
||||||
If Not UsuarioActual.TienePermisoProceso(161) Then
|
DdlVendedor.Enabled = False
|
||||||
DdlVendedor.Enabled = False
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
If DdlVendedor.SelectedValue.ToEntero() > 0 AndAlso Not UsuarioActual.TienePermisoProceso(161) Then
|
|
||||||
DdlVendedor.Enabled = False
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'multiples vendedores visible
|
'multiples vendedores visible
|
||||||
If UsuarioActual.TienePermisoProceso(153) Then
|
If UsuarioActual.TienePermisoProceso(153) Then
|
||||||
DdlVendedor.Enabled = True
|
DdlVendedor.Enabled = True
|
||||||
|
|||||||
@@ -134,7 +134,12 @@ Public Class WSGPSApp
|
|||||||
Clientes.Add(New WsClientePortalGPS With {.CveCliente = Row("CveCliente").ToString.ToEntero, .Cliente = Row("Cliente").ToString})
|
Clientes.Add(New WsClientePortalGPS With {.CveCliente = Row("CveCliente").ToString.ToEntero, .Cliente = Row("Cliente").ToString})
|
||||||
Next
|
Next
|
||||||
If UsuarioActual.CveCliente <= 0 AndAlso Clientes.Any() Then
|
If UsuarioActual.CveCliente <= 0 AndAlso Clientes.Any() Then
|
||||||
UsuarioRetorno.CveCliente = Clientes.FirstOrDefault().CveCliente
|
UsuarioRetorno.CveCliente = Clientes.FirstOrDefault().CveCliente
|
||||||
|
If UsuarioRetorno.CveCliente > 0 Then
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(704).Contiene(UsuarioRetorno.CveCliente.ToString()) Then
|
||||||
|
UsuarioRetorno.RastreoSoloInicio = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -196,7 +201,15 @@ Public Class WSGPSApp
|
|||||||
Clientes.Add(New WsClientePortalGPS With {.CveCliente = Row("CveCliente").ToString.ToEntero, .Cliente = Row("Cliente").ToString})
|
Clientes.Add(New WsClientePortalGPS With {.CveCliente = Row("CveCliente").ToString.ToEntero, .Cliente = Row("Cliente").ToString})
|
||||||
Next
|
Next
|
||||||
If UsuarioActual.CveCliente <= 0 AndAlso Clientes.Any() Then
|
If UsuarioActual.CveCliente <= 0 AndAlso Clientes.Any() Then
|
||||||
UsuarioRetorno.CveCliente = Clientes.FirstOrDefault().CveCliente
|
UsuarioRetorno.CveCliente = Clientes.FirstOrDefault().CveCliente
|
||||||
|
If UsuarioActual.CveCliente <= 0 AndAlso Clientes.Any() Then
|
||||||
|
UsuarioRetorno.CveCliente = Clientes.FirstOrDefault().CveCliente
|
||||||
|
If UsuarioRetorno.CveCliente > 0 Then
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(704).Contiene(UsuarioRetorno.CveCliente.ToString()) Then
|
||||||
|
UsuarioRetorno.RastreoSoloInicio = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -1126,7 +1139,8 @@ Namespace ADGPSModels
|
|||||||
Public Property Contrasenia As String
|
Public Property Contrasenia As String
|
||||||
|
|
||||||
Public Property TienePermisoOC As Boolean
|
Public Property TienePermisoOC As Boolean
|
||||||
Public Property TienePermisoPS As Boolean
|
Public Property TienePermisoPS As Boolean
|
||||||
|
Public Property RastreoSoloInicio As Boolean = False
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
<Serializable>
|
<Serializable>
|
||||||
|
|||||||
Reference in New Issue
Block a user