-- sms educ médica

This commit is contained in:
2025-03-24 05:44:29 -07:00
parent c8c6b75b26
commit 6a423580fd
3 changed files with 17 additions and 49 deletions

View File

@@ -1451,6 +1451,9 @@ Namespace Modelos
TmpDT.Columns.Add("CveViajePasajero", GetType(Integer)) TmpDT.Columns.Add("CveViajePasajero", GetType(Integer))
TmpDT.Columns("CveViajePasajero").DefaultValue = -1 TmpDT.Columns("CveViajePasajero").DefaultValue = -1
TmpDT.Columns.Add("CantidadConversion", GetType(Decimal))
TmpDT.Columns("CantidadConversion").DefaultValue = 0
Return TmpDT Return TmpDT
End Function End Function
@@ -1460,7 +1463,7 @@ Namespace Modelos
Optional SubProyecto As String = "", Optional PorcentajeIVA As Decimal = -1, Optional SubProyecto As String = "", Optional PorcentajeIVA As Decimal = -1,
Optional CuentaPredial As String = "", Optional CveVentaDetallePadre As Integer = -1, Optional CuentaPredial As String = "", Optional CveVentaDetallePadre As Integer = -1,
Optional CveVentaDetalleRemision As Integer = -1, Optional CveViajePasajero As Integer = -1, Optional RedondearTotal As Boolean = True, Optional CveVentaDetalleRemision As Integer = -1, Optional CveViajePasajero As Integer = -1, Optional RedondearTotal As Boolean = True,
Optional CvePromocionDetalle As Integer = -1) As Boolean Optional CvePromocionDetalle As Integer = -1, Optional CantidadConversion As Decimal = 0) As Boolean
If Not CvePS > 0 Then If Not CvePS > 0 Then
Alert("Ocurrió un error al cargar la información del producto a agregar. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgError) Alert("Ocurrió un error al cargar la información del producto a agregar. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgError)
@@ -1650,6 +1653,7 @@ Namespace Modelos
Row("CuentaPredial") = CuentaPredial Row("CuentaPredial") = CuentaPredial
Row("EsCargo") = 0 Row("EsCargo") = 0
Row("CvePromocionDetalle") = CvePromocionDetalle Row("CvePromocionDetalle") = CvePromocionDetalle
Row("CantidadConversion") = CantidadConversion
If Me.DtDetalle.Columns.Contains("CveMarca") Then If Me.DtDetalle.Columns.Contains("CveMarca") Then
Row("CveMarca") = DrPS("CveMarca") Row("CveMarca") = DrPS("CveMarca")
@@ -2241,7 +2245,7 @@ Namespace Modelos
IEPS:=Row("ImporteIEPS").ToString.ToDecimal, CveMovimientoDetallePedido:=Row("CveMovimientoDetallePedido").ToString.ToEntero, IEPS:=Row("ImporteIEPS").ToString.ToDecimal, CveMovimientoDetallePedido:=Row("CveMovimientoDetallePedido").ToString.ToEntero,
ImporteRetIVA:=Row("ImporteRetIVA").ToString.ToDecimal, ImporteRetISR:=Row("ImporteRetISR").ToString.ToDecimal, ImporteRetIVA:=Row("ImporteRetIVA").ToString.ToDecimal, ImporteRetISR:=Row("ImporteRetISR").ToString.ToDecimal,
PorcentajeIEPS:=Row("PorcentajeIEPS").ToString.ToDecimal, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString.ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString.ToDecimal, CuentaPredial:=Row("CuentaPredial").ToString, PorcentajeIEPS:=Row("PorcentajeIEPS").ToString.ToDecimal, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString.ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString.ToDecimal, CuentaPredial:=Row("CuentaPredial").ToString,
PorcentajeIVA:=Row("PorcentajeIVA").ToString.ToDecimal, CveViajePasajero:=CveViajePasajero) Then PorcentajeIVA:=Row("PorcentajeIVA").ToString.ToDecimal, CveViajePasajero:=CveViajePasajero, CantidadConversion:=Row("CantidadConversion").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

View File

@@ -654,19 +654,7 @@
<td runat="server"> <td runat="server">
<asp:Label runat="server" ID="LblTipoVenta"></asp:Label> <asp:Label runat="server" ID="LblTipoVenta"></asp:Label>
</td> </td>
</tr> </tr>
<tr runat="server" id="TrVentasMedicas5" visible="false">
<td >
<b>Educ. Médica:</b>
</td>
<td runat="server">
<asp:TextBox ID="TxtEducMedica" runat="server" Style="width: 130px" MaxLength="50"></asp:TextBox>
</td>
<td >
</td>
<td runat="server">
</td>
</tr>
</table> </table>
</div> </div>
</div> </div>
@@ -9155,8 +9143,11 @@
<asp:TextBox ID="TxtPrecio" runat="server" Text='<%# Eval("Precio", "{0:#,###.00##}") %>' Style="text-align: right!important" Width="70px" Enabled="false"></asp:TextBox> <asp:TextBox ID="TxtPrecio" runat="server" Text='<%# Eval("Precio", "{0:#,###.00##}") %>' Style="text-align: right!important" Width="70px" Enabled="false"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Ed. Médica" ItemStyle-Width="40px" Visible="false">
<%--<asp:BoundField DataField="Precio" HeaderText="Precio" DataFormatString="{0:#,##0.###}" HtmlEncode="False" />--%> <ItemTemplate>
<asp:TextBox ID="TxtEdMedica" runat="server" Style="text-align: right!important" Width="70px"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
</Columns> </Columns>
</asp:GridView> </asp:GridView>

View File

@@ -14616,7 +14616,6 @@ Partial Class Ventas
CveMedico = DdlMedico.SelectedValue.ToEntero CveMedico = DdlMedico.SelectedValue.ToEntero
CveProcedimiento = DdlProcedimiento.SelectedValue.ToEntero CveProcedimiento = DdlProcedimiento.SelectedValue.ToEntero
CveTipoVentaGuardar = If(SeEstaFActurandoVentaMedica, CveTipoVenta, RBLTipoVenta.SelectedValue.ToEntero) CveTipoVentaGuardar = If(SeEstaFActurandoVentaMedica, CveTipoVenta, RBLTipoVenta.SelectedValue.ToEntero)
factura.Alfa2 = TxtEducMedica.Text.Trim
'CveAlmacenTraspasoDestino 'CveAlmacenTraspasoDestino
End If End If
@@ -19953,11 +19952,6 @@ Partial Class Ventas
HdnPS.Value = PSValidarModal HdnPS.Value = PSValidarModal
End If End If
'If HdnPS.Value = "" Or HdnPS.Value = "-1" Then
' Alert("Es necesario seleccionar el Producto o Servicio a facturar.", TipoMensaje.MsgAdvertencia)
' Return False
'End If
'SI USA CONTABILIDAD LA CLASIFICACION ES OBLIGATORIA 'SI USA CONTABILIDAD LA CLASIFICACION ES OBLIGATORIA
If CveClasificacion <= 0 AndAlso UsuarioActual.Empresa.UsaContabilidad Then If CveClasificacion <= 0 AndAlso UsuarioActual.Empresa.UsaContabilidad Then
Alert("La Clasificación es obligatoria, favor de seleccionarla", TipoMensaje.MsgAdvertencia) Alert("La Clasificación es obligatoria, favor de seleccionarla", TipoMensaje.MsgAdvertencia)
@@ -20112,7 +20106,7 @@ Partial Class Ventas
If ValidaExistencia Then If ValidaExistencia Then
'VALIDA EXISTENCIA 'VALIDA EXISTENCIA
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119, 153, 140, 186, 190, 192, 197, 189}) Then If UsuarioActual.CveEmpresa.Contiene({72, 80, 119, 153, 140, 186, 190, 192, 197, 189, 186}) Then
Dim BuscarEnTabla As Boolean = If(UsuarioActual.Empresa.Funcionalidad(715) = "1", True, False) Dim BuscarEnTabla As Boolean = If(UsuarioActual.Empresa.Funcionalidad(715) = "1", True, False)
Dim Existencia As Decimal = 0D Dim Existencia As Decimal = 0D
@@ -39973,16 +39967,13 @@ Partial Class Ventas
TrVentasMedicas1.Visible = True TrVentasMedicas1.Visible = True
TrVentasMedicas2.Visible = True TrVentasMedicas2.Visible = True
TrVentasMedicas3.Visible = True TrVentasMedicas3.Visible = True
TrVentasMedicas5.Visible = True
For Each item As ListItem In RBLTipoVenta.Items For Each item As ListItem In RBLTipoVenta.Items
item.Text = $"&nbsp {item.Text}" item.Text = $"&nbsp {item.Text}"
Next Next
If Opcion = "Cot" Then If Opcion = "Cot" Then
'TrVentasMedicas2.Visible = False 'TrVentasMedicas2.Visible = False
TrVentasMedicas3.Visible = False TrVentasMedicas3.Visible = False
TrVentasMedicas5.Visible = False
Else Else
RegistraScript("$('#DvModalTipoVenta').modal({ backdrop: 'static', keyboard: false });") RegistraScript("$('#DvModalTipoVenta').modal({ backdrop: 'static', keyboard: false });")
End If End If
@@ -40067,16 +40058,10 @@ Partial Class Ventas
ChkRequiereTecnicoModal.Checked = True ChkRequiereTecnicoModal.Checked = True
ChkRequiereTecnicoModal.Enabled = True ChkRequiereTecnicoModal.Enabled = True
DvModalRequiereOSFecha.Visible = True DvModalRequiereOSFecha.Visible = True
'If CveCliente > 0 Then
' CargaSucursalesModal(CveCliente)
'End If
TxtFechaModal.Text = NowADS.AddHours(1).ToString("yyyy-MM-dd HH").Replace(" ", "T") + ":00" ' ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T") TxtFechaModal.Text = NowADS.AddHours(1).ToString("yyyy-MM-dd HH").Replace(" ", "T") + ":00" ' ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
LnkDvModalTipoVentaAceptar.Visible = True LnkDvModalTipoVentaAceptar.Visible = True
Select Case RBLTipoVenta.SelectedValue Select Case RBLTipoVenta.SelectedValue
Case "1", "5", "6" '1 Fuera de linea || 5 Consignación - Uso material || A-Vista - Material Utilizado Case "1", "5", "6" '1 Fuera de linea || 5 Consignación - Uso material || A-Vista - Material Utilizado
ChkRequiereTecnicoModal.Checked = True ChkRequiereTecnicoModal.Checked = True
@@ -40104,16 +40089,11 @@ Partial Class Ventas
UpDvModalTipoVenta.Update() UpDvModalTipoVenta.Update()
RegistraScript("$('#DvModalTipoVenta').modal('hide');") RegistraScript("$('#DvModalTipoVenta').modal('hide');")
End Select End Select
LblDvModalTipoVentaTitulo.Text = RBLTipoVenta.SelectedItem.Text LblDvModalTipoVentaTitulo.Text = RBLTipoVenta.SelectedItem.Text
End If End If
UpDvModalTipoVenta.Update() UpDvModalTipoVenta.Update()
End Sub End Sub
Protected Sub DdlClienteSucursal_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlClienteSucursal_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim CveClienteSplit As Integer = -1 Dim CveClienteSplit As Integer = -1
CargaPSProcedimiento(DdlProcedimiento.SelectedValue.ToEntero, DdlClienteSucursalCliente, DdlSubProyectoDatos.SelectedValue.ToEntero, CveClienteSucursalL:=DdlClienteSucursalSucursal, CveTipoVentaL:=RBLTipoVenta.SelectedValue.ToEntero) CargaPSProcedimiento(DdlProcedimiento.SelectedValue.ToEntero, DdlClienteSucursalCliente, DdlSubProyectoDatos.SelectedValue.ToEntero, CveClienteSucursalL:=DdlClienteSucursalSucursal, CveTipoVentaL:=RBLTipoVenta.SelectedValue.ToEntero)
@@ -40136,8 +40116,6 @@ Partial Class Ventas
Return If(array(1).ToEntero > 0, array(1).ToEntero, -1) Return If(array(1).ToEntero > 0, array(1).ToEntero, -1)
End If End If
End Function End Function
Private Sub SeleccionarClienteSucursal(CveCliente As Integer) Private Sub SeleccionarClienteSucursal(CveCliente As Integer)
Dim IndexSeleccion As Integer = 0 Dim IndexSeleccion As Integer = 0
@@ -40149,9 +40127,7 @@ Partial Class Ventas
End If End If
IndexSeleccion = IndexSeleccion + 1 IndexSeleccion = IndexSeleccion + 1
Next Next
End Sub End Sub
Protected Sub ModalValidaMedicoProcedimiento() Protected Sub ModalValidaMedicoProcedimiento()
If DdlMedicoModal.SelectedValue.ToEntero > 0 AndAlso DdlProcedimientoModal.SelectedValue.ToEntero > 0 Then If DdlMedicoModal.SelectedValue.ToEntero > 0 AndAlso DdlProcedimientoModal.SelectedValue.ToEntero > 0 Then
@@ -40159,11 +40135,8 @@ Partial Class Ventas
Else Else
LnkDvModalTipoVentaAceptar.Visible = False LnkDvModalTipoVentaAceptar.Visible = False
End If End If
UpDvModalTipoVenta.Update() UpDvModalTipoVenta.Update()
End Sub End Sub
Protected Sub LnkDvModalTipoVentaCancelar_Click(sender As Object, e As EventArgs) Protected Sub LnkDvModalTipoVentaCancelar_Click(sender As Object, e As EventArgs)
LnkDvModalTipoVentaAceptar.Visible = False LnkDvModalTipoVentaAceptar.Visible = False
@@ -40185,9 +40158,7 @@ Partial Class Ventas
LblDvModalTipoVentaTitulo.Text = "Tipo de Venta" LblDvModalTipoVentaTitulo.Text = "Tipo de Venta"
UpDvModalTipoVenta.Update() UpDvModalTipoVenta.Update()
End Sub End Sub
Protected Sub LnkDvModalTipoVentaAceptar_Click(sender As Object, e As EventArgs) Protected Sub LnkDvModalTipoVentaAceptar_Click(sender As Object, e As EventArgs)
If RBLTipoVenta.SelectedValue = "2" Then 'pago directo If RBLTipoVenta.SelectedValue = "2" Then 'pago directo
@@ -40289,7 +40260,6 @@ Partial Class Ventas
ChkRequiereTecnico.Checked = ChkRequiereTecnicoModal.Checked ChkRequiereTecnico.Checked = ChkRequiereTecnicoModal.Checked
TdFechaOS1.Visible = ChkRequiereTecnicoModal.Checked TdFechaOS1.Visible = ChkRequiereTecnicoModal.Checked
TdFechaOS2.Visible = ChkRequiereTecnicoModal.Checked TdFechaOS2.Visible = ChkRequiereTecnicoModal.Checked
End If End If
DdlTipoComprobante.Enabled = False DdlTipoComprobante.Enabled = False
@@ -40319,13 +40289,15 @@ Partial Class Ventas
Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero
Dim Clasificacion As String = GvRow.DataKey("Clasificacion").ToString Dim Clasificacion As String = GvRow.DataKey("Clasificacion").ToString
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
Dim EdMedica As Decimal = 0
If RBLTipoVenta.SelectedValue = "2" Then EdMedica = GvRow.FCTextBox("TxtEdMedica").Text.ToDecimal
If Cantidad > 0 Then If Cantidad > 0 Then
If AgregarProductoServicio(Cantidad, CveUnidadMedida, Abreviatura, CveClasificacion, Clasificacion, If AgregarProductoServicio(Cantidad, CveUnidadMedida, Abreviatura, CveClasificacion, Clasificacion,
CvePS, "", TxtObsPS.Text.TrimEnd, PU, 0, CvePS, "", TxtObsPS.Text.TrimEnd, PU, 0,
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:=-1, Serie:=If(DIVCod.Visible, TxtCodigoSerie.Text.Trim, ""), TiempoEntrega:=TxtTiempoEntrega.Text, CuentaPredial:=TxtCuentaPredial.Text.Trim, RegeneraIEPS:=ClienteDesglosaIEPS, CvePromocionDetalle:=-1,
ImporteProntoPago:=0, ObjDescuento:=Nothing, CvePrecioLista:=-1, PrecioLista:="", NumTurnos:=0) Then ImporteProntoPago:=0, ObjDescuento:=Nothing, CvePrecioLista:=-1, PrecioLista:="", NumTurnos:=0, CantidadConversion:=EdMedica) Then
CountPsAgregados = CountPsAgregados + 1 CountPsAgregados = CountPsAgregados + 1
Else Else
Exit For Exit For
@@ -40391,6 +40363,7 @@ Partial Class Ventas
GvPSProced.DataBind() GvPSProced.DataBind()
DVGvPSProced.Visible = True DVGvPSProced.Visible = True
GvPSProced.Columns(4).Visible = RBLTipoVenta.SelectedValue = "2" ' comisión Ed. Médica, solo cuando es pago directo
For Each GvRow As GridViewRow In GvPSProced.Rows For Each GvRow As GridViewRow In GvPSProced.Rows
If RBLTipoVenta.SelectedValue = "2" Then If RBLTipoVenta.SelectedValue = "2" Then