Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wiaflos
wiaflos
Commits
afe3558f
Commit
afe3558f
authored
May 09, 2019
by
Nigel Kukard
Browse files
Added GL transaction references to stock balances
parent
1918f97f
Changes
1
Hide whitespace changes
Inline
Side-by-side
wiaflos/server/core/Inventory.pm
View file @
afe3558f
...
...
@@ -1598,7 +1598,9 @@ sub getInventoryStockBalance
inventory.Code,
inventory_tracking.GLTransactionID,
inventory_tracking.SerialNumber, inventory_tracking.QtyChange, inventory_tracking.Price
inventory_tracking.SerialNumber, inventory_tracking.QtyChange, inventory_tracking.Price,
gl_transactions.Reference AS GLTransactionReference
FROM
inventory,
...
...
@@ -1641,12 +1643,15 @@ sub getInventoryStockBalance
$item
->
{'
Quantity
'}
=
Math::
BigFloat
->
new
(
0
);
$item
->
{'
Quantity
'}
->
precision
(
-
4
);
$item
->
{'
Value
'}
=
Math::
BigFloat
->
new
(
0
);
$item
->
{'
GLTransactionReference
'}
=
[
];
}
# Add quantity
$item
->
{'
Quantity
'}
->
badd
(
$row
->
{'
QtyChange
'});
# Add cost
$item
->
{'
Value
'}
->
badd
(
$row
->
{'
Price
'});
# Add GL transaction reference
push
(
@
{
$item
->
{'
GLTransactionReference
'}},
$row
->
{'
GLTransactionReference
'});
# Save item
$stockBalances
->
{
$row
->
{'
Code
'}
}
->
{
$row
->
{'
SerialNumber
'}
}
=
$item
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment