quitar clssucursales
- concepto 103, ventas
This commit is contained in:
@@ -429,22 +429,22 @@ Public Class WS_PuntoVenta
|
|||||||
Return Respuesta
|
Return Respuesta
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
<WebMethod()>
|
'<WebMethod()>
|
||||||
Public Function GetSucursales(CveEmpresa As Integer) As RespuestaWS
|
'Public Function GetSucursales(CveEmpresa As Integer) As RespuestaWS
|
||||||
Dim objSucursales As New ClsSucursales
|
' Dim objSucursales As New ClsSucursales
|
||||||
Dim Respuesta As New RespuestaWS
|
' Dim Respuesta As New RespuestaWS
|
||||||
|
|
||||||
If objSucursales.GetSucursales() Then
|
' If objSucursales.GetSucursales() Then
|
||||||
Respuesta.Datos = objSucursales.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
|
' Respuesta.Datos = objSucursales.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
|
||||||
Respuesta.Datos.TableName = "Resultados"
|
' Respuesta.Datos.TableName = "Resultados"
|
||||||
Respuesta.HuboError = False
|
' Respuesta.HuboError = False
|
||||||
Else
|
' Else
|
||||||
Respuesta.Descripcion = "HUBO UN ERROR"
|
' Respuesta.Descripcion = "HUBO UN ERROR"
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
objSucursales.Dispose()
|
' objSucursales.Dispose()
|
||||||
Return Respuesta
|
' Return Respuesta
|
||||||
End Function
|
'End Function
|
||||||
|
|
||||||
<WebMethod()>
|
<WebMethod()>
|
||||||
Public Function GetClientes(CveEmpresa As Integer) As RespuestaWS
|
Public Function GetClientes(CveEmpresa As Integer) As RespuestaWS
|
||||||
@@ -1170,7 +1170,7 @@ Public Class WS_PuntoVenta
|
|||||||
'Enviar correo de corte de turno
|
'Enviar correo de corte de turno
|
||||||
EnviarCorreo(VtaCorte.CveCorte, VtaCorte.CveEmpresa)
|
EnviarCorreo(VtaCorte.CveCorte, VtaCorte.CveEmpresa)
|
||||||
|
|
||||||
Dim cuenta As Integer = GetCuenta(2090)
|
' Dim cuenta As Integer = GetCuenta(2090)
|
||||||
Else
|
Else
|
||||||
objPV.RollBack()
|
objPV.RollBack()
|
||||||
End If
|
End If
|
||||||
@@ -1197,16 +1197,16 @@ Public Class WS_PuntoVenta
|
|||||||
Return objVentasPago
|
Return objVentasPago
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
<WebMethod()>
|
'<WebMethod()>
|
||||||
Public Function GetCuenta(CveSucursal As Integer) As Integer
|
'Public Function GetCuenta(CveSucursal As Integer) As Integer
|
||||||
Dim objSU As New ClsSucursales
|
' Dim objSU As New ClsSucursales
|
||||||
Dim Cuenta As Integer
|
' Dim Cuenta As Integer
|
||||||
|
|
||||||
'Cuenta = objSU.GetCuenta(CveSucursal)
|
' 'Cuenta = objSU.GetCuenta(CveSucursal)
|
||||||
objSU.Dispose()
|
' objSU.Dispose()
|
||||||
|
|
||||||
Return Cuenta
|
' Return Cuenta
|
||||||
End Function
|
'End Function
|
||||||
|
|
||||||
<WebMethod()>
|
<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 Double, Moneda As Integer, Fecha As Date, CveUsuario As Integer, CveEmpresa As Integer, Cuenta As Integer, Comprobante As String, Opcion As String) As Boolean
|
||||||
|
|||||||
@@ -10963,25 +10963,39 @@ Partial Class Ventas
|
|||||||
'CveCuenta = ObjConta.DtResultados.Rows(0)("Conta_IdCuentaDescuentoVenta").ToString().ToEntero()
|
'CveCuenta = ObjConta.DtResultados.Rows(0)("Conta_IdCuentaDescuentoVenta").ToString().ToEntero()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
|
||||||
If importeMovimiento > 0 AndAlso UsuarioActual.CveEmpresa = 119 Then
|
|
||||||
'código fijo en base el porcentaje iva, que se afecten las clasificaciones
|
|
||||||
For i = 0 To TmpDTDetalle.Rows.Count - 1
|
|
||||||
'If TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDecimal > 0 Then
|
|
||||||
' If TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDecimal = 0.08 Then
|
|
||||||
' TmpDTDetalle(i)("CveClasificacion") = 20242 'clasif: ventas tasa 8%
|
|
||||||
' Else
|
|
||||||
' TmpDTDetalle(i)("CveClasificacion") = 19929 'clasif: ventas tasa 16%
|
|
||||||
' End If
|
|
||||||
'Else
|
|
||||||
' TmpDTDetalle(i)("CveClasificacion") = 19930 'clasif: ventas tasa 0%
|
|
||||||
'End If
|
|
||||||
|
|
||||||
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDT.MAX("PorcentajeIVA").ToDouble).Rows.Count > 0 Then
|
DT = TmpDTDetalle.FiltraParametros("", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
|
||||||
TmpDTDetalle(i)("CveClasificacion") = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDT.MAX("PorcentajeIVA").ToDouble).Rows(0)("CveClasificacion").ToString()
|
|
||||||
|
If DT.Rows.Count > 0 Then
|
||||||
|
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||||
|
For Each Row2 As DataRow In DT.Rows
|
||||||
|
importeMovimiento = (TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador
|
||||||
|
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
||||||
|
FechaMovimiento = ObjFactura.FechaPago
|
||||||
|
Concepto = $"{ViewState("VentaFolio").ToString()} {If(Row2("CveClasificacion").ToString().ToEntero() > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"), "")} - {If(Row2("CveSubProyecto").ToString().ToEntero() > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString()}"), "Sin SubProyecto Asignado")}"
|
||||||
|
|
||||||
|
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||||
|
'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas
|
||||||
|
If ObjFactura.TipoDocto.Contiene("Egs") Then
|
||||||
|
IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
|
||||||
|
Else
|
||||||
|
IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
|
||||||
|
End If
|
||||||
|
|
||||||
|
If importeMovimiento <> 0 Then
|
||||||
|
|
||||||
|
If IdCtaContable <= 0 Then
|
||||||
|
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"))
|
||||||
|
idCuentaContabilizacion = 0
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 103, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveVentaAmortizacion:=-1, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=Row2("CveSubProyecto").ToString().ToEntero(), ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal) Then
|
||||||
|
ErrorPrepoliza = True
|
||||||
|
Else
|
||||||
|
ViewState("SeGuardoPrePoliza") = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user