Opened 17 years ago

Closed 17 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)

extracts.jpg (101.5 KB) - added by base 17 years ago.
screenshot

Download all attachments as: .zip

Change History (13)

Changed 17 years ago by base

Attachment: extracts.jpg added

screenshot

comment:1 Changed 17 years ago by Nicklas Nordborg

Milestone: BASE 2.1.2BASE 2.x+
Priority: majortrivial

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 Changed 17 years ago by base

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:3 Changed 17 years ago by base

The sample quantity does not get updated when you delete the extract.

comment:4 Changed 17 years ago by Nicklas Nordborg

Milestone: BASE 2.x+BASE 2.2.1
Priority: trivialminor

comment:5 Changed 17 years ago by Nicklas Nordborg

Component: webcore
Milestone: BASE 2.2.1BASE 2.2
Owner: changed from Johan Enell to Nicklas Nordborg
Status: newassigned

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 Changed 17 years ago by Nicklas Nordborg

(In [3079]) References #466: Remaining Quantity not display in extracts

Fixed problem for new items. Still remains to fix existing items that has a null value for the remaining quantity.

comment:7 Changed 17 years ago by Nicklas Nordborg

Resolution: fixed
Status: assignedclosed

(In [3086]) Fixes #466: Remaining Quantity not display in extracts

comment:8 Changed 17 years ago by Jari Häkkinen

Milestone: BASE 2.2BASE 2.2.2
Resolution: fixed
Status: closedreopened

Reopened since the previous upgrade failed.

comment:9 Changed 17 years ago by Martin Svensson

Owner: changed from Nicklas Nordborg to Martin Svensson
Status: reopenednew

comment:10 Changed 17 years ago by Martin Svensson

Status: newassigned

comment:11 Changed 17 years ago by Nicklas Nordborg

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 Changed 17 years ago by Martin Svensson

Resolution: fixed
Status: assignedclosed

(In [3136]) Fixes #466 Remaining Quantity not displayed in extracts.

Note: See TracTickets for help on using tickets.