<eg-grid-column path="circulation.target_copy.circ_lib.shortname"
i18n-label label="Item Owning Library"></eg-grid-column>
+
<eg-grid-column path="circulation.circ_lib.shortname"
i18n-label label="Checkout or Renewal Library" [hidden]="true"></eg-grid-column>
<eg-grid-column path="circulation.due_date"
<div class="col-lg-4">
<div class="row">
<div class="col-lg-5" i18n>Selected Paid:</div>
- <div class="col-lg-4" i18n>{{selectedXactsInfo().paid | currency}}</div>
+ <div class="col-lg-4" i18n>{{selectedPaymentsInfo().paid | currency}}</div>
</div>
</div>
<div class="col-lg-4 form-inline">
</div>
</div>
- <eg-grid idlClass="mp" #xactsGrid
+ <eg-grid idlClass="mp" #paymentsGrid
persistKey="circ.patron.billhistory_payments"
(onRowActivate)="showStatement($event)"
[reloadOnColumnChange]="true"
};
return this.flatData.getRows(
- this.xactsGrid.context, query, pager, sort);
+ this.paymentsGrid.context, query, pager, sort);
};
}
});
}
+ selectedPaymentsInfo(): {paid: number} {
+ const info = {paid: 0};
+ if (!this.paymentsGrid) { return info; }
+
+ this.paymentsGrid.context.rowSelector.selected().forEach(id => {
+ const row = this.paymentsGrid.context.getRowByIndex(id);
+ if (!row) { return; }
+ info.paid += Number(row.amount) * 100;
+ });
+
+ info.paid /= 100;
+ return info;
+ }
+
selectedXactsInfo(): {owed: number, billed: number, paid: number} {
const info = {owed : 0, billed : 0, paid : 0};