Lines 144-149
$(document).ready(function()
Link Here
|
144 |
}); |
144 |
}); |
145 |
//]]> |
145 |
//]]> |
146 |
</script> |
146 |
</script> |
|
|
147 |
<script language="Javascript" type="text/javascript"> |
148 |
$(document).ready(function(){ |
149 |
$('#ponumber').change(function() { |
150 |
$.ajax({url:"/cgi-bin/koha/acqui/poseqnextvalue.pl", |
151 |
type: "get", |
152 |
async: false, |
153 |
dataType: 'json', |
154 |
success:function(generateno) { |
155 |
var len = document.getElementsByName("purchaseordernumber").length - 1; |
156 |
var t1 = document.getElementById('ponumber').value; |
157 |
var t2 = generateno.generateno; |
158 |
if (t1.length > 0 && t2.length > 0) { |
159 |
document.getElementsByName("purchaseordernumber")[len].value = t1+t2; |
160 |
} |
161 |
}}); |
162 |
}); |
163 |
}); |
164 |
</script> |
147 |
</head> |
165 |
</head> |
148 |
<body id="acq_neworderempty" class="acq"> |
166 |
<body id="acq_neworderempty" class="acq"> |
149 |
|
167 |
|
Lines 538-543
$(document).ready(function()
Link Here
|
538 |
<label for="notes">Notes: </label> |
556 |
<label for="notes">Notes: </label> |
539 |
<textarea id="notes" cols="30" rows="3" name="notes" >[% IF ( notes ) %][% notes %][% END %]</textarea> |
557 |
<textarea id="notes" cols="30" rows="3" name="notes" >[% IF ( notes ) %][% notes %][% END %]</textarea> |
540 |
</li> |
558 |
</li> |
|
|
559 |
[% IF enableponumber %] |
560 |
[% IF ( ordernumber ) %] |
561 |
<li> |
562 |
<label for="purchaseordernumber">Purchase order: </label> |
563 |
<input type="text" id="purchaseordernumber" size="20" name="purchaseordernumber" value="[% purchaseordernumber %]"/> |
564 |
</li> |
565 |
[% ELSE %] |
566 |
<li><p>Select ordernumber prefix for auto-generated purchase order number.</p></li> |
567 |
<li> |
568 |
<label for="prefix">Prefix:</label> |
569 |
[% IF prefix %] |
570 |
<select id="ponumber" onchange="Calculatepurorderno(this.value)"> |
571 |
<option value="">Select</option> |
572 |
[% FOREACH d IN prefix %] |
573 |
<option value="[% d.authorised_value %]">[% d.lib %]</option> |
574 |
[% END %] |
575 |
</select> |
576 |
[% ELSE %] |
577 |
<span id="pordernumber">No prefix authorized values found! Please create one or more authorized values with the category PONUMPREFIX.</span> |
578 |
[% END %] |
579 |
</li> |
580 |
<label for="purchaseordernumber">Purchase order: </label> |
581 |
<input type="text" id="purchaseordernumber" size="20" name="purchaseordernumber" value="[% purchaseordernumber %]"/> |
582 |
</li> |
583 |
[% END %] |
584 |
[% END %] |
541 |
<li><div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div> |
585 |
<li><div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div> |
542 |
<label for="sort1">Statistic 1: </label> |
586 |
<label for="sort1">Statistic 1: </label> |
543 |
<span id="sort1_zone"> |
587 |
<span id="sort1_zone"> |