Skip to content
GitLab
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
20bd3d40
Commit
20bd3d40
authored
Jul 22, 2019
by
Nigel Kukard
Browse files
Merge branch 'units' into 'master'
Fixed Unit's on invoice line items See merge request
!47
parents
f9a6008e
742f84b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
wiaflos/server/core/Invoicing.pm
View file @
20bd3d40
...
...
@@ -676,10 +676,20 @@ sub linkInvoiceItem
$sellPrice
->
badd
(
$inventoryItem
->
{'
SellPrice
'});
}
# If we have an item unit, add it aswell
# Work out what unit we're going to add
my
$unit
=
undef
;
# Default to the inventory item
if
(
defined
(
$inventoryItem
->
{'
Unit
'})
&&
$inventoryItem
->
{'
Unit
'}
ne
"")
{
$unit
=
$inventoryItem
->
{'
Unit
'};
}
# Allow overriding from the params passed
if
(
defined
(
$detail
->
{'
Unit
'}))
{
$unit
=
$detail
->
{'
Unit
'};
}
# If we have one defined, we can now add it
if
(
defined
(
$unit
))
{
push
(
@extraCols
,'
Unit
');
push
(
@extraData
,
DBQuote
(
$
inventoryItem
->
{'
U
nit
'}
));
push
(
@extraData
,
DBQuote
(
$
u
nit
));
}
# Total up final price
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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