| Line 61... |
Line 61... |
| 61 |
});
|
61 |
});
|
| 62 |
});
|
62 |
});
|
| 63 |
function changeTargetType() {
|
63 |
function changeTargetType() {
|
| 64 |
let holder1 = "Rs.";
|
64 |
let holder1 = "Rs.";
|
| 65 |
let holder2 = "onwards,";
|
65 |
let holder2 = "onwards,";
|
| - |
|
66 |
if ($(this).val() == "QUANTITY") {
|
| - |
|
67 |
holder1 = "Qty";
|
| - |
|
68 |
holder2 = "pc(s) onwards, ";
|
| - |
|
69 |
}
|
| - |
|
70 |
let targetHtml = `<span class="input-group-addon">${holder1}</span>
|
| - |
|
71 |
<input type="text" style="width:100px" class="form-control payoutTarget" value="0">
|
| - |
|
72 |
<span class="input-group-addon">${holder2}</span>
|
| - |
|
73 |
<input type="text" class="form-control targetDescription" placeholder="Description">`;
|
| - |
|
74 |
$('div.targetContainer').html(targetHtml);
|
| - |
|
75 |
}
|
| - |
|
76 |
function changePayoutType() {
|
| - |
|
77 |
let holder1 = "Rs.";
|
| - |
|
78 |
let holder2 = "onwards,";
|
| 66 |
let holder3 = "% of value";
|
79 |
let holder3 = "% of value";
|
| 67 |
$allSlabContainers = $('div.slab-container');
|
80 |
$allSlabContainers = $('div.slab-container');
|
| 68 |
$('div.slab-payout input:radio[value="PERCENTAGE"]').prop('checked',true);
|
81 |
$('div.slab-payout input:radio[value="PERCENTAGE"]').prop('checked',true);
|
| 69 |
if ($(this).val() == "QUANTITY") {
|
82 |
if ($(this).val() == "QUANTITY") {
|
| 70 |
holder1 = "Qty";
|
83 |
holder1 = "Qty";
|
| Line 148... |
Line 161... |
| 148 |
createOfferRequest['startDate'] = startDate;
|
161 |
createOfferRequest['startDate'] = startDate;
|
| 149 |
createOfferRequest['endDate'] = endDate;
|
162 |
createOfferRequest['endDate'] = endDate;
|
| 150 |
createOfferRequest['offerNotes'] = $("#offer_notes").val();
|
163 |
createOfferRequest['offerNotes'] = $("#offer_notes").val();
|
| 151 |
createOfferRequest['terms'] = $("#offer_terms").val();
|
164 |
createOfferRequest['terms'] = $("#offer_terms").val();
|
| 152 |
createOfferRequest['targetType'] = $("input[name=targetType]:checked").val();
|
165 |
createOfferRequest['targetType'] = $("input[name=targetType]:checked").val();
|
| - |
|
166 |
createOfferRequest['payoutType'] = $("input[name=payoutType]:checked").val();
|
| 153 |
createOfferRequest['schemeType'] = $("input[name=schemeType]:checked").val();
|
167 |
createOfferRequest['schemeType'] = $("input[name=schemeType]:checked").val();
|
| 154 |
if(createOfferRequest['schemeType']=='ACTIVATION') {
|
168 |
if(createOfferRequest['schemeType']=='ACTIVATION') {
|
| 155 |
createOfferRequest['activationBrands'] = $("div.activation-brands select").val().join(",") || null;
|
169 |
createOfferRequest['activationBrands'] = $("div.activation-brands select").val().join(",") || null;
|
| 156 |
} else {
|
170 |
} else {
|
| 157 |
createOfferRequest['activationBrands'] = null;
|
171 |
createOfferRequest['activationBrands'] = null;
|