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()) ' Me.OnError("Ocurrió un error al guardar los cambios en el Banco", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
Catch ex As Exception 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 End Try
Return Retorno Return Retorno

View File

@@ -1343,7 +1343,7 @@ Public Class ClsVentas
CvePresupuestoIngreso As Integer, Optional TiempoEntrega As String = "", Optional CveVentaDetallePadre As Integer = -1, 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 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 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 Dim Retorno As Boolean = False
DataAdapter("PA_VentasDetalleAdd") DataAdapter("PA_VentasDetalleAdd")
@@ -1375,6 +1375,7 @@ Public Class ClsVentas
.Add("@CuentaPredial", SqlDbType.VarChar).Value = CuentaPredial .Add("@CuentaPredial", SqlDbType.VarChar).Value = CuentaPredial
.Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista .Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista
.Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo .Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
.Add("@NumTurnos", SqlDbType.Decimal).Value = NumTurnos
End With End With
Try 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 If continuar AndAlso objPersonal.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa) AndAlso objPersonal.DtResultados.Rows.Count > 0 Then
RFC = objPersonal.RFC RFC = objPersonal.RFC
cfdi.Emisor.RegistroPatronal = objPersonal.DtResultados.Rows(0)("RegistroPatronal").ToString() 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 CodigoPostal = objPersonal.CP
Sindicalizado = objPersonal.DtResultados.Rows(0)("Sindicalizado").ToString().ToUpper().Contiene("TRUE", "1") Sindicalizado = objPersonal.DtResultados.Rows(0)("Sindicalizado").ToString().ToUpper().Contiene("TRUE", "1")
CURP = objPersonal.CURP CURP = objPersonal.CURP

View File

@@ -1652,7 +1652,7 @@ Partial Class Inventarios_TraspasoAlmacen
'DEBE CONSIDERAR SOLO LAS FILAS QUE TENGA PRODUCTOS, NO EL TOTALIZADOR 'DEBE CONSIDERAR SOLO LAS FILAS QUE TENGA PRODUCTOS, NO EL TOTALIZADOR
If CvePS > 0 Then If CvePS > 0 Then
CveMovimientoDetalleSalida = GvRow.DataKey("CveMovimientoDetalle").ToEntero 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 '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(); Correo = drow["Correo"].ToString();
NombreCompleto = drow["NombreCompleto"].ToString(); NombreCompleto = drow["NombreCompleto"].ToString();
RFC = drow["RFC"].ToString(); //RFC = drow["RFC"].ToString();
CURP = drow["CURP"].ToString(); //CURP = drow["CURP"].ToString();
} }
string Msg = "";// lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, (UsuarioActual.CveUsuario == 100 ? 4 : 4)); 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)); 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> </div>
<div class="col-md-6"> <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> <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;"> <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> <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> <span class="caption-subject bold uppercase">Estado de Cuenta</span>
</div> </div>
<div class="tools"> <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> <a href="javascript:;" class="collapse"></a>
</div> </div>
</div> </div>
<div class="portlet-body"> <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="row">
<div class="col-md-6"> <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> <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;"> <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> <asp:TextBox ID="TxtFechaInicioCxP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="100px"></asp:TextBox>
@@ -1919,7 +1919,7 @@
</div> </div>
</div> </div>
<div class="col-md-6"> <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> <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;"> <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> <asp:TextBox Width="100px" ID="TxtFechaFinCxP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
@@ -1934,7 +1934,7 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-6"> <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> <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;"> <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> <asp:TextBox ID="TxtFechaVICxP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="100px"></asp:TextBox>
@@ -1947,7 +1947,7 @@
</div> </div>
</div> </div>
<div class="col-md-6"> <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> <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;"> <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> <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() Dim CtaCliente As Integer = DdlCtaContableClientes.SelectedValue.ToEntero()
' si tiene la funcionalidad de la cuenta contable padre ' 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() ' ObjContaAC.IniciaTransacSQL()
'se registra la cuenta contable automaticamente ' '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 ' If CtaCliente > 0 Then
ObjContaAC.Commit() ' ObjContaAC.Commit()
DdlCtaContableClientes.Items.Add(New ListItem(TxtNombreComercial.Text.Trim, CtaCliente.ToString())) ' DdlCtaContableClientes.Items.Add(New ListItem(TxtNombreComercial.Text.Trim, CtaCliente.ToString()))
DdlCtaContableClientes.SelectedValue = CtaCliente.ToString() ' DdlCtaContableClientes.SelectedValue = CtaCliente.ToString()
'MsgCuentaContable = String.Format("<br />Con la cuenta contable: {0}", NewCuenta) ' 'MsgCuentaContable = String.Format("<br />Con la cuenta contable: {0}", NewCuenta)
Else ' Else
ObjContaAC.RollBack() ' ObjContaAC.RollBack()
ObjContaAC.Dispose() ' ObjContaAC.Dispose()
Alert("Error al guardar la cuenta contable ", TipoMensaje.MsgError) ' Alert("Error al guardar la cuenta contable ", TipoMensaje.MsgError)
ObjClientes.Dispose() ' ObjClientes.Dispose()
Exit Sub ' Exit Sub
End If ' End If
ObjContaAC.Dispose() ' ObjContaAC.Dispose()
End If 'End If
Dim CodigoCuentaAltaCompaq As String = "" Dim CodigoCuentaAltaCompaq As String = ""
@@ -2750,11 +2750,15 @@ Partial Class Clientes
End If End If
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 End If
If ErrorProceso Then If ErrorProceso Then
ObjClientes.RollBack() ObjClientes.RollBack()
Else Else
@@ -4119,11 +4123,11 @@ Partial Class Clientes
Dim FechaCorte As Date = ("9999/01/01").ToDate() Dim FechaCorte As Date = ("9999/01/01").ToDate()
Dim TipoDocto As String = If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM) Dim TipoDocto As String = If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM)
Dim TipoDocto2 As String = If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM(True)) Dim TipoDocto2 As String = If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM(True))
Dim FechaVencimientoI As String = If(TxtFechaVICxP.Text = "", "-1", TxtFechaVICxP.Text).ToString() Dim FechaVencimientoI As DateTime = If(TxtFechaVICxP.Text = "", MinFecha, TxtFechaVICxP.Text.ToDate())
Dim FechaVencimientoF As String = If(TxtFechaVFCxP.Text = "", "-1", TxtFechaVFCxP.Text).ToString() Dim FechaVencimientoF As DateTime = If(TxtFechaVFCxP.Text = "", MaxFecha, TxtFechaVFCxP.Text.ToDate())
Dim ObjMovtos As New ClsMovimientos() 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")) DtCxCFact = If(DdlTipoCuentasCxC.SelectedValue = "-1", ObjMovtos.DtResultados.FiltraParametros("", "TipoDocto").Copy, ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'", "TipoDocto"))
'cargo los anticipos NC 'cargo los anticipos NC
DtCxCFact.Columns.Add("SaldoAnticipo", GetType(Decimal)) DtCxCFact.Columns.Add("SaldoAnticipo", GetType(Decimal))

View File

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

View File

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

View File

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

View File

@@ -948,7 +948,8 @@
<%--width="100%"--%> <%--width="100%"--%>
<tr class="Titulos TextTab"> <tr class="Titulos TextTab">
<th>#</th> <th>#</th>
<th>Cant</th> <th style="width: 100px;">
<asp:Literal ID="LblTituloCantidad" runat="server" Text="Cant"></asp:Literal></th>
<th>Unidad</th> <th>Unidad</th>
<th> <th>
<div id="DIVClasificacion" runat="server"> <div id="DIVClasificacion" runat="server">
@@ -992,13 +993,24 @@
<tr class="TextTab" runat="server" id="TrEdit"> <tr class="TextTab" runat="server" id="TrEdit">
<th> <th>
<asp:Label ID="LtlConsec" runat="server"></asp:Label>&nbsp;</th> <asp:Label ID="LtlConsec" runat="server"></asp:Label>&nbsp;</th>
<th> <th style="width: 100px;">
<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> <div class="row">
<ajax:FilteredTextBoxExtender ID="SoloNumerosCantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." /> <div class="col-md-12">
<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> <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:ValidatorCalloutExtender ID="VCOCantidad1" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:FilteredTextBoxExtender ID="SoloNumerosCantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
<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> <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="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="CVCantidad" Width="300px"></ajax:ValidatorCalloutExtender> <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>
<th> <th>
<%--<asp:Label ID="LblUnidadMedida" runat="server" Text="UM"></asp:Label> --%> <%--<asp:Label ID="LblUnidadMedida" runat="server" Text="UM"></asp:Label> --%>
@@ -1124,17 +1136,38 @@
<%--1--%> <%--1--%>
<asp:TemplateField> <asp:TemplateField>
<ItemTemplate> <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> </ItemTemplate>
<EditItemTemplate> <EditItemTemplate>
<asp:Literal ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad") %>' Visible="false"></asp:Literal> <div class="row">
<asp:Literal ID="LtlTipoDescuento" runat="server" Text='<%# Eval("TipoDescuento") %>' Visible="false"></asp:Literal> <div class="col-md-12">
<asp:Literal ID="LtlDescuento" runat="server" Text='<%# Eval("Descuento") %>' Visible="false"></asp:Literal> <asp:Literal ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad") %>' 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:Literal ID="LtlTipoDescuento" runat="server" Text='<%# Eval("TipoDescuento") %>' Visible="false"></asp:Literal>
<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> <asp:Literal ID="LtlDescuento" runat="server" Text='<%# Eval("Descuento") %>' Visible="false"></asp:Literal>
<ajax:ValidatorCalloutExtender ID="VCOCantidad1" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCalloutExtender> <asp:TextBox ID="TxtCantidad" runat="server" CausesValidation="true" MaxLength="12" Text='<%# Eval("Cantidad", "{0:0.######}") %>' ValidationGroup="GprGV" Width="45px" Height="24px"></asp:TextBox>
<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> <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="VCECantidadEdit" runat="server" HighlightCssClass="vco" TargetControlID="CVCantidadEdit" Width="300px"></ajax:ValidatorCalloutExtender> <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> </EditItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<%--2--%> <%--2--%>

View File

@@ -2748,6 +2748,8 @@ Partial Class Ventas
TmpDT.Columns.Add("CveActivoFijo", GetType(Integer)) TmpDT.Columns.Add("CveActivoFijo", GetType(Integer))
TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal)) TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal))
TmpDT.Columns.Add("AFValorInicial", GetType(Decimal)) TmpDT.Columns.Add("AFValorInicial", GetType(Decimal))
TmpDT.Columns.Add("NumTurnos", GetType(Decimal))
TmpDT.Columns("NumTurnos").DefaultValue = 0D
GvPS.DataSource = ObjVentas.DtResultados GvPS.DataSource = ObjVentas.DtResultados
GvPS.DataBind() GvPS.DataBind()
@@ -2778,6 +2780,8 @@ Partial Class Ventas
TmpDT.Columns.Add("CveActivoFijo", GetType(Integer)) TmpDT.Columns.Add("CveActivoFijo", GetType(Integer))
TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal)) TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal))
TmpDT.Columns.Add("AFValorInicial", GetType(Decimal)) TmpDT.Columns.Add("AFValorInicial", GetType(Decimal))
TmpDT.Columns.Add("NumTurnos", GetType(Decimal))
TmpDT.Columns("NumTurnos").DefaultValue = 0D
GvPS.DataSource = ObjVentas.DtResultados GvPS.DataSource = ObjVentas.DtResultados
GvPS.DataBind() GvPS.DataBind()
@@ -3151,6 +3155,11 @@ Partial Class Ventas
CargaListasPrecios() CargaListasPrecios()
End If 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 'SELECCIONA VENDEDOR DEL USUARIO CUANDO SEA VENTA NUEVA Y SIN CLIENTE
'If UsuarioActual.CveVendedor > 0 Then 'If UsuarioActual.CveVendedor > 0 Then
' If CveVenta = -1 AndAlso Not DdlVendedor.SelectedValue.ToEntero() > 0 Then DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString()) ' 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 e.Row.FCLinkButton("imgD").Visible = False
End If 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 'If UsuarioActual.CveEmpresa = 119 Then
' e.Row.FCTextBox("TxtDescuento").Enabled = False ' e.Row.FCTextBox("TxtDescuento").Enabled = False
'End If 'End If
@@ -8150,6 +8165,10 @@ Partial Class Ventas
e.Row.FCLiteral("LtlPrecioLista").Visible = True e.Row.FCLiteral("LtlPrecioLista").Visible = True
End If 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 'CANTIDAD FACTURADA
Select Case e.Row.DBCampo("TipoDocto") Select Case e.Row.DBCampo("TipoDocto")
Case "Cot" Case "Cot"
@@ -8456,6 +8475,11 @@ Partial Class Ventas
ObjDescuento = CalcularDescuentos(GvPS.Rows(e.RowIndex).FCDropDownLost("DdlPS").SelectedValue.ToEntero(), Cantidad, PU) ObjDescuento = CalcularDescuentos(GvPS.Rows(e.RowIndex).FCDropDownLost("DdlPS").SelectedValue.ToEntero(), Cantidad, PU)
End If 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)) TmpDT.Rows.Remove(TmpDT.Rows(e.RowIndex))
CalculaUsados() CalculaUsados()
AgregarProductoServicio(Cantidad, DdlUM.SelectedValue.ToEntero(), DdlUM.SelectedItem.Text, DdlCla.SelectedValue.ToEntero(), DdlCla.SelectedItem.Text, 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).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("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, 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)("CveUM") = Ddl.SelectedValue
' TmpDT.Rows(e.RowIndex)("UM") = Ddl.SelectedItem.Text ' 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)("PorcentajeRetISR") = ClienteRetISR
TmpDT.Rows(e.RowIndex)("CuentaPredial") = CuentaPredial 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 If ObjDescuento IsNot Nothing Then
TmpDT.Rows(e.RowIndex)("CvePromocionDetalle") = ObjDescuento.CvePromocionDetalle 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("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(), 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, 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") 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 Exit For
Else Else
@@ -18815,11 +18843,16 @@ Partial Class Ventas
End If End If
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, AgregarProductoServicio(Cantidad, DdlUnidadMedida.SelectedValue.ToEntero(), DdlUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero(), DdlClasificacion.SelectedItem.Text,
CvePS, "", TxtObsPS.Text.TrimEnd, PU, ObjDescuento.ImporteDescuento, CvePS, "", TxtObsPS.Text.TrimEnd, PU, ObjDescuento.ImporteDescuento,
DdlProyecto.SelectedValue.ToEntero(), DdlProyecto.SelectedItem.Text, DdlSubProyecto.SelectedValue.ToEntero(), DdlSubProyecto.SelectedItem.Text, 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, 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() CalculaUsados()
@@ -18941,6 +18974,7 @@ Partial Class Ventas
End Sub End Sub
Private Sub LimpiaAgregar() Private Sub LimpiaAgregar()
TxtCantidad.Text = "" TxtCantidad.Text = ""
TxtNumTurnos.Text = ""
HdnPS.Value = "-1" HdnPS.Value = "-1"
HdnCodigoPS.Value = "-1" HdnCodigoPS.Value = "-1"
HdnTipoPS.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 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 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 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 Dim Retorno As Boolean = False
Try Try
@@ -19274,6 +19308,7 @@ Partial Class Ventas
Row("AFDepreciacion") = AFDepreciacion Row("AFDepreciacion") = AFDepreciacion
Row("AFValorInicial") = AFValorInicial Row("AFValorInicial") = AFValorInicial
Row("NumTurnos") = NumTurnos
If UsuarioActual.CveEmpresa.Contiene(119, 13, 83) Then If UsuarioActual.CveEmpresa.Contiene(119, 13, 83) Then
If Not RemisionesLista.Count > 0 Then 'SI VIENE DE REMISION NO SE CONSIDERA 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("TieneProntoPago").DefaultValue = "No"
TmpDT.Columns("ImporteProntoPago").DefaultValue = 0 TmpDT.Columns("ImporteProntoPago").DefaultValue = 0
TmpDT.Columns.Add("NumTurnos", GetType(Decimal))
TmpDT.Columns("NumTurnos").DefaultValue = 0
End Sub End Sub
Private Sub CreaDTmpC() Private Sub CreaDTmpC()
DTmpC = New DataTable 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("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(), 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), 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 OcurrioError = True
Exit For Exit For
Else Else
@@ -33054,11 +33092,25 @@ Partial Class Ventas
'REMOVER EVENTO PARA RECARGAR ALMACEN 'REMOVER EVENTO PARA RECARGAR ALMACEN
'spanAlmacen.Attributes.Remove("onclick") '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 If UsuarioActual.Empresa.Funcionalidad(360) = "1" Then
CargaListasPrecios() CargaListasPrecios()
End If 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" HdnCargarInventario.Value = "False"
UpParametros.Update() UpParametros.Update()
@@ -35400,6 +35452,8 @@ Partial Class Ventas
TmpDT.Columns.Add("CveActivoFijo", GetType(Integer)) TmpDT.Columns.Add("CveActivoFijo", GetType(Integer))
TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal)) TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal))
TmpDT.Columns.Add("AFValorInicial", GetType(Decimal)) TmpDT.Columns.Add("AFValorInicial", GetType(Decimal))
TmpDT.Columns.Add("NumTurnos", GetType(Decimal))
TmpDT.Columns("NumTurnos").DefaultValue = 0D
Return TmpDT Return TmpDT
End Function End Function