webERP Forum
stock transfer session incorrectly built? - Printable Version

+- webERP Forum (http://www.weberp.org/forum)
+-- Forum: webERP Discussion (http://www.weberp.org/forum/forumdisplay.php?fid=1)
+--- Forum: Problems / Bugs? (http://www.weberp.org/forum/forumdisplay.php?fid=8)
+--- Thread: stock transfer session incorrectly built? (/showthread.php?tid=8399)



stock transfer session incorrectly built? - HDeriauFF - 04-29-2020

weberp version 4.14.1

Hi

When looking at StockTransfers.php, line 97:

Code:
$_SESSION['Transfer']= new StockTransfer(0,
$_POST['StockLocationFrom'],
'',
$_POST['StockLocationTo'],
'',
Date($_SESSION['DefaultDateFormat'])
);

there is a discrepancy with the number of parameters expected by DefineStockTransfers.php :

Code:
function __construct($TrfID,
$StockLocationFrom,
$StockLocationFromName,
$StockLocationFromAccount,
$StockLocationTo,
$StockLocationToName,
$StockLocationToAccount,
$TranDate )

This causes the $_SESSION['Transfer'] values being incorrect because the $StockLocationFromAccount and StockLocationToAccount are not included as parameters during the new StockTransfer creation.

Code:
StockTransfer Object
(
    [TrfID] => 0
    [StockLocationFrom] => ENG
    [StockLocationFromName] =>
    [StockLocationFromAccount] => WRET
    [StockLocationTo] => WRET
    [StockLocationToName] => 04/28/2020
    [StockLocationToAccount] =>
    [TranDate] =>
    [TransferItem] => Array

Hope this might help.





RE: stock transfer session incorrectly built? - TimSchofield - 04-29-2020

You are quite right. I will try and fix it up tomorrow unless Paul gets to it first.

Tim


RE: stock transfer session incorrectly built? - TurboPT - 04-29-2020

I believe this may have been fixed by this commit back in October?
(definitely after HDeriauFF's 4.14.1 version, but is likely a minor change that could easily be applied nonetheless)


RE: stock transfer session incorrectly built? - TimSchofield - 04-29-2020

Ah, you are right. It's this particular commit that does it:

https://github.com/timschofield/webERP-svn/commit/9b17d0abc62a1c6fa829a7b2d50051a35ea4d0d7#diff-41405eff5c7ecc3dc58bed965cd9c994

Thanks
Tim