Skip to content

Commit

Permalink
fix #384 - display paid/refunded amount
Browse files Browse the repository at this point in the history
(cherry picked from commit 44c1656)
  • Loading branch information
cbellone committed Feb 7, 2018
1 parent 6faf14a commit 506c61e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ <h3>Cancel reservation <small ng-bind="$ctrl.reservationId"></small></h3>


<form ng-if="$ctrl.paymentInfo" >
<div class="alert alert-warning text-center" ng-if="$ctrl.paymentInfo.paymentInformations.paidAmount !== '0.00' && !$ctrl.paymentInfo.supportRefund"><i class="fa fa-warning"></i> This reservation cannot be refunded automatically.</div>
<div class="alert alert-warning text-center" ng-if="$ctrl.paymentInfo.paymentInformation.paidAmount !== '0.00' && !$ctrl.paymentInfo.supportRefund"><i class="fa fa-warning"></i> This reservation cannot be refunded automatically.</div>
<div class="form-group">
<label class="col-sm-4 control-label">Payment method</label>
<div class="col-sm-8 form-control-static" ng-bind="$ctrl.paymentInfo.paymentMethod"></div>
Expand All @@ -14,13 +14,13 @@ <h3>Cancel reservation <small ng-bind="$ctrl.reservationId"></small></h3>
<label class="col-sm-4 control-label">Transaction timestamp</label>
<div class="col-sm-8 form-control-static" ng-bind="$ctrl.paymentInfo.transaction.timestamp | formatDate"></div>
</div>
<div class="form-group" ng-if="$ctrl.paymentInfo.paymentInformations">
<div class="form-group" ng-if="$ctrl.paymentInfo.paymentInformation">
<label class="col-sm-4 control-label">Paid amount</label>
<div class="col-sm-8 form-control-static">{{$ctrl.paymentInfo.paymentInformations.paidAmount}} {{$ctrl.paymentInfo.transaction.currency || $ctrl.event.currencyCode}}</div>
<div class="col-sm-8 form-control-static">{{$ctrl.paymentInfo.paymentInformation.paidAmount}} {{$ctrl.paymentInfo.transaction.currency || $ctrl.event.currencyCode}}</div>
</div>
<div class="form-group" ng-if="$ctrl.paymentInfo.supportRefund">
<div class="col-sm-offset-4 col-sm-8 checkbox">
<label><input type="checkbox" ng-model="$ctrl.refund"> Refund {{$ctrl.paymentInfo.paymentInformations.paidAmount}} {{$ctrl.paymentInfo.transaction.currency || $ctrl.event.currencyCode}}</label>
<label><input type="checkbox" ng-model="$ctrl.refund"> Refund {{$ctrl.paymentInfo.paymentInformation.paidAmount}} {{$ctrl.paymentInfo.transaction.currency || $ctrl.event.currencyCode}}</label>
</div>
</div>
<div class="form-group">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ <h3>Payment info</h3>
<dt ng-if="$ctrl.paymentInfo.transaction">Transaction timestamp</dt>
<dd ng-if="$ctrl.paymentInfo.transaction" ng-bind="$ctrl.paymentInfo.transaction.timestamp | formatDate"></dd>

<dt ng-if="$ctrl.paymentInfo.paymentInformations && $ctrl.paymentInfo.paymentInformations">Paid amount</dt>
<dd ng-if="$ctrl.paymentInfo.paymentInformations && $ctrl.paymentInfo.paymentInformations">{{$ctrl.paymentInfo.paymentInformations.paidAmount}} {{$ctrl.paymentInfo.transaction.currency || $ctrl.event.currencyCode}}</dd>
<dt ng-if="$ctrl.paymentInfo.paymentInformation && $ctrl.paymentInfo.paymentInformation">Paid amount</dt>
<dd ng-if="$ctrl.paymentInfo.paymentInformation && $ctrl.paymentInfo.paymentInformation">{{$ctrl.paymentInfo.paymentInformation.paidAmount}} {{$ctrl.paymentInfo.transaction.currency || $ctrl.event.currencyCode}}</dd>

<dt ng-if="$ctrl.paymentInfo.paymentInformations && $ctrl.paymentInfo.supportRefund">Refunded amount</dt>
<dd ng-if="$ctrl.paymentInfo.paymentInformations && $ctrl.paymentInfo.supportRefund">{{$ctrl.paymentInfo.paymentInformations.refundedAmount}} {{$ctrl.paymentInfo.transaction.currency}}</dd>
<dt ng-if="$ctrl.paymentInfo.paymentInformation && $ctrl.paymentInfo.supportRefund">Refunded amount</dt>
<dd ng-if="$ctrl.paymentInfo.paymentInformation && $ctrl.paymentInfo.supportRefund">{{$ctrl.paymentInfo.paymentInformation.refundedAmount}} {{$ctrl.paymentInfo.transaction.currency}}</dd>
</dl>

</div>
Expand Down

0 comments on commit 506c61e

Please sign in to comment.