Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -5014,7 +5014,7 @@ Namespace Modelos
|
||||
Public Property EsInterno As Integer = -1
|
||||
Public Property CveEmpresaCRM As Integer = -1
|
||||
Public Property EmpresaCRM As String = ""
|
||||
Public Property TotalImpuestoLocal As Double = 0
|
||||
Public Property TotalImpuestoLocal As Decimal = 0
|
||||
Public Property AplicaDevolucion As Boolean
|
||||
Public Property CveVentaDevolucion As Integer
|
||||
Public Property ObservacionesAlmacen As String
|
||||
|
||||
@@ -1549,7 +1549,7 @@
|
||||
function ValidarCantidad(t, c) {
|
||||
var Ot = 0.00;
|
||||
// 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)
|
||||
}
|
||||
|
||||
|
||||
@@ -1381,11 +1381,8 @@ Partial Class Bancos_IE
|
||||
Dim Banco As New ClsBancos
|
||||
Folio = Banco.GetNextFolio(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero)
|
||||
Banco.Dispose()
|
||||
TxtFolio.Text = Folio.ToString
|
||||
|
||||
If Opcion = "DevDinC" Then
|
||||
TxtFolio.Enabled = False
|
||||
End If
|
||||
TxtFolio.Text = Folio.ToString
|
||||
|
||||
Else
|
||||
TxtFolio.Text = ""
|
||||
End If
|
||||
@@ -2335,6 +2332,9 @@ Partial Class Bancos_IE
|
||||
CveConceptoContable = 30 'Bancos
|
||||
CvePlantillaPoliza = 12
|
||||
End If
|
||||
End If
|
||||
If Opcion = "DevDinC" Then
|
||||
CvePlantillaPoliza = 2
|
||||
End If
|
||||
|
||||
'Cuando es Egreso sin factura, se registra una compra tipo anticipo
|
||||
@@ -2689,10 +2689,12 @@ Partial Class Bancos_IE
|
||||
TipoMovtoIE = True
|
||||
Impo = Math.Abs(Impo)
|
||||
CveConcIE = 78
|
||||
IdCtaContableAplicar = UsuarioActual.Empresa.IdCuentaOtrosIngresos
|
||||
Else
|
||||
TipoMovtoIE = False
|
||||
Impo = Math.Abs(Impo)
|
||||
CveConcIE = 211
|
||||
IdCtaContableAplicar = UsuarioActual.Empresa.Funcionalidad(266).ToEntero
|
||||
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
|
||||
@@ -2815,12 +2817,15 @@ Partial Class Bancos_IE
|
||||
TipoMovtoIE = True
|
||||
Impo = Math.Abs(Impo)
|
||||
CveConcIE = 78
|
||||
IdCtaContableAplicar = UsuarioActual.Empresa.IdCuentaOtrosIngresos
|
||||
Else
|
||||
TipoMovtoIE = False
|
||||
Impo = Math.Abs(Impo)
|
||||
CveConcIE = 211
|
||||
IdCtaContableAplicar = UsuarioActual.Empresa.Funcionalidad(266).ToEntero
|
||||
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
|
||||
MsgError = "Ocurrió un error al registrar el asiento de pago de devolución"
|
||||
Exit Select
|
||||
|
||||
@@ -2777,8 +2777,14 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
If gr.DataKey("IEPS").ToDecimal > 0 Then
|
||||
|
||||
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"
|
||||
End If
|
||||
|
||||
|
||||
@@ -159,12 +159,12 @@ Partial Class Compras_RepNotasCredito
|
||||
If UsaComplementaria AndAlso CveMoneda > 1 Then
|
||||
ImporteComplementaria = (Importe * TCCompra - Importe).RoundSQL
|
||||
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"
|
||||
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
|
||||
MsgError = "Ocurrio un Error al saldar el movimiento"
|
||||
End If
|
||||
|
||||
@@ -210,6 +210,10 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
GvConcepto.Columns(4).Visible = False
|
||||
GvMov.Columns(5).Visible = False
|
||||
End If
|
||||
|
||||
If IfNull(Request("Conta"), "").ToString = "1" Then
|
||||
Contabilizar()
|
||||
End If
|
||||
Exit Sub
|
||||
Else
|
||||
|
||||
@@ -1454,8 +1458,17 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
|
||||
Private Sub BtnContabilizar_Click(sender As Object, e As EventArgs) Handles BtnContabilizar.Click
|
||||
|
||||
Contabilizar()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Contabilizar()
|
||||
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
|
||||
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
|
||||
@@ -1463,14 +1476,13 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
Alert($"Ocurrio un error al contabilizar {ObjConta.AlertaMensaje}", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#Region "COMPLEMENTO DE PAGO"
|
||||
|
||||
|
||||
Private Sub GeneraTimbre(CvePrePoliza As Integer)
|
||||
Dim Str As New StringBuilder
|
||||
Dim Banco As New ClsBancos
|
||||
|
||||
@@ -595,11 +595,10 @@
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!ClienteNombre.Value</Value>
|
||||
<Value>=Parameters!ClienteCodigo.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -833,52 +832,6 @@
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</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>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>0.05159in</Top>
|
||||
@@ -1376,6 +1329,29 @@
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<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>
|
||||
<Value xml:space="preserve"> </Value>
|
||||
<Style>
|
||||
@@ -1384,14 +1360,6 @@
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=iif(Parameters!TipoCambio.Value <= 1, "", "Tipo Cambio: " & Parameters!TipoCambio.Value)</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>6.5pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
@@ -1399,6 +1367,14 @@
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Moneda</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>9.16pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>Forma de pago: </Value>
|
||||
<Style>
|
||||
@@ -1639,7 +1615,7 @@
|
||||
<Width>0.8527in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>3.02234in</Width>
|
||||
<Width>3.66416in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>0.57354in</Width>
|
||||
@@ -1650,9 +1626,6 @@
|
||||
<TablixColumn>
|
||||
<Width>0.61967in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>0.64182in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>0.79194in</Width>
|
||||
</TablixColumn>
|
||||
@@ -1918,43 +1891,6 @@
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</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>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox6">
|
||||
@@ -2216,7 +2152,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!ImporteIVA.Value & iif(Fields!PorcentajeIVA.Value = "0.16", " (16%)"," (0%)")</Value>
|
||||
<Value>=Fields!ImporteIVA.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>7.5pt</FontSize>
|
||||
@@ -2243,42 +2179,6 @@
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</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 & " (3%)",iif(Fields!PorcentajeIEPS.Value = "0.06",Fields!ImporteIEPS.Value & " (6%)",iif(Fields!PorcentajeIEPS.Value = "0.07",Fields!ImporteIEPS.Value & " (7%)",iif(Fields!PorcentajeIEPS.Value = "0.09",Fields!ImporteIEPS.Value & " (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>
|
||||
<CellContents>
|
||||
<Textbox Name="TiempoEntrega">
|
||||
@@ -2330,7 +2230,6 @@
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
</TablixMembers>
|
||||
</TablixColumnHierarchy>
|
||||
<TablixRowHierarchy>
|
||||
|
||||
@@ -861,7 +861,11 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Tipo:</Value>
|
||||
<Value>Tipo: </Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!Tipo.Value</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -941,7 +945,11 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Marca:</Value>
|
||||
<Value>Marca: </Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!Marca.Value</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -1913,6 +1921,18 @@
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</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>
|
||||
<Language>Es-MX</Language>
|
||||
<rd:ReportUnitType>Inch</rd:ReportUnitType>
|
||||
|
||||
@@ -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
|
||||
ErrorMovInv = True
|
||||
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
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -321,7 +321,7 @@
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Serie-Folio" ItemStyle-Width="20%">
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="NombreComercial" HeaderText="Cliente"/>
|
||||
|
||||
@@ -1052,68 +1052,80 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Else
|
||||
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
|
||||
|
||||
If CveConcepto = 2 AndAlso DdlMoneda.SelectedValue.ToEntero = 2 Then
|
||||
ImporteConcepto = Dr("PU").ToString.ToDouble * GlobalTipoCambio(TxtFecha.Text.ToDate)
|
||||
Else
|
||||
ImporteConcepto = Dr("PU").ToString.ToDouble
|
||||
End If
|
||||
If CveConcepto = 2 AndAlso DdlMoneda.SelectedValue.ToEntero = 2 Then
|
||||
ImporteConcepto = Dr("PU").ToString.ToDouble * GlobalTipoCambio(TxtFecha.Text.ToDate)
|
||||
Else
|
||||
ImporteConcepto = Dr("PU").ToString.ToDouble
|
||||
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
|
||||
Mensaje = "Error al guardar los movimientos"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
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
|
||||
Mensaje = "Error al guardar los movimientos"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
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"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'si es selectedvalue = 2, es entrada ,3 -salida
|
||||
Dim CveConceptoUsados As Integer = If(RBLOpcion.SelectedValue.ToEntero = 2, 1, 2)
|
||||
|
||||
If RBLOpcion.SelectedValue.ToEntero <> 3 AndAlso Not GenerarRNC Then
|
||||
If EsDistribuidor Then
|
||||
If Not ObjAcum.DistribuidorMovtosAdd(DdlClientes.SelectedValue.ToEntero, Dr("Cantidad").ToString.ToEntero(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, -1, UsuarioActual.CveUsuario,
|
||||
UsuarioActual.CveEmpresa, CveVenta, Dr("Observaciones").ToString, CveMovimiento:=CveMovimiento) Then
|
||||
Mensaje = "Error al guardar Movimientos de distribuidor"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
If RBLOpcion.SelectedValue.ToEntero = 2 AndAlso EsDistribuidor Then
|
||||
|
||||
If Not ObjAcum.DistribuidorMovtosAdd(DdlClientes.SelectedValue.ToEntero, Dr("Cantidad").ToString.ToEntero(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, CveVenta, UsuarioActual.CveUsuario,
|
||||
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, CveMovimiento:=CveMovimiento) Then
|
||||
Mensaje = "Error al guardar Movimientos de distribuidor"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
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/><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/>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)))
|
||||
|
||||
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
|
||||
If UsuarioActual.CveEmpresa = 66 Then
|
||||
DdlSubProyecto.SelectedValueExist("-1")
|
||||
'Limpia Valores cuando inserta de campos especiales
|
||||
If UsuarioActual.CveEmpresa = 66 Then
|
||||
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
|
||||
|
||||
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
|
||||
Catch ex As Exception
|
||||
ObjInventario.RollBack() 'deshace lo insertado
|
||||
CveMovimiento = 0
|
||||
@@ -1125,17 +1137,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
ObjAcum.Dispose()
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If Not ErrorMovInv AndAlso GenerarRNC AndAlso ObjRemisionNC IsNot Nothing 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
|
||||
If Not ErrorMovInv Then
|
||||
Alert(Msg.ToString, TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
@@ -1639,51 +1641,6 @@ Partial Class Inventarios_RecepcionUsados
|
||||
End Sub
|
||||
#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"
|
||||
@@ -1845,22 +1802,6 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
#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)
|
||||
AgregarUsado = True
|
||||
|
||||
@@ -115,6 +115,15 @@ Partial Class OC_CotizacionEnLinea
|
||||
CType(Me.Master, Site).EsPopup = True
|
||||
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
|
||||
'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)
|
||||
@@ -147,6 +156,32 @@ Partial Class OC_CotizacionEnLinea
|
||||
End If
|
||||
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()
|
||||
Dim objMonedas As New ClsMonedas
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
</table--%>
|
||||
|
||||
<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>
|
||||
<%-- <asp:BoundField DataField="Sucursal" HeaderText="Sucursal" />--%>
|
||||
<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>
|
||||
<label for="<%= DdlTipoDocto.ClientID.ToString()%>">Tipo Docto:</label>
|
||||
</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">
|
||||
<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>
|
||||
@@ -229,8 +234,16 @@
|
||||
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control" Checked="true" />
|
||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
|
||||
<div class="row">
|
||||
<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>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -110,7 +110,6 @@ Partial Class CatFolios
|
||||
TxtFolioInicial.Text = ""
|
||||
TxtFolioFinal.Text = ""
|
||||
TxtFolioActual.Text = ""
|
||||
txtserie.text = ""
|
||||
DivFactual.Visible = False
|
||||
CargaSubProyectos()
|
||||
|
||||
@@ -125,6 +124,7 @@ Partial Class CatFolios
|
||||
HdnModalidad.Value = "U"
|
||||
DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto"))
|
||||
DdlTipoDocto.SelectedValueExist(GvRow.DataKey("TipoDocto"))
|
||||
TxtSerie.Text = (GvRow.DataKey("Serie"))
|
||||
ChkEstatus.Checked = If(GvRow.DataKey("Estado").ToString = "Activo", True, False)
|
||||
TxtFolioInicial.Text = (GvRow.DataKey("FInicial"))
|
||||
TxtFolioFinal.Text = (GvRow.DataKey("FFinal"))
|
||||
@@ -169,12 +169,12 @@ Partial Class CatFolios
|
||||
|
||||
|
||||
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
|
||||
TieneError = True
|
||||
End If
|
||||
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
|
||||
TieneError = True
|
||||
End If
|
||||
@@ -193,15 +193,19 @@ Partial Class CatFolios
|
||||
|
||||
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
|
||||
ViewState("DTFolios") = ObjFolios.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
|
||||
|
||||
CargaDatos()
|
||||
If Not ChkSeguirAgregando.Checked Then
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarFolio"))
|
||||
Else
|
||||
DdlSubProyecto.SelectedIndex = 0
|
||||
End If
|
||||
UpDatos.Update()
|
||||
UpAddFolio.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarFolio"))
|
||||
End If
|
||||
|
||||
|
||||
|
||||
@@ -8899,7 +8899,7 @@ Partial Class Clientes
|
||||
|
||||
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
|
||||
ImporteBonificacion = ObjAcum.DtResultados.SUM("ImporteBonificacion", "(FacturadoBonificacion = 0 OR FacturadoBonificacion IS NULL) AND CveConcepto = 1 ").ToDecimal
|
||||
@@ -9928,7 +9928,14 @@ Partial Class Clientes
|
||||
End Sub
|
||||
|
||||
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 Region
|
||||
End Class
|
||||
|
||||
@@ -2802,6 +2802,15 @@
|
||||
</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="col-md-9">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
@@ -2820,6 +2829,15 @@
|
||||
</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="col-md-8">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
@@ -2933,7 +2951,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row" style="margin-top:17px;">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPoliza" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
|
||||
@@ -4973,6 +4973,25 @@ 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
|
||||
DdlBCIAjuste.DataSource = ObjGral.DtResultados
|
||||
End If
|
||||
ObjGral.Dispose()
|
||||
DdlBCIAjuste.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaAjuste()
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.FoliosGarantiaGet(-1, UsuarioActual.CveEmpresa) Then
|
||||
@@ -5007,7 +5026,8 @@ Partial Class PV
|
||||
|
||||
CreaDTmpDTAjustes()
|
||||
CreaDTmpDTRecepcionUsados()
|
||||
|
||||
CargaClienteAjuste()
|
||||
CargaBCIAjuste()
|
||||
DivChkAjuste.Visible = True
|
||||
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.DtResultados.Rows.Count > 0 Then
|
||||
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 CargoGarantia As Decimal = 0
|
||||
@@ -5240,7 +5261,7 @@ Partial Class PV
|
||||
CargoGarantia = CargoVendido
|
||||
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.Text = ((TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia)).FormatoNumero
|
||||
TxtImporteAjuste.Text = ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia)).FormatoNumero
|
||||
|
||||
End If
|
||||
End If
|
||||
@@ -5297,7 +5318,7 @@ Partial Class PV
|
||||
TmpDTAjustes.Rows(IndexAjuste)("Consecutivo") = TxtConsecutivoAjuste.Text
|
||||
TmpDTAjustes.Rows(IndexAjuste)("FechaAjuste") = TxtFechaAjuste.Text.ToDate
|
||||
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)("Importe") = TxtImporteAjuste.Text.ToDouble
|
||||
TmpDTAjustes.Rows(IndexAjuste)("ConsecutivoVenta") = ConsecutivoVenta
|
||||
@@ -5331,7 +5352,7 @@ Partial Class PV
|
||||
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)
|
||||
If Dr("Descuento").ToString.ToDouble > TxtPrecio.Text.ToDouble Then Dr("Descuento") = TxtPrecio.Text.ToDouble
|
||||
|
||||
@@ -5718,15 +5739,33 @@ Partial Class PV
|
||||
#End Region
|
||||
|
||||
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 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 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
|
||||
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("Consec", TxtConsecutivoAjuste.Text.Trim))
|
||||
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("CodLinea", TxtCodLinea.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
|
||||
params.Add(New ReportParameter("MarcaAuto", If(DdlPS.SelectedValue.ToEntero > 0, DtModelosAuto.FiltroPrimeroValor("Marca", $"CveModeloAuto ={DdlModeloAuto.SelectedValue}"), "")))
|
||||
|
||||
@@ -3,6 +3,13 @@
|
||||
<%@ Register Assembly="eWorld.UI" Namespace="eWorld.UI" TagPrefix="ew" %>
|
||||
|
||||
<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 ID="Content2" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -300,6 +300,11 @@ Partial Class Ventas_Promociones
|
||||
Protected Sub ChkRestricciones_CheckedChanged(sender As Object, e As EventArgs)
|
||||
DivRestricciones.Visible = ChkRestricciones.Checked
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnGenerarAPartir_Click(sender As Object, e As EventArgs)
|
||||
CvePromocion = 0
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
@@ -5995,7 +5995,7 @@
|
||||
<asp:CheckBox ID="ChkAplicar" runat="server" />
|
||||
</ItemTemplate>
|
||||
</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:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
@@ -6378,7 +6378,7 @@
|
||||
<asp:CheckBox ID="ChkAplicar" runat="server" />
|
||||
</ItemTemplate>
|
||||
</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:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -7259,27 +7259,6 @@ Partial Class Ventas
|
||||
ObjFacturaDevolucion.Det_FechaOrdenCompra = TxtDet_FechaOrdenCompra.Text.Trim
|
||||
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
|
||||
CreaDTImpuestos()
|
||||
Else
|
||||
@@ -7326,6 +7305,30 @@ Partial Class Ventas
|
||||
|
||||
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
|
||||
ObjFacturaDevolucion.Det_FechaOrdenCompra = TxtDet_FechaOrdenCompra.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 TotalRetISR As Decimal = tmpcon.SUM("ImporteRetISR").ToDecimal
|
||||
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)
|
||||
|
||||
factura.SubTotal = TotalSubTotal
|
||||
@@ -8050,7 +8053,7 @@ Partial Class Ventas
|
||||
ObjFactura.Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso"
|
||||
End If
|
||||
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
|
||||
' cuando es refacturacoin es cfdirelacionado, con relacion 04
|
||||
If ObjFactura.Timbre.Comprobante.TipoComprobante = "I" AndAlso NuevaFactura = 1 Then
|
||||
@@ -9170,7 +9173,8 @@ Partial Class Ventas
|
||||
'Contratos
|
||||
If factura.CveContrato > 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing") Then
|
||||
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)
|
||||
End If
|
||||
|
||||
@@ -20879,16 +20883,18 @@ Partial Class Ventas
|
||||
End Sub
|
||||
Private Sub CargaRNC()
|
||||
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
|
||||
ObjMovtos.Dispose()
|
||||
GvRemisionesNC.DataBind()
|
||||
End Sub
|
||||
Private Sub CargaDescRNC()
|
||||
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
If ObjMovtos.GetCxCClienteDetalle(ViewState("CveCliente").ToString.ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, -1, TipoDocto:="RNC") Then
|
||||
GvDescNC.DataSource = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act' AND CveVenta > 0", "Moneda, OrdenVencimiento, FechaVencimiento")
|
||||
If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente, CveMoneda:=-1, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) Then
|
||||
GvDescNC.DataSource = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'RNC' AND CveVenta > 0 and Saldo > 0", "Moneda,Fecha,Folio")
|
||||
End If
|
||||
ObjMovtos.Dispose()
|
||||
GvDescNC.DataBind()
|
||||
@@ -20930,6 +20936,7 @@ Partial Class Ventas
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
DdlTipoComprobante.SelectedValue = "Egs"
|
||||
|
||||
AplicarNC(DdlNCPS.SelectedValue.ToEntero)
|
||||
|
||||
@@ -23464,19 +23471,19 @@ Partial Class Ventas
|
||||
Private Sub CalculaUsados()
|
||||
|
||||
|
||||
If ClienteEsDistribuidor Then
|
||||
'' If ClienteEsDistribuidor Then
|
||||
|
||||
Dim DTTamanios As New DataTable
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
Dim DTTamanios As DataTable = Nothing
|
||||
' 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
|
||||
DTCvePSCostos = ObjAcum.DtResultados.FiltraParametros("", "", {"CvePSCargo"})
|
||||
Dim DTCvePSCostos As DataTable
|
||||
DTCvePSCostos = DTTamanios.FiltraParametros("", "", {"CvePSCargo"})
|
||||
|
||||
If Not TmpDT.Columns.Contains("Eliminar") Then
|
||||
If Not TmpDT.Columns.Contains("Eliminar") Then
|
||||
TmpDT.Columns.Add("Eliminar", GetType(Integer))
|
||||
End If
|
||||
|
||||
@@ -23601,10 +23608,10 @@ Partial Class Ventas
|
||||
Next
|
||||
|
||||
ObjProductosServicios.Dispose()
|
||||
End If
|
||||
'End If
|
||||
|
||||
ObjAcum.Dispose()
|
||||
End If
|
||||
' ObjAcum.Dispose()
|
||||
'End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user