Subversion Repositories SmartDukaan

Rev

Rev 37365 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
35998 amit 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>RECEIVE DEBIT 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>RECEIVE DEBIT NOTE - $debitNote.getDebitNoteNumber()</li>
8
			</ol>
9
		</div>
10
	</div>
11
 
12
	<div>
36408 amit 13
		#if($requiresFinanceApproval && !$existingReturnOrder && $canReceive)
14
		<div class="alert alert-info">
15
			This receipt will be submitted for Finance approval before warehouse scans and refund are applied.
16
		</div>
17
		#end
35998 amit 18
		#if($existingReturnOrder)
19
		<div class="alert alert-info">
20
			Already received on $existingReturnOrder.getFormattedReceiveTimestamp() by $existingReturnOrder.getReceivedBy()
21
			#if($existingReturnOrder.getRefundTimestamp())
22
			<br/>Refunded: $existingReturnOrder.getFormattedRefundTimestamp()
23
			#end
24
		</div>
37798 amit 25
		#elseif($debitNote.getStatus().name() != "CREATED")
26
		<div class="alert alert-success">
27
			Already processed - this debit note was settled before the receive workflow ($debitNote.getStatus()). Nothing to receive.
28
		</div>
35998 amit 29
		#elseif($canReceive)
30
		<form id="receive-debit-note-form" data-debitnote-id="$debitNote.getId()">
31
			<input type="hidden" name="warehouseId" value="$warehouseId" />
32
			<table class="table table-striped table-condensed table-bordered">
33
				<thead>
34
					<tr>
35
						<th>Item</th>
36
						<th>Description</th>
37
						<th>Serial Number</th>
37365 amit 38
						<th>Declared By Partner</th>
35998 amit 39
						<th>Condition</th>
40
						<th>Remark</th>
41
					</tr>
42
				</thead>
43
				<tbody>
44
					#foreach($returnItem in $returnItems)
45
					#set($invItem = $inventoryItemsMap.get($returnItem.getInventoryItemId()))
46
					#set($itemDetail = $itemDetailsMap.get($invItem.getItemId()))
37365 amit 47
					#set($declared = "$!returnItem.getReturnType()")
48
					#if($declared == "")#set($declared = "GOOD")#end
35998 amit 49
					<tr data-item-id="$returnItem.getId()" data-category-id="$itemDetail.getCategoryId()">
50
						<td>$invItem.getItemId()</td>
51
						<td>$invItem.getItemDescription()</td>
52
						<td>
53
							#if($invItem.getSerialNumber())
54
								$invItem.getSerialNumber()
55
							#else
56
								-
57
							#end
58
						</td>
37365 amit 59
						<td><strong class="declared-condition">$declared</strong></td>
35998 amit 60
						<td>
37365 amit 61
							<select name="returnType_$returnItem.getId()" class="form-control input-sm return-condition"
62
								data-declared="$declared">
63
								<option value="GOOD" #if($declared == "GOOD")selected#end>GOOD</option>
64
								<option value="BAD" #if($declared == "BAD")selected#end>BAD</option>
35998 amit 65
							</select>
66
						</td>
67
						<td>
68
							<input type="text" name="remark_$returnItem.getId()" class="form-control input-sm remark-field"
69
								placeholder="Remark (required for BAD/DOA)" />
70
						</td>
71
					</tr>
72
					#end
73
				</tbody>
74
			</table>
75
 
37365 amit 76
			<div id="condition-mismatch-section" style="display:none;">
77
				<div class="alert alert-danger">
78
					<strong>Condition changed &mdash; this will REJECT the debit note.</strong>
79
					<br/>
80
					Changing the condition means you do not agree with what the partner reported. The whole
81
					debit note will be rejected and sent back, no refund will be raised, and the partner,
82
					Logistics, RBM and Sales will be notified. A remark is mandatory on every changed row.
83
				</div>
84
			</div>
85
 
35998 amit 86
			<div id="doa-certificate-section" style="display:none;">
87
				<div class="alert alert-warning">
88
					<strong>DOA Items Detected (Mobile Category)</strong>
89
					<br/>
90
					<label>
91
						<input type="radio" name="doaCertificateValid" value="true" /> DOA Certificate Valid
92
					</label>
93
					<label style="margin-left:15px;">
94
						<input type="radio" name="doaCertificateValid" value="false" /> DOA Certificate Invalid
95
					</label>
96
				</div>
97
			</div>
98
 
99
			<button type="submit" class="btn btn-primary" id="submit-receive">Confirm Receipt</button>
100
		</form>
101
		#else
102
		<div class="alert alert-warning">
103
			<strong>View Only.</strong> Only Warehouse/Logistics team can receive items.
104
		</div>
105
		#end
106
	</div>
107
 
108
</section>