Opened 18 years ago
Closed 18 years ago
#466 closed defect (fixed)
Remaining Quantity not display in extracts
Reported by: | base | Owned by: | Martin Svensson |
---|---|---|---|
Priority: | minor | Milestone: | BASE 2.2.2 |
Component: | core | Version: | 2.1.1 |
Keywords: | quantity | Cc: |
Description
Hello, I thought Bug #448 seems to fix this problem, however I still doesn't work for me. I'm running 2.1.1 and the attached shot shows an emtpy "remaining" field for the extract. It's a bit strange because sometimes it works and some other it does not. I think the problem comes if you try to update the fields once you have created an empty extract. In any case the update does not seem to change the remaining quantity value. Could you please fix the problem ??
Attachments (1)
Change History (13)
by , 18 years ago
Attachment: | extracts.jpg added |
---|
comment:1 by , 18 years ago
Milestone: | BASE 2.1.2 → BASE 2.x+ |
---|---|
Priority: | major → trivial |
Your description is not very clear on how to reproduce the error. It works fine when I try it. Can you please give a step-by-step instructions how to reproduce the error.
comment:2 by , 18 years ago
Ok, 1:Create a sample "Adipose" 2:Create an empty extract (don't fill neither original quantity or used quantity).Save 3:Edit your extract, add the used quantity and original quantity. SAVE ->Problem, you don't see the remaining quantity. More over when you delete an extract the sample doesn't get updated properly and the remaining quantity is wrong.
Is that ok ?
comment:4 by , 18 years ago
Milestone: | BASE 2.x+ → BASE 2.2.1 |
---|---|
Priority: | trivial → minor |
comment:5 by , 18 years ago
Component: | web → core |
---|---|
Milestone: | BASE 2.2.1 → BASE 2.2 |
Owner: | changed from | to
Status: | new → assigned |
The problem is that the remaining quantity is given a null value if no original value is specified when the extract is created. Then, whenever you change the original value the remainging still is null since in the database world you can't add or subtract anything from a null value. The end result is still null.
A possible solution is to put 0 for the remaining quantity in the case no original is specified. Then we can always add/subtract when the original value changes. When asked for the remaining quantity we have to return null if the original is null.
The fix should be rather simple to implement, but we also has to consider those biomaterials that already has a null value in the remaining quantity and calculate a new value for them.
comment:6 by , 18 years ago
comment:7 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:8 by , 18 years ago
Milestone: | BASE 2.2 → BASE 2.2.2 |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Reopened since the previous upgrade failed.
comment:9 by , 18 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
comment:10 by , 18 years ago
Status: | new → assigned |
---|
comment:11 by , 18 years ago
I don't think the updateToSchemaVersion29() works for Postgres. See the mailing list archive: http://sourceforge.net/mailarchive/forum.php?thread_id=31617247&forum_id=12992
It is not the same error as the MySQL 5.0.27 bug.
comment:12 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
screenshot