Пример #1
0
        public void agregarFactura()
        {
            T_facturas         factura           = new T_facturas();
            T_detalle_factura  detallefactura    = new T_detalle_factura();
            IFacturaBLL        facturaBLL        = new FacturaBLLImpl();
            IDetalleFacturaBLL detallefacturaBLL = new DetalleFacturaBLLImpl();

            factura.fecha      = DateTime.Today;
            factura.persona_id = 1;
            factura.total      = 4000;
            factura.descuento  = 0;
            factura.estado     = "Correcta";
            facturaBLL.Add(factura);

            detallefactura.cantidad        = 1;
            detallefactura.factura_numero  = 2;
            detallefactura.producto_codigo = 1;
            detallefactura.precio          = 3000;

            detallefacturaBLL.Add(detallefactura);

            detallefactura.cantidad        = 1;
            detallefactura.factura_numero  = 2;
            detallefactura.producto_codigo = 2;
            detallefactura.precio          = 1000;


            detallefacturaBLL.Add(detallefactura);
        }
Пример #2
0
        public void buscarFacturas()
        {
            T_facturas  factura    = new T_facturas();
            IFacturaBLL facturaBLL = new FacturaBLLImpl();

            facturaBLL.buscarFacturasAnuladas();
            facturaBLL.buscarFacturasCorrectas();
        }
Пример #3
0
        public void anularFactura()
        {
            T_facturas    factura      = new T_facturas();
            T_anulaciones anulacion    = new T_anulaciones();
            IFacturaBLL   facturaBLL   = new FacturaBLLImpl();
            IAnulacionBLL anulacionBLL = new AnulacionBLLImpl();

            factura        = facturaBLL.Get(2);
            factura.estado = "Anulada";

            anulacion.fecha          = DateTime.Today;
            anulacion.comentario     = "Anulada porque si";
            anulacion.factura_numero = factura.numero_factura;
            anulacion.persona_id     = 1;

            anulacionBLL.anularFacturaPorFactura(factura, anulacion);
        }