| 34236 |
ranu |
1 |
<section class="wrapper">
|
|
|
2 |
<div class="row">
|
|
|
3 |
<div class="col-lg-12">
|
|
|
4 |
<h3 class="page-header"><i class="icon_document_alt"></i>Credit Note</h3>
|
|
|
5 |
<ol class="breadcrumb">
|
|
|
6 |
<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
|
|
|
7 |
<li><i class="icon_document_alt"></i>Credit Note</li>
|
|
|
8 |
</ol>
|
|
|
9 |
</div>
|
|
|
10 |
</div>
|
|
|
11 |
<div class="row col-lg-12">
|
|
|
12 |
|
|
|
13 |
<div class="form-group">
|
|
|
14 |
<table>
|
|
|
15 |
<tr>
|
|
|
16 |
#if($isAdmin)
|
|
|
17 |
#if($isRBM)
|
|
|
18 |
<div style="padding: 5px 10px; margin-top: 2px"
|
|
|
19 |
class="col-lg-2 form-group">
|
|
|
20 |
<select class="form-control input-sm" id="fofo-users" name="Item"
|
|
|
21 |
placeholder="Partners">
|
|
|
22 |
<option value="" disabled selected>Partners</option>
|
|
|
23 |
#foreach($fofoId in $customRetailersMap.keySet())
|
|
|
24 |
<option value="$fofoId"
|
|
|
25 |
data-email="$customRetailersMap.get($fofoId).getEmail()">$customRetailersMap.get($fofoId).getBusinessName()</option>
|
|
|
26 |
#end
|
|
|
27 |
</select>
|
|
|
28 |
</div>
|
|
|
29 |
#else
|
|
|
30 |
<td style="padding: 5px 10px;">
|
|
|
31 |
<input placeholder="Enter Partner Name" type="text"
|
|
|
32 |
class="typeahead form-control"
|
|
|
33 |
id="typeaheadpartner"
|
|
|
34 |
name="Item" data-provide="typeahead" autocomplete="off">
|
|
|
35 |
<input id="partnerId" type="hidden">
|
|
|
36 |
</td>
|
|
|
37 |
|
|
|
38 |
#end
|
|
|
39 |
#end
|
| 34509 |
ranu |
40 |
#if(!$isAnalysis)
|
|
|
41 |
<td style="padding: 5px 10px;"><input placeholder="Set Duration" name="creditNotePeriod"
|
|
|
42 |
id="creditNotePeriod"
|
|
|
43 |
type="text" value="" class="form-control input-sm"></td>
|
|
|
44 |
<td style="padding: 5px 10px;"><input class="btn btn-primary credit-not-list"
|
|
|
45 |
type="button"
|
|
|
46 |
value="Submit"></td>
|
| 36198 |
amit |
47 |
#if($isAdmin)
|
|
|
48 |
<td style="padding: 5px 10px;"><input class="btn btn-success download-all-cn"
|
|
|
49 |
type="button"
|
|
|
50 |
value="Download All"></td>
|
|
|
51 |
#end
|
| 34509 |
ranu |
52 |
#else
|
|
|
53 |
<td style="padding: 5px 10px;"><input placeholder="Set Duration"
|
|
|
54 |
name="analysis-creditNotePeriod"
|
|
|
55 |
id="analysis-creditNotePeriod"
|
|
|
56 |
type="text" value="" class="form-control input-sm"></td>
|
|
|
57 |
<td style="padding: 5px 10px;"><input class="btn btn-primary analysis-credit-not-list"
|
|
|
58 |
type="button"
|
|
|
59 |
value="Submit" data-fofoid="$fofoId"></td>
|
|
|
60 |
#end
|
| 34236 |
ranu |
61 |
|
|
|
62 |
</tr>
|
|
|
63 |
</table>
|
|
|
64 |
</div>
|
|
|
65 |
|
|
|
66 |
</div>
|
|
|
67 |
<div class="credit-note-conatiner">
|
|
|
68 |
|
|
|
69 |
</div>
|
|
|
70 |
|
|
|
71 |
</section>
|
|
|
72 |
|
|
|
73 |
<script type="text/javascript">
|
|
|
74 |
$(document).ready(function () {
|
|
|
75 |
$('input[name="creditNotePeriod"]').daterangepicker(getYearMonthPicker(), function (start) {
|
|
|
76 |
$(this).val(start.format('YYYY-MM')); // Ensure only year-month is displayed
|
|
|
77 |
});
|
|
|
78 |
});
|
| 34509 |
ranu |
79 |
$(document).ready(function () {
|
|
|
80 |
$('input[name="analysis-creditNotePeriod"]').daterangepicker(getYearMonthPicker(), function (start) {
|
|
|
81 |
$(this).val(start.format('YYYY-MM')); // Ensure only year-month is displayed
|
|
|
82 |
});
|
|
|
83 |
});
|
| 34236 |
ranu |
84 |
</script>
|
|
|
85 |
|
|
|
86 |
#if($isAdmin)
|
|
|
87 |
<script type="text/javascript">
|
|
|
88 |
$(function () {
|
|
|
89 |
getPartnerAheadOptions($("#typeaheadpartner"), function (selectedPartner) {
|
|
|
90 |
partnerId = selectedPartner.partnerId;
|
|
|
91 |
console.log(partnerId);
|
|
|
92 |
});
|
|
|
93 |
});
|
|
|
94 |
$(function () {
|
|
|
95 |
$('#fofo-users').on('change', function () {
|
|
|
96 |
var selectedFofoId = $(this).val();
|
|
|
97 |
if (selectedFofoId) {
|
|
|
98 |
partnerId = selectedFofoId;
|
|
|
99 |
console.log("Partner ID set to:", partnerId);
|
|
|
100 |
} else {
|
| 36080 |
aman |
101 |
alert("Please select a valid Partner ID.");
|
| 34236 |
ranu |
102 |
}
|
|
|
103 |
});
|
|
|
104 |
});
|
|
|
105 |
</script>
|
|
|
106 |
#end
|