Subversion Repositories SmartDukaan

Rev

Rev 32349 | Rev 32387 | 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
 
89
                    <input type="hidden" id=invoicehidden" value=""/>
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>
32349 amit.gupta 113
                    <th>Date</th>
114
                    <th>Supplier</th>
115
                    <th>Warehouse</th>
32377 amit.gupta 116
                    <th>Invoice Id</th>
32349 amit.gupta 117
                    <th>Invoice Number</th>
118
                    <th>Num Items</th>
119
                    <th>Total Value</th>
120
                    <th>Invoice Date</th>
121
                    <th>Received By</th>
122
 
123
                    <th> Status</th>
124
                    <th> Invoice</th>
125
 
32192 tejbeer 126
                </tr>
32349 amit.gupta 127
                </thead>
32192 tejbeer 128
 
32349 amit.gupta 129
                <tbody>
130
 
131
 
132
                    #foreach($supplierInvoice in $supplierInvoices)
133
                    <tr>
134
                        <td>$supplierInvoice.getCreateDate().format($dateTimeFormatter)</td>
135
                        <td>$supplierMap.get($supplierInvoice.getSupplierId()).getName()</td>
136
                        <td>$warehouseMap.get($supplierInvoice.getWarehouseId()) </td>
32377 amit.gupta 137
                        <td>$supplierInvoice.getInvoiceDocId()</td>
32349 amit.gupta 138
                        <td>
139
                            <a onclick="getInvoiceItems($supplierInvoice.getId())">$supplierInvoice.getInvoiceNumber() </a>
140
                        </td>
141
                        <td>$supplierInvoice.getNumItems()</td>
142
                        <td>$supplierInvoice.getTotalValue()</td>
143
                        <td>$supplierInvoice.getInvoiceDate().format($dateTimeFormatter)</td>
144
                        <td>$supplierInvoice.getReceivedFrom()</td>
145
                        #if($grnRequestMap.get($supplierInvoice.getId()))
146
                            <td>$grnRequestMap.get($supplierInvoice.getId()).getStatus() </td>
147
                        #else
148
                            <td> -</td>
149
                        #end
150
                        <td>
151
                            <a href="${rc.contextPath}/download-attachment?documentId=$supplierInvoice.getInvoiceDocId()"
152
                               class="download">Download Doc</a>
153
                        </td>
154
 
155
                    </tr>
156
                    #end
157
 
158
                </tbody>
159
            </table>
160
        </div>
161
    </div>
162
    <div class="row">
163
        <p></p>
164
        <div class="col-lg-12">
165
            <div class="invoiceadditemcontainer">
166
 
167
            </div>
168
        </div>
169
 
170
    </div>
171
 
172
 
32192 tejbeer 173
</section>