Subversion Repositories SmartDukaan

Rev

Rev 32603 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
32349 amit.gupta 1
<script type="text/javascript">
2
    $(function () {
3
        getVendorAheadOptions($("#typeaheadVendor"), function (selectedVendor) {
4
            $('#vendorId').val(selectedVendor.id + "");
32192 tejbeer 5
 
32349 amit.gupta 6
        });
32192 tejbeer 7
 
32349 amit.gupta 8
 
9
    });
10
 
11
    $(document).ready(function () {
12
 
13
        var dtable = $('#open-invoices').DataTable({});
14
 
15
    });
32192 tejbeer 16
</script>
17
 
32349 amit.gupta 18
<section class="wrapper">
19
    <div class="row">
20
        <div class="col-lg-12">
21
            <h3 class="page-header"><i class="icon_document_alt"></i>Receive New Invoice</h3>
22
            <ol class="breadcrumb">
23
                <li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
24
                <li><i class="icon_document_alt"></i>Receive New Invoice</li>
25
            </ol>
26
        </div>
27
    </div>
28
    <div class="row">
29
 
30
 
31
        <div id="filter-details" style="background:white;background-color:white;padding:10px;">
32
            <div class="row">
33
 
34
                <div class="col-lg-2 form-group">
35
                    <label>Actual Invoice Date</label>
36
                    <input type="date" class="form-control" id="actualDate" autocomplete="off"
37
                           placeholder="Actual Date"/>
38
                </div>
39
 
40
                <div class="col-lg-2 form-group">
41
                    <label>Vendor</label>
42
 
43
                    <input placeholder="Enter Vendor Name" type="text" class="typeahead form-control"
44
                           id="typeaheadVendor" name="Item" data-provide="typeahead" value="" autocomplete="off">
45
                    <input id="vendorId" type="hidden"/>
46
                </div>
47
 
48
 
49
                <div class="col-lg-2 form-group">
50
                    <label>Invoice Number</label>
51
 
52
                    <input type="text" class="form-control" id="invoiceNumber" autocomplete="off"
53
                           placeholder="Invoice Number"/>
54
                </div>
55
 
56
                <div class="col-lg-2 form-group">
57
                    <label>Warehouse</label>
58
 
59
                    <select class="form-control input-sm" id="warehouseMap" name="warehouseMap" placeholder="Warehouse">
60
                        <option value="" disabled selected>Warehouse</option>
61
                        #foreach($wm in $warehouseMap.entrySet()))
62
                            <option value="$wm.getKey()">$wm.getValue()</option>
63
                        #end
64
                    </select>
65
 
66
                </div>
67
 
68
                <div class="col-lg-2 form-group">
69
                    <label>Number of items</label>
70
                    <input type="number" class="form-control" id="numberofItems" autocomplete="off"
71
                           placeholder="Number of Items"/>
72
                </div>
73
 
74
            </div>
75
 
76
            <div class="row">
77
 
78
 
79
                <div class="col-lg-2 form-group">
80
                    <label>Total Value</label>
81
                    <input type="number" class="form-control" id="totalValue" autocomplete="off"
82
                           placeholder="Total Value"/>
83
                </div>
84
 
85
 
86
                <div class="col-lg-2 form-group">
87
                    <label>Invoice</label>
88
 
32603 raveendra. 89
                    <input type="hidden" id="invoicehidden" value=""/>
32349 amit.gupta 90
                    <input type="file" id="invoice" placeholder="invoice" name="invoice"
91
                           value="">
92
 
93
                </div>
94
 
95
                <div class="col-lg-2 form-group">
96
                    <label>Action</label>
97
 
98
                    <input class="form-control btn btn-primary createReceiveInvoice" type="button" value="Receive">
99
                </div>
100
 
101
 
102
            </div>
103
        </div>
104
    </div>
105
 
106
 
107
    <div class="row">
108
 
109
        <div class="col-lg-12">
110
            <table id="open-invoices" class="table table-striped table-advance table-hover">
111
                <thead>
32192 tejbeer 112
                <tr>
32912 amit.gupta 113
                    <th>Invoice Id</th>
32349 amit.gupta 114
                    <th>Supplier</th>
115
                    <th>Invoice Number</th>
32912 amit.gupta 116
                    <th>Invoice Date</th>
32349 amit.gupta 117
                    <th>Num Items</th>
118
                    <th>Total Value</th>
32912 amit.gupta 119
                    <th>Warehouse</th>
120
                    <th>Rcv. Date</th>
121
                    <th>Rcv. By</th>
122
                    <th>Req Status</th>
123
                    <th>Actions</th>
32192 tejbeer 124
                </tr>
32349 amit.gupta 125
                </thead>
32192 tejbeer 126
 
32349 amit.gupta 127
                <tbody>
128
 
129
 
130
                    #foreach($supplierInvoice in $supplierInvoices)
32912 amit.gupta 131
                    <tr id="$supplierInvoice.getId()">
132
                        <td>$supplierInvoice.getId()</td>
32349 amit.gupta 133
                        <td>$supplierMap.get($supplierInvoice.getSupplierId()).getName()</td>
134
                        <td>
135
                            <a onclick="getInvoiceItems($supplierInvoice.getId())">$supplierInvoice.getInvoiceNumber() </a>
136
                        </td>
32912 amit.gupta 137
                        <td>$supplierInvoice.getInvoiceDate().format($dateTimeFormatter)</td>
32349 amit.gupta 138
                        <td>$supplierInvoice.getNumItems()</td>
139
                        <td>$supplierInvoice.getTotalValue()</td>
32912 amit.gupta 140
                        <td>$warehouseMap.get($supplierInvoice.getWarehouseId()) </td>
141
                        <td>$supplierInvoice.getCreateDate().format($dateTimeFormatter)</td>
32349 amit.gupta 142
                        <td>$supplierInvoice.getReceivedFrom()</td>
143
                        #if($grnRequestMap.get($supplierInvoice.getId()))
144
                            <td>$grnRequestMap.get($supplierInvoice.getId()).getStatus() </td>
145
                        #else
146
                            <td> -</td>
147
                        #end
148
                        <td>
149
                            <a href="${rc.contextPath}/download-attachment?documentId=$supplierInvoice.getInvoiceDocId()"
32912 amit.gupta 150
                               class="download">Download</a><br>
151
                            #if($isL2)
152
                                <a onclick="removeInvoice($supplierInvoice.getId())" href="javascript:void(0)">Remove Invoice</a><br>
153
                                #if($grnRequestMap.get($supplierInvoice.getId()))
154
                                    <a onclick="removeGrnRequest($supplierInvoice.getId())" href="javascript:void(0)">
155
                                        Remove Request
156
                                    </a>
157
                                #end
158
                            #end
32349 amit.gupta 159
                        </td>
160
 
161
                    </tr>
162
                    #end
163
 
164
                </tbody>
165
            </table>
166
        </div>
167
    </div>
168
    <div class="row">
169
        <p></p>
170
        <div class="col-lg-12">
171
            <div class="invoiceadditemcontainer">
172
 
173
            </div>
174
        </div>
175
 
176
    </div>
177
 
178
 
32192 tejbeer 179
</section>