LedgerSMB icon indicating copy to clipboard operation
LedgerSMB copied to clipboard

Search Goods and Services - Include Warehouse doesn't work

Open pasman1 opened this issue 3 years ago • 4 comments

I have installed LedgerSMB 1.9.10 from tarball (on Raspbian Bullseye aarch64) Other components are: perl 5.31.1 , postgresql 13.5, starman 0.4015.

  • [x] When searching for the parts on the page Search Goods and Services, changing option Part criteria - > Type to Services or Assemblies, always returns all parts. (other search criteria are default)

  • [ ] Additionally option Include in Report - > Warehouse do not include a Warehouse column

Best Regards.

pasman1 avatar Feb 28 '22 18:02 pasman1

Thanks for the report! This looks like it should be rather easy to fix. I'll have a look soonish (unless someone beats me to it, of course).

I expect the "Part criteria" bit of the report to be in:

https://github.com/ledgersmb/LedgerSMB/blob/831849b630cf21929bc079fc0c1617901b91b6ad/sql/modules/Goods.sql#L141-L194

ehuelsmann avatar Mar 01 '22 09:03 ehuelsmann

This sql looks good. Probably there is problem with sending the value of in_parttype from a form to this function.

pasman1 avatar Mar 01 '22 18:03 pasman1

The above referenced PR fixes the problem with the parts selection. I'm looking at how to add the warehouse to the output (without being totally confusing).

ehuelsmann avatar Mar 01 '22 22:03 ehuelsmann

The first step for fixing for the warehouse column is in 93a9bef. This commit breaks the inventory adjustment tests, though: it reports '0' where '10' (units of part P001) are expected.

Additionally, we're running into the problem that having the warehouse in the report, should result in higher granularity results (that is: split by warehouse), whereas the results without warehouses should show the total across warehouses on a single row.

ehuelsmann avatar Mar 03 '22 21:03 ehuelsmann