Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -348,7 +348,9 @@ Partial Class CatClasificaciones
|
||||
|
||||
TxtClasificacion.Text = ""
|
||||
TxtPrecioBaseCosto.Text = ""
|
||||
DdlCategoria.SelectedIndex = 0
|
||||
If DdlCategoria.Items.Count > 0 Then
|
||||
DdlCategoria.SelectedIndex = 0
|
||||
End If
|
||||
DdlSATPS.SelectedValue = ""
|
||||
DdlSATPS.SelectedText = ""
|
||||
LtlTituloModal.Text = "Agregar Clasificación"
|
||||
|
||||
@@ -616,8 +616,7 @@
|
||||
</th>
|
||||
<th id="thEncIEPS1" runat="server" visible="false">IEPS
|
||||
</th>
|
||||
<th>Total <%--;<asp:LinkButton ID="ImgDescConcepto" runat="server" Text="<i class='fa fa-comment-o'></i>" Style="cursor: pointer;" AlternateText="Agregar Descuento" /></th>--%>
|
||||
<th style="width: 100px;" colspan="3">Comandos</th>
|
||||
<th>Total <%--;<asp:LinkButton ID="ImgDescConcepto" runat="server" Text="<i class='fa fa-comment-o'></i>" Style="cursor: pointer;" AlternateText="Agregar Descuento" /></th>--%><th style="width: 100px;" colspan="3">Comandos</th>
|
||||
<th></th>
|
||||
<th runat="server" visible="false" id="nomostrar2"></th>
|
||||
</tr>
|
||||
|
||||
@@ -6704,6 +6704,23 @@ Partial Class Ventas
|
||||
GuardarVenta(ObjVentas, ObjConta, ObjInventario, ObjContr, ObjFactura, TmpDT, ObjFactura.CveNCaVincular, ObjContPaq, ObjBancos, ObjOS,
|
||||
ObjEventos, ObjCGame, ObjClientes, EsNCAmortizacion:=EsNCAmortizacion)
|
||||
|
||||
'Agregamos las OCs a la tabla
|
||||
If ObjFactura.CveVenta > 0 AndAlso ErrorList.Count = 0 AndAlso DTOrdenesCompraPS IsNot Nothing AndAlso DTOrdenesCompraPS.Rows.Count > 0 AndAlso ErrorList.Count = 0 Then
|
||||
Dim CveVentaDetalle As Integer = 0
|
||||
Dim CveOrdenCompraDetalle As Integer = 0
|
||||
Dim Cantidad As Decimal = 0
|
||||
|
||||
For Each row As DataRow In TmpDT.Rows
|
||||
Cantidad = row("Cantidad").ToString.ToDecimal
|
||||
CveVentaDetalle = row("CveVentaDetalle").ToString.ToEntero
|
||||
CveOrdenCompraDetalle = row("CveOrdenCompraDetalle").ToString.ToEntero
|
||||
If Not ObjVentas.AgregarVentaOCDetalle(CveVentaDetalle, CveOrdenCompraDetalle, Cantidad) Then
|
||||
ErrorList.Add("Ocurrió un Error al agregar el detalle de la Remision")
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
'SI ES REFACTURACION
|
||||
Dim ObjNC As List(Of Object) = Nothing
|
||||
If ErrorList.Count = 0 Then
|
||||
@@ -6723,7 +6740,6 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -6789,24 +6805,6 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
'Agregamos las OCs a la tabla
|
||||
If DTOrdenesCompraPS IsNot Nothing AndAlso DTOrdenesCompraPS.Rows.Count > 0 AndAlso ErrorList.Count = 0 Then
|
||||
Dim CveVentaDetalle As Integer = 0
|
||||
Dim CveOrdenCompraDetalle As Integer = 0
|
||||
Dim Cantidad As Decimal = 0
|
||||
|
||||
|
||||
For Each row As DataRow In TmpDT.Rows
|
||||
Cantidad = row("Cantidad").ToString.ToDecimal
|
||||
CveVentaDetalle = row("CveVentaDetalle").ToString.ToEntero
|
||||
CveOrdenCompraDetalle = row("CveOrdenCompraDetalle").ToString.ToEntero
|
||||
If Not ObjVentas.AgregarVentaOCDetalle(CveVentaDetalle, CveOrdenCompraDetalle, Cantidad) Then
|
||||
ErrorList.Add("Ocurrió un Error al agregar el detalle de la Remision")
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
'Agregamos las Cotizaciones a la tabla
|
||||
If DtCotizacionesPS IsNot Nothing AndAlso DtCotizacionesPS.Rows.Count > 0 AndAlso ErrorList.Count = 0 Then
|
||||
Dim CveVentaDetalle As Integer = 0
|
||||
@@ -6828,8 +6826,6 @@ Partial Class Ventas
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'Marcamos las ventas anteriores a febrero como surtidas - Ajuste Compu
|
||||
If ErrorList.Count = 0 Then
|
||||
If Not ObjVentas.MarcarRemisionesSinSurtir(ObjVentas.CveVenta) Then
|
||||
@@ -9037,7 +9033,7 @@ Partial Class Ventas
|
||||
|
||||
|
||||
#Region " GUARDAR - VENTA, PREPOLIZAS, INV, ESTIMACIONES, AC, NOTA DE CRÉDITO "
|
||||
Private Sub GuardarVenta(ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjInventario As ClsInventarios, ByRef ObjContr As ClsContratos, factura As Modelos.Factura, TmpDTDetalle As DataTable, CveNCaVincular As Integer,
|
||||
Private Sub GuardarVenta(ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjInventario As ClsInventarios, ByRef ObjContr As ClsContratos, factura As Modelos.Factura, ByRef TmpDTDetalle As DataTable, CveNCaVincular As Integer,
|
||||
ByRef objContPaqi As ClsContPAQi, Optional ByRef ObjBancos As ClsBancos = Nothing, Optional ByRef ObjOS As ClsOS = Nothing, ByRef Optional ObjEventos As ClsOIEventos = Nothing, ByRef Optional ObjCGame As ClsCGame = Nothing,
|
||||
ByRef Optional ObjCliente As ClsClientes = Nothing, Optional EsNCAmortizacion As Boolean = False, Optional NCDescuento As Boolean = False)
|
||||
|
||||
@@ -9108,8 +9104,8 @@ Partial Class Ventas
|
||||
PedidoContrato:=TxtPedidoContrato.Text, ObservacionesAlmacen:=TxtObsAlmacen.Text, CveSubProyecto:=factura.CveSubProyecto, CveSubProyectoCobranza:=factura.CveSubProyectoCobranza, CveSubProyectoEjecucion:=factura.CveSubProyectoEjecucion, CveFormaPago33:=factura.CveFormaPago33,
|
||||
CveMetodoPago33:=factura.CveMetodoPago33, CveUsoCFDI:=factura.CveUsoCFDI, OrdenCompra:=TxtOrdenCompra.Text, CveCuentaTerminal:=DdlCuentasTerminal.SelectedValue.ToEntero, CveTipoRelacion:=factura.CveTipoRelacion, ImpuestoLocal:=TotalImpuestoLocal,
|
||||
CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)),
|
||||
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, CveAcercamientoCRM:=CveAcercamientoCRM,
|
||||
DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False)) Then
|
||||
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, CveAcercamientoCRM:=CveAcercamientoCRM,
|
||||
DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False)) Then
|
||||
|
||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
|
||||
@@ -9171,7 +9167,7 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim TmpDr As DataRow = TmpDT.Select($"Consec = {Row("Consec").ToString}")(0)
|
||||
Dim TmpDr As DataRow = TmpDTDetalle.Select($"Consec = {Row("Consec").ToString}")(0)
|
||||
TmpDr("CveVentaDetalle") = ObjVentas.CveVentaDetalle
|
||||
|
||||
Try
|
||||
@@ -9342,7 +9338,7 @@ Partial Class Ventas
|
||||
Cantidad = DtPedidos2TmpDT.FiltroPrimeroValor("Cantidad", $"CveVentaDetallePedido2={row("CveVentaDetalle")}").ToDecimal
|
||||
CvePS = DtPedidos2TmpDT.FiltroPrimeroValor("CvePS", $"CveVentaDetallePedido2={row("CveVentaDetalle")}").ToEntero
|
||||
PU = DtPedidos2TmpDT.FiltroPrimeroValor("PU", $"CveVentaDetallePedido2={row("CveVentaDetalle")}").ToDecimal
|
||||
CveVentaDetalle = TmpDT.FiltroPrimeroValor("CveVentaDetalle", $"CveVentaDetallePedido2={row("CveVentaDetalle")}").ToEntero
|
||||
CveVentaDetalle = TmpDTDetalle.FiltroPrimeroValor("CveVentaDetalle", $"CveVentaDetallePedido2={row("CveVentaDetalle")}").ToEntero
|
||||
CveVentaDetallePadre = row("CveVentaDetalle").ToString.ToEntero
|
||||
|
||||
If Not ObjVentas.AddVentaDetallePedido2(CveVentaDetalle, CveVentaDetallePadre, Cantidad) Then
|
||||
@@ -9393,6 +9389,7 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub GuardarVentaPrePolizas(ByRef ObjConta As ClsContabilidad, factura As Modelos.Factura, TmpDTDetalleMovimientos As DataTable, CveNCaVincular As Integer,
|
||||
ByRef objContPaqi As ClsContPAQi, Optional ByRef ObjBancos As ClsBancos = Nothing, ByRef Optional ObjVentas As ClsVentas = Nothing,
|
||||
ByRef Optional ObjEventos As ClsOIEventos = Nothing, Optional EsNCAmortizacion As Boolean = False, Optional NCDescuento As Boolean = False)
|
||||
@@ -14259,7 +14256,8 @@ Partial Class Ventas
|
||||
|
||||
|
||||
'AGREGA PS ADICIONAL
|
||||
If UsuarioActual.Empresa.Funcionalidad(561).ToString = "1" AndAlso GlobalDTPSAdicionales(CvePS, UsuarioActual.CveEmpresa).Rows.Count > 0 AndAlso Not SeActualiza Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(561).ToString = "1" AndAlso GlobalDTPSAdicionales(CvePS, UsuarioActual.CveEmpresa).Rows.Count > 0 AndAlso Not SeActualiza AndAlso Not UsuarioActual.TienePermisoProceso(284) Then
|
||||
|
||||
For Each Dr As DataRow In GlobalDTPSAdicionales(CvePS, UsuarioActual.CveEmpresa).Rows
|
||||
Dim CvePSAdicional As Integer = Dr("CvePSAdicional").ToString.ToEntero
|
||||
Dim DrPoliza As DataRow = TmpDT.NewRow()
|
||||
@@ -14341,6 +14339,8 @@ Partial Class Ventas
|
||||
TmpDT.Rows.Add(DrPoliza)
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Retorno = True
|
||||
@@ -18241,7 +18241,9 @@ Partial Class Ventas
|
||||
Exit Sub
|
||||
End If
|
||||
If String.IsNullOrEmpty(Vigencia.EsCancelable) Then
|
||||
sb.Append("<b>No encontrado</b> <br/>")
|
||||
Alert("No se pudo encontrar el estatus de la factura en el SAT.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
'sb.Append("<b>No encontrado</b> <br/>")
|
||||
Else
|
||||
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user