This commit is contained in:
@@ -583,10 +583,23 @@
|
||||
<tr>
|
||||
<td style="width: 730px"> </td>
|
||||
<th style="width: 90px;">
|
||||
<asp:TextBox ID="TxtTotalCargos" runat="server" Style="text-align: right" Enabled="false" Width="90px" Text="0.00"></asp:TextBox></th>
|
||||
<asp:UpdatePanel ID="UpTotalCargo" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:TextBox ID="TxtTotalCargos" runat="server" Style="text-align: right" Enabled="false" Width="90px" Text="0.00"></asp:TextBox>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</th>
|
||||
<th style="width: 90px;">
|
||||
<asp:TextBox ID="TxtTotalAbonos" runat="server" Style="text-align: right" Enabled="false" Width="90px" Text="0.00"></asp:TextBox></th>
|
||||
<asp:UpdatePanel ID="UpTotalAbono" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:TextBox ID="TxtTotalAbonos" runat="server" Style="text-align: right" Enabled="false" Width="90px" Text="0.00"></asp:TextBox>
|
||||
|
||||
</ContentTemplate>
|
||||
|
||||
</asp:UpdatePanel>
|
||||
</th>
|
||||
<asp:HiddenField ID="HdnTotales" runat="server" ClientIDMode="Static" />
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="text-align: center;">
|
||||
@@ -770,7 +783,7 @@
|
||||
Cargo:
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<asp:TextBox ID="TxtCargoE" runat="server" CssClass=" txtcargo form-control input-sm" Style="text-align: right"></asp:TextBox><br />
|
||||
<asp:TextBox ID="TxtCargoE" runat="server" CssClass=" form-control input-sm" Style="text-align: right"></asp:TextBox><br />
|
||||
<asp:CompareValidator ID="CVCargo" runat="server" ControlToValidate="TxtCargo" Display="None" ErrorMessage="El campo <b>''Cargo''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCCargo" runat="server" HighlightCssClass="vco" TargetControlID="CVCargo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
@@ -778,7 +791,7 @@
|
||||
Abono:
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<asp:TextBox ID="TxtAbonoE" runat="server" CssClass=" txtabono form-control input-sm" Style="text-align: right"></asp:TextBox><br />
|
||||
<asp:TextBox ID="TxtAbonoE" runat="server" CssClass=" form-control input-sm" Style="text-align: right"></asp:TextBox><br />
|
||||
<asp:CompareValidator ID="CVAbono" runat="server" ControlToValidate="TxtAbono" Display="None" ErrorMessage="El campo <b>''Abono''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCAbono" runat="server" HighlightCssClass="vco" TargetControlID="CVAbono" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
@@ -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,12 +326,11 @@ 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.Dou"))
|
||||
.Add("ContadoBeneficiario", Type.GetType("System.String"))
|
||||
.Add("ContadoObservaciones", Type.GetType("System.String"))
|
||||
|
||||
@@ -826,10 +834,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 +895,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 +944,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("<br/><br/>Folio Bancario: <b><a href = ""/Bancos/IE.aspx?CveIE={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", CveIE, FolioIE)
|
||||
@@ -1273,8 +1282,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 +1289,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 = ""
|
||||
@@ -1372,8 +1384,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 +1393,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 +1580,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 +1607,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 +2042,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
|
||||
|
||||
Reference in New Issue
Block a user