This commit is contained in:
AbrahamCastilloV
2024-02-05 15:47:06 -07:00
10 changed files with 275 additions and 69 deletions

View File

@@ -21,6 +21,10 @@
<DataField>Codigo</DataField> <DataField>Codigo</DataField>
<rd:TypeName>System.String</rd:TypeName> <rd:TypeName>System.String</rd:TypeName>
</Field> </Field>
<Field Name="NumeroParte">
<DataField>NumeroParte</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="PS"> <Field Name="PS">
<DataField>PS</DataField> <DataField>PS</DataField>
<rd:TypeName>System.String</rd:TypeName> <rd:TypeName>System.String</rd:TypeName>

View File

@@ -21,6 +21,10 @@
<DataField>Codigo</DataField> <DataField>Codigo</DataField>
<rd:TypeName>System.String</rd:TypeName> <rd:TypeName>System.String</rd:TypeName>
</Field> </Field>
<Field Name="NumeroParte">
<DataField>NumeroParte</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="PS"> <Field Name="PS">
<DataField>PS</DataField> <DataField>PS</DataField>
<rd:TypeName>System.String</rd:TypeName> <rd:TypeName>System.String</rd:TypeName>
@@ -754,7 +758,7 @@
</Style> </Style>
</TextRun> </TextRun>
<TextRun> <TextRun>
<Value>=Fields!Codigo.Value</Value> <Value>=Fields!NumeroParte.Value</Value>
<Style> <Style>
<FontSize>7pt</FontSize> <FontSize>7pt</FontSize>
</Style> </Style>
@@ -776,6 +780,7 @@
<PaddingTop>=IIf(rownumber(nothing) = 1, "2pt", "0pt")</PaddingTop> <PaddingTop>=IIf(rownumber(nothing) = 1, "2pt", "0pt")</PaddingTop>
</Style> </Style>
</Textbox> </Textbox>
<rd:Selected>true</rd:Selected>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
<TablixCell> <TablixCell>

View File

@@ -62,6 +62,9 @@
<li> <li>
<asp:HyperLink ID="HplImprimirResumen" runat="server" Visible="false"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF Resumen</asp:HyperLink> <asp:HyperLink ID="HplImprimirResumen" runat="server" Visible="false"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF Resumen</asp:HyperLink>
</li> </li>
<li>
<asp:HyperLink ID="HplImprimirConsola" runat="server" Visible="false"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF Consola</asp:HyperLink>
</li>
<li> <li>
<asp:HyperLink ID="HplDescargaXml" runat="server" Visible="false"><i class="fa fa-ad-excel"></i> Descargar XML SAT</asp:HyperLink> <asp:HyperLink ID="HplDescargaXml" runat="server" Visible="false"><i class="fa fa-ad-excel"></i> Descargar XML SAT</asp:HyperLink>
</li> </li>
@@ -673,7 +676,7 @@
<asp:HiddenField runat="server" ID="HdnCodAFEdit" Value="-1" ClientIDMode="Static" /> <asp:HiddenField runat="server" ID="HdnCodAFEdit" Value="-1" ClientIDMode="Static" />
<asp:GridView ID="GvM" runat="server" GridLines="none" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" EmptyDataText="Aún no hay registros." <asp:GridView ID="GvM" runat="server" GridLines="none" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" EmptyDataText="Aún no hay registros."
DataKeyNames="No,CveMovimientoDetalle,Cantidad,CvePS,CveUM,PU,Observaciones,CodigoPS,UnidadMedida,CveAF,Serie,Lote,FechaCaducidad,CveSeccionAlmacen" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" > DataKeyNames="No,CveMovimientoDetalle,Cantidad,CvePS,CveUM,PU,Observaciones,CodigoPS,UnidadMedida,CveAF,Serie,Lote,FechaCaducidad,CveSeccionAlmacen,Codigo" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" >
<Columns> <Columns>
<asp:TemplateField HeaderText="" ItemStyle-Font-Size="6pt"> <asp:TemplateField HeaderText="" ItemStyle-Font-Size="6pt">
<EditItemTemplate> <EditItemTemplate>

View File

@@ -507,10 +507,51 @@ Partial Class Inventarios_EntradasSalidas
'ImgFecha.Visible = True 'ImgFecha.Visible = True
End If End If
If CveMovimiento > 0 And CveConcepto.Contiene(8) And UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
ValidaUsaConsola()
End If
End If End If
End Sub End Sub
Property Consola As String
Get
If ViewState("Consola") Is Nothing Then
ViewState("Consola") = ""
End If
Return ViewState("Consola").ToString
End Get
Set(value As String)
ViewState("Consola") = value
End Set
End Property
Private Function ValidaUsaConsola() As Boolean
Dim Respuesta As Boolean = False
For Each gvRow As GridViewRow In GvM.Rows
If gvRow.DataKey("Codigo").Contiene("404Q2", "404Q3", "405Q2", "405Q3", "306Q1", "306Q2") Then
Consola = "ARS600"
Respuesta = True
HplImprimirConsola.Visible = True
Exit For
End If
If gvRow.DataKey("Codigo").Contiene("106Q1A", "106Q2A", "106Q3", "106Q3WT", "106Q4", "106Q4A", "106Q5A", "106Q6A", "106Q7A") Then
Consola = "ARS800"
Respuesta = True
HplImprimirConsola.Visible = True
Exit For
End If
Next
Return Respuesta
End Function
#Region " PERMISOS PAGINAS " #Region " PERMISOS PAGINAS "
Private Function PermiteGuardar() As Boolean Private Function PermiteGuardar() As Boolean
Return If(UsuarioActual.TienePermisoProceso(181) Or EsConsumoInterno, True, False) Return If(UsuarioActual.TienePermisoProceso(181) Or EsConsumoInterno, True, False)
@@ -909,9 +950,12 @@ Partial Class Inventarios_EntradasSalidas
HplImprimirResumen.Visible = True HplImprimirResumen.Visible = True
HplImprimirResumen.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=Almr&CveMovimiento={0}", CveMovimiento))) HplImprimirResumen.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=Almr&CveMovimiento={0}", CveMovimiento)))
CveCompra = Mov.CveCompra CveCompra = Mov.CveCompra
CveConcepto = Mov.CveConcepto CveConcepto = Mov.CveConcepto
If drM("CveEstatusTimbrado").ToString.ToEntero > 0 Then If drM("CveEstatusTimbrado").ToString.ToEntero > 0 Then
HplDescargaXml.Visible = True HplDescargaXml.Visible = True
HplDescargaXml.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimiento, "XML", drM("TimbreSerieFolio"), drM("TimbreTipoDocto")))) HplDescargaXml.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimiento, "XML", drM("TimbreSerieFolio"), drM("TimbreTipoDocto"))))

View File

@@ -4,6 +4,7 @@ Option Explicit On
Imports System.Data Imports System.Data
Imports System.Data.SqlClient Imports System.Data.SqlClient
Imports System.IO Imports System.IO
Imports System.Web.Management
Imports Extensiones Imports Extensiones
Imports Microsoft.Reporting.WebForms Imports Microsoft.Reporting.WebForms
@@ -4408,6 +4409,47 @@ Partial Class Inventarios_EntregaAlmacen
Return Cancelar Return Cancelar
End Function
Property Consola As String
Get
If ViewState("Consola") Is Nothing Then
ViewState("Consola") = ""
End If
Return ViewState("Consola").ToString
End Get
Set(value As String)
ViewState("Consola") = value
End Set
End Property
Private Function UsaConsola() As Boolean
Dim Respuesta As Boolean = False
For Each gvRow As GridViewRow In GvDatos.Rows
If gvRow.FCCheckBox("cbInv").Checked AndAlso gvRow.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then
If gvRow.DataKey("Codigo").Contiene("404Q2", "404Q3", "405Q2", "405Q3", "306Q1", "306Q2") Then
Consola = "ARS600"
Respuesta = True
Exit For
End If
If gvRow.DataKey("Codigo").Contiene("106Q1A", "106Q2A", "106Q3", "106Q3WT", "106Q4", "106Q4A", "106Q5A", "106Q6A", "106Q7A") Then
Consola = "ARS800"
Respuesta = True
Exit For
End If
End If
Next
Return Respuesta
End Function End Function
End Class End Class

View File

@@ -65,13 +65,16 @@ Partial Class RepNotasSinAlmacen
#End Region #End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
CargaCombos() CargaCombos()
'CargaDatos() 'CargaDatos()
CargaPermisos() CargaPermisos()
End If End If
End Sub End Sub
Private Sub CargaPermisos() Private Sub CargaPermisos()
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201) Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
Dim TienePermisoDesmarcar As Boolean = UsuarioActual.TienePermisoProceso(278) Dim TienePermisoDesmarcar As Boolean = UsuarioActual.TienePermisoProceso(278)
@@ -88,6 +91,9 @@ Partial Class RepNotasSinAlmacen
GvVentas.Columns(8).Visible = True GvVentas.Columns(8).Visible = True
TxtFechaF.Text = NowADS.AddDays(3).ToShortDateString TxtFechaF.Text = NowADS.AddDays(3).ToShortDateString
GvVentas.Columns(4).Visible = False
GvCompras.Columns(4).Visible = False
GvVentas.Columns(0).ItemStyle.Width = Unit.Pixel(120) GvVentas.Columns(0).ItemStyle.Width = Unit.Pixel(120)
'CType(GvVentas.Columns(2), Literal).DataFormatString = "{0:dd/MM/yyyy HH:mm}" 'CType(GvVentas.Columns(2), Literal).DataFormatString = "{0:dd/MM/yyyy HH:mm}"
'CType(GvVentas.Columns(2), Literal).ItemStyle.Width = Unit.Pixel(120) 'CType(GvVentas.Columns(2), Literal).ItemStyle.Width = Unit.Pixel(120)

View File

@@ -200,10 +200,15 @@
</asp:TemplateField> </asp:TemplateField>
<asp:HyperLinkField DataTextField="Folio" HeaderText="Folio" ControlStyle-CssClass="Texto" DataNavigateUrlFormatString="/OS/OrdenesServicios.aspx?CveOS={0}" DataNavigateUrlFields="CveOS" /> <asp:HyperLinkField DataTextField="Folio" HeaderText="Folio" ControlStyle-CssClass="Texto" DataNavigateUrlFormatString="/OS/OrdenesServicios.aspx?CveOS={0}" DataNavigateUrlFields="CveOS" />
<asp:BoundField DataField="Nombre" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField DataField="Nombre" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="SubProyecto" HeaderText="SubProyecto" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField DataField="SubProyecto" HeaderText="SubProyecto" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Concepto" HeaderText="Concepto" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField DataField="Concepto" HeaderText="Concepto" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="EstatusOrdenServicio" HeaderText="Estatus" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField DataField="EstatusOrdenServicio" HeaderText="Estatus" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="FechaIng" HeaderText="Fecha Ingreso" DataFormatString="{0:d}" ItemStyle-Width="130px" /> <asp:BoundField DataField="FechaIng" HeaderText="Fecha Ingreso" DataFormatString="{0:d}" ItemStyle-Width="130px" />
<asp:BoundField DataField="Medico" HeaderText="Médico" ItemStyle-HorizontalAlign="Left" Visible="false" />
<asp:BoundField DataField="Procedimiento" HeaderText="Procedimiento" ItemStyle-HorizontalAlign="Left" Visible="false" />
<asp:TemplateField ItemStyle-Width="120px" HeaderText="Fecha Servicio"> <asp:TemplateField ItemStyle-Width="120px" HeaderText="Fecha Servicio">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlFechaServicio" runat="server" Visible="false" Text='<%# Eval("FechaCita", "{0:d}")%>'> ></asp:Literal> <asp:Literal ID="LtlFechaServicio" runat="server" Visible="false" Text='<%# Eval("FechaCita", "{0:d}")%>'> ></asp:Literal>

View File

@@ -40,16 +40,13 @@ Partial Class OS_Asignaciones
#End Region #End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
GvNA_ConfiguraColumnas()
CargaEstatusOS() CargaEstatusOS()
'CargaUsuarios() 'CargaUsuarios()
CargaClientes() CargaClientes()
CargaSubProyecto() CargaSubProyecto()
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
GvNA.Columns(2).HeaderText = "Hospital"
GvNA.Columns(7).HeaderText = "Fecha Cirugía"
GvNA.Columns(8).HeaderText = "Hora Cirugía"
End If
If UsuarioActual.TienePermisoProceso(171) Then If UsuarioActual.TienePermisoProceso(171) Then
CargaOrdenesServiciosAsignadasXPersona() CargaOrdenesServiciosAsignadasXPersona()
@@ -75,6 +72,9 @@ Partial Class OS_Asignaciones
End If End If
ObjEstatusPermisos.Dispose() ObjEstatusPermisos.Dispose()
End If End If
RegistraScript(" RegistraScript("
@@ -90,6 +90,26 @@ Partial Class OS_Asignaciones
") ")
End Sub End Sub
Private Sub GvNA_ConfiguraColumnas()
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
GvNA.Columns(3).Visible = False
GvNA.Columns(4).Visible = False
GvNA.Columns(5).Visible = False
GvNA.Columns(6).Visible = False
GvNA.Columns(7).Visible = True
GvNA.Columns(8).Visible = True
GvNA.Columns(2).HeaderText = "Hospital"
GvNA.Columns(9).HeaderText = "Fecha Cirugía"
GvNA.Columns(10).HeaderText = "Hora Cirugía"
End If
End Sub
#Region "C A R G A S " #Region "C A R G A S "
Private Sub CargaSubProyecto() Private Sub CargaSubProyecto()
DdlSubProyecto.Items.Clear() DdlSubProyecto.Items.Clear()
@@ -184,7 +204,7 @@ Partial Class OS_Asignaciones
Dim TecnicosResultado As New DataTable Dim TecnicosResultado As New DataTable
If ObjOS.GetSubProyectosEstatusInicial(-1, 3, UsuarioActual.CveEmpresa) Then If ObjOS.GetSubProyectosEstatusInicial(-1, 3, UsuarioActual.CveEmpresa) Then
TecnicosSubProyectos = ObjOS.DtResultados TecnicosSubProyectos = ObjOS.DtResultados.FiltraParametros(" Estatus = 'True' ")
End If End If
If DtOSSubProyectos IsNot Nothing Then If DtOSSubProyectos IsNot Nothing Then

View File

@@ -1308,9 +1308,7 @@
<div class="col-md-4"> <div class="col-md-4">
<div class="form-group form-md-line-input input-iconright" runat="server" visible="false" id="DvTxtFolioRemisionModal"> <div class="form-group form-md-line-input input-iconright" runat="server" visible="false" id="DvTxtFolioRemisionModal">
<asp:TextBox ID="TxtFolioRemisionModal" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="20"></asp:TextBox> <asp:TextBox ID="TxtFolioRemisionModal" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="20"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvTxtFolioRemisionModal" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtFolioRemisionModal"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpMaterialUtilizado"></asp:RequiredFieldValidator>
<label for="<%= TxtFolioRemisionModal.ClientID.ToString()%>">Folio:</label> <label for="<%= TxtFolioRemisionModal.ClientID.ToString()%>">Folio:</label>
</div> </div>
</div> </div>

View File

@@ -439,8 +439,30 @@ Public Class WS_PuntoVenta
objProyecto.Dispose() objProyecto.Dispose()
Return Respuesta Return Respuesta
End Function End Function
<WebMethod()>
Public Function GetSucursales(CveEmpresa As Integer) As RespuestaWS
Dim objProyecto As New ClsSubProyectos
Dim Respuesta As New RespuestaWS
If objProyecto.GetSubProyectos(CveEmpresa) Then
Respuesta.Datos = objProyecto.DtResultados
Respuesta.Datos.Columns(2).ColumnName = "CveSucursal"
Respuesta.Datos.Columns(3).ColumnName = "Sucursal"
Respuesta.Datos.TableName = "Resultados"
Respuesta.HuboError = False
Else
Respuesta.Descripcion = "HUBO UN ERROR"
End If
objProyecto.Dispose()
Return Respuesta
End Function
<WebMethod()> <WebMethod()>
Public Function GetClientes(CveEmpresa As Integer) As RespuestaWS Public Function GetClientes(CveEmpresa As Integer) As RespuestaWS
Dim objClientes As New ClsClientes Dim objClientes As New ClsClientes
@@ -546,14 +568,15 @@ Public Class WS_PuntoVenta
#Region "ProductosServicios" #Region "ProductosServicios"
<WebMethod()> <WebMethod()>
Public Function GetProductosServicios(CvePS As Integer, CveClasificacion As Integer, Codigo As String, PS As String, CveEmpresa As Integer, CveSubProyecto As Integer) As RespuestaWS Public Function GetProductosServicios(CvePS As Integer, CveClasificacion As Integer, Codigo As String, PS As String, CveEmpresa As Integer, CveSucursal As Integer) As RespuestaWS
Dim objPS As New ClsProductosServicios Dim objPS As New ClsProductosServicios
Dim Respuesta As New RespuestaWS Dim Respuesta As New RespuestaWS
If objPS.GetPS(CvePS, CveClasificacion, CveEmpresa, Codigo, PS, CveSubProyecto:=CveSubProyecto, pAplicaParaVenta:=1, pEstado:=1) Then If objPS.GetPS(CvePS, CveClasificacion, CveEmpresa, Codigo, PS:=PS, CveSubProyecto:=CveSucursal, pAplicaParaVenta:=1, pEstado:=1) Then
Respuesta.Datos = objPS.DtResultados Respuesta.Datos = objPS.DtResultados
Respuesta.Datos.TableName = "Resultados" Respuesta.Datos.TableName = "Resultados"
Respuesta.HuboError = False Respuesta.HuboError = False
GuardaLog($"CvePS: {CvePS}, CveClasificacion: {CveClasificacion}, CveEmpresa: {CveEmpresa}, Codigo: {Codigo}, PS: {PS}, CveSubProyecto: {CveSucursal}, pAplicaParaVenta: {1}, pEstado: {1}")
Else Else
Respuesta.Descripcion = "HUBO UN ERROR" Respuesta.Descripcion = "HUBO UN ERROR"
End If End If
@@ -847,17 +870,35 @@ Public Class WS_PuntoVenta
CvePrePoliza = ObjConta.AddPrePolizas("Vta", 4, objVenta.Total, objVenta.Total, objVenta.CveMoneda, objVenta.Fecha, "Punto de Venta addVenta", objVenta.CveUsuario, objVenta.CveEmpresa) CvePrePoliza = ObjConta.AddPrePolizas("Vta", 4, objVenta.Total, objVenta.Total, objVenta.CveMoneda, objVenta.Fecha, "Punto de Venta addVenta", objVenta.CveUsuario, objVenta.CveEmpresa)
If objVentas.DtResultados.Rows.Count = 0 Then If objVentas.DtResultados.Rows.Count = 0 Then
If objVenta.CveEmpresa = 1 Then
If objVenta.CveSubProyecto <= 0 Then
objVenta.CveSubProyecto = 10430
End If
If objVenta.FolioFact.ToString.Contiene("", "-1", "0") Then
objVenta.FolioFact = getFolio("Rem", objVenta.CveEmpresa, objVenta.CveSubProyecto).ToEntero
End If
End If
If objVentas.AddVenta(objVenta.TipoDocto, objVenta.FolioFact, objVenta.CveCliente, objVenta.CveClienteSucursal, If objVentas.AddVenta(objVenta.TipoDocto, objVenta.FolioFact, objVenta.CveCliente, objVenta.CveClienteSucursal,
objVenta.SubTotal, objVenta.Descuento, objVenta.Amortizacion, objVenta.IVA, objVenta.RetIVA, objVenta.RetISR, objVenta.SubTotal, objVenta.Descuento, objVenta.Amortizacion, objVenta.IVA, objVenta.RetIVA, objVenta.RetISR,
objVenta.Total, objVenta.CveMoneda, objVenta.TipoCambio, objVenta.CveMetodoPago, objVenta.CondicionesPago, objVenta.Total, objVenta.CveMoneda, objVenta.TipoCambio, objVenta.CveMetodoPago, objVenta.CondicionesPago,
objVenta.FormaPago, ClsPaginas.NowADS(), objVenta.Fecha, objVenta.MotivoDescuento, objVenta.Observaciones, objVenta.FechaEjecucion, objVenta.FormaPago, ClsPaginas.NowADS(), objVenta.Fecha, objVenta.MotivoDescuento, objVenta.Observaciones, If(objVenta.FechaEjecucion < MinFecha, Now, objVenta.FechaEjecucion),
objVenta.CveVendedor, If(objVenta.Alfa1 IsNot Nothing, objVenta.Alfa1, ""), If(objVenta.Alfa2 IsNot Nothing, objVenta.Alfa2, ""), If(objVenta.Alfa3 IsNot Nothing, objVenta.Alfa3, ""), objVenta.Num1, objVenta.CveVendedor, If(objVenta.Alfa1 IsNot Nothing, objVenta.Alfa1, ""), If(objVenta.Alfa2 IsNot Nothing, objVenta.Alfa2, ""), If(objVenta.Alfa3 IsNot Nothing, objVenta.Alfa3, ""), objVenta.Num1,
objVenta.Num2, objVenta.Num3, Fech1, Fech2, Fech3, objVenta.CveCorte, If(objVenta.NumeroPersonas > 255, 255, objVenta.NumeroPersonas), CvePrePoliza, objVenta.CveUsuario, objVenta.CveEmpresa, objVenta.Propina, objVenta.CveVentaTerminal, CveSubProyecto:=objVenta.CveSubProyecto, CveSubProyectoEjecucion:=objVenta.CveSubProyecto) Then objVenta.Num2, objVenta.Num3, Fech1, Fech2, Fech3, objVenta.CveCorte, If(objVenta.NumeroPersonas > 255, 255, objVenta.NumeroPersonas), CvePrePoliza,
objVenta.CveVenta = objVentas.CveVenta objVenta.CveUsuario, objVenta.CveEmpresa, objVenta.Propina, objVenta.CveVentaTerminal, CveSubProyecto:=objVenta.CveSubProyecto, CveSubProyectoEjecucion:=objVenta.CveSubProyecto, Vigencia:=Now) Then
'Ingresar los detalles objVenta.CveVenta = objVentas.CveVenta
'Ingresar los detalles
If objVenta.CveEmpresa = 1 Then
GuardaLog($"objVenta.Detalle {objVenta.Detalle.Count}")
End If
For Each Detalle As ClsVentaWS.ClsVentaDetalleWS In objVenta.Detalle For Each Detalle As ClsVentaWS.ClsVentaDetalleWS In objVenta.Detalle
If objVentas.AddVentaDetalle(objVentas.CveVenta, Detalle.CvePS, Detalle.Cantidad, Detalle.CveUnidadMedida, Detalle.PU, Detalle.IVA, Detalle.Total, Detalle.Observaciones, Detalle.Descuento, Detalle.TipoDescuento, Detalle.CveSubProyecto, -1) Then If objVentas.AddVentaDetalle(objVentas.CveVenta, Detalle.CvePS, Detalle.Cantidad, Detalle.CveUnidadMedida, Detalle.PU, Detalle.IVA, Detalle.Total, Detalle.Observaciones, Detalle.Descuento, Detalle.TipoDescuento, Detalle.CveSubProyecto, -1, IEPS:=0) Then
'Ingresar las caracteristicas del detalle de la venta 'Ingresar las caracteristicas del detalle de la venta
For Each Caracteristica As ClsVentaWS.ClsVentaDetalleCaracteristicaWS In Detalle.Caracteristicas For Each Caracteristica As ClsVentaWS.ClsVentaDetalleCaracteristicaWS In Detalle.Caracteristicas
If objVentas.AddVentaDetalleCaracteristica(objVentas.CveVentaDetalle, Caracteristica.CvePS, Caracteristica.CveOpcion) = False Then If objVentas.AddVentaDetalleCaracteristica(objVentas.CveVentaDetalle, Caracteristica.CvePS, Caracteristica.CveOpcion) = False Then
@@ -954,50 +995,57 @@ Public Class WS_PuntoVenta
'Se agrega movimiento separado por la cuenta de ventas (ER) 'Se agrega movimiento separado por la cuenta de ventas (ER)
' For Each Row As DataRow In DT.Rows ' For Each Row As DataRow In DT.Rows
ImporteMov = objVenta.SubTotal ImporteMov = objVenta.SubTotal
Dim CveClasificacion_04 As Integer = -1
If ImporteMov <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoVenta, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, CveSubProyecto:=objVenta.CveSubProyecto, CveClasificacion:=CveClasificacion_04) Then
ErrorMovtosVentas = True
End If
End If ' FIXME OIC
' Next 'Dim CveClasificacion_04 As Integer = -1
'If ImporteMov <> 0 Then
'Se agregan los DSV DESCUENTOS ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoVenta, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, CveSubProyecto:=objVenta.CveSubProyecto, CveClasificacion:=CveClasificacion_04) Then
ImporteMov = objVenta.Descuento ' ErrorMovtosVentas = True
If ImporteMov <> 0 Then ' End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoDSV, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then 'End If
ErrorMovtosDSV = True '' Next
End If
End If ''Se agregan los DSV DESCUENTOS
'End If 'ImporteMov = objVenta.Descuento
'If ImporteMov <> 0 Then
'Se agregan las CxC ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoDSV, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then
ImporteMov = objVenta.Total - TotalPagado ' ErrorMovtosDSV = True
If ImporteMov <> 0 Then ' End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoAfectacion, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then 'End If
ErrorMovtosCxC = True ''End If
End If
End If ''Se agregan las CxC
'ImporteMov = objVenta.Total - TotalPagado
'Si hubo un pago agregarlo 'If ImporteMov <> 0 Then
ImporteMov = TotalPagado ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoAfectacion, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then
If ImporteMov <> 0 Then ' ErrorMovtosCxC = True
' End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, 2, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then 'End If
ErrorMovtosCxC = True
End If ''Si hubo un pago agregarlo
End If 'ImporteMov = TotalPagado
'Se agregan el Traslado de IVA 'If ImporteMov <> 0 Then
ImporteMov = objVenta.IVA
If ImporteMov <> 0 Then ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, 2, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then
Dim PorcentajeImpuesto As Decimal = 0 ' ErrorMovtosCxC = True
If objVenta.SubTotal > 0 Then ' End If
PorcentajeImpuesto = (objVenta.IVA / objVenta.SubTotal) 'End If
End If ''Se agregan el Traslado de IVA
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoIVA, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, PorcentajeImpuesto:=PorcentajeImpuesto) Then 'ImporteMov = objVenta.IVA
ErrorMovtosTrasladoIVA = True 'If ImporteMov <> 0 Then
End If ' Dim PorcentajeImpuesto As Decimal = 0
End If ' If objVenta.SubTotal > 0 Then
' PorcentajeImpuesto = (objVenta.IVA / objVenta.SubTotal)
' End If
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoIVA, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, PorcentajeImpuesto:=PorcentajeImpuesto) Then
' ErrorMovtosTrasladoIVA = True
' End If
'End If
End If End If
End If End If
Else Else
@@ -1051,6 +1099,37 @@ Public Class WS_PuntoVenta
Return CveVentas Return CveVentas
End Function End Function
Private Function getFolio(TipoDoctoConsulta As String, CveEmpresa As Integer, CvesubProyecto As Integer) As String
Dim Respuesta As String = "-1"
Dim ObjFolios As New ClsGralFolios()
If ObjFolios.GetFolios(TipoDoctoConsulta, CveEmpresa) Then
GuardaLog($" GetFolios ok {ObjFolios.DtResultados.Rows.Count} . CvesubProyecto = {CvesubProyecto} .")
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", CvesubProyecto))
If DT.Rows.Count > 0 Then
Respuesta = DT.Rows(0)("FActual").ToString()
End If
DT.Dispose()
End If
ObjFolios.Dispose()
GuardaLog($" Folio Rem {Respuesta} .")
Return Respuesta
End Function
#End Region #End Region