diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-06-04 09:10:09 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-06-04 09:10:09 +0100 |
| commit | 0309f4edb22bca48c0cf7184b16c581526e911cd (patch) | |
| tree | bcce248dd377a5f6b0ddc7ac30867526787fa0b7 /includes | |
| parent | 8fd8add7673c2440ea8f7653f1c3b44e9518cf38 (diff) | |
| download | stock-0309f4edb22bca48c0cf7184b16c581526e911cd.tar.gz stock-0309f4edb22bca48c0cf7184b16c581526e911cd.tar.bz2 stock-0309f4edb22bca48c0cf7184b16c581526e911cd.zip | |
stock: fix SCREF lookup to use xkey; remove duplicate datalist entries
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'includes')
| -rw-r--r-- | includes/classes/StockMovement.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/classes/StockMovement.php b/includes/classes/StockMovement.php index d478796..6754650 100644 --- a/includes/classes/StockMovement.php +++ b/includes/classes/StockMovement.php @@ -368,7 +368,7 @@ class StockMovement extends LibertyContent { // Look up contact by SCREF short name $contactId = $from !== '' ? (int)$this->mDb->getOne( "SELECT `content_id` FROM `".BIT_DB_PREFIX."liberty_xref` - WHERE `item`='SCREF' AND `data`=?", + WHERE `item`='SCREF' AND `xkey`=?", [ $from ] ) : 0; $refHash = [ 'content_id' => $this->mContentId, 'item' => $refItem, 'xkey' => $ref, 'edit' => $from ]; |
