diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb
index 83377e9b8..d2a33c406 100644
--- a/App_Code/ClsCompras.vb
+++ b/App_Code/ClsCompras.vb
@@ -941,7 +941,7 @@ Public Class ClsCompras
Public Function GetRepProductosServicios(CveProyecto As Integer, CveSubProyecto As String, CveCategoria As String, CveClasificacion As Integer, CvePS As Integer, FechaI As Date,
FechaF As Date, CveProveedor As Integer, CveUsuario As Integer, CveEstatus As Integer, CveEmpresa As Integer, Gpo As Integer,
CveFamilia As Integer, CveSubFamilia As Integer, CveTipoActivoFijo As String, CveSubTipoActivoFijo As String, CveActivoFijo As Integer, TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoGasto As String = "-1",
- Optional CveUsuarioConsulta As Integer = -1, Optional TipoDocto As String = "-1") As Boolean
+ Optional CveUsuarioConsulta As Integer = -1, Optional TipoDocto As String = "-1", Optional Deducible As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Comp_GetRepPS")
@@ -969,6 +969,7 @@ Public Class ClsCompras
.Add("@TipoGasto", SqlDbType.VarChar).Value = TipoGasto
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
.Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto
+ .Add("@Deducible", SqlDbType.Int).Value = Deducible
End With
Try
@@ -984,7 +985,7 @@ Public Class ClsCompras
FechaF As Date, CveProveedor As Integer, CveUsuario As Integer, CveEstatus As Integer, CveEmpresa As Integer, Gpo As Integer,
CveFamilia As Integer, CveSubFamilia As Integer, CveTipoActivoFijo As String, CveSubTipoActivoFijo As String, CveActivoFijo As Integer,
CveMoneda As Integer, TipoCambio As Integer, Optional TCEspecifico As Double = -1,
- Optional TipoGasto As String = "-1", Optional CveUsuarioConsulta As Integer = -1, Optional TipoDocto As String = "-1") As Boolean
+ Optional TipoGasto As String = "-1", Optional CveUsuarioConsulta As Integer = -1, Optional TipoDocto As String = "-1", Optional Deducible As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Comp_GetRepPSDetalle")
@@ -1016,6 +1017,8 @@ Public Class ClsCompras
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
.Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto
+ .Add("@Deducible", SqlDbType.Int).Value = Deducible
+
End With
Try
diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx
index 0f8f236ab..6039ab104 100644
--- a/Bancos/DepositosCaja.aspx
+++ b/Bancos/DepositosCaja.aspx
@@ -204,7 +204,7 @@
diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb
index 8f2befccb..d5978097f 100644
--- a/Contabilidad/RegPrePolizaS.aspx.vb
+++ b/Contabilidad/RegPrePolizaS.aspx.vb
@@ -188,6 +188,15 @@ Partial Class ContabilidadC_RegPrePolizaS
End Set
End Property
+ Public Property IDMovEditar As Integer
+ Get
+ Return CType(ViewState("IDMovEditar"), Integer)
+ End Get
+ Set(value As Integer)
+ ViewState("IDMovEditar") = value
+ End Set
+ End Property
+
Public Property TipoPoliza As String
Get
Return CType(ViewState("TipoPoliza"), String)
@@ -317,14 +326,15 @@ Partial Class ContabilidadC_RegPrePolizaS
.Add("CveConceptoContable", Type.GetType("System.Int32"))
.Add("IdCtaContable", Type.GetType("System.Int32"))
.Add("ConceptoContable", Type.GetType("System.String"))
- .Add("CveCuenta", Type.GetType("System.Int32"))
-
+ .Add("CveCuenta", Type.GetType("System.Int32"))
.Add("ContadoTipoTransaccion", Type.GetType("System.Int32"))
.Add("ContadoCuenta", Type.GetType("System.Int32"))
- .Add("ContadoNumeroFolio", Type.GetType("System.Int32"))
- .Add("ContadoImporte", Type.GetType("System.Int32"))
+ .Add("ContadoNumeroFolio", Type.GetType("System.String"))
+ .Add("ContadoImporte", Type.GetType("System.Double"))
.Add("ContadoBeneficiario", Type.GetType("System.String"))
.Add("ContadoObservaciones", Type.GetType("System.String"))
+ .Add("Modificado", Type.GetType("System.Boolean"))
+
End With
End Sub
@@ -430,7 +440,6 @@ Partial Class ContabilidadC_RegPrePolizaS
End If
ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza)
-
DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
GvPrePoliza.DataSource = DtMovimientos
GvPrePoliza.DataBind()
@@ -529,7 +538,9 @@ Partial Class ContabilidadC_RegPrePolizaS
If CveConceptoContable.Contiene(30, 204) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
'e.Row.FCHyperLink("HlReferencia").NavigateUrl = CveConceptoContable
-
+ If e.Row.DBCampo("Modificado") Then
+ e.Row.FCCheckBox("chkModificado").Checked = True
+ End If
End If
If e.Row.RowType = DataControlRowType.Header Then
@@ -826,10 +837,10 @@ Partial Class ContabilidadC_RegPrePolizaS
If e.Row.DataKey("CveConcepto").ToEntero.Contiene(30) Then
e.Row.FCLinkButton("ImgBancos").Visible = True
-
- If CveTipoTransaccion > 0 And CveCuenta > 0 And Folio.Length > 0 And ImporteDocumento > 0 And Beneficiario.Length > 0 Then
- e.Row.FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green"
- End If
+ If e.Row.DataKey("ContadoTipoTransaccion").ToEntero > 0 And e.Row.DataKey("ContadoCuenta").ToEntero > 0 And e.Row.DataKey("ContadoNumeroFolio").ToString.Length > 0 And
+ e.Row.DataKey("ContadoImporte").ToEntero > 0 And e.Row.DataKey("ContadoBeneficiario").ToString.Length > 0 Then
+ e.Row.FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green"
+ End If
End If
End If
End Sub
@@ -887,6 +898,7 @@ Partial Class ContabilidadC_RegPrePolizaS
'Registra movimieno bancario
If gvr.DataKey("CveConcepto").ToEntero = 30 Then
+
CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFecha.Text, gvr.DataKey("ContadoNumeroFolio").ToString,
gvr.DataKey("ContadoBeneficiario").ToString, gvr.DataKey("ContadoImporte").ToString.ToDecimal, CveMoneda, 0, gvr.DataKey("ContadoObservaciones").ToString, "",
False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
@@ -935,7 +947,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Else
MsgError = "No se pudo insertar el detalle de la póliza2"
Exit For
- End If
+ End If
End If
If CveIE > 0 AndAlso gvr.DataKey("CveConcepto").ToEntero = 30 Then
MensajeAlert.AppendFormat("
Folio Bancario: {1}", CveIE, FolioIE)
@@ -1147,7 +1159,7 @@ Partial Class ContabilidadC_RegPrePolizaS
End Sub
Private Sub CargaCtaContableE()
Dim ObjConta As New ClsContabilidad
- If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
+ If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
DdlCtaContableE.DataSource = ObjConta.DtResultados
End If
ObjConta.Dispose()
@@ -1273,8 +1285,6 @@ Partial Class ContabilidadC_RegPrePolizaS
dr("FolioFactura") = If(DdlComprasE.Visible = True, DdlComprasE.SelectedItem.ToString, If(DdlVentasE.Visible = True, DdlVentasE.SelectedItem.ToString, ""))
- TxtTotalAbonos.Text = (TxtTotalAbonos.Text.ToDouble + TxtAbonoE.Text.ToDouble).ToString.FormatoNumero
- TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDouble + TxtCargoE.Text.ToDouble).ToString.FormatoNumero
DtMovimientos.Rows.Add(dr)
DtMovimientos.AcceptChanges()
@@ -1282,7 +1292,12 @@ Partial Class ContabilidadC_RegPrePolizaS
GvPrePoliza.DataSource = DtMovimientos
GvPrePoliza.DataBind()
UpPrePoliza.Update()
- End If
+ End If
+
+ TxtTotalCargos.Text = DtMovimientos.SUMD("Cargo").ToString.FormatoNumero
+ TxtTotalAbonos.Text = DtMovimientos.SUMD("Abono").ToString.FormatoNumero
+ UpTotalCargo.Update()
+ UpTotalAbono.Update()
Else
'Dim dr As DataRow = DtMovimientos.NewRow
'Dim CodigoCuenta As String = ""
@@ -1352,6 +1367,8 @@ Partial Class ContabilidadC_RegPrePolizaS
dr("FolioFactura") = If(DdlComprasE.Visible = True, DdlComprasE.SelectedItem.ToString, If(DdlVentasE.Visible = True, DdlVentasE.SelectedItem.ToString, ""))
dr("CveCuenta") = DdlCtaContableE.SelectedValue.ToEntero
dr("CodigoNombreCuenta") = DdlCtaContableE.SelectedItem.Text
+ dr("Modificado") = True
+
'GvPrePoliza.Rows(IndiceGrid).FCHiddenField("HdnConceptoContable").Value = DdlConceptosContablesE.SelectedValue.ToEntero
'GvPrePoliza.Rows(IndiceGrid).FCHiddenField("HdnProveedor").Value = DdlProveedoresE.SelectedValue.ToEntero
@@ -1372,8 +1389,7 @@ Partial Class ContabilidadC_RegPrePolizaS
dr("Cargo") = "".ToDouble
End If
- TxtTotalAbonos.Text = (TxtTotalAbonos.Text.ToDouble + TxtAbonoE.Text.ToDouble).ToString.FormatoNumero
- TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDouble + TxtCargoE.Text.ToDouble).ToString.FormatoNumero
+
DtMovimientos.AcceptChanges()
GvPrePoliza.EditIndex = -1
@@ -1382,11 +1398,17 @@ Partial Class ContabilidadC_RegPrePolizaS
GvPrePoliza.DataBind()
UpPrePoliza.Update()
End If
- GvPrePoliza.Columns(11).Visible = True
+ GvPrePoliza.Columns(11).Visible = True
+ GvPrePoliza.Rows(IndiceGrid).FCCheckBox("chkModificado").Checked = True
- GvPrePoliza.Rows(IndiceGrid).FCCheckBox("chkModificado").Checked = True
+ TxtTotalCargos.Text = DtMovimientos.SUMD("Cargo").ToString.FormatoNumero
+ TxtTotalAbonos.Text = DtMovimientos.SUMD("Abono").ToString.FormatoNumero
+ UpTotalCargo.Update()
+ UpTotalAbono.Update()
+
End If
- End If
+ End If
+
UpPrePoliza.Update()
RegistraScript("$('#DivEditConcepto').modal('hide')", "hidemodal")
@@ -1563,17 +1585,17 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim IdMov As Integer = GvRow.DataKey("IdMov").ToString.ToEntero
Dim Rows As DataRow() = DtMovimientos.Select("IdMov = " & IdMov)
+ IDMovEditar = IdMov
If Rows.Count > 0 Then
Dim dr As DataRow = Rows(0)
- Dim folio As Integer = dr("ContadoTipoTransaccion").ToString.ToEntero
DdlTipoTransaccion.SelectedValueExist(dr("ContadoTipoTransaccion").ToString.ToEntero)
DdlCuenta.SelectedValueExist(dr("ContadoCuenta").ToString.ToEntero)
- TxtDocumentoFolio.Text = dr("ContadoNumeroFolio").ToString.ToEntero
+ TxtDocumentoFolio.Text = dr("ContadoNumeroFolio").ToString
TxtDocumentoObservaciones.Text = dr("ContadoObservaciones").ToString
TxtDocumentoBeneficiario.Text = dr("ContadoBeneficiario").ToString
End If
-
+
TxtDocumentoImporte.Text = If(GvRow.FCTextBox("TxtAbono").Text = "", GvRow.FCTextBox("TxtCargo").Text.FormatoNumero, GvRow.FCTextBox("TxtAbono").Text.FormatoNumero)
UpBancos.Update()
RegistraScript(String.Format("$('#{0}').modal();", "DivContadoModal"))
@@ -1590,14 +1612,31 @@ Partial Class ContabilidadC_RegPrePolizaS
DdlCuenta.DataBind()
DdlCuenta.Items.Insert(0, New ListItem("Seleccione", "-1"))
End Sub
- Private Sub BtnContado_Click(sender As Object, e As EventArgs) Handles BtnContado.Click
- CveConcepto = 30
- CveTipoTransaccion = DdlTipoTransaccion.SelectedValue.ToEntero
- CveCuenta = DdlCuenta.SelectedValue.ToEntero
- Folio = TxtDocumentoFolio.Text
- ImporteDocumento = TxtDocumentoImporte.Text.ToDecimal
- Observaciones = TxtDocumentoObservaciones.Text
- Beneficiario = TxtDocumentoBeneficiario.Text
+ Private Sub BtnContado_Click(sender As Object, e As EventArgs) Handles BtnContado.Click
+ Dim Rows As DataRow() = DtMovimientos.Select("IdMov = " & IDMovEditar)
+
+ If Rows.Count > 0 Then
+ Dim dr As DataRow = Rows(0)
+
+
+ dr("ContadoTipoTransaccion") = DdlTipoTransaccion.SelectedValue.ToEntero
+ dr("ContadoCuenta") = DdlCuenta.SelectedValue.ToEntero
+ dr("ContadoNumeroFolio") = TxtDocumentoFolio.Text
+ dr("ContadoImporte") = TxtDocumentoImporte.Text.ToDecimal
+ dr("ContadoBeneficiario") = TxtDocumentoBeneficiario.Text
+ dr("ContadoObservaciones") = TxtDocumentoObservaciones.Text
+ End If
+ DtMovimientos.AcceptChanges()
+ GvMov.DataSource = DtMovimientos
+ GvMov.DataBind()
+ 'CveTipoTransaccion = DdlTipoTransaccion.SelectedValue.ToEntero
+ 'CveCuenta = DdlCuenta.SelectedValue.ToEntero
+ 'Folio = TxtDocumentoFolio.Text
+ 'ImporteDocumento = TxtDocumentoImporte.Text.ToDecimal
+ 'Observaciones = TxtDocumentoObservaciones.Text
+ 'Beneficiario = TxtDocumentoBeneficiario.Text
+
+
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivContadoModal"))
GvMov.Rows(RowIndex).FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green"
UPMovs.Update()
@@ -2008,10 +2047,10 @@ Partial Class ContabilidadC_RegPrePolizaS
DdlCuenta.SelectedValue = CveBancoCuenta
End If
TipoMov = GlobalDTTipoTransacciones.FiltroPrimeroValor("CveTipoTransaccion", String.Format("TipoTransaccion = '{0}' ", Row("TipoTransferencia"))).ToEntero
- FolioExcel = Row("Folio").ToString.ToEntero
+ FolioExcel = Row("Folio").ToString
CveTipoTransaccion = TipoMov
CveCuenta = CveBancoCuenta
- Folio = Row("Folio").ToString.ToEntero
+ Folio = FolioExcel
ImporteDocumento = IIf(Row("Abono").ToString.ToEntero > 0, Row("Abono").ToString, Row("Cargo").ToString)
Observaciones = Row("Referencia").ToString
Beneficiario = Row("Concepto").ToString
diff --git a/Empresas/141/Formatos/Factura.rdlc b/Empresas/141/Formatos/Factura.rdlc
index c50c98442..fcdeda3a6 100644
--- a/Empresas/141/Formatos/Factura.rdlc
+++ b/Empresas/141/Formatos/Factura.rdlc
@@ -2165,7 +2165,7 @@
- Sinaloa: Los Mochis (668) 817-0209 - Los Mochis II (668) 176-5802 - Guasave (687) 871-5317 - Calzada (667) 729-2112 - Zapata (667) 992-0876 - Tierra Blanca (667) 716-6997 - Sanalona (667) 713-667
+ Sinaloa: Los Mochis (668) 817-0209 - Los Mochis II (668) 176-5802 - Guasave (687) 871-5317 - Calzada (667) 729-2112 - Zapata (667) 992-0876 - Guamuchil (673) 688-0108 - Sanalona (667) 713-667