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
Nigel Kukard
wiaflos
Commits
87d7d561
Commit
87d7d561
authored
Aug 02, 2019
by
Nigel Kukard
Browse files
Fixed discount not appearing on invoices
parent
3c576a36
Pipeline
#4267
passed with stages
in 2 minutes and 48 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
wiaflos/server/core/Invoicing.pm
View file @
87d7d561
...
...
@@ -1238,7 +1238,7 @@ sub sendInvoice
$titem
->
{'
Description
'}
=
$item
->
{'
Description
'};
(
$titem
->
{'
Quantity
'}
=
$item
->
{'
Quantity
'})
=~
s/\.0+$//
;
# Remove .0's from quantity
$titem
->
{'
Unit
'}
=
defined
(
$item
->
{'
Unit
'})
?
$item
->
{'
Unit
'}
:
"";
$titem
->
{'
Discount
'}
=
""
if
(
!
defined
(
$item
->
{'
Discount
'})
)
;
# %
$titem
->
{'
Discount
'}
=
defined
(
$item
->
{'
Discount
'})
?
$item
->
{'
Discount
'}
:
""
;
# %
$titem
->
{'
DiscountAmount
'}
=
defined
(
$item
->
{'
DiscountAmount
'})
?
sprintf
('
%.2f
',
$item
->
{'
DiscountAmount
'})
:
"";
# amount
$titem
->
{'
UnitPrice
'}
=
sprintf
('
%.2f
',
$item
->
{'
UnitPrice
'});
$titem
->
{'
PriceExcl
'}
=
sprintf
('
%.2f
',
$item
->
{'
Price
'});
# excl tax
...
...
Write
Preview
Markdown
is supported
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