Ejemplo n.º 1
0
 public ComboDet(string IdProducto, long Ordinal, string IdProductoReferencia, decimal Cantidad, decimal DescuentoCombo, decimal DescuentoComboPorcentual, decimal PrecioDeVentaBrutoOriginal, decimal PrecioDeCostoRef)
 {
     _idProducto                 = IdProducto;
     _ordinal                    = Ordinal;
     _idProductoReferencia       = IdProductoReferencia;
     _cantidad                   = Cantidad;
     _descuentoCombo             = DescuentoCombo;
     _descuentoComboPorcentual   = DescuentoComboPorcentual;
     _precioDeVentaBrutoOriginal = PrecioDeVentaBrutoOriginal;
     _precioDeVentaBruto         = PrecioDeVentaBrutoOriginal - DescuentoCombo;
     _precioDeCostoRef           = PrecioDeCostoRef;
     _idEmpresa                  = Security.IdEmpresa;
     _idSucursal                 = Security.IdSucursal;
     _rowProducto                = tsh_Productos.GetByPk(_idProductoReferencia);
     _codigo      = _rowProducto.Codigo;
     _descripcion = _rowProducto.Descripcion;
     _estado      = "NEW";
     _simboloMonedaPrecioDeCostoRef   = mz.erp.businessrules.tfi_Monedas.GetByPk(_rowProducto.IdMonedaCierrePrecioDeCostoRef).Simbolo;
     _simboloMonedaPrecioDeVentaBruto = mz.erp.businessrules.tfi_Monedas.GetByPk(_rowProducto.IdMonedaCierrePrecioDeVentaBruto).Simbolo;
     if (IdCotizacionCierrePrecioDeCostoRef != null)
     {
         _cotizacionProductoPrecioDeCosto = new CotizacionWrapper(_rowProducto.IdCotizacionCierrePrecioDeCostoRef);
     }
     if (IdCotizacionCierrePrecioDeVentaBruto != null)
     {
         _cotizacionProductoPrecioDeVenta = new CotizacionWrapper(_rowProducto.IdCotizacionCierrePrecioDeVentaBruto);
     }
     _listaDePreciosComboDet = new ListaDePreciosComboDet(this, _estado);
 }
Ejemplo n.º 2
0
 public ComboDet(tsh_CombosDetDataset.tsh_CombosDetRow row)
 {
     _idProducto                 = row.IdProducto;
     _ordinal                    = row.Ordinal;
     _idProductoReferencia       = row.IdProductoReferencia;
     _cantidad                   = row.Cantidad;
     _descuentoCombo             = row.DescuentoCombo;
     _descuentoComboPorcentual   = row.DescuentoComboPorcentual;
     _precioDeVentaBrutoOriginal = row.PrecioDeVentaBrutoOriginal;
     _precioDeVentaBruto         = row.PrecioDeVentaBruto;
     _precioDeCostoRef           = row.PrecioDeCostoRef;
     _idEmpresa                  = row.IdEmpresa;
     _idSucursal                 = row.IdSucursal;
     _rowProducto                = tsh_Productos.GetByPk(_idProductoReferencia);
     _codigo      = _rowProducto.Codigo;
     _descripcion = _rowProducto.Descripcion;
     _estado      = string.Empty;
     _simboloMonedaPrecioDeCostoRef   = mz.erp.businessrules.tfi_Monedas.GetByPk(row.IdMonedaCierrePrecioDeCostoRef).Simbolo;
     _simboloMonedaPrecioDeVentaBruto = mz.erp.businessrules.tfi_Monedas.GetByPk(row.IdMonedaCierrePrecioDeVentaBruto).Simbolo;
     if (row.IdCotizacionCierrePrecioDeCostoRef != null)
     {
         _cotizacionProductoPrecioDeCosto = new CotizacionWrapper(row.IdCotizacionCierrePrecioDeCostoRef);
     }
     if (row.IdCotizacionCierrePrecioDeVentaBruto != null)
     {
         _cotizacionProductoPrecioDeVenta = new CotizacionWrapper(row.IdCotizacionCierrePrecioDeVentaBruto);
     }
     _listaDePreciosComboDet = new ListaDePreciosComboDet(this, _estado);
 }