This commit is contained in:
2019-12-02 12:21:49 -07:00
21 changed files with 349 additions and 329 deletions

View File

@@ -5014,7 +5014,7 @@ Namespace Modelos
Public Property EsInterno As Integer = -1 Public Property EsInterno As Integer = -1
Public Property CveEmpresaCRM As Integer = -1 Public Property CveEmpresaCRM As Integer = -1
Public Property EmpresaCRM As String = "" Public Property EmpresaCRM As String = ""
Public Property TotalImpuestoLocal As Double = 0 Public Property TotalImpuestoLocal As Decimal = 0
Public Property AplicaDevolucion As Boolean Public Property AplicaDevolucion As Boolean
Public Property CveVentaDevolucion As Integer Public Property CveVentaDevolucion As Integer
Public Property ObservacionesAlmacen As String Public Property ObservacionesAlmacen As String

View File

@@ -1549,7 +1549,7 @@
function ValidarCantidad(t, c) { function ValidarCantidad(t, c) {
var Ot = 0.00; var Ot = 0.00;
// considera importe de OT ingresos, para que se peuda exceder // considera importe de OT ingresos, para que se peuda exceder
if ($get('TxtOtrosIngresosEgresos')) { Ot = -ToDouble($get('TxtOtrosIngresosEgresos').value);} if ($get('TxtOtrosIngresosEgresos')) { Ot = ToDouble($get('TxtOtrosIngresosEgresos').value);}
t.value = (ToDouble(t.value) > ToDouble(c) + Ot ? c : t.value) t.value = (ToDouble(t.value) > ToDouble(c) + Ot ? c : t.value)
} }

View File

@@ -1381,11 +1381,8 @@ Partial Class Bancos_IE
Dim Banco As New ClsBancos Dim Banco As New ClsBancos
Folio = Banco.GetNextFolio(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero) Folio = Banco.GetNextFolio(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero)
Banco.Dispose() Banco.Dispose()
TxtFolio.Text = Folio.ToString TxtFolio.Text = Folio.ToString
If Opcion = "DevDinC" Then
TxtFolio.Enabled = False
End If
Else Else
TxtFolio.Text = "" TxtFolio.Text = ""
End If End If
@@ -2335,6 +2332,9 @@ Partial Class Bancos_IE
CveConceptoContable = 30 'Bancos CveConceptoContable = 30 'Bancos
CvePlantillaPoliza = 12 CvePlantillaPoliza = 12
End If End If
End If
If Opcion = "DevDinC" Then
CvePlantillaPoliza = 2
End If End If
'Cuando es Egreso sin factura, se registra una compra tipo anticipo 'Cuando es Egreso sin factura, se registra una compra tipo anticipo
@@ -2689,10 +2689,12 @@ Partial Class Bancos_IE
TipoMovtoIE = True TipoMovtoIE = True
Impo = Math.Abs(Impo) Impo = Math.Abs(Impo)
CveConcIE = 78 CveConcIE = 78
IdCtaContableAplicar = UsuarioActual.Empresa.IdCuentaOtrosIngresos
Else Else
TipoMovtoIE = False TipoMovtoIE = False
Impo = Math.Abs(Impo) Impo = Math.Abs(Impo)
CveConcIE = 211 CveConcIE = 211
IdCtaContableAplicar = UsuarioActual.Empresa.Funcionalidad(266).ToEntero
End If End If
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoIE, Impo, ReferenciaAplicar, CveConcIE, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveVenta:=CveVentaDevDin, CveCliente:=CveCliente, ImporteMX:=Impo, ImporteME:=0) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoIE, Impo, ReferenciaAplicar, CveConcIE, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveVenta:=CveVentaDevDin, CveCliente:=CveCliente, ImporteMX:=Impo, ImporteME:=0) Then
@@ -2815,12 +2817,15 @@ Partial Class Bancos_IE
TipoMovtoIE = True TipoMovtoIE = True
Impo = Math.Abs(Impo) Impo = Math.Abs(Impo)
CveConcIE = 78 CveConcIE = 78
IdCtaContableAplicar = UsuarioActual.Empresa.IdCuentaOtrosIngresos
Else Else
TipoMovtoIE = False TipoMovtoIE = False
Impo = Math.Abs(Impo) Impo = Math.Abs(Impo)
CveConcIE = 211 CveConcIE = 211
IdCtaContableAplicar = UsuarioActual.Empresa.Funcionalidad(266).ToEntero
End If End If
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoIE, Impo, ReferenciaAplicar, CveConcIE, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=Impo, ImporteME:=0, CveCuenta:=CveCuentaConta, TipoCambio:=TCDocumento) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoIE, Impo, ReferenciaAplicar, CveConcIE, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=Impo, ImporteME:=0, CveCuenta:=CveCuentaConta, TipoCambio:=TCDocumento) Then
MsgError = "Ocurrió un error al registrar el asiento de pago de devolución" MsgError = "Ocurrió un error al registrar el asiento de pago de devolución"
Exit Select Exit Select

View File

@@ -2777,8 +2777,14 @@ Partial Class Bancos_ProveedoresAbonar
If gr.DataKey("IEPS").ToDecimal > 0 Then If gr.DataKey("IEPS").ToDecimal > 0 Then
Dim IEPS As Decimal = PorcentajePago * gr.DataKey("IEPS").ToDecimal Dim IEPS As Decimal = PorcentajePago * gr.DataKey("IEPS").ToDecimal
If ObjConta.GetRetCuenta(25, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditarSIG").ToString.ToEntero
End If
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IEPS, gr.DataKey("SerieFolio").ToString, 25, ConceptoPartida, Now, IdCtaContable:=CtaProveedor, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=If(CveMoneda = 1, IEPS, IEPS * If(FuncionalidadFluctuacionImpuestos, TCPago, TCCompra)), CveCuenta:=CveCuenta) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IEPS, gr.DataKey("SerieFolio").ToString, 25, ConceptoPartida, Now, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=If(CveMoneda = 1, IEPS, IEPS * If(FuncionalidadFluctuacionImpuestos, TCPago, TCCompra)), CveCuenta:=CveCuenta) Then
MsgError = "Ocurrio un error al saldar el movimiento" MsgError = "Ocurrio un error al saldar el movimiento"
End If End If

View File

@@ -159,12 +159,12 @@ Partial Class Compras_RepNotasCredito
If UsaComplementaria AndAlso CveMoneda > 1 Then If UsaComplementaria AndAlso CveMoneda > 1 Then
ImporteComplementaria = (Importe * TCCompra - Importe).RoundSQL ImporteComplementaria = (Importe * TCCompra - Importe).RoundSQL
IdCtaContableComplementaria = gr.DataKey("IdCtaContComplementaria").ToEntero IdCtaContableComplementaria = gr.DataKey("IdCtaContComplementaria").ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, -ImporteComplementaria, "", 235, Concepto, TxtFechaSaldar.Text.ToDate, IdCtaContableComplementaria, -1, CveCompra:=gr.DataKey("CveCompra").ToEntero, CveCompraAmortizacion:=gr.DataKey("CveCompra").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, ImporteMX:=-ImporteComplementaria, ImporteME:=-ImporteComplementaria, TipoCambioPago:=TC, TipoCambio:=TCCompra) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, -ImporteComplementaria, "", 235, Concepto, TxtFechaSaldar.Text.ToDate, IdCtaContableComplementaria, -1, CveCompra:=gr.DataKey("CveCompra").ToEntero, CveCompraAmortizacion:=gr.DataKey("CveCompra").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, ImporteMX:=-ImporteComplementaria, ImporteME:=-Importe, TipoCambioPago:=TC, TipoCambio:=TCCompra) Then
MsgError = "Ocurrio un Error al saldar el movimiento" MsgError = "Ocurrio un Error al saldar el movimiento"
End If End If
End If End If
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(564).ToString.ToEntero IdCtaContable = UsuarioActual.Empresa.Funcionalidad(266).ToString.ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Importe, "", 211, Concepto, TxtFechaSaldar.Text.ToDate, IdCtaContable, -1, gr.DataKey("CveIE").ToEntero, ImporteMX:=If(CveMoneda > 1, (Importe * TC), Importe).RoundSQL, CveCuenta:=-1, CveCompra:=gr.DataKey("CveCompra").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Importe, "", 211, Concepto, TxtFechaSaldar.Text.ToDate, IdCtaContable, -1, gr.DataKey("CveIE").ToEntero, ImporteMX:=If(CveMoneda > 1, (Importe * TC), Importe).RoundSQL, CveCuenta:=-1, CveCompra:=gr.DataKey("CveCompra").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero) Then
MsgError = "Ocurrio un Error al saldar el movimiento" MsgError = "Ocurrio un Error al saldar el movimiento"
End If End If

View File

@@ -210,6 +210,10 @@ Partial Class ContabilidadC_RegPrePoliza
GvConcepto.Columns(4).Visible = False GvConcepto.Columns(4).Visible = False
GvMov.Columns(5).Visible = False GvMov.Columns(5).Visible = False
End If End If
If IfNull(Request("Conta"), "").ToString = "1" Then
Contabilizar()
End If
Exit Sub Exit Sub
Else Else
@@ -1454,8 +1458,17 @@ Partial Class ContabilidadC_RegPrePoliza
Private Sub BtnContabilizar_Click(sender As Object, e As EventArgs) Handles BtnContabilizar.Click Private Sub BtnContabilizar_Click(sender As Object, e As EventArgs) Handles BtnContabilizar.Click
Contabilizar()
End Sub
Private Sub Contabilizar()
Dim ObjConta As New ClsContabilidad Dim ObjConta As New ClsContabilidad
If IdPoliza > 0 Then 'si está bloqueada, lo desbloqueaprimero
ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False)
End If
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, pIDPoliza:=If(IdPoliza > 0, IdPoliza, -1)) Then If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, pIDPoliza:=If(IdPoliza > 0, IdPoliza, -1)) Then
Alert(String.Format("Prepóliza contabilizada. <br/><br/>Folio:<a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", ObjConta.ContaIdPoliza), ModExtensiones.TipoMensaje.MsgInformacion) Alert(String.Format("Prepóliza contabilizada. <br/><br/>Folio:<a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", ObjConta.ContaIdPoliza), ModExtensiones.TipoMensaje.MsgInformacion)
Else Else
@@ -1463,14 +1476,13 @@ Partial Class ContabilidadC_RegPrePoliza
Alert($"Ocurrio un error al contabilizar {ObjConta.AlertaMensaje}", TipoMensaje.MsgAdvertencia) Alert($"Ocurrio un error al contabilizar {ObjConta.AlertaMensaje}", TipoMensaje.MsgAdvertencia)
End If End If
ObjConta.Dispose() ObjConta.Dispose()
End Sub
End Sub
#Region "COMPLEMENTO DE PAGO" #Region "COMPLEMENTO DE PAGO"
Private Sub GeneraTimbre(CvePrePoliza As Integer) Private Sub GeneraTimbre(CvePrePoliza As Integer)
Dim Str As New StringBuilder Dim Str As New StringBuilder
Dim Banco As New ClsBancos Dim Banco As New ClsBancos

View File

@@ -595,11 +595,10 @@
</Style> </Style>
</TextRun> </TextRun>
<TextRun> <TextRun>
<Value>=Parameters!ClienteNombre.Value</Value> <Value>=Parameters!ClienteCodigo.Value</Value>
<Style> <Style>
<FontFamily>Myriad Pro</FontFamily> <FontFamily>Myriad Pro</FontFamily>
<FontSize>9pt</FontSize> <FontSize>9pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style> </Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
@@ -833,52 +832,6 @@
<TextAlign>Left</TextAlign> <TextAlign>Left</TextAlign>
</Style> </Style>
</Paragraph> </Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Pedido/Contrato: </Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>9pt</FontSize>
<FontWeight>SemiBold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!PedidoContrato.Value</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>9pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Orden Compra: </Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>9pt</FontSize>
<FontWeight>SemiBold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!OrdenCompra.Value</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>9pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox2</rd:DefaultName> <rd:DefaultName>Textbox2</rd:DefaultName>
<Top>0.05159in</Top> <Top>0.05159in</Top>
@@ -1376,6 +1329,29 @@
</Paragraph> </Paragraph>
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun>
<Value>Vencimiento</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>9.64pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>: </Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>9.64pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!Vencimiento.Value</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>9.64pt</FontSize>
</Style>
</TextRun>
<TextRun> <TextRun>
<Value xml:space="preserve"> </Value> <Value xml:space="preserve"> </Value>
<Style> <Style>
@@ -1384,14 +1360,6 @@
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
</Style> </Style>
</TextRun> </TextRun>
<TextRun>
<Value>=iif(Parameters!TipoCambio.Value &lt;= 1, "", "Tipo Cambio: " &amp; Parameters!TipoCambio.Value)</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>6.5pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
</TextRuns> </TextRuns>
<Style> <Style>
<TextAlign>Right</TextAlign> <TextAlign>Right</TextAlign>
@@ -1399,6 +1367,14 @@
</Paragraph> </Paragraph>
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun>
<Value>Moneda</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>9.16pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun> <TextRun>
<Value>Forma de pago: </Value> <Value>Forma de pago: </Value>
<Style> <Style>
@@ -1639,7 +1615,7 @@
<Width>0.8527in</Width> <Width>0.8527in</Width>
</TablixColumn> </TablixColumn>
<TablixColumn> <TablixColumn>
<Width>3.02234in</Width> <Width>3.66416in</Width>
</TablixColumn> </TablixColumn>
<TablixColumn> <TablixColumn>
<Width>0.57354in</Width> <Width>0.57354in</Width>
@@ -1650,9 +1626,6 @@
<TablixColumn> <TablixColumn>
<Width>0.61967in</Width> <Width>0.61967in</Width>
</TablixColumn> </TablixColumn>
<TablixColumn>
<Width>0.64182in</Width>
</TablixColumn>
<TablixColumn> <TablixColumn>
<Width>0.79194in</Width> <Width>0.79194in</Width>
</TablixColumn> </TablixColumn>
@@ -1918,43 +1891,6 @@
</Textbox> </Textbox>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox4">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>IEPS</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>9.5pt</FontSize>
<FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox4</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>#3a4173</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell> <TablixCell>
<CellContents> <CellContents>
<Textbox Name="Textbox6"> <Textbox Name="Textbox6">
@@ -2216,7 +2152,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>=Fields!ImporteIVA.Value &amp; iif(Fields!PorcentajeIVA.Value = "0.16", " (16%)"," (0%)")</Value> <Value>=Fields!ImporteIVA.Value</Value>
<Style> <Style>
<FontFamily>Myriad Pro</FontFamily> <FontFamily>Myriad Pro</FontFamily>
<FontSize>7.5pt</FontSize> <FontSize>7.5pt</FontSize>
@@ -2243,42 +2179,6 @@
</Textbox> </Textbox>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="ImporteIEPS">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=iif(Fields!PorcentajeIEPS.Value = "0.03",Fields!ImporteIEPS.Value &amp; " (3%)",iif(Fields!PorcentajeIEPS.Value = "0.06",Fields!ImporteIEPS.Value &amp; " (6%)",iif(Fields!PorcentajeIEPS.Value = "0.07",Fields!ImporteIEPS.Value &amp; " (7%)",iif(Fields!PorcentajeIEPS.Value = "0.09",Fields!ImporteIEPS.Value &amp; " (9%)",""))))</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>7.5pt</FontSize>
<FontWeight>Normal</FontWeight>
<Format>#,0.00;-#,0.00;'(Ninguna)'</Format>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>ImporteIEPS</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell> <TablixCell>
<CellContents> <CellContents>
<Textbox Name="TiempoEntrega"> <Textbox Name="TiempoEntrega">
@@ -2330,7 +2230,6 @@
<TablixMember /> <TablixMember />
<TablixMember /> <TablixMember />
<TablixMember /> <TablixMember />
<TablixMember />
</TablixMembers> </TablixMembers>
</TablixColumnHierarchy> </TablixColumnHierarchy>
<TablixRowHierarchy> <TablixRowHierarchy>

View File

@@ -861,7 +861,11 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>Tipo:</Value> <Value>Tipo: </Value>
<Style />
</TextRun>
<TextRun>
<Value>=Parameters!Tipo.Value</Value>
<Style /> <Style />
</TextRun> </TextRun>
</TextRuns> </TextRuns>
@@ -941,7 +945,11 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>Marca:</Value> <Value>Marca: </Value>
<Style />
</TextRun>
<TextRun>
<Value>=Parameters!Marca.Value</Value>
<Style /> <Style />
</TextRun> </TextRun>
</TextRuns> </TextRuns>
@@ -1913,6 +1921,18 @@
<AllowBlank>true</AllowBlank> <AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt> <Prompt>ReportParameter1</Prompt>
</ReportParameter> </ReportParameter>
<ReportParameter Name="Tipo">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="Marca">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters> </ReportParameters>
<Language>Es-MX</Language> <Language>Es-MX</Language>
<rd:ReportUnitType>Inch</rd:ReportUnitType> <rd:ReportUnitType>Inch</rd:ReportUnitType>

View File

@@ -179,7 +179,7 @@ Partial Class Inventarios_PrestamosdeProveedor
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoAlmacen, tValorInventario, TxtObservacionesEntrega.Text.Trim, 68, TxtObservacionesEntrega.Text.Trim, Fecha, idCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=tValorInventario) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoAlmacen, tValorInventario, TxtObservacionesEntrega.Text.Trim, 68, TxtObservacionesEntrega.Text.Trim, Fecha, idCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=tValorInventario) Then
ErrorMovInv = True ErrorMovInv = True
Else Else
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoAlmacen, -tValorInventario, TxtObservacionesEntrega.Text.Trim, CveConceptoContable, TxtObservacionesEntrega.Text.Trim, Fecha, IdCtaContableOtro, -1, CveMovimientoAlmacen:=CveMovimientoSalida, CveClasificacion:=CveClasifCosto, ImporteMX:=tValorInventario) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoAlmacen, -tValorInventario, TxtObservacionesEntrega.Text.Trim, CveConceptoContable, TxtObservacionesEntrega.Text.Trim, Fecha, IdCtaContableOtro, -1, CveMovimientoAlmacen:=CveMovimientoSalida, CveClasificacion:=CveClasifCosto, ImporteMX:=-tValorInventario) Then
ErrorMovInv = True ErrorMovInv = True
End If End If
End If End If

View File

@@ -321,7 +321,7 @@
<Columns> <Columns>
<asp:TemplateField HeaderText="Serie-Folio" ItemStyle-Width="20%"> <asp:TemplateField HeaderText="Serie-Folio" ItemStyle-Width="20%">
<ItemTemplate> <ItemTemplate>
<asp:Label runat="server" ID="LblFolio" Text='<%# Eval("SerieFolio")%>' /> <asp:HyperLink runat="server" ID="HplFolio" Text='<%# Eval("SerieFolio")%>' NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}")%>' />
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField DataField="NombreComercial" HeaderText="Cliente"/> <asp:BoundField DataField="NombreComercial" HeaderText="Cliente"/>

View File

@@ -1052,68 +1052,80 @@ Partial Class Inventarios_RecepcionUsados
Else Else
Dim Mensaje As String = "" Dim Mensaje As String = ""
If Not ErrorMovInv AndAlso GenerarRNC AndAlso ObjRemisionNC IsNot Nothing Then
CargaDTDetalleRNC()
Dim Resp = ObjRemisionNC.EmitirFactura(False)
For Each mensaje2 As String In Resp.Mensajes
Msg.AppendFormat("<br>{0}", mensaje2)
Next
Alert(Msg.ToString, If(Resp.CveVenta > 0, TipoMensaje.MsgInformacion, TipoMensaje.MsgAdvertencia))
CveVenta = Resp.CveVenta
End If
For Each Dr As DataRow In DtMovimientos.Rows For Each Dr As DataRow In DtMovimientos.Rows
If CveConcepto = 2 AndAlso DdlMoneda.SelectedValue.ToEntero = 2 Then If CveConcepto = 2 AndAlso DdlMoneda.SelectedValue.ToEntero = 2 Then
ImporteConcepto = Dr("PU").ToString.ToDouble * GlobalTipoCambio(TxtFecha.Text.ToDate) ImporteConcepto = Dr("PU").ToString.ToDouble * GlobalTipoCambio(TxtFecha.Text.ToDate)
Else Else
ImporteConcepto = Dr("PU").ToString.ToDouble ImporteConcepto = Dr("PU").ToString.ToDouble
End If End If
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
Mensaje = "Error al guardar los movimientos" Mensaje = "Error al guardar los movimientos"
ErrorMovInv = True ErrorMovInv = True
Exit For Exit For
End If End If
If Not ObjVentas.UpdateVentaUsadoRecibido(CveVenta, Dr("CvePS").ToString.ToEntero, True) Then If CveVenta > 0 AndAlso Not ObjVentas.UpdateVentaUsadoRecibido(CveVenta, Dr("CvePS").ToString.ToEntero, True) Then
Mensaje = "Error al actualizar el recibo de los usados" Mensaje = "Error al actualizar el recibo de los usados"
ErrorMovInv = True ErrorMovInv = True
Exit For Exit For
End If End If
'si es selectedvalue = 2, es entrada ,3 -salida
Dim CveConceptoUsados As Integer = If(RBLOpcion.SelectedValue.ToEntero = 2, 1, 2) Dim CveConceptoUsados As Integer = If(RBLOpcion.SelectedValue.ToEntero = 2, 1, 2)
If RBLOpcion.SelectedValue.ToEntero <> 3 AndAlso Not GenerarRNC Then If RBLOpcion.SelectedValue.ToEntero = 2 AndAlso EsDistribuidor Then
If EsDistribuidor Then
If Not ObjAcum.DistribuidorMovtosAdd(DdlClientes.SelectedValue.ToEntero, Dr("Cantidad").ToString.ToEntero(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, -1, UsuarioActual.CveUsuario, If Not ObjAcum.DistribuidorMovtosAdd(DdlClientes.SelectedValue.ToEntero, Dr("Cantidad").ToString.ToEntero(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, CveVenta, UsuarioActual.CveUsuario,
UsuarioActual.CveEmpresa, CveVenta, Dr("Observaciones").ToString, CveMovimiento:=CveMovimiento) Then UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, CveMovimiento:=CveMovimiento) Then
Mensaje = "Error al guardar Movimientos de distribuidor" Mensaje = "Error al guardar Movimientos de distribuidor"
ErrorMovInv = True ErrorMovInv = True
Exit For Exit For
End If
End If End If
End If End If
Next Next
If Not ErrorMovInv Then If Not ErrorMovInv Then
Msg.AppendFormat("<br/>El Movimiento se registro con el Folio: <b>{0}</b>", ObjInventario.Folio) Msg.AppendFormat("<br/>El Movimiento se registro con el Folio: <b>{0}</b>", ObjInventario.Folio)
Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento))) Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
If IDPoliza > 0 Then Msg = Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza) If IDPoliza > 0 Then Msg = Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza)
ObjInventario.Commit() ' aplica los movimientos insertados ObjInventario.Commit() ' aplica los movimientos insertados
'Limpia Valores cuando inserta de campos especiales 'Limpia Valores cuando inserta de campos especiales
If UsuarioActual.CveEmpresa = 66 Then If UsuarioActual.CveEmpresa = 66 Then
DdlSubProyecto.SelectedValueExist("-1") DdlSubProyecto.SelectedValueExist("-1")
End If
EnvioCorreo()
CargaPendientesRecibir()
UPDatos.Update()
Else
ObjInventario.RollBack() 'deshace lo insertado
CveMovimiento = 0
Alert("ocurrió un Error al registrar los movimientos", TipoMensaje.MsgError)
End If End If
EnvioCorreo()
CargaPendientesRecibir()
UPDatos.Update()
Else
ObjInventario.RollBack() 'deshace lo insertado
CveMovimiento = 0
Alert("ocurrió un Error al registrar los movimientos", TipoMensaje.MsgError)
End If End If
End If End If
End If
Catch ex As Exception Catch ex As Exception
ObjInventario.RollBack() 'deshace lo insertado ObjInventario.RollBack() 'deshace lo insertado
CveMovimiento = 0 CveMovimiento = 0
@@ -1125,17 +1137,7 @@ Partial Class Inventarios_RecepcionUsados
ObjAcum.Dispose() ObjAcum.Dispose()
ObjVentas.Dispose() ObjVentas.Dispose()
If Not ErrorMovInv AndAlso GenerarRNC AndAlso ObjRemisionNC IsNot Nothing Then If Not ErrorMovInv Then
CargaDTDetalleRNC()
Dim Resp = ObjRemisionNC.EmitirFactura(False)
For Each mensaje As String In Resp.Mensajes
Msg.AppendFormat("<br>{0}", mensaje)
Next
Alert(Msg.ToString, If(Resp.CveVenta > 0, TipoMensaje.MsgInformacion, TipoMensaje.MsgAdvertencia))
ElseIf Not ErrorMovInv Then
Alert(Msg.ToString, TipoMensaje.MsgInformacion) Alert(Msg.ToString, TipoMensaje.MsgInformacion)
End If End If
@@ -1639,51 +1641,6 @@ Partial Class Inventarios_RecepcionUsados
End Sub End Sub
#End Region #End Region
#Region " CONSUMO INTERNO "
'Private Sub ActivaConsumoInterno()
' EsConsumoInterno = True
' DdlAlmacen.AutoPostBack = False
' DivFolio1.Visible = False
' DivFolio2.Visible = False
' divMonedaSeccion.Visible = False
' divGuia.Visible = False
' TrResponsable.Visible = False
' CargaPersonal()
' 'RECARGA ALMACENES SOLO DE CONSUMO INTERNO
' DdlAlmacen.Items.Clear()
' DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 22) 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
' DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
' DdlAlmacen.SelectedValue = "-1"
' DdlAlmacen.DataBind()
' If IsNothing(Request("CveMovimiento")) Then
' DdlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen)
' End If
'End Sub
#End Region
#Region "PAQUETERIA GUIA"
'Protected Sub LnkAgregarGuia_Click(sender As Object, e As EventArgs)
' RegistraScript(String.Format("AbrirVentana('/General/PopUpPaqueteriasGuias.aspx?CveMovimiento={0}',800,620);", CveMovimiento))
'End Sub
#End Region
#Region "DDL CLIENTE / CLIENTE SUCURSAL - SELECTED INDEX CHANGED" #Region "DDL CLIENTE / CLIENTE SUCURSAL - SELECTED INDEX CHANGED"
@@ -1845,22 +1802,6 @@ Partial Class Inventarios_RecepcionUsados
#End Region #End Region
Private Sub GuardarBitacora(CveVenta As Integer, RutaAdjunto As String, Obser As String)
Dim ObjEventos As New ClsOIEventos()
Try
If ObjEventos.AddEventoBitacora(Obser, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVenta) Then
End If
Catch ex As Exception
OnError("Se presento un error al guardar la Bitacora", ex)
End Try
ObjEventos.Dispose()
End Sub
Protected Sub LnkAgregarUsado_Click(sender As Object, e As EventArgs) Protected Sub LnkAgregarUsado_Click(sender As Object, e As EventArgs)
AgregarUsado = True AgregarUsado = True

View File

@@ -115,6 +115,15 @@ Partial Class OC_CotizacionEnLinea
CType(Me.Master, Site).EsPopup = True CType(Me.Master, Site).EsPopup = True
CType(Me.Master, Site).PopupWidth = 670 CType(Me.Master, Site).PopupWidth = 670
If Request("CvePrePoliza") IsNot Nothing AndAlso IsNumeric(Request("CvePrePoliza")) AndAlso Request("CvePrePoliza").ToEntero > 0 Then
If IfNull(Request("Conta"), "").ToString = "1" Then
Contabilizar(Request("CveEmpresa").ToEntero, Request("CvePrePoliza").ToEntero, Request("IdPoliza").ToEntero)
End If
Exit Sub
End If
'Validar que este activo aun el link 'Validar que este activo aun el link
'ViewState("CveOrdenCompra") = If(Not Request("CveOrdenCompra") Is Nothing AndAlso Request("CveOrdenCompra").ToString.ToEntero > 0, Request("CveOrdenCompra").ToEntero, 0) 'ViewState("CveOrdenCompra") = If(Not Request("CveOrdenCompra") Is Nothing AndAlso Request("CveOrdenCompra").ToString.ToEntero > 0, Request("CveOrdenCompra").ToEntero, 0)
'ViewState("CveProveedor") = If(Not Request("CveProveedor") Is Nothing AndAlso Request("CveProveedor").ToString.ToEntero > 0, Request("CveProveedor").ToEntero, 0) 'ViewState("CveProveedor") = If(Not Request("CveProveedor") Is Nothing AndAlso Request("CveProveedor").ToString.ToEntero > 0, Request("CveProveedor").ToEntero, 0)
@@ -147,6 +156,32 @@ Partial Class OC_CotizacionEnLinea
End If End If
End Sub End Sub
Private Sub Contabilizar(CveEmpresa As Integer, CvePrePoliza As Integer, IdPoliza As Integer)
Dim ObjConta As New ClsContabilidad
If IdPoliza > 0 Then 'si está bloqueada, lo desbloqueaprimero
ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False)
End If
Dim Emp As Empresa = Nothing
Dim Empr As New ClsSisEmpresas
If Empr.GetEmpresas(CveEmpresa, "-1", "-1", "-1", "-1") Then
Emp = Empr.Empresa
End If
Empr.Dispose()
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, 100, Emp, pIDPoliza:=If(IdPoliza > 0, IdPoliza, -1)) Then
' Alert(String.Format("Prepóliza contabilizada. <br/><br/>Folio:<a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", ObjConta.ContaIdPoliza), ModExtensiones.TipoMensaje.MsgInformacion)
Else
'Alert($"Ocurrio un error al contabilizar {ObjConta.AlertaMensaje}", TipoMensaje.MsgAdvertencia)
End If
ObjConta.Dispose()
End Sub
Protected Sub CargaMonedas() Protected Sub CargaMonedas()
Dim objMonedas As New ClsMonedas Dim objMonedas As New ClsMonedas

View File

@@ -104,7 +104,7 @@
</table--%> </table--%>
<div style=""> <div style="">
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveFolio,FInicial,FActual,FFinal,Estado,TipoDocto,CveSubProyecto" EmptyDataText="No se encontraron Folios registrados" TShowHeader="true" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" GridLines="None"> <asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveFolio,FInicial,FActual,FFinal,Estado,TipoDocto,CveSubProyecto,Serie" EmptyDataText="No se encontraron Folios registrados" TShowHeader="true" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" GridLines="None">
<Columns> <Columns>
<%-- <asp:BoundField DataField="Sucursal" HeaderText="Sucursal" />--%> <%-- <asp:BoundField DataField="Sucursal" HeaderText="Sucursal" />--%>
<asp:BoundField DataField="SubProyecto" HeaderText="Centro Costo" ItemStyle-HorizontalAlign="Left"/> <asp:BoundField DataField="SubProyecto" HeaderText="Centro Costo" ItemStyle-HorizontalAlign="Left"/>
@@ -182,7 +182,12 @@
<asp:RequiredFieldValidator ID="RFVTipoDocto" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlTipoDocto" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Docto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVTipoDocto" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlTipoDocto" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Docto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
<label for="<%= DdlTipoDocto.ClientID.ToString()%>">Tipo Docto:</label> <label for="<%= DdlTipoDocto.ClientID.ToString()%>">Tipo Docto:</label>
</div> </div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtSerie" runat="server" CausesValidation="true" MaxLength="10" CssClass="form-control"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVSerie" runat="server" CssClass="help-block errorimput miclase" ControlToValidate="TxtSerie" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Serie''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
<label for="<%= TxtSerie.ClientID.ToString()%>">Serie:</label>
</div>
<%-- <div class="form-group form-md-line-input input-iconright"> <%-- <div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtAprobacion" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox> <asp:TextBox ID="TxtAprobacion" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVAprobacion" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtAprobacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Aprobación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVAprobacion" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtAprobacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Aprobación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
@@ -229,8 +234,16 @@
<br /> <br />
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control" Checked="true" /> <div class="row">
<label for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label> <div class="col-md-6">
<label for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
<asp:CheckBox ID="ChkEstatus" runat="server" Checked="true" />
</div>
<div class="col-md-6" align="right" runat="server">
<label for="<%= ChkSeguirAgregando.ClientID.ToString()%>">Seguir agregando:</label>
<asp:CheckBox ID="ChkSeguirAgregando" runat="server" Checked="true" />
</div>
</div>
</div> </div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>

View File

@@ -110,7 +110,6 @@ Partial Class CatFolios
TxtFolioInicial.Text = "" TxtFolioInicial.Text = ""
TxtFolioFinal.Text = "" TxtFolioFinal.Text = ""
TxtFolioActual.Text = "" TxtFolioActual.Text = ""
txtserie.text = ""
DivFactual.Visible = False DivFactual.Visible = False
CargaSubProyectos() CargaSubProyectos()
@@ -125,6 +124,7 @@ Partial Class CatFolios
HdnModalidad.Value = "U" HdnModalidad.Value = "U"
DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto")) DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto"))
DdlTipoDocto.SelectedValueExist(GvRow.DataKey("TipoDocto")) DdlTipoDocto.SelectedValueExist(GvRow.DataKey("TipoDocto"))
TxtSerie.Text = (GvRow.DataKey("Serie"))
ChkEstatus.Checked = If(GvRow.DataKey("Estado").ToString = "Activo", True, False) ChkEstatus.Checked = If(GvRow.DataKey("Estado").ToString = "Activo", True, False)
TxtFolioInicial.Text = (GvRow.DataKey("FInicial")) TxtFolioInicial.Text = (GvRow.DataKey("FInicial"))
TxtFolioFinal.Text = (GvRow.DataKey("FFinal")) TxtFolioFinal.Text = (GvRow.DataKey("FFinal"))
@@ -169,12 +169,12 @@ Partial Class CatFolios
If HdnModalidad.Value = "I" Then If HdnModalidad.Value = "I" Then
If Not ObjFolios.AddFolios(DdlSubProyecto.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue, TxtFolioInicial.Text.Trim.ToEntero, TxtFolioInicial.Text.Trim.ToEntero, If Not ObjFolios.AddFolios(DdlSubProyecto.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue, TxtSerie.Text, TxtFolioInicial.Text.Trim.ToEntero, TxtFolioInicial.Text.Trim.ToEntero,
TxtFolioFinal.Text.Trim.Trim.ToEntero, Session("FileUpload").ToString, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then TxtFolioFinal.Text.Trim.Trim.ToEntero, Session("FileUpload").ToString, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
TieneError = True TieneError = True
End If End If
Else Else
If Not ObjFolios.UpdateFolios(DdlSubProyecto.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue, TxtFolioInicial.Text.Trim.ToEntero, TxtFolioActual.Text.Trim.ToEntero, TxtFolioFinal.Text.Trim.ToEntero, If Not ObjFolios.UpdateFolios(DdlSubProyecto.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue, TxtSerie.Text, TxtFolioInicial.Text.Trim.ToEntero, TxtFolioActual.Text.Trim.ToEntero, TxtFolioFinal.Text.Trim.ToEntero,
"", If(ChkEstatus.Checked, True, False), UsuarioActual.CveUsuario, CveFolio) Then "", If(ChkEstatus.Checked, True, False), UsuarioActual.CveUsuario, CveFolio) Then
TieneError = True TieneError = True
End If End If
@@ -193,15 +193,19 @@ Partial Class CatFolios
Session("FileUpload") = "" Session("FileUpload") = ""
Alert("El nuevo Folio se guardó/editó correctamente.", TipoMensaje.MsgInformacion) Alert("La nueva Aprobación de Folios se guardó/editó correctamente.", TipoMensaje.MsgInformacion)
GlobalDTFolios = ObjFolios.DtResultados GlobalDTFolios = ObjFolios.DtResultados
ViewState("DTFolios") = ObjFolios.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) ViewState("DTFolios") = ObjFolios.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
CargaDatos() CargaDatos()
If Not ChkSeguirAgregando.Checked Then
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarFolio"))
Else
DdlSubProyecto.SelectedIndex = 0
End If
UpDatos.Update() UpDatos.Update()
UpAddFolio.Update() UpAddFolio.Update()
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarFolio"))
End If End If

View File

@@ -8899,7 +8899,7 @@ Partial Class Clientes
GvAcum.DataSource = ObjAcum.DtResultados GvAcum.DataSource = ObjAcum.DtResultados
LblUsadosPuntos.Text = (ObjAcum.DtResultados.SUM("Puntos", " CveConcepto = 2 ") - ObjAcum.DtResultados.SUM("Puntos", " CveConcepto = 1 ")).ToDecimal.FormatoNumero(2) LblUsadosPuntos.Text = (ObjAcum.DtResultados.SUM("Puntos", " CveConcepto = 2 ") - ObjAcum.DtResultados.SUM("Puntos", " CveConcepto IN (1,3) ")).ToDecimal.FormatoNumero(2)
ImporteCargo = ObjAcum.DtResultados.SUM("ImporteCargo", "(FacturadoCargo = 0 OR FacturadoCargo IS NULL) AND CveConcepto = 1 ").ToDecimal ImporteCargo = ObjAcum.DtResultados.SUM("ImporteCargo", "(FacturadoCargo = 0 OR FacturadoCargo IS NULL) AND CveConcepto = 1 ").ToDecimal
ImporteBonificacion = ObjAcum.DtResultados.SUM("ImporteBonificacion", "(FacturadoBonificacion = 0 OR FacturadoBonificacion IS NULL) AND CveConcepto = 1 ").ToDecimal ImporteBonificacion = ObjAcum.DtResultados.SUM("ImporteBonificacion", "(FacturadoBonificacion = 0 OR FacturadoBonificacion IS NULL) AND CveConcepto = 1 ").ToDecimal
@@ -9928,7 +9928,14 @@ Partial Class Clientes
End Sub End Sub
Private Sub LnkUsadosReset_Click(sender As Object, e As EventArgs) Handles LnkUsadosReset.Click Private Sub LnkUsadosReset_Click(sender As Object, e As EventArgs) Handles LnkUsadosReset.Click
Alert("Puntuación Inicializada")
Dim Acum As New ClsAcumuladores
Dim Puntos As Decimal = -LblUsadosPuntos.Text.ToDecimal
If Acum.DistribuidorMovtosAdd(CveCliente, 1, 1, 3, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Puntos, "Saldo Inicializado") Then
Alert("Puntuación Inicializada")
End If
Acum.Dispose()
End Sub End Sub
#End Region #End Region
End Class End Class

View File

@@ -2802,6 +2802,15 @@
</div> </div>
</div> </div>
</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>
</div>
</div>
<div class="row"> <div class="row">
<div class="col-md-9"> <div class="col-md-9">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
@@ -2820,6 +2829,15 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row">
<div class="col-md-12">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlBCIAjuste" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="BCI" DataValueField="CveBCIUsado" Width="100%" AutoPostBack="true">
</asp:DropDownList>
<label for="<%= DdlBCIAjuste.ClientID.ToString()%>">BCI:</label>
</div>
</div>
</div>
<div class="row"> <div class="row">
<div class="col-md-8"> <div class="col-md-8">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
@@ -2933,7 +2951,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row" style="margin-top:17px;">
<div class="col-md-2"> <div class="col-md-2">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPoliza" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox> <asp:TextBox ID="TxtPoliza" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>

View File

@@ -4973,6 +4973,25 @@ Partial Class PV
UpAjuste.Update() UpAjuste.Update()
End Sub 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
DdlBCIAjuste.DataSource = ObjGral.DtResultados
End If
ObjGral.Dispose()
DdlBCIAjuste.DataBind()
End Sub
Private Sub CargaAjuste() Private Sub CargaAjuste()
Dim ObjAcum As New ClsAcumuladores Dim ObjAcum As New ClsAcumuladores
If ObjAcum.FoliosGarantiaGet(-1, UsuarioActual.CveEmpresa) Then If ObjAcum.FoliosGarantiaGet(-1, UsuarioActual.CveEmpresa) Then
@@ -5007,7 +5026,8 @@ Partial Class PV
CreaDTmpDTAjustes() CreaDTmpDTAjustes()
CreaDTmpDTRecepcionUsados() CreaDTmpDTRecepcionUsados()
CargaClienteAjuste()
CargaBCIAjuste()
DivChkAjuste.Visible = True DivChkAjuste.Visible = True
End Sub End Sub
@@ -5206,7 +5226,8 @@ Partial Class PV
If ObjAcum.GarantiasMesesGet(-1, UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero) Then If ObjAcum.GarantiasMesesGet(-1, UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero) Then
If ObjAcum.DtResultados.Rows.Count > 0 Then If ObjAcum.DtResultados.Rows.Count > 0 Then
TxtPorcentajeAjuste.Text = (ObjAcum.DtResultados.Rows(0)("Valor").ToString.ToDouble / 100).ToString TxtPorcentajeAjuste.Text = (ObjAcum.DtResultados.Rows(0)("Valor").ToString.ToDouble / 100).ToString
TxtImporteAjuste.Text = (TxtPorcentajeAjuste.Text.ToDouble * TxtPUFactura.Text.ToDouble).FormatoNumero
TxtImporteAjuste.Text = (TxtPorcentajeAjuste.Text.ToDecimal * TxtPUFactura.Text.ToDecimal).FormatoNumero
Dim CargoVendido As Decimal = 0 Dim CargoVendido As Decimal = 0
Dim CargoGarantia As Decimal = 0 Dim CargoGarantia As Decimal = 0
@@ -5240,7 +5261,7 @@ Partial Class PV
CargoGarantia = CargoVendido CargoGarantia = CargoVendido
End If End If
TxtImporteAjuste.ToolTip = $"La diferencia de ajuste fue: {(TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble).FormatoNumero()}. La diferencia de tamaños fue: {(CargoVendido - CargoGarantia).FormatoNumero}." TxtImporteAjuste.ToolTip = $"La diferencia de ajuste fue: {(TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble).FormatoNumero()}. La diferencia de tamaños fue: {(CargoVendido - CargoGarantia).FormatoNumero}."
TxtImporteAjuste.Text = ((TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia)).FormatoNumero TxtImporteAjuste.Text = ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia)).FormatoNumero
End If End If
End If End If
@@ -5297,7 +5318,7 @@ Partial Class PV
TmpDTAjustes.Rows(IndexAjuste)("Consecutivo") = TxtConsecutivoAjuste.Text TmpDTAjustes.Rows(IndexAjuste)("Consecutivo") = TxtConsecutivoAjuste.Text
TmpDTAjustes.Rows(IndexAjuste)("FechaAjuste") = TxtFechaAjuste.Text.ToDate TmpDTAjustes.Rows(IndexAjuste)("FechaAjuste") = TxtFechaAjuste.Text.ToDate
TmpDTAjustes.Rows(IndexAjuste)("Meses") = TxtMesesUso.Text.ToDouble TmpDTAjustes.Rows(IndexAjuste)("Meses") = TxtMesesUso.Text.ToDouble
TmpDTAjustes.Rows(IndexAjuste)("PorcentajeAjuste") = TxtPorcentajeAjuste.Text TmpDTAjustes.Rows(IndexAjuste)("PorcentajeAjuste") = TxtPorcentajeAjuste.Text.ToDecimal
TmpDTAjustes.Rows(IndexAjuste)("NumPoliza") = TxtPoliza.Text.ToDouble TmpDTAjustes.Rows(IndexAjuste)("NumPoliza") = TxtPoliza.Text.ToDouble
TmpDTAjustes.Rows(IndexAjuste)("Importe") = TxtImporteAjuste.Text.ToDouble TmpDTAjustes.Rows(IndexAjuste)("Importe") = TxtImporteAjuste.Text.ToDouble
TmpDTAjustes.Rows(IndexAjuste)("ConsecutivoVenta") = ConsecutivoVenta TmpDTAjustes.Rows(IndexAjuste)("ConsecutivoVenta") = ConsecutivoVenta
@@ -5331,7 +5352,7 @@ Partial Class PV
End If End If
End If End If
Dr("Descuento") = Math.Round(TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble, NumeroDecimales) Dr("Descuento") = Math.Round(TxtImporteAjuste.Text.ToDouble, NumeroDecimales)
'Dr("Descuento") = Math.Round((TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) + (CargoActual - CargoAnterior), NumeroDecimales) 'Dr("Descuento") = Math.Round((TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) + (CargoActual - CargoAnterior), NumeroDecimales)
If Dr("Descuento").ToString.ToDouble > TxtPrecio.Text.ToDouble Then Dr("Descuento") = TxtPrecio.Text.ToDouble If Dr("Descuento").ToString.ToDouble > TxtPrecio.Text.ToDouble Then Dr("Descuento") = TxtPrecio.Text.ToDouble
@@ -5718,15 +5739,33 @@ Partial Class PV
#End Region #End Region
Protected Sub BtnPDFHistorial_Click(sender As Object, e As EventArgs) Protected Sub BtnPDFHistorial_Click(sender As Object, e As EventArgs)
Dim ObjPS As New ClsProductosServicios
Dim MarcaPS As String = ""
If ObjPS.GetPS(DdlPSAjuste.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
MarcaPS = ObjPS.DtResultados.FiltroPrimeroValor("Marca", String.Format("CvePS = {0}", DdlPSAjuste.SelectedValue.ToEntero))
End If
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
Dim DtDatos As New DataTable Dim DtDatos As New DataTable
Dim params As New List(Of ReportParameter) Dim params As New List(Of ReportParameter)
If DdlClientes.SelectedValue.ToEntero = -1 Then
params.Add(New ReportParameter("NombreCliente", LtlCliente.Text))
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))
End If
'Informacion Distribuidor 'Informacion Distribuidor
params.Add(New ReportParameter("NombreCliente", LtlCliente.Text))
params.Add(New ReportParameter("CiudadEstado", LblCiudad.Text.Trim + ", " + LblEstado.Text))
params.Add(New ReportParameter("TelCliente", LblTelefono.Text))
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("Consec", TxtConsecutivoAjuste.Text.Trim)) params.Add(New ReportParameter("Consec", TxtConsecutivoAjuste.Text.Trim))
params.Add(New ReportParameter("FolioAcuse", If(DdlFolioGarantia.SelectedValue.ToEntero = -1, "", DdlFolioGarantia.SelectedItem.Text))) params.Add(New ReportParameter("FolioAcuse", If(DdlFolioGarantia.SelectedValue.ToEntero = -1, "", DdlFolioGarantia.SelectedItem.Text)))
@@ -5742,6 +5781,8 @@ Partial Class PV
params.Add(New ReportParameter("CodEnsamble", TxtCodEnsamble.Text.Trim)) params.Add(New ReportParameter("CodEnsamble", TxtCodEnsamble.Text.Trim))
params.Add(New ReportParameter("CodLinea", TxtCodLinea.Text.Trim)) params.Add(New ReportParameter("CodLinea", TxtCodLinea.Text.Trim))
params.Add(New ReportParameter("CodInspeccion", TxtCodInspeccion.Text.Trim)) params.Add(New ReportParameter("CodInspeccion", TxtCodInspeccion.Text.Trim))
params.Add(New ReportParameter("Tipo", DdlBCIAjuste.SelectedItem.Text))
params.Add(New ReportParameter("Marca", MarcaPS))
'Informacion Vehiculo 'Informacion Vehiculo
params.Add(New ReportParameter("MarcaAuto", If(DdlPS.SelectedValue.ToEntero > 0, DtModelosAuto.FiltroPrimeroValor("Marca", $"CveModeloAuto ={DdlModeloAuto.SelectedValue}"), ""))) params.Add(New ReportParameter("MarcaAuto", If(DdlPS.SelectedValue.ToEntero > 0, DtModelosAuto.FiltroPrimeroValor("Marca", $"CveModeloAuto ={DdlModeloAuto.SelectedValue}"), "")))

View File

@@ -3,6 +3,13 @@
<%@ Register Assembly="eWorld.UI" Namespace="eWorld.UI" TagPrefix="ew" %> <%@ Register Assembly="eWorld.UI" Namespace="eWorld.UI" TagPrefix="ew" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HB" runat="Server"> <asp:Content ID="Content1" ContentPlaceHolderID="HB" runat="Server">
<asp:UpdatePanel runat="server" ID="UpAgregarFolio">
<ContentTemplate>
<li>
<asp:LinkButton ID="ImgAddFolio" runat="server" Visible="True" OnClick="BtnGenerarAPartir_Click"> Generar a partir de</asp:LinkButton>
</li>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content> </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content2" ContentPlaceHolderID="H" runat="Server">
</asp:Content> </asp:Content>

View File

@@ -300,6 +300,11 @@ Partial Class Ventas_Promociones
Protected Sub ChkRestricciones_CheckedChanged(sender As Object, e As EventArgs) Protected Sub ChkRestricciones_CheckedChanged(sender As Object, e As EventArgs)
DivRestricciones.Visible = ChkRestricciones.Checked DivRestricciones.Visible = ChkRestricciones.Checked
End Sub End Sub
Protected Sub BtnGenerarAPartir_Click(sender As Object, e As EventArgs)
CvePromocion = 0
End Sub
#End Region #End Region

View File

@@ -5995,7 +5995,7 @@
<asp:CheckBox ID="ChkAplicar" runat="server" /> <asp:CheckBox ID="ChkAplicar" runat="server" />
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:HyperLinkField DataNavigateUrlFields="CveVenta" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="SerieFolio" HeaderText="Folio" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" /> <asp:HyperLinkField DataNavigateUrlFields="CveVenta" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="Folio" HeaderText="Folio" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" /> <asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right"> <asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
<ItemTemplate> <ItemTemplate>
@@ -6378,7 +6378,7 @@
<asp:CheckBox ID="ChkAplicar" runat="server" /> <asp:CheckBox ID="ChkAplicar" runat="server" />
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:HyperLinkField DataNavigateUrlFields="CveVenta" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="SerieFolio" HeaderText="Folio" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" /> <asp:HyperLinkField DataNavigateUrlFields="CveVenta" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="Folio" HeaderText="Folio" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" /> <asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right"> <asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
<ItemTemplate> <ItemTemplate>

View File

@@ -7259,27 +7259,6 @@ Partial Class Ventas
ObjFacturaDevolucion.Det_FechaOrdenCompra = TxtDet_FechaOrdenCompra.Text.Trim ObjFacturaDevolucion.Det_FechaOrdenCompra = TxtDet_FechaOrdenCompra.Text.Trim
ObjFacturaDevolucion.MonedaAbreviatura = "" ObjFacturaDevolucion.MonedaAbreviatura = ""
'DETALLES
If NCDescuento Then
PreparaNCDescuento(ObjFacturaDevolucion)
Else
ObjFacturaDevolucion.DtDetalle = TmpDT
ObjFacturaDevolucion.SubTotal = TxtSubTotal.Text.ToDecimal
ObjFacturaDevolucion.Descuento = LblDescuentos.Text.Trim.ToDecimal
ObjFacturaDevolucion.Amortizacion = LblAmortizacion.Text.Trim.ToDecimal
ObjFacturaDevolucion.IVA = TxtIVA.Text.ToDecimal
ObjFacturaDevolucion.RetIVA = TxtRetIVA.Text.ToDecimal
ObjFacturaDevolucion.RetISR = TxtRetISR.Text.ToDecimal
ObjFacturaDevolucion.IEPS = TxtIEPS.Text.ToDecimal
ObjFacturaDevolucion.Total = TxtTotal.Text.ToDecimal
End If
'Totales, Y se llena TmpDTImpuestos
'ObjFactura.BZDescripcion = TxtBZDescripcion.Text.Trim
'ObjFactura.BZNombreCorto = TxtBZNombreCorto.Text.Trim
'ObjFactura.BZTotalLetra = TxtBZTotalLetra.Text.Trim
If TmpDTImpuestos Is Nothing Then If TmpDTImpuestos Is Nothing Then
CreaDTImpuestos() CreaDTImpuestos()
Else Else
@@ -7326,6 +7305,30 @@ Partial Class Ventas
ObjFacturaDevolucion.DtDeduccion = TmpDTImpuestos.FiltraParametros("", Orderby:="Orden ASC") ObjFacturaDevolucion.DtDeduccion = TmpDTImpuestos.FiltraParametros("", Orderby:="Orden ASC")
'DETALLES
If NCDescuento Then
PreparaNCDescuento(ObjFacturaDevolucion)
Else
ObjFacturaDevolucion.DtDetalle = TmpDT
ObjFacturaDevolucion.SubTotal = TxtSubTotal.Text.ToDecimal
ObjFacturaDevolucion.Descuento = LblDescuentos.Text.Trim.ToDecimal
ObjFacturaDevolucion.Amortizacion = LblAmortizacion.Text.Trim.ToDecimal
ObjFacturaDevolucion.IVA = TxtIVA.Text.ToDecimal
ObjFacturaDevolucion.RetIVA = TxtRetIVA.Text.ToDecimal
ObjFacturaDevolucion.RetISR = TxtRetISR.Text.ToDecimal
ObjFacturaDevolucion.IEPS = TxtIEPS.Text.ToDecimal
ObjFacturaDevolucion.TotalImpuestoLocal = ObjFacturaDevolucion.DtDeduccion.SUMD("Importe", "TipoImpuesto = 1")
ObjFacturaDevolucion.Total = TxtTotal.Text.ToDecimal
End If
'Totales, Y se llena TmpDTImpuestos
'ObjFactura.BZDescripcion = TxtBZDescripcion.Text.Trim
'ObjFactura.BZNombreCorto = TxtBZNombreCorto.Text.Trim
'ObjFactura.BZTotalLetra = TxtBZTotalLetra.Text.Trim
'otros 'otros
ObjFacturaDevolucion.Det_FechaOrdenCompra = TxtDet_FechaOrdenCompra.Text.Trim ObjFacturaDevolucion.Det_FechaOrdenCompra = TxtDet_FechaOrdenCompra.Text.Trim
ObjFacturaDevolucion.Det_OrdenCompra = TxtDet_OrdenCompra.Text.Trim ObjFacturaDevolucion.Det_OrdenCompra = TxtDet_OrdenCompra.Text.Trim
@@ -7497,7 +7500,7 @@ Partial Class Ventas
Dim TotalRetIVA As Decimal = tmpcon.SUM("ImporteRetIVA").ToDecimal Dim TotalRetIVA As Decimal = tmpcon.SUM("ImporteRetIVA").ToDecimal
Dim TotalRetISR As Decimal = tmpcon.SUM("ImporteRetISR").ToDecimal Dim TotalRetISR As Decimal = tmpcon.SUM("ImporteRetISR").ToDecimal
Dim Total As Decimal = 0 Dim Total As Decimal = 0
Dim TotalImpuestosLocales As Decimal = 0 Dim TotalImpuestosLocales As Decimal = factura.TotalImpuestoLocal.ToString.ToDecimal
Total = (TotalSubTotal - TotalDescuentos + TotalIVA + TotalIEPS - TotalRetIVA - TotalRetISR - TotalImpuestosLocales) Total = (TotalSubTotal - TotalDescuentos + TotalIVA + TotalIEPS - TotalRetIVA - TotalRetISR - TotalImpuestosLocales)
factura.SubTotal = TotalSubTotal factura.SubTotal = TotalSubTotal
@@ -8050,7 +8053,7 @@ Partial Class Ventas
ObjFactura.Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso" ObjFactura.Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso"
End If End If
ObjFactura.CveTipoRelacion = DdlTiposRelacion.SelectedValue.ToEntero ObjFactura.CveTipoRelacion = DdlTiposRelacion.SelectedValue.ToEntero
ObjFactura.Timbre.CFDIRelacionados.UUID.Add(HdnFolioFiscalNC.Value) If HdnFolioFiscalNC.Value <> "0" And HdnFolioFiscalNC.Value <> "" Then ObjFactura.Timbre.CFDIRelacionados.UUID.Add(HdnFolioFiscalNC.Value)
End If End If
' cuando es refacturacoin es cfdirelacionado, con relacion 04 ' cuando es refacturacoin es cfdirelacionado, con relacion 04
If ObjFactura.Timbre.Comprobante.TipoComprobante = "I" AndAlso NuevaFactura = 1 Then If ObjFactura.Timbre.Comprobante.TipoComprobante = "I" AndAlso NuevaFactura = 1 Then
@@ -9170,7 +9173,8 @@ Partial Class Ventas
'Contratos 'Contratos
If factura.CveContrato > 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing") Then If factura.CveContrato > 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing") Then
GuardarContratoAvanceEstimaciones(ObjContr, factura, ErrorList, 1) GuardarContratoAvanceEstimaciones(ObjContr, factura, ErrorList, 1)
ElseIf factura.CveContrato > 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Egs", "Dev") Then 'CUANDO ES NOTA DE CRÉDITO, NO DEBE DE CONSIDERAR AVANCE, CUANDO ES NOTA DE CRÉDITO POR AMORTIZACIÓN
ElseIf factura.CveContrato > 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Egs", "Dev") AndAlso Not EsNCAmortizacion Then
GuardarContratoAvanceEstimaciones(ObjContr, factura, ErrorList, -1) GuardarContratoAvanceEstimaciones(ObjContr, factura, ErrorList, -1)
End If End If
@@ -20879,16 +20883,18 @@ Partial Class Ventas
End Sub End Sub
Private Sub CargaRNC() Private Sub CargaRNC()
Dim ObjMovtos As New ClsMovimientos() Dim ObjMovtos As New ClsMovimientos()
If ObjMovtos.GetCxCClienteDetalle(ViewState("CveCliente").ToString.ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, -1, TipoDocto:="RNC") Then
GvRemisionesNC.DataSource = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act' AND CveVenta > 0", "Moneda, OrdenVencimiento, FechaVencimiento") If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente, CveMoneda:=-1, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) Then
GvRemisionesNC.DataSource = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'RNC' AND CveVenta > 0 and Saldo > 0", "Moneda,Fecha,Folio")
End If End If
ObjMovtos.Dispose() ObjMovtos.Dispose()
GvRemisionesNC.DataBind() GvRemisionesNC.DataBind()
End Sub End Sub
Private Sub CargaDescRNC() Private Sub CargaDescRNC()
Dim ObjMovtos As New ClsMovimientos() Dim ObjMovtos As New ClsMovimientos()
If ObjMovtos.GetCxCClienteDetalle(ViewState("CveCliente").ToString.ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, -1, TipoDocto:="RNC") Then If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente, CveMoneda:=-1, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) Then
GvDescNC.DataSource = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act' AND CveVenta > 0", "Moneda, OrdenVencimiento, FechaVencimiento") GvDescNC.DataSource = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'RNC' AND CveVenta > 0 and Saldo > 0", "Moneda,Fecha,Folio")
End If End If
ObjMovtos.Dispose() ObjMovtos.Dispose()
GvDescNC.DataBind() GvDescNC.DataBind()
@@ -20930,6 +20936,7 @@ Partial Class Ventas
Exit Sub Exit Sub
End If End If
End If End If
DdlTipoComprobante.SelectedValue = "Egs"
AplicarNC(DdlNCPS.SelectedValue.ToEntero) AplicarNC(DdlNCPS.SelectedValue.ToEntero)
@@ -23464,19 +23471,19 @@ Partial Class Ventas
Private Sub CalculaUsados() Private Sub CalculaUsados()
If ClienteEsDistribuidor Then '' If ClienteEsDistribuidor Then
Dim DTTamanios As New DataTable Dim DTTamanios As DataTable = Nothing
Dim ObjAcum As New ClsAcumuladores ' Dim ObjAcum As New ClsAcumuladores
If ObjAcum.TamañoGet(-1, UsuarioActual.CveEmpresa) Then 'If ObjAcum.TamañoGet(-1, UsuarioActual.CveEmpresa) Then
DTTamanios = ObjAcum.DtResultados DTTamanios = GlobalDTAcumTamaños() 'ObjAcum.DtResultados
Dim DTCvePSCostos As New DataTable Dim DTCvePSCostos As DataTable
DTCvePSCostos = ObjAcum.DtResultados.FiltraParametros("", "", {"CvePSCargo"}) DTCvePSCostos = DTTamanios.FiltraParametros("", "", {"CvePSCargo"})
If Not TmpDT.Columns.Contains("Eliminar") Then If Not TmpDT.Columns.Contains("Eliminar") Then
TmpDT.Columns.Add("Eliminar", GetType(Integer)) TmpDT.Columns.Add("Eliminar", GetType(Integer))
End If End If
@@ -23601,10 +23608,10 @@ Partial Class Ventas
Next Next
ObjProductosServicios.Dispose() ObjProductosServicios.Dispose()
End If 'End If
ObjAcum.Dispose() ' ObjAcum.Dispose()
End If 'End If
End Sub End Sub