Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bulk Inventory Transfer - Receive
09-12-2022, 08:36 AM,
#1
Bulk Inventory Transfer - Receive
I found a new problem, Inventory Transfer - Item Dispatch is working well
                                  Bulk Inventory Transfer - Dispatch is also working good
                            But Bulk Inventory Transfer - Receive got the problem


CRITICAL ERROR! NOTE DOWN THIS ERROR AND SEEK ASSISTANCE: The serial stock item record for the stock coming in could not be added because Field 'qualitytext' doesn't have a default value.

But seems quanlitytext string is not so important here, Do we have to have this string?
Reply
09-12-2022, 11:03 AM,
#2
RE: Bulk Inventory Transfer - Receive
Without a table default, yes, unfortunately.

Alternatively, you could alter the table to add a default to so that the field will not be required.
Reply
09-12-2022, 07:40 PM,
#3
RE: Bulk Inventory Transfer - Receive
(09-12-2022, 08:36 AM)ALEXSHEN Wrote: I found a new problem, Inventory Transfer - Item Dispatch is working well
                                  Bulk Inventory Transfer - Dispatch is also working good
                            But Bulk Inventory Transfer - Receive got the problem


CRITICAL ERROR! NOTE DOWN THIS ERROR AND SEEK ASSISTANCE: The serial stock item record for the stock coming in could not be added because Field 'qualitytext' doesn't have a default value.

But seems quanlitytext string is not so important here, Do we have to have this string?

If it's a field you know you won't ever need you can change the SQL at approx line 149 of StockLocTransferReceive.php to

$SQL = "INSERT INTO stockserialitems (stockid,
loccode,
serialno,
quantity,
qualitytext)
VALUES ('" . $TrfLine->StockID . "',
'" . $_SESSION['Transfer']->StockLocationFrom . "',
'" . $Item->BundleRef . "',
'" . -$Item->BundleQty . "',
'')";

Tim
Reply
09-13-2022, 02:06 AM,
#4
RE: Bulk Inventory Transfer - Receive
(09-12-2022, 07:40 PM)TimSchofield Wrote: If it's a field you know you won't ever need you can change the SQL at approx line 149 of StockLocTransferReceive.php to

$SQL = "INSERT INTO stockserialitems (stockid,
loccode,
serialno,
quantity,
qualitytext)
VALUES ('" . $TrfLine->StockID . "',
'" . $_SESSION['Transfer']->StockLocationFrom . "',
'" . $Item->BundleRef . "',
'" . -$Item->BundleQty . "',
'')";

Tim
Tim, 
Then I got this error code:
Database Error 1364 : CRITICAL ERROR! NOTE DOWN THIS ERROR AND SEEK ASSISTANCE: The serial stock item record for the stock coming in could not be added because Field 'qualitytext' doesn't have a default value
Alex
Reply
09-13-2022, 02:10 AM,
#5
RE: Bulk Inventory Transfer - Receive
Ah yes, there are 2 sql statements that need changing, the other is at approx line 305
$SQL = "INSERT INTO stockserialitems (stockid,
loccode,
serialno,
quantity,
qualitytext)
VALUES ('" . $TrfLine->StockID . "',
'" . $_SESSION['Transfer']->StockLocationTo . "',
'" . $Item->BundleRef . "',
'" . $Item->BundleQty . "',
'')";

Tim
Reply
09-13-2022, 03:08 AM,
#6
RE: Bulk Inventory Transfer - Receive
(09-13-2022, 02:10 AM)TimSchofield Wrote: Ah yes, there are 2 sql statements that need changing, the other is at approx line 305
$SQL = "INSERT INTO stockserialitems (stockid,
loccode,
serialno,
quantity,
qualitytext)
VALUES ('" . $TrfLine->StockID . "',
'" . $_SESSION['Transfer']->StockLocationTo . "',
'" . $Item->BundleRef . "',
'" . $Item->BundleQty . "',
'')";

Tim
Hi Tim,

Thanks again!

Now I got this error information
Database Error 1136 : CRITICAL ERROR! NOTE DOWN THIS ERROR AND SEEK ASSISTANCE: The serial stock item record for the stock coming in could not be added because column count doesn't match value count at row 1.

Alex
Reply
09-13-2022, 04:33 AM, (This post was last modified: 09-13-2022, 04:34 AM by TimSchofield.)
#7
RE: Bulk Inventory Transfer - Receive
Are you sure the two single quotes are before the final close bracket?
Reply
09-13-2022, 04:54 AM,
#8
RE: Bulk Inventory Transfer - Receive
(09-13-2022, 04:33 AM)TimSchofield Wrote: Are you sure the two single quotes are before the final close bracket?

Ahaaaaa yes Tim,

Before, I just modified parts based according to your content and all failed.
In the end I copied your script and it works perfectly now.
Thank you very much!

Alex
Reply
09-13-2022, 07:20 PM,
#9
RE: Bulk Inventory Transfer - Receive
I have committed this fix, and issued a pull request

Tim
Reply
09-14-2022, 11:21 AM,
#10
RE: Bulk Inventory Transfer - Receive
Commit merged, thanks Tim!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)