webERP Forum

Full Version: stock transfer session incorrectly built?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.


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

Tim
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)
Ah, you are right. It's this particular commit that does it:

https://github.com/timschofield/webERP-s...965cd9c994

Thanks
Tim