Compras Vincualcion OC etiqueta ret ISR
This commit is contained in:
@@ -610,7 +610,7 @@ Public Class ClsOS
|
||||
Public Function AddOrdenesServicios(CveCliente As Integer, CveSubProyecto As Integer, PersonaSolicito As String, FechaRecepcion As Date, Descripcion As String, CveUsuarioRecibio As Integer, CveEstatusOrdenServicio As Integer,
|
||||
CveUsuario As Integer, CveEmpresa As Integer, CveCotizacion As Integer, CveVenta As Integer, CveOSPadre As Integer, CveOSTipo As Integer, Optional CveClienteSucursal As Integer = -1,
|
||||
Optional Direccion As String = "-1", Optional Telefono As String = "", Optional CveModeloAuto As Integer = -1, Optional Año As String = "-1", Optional Correo As String = "",
|
||||
Optional Condiciones As String = "", Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1) As Boolean
|
||||
Optional Condiciones As String = "", Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1, Optional FechaCita As DateTime = MinFecha) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OS_OrdenesServiciosAdd")
|
||||
@@ -640,6 +640,7 @@ Public Class ClsOS
|
||||
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||
.Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta
|
||||
.Add("@FechaCita", SqlDbType.DateTime).Value = FechaCita
|
||||
|
||||
.Add("@CveOS", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@vFolio", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
@@ -685,7 +686,7 @@ Public Class ClsOS
|
||||
Public Function UpdateOrdenesServicios(PersonaSolicito As String, FechaRecepcion As String, Descripcion As String, CveUsuarioRecibio As Integer, CveEstatusOrdenServicio As Integer, CveOS As Integer, CveUsuarioModifico As Integer,
|
||||
CveOSTipo As Integer, Optional CveClienteSucursal As Integer = -1, Optional Direccion As String = "-1", Optional Telefono As String = "", Optional CveModeloAuto As Integer = -1,
|
||||
Optional Año As String = "-1", Optional CveSubProyecto As Integer = -1, Optional Correo As String = "-1", Optional Condiciones As String = "",
|
||||
Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1) As Boolean
|
||||
Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1, Optional FechaCita As DateTime = MinFecha) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OS_OrdenesServiciosUpdate")
|
||||
@@ -711,6 +712,7 @@ Public Class ClsOS
|
||||
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||
.Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta
|
||||
.Add("@FechaCita", SqlDbType.DateTime).Value = FechaCita
|
||||
|
||||
End With
|
||||
|
||||
|
||||
@@ -330,7 +330,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
|
||||
|
||||
|
||||
if (UsuarioActual.Empresa.Funcionalidad(590).ToString().ToEntero() == 1)
|
||||
if (UsuarioActual.Empresa.Funcionalidad(578).ToString().ToEntero() == 1)
|
||||
{
|
||||
DVTipoVenta.Visible = true;
|
||||
DVAgenteProcedimiento.Visible = true;
|
||||
|
||||
@@ -312,7 +312,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
DdlPS.SelectedValue = "-1";
|
||||
|
||||
|
||||
if(UsuarioActual.Empresa.Funcionalidad(590).ToString().ToEntero() == 1)
|
||||
if(UsuarioActual.Empresa.Funcionalidad(578).ToString().ToEntero() == 1)
|
||||
{
|
||||
DVAgenteProcedimiento.Visible = true;
|
||||
DVTipoVenta.Visible = true;
|
||||
|
||||
@@ -6312,8 +6312,8 @@
|
||||
if ($get("C_Tab_TabOC_LbRetIVAOC1")) {
|
||||
$get("C_Tab_TabOC_LbRetIVAOC1").innerText = FormatoNumero(SumaRetIVA, 2);
|
||||
}
|
||||
if ($get("C_Tab_TabOC_LbRetISROC1")) {
|
||||
$get("C_Tab_TabOC_LbRetISROC1").innerText = FormatoNumero(SumaRetISR, 2);
|
||||
if ($get("C_Tab_TabOC_LblRetISROC1")) {
|
||||
$get("C_Tab_TabOC_LblRetISROC1").innerText = FormatoNumero(SumaRetISR, 2);
|
||||
}
|
||||
if ($get("C_Tab_TabOC_LbTotalOC1")) {
|
||||
$get("C_Tab_TabOC_LbTotalOC1").innerText = FormatoNumero(SumaTotal, 2);
|
||||
|
||||
@@ -155,8 +155,14 @@
|
||||
<span class="caption-subject bold uppercase">Ordenes Sin Asignar</span>
|
||||
|
||||
<div class="row" id="DivAsignar" runat="server" style="margin-left: 15px;">
|
||||
<asp:DropDownList ID="DdlTecnico" CssClass="form-control input-sm select2me" runat="server" DataTextField="Nombre" Visible="true" DataValueField="CveUsuario"></asp:DropDownList>
|
||||
<asp:Button ID="BtnAsignar" CssClass="btn btn-primary" runat="server" Text="Asignar" ValidationGroup="Asignar" Visible="true" />
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><asp:DropDownList ID="DdlTecnico" CssClass="form-control input-sm select2me" runat="server" DataTextField="Nombre" Visible="true" DataValueField="CveUsuario"></asp:DropDownList></td>
|
||||
<td><asp:Button ID="BtnAsignar" CssClass="btn btn-primary" runat="server" Text="Asignar" ValidationGroup="Asignar" Visible="true" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="actions">
|
||||
@@ -175,7 +181,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<asp:GridView ID="GvNA" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Órdenes de Servicio No Asignadas" DataKeyNames="CveOSDetalle, CveOS,CveUsuarioAtendio,TipoEstatus,EstatusOrdenServicio,CveSubProyecto,Folio"
|
||||
<asp:GridView ID="GvNA" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Órdenes de Servicio No Asignadas"
|
||||
DataKeyNames="CveOSDetalle, CveOS,CveUsuarioAtendio,TipoEstatus,EstatusOrdenServicio,CveSubProyecto,Folio,FechaCita,FechaCitaOS"
|
||||
CssClass="table table-striped table-hover Widthall table-advance" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="">
|
||||
@@ -216,7 +223,6 @@
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlHoraServicio" runat="server" Visible="false" Text='<%# Eval("HoraCita", "{0:t}")%>'> ></asp:Literal>
|
||||
|
||||
<cc1:TimeSelector ID="TimeSelector" runat="server" DisplaySeconds="false" DisplayButtons="false" Visible="false">
|
||||
</cc1:TimeSelector>
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -4,6 +4,7 @@ Option Strict On
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports MKB.TimePicker
|
||||
|
||||
Partial Class OS_Asignaciones
|
||||
Inherits ClsPaginas
|
||||
@@ -453,6 +454,7 @@ Partial Class OS_Asignaciones
|
||||
#Region "GV"
|
||||
Private Sub GvNA_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvNA.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DataKey("CveUsuarioAtendio") <> "" Then
|
||||
e.Row.FCCheckBox("ChbxAsignar").Visible = False
|
||||
e.Row.FCTextBox("FechaOS").Visible = False
|
||||
@@ -471,6 +473,21 @@ Partial Class OS_Asignaciones
|
||||
e.Row.FindControl("TimeSelector").Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
|
||||
Dim FechaCita = e.Row.DataKey("FechaCitaOS").ToDateTime
|
||||
e.Row.FCTextBox("FechaOS").Text = FechaCita.ToString("dd/MM/yyyy")
|
||||
e.Row.FCTextBox("FechaOS").Visible = True
|
||||
|
||||
e.Row.FindControl("TimeSelector").Visible = True
|
||||
|
||||
Dim TMSelector = DirectCast(e.Row.FindControl("TimeSelector"), TimeSelector)
|
||||
TMSelector.Date = FechaCita
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
UpOS.Update()
|
||||
|
||||
@@ -86,10 +86,11 @@
|
||||
<div class="col-md-4">
|
||||
<asp:Label ID="LblCliente" runat="server"></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
|
||||
<div class="col-md-2" runat="server" id="DvFechaRecivido1">
|
||||
<b>Fecha Recibido:</b>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-4" runat="server" id="DvFechaRecivido2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 117px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaRecibido" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
@@ -103,6 +104,14 @@
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator2" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2" runat="server" id="DVFechaCita1" visible="false">
|
||||
<b>Fecha De Cita:</b>
|
||||
</div>
|
||||
<div class="col-md-3" runat="server" id="DVFechaCita2" visible="false">
|
||||
<asp:TextBox ID="TxtFechaCita" type="datetime-local" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 100%" step="1"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
@@ -112,7 +121,7 @@
|
||||
<b>Sucursal del Cliente:</b>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-3" >
|
||||
<asp:DropDownList ID="DdlSucursalCliente" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="SucursalCliente" DataValueField="CveClienteSucursal" Width="100%">
|
||||
<asp:ListItem Selected="true" Text="Matriz" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
@@ -130,7 +139,7 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<asp:Label ID="LblSubProyecto" runat="server">Sub Proyecto</asp:Label>:
|
||||
<b><asp:Label ID="LblSubProyecto" runat="server">Sub Proyecto</asp:Label>:</b>
|
||||
</div>
|
||||
<div class="col-md-3" style="margin-top: 5px;text-align:left">
|
||||
<asp:DropDownList ID="DdlSubProyecto" AppendDataBoundItems="true" AutoPostBack="true" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="100%" Height="30px">
|
||||
@@ -203,10 +212,10 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row" id="DVAgenteProcedimiento" runat="server" visible="false">
|
||||
<div class="row" id="DVAMedicoProcedimiento" runat="server" visible="false">
|
||||
|
||||
<div class="col-md-2" style="margin-top: 5px">
|
||||
<b>Agente:</b>
|
||||
<b>Medico:</b>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4" style="margin-top: 5px; text-align: left">
|
||||
|
||||
@@ -418,10 +418,17 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(590).ToEntero = 1 Then
|
||||
DVAgenteProcedimiento.Visible = True
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
DVAMedicoProcedimiento.Visible = True
|
||||
DVTipoVenta.Visible = True
|
||||
DVTipoVenta.Visible = True
|
||||
|
||||
DvFechaRecivido1.Visible = False
|
||||
DvFechaRecivido2.Visible = False
|
||||
|
||||
DVFechaCita1.Visible = True
|
||||
DVFechaCita2.Visible = True
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -591,6 +598,7 @@ Partial Class OS_OrdenesServicios
|
||||
CveOsDetalle = ObjOS.CveOSDetalle
|
||||
|
||||
TxtFechaRecibido.Text = ObjOS.FechaRecepcion.ToString("dd/MM/yyyy")
|
||||
TxtFechaCita.Text = ObjOS.FechaCita.ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
|
||||
CveFolio = ObjOS.Folio
|
||||
LblFolio.Text = ObjOS.Folio.ToString
|
||||
|
||||
@@ -1198,6 +1206,19 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
#Region "M E T O D O S"
|
||||
Protected Sub Guardar(Entregar As Boolean)
|
||||
|
||||
Dim FechaCita As DateTime = MinFecha
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
If Not IsDate(TxtFechaCita.Text.Replace(",", "")) Then
|
||||
Alert("El campo Fecha De Cita no es valido.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
FechaCita = TxtFechaCita.Text.Replace(",", "").ToDateTime
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim ObjOrdenServicio As New ClsOS()
|
||||
Dim ObjGenerales As New ClsGenerales(ObjOrdenServicio.IniciaTransacSQL)
|
||||
MensajeAlert = New StringBuilder
|
||||
@@ -1212,7 +1233,7 @@ Partial Class OS_OrdenesServicios
|
||||
If Not ObjOrdenServicio.AddOrdenesServicios(CveCliente, DdlSubProyecto.SelectedValue.ToEntero, TxtSolicito.Text, TxtFechaRecibido.Text.ToDateTime, TxtDescripcion.Text, UsuarioActual.CveUsuario, EstatusOrdenServicio,
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCotizacion, -1, -1, DdlTipoOrdenOS.SelectedValue.ToEntero, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero,
|
||||
Direccion:=TxtDireccion.Text, Telefono:=TxtTelefono.Text, CveModeloAuto:=DdlModeloAuto.SelectedValue.ToEntero, Año:=TxtAnio.Text, CveMedico:=DdlMedico.SelectedValue.ToEntero,
|
||||
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=DdlTipoVenta.SelectedValue.ToEntero) Then
|
||||
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=DdlTipoVenta.SelectedValue.ToEntero, FechaCita:=FechaCita) Then
|
||||
Errores = True
|
||||
End If
|
||||
CargaCliente(CveCliente)
|
||||
@@ -1308,11 +1329,12 @@ Partial Class OS_OrdenesServicios
|
||||
End If
|
||||
|
||||
Else
|
||||
If CveTecnico = UsuarioActual.CveUsuario Then
|
||||
If CveTecnico = UsuarioActual.CveUsuario Or UpGuardar.Visible Then
|
||||
|
||||
If ObjOrdenServicio.UpdateOrdenesServicios(TxtSolicito.Text, TxtFechaRecibido.Text, TxtDescripcion.Text, UsuarioActual.CveUsuario, DdlEstatusOS.SelectedValue.ToEntero, CveOS, UsuarioActual.CveUsuario,
|
||||
DdlTipoOrdenOS.SelectedValue.ToEntero, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero, Direccion:=TxtDireccion.Text, Telefono:=TxtTelefono.Text,
|
||||
CveModeloAuto:=DdlModeloAuto.SelectedValue.ToEntero, Año:=TxtAnio.Text, CveMedico:=DdlMedico.SelectedValue.ToEntero,
|
||||
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=DdlTipoVenta.SelectedValue.ToEntero) Then
|
||||
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=DdlTipoVenta.SelectedValue.ToEntero, FechaCita:=FechaCita) Then
|
||||
For Each Row As DataRow In TmpDT.Rows
|
||||
If Not Errores Then
|
||||
Dim CvePS As Integer = Row("CvePS").ToString.ToEntero
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<div style="display: table; width: 100%">
|
||||
<asp:UpdatePanel ID="UpCliente" runat="server" UpdateMode="Conditional" class="portlet light xspadding bordered whitoutcol" style="width: 473px;">
|
||||
<asp:UpdatePanel ID="UpCliente" runat="server" UpdateMode="Conditional" class="portlet light xspadding bordered whitoutcol" style="width: 535px;">
|
||||
<ContentTemplate>
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
@@ -233,14 +233,14 @@
|
||||
<div class="portlet-body form-horizontal form-row-sepe formnombottom" style="padding-top: 0px; margin-top: -5px;">
|
||||
<div class="form-body">
|
||||
|
||||
<table border="0" width="463px">
|
||||
<table border="0" width="530px">
|
||||
|
||||
<tr align="left" runat="server" id="trNombreCliente">
|
||||
<td width="95px"><b>Nombre:</b> </td>
|
||||
<td width="200px">
|
||||
<td width="170px">
|
||||
<asp:Label ID="LblCliente" runat="server" Text="Cliente"></asp:Label></td>
|
||||
<td width="95px" runat="server" ><b></b></td>
|
||||
<td width="200px">
|
||||
<td width="170px">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -5991,22 +5991,7 @@ Partial Class VentasMedicas
|
||||
End If
|
||||
End If
|
||||
|
||||
'Try
|
||||
' 'RMF, cuando es pedido, se manda autorización.
|
||||
' If ObjFactura.TipoDocto.Contiene("PA") Then
|
||||
|
||||
' Dim Titulo As String = "Solicitud de autorización" 'usuarios de crédito y cobranza
|
||||
' Dim Msg As String = String.Format("{0} - Folio {1} ", DdlSubProyectoDatos.SelectedItem.Text, TxtFolio.Text)
|
||||
' 'If UsuarioActual.CveEmpresa = 119 Then
|
||||
' ' ClsSisNotificaciones.SendNotificacionERP(1715, Titulo, Msg, 1)
|
||||
' ' ClsSisNotificaciones.SendNotificacionERP(1815, Titulo, Msg, 1)
|
||||
' ' ClsSisNotificaciones.SendNotificacionERP(1830, Titulo, Msg, 1)
|
||||
' 'End If
|
||||
|
||||
' End If
|
||||
'Catch ex As Exception
|
||||
' OnError("Ocurrió un error al mandar las notificaciones de autorización", ex)
|
||||
'End Try
|
||||
|
||||
Try
|
||||
ViewState("CveVenta") = ObjFactura.CveVenta
|
||||
@@ -6516,8 +6501,8 @@ Partial Class VentasMedicas
|
||||
ObjFactura.UsuarioCreo = LblUsuario.Text.Trim
|
||||
ObjFactura.CveCondicionEntrega = --1
|
||||
ObjFactura.CondicionEntrega = "-1"
|
||||
ObjFactura.CondicionesPago = 0 ' 0 - Contado, 1 - Credito, 2 - termianl
|
||||
ObjFactura.FormaPago = 0 'DdlFormaPago.SelectedValue.ToEntero()
|
||||
ObjFactura.CondicionesPago = 2 ' 0 - Contado, 1 - Credito, 2 - termianl
|
||||
ObjFactura.FormaPago = 0
|
||||
|
||||
ObjFactura.AtencionA = ""
|
||||
ObjFactura.FordGSDB = ""
|
||||
@@ -6732,13 +6717,13 @@ Partial Class VentasMedicas
|
||||
End If
|
||||
Next
|
||||
|
||||
ObjFactura.SubTotal = TmpDT.SUM("Total").ToDecimal
|
||||
ObjFactura.Descuento = TmpDT.SUM("Descuento").ToDecimal
|
||||
ObjFactura.SubTotal = TmpDT.SUM("Total")
|
||||
ObjFactura.Descuento = TmpDT.SUM("Descuento")
|
||||
ObjFactura.Amortizacion = Math.Round(LblAmortizacion.Text.Trim.ToDecimal * ObjFactura.TipoCambio, NumeroDecimales)
|
||||
ObjFactura.IVA = TmpDT.SUM("ImporteIVA").ToDecimal
|
||||
ObjFactura.RetIVA = TmpDT.SUM("ImporteRetIVA").ToDecimal
|
||||
ObjFactura.RetISR = TmpDT.SUM("ImporteRetISR").ToDecimal
|
||||
ObjFactura.IEPS = TmpDT.SUM("ImporteIEPS").ToDecimal
|
||||
ObjFactura.IVA = TmpDT.SUM("ImporteIVA")
|
||||
ObjFactura.RetIVA = TmpDT.SUM("ImporteRetIVA")
|
||||
ObjFactura.RetISR = TmpDT.SUM("ImporteRetISR")
|
||||
ObjFactura.IEPS = TmpDT.SUM("ImporteIEPS")
|
||||
ObjFactura.Total = (ObjFactura.SubTotal - ObjFactura.Descuento - ObjFactura.Amortizacion + ObjFactura.IVA + ObjFactura.IEPS - ObjFactura.RetIVA - ObjFactura.RetISR - ImpuestosLocales).ToDecimal
|
||||
|
||||
TipoCambioRemision = ObjFactura.TipoCambio
|
||||
@@ -6767,13 +6752,13 @@ Partial Class VentasMedicas
|
||||
End If
|
||||
Next
|
||||
|
||||
ObjFactura.SubTotal = TmpDT.SUM("Total").ToDecimal
|
||||
ObjFactura.Descuento = TmpDT.SUM("Descuento").ToDecimal
|
||||
ObjFactura.SubTotal = TmpDT.SUM("Total")
|
||||
ObjFactura.Descuento = TmpDT.SUM("Descuento")
|
||||
ObjFactura.Amortizacion = Math.Round(LblAmortizacion.Text.Trim.ToDecimal / ObjFactura.TipoCambioDolares, NumeroDecimales)
|
||||
ObjFactura.IVA = TmpDT.SUM("ImporteIVA").ToDecimal
|
||||
ObjFactura.RetIVA = TmpDT.SUM("ImporteRetIVA").ToDecimal
|
||||
ObjFactura.RetISR = TmpDT.SUM("ImporteRetISR").ToDecimal
|
||||
ObjFactura.IEPS = TmpDT.SUM("ImporteIEPS").ToDecimal
|
||||
ObjFactura.IVA = TmpDT.SUM("ImporteIVA")
|
||||
ObjFactura.RetIVA = TmpDT.SUM("ImporteRetIVA")
|
||||
ObjFactura.RetISR = TmpDT.SUM("ImporteRetISR")
|
||||
ObjFactura.IEPS = TmpDT.SUM("ImporteIEPS")
|
||||
ObjFactura.Total = (ObjFactura.SubTotal - ObjFactura.Descuento - ObjFactura.Amortizacion + ObjFactura.IVA + ObjFactura.IEPS - ObjFactura.RetIVA - ObjFactura.RetISR - ImpuestosLocales).ToDecimal
|
||||
|
||||
TipoCambioRemision = ObjFactura.TipoCambioDolares
|
||||
@@ -8074,11 +8059,11 @@ Partial Class VentasMedicas
|
||||
|
||||
'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().ToDouble, Row("CveUM").ToString().ToEntero(),
|
||||
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(), NumTurnos:=Row("NumTurnos").ToString().ToDecimal()) Then
|
||||
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().ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDouble, 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
|
||||
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
|
||||
@@ -8275,7 +8260,7 @@ Partial Class VentasMedicas
|
||||
If ObjOrdenServicio.AddOrdenesServicios(CveCliente, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.Nombre, TxtFecha.Text.Replace(",", "").ToDateTime, $"Venta: {Serie}-{FolioActual}", UsuarioActual.CveUsuario, EstatusOrdenServicio,
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveOSTipo, CveClienteSucursal:=DdlSubProyectoDatos.SelectedValue.ToEntero,
|
||||
Direccion:="", Telefono:="", CveModeloAuto:=-1, Año:="", CveMedico:=DdlMedico.SelectedValue.ToEntero,
|
||||
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero) Then
|
||||
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, FechaCita:=TxtFecha.Text.Replace(",", "").ToDateTime) Then
|
||||
CveOS = ObjOrdenServicio.CveOS
|
||||
Else
|
||||
errorList.Add("Se presento un error al guardar la orden de servicio.")
|
||||
@@ -13798,7 +13783,7 @@ Partial Class VentasMedicas
|
||||
End If
|
||||
|
||||
If Not PermiteCredito AndAlso TienePagos AndAlso Total > 0 Then
|
||||
Dim TotalPago As Decimal = DtPagos.SUM("Importe").ToDecimal() + AmortizacionNC
|
||||
Dim TotalPago As Decimal = DtPagos.SUM("Importe") + AmortizacionNC
|
||||
|
||||
If TotalPago < Total Then
|
||||
Alert("La suma de los pagos debe ser igual al total de la venta.", TipoMensaje.MsgAdvertencia)
|
||||
@@ -14110,7 +14095,7 @@ Partial Class VentasMedicas
|
||||
RowServicio("PorcentajeRetIVA") = ClienteRetIVA
|
||||
|
||||
Next
|
||||
TxtRetIVA.Text = TmpDT.SUM("ImporteRetIVA").ToDecimal().FormatoNumero(2)
|
||||
TxtRetIVA.Text = TmpDT.SUM("ImporteRetIVA").FormatoNumero(2)
|
||||
Dim PorcentajeRetIVA As Decimal = (TmpDT.MAX("PorcentajeRetIVA").ToDecimal() * 100)
|
||||
LblRetIVA.Text = PorcentajeRetIVA.FormatoNumero(2)
|
||||
If PorcentajeRetIVA > 0 Then
|
||||
|
||||
Reference in New Issue
Block a user