Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -8743,14 +8743,14 @@ Partial Class Clientes
|
||||
|
||||
CreaObjetosVenta(1)
|
||||
|
||||
If ObjFactura.CveCliente > 0 Then
|
||||
If TmpDT.Rows.Count > 0 Then
|
||||
Dim Retorno = ObjFactura.EmitirFactura()
|
||||
For Each Mensaje In Retorno.Mensajes
|
||||
Alert(Mensaje, If(Retorno.TieneError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion))
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
'If ObjFactura.CveCliente > 0 Then
|
||||
' If TmpDT.Rows.Count > 0 Then
|
||||
' Dim Retorno = ObjFactura.EmitirFactura(false)
|
||||
' For Each Mensaje In Retorno.Mensajes
|
||||
' Alert(Mensaje, If(Retorno.TieneError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion))
|
||||
' Next
|
||||
' End If
|
||||
'End If
|
||||
|
||||
CargaUsados()
|
||||
|
||||
@@ -8790,17 +8790,19 @@ Partial Class Clientes
|
||||
' Alert("No esta asignada la funcionalidad CvePS Distruibuidor Bonificación Nota")
|
||||
'End If
|
||||
|
||||
CreaObjetosVenta(1)
|
||||
CreaObjetosVenta(2)
|
||||
|
||||
If ObjFactura.CveCliente > 0 Then
|
||||
If TmpDT.Rows.Count > 0 Then
|
||||
Dim Retorno = ObjFactura.EmitirFactura()
|
||||
Dim Retorno = ObjFactura.EmitirFactura(False)
|
||||
For Each Mensaje In Retorno.Mensajes
|
||||
Alert(Mensaje, If(Retorno.TieneError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion))
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
Alert("Listo")
|
||||
|
||||
CargaUsados()
|
||||
|
||||
|
||||
@@ -8819,11 +8821,11 @@ Partial Class Clientes
|
||||
|
||||
If DTSucursales.Rows.Count > 0 Then
|
||||
|
||||
If ObjFolios.GetFolios(If(Tipo = 1, "RNC", "Egs"), UsuarioActual.CveEmpresa) Then
|
||||
|
||||
If ObjFolios.GetFolios("RNC", UsuarioActual.CveEmpresa) Then
|
||||
Dim CveSubProyecto As Integer = DTSucursales.FiltroPrimeroValor("CveSubProyecto", "").ToEntero
|
||||
Dim DT As DataTable
|
||||
If UsuarioActual.CveSubProyecto > 0 Then
|
||||
DT = ObjFolios.DtResultados.FiltraParametros(" Estado = 'Activo' AND LEN(Serie) > 0 ")
|
||||
If CveSubProyecto > 0 Then
|
||||
DT = ObjFolios.DtResultados.FiltraParametros(" Estado = 'Activo' AND LEN(Serie) > 0 AND CveSubProyecto = " & CveSubProyecto)
|
||||
Else
|
||||
DT = ObjFolios.DtResultados.FiltraParametros(" Estado = 'Activo' AND LEN(Serie) > 0 ")
|
||||
End If
|
||||
@@ -8857,7 +8859,7 @@ Partial Class Clientes
|
||||
e.Row.FCCheckBox("ChkCargo").Visible = False
|
||||
Else
|
||||
e.Row.FCCheckBox("ChkCargo").Checked = False
|
||||
e.Row.FCCheckBox("ChkCargo").Visible = True
|
||||
e.Row.FCCheckBox("ChkCargo").Visible = False 'True
|
||||
End If
|
||||
|
||||
If FacturadoBonificacion Then
|
||||
@@ -9213,7 +9215,7 @@ Partial Class Clientes
|
||||
ObjFactura.CveMoneda = 1
|
||||
ObjFactura.Moneda = "Pesos"
|
||||
ObjFactura.MonedaSAT = "MXN"
|
||||
ObjFactura.TipoDocto = If(Tipo = 1, "RNC", "Egs")
|
||||
ObjFactura.TipoDocto = "RNC"
|
||||
|
||||
ObjFactura.Folio = Folio
|
||||
|
||||
@@ -9366,183 +9368,183 @@ Partial Class Clientes
|
||||
Dim TmpDT7Eleven As New DataTable
|
||||
Dim TmpDTComplementosTimbrado As New DataTable
|
||||
|
||||
PrepararTimbrado(FM, TmpDT7Eleven, TmpDTComplementosTimbrado)
|
||||
'PrepararTimbrado(FM, TmpDT7Eleven, TmpDTComplementosTimbrado)
|
||||
|
||||
ObjFactura.FemsaFactura = FM
|
||||
|
||||
ObjFactura.Timbre = PreParaTimbre(ObjFactura)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub PrepararTimbrado(ByRef FM As Modelos.FemsaFactura, ByRef TmpDT7Eleven As DataTable, ByRef TmpDTComplementosTimbrado As DataTable)
|
||||
FM.AplicaFEMSA = ChkAplicaFEMSA.Checked
|
||||
FM.FEMSA_NumSociedad = ""
|
||||
FM.FEMSA_NumProveedor = ""
|
||||
FM.FEMSA_Mail = ""
|
||||
FM.FEMSA_Version = "".ToEntero
|
||||
FM.FEMSA_NumPedido = "".ToEntero
|
||||
FM.FEMSA_NumEntrada = ""
|
||||
FM.FEMSA_NumRemision = ""
|
||||
FM.FEMSA_NumSocio = ""
|
||||
FM.FEMSA_CentroCosto = ""
|
||||
FM.FEMSA_IPeriodoLiquidacion = ""
|
||||
FM.FEMSA_FPeriodoLiquidacion = ""
|
||||
FM.FEMSA_CodRetencion1 = ""
|
||||
FM.FEMSA_CodRetencion2 = ""
|
||||
|
||||
TmpDT7Eleven.Columns.Add("sevenElevenNumProveedor")
|
||||
TmpDT7Eleven.Columns.Add("sevenElevenFolio")
|
||||
TmpDT7Eleven.Columns.Add("sevenElevenTienda")
|
||||
TmpDT7Eleven.Columns.Add("sevenElevenFecha")
|
||||
|
||||
Dim Row As DataRow = TmpDT7Eleven.NewRow
|
||||
Row("sevenElevenNumProveedor") = ""
|
||||
Row("sevenElevenFolio") = ""
|
||||
Row("sevenElevenTienda") = ""
|
||||
Row("sevenElevenFecha") = ""
|
||||
|
||||
TmpDT7Eleven.Rows.Add(Row)
|
||||
|
||||
TmpDTComplementosTimbrado.Columns.Add("CveComplemento")
|
||||
TmpDTComplementosTimbrado.Columns.Add("IdContabilidad")
|
||||
TmpDTComplementosTimbrado.Columns.Add("TipoProceso")
|
||||
TmpDTComplementosTimbrado.Columns.Add("TipoAmbito")
|
||||
TmpDTComplementosTimbrado.Columns.Add("Entidad")
|
||||
|
||||
Dim Row2 As DataRow = TmpDTComplementosTimbrado.NewRow
|
||||
Row2("CveComplemento") = -1
|
||||
Row2("IdContabilidad") = -1
|
||||
Row2("TipoProceso") = -1
|
||||
Row2("TipoAmbito") = -1
|
||||
Row2("Entidad") = -1
|
||||
|
||||
TmpDTComplementosTimbrado.Rows.Add(Row2)
|
||||
End Sub
|
||||
|
||||
Private Function PreParaTimbre(Obj As Modelos.Factura) As CFDITimbre
|
||||
Dim Timbre As New CFDITimbre
|
||||
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||
Timbre.Comprobante.Serie = Obj.Serie
|
||||
Timbre.Comprobante.Fecha = Obj.FechaCP
|
||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||
Timbre.Comprobante.Subtotal = Obj.SubTotal
|
||||
Timbre.Comprobante.Descuentos = Obj.Descuento
|
||||
Timbre.Comprobante.Moneda = Obj.MonedaSAT
|
||||
Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString)
|
||||
Timbre.Comprobante.Total = Obj.Total
|
||||
|
||||
Try
|
||||
Obj.SetSubProyecto(Me)
|
||||
Timbre.Comprobante.LugarExpedicion = Obj.SubProyecto.CP
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
Timbre.Comprobante.Confirmacion = ""
|
||||
|
||||
Timbre.Receptor.RFC = Obj.Cliente.RFC
|
||||
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
|
||||
Timbre.Receptor.ResidenciaFiscal = ""
|
||||
Timbre.Receptor.NumeroRegistroTributario = ""
|
||||
Timbre.Receptor.UsoCFDI = Obj.ClaveUsoCFDI
|
||||
|
||||
|
||||
If Obj.CveTipoRelacion > 0 Then
|
||||
Select Case Obj.CveTipoRelacion
|
||||
Case 1
|
||||
Timbre.CFDIRelacionados.TipoRelacion = "01"
|
||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "01-Nota de Crédito aplicada a Ingreso"
|
||||
Case 2
|
||||
Timbre.CFDIRelacionados.TipoRelacion = "02"
|
||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "02-Nota de débito de los documentos relacionados"
|
||||
Case 3
|
||||
Timbre.CFDIRelacionados.TipoRelacion = "03"
|
||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "03-Devolución aplicada a Ingreso"
|
||||
Case 4
|
||||
Timbre.CFDIRelacionados.TipoRelacion = "04"
|
||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "04-Refacturación de Ingreso"
|
||||
Case 7
|
||||
Timbre.CFDIRelacionados.TipoRelacion = "07"
|
||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "07-CFDI por aplicación de anticipo"
|
||||
Case 8
|
||||
Timbre.CFDIRelacionados.TipoRelacion = "08"
|
||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "08-Factura generada por pagos en parcialidades "
|
||||
Case 9
|
||||
Timbre.CFDIRelacionados.TipoRelacion = "09"
|
||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "09-Factura generada por pagos diferidos"
|
||||
|
||||
End Select
|
||||
End If
|
||||
|
||||
Dim totSubTotal As Decimal = Obj.SubTotal
|
||||
Dim totIVA As Decimal = Obj.IVA
|
||||
Dim totRetIVA As Decimal = Obj.RetIVA
|
||||
Dim totRetISR As Decimal = Obj.RetISR
|
||||
Dim TasaRetIVA As Decimal = 0
|
||||
Dim TasaRetISR As Decimal = 0
|
||||
Dim i As Integer = 1
|
||||
|
||||
'detalles
|
||||
Dim tPS As String = ""
|
||||
|
||||
For Each drr As DataRow In Obj.DtDetalle.Rows
|
||||
If drr("PS").ToString.Length = 1 Then
|
||||
tPS = drr("Obs").ToString
|
||||
Else
|
||||
If drr("PS").ToString.Length = 0 Then
|
||||
tPS = ""
|
||||
Else
|
||||
tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
|
||||
End If
|
||||
End If
|
||||
'condicionante, especial
|
||||
If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" ' les comentan que no debe de ir la etiqueta de "unidad" en el producto
|
||||
|
||||
Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString.ToDecimal,
|
||||
.Descripcion = tPS,
|
||||
.ValorUnitario = drr("PU").ToString.ToDecimal,
|
||||
.Importe = drr("TotalImporte").ToString.ToDecimal,
|
||||
.Descuento = drr("Descuento").ToString.ToDecimal,
|
||||
.Unidad = drr("UM").ToString,
|
||||
.ClaveUnidad = drr("SATClaveUM").ToString,
|
||||
.ClaveProdServ = drr("SATClaveProdServ").ToString,
|
||||
.Noidentificacion = drr("Noidentificacion").ToString,
|
||||
.CuentaPredial = drr("CuentaPredial").ToString}
|
||||
'verifica suma subtotales
|
||||
If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'proceso de ajusta de decimales
|
||||
concepto.Importe = totSubTotal
|
||||
End If
|
||||
totSubTotal = totSubTotal - concepto.Importe
|
||||
|
||||
'siempre estaremos agregando el iva, auqnue sea en importe cero o tasa cero, para que se emita la factura
|
||||
' If drr("ImporteIVA").ToString.ToDouble > 0 Then
|
||||
|
||||
'si es ingreso amortizado por la totalidad, y arroja el valor total de cero, no debe de impuestos
|
||||
If Timbre.Comprobante.Total > 0 Then
|
||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal})
|
||||
End If
|
||||
|
||||
If drr("ImporteIEPS").ToString.ToDouble > 0 Then
|
||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIEPS").ToString.ToDecimal, .Impuesto = "003", .Importe = drr("ImporteIEPS").ToString.ToDecimal})
|
||||
End If
|
||||
|
||||
If drr("ImporteRetIVA").ToString.ToDouble > 0 Then 'si hay retenciones
|
||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = TasaRetIVA, .Impuesto = "002", .Importe = drr("ImporteRetIVA").ToString.ToDecimal})
|
||||
End If
|
||||
|
||||
If drr("ImporteRetISR").ToString.ToDouble > 0 Then 'retención de ISR
|
||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = TasaRetISR, .Impuesto = "001", .Importe = drr("ImporteRetISR").ToString.ToDecimal})
|
||||
End If
|
||||
|
||||
Timbre.Conceptos.Add(concepto)
|
||||
i += 1
|
||||
Next
|
||||
|
||||
Return Timbre
|
||||
End Function
|
||||
ObjFactura.FemsaFactura = FM
|
||||
|
||||
' ObjFactura.Timbre = PreParaTimbre(ObjFactura)
|
||||
|
||||
End Sub
|
||||
|
||||
'Private Sub PrepararTimbrado(ByRef FM As Modelos.FemsaFactura, ByRef TmpDT7Eleven As DataTable, ByRef TmpDTComplementosTimbrado As DataTable)
|
||||
' FM.AplicaFEMSA = ChkAplicaFEMSA.Checked
|
||||
' FM.FEMSA_NumSociedad = ""
|
||||
' FM.FEMSA_NumProveedor = ""
|
||||
' FM.FEMSA_Mail = ""
|
||||
' FM.FEMSA_Version = "".ToEntero
|
||||
' FM.FEMSA_NumPedido = "".ToEntero
|
||||
' FM.FEMSA_NumEntrada = ""
|
||||
' FM.FEMSA_NumRemision = ""
|
||||
' FM.FEMSA_NumSocio = ""
|
||||
' FM.FEMSA_CentroCosto = ""
|
||||
' FM.FEMSA_IPeriodoLiquidacion = ""
|
||||
' FM.FEMSA_FPeriodoLiquidacion = ""
|
||||
' FM.FEMSA_CodRetencion1 = ""
|
||||
' FM.FEMSA_CodRetencion2 = ""
|
||||
|
||||
' TmpDT7Eleven.Columns.Add("sevenElevenNumProveedor")
|
||||
' TmpDT7Eleven.Columns.Add("sevenElevenFolio")
|
||||
' TmpDT7Eleven.Columns.Add("sevenElevenTienda")
|
||||
' TmpDT7Eleven.Columns.Add("sevenElevenFecha")
|
||||
|
||||
' Dim Row As DataRow = TmpDT7Eleven.NewRow
|
||||
' Row("sevenElevenNumProveedor") = ""
|
||||
' Row("sevenElevenFolio") = ""
|
||||
' Row("sevenElevenTienda") = ""
|
||||
' Row("sevenElevenFecha") = ""
|
||||
|
||||
' TmpDT7Eleven.Rows.Add(Row)
|
||||
|
||||
' TmpDTComplementosTimbrado.Columns.Add("CveComplemento")
|
||||
' TmpDTComplementosTimbrado.Columns.Add("IdContabilidad")
|
||||
' TmpDTComplementosTimbrado.Columns.Add("TipoProceso")
|
||||
' TmpDTComplementosTimbrado.Columns.Add("TipoAmbito")
|
||||
' TmpDTComplementosTimbrado.Columns.Add("Entidad")
|
||||
|
||||
' Dim Row2 As DataRow = TmpDTComplementosTimbrado.NewRow
|
||||
' Row2("CveComplemento") = -1
|
||||
' Row2("IdContabilidad") = -1
|
||||
' Row2("TipoProceso") = -1
|
||||
' Row2("TipoAmbito") = -1
|
||||
' Row2("Entidad") = -1
|
||||
|
||||
' TmpDTComplementosTimbrado.Rows.Add(Row2)
|
||||
'End Sub
|
||||
|
||||
'Private Function PreParaTimbre(Obj As Modelos.Factura) As CFDITimbre
|
||||
' Dim Timbre As New CFDITimbre
|
||||
' Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||
' Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||
' Timbre.Comprobante.Serie = Obj.Serie
|
||||
' Timbre.Comprobante.Fecha = Obj.FechaCP
|
||||
' Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||
' Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||
' Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||
' Timbre.Comprobante.Subtotal = Obj.SubTotal
|
||||
' Timbre.Comprobante.Descuentos = Obj.Descuento
|
||||
' Timbre.Comprobante.Moneda = Obj.MonedaSAT
|
||||
' Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString)
|
||||
' Timbre.Comprobante.Total = Obj.Total
|
||||
|
||||
' Try
|
||||
' Obj.SetSubProyecto(Me)
|
||||
' Timbre.Comprobante.LugarExpedicion = Obj.SubProyecto.CP
|
||||
' Catch ex As Exception
|
||||
|
||||
' End Try
|
||||
|
||||
' Timbre.Comprobante.Confirmacion = ""
|
||||
|
||||
' Timbre.Receptor.RFC = Obj.Cliente.RFC
|
||||
' Timbre.Receptor.Nombre = Obj.Cliente.Nombre
|
||||
' Timbre.Receptor.ResidenciaFiscal = ""
|
||||
' Timbre.Receptor.NumeroRegistroTributario = ""
|
||||
' Timbre.Receptor.UsoCFDI = Obj.ClaveUsoCFDI
|
||||
|
||||
|
||||
' If Obj.CveTipoRelacion > 0 Then
|
||||
' Select Case Obj.CveTipoRelacion
|
||||
' Case 1
|
||||
' Timbre.CFDIRelacionados.TipoRelacion = "01"
|
||||
' Timbre.CFDIRelacionados.TipoRelacionTexto = "01-Nota de Crédito aplicada a Ingreso"
|
||||
' Case 2
|
||||
' Timbre.CFDIRelacionados.TipoRelacion = "02"
|
||||
' Timbre.CFDIRelacionados.TipoRelacionTexto = "02-Nota de débito de los documentos relacionados"
|
||||
' Case 3
|
||||
' Timbre.CFDIRelacionados.TipoRelacion = "03"
|
||||
' Timbre.CFDIRelacionados.TipoRelacionTexto = "03-Devolución aplicada a Ingreso"
|
||||
' Case 4
|
||||
' Timbre.CFDIRelacionados.TipoRelacion = "04"
|
||||
' Timbre.CFDIRelacionados.TipoRelacionTexto = "04-Refacturación de Ingreso"
|
||||
' Case 7
|
||||
' Timbre.CFDIRelacionados.TipoRelacion = "07"
|
||||
' Timbre.CFDIRelacionados.TipoRelacionTexto = "07-CFDI por aplicación de anticipo"
|
||||
' Case 8
|
||||
' Timbre.CFDIRelacionados.TipoRelacion = "08"
|
||||
' Timbre.CFDIRelacionados.TipoRelacionTexto = "08-Factura generada por pagos en parcialidades "
|
||||
' Case 9
|
||||
' Timbre.CFDIRelacionados.TipoRelacion = "09"
|
||||
' Timbre.CFDIRelacionados.TipoRelacionTexto = "09-Factura generada por pagos diferidos"
|
||||
|
||||
' End Select
|
||||
' End If
|
||||
|
||||
' Dim totSubTotal As Decimal = Obj.SubTotal
|
||||
' Dim totIVA As Decimal = Obj.IVA
|
||||
' Dim totRetIVA As Decimal = Obj.RetIVA
|
||||
' Dim totRetISR As Decimal = Obj.RetISR
|
||||
' Dim TasaRetIVA As Decimal = 0
|
||||
' Dim TasaRetISR As Decimal = 0
|
||||
' Dim i As Integer = 1
|
||||
|
||||
' 'detalles
|
||||
' Dim tPS As String = ""
|
||||
|
||||
' For Each drr As DataRow In Obj.DtDetalle.Rows
|
||||
' If drr("PS").ToString.Length = 1 Then
|
||||
' tPS = drr("Obs").ToString
|
||||
' Else
|
||||
' If drr("PS").ToString.Length = 0 Then
|
||||
' tPS = ""
|
||||
' Else
|
||||
' tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
|
||||
' End If
|
||||
' End If
|
||||
' 'condicionante, especial
|
||||
' If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" ' les comentan que no debe de ir la etiqueta de "unidad" en el producto
|
||||
|
||||
' Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString.ToDecimal,
|
||||
' .Descripcion = tPS,
|
||||
' .ValorUnitario = drr("PU").ToString.ToDecimal,
|
||||
' .Importe = drr("TotalImporte").ToString.ToDecimal,
|
||||
' .Descuento = drr("Descuento").ToString.ToDecimal,
|
||||
' .Unidad = drr("UM").ToString,
|
||||
' .ClaveUnidad = drr("SATClaveUM").ToString,
|
||||
' .ClaveProdServ = drr("SATClaveProdServ").ToString,
|
||||
' .Noidentificacion = drr("Noidentificacion").ToString,
|
||||
' .CuentaPredial = drr("CuentaPredial").ToString}
|
||||
' 'verifica suma subtotales
|
||||
' If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'proceso de ajusta de decimales
|
||||
' concepto.Importe = totSubTotal
|
||||
' End If
|
||||
' totSubTotal = totSubTotal - concepto.Importe
|
||||
|
||||
' 'siempre estaremos agregando el iva, auqnue sea en importe cero o tasa cero, para que se emita la factura
|
||||
' ' If drr("ImporteIVA").ToString.ToDouble > 0 Then
|
||||
|
||||
' 'si es ingreso amortizado por la totalidad, y arroja el valor total de cero, no debe de impuestos
|
||||
' If Timbre.Comprobante.Total > 0 Then
|
||||
' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal})
|
||||
' End If
|
||||
|
||||
' If drr("ImporteIEPS").ToString.ToDouble > 0 Then
|
||||
' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIEPS").ToString.ToDecimal, .Impuesto = "003", .Importe = drr("ImporteIEPS").ToString.ToDecimal})
|
||||
' End If
|
||||
|
||||
' If drr("ImporteRetIVA").ToString.ToDouble > 0 Then 'si hay retenciones
|
||||
' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = TasaRetIVA, .Impuesto = "002", .Importe = drr("ImporteRetIVA").ToString.ToDecimal})
|
||||
' End If
|
||||
|
||||
' If drr("ImporteRetISR").ToString.ToDouble > 0 Then 'retención de ISR
|
||||
' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = TasaRetISR, .Impuesto = "001", .Importe = drr("ImporteRetISR").ToString.ToDecimal})
|
||||
' End If
|
||||
|
||||
' Timbre.Conceptos.Add(concepto)
|
||||
' i += 1
|
||||
' Next
|
||||
|
||||
' Return Timbre
|
||||
'End Function
|
||||
|
||||
'Private Function GenerarNotaCredito(CvePS As Integer, Tipo As Integer, CveUnidadMedida As Integer, Importe As Decimal, Iva As Decimal, Descripcion As String, CveClasificacion As Integer) As Boolean
|
||||
|
||||
@@ -9647,29 +9649,29 @@ Partial Class Clientes
|
||||
' ObjVentas.Commit()
|
||||
' CargaUsados()
|
||||
|
||||
' Dim DtDetallesVenta As New DataTable
|
||||
' 'Dim DtDetallesVenta As New DataTable
|
||||
|
||||
' If ObjVentas.GetVentaDetalle(CveVenta) Then
|
||||
' 'If ObjVentas.GetVentaDetalle(CveVenta) Then
|
||||
|
||||
' DtDetallesVenta = ObjVentas.DtResultados
|
||||
' 'CreaObjetosVenta(CveVenta, Serie, Folio, SubTotal, Iva, DtDetallesVenta)
|
||||
' ' DtDetallesVenta = ObjVentas.DtResultados
|
||||
' ' 'CreaObjetosVenta(CveVenta, Serie, Folio, SubTotal, Iva, DtDetallesVenta)
|
||||
|
||||
' ObjFactura.Timbre = PreParaTimbre(ObjFactura, ObjFactura.CveSubProyecto)
|
||||
' ' ObjFactura.Timbre = PreParaTimbre(ObjFactura, ObjFactura.CveSubProyecto)
|
||||
|
||||
' Dim ObjTimbrado As New Timbrado
|
||||
' Dim SeTimbro As Boolean = False
|
||||
' ' Dim ObjTimbrado As New Timbrado
|
||||
' ' Dim SeTimbro As Boolean = False
|
||||
|
||||
' SeTimbro = ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura)
|
||||
' ' SeTimbro = ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura)
|
||||
|
||||
' If SeTimbro Then
|
||||
' Alert("Se timbro correctamente")
|
||||
' Else
|
||||
' Alert("No se pudo timbrar, intente mas tarde.", TipoMensaje.MsgError)
|
||||
' End If
|
||||
' ' If SeTimbro Then
|
||||
' ' Alert("Se timbro correctamente")
|
||||
' ' Else
|
||||
' ' Alert("No se pudo timbrar, intente mas tarde.", TipoMensaje.MsgError)
|
||||
' ' End If
|
||||
|
||||
' Else
|
||||
' Alert("No se pudo timbrar, no se pudieron obtener los detalles de la venta.", TipoMensaje.MsgError)
|
||||
' End If
|
||||
' 'Else
|
||||
' ' Alert("No se pudo timbrar, no se pudieron obtener los detalles de la venta.", TipoMensaje.MsgError)
|
||||
' 'End If
|
||||
|
||||
' End If
|
||||
|
||||
|
||||
@@ -2803,11 +2803,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlClientes" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="NombreComercial" DataValueField="CveCliente" Width="100%" AutoPostBack="true">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlClientes.ClientID.ToString()%>">Cliente:</label>
|
||||
<div class="col-md-5">
|
||||
<div >
|
||||
<label for="<%= DdlClientes.ClientID.ToString()%>">Distribuidor:</label><br />
|
||||
<ADS:Dropdownlost ID="DdlClientes" data-metodo="getcliente" CssStyle="width:100%" CssClassDdl="select2me" runat="server" DataTextField="CodigoNombre" DataValueField="CveCliente" Width="300px"></ADS:Dropdownlost>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4973,16 +4973,6 @@ Partial Class PV
|
||||
UpAjuste.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaClienteAjuste()
|
||||
DdlClientes.Items.Clear()
|
||||
|
||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||
DdlClientes.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
DdlClientes.DataBind()
|
||||
UpAjuste.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaBCIAjuste()
|
||||
Dim ObjGral As New ClsGenerales
|
||||
If ObjGral.BCIUsadoGet(UsuarioActual.CveEmpresa) Then
|
||||
@@ -5026,8 +5016,8 @@ Partial Class PV
|
||||
|
||||
CreaDTmpDTAjustes()
|
||||
CreaDTmpDTRecepcionUsados()
|
||||
CargaClienteAjuste()
|
||||
CargaBCIAjuste()
|
||||
DdlClientes.setEsWebService(True)
|
||||
DivChkAjuste.Visible = True
|
||||
End Sub
|
||||
|
||||
@@ -5393,6 +5383,7 @@ Partial Class PV
|
||||
DivDatosVenta.Attributes.Add("class", "col-md-6")
|
||||
TxtPrecio.Attributes.Add("onKeyUp", $"CambiaAjuste(this,{TxtPrecio.ClientID});")
|
||||
TxtPrecio.Text = TxtPrecio.Text
|
||||
TxtObsPS.Text = "Descuento por garantía"
|
||||
Else
|
||||
For Each Gvr As GridViewRow In GvRecepcionUsados.Rows
|
||||
If Gvr.RowType = DataControlRowType.DataRow Then
|
||||
@@ -5757,12 +5748,14 @@ Partial Class PV
|
||||
params.Add(New ReportParameter("CiudadEstado", LblCiudad.Text.Trim + ", " + LblEstado.Text))
|
||||
params.Add(New ReportParameter("TelCliente", LblTelefono.Text))
|
||||
Else
|
||||
Dim DatosClienteSeleccionado As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCliente = {0}", DdlClientes.SelectedValue.ToEntero))
|
||||
Dim Ciudad As String = DatosClienteSeleccionado.Item("Ciudad").ToString 'GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Ciudad", String.Format("CveCliente = {0}", DdlClientes.SelectedValue.ToEntero)).Trim
|
||||
Dim Estado As String = DatosClienteSeleccionado.Item("Estado").ToString 'GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Estado", String.Format("CveCliente = {0}", DdlClientes.SelectedValue.ToEntero))
|
||||
params.Add(New ReportParameter("NombreCliente", DdlClientes.SelectedItem.Text))
|
||||
params.Add(New ReportParameter("CiudadEstado", String.Format("{0}, {1}", Ciudad.Trim, Estado)))
|
||||
params.Add(New ReportParameter("TelCliente", DatosClienteSeleccionado.Item("Telefono").ToString))
|
||||
If (DdlClientes.SelectedValue.ToEntero > 0) Then
|
||||
Dim DatosClienteSeleccionado As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCliente = {0}", DdlClientes.SelectedValue.ToEntero))
|
||||
Dim Ciudad As String = DatosClienteSeleccionado.Item("Ciudad").ToString 'GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Ciudad", String.Format("CveCliente = {0}", DdlClientes.SelectedValue.ToEntero)).Trim
|
||||
Dim Estado As String = DatosClienteSeleccionado.Item("Estado").ToString 'GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Estado", String.Format("CveCliente = {0}", DdlClientes.SelectedValue.ToEntero))
|
||||
params.Add(New ReportParameter("NombreCliente", DdlClientes.SelectedText))
|
||||
params.Add(New ReportParameter("CiudadEstado", String.Format("{0}, {1}", Ciudad.Trim, Estado)))
|
||||
params.Add(New ReportParameter("TelCliente", DatosClienteSeleccionado.Item("Telefono").ToString))
|
||||
End If
|
||||
End If
|
||||
|
||||
'Informacion Distribuidor
|
||||
|
||||
@@ -5873,9 +5873,8 @@
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#ModalAplicarRemisionesNC">
|
||||
Aplicar Remisiones
|
||||
</button>
|
||||
<asp:Button ID = "BtnModalAplicarRemisionesNC" runat="server" OnClick="BtnModalAplicarRemisionesNC_Click" class="btn btn-primary" data-toggle="modal" data-target="#ModalAplicarRemisionesNC"/>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
</div>
|
||||
|
||||
@@ -20872,6 +20872,7 @@ Partial Class Ventas
|
||||
End If
|
||||
ObjMovtos.Dispose()
|
||||
GvRemisionesNC.DataBind()
|
||||
UpModalRemisionesNC.Update()
|
||||
End Sub
|
||||
Private Sub CargaDescRNC()
|
||||
|
||||
@@ -21471,7 +21472,7 @@ Partial Class Ventas
|
||||
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||
Dim tFecha As Date = TxtFecha.Text.ToDate
|
||||
Dim Fecha As String = String.Format("{0}/{1}/{2}", tFecha.Year, tFecha.Month, tFecha.Day)
|
||||
Dim drr As DataRow = ObjIE.DtResultados.FiltroPrimero("Fecha < #" & Fecha & "#", "Fecha DESC")
|
||||
Dim drr As DataRow = ObjIE.DtResultados.FiltroPrimero("Fecha > #" & Fecha & "#", "Fecha DESC")
|
||||
|
||||
If drr IsNot Nothing Then
|
||||
TipoCambioFactura = drr("TipoCambio").ToString.ToDecimal
|
||||
@@ -23799,4 +23800,8 @@ Partial Class Ventas
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub BtnModalAplicarRemisionesNC_Click(sender As Object, e As EventArgs)
|
||||
CargaRNC()
|
||||
RegistraScript("$('#ModalAplicarRemisionesNC').modal()")
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user