Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -2651,7 +2651,8 @@ Partial Class Ventas_ClientesAbonar
|
||||
ObjConta.Commit()
|
||||
CargaDatos(CveMonedaFiltro)
|
||||
RegistraScript("$('#ModalSaldarCuentaIncobrable').modal('hide')")
|
||||
Alert("Los movimientos se saldaron correctamente.")
|
||||
Alert(String.Format("Los movimientos se saldaron correctamente. <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||
|
||||
Else
|
||||
ObjConta.RollBack()
|
||||
Alert(MsgError, TipoMensaje.MsgError)
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -30,28 +30,6 @@ public partial class Ventas_RepConciliacionSat : ClsPaginas
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
|
||||
//CrystalDecisions.CrystalReports.Engine.ReportDocument cryRpt = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
|
||||
//cryRpt.Load(String.Format("C:\\Proyectos\\wwwSIG\\Empresas\\Grales\\Formatos\\CatPS.rpt", UsuarioActual.Empresa.Ruta));
|
||||
//System.Data.DataTable DtDatos = new System.Data.DataTable();
|
||||
//using (ClsProductosServicios ObjPS = new ClsProductosServicios())
|
||||
//{
|
||||
// if (ObjPS.GetPSLite(-1, 119, "-1", "-1", "02541", -1, -1, -1, -1))
|
||||
// {
|
||||
// DtDatos = ObjPS.DtResultados;
|
||||
|
||||
// }
|
||||
//}
|
||||
//cryRpt.SetDataSource(DtDatos);
|
||||
//CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo coninfo = new CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo();
|
||||
//cryRpt.
|
||||
////cryRpt.SetDatabaseLogon("JCaudillo", "JCau127*953");// 293357
|
||||
//reports.ReportSource = cryRpt;
|
||||
//reports.RefreshReport();
|
||||
//// reports.Refresh();
|
||||
|
||||
|
||||
|
||||
DateTime fecha;
|
||||
DateTime fechaInicio = DateTime.Now;
|
||||
DateTime fechaFin = DateTime.Now;
|
||||
|
||||
@@ -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
|
||||
@@ -6378,7 +6383,8 @@ Partial Class Ventas
|
||||
Continue For
|
||||
End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False Then
|
||||
|
||||
If DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False Then ' si tiene relacionada una OC,
|
||||
'VALIDA EXISTENCIA
|
||||
CveProducto = dr("CvePS").ToString.ToEntero
|
||||
CveUnidad = dr("CveUM").ToString.ToEntero
|
||||
@@ -6908,7 +6914,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
|
||||
|
||||
@@ -10767,7 +10774,7 @@ Partial Class Ventas
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119}) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing") Then
|
||||
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119}) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing") AndAlso Dr("EntregaDirecta").ToString.ToEntero < 1 Then
|
||||
Existencia = ObjInventario.GetExistenciasPS(CveProducto, CveUnidad, UsuarioActual.CveEmpresa, CveAlmacen, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, RestringirAlmacenes:=1, ExcluyeApartados:=1)
|
||||
If Existencia < Cantidad Then
|
||||
OcurrioError = True
|
||||
@@ -14255,7 +14262,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 +15479,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 +15746,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 +15804,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 +23938,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 +23964,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 +24070,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