Merge branch 'master' of http://agonzalez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -449,7 +449,6 @@ Namespace Modelos
|
|||||||
Private Sub IniciaValoresVentas(Optional EsCancelacion As Boolean = False)
|
Private Sub IniciaValoresVentas(Optional EsCancelacion As Boolean = False)
|
||||||
If CveVenta > 0 AndAlso CveEmpresa > 0 Then
|
If CveVenta > 0 AndAlso CveEmpresa > 0 Then
|
||||||
Me.DtAnticipos = New DataTable()
|
Me.DtAnticipos = New DataTable()
|
||||||
Me.DtAntNCVinculadas = New DataTable()
|
|
||||||
Me.DtPagos = New DataTable()
|
Me.DtPagos = New DataTable()
|
||||||
Me.DtRemisiones = New DataTable()
|
Me.DtRemisiones = New DataTable()
|
||||||
Me.DtInventario = New DataTable()
|
Me.DtInventario = New DataTable()
|
||||||
@@ -483,7 +482,7 @@ Namespace Modelos
|
|||||||
If TipoDocto.Contiene("Ing", "Ant", "Rem") Then
|
If TipoDocto.Contiene("Ing", "Ant", "Rem") Then
|
||||||
'carga as notas de credito vinculadas
|
'carga as notas de credito vinculadas
|
||||||
If ObjVentas.GetVentasAntNC(CveVenta, -1) Then
|
If ObjVentas.GetVentasAntNC(CveVenta, -1) Then
|
||||||
Me.DtAntNCVinculadas = ObjVentas.DtResultados.Copy()
|
Me.DtAnticipos = ObjVentas.DtResultados.Copy()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -493,7 +492,7 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If TipoDocto.Contiene("Ant") AndAlso EsCancelacion Then
|
If TipoDocto.Contiene("Ant") AndAlso EsCancelacion Then
|
||||||
EsNCAmortizacion = True
|
Me.EsNCAmortizacion = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjVentas.GetVentasAntNC(-1, CveVenta, AplicaAmortizacion:=EsNCAmortizacion) Then
|
If ObjVentas.GetVentasAntNC(-1, CveVenta, AplicaAmortizacion:=EsNCAmortizacion) Then
|
||||||
@@ -2418,9 +2417,18 @@ Namespace Modelos
|
|||||||
CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos
|
CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos
|
||||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||||
|
|
||||||
|
Dim CveVenta As Integer = ObjFactura.CveVenta
|
||||||
|
Dim CveVentaAmortizacion As Integer = row2("CveVenta").ToString().ToEntero
|
||||||
|
|
||||||
|
'SI ES FACTURA EN 0 Y TIENE ANTICIPOS
|
||||||
|
If (ObjFactura.Total = 0 AndAlso UsuarioActual.CveEmpresa.Contiene(72) AndAlso ObjFactura.TipoDocto.Contiene("Ing")) AndAlso row2("TipoDocto").ToString() = "Ant" Then
|
||||||
|
CveVenta = row2("CveVenta").ToString().ToEntero
|
||||||
|
CveVentaAmortizacion = ObjFactura.CveVenta
|
||||||
|
End If
|
||||||
|
|
||||||
If importeMovimiento <> 0 Then
|
If importeMovimiento <> 0 Then
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1,
|
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1,
|
||||||
CveVenta:=ObjFactura.CveVenta, CveVentaAmortizacion:=row2("CveVenta").ToString().ToEntero, CveCliente:=ObjFactura.CveCliente,
|
CveVenta:=CveVenta, CveVentaAmortizacion:=CveVentaAmortizacion, CveCliente:=ObjFactura.CveCliente,
|
||||||
CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta,
|
CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta,
|
||||||
CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then
|
CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
@@ -5214,7 +5222,6 @@ Namespace Modelos
|
|||||||
Public Property DtFirmas As Data.DataTable
|
Public Property DtFirmas As Data.DataTable
|
||||||
Public Property DtDesgloseImpuestos As Data.DataTable
|
Public Property DtDesgloseImpuestos As Data.DataTable
|
||||||
Public Property DtDocumentosRelacionados As Data.DataTable
|
Public Property DtDocumentosRelacionados As Data.DataTable
|
||||||
Public Property DtAntNCVinculadas As Data.DataTable
|
|
||||||
Public Property DtNCVinculadas As Data.DataTable
|
Public Property DtNCVinculadas As Data.DataTable
|
||||||
|
|
||||||
Public Property DtAnticipos As Data.DataTable
|
Public Property DtAnticipos As Data.DataTable
|
||||||
|
|||||||
@@ -1579,9 +1579,8 @@ Partial Class PV
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaCliente(CveCliente As Integer, Optional Estatus As Integer = 1)
|
Private Sub CargaCliente(CveCliente As Integer, Optional Estatus As Integer = 1)
|
||||||
|
|
||||||
Dim ObjCliente As New ClsClientes()
|
Dim ObjCliente As New ClsClientes()
|
||||||
|
Try
|
||||||
If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, Estatus, TipoCliente:=-1) Then
|
If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, Estatus, TipoCliente:=-1) Then
|
||||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||||
TxtCodigo.Text = ObjCliente.Codigo
|
TxtCodigo.Text = ObjCliente.Codigo
|
||||||
@@ -1622,7 +1621,9 @@ Partial Class PV
|
|||||||
|
|
||||||
If (Boolean.Parse(ObjCliente.DtResultados(0)("EsDistribuidor").ToString)) Then
|
If (Boolean.Parse(ObjCliente.DtResultados(0)("EsDistribuidor").ToString)) Then
|
||||||
TrEsDistribuidor.Visible = True
|
TrEsDistribuidor.Visible = True
|
||||||
|
If Not String.IsNullOrEmpty(ObjCliente.Vendedor) Then
|
||||||
LbVendedor.Text = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Vendedor", $"CveVendedor = {ObjCliente.Vendedor}")
|
LbVendedor.Text = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Vendedor", $"CveVendedor = {ObjCliente.Vendedor}")
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
TrEsDistribuidor.Visible = False
|
TrEsDistribuidor.Visible = False
|
||||||
End If
|
End If
|
||||||
@@ -1734,6 +1735,9 @@ Partial Class PV
|
|||||||
Alert("El cliente solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgError)
|
Alert("El cliente solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al asignar el cliente", ex)
|
||||||
|
End Try
|
||||||
ObjCliente.Dispose()
|
ObjCliente.Dispose()
|
||||||
UPCondicionesPago.Update()
|
UPCondicionesPago.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -7448,8 +7448,8 @@ Partial Class Ventas
|
|||||||
For Each gvr As GridViewRow In GvImpuestosLocales2.Rows
|
For Each gvr As GridViewRow In GvImpuestosLocales2.Rows
|
||||||
If gvr.RowType = DataControlRowType.DataRow Then
|
If gvr.RowType = DataControlRowType.DataRow Then
|
||||||
Dim Orden As Integer = 80
|
Dim Orden As Integer = 80
|
||||||
If gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble > 0 Then
|
If gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDecimal > 0 Then
|
||||||
DR("ImpuestoLocal") = gvr.DataKey("ImpuestoLocal").ToString : DR("Importe") = gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble : DR("Orden") = Orden : DR("Porcentaje") = gvr.DataKey("Porcentaje").ToString : DR("TipoImpuesto") = gvr.DataKey("TipoImpuesto").ToString : DR("IdCtaContable") = gvr.DataKey("IdCtaContable").ToString.ToEntero : TmpDTImpuestos.Rows.Add(DR)
|
DR("ImpuestoLocal") = gvr.DataKey("ImpuestoLocal").ToString : DR("Importe") = gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDecimal.RoundSQL(2) : DR("Orden") = Orden : DR("Porcentaje") = gvr.DataKey("Porcentaje").ToString : DR("TipoImpuesto") = gvr.DataKey("TipoImpuesto").ToString : DR("IdCtaContable") = gvr.DataKey("IdCtaContable").ToString.ToEntero : TmpDTImpuestos.Rows.Add(DR)
|
||||||
DR = TmpDTImpuestos.NewRow()
|
DR = TmpDTImpuestos.NewRow()
|
||||||
Orden = Orden + 1
|
Orden = Orden + 1
|
||||||
End If
|
End If
|
||||||
@@ -8270,7 +8270,12 @@ Partial Class Ventas
|
|||||||
|
|
||||||
For Each DrImpuestosLocales As DataRow In TmpDTImpuestos.FiltraParametros("TipoImpuesto = 1").Rows
|
For Each DrImpuestosLocales As DataRow In TmpDTImpuestos.FiltraParametros("TipoImpuesto = 1").Rows
|
||||||
If DrImpuestosLocales("Importe").ToString.ToDecimal > 0 Then
|
If DrImpuestosLocales("Importe").ToString.ToDecimal > 0 Then
|
||||||
Dim ret As New CFDIRetencionesLocales With {.TasaRetencion = DrImpuestosLocales("Porcentaje").ToString.ToDecimal, .ImpuestoLocalRetenido = DrImpuestosLocales("ImpuestoLocal").ToString, .Importe = DrImpuestosLocales("Importe").ToString.ToDecimal(If(ObjFactura.ConvertirPesos, ObjFactura.TipoCambio, 1))}
|
Dim ret As New CFDIRetencionesLocales With
|
||||||
|
{
|
||||||
|
.TasaRetencion = DrImpuestosLocales("Porcentaje").ToString.ToDecimal,
|
||||||
|
.ImpuestoLocalRetenido = DrImpuestosLocales("ImpuestoLocal").ToString,
|
||||||
|
.Importe = DrImpuestosLocales("Importe").ToString.ToDecimal(If(ObjFactura.ConvertirPesos, ObjFactura.TipoCambio, 1)).RoundSQL(2)
|
||||||
|
}
|
||||||
ObjFactura.Timbre.RetencionesLocales.Add(ret)
|
ObjFactura.Timbre.RetencionesLocales.Add(ret)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
@@ -18433,8 +18438,10 @@ Partial Class Ventas
|
|||||||
'Else
|
'Else
|
||||||
|
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Dev", "Egs", "RNC") Then
|
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Dev", "Egs", "RNC") Then
|
||||||
|
|
||||||
|
'SI ES PRODUCCION VERIFICA EL ESTATUS ANTE EL SAT
|
||||||
|
If UsuarioActual.Empresa.FacturaProduccion AndAlso Not FolioFiscal.Contains("test") Then
|
||||||
Dim sb As New StringBuilder()
|
Dim sb As New StringBuilder()
|
||||||
sb.Append("La factura se encuentra en el siguiente estatus del SAT:<br/>")
|
sb.Append("La factura se encuentra en el siguiente estatus del SAT:<br/>")
|
||||||
|
|
||||||
@@ -18465,6 +18472,9 @@ Partial Class Ventas
|
|||||||
|
|
||||||
RegistraScript("$('#ModalCancelarDocumento').modal();")
|
RegistraScript("$('#ModalCancelarDocumento').modal();")
|
||||||
UpCancelarDocumento.Update()
|
UpCancelarDocumento.Update()
|
||||||
|
Else
|
||||||
|
CancelarDocumento()
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
CancelarDocumento()
|
CancelarDocumento()
|
||||||
|
|||||||
@@ -15,6 +15,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Service ID="{C0C07587-41A7-46C8-8FBD-3F9C8EBE2DDC}"/>
|
<Service ID="{C0C07587-41A7-46C8-8FBD-3F9C8EBE2DDC}"/>
|
||||||
</StartupServices>
|
</StartupServices>
|
||||||
</VisualWebDeveloper>
|
</VisualWebDeveloper>
|
||||||
Reference in New Issue
Block a user