-compras. concepto de entrada
- proveedoresbonar, simplificar y C78 - modextensiones. log
This commit is contained in:
@@ -3108,21 +3108,31 @@
|
||||
<asp:Label ID="Label7" runat="server" ClientIDMode="Static" Text="Refacturación"></asp:Label></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td width="80px">Factura:</td>
|
||||
<td>
|
||||
<asp:DropDownList runat="server" Width="100%" CssClass="form-control input-sm select2me" ID="DdlRefacturacionFacturas" DataTextField="SerieFolio" DataValueField="CveCompra" ValidationGroup="GrpVinculaFactura"></asp:DropDownList>
|
||||
|
||||
<asp:DropDownList runat="server" Width="100%" CssClass="form-control input-sm select2me" ID="DdlRefacturacionFacturas" DataTextField="SerieFolio" DataValueField="CveCompra" ValidationGroup="GrpVinculaFactura" AutoPostBack ="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVRefacturacion" runat="server" ControlToValidate="DdlRefacturacionFacturas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Factura''</b> es necesario para cargar la Refacturación, por favor seleccione uno." ValidationGroup="GrpVinculaFactura"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERefacturacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVRefacturacion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="120px">Refacturar X NC:</td>
|
||||
<td>
|
||||
<asp:CheckBox ID="ChkRefacNC" runat="server" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="120px"></td>
|
||||
<td>
|
||||
<asp:CheckBox ID="ChkRefacturacionConAlmacen" Enabled="false" runat="server" Text="Con Almacen" />
|
||||
<asp:HiddenField ID="HdnRefacturacionConcepto" runat="server" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center">
|
||||
@@ -3135,6 +3145,9 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="CancelarDevolucionF" type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
@@ -4335,7 +4335,7 @@ Partial Class Compras_Compras
|
||||
Try
|
||||
Dim FolioFijo As Integer = 0
|
||||
'cheque
|
||||
If DdlTipoTransaccion.SelectedValue = "1" Then FolioFijo = TxtFolio.Text.ToEntero
|
||||
If DdlTipoTransaccion.SelectedValue = "1" Then FolioFijo = TxtFolio.Text.ToEntero
|
||||
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Compras/Registrar", If(EsContado And CvePlantillaPrePoliza = 1, 2, CvePlantillaPrePoliza), ImporteCompra, TxtTotal.Text.ToDouble, DdlMoneda.SelectedValue.ToEntero, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjCompras.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjConta.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa))
|
||||
|
||||
@@ -4448,6 +4448,8 @@ Partial Class Compras_Compras
|
||||
CveConceptoContableAlmacen = DdlOCVinculaInv.SelectedValue.ToEntero
|
||||
ElseIf (CveImportacion > 0 Or CveFlete > 0) AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
||||
CveConceptoContableAlmacen = CveConceptoContableAlmacen
|
||||
ElseIf CveCompraRefacturacion > 0 AndAlso ChkRefacNC.Checked Then ' cuando es refacturacion, tomara del concepto anterior
|
||||
CveConceptoContableAlmacen = HdnRefacturacionConcepto.Value.ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -6070,7 +6072,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End If
|
||||
Case 186 'RetIVA Acreditable Fletes P.M.
|
||||
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
|
||||
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") AndAlso TxtRetIVA.Text.ToDecimal > 0 Then
|
||||
If DdlRetIVAConcepto.Items.Count > 0 Then
|
||||
If DdlRetIVAConcepto.SelectedValue.ToEntero = 3 Then
|
||||
importeMovimiento = importeRetIVAAcreditable
|
||||
@@ -6101,7 +6103,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End If
|
||||
Case 185 'RetIVA X Acreditar Fletes P.M.
|
||||
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
|
||||
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") AndAlso TxtRetIVA.Text.ToDecimal > 0 Then
|
||||
If DdlRetIVAConcepto.Items.Count > 0 Then
|
||||
If DdlRetIVAConcepto.SelectedValue.ToEntero = 3 Then
|
||||
importeMovimiento = importeRetIVAxAcreditar
|
||||
@@ -6124,7 +6126,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End If
|
||||
Case 249 'RetIVA Acreditable Arrendamiento
|
||||
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
|
||||
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") AndAlso TxtRetIVA.Text.ToDecimal > 0 Then
|
||||
If DdlRetIVAConcepto.Items.Count > 0 AndAlso DdlRetIVAConcepto.SelectedValue.ToEntero = 4 Then
|
||||
importeMovimiento = importeRetIVAAcreditable
|
||||
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
|
||||
@@ -6246,7 +6248,7 @@ Partial Class Compras_Compras
|
||||
' End If
|
||||
' End If
|
||||
Case 64 'Ganancia
|
||||
If TCPago <> 1 AndAlso TxtFechaPago.Text <> TxtFecha.Text Then
|
||||
If TCPago > 0 AndAlso TCPago <> 1 AndAlso TxtFechaPago.Text <> TxtFecha.Text Then
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
|
||||
If TCPago < TipoCambioCompra Then
|
||||
@@ -6262,7 +6264,7 @@ Partial Class Compras_Compras
|
||||
|
||||
Case 65 'Perdida
|
||||
|
||||
If TCPago <> 1 AndAlso TxtFechaPago.Text <> TxtFecha.Text Then
|
||||
If TCPago > 0 AndAlso TCPago <> 1 AndAlso TxtFechaPago.Text <> TxtFecha.Text Then
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
||||
If TCPago < TipoCambioCompra Then
|
||||
@@ -6309,7 +6311,7 @@ Partial Class Compras_Compras
|
||||
Exit Select 'Es credito el concepto 6 se agrega en CASE 17
|
||||
End If
|
||||
|
||||
If Not CveCompraRefacturacion > 0 OrElse ChkRefacNC.Checked Then
|
||||
If Not CveCompraRefacturacion > 0 OrElse (ChkRefacNC.Checked) Then
|
||||
'AF TipoAF 2 Es para las compras
|
||||
DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) = 2 And ISNULL(AplicaCostoIndirecto,0) <> 1")
|
||||
If DT.Rows.Count > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
||||
@@ -6380,6 +6382,8 @@ Partial Class Compras_Compras
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
' si agrego en almacen, ya no se ocupa algun concepto puente
|
||||
AgregaMercanciaInventario = False
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
@@ -6419,6 +6423,8 @@ Partial Class Compras_Compras
|
||||
Case 205
|
||||
ConceptoContabilizacionME = 230
|
||||
ConceptoContabilizacionMEComp = 231
|
||||
importeMovimiento = TmpDT.SUMD(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total"))
|
||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador 'TIENE QUE TENER EL IMPORTEMN IGUAL AL IMPORTEMOVIMIENTO PORQUE NO TOMA EN CUENTA SI UN PRODUCTO ES TIPO SERVICIO
|
||||
Case 237
|
||||
ConceptoContabilizacionME = 238
|
||||
ConceptoContabilizacionMEComp = 239
|
||||
@@ -6611,7 +6617,7 @@ Partial Class Compras_Compras
|
||||
DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) = 0 And ISNULL(AplicaCostoIndirecto,0) <> 1", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto"})
|
||||
End If
|
||||
'RMF, si es concepto relacionado a flete o importacion, no debe de afectar al gasto
|
||||
If CveFlete > 0 OrElse CveImportacion > 0 Then
|
||||
If CveFlete > 0 OrElse CveImportacion > 0 OrElse (CveCompraRefacturacion > 0 AndAlso ChkRefacNC.Checked) Then
|
||||
DTDistinct.Clear()
|
||||
End If
|
||||
|
||||
@@ -14034,6 +14040,21 @@ Partial Class Compras_Compras
|
||||
UpRefacturacion.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub DdlRefacturacionFacturas_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlRefacturacionFacturas.SelectedIndexChanged
|
||||
|
||||
If DdlRefacturacionFacturas.SelectedValue.ToEntero > 0 Then
|
||||
Dim dr As DataRow = DtRefacturacion.FiltroPrimero(String.Format("CveCompra ={0}", DdlRefacturacionFacturas.SelectedValue))
|
||||
If dr IsNot Nothing Then
|
||||
|
||||
HdnRefacturacionConcepto.Value = dr("CveConceptoContableAlmacen").ToString
|
||||
ChkRefacturacionConAlmacen.Checked = If(dr("CveMovimientoAlmacen").ToString.ToEntero > 0, True, False)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnRefacturacionAplicaFactura_Click(sender As Object, e As EventArgs) Handles BtnRefacturacionAplicaFactura.Click
|
||||
TxtDescripcion.Text = String.Format("Refacturacion: {0}", DtRefacturacion.Rows(DdlRefacturacionFacturas.SelectedIndex - 1)("Descripcion"))
|
||||
TxtFechaPago.Text = DtRefacturacion.Rows(DdlRefacturacionFacturas.SelectedIndex - 1)("FechaVencimiento").ToString.ToDate.ToShortDateString
|
||||
@@ -14838,6 +14859,10 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End If
|
||||
|
||||
If DTOCGV.MAX("IVAPorcentaje").ToDecimal <> TmpDT.MAX("IVAPorcentaje").ToDecimal Then
|
||||
Alert("La orden de compra(s) tiene diferentes tasa de IVA.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
If DTOCGV.Rows.Count = 0 Then
|
||||
Alert("La orden de compra no tiene nada pendiente por vincular. En caso de ser Entrega Directa por favor verifique el estatus de facturación.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user