Skip to content

Commit 84cc094

Browse files
authored
[payments] Add VAT to the gross amount to ensure accounts page in SDK has matching values to the customer portal and invoice. (#829)
1 parent 24d7b27 commit 84cc094

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

includes/entities/class-fs-payment.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,11 @@ function is_migrated() {
132132
*/
133133
function formatted_gross()
134134
{
135+
$price = $this->gross + $this->vat;
135136
return (
136-
( $this->gross < 0 ? '-' : '' ) .
137+
( $price < 0 ? '-' : '' ) .
137138
$this->get_symbol() .
138-
number_format( abs( $this->gross ), 2, '.', ',' ) . ' ' .
139+
number_format( abs( $price ), 2, '.', ',' ) . ' ' .
139140
strtoupper( $this->currency )
140141
);
141142
}

0 commit comments

Comments
 (0)