xTuple.com xTupleU Blog & News Customer Support

Cant Print lot serial labels when on assignment

I’m not totally sure if this is a bug, or If I have somehow messed up the original report but here is my problem.
I create a purchase order for a Lot/Serial controlled item. I receive the item in and give it a lot/serial number. Then I get to this screen


On this screen I can Select print, But the paper that it prints is blank. I believe that here it is supposed to print a bar code but I changed mine slightly.

This print fails, But if I then open Products > Lot/Serial and Print the LotSerialLabel From that Screen It prints out fine.
It seems to me as if the lot serial has not be posted in the database yet and therefore cannot be printed.

Is this a bug or did I mess up something along the way?

Hi,
When I attempt the same process a Lot/Serial Label is generated with a barcode. It is likely you have introduced a SQL error in the report.

Typically all errors are recorded in the Database Log. Go to the main xTuple window and check in the bottom left corner for a little warning icon. Open that window and it may well tell you what the problem is.

I forgot to mention that I am running 4.10.1
Anderson, I put the original report back in place. And this did work.
I’m wondering what I could have done to the report to keep from printing.

The only thing that I can think of is the itemloc table that I am pulling in to see how much qty I have of the item. Any Ideas?

SELECT ls_number, ls_notes,
formatlotserialnumberbarcode(ls_number) AS lotserial_barcode,
item_number, item_descrip1, item_descrip2,
charass_char_id, charass_value, char_name, formatqty(itemloc_qty) as lotqty
FROM ls
JOIN item ON (item_id=ls_item_id)
JOIN itemloc ON (ls_id = itemloc_ls_id)
LEFT JOIN charass ON (charass_target_id=ls_id)
LEFT JOIN “char” ON (char_id=charass_char_id)
WHERE ls_id=<? value("ls_id") ?>;

As I mentioned, a blank report is normally an good indicator of an SQL error. Check the database log and that normally tells you what the SQL causing the problem is and what the error actually is.

There is nothing inherently wrong with the SQL you have provided from what I can see, but it could be something else in the report.

For others reading, I always copy a Report and save it with an increased Grade Number. xTuple only runs the highest grade report. If an error is made it then becomes easy to just delete the copied report, leaving the base grade 0 report to run again. Makes for simple change control.

Thanks, After You confirmed that there was nothing wrong with the sql statment, I redid the process. The box in the left-bottom corner did not show up. So I assumed that meant the query returned no value. I knew from the original report that that it could in fact get data from Table ls. So I changed all my joins to left joins and viola. I believe the itemloc table was not populated at the time of the reports printing. I will need to find another way to get the qty assigned to the lot.

The fix was to use the itemlocdist table instead of itemloc. if you replace all instances of itemloc with itemlocdist then the report works