Forum

Ask, reply and learn. Join the community of Akaunting.

New Discussion

Bill items could not autocomplete if item has 0 quantity.

Ritche Ramos   ( User )

Commented 4 years ago

Found this on the ajax for populating the bill items.


select `id` as `item_id`, `name`, `sku`, `sale_price`, `purchase_price`, `tax_id` from `ch1_items` where `quantity` > '0' and (`name` LIKE '%7-up%' or `sku` LIKE '%7-up%') and `ch1_items`.`deleted_at` is null and `ch1_items`.`company_id` = '1'


 


Shouldn't `quantity` > '0' be `enabled` = '1' ?

Ritche Ramos   ( User )

Commented 4 years ago

Where can I change this?

Denis Duliçi   ( Admin )

Commented 4 years ago

Ritche, you can change it from the following line:


https://github.com/akaunting/akaunting/blob/master/app/Models/Item/Item.php#L92


Will fix in the next version.

Ritche Ramos   ( User )

Commented 4 years ago

Thanks for the direction!

Ritche Ramos   ( User )

Commented 4 years ago

By looking at the code its looks like the invoice module could use this too. Which makes the previous code exactly true for the previous code. is there a way we can put an if statement indicating if the function caller was invoice or bill?

Bryan Nazar   ( User )

Commented 4 years ago

I also had this issue.

Please login or register to leave a response.

Showing 1 to 6 of 6 discussions