--merge SaldosIniciales
This commit is contained in:
@@ -258,20 +258,15 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
Private Sub CargaCuentas()
|
||||
DdlCuenta.Items.Clear()
|
||||
Dim CveTipoCuenta As Integer = 2
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then CveTipoCuenta = -1 'que se muestren todas, para empresa acumuladores
|
||||
|
||||
|
||||
Dim dt As DataTable
|
||||
Dim CveTipoCuenta As Integer = -1
|
||||
If UsuarioActual.CveEmpresa = 119 Then CveTipoCuenta = 2 'solo las cuentas de cheques
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(7, 11, 12, 122, 145) Then
|
||||
dt = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa, CveTipoCuenta:=-1).FiltraParametros(" CveTipoCuenta in (1,2) ")
|
||||
Else
|
||||
dt = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa, CveTipoCuenta:=CveTipoCuenta)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If ChkPagarPesos.Checked Then
|
||||
dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 1))
|
||||
RegistraScript("CambiaPesosDolares();")
|
||||
|
||||
@@ -1871,7 +1871,7 @@ Partial Class PV
|
||||
Dim ObjAC As ClsContPAQi = Nothing
|
||||
|
||||
Dim Moneda As Integer = DdlMoneda.SelectedValue.ToEntero
|
||||
Dim TipoCambio As Double = TxtTipoCambio.Text.ToDouble
|
||||
Dim TipoCambio As Decimal = TxtTipoCambio.Text.ToDecimal
|
||||
Try
|
||||
'CONVERTIR REMISION - TIPO MONEDA -DOLARES A PESOS
|
||||
If DdlMoneda.SelectedValue.ToEntero <> 2 AndAlso ChkConvertirDolares.Checked Then
|
||||
@@ -1960,7 +1960,7 @@ Partial Class PV
|
||||
|
||||
'Actualizo los parametros de la venta
|
||||
If Not ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDecimal, LblDescuentos.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtIEPS.Text.ToDecimal, TxtTotal.Text.ToDecimal, Moneda, TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim,
|
||||
UsuarioActual.CveEmpresa, CveVenta, 0, 0,
|
||||
UsuarioActual.CveEmpresa, CveVenta,
|
||||
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
|
||||
PedidoContrato:="", AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero,
|
||||
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero, TipoDocto:="Rem", CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal,
|
||||
|
||||
@@ -389,13 +389,14 @@
|
||||
<asp:Literal ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:N0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Sub Total" DataField="SubTotal" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Sub Total" DataField="SubTotal" ItemStyle-Width="10%" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Descuento" DataField="Descuento" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--<asp:BoundField HeaderText="Amortización" DataField="Amortizacion" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />--%>
|
||||
<asp:BoundField HeaderText="IVA" DataField="IVA" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="IEPS" DataField="IEPS" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" Visible="false" />
|
||||
<%--<asp:BoundField HeaderText="Ret. IVA" DataField="RetIVA" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />--%>
|
||||
<%--<asp:BoundField HeaderText="Ret. ISR" DataField="RetISR" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />--%>
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" ItemStyle-Width="10%" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Sub. Máximo" DataField="MAX_SubTotal" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" Visible="false" />
|
||||
<asp:BoundField HeaderText="Sub. Promedio" DataField="AVG_SubTotal" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" Visible="false" />
|
||||
<asp:BoundField HeaderText="Sub. Mínimo" DataField="MIN_SubTotal" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" Visible="false" />
|
||||
@@ -423,7 +424,7 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<table class="table table-striped table-advance table-hover Widthall">
|
||||
<tbody>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMaxSub" runat="server" Text="SubTotal Máximo" />
|
||||
@@ -444,6 +445,12 @@
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMinTot" runat="server" Text="Total Mínimo" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkIEPS" runat="server" Text="IEPS" Visible ="false" />
|
||||
</td>
|
||||
<td style="text-align: left;"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -53,8 +53,6 @@ Partial Class Ventas_RepProductosServicios
|
||||
If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx")
|
||||
CargarMarcas()
|
||||
SetValues()
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -115,8 +113,6 @@ Partial Class Ventas_RepProductosServicios
|
||||
divClasif2.Visible = True
|
||||
|
||||
DdlGrupo.Items.Add(New ListItem("Clasificacion2", "25"))
|
||||
|
||||
|
||||
LblServicioDomicilioFiltro.Visible = True
|
||||
DVServicioDomicilio.Visible = True
|
||||
|
||||
@@ -142,6 +138,12 @@ Partial Class Ventas_RepProductosServicios
|
||||
DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero)
|
||||
DdlPS.ddl.DataBind()
|
||||
DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(713) = "1" Then
|
||||
ChkIEPS.Visible = True
|
||||
ChkIEPS.Checked = True
|
||||
GvDatos.Columns(6).Visible = True
|
||||
End If
|
||||
|
||||
'CargaEstatus
|
||||
@@ -334,43 +336,48 @@ Partial Class Ventas_RepProductosServicios
|
||||
|
||||
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
|
||||
|
||||
|
||||
If ChkMaxSub.Checked Then
|
||||
If ChkIEPS.Checked Then
|
||||
GvDatos.Columns(6).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(6).Visible = False
|
||||
End If
|
||||
|
||||
If ChkAVGSub.Checked Then
|
||||
If ChkMaxSub.Checked Then
|
||||
GvDatos.Columns(7).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(7).Visible = False
|
||||
End If
|
||||
|
||||
If ChkMinSub.Checked Then
|
||||
If ChkAVGSub.Checked Then
|
||||
GvDatos.Columns(8).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(8).Visible = False
|
||||
End If
|
||||
|
||||
If ChkMaxTot.Checked Then
|
||||
If ChkMinSub.Checked Then
|
||||
GvDatos.Columns(9).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(9).Visible = False
|
||||
End If
|
||||
|
||||
If ChkAvgTot.Checked Then
|
||||
If ChkMaxTot.Checked Then
|
||||
GvDatos.Columns(10).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(10).Visible = False
|
||||
End If
|
||||
|
||||
If ChkMinTot.Checked Then
|
||||
If ChkAvgTot.Checked Then
|
||||
GvDatos.Columns(11).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(11).Visible = False
|
||||
End If
|
||||
|
||||
If ChkMinTot.Checked Then
|
||||
GvDatos.Columns(12).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(12).Visible = False
|
||||
End If
|
||||
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -399,13 +399,13 @@
|
||||
<%--3--%>
|
||||
<asp:BoundField HeaderText="Suc. Cob." DataField="SubProyectoCobranza" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left" Visible="false" />
|
||||
<%--4--%>
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-Width="2.5%" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--5--%>
|
||||
<asp:BoundField HeaderText="Cliente" DataField="Nombre" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--6--%>
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="2.5%" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--7--%>
|
||||
<asp:BoundField HeaderText="Código" DataField="CodigoProducto" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Código" DataField="CodigoProducto" ItemStyle-Width="2.5%" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--8--%>
|
||||
<asp:BoundField HeaderText="Producto/Servicio" DataField="PS" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--9--%>
|
||||
@@ -413,13 +413,13 @@
|
||||
<%--10--%>
|
||||
<asp:BoundField HeaderText="PU" DataField="PU" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--11--%>
|
||||
<asp:BoundField HeaderText="SubTotal" DataField="SubTotal" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="7.5%" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="SubTotal" DataField="SubTotal" DataFormatString="{0:N2}" ItemStyle-Width="7.5%" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--12--%>
|
||||
<asp:BoundField HeaderText="Desc" DataField="Descuento" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--13--%>
|
||||
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--14--%>
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="7.5%" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-Width="7.5%" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--15--%>
|
||||
<asp:BoundField HeaderText="RFC" DataField="RFC" ItemStyle-Width="5%" Visible="false" />
|
||||
<%--16--%>
|
||||
|
||||
@@ -579,12 +579,18 @@
|
||||
<asp:Literal ID="LtlKm" runat="server" Text='<%# Eval("Kilometraje") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 39--%>
|
||||
<%-- 40--%>
|
||||
<asp:TemplateField HeaderText="TC" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTC" runat="server" Text='<%# Eval("TipoCambio") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 41--%>
|
||||
<asp:TemplateField HeaderText="Descripción Venta" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDescripcionVenta" runat="server" Text='<%# Eval("DescripcionVenta") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
@@ -732,6 +738,11 @@
|
||||
<td style="text-align: left;"> </td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkKilometraje" runat="server" Visible="False" Text=" Kilometraje" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;"></td>
|
||||
<td style="text-align: left;"> </td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkDescripcionVenta" runat="server" Visible="true" Text=" Descripción Venta" /></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -705,6 +705,8 @@ Partial Class RepVentaDetalle
|
||||
|
||||
If ChkTC.Checked Then ListPersonalizada.Add("TC")
|
||||
|
||||
If ChkDescripcionVenta.Checked Then ListPersonalizada.Add("DescripcionVenta")
|
||||
|
||||
If objUsuario.AddUsuariosPersonalizaciones(UsuarioActual, "RepVentaDetalles.aspx", String.Join("|", ListPersonalizada)) Then
|
||||
'Alert("Personalizacion guardada")
|
||||
End If
|
||||
@@ -889,6 +891,9 @@ Partial Class RepVentaDetalle
|
||||
Case "Kilometraje"
|
||||
ChkKilometraje.Checked = True
|
||||
Exit Select
|
||||
Case "DescripcionVenta"
|
||||
ChkDescripcionVenta.Checked = True
|
||||
Exit Select
|
||||
Case Else
|
||||
Exit Select
|
||||
End Select
|
||||
@@ -947,6 +952,8 @@ Partial Class RepVentaDetalle
|
||||
GvDatos.Columns(38).Visible = ChkUsoCFDI.Checked
|
||||
GvDatos.Columns(39).Visible = ChkKilometraje.Checked
|
||||
GvDatos.Columns(40).Visible = ChkTC.Checked
|
||||
GvDatos.Columns(41).Visible = ChkDescripcionVenta.Checked
|
||||
|
||||
|
||||
Personalizo = 1
|
||||
If Personalizo = 1 Then
|
||||
|
||||
@@ -366,13 +366,13 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--2--%>
|
||||
<asp:BoundField HeaderText="Sub Total" DataField="SubTotal" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Sub Total" DataField="SubTotal" ItemStyle-Width="7.5%" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--3--%>
|
||||
<asp:BoundField HeaderText="Descuento" DataField="Descuento" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--4--%>
|
||||
<asp:BoundField HeaderText="Amortización" DataField="Amortizacion" Visible="false" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--5--%>
|
||||
<asp:BoundField HeaderText="Sub Total 2" DataField="SubTotal2" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Sub Total 2" DataField="SubTotal2" ItemStyle-Width="7.5%" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--6--%>
|
||||
<asp:BoundField HeaderText="IVA" DataField="IVA" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--7--%>
|
||||
@@ -384,7 +384,7 @@
|
||||
<%--10--%>
|
||||
<asp:BoundField HeaderText="Imp. Locales" DataField="TotalImpuestos" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--11--%>
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" ItemStyle-Width="10%" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--12--%>
|
||||
<asp:BoundField HeaderText="Sub. Máximo" DataField="MAX_SubTotal" ItemStyle-Width="5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--13--%>
|
||||
|
||||
@@ -390,7 +390,7 @@ Partial Class Ventas_RepVentas
|
||||
CveMoneda = e.Row.DBCampo("CveMoneda").ToString.ToEntero
|
||||
End If
|
||||
|
||||
Dim CveSubProyecto = "-1", CveProyecto = "-1"
|
||||
Dim CveSubProyecto As String = "-1", CveProyecto As String = "-1"
|
||||
If DdlGrupo.SelectedValue.ToEntero = 19 Then
|
||||
CveSubProyecto = e.Row.DBCampo("CveCentroCosto")
|
||||
CveProyecto = e.Row.DBCampo("CveCentroCostoProyecto")
|
||||
@@ -411,7 +411,7 @@ Partial Class Ventas_RepVentas
|
||||
If e.Row.DBCampo("Mes").ToEntero() > 0 Then
|
||||
Dim Anio As Integer = FechaFRef.Year
|
||||
Dim Mes As Integer = e.Row.DBCampo("Mes").ToEntero()
|
||||
Dim lastDayOfMonth = DateTime.DaysInMonth(Anio, Mes)
|
||||
Dim lastDayOfMonth As Integer = DateTime.DaysInMonth(Anio, Mes)
|
||||
|
||||
Dim Dia As Integer = FechaFRef.Day
|
||||
|
||||
@@ -423,7 +423,7 @@ Partial Class Ventas_RepVentas
|
||||
FechaInicial = New DateTime(Anio, Mes, 1).ToString("dd/MM/yyyy")
|
||||
End If
|
||||
|
||||
Dim FechaFinalRef = New DateTime(Anio, Mes, Dia)
|
||||
Dim FechaFinalRef As New DateTime(Anio, Mes, Dia)
|
||||
|
||||
'ASIGNAR LA FECHA FINAL DEL GRUPO, SI ES MENOR A LA FECHA DEL FILTRO
|
||||
If FechaF <> "-1" Then
|
||||
@@ -435,9 +435,6 @@ Partial Class Ventas_RepVentas
|
||||
Else
|
||||
FechaFinal = FechaFinalRef.ToString("dd/MM/yyyy")
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Case 3 ' AÑO/MES
|
||||
@@ -445,13 +442,13 @@ Partial Class Ventas_RepVentas
|
||||
Dim FechaFRef As DateTime = FechaF.ToDateTime()
|
||||
|
||||
Dim separator As Char = "/".ToCharArray().FirstOrDefault()
|
||||
Dim AnioMes = e.Row.DBCampo("AnioMes").Split(separator)
|
||||
Dim AnioMes As String() = e.Row.DBCampo("AnioMes").Split(separator)
|
||||
|
||||
Dim Anio As Integer = AnioMes(0).ToEntero()
|
||||
Dim Mes As Integer = AnioMes(1).ToEntero()
|
||||
|
||||
If Anio > 0 AndAlso Mes > 0 Then
|
||||
Dim lastDayOfMonth = DateTime.DaysInMonth(Anio, Mes)
|
||||
Dim lastDayOfMonth As Integer = DateTime.DaysInMonth(Anio, Mes)
|
||||
|
||||
Dim DiaFinal As Integer = FechaFRef.Day
|
||||
|
||||
@@ -469,8 +466,7 @@ Partial Class Ventas_RepVentas
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim FechaFinalRef = New DateTime(Anio, Mes, DiaFinal)
|
||||
|
||||
Dim FechaFinalRef As New DateTime(Anio, Mes, DiaFinal)
|
||||
'ASIGNAR LA FECHA FINAL DEL GRUPO, SI ES MENOR A LA FECHA DEL FILTRO
|
||||
If FechaF <> "-1" Then
|
||||
If FechaFRef < FechaFinalRef Then
|
||||
@@ -504,7 +500,6 @@ Partial Class Ventas_RepVentas
|
||||
e.Row.Attributes.Add("style", "background:#CCCCCC !important")
|
||||
End If
|
||||
|
||||
|
||||
If DdlGrupo.SelectedValue.ToEntero = 21 Then
|
||||
If e.Row.DBCampo("GPO").Contains("Total") Then
|
||||
e.Row.CssClass = "Totales"
|
||||
@@ -517,8 +512,6 @@ Partial Class Ventas_RepVentas
|
||||
e.Row.Cells(6).BackColor = Drawing.Color.Transparent
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
@@ -818,9 +811,8 @@ Partial Class Ventas_RepVentas
|
||||
If DdlClienteClasificacion.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Clasificación Cliente</b>: {0}", DdlClienteClasificacion.SelectedItem.Text)
|
||||
If DdlCondicionesPago.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Condiciones Pago</b>: {0}", DdlCondicionesPago.SelectedItem.Text)
|
||||
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
Dim dt As DataTable = DtVentas '.FiltraParametros("", "Orden") '.FiltraParametros("Total > 0", DistinctColumns:={"GPO", "Cantidad", "SubTotal", "Descuento", "Amortizacion", "IVA", "Total"})
|
||||
Dim FechaI, FechaF As String
|
||||
FechaI = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", "-1", txtFechaI.Text)
|
||||
@@ -964,7 +956,7 @@ Partial Class Ventas_RepVentas
|
||||
End Sub
|
||||
|
||||
Private Sub CalcularIntervaloRepHP()
|
||||
Dim PrevMondayDate = DateTime.Today.AddDays(-Weekday(Today.AddDays(-1), Microsoft.VisualBasic.FirstDayOfWeek.Monday))
|
||||
Dim PrevMondayDate As Date = DateTime.Today.AddDays(-Weekday(Today.AddDays(-1), Microsoft.VisualBasic.FirstDayOfWeek.Monday))
|
||||
Dim Sunday As DateTime = PrevMondayDate.AddDays(6)
|
||||
|
||||
txtFechaIHP.Text = PrevMondayDate.ToString("dd/MM/yyyy")
|
||||
|
||||
@@ -446,16 +446,14 @@
|
||||
:</b></td>
|
||||
<td align="left">
|
||||
<div class="row align-items-start">
|
||||
<div class="col-md-10">
|
||||
<asp:DropDownList ID="DdlSucursalCliente" runat="server" AutoPostBack="true" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="SucursalCliente" DataValueField="CveClienteSucursal">
|
||||
<div class="col-md-12">
|
||||
<asp:DropDownList ID="DdlSucursalCliente" runat="server" Width="100%" AutoPostBack="true" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="SucursalCliente" DataValueField="CveClienteSucursal">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2" style="padding: inherit;">
|
||||
<asp:LinkButton ID="LnkAgregarSucursal" Visible="false" runat="server" CssClass="btn btn-primary btn-circle btn-xs" Text="<i class='fa fa-plus' aria-hidden='true'></i>" OnClick="LnkAgregarSucursal_Click"></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td align="left">
|
||||
<asp:LinkButton ID="LnkAgregarSucursal" Visible="false" runat="server" CssClass="btn btn-primary btn-circle btn-xs" Text="<i class='fa fa-plus' aria-hidden='true'></i>" OnClick="LnkAgregarSucursal_Click"></asp:LinkButton>
|
||||
<b>
|
||||
<asp:Label ID="LtlTitleRFCSucursal" runat="server" Text=""></asp:Label></b>
|
||||
</td>
|
||||
@@ -584,16 +582,16 @@
|
||||
</tr>
|
||||
|
||||
<tr runat="server" id="TrVentasMedicas2" visible="false">
|
||||
<td runat="server" id="TdRequiereTecnico1" visible="false">
|
||||
<td runat="server" id="TdRequiereTecnico1" visible="true">
|
||||
<b>Requiere Técnico:</b>
|
||||
</td>
|
||||
<td runat="server" id="TdRequiereTecnico2" visible="false">
|
||||
<td runat="server" id="TdRequiereTecnico2" visible="true">
|
||||
<asp:CheckBox ID="ChkRequiereTecnico" runat="server" CssClass="chksino" OnCheckedChanged="ChkRequiereTecnico_CheckedChanged" AutoPostBack="true" Text="Requiere Técnico:" />
|
||||
</td>
|
||||
<td runat="server" id="TdFechaOS1" visible="false">
|
||||
<td runat="server" id="TdFechaOS1" visible="true">
|
||||
<b>Fecha de Cirugia:</b>
|
||||
</td>
|
||||
<td runat="server" id="TdFechaOS2" visible="false">
|
||||
<td runat="server" id="TdFechaOS2" visible="true">
|
||||
<asp:TextBox ID="TxtFechaOS" type="datetime-local" runat="server" CssClass="make-switchsd" CausesValidation="true" Style="width: 130px" ></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1978,12 +1976,13 @@
|
||||
</div>
|
||||
<div runat="server" id="DVMEEFechaEje" visible="true">
|
||||
<ajax:MaskedEditExtender ID="MEEFechaEje" runat="server" TargetControlID="TxtFechaEjecucion" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<asp:CompareValidator ID="CVFechaEje" runat="server" ControlToValidate="TxtFechaEjecucion" Display="None" ErrorMessage="El campo <b>''Fecha Ejecución''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpEmitirImprimir"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoRFVFechaEje" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaEje" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaEje" TargetControlID="TxtFechaEjecucion" PopupButtonID="ImgCalendarFechaEje" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaEje" runat="server" ControlToValidate="TxtFechaEjecucion" Display="None" ErrorMessage="El campo <b>''Fecha de Ejecución''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpEmitirImprimir"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaEje" runat="server" ControlToValidate="TxtFechaEjecucion" Display="None" ErrorMessage="El campo <b>''Fecha Ejecución''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpEmitirImprimir"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoRFVFechaEje" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaEje" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<ajax:ValidatorCalloutExtender ID="VcoCVFechaEje" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaEje" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</td>
|
||||
@@ -4095,7 +4094,7 @@
|
||||
</tr>
|
||||
|
||||
|
||||
<tr align="left" id="TrObsMedico1" visible="false" runat="server">
|
||||
<%--<tr align="left" id="TrObsMedico1" visible="false" runat="server">
|
||||
<td>Médico: </td>
|
||||
</tr>
|
||||
<tr align="left" id="TrObsMedico2" visible="false" runat="server">
|
||||
@@ -4116,7 +4115,7 @@
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>--%>
|
||||
|
||||
|
||||
</table>
|
||||
@@ -4205,7 +4204,7 @@
|
||||
<asp:Button ID="BtnEditar" runat="server" Text="Editar" CssClass="btn myventasbutton btn-primary" Visible="false" />
|
||||
|
||||
<asp:LinkButton ID="BtnAdjuntar" runat="server" Visible="false" Text="<i class='fa-upload fa' style=' color: white;'></i> Adjuntar" data-toggle="modal" data-target="#ModalAdjuntar" CssClass="btn myventasbutton btn-primary" />
|
||||
<asp:LinkButton ID="BtnArchivoAdjunto" runat="server" Visible="false" Text="" Font-Size="14px" />
|
||||
<br /><asp:LinkButton ID="BtnArchivoAdjunto" runat="server" Visible="false" Text="" Font-Size="14px" />
|
||||
<asp:LinkButton ID="BtnEliminarAdjunto" runat="server" Visible="false" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
|
||||
</td>
|
||||
@@ -8407,13 +8406,13 @@
|
||||
|
||||
<%--Tipo Venta--%>
|
||||
<div class="row" runat="server" visible="True" id="DvModalTipoVentaPasoTipo">
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
<div class="col-md-4" style="text-align: left!important">
|
||||
<div class="col-md-6" style="text-align: left!important">
|
||||
<asp:RadioButtonList ID="RBLTipoVenta" DataTextField="TipoVenta" RepeatDirection="Vertical" DataValueField="CveTipoVenta" runat="server" AutoPostBack="true" OnSelectedIndexChanged="RBLTipoVenta_SelectedIndexChanged" Style="margin-top: 10px!important">
|
||||
</asp:RadioButtonList>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -8491,7 +8490,7 @@
|
||||
<div runat="server" visible="False" id="DvModalTipoVentaPasoRequiereOS">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright ">
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlMedicoModal">Requiere Técnico:</asp:Label>
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="ChkRequiereTecnicoModal">Requiere Técnico:</asp:Label>
|
||||
<asp:CheckBox ID="ChkRequiereTecnicoModal" CssClass="chksino" runat="server" OnCheckedChanged="ChkRequiereTecnicoModal_CheckedChanged" AutoPostBack="true" Text="Requiere Técnico" />
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright " runat="server" id="DvModalRequiereOSFecha" visible="false">
|
||||
|
||||
@@ -2282,6 +2282,53 @@ Partial Class Ventas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#Region "VENTA MEDICA"
|
||||
|
||||
Property EsVentaMedica As Boolean
|
||||
Get
|
||||
If ViewState("EsVentaMedica") Is Nothing Then
|
||||
ViewState("EsVentaMedica") = False
|
||||
End If
|
||||
|
||||
Return Boolean.Parse(ViewState("EsVentaMedica").ToString)
|
||||
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("EsVentaMedica") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Property SeEstaFActurandoVentaMedica As Boolean
|
||||
Get
|
||||
If ViewState("SeEstaFActurandoVentaMedica") Is Nothing Then
|
||||
ViewState("SeEstaFActurandoVentaMedica") = False
|
||||
End If
|
||||
|
||||
Return Boolean.Parse(ViewState("SeEstaFActurandoVentaMedica").ToString)
|
||||
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("SeEstaFActurandoVentaMedica") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property CveTipoVenta As Integer
|
||||
Get
|
||||
If ViewState("CveTipoVenta") Is Nothing Then
|
||||
ViewState("CveTipoVenta") = -1
|
||||
End If
|
||||
Return ViewState("CveTipoVenta").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveTipoVenta") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
|
||||
If Not IsPostBack Then
|
||||
@@ -2678,8 +2725,7 @@ Partial Class Ventas
|
||||
Using ObjVentas As New ClsCGame()
|
||||
|
||||
If ObjVentas.ManifiestoGet(Request("CveManifiesto").ToEntero(), -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa, "-1", "-1") Then
|
||||
'DdlSubProyectoDatos.SelectedValueExist(ObjVentas.DtResultados.Rows(0)("CveSubProyecto").ToString())
|
||||
DdlSubProyectoDatos.SelectedValueExist("12629")
|
||||
DdlSubProyectoDatos.SelectedValueExist(ObjVentas.DtResultados.Rows(0)("CveSubProyecto").ToString())
|
||||
End If
|
||||
|
||||
If ObjVentas.ManifiestoForVtaGet(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, Request("CveManifiesto").ToEntero()) Then
|
||||
@@ -2738,7 +2784,12 @@ Partial Class Ventas
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then BtnCrearApartirDe.Visible = False
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Egs") Then BtnEditar.Visible = True
|
||||
If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem") Then BtnPermisoEditarRemision.Visible = True
|
||||
If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ped") Then BtnPermisoEditarRemision.Visible = True
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "Ped" Then
|
||||
BtnPermisoEditarRemision.Text = "Editar Pedido"
|
||||
BtnEditarRemision.Text = "Actualizar Pedido"
|
||||
End If
|
||||
|
||||
DivFechaAnticipoCliente.Visible = True
|
||||
TxtFechaAnticipoCliente.Text = NowADS().ToShortDateString
|
||||
@@ -3387,19 +3438,27 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If CveVenta <= 0 AndAlso UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
EsVentaMedica = True
|
||||
CargaTiposVenta()
|
||||
|
||||
If CveCliente > 0 Then
|
||||
SeleccionarClienteSucursal(CveCliente:=CveCliente)
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
If CveVenta <= 0 Then
|
||||
EsVentaMedica = True
|
||||
CargaTiposVenta()
|
||||
If CveCliente > 0 Then
|
||||
SeleccionarClienteSucursal(CveCliente:=CveCliente)
|
||||
End If
|
||||
End If
|
||||
If CveVenta >= 0 Then
|
||||
HLFAgregarOS.Visible = True
|
||||
HLFAgregarOS.NavigateUrl = $"/OS/OrdenesServicios.aspx?CveVenta={CveVenta}"
|
||||
End If
|
||||
End If
|
||||
|
||||
If CveVenta >= 0 AndAlso UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
HLFAgregarOS.Visible = True
|
||||
HLFAgregarOS.NavigateUrl = $"/OS/OrdenesServicios.aspx?CveVenta={CveVenta}"
|
||||
TxtPrecio.Enabled = False
|
||||
'ocultar la columna de subproyecto
|
||||
GvPS.Columns(ColumnaSubProyecto).Visible = False
|
||||
ThProyecto.Visible = False
|
||||
ThProyecto2.Visible = False
|
||||
|
||||
TxtCantidad.Text = "1"
|
||||
TxtCantidad.Focus()
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
@@ -3418,10 +3477,6 @@ Partial Class Ventas
|
||||
RegistraScript("$('#TxtCantidad').focus();", "A1")
|
||||
End If
|
||||
|
||||
If EsVentaMedica Then
|
||||
TxtPrecio.Enabled = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -5322,7 +5377,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
If DbRowVenta("CveMedico").ToString.ToEntero > 0 AndAlso DbRowVenta("CveProcedimiento").ToString.ToEntero > 0 Then
|
||||
TxtFechaEjecucion.Text = DbRowVenta("FechaEjecucion").ToString().ToDateTime.ToString("dd/MM/yyyy hh:mm")
|
||||
TxtFechaEjecucion.Text = DbRowVenta("FechaEjecucion").ToString().ToDateTime.ToString("dd/MM/yyyy HH:mm")
|
||||
DVMEEFechaEje.Visible = False
|
||||
Else
|
||||
TxtFechaEjecucion.Text = DbRowVenta("FechaEjecucion").ToString().ToDateTime.ToString("dd/MM/yyyy")
|
||||
@@ -5811,14 +5866,16 @@ Partial Class Ventas
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||
|
||||
If DbRowVenta("CveMedico").ToString.ToEntero > 0 Then
|
||||
TrObsMedico1.Visible = True
|
||||
TrObsMedico2.Visible = True
|
||||
TrObsProcedimiento1.Visible = True
|
||||
TrObsProcedimiento2.Visible = True
|
||||
CveTipoVenta = If(DbRowVenta("CveTipoVenta").ToString.ToEntero > 0, DbRowVenta("CveTipoVenta").ToString.ToEntero, -1)
|
||||
|
||||
DdlMedicoObservaciones.SelectedValueExist(DbRowVenta("CveMedico").ToString)
|
||||
DdlProcedimientoObservaciones.SelectedValueExist(DbRowVenta("CveProcedimiento").ToString)
|
||||
If DbRowVenta("CveMedico").ToString.ToEntero > 0 AndAlso CveTipoVenta.Contiene(1, 3, 5) Then
|
||||
TrVentasMedicas1.Visible = True
|
||||
DdlMedico.SelectedValueExist(DbRowVenta("CveMedico").ToString)
|
||||
DdlProcedimiento.SelectedValueExist(DbRowVenta("CveProcedimiento").ToString)
|
||||
|
||||
|
||||
DdlMedico.Enabled = False
|
||||
DdlProcedimiento.Enabled = False
|
||||
|
||||
End If
|
||||
|
||||
@@ -10120,6 +10177,12 @@ Partial Class Ventas
|
||||
|
||||
If ObjVentas.Embarque_ManifiestoUpvta(ObjFactura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request("CveEmbarqueManifiesto").ToEntero()) Then
|
||||
|
||||
End If
|
||||
End If
|
||||
If Request("CveManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveManifiesto")) AndAlso Request("CveManifiesto").ToEntero() > 0 Then
|
||||
|
||||
If ObjVentas.CGame_ManifiestoUpvta(ObjFactura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request("CveManifiesto").ToEntero()) Then
|
||||
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
@@ -13179,6 +13242,18 @@ Partial Class Ventas
|
||||
Dim DescripcionVenta As String = ""
|
||||
If TxtDescripcionVenta.Text <> "" Then DescripcionVenta = TxtDescripcionVenta.Text
|
||||
|
||||
|
||||
Dim CveMedico As Integer = -1
|
||||
Dim CveProcedimiento As Integer = -1
|
||||
Dim CveTipoVentaGuardar As Integer = -1
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
CveMedico = DdlMedico.SelectedValue.ToEntero
|
||||
CveProcedimiento = DdlProcedimiento.SelectedValue.ToEntero
|
||||
CveTipoVentaGuardar = If(SeEstaFActurandoVentaMedica, CveTipoVenta, RBLTipoVenta.SelectedValue.ToEntero)
|
||||
End If
|
||||
|
||||
|
||||
If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC,
|
||||
factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC,
|
||||
factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, factura.FormaPago, factura.FechaPago, factura.Fecha, factura.MotivoDescuento,
|
||||
@@ -13196,7 +13271,7 @@ Partial Class Ventas
|
||||
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text,
|
||||
FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS, RFCReceptor:=RFCReceptor, Adjunto:=Adjunto, DevolucionImportePagado:=factura.DevolucionImportePagado, EsGarantia:=factura.EsGarantia, ServicioDomicilio:=TrServicioDomicilio.Visible,
|
||||
CveLineaAdicional:=DdlLineaAdicional.SelectedValue.ToEntero(), DescripcionVenta:=DescripcionVenta,
|
||||
CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, RequiereOS:=ChkRequiereTecnico.Checked) Then
|
||||
CveMedico:=CveMedico, CveProcedimiento:=CveProcedimiento, CveTipoVenta:=CveTipoVentaGuardar, RequiereOS:=ChkRequiereTecnico.Checked) Then
|
||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
Else
|
||||
If factura.TipoDocto.Contiene("Dev", "Egs") OrElse DtVentasNC IsNot Nothing OrElse CveEstatusRefacturacion > 0 OrElse CveAnticipoPadre > 0 Then
|
||||
@@ -13306,13 +13381,16 @@ Partial Class Ventas
|
||||
CargaNCDT(factura.CveVentaPadre, DdlTipoComprobante.SelectedValue, factura.Total, NuevaFactura:=NuevaFactura, ObjVentas:=ObjVentas)
|
||||
End If
|
||||
|
||||
Dim EsatusAlmacen As Integer = If(RBLTipoVenta.SelectedValue = "5" AndAlso EsVentaMedica AndAlso DdlTipoComprobante.SelectedValue = "Ped", 1, 0) ', EstatusAlmacen:=EsatusAlmacen
|
||||
'Se agregan los PS
|
||||
For Each Row As DataRow In TmpDTDetalle.Rows
|
||||
If Not ObjVentas.AddVentaDetalle(ObjVentas.CveVenta, Row("CvePS").ToString().ToEntero(), Row("Cantidad").ToString().ToDecimal, Row("CveUM").ToString().ToEntero(),
|
||||
Row("PU").ToString().ToDecimal(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("ImporteIVA").ToString().ToDecimal, Math.Round((Row("Total").ToString().ToDecimal(If(factura.ConvertirPesos, factura.TipoCambio, 1)) * (1 + Row("PorcentajeIVA").ToString().ToDecimal(If(factura.ConvertirPesos, factura.TipoCambio, 1)))), 6),
|
||||
Row("Obs").ToString(), Row("Descuento").ToString().ToDecimal(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().ToDecimal, CveMovimientoDetallePedido:=Row("CveMovimientoDetallePedido").ToString().ToEntero(), ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDecimal, ImporteRetISR:=Row("ImporteRetISR").ToString().ToDecimal,
|
||||
PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDecimal, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDecimal, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDecimal, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero(), CveActivoFijo:=Row("CveActivoFijo").ToString().ToEntero(), NumTurnos:=Row("NumTurnos").ToString().ToDecimal()) Then
|
||||
PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDecimal, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDecimal,
|
||||
PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDecimal, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero(),
|
||||
CveActivoFijo:=Row("CveActivoFijo").ToString().ToEntero(), NumTurnos:=Row("NumTurnos").ToString().ToDecimal(), EstatusAlmacen:=EsatusAlmacen) 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
|
||||
@@ -21691,6 +21769,13 @@ Partial Class Ventas
|
||||
|
||||
ViewState("CveClienteAnterior") = CveCliente
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso CveTipoVenta.Contiene(1, 3, 5) Then
|
||||
TrVentasMedicas1.Visible = True
|
||||
DdlMedico.Enabled = True
|
||||
DdlProcedimiento.Enabled = True
|
||||
End If
|
||||
|
||||
|
||||
Dim CantidadFacturadaRemision As Decimal = 0
|
||||
|
||||
'EN BDH NO DEBE PERMITIR EDITAR EL PU
|
||||
@@ -21753,6 +21838,7 @@ Partial Class Ventas
|
||||
UpPS.Update()
|
||||
UpCliente.Update()
|
||||
UPObservaciones.Update()
|
||||
|
||||
End Sub
|
||||
Private Sub BtnEditarRemision_Click(sender As Object, e As EventArgs) Handles BtnEditarRemision.Click
|
||||
Dim OcurrioError As Boolean = False
|
||||
@@ -21764,7 +21850,7 @@ Partial Class Ventas
|
||||
Dim ObjCGame As New ClsCGame(ObjVentas.IniciaTransacSQL())
|
||||
|
||||
Dim Moneda As Integer = DdlMoneda.SelectedValue.ToEntero()
|
||||
Dim TipoCambio As Double = TxtTipoCambio.Text.ToDouble
|
||||
Dim TipoCambio As Decimal = TxtTipoCambio.Text.ToDecimal
|
||||
EditoRemision = True
|
||||
Try
|
||||
'CONVERTIR REMISION - TIPO MONEDA -DOLARES A PESOS
|
||||
@@ -21840,14 +21926,13 @@ Partial Class Ventas
|
||||
Moneda = 1
|
||||
End If
|
||||
|
||||
'Actualizo los parametros de la venta
|
||||
If Not ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDecimal, LblDescuentos.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtIEPS.Text.ToDecimal, TxtTotal.Text.ToDecimal, Moneda, TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim,
|
||||
UsuarioActual.CveEmpresa, CveVenta, 0, 0,
|
||||
UsuarioActual.CveEmpresa, CveVenta,
|
||||
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
|
||||
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(),
|
||||
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(), TipoDocto:="Rem", CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal,
|
||||
OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, Kilometraje:=TxtKilometraje.Text.ToDouble, CveUsoCFDi:=DdlUsoCFDI.SelectedValue.ToEntero(),
|
||||
CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), ServicioDomicilio:=TrServicioDomicilio.Visible) Then
|
||||
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(), TipoDocto:=DdlTipoComprobante.SelectedValue, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal,
|
||||
OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, Kilometraje:=TxtKilometraje.Text.ToDecimal, CveUsoCFDi:=DdlUsoCFDI.SelectedValue.ToEntero(),
|
||||
CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), ServicioDomicilio:=TrServicioDomicilio.Visible, CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
@@ -30282,7 +30367,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
Dim Moneda As Integer = DdlMoneda.SelectedValue.ToEntero()
|
||||
Dim TipoCambio As Double = TxtTipoCambio.Text.Trim.ToDecimal
|
||||
Dim TipoCambio As Decimal = TxtTipoCambio.Text.Trim.ToDecimal
|
||||
If DdlMoneda.SelectedValue.ToEntero() <> 1 AndAlso ChkConvertirDoctoPesos.Checked Then
|
||||
TipoCambio = 1
|
||||
Moneda = 1
|
||||
@@ -30371,17 +30456,20 @@ Partial Class Ventas
|
||||
|
||||
|
||||
'ACTUALIZA VENTA
|
||||
If Not ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDouble(), LblDescuentos.Text.ToDouble(), TxtIVA.Text.ToDouble(), TxtIEPS.Text.ToDouble(), TxtTotal.Text.ToDouble(),
|
||||
'ACTUALIZA VENTA
|
||||
If Not ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDecimal, LblDescuentos.Text.ToDecimal(), TxtIVA.Text.ToDecimal(), TxtIEPS.Text.ToDecimal(), TxtTotal.Text.ToDecimal(),
|
||||
Moneda, TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim,
|
||||
UsuarioActual.CveEmpresa, CveVenta, 0, 0,
|
||||
UsuarioActual.CveEmpresa, CveVenta,
|
||||
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
|
||||
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(), CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(),
|
||||
CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal,
|
||||
TipoDocto:=DdlTipoComprobante.SelectedValue, Kilometraje:=TxtKilometraje.Text.ToDouble, CveUsoCFDi:=DdlUsoCFDI.SelectedValue.ToEntero(), CveVendedor:=DdlVendedor.SelectedValue.ToEntero()) Then
|
||||
TipoDocto:=DdlTipoComprobante.SelectedValue, Kilometraje:=TxtKilometraje.Text.ToDecimal, CveUsoCFDi:=DdlUsoCFDI.SelectedValue.ToEntero(), CveVendedor:=DdlVendedor.SelectedValue.ToEntero()) Then
|
||||
MensajeError = "Ocurrió un error al actualizar la información de la cotización"
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'ELIMINA DETALLES
|
||||
If Not ObjVentas.RemoveVentasDetalle(CveVenta) Then
|
||||
MensajeError = "Ocurrió un error al actualizar las partidas de la cotización"
|
||||
@@ -32166,6 +32254,8 @@ Partial Class Ventas
|
||||
End Function
|
||||
Private Sub EmitirDocumentoNuevo(TipoDoctoNuevo As String)
|
||||
|
||||
|
||||
|
||||
If DdlVendedor.SelectedValue.ToEntero() <= 0 AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso TipoDoctoNuevo = "Ing" Then
|
||||
Alert("Debe seleccionar un vendedor.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -32199,6 +32289,9 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Rem" AndAlso TipoDoctoNuevo = "Ing" Then
|
||||
SeEstaFActurandoVentaMedica = True
|
||||
End If
|
||||
|
||||
If GvPagos.Rows.Count = 0 And UsuarioActual.Empresa.Funcionalidad(558).ToEntero() = 1 And RBLPago.SelectedValue.ToEntero() = 2 Then
|
||||
Alert("No se puede facturar hasta que se haya especificado detalladamente la forma de pago", TipoMensaje.MsgAdvertencia)
|
||||
@@ -33642,6 +33735,12 @@ Partial Class Ventas
|
||||
DdlUsoCFDI.Enabled = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso CveTipoVenta.Contiene(1, 3, 5) Then
|
||||
TrVentasMedicas1.Visible = True
|
||||
DdlMedico.Enabled = True
|
||||
DdlProcedimiento.Enabled = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(289) Then
|
||||
If LblSeTimbro.Text = "No" Then
|
||||
DdlUsoCFDI.Enabled = False
|
||||
@@ -33660,6 +33759,9 @@ Partial Class Ventas
|
||||
UpPS.Update()
|
||||
End If
|
||||
|
||||
TxtDescripcionVenta.Enabled = True
|
||||
|
||||
UpCliente.Update()
|
||||
UpParametros.Update()
|
||||
UPObservaciones.Update()
|
||||
UpFacturar.Update()
|
||||
@@ -33677,8 +33779,12 @@ Partial Class Ventas
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
ObjVentas.IniciaTransacSQL()
|
||||
|
||||
'DdlMedicoObservaciones.Enabled = True
|
||||
'DdlProcedimientoObservaciones.Enabled = True
|
||||
|
||||
If Not ObjVentas.UpdateObservacionesVenta(Me.CveVenta, UsuarioActual.CveEmpresa, DdlVendedor.SelectedValue.ToEntero(), TxtObsFact.Text, RblPaqueteria.SelectedValue.ToEntero(), TxtCorreoNotificaciones.Text,
|
||||
TxtObsAlmacen.Text, TxtPedidoContrato.Text, TxtOrdenCompra.Text, TxtFechaPago.Text, DdlUsoCFDI.SelectedValue.ToEntero) Then
|
||||
TxtObsAlmacen.Text, TxtPedidoContrato.Text, TxtOrdenCompra.Text, TxtFechaPago.Text, DdlUsoCFDI.SelectedValue.ToEntero, DescripcionVenta:=TxtDescripcionVenta.Text.Trim,
|
||||
CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero) Then
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
@@ -34999,19 +35105,6 @@ Partial Class Ventas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property EsVentaMedica As Boolean
|
||||
Get
|
||||
If ViewState("EsVentaMedica") Is Nothing Then
|
||||
ViewState("EsVentaMedica") = False
|
||||
End If
|
||||
|
||||
Return Boolean.Parse(ViewState("EsVentaMedica").ToString)
|
||||
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("EsVentaMedica") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
@@ -35997,7 +36090,7 @@ Partial Class Ventas
|
||||
|
||||
RBLTipoVenta.DataSource = GlobalDTTipoVenta().FiltraParametros("Estatus = 'True' ")
|
||||
RBLTipoVenta.DataBind()
|
||||
RBLTipoVenta.Items.Add(New ListItem("Otros", "5"))
|
||||
RBLTipoVenta.Items.Add(New ListItem("Otros", "99"))
|
||||
|
||||
TrVentasMedicas1.Visible = True
|
||||
TrVentasMedicas2.Visible = True
|
||||
@@ -36016,8 +36109,7 @@ Partial Class Ventas
|
||||
DdlProcedimientoModal.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlProcedimientoModal.DataBind()
|
||||
|
||||
DdlProcedimientoObservaciones.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa)
|
||||
DdlProcedimientoObservaciones.DataBind()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -36028,8 +36120,7 @@ Partial Class Ventas
|
||||
DdlMedicoModal.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlMedicoModal.DataBind()
|
||||
|
||||
DdlMedicoObservaciones.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa)
|
||||
DdlMedicoObservaciones.DataBind()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -36080,7 +36171,11 @@ Partial Class Ventas
|
||||
End Sub
|
||||
|
||||
Protected Sub ChkRequiereTecnico_CheckedChanged(sender As Object, e As EventArgs)
|
||||
TdFechaOS2.Visible = ChkRequiereTecnicoModal.Checked
|
||||
|
||||
|
||||
TdFechaOS1.Visible = ChkRequiereTecnico.Checked
|
||||
TdFechaOS2.Visible = ChkRequiereTecnico.Checked
|
||||
|
||||
UpCliente.Update()
|
||||
End Sub
|
||||
|
||||
@@ -36107,7 +36202,7 @@ Partial Class Ventas
|
||||
|
||||
|
||||
Select Case RBLTipoVenta.SelectedValue
|
||||
Case "1" ' Fuera de linea
|
||||
Case "1", "5" '1 Fuera de linea || 5 Consignación - Uso material
|
||||
ChkRequiereTecnicoModal.Checked = True
|
||||
ChkRequiereTecnicoModal.Enabled = True
|
||||
DvModalRequiereOSFecha.Visible = True
|
||||
@@ -36121,13 +36216,13 @@ Partial Class Ventas
|
||||
DvModalRequiereOSFecha.Visible = False
|
||||
DvModalTipoVentaPasoMedicoProcedimiento.Visible = False
|
||||
DVGvProductosProcedimiento.Visible = False
|
||||
Case "4" 'Consigna
|
||||
Case "4" 'Consignación
|
||||
ChkRequiereTecnicoModal.Checked = False
|
||||
DvModalTipoVentaPasoRequiereOS.Visible = False
|
||||
DvModalRequiereOSFecha.Visible = False
|
||||
DvModalTipoVentaPasoMedicoProcedimiento.Visible = False
|
||||
DVGvProductosProcedimiento.Visible = False
|
||||
Case "5" ' Otros
|
||||
Case "99" ' Otros
|
||||
LnkDvModalTipoVentaAceptar.Visible = False
|
||||
UpDvModalTipoVenta.Update()
|
||||
RegistraScript("$('#DvModalTipoVenta').modal('hide');")
|
||||
@@ -36230,6 +36325,8 @@ Partial Class Ventas
|
||||
|
||||
Protected Sub LnkDvModalTipoVentaAceptar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
|
||||
If DdlClienteSucursalCliente() > 0 Then
|
||||
ViewState("CveCliente") = DdlClienteSucursalCliente()
|
||||
Else
|
||||
@@ -36259,18 +36356,43 @@ Partial Class Ventas
|
||||
DdlProcedimiento.SelectedValueExist(DdlProcedimientoModal.SelectedValue)
|
||||
|
||||
|
||||
'si es pago directo es factura
|
||||
If RBLTipoVenta.SelectedValue.Contiene("2") Then
|
||||
If RBLTipoVenta.SelectedValue.Contiene("2") Then 'si es pago directo es factura
|
||||
DdlTipoComprobante.SelectedValueExist("Ing")
|
||||
TdRequiereTecnico1.Visible = True
|
||||
TdRequiereTecnico2.Visible = True
|
||||
Else
|
||||
|
||||
TrVentasMedicas1.Visible = True
|
||||
TrVentasMedicas2.Visible = True
|
||||
|
||||
TdFechaOS1.Visible = True
|
||||
TdFechaOS2.Visible = True
|
||||
ChkRequiereTecnico.Checked = True
|
||||
ChkRequiereTecnico.Enabled = False
|
||||
|
||||
ElseIf RBLTipoVenta.SelectedValue.Contiene("3") Then ' A vista
|
||||
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Pedido", "Ped"))
|
||||
DdlTipoComprobante.SelectedValueExist("Ped")
|
||||
TrVentasMedicas1.Visible = False
|
||||
TrVentasMedicas2.Visible = False
|
||||
ChkRequiereTecnico.Enabled = True
|
||||
ElseIf RBLTipoVenta.SelectedValue.Contiene("4") Then ' consignacion
|
||||
DdlTipoComprobante.SelectedValueExist("Ing")
|
||||
TrVentasMedicas1.Visible = False
|
||||
TrVentasMedicas2.Visible = False
|
||||
ChkRequiereTecnico.Enabled = True
|
||||
Else
|
||||
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Pedido", "Ped"))
|
||||
DdlTipoComprobante.SelectedValueExist("Ped")
|
||||
|
||||
TrVentasMedicas1.Visible = True
|
||||
TrVentasMedicas2.Visible = True
|
||||
|
||||
TdFechaOS1.Visible = True
|
||||
TdFechaOS2.Visible = True
|
||||
|
||||
ChkRequiereTecnico.Enabled = True
|
||||
ChkRequiereTecnico.Checked = ChkRequiereTecnicoModal.Checked
|
||||
TdFechaOS1.Visible = ChkRequiereTecnicoModal.Checked
|
||||
TdFechaOS2.Visible = ChkRequiereTecnicoModal.Checked
|
||||
|
||||
|
||||
End If
|
||||
DdlTipoComprobante.Enabled = False
|
||||
|
||||
Reference in New Issue
Block a user