metasfresh / metasfresh-webui-api-legacy

metasfresh webui API server
GNU General Public License v3.0
30 stars 32 forks source link

Transforming aggregated CU with "CU to new TU" not working correctly #802

Closed metas-dh closed 6 years ago

metas-dh commented 6 years ago

Is this a bug or feature request?

Bug

What is the current behavior?

When using action "CU to new TU", the qties are sometimes incorrect.

Which are the steps to reproduce?

This is the case where we could reproduce it; similar case happened when testing "CU to existing TU" sev. times, but could not reproduce that; basically this qty problem happened after the action "CU to existing TU" was not working, see #801:

  1. Open HU Editor in material receipt candidates, with e.g. 1 TU (G1 x 10kg) on 1 LU
  2. Select the CU line, use action Transfom
  3. Select "CU to new TU", with G1 and qty: 1 => new TU is created with qty: 1: OK (original LU now has 1 TUs with qty: 9
  4. Select the CU line of the TU on the LU, use action Transform
  5. Select "CU to existing TU", set qty: 1, and select the new standalone TU: => error, => #801
  6. Close the modal, and select the CU line of the TU on the LU again (qty is still: 9), use action Transform
  7. Select "CU to new TU" once more, again with with G1 and qty: 1 (qty in modal window is now preset with 8, which is already NOK, i think)
  8. New TU is created, with qty: 1, OK
  9. Existing CU on the original LU now has qty: 7, NOK

    What is the expected or desired behavior?

    Qties shall be correct, in this case the CU on the original LU should have qty: 8.

teosarca commented 6 years ago

note: decreasing the qty from source HU it was an issue of #801 too. Shall not happen now.

metas-lc commented 6 years ago

IT retested the case above: step 5 works fine, no errors OK step7 works fine, the qty didn't decrease OK step 9 original LU decreased only with 1. OK