Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -589,11 +589,12 @@ Public Class ClsNominas
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function RegistraProvision(CvePeriodo As Int32, CveEmpresa As Int32) As Boolean
|
||||
Public Function RegistraProvision(CvePeriodo As Int32, CveUsuario As Int32, CveEmpresa As Int32) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_Nom_RegistraProvision", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
|
||||
@@ -5270,6 +5270,24 @@ Public Class ClsVentas
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetRNCSaldoNCRelacionadas(CveVentaRNC As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_RNCSaldoNCRelacionadas")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVentaRNC", SqlDbType.Int).Value = CveVentaRNC
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el saldo de la RNC.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "P O R C E N T A J E - C O M I S I O N E S"
|
||||
|
||||
@@ -313,6 +313,7 @@ Namespace Modelos
|
||||
Public CveMarca As Integer = -1
|
||||
Public ObsDescuento As String = ""
|
||||
End Class
|
||||
|
||||
<Serializable>
|
||||
Public Class VentasBonificaciones
|
||||
Public CveVentaRNCCargo As Integer = -1
|
||||
@@ -335,6 +336,22 @@ Namespace Modelos
|
||||
Public Property CveVentaDetalle As Integer
|
||||
Public Property Cantidad As Decimal
|
||||
End Class
|
||||
<Serializable>
|
||||
Public Class MConceptoUsado
|
||||
Public Property Consecutivo As Integer
|
||||
Public Property ConsecutivoUsado As Integer
|
||||
Public Property CvePS As Integer
|
||||
End Class
|
||||
<Serializable>
|
||||
Public Class MFolioGarantiaMensaje
|
||||
Public Property CvePS As Integer
|
||||
Public Property CveClasificacionPS As Integer
|
||||
Public Property ClasificacionPS As String
|
||||
Public Property CveFolioGarantia As Integer
|
||||
Public Property TipoFolio As String
|
||||
|
||||
Public Property Valido As Boolean
|
||||
End Class
|
||||
Public Enum TipoMensajeRespuesta
|
||||
TextoLimpio = 0
|
||||
HTML = 1
|
||||
@@ -4838,6 +4855,25 @@ Namespace Modelos
|
||||
Dim TieneAlmacen As Boolean = False
|
||||
Dim AplicaRefacturacionConPagos As Boolean = False
|
||||
|
||||
'VALIDA QUE LA RNC NO TENGA EGS CON SALDO
|
||||
If ObjFactura.TipoDocto = "RNC" Then
|
||||
Dim TotalRNC As Decimal = ObjFactura.Total
|
||||
Dim SaldoRNC As Decimal = 0
|
||||
Using ObjRNC As New ClsVentas
|
||||
If ObjRNC.GetRNCSaldoNCRelacionadas(ObjFactura.CveVenta) AndAlso ObjRNC.DtResultados.Rows.Count > 0 Then
|
||||
SaldoRNC = ObjRNC.DtResultados.FiltroPrimeroValor("SaldoRNC", "CveVentaEGS IS NULL").ToDecimal()
|
||||
End If
|
||||
End Using
|
||||
|
||||
'SI TIENE SALDO PENDIENTE POR CANCELAR DE LAS NOTAS DE CREDITO, NO PERMITIR CANCELAR
|
||||
If SaldoRNC <= 0 OrElse (SaldoRNC <> TotalRNC) Then
|
||||
Retorno.Mensaje = "La remisión no se puede cancelar debido a que tiene notas de credito vigentes"
|
||||
Retorno.TipoMensaje = TipoMensaje.MsgAdvertencia
|
||||
|
||||
Return Retorno
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim CveEstatusRefacturacion As Integer = If(ObjFactura.CveEstatusRefacturacion <= 0, 0, ObjFactura.CveEstatusRefacturacion)
|
||||
|
||||
'SI YA FUE MARCADA COMO REFACTURACION Y FUE SEPARADA, MANTENER EL COMPORTAMIENTO DE CANCELACION COMO REFACTURACION
|
||||
@@ -5542,6 +5578,14 @@ Namespace Modelos
|
||||
AutoConta = False
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorCancelar AndAlso ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Modelos/RecepcionEntrega | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If AutoConta And Not ErrorCancelar Then
|
||||
|
||||
If IdCtaContable > 0 Then
|
||||
|
||||
@@ -1401,8 +1401,11 @@ Partial Class Bancos_Creditos
|
||||
Next
|
||||
TotalAnticipoVinculado += RowIE("Importe").ToString.ToDouble
|
||||
|
||||
If TotalAnticipoVinculado > TotalAnticipo Then
|
||||
Alert("El anticipo vinculado no puede exceder el anticipo especificado.", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
Dim TotalAnticipoMasTolerancia As Decimal = TotalAnticipo.ToDecimal + (TotalAnticipo * 0.16).ToDecimal
|
||||
|
||||
If TotalAnticipoVinculado > TotalAnticipoMasTolerancia Then
|
||||
Alert($"El anticipo vinculado ({TotalAnticipoVinculado.ToString("###,###,###.00")}) no puede exceder el anticipo especificado ({TotalAnticipoMasTolerancia.ToString("###,###,###.00")} tolerancia de 16% incluida).", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
@@ -5845,6 +5845,8 @@ Partial Class Bancos_IE
|
||||
TxtObservaciones.Text = $"SOLICITUD DE VIÁTICOS - FOLIO {ObjBancos.DtResultados.FiltroPrimeroValor("Folio").ToString()}: {ObjBancos.DtResultados.FiltroPrimeroValor("Asunto").ToString()}."
|
||||
End If
|
||||
ObjBancos.Dispose()
|
||||
|
||||
RBL_SelectedIndexChanged(Nothing, Nothing)
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -377,7 +377,7 @@
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtAbonar" Width="80px" runat="server" Style="text-align: right;" onkeyup="FormatoMoneda(this)"></asp:TextBox>
|
||||
<asp:RangeValidator ID="RVAbonar" runat="server" Enabled="false" Type="Currency" MinimumValue="0" MaximumValue='<%# Eval("Saldo", "{0:N2}") %>' ErrorMessage="*" ControlToValidate="TxtAbonar" Display="Dynamic"></asp:RangeValidator>
|
||||
<asp:TextBox ID="TxtCveMoneda" Enabled="false" Width="80px" Text='<%# Eval("CveMoneda")%>' runat="server" Style="text-align: right;"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtCveMoneda" Enabled="false" Width="80px" Text='<%# Eval("CveMoneda")%>' runat="server" Style="text-align: right;display:none" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false">
|
||||
|
||||
@@ -351,30 +351,32 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
ImporteBancosMN = (Importe * TCPago).RoundSQL();
|
||||
ImporteAcreedorMN = (Importe * TC).RoundSQL();
|
||||
|
||||
//if (CveMonedaPago == 1 && tCveMoneda == 1)
|
||||
//{
|
||||
// ImporteMN = Importe;
|
||||
// ImporteComisionMN = ImporteComision;
|
||||
//}
|
||||
//else if (CveMonedaPago == 1 && tCveMoneda == 2)
|
||||
//{
|
||||
// ImporteComisionMN = ImporteComision;
|
||||
|
||||
// ImporteMN = Importe;
|
||||
// ImporteComplementaria = (Importe * TC - Importe).RoundSQL();
|
||||
//}
|
||||
//else if (CveMonedaPago == 2 && tCveMoneda == 1)
|
||||
//{
|
||||
// ImporteMN = Importe;
|
||||
// ImporteComisionMN = ImporteComision;
|
||||
// ImporteComplementaria = 0;
|
||||
//}
|
||||
//else if (CveMonedaPago == 2 && tCveMoneda == 2)
|
||||
//{
|
||||
// ImporteComisionMN = ImporteComision;
|
||||
// ImporteMN = Importe;
|
||||
// ImporteComplementaria = (Importe * TC - Importe).RoundSQL();
|
||||
//}
|
||||
if (CveMonedaPago == 1 && tCveMoneda == 1)
|
||||
{
|
||||
//ImporteMN = Importe;
|
||||
//ImporteComisionMN = ImporteComision;
|
||||
}
|
||||
else if (CveMonedaPago == 1 && tCveMoneda == 2)
|
||||
{
|
||||
//ImporteComisionMN = ImporteComision;
|
||||
|
||||
//ImporteMN = Importe;
|
||||
//ImporteComplementaria = (Importe * TC - Importe).RoundSQL();
|
||||
}
|
||||
else if (CveMonedaPago == 2 && tCveMoneda == 1)
|
||||
{
|
||||
ImporteBancosMN = Importe;
|
||||
ImporteMN = Importe;
|
||||
//ImporteComisionMN = ImporteComision;
|
||||
//ImporteComplementaria = 0;
|
||||
}
|
||||
else if (CveMonedaPago == 2 && tCveMoneda == 2)
|
||||
{
|
||||
|
||||
//ImporteComisionMN = ImporteComision;
|
||||
//ImporteMN = Importe;
|
||||
//ImporteComplementaria = (Importe * TC - Importe).RoundSQL();
|
||||
}
|
||||
|
||||
//ImporteMN = ImporteMN.RoundSQL();
|
||||
//ImporteComplementaria = ImporteComplementaria.RoundSQL();
|
||||
|
||||
@@ -531,10 +531,17 @@
|
||||
</div>
|
||||
<div class="form-group proveedoreespes" runat="server" id="divImportacion" visible="false">
|
||||
<span class="whitoutcol linewhitsize proveedoreespes">Importación </span>
|
||||
<div class="whitoutcol whitoutcol">
|
||||
<div class="whitoutcol">
|
||||
<asp:CheckBox runat="server" ID="chkImportacion"> </asp:CheckBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group proveedoreespes" runat="server" id="divCompraImportacion" visible="false">
|
||||
<span class="whitoutcol linewhitsize proveedoreespes">
|
||||
<asp:Literal ID="LtlImportacionTexto" runat="server">Importación</asp:Literal>:</span>
|
||||
<div class="whitoutcol">
|
||||
<asp:HyperLink runat="server" ID="HplCompraImportacion" CssClass="Texto"> </asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group proveedoreespes" runat="server" id="divFolioGarantia" visible="false">
|
||||
<span class="whitoutcol linewhitsize proveedoreespes">Folio Garantía </span>
|
||||
<div class="whitoutcol whitoutcol">
|
||||
|
||||
@@ -2841,6 +2841,19 @@ Partial Class Compras_Compras
|
||||
|
||||
TxtRembolsoNumero.Enabled = If(IdPoliza > 0, False, True)
|
||||
|
||||
If dr("CveImportacion").ToString <> "" Then
|
||||
divCompraImportacion.Visible = True
|
||||
HplCompraImportacion.Text = dr("Importacion").ToString
|
||||
If dr("TipoImportacion").ToString = "2" Then 'flete/indirecto
|
||||
LtlImportacionTexto.Text = "Indirecto"
|
||||
HplCompraImportacion.NavigateUrl = $"/Inventarios/Fletes.aspx?CveFlete={dr("CveImportacion")}"
|
||||
Else
|
||||
HplCompraImportacion.NavigateUrl = $"/Compras/Importaciones.aspx?CveImportacion={dr("CveImportacion")}"
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If dr("CveFolioGarantia").ToString <> "" Then
|
||||
divFolioGarantia.Visible = True
|
||||
DdlFolioGarantia.Items.Insert(0, New ListItem(dr("FolioGarantia").ToString, dr("CveFolioGarantia").ToString))
|
||||
@@ -3004,7 +3017,6 @@ Partial Class Compras_Compras
|
||||
ImgFecha.Enabled = False
|
||||
CEFecha.Enabled = False
|
||||
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(342) Then
|
||||
TxtFecha.Enabled = True
|
||||
ImgFecha.Enabled = True
|
||||
@@ -3012,8 +3024,6 @@ Partial Class Compras_Compras
|
||||
LnkActualziarFechadecompra.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
DdlProveedor.Enabled = False
|
||||
DdlProveedorSucursal.Enabled = False
|
||||
DdlEstatus.Enabled = False
|
||||
@@ -6494,13 +6504,13 @@ Partial Class Compras_Compras
|
||||
If importeMN <> 0 Then
|
||||
|
||||
'SI ES GASTO CON ALMACEN NO DEBE CONTABILIZAR CONCEPTO 68
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=If(DdlTipoCompra.SelectedValue = "10", False, SeContabiliza)) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN.RoundSQL(2), Referencia, 68, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN.RoundSQL(2), ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=If(DdlTipoCompra.SelectedValue = "10", False, SeContabiliza)) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
'SI ES GASTO CON ALMACEN REGISTRA EL CONCEPTO 95
|
||||
If DdlTipoCompra.SelectedValue = "10" Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMN, Referencia, 95, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=False) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMN.RoundSQL(2), Referencia, 95, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN.RoundSQL(2), ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=False) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -1174,7 +1174,18 @@ Partial Class PopUpVerFactura
|
||||
'IMPRIME REPORTE DE ENTRADA DE ALMACEN
|
||||
If UrlParametros("OP").ToString = "Alm" Then
|
||||
If UrlParametros("CVEMOVIMIENTO") IsNot Nothing AndAlso UrlParametros("CVEMOVIMIENTO").ToString.ToEntero > 0 Then
|
||||
CargaMovimientosAlmacen(UrlParametros("CVEMOVIMIENTO").ToString.ToEntero)
|
||||
|
||||
'Optional EsTransitorio As Boolean = False, Optional CveAlmacenRecepcion As Integer = -1, Optional CveAlmacenTransitorioRecepcion As Integer = -1, Optional FolioBusquedaTrasitorio As Integer = -1
|
||||
|
||||
Dim EsTransitorio As Boolean = If(UrlParametros("ESTRANSITORIO") Is Nothing, False, Boolean.Parse((UrlParametros("ESTRANSITORIO").ToString)))
|
||||
Dim CveAlmacenRecepcion As Integer = If(UrlParametros("CVEALMACENRECEPCION") Is Nothing, -1, (UrlParametros("CVEALMACENRECEPCION").ToString.ToEntero))
|
||||
Dim CveAlmacenTransitorioRecepcion As Integer = If(UrlParametros("CVEALMACENTRANSITORIORECEPCION") Is Nothing, -1, (UrlParametros("CVEALMACENTRANSITORIORECEPCION").ToString.ToEntero))
|
||||
Dim FolioBusquedaTrasitorio As Integer = If(UrlParametros("FOLIOBUSQUEDATRASITORIO") Is Nothing, -1, (UrlParametros("FOLIOBUSQUEDATRASITORIO").ToString.ToEntero))
|
||||
|
||||
|
||||
CargaMovimientosAlmacen(UrlParametros("CVEMOVIMIENTO").ToString.ToEntero, Resumen:=False, EsTransitorio:=EsTransitorio, CveAlmacenRecepcion:=CveAlmacenRecepcion, CveAlmacenTransitorioRecepcion:=CveAlmacenTransitorioRecepcion,
|
||||
FolioBusquedaTrasitorio:=FolioBusquedaTrasitorio)
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -3286,9 +3297,14 @@ Partial Class PopUpVerFactura
|
||||
|
||||
#Region " - OP = 'Alm' - REPORTE ENTRADAS ALMACEN "
|
||||
|
||||
Private Sub CargaMovimientosAlmacen(CveMovimiento As Integer, Optional Resumen As Boolean = False)
|
||||
Private Sub CargaMovimientosAlmacen(CveMovimiento As Integer, Optional Resumen As Boolean = False,
|
||||
Optional EsTransitorio As Boolean = False, Optional CveAlmacenRecepcion As Integer = -1, Optional CveAlmacenTransitorioRecepcion As Integer = -1, Optional FolioBusquedaTrasitorio As Integer = -1)
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ObjInventarios.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim CveConcepto As Integer = ObjInventarios.CveConcepto
|
||||
@@ -3330,6 +3346,7 @@ Partial Class PopUpVerFactura
|
||||
Dim ResponsableRecibio As String = ObjInventarios.ResponsableRecibio
|
||||
Dim UsuarioCapturo As String = ObjInventarios.DtResultados.FiltroPrimeroValor("UsuarioCapturo")
|
||||
|
||||
|
||||
If String.IsNullOrEmpty(Recibio) Then
|
||||
Dim ObjRH As New ClsRH
|
||||
If ObjRH.GetPersonal(ObjInventarios.CvePersonal, UsuarioActual.CveEmpresa) AndAlso ObjRH.DtResultados.Rows.Count > 0 Then
|
||||
@@ -3416,39 +3433,64 @@ Partial Class PopUpVerFactura
|
||||
DtMovimientos.PrimaryKey = keys
|
||||
End If
|
||||
Else
|
||||
If ObjInventarios.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa, Resumen:=Resumen) Then
|
||||
DtMovimientos = ObjInventarios.DtResultados.Copy()
|
||||
CantidadProductos = DtMovimientos.SUM("Cantidad").ToDecimal()
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveMovimientoRelacionado > 0 Then
|
||||
If ObjInventarios.GetMovimientos(CveMovimientoRelacionado, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
Dim CveAlmacenRelacionado As Integer = ObjInventarios.CveAlmacen
|
||||
Dim CveTipoAlmacenRelacionado As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {CveAlmacenRelacionado}").ToString.ToEntero
|
||||
|
||||
'SI TIENE RELACIONADO UN MOVIMIENTO VIRTUAL DEBE AGREGAR ESTE MOVIMIENTO A LA IMPRESION
|
||||
If CveTipoAlmacenRelacionado.Contiene(24, 25) Then
|
||||
If ObjInventarios.GetMovimientosDetalle(CveMovimientoRelacionado, UsuarioActual.CveEmpresa) Then
|
||||
Dim DtUsados As DataTable = ObjInventarios.DtResultados.Copy()
|
||||
CantidadUsados = DtUsados.SUM("Cantidad").ToDecimal()
|
||||
Dim IndexInicialUsados As Integer = DtMovimientos.Rows.Count + 1
|
||||
If EsTransitorio Then
|
||||
|
||||
For Each Dr As DataRow In DtUsados.Rows
|
||||
Dr("No") = IndexInicialUsados
|
||||
IndexInicialUsados += 1
|
||||
Next
|
||||
If ObjInventarios.GetMovimientosTransitorios(CveAlmacenRecepcion, -1, CveAlmacenTransitorioRecepcion, -1, FolioBusquedaTrasitorio, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||
DtMovimientos = ObjInventarios.DtResultados.FiltraParametros(String.Format("CveTipoAlmacenDestino <> 4 AND CvePS > 0"))
|
||||
CantidadProductos = DtMovimientos.SUM("Cantidad").ToDecimal()
|
||||
|
||||
DtMovimientos.Merge(DtUsados)
|
||||
If Not DtMovimientos.Columns.Contains("No") Then
|
||||
DtMovimientos.Columns.Add("No", GetType(Integer))
|
||||
DtMovimientos.Columns("No").AutoIncrement = True
|
||||
DtMovimientos.Columns("No").AutoIncrementSeed = DtMovimientos.Rows.Count + 1
|
||||
DtMovimientos.Columns("No").AutoIncrementStep = 1
|
||||
Dim keys(1) As DataColumn
|
||||
keys(0) = DtMovimientos.Columns("No")
|
||||
DtMovimientos.PrimaryKey = keys
|
||||
End If
|
||||
|
||||
End If
|
||||
Else
|
||||
If ObjInventarios.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa, Resumen:=Resumen) Then
|
||||
DtMovimientos = ObjInventarios.DtResultados.Copy()
|
||||
CantidadProductos = DtMovimientos.SUM("Cantidad").ToDecimal()
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveMovimientoRelacionado > 0 Then
|
||||
If ObjInventarios.GetMovimientos(CveMovimientoRelacionado, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
Dim CveAlmacenRelacionado As Integer = ObjInventarios.CveAlmacen
|
||||
Dim CveTipoAlmacenRelacionado As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {CveAlmacenRelacionado}").ToString.ToEntero
|
||||
|
||||
'SI TIENE RELACIONADO UN MOVIMIENTO VIRTUAL DEBE AGREGAR ESTE MOVIMIENTO A LA IMPRESION
|
||||
If CveTipoAlmacenRelacionado.Contiene(24, 25) Then
|
||||
If ObjInventarios.GetMovimientosDetalle(CveMovimientoRelacionado, UsuarioActual.CveEmpresa) Then
|
||||
Dim DtUsados As DataTable = ObjInventarios.DtResultados.Copy()
|
||||
CantidadUsados = DtUsados.SUM("Cantidad").ToDecimal()
|
||||
Dim IndexInicialUsados As Integer = DtMovimientos.Rows.Count + 1
|
||||
|
||||
For Each Dr As DataRow In DtUsados.Rows
|
||||
Dr("No") = IndexInicialUsados
|
||||
IndexInicialUsados += 1
|
||||
Next
|
||||
|
||||
DtMovimientos.Merge(DtUsados)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
DtMovimientos.Columns("No").AutoIncrement = True
|
||||
DtMovimientos.Columns("No").AutoIncrementSeed = DtMovimientos.Rows.Count + 1
|
||||
DtMovimientos.Columns("No").AutoIncrementStep = 1
|
||||
Dim keys(1) As DataColumn
|
||||
keys(0) = DtMovimientos.Columns("No")
|
||||
DtMovimientos.PrimaryKey = keys
|
||||
End If
|
||||
|
||||
DtMovimientos.Columns("No").AutoIncrement = True
|
||||
DtMovimientos.Columns("No").AutoIncrementSeed = DtMovimientos.Rows.Count + 1
|
||||
DtMovimientos.Columns("No").AutoIncrementStep = 1
|
||||
Dim keys(1) As DataColumn
|
||||
keys(0) = DtMovimientos.Columns("No")
|
||||
DtMovimientos.PrimaryKey = keys
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveCompra > 0 Then
|
||||
@@ -3481,6 +3523,12 @@ Partial Class PopUpVerFactura
|
||||
ObjInventarios.Dispose()
|
||||
If RazonSocial = "" AndAlso NombreCliente <> "" Then RazonSocial = NombreCliente
|
||||
|
||||
If EsTransitorio Then
|
||||
|
||||
Observaciones = If(Observaciones.Trim.Length = 0, "Impresión con cantidades pendientes de recibir", $"Impresión con cantidades pendientes de recibir - {Observaciones}")
|
||||
|
||||
End If
|
||||
|
||||
ImprimePDFAlmacen(CveConcepto, CveCompra, Folio.ToString, Fecha, Almacen, SubProyecto, Observaciones, Recibio,
|
||||
Personal, Capturo, AlmacenDestino, CveConsignacion, CveMoneda, Moneda, FolioVenta, FolioOC,
|
||||
FolioInterno, FechaHora, ObservacionesSolicitud, DepartamentoEntrega, RazonSocialOC,
|
||||
@@ -4214,7 +4262,7 @@ Partial Class PopUpVerFactura
|
||||
|
||||
Dim CveContrato As Integer = 0
|
||||
If DtMovimientos IsNot Nothing AndAlso DtMovimientos.Rows.Count > 0 Then
|
||||
CveContrato = DtMovimientos(0)("CveContrato").ToString.ToEntero
|
||||
CveContrato = DtMovimientos.FiltroPrimeroValor("CveContrato").ToEntero
|
||||
End If
|
||||
|
||||
If CveContrato > 0 Then
|
||||
|
||||
@@ -529,7 +529,8 @@
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>TipoGasto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="DdlTipoGasto" runat="server" Text='<%# Eval("TipoGasto") %>'></asp:Literal><br />
|
||||
<asp:Literal ID="LtlTipoGasto" runat="server" Text='<%# Eval("TipoGasto") %>'></asp:Literal><br />
|
||||
<%--<asp:DropDownList ID="DdlTipoGasto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="150px"></asp:DropDownList>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle />
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -2143,9 +2143,23 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
Protected Sub DdlTipoGasto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
If UpPrePoliza.Visible Then
|
||||
For Each Gvr As GridViewRow In GvPrePoliza.Rows
|
||||
Gvr.FCDropDownList("DdlTipoGasto").SelectedValueExist(DdlTipoGasto.SelectedValue)
|
||||
|
||||
|
||||
For Each dRow As DataRow In DtMovimientos.Rows
|
||||
dRow("CveTipoGasto") = DdlTipoGasto.SelectedValue
|
||||
dRow("TipoGasto") = DdlTipoGasto.SelectedItem.Text
|
||||
Next
|
||||
|
||||
DtMovimientos.AcceptChanges()
|
||||
GvPrePoliza.DataSource = DtMovimientos
|
||||
GvPrePoliza.DataBind()
|
||||
|
||||
For Each Gvr As GridViewRow In GvPrePoliza.Rows
|
||||
'Gvr.FCDropDownList("DdlTipoGasto").SelectedValueExist(DdlTipoGasto.SelectedValue)
|
||||
Gvr.FCCheckBox("chkModificado").Checked = True
|
||||
|
||||
Next
|
||||
|
||||
UpPrePoliza.Update()
|
||||
End If
|
||||
If divMovtos.Visible Then
|
||||
|
||||
@@ -5286,7 +5286,6 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox35</rd:DefaultName>
|
||||
<Top>0cm</Top>
|
||||
<Left>17.09769cm</Left>
|
||||
<Height>0.41981cm</Height>
|
||||
<Width>2.94979cm</Width>
|
||||
@@ -5382,7 +5381,6 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox31</rd:DefaultName>
|
||||
<Top>0cm</Top>
|
||||
<Left>9.1611cm</Left>
|
||||
<Height>0.41981cm</Height>
|
||||
<Width>6.02198cm</Width>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -1910,6 +1910,9 @@ Partial Class Inventarios_EntradasSalidas
|
||||
If UsuarioActual.Empresa.Funcionalidad(342).ToEntero > 0 Then
|
||||
IdCtaContableOtro = UsuarioActual.Empresa.Funcionalidad(342).ToEntero
|
||||
End If
|
||||
Case 34
|
||||
CveConceptoContable = 51
|
||||
EsContabilizable = True
|
||||
Case 13, 29
|
||||
CveConceptoContable = 69
|
||||
TipoMovtoOtro = True
|
||||
@@ -1930,7 +1933,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Else
|
||||
|
||||
'Dim Total As Decimal = 0
|
||||
If CveConceptoContable.Contiene(181, 78) Then
|
||||
If CveConceptoContable.Contiene(181, 78, 51) Then
|
||||
Dim Dt As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"}).Copy
|
||||
'Dim IdCuentaGasto As Integer = 0
|
||||
For Each Dr As DataRow In Dt.Rows
|
||||
|
||||
@@ -3137,7 +3137,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
If Not ErrorMovInv AndAlso ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Compras/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
GuardaLogAD($"Inventario/EntregaAlmacen | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -518,7 +518,7 @@
|
||||
|
||||
<asp:GridView ID="GvInv" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowFooter="True" ShowHeader="true" ShowHeaderWhenEmpty="True"
|
||||
DataKeyNames="EntregaDirecta,Consec,CodigoBarras,CvePS,CveUM,PU,CantidadC,CantidadF,UM,PS,CveCompraDetalle,CveOrdenCompraDetalle,PUExtranjero,AplicaSerieLote,CveClasificacion,Codigo,CveVentaDetalle,CostoIndirecto,CveTamaño,Lote,AplicaSeccion,AplicaLote,AplicaCaducidad,AplicaSerie" HeaderStyle-CssClass="Titulos" RowStyle-Height="25px" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None">
|
||||
<HeaderStyle Height="58px" />
|
||||
<HeaderStyle Height="28px" />
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -573,6 +573,7 @@
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
<asp:HyperLink ID="HplImprimirRecepcion" runat="server" Visible="false" class="Texto" style="font-size:12px"> PDF <i class="fa fa-file-pdf-o"></i></asp:HyperLink>
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -615,17 +616,30 @@
|
||||
<asp:CheckBox ID="ChkRealizarDevolucion" runat="server" Checked="false" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div style="text-align: center;" class="col-sm-12">
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnRecibir" runat="server" Text="Recibir Traspaso" OnClick="BtnRecibir_Click" class="btn btn-primary" ValidationGroup="GrpRecibir" />
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div style="text-align: center;" class="col-sm-12">
|
||||
<asp:Button ID="BtnRecibir" runat="server" Text="Recibir Traspaso" OnClick="BtnRecibir_Click" class="btn btn-primary" ValidationGroup="GrpRecibir" />
|
||||
<asp:Button ID="BtnCancelarTraspaso" runat="server" Text="Cancelar Traspaso" OnClick="BtnCancelarTraspaso_Click" class="btn btn-danger" Visible="false" ValidationGroup="GrpRecibir" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el traspaso?" data-btn-ok-label="si" />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<asp:Button ID="BtnCancelarTraspaso" runat="server" Text="Cancelar Traspaso" OnClick="BtnCancelarTraspaso_Click" class="btn btn-danger" Visible="false" ValidationGroup="GrpRecibir" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el traspaso?" data-btn-ok-label="si" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -227,7 +227,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
CvePS = 0
|
||||
TipoSeccionAlmacen = 0
|
||||
Dim PermisoEspecialCambioFecha As Boolean = False
|
||||
If UsuarioActual.CveUsuario = 1937 Then PermisoEspecialCambioFecha = True
|
||||
If UsuarioActual.CveUsuario.Contiene(100, 1937) Then PermisoEspecialCambioFecha = True
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 And Not PermisoEspecialCambioFecha Then
|
||||
TxtFecha.Enabled = False
|
||||
@@ -972,7 +972,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
If Existencia < 0 Then
|
||||
ErrorExistencia = True
|
||||
TextoExistencia.AppendFormat("-<b>#{0}</b> {1} {2} Existencia: <b>{3}</b>{4}<br/>", gvr.DataKey("No"), gvr.DataKey("PS"), If(gvr.DataKey("Serie").ToString().Trim().Length > 0, $" Serie: <b>{gvr.DataKey("Serie")}</b>", ""), (Existencia + gvr.FCTextBox("TxtCantidad2").Text.ToEntero), MsgAdicional)
|
||||
TextoExistencia.AppendFormat(" {1},", gvr.DataKey("No"), gvr.DataKey("CvePS"), If(gvr.DataKey("Serie").ToString().Trim().Length > 0, $" Serie: <b>{gvr.DataKey("Serie")}</b>", ""), (Existencia + gvr.FCTextBox("TxtCantidad2").Text.ToEntero), MsgAdicional)
|
||||
End If
|
||||
Next
|
||||
|
||||
@@ -1465,6 +1465,8 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
DivRealizarDevolucion.Visible = False
|
||||
ChkRealizarDevolucion.Checked = False
|
||||
|
||||
Dim CveMovimientoTraspaso As Integer = -1
|
||||
|
||||
Dim Dtt As DataTable = Nothing
|
||||
|
||||
FolioBusqueda = If(TxtFolioRecepcion.Text = "", -1, TxtFolioRecepcion.Text.ToEntero)
|
||||
@@ -1472,6 +1474,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
If ObjInventarios.GetMovimientosTransitorios(DdlAlmacenRecepcion.SelectedValue.ToEntero, -1, DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero, -1, FolioBusqueda, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||
Dtt = ObjInventarios.DtResultados.FiltraParametros(String.Format("CveTipoAlmacenDestino <> 4"))
|
||||
CveMovimientoTraspaso = Dtt.FiltroPrimeroValor("CveMovimiento").ToEntero
|
||||
Else
|
||||
Alert("Ocurrió un error al consultar los movimientos transitorios. Por favor vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Dtt = Nothing
|
||||
@@ -1493,8 +1496,6 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
GvDatosRecepcion.DataSource = Dtt
|
||||
GvDatosRecepcion.DataBind()
|
||||
|
||||
|
||||
|
||||
'GvDatosRecepcion.Columns(6).Visible = Dtt.MAX("Serie") <> ""
|
||||
GvDatosRecepcion.Columns(6).Visible = Dtt.MAX("AplicaSerie") = "True"
|
||||
GvDatosRecepcion.Columns(7).Visible = Dtt.MAX("AplicaLote").ToEntero > 0 'Dtt.MAX("Lote") <> ""
|
||||
@@ -1515,6 +1516,13 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
If UsuarioActual.TienePermisoProceso(347) Then
|
||||
DivRealizarDevolucion.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
HplImprimirRecepcion.Visible = True
|
||||
HplImprimirRecepcion.NavigateUrl = $"/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=Alm&CveMovimiento={CveMovimientoTraspaso}&EsTransitorio=True&CveAlmacenRecepcion={DdlAlmacenRecepcion.SelectedValue.ToEntero}&CveAlmacenTransitorioRecepcion={DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero}&FolioBusquedaTrasitorio={FolioBusqueda}")}"
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
@@ -8362,7 +8362,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
if (objnom.RegistraProvision(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa))
|
||||
if (objnom.RegistraProvision(CvePeriodoSeleccionado, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
int CvePrePolizaProvision = 0; int CvePrePolizaasmilidos = 0; int CvePrePolizaProrrateo = 0;
|
||||
if (objnom.DTSetResultados.Tables.Count > 1 && objnom.DTSetResultados.Tables[1].Rows.Count == 0)
|
||||
|
||||
@@ -2078,9 +2078,10 @@
|
||||
<label class="col-md-2">Importe:</label>
|
||||
<div class="col-md-4 form-group">
|
||||
<div class="input-group">
|
||||
<asp:TextBox ID="TxtSAImPorcentaje" min="0" max="100" step="any" CssClass="form-control input-sm" type="number" runat="server"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtSAImPorcentaje" min="0" max="100" CssClass="form-control input-sm" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVSAImPorcentaje" runat="server" ControlToValidate="TxtSAImPorcentaje" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Porcentaje''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalSolicitarAnticipo"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCESAImPorcentaje" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVSAImPorcentaje" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtSAImPorcentaje" ValidChars="1234567890." />
|
||||
<span class="input-group-addon">
|
||||
<i style="font-weight: 700;">%</i>
|
||||
</span>
|
||||
@@ -2091,9 +2092,10 @@
|
||||
<span class="input-group-addon">
|
||||
<i class="fa fa-dollar"></i>
|
||||
</span>
|
||||
<asp:TextBox ID="TxtSAImporte" min="0" max='<%=LblTotal.Text.ToString()%>' CssClass="form-control input-sm" type="number" step="any" pattern="(\d{3})([\.])(\d{2})" runat="server"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtSAImporte" min="0" max='<%=LblTotal.Text.ToString()%>' CssClass="form-control input-sm" runat="server"></asp:TextBox>
|
||||
<asp:RangeValidator ID="RVSAImprote" CssClass="form-control" runat="server" ControlToValidate="TxtSAImporte" Display="None" Type="Double" MinimumValue="1.00" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> debe ser mayor a cero." ValidationGroup="GrpModalSolicitarAnticipo"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCESAImporte" runat="server" HighlightCssClass="vco" TargetControlID="RVSAImprote" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtSAImporte" ValidChars="1234567890." />
|
||||
|
||||
</div>
|
||||
<div class="input-group" style="text-align:right!important">
|
||||
@@ -2855,7 +2857,7 @@
|
||||
$('#<%= TxtSAImPorcentaje.ClientID%>').keyup(function () {
|
||||
console.log($(this).val());
|
||||
var importe = (ToDouble($(this).val()) / 100) * ToDouble($get("LblTotal").value.replace(/,/g, ''));
|
||||
$('#<%= TxtSAImporte.ClientID%>').val(FormatoNumero(importe, 2).replace(/,/g, ""));
|
||||
$('#<%= TxtSAImporte.ClientID%>').val( FormatoNumero(importe, 2).replace(/,/g, "") );
|
||||
});
|
||||
$('#<%= TxtSAImporte.ClientID%>').keyup(function () {
|
||||
var importe = (100 * ToDouble($(this).val())) / ToDouble($get("LblTotal").value.replace(/,/g, ""));
|
||||
|
||||
@@ -151,10 +151,12 @@ public partial class RH_SolicitudViaticos : ClsPaginas
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((UsuarioActual.CveEmpresa == 72 || UsuarioActual.CveEmpresa == 1 || UsuarioActual.CveEmpresa == 2) && UsuarioActual.CvePersonal > 0)
|
||||
|
||||
if ((UsuarioActual.CveEmpresa.Contiene(1,2,72, 172, 173, 174)) && UsuarioActual.CvePersonal > 0)
|
||||
{
|
||||
CargaFolio();
|
||||
}
|
||||
|
||||
|
||||
BtnGuardar.Text = "Guardar";
|
||||
LnkImprimirExcel.Visible = false;
|
||||
@@ -270,21 +272,73 @@ public partial class RH_SolicitudViaticos : ClsPaginas
|
||||
{
|
||||
int CveSubProyectoPersonal = GetCveSubproyecto();
|
||||
|
||||
if (CveSubProyectoPersonal > 0)
|
||||
{
|
||||
ClsBancos ObjBancos = new ClsBancos();
|
||||
//if (CveSubProyectoPersonal > 0)
|
||||
//{
|
||||
// ClsBancos ObjBancos = new ClsBancos();
|
||||
|
||||
String Serie = get_GlobalDTSubProyectos(-1, CveSubProyectoPersonal, UsuarioActual.CveEmpresa).FiltroPrimeroValor("Serie");
|
||||
// String Serie = get_GlobalDTSubProyectos(-1, CveSubProyectoPersonal, UsuarioActual.CveEmpresa).FiltroPrimeroValor("Serie");
|
||||
|
||||
if (ObjBancos.GetNextFolioSolicitudViaticos(UsuarioActual.CveEmpresa, String.Format("{0}-", Serie)))
|
||||
// if (ObjBancos.GetNextFolioSolicitudViaticos(UsuarioActual.CveEmpresa, String.Format("{0}-", Serie)))
|
||||
// {
|
||||
// TxtFolio.Text = ObjBancos.DtResultados.FiltroPrimeroValor("Folio");
|
||||
// TxtFolio.Enabled = false;
|
||||
// }
|
||||
// ObjBancos.Dispose();
|
||||
//}
|
||||
|
||||
|
||||
ClsGralFolios ObjFolios = new ClsGralFolios();
|
||||
|
||||
if(ObjFolios.GetFolios("VIA", UsuarioActual.CveEmpresa, CveSubProyectoPersonal))
|
||||
{ //VTCO
|
||||
|
||||
DataTable DT = ObjFolios.DtResultados.FiltraParametros("Estado = 'Activo'");
|
||||
|
||||
if (DT.Rows.Count > 0)
|
||||
{
|
||||
TxtFolio.Text = ObjBancos.DtResultados.FiltroPrimeroValor("Folio");
|
||||
TxtFolio.Text = DT.Rows[0]["FActual"].ToString();
|
||||
TxtFolio.Enabled = false;
|
||||
}
|
||||
ObjBancos.Dispose();
|
||||
else
|
||||
{
|
||||
TxtFolio.Text = "";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ObjFolios.Dispose();
|
||||
|
||||
}
|
||||
|
||||
|
||||
//private void CargaFolios()
|
||||
//{
|
||||
// ClsGralFolios ObjFolios = new ClsGralFolios();
|
||||
// TipoOC = TipoOS ? "OS" : TipoOC;
|
||||
// if (ObjFolios.GetFolios(TipoOC == "REQ" ? "Req" : TipoOC, CveEmpresaActual))
|
||||
// {
|
||||
// DataTable DT = ObjFolios.DtResultados.FiltraParametros("Estado = 'Activo'");
|
||||
// // Verificar primero en la sucursal del usuario
|
||||
// if (DT.FiltraParametros("CveSubProyecto = " + UsuarioActual.CveSubProyecto.ToString).Rows.Count > 0)
|
||||
// {
|
||||
// ViewState("CveFolio") = DT.FiltraParametros("CveSubProyecto = " + UsuarioActual.CveSubProyecto.ToString).Rows(0)("CveFolio").ToString.ToEntero;
|
||||
// ViewState("FolioActual") = DT.FiltraParametros("CveSubProyecto = " + UsuarioActual.CveSubProyecto.ToString).Rows(0)("FActual").ToString;
|
||||
// lblFolio.Text = TipoOC + " " + DT.Rows(0)("FActual").ToString;
|
||||
// }
|
||||
// else if (DT.Rows.Count > 0)
|
||||
// {
|
||||
// ViewState("CveFolio") = DT.Rows(0)("CveFolio").ToString.ToEntero;
|
||||
// ViewState("FolioActual") = DT.Rows(0)("FActual").ToString;
|
||||
// lblFolio.Text = TipoOC + " " + DT.Rows(0)("FActual").ToString;
|
||||
// }
|
||||
// else
|
||||
// Alert("No tiene registrados Folios en esta sucursal.", TipoMensaje.MsgAdvertencia);
|
||||
|
||||
// DT.Dispose();
|
||||
// }
|
||||
// ObjFolios.Dispose();
|
||||
//}
|
||||
|
||||
protected int GetCveSubproyecto()
|
||||
{
|
||||
ClsRH ObjRH = new ClsRH();
|
||||
@@ -723,13 +777,30 @@ public partial class RH_SolicitudViaticos : ClsPaginas
|
||||
}
|
||||
|
||||
|
||||
string RutaRdlc = $@"{UsuarioActual.Empresa.Ruta}Formatos/SolicitudViaticos.rdlc";
|
||||
|
||||
if (!System.IO.File.Exists(RutaRdlc))
|
||||
{
|
||||
RutaRdlc = $@"{ModExtensiones.DirectorioEmpresas}Grales/Formatos/SolicitudViaticos.rdlc";
|
||||
}
|
||||
|
||||
|
||||
//if (DesgargaArchivo)
|
||||
//{
|
||||
// ImprimirPDF(string.Format("Empresas/{0}/Formatos/SolicitudViaticos.rdlc",UsuarioActual.CveEmpresa), DTConceptosDetalles, @params, String.Format("Solicitud de Viáticos - {0} - {1}", TxtFolio.Text, DdlPersonal.SelectedItem), Formato);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// retorno = StreamPDF(string.Format("Empresas/{0}/Formatos/SolicitudViaticos.rdlc", UsuarioActual.CveEmpresa), DTConceptosDetalles, @params, String.Format("Solicitud de Viáticos - {0} - {1}", TxtFolio.Text, DdlPersonal.SelectedItem), Formato);
|
||||
//}
|
||||
|
||||
if (DesgargaArchivo)
|
||||
{
|
||||
ImprimirPDF(string.Format("Empresas/{0}/Formatos/SolicitudViaticos.rdlc",UsuarioActual.CveEmpresa), DTConceptosDetalles, @params, String.Format("Solicitud de Viáticos - {0} - {1}", TxtFolio.Text, DdlPersonal.SelectedItem), Formato);
|
||||
ImprimirPDF(RutaRdlc, DTConceptosDetalles, @params, String.Format("Solicitud de Viáticos - {0} - {1}", TxtFolio.Text, DdlPersonal.SelectedItem), Formato);
|
||||
}
|
||||
else
|
||||
{
|
||||
retorno = StreamPDF(string.Format("Empresas/{0}/Formatos/SolicitudViaticos.rdlc", UsuarioActual.CveEmpresa), DTConceptosDetalles, @params, String.Format("Solicitud de Viáticos - {0} - {1}", TxtFolio.Text, DdlPersonal.SelectedItem), Formato);
|
||||
retorno = StreamPDF(RutaRdlc, DTConceptosDetalles, @params, String.Format("Solicitud de Viáticos - {0} - {1}", TxtFolio.Text, DdlPersonal.SelectedItem), Formato);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -4261,7 +4261,7 @@ Partial Class PV
|
||||
|
||||
End If
|
||||
'Descuento por clasificación
|
||||
Dim ObjDescuento As New Descuentos
|
||||
Dim ObjDescuento As New Modelos.VentaDescuentos
|
||||
|
||||
ObjDescuento = CalcularDescuentos(CvePSParametro, TxtCantidad.Text.Trim.ToDecimal, PrecioSugerido)
|
||||
If ObjDescuento.EsPUModificado Then
|
||||
@@ -4310,15 +4310,7 @@ Partial Class PV
|
||||
UPPDescuento.Update()
|
||||
End Sub
|
||||
|
||||
Partial Class Descuentos
|
||||
Public ImporteDescuento As Decimal = 0
|
||||
Public CvePromocionDetalle As Integer = -1
|
||||
Public PU As Decimal = 0
|
||||
Public EsPUModificado As Boolean = False
|
||||
Public ImporteProntoPago As Decimal = 0
|
||||
End Class
|
||||
|
||||
Private Function CalcularDescuentos(CvePS As Integer, Cantidad As Decimal, PU As Decimal) As Descuentos
|
||||
Private Function CalcularDescuentos(CvePS As Integer, Cantidad As Decimal, PU As Decimal) As Modelos.VentaDescuentos
|
||||
Dim Descuento As Decimal = HdnDescuento.Value.ToDecimal
|
||||
|
||||
If HdnTipoDescuento.Value = "0" Then
|
||||
@@ -4341,7 +4333,7 @@ Partial Class PV
|
||||
Dim CvePromocionDetalle As Integer = 0
|
||||
Dim IncluyeImpuestos As Boolean = False
|
||||
Dim TipoAplicacion As Integer = 1 ' 1 - descuento, 2 en PU
|
||||
Dim ObjDescuento As New Descuentos
|
||||
Dim ObjDescuento As New Modelos.VentaDescuentos
|
||||
|
||||
If DdlSubProyectoDatos.SelectedValue = "11842" Then '' E141, el subproyecto: Franquicia, no proceden las promociones
|
||||
Return ObjDescuento
|
||||
@@ -5483,7 +5475,7 @@ Partial Class PV
|
||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
|
||||
If ChkAjuste.Checked Then
|
||||
Dim FolioGarantia As MFolioGarantiaMensaje = ValidaFolioGarantia(DdlPSAjuste.SelectedValue.ToEntero(), DdlFolioGarantia.SelectedValue.ToEntero())
|
||||
Dim FolioGarantia As Modelos.MFolioGarantiaMensaje = ValidaFolioGarantia(DdlPSAjuste.SelectedValue.ToEntero(), DdlFolioGarantia.SelectedValue.ToEntero())
|
||||
|
||||
If Not FolioGarantia.Valido Then
|
||||
Alert($"El folio de garantía no es valido.<br/> Clasificacion del Producto:{FolioGarantia.ClasificacionPS}.<br/>Tipo Folio:{FolioGarantia.TipoFolio}", TipoMensaje.MsgAdvertencia)
|
||||
@@ -5571,7 +5563,7 @@ Partial Class PV
|
||||
Descuento = HdnDescuento.Value.ToDecimal * TxtCantidad.Text.ToDecimal
|
||||
End If
|
||||
|
||||
Dim ObjDescuento As New Descuentos
|
||||
Dim ObjDescuento As New Modelos.VentaDescuentos
|
||||
If DrPS("CveClasificacion").ToString.ToEntero.Contiene(20516, 20515) Then
|
||||
ObjDescuento.ImporteDescuento = ((Cantidad * PU) * ClasificacionesDescuentos(DrPS("CveClasificacion").ToString.ToEntero))
|
||||
End If
|
||||
@@ -5595,7 +5587,7 @@ Partial Class PV
|
||||
CveProyecto, Proyecto, DdlSubProyectoDatos.SelectedValue.ToEntero, DdlSubProyectoDatos.SelectedItem.Text,
|
||||
Serie:="", TiempoEntrega:="", CuentaPredial:="", RegeneraIEPS:=ClienteDesglosaIEPS, CveVentaDetalle:=CveVentaDetalle, EsCargo:=EsCargo)
|
||||
|
||||
Dim ListaPSCargo As List(Of MConceptoUsado) = Nothing
|
||||
Dim ListaPSCargo As List(Of Modelos.MConceptoUsado) = Nothing
|
||||
If CveVentaDetalle <= 0 AndAlso Not EsCargo Then
|
||||
ListaPSCargo = CalculaUsados(Consec)
|
||||
ElseIf CveVentaDetalle > 0 AndAlso Not EsCargo Then
|
||||
@@ -5605,7 +5597,7 @@ Partial Class PV
|
||||
|
||||
If ListaPSCargo IsNot Nothing AndAlso ListaPSCargo.Count > 0 Then
|
||||
CalculaRecepcionUsados(CvePS, ListaPSCargo, Cantidad, Consec)
|
||||
For Each Usado As MConceptoUsado In ListaPSCargo
|
||||
For Each Usado As Modelos.MConceptoUsado In ListaPSCargo
|
||||
AddPolizaVirtual(DdlPS.SelectedValue.ToEntero(), Usado.Consecutivo)
|
||||
Next
|
||||
End If
|
||||
@@ -7422,7 +7414,7 @@ Partial Class PV
|
||||
Alert("No se ha especificado producto de ajuste a entregar")
|
||||
Exit Sub
|
||||
End If
|
||||
If TxtEtiqueta.Text <> "" OrElse TxtEtiqueta.Text.Length <> 4 Then
|
||||
If TxtEtiqueta.Text = "" OrElse TxtEtiqueta.Text.Length <> 4 Then
|
||||
Alert("No se ha especificado la etiqueta.")
|
||||
Exit Sub
|
||||
End If
|
||||
@@ -7441,8 +7433,8 @@ Partial Class PV
|
||||
If ObjAcum.GarantiasMesesGet(-1, UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero) Then
|
||||
If ObjAcum.DtResultados.Rows.Count > 0 Then
|
||||
''obtener siempre y cuando la fecha de inicio sea mayor
|
||||
Dim strDate As Date = ($"01/{TxtEtiqueta.Text.Substring(0, 2)}/{TxtEtiqueta.Text.Substring(2, 2)}").ToDate
|
||||
Dim drg As DataRow = ObjAcum.DtResultados.FiltroPrimero($" #{strDate.ToString("yyyy/MM/dd")}# > FechaInicioVigencia ", "FechaInicioVigencia")
|
||||
Dim strDate As Date = ($"20{TxtEtiqueta.Text.Substring(2, 2)}/{TxtEtiqueta.Text.Substring(0, 2)}/01").ToDate
|
||||
Dim drg As DataRow = ObjAcum.DtResultados.FiltroPrimero($" #{strDate.ToString("yyyy/MM/dd")}# >= FechaInicioVigencia ", "FechaInicioVigencia DESC")
|
||||
If drg IsNot Nothing Then
|
||||
|
||||
TxtPorcentajeAjuste.Text = (drg("Valor").ToString.ToDouble / 100).ToString
|
||||
@@ -7699,7 +7691,7 @@ Partial Class PV
|
||||
End If
|
||||
ObjAcumuladores.Dispose()
|
||||
|
||||
Dim FolioGarantia As MFolioGarantiaMensaje = ValidaFolioGarantia(DdlPSAjuste.SelectedValue.ToEntero(), DdlFolioGarantia.SelectedValue.ToEntero())
|
||||
Dim FolioGarantia As Modelos.MFolioGarantiaMensaje = ValidaFolioGarantia(DdlPSAjuste.SelectedValue.ToEntero(), DdlFolioGarantia.SelectedValue.ToEntero())
|
||||
|
||||
If Not FolioGarantia.Valido Then
|
||||
Alert($"El folio de garantía no es valido.<br/> Clasificacion del Producto:{FolioGarantia.ClasificacionPS}.<br/>Tipo Folio:{FolioGarantia.TipoFolio}", TipoMensaje.MsgAdvertencia)
|
||||
@@ -7855,7 +7847,7 @@ Partial Class PV
|
||||
|
||||
EmitirImprimirNew()
|
||||
End Sub
|
||||
Private Sub CalculaRecepcionUsados(CvePS As Integer, ListaPSCargo As List(Of MConceptoUsado), CantidadUsado As Decimal, ConsecPSPadre As Integer)
|
||||
Private Sub CalculaRecepcionUsados(CvePS As Integer, ListaPSCargo As List(Of Modelos.MConceptoUsado), CantidadUsado As Decimal, ConsecPSPadre As Integer)
|
||||
|
||||
If Modalidad = "U" Then
|
||||
If TmpDTRecepcionUsados.Rows.Count > 0 Then
|
||||
@@ -7934,7 +7926,7 @@ Partial Class PV
|
||||
End If
|
||||
|
||||
Dim StrCargos As New StringBuilder
|
||||
For Each Usado As MConceptoUsado In ListaPSCargo
|
||||
For Each Usado As Modelos.MConceptoUsado In ListaPSCargo
|
||||
StrCargos.AppendFormat(" {0},", Usado.CvePS)
|
||||
Next
|
||||
StrCargos.Remove(StrCargos.Length - 1, 1)
|
||||
@@ -8052,17 +8044,13 @@ Partial Class PV
|
||||
|
||||
CalculaTotalesVenta()
|
||||
End Sub
|
||||
Public Class MConceptoUsado
|
||||
Public Property Consecutivo As Integer
|
||||
Public Property ConsecutivoUsado As Integer
|
||||
Public Property CvePS As Integer
|
||||
End Class
|
||||
Private Function CalculaUsados(Consec As Integer, Optional LimpiarUsados As Boolean = True) As List(Of MConceptoUsado)
|
||||
|
||||
Private Function CalculaUsados(Consec As Integer, Optional LimpiarUsados As Boolean = True) As List(Of Modelos.MConceptoUsado)
|
||||
If Modalidad = "U" AndAlso LimpiarUsados Then
|
||||
EliminarUsados(Consec)
|
||||
End If
|
||||
|
||||
Dim ListaPScargo As New List(Of MConceptoUsado)
|
||||
Dim ListaPScargo As New List(Of Modelos.MConceptoUsado)
|
||||
|
||||
Dim DTTamanios As DataTable = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa)
|
||||
Dim DTCvePSCostos = DTTamanios.FiltraParametros("", "", {"CvePSCargo"})
|
||||
@@ -8167,7 +8155,7 @@ Partial Class PV
|
||||
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()))
|
||||
If Consec > 0 Then
|
||||
ListaPScargo.Add(New MConceptoUsado() With {.Consecutivo = Consec, .ConsecutivoUsado = ConsecutivoUsado, .CvePS = drowPsTamaños("CvePS").ToString.ToEntero})
|
||||
ListaPScargo.Add(New Modelos.MConceptoUsado() With {.Consecutivo = Consec, .ConsecutivoUsado = ConsecutivoUsado, .CvePS = drowPsTamaños("CvePS").ToString.ToEntero})
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
@@ -8328,8 +8316,8 @@ Partial Class PV
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function ValidaFolioGarantia(CvePS As Integer, CveFolioGarantia As Integer) As MFolioGarantiaMensaje
|
||||
Dim Retorno As New MFolioGarantiaMensaje
|
||||
Private Function ValidaFolioGarantia(CvePS As Integer, CveFolioGarantia As Integer) As Modelos.MFolioGarantiaMensaje
|
||||
Dim Retorno As New Modelos.MFolioGarantiaMensaje
|
||||
|
||||
Dim Valido As Boolean = False
|
||||
Dim TipoFolio As String = ""
|
||||
@@ -8382,15 +8370,7 @@ Partial Class PV
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Partial Class MFolioGarantiaMensaje
|
||||
Public Property CvePS As Integer
|
||||
Public Property CveClasificacionPS As Integer
|
||||
Public Property ClasificacionPS As String
|
||||
Public Property CveFolioGarantia As Integer
|
||||
Public Property TipoFolio As String
|
||||
|
||||
Public Property Valido As Boolean
|
||||
End Class
|
||||
Protected Sub DdlMarcaPS_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaPS(DdlClasificacion.SelectedValue.ToEntero(), DdlPS, CveMarca:=DdlMarcaPS.SelectedValue.ToEntero())
|
||||
UpModalVenta.Update()
|
||||
|
||||
@@ -1675,12 +1675,7 @@
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabAlmacen" ClientIDMode="Static" runat="server" Enabled="true" HeaderText="">
|
||||
<HeaderTemplate>
|
||||
<span onclick="CargaMovimientosInventario();" id="spanAlmacen" runat="server">
|
||||
Almacen
|
||||
</span>
|
||||
</HeaderTemplate>
|
||||
<ajax:TabPanel ID="TabAlmacen" ClientIDMode="Static" runat="server" Enabled="true" HeaderText="Almacen">
|
||||
<ContentTemplate>
|
||||
|
||||
<%--<asp:UpdatePanel ID="UpInvDev" UpdateMode="Conditional" runat="server">
|
||||
|
||||
@@ -2354,7 +2354,10 @@ Partial Class Ventas
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(141, 152, 153, 160, 161, 162) Then System.Threading.Thread.Sleep(2000)
|
||||
If EsProduccion Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(141, 152, 153, 160, 161, 162) Then System.Threading.Thread.Sleep(2000)
|
||||
End If
|
||||
|
||||
If Not IsPostBack Then
|
||||
|
||||
If IfNull(Request("Opcionx"), "").ToString = "Saldar" And UsuarioActual.CveUsuario = 100 Then
|
||||
@@ -2847,7 +2850,7 @@ Partial Class Ventas
|
||||
If CveVenta <= 0 Then
|
||||
'REMOVER EVENTO PARA RECARGAR ALMACEN
|
||||
HdnCargarInventario.Value = "False"
|
||||
spanAlmacen.Attributes.Remove("onclick")
|
||||
'spanAlmacen.Attributes.Remove("onclick")
|
||||
Tab.ActiveTabIndex = 1
|
||||
Updatetabs.Update()
|
||||
End If
|
||||
@@ -15323,6 +15326,22 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim ModalidadRefacturacion As Integer = UsuarioActual.Empresa.Funcionalidad(586).ToEntero()
|
||||
|
||||
'REFACTURACION CON PAGOS, DEBE CANCELAR SALDOS DEL DOCUMENTO ANTERIOR Y TRASPASAR PAGOS AL NUEVO
|
||||
If ModalidadRefacturacion = 2 AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Ant") AndAlso ObjFactura.NuevaFactura = 1 Then
|
||||
If Not ObjConta.TraspasarSaldosPrePolizasRefacturacion(ObjFacturaNC.CveVenta, ObjFactura.CveVenta, ObjFactura.CvePrePoliza, CvePlantilaPoliza, UsuarioActual.CveEmpresa) Then
|
||||
ErrorList.Add("Ocurrió un error al traspasos saldos en refacturación")
|
||||
End If
|
||||
Else
|
||||
'EN CASO DE SER REFACTURACION DE ANTICIPO SE ACTUALIZAN LAS VENTAS APLICADAS HACIA EL NUEVO
|
||||
If NuevaFactura = 1 AndAlso CveDevolucion > 0 AndAlso ObjFactura.TipoDocto.Contiene("Ant") Then
|
||||
If Not ObjVentas.TraspasaVentasAplicadasAnt(ObjFactura.CveVenta, CveDevolucion, UsuarioActual.CveEmpresa, ObjFactura.CvePrePoliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjConta.ValidacionPrePolizaCuadre(ObjFactura.CvePrePoliza, 2) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
If ObjConta.ValorPolizaDescuadre = 2 Then
|
||||
@@ -15339,21 +15358,6 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
'EN CASO DE SER REFACTURACION DE ANTICIPO SE ACTUALIZAN LAS VENTAS APLICADAS HACIA EL NUEVO
|
||||
If NuevaFactura = 1 AndAlso CveDevolucion > 0 AndAlso ObjFactura.TipoDocto.Contiene("Ant") Then
|
||||
If Not ObjVentas.TraspasaVentasAplicadasAnt(ObjFactura.CveVenta, CveDevolucion, UsuarioActual.CveEmpresa, ObjFactura.CvePrePoliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim ModalidadRefacturacion As Integer = UsuarioActual.Empresa.Funcionalidad(586).ToEntero()
|
||||
|
||||
'REFACTURACION CON PAGOS, DEBE CANCELAR SALDOS DEL DOCUMENTO ANTERIOR Y TRASPASAR PAGOS AL NUEVO
|
||||
If ModalidadRefacturacion = 2 AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Ant") AndAlso ObjFactura.NuevaFactura = 1 Then
|
||||
If Not ObjConta.TraspasarSaldosPrePolizasRefacturacion(ObjFacturaNC.CveVenta, ObjFactura.CveVenta, ObjFactura.CvePrePoliza, CvePlantilaPoliza, UsuarioActual.CveEmpresa) Then
|
||||
ErrorList.Add("Ocurrió un error al traspasos saldos en refacturación")
|
||||
End If
|
||||
End If
|
||||
|
||||
Return ErrorPrepoliza
|
||||
Catch ex As Exception
|
||||
@@ -23103,7 +23107,7 @@ Partial Class Ventas
|
||||
Dim TienePagos As Boolean = ((Not (DtPagos Is Nothing OrElse DtPagos.Rows.Count = 0)) AndAlso (DtPagos IsNot Nothing AndAlso DtPagos.Rows.Count > 0)) OrElse AmortizacionNC > 0
|
||||
|
||||
'SI LA VENTA ES NUEVA VALIDAR TAMBIEN LOS PAGOS DE CONTADO
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso CveVenta <= 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ant") Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso ((CveVenta <= 0 OrElse EsCreaApartirDe OrElse TipoDoctoViejo = "Cot") AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ant")) Then
|
||||
|
||||
If Not PermiteCredito AndAlso Not TienePagos AndAlso TxtTotal.Text.ToDecimal > 0 Then
|
||||
If MostrarAlertas Then
|
||||
@@ -23576,6 +23580,13 @@ Partial Class Ventas
|
||||
DivDevAlm.Visible = True
|
||||
TieneAlmacen = True
|
||||
End If
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Rem", "Dev") Then
|
||||
ChkDevAlm.Checked = True
|
||||
LiDevolucionAlmacen.Visible = True
|
||||
If DdlTipoComprobante.SelectedValue = "Dev" Then
|
||||
LblDevAlm.Text = "Salida de almacen"
|
||||
End If
|
||||
End If
|
||||
CargaGVInv(ObjInv.DtResultados)
|
||||
End If
|
||||
End If
|
||||
@@ -24748,14 +24759,6 @@ Partial Class Ventas
|
||||
Dim RowVenta As DataRow = ObjVentas.DtResultados.Rows(0)
|
||||
|
||||
SaldoAlmacen = RowVenta("SaldoAlmacen").ToString().ToDecimal()
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Rem", "Dev") AndAlso SaldoAlmacen <> 0 Then
|
||||
ChkDevAlm.Checked = True
|
||||
LiDevolucionAlmacen.Visible = True
|
||||
If DdlTipoComprobante.SelectedValue = "Dev" Then
|
||||
LblDevAlm.Text = "Salida de almacen"
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
PermiteCancelar = False
|
||||
End If
|
||||
@@ -24763,19 +24766,26 @@ Partial Class Ventas
|
||||
PermiteCancelar = False
|
||||
End If
|
||||
|
||||
If PermiteCancelar And SaldoVenta <> 0 Then
|
||||
If UsuarioActual.TienePermisoProceso(269) AndAlso Not DevolucionAlmacen = 2 Then
|
||||
DivDevAlm.Visible = True
|
||||
TieneAlmacen = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End Using
|
||||
|
||||
If Not PermiteCancelar Then
|
||||
Alert("La venta no se puede cancelar si no ha sido surtida previamente", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If SaldoVenta <> 0 Then
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(269) AndAlso Not DevolucionAlmacen = 2 Then
|
||||
DivDevAlm.Visible = True
|
||||
TieneAlmacen = True
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(567) = "1" Then
|
||||
ChkDevAlm.Checked = True
|
||||
ChkDevAlm.Enabled = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Dev", "Egs") Then
|
||||
@@ -32899,7 +32909,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
'REMOVER EVENTO PARA RECARGAR ALMACEN
|
||||
spanAlmacen.Attributes.Remove("onclick")
|
||||
'spanAlmacen.Attributes.Remove("onclick")
|
||||
Tab.ActiveTabIndex = 1
|
||||
HdnCargarInventario.Value = "False"
|
||||
Updatetabs.Update()
|
||||
@@ -36587,10 +36597,11 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
'REMOVER EVENTO PARA RECARGAR ALMACEN
|
||||
spanAlmacen.Attributes.Remove("onclick")
|
||||
Tab.ActiveTabIndex = 1
|
||||
'spanAlmacen.Attributes.Remove("onclick")
|
||||
'Tab.ActiveTabIndex = 1
|
||||
HdnCargarInventario.Value = "False"
|
||||
Updatetabs.Update()
|
||||
'Updatetabs.Update()
|
||||
UpINV.Update()
|
||||
End Sub
|
||||
Protected Sub LBAplicaDevolucion_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user