--Activar las RNC, para devoluciones sobre Remisiones. y que quede pendiente para aplicarse en las futuras "remisiones/facturas".
--Agregar columna "Atencion A" en gridview de amortizaciones --Obligar a llenar el texto Atencion A con la funconalidad 109 en todos los tipos de documento
This commit is contained in:
@@ -3547,6 +3547,10 @@ Partial Class Ventas
|
||||
End If
|
||||
UpPS.Update()
|
||||
|
||||
If DdlTipoComprobante.Items.FindByValue("RNC") Is Nothing Then
|
||||
DdlTipoComprobante.Items.Add(New ListItem("Remisión de nota de crédito", "RNC"))
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -5089,6 +5093,10 @@ Partial Class Ventas
|
||||
|
||||
HplDownXML.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", DbRowVenta("SerieFolio"), DbRowVenta("TipoDocto"))))
|
||||
Case "Egs"
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
TxtAtencionA.Text = DbRowVenta("AtencionA").ToString()
|
||||
End If
|
||||
|
||||
HplDownXML.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", DbRowVenta("SerieFolio"), DbRowVenta("TipoDocto"))))
|
||||
HdnFolioFiscalNC.Value = DbRowVenta("FolioFiscalPadre").ToString()
|
||||
Trsaldo.Visible = True
|
||||
@@ -5120,6 +5128,9 @@ Partial Class Ventas
|
||||
DiasCredito = DbRowVenta("DiasCredito").ToString().ToEntero()
|
||||
EsDiasCreditoFijo = CBool(DbRowVenta("EsDiasCreditoFijo").ToString())
|
||||
Case "RNC"
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
TxtAtencionA.Text = DbRowVenta("AtencionA").ToString()
|
||||
End If
|
||||
Trsaldo.Visible = True
|
||||
HplSaldoAuxiliar.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
|
||||
HplPagado.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
|
||||
@@ -9248,6 +9259,11 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso TxtAtencionA.Text.Trim.Length = 0 Then
|
||||
Alert("El campo 'Atención A' es requerido. Favor de llenarlo", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not ValidaImportePublicoGeneral() Then
|
||||
Exit Sub
|
||||
End If
|
||||
@@ -14873,6 +14889,33 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
'SI ES PAGO CON DEVOLUCION
|
||||
If DdlTipoAmortizacionAnticipo.SelectedValue = "4" Then
|
||||
If row2.DataKey("CveConceptoContable").ToString().ToEntero() = 277 Then
|
||||
|
||||
If row2.FCCheckBox("Chk" & row2.RowIndex).Checked Then
|
||||
importeMovimiento = row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal() * Multiplicador
|
||||
importeMX = importeMovimiento * tipoCambio
|
||||
sumaAmorticaciones += importeMovimiento
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, importeMovimiento * tipoCambio, 150, Referencia, Concepto, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=-1, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveClasificacion:=ObjFactura.DtDetalle.MAX("CveClasificacion").ToEntero(), CveSubProyecto:=ObjFactura.CveSubProyecto, Contabilizable:=Contabilizable) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento * -1, importeMX * -1, 277, Referencia, Concepto, CveVenta:=row2.DataKey("CveVenta").ToString().ToEntero(), CveVentaAmortizacion:=-1, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento * -1, importeMX * -1, 278, Referencia, Concepto, CveVenta:=row2.DataKey("CveVenta").ToString().ToEntero(), CveVentaAmortizacion:=-1, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
Else
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(344) = "1" AndAlso ObjFactura.TipoDocto = "Egs" Then
|
||||
@@ -16205,7 +16248,11 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
GVAnticipos.Columns(4).Visible = False
|
||||
GVAnticipos.Columns(7).Visible = False
|
||||
GVAnticipos.Columns(8).Visible = False
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
GVAnticipos.Columns(6).Visible = True
|
||||
End If
|
||||
|
||||
GVAnticipos.DataBind()
|
||||
End If
|
||||
@@ -16343,7 +16390,7 @@ Partial Class Ventas
|
||||
'SI UN REGISTRO ES DE DIFERENTE MONEDA AL DOCUMENTO SE MUESTRAN LAS COLUMNAS
|
||||
If e.Row.DBCampo("CveMoneda").ToString().ToEntero() > 0 And e.Row.DBCampo("CveMoneda").ToString().ToEntero() <> DdlMoneda.SelectedValue.ToEntero() Then
|
||||
GVAnticipos.Columns(4).Visible = True
|
||||
GVAnticipos.Columns(7).Visible = True
|
||||
GVAnticipos.Columns(8).Visible = True
|
||||
End If
|
||||
|
||||
|
||||
@@ -16744,7 +16791,7 @@ Partial Class Ventas
|
||||
If DdlTipoAmortizacionAnticipo.SelectedValue = "4" Then
|
||||
|
||||
For Each gvr As GridViewRow In GVAnticipos.Rows
|
||||
If gvr.FCCheckBox("Chk" & gvr.RowIndex) IsNot Nothing AndAlso gvr.FCCheckBox("Chk" & gvr.RowIndex).Checked AndAlso gvr.DataKey("CveConceptoContable").ToEntero().Contiene(12) Then
|
||||
If gvr.FCCheckBox("Chk" & gvr.RowIndex) IsNot Nothing AndAlso gvr.FCCheckBox("Chk" & gvr.RowIndex).Checked AndAlso gvr.DataKey("CveConceptoContable").ToEntero().Contiene(12, 277) Then
|
||||
Amortizacion += gvr.FCTextBox(String.Format("TxtAnticipo{0}", gvr.RowIndex)).Text.ToDecimal ' - ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("TotalAnticipo").ToDecimal) * gvr.DataKey("IVAAnticipo").ToDecimal)
|
||||
End If
|
||||
Next
|
||||
@@ -20184,28 +20231,14 @@ Partial Class Ventas
|
||||
'si tiene la funcionalidad que se active independiente del tipo de documento RMF 15-10-2017
|
||||
Tr33.Visible = True
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant") Then
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Egs", "Dev") Then
|
||||
BtnEmitirImprimir.Text = "Emitir e Imprimir"
|
||||
'TdReferencia.Style.Add("display", "none")
|
||||
ElseIf DdlTipoComprobante.SelectedValue.Contiene("Egs", "Dev") Then
|
||||
BtnEmitirImprimir.Text = "Emitir e Imprimir"
|
||||
'TdReferencia.Style.Remove("display")
|
||||
ElseIf DdlTipoComprobante.SelectedValue = "Rem" Then
|
||||
ElseIf DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ped", "PeC", "PA", "RNC", "Com") Then
|
||||
BtnEmitirImprimir.Text = "Registrar"
|
||||
'TdReferencia.Style.Add("display", "none")
|
||||
ElseIf DdlTipoComprobante.SelectedValue.Contiene("Ped", "PeC", "PA") Then
|
||||
BtnEmitirImprimir.Text = "Registrar"
|
||||
'TdReferencia.Style.Add("display", "none")
|
||||
ElseIf DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||
BtnEmitirImprimir.Text = "Cotizar"
|
||||
'TdReferencia.Style.Add("display", "none")
|
||||
|
||||
'FACTURACION 3.3
|
||||
Tr33.Visible = True
|
||||
|
||||
ElseIf DdlTipoComprobante.SelectedValue = "Com" Then
|
||||
BtnEmitirImprimir.Text = "Registrar"
|
||||
'TdReferencia.Style.Add("display", "none")
|
||||
ElseIf DdlTipoComprobante.SelectedValue.ToString() = "OP" Then
|
||||
BtnEmitirImprimir.Text = "Registrar"
|
||||
TdOrdenPago.Visible = True
|
||||
@@ -30695,7 +30728,7 @@ Partial Class Ventas
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "4" Then
|
||||
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 And SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo = 'NC' ", "")}")
|
||||
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 And SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo IN('NC','RNC') ", "")}")
|
||||
divAmortizacionTipoRelacion.Visible = False
|
||||
GVAnticipos.DataSource = DtMovtos
|
||||
GVAnticipos.DataBind()
|
||||
|
||||
Reference in New Issue
Block a user