09-12-2022, 07:40 PM,
|
|
TimSchofield
Tim Schofield
|
Posts: 1,318
Threads: 22
Joined: Mar 2015
|
|
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
|
|
09-13-2022, 02:06 AM,
|
|
ALEXSHEN
Senior Member
|
Posts: 132
Threads: 34
Joined: Sep 2019
|
|
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
|
|
09-13-2022, 02:10 AM,
|
|
TimSchofield
Tim Schofield
|
Posts: 1,318
Threads: 22
Joined: Mar 2015
|
|
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
|
|
09-13-2022, 03:08 AM,
|
|
ALEXSHEN
Senior Member
|
Posts: 132
Threads: 34
Joined: Sep 2019
|
|
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
|
|
09-13-2022, 04:54 AM,
|
|
ALEXSHEN
Senior Member
|
Posts: 132
Threads: 34
Joined: Sep 2019
|
|
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
|
|
|