VSH. Agregar numero de turnos al generar una venta
This commit is contained in:
@@ -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(Integer))
|
||||
TmpDT.Columns("NumTurnos").DefaultValue = 0
|
||||
|
||||
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(Integer))
|
||||
TmpDT.Columns("NumTurnos").DefaultValue = 0
|
||||
|
||||
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").ToEntero() > 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 Integer = 0
|
||||
If UsuarioActual.CveEmpresa.Contiene(7, 122) Then
|
||||
NumTurnos = GvPS.Rows(e.RowIndex).FCTextBox("TxtNumTurnosEditar").Text.ToEntero()
|
||||
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 Integer = 0
|
||||
If UsuarioActual.CveEmpresa.Contiene(7, 122) Then
|
||||
NumTurnos = GvPS.Rows(e.RowIndex).FCTextBox("TxtNumTurnosEditar").Text.ToEntero()
|
||||
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().ToEntero()) 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 Integer = 0
|
||||
If UsuarioActual.CveEmpresa.Contiene(7, 122) Then
|
||||
NumTurnos = TxtNumTurnos.Text.ToEntero()
|
||||
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 Integer = 0) 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(Integer))
|
||||
TmpDT.Columns("NumTurnos").DefaultValue = 0
|
||||
|
||||
End Sub
|
||||
Private Sub CreaDTmpC()
|
||||
DTmpC = New DataTable
|
||||
@@ -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(Integer))
|
||||
TmpDT.Columns("NumTurnos").DefaultValue = 0
|
||||
|
||||
Return TmpDT
|
||||
End Function
|
||||
|
||||
Reference in New Issue
Block a user