|
Lines 20-92
Link Here
|
| 20 |
<input type="text" size="40" id="contact_email[% contact.id | html %]" name="contact_email" value="[% contact.email | html %]" class="email" /></li> |
20 |
<input type="text" size="40" id="contact_email[% contact.id | html %]" name="contact_email" value="[% contact.email | html %]" class="email" /></li> |
| 21 |
<li><label for="contact_notes[% contact.id | html %]">Notes: </label> |
21 |
<li><label for="contact_notes[% contact.id | html %]">Notes: </label> |
| 22 |
<textarea id="contact_notes[% contact.id | html %]" name="contact_notes" cols="40" rows="4">[% contact.notes | html %]</textarea></li> |
22 |
<textarea id="contact_notes[% contact.id | html %]" name="contact_notes" cols="40" rows="4">[% contact.notes | html %]</textarea></li> |
| 23 |
<li><label for="contact_acqprimary[% contact.id | html %]">Primary acquisitions contact:</label> |
23 |
</ol> |
| 24 |
[% IF contact.acqprimary %] |
24 |
<div style="display:flex"> |
| 25 |
<input type="checkbox" id="contact_acqprimary[% contact.id | html %]" class="contact_acqprimary" checked="checked"></input> |
25 |
<div> |
| 26 |
[% ELSE %] |
26 |
<fieldset class="rows"> |
| 27 |
<input type="checkbox" id="contact_acqprimary[% contact.id | html %]" class="contact_acqprimary"></input> |
27 |
<legend>Acquisitions options</legend> |
| 28 |
[% END %] |
28 |
<ol class="radio"> |
| 29 |
<input type="hidden" class="contact_acqprimary_hidden" name="contact_acqprimary" value="[% contact.acqprimary | html %]"></input> |
29 |
<li> |
| 30 |
<li><label for="contact_serialsprimary[% contact.id | html %]">Primary serials contact:</label> |
30 |
<label> |
| 31 |
[% IF contact.serialsprimary %] |
31 |
[% IF contact.acqprimary %] |
| 32 |
<input type="checkbox" id="contact_serialsprimary[% contact.id | html %]" class="contact_serialsprimary" checked="checked"></input> |
32 |
<input type="checkbox" id="contact_acqprimary[% contact.id | html %]" class="contact_acqprimary" checked="checked" /> |
| 33 |
[% ELSE %] |
33 |
[% ELSE %] |
| 34 |
<input type="checkbox" id="contact_serialsprimary[% contact.id | html %]" class="contact_serialsprimary"></input> |
34 |
<input type="checkbox" id="contact_acqprimary[% contact.id | html %]" class="contact_acqprimary" /> |
| 35 |
[% END %] |
35 |
[% END %] |
| 36 |
<input type="hidden" class="contact_serialsprimary_hidden" name="contact_serialsprimary" value="[% contact.serialsprimary | html %]"></input> |
36 |
<input type="hidden" class="contact_acqprimary_hidden" name="contact_acqprimary" value="[% contact.acqprimary | html %]" /> |
| 37 |
<li><label for="contact_orderacquisition[% contact.id | html %]">Contact when ordering?</label> |
37 |
Primary acquisitions contact |
| 38 |
[% IF contact.orderacquisition %] |
38 |
</label> |
| 39 |
<input type="checkbox" id="contact_orderacquisition[% contact.id | html %]" class="contact_orderacquisition" checked="checked"></input> |
39 |
</li> |
| 40 |
[% ELSE %] |
40 |
<li> |
| 41 |
<input type="checkbox" id="contact_orderacquisition[% contact.id | html %]" class="contact_orderacquisition"></input> |
41 |
<label> |
| 42 |
[% END %] |
42 |
[% IF contact.orderacquisition %] |
| 43 |
<input type="hidden" class="contact_orderacquisition_hidden" name="contact_orderacquisition" value="[% contact.orderacquisition | html %]"></input> |
43 |
<input type="checkbox" id="contact_orderacquisition[% contact.id | html %]" class="contact_orderacquisition" checked="checked" /> |
| 44 |
<li><label for="contact_claimacquisition[% contact.id | html %]">Contact about late orders?</label> |
44 |
[% ELSE %] |
| 45 |
[% IF contact.claimacquisition %] |
45 |
<input type="checkbox" id="contact_orderacquisition[% contact.id | html %]" class="contact_orderacquisition" /> |
| 46 |
<input type="checkbox" id="contact_claimacquisition[% contact.id | html %]" class="contact_claimacquisition" checked="checked"></input> |
46 |
[% END %] |
| 47 |
[% ELSE %] |
47 |
<input type="hidden" class="contact_orderacquisition_hidden" name="contact_orderacquisition" value="[% contact.orderacquisition | html %]" /> |
| 48 |
<input type="checkbox" id="contact_claimacquisition[% contact.id | html %]" class="contact_claimacquisition"></input> |
48 |
Contact when ordering |
| 49 |
[% END %] |
49 |
</label> |
| 50 |
<input type="hidden" class="contact_claimacquisition_hidden" name="contact_claimacquisition" value="[% contact.claimacquisition | html %]"></input> |
50 |
</li> |
| 51 |
<li><label for="contact_claimissues[% contact.id | html %]">Contact about late issues?</label> |
51 |
<li> |
| 52 |
[% IF contact.claimissues %] |
52 |
<label> |
| 53 |
<input type="checkbox" id="contact_claimissues[% contact.id | html %]" class="contact_claimissues" checked="checked"></input> |
53 |
[% IF contact.claimacquisition %] |
| 54 |
[% ELSE %] |
54 |
<input type="checkbox" id="contact_claimacquisition[% contact.id | html %]" class="contact_claimacquisition" checked="checked" /> |
| 55 |
<input type="checkbox" id="contact_claimissues[% contact.id | html %]" class="contact_claimissues"></input> |
55 |
[% ELSE %] |
| 56 |
[% END %] |
56 |
<input type="checkbox" id="contact_claimacquisition[% contact.id | html %]" class="contact_claimacquisition" /> |
| 57 |
<input type="hidden" class="contact_claimissues_hidden" name="contact_claimissues" value="[% contact.claimissues | html %]"></input> |
57 |
[% END %] |
| 58 |
</li> |
58 |
<input type="hidden" class="contact_claimacquisition_hidden" name="contact_claimacquisition" value="[% contact.claimacquisition | html %]" /> |
|
|
59 |
Contact about late orders |
| 60 |
</label> |
| 61 |
</li> |
| 62 |
</ol> |
| 63 |
</fieldset> |
| 64 |
</div> |
| 65 |
<div> |
| 66 |
<fieldset class="rows"> |
| 67 |
<legend>Serials options</legend> |
| 68 |
<ol class="radio"> |
| 69 |
<li> |
| 70 |
<label> |
| 71 |
[% IF contact.serialsprimary %] |
| 72 |
<input type="checkbox" id="contact_serialsprimary[% contact.id | html %]" class="contact_serialsprimary" checked="checked" /> |
| 73 |
[% ELSE %] |
| 74 |
<input type="checkbox" id="contact_serialsprimary[% contact.id | html %]" class="contact_serialsprimary" /> |
| 75 |
[% END %] |
| 76 |
<input type="hidden" class="contact_serialsprimary_hidden" name="contact_serialsprimary" value="[% contact.serialsprimary | html %]" /> |
| 77 |
Primary serials contact |
| 78 |
</label> |
| 79 |
</li> |
| 80 |
<li> |
| 81 |
<label> |
| 82 |
[% IF contact.claimissues %] |
| 83 |
<input type="checkbox" id="contact_claimissues[% contact.id | html %]" class="contact_claimissues" checked="checked" /> |
| 84 |
[% ELSE %] |
| 85 |
<input type="checkbox" id="contact_claimissues[% contact.id | html %]" class="contact_claimissues" /> |
| 86 |
[% END %] |
| 87 |
<input type="hidden" class="contact_claimissues_hidden" name="contact_claimissues" value="[% contact.claimissues | html %]" /> |
| 88 |
Contact about late issues |
| 89 |
</label> |
| 90 |
</li> |
| 91 |
</ol> |
| 92 |
</fieldset> |
| 93 |
</div> |
| 94 |
</div> |
| 95 |
|
| 59 |
[% IF contact.id %]<li><button class="btn btn-default delete-contact"><i class="fa fa-trash-can"></i> Delete contact</li>[% END %] |
96 |
[% IF contact.id %]<li><button class="btn btn-default delete-contact"><i class="fa fa-trash-can"></i> Delete contact</li>[% END %] |
| 60 |
</ol> |
97 |
</ol> |
| 61 |
[% END %] |
98 |
[% END %] |
| 62 |
|
99 |
|
| 63 |
[% BLOCK show_contact %] |
100 |
[% BLOCK show_contact %] |
| 64 |
<h3>[% contact.name | html %]</h3> |
101 |
<h3>[% contact.name | html %]</h3> |
| 65 |
<p><span class="label">Position: </span>[% contact.position | html %]</p> |
102 |
<ol> |
| 66 |
<p><span class="label">Phone: </span>[% contact.phone | html %]</p> |
103 |
<li><span class="label">Position: </span>[% contact.position | html %]</li> |
| 67 |
<p><span class="label">Alternative phone: </span>[% contact.altphone | html %]</p> |
104 |
<li><span class="label">Phone: </span>[% contact.phone | html %]</li> |
| 68 |
<p><span class="label">Fax: </span>[% contact.fax | html %]</p> |
105 |
<li><span class="label">Alternative phone: </span>[% contact.altphone | html %]</li> |
| 69 |
[% IF ( contact.email ) %] |
106 |
<li><span class="label">Fax: </span>[% contact.fax | html %]</li> |
| 70 |
<p><span class="label">Email: </span><a href="mailto:[% contact.email | uri %]">[% contact.email | html %]</a></p> |
107 |
[% IF ( contact.email ) %] |
| 71 |
[% END %] |
108 |
<li><span class="label">Email: </span><a href="mailto:[% contact.email | uri %]">[% contact.email | html %]</a></li> |
| 72 |
[% IF ( contact.notes ) %] |
109 |
[% END %] |
| 73 |
<p><span class="label">Notes: </span>[% contact.notes | html %]</p> |
110 |
[% IF ( contact.notes ) %] |
| 74 |
[% END %] |
111 |
<li><span class="label">Notes: </span>[% contact.notes | html %]</li> |
| 75 |
[% IF ( contact.acqprimary ) %] |
112 |
[% END %] |
| 76 |
<p><span class="label">Primary acquisitions contact</span></p> |
113 |
[% IF ( contact.acqprimary || contact.orderacquisition || contact.claimacquisition ) %] |
| 77 |
[% END %] |
114 |
<li> |
| 78 |
[% IF ( contact.serialsprimary ) %] |
115 |
<span class="label">Acquisitions options:</span> |
| 79 |
<p><span class="label">Primary serials contact</span></p> |
116 |
<ol> |
| 80 |
[% END %] |
117 |
[% IF ( contact.acqprimary ) %] |
| 81 |
[% IF ( contact.orderacquisition ) %] |
118 |
<li><span class="label"></span> <i class="fa fa-check"></i> Primary acquisitions contact</li> |
| 82 |
<p><span class="label">Receives orders</span></p> |
119 |
[% END %] |
| 83 |
[% END %] |
120 |
[% IF ( contact.orderacquisition ) %] |
| 84 |
[% IF ( contact.claimacquisition ) %] |
121 |
<li><span class="label"></span> <i class="fa fa-check"></i> Receives orders</li> |
| 85 |
<p><span class="label">Receives claims for late orders</span></p> |
122 |
[% END %] |
| 86 |
[% END %] |
123 |
[% IF ( contact.claimacquisition ) %] |
| 87 |
[% IF ( contact.claimissues ) %] |
124 |
<li><span class="label"></span> <i class="fa fa-check"></i> Receives claims for late orders</li> |
| 88 |
<p><span class="label">Receives claims for late issues</span></p> |
125 |
[% END %] |
| 89 |
[% END %] |
126 |
</ol> |
|
|
127 |
</li> |
| 128 |
[% END %] |
| 129 |
[% IF ( contact.serialsprimary || contact.claimissues ) %] |
| 130 |
<li> |
| 131 |
<span class="label">Serials options:</span> |
| 132 |
<ol> |
| 133 |
[% IF ( contact.serialsprimary ) %] |
| 134 |
<li><span class="label"></span> <i class="fa fa-check"></i> Primary serials contact</li> |
| 135 |
[% END %] |
| 136 |
[% IF ( contact.claimissues ) %] |
| 137 |
<li><span class="label"></span> <i class="fa fa-check"></i> Receives claims for late issues</li> |
| 138 |
[% END %] |
| 139 |
</ol> |
| 140 |
</li> |
| 141 |
[% END %] |
| 142 |
</ol> |
| 90 |
[% END %] |
143 |
[% END %] |
| 91 |
|
144 |
|
| 92 |
[% SET footerjs = 1 %] |
145 |
[% SET footerjs = 1 %] |
|
Lines 310-359
div.rows { padding: 1rem; }
Link Here
|
| 310 |
<div class="col-sm-6"> |
363 |
<div class="col-sm-6"> |
| 311 |
<div id="supplier-company-details" class="page-section rows"> |
364 |
<div id="supplier-company-details" class="page-section rows"> |
| 312 |
<h2>Vendor details</h2> |
365 |
<h2>Vendor details</h2> |
| 313 |
<p> |
366 |
<li> |
| 314 |
<span class="label">Type: </span> |
367 |
<span class="label">Type: </span> |
| 315 |
[% IF (type) %][% AuthorisedValues.GetByCode( 'VENDOR_TYPE', type ) | html %][% END %] |
368 |
[% IF (type) %][% AuthorisedValues.GetByCode( 'VENDOR_TYPE', type ) | html %][% END %] |
| 316 |
</p> |
369 |
</li> |
| 317 |
<p><span class="label">Company name: </span>[% name | html %]</p> |
370 |
<li><span class="label">Company name: </span>[% name | html %]</li> |
| 318 |
<p><span class="label">Postal address: </span>[% postal | html %]</p> |
371 |
<li><span class="label">Postal address: </span>[% postal | html %]</li> |
| 319 |
<p><span class="label">Physical address: </span>[% address1 | html %][% address2 | html %][% address3 | html %][% address4 | html %]</p> |
372 |
<li><span class="label">Physical address: </span>[% address1 | html %][% address2 | html %][% address3 | html %][% address4 | html %]</li> |
| 320 |
<p><span class="label">Phone: </span>[% phone | html %]</p> |
373 |
<li><span class="label">Phone: </span>[% phone | html %]</li> |
| 321 |
<p><span class="label">Fax: </span>[% fax | html %]</p> |
374 |
<li><span class="label">Fax: </span>[% fax | html %]</li> |
| 322 |
[% IF ( url ) %] |
375 |
[% IF ( url ) %] |
| 323 |
<p><span class="label">Website: </span><a href="[% url | url %]">[% url | html %]</a></p> |
376 |
<li><span class="label">Website: </span><a href="[% url | url %]">[% url | html %]</a></li> |
| 324 |
[% END %] |
377 |
[% END %] |
| 325 |
[% IF ( accountnumber ) %] |
378 |
[% IF ( accountnumber ) %] |
| 326 |
<p><span class="label">Account number: </span>[% accountnumber | html %]</p> |
379 |
<li><span class="label">Account number: </span>[% accountnumber | html %]</li> |
| 327 |
[% END %] |
380 |
[% END %] |
| 328 |
[% IF vendor.aliases.count %] |
381 |
[% IF vendor.aliases.count %] |
| 329 |
<p> |
382 |
<li> |
| 330 |
<span class="label">Aliases: </span> |
383 |
<span class="label">Aliases: </span> |
| 331 |
<ul> |
384 |
<ul> |
| 332 |
[% FOR alias IN vendor.aliases %] |
385 |
[% FOR alias IN vendor.aliases %] |
| 333 |
<li>[% alias.alias | html %]</li> |
386 |
<li>[% alias.alias | html %]</li> |
| 334 |
[% END %] |
387 |
[% END %] |
| 335 |
</ul> |
388 |
</ul> |
| 336 |
</p> |
389 |
</li> |
| 337 |
[% END %] |
390 |
[% END %] |
| 338 |
</div> <!-- /#supplier-company-details --> |
391 |
</div> <!-- /#supplier-company-details --> |
| 339 |
|
392 |
|
| 340 |
<div id="supplier-ordering-information" class="page-section rows"> |
393 |
<div id="supplier-ordering-information" class="page-section rows"> |
| 341 |
<h2>Ordering information</h2> |
394 |
<h2>Ordering information</h2> |
| 342 |
<p><span class="label">Vendor is: </span>[% IF ( active ) %]Active[% ELSE %]Inactive[% END %]</p> |
395 |
<li><span class="label">Vendor is: </span>[% IF ( active ) %]Active[% ELSE %]Inactive[% END %]</li> |
| 343 |
<p><span class="label">List prices are: </span>[% listprice | html %]</p> |
396 |
<li><span class="label">List prices are: </span>[% listprice | html %]</li> |
| 344 |
<p><span class="label">Invoice prices are: </span>[% invoiceprice | html %]</p> |
397 |
<li><span class="label">Invoice prices are: </span>[% invoiceprice | html %]</li> |
| 345 |
[% IF ( tax_rate ) %] |
398 |
[% IF ( tax_rate ) %] |
| 346 |
<p><span class="label">Tax number registered: </span>[% IF ( gstreg ) %]Yes[% ELSE %]No[% END %]</p> |
399 |
<li><span class="label">Tax number registered: </span>[% IF ( gstreg ) %]Yes[% ELSE %]No[% END %]</li> |
| 347 |
<p><span class="label">List item price includes tax: </span>[% IF ( listincgst ) %]Yes[% ELSE %]No[% END %]</p> |
400 |
<li><span class="label">List item price includes tax: </span>[% IF ( listincgst ) %]Yes[% ELSE %]No[% END %]</li> |
| 348 |
<p><span class="label">Invoice item price includes tax: </span>[% IF ( invoiceincgst ) %]Yes[% ELSE %]No[% END %]</p> |
401 |
<li><span class="label">Invoice item price includes tax: </span>[% IF ( invoiceincgst ) %]Yes[% ELSE %]No[% END %]</li> |
| 349 |
[% END %] |
402 |
[% END %] |
| 350 |
<p><span class="label">Discount: </span>[% discount | format("%.1f") %] %</p> |
403 |
<li><span class="label">Discount: </span>[% ( discount || 0 ) | format("%.1f" ) %] %</li> |
| 351 |
<p><span class="label">Tax rate: </span>[% ( tax_rate || 0 ) * 100 | html %] %</p> |
404 |
<li><span class="label">Tax rate: </span>[% ( tax_rate || 0 ) * 100 | html %] %</li> |
| 352 |
[% IF deliverytime.defined %] |
405 |
[% IF deliverytime.defined %] |
| 353 |
<p><span class="label">Delivery time: </span>[% deliverytime | html %] days</p> |
406 |
<li><span class="label">Delivery time: </span>[% deliverytime | html %] days</li> |
| 354 |
[% END %] |
407 |
[% END %] |
| 355 |
[% IF ( notes ) %] |
408 |
[% IF ( notes ) %] |
| 356 |
<p><span class="label">Notes: </span>[% notes | html %]</p> |
409 |
<li><span class="label">Notes: </span>[% notes | html %]</li> |
| 357 |
[% END %] |
410 |
[% END %] |
| 358 |
</div> <!-- #supplier-ordering-information --> |
411 |
</div> <!-- #supplier-ordering-information --> |
| 359 |
|
412 |
|
|
Lines 364-385
div.rows { padding: 1rem; }
Link Here
|
| 364 |
[% FOR i IN vendor.interfaces %] |
417 |
[% FOR i IN vendor.interfaces %] |
| 365 |
<h3>[% i.name | html %]</h3> |
418 |
<h3>[% i.name | html %]</h3> |
| 366 |
[% IF i.type %] |
419 |
[% IF i.type %] |
| 367 |
<p><span class="label">Type: </span>[% AuthorisedValues.GetByCode( 'VENDOR_INTERFACE_TYPE', i.type) | html %]</p> |
420 |
<li><span class="label">Type: </span>[% AuthorisedValues.GetByCode( 'VENDOR_INTERFACE_TYPE', i.type) | html %]</li> |
| 368 |
[% END %] |
421 |
[% END %] |
| 369 |
[% IF i.uri %] |
422 |
[% IF i.uri %] |
| 370 |
<p><span class="label">URI: </span>[% i.uri | html %]</p> |
423 |
<li><span class="label">URI: </span>[% i.uri | html %]</li> |
| 371 |
[% END %] |
424 |
[% END %] |
| 372 |
[% IF i.login %] |
425 |
[% IF i.login %] |
| 373 |
<p><span class="label">Login: </span>[% i.login | html %]</p> |
426 |
<li><span class="label">Login: </span>[% i.login | html %]</li> |
| 374 |
[% END %] |
427 |
[% END %] |
| 375 |
[% IF i.password %] |
428 |
[% IF i.password %] |
| 376 |
<p><span class="label">Password: </span><span class="password"><a href="#" class="show_password" data-plain-text-password="[% i.plain_text_password | html %]">Show</a></span></span></p> |
429 |
<li><span class="label">Password: </span><span class="password"><a href="#" class="show_password" data-plain-text-password="[% i.plain_text_password | html %]">Show</a></span></span></li> |
| 377 |
[% END %] |
430 |
[% END %] |
| 378 |
[% IF i.account_email %] |
431 |
[% IF i.account_email %] |
| 379 |
<p><span class="label">Account email: </span>[% i.account_email | html %]</p> |
432 |
<li><span class="label">Account email: </span>[% i.account_email | html %]</li> |
| 380 |
[% END %] |
433 |
[% END %] |
| 381 |
[% IF i.notes %] |
434 |
[% IF i.notes %] |
| 382 |
<p><span class="label">Notes: </span>[% i.notes | html %]</p> |
435 |
<li><span class="label">Notes: </span>[% i.notes | html %]</li> |
| 383 |
[% END %] |
436 |
[% END %] |
| 384 |
[% END %] |
437 |
[% END %] |
| 385 |
</div> |
438 |
</div> |
|
Lines 476-484
div.rows { padding: 1rem; }
Link Here
|
| 476 |
$('input, textarea', new_contact).each(function () { |
529 |
$('input, textarea', new_contact).each(function () { |
| 477 |
$(this).attr('id', $(this).attr('id') + '_' + timestamp); |
530 |
$(this).attr('id', $(this).attr('id') + '_' + timestamp); |
| 478 |
}); |
531 |
}); |
| 479 |
$('label', new_contact).each(function () { |
|
|
| 480 |
$(this).attr('for', $(this).attr('for') + '_' + timestamp); |
| 481 |
}); |
| 482 |
$(new_contact).insertBefore(this); |
532 |
$(new_contact).insertBefore(this); |
| 483 |
if ($('.supplier-contact').length === 2) { // First contact |
533 |
if ($('.supplier-contact').length === 2) { // First contact |
| 484 |
$.each(['.contact_acqprimary', '.contact_serialsprimary', '.contact_orderacquisition', '.contact_claimacquisition', '.contact_claimissues'], function (idx, checkbox) { |
534 |
$.each(['.contact_acqprimary', '.contact_serialsprimary', '.contact_orderacquisition', '.contact_claimacquisition', '.contact_claimissues'], function (idx, checkbox) { |
| 485 |
- |
|
|