- modal de importaciones
This commit is contained in:
@@ -38,22 +38,21 @@
|
|||||||
<li runat="server" visible="false" id="liFletesImportaciones">
|
<li runat="server" visible="false" id="liFletesImportaciones">
|
||||||
<asp:LinkButton ID="LnkFletesImportaciones" runat="server"><i class='fa fa-truck'></i> Costo Indirecto/Importaciones</asp:LinkButton>
|
<asp:LinkButton ID="LnkFletesImportaciones" runat="server"><i class='fa fa-truck'></i> Costo Indirecto/Importaciones</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
<asp:UpdatePanel ID="UPPRefac" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPPRefac" runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<li runat="server" visible="false" id="VerRefacturacion">
|
<li runat="server" visible="false" id="VerRefacturacion">
|
||||||
<asp:LinkButton Text="Refacturación" ID="BtnRefacturacionVer" runat="server" />
|
<asp:LinkButton Text="Refacturación" ID="BtnRefacturacionVer" runat="server" />
|
||||||
</li>
|
</li>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<asp:UpdatePanel ID="UPPVales" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPPVales" runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<li runat="server" visible="false" id="VerVales">
|
<li runat="server" visible="false" id="VerVales">
|
||||||
<asp:LinkButton Text="Vales Combustible" ID="BtnValesCombustibleVer" runat="server" />
|
<asp:LinkButton Text="Vales Combustible" ID="BtnValesCombustibleVer" runat="server" />
|
||||||
</li>
|
</li>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
<asp:UpdatePanel ID="UPPDescontablizar" runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||||
<asp:UpdatePanel ID="UPPDescontablizar" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="BtnDescontabilizar" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar la poliza?" data-btn-ok-label="si" Text="Descontabilizar" runat="server" OnClick="BtnDescontabilizar_Click" Visible="false"> <i class="fa fa-minus-square"></i> Descontabilizar</asp:LinkButton>
|
<asp:LinkButton ID="BtnDescontabilizar" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar la poliza?" data-btn-ok-label="si" Text="Descontabilizar" runat="server" OnClick="BtnDescontabilizar_Click" Visible="false"> <i class="fa fa-minus-square"></i> Descontabilizar</asp:LinkButton>
|
||||||
@@ -69,7 +68,7 @@
|
|||||||
<li>
|
<li>
|
||||||
<asp:HyperLink ID="HLPagar" CssClass="thickbox" Visible="false" runat="server"><i class='fa fa-money'></i> Pagar</asp:HyperLink>
|
<asp:HyperLink ID="HLPagar" CssClass="thickbox" Visible="false" runat="server"><i class='fa fa-money'></i> Pagar</asp:HyperLink>
|
||||||
</li>
|
</li>
|
||||||
<asp:UpdatePanel ID="UpDevolucionAlmacen" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpDevolucionAlmacen" runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<li id="LiDevolucionAlmacen" runat="server" visible="false">
|
<li id="LiDevolucionAlmacen" runat="server" visible="false">
|
||||||
<%--<asp:LinkButton Text="Solicitar Devolución" OnClick="LBDevolucionAlmacen_Click" ID="LBDevolucionAlmacen" runat="server" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro de solicitar la Devolución de Almacén?" data-btn-ok-label="si" />--%>
|
<%--<asp:LinkButton Text="Solicitar Devolución" OnClick="LBDevolucionAlmacen_Click" ID="LBDevolucionAlmacen" runat="server" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro de solicitar la Devolución de Almacén?" data-btn-ok-label="si" />--%>
|
||||||
@@ -77,9 +76,7 @@
|
|||||||
</li>
|
</li>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpAccionesContratos" UpdateMode="Conditional" RenderMode="Inline">
|
||||||
|
|
||||||
<asp:UpdatePanel runat="server" ID="UpAccionesContratos" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<li runat="server" visible="false" id="LiAccionesContratos">
|
<li runat="server" visible="false" id="LiAccionesContratos">
|
||||||
|
|||||||
@@ -1175,6 +1175,9 @@ Partial Class Compras_Compras
|
|||||||
'LbTotalPorDevengar.Attributes.Add("OnInnerTextChanged", "TotalDevendar();")
|
'LbTotalPorDevengar.Attributes.Add("OnInnerTextChanged", "TotalDevendar();")
|
||||||
'Mensaje temporalca
|
'Mensaje temporalca
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(155) <> "" Then liFletesImportaciones.Visible = True ' FNC Importaciones
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(158) <> "" Then liFletesImportaciones.Visible = True ' FNC Indirectos
|
||||||
|
|
||||||
RBLPago.Visible = True
|
RBLPago.Visible = True
|
||||||
If UsuarioActual.Empresa.UsaAC Then RBLPago.Items.RemoveAt(2) 'Elimina Reembolso cuando es AC
|
If UsuarioActual.Empresa.UsaAC Then RBLPago.Items.RemoveAt(2) 'Elimina Reembolso cuando es AC
|
||||||
|
|
||||||
@@ -1207,7 +1210,7 @@ Partial Class Compras_Compras
|
|||||||
DdlSubProyecto.AutoPostBack = True
|
DdlSubProyecto.AutoPostBack = True
|
||||||
|
|
||||||
GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa) = Nothing
|
GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa) = Nothing
|
||||||
Dim extrafiltro = "Estatus=1 AND "
|
Dim extrafiltro As String = "Estatus=1 AND "
|
||||||
If Request("CveCompra") IsNot Nothing AndAlso IsNumeric(Request("CveCompra")) AndAlso Request("CveCompra").ToEntero > 0 Then
|
If Request("CveCompra") IsNot Nothing AndAlso IsNumeric(Request("CveCompra")) AndAlso Request("CveCompra").ToEntero > 0 Then
|
||||||
extrafiltro = ""
|
extrafiltro = ""
|
||||||
End If
|
End If
|
||||||
@@ -1396,8 +1399,6 @@ Partial Class Compras_Compras
|
|||||||
BtnGuardar.ToolTip = "Obliga a seleccionar una Orden de compra para su registro."
|
BtnGuardar.ToolTip = "Obliga a seleccionar una Orden de compra para su registro."
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'Valida Proceso 119 para ROL Administrador de obra - Bloquea Contado
|
'Valida Proceso 119 para ROL Administrador de obra - Bloquea Contado
|
||||||
If UsuarioActual.TienePermisoProceso(119) Then
|
If UsuarioActual.TienePermisoProceso(119) Then
|
||||||
RBLPago.Items(1).Enabled = False
|
RBLPago.Items(1).Enabled = False
|
||||||
@@ -10907,7 +10908,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
ObjAF.Dispose()
|
ObjAF.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub DdlTipoMantemiento_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlTipoMantemiento_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
Dim dr = TmpDT.Rows(CType(CType(sender, DropDownList).NamingContainer, GridViewRow).RowIndex)
|
Dim dr As DataRow = TmpDT.Rows(CType(CType(sender, DropDownList).NamingContainer, GridViewRow).RowIndex)
|
||||||
|
|
||||||
dr("AFTipoMantenimiento") = CType(CType(sender, DropDownList).NamingContainer, GridViewRow).FCDropDownList("DdlTipoMantemiento").SelectedValue.ToEntero
|
dr("AFTipoMantenimiento") = CType(CType(sender, DropDownList).NamingContainer, GridViewRow).FCDropDownList("DdlTipoMantemiento").SelectedValue.ToEntero
|
||||||
|
|
||||||
@@ -11006,7 +11007,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
If TxtAjustePorcentaje.Text.ToDecimal <> 0 Then
|
If TxtAjustePorcentaje.Text.ToDecimal <> 0 Then
|
||||||
For Each Dr As DataRow In TmpDT.Rows
|
For Each Dr As DataRow In TmpDT.Rows
|
||||||
'Dr("PU") = Dr("PU").ToString.ToDecimal * ((100 - TxtAjustePorcentaje.Text.ToDecimal) / 100)
|
'Dr("PU") = Dr("PU").ToString.ToDecimal * ((100 - TxtAjustePorcentaje.Text.ToDecimal) / 100)
|
||||||
Dim TotalAnterior = Dr("Total").ToString.ToDecimal
|
Dim TotalAnterior As Decimal = Dr("Total").ToString.ToDecimal
|
||||||
Dr("Total") = Dr("Total").ToString.ToDecimal * ((100 - TxtAjustePorcentaje.Text.ToDecimal) / 100)
|
Dr("Total") = Dr("Total").ToString.ToDecimal * ((100 - TxtAjustePorcentaje.Text.ToDecimal) / 100)
|
||||||
Dr("Descuento") = TotalAnterior - Dr("Total").ToString.ToDecimal
|
Dr("Descuento") = TotalAnterior - Dr("Total").ToString.ToDecimal
|
||||||
Next
|
Next
|
||||||
@@ -13578,7 +13579,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
CargaOC()
|
CargaOC()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaOC()
|
Private Sub CargaOC()
|
||||||
Dim EntregaDirecta = 0
|
Dim EntregaDirecta As Integer = 0
|
||||||
DivOCSolicitudAnticipo.Visible = False
|
DivOCSolicitudAnticipo.Visible = False
|
||||||
DivOCSolicitudAnticipoModal.Visible = False
|
DivOCSolicitudAnticipoModal.Visible = False
|
||||||
|
|
||||||
@@ -13592,8 +13593,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
GvOC1.Columns(1).Visible = True
|
GvOC1.Columns(1).Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CvesOC = ""
|
Dim CvesOC As String = ""
|
||||||
|
|
||||||
|
|
||||||
If PopUpOC Then
|
If PopUpOC Then
|
||||||
CvesOC = HdnVCveOC.Value
|
CvesOC = HdnVCveOC.Value
|
||||||
@@ -13615,7 +13615,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Else
|
Else
|
||||||
Dim TextoErrorOC = ""
|
Dim TextoErrorOC As String = ""
|
||||||
Dim ArrayCveOC As String() = TxtOC.Text.Split(New Char() {","c})
|
Dim ArrayCveOC As String() = TxtOC.Text.Split(New Char() {","c})
|
||||||
For i As Integer = 0 To ArrayCveOC.Count - 1
|
For i As Integer = 0 To ArrayCveOC.Count - 1
|
||||||
If OC.GetOrdenesCompraRep("OC", -1, -1, -1, -1, MinFecha, MaxFecha, -1, CveProveedor, ArrayCveOC(i).ToEntero, -1, -1, UsuarioActual.CveEmpresa, -1) Then
|
If OC.GetOrdenesCompraRep("OC", -1, -1, -1, -1, MinFecha, MaxFecha, -1, CveProveedor, ArrayCveOC(i).ToEntero, -1, -1, UsuarioActual.CveEmpresa, -1) Then
|
||||||
@@ -13672,7 +13672,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
If TxtOC.Text <> "" Then
|
If TxtOC.Text <> "" Then
|
||||||
|
|
||||||
'VARIABLES
|
'VARIABLES
|
||||||
Dim TextoObservaciones = ""
|
Dim TextoObservaciones As String = ""
|
||||||
LtOCPromocion.Text = ""
|
LtOCPromocion.Text = ""
|
||||||
IvaAcumulado = 0
|
IvaAcumulado = 0
|
||||||
DTOCTemp = New DataTable
|
DTOCTemp = New DataTable
|
||||||
@@ -13687,7 +13687,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
'CARGAMOS LOS DATOS DE LAS OC
|
'CARGAMOS LOS DATOS DE LAS OC
|
||||||
Dim ObjOC As New ClsOC
|
Dim ObjOC As New ClsOC
|
||||||
Dim ArrayCveOC As String() = HdnVCveOC.Value.Split(New Char() {","c})
|
Dim ArrayCveOC As String() = HdnVCveOC.Value.Split(New Char() {","c})
|
||||||
Dim FoliosOCAnticipo = "", FoliosOCAnticipoIE = ""
|
Dim FoliosOCAnticipo As String = "", FoliosOCAnticipoIE As String = ""
|
||||||
Dim StrPromos As New StringBuilder
|
Dim StrPromos As New StringBuilder
|
||||||
|
|
||||||
For Each CveOCItem As String In ArrayCveOC.Distinct
|
For Each CveOCItem As String In ArrayCveOC.Distinct
|
||||||
@@ -13720,9 +13720,9 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'PROMOCIONES
|
'PROMOCIONES
|
||||||
Dim Promocion = ObjOC.DtResultados.Rows(0)("Promocion").ToString
|
Dim Promocion As String = ObjOC.DtResultados.Rows(0)("Promocion").ToString
|
||||||
If Not String.IsNullOrEmpty(Promocion) Then
|
If Not String.IsNullOrEmpty(Promocion) Then
|
||||||
Dim FolioOC = ObjOC.DtResultados.Rows(0)("FolioOC").ToString
|
Dim FolioOC As String = ObjOC.DtResultados.Rows(0)("FolioOC").ToString
|
||||||
StrPromos.Append($"<b>OC #{FolioOC}</b> {Promocion} <br/> ")
|
StrPromos.Append($"<b>OC #{FolioOC}</b> {Promocion} <br/> ")
|
||||||
StrPromos.AppendLine()
|
StrPromos.AppendLine()
|
||||||
End If
|
End If
|
||||||
@@ -13739,7 +13739,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
|
|
||||||
'MOVIMIENTOS DE ALMACÉN
|
'MOVIMIENTOS DE ALMACÉN
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
Dim FoliosOCAlmacen = ""
|
Dim FoliosOCAlmacen As String = ""
|
||||||
For Each CveOCItem As String In ArrayCveOC.Distinct
|
For Each CveOCItem As String In ArrayCveOC.Distinct
|
||||||
If ObjInventarios.GetMovimientosOC(CveOCItem.ToEntero, UsuarioActual.CveEmpresa) Then
|
If ObjInventarios.GetMovimientosOC(CveOCItem.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjInventarios.DtResultados.Rows.Count > 0 Then
|
If ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||||
@@ -13842,7 +13842,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
CargaTotalesOC()
|
CargaTotalesOC()
|
||||||
|
|
||||||
'Diferencia permitida $ entre OC y Compra
|
'Diferencia permitida $ entre OC y Compra
|
||||||
Dim DiferenciaPermitida = 1
|
Dim DiferenciaPermitida As Decimal = 1
|
||||||
|
|
||||||
'VINCULACION TOTAL
|
'VINCULACION TOTAL
|
||||||
If CargaInicial And DivTipoCambioOC.Visible = False Then
|
If CargaInicial And DivTipoCambioOC.Visible = False Then
|
||||||
@@ -13911,17 +13911,15 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
Protected Sub GvOC1_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvOC1.RowDataBound
|
Protected Sub GvOC1_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvOC1.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
Dim JSCambiaScript = $"CalculaTotalOCEdit('{e.Row.DBCampo("PS").Replace("'", "").Replace(vbLf, " ").Replace(vbCrLf, " ")}', {e.Row.DBCampo("Cantidad").ToString.ToDouble}, {e.Row.FCTextBox("TxtCantidad").ClientID}, {e.Row.FCTextBox("TxtPU").ClientID}, {e.Row.FCTextBox("TxtTotalOC1").ClientID}, {e.Row.DBCampo("IEPSPS").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IEPSImporte").ClientID}, {e.Row.DBCampo("IVA").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IVA").ClientID},{e.Row.DBCampo("RetIVA").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1RetIVA").ClientID},{e.Row.DBCampo("RetISR").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1RetISR").ClientID},{e.Row.DBCampo("IEPSPS").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IEPSIVA").ClientID},{e.Row.DBCampo("Descuento")},{e.Row.FCHiddenField("HdnOC1Descuento").ClientID},{e.Row.DBCampo("IVAPorcentaje").ToString.ToDouble},{e.Row.DBCampo("RetIVAPorcentaje").ToString.ToDouble},{e.Row.DBCampo("RetISRPorcentaje").ToString.ToDouble},{e.Row.DBCampo("IEPSPSPorcentaje").ToString.ToDouble},{e.Row.DBCampo("IEPSPSIVAPorcentaje").ToString.ToDouble});"
|
Dim JSCambiaScript As String = $"CalculaTotalOCEdit('{e.Row.DBCampo("PS").Replace("'", "").Replace(vbLf, " ").Replace(vbCrLf, " ")}', {e.Row.DBCampo("Cantidad").ToString.ToDouble}, {e.Row.FCTextBox("TxtCantidad").ClientID}, {e.Row.FCTextBox("TxtPU").ClientID}, {e.Row.FCTextBox("TxtTotalOC1").ClientID}, {e.Row.DBCampo("IEPSPS").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IEPSImporte").ClientID}, {e.Row.DBCampo("IVA").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IVA").ClientID},{e.Row.DBCampo("RetIVA").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1RetIVA").ClientID},{e.Row.DBCampo("RetISR").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1RetISR").ClientID},{e.Row.DBCampo("IEPSPS").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IEPSIVA").ClientID},{e.Row.DBCampo("Descuento")},{e.Row.FCHiddenField("HdnOC1Descuento").ClientID},{e.Row.DBCampo("IVAPorcentaje").ToString.ToDouble},{e.Row.DBCampo("RetIVAPorcentaje").ToString.ToDouble},{e.Row.DBCampo("RetISRPorcentaje").ToString.ToDouble},{e.Row.DBCampo("IEPSPSPorcentaje").ToString.ToDouble},{e.Row.DBCampo("IEPSPSIVAPorcentaje").ToString.ToDouble});"
|
||||||
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onkeyup", $"LimitaCantidadOC({e.Row.DBCampo("CantidadPendienteVincular")}, this);{JSCambiaScript}")
|
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onkeyup", $"LimitaCantidadOC({e.Row.DBCampo("CantidadPendienteVincular")}, this);{JSCambiaScript}")
|
||||||
e.Row.FCTextBox("TxtPU").Attributes.Add("onkeyup", JSCambiaScript)
|
e.Row.FCTextBox("TxtPU").Attributes.Add("onkeyup", JSCambiaScript)
|
||||||
|
|
||||||
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onblur", $"ValidaImporteCero('{e.Row.DBCampo("PS").Replace("'", "")}',{e.Row.FCTextBox("TxtCantidad").ClientID}, {e.Row.FCTextBox("TxtPU").ClientID});")
|
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onblur", $"ValidaImporteCero('{e.Row.DBCampo("PS").Replace("'", "")}',{e.Row.FCTextBox("TxtCantidad").ClientID}, {e.Row.FCTextBox("TxtPU").ClientID});")
|
||||||
e.Row.FCTextBox("TxtPU").Attributes.Add("onblur", $"ValidaImporteCero('{e.Row.DBCampo("PS").Replace("'", "")}',{e.Row.FCTextBox("TxtCantidad").ClientID}, {e.Row.FCTextBox("TxtPU").ClientID});")
|
e.Row.FCTextBox("TxtPU").Attributes.Add("onblur", $"ValidaImporteCero('{e.Row.DBCampo("PS").Replace("'", "")}',{e.Row.FCTextBox("TxtCantidad").ClientID}, {e.Row.FCTextBox("TxtPU").ClientID});")
|
||||||
|
|
||||||
|
|
||||||
RegistraScript(JSCambiaScript)
|
RegistraScript(JSCambiaScript)
|
||||||
|
|
||||||
|
|
||||||
If e.Row.DataKey("FolioREQ").ToString.Trim.Length > 0 Then
|
If e.Row.DataKey("FolioREQ").ToString.Trim.Length > 0 Then
|
||||||
Dim LblOC As Label = e.Row.FCLabel("LblOC")
|
Dim LblOC As Label = e.Row.FCLabel("LblOC")
|
||||||
LblOC.Attributes.Add("data-toggle", "tooltip")
|
LblOC.Attributes.Add("data-toggle", "tooltip")
|
||||||
@@ -13929,8 +13927,6 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
LblOC.Attributes.Add("title", "REQ: " & e.Row.DataKey("FolioREQ").ToString)
|
LblOC.Attributes.Add("title", "REQ: " & e.Row.DataKey("FolioREQ").ToString)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If e.Row.DBCampo("CveTipoPS").ToEntero = 2 And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 Then
|
If e.Row.DBCampo("CveTipoPS").ToEntero = 2 And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 Then
|
||||||
Select Case e.Row.DBCampo("EstatusInventario").ToEntero
|
Select Case e.Row.DBCampo("EstatusInventario").ToEntero
|
||||||
Case 1
|
Case 1
|
||||||
@@ -13967,14 +13963,14 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
|
|
||||||
Private Sub CargaTotalesOC()
|
Private Sub CargaTotalesOC()
|
||||||
|
|
||||||
Dim TotalOC = 0.0D
|
Dim TotalOC As Decimal = 0.0D
|
||||||
For Each gvr As GridViewRow In GvOC1.Rows
|
For Each gvr As GridViewRow In GvOC1.Rows
|
||||||
TotalOC += gvr.FCTextBox("TxtTotalOC1").Text.ToDecimal
|
TotalOC += gvr.FCTextBox("TxtTotalOC1").Text.ToDecimal
|
||||||
Next
|
Next
|
||||||
|
|
||||||
'SUBTOTAL OC
|
'SUBTOTAL OC
|
||||||
LbSubTotalOC1Mod.Text = (TotalOC + DTOCGV.SUM("Descuento")).FormatoNumero
|
LbSubTotalOC1Mod.Text = (TotalOC + DTOCGV.SUM("Descuento")).FormatoNumero()
|
||||||
LbSubTotalOC1.Text = (TotalOC + DTOCGV.SUM("Descuento")).FormatoNumero
|
LbSubTotalOC1.Text = (TotalOC + DTOCGV.SUM("Descuento")).FormatoNumero()
|
||||||
|
|
||||||
'SUBTOTAL2 OC
|
'SUBTOTAL2 OC
|
||||||
LbSubTotal2OC1Mod.Text = TotalOC.FormatoNumero
|
LbSubTotal2OC1Mod.Text = TotalOC.FormatoNumero
|
||||||
@@ -14081,14 +14077,14 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
' End If
|
' End If
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
Dim SubTotalGV = 0.0D
|
Dim SubTotalGV As Decimal = 0.0D
|
||||||
Dim Amortizacion As Decimal = TmpDT.SUMD("Total")
|
Dim Amortizacion As Decimal = TmpDT.SUMD("Total")
|
||||||
If ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 Then
|
If ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 Then
|
||||||
Amortizacion = TmpDT.SUMD("ImporteSinImpuestos")
|
Amortizacion = TmpDT.SUMD("ImporteSinImpuestos")
|
||||||
End If
|
End If
|
||||||
Dim SubTotalCompra As Decimal = Amortizacion
|
Dim SubTotalCompra As Decimal = Amortizacion
|
||||||
Dim DiferenciaPermitida = 1
|
Dim DiferenciaPermitida As Decimal = 1
|
||||||
Dim Cont = 0
|
Dim Cont As Integer = 0
|
||||||
'Dim ProductosCodigoSATNoPermitidos As New StringBuilder("")
|
'Dim ProductosCodigoSATNoPermitidos As New StringBuilder("")
|
||||||
For Each gvr As GridViewRow In GvOC1.Rows
|
For Each gvr As GridViewRow In GvOC1.Rows
|
||||||
SubTotalGV += gvr.FCTextBox("TxtTotalOC1").Text.ToDecimal
|
SubTotalGV += gvr.FCTextBox("TxtTotalOC1").Text.ToDecimal
|
||||||
@@ -14158,15 +14154,15 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'PSCodigo DE XML IP
|
'PSCodigo DE XML IP
|
||||||
Dim DtTemporalXML = TmpDT.Copy
|
Dim DtTemporalXML As DataTable = TmpDT.Copy
|
||||||
Dim IndexTmpOriginal = 0
|
Dim IndexTmpOriginal As Integer = 0
|
||||||
|
|
||||||
'Borramos el TmpDT
|
'Borramos el TmpDT
|
||||||
CreaDTCompras()
|
CreaDTCompras()
|
||||||
|
|
||||||
'Iteramos el GridView de la OC
|
'Iteramos el GridView de la OC
|
||||||
Dim dr As DataRow
|
Dim dr As DataRow
|
||||||
Dim Index = 0
|
Dim Index As Integer = 0
|
||||||
Dim MensajeCostoCero As New StringBuilder
|
Dim MensajeCostoCero As New StringBuilder
|
||||||
Dim TotalRows As Integer = 0
|
Dim TotalRows As Integer = 0
|
||||||
For Each gvr As GridViewRow In GvOC1.Rows
|
For Each gvr As GridViewRow In GvOC1.Rows
|
||||||
@@ -14226,7 +14222,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
Dim CveSATPSActualizado As Boolean = gvr.FCDropDownLost("DdlSATPS").SelectedValue.ToEntero <> dr("CveSATPS").ToString.ToEntero
|
Dim CveSATPSActualizado As Boolean = gvr.FCDropDownLost("DdlSATPS").SelectedValue.ToEntero <> dr("CveSATPS").ToString.ToEntero
|
||||||
'[IPP] PROVISIONAL PARA TIPO GASTO
|
'[IPP] PROVISIONAL PARA TIPO GASTO
|
||||||
If GlobalDTTiposGastos(UsuarioActual.CveEmpresa) IsNot Nothing AndAlso GlobalDTTiposGastos(UsuarioActual.CveEmpresa).Rows.Count = 1 Then
|
If GlobalDTTiposGastos(UsuarioActual.CveEmpresa) IsNot Nothing AndAlso GlobalDTTiposGastos(UsuarioActual.CveEmpresa).Rows.Count = 1 Then
|
||||||
Dim DrTipoGasto = GlobalDTTiposGastos(UsuarioActual.CveEmpresa).FiltroPrimero("")
|
Dim DrTipoGasto As DataRow = GlobalDTTiposGastos(UsuarioActual.CveEmpresa).FiltroPrimero("")
|
||||||
If DrTipoGasto IsNot Nothing Then
|
If DrTipoGasto IsNot Nothing Then
|
||||||
CveTipoGasto = DrTipoGasto("CveTipoGasto").ToString.ToEntero
|
CveTipoGasto = DrTipoGasto("CveTipoGasto").ToString.ToEntero
|
||||||
TipoGasto = DrTipoGasto("TipoGasto").ToString
|
TipoGasto = DrTipoGasto("TipoGasto").ToString
|
||||||
@@ -14489,7 +14485,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
|
|
||||||
'[IPP] PROVISIONAL PARA TIPO GASTO
|
'[IPP] PROVISIONAL PARA TIPO GASTO
|
||||||
If GlobalDTTiposGastos(UsuarioActual.CveEmpresa) IsNot Nothing AndAlso GlobalDTTiposGastos(UsuarioActual.CveEmpresa).Rows.Count = 1 Then
|
If GlobalDTTiposGastos(UsuarioActual.CveEmpresa) IsNot Nothing AndAlso GlobalDTTiposGastos(UsuarioActual.CveEmpresa).Rows.Count = 1 Then
|
||||||
Dim DrTipoGasto = GlobalDTTiposGastos(UsuarioActual.CveEmpresa).FiltroPrimero("")
|
Dim DrTipoGasto As DataRow = GlobalDTTiposGastos(UsuarioActual.CveEmpresa).FiltroPrimero("")
|
||||||
If DrTipoGasto IsNot Nothing Then
|
If DrTipoGasto IsNot Nothing Then
|
||||||
CveTipoGasto = DrTipoGasto("CveTipoGasto").ToString.ToEntero
|
CveTipoGasto = DrTipoGasto("CveTipoGasto").ToString.ToEntero
|
||||||
TipoGasto = DrTipoGasto("TipoGasto").ToString
|
TipoGasto = DrTipoGasto("TipoGasto").ToString
|
||||||
@@ -14497,7 +14493,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'AGREGA PS
|
'AGREGA PS
|
||||||
Dim IndexVinculacionOC = AddPS(Cantidad, CveUM, UM, CveClasificacion, Clasificacion, CvePS, PS, CveTipoPS, CveSubProyectoContrato, SubProyecto, Proyecto, CveProyecto, Obs, PU, Total, IVA, RetIVA, RetISR, IEPSPS, IEPSPSIVA, Descuento, CveOrdenCompraDetalle, False, CantidadF:=CantidadF, EntregaDirecta:=EntregaDirecta, CveSATPS:=CveSATPS, CveTipoGasto:=CveTipoGasto, TipoGasto:=TipoGasto)
|
Dim IndexVinculacionOC As Integer = AddPS(Cantidad, CveUM, UM, CveClasificacion, Clasificacion, CvePS, PS, CveTipoPS, CveSubProyectoContrato, SubProyecto, Proyecto, CveProyecto, Obs, PU, Total, IVA, RetIVA, RetISR, IEPSPS, IEPSPSIVA, Descuento, CveOrdenCompraDetalle, False, CantidadF:=CantidadF, EntregaDirecta:=EntregaDirecta, CveSATPS:=CveSATPS, CveTipoGasto:=CveTipoGasto, TipoGasto:=TipoGasto)
|
||||||
|
|
||||||
'CARGA PE
|
'CARGA PE
|
||||||
TmpDT.Rows(IndexVinculacionOC)("CvePresupuestoEgreso") = dr("CvePresupuestoEgreso").ToString.ToEntero
|
TmpDT.Rows(IndexVinculacionOC)("CvePresupuestoEgreso") = dr("CvePresupuestoEgreso").ToString.ToEntero
|
||||||
@@ -14565,14 +14561,14 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
CargaVinculacionOC()
|
CargaVinculacionOC()
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnDividirCompra_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnDividirCompra_Click(sender As Object, e As EventArgs)
|
||||||
Dim Cantidad = CType(CType(sender, Button).NamingContainer, GridViewRow).FCTextBox("TxtDividir").Text.ToDecimal
|
Dim Cantidad As Decimal = CType(CType(sender, Button).NamingContainer, GridViewRow).FCTextBox("TxtDividir").Text.ToDecimal
|
||||||
|
|
||||||
If Cantidad < 0.1 Then
|
If Cantidad < 0.1 Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim dr = TmpDT.Rows(CType(CType(sender, Button).NamingContainer, GridViewRow).RowIndex)
|
Dim dr As DataRow = TmpDT.Rows(CType(CType(sender, Button).NamingContainer, GridViewRow).RowIndex)
|
||||||
Dim drNuevo = TmpDT.NewRow
|
Dim drNuevo As DataRow = TmpDT.NewRow
|
||||||
|
|
||||||
drNuevo.ItemArray = dr.ItemArray
|
drNuevo.ItemArray = dr.ItemArray
|
||||||
drNuevo("Cantidad") = Cantidad
|
drNuevo("Cantidad") = Cantidad
|
||||||
@@ -14798,7 +14794,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
|
|
||||||
'Si los costosindirectos no suman el total exacto del flete ajustamos el ultimo concepto
|
'Si los costosindirectos no suman el total exacto del flete ajustamos el ultimo concepto
|
||||||
If CostoIndirectoTotal <> TotalFlete AndAlso IndiceActualizar >= 0 Then
|
If CostoIndirectoTotal <> TotalFlete AndAlso IndiceActualizar >= 0 Then
|
||||||
Dim Diferencia = TotalFlete - CostoIndirectoTotal
|
Dim Diferencia As Decimal = TotalFlete - CostoIndirectoTotal
|
||||||
TmpDT.Rows(IndiceActualizar)("CostoIndirectoAlmacen") = TmpDT.Rows(IndiceActualizar)("CostoIndirectoAlmacen").ToString.ToDouble + Diferencia
|
TmpDT.Rows(IndiceActualizar)("CostoIndirectoAlmacen") = TmpDT.Rows(IndiceActualizar)("CostoIndirectoAlmacen").ToString.ToDouble + Diferencia
|
||||||
TmpDT.Rows(IndiceActualizar)("OtrosGastos") = TmpDT.Rows(IndiceActualizar)("OtrosGastos").ToString.ToDouble + Diferencia
|
TmpDT.Rows(IndiceActualizar)("OtrosGastos") = TmpDT.Rows(IndiceActualizar)("OtrosGastos").ToString.ToDouble + Diferencia
|
||||||
End If
|
End If
|
||||||
@@ -14898,10 +14894,8 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
Next
|
Next
|
||||||
UpGVServicios.Update()
|
UpGVServicios.Update()
|
||||||
|
|
||||||
|
|
||||||
If Not TotalFlete > 0 Then Exit Sub
|
If Not TotalFlete > 0 Then Exit Sub
|
||||||
|
|
||||||
|
|
||||||
'Asignamos los costos indirectos y los indices
|
'Asignamos los costos indirectos y los indices
|
||||||
For Each Drt As DataRow In TmpDT.Rows
|
For Each Drt As DataRow In TmpDT.Rows
|
||||||
If ListaConsecutivas.Contains(Drt("Consec").ToString) Then
|
If ListaConsecutivas.Contains(Drt("Consec").ToString) Then
|
||||||
@@ -14916,7 +14910,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
|
|
||||||
'Si los costosindirectos no suman el total exacto del flete ajustamos el ultimo concepto
|
'Si los costosindirectos no suman el total exacto del flete ajustamos el ultimo concepto
|
||||||
If CostoIndirectoTotal <> TotalFlete AndAlso IndiceActualizar >= 0 Then
|
If CostoIndirectoTotal <> TotalFlete AndAlso IndiceActualizar >= 0 Then
|
||||||
Dim Diferencia = TotalFlete - CostoIndirectoTotal
|
Dim Diferencia As Decimal = TotalFlete - CostoIndirectoTotal
|
||||||
TmpDT.Rows(IndiceActualizar)("CostoIndirectoAlmacen") = TmpDT.Rows(IndiceActualizar)("CostoIndirectoAlmacen").ToString.ToDouble + Diferencia
|
TmpDT.Rows(IndiceActualizar)("CostoIndirectoAlmacen") = TmpDT.Rows(IndiceActualizar)("CostoIndirectoAlmacen").ToString.ToDouble + Diferencia
|
||||||
TmpDT.Rows(IndiceActualizar)("OtrosGastos") = TmpDT.Rows(IndiceActualizar)("OtrosGastos").ToString.ToDouble + Diferencia
|
TmpDT.Rows(IndiceActualizar)("OtrosGastos") = TmpDT.Rows(IndiceActualizar)("OtrosGastos").ToString.ToDouble + Diferencia
|
||||||
End If
|
End If
|
||||||
@@ -15011,9 +15005,6 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
GVServicios.Visible = False
|
GVServicios.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(155) <> "" Then LnkFletesImportaciones.Visible = True ' FNC Importaciones
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(158) <> "" Then LnkFletesImportaciones.Visible = True ' FNC Indirectos
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Function AplicarCostoIndirecto(ObjInv As ClsInventarios, ObjCompras As ClsCompras) As Boolean
|
Public Function AplicarCostoIndirecto(ObjInv As ClsInventarios, ObjCompras As ClsCompras) As Boolean
|
||||||
@@ -15054,7 +15045,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
'If total > 0 Then
|
'If total > 0 Then
|
||||||
|
|
||||||
If dtTemporal IsNot Nothing Then
|
If dtTemporal IsNot Nothing Then
|
||||||
Dim TotalFacturas = dtTemporal.SUM("Total").ToString.ToDecimal
|
Dim TotalFacturas As Decimal = dtTemporal.SUM("Total").ToString.ToDecimal
|
||||||
For Each row As DataRow In dtTemporal.Rows
|
For Each row As DataRow In dtTemporal.Rows
|
||||||
Dim prorrateo As Decimal
|
Dim prorrateo As Decimal
|
||||||
prorrateo = (row("PU").ToString.ToDecimal * TotalServicios) / TotalFacturas
|
prorrateo = (row("PU").ToString.ToDecimal * TotalServicios) / TotalFacturas
|
||||||
@@ -15091,7 +15082,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
If ObjCompras.GetCompraDetalle(CveCompra, UsuarioActual.CveEmpresa) Then
|
If ObjCompras.GetCompraDetalle(CveCompra, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjInv.GetMovimientosDetalle(-1, UsuarioActual.CveEmpresa, CveCompra) Then
|
If ObjInv.GetMovimientosDetalle(-1, UsuarioActual.CveEmpresa, CveCompra) Then
|
||||||
Dtcompra = ObjInv.DtResultados
|
Dtcompra = ObjInv.DtResultados
|
||||||
Dim TotalProductos = Dtcompra.SUM("Total").ToString.ToDecimal
|
Dim TotalProductos As Decimal = Dtcompra.SUM("Total").ToString.ToDecimal
|
||||||
If TotalProductos > 0 Then
|
If TotalProductos > 0 Then
|
||||||
For Each row As DataRow In Dtcompra.Rows
|
For Each row As DataRow In Dtcompra.Rows
|
||||||
Dim prorrateo As Decimal
|
Dim prorrateo As Decimal
|
||||||
@@ -16247,15 +16238,13 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
End Sub
|
End Sub
|
||||||
Protected Sub DdlSubProyecto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlSubProyecto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Modalidad <> "U" Or Not CveFactura > 0 Then
|
If Modalidad <> "U" Or Not CveFactura > 0 Then
|
||||||
DdlPSChange()
|
DdlPSChange()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 Then
|
If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 Then
|
||||||
GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa) = Nothing
|
GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa) = Nothing
|
||||||
Dim extrafiltro = "Estatus=1 AND "
|
Dim extrafiltro As String = "Estatus=1 AND "
|
||||||
If Request("CveCompra") IsNot Nothing AndAlso IsNumeric(Request("CveCompra")) AndAlso Request("CveCompra").ToEntero > 0 Then
|
If Request("CveCompra") IsNot Nothing AndAlso IsNumeric(Request("CveCompra")) AndAlso Request("CveCompra").ToEntero > 0 Then
|
||||||
extrafiltro = ""
|
extrafiltro = ""
|
||||||
End If
|
End If
|
||||||
@@ -16512,7 +16501,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
Dim dttemp As New DataTable
|
Dim dttemp As New DataTable
|
||||||
dttemp.Columns.Add("CveSubProyecto", GetType(Integer))
|
dttemp.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||||
dttemp.Columns.Add("CvePS", GetType(Integer))
|
dttemp.Columns.Add("CvePS", GetType(Integer))
|
||||||
Dim DrPS = dttemp.NewRow
|
Dim DrPS As DataRow = dttemp.NewRow
|
||||||
DrPS("CveSubProyecto") = DdlSubProyecto.SelectedValue.ToString.ToEntero
|
DrPS("CveSubProyecto") = DdlSubProyecto.SelectedValue.ToString.ToEntero
|
||||||
DrPS("CvePS") = DdlPS.SelectedValue.ToString.ToEntero
|
DrPS("CvePS") = DdlPS.SelectedValue.ToString.ToEntero
|
||||||
dttemp.Rows.Add(DrPS)
|
dttemp.Rows.Add(DrPS)
|
||||||
@@ -16558,8 +16547,8 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
Select Case Modalidad
|
Select Case Modalidad
|
||||||
Case "A" 'ADD
|
Case "A" 'ADD
|
||||||
|
|
||||||
Dim SATClavePS = -1
|
Dim SATClavePS As Integer = -1
|
||||||
Dim PSRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("")
|
Dim PSRow As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("")
|
||||||
If PSRow IsNot Nothing Then
|
If PSRow IsNot Nothing Then
|
||||||
SATClavePS = PSRow("SATClavePS").ToString.ToEntero
|
SATClavePS = PSRow("SATClavePS").ToString.ToEntero
|
||||||
End If
|
End If
|
||||||
@@ -16652,8 +16641,8 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
|
|
||||||
Row = TmpDT.NewRow()
|
Row = TmpDT.NewRow()
|
||||||
Dim Retorno As Integer = 0
|
Dim Retorno As Integer = 0
|
||||||
Dim CveContrato = -1
|
Dim CveContrato As Integer = -1
|
||||||
Dim CveSubProyecto = -1
|
Dim CveSubProyecto As Integer = -1
|
||||||
Dim Valores As String()
|
Dim Valores As String()
|
||||||
|
|
||||||
''CONTRATOS
|
''CONTRATOS
|
||||||
@@ -16713,8 +16702,6 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Try
|
Try
|
||||||
If (DrPS("CvePSCargo").ToString <> "") Then 'si es un producto de usado. que se registre contablemente como alamcen(como producto)
|
If (DrPS("CvePSCargo").ToString <> "") Then 'si es un producto de usado. que se registre contablemente como alamcen(como producto)
|
||||||
CveTipoPS = 2
|
CveTipoPS = 2
|
||||||
@@ -16723,7 +16710,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
|
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Dim DecimalesPermitidos = 6
|
Dim DecimalesPermitidos As Integer = 6
|
||||||
|
|
||||||
Row("CveConcepto") = TmpDT.Rows.Count + 1
|
Row("CveConcepto") = TmpDT.Rows.Count + 1
|
||||||
Row("Cantidad") = Math.Round(Cantidad, DecimalesPermitidos)
|
Row("Cantidad") = Math.Round(Cantidad, DecimalesPermitidos)
|
||||||
@@ -16868,7 +16855,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
|
|
||||||
|
|
||||||
'BANDERA
|
'BANDERA
|
||||||
Dim AplicaCalculaTotales = False
|
Dim AplicaCalculaTotales As Boolean = False
|
||||||
|
|
||||||
'DATOS GENERALES
|
'DATOS GENERALES
|
||||||
DrPS("Obs") = TxtObsPS.Text.Trim
|
DrPS("Obs") = TxtObsPS.Text.Trim
|
||||||
@@ -16879,10 +16866,10 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
DrPS("CveContratoDetalle") = CveContratoDetalle
|
DrPS("CveContratoDetalle") = CveContratoDetalle
|
||||||
|
|
||||||
'IMPORTES - [CANTIDAD Y PRECIO]
|
'IMPORTES - [CANTIDAD Y PRECIO]
|
||||||
Dim Cantidad = DrPS("Cantidad").ToString.ToDouble
|
Dim Cantidad As Double = DrPS("Cantidad").ToString.ToDouble
|
||||||
Dim PU = DrPS("PU").ToString.ToDouble
|
Dim PU As Double = DrPS("PU").ToString.ToDouble
|
||||||
Dim Descuento = DrPS("Descuento").ToString.ToDouble
|
Dim Descuento As Double = DrPS("Descuento").ToString.ToDouble
|
||||||
Dim Total = (Cantidad * PU) - Descuento
|
Dim Total As Double = (Cantidad * PU) - Descuento
|
||||||
DrPS("NoDeducible") = ChkEsNoDeduciblePS.Checked
|
DrPS("NoDeducible") = ChkEsNoDeduciblePS.Checked
|
||||||
|
|
||||||
Dim ActualizarIva As Boolean = False
|
Dim ActualizarIva As Boolean = False
|
||||||
@@ -16907,7 +16894,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
'PS - CLASIFICACION
|
'PS - CLASIFICACION
|
||||||
If DdlPS.SelectedValue.ToEntero > 0 Then
|
If DdlPS.SelectedValue.ToEntero > 0 Then
|
||||||
|
|
||||||
Dim PSRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("")
|
Dim PSRow As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("")
|
||||||
If PSRow IsNot Nothing Then
|
If PSRow IsNot Nothing Then
|
||||||
Dim CveTipoPS As Integer = PSRow("CveTipoPS").ToString.ToEntero
|
Dim CveTipoPS As Integer = PSRow("CveTipoPS").ToString.ToEntero
|
||||||
If PSRow("CvePSCargo").ToString <> "" Then 'si es un producto de usado. que se registre contablemente como alamcen(como producto)
|
If PSRow("CvePSCargo").ToString <> "" Then 'si es un producto de usado. que se registre contablemente como alamcen(como producto)
|
||||||
@@ -16949,11 +16936,11 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
|
|
||||||
'IMPUESTOS: SI ES COMPRA, FACUTRA O CON OC, NO MODIFICA IMPUESTOS!!
|
'IMPUESTOS: SI ES COMPRA, FACUTRA O CON OC, NO MODIFICA IMPUESTOS!!
|
||||||
'Dim IVA = (TxtIVAModal.Text.ToDouble / 100)
|
'Dim IVA = (TxtIVAModal.Text.ToDouble / 100)
|
||||||
Dim IVA = Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2)
|
Dim IVA As Decimal = Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2)
|
||||||
Dim RetISR = (TxtRetISRModal.Text.ToDecimal / 100)
|
Dim RetISR As Decimal = (TxtRetISRModal.Text.ToDecimal / 100)
|
||||||
Dim RetIVA = (TxtRetIVAModal.Text.ToDecimal / 100)
|
Dim RetIVA As Decimal = (TxtRetIVAModal.Text.ToDecimal / 100)
|
||||||
Dim IEPSPS = (TxtIEPSModal.Text.ToDecimal / 100)
|
Dim IEPSPS As Decimal = (TxtIEPSModal.Text.ToDecimal / 100)
|
||||||
Dim IEPSPSIVA = 0
|
Dim IEPSPSIVA As Decimal = 0
|
||||||
|
|
||||||
'I f Not (CveCompra > 0 Or CveFactura > 0 Or OCVinculada) Then
|
'I f Not (CveCompra > 0 Or CveFactura > 0 Or OCVinculada) Then
|
||||||
'If DdlIVA.SelectedValue.ToDouble = 0 Then DrPS("IVA") = 0 Else DrPS("IVA") = IVA * Total
|
'If DdlIVA.SelectedValue.ToDouble = 0 Then DrPS("IVA") = 0 Else DrPS("IVA") = IVA * Total
|
||||||
@@ -17690,14 +17677,14 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
|
|
||||||
Private Sub CargaNCINV(Optional ShowAllPendientes As Boolean = False)
|
Private Sub CargaNCINV(Optional ShowAllPendientes As Boolean = False)
|
||||||
|
|
||||||
Dim SaldoAnticipo = 0.0
|
Dim SaldoAnticipo As Decimal = 0
|
||||||
Dim CveCompras As String = ""
|
Dim CveCompras As String = ""
|
||||||
|
|
||||||
If ChkNCInvNC.Checked Then
|
If ChkNCInvNC.Checked Then
|
||||||
If Not ShowAllPendientes Then
|
If Not ShowAllPendientes Then
|
||||||
For Each gvr As GridViewRow In GvFacturaNC.Rows
|
For Each gvr As GridViewRow In GvFacturaNC.Rows
|
||||||
If gvr.FCCheckBox("ChkFacturaNC") IsNot Nothing AndAlso gvr.FCCheckBox("ChkFacturaNC").Checked Then
|
If gvr.FCCheckBox("ChkFacturaNC") IsNot Nothing AndAlso gvr.FCCheckBox("ChkFacturaNC").Checked Then
|
||||||
SaldoAnticipo += gvr.FCTextBox("TxtImporte").Text.ToDouble
|
SaldoAnticipo += gvr.FCTextBox("TxtImporte").Text.ToDecimal
|
||||||
If CveCompras <> "" Then
|
If CveCompras <> "" Then
|
||||||
CveCompras = $"{CveCompras},{gvr.DataKey("CveCompra").ToString}"
|
CveCompras = $"{CveCompras},{gvr.DataKey("CveCompra").ToString}"
|
||||||
Else
|
Else
|
||||||
@@ -17709,7 +17696,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
Else
|
Else
|
||||||
For Each gvr As GridViewRow In GVAnticipos.Rows
|
For Each gvr As GridViewRow In GVAnticipos.Rows
|
||||||
If gvr.FCCheckBox("Chk") IsNot Nothing AndAlso gvr.FCCheckBox("Chk").Checked Then
|
If gvr.FCCheckBox("Chk") IsNot Nothing AndAlso gvr.FCCheckBox("Chk").Checked Then
|
||||||
SaldoAnticipo += gvr.FCTextBox("TxtAnticipo").Text.ToDouble
|
SaldoAnticipo += gvr.FCTextBox("TxtAnticipo").Text.ToDecimal
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@@ -17780,8 +17767,8 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Contador = 0
|
Dim Contador As Integer = 0
|
||||||
Dim CveCompraNC = -1
|
Dim CveCompraNC As Integer = -1
|
||||||
For Each gvr As GridViewRow In GVAnticipos.Rows
|
For Each gvr As GridViewRow In GVAnticipos.Rows
|
||||||
If gvr.FCCheckBox("Chk") IsNot Nothing AndAlso gvr.FCCheckBox("Chk").Checked Then
|
If gvr.FCCheckBox("Chk") IsNot Nothing AndAlso gvr.FCCheckBox("Chk").Checked Then
|
||||||
Contador += 1
|
Contador += 1
|
||||||
@@ -17914,7 +17901,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
Dim ObjCompra As New ClsCompras
|
Dim ObjCompra As New ClsCompras
|
||||||
Dim ObjContabilidad As New ClsContabilidad(ObjCompra.IniciaTransacSQL)
|
Dim ObjContabilidad As New ClsContabilidad(ObjCompra.IniciaTransacSQL)
|
||||||
|
|
||||||
Dim Estatus = ActualizarPrePoliza(ObjContabilidad, ObjCompra)
|
Dim Estatus As Boolean = ActualizarPrePoliza(ObjContabilidad, ObjCompra)
|
||||||
|
|
||||||
If Estatus Then
|
If Estatus Then
|
||||||
ObjCompra.Commit()
|
ObjCompra.Commit()
|
||||||
@@ -17938,12 +17925,12 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
End If
|
End If
|
||||||
ObjInventarios.Dispose()
|
ObjInventarios.Dispose()
|
||||||
|
|
||||||
Dim DtTemporal = TmpDT.Copy
|
Dim DtTemporal As DataTable = TmpDT.Copy
|
||||||
DtTemporal.Columns.Add("ImporteEnAlmacen", GetType(Decimal))
|
DtTemporal.Columns.Add("ImporteEnAlmacen", GetType(Decimal))
|
||||||
|
|
||||||
Dim ObjConta As New ClsContabilidad
|
Dim ObjConta As New ClsContabilidad
|
||||||
ObjConta.IniciaTransacSQL()
|
ObjConta.IniciaTransacSQL()
|
||||||
Dim TieneError = True
|
Dim TieneError As Boolean = True
|
||||||
|
|
||||||
'ELIMINA DETALLES DE [AF - INV - GASTO]
|
'ELIMINA DETALLES DE [AF - INV - GASTO]
|
||||||
If ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 49, CveCompra, 1) Then
|
If ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 49, CveCompra, 1) Then
|
||||||
@@ -17959,15 +17946,15 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
|
|
||||||
'CONFIGURACIONES
|
'CONFIGURACIONES
|
||||||
Dim CuentasContablesInvalidas As New StringBuilder
|
Dim CuentasContablesInvalidas As New StringBuilder
|
||||||
Dim CveProveedorConcepto = 0
|
Dim CveProveedorConcepto As Integer = 0
|
||||||
Dim Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
|
Dim Concepto As String = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
|
||||||
Dim Multiplicador = If(DdlTipoComprobante.SelectedValue = "NC", -1, 1)
|
Dim Multiplicador As Decimal = If(DdlTipoComprobante.SelectedValue = "NC", -1, 1)
|
||||||
|
|
||||||
Dim ImporteMovimiento = 0.0D
|
Dim ImporteMovimiento As Decimal = 0.0D
|
||||||
Dim importeMN = 0.0D
|
Dim importeMN As Decimal = 0.0D
|
||||||
|
|
||||||
Dim TipoCambioActual = 0.0D
|
Dim TipoCambioActual As Decimal = 0.0D
|
||||||
Dim TipoCambioPago = 0.0D
|
Dim TipoCambioPago As Decimal = 0.0D
|
||||||
Dim FechaMovimiento As Date = TxtFecha.Text.ToDate
|
Dim FechaMovimiento As Date = TxtFecha.Text.ToDate
|
||||||
|
|
||||||
'TIPO CAMBIO
|
'TIPO CAMBIO
|
||||||
@@ -17991,7 +17978,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
|
|
||||||
|
|
||||||
'INGRESA DETALLE DE AF(49) - TipoAF 2 es para las compras
|
'INGRESA DETALLE DE AF(49) - TipoAF 2 es para las compras
|
||||||
Dim DT = DtTemporal.FiltraParametros("ISNULL(TipoAF,0) = 2")
|
Dim DT As DataTable = DtTemporal.FiltraParametros("ISNULL(TipoAF,0) = 2")
|
||||||
If DT.Rows.Count > 0 AndAlso DdlTipoComprobante.SelectedValue <> "NC" Then
|
If DT.Rows.Count > 0 AndAlso DdlTipoComprobante.SelectedValue <> "NC" Then
|
||||||
For Each Row2 As DataRow In DT.Rows
|
For Each Row2 As DataRow In DT.Rows
|
||||||
ImporteMovimiento = Row2("Total").ToString.ToDecimal * Multiplicador
|
ImporteMovimiento = Row2("Total").ToString.ToDecimal * Multiplicador
|
||||||
@@ -18007,10 +17994,10 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
|
|
||||||
ImporteMovimiento = 0
|
ImporteMovimiento = 0
|
||||||
'INGRESA DETALLE DE ALMACÉN(68)
|
'INGRESA DETALLE DE ALMACÉN(68)
|
||||||
Dim DtAlmacenes = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
Dim DtAlmacenes As DataTable = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||||
If UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
|
If UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
|
||||||
Dim CveMovimientoInventario = -1
|
Dim CveMovimientoInventario As Integer = -1
|
||||||
Dim ModalidadAlmacen = -1
|
Dim ModalidadAlmacen As Integer = -1
|
||||||
Dim DtMovtosAlmacen As New DataTable
|
Dim DtMovtosAlmacen As New DataTable
|
||||||
DtMovtosAlmacen.Columns.Add("CveMovimiento", GetType(Integer))
|
DtMovtosAlmacen.Columns.Add("CveMovimiento", GetType(Integer))
|
||||||
DtMovtosAlmacen.Columns.Add("CveCuenta", GetType(Integer))
|
DtMovtosAlmacen.Columns.Add("CveCuenta", GetType(Integer))
|
||||||
@@ -18033,7 +18020,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim DrInv = DtMovtosAlmacen.NewRow
|
Dim DrInv As DataRow = DtMovtosAlmacen.NewRow
|
||||||
DrInv("CveMovimiento") = CveMovimientoInventario
|
DrInv("CveMovimiento") = CveMovimientoInventario
|
||||||
DrInv("Importe") = ImporteMovimiento
|
DrInv("Importe") = ImporteMovimiento
|
||||||
DtMovtosAlmacen.Rows.Add(DrInv)
|
DtMovtosAlmacen.Rows.Add(DrInv)
|
||||||
@@ -18078,7 +18065,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If DT.Rows.Count > 0 Then
|
If DT.Rows.Count > 0 Then
|
||||||
Dim ImporteAlmacen = 0.0D
|
Dim ImporteAlmacen As Decimal = 0.0D
|
||||||
For Each Row2 As DataRow In DT.Rows
|
For Each Row2 As DataRow In DT.Rows
|
||||||
If UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
|
||||||
ImporteMovimiento = DtTemporal.SUM("Total", String.Format("ISNULL(TipoAF,0) <> 2 AND CveClasificacion = {0} AND CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString.ToDecimal
|
ImporteMovimiento = DtTemporal.SUM("Total", String.Format("ISNULL(TipoAF,0) <> 2 AND CveClasificacion = {0} AND CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString.ToDecimal
|
||||||
@@ -18129,8 +18116,8 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
Dim ObjContabilidad As New ClsContabilidad
|
Dim ObjContabilidad As New ClsContabilidad
|
||||||
Dim ObjCompras As New ClsCompras(ObjContabilidad.IniciaTransacSQL())
|
Dim ObjCompras As New ClsCompras(ObjContabilidad.IniciaTransacSQL())
|
||||||
Dim ObjEventos As New ClsOIEventos(ObjContabilidad.IniciaTransacSQL())
|
Dim ObjEventos As New ClsOIEventos(ObjContabilidad.IniciaTransacSQL())
|
||||||
Dim TieneError = False
|
Dim TieneError As Boolean = False
|
||||||
Dim MensajeError = ""
|
Dim MensajeError As String = ""
|
||||||
|
|
||||||
If ObjEventos.AddEventoBitacora($"Se actualizó el Tipo de Cambio de la compra. TC anterior: {TxtActualizarTC_TCActual.Text.FormatoNumero(4)} | TC actual: {TxtActualizarTC_TCActualizar.Text.FormatoNumero(4)}", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=CveCompra) Then
|
If ObjEventos.AddEventoBitacora($"Se actualizó el Tipo de Cambio de la compra. TC anterior: {TxtActualizarTC_TCActual.Text.FormatoNumero(4)} | TC actual: {TxtActualizarTC_TCActualizar.Text.FormatoNumero(4)}", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=CveCompra) Then
|
||||||
If ObjCompras.UpdateCompraTipoCambio(TxtActualizarTC_TCActualizar.Text.ToDouble, CveCompra, CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
If ObjCompras.UpdateCompraTipoCambio(TxtActualizarTC_TCActualizar.Text.ToDouble, CveCompra, CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||||
@@ -18427,7 +18414,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
Dim importeMovimiento As Decimal = 0
|
Dim importeMovimiento As Decimal = 0
|
||||||
Dim importeMN As Decimal = 0
|
Dim importeMN As Decimal = 0
|
||||||
Dim tipoCambioActual As Decimal = 0
|
Dim tipoCambioActual As Decimal = 0
|
||||||
Dim Multiplicador = If(DdlTipoComprobante.SelectedValue = "NC", -1, 1)
|
Dim Multiplicador As Decimal = If(DdlTipoComprobante.SelectedValue = "NC", -1, 1)
|
||||||
|
|
||||||
If DdlMoneda.SelectedValue.ToString.ToEntero = 2 Then
|
If DdlMoneda.SelectedValue.ToString.ToEntero = 2 Then
|
||||||
tipoCambioActual = GlobalTipoCambio(TxtFecha.Text.ToDate).ToString.ToDecimal
|
tipoCambioActual = GlobalTipoCambio(TxtFecha.Text.ToDate).ToString.ToDecimal
|
||||||
@@ -18620,7 +18607,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
Dim CveProveedorContacto As Integer = -1
|
Dim CveProveedorContacto As Integer = -1
|
||||||
Dim Retorno As Boolean = True
|
Dim Retorno As Boolean = True
|
||||||
Dim CveProveedor As Integer = -1
|
Dim CveProveedor As Integer = -1
|
||||||
Dim GeneraReq = False
|
Dim GeneraReq As Boolean = False
|
||||||
Dim IDPoliza As Integer = 0
|
Dim IDPoliza As Integer = 0
|
||||||
|
|
||||||
|
|
||||||
@@ -18708,23 +18695,23 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
|
|
||||||
'VARIABLES
|
'VARIABLES
|
||||||
Dim CveOrdenCompra As Integer = -1
|
Dim CveOrdenCompra As Integer = -1
|
||||||
Dim DiferenciaInvOC = 0.0D
|
Dim DiferenciaInvOC As Decimal = 0.0D
|
||||||
Dim CveMovimientoAlmacen = -1
|
Dim CveMovimientoAlmacen As Integer = -1
|
||||||
Dim CveOCDetalle = -1
|
Dim CveOCDetalle As Integer = -1
|
||||||
Dim CveAlmacen = -1
|
Dim CveAlmacen As Integer = -1
|
||||||
Dim Fecha As Date = TxtFecha.Text.ToDate
|
Dim Fecha As Date = TxtFecha.Text.ToDate
|
||||||
Dim CveProveedorInvOC As Integer = -1
|
Dim CveProveedorInvOC As Integer = -1
|
||||||
Dim ProveedorNombre As String = ""
|
Dim ProveedorNombre As String = ""
|
||||||
Dim SerieFolio As String = ""
|
Dim SerieFolio As String = ""
|
||||||
Dim CvePrePoliza As Integer = -1
|
Dim CvePrePoliza As Integer = -1
|
||||||
Dim ConceptoSalida = -1
|
Dim ConceptoSalida As Integer = -1
|
||||||
Dim TCInvOC = 0.0D
|
Dim TCInvOC As Decimal = 0.0D
|
||||||
Dim ImporteME = 0.0D
|
Dim ImporteME As Decimal = 0.0D
|
||||||
Dim ImporteMEComp = 0.0D
|
Dim ImporteMEComp As Decimal = 0.0D
|
||||||
Dim SumatoriaMN = 0.0D
|
Dim SumatoriaMN As Decimal = 0.0D
|
||||||
Dim SumatoriaME = 0.0D
|
Dim SumatoriaME As Decimal = 0.0D
|
||||||
Dim SumatoriaMEComp = 0.0D
|
Dim SumatoriaMEComp As Decimal = 0.0D
|
||||||
Dim PUCompra = 0.0D
|
Dim PUCompra As Decimal = 0.0D
|
||||||
Dim CveMoneda As Integer = 1
|
Dim CveMoneda As Integer = 1
|
||||||
Dim PS As String = ""
|
Dim PS As String = ""
|
||||||
|
|
||||||
@@ -18749,7 +18736,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal,
|
|||||||
CveMovimientoAlmacen = DrDiferencias("CveMovimiento").ToString.ToEntero
|
CveMovimientoAlmacen = DrDiferencias("CveMovimiento").ToString.ToEntero
|
||||||
TCInvOC = DrDiferencias("TipoCambioAjuste").ToString.ToDecimal
|
TCInvOC = DrDiferencias("TipoCambioAjuste").ToString.ToDecimal
|
||||||
|
|
||||||
Dim CveClasificacionCostoOC = TmpDT.FiltroPrimeroValor("CveClasificacion", "ISNULL(TipoAF, 0) <> 2 And ISNULL(CveAlmacen, 0) = 0 And ISNULL(AplicaCostoIndirecto, 0) <> 1 And ISNULL(CveTipoPS, 0) = 2").ToEntero
|
Dim CveClasificacionCostoOC As Integer = TmpDT.FiltroPrimeroValor("CveClasificacion", "ISNULL(TipoAF, 0) <> 2 And ISNULL(CveAlmacen, 0) = 0 And ISNULL(AplicaCostoIndirecto, 0) <> 1 And ISNULL(CveTipoPS, 0) = 2").ToEntero
|
||||||
Dim CveSubProyecto As Integer = TmpDT.MAX("CveSubProyecto").ToEntero
|
Dim CveSubProyecto As Integer = TmpDT.MAX("CveSubProyecto").ToEntero
|
||||||
|
|
||||||
If DiferenciaInvOC.RoundSQL() <> 0 Then
|
If DiferenciaInvOC.RoundSQL() <> 0 Then
|
||||||
|
|||||||
Reference in New Issue
Block a user