Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -21,6 +21,10 @@
|
||||
<DataField>Codigo</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="NumeroParte">
|
||||
<DataField>NumeroParte</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="PS">
|
||||
<DataField>PS</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
<DataField>Codigo</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="NumeroParte">
|
||||
<DataField>NumeroParte</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="PS">
|
||||
<DataField>PS</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
@@ -754,7 +758,7 @@
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Fields!Codigo.Value</Value>
|
||||
<Value>=Fields!NumeroParte.Value</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
@@ -776,6 +780,7 @@
|
||||
<PaddingTop>=IIf(rownumber(nothing) = 1, "2pt", "0pt")</PaddingTop>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
|
||||
@@ -62,6 +62,9 @@
|
||||
<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>
|
||||
</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>
|
||||
<asp:HyperLink ID="HplDescargaXml" runat="server" Visible="false"><i class="fa fa-ad-excel"></i> Descargar XML SAT</asp:HyperLink>
|
||||
</li>
|
||||
@@ -673,7 +676,7 @@
|
||||
<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."
|
||||
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>
|
||||
<asp:TemplateField HeaderText="" ItemStyle-Font-Size="6pt">
|
||||
<EditItemTemplate>
|
||||
|
||||
@@ -507,10 +507,51 @@ Partial Class Inventarios_EntradasSalidas
|
||||
'ImgFecha.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
If CveMovimiento > 0 And CveConcepto.Contiene(8) And UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
ValidaUsaConsola()
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
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 "
|
||||
Private Function PermiteGuardar() As Boolean
|
||||
Return If(UsuarioActual.TienePermisoProceso(181) Or EsConsumoInterno, True, False)
|
||||
@@ -909,9 +950,12 @@ Partial Class Inventarios_EntradasSalidas
|
||||
HplImprimirResumen.Visible = True
|
||||
HplImprimirResumen.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=Almr&CveMovimiento={0}", CveMovimiento)))
|
||||
|
||||
|
||||
CveCompra = Mov.CveCompra
|
||||
CveConcepto = Mov.CveConcepto
|
||||
|
||||
|
||||
|
||||
If drM("CveEstatusTimbrado").ToString.ToEntero > 0 Then
|
||||
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"))))
|
||||
|
||||
@@ -4,6 +4,7 @@ Option Explicit On
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.IO
|
||||
Imports System.Web.Management
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
@@ -4408,6 +4409,47 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
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 Class
|
||||
|
||||
@@ -65,13 +65,16 @@ Partial Class RepNotasSinAlmacen
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
If Not IsPostBack Then
|
||||
|
||||
CargaCombos()
|
||||
'CargaDatos()
|
||||
CargaPermisos()
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub CargaPermisos()
|
||||
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
||||
Dim TienePermisoDesmarcar As Boolean = UsuarioActual.TienePermisoProceso(278)
|
||||
@@ -88,6 +91,9 @@ Partial Class RepNotasSinAlmacen
|
||||
GvVentas.Columns(8).Visible = True
|
||||
TxtFechaF.Text = NowADS.AddDays(3).ToShortDateString
|
||||
|
||||
GvVentas.Columns(4).Visible = False
|
||||
GvCompras.Columns(4).Visible = False
|
||||
|
||||
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).ItemStyle.Width = Unit.Pixel(120)
|
||||
|
||||
@@ -200,10 +200,15 @@
|
||||
</asp:TemplateField>
|
||||
<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="SubProyecto" HeaderText="SubProyecto" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Concepto" HeaderText="Concepto" 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="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">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaServicio" runat="server" Visible="false" Text='<%# Eval("FechaCita", "{0:d}")%>'> ></asp:Literal>
|
||||
|
||||
@@ -40,16 +40,13 @@ Partial Class OS_Asignaciones
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
GvNA_ConfiguraColumnas()
|
||||
CargaEstatusOS()
|
||||
'CargaUsuarios()
|
||||
CargaClientes()
|
||||
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
|
||||
CargaOrdenesServiciosAsignadasXPersona()
|
||||
@@ -75,6 +72,9 @@ Partial Class OS_Asignaciones
|
||||
End If
|
||||
ObjEstatusPermisos.Dispose()
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
RegistraScript("
|
||||
@@ -90,6 +90,26 @@ Partial Class OS_Asignaciones
|
||||
")
|
||||
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 "
|
||||
Private Sub CargaSubProyecto()
|
||||
DdlSubProyecto.Items.Clear()
|
||||
@@ -184,7 +204,7 @@ Partial Class OS_Asignaciones
|
||||
Dim TecnicosResultado As New DataTable
|
||||
|
||||
If ObjOS.GetSubProyectosEstatusInicial(-1, 3, UsuarioActual.CveEmpresa) Then
|
||||
TecnicosSubProyectos = ObjOS.DtResultados
|
||||
TecnicosSubProyectos = ObjOS.DtResultados.FiltraParametros(" Estatus = 'True' ")
|
||||
End If
|
||||
|
||||
If DtOSSubProyectos IsNot Nothing Then
|
||||
|
||||
@@ -1308,9 +1308,7 @@
|
||||
|
||||
<div class="col-md-4">
|
||||
<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: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>
|
||||
<asp:TextBox ID="TxtFolioRemisionModal" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="20"></asp:TextBox>
|
||||
<label for="<%= TxtFolioRemisionModal.ClientID.ToString()%>">Folio:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -439,8 +439,30 @@ Public Class WS_PuntoVenta
|
||||
|
||||
objProyecto.Dispose()
|
||||
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()>
|
||||
Public Function GetClientes(CveEmpresa As Integer) As RespuestaWS
|
||||
Dim objClientes As New ClsClientes
|
||||
@@ -546,14 +568,15 @@ Public Class WS_PuntoVenta
|
||||
|
||||
#Region "ProductosServicios"
|
||||
<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 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.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
|
||||
Respuesta.Descripcion = "HUBO UN ERROR"
|
||||
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)
|
||||
|
||||
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,
|
||||
objVenta.SubTotal, objVenta.Descuento, objVenta.Amortizacion, objVenta.IVA, objVenta.RetIVA, objVenta.RetISR,
|
||||
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.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.CveVenta = objVentas.CveVenta
|
||||
'Ingresar los detalles
|
||||
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, Vigencia:=Now) Then
|
||||
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
|
||||
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
|
||||
For Each Caracteristica As ClsVentaWS.ClsVentaDetalleCaracteristicaWS In Detalle.Caracteristicas
|
||||
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)
|
||||
' For Each Row As DataRow In DT.Rows
|
||||
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
|
||||
' Next
|
||||
|
||||
'Se agregan los DSV DESCUENTOS
|
||||
ImporteMov = objVenta.Descuento
|
||||
If ImporteMov <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoDSV, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then
|
||||
ErrorMovtosDSV = True
|
||||
End If
|
||||
End If
|
||||
'End If
|
||||
|
||||
'Se agregan las CxC
|
||||
ImporteMov = objVenta.Total - TotalPagado
|
||||
If ImporteMov <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoAfectacion, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then
|
||||
ErrorMovtosCxC = True
|
||||
End If
|
||||
End If
|
||||
|
||||
'Si hubo un pago agregarlo
|
||||
ImporteMov = TotalPagado
|
||||
If ImporteMov <> 0 Then
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, 2, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then
|
||||
ErrorMovtosCxC = True
|
||||
End If
|
||||
End If
|
||||
'Se agregan el Traslado de IVA
|
||||
ImporteMov = objVenta.IVA
|
||||
If ImporteMov <> 0 Then
|
||||
Dim PorcentajeImpuesto As Decimal = 0
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
' FIXME OIC
|
||||
'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
|
||||
'' Next
|
||||
|
||||
''Se agregan los DSV DESCUENTOS
|
||||
'ImporteMov = objVenta.Descuento
|
||||
'If ImporteMov <> 0 Then
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoDSV, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then
|
||||
' ErrorMovtosDSV = True
|
||||
' End If
|
||||
'End If
|
||||
''End If
|
||||
|
||||
''Se agregan las CxC
|
||||
'ImporteMov = objVenta.Total - TotalPagado
|
||||
'If ImporteMov <> 0 Then
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoAfectacion, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then
|
||||
' ErrorMovtosCxC = True
|
||||
' End If
|
||||
'End If
|
||||
|
||||
''Si hubo un pago agregarlo
|
||||
'ImporteMov = TotalPagado
|
||||
'If ImporteMov <> 0 Then
|
||||
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, 2, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then
|
||||
' ErrorMovtosCxC = True
|
||||
' End If
|
||||
'End If
|
||||
''Se agregan el Traslado de IVA
|
||||
'ImporteMov = objVenta.IVA
|
||||
'If ImporteMov <> 0 Then
|
||||
' Dim PorcentajeImpuesto As Decimal = 0
|
||||
' 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
|
||||
Else
|
||||
@@ -1051,6 +1099,37 @@ Public Class WS_PuntoVenta
|
||||
Return CveVentas
|
||||
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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user