Line 0
Link Here
|
|
|
1 |
[% USE KohaDates %] |
2 |
|
3 |
[% INCLUDE 'doc-head-open.inc' %] |
4 |
<title>Koha › Acquisitions › Invoice</title> |
5 |
[% INCLUDE 'doc-head-close.inc' %] |
6 |
[% INCLUDE 'calendar.inc' %] |
7 |
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> |
8 |
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script> |
9 |
[% INCLUDE 'datatables-strings.inc' %] |
10 |
<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script> |
11 |
<script type="text/javascript"> |
12 |
//<![CDATA[ |
13 |
function Check(f) { |
14 |
if ((f.amountcredit.value.length == 0) && (f.budget_id.value.length == 0)) { |
15 |
alert("Budget and amount is missing"); |
16 |
return false; |
17 |
} else if (f.amountcredit.value.length == 0) { |
18 |
alert("Amount is missing"); |
19 |
return false; |
20 |
} else if (f.budget_id.value.length == 0) { |
21 |
alert("Budget is missing"); |
22 |
return false; |
23 |
} else{ |
24 |
document.Aform.submit(); |
25 |
} |
26 |
} |
27 |
$(document).ready(function() { |
28 |
$("#table_credit").dataTable($.extend(true, {}, dataTablesDefaults, { |
29 |
"aoColumnDefs": [ |
30 |
{ "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false }, |
31 |
], |
32 |
"aaSorting": [[ 1, "asc" ]], |
33 |
"iDisplayLength": 10, |
34 |
"aLengthMenu": [[2, 20, 50, 100, -1], [10, 20, 50, 100, "All"]], |
35 |
})); |
36 |
}); |
37 |
//]]> |
38 |
</script> |
39 |
</head> |
40 |
|
41 |
<body> |
42 |
[% INCLUDE 'header.inc' %] |
43 |
[% INCLUDE 'acquisitions-search.inc' %] |
44 |
|
45 |
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › <a href="/cgi-bin/koha/acqui/invoices.pl">Invoices</a> › <a href="/cgi-bin/koha/acqui/creditnote.pl?booksellerid=[% booksellerid %]&invoiceid=[% invoiceid %]">Credit note</a></div> |
46 |
|
47 |
|
48 |
<div id="doc3" class="yui-t2"> |
49 |
|
50 |
<div id="bd"> |
51 |
<div id="yui-main"> |
52 |
<div class="yui-b"> |
53 |
[% IF ( modified ) %] |
54 |
<div class="dialog message"> |
55 |
<p>Invoice has been modified</p> |
56 |
</div> |
57 |
[% END %] |
58 |
<h1>Invoice: [% invoicenumber %]</h1> |
59 |
<p>Vendor: <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% suppliername %]</a></p> |
60 |
<form action="/cgi-bin/koha/acqui/creditnote.pl" name="Aform" method="post"> |
61 |
<input type="hidden" name="op" value="add" /> |
62 |
<input type="hidden" id="booksellerid" name="booksellerid" value="[% booksellerid %]"/> |
63 |
<input type="hidden" id="invoiceid" name="invoiceid" value="[% invoiceid %]"/> |
64 |
<fieldset class="rows"> |
65 |
<ol> |
66 |
<li><label for="invoicenumber">Invoicenumber:</label>[% invoicenumber %]</li> |
67 |
<li><label for="suppliername">Vendorname:</label>[% suppliername %]</li> |
68 |
<li><label for="vendorrefid">Vendor ref. id:</label> |
69 |
<input type="text" size="30" id="vendorrefid" name="vendorrefid" value="[% vendorrefid %]" /></li> |
70 |
<li><label class="required" for="budget_id">Fund: </label> |
71 |
<select id="budget_id" onchange="fetchSortDropbox(this.form)" size="1" name="budget_id"> |
72 |
<option value="">Select a budget</option> |
73 |
[% FOREACH budget_loo IN budget_loop %] |
74 |
[% IF ( budget_loo.b_sel ) %] |
75 |
<option value="[% budget_loo.b_id %]" selected="selected">[% budget_loo.b_txt %]</option> |
76 |
[% ELSE %] |
77 |
[% IF ( budget_loo.b_active ) %]<option value="[% budget_loo.b_id %]">[% budget_loo.b_txt %]</option> |
78 |
[% ELSE %]<option value="[% budget_loo.b_id %]" class="b_inactive">[% budget_loo.b_txt %]</option> |
79 |
[% END %] |
80 |
[% END %] |
81 |
[% END %] |
82 |
</select> |
83 |
</li> |
84 |
<li><label for="amountcredit">Amount credit:</label> |
85 |
<input type="text" size="10" id="amountcredit" name="amountcredit" value="[% amountcredit %]" /></li> |
86 |
<li><label for="creditdate">Date:</label> |
87 |
<input type="text" size="10" id="creditdate" name="creditdate" value="[% creditdate | $KohaDates %]" readonly="readonly" class="datepicker" /></li> |
88 |
<li><label for="notes">Notes: </label><textarea id = "notes" name="notes" width="40" rows="8" >[% notes %]</textarea></li> |
89 |
<input type="hidden" name="op" value="mod" /> |
90 |
<input type="hidden" name="invoiceid" value="[% invoiceid %]" /> |
91 |
</fieldset> |
92 |
<fieldset class="action"> |
93 |
<input type="submit" value="Save" onclick="Check(this.form); return false;"/> |
94 |
</fieldset> |
95 |
</form> |
96 |
<h2>Credit details</h2> |
97 |
[% IF creditloop.size %] |
98 |
<table id="table_credit"> |
99 |
<thead> |
100 |
<tr> |
101 |
<th>Vendor reference id</th> |
102 |
<th>Amount credit</th> |
103 |
<th>Credit date</th> |
104 |
<th>Budget</th> |
105 |
<th>Notes</th> |
106 |
<th></th> |
107 |
<th></th> |
108 |
</tr> |
109 |
</thead> |
110 |
[% FOREACH credit IN creditloop %] |
111 |
<tr> |
112 |
<td>[% credit.vendorrefid %]</td> |
113 |
<td>[% credit.amountcredit %]</td> |
114 |
<td>[% credit.creditdate %]</td> |
115 |
<td>[% credit.budget %]</td> |
116 |
<td>[% credit.notes %]</td> |
117 |
<td><a href="/cgi-bin/koha/acqui/editcreditnote.pl?creditnote_id=[% credit.creditnote_id %]&booksellerid=[% booksellerid %]&invoiceid=[% invoiceid %]">Edit</a></td> |
118 |
<td><a href="/cgi-bin/koha/acqui/creditnote.pl?op=delete&creditnote_id=[% credit.creditnote_id %]&booksellerid=[% booksellerid %]&invoiceid=[% invoiceid %]">Delete</a></td> |
119 |
</tr> |
120 |
</thead> |
121 |
[% END %] |
122 |
</table> |
123 |
[% ELSE %] |
124 |
<div class="dialog message"><p>No credit details yet</p></div> |
125 |
[% END %] |
126 |
</div> |
127 |
</div> |
128 |
<div class="yui-b"> |
129 |
[% INCLUDE 'acquisitions-menu.inc' %] |
130 |
</div> |
131 |
</div> |
132 |
[% INCLUDE 'intranet-bottom.inc' %] |