change base to base_venta when tipo is venta
trying to fix bug about empty order ( not yet )