EMD - OC Autorizadas, registrar prepóliza 154 Cargo, 152 Abono dolares
This commit is contained in:
@@ -329,8 +329,8 @@
|
|||||||
<table class="table Widthall ">
|
<table class="table Widthall ">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 20%; border-right: 3px solid white;">Agrupador</td>
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 20%; border-right: 3px solid white;">Agrupador</td>
|
||||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 15%; border-right: 3px solid white;">Autorizado</td>
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 10%; border-right: 3px solid white;">Autorizado</td>
|
||||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 15%; border-right: 3px solid white;">Comprometido</td>
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 10%; border-right: 3px solid white;">Comprometido</td>
|
||||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 25%; border-right: 3px solid white;">Ejercido</td>
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 25%; border-right: 3px solid white;">Ejercido</td>
|
||||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 25%; border-right: 3px solid white;">Por Ejercer</td>
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 25%; border-right: 3px solid white;">Por Ejercer</td>
|
||||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 15%; border-right: 3px solid white;">Pagado</td>
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 15%; border-right: 3px solid white;">Pagado</td>
|
||||||
@@ -342,8 +342,8 @@
|
|||||||
<Columns>
|
<Columns>
|
||||||
<%--<asp:HyperLinkField HeaderText="Descripcion" DataTextField="Agrupador" ItemStyle-Width="20%"--%>
|
<%--<asp:HyperLinkField HeaderText="Descripcion" DataTextField="Agrupador" ItemStyle-Width="20%"--%>
|
||||||
<asp:BoundField HeaderText="Descripcion" DataField="Agrupador" ItemStyle-Width="20%" />
|
<asp:BoundField HeaderText="Descripcion" DataField="Agrupador" ItemStyle-Width="20%" />
|
||||||
<asp:BoundField HeaderText="Importe" DataField="Autorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
|
<asp:BoundField HeaderText="Importe" DataField="Autorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
|
||||||
<asp:BoundField HeaderText="Comprometido" DataField="Comprometido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
|
<asp:BoundField HeaderText="Comprometido" DataField="Comprometido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
|
||||||
<asp:BoundField HeaderText="Importe" DataField="Ejercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
|
<asp:BoundField HeaderText="Importe" DataField="Ejercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
|
||||||
<asp:BoundField HeaderText="%" DataField="EjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
|
<asp:BoundField HeaderText="%" DataField="EjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
|
||||||
<asp:BoundField HeaderText="Importe" DataField="PorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
|
<asp:BoundField HeaderText="Importe" DataField="PorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
|
||||||
|
|||||||
@@ -926,7 +926,13 @@ Partial Class OC_OC
|
|||||||
ChkEntregaDirecta.Checked = False
|
ChkEntregaDirecta.Checked = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If CveOrdenCompra > 0 AndAlso Request("Conta") IsNot Nothing AndAlso Request("Conta").ToEntero = 1 Then
|
||||||
|
If GeneraPrePolizaPresupuesto(CveOrdenCompra, Nothing) Then
|
||||||
|
Alert("PrePoliza de Presupuesto Generada Correctamente")
|
||||||
|
Else
|
||||||
|
Alert("No Se Genero la PrePoliza de Presupuesto Generada Correctamente", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -9151,21 +9157,28 @@ Partial Class OC_OC
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Private Function GeneraPrePolizaPresupuesto(CveOrdenCompraPrePoliza As Integer, Optional ByRef transaccion As SqlTransaction = Nothing) As Boolean
|
Private Function GeneraPrePolizaPresupuesto(CveOrdenCompraPresupuesto As Integer, Optional ByRef transaccion As SqlTransaction = Nothing) As Boolean
|
||||||
|
|
||||||
Dim Respuesta As Boolean = True
|
Dim Respuesta As Boolean = True
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then
|
||||||
|
|
||||||
|
Dim CveMonedaPresupuesto As Integer = DdlMoneda.SelectedValue.ToEntero
|
||||||
|
Dim TC As Decimal = If(CveMonedaPresupuesto = 1, 1, GlobalTipoCambio(TxtFecha.Text.ToDate).ToDecimal)
|
||||||
|
|
||||||
|
If CveMonedaPresupuesto > 1 AndAlso TC = 0 Then
|
||||||
|
Alert($"No se genero la prepoliza de presupuesto, no se pudo obtener el Tipo de Cambio de la fecha {TxtFecha.Text}", TipoMensaje.MsgAdvertencia)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
Dim ObjConta As New ClsContabilidad()
|
Dim ObjConta As New ClsContabilidad()
|
||||||
|
|
||||||
If transaccion Is Nothing Then
|
If transaccion Is Nothing Then
|
||||||
ObjConta = New ClsContabilidad(Nothing)
|
ObjConta = New ClsContabilidad()
|
||||||
Else
|
Else
|
||||||
ObjConta = New ClsContabilidad(transaccion)
|
ObjConta = New ClsContabilidad(transaccion)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim CvePrePolizaPreSuPuesto = ObjConta.AddPrePolizas("OC/OC-(Presupuesto)", 53, LblTotal.Text.ToDecimal, LblTotal.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlProveedores.SelectedText, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
Dim CvePrePolizaPreSuPuesto = ObjConta.AddPrePolizas("OC/OC-(Presupuesto)", 53, LblTotal.Text.ToDecimal, LblTotal.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlProveedores.SelectedText, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
If CvePrePolizaPreSuPuesto > 0 Then
|
If CvePrePolizaPreSuPuesto > 0 Then
|
||||||
@@ -9189,12 +9202,16 @@ Partial Class OC_OC
|
|||||||
|
|
||||||
Dim SerieFolio = $"OC: {Folio}, Clasificación: {item.Clasificacion}"
|
Dim SerieFolio = $"OC: {Folio}, Clasificación: {item.Clasificacion}"
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaPreSuPuesto, False, item.TotalSum, item.TotalSum, 154, SerieFolio, SerieFolio, CveProveedor:=DdlProveedores.SelectedValue.ToEntero, CveOC:=CveOrdenCompraPrePoliza, CveClasificacion:=item.CveClasificacion, CveSubProyecto:=item.CveSubProyecto, Contabilizable:=True) Then
|
Dim Importe As Decimal = item.TotalSum
|
||||||
|
Dim ImporteME As Decimal = If(CveMonedaPresupuesto = 1, 0, item.TotalSum)
|
||||||
|
Dim ImporteMN As Decimal = If(CveMonedaPresupuesto = 1, 1, item.TotalSum * TC)
|
||||||
|
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaPreSuPuesto, False, Importe, ImporteMN, 154, SerieFolio, SerieFolio, ImporteME:=ImporteME, TipoCambio:=TC, CveProveedor:=DdlProveedores.SelectedValue.ToEntero, CveOC:=CveOrdenCompraPresupuesto, CveClasificacion:=item.CveClasificacion, CveSubProyecto:=item.CveSubProyecto, Contabilizable:=True) Then
|
||||||
Respuesta = False
|
Respuesta = False
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaPreSuPuesto, True, item.TotalSum, item.TotalSum, 152, SerieFolio, SerieFolio, CveProveedor:=DdlProveedores.SelectedValue.ToEntero, CveOC:=CveOrdenCompraPrePoliza, CveClasificacion:=item.CveClasificacion, CveSubProyecto:=item.CveSubProyecto, Contabilizable:=True) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaPreSuPuesto, True, Importe, ImporteMN, 152, SerieFolio, SerieFolio, ImporteME:=ImporteME, TipoCambio:=TC, CveProveedor:=DdlProveedores.SelectedValue.ToEntero, CveOC:=CveOrdenCompraPresupuesto, CveClasificacion:=item.CveClasificacion, CveSubProyecto:=item.CveSubProyecto, Contabilizable:=True) Then
|
||||||
Respuesta = False
|
Respuesta = False
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user