var Bizgaze; (function (Bizgaze) { let Forms; (function (Forms) { let Controls; (function (Controls) { class PlanIncentives extends Unibase.Platform.Core.BaseComponent { loadControl(containerid, prop) { var html = ''; $("#" + containerid).html(html); } init(formpropertyid, prop, callback) { var PlanId = $('#hf_pk_value').val(); $("#btnDynamicSave").addClass('hidden'); this.GetIncentives(PlanId); } loadControlSettings(controlsettingjson, formpropertyid) { throw new Error("Method not implemented."); } loadPropertySettings(propertysettings, formpropertyid, DocPropertyName) { throw new Error("Method not implemented."); } bindEditFormDetails(formpropertyid, propval, DocPropertyName) { throw new Error("Method not implemented."); } GetIncentives(PlanId) { var instance = this; var jsfiles = ['apps/transact/managers/offers/offermanager.js', 'apps/transact/managers/interfaces/offers/ioffermanager.js']; instance.fileCacheHelper.loadJsFiles(jsfiles, function (response) { Bizgaze.Apps.Transact.Managers.OfferManager.Instance().getplanincentives(PlanId).then(function (response) { var dt = response.result; if (dt.length > 0) { for (var i = 0; i < dt.length; i++) { var data = dt[i]; var html = '
  • ' + data.IncentiveName + '
    ' + data.Volume + '
    '; if (data.DiscountType != 0) { if (data.DiscountType == 1) html += '
    ' + data.PayoutValue + ' (Per Unit)
    '; else if (data.DiscountType == 2) html += '
    ' + data.PayoutPercent + ' %
    '; else if (data.DiscountType == 3) html += '
    ' + data.OPayoutValue + '(Fixed Value)
    '; } else { if (data.PayoutValue != 0) html += '
    ' + data.PayoutValue + ' (Per Unit)
    '; else if (data.PayoutPercent != 0) html += '
    ' + data.PayoutPercent + ' %
    '; else if (data.OPayoutValue != 0) html += '
    ' + data.OPayoutValue + '(Fixed Value)
    '; else html += '
    ' + data.PayoutValue + ' (Per Unit)
    '; } html += '
    ' + data.MaxPayout + '
    ' + '
    ' + data.MinPayout + '
    '; if (data.ItemVolumePayouts.length == 0) { html += '
  • '; $("#li_PlanIncentive_Details").after(html); } else { html += '
    FoC
    ' + '' + '' + '