Merge branch 'develop' into sa-vat-report
This commit is contained in:
		
						commit
						888d1f94ce
					
				| @ -127,15 +127,36 @@ | ||||
| 			</script> | ||||
| 		</div> | ||||
| 	</div> | ||||
| 	<div class="row"> | ||||
| 		<div class="col-12"> | ||||
| 	<div class="row mt-6"> | ||||
| 		<div class="col-3"> | ||||
| 		</div> | ||||
| 		<div class="col-9"> | ||||
| 			{% if frappe.form_dict.start|int > 0 %} | ||||
| 			<button class="btn btn-outline-secondary btn-prev" data-start="{{ frappe.form_dict.start|int - page_length }}">{{ _("Prev") }}</button> | ||||
| 			<button class="btn btn-outline-secondary btn-prev" data-start="{{ frappe.form_dict.start|int - page_length }}"> | ||||
| 				{{ _("Prev") }} | ||||
| 			</button> | ||||
| 			{% endif %} | ||||
| 			{% if items|length >= page_length %} | ||||
| 			<button class="btn btn-outline-secondary btn-next" data-start="{{ frappe.form_dict.start|int + page_length }}">{{ _("Next") }}</button> | ||||
| 			<button class="btn btn-outline-secondary btn-next" data-start="{{ frappe.form_dict.start|int + page_length }}" | ||||
| 				style="float: right;"> | ||||
| 				{{ _("Next") }} | ||||
| 			</button> | ||||
| 			{% endif %} | ||||
| 		</div> | ||||
| 	</div> | ||||
| </div> | ||||
| 
 | ||||
| <script> | ||||
| 	frappe.ready(() => { | ||||
| 		$('.btn-prev, .btn-next').click((e) => { | ||||
| 			const $btn = $(e.target); | ||||
| 			$btn.prop('disabled', true); | ||||
| 			const start = $btn.data('start'); | ||||
| 			let query_params = frappe.utils.get_query_params(); | ||||
| 			query_params.start = start; | ||||
| 			let path = window.location.pathname + '?' + frappe.utils.get_url_from_dict(query_params); | ||||
| 			window.location.href = path; | ||||
| 		}); | ||||
| 	}); | ||||
| </script> | ||||
| {% endblock %} | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user