diff --git a/App_Code/DtDatos.xsd b/App_Code/DtDatos.xsd index 17df67ba5..f3b7eb91c 100644 --- a/App_Code/DtDatos.xsd +++ b/App_Code/DtDatos.xsd @@ -9,10 +9,10 @@ - + - + @@ -28,7 +28,7 @@ - + @@ -46,7 +46,7 @@ - + @@ -66,7 +66,7 @@ - + @@ -89,7 +89,7 @@ - + @@ -113,7 +113,7 @@ - + @@ -139,7 +139,7 @@ - + @@ -155,7 +155,7 @@ - + @@ -172,7 +172,7 @@ - + @@ -181,7 +181,7 @@ - + @@ -217,7 +217,7 @@ - + @@ -243,7 +243,7 @@ - + @@ -259,7 +259,7 @@ - + @@ -298,8 +298,8 @@ - - + + @@ -308,7 +308,7 @@ - + @@ -318,7 +318,7 @@ - + diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 5b6d22210..358583201 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -10,6 +10,7 @@ Imports System.Threading.Tasks Imports Newtonsoft.Json Imports Extensiones Imports MoreLinq +Imports Profact.TimbraCFDI40 Partial Class Compras_Compras @@ -817,6 +818,16 @@ Partial Class Compras_Compras End Set End Property + + Private Property CveRegimenFiscalProveedor As Integer + Get + Return IfNull(ViewState("CveRegimenFiscalProveedor"), -1).ToString.ToEntero + End Get + Set(value As Integer) + ViewState("CveRegimenFiscalProveedor") = value + End Set + End Property + Private Property CveImportacion As Integer Get Return IfNull(ViewState("CveImportacion"), -1).ToString.ToEntero @@ -2042,10 +2053,20 @@ Partial Class Compras_Compras DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1")) DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4")) DdlRetIVAConcepto.Items.Insert(0, New ListItem("Fletes P.F.", "2")) - DdlRetIVAConcepto.Items.Add(New ListItem("Resico", "5")) DdlRetIVAConcepto.Items.Add(New ListItem("General", "6")) + + If CveRegimenFiscalProveedor = 23 Then + DdlRetIVAConcepto.Items.Add(New ListItem("Resico", "5")) + End If + + If LblRetIVA.Text.ToEntero = 4 Then + DdlRetIVAConcepto.SelectedValueExist(2) + End If + End If + + ElseIf RFCProv.Length = 12 Then ' persona moral If DIOTCveTipoOperacion = 1 Then '03 - Prestación de Servicios Profesionales DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1")) @@ -2055,13 +2076,25 @@ Partial Class Compras_Compras DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4")) End If - If DIOTCveTipoOperacion.Contiene(0, 3) Then ' 85 - Otros + If DIOTCveTipoOperacion.Contiene(3) Then ' 85 - Otros DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1")) DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4")) DdlRetIVAConcepto.Items.Insert(0, New ListItem("Fletes P.M.", "3")) - DdlRetIVAConcepto.Items.Add(New ListItem("Resico", "5")) DdlRetIVAConcepto.Items.Add(New ListItem("General.", "6")) + + If CveRegimenFiscalProveedor = 23 Then + DdlRetIVAConcepto.Items.Add(New ListItem("Resico", "5")) + End If + + If LblRetIVA.Text.ToEntero = 4 Then + DdlRetIVAConcepto.SelectedValueExist(3) + End If + End If + + + + End If End If UpPS.Update() @@ -2075,19 +2108,29 @@ Partial Class Compras_Compras If DIOTCveTipoOperacion = 1 Then '03 - Prestación de Servicios Profesionales DdlRetISRConcepto.Items.Insert(0, New ListItem("Honorarios", "1")) - DdlRetISRConcepto.Items.Insert(1, New ListItem("Resico", "3")) + 'DdlRetISRConcepto.Items.Insert(1, New ListItem("Resico", "3")) End If If DIOTCveTipoOperacion = 2 Then ' 06 - Arrendamiento de inmuebles DdlRetISRConcepto.Items.Insert(0, New ListItem("Arrendamiento", "2")) - DdlRetISRConcepto.Items.Insert(1, New ListItem("Resico", "3")) + ' DdlRetISRConcepto.Items.Insert(1, New ListItem("Resico", "3")) End If - If DIOTCveTipoOperacion.Contiene(0, 3) Then ' 85 - Otros + If DIOTCveTipoOperacion.Contiene(3) Then ' 85 - Otros DdlRetISRConcepto.Items.Insert(0, New ListItem("Honorarios", "1")) DdlRetISRConcepto.Items.Insert(1, New ListItem("Arrendamiento", "2")) - DdlRetISRConcepto.Items.Insert(1, New ListItem("Resico", "3")) + + If CveRegimenFiscalProveedor = 23 Then + DdlRetISRConcepto.Items.Insert(2, New ListItem("Resico", "3")) + If LblRetISR.Text.ToDecimal().ToString("#.00") = "1.25" Then + DdlRetISRConcepto.SelectedValueExist(3) + End If + + End If End If + + + End If UpPS.Update() End Sub @@ -3240,6 +3283,9 @@ Partial Class Compras_Compras HdnCveProveedor.Value = ObjProveedor.CveProveedor.ToString TxtFechaPago.Text = (TxtFecha.Text.ToDate.AddDays(LblDiasCredito.Text.ToEntero)).ToShortDateString RFCProv = ObjProveedor.RFC + + CveRegimenFiscalProveedor = ObjProveedor.CveRegimenFiscal + CargaRetIVAConcepto(True, ObjProveedor.DIOTCveTipoOperacion) CargaRetISRConcepto(True, ObjProveedor.DIOTCveTipoOperacion) @@ -4597,10 +4643,9 @@ Partial Class Compras_Compras If (tNoDeducible > 0) Then tNoDeducible = If(TmpDT.MIN("NoDeducible") = "False", 2, 1) End If - - If ObjCompras.AddCompra(DdlTipoComprobante.SelectedValue, TxtDescripcion.Text.Trim, TxtSerie.Text.Trim, TxtFolio.Text.Trim, TxtFolioSecundario.Text.Trim, CveProveedor, TxtSubTotal.Text.Todecimal, TxtDescuento.Text.Todecimal, - LblAmortizacion.Text.Todecimal, TxtIVA.Text.Todecimal, TxtRetIVA.Text.Todecimal, TxtRetISR.Text.Todecimal, TxtIEPS.Text.Todecimal, TxtOtrosImpuestos.Text.Todecimal, - TxtRedondeo.Text.Todecimal, TxtTotal.Text.Todecimal, TxtFecha.Text.Trim.ToDate, DdlMoneda.SelectedValue.ToEntero, TipoCambio, TxtFechaPago.Text.Trim.ToDate, ChkAplicaNotaCredito.Checked, TxtObsFact.Text.Trim, CveEstatusFactura, + If ObjCompras.AddCompra(DdlTipoComprobante.SelectedValue, TxtDescripcion.Text.Trim, TxtSerie.Text.Trim, TxtFolio.Text.Trim, TxtFolioSecundario.Text.Trim, CveProveedor, TxtSubTotal.Text.ToDecimal, TxtDescuento.Text.ToDecimal, +LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, TxtRetISR.Text.ToDecimal, TxtIEPS.Text.ToDecimal, TxtOtrosImpuestos.Text.ToDecimal, + TxtRedondeo.Text.ToDecimal, TxtTotal.Text.ToDecimal, TxtFecha.Text.Trim.ToDate, DdlMoneda.SelectedValue.ToEntero, TipoCambio, TxtFechaPago.Text.Trim.ToDate, ChkAplicaNotaCredito.Checked, TxtObsFact.Text.Trim, CveEstatusFactura, CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, IdPoliza, CveCajaChica:=CveCajaChica, CvePersonal:=CvePersonal, NumeroReembolso:=NumeroReembolso, CveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, AplicoPromocion:=ChkOCPromocion.Checked, PorcentajeIVA:=PorcentajeIVA, CveMetodoPago:=CveMetodoPago, CveRetIVAConcepto:=If(DdlRetIVAConcepto.Items.Count > 0, DdlRetIVAConcepto.SelectedValue.ToEntero, -1), CveConceptoContableAlmacen:=CveConceptoContableAlmacen, CveRetISRConcepto:=If(DdlRetISRConcepto.Items.Count > 0, DdlRetISRConcepto.SelectedValue.ToEntero, -1), NoDeducible:=tNoDeducible, CveTipoCompra:=DdlTipoCompra.SelectedValue.ToEntero, TotalOriginal:=TotalOriginal, CveTipoConcepto:=CveTipoConcepto, @@ -6287,18 +6332,18 @@ Partial Class Compras_Compras 'la diferencia se va aplicar sobre los If diferenciaTransito <> 0 Then - Dim tCveCon As Integer = 65 - If diferenciaTransito < 0 Then - tCveCon = 64 - End If - diferenciaTransito = Math.Abs(diferenciaTransito) + Dim tCveCon As Integer = 65 + If diferenciaTransito < 0 Then + tCveCon = 64 + End If + diferenciaTransito = Math.Abs(diferenciaTransito) If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, If(tCveCon = 64, True, False), diferenciaTransito, diferenciaTransito, tCveCon, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=1, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto) Then ErrorPrepoliza = True End If End If - Else - Dim DiferenciaDevolucion As Decimal = importeMovimiento - TotalRealDevolucion + Else + Dim DiferenciaDevolucion As Decimal = importeMovimiento - TotalRealDevolucion If TotalRealDevolucion <> 0 Then If Math.Abs(DiferenciaDevolucion) > 0 Then diff --git a/Empresas/119/Formatos/RepIVAAcreditable.rpt b/Empresas/119/Formatos/RepIVAAcreditable.rpt index 6bd24cbe1..785773459 100644 Binary files a/Empresas/119/Formatos/RepIVAAcreditable.rpt and b/Empresas/119/Formatos/RepIVAAcreditable.rpt differ diff --git a/Inventarios/EntradasSalidas.aspx b/Inventarios/EntradasSalidas.aspx index 1bcacf197..3163a96a7 100644 --- a/Inventarios/EntradasSalidas.aspx +++ b/Inventarios/EntradasSalidas.aspx @@ -484,6 +484,14 @@ Transitorio +
+ +
+ +
+
diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 9cd866b78..04b1f7155 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -819,6 +819,10 @@ Partial Class Inventarios_EntradasSalidas HplMtoTransitorio.Text = Mov.FolioTransitorio.ToString End If + If DtMov.Rows(0)("CveOrdendeCorte").ToString.ToEntero() > 0 Then + DivOrdenCorte.Visible = True + LblFolioOrdenCorte.Text = DtMov.Rows(0)("FolioOrdendeCorte").ToString + End If If (DdlAlmacen.Items.FindByValue(Mov.CveAlmacen.ToString()) Is Nothing) Then diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 16b544d0b..49e7091bb 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -25969,7 +25969,7 @@ Partial Class Ventas Dim Descuentos As Decimal Dim TCVenta As Decimal Dim FechaVenta As Date - Dim FechaPago As Date = Request("FechaSaldar").ToDate + Dim FechaPago As Date = TxtFechaSaldarVenta.Text.ToDateTime() Dim tCveMoneda As Integer Dim PorcentajePago As Decimal Dim SerieFolio As String = ""