This commit is contained in:
2023-06-10 11:04:52 -07:00
12 changed files with 175 additions and 66 deletions

View File

@@ -1806,7 +1806,14 @@ Public Class ClsBancos
' Me.OnError("Ocurrió un error al guardar los cambios en el Banco", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
Catch ex As Exception
OnError("Ocurrió un error al cancelar el movimiento en bancos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
If ex.Message.Contains("El Movimiento no se puede eliminar porque tiene una cancelación relacionada") Then
OnError("El Movimiento no se puede eliminar porque tiene una cancelación relacionada, se tiene que eliminar primero la cancelación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
Else
OnError("Ocurrió un error al eliminar el movimiento en bancos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End If
End Try
Return Retorno

View File

@@ -1343,7 +1343,7 @@ Public Class ClsVentas
CvePresupuestoIngreso As Integer, Optional TiempoEntrega As String = "", Optional CveVentaDetallePadre As Integer = -1,
Optional CveContratoDetalle As Integer = -1, Optional PorcentajeIVA As Decimal = 0, Optional IEPS As Double = -1, Optional PorcentajeIEPS As Double = 0, Optional CvePromocionDetalle As Integer = -1,
Optional CveMovimientoDetallePedido As Integer = -1, Optional ImporteRetIVA As Double = 0, Optional PorcentajeRetIVA As Double = 0,
Optional ImporteRetISR As Double = 0, Optional PorcentajeRetISR As Double = 0, Optional CuentaPredial As String = "", Optional CvePrecioLista As Integer = -1, Optional CveActivoFijo As Integer = -1) As Boolean
Optional ImporteRetISR As Double = 0, Optional PorcentajeRetISR As Double = 0, Optional CuentaPredial As String = "", Optional CvePrecioLista As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional NumTurnos As Decimal = 0D) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_VentasDetalleAdd")
@@ -1375,6 +1375,7 @@ Public Class ClsVentas
.Add("@CuentaPredial", SqlDbType.VarChar).Value = CuentaPredial
.Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista
.Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
.Add("@NumTurnos", SqlDbType.Decimal).Value = NumTurnos
End With
Try

View File

@@ -190,7 +190,7 @@ Public Class LogicNominas
If continuar AndAlso objPersonal.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa) AndAlso objPersonal.DtResultados.Rows.Count > 0 Then
RFC = objPersonal.RFC
cfdi.Emisor.RegistroPatronal = objPersonal.DtResultados.Rows(0)("RegistroPatronal").ToString()
NombreCompleto = String.Format("{0} {1} {2}", objPersonal.Nombres, objPersonal.APaterno, objPersonal.AMaterno)
NombreCompleto = String.Format("{0} {1} {2}", objPersonal.Nombres, objPersonal.APaterno, objPersonal.AMaterno).Trim()
CodigoPostal = objPersonal.CP
Sindicalizado = objPersonal.DtResultados.Rows(0)("Sindicalizado").ToString().ToUpper().Contiene("TRUE", "1")
CURP = objPersonal.CURP

View File

@@ -1652,7 +1652,7 @@ Partial Class Inventarios_TraspasoAlmacen
'DEBE CONSIDERAR SOLO LAS FILAS QUE TENGA PRODUCTOS, NO EL TOTALIZADOR
If CvePS > 0 Then
CveMovimientoDetalleSalida = GvRow.DataKey("CveMovimientoDetalle").ToEntero
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToString.ToDecimal
Dim Cantidad As Decimal = GvRow.DataKey("Cantidad").ToDecimal() 'GvRow.FCTextBox("TxtCantidad").Text.ToString.ToDecimal
'If ChkRealizarDevolucion.Checked Then Cantidad = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal

View File

@@ -1636,8 +1636,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
{
Correo = drow["Correo"].ToString();
NombreCompleto = drow["NombreCompleto"].ToString();
RFC = drow["RFC"].ToString();
CURP = drow["CURP"].ToString();
//RFC = drow["RFC"].ToString();
//CURP = drow["CURP"].ToString();
}
string Msg = "";// lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, (UsuarioActual.CveUsuario == 100 ? 4 : 4));
Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: (UsuarioActual.CveEmpresa == 119 ? VersionTimbradoEnum.PorDefectoEmpresa : VersionTimbradoEnum.Version3_3));

View File

@@ -1699,7 +1699,7 @@
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px">
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top:-10px !important;">
<label for="<%= TxtFechaLimiteCredito.ClientID.ToString()%>" style="color: #888888;">F. Limite Crédito: </label>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
<asp:TextBox ID="TxtFechaLimiteCredito" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="100px"></asp:TextBox>
@@ -1898,15 +1898,15 @@
<span class="caption-subject bold uppercase">Estado de Cuenta</span>
</div>
<div class="tools">
<asp:CheckBox ID="ChkAntIXCNC" Text="Anticipos / NC / IXC" runat="server" Checked="true" OnCheckedChanged="ChkAntIXCNC_CheckedChanged" AutoPostBack="true" />
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body">
<asp:CheckBox ID="ChkAntIXCNC" Text="Anticipos / NC / IXC" runat="server" Checked="true" OnCheckedChanged="ChkAntIXCNC_CheckedChanged" AutoPostBack="true" />
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px">
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top:-10px !important;">
<label for="<%= TxtFechaInicioCxP.ClientID.ToString()%>">Fecha Inicio: </label>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
<asp:TextBox ID="TxtFechaInicioCxP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="100px"></asp:TextBox>
@@ -1919,7 +1919,7 @@
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px">
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top:-10px !important;">
<label for="<%= TxtFechaFinCxP.ClientID.ToString()%>">Fecha Fin: </label>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
<asp:TextBox Width="100px" ID="TxtFechaFinCxP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
@@ -1934,7 +1934,7 @@
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px">
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top:-10px !important;">
<label for="<%= TxtFechaVICxP.ClientID.ToString()%>">Fecha V. Inicio: </label>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
<asp:TextBox ID="TxtFechaVICxP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="100px"></asp:TextBox>
@@ -1947,7 +1947,7 @@
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px">
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top:-10px !important;">
<label for="<%= TxtFechaVFCxP.ClientID.ToString()%>">Fecha V. Fin: </label>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
<asp:TextBox ID="TxtFechaVFCxP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="100px"></asp:TextBox>

View File

@@ -2638,31 +2638,31 @@ Partial Class Clientes
Dim CtaCliente As Integer = DdlCtaContableClientes.SelectedValue.ToEntero()
' si tiene la funcionalidad de la cuenta contable padre
If UsuarioActual.Empresa.Funcionalidad(114) <> "" Then
'If UsuarioActual.Empresa.Funcionalidad(114) <> "" Then
Dim ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
' Dim ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
ObjContaAC.IniciaTransacSQL()
'se registra la cuenta contable automaticamente
' ObjContaAC.IniciaTransacSQL()
' 'se registra la cuenta contable automaticamente
CtaCliente = ObjContaAC.AddSiguienteCuentaHijo(UsuarioActual.Empresa.Funcionalidad(114).ToEntero(), TxtNombreComercial.Text.Trim, "A", 2)
' CtaCliente = ObjContaAC.AddSiguienteCuentaHijo(UsuarioActual.Empresa.Funcionalidad(114).ToEntero(), TxtNombreComercial.Text.Trim, "A", 2)
If CtaCliente > 0 Then
ObjContaAC.Commit()
DdlCtaContableClientes.Items.Add(New ListItem(TxtNombreComercial.Text.Trim, CtaCliente.ToString()))
DdlCtaContableClientes.SelectedValue = CtaCliente.ToString()
'MsgCuentaContable = String.Format("<br />Con la cuenta contable: {0}", NewCuenta)
' If CtaCliente > 0 Then
' ObjContaAC.Commit()
' DdlCtaContableClientes.Items.Add(New ListItem(TxtNombreComercial.Text.Trim, CtaCliente.ToString()))
' DdlCtaContableClientes.SelectedValue = CtaCliente.ToString()
' 'MsgCuentaContable = String.Format("<br />Con la cuenta contable: {0}", NewCuenta)
Else
' Else
ObjContaAC.RollBack()
ObjContaAC.Dispose()
Alert("Error al guardar la cuenta contable ", TipoMensaje.MsgError)
ObjClientes.Dispose()
Exit Sub
End If
ObjContaAC.Dispose()
End If
' ObjContaAC.RollBack()
' ObjContaAC.Dispose()
' Alert("Error al guardar la cuenta contable ", TipoMensaje.MsgError)
' ObjClientes.Dispose()
' Exit Sub
' End If
' ObjContaAC.Dispose()
'End If
Dim CodigoCuentaAltaCompaq As String = ""
@@ -2750,11 +2750,15 @@ Partial Class Clientes
End If
End If
If Not AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq, 1, ObjClientes.IniciaTransacSQL) Then
ErrorProceso = True
If IdCuentaAltaCompaq > 0 Then
If Not AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq, 1, ObjClientes.IniciaTransacSQL) Then
ErrorProceso = True
End If
End If
If ErrorProceso Then
ObjClientes.RollBack()
Else
@@ -4119,11 +4123,11 @@ Partial Class Clientes
Dim FechaCorte As Date = ("9999/01/01").ToDate()
Dim TipoDocto As String = If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM)
Dim TipoDocto2 As String = If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM(True))
Dim FechaVencimientoI As String = If(TxtFechaVICxP.Text = "", "-1", TxtFechaVICxP.Text).ToString()
Dim FechaVencimientoF As String = If(TxtFechaVFCxP.Text = "", "-1", TxtFechaVFCxP.Text).ToString()
Dim FechaVencimientoI As DateTime = If(TxtFechaVICxP.Text = "", MinFecha, TxtFechaVICxP.Text.ToDate())
Dim FechaVencimientoF As DateTime = If(TxtFechaVFCxP.Text = "", MaxFecha, TxtFechaVFCxP.Text.ToDate())
Dim ObjMovtos As New ClsMovimientos()
If ObjMovtos.GetCxCClienteDetalle(CveCliente, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, DdlSucursalCliente.SelectedValue.ToEntero()) Then
If ObjMovtos.GetCxCClienteDetalle(CveCliente, FI, FF, -1, -1, UsuarioActual.CveEmpresa, DdlSucursalCliente.SelectedValue.ToEntero(), FechaVencimientoI:=FechaVencimientoI, FechaVencimientoF:=FechaVencimientoF) Then
DtCxCFact = If(DdlTipoCuentasCxC.SelectedValue = "-1", ObjMovtos.DtResultados.FiltraParametros("", "TipoDocto").Copy, ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'", "TipoDocto"))
'cargo los anticipos NC
DtCxCFact.Columns.Add("SaldoAnticipo", GetType(Decimal))

View File

@@ -2009,8 +2009,8 @@ Partial Class PV
End If
If TmpDTRecepcionUsados IsNot Nothing Then
If TmpDTRecepcionUsados.Select($"CvePS={Row("CvePS").ToString.ToEntero}").Length > 0 Then
Dim rowInv As DataRow = TmpDTRecepcionUsados.Select($"CvePS={Row("CvePS").ToString.ToEntero}")(0)
If TmpDTRecepcionUsados.Select($"ConsecUsado={Row("Consec").ToString.ToEntero} AND CvePS={Row("CvePS").ToString.ToEntero}").Length > 0 Then
Dim rowInv As DataRow = TmpDTRecepcionUsados.Select($"ConsecUsado={Row("Consec").ToString.ToEntero} AND CvePS={Row("CvePS").ToString.ToEntero}")(0)
rowInv("CveVentaDetalle") = CveVentaDetalle
End If
End If
@@ -7858,11 +7858,15 @@ Partial Class PV
If TmpDTRecepcionUsados.Rows.Count > 0 Then
Dim Elimino As Boolean = False
For Each Row As DataRow In TmpDTRecepcionUsados.Rows
If Row("CvePSRelacionado").ToString().ToEntero() = CvePS Then
If Row("CvePSRelacionado").ToString().ToEntero() = CvePS AndAlso
Row("ConsecUsado").ToString().ToEntero() = ListaPSCargo.FirstOrDefault().ConsecutivoUsado AndAlso
Row("ConsecRelacionado").ToString().ToEntero() = ListaPSCargo.FirstOrDefault().Consecutivo Then
Row.Delete()
Elimino = True
End If
Next
If Elimino Then
TmpDTRecepcionUsados.AcceptChanges()
End If
@@ -8179,7 +8183,7 @@ Partial Class PV
'ELIMINAR LOS USADOS QUE SE MANDAN A RECEPCION
For Each drow As DataRow In TmpDT.Select($"Consec ={Consec}")
For Each RowRecepcionUsados As DataRow In TmpDTRecepcionUsados.Rows
If (RowRecepcionUsados("CvePSRelacionado").ToString() = drow("CvePS").ToString()) Then
If (RowRecepcionUsados("CvePSRelacionado").ToString() = drow("CvePS").ToString()) AndAlso RowRecepcionUsados("ConsecRelacionado").ToString() = drow("Consec").ToString() Then
RowRecepcionUsados.Delete()
End If
Next

View File

@@ -427,7 +427,8 @@
<asp:BoundField HeaderText="Forma de Pago" DataField="FormaPago" ItemStyle-Width="5%" Visible="false" />
<%--18--%>
<asp:BoundField HeaderText="Fecha Hora de Emisión" DataField="FechaIng" ItemStyle-Width="200px" ItemStyle-HorizontalAlign="Center" Visible="false" />
<%--19--%>
<asp:BoundField HeaderText="Num. Turnos" DataField="NumTurnos" DataFormatString="{0:N0}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" Visible="false" />
</Columns>
<RowStyle CssClass="Texto" />
@@ -475,7 +476,7 @@
<asp:CheckBox ID="ChkFechaHoraEmision" runat="server" Text="Fecha Hora de Emisión" />
</td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkNumTurnos" runat="server" Text="Número de turnos" Visible="false" />
</td>
<td style="text-align: left;">

View File

@@ -85,6 +85,10 @@ Partial Class Ventas_RepProductosServiciosDetalle
End If
If UsuarioActual.CveEmpresa.Contiene(7, 122) Then
ChkNumTurnos.Visible = True
End If
End If
End Sub
@@ -568,6 +572,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
GvDatos.Columns(16).Visible = ChkMetodoPago.Checked
GvDatos.Columns(17).Visible = ChkFormaPago.Checked
GvDatos.Columns(18).Visible = ChkFechaHoraEmision.Checked
GvDatos.Columns(19).Visible = ChkNumTurnos.Checked
CargaDatos()
UPDatos.Update()

View File

@@ -948,7 +948,8 @@
<%--width="100%"--%>
<tr class="Titulos TextTab">
<th>#</th>
<th>Cant</th>
<th style="width: 100px;">
<asp:Literal ID="LblTituloCantidad" runat="server" Text="Cant"></asp:Literal></th>
<th>Unidad</th>
<th>
<div id="DIVClasificacion" runat="server">
@@ -992,13 +993,24 @@
<tr class="TextTab" runat="server" id="TrEdit">
<th>
<asp:Label ID="LtlConsec" runat="server"></asp:Label>&nbsp;</th>
<th>
<asp:TextBox ID="TxtCantidad" onkeyup="Recalcula();" onkeypress="DisableEnterKey(event);" runat="server" CssClass="form-control input-sm " ClientIDMode="Static" MaxLength="12" ValidationGroup="GprAgregaPS" Width="60px" Height="24px"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="SoloNumerosCantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
<asp:RequiredFieldValidator ID="RFVCantidad" runat="server" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GprAgregaPS"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOCantidad1" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
<asp:CustomValidator ID="CVCantidad" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GprAgregaPS"></asp:CustomValidator>
<ajax:ValidatorCalloutExtender ID="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="CVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
<th style="width: 100px;">
<div class="row">
<div class="col-md-12">
<asp:TextBox ID="TxtCantidad" onkeyup="Recalcula();" onkeypress="DisableEnterKey(event);" runat="server" CssClass="form-control input-sm " ClientIDMode="Static" MaxLength="12" ValidationGroup="GprAgregaPS" Width="60px" Height="24px"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="SoloNumerosCantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
<asp:RequiredFieldValidator ID="RFVCantidad" runat="server" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GprAgregaPS"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOCantidad1" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
<asp:CustomValidator ID="CVCantidad" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GprAgregaPS"></asp:CustomValidator>
<ajax:ValidatorCalloutExtender ID="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="CVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row" id="DivNumTurnos" runat="server" visible="false">
<asp:Label runat="server" Text="Turno" CssClass="col-md-4"></asp:Label>
<div class="col-md-8">
<asp:TextBox ID="TxtNumTurnos" onkeypress="DisableEnterKey(event);" runat="server" CssClass="form-control input-sm " ClientIDMode="Static" MaxLength="12" Width="100%" Height="24px"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTBNumTurnos" runat="server" TargetControlID="TxtNumTurnos" FilterType="Custom, Numbers" ValidChars="." />
</div>
</div>
</th>
<th>
<%--<asp:Label ID="LblUnidadMedida" runat="server" Text="UM"></asp:Label> --%>
@@ -1124,17 +1136,38 @@
<%--1--%>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:#,###.####}") %>'></asp:Literal>
<div class="row">
<div class="col-md-12">
<asp:Literal ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:#,###.####}") %>'></asp:Literal>
</div>
</div>
<div class="row">
<div class="col-md-12">
<asp:Literal ID="LtlNumTurnos" runat="server" Visible="false" Text='<%# String.Format("Turnos: {0:#,###.####}", Eval("NumTurnos")) %>'></asp:Literal>
</div>
</div>
</ItemTemplate>
<EditItemTemplate>
<asp:Literal ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad") %>' Visible="false"></asp:Literal>
<asp:Literal ID="LtlTipoDescuento" runat="server" Text='<%# Eval("TipoDescuento") %>' Visible="false"></asp:Literal>
<asp:Literal ID="LtlDescuento" runat="server" Text='<%# Eval("Descuento") %>' Visible="false"></asp:Literal>
<asp:TextBox ID="TxtCantidad" runat="server" CausesValidation="true" MaxLength="12" Text='<%# Eval("Cantidad", "{0:0.######}") %>' ValidationGroup="GprGV" Width="45px" Height="24px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVCantidad" runat="server" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GprGV"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOCantidad1" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
<asp:CustomValidator ID="CVCantidadEdit" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GprGV"></asp:CustomValidator>
<ajax:ValidatorCalloutExtender ID="VCECantidadEdit" runat="server" HighlightCssClass="vco" TargetControlID="CVCantidadEdit" Width="300px"></ajax:ValidatorCalloutExtender>
<div class="row">
<div class="col-md-12">
<asp:Literal ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad") %>' Visible="false"></asp:Literal>
<asp:Literal ID="LtlTipoDescuento" runat="server" Text='<%# Eval("TipoDescuento") %>' Visible="false"></asp:Literal>
<asp:Literal ID="LtlDescuento" runat="server" Text='<%# Eval("Descuento") %>' Visible="false"></asp:Literal>
<asp:TextBox ID="TxtCantidad" runat="server" CausesValidation="true" MaxLength="12" Text='<%# Eval("Cantidad", "{0:0.######}") %>' ValidationGroup="GprGV" Width="45px" Height="24px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVCantidad" runat="server" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GprGV"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOCantidad1" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
<asp:CustomValidator ID="CVCantidadEdit" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GprGV"></asp:CustomValidator>
<ajax:ValidatorCalloutExtender ID="VCECantidadEdit" runat="server" HighlightCssClass="vco" TargetControlID="CVCantidadEdit" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row">
<asp:Label ID="LblTurnoEditar" runat="server" Text="Turno" CssClass="col-md-4" Visible="false"></asp:Label>
<div class="col-md-8">
<asp:TextBox ID="TxtNumTurnosEditar" Visible="false" Text='<%# Eval("NumTurnos") %>' onkeypress="DisableEnterKey(event);" runat="server" CssClass="form-control input-sm " ClientIDMode="Static" MaxLength="12" Width="100%" Height="24px"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTBNumTurnos" runat="server" TargetControlID="TxtNumTurnosEditar" FilterType="Custom, Numbers" ValidChars="." />
</div>
</div>
</EditItemTemplate>
</asp:TemplateField>
<%--2--%>

View File

@@ -2748,6 +2748,8 @@ Partial Class Ventas
TmpDT.Columns.Add("CveActivoFijo", GetType(Integer))
TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal))
TmpDT.Columns.Add("AFValorInicial", GetType(Decimal))
TmpDT.Columns.Add("NumTurnos", GetType(Decimal))
TmpDT.Columns("NumTurnos").DefaultValue = 0D
GvPS.DataSource = ObjVentas.DtResultados
GvPS.DataBind()
@@ -2778,6 +2780,8 @@ Partial Class Ventas
TmpDT.Columns.Add("CveActivoFijo", GetType(Integer))
TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal))
TmpDT.Columns.Add("AFValorInicial", GetType(Decimal))
TmpDT.Columns.Add("NumTurnos", GetType(Decimal))
TmpDT.Columns("NumTurnos").DefaultValue = 0D
GvPS.DataSource = ObjVentas.DtResultados
GvPS.DataBind()
@@ -3151,6 +3155,11 @@ Partial Class Ventas
CargaListasPrecios()
End If
If CveVenta <= 0 AndAlso UsuarioActual.CveEmpresa.Contiene(7, 122) Then
TxtCantidad.Width = New Unit("100%")
DivNumTurnos.Visible = True
End If
'SELECCIONA VENDEDOR DEL USUARIO CUANDO SEA VENTA NUEVA Y SIN CLIENTE
'If UsuarioActual.CveVendedor > 0 Then
' If CveVenta = -1 AndAlso Not DdlVendedor.SelectedValue.ToEntero() > 0 Then DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString())
@@ -8067,6 +8076,12 @@ Partial Class Ventas
e.Row.FCLinkButton("imgD").Visible = False
End If
If UsuarioActual.CveEmpresa.Contiene(7, 122) Then
e.Row.FCTextBox("TxtCantidad").Width = New Unit("100%")
e.Row.FCLabel("LblTurnoEditar").Visible = True
e.Row.FCTextBox("TxtNumTurnosEditar").Visible = True
End If
'If UsuarioActual.CveEmpresa = 119 Then
' e.Row.FCTextBox("TxtDescuento").Enabled = False
'End If
@@ -8150,6 +8165,10 @@ Partial Class Ventas
e.Row.FCLiteral("LtlPrecioLista").Visible = True
End If
If UsuarioActual.CveEmpresa.Contiene(7, 122) AndAlso e.Row.DBCampo("NumTurnos").ToDecimal() > 0 Then
e.Row.FCLiteral("LtlNumTurnos").Visible = True
End If
'CANTIDAD FACTURADA
Select Case e.Row.DBCampo("TipoDocto")
Case "Cot"
@@ -8456,6 +8475,11 @@ Partial Class Ventas
ObjDescuento = CalcularDescuentos(GvPS.Rows(e.RowIndex).FCDropDownLost("DdlPS").SelectedValue.ToEntero(), Cantidad, PU)
End If
Dim NumTurnos As Decimal = 0
If UsuarioActual.CveEmpresa.Contiene(7, 122) Then
NumTurnos = GvPS.Rows(e.RowIndex).FCTextBox("TxtNumTurnosEditar").Text.ToDecimal()
End If
TmpDT.Rows.Remove(TmpDT.Rows(e.RowIndex))
CalculaUsados()
AgregarProductoServicio(Cantidad, DdlUM.SelectedValue.ToEntero(), DdlUM.SelectedItem.Text, DdlCla.SelectedValue.ToEntero(), DdlCla.SelectedItem.Text,
@@ -8463,7 +8487,8 @@ Partial Class Ventas
GvPS.Rows(e.RowIndex).FCTextBox("TxtObsPS").Text.Trim, PU, ObjDescuento.ImporteDescuento,
GvPS.Rows(e.RowIndex).FCDropDownList("DdlProyecto").SelectedValue.ToEntero(), GvPS.Rows(e.RowIndex).FCDropDownList("DdlProyecto").SelectedItem.Text,
GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero(), GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedItem.Text,
CuentaPredial:=CuentaPredial, CveVentaDetalle:=GvPS.Rows(e.RowIndex).DataKey("CveVentaDetalle").ToString().ToEntero(), SeActualiza:=True, CvePromocionDetalle:=ObjDescuento.CvePromocionDetalle, ObjDescuento:=ObjDescuento)
CuentaPredial:=CuentaPredial, CveVentaDetalle:=GvPS.Rows(e.RowIndex).DataKey("CveVentaDetalle").ToString().ToEntero(), SeActualiza:=True, CvePromocionDetalle:=ObjDescuento.CvePromocionDetalle,
ObjDescuento:=ObjDescuento, NumTurnos:=NumTurnos)
' TmpDT.Rows(e.RowIndex)("CveUM") = Ddl.SelectedValue
' TmpDT.Rows(e.RowIndex)("UM") = Ddl.SelectedItem.Text
@@ -8532,8 +8557,11 @@ Partial Class Ventas
TmpDT.Rows(e.RowIndex)("PorcentajeRetISR") = ClienteRetISR
TmpDT.Rows(e.RowIndex)("CuentaPredial") = CuentaPredial
Dim NumTurnos As Decimal = 0
If UsuarioActual.CveEmpresa.Contiene(7, 122) Then
NumTurnos = GvPS.Rows(e.RowIndex).FCTextBox("TxtNumTurnosEditar").Text.ToDecimal()
End If
TmpDT.Rows(e.RowIndex)("NumTurnos") = NumTurnos
If ObjDescuento IsNot Nothing Then
TmpDT.Rows(e.RowIndex)("CvePromocionDetalle") = ObjDescuento.CvePromocionDetalle
@@ -13428,7 +13456,7 @@ Partial Class Ventas
Row("PU").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("ImporteIVA").ToString().ToDouble, Math.Round((Row("Total").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)) * (1 + Row("PorcentajeIVA").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)))), 6),
Row("Obs").ToString(), Row("Descuento").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("TipoDescuento").ToString().ToEntero(), Row("CveSubProyecto").ToString().ToEntero(), Row("CvePresupuestoIngreso").ToString().ToEntero(), TiempoEntrega:=Row("TiempoEntrega").ToString(), CveVentaDetallePadre:=Row("CveVentaDetalle").ToString().ToEntero(),
CveContratoDetalle:=Row("CveContratoDetalle").ToString().ToEntero(), CvePromocionDetalle:=Row("CvePromocionDetalle").ToString().ToEntero(), IEPS:=Row("ImporteIEPS").ToString().ToDouble, CveMovimientoDetallePedido:=Row("CveMovimientoDetallePedido").ToString().ToEntero(), ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDouble, ImporteRetISR:=Row("ImporteRetISR").ToString().ToDouble,
PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDouble, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero(), CveActivoFijo:=Row("CveActivoFijo").ToString().ToEntero()) Then
PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDouble, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero(), CveActivoFijo:=Row("CveActivoFijo").ToString().ToEntero(), NumTurnos:=Row("NumTurnos").ToString().ToDecimal()) Then
ErrorList.Add("Ocurrió un error al agregar un Producto o Servicio a la Factura.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
Exit For
Else
@@ -18815,11 +18843,16 @@ Partial Class Ventas
End If
End If
Dim NumTurnos As Decimal = 0
If UsuarioActual.CveEmpresa.Contiene(7, 122) Then
NumTurnos = TxtNumTurnos.Text.ToDecimal()
End If
AgregarProductoServicio(Cantidad, DdlUnidadMedida.SelectedValue.ToEntero(), DdlUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero(), DdlClasificacion.SelectedItem.Text,
CvePS, "", TxtObsPS.Text.TrimEnd, PU, ObjDescuento.ImporteDescuento,
DdlProyecto.SelectedValue.ToEntero(), DdlProyecto.SelectedItem.Text, DdlSubProyecto.SelectedValue.ToEntero(), DdlSubProyecto.SelectedItem.Text,
Serie:=If(DIVCod.Visible, TxtCodigoSerie.Text.Trim, ""), TiempoEntrega:=TxtTiempoEntrega.Text, CuentaPredial:=TxtCuentaPredial.Text.Trim, RegeneraIEPS:=ClienteDesglosaIEPS, CvePromocionDetalle:=ObjDescuento.CvePromocionDetalle,
ImporteProntoPago:=ObjDescuento.ImporteProntoPago, ObjDescuento:=ObjDescuento, CvePrecioLista:=CvePrecioListaPS, PrecioLista:=PrecioListaPS)
ImporteProntoPago:=ObjDescuento.ImporteProntoPago, ObjDescuento:=ObjDescuento, CvePrecioLista:=CvePrecioListaPS, PrecioLista:=PrecioListaPS, NumTurnos:=NumTurnos)
CalculaUsados()
@@ -18941,6 +18974,7 @@ Partial Class Ventas
End Sub
Private Sub LimpiaAgregar()
TxtCantidad.Text = ""
TxtNumTurnos.Text = ""
HdnPS.Value = "-1"
HdnCodigoPS.Value = "-1"
HdnTipoPS.Value = "-1"
@@ -19011,7 +19045,7 @@ Partial Class Ventas
Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0, Optional CuentaPredial As String = "",
Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional SeActualiza As Boolean = False, Optional CvePromocionDetalle As Integer = -1, Optional EsCargo As Boolean = False,
Optional ImporteProntoPago As Decimal = 0, Optional ByRef ObjDescuento As Modelos.VentaDescuentos = Nothing, Optional CvePrecioLista As Integer = -1, Optional PrecioLista As String = "",
Optional CveActivoFijo As Integer = -1, Optional AFDepreciacion As Decimal = 0D, Optional AFValorInicial As Decimal = 0D) As Boolean
Optional CveActivoFijo As Integer = -1, Optional AFDepreciacion As Decimal = 0D, Optional AFValorInicial As Decimal = 0D, Optional NumTurnos As Decimal = 0D) As Boolean
Dim Retorno As Boolean = False
Try
@@ -19274,6 +19308,7 @@ Partial Class Ventas
Row("AFDepreciacion") = AFDepreciacion
Row("AFValorInicial") = AFValorInicial
Row("NumTurnos") = NumTurnos
If UsuarioActual.CveEmpresa.Contiene(119, 13, 83) Then
If Not RemisionesLista.Count > 0 Then 'SI VIENE DE REMISION NO SE CONSIDERA
@@ -19519,6 +19554,9 @@ Partial Class Ventas
TmpDT.Columns("TieneProntoPago").DefaultValue = "No"
TmpDT.Columns("ImporteProntoPago").DefaultValue = 0
TmpDT.Columns.Add("NumTurnos", GetType(Decimal))
TmpDT.Columns("NumTurnos").DefaultValue = 0
End Sub
Private Sub CreaDTmpC()
DTmpC = New DataTable
@@ -22249,7 +22287,7 @@ Partial Class Ventas
Row("PU").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("ImporteIVA").ToString().ToDouble, Math.Round((Row("Total").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)) * (1 + Row("PorcentajeIVA").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)))), 6),
Row("Obs").ToString(), Row("Descuento").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("TipoDescuento").ToString().ToEntero(), Row("CveSubProyecto").ToString().ToEntero(), Row("CvePresupuestoIngreso").ToString().ToEntero(), PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, IEPS:=Row("ImporteIEPS").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDouble, TiempoEntrega:=Row("TiempoEntrega").ToString(),
CveVentaDetallePadre:=Row("CveVentaDetalle").ToString().ToEntero(), CveContratoDetalle:=Row("CveContratoDetalle").ToString().ToEntero(), CvePromocionDetalle:=If(DtPromociones IsNot Nothing, DtPromociones.FiltroPrimeroValor("CvePromocionDetalle", $"CvePS={Row("CvePS").ToString()}").ToEntero(), -1),
ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDouble, ImporteRetISR:=Row("ImporteRetISR").ToString().ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDouble, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero(), CveActivoFijo:=Row("CveActivoFijo").ToString().ToEntero()) Then
ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDouble, ImporteRetISR:=Row("ImporteRetISR").ToString().ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDouble, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero(), CveActivoFijo:=Row("CveActivoFijo").ToString().ToEntero(), NumTurnos:=Row("NumTurnos").ToString().ToDecimal()) Then
OcurrioError = True
Exit For
Else
@@ -33054,11 +33092,25 @@ Partial Class Ventas
'REMOVER EVENTO PARA RECARGAR ALMACEN
'spanAlmacen.Attributes.Remove("onclick")
If UsuarioActual.CveEmpresa.Contiene(7, 122) Then
TxtCantidad.Width = New Unit("100%")
DivNumTurnos.Visible = True
End If
If UsuarioActual.Empresa.Funcionalidad(360) = "1" Then
CargaListasPrecios()
End If
BtnEditar.Visible = False
BtnEmitir.Visible = False
BtnPermisoEditarCotizacion.Visible = False
BtnEditarCotizacion.Visible = False
BtnPermisoEditarRemision.Visible = False
BtnEditarRemision.Visible = False
BtnGenerarRemision.Visible = False
BtnGeneraAutorizacion.Visible = False
HdnCargarInventario.Value = "False"
UpParametros.Update()
@@ -35400,6 +35452,8 @@ Partial Class Ventas
TmpDT.Columns.Add("CveActivoFijo", GetType(Integer))
TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal))
TmpDT.Columns.Add("AFValorInicial", GetType(Decimal))
TmpDT.Columns.Add("NumTurnos", GetType(Decimal))
TmpDT.Columns("NumTurnos").DefaultValue = 0D
Return TmpDT
End Function