Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Z_ChangeStockCode.php deactivates Serialised
09-17-2015, 01:44 AM,
#1
Z_ChangeStockCode.php deactivates Serialised
Hi,

When I use Z_ChangeStockCode.php to change the item code of controlled and serialized stock items, the process seems to work fine but it de-activates the field serialized (makes it 0 instead of 1)

i.e in the old stock item the field controlled and serialized are both set to yes / yes
after running Z_ChangeStockCode.php the fields controlled and serialized are set to yes / No

The field serialized was missing in the INSERT statement of Z_ChangeStockCode.php
but even when I add it, it still does not work as expected.


Thanks in advance


Arwan


Reply
09-20-2015, 01:44 PM, (This post was last modified: 09-20-2015, 01:50 PM by TurboPT.)
#2
RE: Z_ChangeStockCode.php deactivates Serialised
Did you add the field as 'serialized' or 'serialised' (Note the 'z' vs 's' difference in the field name), plus add the same field to the INSERT's SELECT portion too ?

I'll look at this tomorrow, but if the field is added to the insert and select, I don't see where this would have trouble, but you are right that the field is not part of the query.
Reply
09-20-2015, 05:48 PM,
#3
RE: Z_ChangeStockCode.php deactivates Serialised
The query should read:

$sql = "INSERT INTO stockmaster (stockid,
categoryid,
description,
longdescription,
units,
mbflag,
actualcost,
lastcost,
materialcost,
labourcost,
overheadcost,
lowestlevel,
discontinued,
serialised,
controlled,
eoq,
volume,
grossweight,
barcode,
discountcategory,
taxcatid,
decimalplaces,
shrinkfactor,
pansize,
netweight,
perishable,
nextserialno)
SELECT '" . $_POST['NewStockID'] . "',
categoryid,
description,
longdescription,
units,
mbflag,
actualcost,
lastcost,
materialcost,
labourcost,
overheadcost,
lowestlevel,
discontinued,
serialised,
controlled,
eoq,
volume,
grossweight,
barcode,
discountcategory,
taxcatid,
decimalplaces,
shrinkfactor,
pansize,
netweight,
perishable,
nextserialno
FROM stockmaster
WHERE stockid='" . $_POST['OldStockID'] . "'";

Tim
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)