Commit 5788ab27 authored by Nigel Kukard's avatar Nigel Kukard

Merge branch 'discountfix' into 'master'

Fixed discount not appearing on invoices

See merge request !50
parents 3c576a36 87d7d561
Pipeline #4268 passed with stages
in 2 minutes and 43 seconds
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment