-- mejora en manejo de garantías
This commit is contained in:
@@ -4485,15 +4485,7 @@
|
|||||||
|
|
||||||
<label for="<%= TxtDescuentoModal.ClientID.ToString()%>">Descuento:</label>
|
<label for="<%= TxtDescuentoModal.ClientID.ToString()%>">Descuento:</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:TextBox ID="TxtOtrosGastos" ClientIDMode="Static" runat="server" CssClass=" form-control " Text="0" CausesValidation="true" MaxLength="12" ValidationGroup="GprAgregaPS"></asp:TextBox>
|
|
||||||
<ajax:FilteredTextBoxExtender ID="FTEOtrosGastos" runat="server" TargetControlID="TxtOtrosGastos" FilterType="Custom, Numbers" ValidChars="." />
|
|
||||||
|
|
||||||
<label for="<%= TxtOtrosGastos.ClientID.ToString()%>">Gastos:</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<asp:UpdatePanel ID="UpIVA" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpIVA" runat="server" UpdateMode="Conditional">
|
||||||
|
|||||||
@@ -10561,7 +10561,7 @@ Partial Class Compras_Compras
|
|||||||
TxtPrecio.Attributes.Add("onKeyUp ", "Recalcula();")
|
TxtPrecio.Attributes.Add("onKeyUp ", "Recalcula();")
|
||||||
TxtCantidad.Attributes.Add("onKeyUp ", "Recalcula();")
|
TxtCantidad.Attributes.Add("onKeyUp ", "Recalcula();")
|
||||||
TxtDescuentoModal.Attributes.Add("onKeyUp ", "Recalcula();")
|
TxtDescuentoModal.Attributes.Add("onKeyUp ", "Recalcula();")
|
||||||
TxtOtrosGastos.Attributes.Add("onKeyUp ", "Recalcula();")
|
|
||||||
'ImgAmort.Attributes.Add("onclick", "javascript:$('#DivDescP').show(1000); PosicionaObjeto(this.id,'DivDescP');") ' $get('LblTitulo1').style.display = 'none'; $get('LblTituloTipo1').style.display = 'none'; $get('LblTituloTipo2').style.display = ''; $get('LblPrecio1').style.display = 'none'; $get('LblTotalPS1').style.display = 'none'; $get('LblSubTotal1').style.display = 'none'; $get('LblAmort').style.display = ''; $get('BtnAplicarDescP').style.display = 'none'; $get('BtnAplicarDescG').style.display = ''; $get('TrMotivoDescuento').style.display = 'none';")
|
'ImgAmort.Attributes.Add("onclick", "javascript:$('#DivDescP').show(1000); PosicionaObjeto(this.id,'DivDescP');") ' $get('LblTitulo1').style.display = 'none'; $get('LblTituloTipo1').style.display = 'none'; $get('LblTituloTipo2').style.display = ''; $get('LblPrecio1').style.display = 'none'; $get('LblTotalPS1').style.display = 'none'; $get('LblSubTotal1').style.display = 'none'; $get('LblAmort').style.display = ''; $get('BtnAplicarDescP').style.display = 'none'; $get('BtnAplicarDescG').style.display = ''; $get('TrMotivoDescuento').style.display = 'none';")
|
||||||
|
|
||||||
'If um.GetUnidadesMedida() Then
|
'If um.GetUnidadesMedida() Then
|
||||||
@@ -16569,7 +16569,6 @@ Partial Class Compras_Compras
|
|||||||
TxtRetISRModal.Text = ""
|
TxtRetISRModal.Text = ""
|
||||||
TxtIEPSModal.Text = ""
|
TxtIEPSModal.Text = ""
|
||||||
TxtDescuentoModal.Text = ""
|
TxtDescuentoModal.Text = ""
|
||||||
TxtOtrosGastos.Text = ""
|
|
||||||
|
|
||||||
DivAddProductoAliasPS.Visible = False
|
DivAddProductoAliasPS.Visible = False
|
||||||
|
|
||||||
@@ -16694,7 +16693,6 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
TxtPrecio.Text = GvRow.DataKey("PU").FormatoNumero(6)
|
TxtPrecio.Text = GvRow.DataKey("PU").FormatoNumero(6)
|
||||||
TxtDescuentoModal.Text = GvRow.DataKey("Descuento").FormatoNumero(6)
|
TxtDescuentoModal.Text = GvRow.DataKey("Descuento").FormatoNumero(6)
|
||||||
TxtOtrosGastos.Text = GvRow.DataKey("OtrosGastos").FormatoNumero
|
|
||||||
LblTotalPS.Text = GvRow.DataKey("Total").FormatoNumero
|
LblTotalPS.Text = GvRow.DataKey("Total").FormatoNumero
|
||||||
|
|
||||||
'FUNCIONALIDAD DE SEGUIR AGREGANDO (NO CERRAR MODAL)
|
'FUNCIONALIDAD DE SEGUIR AGREGANDO (NO CERRAR MODAL)
|
||||||
@@ -16988,7 +16986,7 @@ Partial Class Compras_Compras
|
|||||||
End Select
|
End Select
|
||||||
|
|
||||||
|
|
||||||
Dim Total As Decimal = (TxtCantidad.Text.ToDecimal * TxtPrecio.Text.ToDecimal) - TxtDescuentoModal.Text.ToDecimal + TxtOtrosGastos.Text.ToDecimal
|
Dim Total As Decimal = (TxtCantidad.Text.ToDecimal * TxtPrecio.Text.ToDecimal) - TxtDescuentoModal.Text.ToDecimal
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then
|
||||||
Dim ObjCon As New ClsContratos
|
Dim ObjCon As New ClsContratos
|
||||||
@@ -17115,7 +17113,7 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
AddPS(TxtCantidad.Text.Trim.ToDecimal, ddlUM.SelectedValue.ToEntero, ddlUM.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text, DdlPS.SelectedValue.ToEntero, DdlPS.SelectedText, HdnTipoPS.Value.ToEntero,
|
AddPS(TxtCantidad.Text.Trim.ToDecimal, ddlUM.SelectedValue.ToEntero, ddlUM.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text, DdlPS.SelectedValue.ToEntero, DdlPS.SelectedText, HdnTipoPS.Value.ToEntero,
|
||||||
DdlSubProyecto.SelectedValue.ToString, DdlSubProyecto.SelectedItem.Text, DdlProyecto.SelectedItem.Text, DdlProyecto.SelectedValue.ToString, TxtObsPS.Text.Trim, TxtPrecio.Text.Trim.ToDecimal, Total, IVA,
|
DdlSubProyecto.SelectedValue.ToString, DdlSubProyecto.SelectedItem.Text, DdlProyecto.SelectedItem.Text, DdlProyecto.SelectedValue.ToString, TxtObsPS.Text.Trim, TxtPrecio.Text.Trim.ToDecimal, Total, IVA,
|
||||||
TxtRetIVAModal.Text.ToDecimal / 100, TxtRetISRModal.Text.ToDecimal / 100, TxtIEPSModal.Text.ToDecimal / 100, 0, TxtDescuentoModal.Text.ToDecimal, OtrosGastos:=TxtOtrosGastos.Text.ToDecimal, CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, TipoGasto:=DdlTipoGasto.SelectedItem.Text,
|
TxtRetIVAModal.Text.ToDecimal / 100, TxtRetISRModal.Text.ToDecimal / 100, TxtIEPSModal.Text.ToDecimal / 100, 0, TxtDescuentoModal.Text.ToDecimal, OtrosGastos:=0, CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, TipoGasto:=DdlTipoGasto.SelectedItem.Text,
|
||||||
NoDeducible:=ChkEsNoDeduciblePS.Checked, CveSATPS:=SATClavePS, CveContratoDetalle:=CveContratoDetalle,
|
NoDeducible:=ChkEsNoDeduciblePS.Checked, CveSATPS:=SATClavePS, CveContratoDetalle:=CveContratoDetalle,
|
||||||
CveCultivoCuadroDetalle:=If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedValue.ToEntero, -1), TemporadaCuadro:=If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedItem.Text, ""))
|
CveCultivoCuadroDetalle:=If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedValue.ToEntero, -1), TemporadaCuadro:=If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedItem.Text, ""))
|
||||||
|
|
||||||
@@ -17426,8 +17424,7 @@ Partial Class Compras_Compras
|
|||||||
Dim Cantidad = DrPS("Cantidad").ToString.ToDouble
|
Dim Cantidad = DrPS("Cantidad").ToString.ToDouble
|
||||||
Dim PU = DrPS("PU").ToString.ToDouble
|
Dim PU = DrPS("PU").ToString.ToDouble
|
||||||
Dim Descuento = DrPS("Descuento").ToString.ToDouble
|
Dim Descuento = DrPS("Descuento").ToString.ToDouble
|
||||||
Dim OtrosGastos = DrPS("OtrosGastos").ToString.ToDouble
|
Dim Total = (Cantidad * PU) - Descuento
|
||||||
Dim Total = (Cantidad * PU) - Descuento + OtrosGastos
|
|
||||||
DrPS("NoDeducible") = ChkEsNoDeduciblePS.Checked
|
DrPS("NoDeducible") = ChkEsNoDeduciblePS.Checked
|
||||||
|
|
||||||
Dim ActualizarIva As Boolean = False
|
Dim ActualizarIva As Boolean = False
|
||||||
@@ -17435,25 +17432,20 @@ Partial Class Compras_Compras
|
|||||||
ActualizarIva = True
|
ActualizarIva = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Cantidad <> TxtCantidad.Text.Trim.ToDouble OrElse PU <> TxtPrecio.Text.Trim.ToDouble OrElse Descuento <> TxtDescuentoModal.Text.ToDouble Then
|
||||||
If Cantidad <> TxtCantidad.Text.Trim.ToDouble OrElse PU <> TxtPrecio.Text.Trim.ToDouble OrElse Descuento <> TxtDescuentoModal.Text.ToDouble OrElse OtrosGastos <> TxtOtrosGastos.Text.ToDouble Then
|
|
||||||
Cantidad = TxtCantidad.Text.Trim.ToDouble
|
Cantidad = TxtCantidad.Text.Trim.ToDouble
|
||||||
PU = TxtPrecio.Text.Trim.ToDouble
|
PU = TxtPrecio.Text.Trim.ToDouble
|
||||||
Descuento = TxtDescuentoModal.Text.ToDouble
|
Descuento = TxtDescuentoModal.Text.ToDouble
|
||||||
OtrosGastos = TxtOtrosGastos.Text.ToDouble
|
Total = (Cantidad * PU) - Descuento
|
||||||
Total = (Cantidad * PU) - Descuento + OtrosGastos
|
|
||||||
DrPS("Cantidad") = Cantidad
|
DrPS("Cantidad") = Cantidad
|
||||||
DrPS("PU") = PU
|
DrPS("PU") = PU
|
||||||
DrPS("Descuento") = Descuento
|
DrPS("Descuento") = Descuento
|
||||||
DrPS("OtrosGastos") = OtrosGastos
|
DrPS("OtrosGastos") = 0
|
||||||
DrPS("Total") = Total
|
DrPS("Total") = Total
|
||||||
AplicaCalculaTotales = True
|
AplicaCalculaTotales = True
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'PS - CLASIFICACION
|
'PS - CLASIFICACION
|
||||||
If DdlPS.SelectedValue.ToEntero > 0 Then
|
If DdlPS.SelectedValue.ToEntero > 0 Then
|
||||||
|
|
||||||
@@ -17532,10 +17524,6 @@ Partial Class Compras_Compras
|
|||||||
DrPS("CveCultivoCuadroDetalle") = If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedValue.ToEntero, -1)
|
DrPS("CveCultivoCuadroDetalle") = If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedValue.ToEntero, -1)
|
||||||
DrPS("TemporadaCuadro") = If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedItem.Text, "")
|
DrPS("TemporadaCuadro") = If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedItem.Text, "")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'Esta parte es para validar cuando la factura tenga ieps en o se asignara el ieps como una partida ya no se considere
|
'Esta parte es para validar cuando la factura tenga ieps en o se asignara el ieps como una partida ya no se considere
|
||||||
If (CveFactura > 0 Or CveCompra > 0) And TxtIEPS.Text.ToDecimal = 0 Then
|
If (CveFactura > 0 Or CveCompra > 0) And TxtIEPS.Text.ToDecimal = 0 Then
|
||||||
DrPS("IEPSPS") = 0
|
DrPS("IEPSPS") = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user