function rbli(data, parent) {
this.Adjustments = ko.observable(data.Adjustments);
this.Interest = data.Interest;
this.Current = data.Current;
this.oldModel = ko.observable();
this.editing = ko.observable(false);
this.edit = function (i, e) {
this.save = function (i, e) {
this.cancel = function (i, e) {
function syndicateRetailBook() {
"LastAutoAllocation": 0.0,
"LastAdjustment": 15000.0,
"BulkInterestTotal": 30000.0,
"AdjustmentTotal": 15000.0,
self.Primary = ko.observable();
self.LastAutoAllocation = ko.observable();
self.Adjustments = ko.observable();
self.LastAdjustment = ko.observable();
self.Current = ko.observable();
self.Outstanding = ko.observable();
self.RetailOrderBook = ko.observableArray([]);
self.Primary = data.Primary;
self.LastAutoAllocation = data.LastAutoAllocation;
self.Adjustments = data.Adjustments;
self.LastAdjustment = data.LastAdjustment;
self.Current = data.Current;
self.Outstanding = data.Outstanding;
self.editing = ko.observable(false);
self.selectedItem = ko.observable();
self.selectItem = function (item, event) {
var mapping = $.map(data.RetailOrderBook, function (item) {return new rbli(item, self); });
self.RetailOrderBook(mapping);
$("div[data-role='collapsible']").collapsible({
ko.applyBindings(new syndicateRetailBook());