Reg Prepolzias S
This commit is contained in:
@@ -498,7 +498,7 @@
|
|||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>Cargo</HeaderTemplate>
|
<HeaderTemplate>Cargo</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtCargo" CssClass="txtcargo" runat="server" Style="text-align: right" Width="65px" Visible="False"></asp:TextBox>
|
<asp:TextBox ID="TxtCargo" CssClass="txtcargo" runat="server" Style="text-align: right" Width="65px" Visible="False" Text='<%# If(String.IsNullOrEmpty(Eval("Cargo").ToString), "", Eval("Cargo", "{0:0.00}")) %>'></asp:TextBox>
|
||||||
<div id="divCargoME" runat="server" Visible="False">ME:<asp:TextBox ID="TxtCargoME" CssClass="" runat="server" Style="text-align: right" Width="55px"></asp:TextBox>
|
<div id="divCargoME" runat="server" Visible="False">ME:<asp:TextBox ID="TxtCargoME" CssClass="" runat="server" Style="text-align: right" Width="55px"></asp:TextBox>
|
||||||
TC:<asp:TextBox ID="TxtTC" CssClass="" runat="server" Style="text-align: right" Width="45px"></asp:TextBox>
|
TC:<asp:TextBox ID="TxtTC" CssClass="" runat="server" Style="text-align: right" Width="45px"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
@@ -508,7 +508,7 @@
|
|||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>Abono</HeaderTemplate>
|
<HeaderTemplate>Abono</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtAbono" CssClass="txtabono" runat="server" Style="text-align: right" Width="65px" Visible="False"></asp:TextBox>
|
<asp:TextBox ID="TxtAbono" CssClass="txtabono" runat="server" Style="text-align: right" Width="65px" Visible="False" Text='<%# If(String.IsNullOrEmpty(Eval("Abono").ToString), "", Eval("Abono", "{0:0.00}")) %>' ></asp:TextBox>
|
||||||
<div id="divAbonoME" runat="server" Visible="False">ME:<asp:TextBox ID="TxtAbonoME" CssClass="" runat="server" Style="text-align: right" Width="55px" ></asp:TextBox></div>
|
<div id="divAbonoME" runat="server" Visible="False">ME:<asp:TextBox ID="TxtAbonoME" CssClass="" runat="server" Style="text-align: right" Width="55px" ></asp:TextBox></div>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right" />
|
<ItemStyle HorizontalAlign="Right" />
|
||||||
|
|||||||
@@ -381,9 +381,17 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
.Add("EsComplementaria", Type.GetType("System.Boolean"))
|
.Add("EsComplementaria", Type.GetType("System.Boolean"))
|
||||||
.Add("TC", Type.GetType("System.Decimal"))
|
.Add("TC", Type.GetType("System.Decimal"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
|
|
||||||
|
If Not DtMovimientos.Columns.Contains("Cargo") Then
|
||||||
|
DtMovimientos.Columns.Add("Cargo", Type.GetType("System.Decimal"))
|
||||||
|
DtMovimientos.Columns.Add("Abono", Type.GetType("System.Decimal"))
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
DtMovimientos.AcceptChanges()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Private Sub CargaNomina()
|
'Private Sub CargaNomina()
|
||||||
@@ -517,9 +525,16 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
DtMovimientos.Columns.Add("ContadoObservaciones", GetType(String))
|
DtMovimientos.Columns.Add("ContadoObservaciones", GetType(String))
|
||||||
DtMovimientos.Columns.Add("ContadoImporte", GetType(Decimal))
|
DtMovimientos.Columns.Add("ContadoImporte", GetType(Decimal))
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not DtMovimientos.Columns.Contains("Cargo") Then
|
||||||
|
DtMovimientos.Columns.Add("Cargo", GetType(Decimal))
|
||||||
|
DtMovimientos.Columns.Add("Abono", GetType(Decimal))
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
GvPrePoliza.DataBind()
|
GvPrePoliza.DataBind()
|
||||||
|
|
||||||
If UsuarioActual.CveRol = 1 AndAlso DtMovimientos.COUNT("TC", "TC > 1") > 0 Then
|
If UsuarioActual.CveRol = 1 AndAlso DtMovimientos.COUNT("TC", "TC > 1") > 0 Then
|
||||||
@@ -1015,6 +1030,11 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
Dim MsgError As String = ""
|
Dim MsgError As String = ""
|
||||||
Dim CveIE As Integer
|
Dim CveIE As Integer
|
||||||
Dim FolioIE As String = ""
|
Dim FolioIE As String = ""
|
||||||
|
Dim ContRegInsertados As Integer = 0
|
||||||
|
|
||||||
|
Dim TmpCargo As Decimal = 0D
|
||||||
|
Dim TmpAbono As Decimal = 0D
|
||||||
|
Dim DifCargoAbono As Decimal = 0D
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|
||||||
@@ -1032,7 +1052,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
|
|
||||||
FolioPoliza = ObjMov.FolioPoliza
|
FolioPoliza = ObjMov.FolioPoliza
|
||||||
|
|
||||||
|
|
||||||
'inserto las compras que voy a pagarDdlSaldos
|
'inserto las compras que voy a pagarDdlSaldos
|
||||||
For Each gvr As GridViewRow In GvMov.Rows
|
For Each gvr As GridViewRow In GvMov.Rows
|
||||||
'If gvr.DataKey("IDCuenta").ToEntero > 0 Then
|
'If gvr.DataKey("IDCuenta").ToEntero > 0 Then
|
||||||
@@ -1056,20 +1075,28 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
|
|
||||||
ImporteME = 0
|
ImporteME = 0
|
||||||
TipoCambio = 1
|
TipoCambio = 1
|
||||||
|
|
||||||
If gvr.DataKey("TipoMovto").ToDouble > 0 Then
|
If gvr.DataKey("TipoMovto").ToDouble > 0 Then
|
||||||
Importe = gvr.FCTextBox("TxtAbono").Text.ToDouble
|
Importe = gvr.FCTextBox("TxtAbono").Text.ToDouble
|
||||||
|
TmpAbono = TmpAbono + Importe
|
||||||
TipoMovto = True
|
TipoMovto = True
|
||||||
|
|
||||||
If gvr.DataKey("EsComplementaria") = "True" Then
|
If gvr.DataKey("EsComplementaria") = "True" Then
|
||||||
ImporteME = gvr.FCTextBox("TxtAbonoME").Text.ToDecimal
|
ImporteME = gvr.FCTextBox("TxtAbonoME").Text.ToDecimal
|
||||||
TipoCambio = gvr.FCTextBox("TipoCambio").Text.ToDecimal
|
TipoCambio = gvr.FCTextBox("TipoCambio").Text.ToDecimal
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|
||||||
Importe = gvr.FCTextBox("TxtCargo").Text.ToDouble
|
Importe = gvr.FCTextBox("TxtCargo").Text.ToDouble
|
||||||
|
TmpCargo = TmpCargo + Importe
|
||||||
TipoMovto = False
|
TipoMovto = False
|
||||||
|
|
||||||
If gvr.DataKey("EsComplementaria") = "True" Then
|
If gvr.DataKey("EsComplementaria") = "True" Then
|
||||||
ImporteME = gvr.FCTextBox("TxtCargoME").Text.ToDecimal
|
ImporteME = gvr.FCTextBox("TxtCargoME").Text.ToDecimal
|
||||||
TipoCambio = gvr.FCTextBox("TxtTC").Text.ToDecimal
|
TipoCambio = gvr.FCTextBox("TxtTC").Text.ToDecimal
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If gvr.DataKey("CveConcepto").ToEntero <> 30 Then
|
If gvr.DataKey("CveConcepto").ToEntero <> 30 Then
|
||||||
@@ -1100,6 +1127,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
ImporteMX:=Importe, ImporteME:=ImporteME, TipoCambio:=TipoCambio,
|
ImporteMX:=Importe, ImporteME:=ImporteME, TipoCambio:=TipoCambio,
|
||||||
CveTipoGasto:=gvr.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero,
|
CveTipoGasto:=gvr.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero,
|
||||||
CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCuenta:=tCveCuenta) Then
|
CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCuenta:=tCveCuenta) Then
|
||||||
|
ContRegInsertados = ContRegInsertados + 1
|
||||||
|
|
||||||
Else
|
Else
|
||||||
MsgError = "No se pudo insertar el detalle de la póliza2"
|
MsgError = "No se pudo insertar el detalle de la póliza2"
|
||||||
Exit For
|
Exit For
|
||||||
@@ -1108,6 +1137,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
If CveIE > 0 AndAlso gvr.DataKey("CveConcepto").ToEntero = 30 Then
|
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)
|
MensajeAlert.AppendFormat("<br/><br/>Folio Bancario: <b><a href = ""/Bancos/IE.aspx?CveIE={0}"" class=""Texto"" target=""_blank"" >{1}</a></b>", CveIE, FolioIE)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePolizaInsertada, 1) Then
|
If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePolizaInsertada, 1) Then
|
||||||
@@ -1124,40 +1154,48 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
MsgError = "No se pudo insertar la póliza"
|
MsgError = "No se pudo insertar la póliza"
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgError = "Error"
|
MsgError = $"Error {ex.Message}"
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
If MsgError = "" Then
|
|
||||||
'MENSAJE IE
|
|
||||||
|
|
||||||
'If CveIE Then
|
If ContRegInsertados = 0 Then
|
||||||
' Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion, "window.location.reload()")
|
MsgError = $"No se insertaron registros (Revise que los importes de los registros contengan valores)"
|
||||||
'Else
|
|
||||||
' Alert(If(MensajeAlert.ToString = "", "Se registro con exito.", MensajeAlert.ToString), TipoMensaje.MsgInformacion, "window.location.reload()")
|
|
||||||
'End If
|
|
||||||
|
|
||||||
Alert(If(MensajeAlert.ToString = "", $"Se registro con exito <b>{If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")}</b>", $"Se registro con exito <b>{If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")} </b><br>" & MensajeAlert.ToString), TipoMensaje.MsgInformacion, $"window.location.href=""./RegPrePolizaS.aspx?CvePrePoliza={CvePrePolizaInsertada}""")
|
|
||||||
|
|
||||||
|
|
||||||
ObjIE.Commit()
|
|
||||||
If Conta IsNot Nothing Then Conta.Commit()
|
|
||||||
|
|
||||||
UPPDocumento.Update()
|
|
||||||
|
|
||||||
TxtConcepto.Text = ""
|
|
||||||
GvMov.DataBind()
|
|
||||||
TxtFechaDocumento.Text = ""
|
|
||||||
|
|
||||||
Else
|
|
||||||
Alert(MsgError.ToString, ModExtensiones.TipoMensaje.MsgError)
|
|
||||||
ObjIE.RollBack()
|
|
||||||
If Conta IsNot Nothing Then Conta.RollBack()
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjIE.Dispose()
|
|
||||||
ObjMov.Dispose()
|
If MsgError = "" Then
|
||||||
If Conta IsNot Nothing Then Conta.Dispose()
|
'MENSAJE IE
|
||||||
End If
|
|
||||||
|
'If CveIE Then
|
||||||
|
' Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion, "window.location.reload()")
|
||||||
|
'Else
|
||||||
|
' Alert(If(MensajeAlert.ToString = "", "Se registro con exito.", MensajeAlert.ToString), TipoMensaje.MsgInformacion, "window.location.reload()")
|
||||||
|
'End If
|
||||||
|
|
||||||
|
Alert(If(MensajeAlert.ToString = "", $"Se registro con exito <b>{If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")}</b>", $"Se registro con exito <b>{If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")} </b><br>" & MensajeAlert.ToString), TipoMensaje.MsgInformacion, $"window.location.href=""./RegPrePolizaS.aspx?CvePrePoliza={CvePrePolizaInsertada}""")
|
||||||
|
|
||||||
|
|
||||||
|
ObjIE.Commit()
|
||||||
|
If Conta IsNot Nothing Then Conta.Commit()
|
||||||
|
|
||||||
|
UPPDocumento.Update()
|
||||||
|
|
||||||
|
TxtConcepto.Text = ""
|
||||||
|
'GvMov.DataBind()
|
||||||
|
DdlPlantilla_SelectedIndexChanged(Nothing, Nothing)
|
||||||
|
|
||||||
|
TxtFechaDocumento.Text = ""
|
||||||
|
|
||||||
|
Else
|
||||||
|
Alert(MsgError.ToString, ModExtensiones.TipoMensaje.MsgError)
|
||||||
|
ObjIE.RollBack()
|
||||||
|
If Conta IsNot Nothing Then Conta.RollBack()
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjIE.Dispose()
|
||||||
|
ObjMov.Dispose()
|
||||||
|
If Conta IsNot Nothing Then Conta.Dispose()
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ActualizarPrePoliza()
|
Private Sub ActualizarPrePoliza()
|
||||||
@@ -2004,7 +2042,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
If Rows.Count > 0 Then
|
If Rows.Count > 0 Then
|
||||||
Dim dr As DataRow = Rows(0)
|
Dim dr As DataRow = Rows(0)
|
||||||
|
|
||||||
|
|
||||||
dr("ContadoTipoTransaccion") = DdlTipoTransaccion.SelectedValue.ToEntero
|
dr("ContadoTipoTransaccion") = DdlTipoTransaccion.SelectedValue.ToEntero
|
||||||
dr("ContadoCuenta") = DdlCuenta.SelectedValue.ToEntero
|
dr("ContadoCuenta") = DdlCuenta.SelectedValue.ToEntero
|
||||||
dr("ContadoNumeroFolio") = TxtDocumentoFolio.Text
|
dr("ContadoNumeroFolio") = TxtDocumentoFolio.Text
|
||||||
@@ -2012,9 +2049,33 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
dr("ContadoBeneficiario") = TxtDocumentoBeneficiario.Text
|
dr("ContadoBeneficiario") = TxtDocumentoBeneficiario.Text
|
||||||
dr("ContadoObservaciones") = TxtDocumentoObservaciones.Text
|
dr("ContadoObservaciones") = TxtDocumentoObservaciones.Text
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DtMovimientos.AcceptChanges()
|
DtMovimientos.AcceptChanges()
|
||||||
|
|
||||||
|
If Not DtMovimientos.Columns.Contains("Cargo") Then
|
||||||
|
DtMovimientos.Columns.Add("Cargo", GetType(Decimal))
|
||||||
|
DtMovimientos.Columns.Add("Abono", GetType(Decimal))
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim IndexX As Integer = 0
|
||||||
|
For Each PGvRow As GridViewRow In GvMov.Rows
|
||||||
|
|
||||||
|
If PGvRow.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
|
DtMovimientos.Rows(IndexX)("Cargo") = PGvRow.FCTextBox("TxtCargo").Text.ToDecimal
|
||||||
|
DtMovimientos.Rows(IndexX)("Abono") = PGvRow.FCTextBox("TxtAbono").Text.ToDecimal
|
||||||
|
|
||||||
|
IndexX = IndexX + 1
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
GvMov.DataSource = DtMovimientos
|
GvMov.DataSource = DtMovimientos
|
||||||
GvMov.DataBind()
|
GvMov.DataBind()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'CveTipoTransaccion = DdlTipoTransaccion.SelectedValue.ToEntero
|
'CveTipoTransaccion = DdlTipoTransaccion.SelectedValue.ToEntero
|
||||||
'CveCuenta = DdlCuenta.SelectedValue.ToEntero
|
'CveCuenta = DdlCuenta.SelectedValue.ToEntero
|
||||||
'Folio = TxtDocumentoFolio.Text
|
'Folio = TxtDocumentoFolio.Text
|
||||||
@@ -2793,6 +2854,12 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If Not DtMovimientos.Columns.Contains("Cargo") Then
|
||||||
|
DtMovimientos.Columns.Add("Cargo", GetType(Decimal))
|
||||||
|
DtMovimientos.Columns.Add("Abono", GetType(Decimal))
|
||||||
|
End If
|
||||||
|
|
||||||
GvPrePoliza.DataSource = DtMovimientos
|
GvPrePoliza.DataSource = DtMovimientos
|
||||||
GvPrePoliza.DataBind()
|
GvPrePoliza.DataBind()
|
||||||
|
|
||||||
|
|||||||
@@ -84,8 +84,8 @@ Partial Class Contabilidad_RepOrigenAplicacion
|
|||||||
|
|
||||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||||
|
|
||||||
TabMensual.Enabled = False
|
TabMensual.Visible = False
|
||||||
TabAnual.Enabled = False
|
TabAnual.Visible = False
|
||||||
TdFI.Visible = False
|
TdFI.Visible = False
|
||||||
tdTipoReporte.Visible = False
|
tdTipoReporte.Visible = False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user