-
This commit is contained in:
@@ -568,8 +568,8 @@
|
||||
<label for="<%= DdlIEPSPorcentaje.ClientID.ToString()%>">IEPS Porcentaje:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label>Es OutSourcing </label>
|
||||
<div class="form-group form-md-line-input input-iconright" title="Esta retención tendrá efecto en la facturación siempre y cuando el cliente al cual se facturará tenga activada la opción de Retiene 6% de iva por servicio">
|
||||
<label>Retiene 6% de IVA por Servicios</label>
|
||||
<asp:CheckBox ID="ChkEsOutSourcing" CssClass="make-switchsd" data-size="small" runat="server" Checked="False" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4701,7 +4701,12 @@ Partial Class Ventas
|
||||
LblTelefono.Text = ObjCliente.Telefono
|
||||
LblRetIVA.Text = ObjCliente.RetIVA.ToString.FormatoNumero(5)
|
||||
LblRetISR.Text = ObjCliente.RetISR.ToString.FormatoNumero(5)
|
||||
If UsuarioActual.Empresa.MostrarRetISR AndAlso ObjCliente.RetISR > 0 Then TrRetISR.Style.Add("display", "none")
|
||||
If UsuarioActual.Empresa.MostrarRetISR AndAlso ObjCliente.RetISR > 0 Then
|
||||
' TrRetISR.Style.Add("display", "none")
|
||||
TrRetISR.Visible = True
|
||||
Else
|
||||
TrRetISR.Visible = False
|
||||
End If
|
||||
ViewState("ClienteRetIVA") = ObjCliente.RetIVA / 100
|
||||
ViewState("ClienteRetISR") = ObjCliente.RetISR / 100
|
||||
|
||||
@@ -5935,7 +5940,7 @@ Partial Class Ventas
|
||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||
ClienteRetIVA = 0.0D
|
||||
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
||||
ClienteRetIVA = 0.1D
|
||||
ClienteRetIVA = 0.106667D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
||||
ClienteRetIVA = 0.04D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso CBool(TmpDT.Rows(e.RowIndex)("EsOutSourcing").ToString()) Then
|
||||
@@ -6908,7 +6913,8 @@ Partial Class Ventas
|
||||
'ENVIAR POLIZA VIRTUAL
|
||||
If ErrorList.Count = 0 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(576) = "1" Then
|
||||
GeneraPolizaVentaWS(ObjFactura)
|
||||
Dim TipoPoliza As Integer = 1
|
||||
GeneraPolizaVentaWS(ObjFactura, TipoPoliza)
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -14255,7 +14261,7 @@ Partial Class Ventas
|
||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||
ClienteRetIVA = 0.0D
|
||||
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
||||
ClienteRetIVA = 0.1D
|
||||
ClienteRetIVA = 0.106667D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
||||
ClienteRetIVA = 0.04D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso CBool(DrPS("EsOutSourcing").ToString()) Then
|
||||
@@ -15472,7 +15478,7 @@ Partial Class Ventas
|
||||
If ConSalida AndAlso Not OcurrioError Then
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
OcurrioError = Not GenerarMovimientoAlmacenVirtual(CveRemision, ObjInventario, ObjFactura)
|
||||
OcurrioError = GenerarMovimientoAlmacenVirtual(CveRemision, ObjInventario, ObjFactura)
|
||||
End If
|
||||
|
||||
If Not OcurrioError Then
|
||||
@@ -15739,30 +15745,40 @@ Partial Class Ventas
|
||||
Try
|
||||
Dim CveMovimientoVirtual As Integer = -1
|
||||
Dim CveAlmacenVirtual As Integer = -1
|
||||
Dim CveConceptoMovimientoVirtual As Integer = 3
|
||||
Dim CveConceptoMovimientoVirtual As Integer = 36
|
||||
Dim DtPSVirtual As DataTable = Nothing
|
||||
Dim DtTamanios As DataTable = Nothing
|
||||
Dim CveMovimientoEntradaDev As Integer = -1
|
||||
|
||||
If ObjInventario.GetInv_Mov(CveRemision, UsuarioActual.CveEmpresa) Then
|
||||
Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND CveTipoAlmacen = 24 AND CveConcepto = 2 AND CveVenta > 0")
|
||||
Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND ((CveTipoAlmacen = 24 AND CveConcepto = 2) OR (CveTipoAlmacen = 1 AND CveConcepto = 8)) AND CveVenta > 0")
|
||||
|
||||
If RowMovimiento IsNot Nothing Then
|
||||
CveMovimientoEntradaDev = RowMovimiento("CveMovimiento").ToString().ToEntero()
|
||||
CveAlmacenVirtual = RowMovimiento("CveAlmacen").ToString().ToEntero()
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
CveMovimientoEntradaDev = RowMovimiento("CveMovimiento").ToString().ToEntero()
|
||||
CveAlmacenVirtual = RowMovimiento("CveAlmacen").ToString().ToEntero()
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
'CARGA CONCEPTOS DEVUELTOS EN LA VENTA
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoEntradaDev, UsuarioActual.CveEmpresa) Then
|
||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoEntradaDev, UsuarioActual.CveEmpresa) Then
|
||||
DtPSVirtual = ObjInventario.DtResultados.Copy()
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
'CARGA CONCEPTOS DEVUELTOS EN LA VENTA
|
||||
'If ObjInventario.GetMovimientosDetalle(CveMovimientoEntradaDev, UsuarioActual.CveEmpresa) Then
|
||||
' DtPSVirtual = ObjInventario.DtResultados.Copy()
|
||||
'Else
|
||||
' OcurrioError = True
|
||||
'End If
|
||||
|
||||
If Not OcurrioError AndAlso DtPSVirtual.Rows.Count > 0 Then
|
||||
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, ObjFactura.CveVenta, -1, -1, Modulo:="Vta/V")
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, ObjFactura.CveVenta, -1, -1, Modulo:="Vta/V", CveMovimientoRelacionado:=CveMovimientoEntradaDev)
|
||||
|
||||
If CveMovimientoVirtual > 0 Then
|
||||
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
||||
@@ -15787,7 +15803,7 @@ Partial Class Ventas
|
||||
OcurrioError = True
|
||||
End Try
|
||||
|
||||
Return Not OcurrioError
|
||||
Return OcurrioError
|
||||
|
||||
End Function
|
||||
Private Function SalidaAlmacenMateriales(ByRef ObjInventario As ClsInventarios, CveOS As Integer, ByRef ObjConta As ClsContabilidad, ConSalida As Boolean, ConceptoMovimiento As Integer) As Boolean
|
||||
@@ -23921,22 +23937,23 @@ Partial Class Ventas
|
||||
GvCodigosUnicos.DataBind()
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GeneraPolizaVentaWS(ObjFactura As Modelos.Factura)
|
||||
Protected Sub GeneraPolizaVentaWS(ObjFactura As Modelos.Factura, TipoPoliza As Integer)
|
||||
'TipoPoliza: 01 Venta, 02 Ajuste, 03 Garantía
|
||||
Try
|
||||
For Each Row As GridViewRow In GvCodigosUnicos.Rows
|
||||
If Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim obj As New Modelos.MPolizaVentaWS
|
||||
'DATOS DEL CLIENTE
|
||||
obj.customer_name = ObjFactura.Cliente.Nombre
|
||||
obj.customer_last_name1 = ""
|
||||
obj.customer_last_name1 = "."
|
||||
obj.customer_last_name2 = ""
|
||||
obj.customer_birthday = Nothing
|
||||
obj.customer_phone = ObjFactura.Cliente.Telefono
|
||||
obj.customer_email = ObjFactura.Cliente.Mail
|
||||
obj.customer_gender = "03" 'OTRO GENERO
|
||||
obj.customer_advertising = False
|
||||
obj.customer_car_brand = "00"
|
||||
obj.customer_car_model = "00"
|
||||
obj.customer_car_brand = "01"
|
||||
obj.customer_car_model = "01"
|
||||
obj.customer_car_year = ObjFactura.Fecha.Year
|
||||
|
||||
'DATOS DE VENTA
|
||||
@@ -23946,12 +23963,12 @@ Partial Class Ventas
|
||||
obj.sale_type_service = "02" 'COMERCIAL
|
||||
obj.sale_total = ObjFactura.Total
|
||||
obj.sale_discount = ObjFactura.Descuento
|
||||
obj.sale_id = String.Format("{0}{1}{2}", ObjFactura.Serie, ObjFactura.Folio, ObjFactura.CveVenta)
|
||||
obj.sale_id = ObjFactura.CveVenta.ToString
|
||||
|
||||
'DATOS DEL PRODUCTO
|
||||
obj.product_code = Row.DataKey("IdProductoPolizaVirtual").ToString()
|
||||
obj.product_unique_code = Row.FCTextBox("TxtCodigoUnico").Text 'se indique el código único de la batería. (SERIE LOTE)
|
||||
obj.product_sale_type = "01 " 'VENTA
|
||||
obj.product_sale_type = "0" & TipoPoliza 'VENTA
|
||||
|
||||
Dim FechaUsado As DateTime = Row.DataKey("FechaAjuste").ToString().ToDateTime()
|
||||
|
||||
@@ -24052,7 +24069,7 @@ Partial Class Ventas
|
||||
For Each RowServicio As DataRow In TmpDT.Rows
|
||||
Dim ClienteRetIVA = 0.0D
|
||||
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
||||
ClienteRetIVA = 0.1D
|
||||
ClienteRetIVA = 0.106667D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
||||
ClienteRetIVA = 0.04D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso CBool(RowServicio("EsOutSourcing").ToString()) Then
|
||||
|
||||
Reference in New Issue
Block a user