-- option strict on
This commit is contained in:
@@ -390,7 +390,7 @@ Public Class WSApp
|
||||
If Not Retorno.TieneError Then
|
||||
Dim DtInv As DataTable = Nothing
|
||||
Dim ObjInv As New ClsInventarios()
|
||||
ObjInv.GetMovimientos(-1, -1, "-1", UsuarioActual.CveEmpresa)
|
||||
ObjInv.GetMovimientos(-1, -1, -1, UsuarioActual.CveEmpresa)
|
||||
If ObjInv.DtResultados.Rows.Count > 0 Then
|
||||
DtInv = ObjInv.DtResultados.FiltraParametros($"CveVenta = {CveVenta}")
|
||||
ObjInv.Dispose()
|
||||
@@ -578,22 +578,22 @@ Public Class WSApp
|
||||
If ObjFolios.GetFolios("Rem", UsuarioActual.CveEmpresa) Then
|
||||
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format("CveSubProyecto = {0} And Estado = 'Activo'", CveSubProyecto))
|
||||
If DT.Rows.Count > 0 Then
|
||||
ObjFactura.Folio = DT.Rows(0)("FActual").ToString
|
||||
ObjFactura.Folio = DT.Rows(0)("FActual").ToString.ToEntero
|
||||
ObjFactura.Serie = DT.Rows(0)("Serie").ToString
|
||||
End If
|
||||
DT.Dispose()
|
||||
End If
|
||||
ObjFolios.Dispose()
|
||||
|
||||
If Not String.IsNullOrEmpty(ObjFactura.Folio) Then
|
||||
If Not String.IsNullOrEmpty(ObjFactura.Folio.ToString) Then
|
||||
|
||||
Select Case CveMoneda
|
||||
Case 1
|
||||
ObjFactura.TipoCambio = "1"
|
||||
ObjFactura.TipoCambio = 1
|
||||
Case 2
|
||||
ObjFactura.TipoCambio = ClsPaginas.GlobalTipoCambio(Now).ToString
|
||||
ObjFactura.TipoCambio = ClsPaginas.GlobalTipoCambio(Now).ToDecimal
|
||||
Case Else
|
||||
ObjFactura.TipoCambio = ClsPaginas.GlobalTipoCambio(Now).ToString
|
||||
ObjFactura.TipoCambio = ClsPaginas.GlobalTipoCambio(Now).ToDecimal
|
||||
End Select
|
||||
ObjFactura.CveVendedor = -1
|
||||
|
||||
@@ -766,7 +766,7 @@ Public Class WSApp
|
||||
TmpDT.Columns.Add("TotalImporte", GetType(Decimal))
|
||||
TmpDT.Columns.Add("Total", GetType(Decimal))
|
||||
'Para uso del módulo contable
|
||||
TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
|
||||
TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
|
||||
TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean))
|
||||
TmpDT.Columns.Add("CveProyecto", GetType(Integer))
|
||||
TmpDT.Columns.Add("Proyecto", GetType(String))
|
||||
@@ -922,7 +922,7 @@ Public Class WSApp
|
||||
Row("CvePS") = PS.CvePS
|
||||
Row("Obs") = PS.Obs
|
||||
|
||||
TotalCalculableImpuestos = (PS.Cantidad.Value * PS.Precio) - PS.Descuento
|
||||
TotalCalculableImpuestos = (PS.Cantidad * PS.Precio) - PS.Descuento
|
||||
|
||||
Row("PU") = PS.Precio
|
||||
Row("Codigo") = DrPS("Codigo")
|
||||
@@ -955,8 +955,8 @@ Public Class WSApp
|
||||
Row("Descuento") = Math.Round(PS.Descuento, 2)
|
||||
Row("TipoDescuento") = "2"
|
||||
|
||||
Row("Total") = (PS.Cantidad.Value * PS.Precio)
|
||||
Row("TotalImporte") = Math.Round(PS.Cantidad.Value * PS.Precio, 2)
|
||||
Row("Total") = (PS.Cantidad * PS.Precio)
|
||||
Row("TotalImporte") = Math.Round(PS.Cantidad * PS.Precio, 2)
|
||||
|
||||
Row("SATClaveProdServ") = DrPS("SATClavePS")
|
||||
Row("SATClaveUM") = DrPS("SATClaveUnidadMedida")
|
||||
@@ -1088,8 +1088,8 @@ Namespace WebServiceAppModels2
|
||||
Public Property CveUsuario As Integer
|
||||
Public Property Usuario As String
|
||||
Public Property CveEmpresa As Integer
|
||||
Public Property CveCliente As String
|
||||
Public Property CvePrecioLista As String
|
||||
Public Property CveCliente As Integer
|
||||
Public Property CvePrecioLista As Integer
|
||||
Public Property Procesos As List(Of String)
|
||||
Public Property Empresa As String
|
||||
Public Property Cliente As String
|
||||
@@ -1712,11 +1712,11 @@ Namespace WebServiceAppModels2
|
||||
|
||||
Public Class MVentaProductos
|
||||
Public Property CvePS As Integer
|
||||
Public Property Cantidad As Double?
|
||||
Public Property Cantidad As Decimal = 0
|
||||
Public Property Obs As String
|
||||
Public Property PS As String
|
||||
Public Property Precio As Double
|
||||
Public Property Descuento As Double
|
||||
Public Property Precio As Decimal
|
||||
Public Property Descuento As Decimal
|
||||
End Class
|
||||
|
||||
Public Class MMessage
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@ WebService Language="VB" Class="WSSIGApp" %>
|
||||
|
||||
Option Strict Off
|
||||
Option Explicit On
|
||||
|
||||
Imports System.Data
|
||||
@@ -1023,7 +1023,8 @@ Public Class WSSIGApp
|
||||
Dim IdPoliza = -1
|
||||
If RequiereCotizacion Then
|
||||
Dim CveProveedor = -1
|
||||
Dim TotalCot = 0.0, IVACot = 0D, RetIVA = 0.0, RetISR = 0.0, PorIVA = 0.0, Porcentaje = 0.0
|
||||
Dim TotalCot = 0.0, IVACot = 0D, RetIVA = 0.0, RetISR = 0.0
|
||||
Dim PorIVA As Decimal = 0, Porcentaje = 0.0
|
||||
|
||||
|
||||
For Each dr As DataRow In DtDetalle.FiltraParametros("", "CveProveedor").Rows
|
||||
@@ -1034,7 +1035,7 @@ Public Class WSSIGApp
|
||||
CveProveedor = dr("CveProveedor").ToString.ToEntero
|
||||
|
||||
Porcentaje = DtDetalle.SUM("Total", String.Format("CveProveedor = {0}", CveProveedor)) / DtDetalle.SUM("Total")
|
||||
PorIVA = GlobalDTCompProveedores(CveEmpresa).FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)).Rows(0)("IVA").ToString.ToDouble
|
||||
PorIVA = GlobalDTCompProveedores(CveEmpresa).FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)).Rows(0)("IVA").ToString.ToDecimal
|
||||
IVACot = (DtDetalle.SUM("Total", String.Format("CveProveedor = {0}", CveProveedor)) * PorIVA).ToString.ToDecimal
|
||||
RetIVA = DrOC("RetIVA").ToString().ToDecimal * Porcentaje
|
||||
RetISR = DrOC("RetISR").ToString().ToDecimal * Porcentaje
|
||||
@@ -1061,7 +1062,7 @@ Public Class WSSIGApp
|
||||
End If
|
||||
|
||||
'AGREGA DETALLES
|
||||
If Not objOrdenCompra.AddOrdenCompraDetalle(objOrdenCompra.CveOrdenCompra, dr("Cantidad").ToString.ToDouble(), dr("CveUnidadMedida").ToString.ToEntero, dr("CvePS").ToString.ToEntero, dr("Importe").ToString.ToDouble, dr("CveSubProyecto").ToString.ToEntero(), dr("CveActivoFijo").ToString.ToEntero, dr("Observacion").ToString, CveUsuarioActual, CveOrdenCompra, CvePresupuestoEgreso:=dr("CvePresupuestoEgreso").ToString.ToEntero, Descuento:=dr("Descuento").ToString.ToDouble) Then
|
||||
If Not objOrdenCompra.AddOrdenCompraDetalle(objOrdenCompra.CveOrdenCompra, dr("Cantidad").ToString.ToDecimal(), dr("CveUnidadMedida").ToString.ToEntero, dr("CvePS").ToString.ToEntero, dr("Importe").ToString.ToDecimal, dr("CveSubProyecto").ToString.ToEntero(), dr("CveActivoFijo").ToString.ToEntero, dr("Observacion").ToString, CveUsuarioActual, CveOrdenCompra, CvePresupuestoEgreso:=dr("CvePresupuestoEgreso").ToString.ToEntero, Descuento:=dr("Descuento").ToString.ToDecimal) Then
|
||||
HuboError = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -1071,7 +1072,7 @@ Public Class WSSIGApp
|
||||
Dim CveProveedor As Integer = DrOC("CveProveedor").ToString.ToEntero
|
||||
Dim RetIVA = DrOC("RetIVA").ToString().ToDecimal
|
||||
Dim RetISR = DrOC("RetISR").ToString().ToDecimal
|
||||
Dim PorcentajeIVA As Double = DrOC("PorcentajeIVA").ToString().ToDouble
|
||||
Dim PorcentajeIVA As Decimal = DrOC("PorcentajeIVA").ToString().ToDecimal
|
||||
If objOrdenCompra.AddOrdenCompra("OC", -1, Descripcion, Justificacion, Prioridad, Fecha, CveMoneda, CveEstatusInicialOC, FechaEstimadaEntrega, LugarEntrega,
|
||||
CveUsuario, CveEmpresaActual, 0, CveProveedor, CveCliente:=CveCliente, CveVendedor:=CveVendedor, PrioridadObservacion:=PrioridadObservacion,
|
||||
PorcentajeIVA:=PorcentajeIVA, IVA:=IVA, RetIVA:=RetIVA, RetISR:=RetISR, IDPoliza:=IDPolizaPresupuestal, CveCotizacion:=CveCotizacion, FolioAdicional:=FolioAdicional,
|
||||
@@ -1090,7 +1091,7 @@ Public Class WSSIGApp
|
||||
'TERMINA: USA AC
|
||||
If Not HuboError Then
|
||||
For Each dr As DataRow In DtDetalle.Rows
|
||||
If Not objOrdenCompra.AddOrdenCompraDetalle(objOrdenCompra.CveOrdenCompra, dr("Cantidad").ToString.ToDouble(), dr("CveUnidadMedida").ToString.ToEntero, dr("CvePS").ToString.ToEntero, dr("Importe").ToString.ToDouble, dr("CveSubProyecto").ToString.ToEntero(), dr("CveActivoFijo").ToString.ToEntero, dr("Observacion").ToString, CveUsuarioActual, CveOrdenCompra, CvePresupuestoEgreso:=dr("CvePresupuestoEgreso").ToString.ToEntero, Descuento:=dr("Descuento").ToString.ToDouble) Then
|
||||
If Not objOrdenCompra.AddOrdenCompraDetalle(objOrdenCompra.CveOrdenCompra, dr("Cantidad").ToString.ToDecimal(), dr("CveUnidadMedida").ToString.ToEntero, dr("CvePS").ToString.ToEntero, dr("Importe").ToString.ToDecimal, dr("CveSubProyecto").ToString.ToEntero(), dr("CveActivoFijo").ToString.ToEntero, dr("Observacion").ToString, CveUsuarioActual, CveOrdenCompra, CvePresupuestoEgreso:=dr("CvePresupuestoEgreso").ToString.ToEntero, Descuento:=dr("Descuento").ToString.ToDecimal) Then
|
||||
HuboError = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -1780,7 +1781,7 @@ Public Class WSSIGApp
|
||||
ObjEmpresa.Dispose()
|
||||
End Sub
|
||||
<WebMethod>
|
||||
Public Function AddVentas(TipoDocto As String, CveCliente As Integer, CveSubProyecto As Integer, CveUsuario As Integer, SubTotal As Double, IVA As Double, CveMoneda As Integer, Observaciones As String, Productos As String) As String
|
||||
Public Function AddVentas(TipoDocto As String, CveCliente As Integer, CveSubProyecto As Integer, CveUsuario As Integer, SubTotal As Decimal, IVA As Decimal, CveMoneda As Integer, Observaciones As String, Productos As String) As String
|
||||
Dim Retorno = New Modelos.Factura.MMensajeFactura()
|
||||
Try
|
||||
Dim ObjUsuarios As New ClsSisUsuarios()
|
||||
@@ -1820,7 +1821,7 @@ Public Class WSSIGApp
|
||||
Return JsonConvert.SerializeObject(Retorno)
|
||||
End Function
|
||||
#Region "F A C T U R A C I O N"
|
||||
Private Function CreaFactura(TipoDocto As String, SubTotal As Double, IVA As Double, CveCliente As Integer, CveSubProyecto As Integer, CveMoneda As Integer, UsuarioActual As Usuario, ListaPS As List(Of MVentaProductos)) As Modelos.Factura
|
||||
Private Function CreaFactura(TipoDocto As String, SubTotal As Decimal, IVA As Decimal, CveCliente As Integer, CveSubProyecto As Integer, CveMoneda As Integer, UsuarioActual As Usuario, ListaPS As List(Of MVentaProductos)) As Modelos.Factura
|
||||
If CveSubProyecto <= 0 Then
|
||||
'SE ASIGNA EL SUBPROYECTO MATRIZ, EN CASO DE NO ENCONTRARSE SE LE ASIGNA CUALQUIERA
|
||||
Dim Dr As DataRow = Nothing
|
||||
@@ -1846,22 +1847,22 @@ Public Class WSSIGApp
|
||||
If ObjFolios.GetFolios(TipoDocto, UsuarioActual.CveEmpresa) Then
|
||||
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format("CveSubProyecto = {0} And Estado = 'Activo'", CveSubProyecto))
|
||||
If DT.Rows.Count > 0 Then
|
||||
ObjFactura.Folio = DT.Rows(0)("FActual").ToString()
|
||||
ObjFactura.Folio = DT.Rows(0)("FActual").ToString.ToEntero
|
||||
ObjFactura.Serie = DT.Rows(0)("Serie").ToString()
|
||||
End If
|
||||
DT.Dispose()
|
||||
End If
|
||||
ObjFolios.Dispose()
|
||||
|
||||
If Not String.IsNullOrEmpty(ObjFactura.Folio) Then
|
||||
If ObjFactura.Folio > 0 Then
|
||||
|
||||
Select Case CveMoneda
|
||||
Case 1
|
||||
ObjFactura.TipoCambio = "1"
|
||||
ObjFactura.TipoCambio = 1
|
||||
Case 2
|
||||
ObjFactura.TipoCambio = GlobalTipoCambio(Now).ToString
|
||||
ObjFactura.TipoCambio = GlobalTipoCambio(Now).ToDecimal
|
||||
Case Else
|
||||
ObjFactura.TipoCambio = GlobalTipoCambio(Now).ToString
|
||||
ObjFactura.TipoCambio = GlobalTipoCambio(Now).ToDecimal
|
||||
End Select
|
||||
ObjFactura.CveVendedor = -1
|
||||
|
||||
@@ -2011,7 +2012,7 @@ Public Class WSSIGApp
|
||||
TmpDT.Columns.Add("TotalImporte", GetType(Decimal))
|
||||
TmpDT.Columns.Add("Total", GetType(Decimal))
|
||||
'Para uso del módulo contable
|
||||
TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
|
||||
TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
|
||||
TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean))
|
||||
TmpDT.Columns.Add("CveProyecto", GetType(Integer))
|
||||
TmpDT.Columns.Add("Proyecto", GetType(String))
|
||||
@@ -2133,8 +2134,8 @@ Public Class WSSIGApp
|
||||
Row("IVA") = Row("PorcentajeIVA")
|
||||
Row("ImporteIVA") = Math.Round(Row("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestos, 2)
|
||||
|
||||
Row("Total") = (PS.Cantidad * PS.Precio).Value
|
||||
Row("TotalImporte") = Math.Round(PS.Cantidad.Value * PS.Precio, 2)
|
||||
Row("Total") = PS.Cantidad * PS.Precio
|
||||
Row("TotalImporte") = Math.Round(PS.Cantidad * PS.Precio, 2)
|
||||
|
||||
Row("SATClaveProdServ") = DrPS("SATClavePS")
|
||||
Row("SATClaveUM") = DrPS("SATClaveUnidadMedida")
|
||||
@@ -2638,7 +2639,7 @@ Public Class WSSIGApp
|
||||
|
||||
If Not TieneError Then
|
||||
ObjOC.Commit()
|
||||
Retorno = ObjOC.Folio
|
||||
Retorno = ObjOC.Folio.ToString
|
||||
Else
|
||||
ObjOC.RollBack()
|
||||
Retorno = ""
|
||||
@@ -2872,7 +2873,7 @@ Public Class WSSIGApp
|
||||
'Agrega CveCotizacion a la lista
|
||||
|
||||
For Each RowCD As DataRow In ObjOC.DtResultados.Rows
|
||||
If Not ObjOC.AddCotizacionDetalle(ObjOC.CveCotizacion, RowCD("CvePS").ToString.ToEntero, -1, RowCD("Cantidad").ToString.ToDouble, RowCD("CveUnidadMedida").ToString.ToEntero, 0, "-1", "", RowCD("CveOrdenCompraDetalle").ToString.ToEntero) Then TieneError = True : Exit For
|
||||
If Not ObjOC.AddCotizacionDetalle(ObjOC.CveCotizacion, RowCD("CvePS").ToString.ToEntero, -1, RowCD("Cantidad").ToString.ToDecimal, RowCD("CveUnidadMedida").ToString.ToEntero, 0, "-1", "", RowCD("CveOrdenCompraDetalle").ToString.ToEntero) Then TieneError = True : Exit For
|
||||
Next
|
||||
Else
|
||||
TieneError = True
|
||||
@@ -3499,7 +3500,7 @@ Public Class WSSIGApp
|
||||
If Ent.EmpresaCRM.CveEmpresaCRM > 0 Then
|
||||
If Ent.EmpresaCRM.CveEncuestaAplicada > 0 Then
|
||||
For Each Resp In Ent.Respuestas
|
||||
If Not ObjDatosTecnicos.UpdateDatosTecnicosCRM(Resp.CveEncuestaAplicadaDetalle, Ent.EmpresaCRM.CveEncuestaAplicada, Resp.CvePregunta, Resp.CveRespuesta, IfNull(Resp.Valor, "")) Then
|
||||
If Not ObjDatosTecnicos.UpdateDatosTecnicosCRM(Resp.CveEncuestaAplicadaDetalle, Ent.EmpresaCRM.CveEncuestaAplicada, Resp.CvePregunta, Resp.CveRespuesta, IfNull(Resp.Valor, "").ToString) Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -3688,7 +3689,8 @@ Public Class WSSIGApp
|
||||
If item.CveAcercamiento > 0 Then
|
||||
TieneError = Not ObjCRM.UpdateAcercamiento(item.CveAcercamiento, item.CveContactoPrincipal, item.CveTipoProceso, item.CveEtapaProcesoActual, item.CveVendedor, item.CveMedioCaptacion, item.CveProbabilidadAcercamiento, item.NombreAcercamiento, item.Descripcion, item.Importe, item.Comision, item.Prioridad, item.CveUsuarioMod, item.CveRechazoMotivo, item.CveEncuestaAplicadaProceso, item.FechaApertura, item.FechaCierre)
|
||||
Else
|
||||
TieneError = Not ObjCRM.AddAcercamiento(item.CveEmpresaCRM, item.CveContactoPrincipal, item.CveTipoProceso, item.CveEtapaProcesoActual, item.CveVendedor, item.CveMedioCaptacion, item.CveRechazoMotivo, item.CveProbabilidadAcercamiento, item.FechaApertura, item.NombreAcercamiento, item.Descripcion, item.Importe, item.Comision, item.Prioridad, item.CveEmpresa, item.CveUsuarioIng, item.FechaCierre)
|
||||
Dim i As Integer = ObjCRM.AddAcercamiento(item.CveEmpresaCRM, item.CveContactoPrincipal, item.CveTipoProceso, item.CveEtapaProcesoActual, item.CveVendedor, item.CveMedioCaptacion, item.CveRechazoMotivo, item.CveProbabilidadAcercamiento, item.FechaApertura, item.NombreAcercamiento, item.Descripcion, item.Importe, item.Comision, item.Prioridad, item.CveEmpresa, item.CveUsuarioIng, Now)
|
||||
If i <= 0 Then TieneError = True
|
||||
End If
|
||||
If TieneError Then
|
||||
Exit For
|
||||
@@ -4177,7 +4179,7 @@ Public Class WSSIGApp
|
||||
Public Function GetRepAcercamientos(CveEmpresa As Integer, CveVendedor As Integer, FechaInicio As DateTime, FechaFin As DateTime) As String
|
||||
Dim Retorno = "[]"
|
||||
Using ObjCRM As New ClsCRM
|
||||
If ObjCRM.GetAcercamiento(CveEmpresa, CveVendedor:=CveVendedor, FechaInicio:=FechaInicio, FechaFin:="-1") Then
|
||||
If ObjCRM.GetAcercamiento(CveEmpresa, CveVendedor:=CveVendedor, FechaInicio:=FechaInicio.ToShortDateString, FechaFin:="-1") Then
|
||||
Retorno = ObjCRM.DtResultados.DataTableToJSONIPP()
|
||||
End If
|
||||
End Using
|
||||
@@ -4921,11 +4923,11 @@ Namespace WebServiceAppModels
|
||||
Public Property IDTemp As Integer
|
||||
Public Property IDTempVenta As Integer
|
||||
Public Property CvePS As Integer
|
||||
Public Property Cantidad As Double?
|
||||
Public Property Cantidad As Decimal = 0
|
||||
Public Property Obs As String
|
||||
Public Property PS As String
|
||||
Public Property Precio As Double
|
||||
Public Property Descuento As Double
|
||||
Public Property Precio As Decimal
|
||||
Public Property Descuento As Decimal
|
||||
Public Property CveUnidadMedida As Integer
|
||||
End Class
|
||||
Public Class MMessage
|
||||
|
||||
@@ -76,7 +76,7 @@ Public Class WS_PuntoVenta
|
||||
Partial Public Class ClsMetodosPagoWS
|
||||
Public Property CveMetodoPago As Integer
|
||||
Public Property MetodoPago As String
|
||||
Public Property Importe As Double
|
||||
Public Property Importe As Decimal
|
||||
|
||||
Public Sub New()
|
||||
|
||||
@@ -296,15 +296,15 @@ Public Class WS_PuntoVenta
|
||||
Public FolioFact As Integer
|
||||
Public CveCliente As Integer
|
||||
Public CveClienteSucursal As Integer
|
||||
Public SubTotal As Double
|
||||
Public Descuento As Double
|
||||
Public Amortizacion As Double
|
||||
Public IVA As Double
|
||||
Public RetIVA As Double
|
||||
Public RetISR As Double
|
||||
Public Total As Double
|
||||
Public SubTotal As Decimal
|
||||
Public Descuento As Decimal
|
||||
Public Amortizacion As Decimal
|
||||
Public IVA As Decimal
|
||||
Public RetIVA As Decimal
|
||||
Public RetISR As Decimal
|
||||
Public Total As Decimal
|
||||
Public CveMoneda As Integer
|
||||
Public TipoCambio As Double
|
||||
Public TipoCambio As Decimal
|
||||
Public CveMetodoPago As Integer
|
||||
Public CondicionesPago As Integer
|
||||
Public FormaPago As Integer
|
||||
@@ -816,7 +816,7 @@ Public Class WS_PuntoVenta
|
||||
|
||||
Dim Errores As Boolean = False
|
||||
Dim CveVentas As New List(Of ListItem)
|
||||
Dim TotalPagado As Double = 0
|
||||
Dim TotalPagado As Decimal = 0
|
||||
|
||||
|
||||
For Each objVenta As ClsVentaWS In ArregloVentas
|
||||
@@ -947,7 +947,7 @@ Public Class WS_PuntoVenta
|
||||
If CvePrePoliza > 0 Then
|
||||
Dim TipoMovimientoVenta As Boolean = True
|
||||
Dim TipoMovimientoImpuestos As Boolean = False
|
||||
Dim ImporteMov As Double
|
||||
Dim ImporteMov As Decimal
|
||||
|
||||
'Se agregan los movimientos de la Venta
|
||||
'If DT.Rows.Count > 0 Then
|
||||
@@ -987,11 +987,10 @@ Public Class WS_PuntoVenta
|
||||
ErrorMovtosCxC = True
|
||||
End If
|
||||
End If
|
||||
|
||||
'Se agregan el Traslado de IVA
|
||||
ImporteMov = objVenta.IVA
|
||||
If ImporteMov <> 0 Then
|
||||
Dim PorcentajeImpuesto = 0
|
||||
Dim PorcentajeImpuesto As Decimal = 0
|
||||
If objVenta.SubTotal > 0 Then
|
||||
PorcentajeImpuesto = (objVenta.IVA / objVenta.SubTotal)
|
||||
End If
|
||||
@@ -1200,7 +1199,7 @@ Public Class WS_PuntoVenta
|
||||
'End Function
|
||||
|
||||
<WebMethod()>
|
||||
Public Function AddBancosIE(Importe As Double, Moneda As Integer, Fecha As Date, CveUsuario As Integer, CveEmpresa As Integer, Cuenta As Integer, Comprobante As String, Opcion As String) As Boolean
|
||||
Public Function AddBancosIE(Importe As Decimal, Moneda As Integer, Fecha As Date, CveUsuario As Integer, CveEmpresa As Integer, Cuenta As Integer, Comprobante As String, Opcion As String) As Boolean
|
||||
Dim ObjIE As New ClsBancos()
|
||||
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
||||
Dim Folio As Long
|
||||
@@ -1211,7 +1210,7 @@ Public Class WS_PuntoVenta
|
||||
Dim MsgError As String = ""
|
||||
Dim CveConceptoContable As Integer = 4
|
||||
Dim CveConceptoCompra As Integer = 30
|
||||
Dim CIF As Double = 0
|
||||
Dim CIF As Decimal = 0
|
||||
Dim CvePlantillaPoliza As Integer = 4
|
||||
Dim CveTipoPoliza As Integer = 1
|
||||
Dim CvePrePoliza As Integer = 0
|
||||
@@ -1227,15 +1226,14 @@ Public Class WS_PuntoVenta
|
||||
Folio = Banco.GetNextFolio(Cuenta, CveTipoTransaccion)
|
||||
Banco.Dispose()
|
||||
|
||||
CveIE = ObjIE.AddBancos_IE(Cuenta, CveTipoTransaccion, Fecha, Folio, "", Importe, Moneda,
|
||||
CveIE = ObjIE.AddBancos_IE(Cuenta, CveTipoTransaccion, Fecha, Folio.ToString, "", Importe, Moneda,
|
||||
0, Opcion, "", False, False, -1, CvePrePoliza, "pdf", CveUsuario, CveEmpresa)
|
||||
|
||||
|
||||
If CveIE > 0 Then
|
||||
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Importe, Importe, "", CveConceptoContable, " ", CveIE:=CveIE) Then
|
||||
Dim IVA As Double = 0
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Importe - IVA - CIF, Importe - IVA - CIF, "", CveConceptoCompra, " ", CveIE:=CveIE) Then
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Importe, Importe, CveConceptoContable, "", " ", CveIE:=CveIE) Then
|
||||
Dim IVA As Decimal = 0
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Importe - IVA - CIF, Importe - IVA - CIF, CveConceptoCompra, "", " ", CveIE:=CveIE) Then
|
||||
|
||||
Else
|
||||
MsgError = "no se pudo insertar el detalle de la póliza2"
|
||||
@@ -1243,9 +1241,7 @@ Public Class WS_PuntoVenta
|
||||
Else
|
||||
MsgError = "no se pudo insertar el detalle de la póliza"
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
ObjIE.Commit()
|
||||
|
||||
@@ -19,7 +19,7 @@ Public Class WsTSoft
|
||||
Inherits System.Web.Services.WebService
|
||||
|
||||
<WebMethod()>
|
||||
Public Function AddRemision(FolioRemision As String, NoEconomico As String, CveEstatus As Integer, GeoInicial As String, GeoCarga As String, GeoEntrega As String, Fecha As String) As String
|
||||
Public Function AddRemision(FolioRemision As String, NoEconomico As String, CveEstatus As Integer, GeoInicial As String, GeoCarga As String, GeoEntrega As String, Fecha As Date) As String
|
||||
Dim retorno As String = ""
|
||||
Dim Continuar As Boolean = False
|
||||
|
||||
@@ -54,7 +54,7 @@ Public Class WsTSoft
|
||||
End Function
|
||||
|
||||
<WebMethod()>
|
||||
Public Function UpEstatusRemision(FolioRemision As String, CveEstatus As String) As String
|
||||
Public Function UpEstatusRemision(FolioRemision As String, CveEstatus As Integer) As String
|
||||
Dim retorno As String = ""
|
||||
Dim objTsoft As New ClsTSoft
|
||||
Dim Continuar As Boolean = objTsoft.UpEstatusRemision(FolioRemision, CveEstatus)
|
||||
@@ -106,7 +106,7 @@ Public Class WsTSoft
|
||||
OnError("Ocurrió un error al asignar las direcciones", ex)
|
||||
End Try
|
||||
|
||||
Dim RowPosicion As DataRow = DtPosicion.Rows("0")
|
||||
Dim RowPosicion As DataRow = DtPosicion.Rows(0)
|
||||
|
||||
ObjPos.Fecha = RowPosicion("Fecha").ToString().ToDateTime().ToString("dd/MM/yyyy HH:mm:ss")
|
||||
ObjPos.Lat = RowPosicion("Lat").ToString()
|
||||
|
||||
Reference in New Issue
Block a user