<?php

namespace DataView;

class ReminderFop_fints_buchungForderungen {
  
  

  
  

    // --- Statische Methoden ---
  
  public static function renderScript() { 
    
    
    // --- BLOCK: main ---
    
								\FOP\I18n::ensureIsLoaded();
								?>
								<script type="text/javascript">
									
    function changefilter_reminderFop_fints_buchungForderungen_kontoListMultiFilter(val, cb) {
		  if (val) {
			  querySet('filter_reminderFop_fints_buchungForderungen_konto', val, cb.checked);
		  } else {
			  delete query['filter_reminderFop_fints_buchungForderungen_konto'];
		  }reloadreminderFop_fints_buchungForderungen();
        
    }

		var i0fef0ac75a44b6e97d76eb9f10bf1d3d8548c8f984b21773ba31ac1e1cc0eacbtimeout = null;
		function changefilter_reminderFop_fints_buchungForderungen_kontoSearchFilter(val, callback) {
			if(i0fef0ac75a44b6e97d76eb9f10bf1d3d8548c8f984b21773ba31ac1e1cc0eacbtimeout) clearTimeout(i0fef0ac75a44b6e97d76eb9f10bf1d3d8548c8f984b21773ba31ac1e1cc0eacbtimeout);

			i0fef0ac75a44b6e97d76eb9f10bf1d3d8548c8f984b21773ba31ac1e1cc0eacbtimeout = setTimeout(function() {
				$.getJSON(reloadreminderFop_fints_buchungForderungen({action: 'getfilter_reminderFop_fints_buchungForderungen_kontoItemsByString', 'fstr': val}, true), function(r) {
					callback(r);
					query['filter_reminderFop_fints_buchungForderungen_konto_orig'] = val;
				});
			}, 300);
		}

	function getfilter_reminderFop_fints_buchungForderungen_kontoListMultiFilter() {
		var gui = $("<div class='fop-floatsorter'></div>");
		// TODO: usability #1866 auf ajax warten bevor ENTER behandelt wird
		var fstr = <?php echo(isset($_GET['filter_reminderFop_fints_buchungForderungen_konto_orig']) ? json_encode($_GET['filter_reminderFop_fints_buchungForderungen_konto_orig']) : '""') ?>;
		var search = $('<div class="mdl-textfield mdl-js-textfield">' + 
			'<input value="" class="mdl-textfield__input" id="0fef0ac75a44b6e97d76eb9f10bf1d3d8548c8f984b21773ba31ac1e1cc0eacb" type="text">' +
			'<label class="mdl-textfield__label" for="0fef0ac75a44b6e97d76eb9f10bf1d3d8548c8f984b21773ba31ac1e1cc0eacb">Filter...</label>' +
			'</div>');
		search.find('input').val(fstr).keyup(function (event) {
			var self = this;
			if ((event.keyCode || e.which) == 13) {
				var hasChecked = false;
				if (this.value) {
					// search value + tick all search results
					checkboxes.find('input').each(function (i, inp) {
						if (!inp.checked && $(inp).data('value')) {
							inp.checked = true;
							querySet('filter_reminderFop_fints_buchungForderungen_konto', $(inp).data('value'), true);
							hasChecked = true;
						}
					});
				} else {
					// untick all
					search.find('input').val('');
					query['filter_reminderFop_fints_buchungForderungen_konto_orig'] = '';
					delete query['filter_reminderFop_fints_buchungForderungen_konto'];
					reload('', items);
					hasChecked = true;
				}
				if (hasChecked) {reloadreminderFop_fints_buchungForderungen();
					
				} else {
					$('#table_reminderFop_fints_buchungForderungen').find('.fop-table-row:first').click();
				}
			} else {
				changefilter_reminderFop_fints_buchungForderungen_kontoSearchFilter(this.value, function (result) {
					reload(self.value, result);
				});
			}
		});
		gui.append(search);

		var checkboxes = $("<div></div>").css({maxHeight: '200px', overflow: 'auto'});
		var items = <?php
			// TODO: deps-Variable füllen mit DV-Parametern vom DataView id
			echo json_encode(\DataView\ReminderFop_fints_buchungForderungen::getfilter_reminderFop_fints_buchungForderungen_kontoItemsByStringAction(''));
		?>;

		function reload(fstr, items) {
			// rerender checkbox list
			checkboxes.empty();
			checkboxes.append($('<i style="cursor: pointer;"><?php echo _('show all'); ?></i>').click(function () {
				search.find('input').val('');
				query['filter_reminderFop_fints_buchungForderungen_konto_orig'] = '';
				delete query['filter_reminderFop_fints_buchungForderungen_konto'];
				reload('', items);reloadreminderFop_fints_buchungForderungen();
				
			})).append('<br/>');
			// NULL-Wert auch suchbar #2057 (kommt als ID=0 an, muss für die idlist in _null geändert werden)
			for (var i = 0; i < items.length; i++) {
				let value = (items[i].ID === '0' ? '_null' : items[i].ID);
				let descr = items[i].description;
				let checked = querySet('filter_reminderFop_fints_buchungForderungen_konto', value);
				if (!fstr || checked || descr.toLowerCase().includes(fstr.toLowerCase())) {
					checkboxes.append($('<input type=\'checkbox\'  onclick=\'changefilter_reminderFop_fints_buchungForderungen_kontoListMultiFilter("' + value + '", this)\' ' + (checked ? ' checked>': '> ')).data('value', value)).append($('<span></span>').text(descr).prepend('&nbsp;')).append('<br/>');
				}
			 }
		}
		reload(fstr, items);
		gui.append(checkboxes);

		return gui;
	}
									
    function changefilter_reminderFop_fints_buchungForderungen_kontoListMultiFilter(val, cb) {
		  if (val) {
			  querySet('filter_reminderFop_fints_buchungForderungen_konto', val, cb.checked);
		  } else {
			  delete query['filter_reminderFop_fints_buchungForderungen_konto'];
		  }reloadreminderFop_fints_buchungForderungen();
        
    }

		var i0fef0ac75a44b6e97d76eb9f10bf1d3d8548c8f984b21773ba31ac1e1cc0eacbtimeout = null;
		function changefilter_reminderFop_fints_buchungForderungen_kontoSearchFilter(val, callback) {
			if(i0fef0ac75a44b6e97d76eb9f10bf1d3d8548c8f984b21773ba31ac1e1cc0eacbtimeout) clearTimeout(i0fef0ac75a44b6e97d76eb9f10bf1d3d8548c8f984b21773ba31ac1e1cc0eacbtimeout);

			i0fef0ac75a44b6e97d76eb9f10bf1d3d8548c8f984b21773ba31ac1e1cc0eacbtimeout = setTimeout(function() {
				$.getJSON(reloadreminderFop_fints_buchungForderungen({action: 'getfilter_reminderFop_fints_buchungForderungen_kontoItemsByString', 'fstr': val}, true), function(r) {
					callback(r);
					query['filter_reminderFop_fints_buchungForderungen_konto_orig'] = val;
				});
			}, 300);
		}

	function getfilter_reminderFop_fints_buchungForderungen_kontoListMultiFilter() {
		var gui = $("<div class='fop-floatsorter'></div>");
		// TODO: usability #1866 auf ajax warten bevor ENTER behandelt wird
		var fstr = <?php echo(isset($_GET['filter_reminderFop_fints_buchungForderungen_konto_orig']) ? json_encode($_GET['filter_reminderFop_fints_buchungForderungen_konto_orig']) : '""') ?>;
		var search = $('<div class="mdl-textfield mdl-js-textfield">' + 
			'<input value="" class="mdl-textfield__input" id="0fef0ac75a44b6e97d76eb9f10bf1d3d8548c8f984b21773ba31ac1e1cc0eacb" type="text">' +
			'<label class="mdl-textfield__label" for="0fef0ac75a44b6e97d76eb9f10bf1d3d8548c8f984b21773ba31ac1e1cc0eacb">Filter...</label>' +
			'</div>');
		search.find('input').val(fstr).keyup(function (event) {
			var self = this;
			if ((event.keyCode || e.which) == 13) {
				var hasChecked = false;
				if (this.value) {
					// search value + tick all search results
					checkboxes.find('input').each(function (i, inp) {
						if (!inp.checked && $(inp).data('value')) {
							inp.checked = true;
							querySet('filter_reminderFop_fints_buchungForderungen_konto', $(inp).data('value'), true);
							hasChecked = true;
						}
					});
				} else {
					// untick all
					search.find('input').val('');
					query['filter_reminderFop_fints_buchungForderungen_konto_orig'] = '';
					delete query['filter_reminderFop_fints_buchungForderungen_konto'];
					reload('', items);
					hasChecked = true;
				}
				if (hasChecked) {reloadreminderFop_fints_buchungForderungen();
					
				} else {
					$('#table_reminderFop_fints_buchungForderungen').find('.fop-table-row:first').click();
				}
			} else {
				changefilter_reminderFop_fints_buchungForderungen_kontoSearchFilter(this.value, function (result) {
					reload(self.value, result);
				});
			}
		});
		gui.append(search);

		var checkboxes = $("<div></div>").css({maxHeight: '200px', overflow: 'auto'});
		var items = <?php
			// TODO: deps-Variable füllen mit DV-Parametern vom DataView id
			echo json_encode(\DataView\ReminderFop_fints_buchungForderungen::getfilter_reminderFop_fints_buchungForderungen_kontoItemsByStringAction(''));
		?>;

		function reload(fstr, items) {
			// rerender checkbox list
			checkboxes.empty();
			checkboxes.append($('<i style="cursor: pointer;"><?php echo _('show all'); ?></i>').click(function () {
				search.find('input').val('');
				query['filter_reminderFop_fints_buchungForderungen_konto_orig'] = '';
				delete query['filter_reminderFop_fints_buchungForderungen_konto'];
				reload('', items);reloadreminderFop_fints_buchungForderungen();
				
			})).append('<br/>');
			// NULL-Wert auch suchbar #2057 (kommt als ID=0 an, muss für die idlist in _null geändert werden)
			for (var i = 0; i < items.length; i++) {
				let value = (items[i].ID === '0' ? '_null' : items[i].ID);
				let descr = items[i].description;
				let checked = querySet('filter_reminderFop_fints_buchungForderungen_konto', value);
				if (!fstr || checked || descr.toLowerCase().includes(fstr.toLowerCase())) {
					checkboxes.append($('<input type=\'checkbox\'  onclick=\'changefilter_reminderFop_fints_buchungForderungen_kontoListMultiFilter("' + value + '", this)\' ' + (checked ? ' checked>': '> ')).data('value', value)).append($('<span></span>').text(descr).prepend('&nbsp;')).append('<br/>');
				}
			 }
		}
		reload(fstr, items);
		gui.append(checkboxes);

		return gui;
	}
									function updateNumberreminderFop_fints_buchungForderungen(col) {
										//var checklist = window.DataViewChecked['reminderFop_fints_buchungForderungen'][col];
										//if (checklist.id) {
											// checklist is online
											// TODO: check if cache is alive, otherwise reload from ajax, delay execution and return now
											//checklist.ranges = [[1,10000000]]; // mostly we use indirect idlists to tick all marks; so this is an approximation
										//}
										// checkboxes aktualisieren
										if (window.DataViewChecked && window.DataViewChecked['reminderFop_fints_buchungForderungen'] && window.DataViewChecked['reminderFop_fints_buchungForderungen'][col].ranges.length > 0) {
											$('.reminderFop_fints_buchungForderungen__mass-action').css('visibility', 'visible');
											$('.reminderFop_fints_buchungForderungen__action').css('visibility', 'hidden');
										} else {
											$('.reminderFop_fints_buchungForderungen__mass-action').css('visibility', 'hidden');
											$('.reminderFop_fints_buchungForderungen__action').css('visibility', 'visible');
										}
										$('.reminderFop_fints_buchungForderungen__checkbox').each(function (idx, x) {
											for (var cssclass of x.classList) {
												if (cssclass.startsWith('reminderFop_fints_buchungForderungen__checkbox-'+col+'-')) {
													var my_id = cssclass.substr(('reminderFop_fints_buchungForderungen__checkbox-'+col+'-').length);
													if (window.DataViewChecked) {
														x.MaterialCheckbox[checklist.has(my_id) ? 'check' : 'uncheck']();
													}
												}
											}
										});
									}
									function reloadreminderFop_fints_buchungForderungen (params, returnUrl, onlyScroll, addPadding = 0) {
										// copy query
										let nq = JSON.parse(JSON.stringify(query));
										nq['parent_request'] = <?php echo json_encode(strtok(\FOP\Util::getBackUrl(), '?')); ?>;
										<?php if (isset($_GET['select'])) { ?>nq['select'] = 'select';<?php } ?>
										
										if (params) {
											for (var i in params) nq[i] = params[i];
											var action = nq['action'];
											delete nq['action'];
											let querystr = "DataView/ReminderFop_fints_buchungForderungen/" + action + "?" + Object.keys(nq).map(function(k){ return k + "=" +  encodeURIComponent(nq[k]); }).join("&");
											// direkt aufrufen (ist wohl ein Download oder so)
											if (returnUrl) return querystr;
											window.location.href = querystr;
										} else {
											let querystr;
											
											
											<?php if (((\FOP\User::getBuchhaltung()) && (\FOP\User::getBuchhaltung()))) { ?>
											delete nq['action'];
											querystr = "DataView/ReminderFop_fints_buchungForderungen/renderTabTable?" + Object.keys(nq).map(function(k){ return k + "=" +  encodeURIComponent(nq[k]); }).join("&");
											// per Ajax laden
											if(!$("#reminderFop_fints_buchungForderungen-table")?.parent()?.parent()?.hasClass('fop-form-feature-collapsed') || $("#reminderFop_fints_buchungForderungen-table")?.parent()?.parent()?.hasClass('fop-form-feature-mode-area')) {
											$.get(querystr, function(data){
												var tab = $("#reminderFop_fints_buchungForderungen-table");
												var top = tab.find('.fop-table-body-inner');
												var el;
												if (onlyScroll && (el = $('<div class="tabcontent">' + data + '</div>').find('.fop-table-body-inner'))) {
													// nur Scroll-Bereich ersetzen
													var paddingTop = parseInt(el.css('paddingTop') || '0px', 10);
													var minHeight = parseInt(el.css('minHeight'), 10)
													paddingTop += addPadding;
													minHeight += addPadding;
													top.css({paddingTop: paddingTop.toString()+'px', minHeight: minHeight.toString()+'px'}); // Offset
													el = el.children();
													top.empty();
													top.append(el);
													el = top; // top-upgrade doppelt machen, dadurch vermeiden wir das Array-upgrade => Performance
												} else {
													// gesamten Tab ersetzen
													tab.children().remove();
													el = tab.html('<div class="tabcontent">' + data + '</div>');
												}
												try {
													for (var i = 0; i < el.length; i++) upgradeDOM(el[i]);
												} catch (e) {
													console.log(e);
												}
												upgradeTable(el.find('.fop-table .fop-table-header')); // Falls es Tabellen-Layout ist: Spalten-Order anpassen
												flushURL(); // Neue URL in Titelleiste eintragen

												// Checkbox-Auswahl ankreuzen
												updateNumberreminderFop_fints_buchungForderungen('ID');
											});
											} else {
												// gesamten Tab ersetzen
												var tab = $("#reminderFop_fints_buchungForderungen-table");
												tab.children().remove();
												el = tab.html('<div class="fop-lazy-reload" onclick="reloadreminderFop_fints_buchungForderungen()"></div>');
											}
											<?php } ?>
											
										}
									}
									function checkreminderFop_fints_buchungForderungen (id, col, checked) {
										// ID-Liste aufbauen
										if (!window.DataViewChecked) window.DataViewChecked = {};
										if (!window.DataViewChecked['reminderFop_fints_buchungForderungen']) window.DataViewChecked['reminderFop_fints_buchungForderungen'] = {};
										if (!window.DataViewChecked['reminderFop_fints_buchungForderungen'][col]) window.DataViewChecked['reminderFop_fints_buchungForderungen'][col] = new IDList();

										// Abfrage aller gecheckten IDs für eine Tabelle
										if (!id) {
											return window.DataViewChecked['reminderFop_fints_buchungForderungen'][col].toString();
										}

										// check all, check id
										if (id == 'all') {
											// TODO: umbauen #1289: 'all' auch nur auf ne idlist reduzieren
											if (checked) {
												$.get(reloadreminderFop_fints_buchungForderungen({action: 'getids', col: col}, true), function (ids) {
													window.DataViewChecked['reminderFop_fints_buchungForderungen'][col] = new IDList(ids);
													updateNumberreminderFop_fints_buchungForderungen(col);
												});
											} else {
												window.DataViewChecked['reminderFop_fints_buchungForderungen'][col] = new IDList();
												updateNumberreminderFop_fints_buchungForderungen(col);
											}
										} else {
											var ids = new IDList(id);
											var allcb = $('#reminderFop_fints_buchungForderungen__all-checkbox');
											if (allcb[0]) {
												allcb[0].parentElement.MaterialCheckbox.uncheck(); // TODO: prüfen, ob Gruppen-CBs voll werden
											}
											if (checked == 'set') {
												window.DataViewChecked['reminderFop_fints_buchungForderungen'][col] = ids;
											} else for (id of ids.all()) {
												if (checked) {
													window.DataViewChecked['reminderFop_fints_buchungForderungen'][col].push(id);
												} else {
													window.DataViewChecked['reminderFop_fints_buchungForderungen'][col].remove(id);
												}
											}
											updateNumberreminderFop_fints_buchungForderungen(col);
										}
									}
								</script><?php

    
  }

  public static function renderSpecialFilters() { 
    
    
    // --- BLOCK: main ---
    ?>
	
	<script type"text/javascript">
		function updateSpecialFilter(param, val) {
			query[param] = val.toString();reloadreminderFop_fints_buchungForderungen();
			
		}

	</script>
	<?php
	
    
  }

  public static function renderTabTableAction() { 
    
    
    // --- BLOCK: access ---
    
    // --- BLOCK: main ---
     ?><div class='fop-dv-buttonbar'><?php if((!\FOP\User::getIsGuest())) { ?>
	<?php if ((true) && (true)) { ?>
	<div class='fop-dv-aggregate' data-column='betrag' title='<?php echo(_('Betrag')); ?>'>
		<div class='fop-dv-aggregate-caption' style='text-align: right'><?php echo(_('Betrag')); ?></div>
		<div class='fop-dv-aggregate-value'>-...-</div>
	</div>
	<?php } ?><?php } ?></div><?php 
								\FOP\User::getIsGuest();
								$itemheight = 32;
								$itemsperpage = ceil(1080 / $itemheight * 0.8);
								$page = (isset($_GET['page_reminderFop_fints_buchungForderungen']) ? intval($_GET['page_reminderFop_fints_buchungForderungen']) : 0);
								$addlines = (isset($_GET['addlines_reminderFop_fints_buchungForderungen']) ? intval($_GET['addlines_reminderFop_fints_buchungForderungen']) : 0);
								$firstitem = $page * $itemsperpage;
								$sqladdon = ' LIMIT ' . ($itemsperpage * 2) . ' OFFSET ' . ($firstitem);
								$data = self::getData($sqladdon, $_GET);
								$arr = $data["items"];
								$itemcount = $data["itemcount"];
								$lastPage = ceil($itemcount/$itemsperpage-1);
								// calculate width of first column: 67px + 32px for each shortcut
								$firstColumnWidth = 66 + 34 + 34;
								$additionalLines = 0;
								$renderAggregateRow = function ($item) use (&$columns, $firstColumnWidth) {
										if (!(true)) {
											return; // no access
										}
										?><div class="fop-table-row fop-table-row-aggregate">
											<div class="fop-table-column noprint" style="width: <?php echo json_encode($firstColumnWidth); ?>px;"><?php echo $item['::cnt']; ?> x</div><?php
											foreach ($columns AS $col) {
												$col['renderSum']($item);
											} ?>
										</div><?php
								};
								$checkAggregates = function ($last, $current) use ($data, $renderAggregateRow) {
									
								};

									// Spaltenliste zuerst aufbauen, damit sie noch umsortiert werden kann
									$order = 1000;
									$columns = [];
									
										if(true){
											$col = [
												'id' => 'forderungDone',
												'desc' => _('Forderung behandelt'),
												'order' => ++$order,
												'width' => 40, // default value
												'collapsed' => 0

											];
											$columns['forderungDone'] = $col;
										}
									
										if(true){
											$col = [
												'id' => 'konto',
												'desc' => _('Konto'),
												'order' => ++$order,
												'width' => 180, // default value
												'collapsed' => 0

											];
											$columns['konto'] = $col;
										}
									
										if(true){
											$col = [
												'id' => 'bdate',
												'desc' => _('Buchungsdatum'),
												'order' => ++$order,
												'width' => 100, // default value
												'collapsed' => 0

											];
											$columns['bdate'] = $col;
										}
									
										if(true){
											$col = [
												'id' => 'date',
												'desc' => _('Wertstellungsdatum'),
												'order' => ++$order,
												'width' => 100, // default value
												'collapsed' => 0

											];
											$columns['date'] = $col;
										}
									
										if(true){
											$col = [
												'id' => 'betrag',
												'desc' => _('Betrag'),
												'order' => ++$order,
												'width' => 120, // default value
												'collapsed' => 0

											];
											$columns['betrag'] = $col;
										}
									
										if(true){
											$col = [
												'id' => 'saldo',
												'desc' => _('Saldo'),
												'order' => ++$order,
												'width' => 120, // default value
												'collapsed' => 0

											];
											$columns['saldo'] = $col;
										}
									
										if(true){
											$col = [
												'id' => 'iban',
												'desc' => _('IBAN'),
												'order' => ++$order,
												'width' => 180, // default value
												'collapsed' => 0

											];
											$columns['iban'] = $col;
										}
									
										if(true){
											$col = [
												'id' => 'name_firma',
												'desc' => _('Name, Vorname/Firma'),
												'order' => ++$order,
												'width' => 180, // default value
												'collapsed' => 0

											];
											$columns['name_firma'] = $col;
										}
									
										if(true){
											$col = [
												'id' => 'vzweck',
												'desc' => _('Verwendungszweck'),
												'order' => ++$order,
												'width' => 180, // default value
												'collapsed' => 0

											];
											$columns['vzweck'] = $col;
										}
									
										if(true){
											$col = [
												'id' => 'endtoend',
												'desc' => _('End to End-Referenz'),
												'order' => ++$order,
												'width' => 180, // default value
												'collapsed' => 0

											];
											$columns['endtoend'] = $col;
										}
									
										if(true){
											$col = [
												'id' => 'umsatzart',
												'desc' => _('Umsatzart'),
												'order' => ++$order,
												'width' => 180, // default value
												'collapsed' => 0

											];
											$columns['umsatzart'] = $col;
										}
									
										if((false)){
											$col = [
												'id' => 'hash',
												'desc' => _('Hashcode'),
												'order' => ++$order,
												'width' => 180, // default value
												'collapsed' => 0

											];
											$columns['hash'] = $col;
										}
									

									// gespeicherte Spaltenanordnung
									foreach (\FOP\Database::query('SELECT * FROM fop_dataview WHERE '.qi('user').' = ' . \FOP\Database::quote(\FOP\User::getID()) . ' AND dataview = ' . \FOP\Database::quote('reminderFop_fints_buchungForderungen'))->fetchAll(\PDO::FETCH_ASSOC) AS $column => $c) {
										if (isset($columns[$c['column']])) {
											$columns[$c['column']]['order'] = $c['order']; // order, width, collapsed
											$columns[$c['column']]['width'] = $c['width']; // order, width, collapsed
											$columns[$c['column']]['collapsed'] = $c['collapsed']; // order, width, collapsed
										}
									}

									// DOM vor-rendern
									
										
										if(true){
											ob_start();
											?><div class="fop-table-column overlay"
												data-column='forderungDone'
												data-order='<?php echo intval($columns['forderungDone']['order']); ?>'
												data-width='<?php echo intval($columns['forderungDone']['width']); ?>'
												data-collapsed='<?php echo intval($columns['forderungDone']['collapsed']); ?>'
												style='width: <?php echo intval($columns['forderungDone']['width']); ?>px; <?php if ($columns['forderungDone']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
												<span class='title' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadreminderFop_fints_buchungForderungen(); 
		}});
		win
	.append($('<input type=\'checkbox\'' + (querySet('filter_reminderFop_fints_buchungForderungen_forderungDone', '0') ? ' checked>': '>')).change(function (){querySet('filter_reminderFop_fints_buchungForderungen_forderungDone', '0', $(this).prop('checked')); delete query['page_reminderFop_fints_buchungForderungen']; changed=true;})).append(' <?php echo(_('off')); ?><br/>')
	.append($('<input type=\'checkbox\'' + (querySet('filter_reminderFop_fints_buchungForderungen_forderungDone', '1') ? ' checked>': '>')).change(function (){querySet('filter_reminderFop_fints_buchungForderungen_forderungDone', '1', $(this).prop('checked')); delete query['page_reminderFop_fints_buchungForderungen']; changed=true;})).append(' <?php echo(_('on')); ?><br/>')
;
		return false;
	">
													<span class='title-title' title='<?php echo(_('Forderung behandelt')); ?>'><?php echo(_('Forderung behandelt')); ?></span>
													<?php // sort indicator
														if (isset($_GET['sort_reminderFop_fints_buchungForderungen']) && $_GET['sort_reminderFop_fints_buchungForderungen'] == 'forderungDone ASC') {
															?><i class='material-icons fop-small'>keyboard_arrow_down</i><?php
														} else if (isset($_GET['sort_reminderFop_fints_buchungForderungen']) && $_GET['sort_reminderFop_fints_buchungForderungen'] == 'forderungDone DESC') {
															?><i class='material-icons fop-small'>keyboard_arrow_up</i><?php
														}
														if (isset($_GET['range_min_reminderFop_fints_buchungForderungen_forderungDone']) || isset($_GET['range_max_reminderFop_fints_buchungForderungen_forderungDone']) || isset($_GET['deps_reminderFop_fints_buchungForderungen_forderungDone']) || isset($_GET['fullsearch_reminderFop_fints_buchungForderungen_forderungDone']) || isset($_GET['dynamic_reminderFop_fints_buchungForderungen_forderungDone']) || isset($_GET['search_reminderFop_fints_buchungForderungen_forderungDone']) || isset($_GET['searchnot_reminderFop_fints_buchungForderungen_forderungDone']) || isset($_GET['filter_reminderFop_fints_buchungForderungen_forderungDone'])) {
															// filter indicator
															?><i class='material-icons fop-small'>filter_list</i><?php
														}
														// search indicator
														?><i class='material-icons fop-small'>search</i>
													</span>
												<div class='fop-column-handle'></div>
											</div><?php
											$columns['forderungDone']['header'] = ob_get_contents(); ob_end_clean();
											$columns['forderungDone']['render'] = function ($item) use (&$columns, $itemheight) {
												// Render-Callback für eine Zelle
												?><div class='fop-table-column'
													style='width: <?php echo intval($columns['forderungDone']['width']); ?>px; <?php if ($columns['forderungDone']['collapsed'] == 1) { echo ' display: none;'; } ?> height: <?php echo $itemheight; ?>px; ' data-column='forderungDone'><?php if($item['forderungDone'] == 1){ ?>✓<?php }else{ ?><?php }?></div><?php
											};
											$columns['forderungDone']['renderSum'] = function ($item) use (&$columns) {
												// Render-Callback Summe
												?><div class='fop-table-column fop-table-column-aggregate'
													data-column='forderungDone'
													data-order='<?php echo intval($columns['forderungDone']['order']); ?>'
													data-width='<?php echo intval($columns['forderungDone']['width']); ?>'
													data-collapsed='<?php echo intval($columns['forderungDone']['collapsed']); ?>'
													style='width: <?php echo intval($columns['forderungDone']['width']); ?>px; <?php if ($columns['forderungDone']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
													</div><?php
											};
										}
										
									
										
										if(true){
											ob_start();
											?><div class="fop-table-column overlay"
												data-column='konto'
												data-order='<?php echo intval($columns['konto']['order']); ?>'
												data-width='<?php echo intval($columns['konto']['width']); ?>'
												data-collapsed='<?php echo intval($columns['konto']['collapsed']); ?>'
												style='width: <?php echo intval($columns['konto']['width']); ?>px; <?php if ($columns['konto']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
												<span class='title' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadreminderFop_fints_buchungForderungen(); 
		}});
		
		win.append(getfilter_reminderFop_fints_buchungForderungen_kontoListMultiFilter()); win.find('input').first().focus();
		return false;
	">
													<span class='title-title' title='<?php echo(_('Konto')); ?>'><?php echo(_('Konto')); ?></span>
													<?php // sort indicator
														if (isset($_GET['sort_reminderFop_fints_buchungForderungen']) && $_GET['sort_reminderFop_fints_buchungForderungen'] == 'konto ASC') {
															?><i class='material-icons fop-small'>keyboard_arrow_down</i><?php
														} else if (isset($_GET['sort_reminderFop_fints_buchungForderungen']) && $_GET['sort_reminderFop_fints_buchungForderungen'] == 'konto DESC') {
															?><i class='material-icons fop-small'>keyboard_arrow_up</i><?php
														}
														if (isset($_GET['range_min_reminderFop_fints_buchungForderungen_konto']) || isset($_GET['range_max_reminderFop_fints_buchungForderungen_konto']) || isset($_GET['deps_reminderFop_fints_buchungForderungen_konto']) || isset($_GET['fullsearch_reminderFop_fints_buchungForderungen_konto']) || isset($_GET['dynamic_reminderFop_fints_buchungForderungen_konto']) || isset($_GET['search_reminderFop_fints_buchungForderungen_konto']) || isset($_GET['searchnot_reminderFop_fints_buchungForderungen_konto']) || isset($_GET['filter_reminderFop_fints_buchungForderungen_konto'])) {
															// filter indicator
															?><i class='material-icons fop-small'>filter_list</i><?php
														}
														// search indicator
														?><i class='material-icons fop-small'>search</i>
													</span>
												<div class='fop-column-handle'></div>
											</div><?php
											$columns['konto']['header'] = ob_get_contents(); ob_end_clean();
											$columns['konto']['render'] = function ($item) use (&$columns, $itemheight) {
												// Render-Callback für eine Zelle
												?><div class='fop-table-column'
													style='width: <?php echo intval($columns['konto']['width']); ?>px; <?php if ($columns['konto']['collapsed'] == 1) { echo ' display: none;'; } ?> height: <?php echo $itemheight; ?>px; ' data-column='konto'><?php
	
	call_user_func(function () use ($item) {
	$id = $item['konto'];
	$val = $item['konto::description'];
	$canView = $item['konto::canView'];
	if ($val !== null) {
		if ($canView) echo "<a tabindex=\"-1\" class=\"mdl-button mdl-button-small tbl-link\" data-tbl=\"fop_fints_konto\" data-id=\"".htmlentities($id)."\" onclick=\"event.stopPropagation(); event.preventDefault(); open_url(this.href, false);\" href=\"" . \TablesRouter\Fop_fints_konto::viewURL($id, ['from' => \FOP\Util::getBackURL()]) . "\">(…)</a>";echo htmlentities($val);
	} else {
		echo htmlentities(_('') ?: '-');
	}
	});
	
?>
</div><?php
											};
											$columns['konto']['renderSum'] = function ($item) use (&$columns) {
												// Render-Callback Summe
												?><div class='fop-table-column fop-table-column-aggregate'
													data-column='konto'
													data-order='<?php echo intval($columns['konto']['order']); ?>'
													data-width='<?php echo intval($columns['konto']['width']); ?>'
													data-collapsed='<?php echo intval($columns['konto']['collapsed']); ?>'
													style='width: <?php echo intval($columns['konto']['width']); ?>px; <?php if ($columns['konto']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
													</div><?php
											};
										}
										
									
										
										if(true){
											ob_start();
											?><div class="fop-table-column overlay"
												data-column='bdate'
												data-order='<?php echo intval($columns['bdate']['order']); ?>'
												data-width='<?php echo intval($columns['bdate']['width']); ?>'
												data-collapsed='<?php echo intval($columns['bdate']['collapsed']); ?>'
												style='width: <?php echo intval($columns['bdate']['width']); ?>px; <?php if ($columns['bdate']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
												<span class='title' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadreminderFop_fints_buchungForderungen(); 
		}}, 600);
		date_filter(win, 'reminderFop_fints_buchungForderungen', 'bdate', <?php echo htmlentities(json_encode(_('period'))); ?>, <?php echo htmlentities(json_encode(\FOP\I18n::getShortLocale())); ?>, <?php echo htmlentities(json_encode(_('dateformat_moment'))); ?>, function() { reloadreminderFop_fints_buchungForderungen();  reloadreminderFop_fints_buchungForderungen(); });
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_reminderFop_fints_buchungForderungen'] == 'bdate ASC') {
			query['sort_reminderFop_fints_buchungForderungen'] = 'bdate DESC';
		 } else if (query['sort_reminderFop_fints_buchungForderungen'] == 'bdate DESC') {
		 	delete query['sort_reminderFop_fints_buchungForderungen'];
		 } else {
			query['sort_reminderFop_fints_buchungForderungen'] = 'bdate ASC';
		 }
		 reloadreminderFop_fints_buchungForderungen();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	">
													<span class='title-title' title='<?php echo(_('Buchungsdatum')); ?>'><?php echo(_('Buchungsdatum')); ?></span>
													<?php // sort indicator
														if (isset($_GET['sort_reminderFop_fints_buchungForderungen']) && $_GET['sort_reminderFop_fints_buchungForderungen'] == 'bdate ASC') {
															?><i class='material-icons fop-small'>keyboard_arrow_down</i><?php
														} else if (isset($_GET['sort_reminderFop_fints_buchungForderungen']) && $_GET['sort_reminderFop_fints_buchungForderungen'] == 'bdate DESC') {
															?><i class='material-icons fop-small'>keyboard_arrow_up</i><?php
														}
														if (isset($_GET['range_min_reminderFop_fints_buchungForderungen_bdate']) || isset($_GET['range_max_reminderFop_fints_buchungForderungen_bdate']) || isset($_GET['deps_reminderFop_fints_buchungForderungen_bdate']) || isset($_GET['fullsearch_reminderFop_fints_buchungForderungen_bdate']) || isset($_GET['dynamic_reminderFop_fints_buchungForderungen_bdate']) || isset($_GET['search_reminderFop_fints_buchungForderungen_bdate']) || isset($_GET['searchnot_reminderFop_fints_buchungForderungen_bdate']) || isset($_GET['filter_reminderFop_fints_buchungForderungen_bdate'])) {
															// filter indicator
															?><i class='material-icons fop-small'>filter_list</i><?php
														}
														// search indicator
														?><i class='material-icons fop-small'>search</i>
													</span>
												<div class='fop-column-handle'></div>
											</div><?php
											$columns['bdate']['header'] = ob_get_contents(); ob_end_clean();
											$columns['bdate']['render'] = function ($item) use (&$columns, $itemheight) {
												// Render-Callback für eine Zelle
												?><div class='fop-table-column'
													style='width: <?php echo intval($columns['bdate']['width']); ?>px; <?php if ($columns['bdate']['collapsed'] == 1) { echo ' display: none;'; } ?> height: <?php echo $itemheight; ?>px; ' data-column='bdate'><span class='overflow-text' title="<?php echo htmlentities(($item['bdate']) ? strftime(_('dateformat_php2'), intval($item['bdate'])) : ''); ?>"><?php echo htmlentities(($item['bdate']) ? strftime(_('dateformat_php2'), intval($item['bdate'])) : ''); ?></span></div><?php
											};
											$columns['bdate']['renderSum'] = function ($item) use (&$columns) {
												// Render-Callback Summe
												?><div class='fop-table-column fop-table-column-aggregate'
													data-column='bdate'
													data-order='<?php echo intval($columns['bdate']['order']); ?>'
													data-width='<?php echo intval($columns['bdate']['width']); ?>'
													data-collapsed='<?php echo intval($columns['bdate']['collapsed']); ?>'
													style='width: <?php echo intval($columns['bdate']['width']); ?>px; <?php if ($columns['bdate']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
													</div><?php
											};
										}
										
									
										
										if(true){
											ob_start();
											?><div class="fop-table-column overlay"
												data-column='date'
												data-order='<?php echo intval($columns['date']['order']); ?>'
												data-width='<?php echo intval($columns['date']['width']); ?>'
												data-collapsed='<?php echo intval($columns['date']['collapsed']); ?>'
												style='width: <?php echo intval($columns['date']['width']); ?>px; <?php if ($columns['date']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
												<span class='title' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadreminderFop_fints_buchungForderungen(); 
		}}, 600);
		date_filter(win, 'reminderFop_fints_buchungForderungen', 'date', <?php echo htmlentities(json_encode(_('period'))); ?>, <?php echo htmlentities(json_encode(\FOP\I18n::getShortLocale())); ?>, <?php echo htmlentities(json_encode(_('dateformat_moment'))); ?>, function() { reloadreminderFop_fints_buchungForderungen();  reloadreminderFop_fints_buchungForderungen(); });
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_reminderFop_fints_buchungForderungen'] == 'date ASC') {
			query['sort_reminderFop_fints_buchungForderungen'] = 'date DESC';
		 } else if (query['sort_reminderFop_fints_buchungForderungen'] == 'date DESC') {
		 	delete query['sort_reminderFop_fints_buchungForderungen'];
		 } else {
			query['sort_reminderFop_fints_buchungForderungen'] = 'date ASC';
		 }
		 reloadreminderFop_fints_buchungForderungen();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	">
													<span class='title-title' title='<?php echo(_('Wertstellungsdatum')); ?>'><?php echo(_('Wertstellungsdatum')); ?></span>
													<?php // sort indicator
														if (isset($_GET['sort_reminderFop_fints_buchungForderungen']) && $_GET['sort_reminderFop_fints_buchungForderungen'] == 'date ASC') {
															?><i class='material-icons fop-small'>keyboard_arrow_down</i><?php
														} else if (isset($_GET['sort_reminderFop_fints_buchungForderungen']) && $_GET['sort_reminderFop_fints_buchungForderungen'] == 'date DESC') {
															?><i class='material-icons fop-small'>keyboard_arrow_up</i><?php
														}
														if (isset($_GET['range_min_reminderFop_fints_buchungForderungen_date']) || isset($_GET['range_max_reminderFop_fints_buchungForderungen_date']) || isset($_GET['deps_reminderFop_fints_buchungForderungen_date']) || isset($_GET['fullsearch_reminderFop_fints_buchungForderungen_date']) || isset($_GET['dynamic_reminderFop_fints_buchungForderungen_date']) || isset($_GET['search_reminderFop_fints_buchungForderungen_date']) || isset($_GET['searchnot_reminderFop_fints_buchungForderungen_date']) || isset($_GET['filter_reminderFop_fints_buchungForderungen_date'])) {
															// filter indicator
															?><i class='material-icons fop-small'>filter_list</i><?php
														}
														// search indicator
														?><i class='material-icons fop-small'>search</i>
													</span>
												<div class='fop-column-handle'></div>
											</div><?php
											$columns['date']['header'] = ob_get_contents(); ob_end_clean();
											$columns['date']['render'] = function ($item) use (&$columns, $itemheight) {
												// Render-Callback für eine Zelle
												?><div class='fop-table-column'
													style='width: <?php echo intval($columns['date']['width']); ?>px; <?php if ($columns['date']['collapsed'] == 1) { echo ' display: none;'; } ?> height: <?php echo $itemheight; ?>px; ' data-column='date'><span class='overflow-text' title="<?php echo htmlentities(($item['date']) ? strftime(_('dateformat_php2'), intval($item['date'])) : ''); ?>"><?php echo htmlentities(($item['date']) ? strftime(_('dateformat_php2'), intval($item['date'])) : ''); ?></span></div><?php
											};
											$columns['date']['renderSum'] = function ($item) use (&$columns) {
												// Render-Callback Summe
												?><div class='fop-table-column fop-table-column-aggregate'
													data-column='date'
													data-order='<?php echo intval($columns['date']['order']); ?>'
													data-width='<?php echo intval($columns['date']['width']); ?>'
													data-collapsed='<?php echo intval($columns['date']['collapsed']); ?>'
													style='width: <?php echo intval($columns['date']['width']); ?>px; <?php if ($columns['date']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
													</div><?php
											};
										}
										
									
										
										if(true){
											ob_start();
											?><div class="fop-table-column overlay"
												data-column='betrag'
												data-order='<?php echo intval($columns['betrag']['order']); ?>'
												data-width='<?php echo intval($columns['betrag']['width']); ?>'
												data-collapsed='<?php echo intval($columns['betrag']['collapsed']); ?>'
												style='width: <?php echo intval($columns['betrag']['width']); ?>px; <?php if ($columns['betrag']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
												<span class='title' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadreminderFop_fints_buchungForderungen(); 
		}});
		var von, bis; win.append('<div class=\'fop-floatsorter\'>' + window.i18n_von + '</div>').append(von = $('<input type=\'number\' step=\'any\'><br>').val(query['range_min_reminderFop_fints_buchungForderungen_betrag']).on('change keyup paste', function () { query['range_min_reminderFop_fints_buchungForderungen_betrag'] = von.val(); delete query['page_reminderFop_fints_buchungForderungen']; changed = true; }))
.append('<div>' + window.i18n_bis + '</div>').append(bis = $('<input type=\'number\' step=\'any\'>').val(query['range_max_reminderFop_fints_buchungForderungen_betrag']).on('change keyup paste', function () { query['range_max_reminderFop_fints_buchungForderungen_betrag'] = bis.val(); delete query['page_reminderFop_fints_buchungForderungen']; changed = true; }))
; von.focus(); von.select();
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_reminderFop_fints_buchungForderungen'] == 'betrag ASC') {
			query['sort_reminderFop_fints_buchungForderungen'] = 'betrag DESC';
		 } else if (query['sort_reminderFop_fints_buchungForderungen'] == 'betrag DESC') {
		 	delete query['sort_reminderFop_fints_buchungForderungen'];
		 } else {
			query['sort_reminderFop_fints_buchungForderungen'] = 'betrag ASC';
		 }
		 reloadreminderFop_fints_buchungForderungen();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	" style='text-align: right;'>
													<span class='title-title' title='<?php echo(_('Betrag')); ?>'><?php echo(_('Betrag')); ?></span>
													<?php // sort indicator
														if (isset($_GET['sort_reminderFop_fints_buchungForderungen']) && $_GET['sort_reminderFop_fints_buchungForderungen'] == 'betrag ASC') {
															?><i class='material-icons fop-small'>keyboard_arrow_down</i><?php
														} else if (isset($_GET['sort_reminderFop_fints_buchungForderungen']) && $_GET['sort_reminderFop_fints_buchungForderungen'] == 'betrag DESC') {
															?><i class='material-icons fop-small'>keyboard_arrow_up</i><?php
														}
														if (isset($_GET['range_min_reminderFop_fints_buchungForderungen_betrag']) || isset($_GET['range_max_reminderFop_fints_buchungForderungen_betrag']) || isset($_GET['deps_reminderFop_fints_buchungForderungen_betrag']) || isset($_GET['fullsearch_reminderFop_fints_buchungForderungen_betrag']) || isset($_GET['dynamic_reminderFop_fints_buchungForderungen_betrag']) || isset($_GET['search_reminderFop_fints_buchungForderungen_betrag']) || isset($_GET['searchnot_reminderFop_fints_buchungForderungen_betrag']) || isset($_GET['filter_reminderFop_fints_buchungForderungen_betrag'])) {
															// filter indicator
															?><i class='material-icons fop-small'>filter_list</i><?php
														}
														// search indicator
														?><i class='material-icons fop-small'>search</i>
													</span>
												<div class='fop-column-handle'></div>
											</div><?php
											$columns['betrag']['header'] = ob_get_contents(); ob_end_clean();
											$columns['betrag']['render'] = function ($item) use (&$columns, $itemheight) {
												// Render-Callback für eine Zelle
												?><div class='fop-table-column'
													style='width: <?php echo intval($columns['betrag']['width']); ?>px; <?php if ($columns['betrag']['collapsed'] == 1) { echo ' display: none;'; } ?> height: <?php echo $itemheight; ?>px; ' data-column='betrag'><span style="white-space: nowrap; width: 100%; display: inline-block; text-align: right;"><?php echo htmlentities(\Types\Euro::print($item['betrag'])); ?><?php echo '&nbsp;' .  htmlentities('€'); ?>
	</span></div><?php
											};
											$columns['betrag']['renderSum'] = function ($item) use (&$columns) {
												// Render-Callback Summe
												?><div class='fop-table-column fop-table-column-aggregate'
													data-column='betrag'
													data-order='<?php echo intval($columns['betrag']['order']); ?>'
													data-width='<?php echo intval($columns['betrag']['width']); ?>'
													data-collapsed='<?php echo intval($columns['betrag']['collapsed']); ?>'
													style='width: <?php echo intval($columns['betrag']['width']); ?>px; <?php if ($columns['betrag']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
													<b><span style="white-space: nowrap; width: 100%; display: inline-block; text-align: right;"><?php echo htmlentities(\Types\Euro::print($item['betrag'])); ?><?php echo '&nbsp;' .  htmlentities('€'); ?>
	</span></b></div><?php
											};
										}
										
									
										
										if(true){
											ob_start();
											?><div class="fop-table-column overlay"
												data-column='saldo'
												data-order='<?php echo intval($columns['saldo']['order']); ?>'
												data-width='<?php echo intval($columns['saldo']['width']); ?>'
												data-collapsed='<?php echo intval($columns['saldo']['collapsed']); ?>'
												style='width: <?php echo intval($columns['saldo']['width']); ?>px; <?php if ($columns['saldo']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
												<span class='title' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadreminderFop_fints_buchungForderungen(); 
		}});
		var von, bis; win.append('<div class=\'fop-floatsorter\'>' + window.i18n_von + '</div>').append(von = $('<input type=\'number\' step=\'any\'><br>').val(query['range_min_reminderFop_fints_buchungForderungen_saldo']).on('change keyup paste', function () { query['range_min_reminderFop_fints_buchungForderungen_saldo'] = von.val(); delete query['page_reminderFop_fints_buchungForderungen']; changed = true; }))
.append('<div>' + window.i18n_bis + '</div>').append(bis = $('<input type=\'number\' step=\'any\'>').val(query['range_max_reminderFop_fints_buchungForderungen_saldo']).on('change keyup paste', function () { query['range_max_reminderFop_fints_buchungForderungen_saldo'] = bis.val(); delete query['page_reminderFop_fints_buchungForderungen']; changed = true; }))
; von.focus(); von.select();
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_reminderFop_fints_buchungForderungen'] == 'saldo ASC') {
			query['sort_reminderFop_fints_buchungForderungen'] = 'saldo DESC';
		 } else if (query['sort_reminderFop_fints_buchungForderungen'] == 'saldo DESC') {
		 	delete query['sort_reminderFop_fints_buchungForderungen'];
		 } else {
			query['sort_reminderFop_fints_buchungForderungen'] = 'saldo ASC';
		 }
		 reloadreminderFop_fints_buchungForderungen();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	" style='text-align: right;'>
													<span class='title-title' title='<?php echo(_('Saldo')); ?>'><?php echo(_('Saldo')); ?></span>
													<?php // sort indicator
														if (isset($_GET['sort_reminderFop_fints_buchungForderungen']) && $_GET['sort_reminderFop_fints_buchungForderungen'] == 'saldo ASC') {
															?><i class='material-icons fop-small'>keyboard_arrow_down</i><?php
														} else if (isset($_GET['sort_reminderFop_fints_buchungForderungen']) && $_GET['sort_reminderFop_fints_buchungForderungen'] == 'saldo DESC') {
															?><i class='material-icons fop-small'>keyboard_arrow_up</i><?php
														}
														if (isset($_GET['range_min_reminderFop_fints_buchungForderungen_saldo']) || isset($_GET['range_max_reminderFop_fints_buchungForderungen_saldo']) || isset($_GET['deps_reminderFop_fints_buchungForderungen_saldo']) || isset($_GET['fullsearch_reminderFop_fints_buchungForderungen_saldo']) || isset($_GET['dynamic_reminderFop_fints_buchungForderungen_saldo']) || isset($_GET['search_reminderFop_fints_buchungForderungen_saldo']) || isset($_GET['searchnot_reminderFop_fints_buchungForderungen_saldo']) || isset($_GET['filter_reminderFop_fints_buchungForderungen_saldo'])) {
															// filter indicator
															?><i class='material-icons fop-small'>filter_list</i><?php
														}
														// search indicator
														?><i class='material-icons fop-small'>search</i>
													</span>
												<div class='fop-column-handle'></div>
											</div><?php
											$columns['saldo']['header'] = ob_get_contents(); ob_end_clean();
											$columns['saldo']['render'] = function ($item) use (&$columns, $itemheight) {
												// Render-Callback für eine Zelle
												?><div class='fop-table-column'
													style='width: <?php echo intval($columns['saldo']['width']); ?>px; <?php if ($columns['saldo']['collapsed'] == 1) { echo ' display: none;'; } ?> height: <?php echo $itemheight; ?>px; ' data-column='saldo'><span style="white-space: nowrap; width: 100%; display: inline-block; text-align: right;"><?php echo htmlentities(\Types\Euro::print($item['saldo'])); ?><?php echo '&nbsp;' .  htmlentities('€'); ?>
	</span></div><?php
											};
											$columns['saldo']['renderSum'] = function ($item) use (&$columns) {
												// Render-Callback Summe
												?><div class='fop-table-column fop-table-column-aggregate'
													data-column='saldo'
													data-order='<?php echo intval($columns['saldo']['order']); ?>'
													data-width='<?php echo intval($columns['saldo']['width']); ?>'
													data-collapsed='<?php echo intval($columns['saldo']['collapsed']); ?>'
													style='width: <?php echo intval($columns['saldo']['width']); ?>px; <?php if ($columns['saldo']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
													</div><?php
											};
										}
										
									
										
										if(true){
											ob_start();
											?><div class="fop-table-column overlay"
												data-column='iban'
												data-order='<?php echo intval($columns['iban']['order']); ?>'
												data-width='<?php echo intval($columns['iban']['width']); ?>'
												data-collapsed='<?php echo intval($columns['iban']['collapsed']); ?>'
												style='width: <?php echo intval($columns['iban']['width']); ?>px; <?php if ($columns['iban']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
												<span class='title' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadreminderFop_fints_buchungForderungen(); 
		}});
		
		var el = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label fop-floatsorter\' style=\'width: calc(100% - 42px);\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(_('search')); ?></label></div>');
		win.append(el);
		var text = el.find('input');
		text.val(query['search_reminderFop_fints_buchungForderungen_iban'])
		text.on('change keyup paste', function () { if (text.val()) { query['search_reminderFop_fints_buchungForderungen_iban'] = text.val(); } else { delete query['search_reminderFop_fints_buchungForderungen_iban']; } changed = true; });
		text.focus();
		text.select();
		text.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_reminderFop_fints_buchungForderungen').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});

		var el2 = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(htmlentities(htmlentities(_('filter_contains_not')))); ?></label></div>');
		win.append(el2);
		var text2 = el2.find('input');
		text2.val(query['searchnot_reminderFop_fints_buchungForderungen_iban'])
		text2.on('change keyup paste', function () { if (text2.val()) { query['searchnot_reminderFop_fints_buchungForderungen_iban'] = text2.val(); } else { delete query['searchnot_reminderFop_fints_buchungForderungen_iban']; } changed = true; });
		text2.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_reminderFop_fints_buchungForderungen').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});
	
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_reminderFop_fints_buchungForderungen'] == 'iban ASC') {
			query['sort_reminderFop_fints_buchungForderungen'] = 'iban DESC';
		 } else if (query['sort_reminderFop_fints_buchungForderungen'] == 'iban DESC') {
		 	delete query['sort_reminderFop_fints_buchungForderungen'];
		 } else {
			query['sort_reminderFop_fints_buchungForderungen'] = 'iban ASC';
		 }
		 reloadreminderFop_fints_buchungForderungen();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	">
													<span class='title-title' title='<?php echo(_('IBAN')); ?>'><?php echo(_('IBAN')); ?></span>
													<?php // sort indicator
														if (isset($_GET['sort_reminderFop_fints_buchungForderungen']) && $_GET['sort_reminderFop_fints_buchungForderungen'] == 'iban ASC') {
															?><i class='material-icons fop-small'>keyboard_arrow_down</i><?php
														} else if (isset($_GET['sort_reminderFop_fints_buchungForderungen']) && $_GET['sort_reminderFop_fints_buchungForderungen'] == 'iban DESC') {
															?><i class='material-icons fop-small'>keyboard_arrow_up</i><?php
														}
														if (isset($_GET['range_min_reminderFop_fints_buchungForderungen_iban']) || isset($_GET['range_max_reminderFop_fints_buchungForderungen_iban']) || isset($_GET['deps_reminderFop_fints_buchungForderungen_iban']) || isset($_GET['fullsearch_reminderFop_fints_buchungForderungen_iban']) || isset($_GET['dynamic_reminderFop_fints_buchungForderungen_iban']) || isset($_GET['search_reminderFop_fints_buchungForderungen_iban']) || isset($_GET['searchnot_reminderFop_fints_buchungForderungen_iban']) || isset($_GET['filter_reminderFop_fints_buchungForderungen_iban'])) {
															// filter indicator
															?><i class='material-icons fop-small'>filter_list</i><?php
														}
														// search indicator
														?><i class='material-icons fop-small'>search</i>
													</span>
												<div class='fop-column-handle'></div>
											</div><?php
											$columns['iban']['header'] = ob_get_contents(); ob_end_clean();
											$columns['iban']['render'] = function ($item) use (&$columns, $itemheight) {
												// Render-Callback für eine Zelle
												?><div class='fop-table-column'
													style='width: <?php echo intval($columns['iban']['width']); ?>px; <?php if ($columns['iban']['collapsed'] == 1) { echo ' display: none;'; } ?> height: <?php echo $itemheight; ?>px; ' data-column='iban'><span class='overflow-text' title="<?php echo htmlentities($item['iban']); ?>"><?php echo htmlentities($item['iban']); ?></span></div><?php
											};
											$columns['iban']['renderSum'] = function ($item) use (&$columns) {
												// Render-Callback Summe
												?><div class='fop-table-column fop-table-column-aggregate'
													data-column='iban'
													data-order='<?php echo intval($columns['iban']['order']); ?>'
													data-width='<?php echo intval($columns['iban']['width']); ?>'
													data-collapsed='<?php echo intval($columns['iban']['collapsed']); ?>'
													style='width: <?php echo intval($columns['iban']['width']); ?>px; <?php if ($columns['iban']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
													</div><?php
											};
										}
										
									
										
										if(true){
											ob_start();
											?><div class="fop-table-column overlay"
												data-column='name_firma'
												data-order='<?php echo intval($columns['name_firma']['order']); ?>'
												data-width='<?php echo intval($columns['name_firma']['width']); ?>'
												data-collapsed='<?php echo intval($columns['name_firma']['collapsed']); ?>'
												style='width: <?php echo intval($columns['name_firma']['width']); ?>px; <?php if ($columns['name_firma']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
												<span class='title' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadreminderFop_fints_buchungForderungen(); 
		}});
		
		var el = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label fop-floatsorter\' style=\'width: calc(100% - 42px);\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(_('search')); ?></label></div>');
		win.append(el);
		var text = el.find('input');
		text.val(query['search_reminderFop_fints_buchungForderungen_name_firma'])
		text.on('change keyup paste', function () { if (text.val()) { query['search_reminderFop_fints_buchungForderungen_name_firma'] = text.val(); } else { delete query['search_reminderFop_fints_buchungForderungen_name_firma']; } changed = true; });
		text.focus();
		text.select();
		text.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_reminderFop_fints_buchungForderungen').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});

		var el2 = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(htmlentities(htmlentities(_('filter_contains_not')))); ?></label></div>');
		win.append(el2);
		var text2 = el2.find('input');
		text2.val(query['searchnot_reminderFop_fints_buchungForderungen_name_firma'])
		text2.on('change keyup paste', function () { if (text2.val()) { query['searchnot_reminderFop_fints_buchungForderungen_name_firma'] = text2.val(); } else { delete query['searchnot_reminderFop_fints_buchungForderungen_name_firma']; } changed = true; });
		text2.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_reminderFop_fints_buchungForderungen').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});
	
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_reminderFop_fints_buchungForderungen'] == 'name_firma ASC') {
			query['sort_reminderFop_fints_buchungForderungen'] = 'name_firma DESC';
		 } else if (query['sort_reminderFop_fints_buchungForderungen'] == 'name_firma DESC') {
		 	delete query['sort_reminderFop_fints_buchungForderungen'];
		 } else {
			query['sort_reminderFop_fints_buchungForderungen'] = 'name_firma ASC';
		 }
		 reloadreminderFop_fints_buchungForderungen();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	">
													<span class='title-title' title='<?php echo(_('Name, Vorname/Firma')); ?>'><?php echo(_('Name, Vorname/Firma')); ?></span>
													<?php // sort indicator
														if (isset($_GET['sort_reminderFop_fints_buchungForderungen']) && $_GET['sort_reminderFop_fints_buchungForderungen'] == 'name_firma ASC') {
															?><i class='material-icons fop-small'>keyboard_arrow_down</i><?php
														} else if (isset($_GET['sort_reminderFop_fints_buchungForderungen']) && $_GET['sort_reminderFop_fints_buchungForderungen'] == 'name_firma DESC') {
															?><i class='material-icons fop-small'>keyboard_arrow_up</i><?php
														}
														if (isset($_GET['range_min_reminderFop_fints_buchungForderungen_name_firma']) || isset($_GET['range_max_reminderFop_fints_buchungForderungen_name_firma']) || isset($_GET['deps_reminderFop_fints_buchungForderungen_name_firma']) || isset($_GET['fullsearch_reminderFop_fints_buchungForderungen_name_firma']) || isset($_GET['dynamic_reminderFop_fints_buchungForderungen_name_firma']) || isset($_GET['search_reminderFop_fints_buchungForderungen_name_firma']) || isset($_GET['searchnot_reminderFop_fints_buchungForderungen_name_firma']) || isset($_GET['filter_reminderFop_fints_buchungForderungen_name_firma'])) {
															// filter indicator
															?><i class='material-icons fop-small'>filter_list</i><?php
														}
														// search indicator
														?><i class='material-icons fop-small'>search</i>
													</span>
												<div class='fop-column-handle'></div>
											</div><?php
											$columns['name_firma']['header'] = ob_get_contents(); ob_end_clean();
											$columns['name_firma']['render'] = function ($item) use (&$columns, $itemheight) {
												// Render-Callback für eine Zelle
												?><div class='fop-table-column'
													style='width: <?php echo intval($columns['name_firma']['width']); ?>px; <?php if ($columns['name_firma']['collapsed'] == 1) { echo ' display: none;'; } ?> height: <?php echo $itemheight; ?>px; ' data-column='name_firma'><span class='overflow-text' title="<?php echo htmlentities($item['name_firma']); ?>"><?php echo htmlentities($item['name_firma']); ?></span></div><?php
											};
											$columns['name_firma']['renderSum'] = function ($item) use (&$columns) {
												// Render-Callback Summe
												?><div class='fop-table-column fop-table-column-aggregate'
													data-column='name_firma'
													data-order='<?php echo intval($columns['name_firma']['order']); ?>'
													data-width='<?php echo intval($columns['name_firma']['width']); ?>'
													data-collapsed='<?php echo intval($columns['name_firma']['collapsed']); ?>'
													style='width: <?php echo intval($columns['name_firma']['width']); ?>px; <?php if ($columns['name_firma']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
													</div><?php
											};
										}
										
									
										
										if(true){
											ob_start();
											?><div class="fop-table-column overlay"
												data-column='vzweck'
												data-order='<?php echo intval($columns['vzweck']['order']); ?>'
												data-width='<?php echo intval($columns['vzweck']['width']); ?>'
												data-collapsed='<?php echo intval($columns['vzweck']['collapsed']); ?>'
												style='width: <?php echo intval($columns['vzweck']['width']); ?>px; <?php if ($columns['vzweck']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
												<span class='title' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadreminderFop_fints_buchungForderungen(); 
		}});
		
		var el = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label fop-floatsorter\' style=\'width: calc(100% - 42px);\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(_('search')); ?></label></div>');
		win.append(el);
		var text = el.find('input');
		text.val(query['search_reminderFop_fints_buchungForderungen_vzweck'])
		text.on('change keyup paste', function () { if (text.val()) { query['search_reminderFop_fints_buchungForderungen_vzweck'] = text.val(); } else { delete query['search_reminderFop_fints_buchungForderungen_vzweck']; } changed = true; });
		text.focus();
		text.select();
		text.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_reminderFop_fints_buchungForderungen').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});

		var el2 = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(htmlentities(htmlentities(_('filter_contains_not')))); ?></label></div>');
		win.append(el2);
		var text2 = el2.find('input');
		text2.val(query['searchnot_reminderFop_fints_buchungForderungen_vzweck'])
		text2.on('change keyup paste', function () { if (text2.val()) { query['searchnot_reminderFop_fints_buchungForderungen_vzweck'] = text2.val(); } else { delete query['searchnot_reminderFop_fints_buchungForderungen_vzweck']; } changed = true; });
		text2.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_reminderFop_fints_buchungForderungen').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});
	
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_reminderFop_fints_buchungForderungen'] == 'vzweck ASC') {
			query['sort_reminderFop_fints_buchungForderungen'] = 'vzweck DESC';
		 } else if (query['sort_reminderFop_fints_buchungForderungen'] == 'vzweck DESC') {
		 	delete query['sort_reminderFop_fints_buchungForderungen'];
		 } else {
			query['sort_reminderFop_fints_buchungForderungen'] = 'vzweck ASC';
		 }
		 reloadreminderFop_fints_buchungForderungen();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	">
													<span class='title-title' title='<?php echo(_('Verwendungszweck')); ?>'><?php echo(_('Verwendungszweck')); ?></span>
													<?php // sort indicator
														if (isset($_GET['sort_reminderFop_fints_buchungForderungen']) && $_GET['sort_reminderFop_fints_buchungForderungen'] == 'vzweck ASC') {
															?><i class='material-icons fop-small'>keyboard_arrow_down</i><?php
														} else if (isset($_GET['sort_reminderFop_fints_buchungForderungen']) && $_GET['sort_reminderFop_fints_buchungForderungen'] == 'vzweck DESC') {
															?><i class='material-icons fop-small'>keyboard_arrow_up</i><?php
														}
														if (isset($_GET['range_min_reminderFop_fints_buchungForderungen_vzweck']) || isset($_GET['range_max_reminderFop_fints_buchungForderungen_vzweck']) || isset($_GET['deps_reminderFop_fints_buchungForderungen_vzweck']) || isset($_GET['fullsearch_reminderFop_fints_buchungForderungen_vzweck']) || isset($_GET['dynamic_reminderFop_fints_buchungForderungen_vzweck']) || isset($_GET['search_reminderFop_fints_buchungForderungen_vzweck']) || isset($_GET['searchnot_reminderFop_fints_buchungForderungen_vzweck']) || isset($_GET['filter_reminderFop_fints_buchungForderungen_vzweck'])) {
															// filter indicator
															?><i class='material-icons fop-small'>filter_list</i><?php
														}
														// search indicator
														?><i class='material-icons fop-small'>search</i>
													</span>
												<div class='fop-column-handle'></div>
											</div><?php
											$columns['vzweck']['header'] = ob_get_contents(); ob_end_clean();
											$columns['vzweck']['render'] = function ($item) use (&$columns, $itemheight) {
												// Render-Callback für eine Zelle
												?><div class='fop-table-column'
													style='width: <?php echo intval($columns['vzweck']['width']); ?>px; <?php if ($columns['vzweck']['collapsed'] == 1) { echo ' display: none;'; } ?> height: <?php echo $itemheight; ?>px; ' data-column='vzweck'><span class='overflow-text' title="<?php echo htmlentities($item['vzweck']); ?>"><?php echo htmlentities($item['vzweck']); ?></span></div><?php
											};
											$columns['vzweck']['renderSum'] = function ($item) use (&$columns) {
												// Render-Callback Summe
												?><div class='fop-table-column fop-table-column-aggregate'
													data-column='vzweck'
													data-order='<?php echo intval($columns['vzweck']['order']); ?>'
													data-width='<?php echo intval($columns['vzweck']['width']); ?>'
													data-collapsed='<?php echo intval($columns['vzweck']['collapsed']); ?>'
													style='width: <?php echo intval($columns['vzweck']['width']); ?>px; <?php if ($columns['vzweck']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
													</div><?php
											};
										}
										
									
										
										if(true){
											ob_start();
											?><div class="fop-table-column overlay"
												data-column='endtoend'
												data-order='<?php echo intval($columns['endtoend']['order']); ?>'
												data-width='<?php echo intval($columns['endtoend']['width']); ?>'
												data-collapsed='<?php echo intval($columns['endtoend']['collapsed']); ?>'
												style='width: <?php echo intval($columns['endtoend']['width']); ?>px; <?php if ($columns['endtoend']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
												<span class='title' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadreminderFop_fints_buchungForderungen(); 
		}});
		
		var el = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label fop-floatsorter\' style=\'width: calc(100% - 42px);\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(_('search')); ?></label></div>');
		win.append(el);
		var text = el.find('input');
		text.val(query['search_reminderFop_fints_buchungForderungen_endtoend'])
		text.on('change keyup paste', function () { if (text.val()) { query['search_reminderFop_fints_buchungForderungen_endtoend'] = text.val(); } else { delete query['search_reminderFop_fints_buchungForderungen_endtoend']; } changed = true; });
		text.focus();
		text.select();
		text.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_reminderFop_fints_buchungForderungen').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});

		var el2 = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(htmlentities(htmlentities(_('filter_contains_not')))); ?></label></div>');
		win.append(el2);
		var text2 = el2.find('input');
		text2.val(query['searchnot_reminderFop_fints_buchungForderungen_endtoend'])
		text2.on('change keyup paste', function () { if (text2.val()) { query['searchnot_reminderFop_fints_buchungForderungen_endtoend'] = text2.val(); } else { delete query['searchnot_reminderFop_fints_buchungForderungen_endtoend']; } changed = true; });
		text2.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_reminderFop_fints_buchungForderungen').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});
	
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_reminderFop_fints_buchungForderungen'] == 'endtoend ASC') {
			query['sort_reminderFop_fints_buchungForderungen'] = 'endtoend DESC';
		 } else if (query['sort_reminderFop_fints_buchungForderungen'] == 'endtoend DESC') {
		 	delete query['sort_reminderFop_fints_buchungForderungen'];
		 } else {
			query['sort_reminderFop_fints_buchungForderungen'] = 'endtoend ASC';
		 }
		 reloadreminderFop_fints_buchungForderungen();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	">
													<span class='title-title' title='<?php echo(_('End to End-Referenz')); ?>'><?php echo(_('End to End-Referenz')); ?></span>
													<?php // sort indicator
														if (isset($_GET['sort_reminderFop_fints_buchungForderungen']) && $_GET['sort_reminderFop_fints_buchungForderungen'] == 'endtoend ASC') {
															?><i class='material-icons fop-small'>keyboard_arrow_down</i><?php
														} else if (isset($_GET['sort_reminderFop_fints_buchungForderungen']) && $_GET['sort_reminderFop_fints_buchungForderungen'] == 'endtoend DESC') {
															?><i class='material-icons fop-small'>keyboard_arrow_up</i><?php
														}
														if (isset($_GET['range_min_reminderFop_fints_buchungForderungen_endtoend']) || isset($_GET['range_max_reminderFop_fints_buchungForderungen_endtoend']) || isset($_GET['deps_reminderFop_fints_buchungForderungen_endtoend']) || isset($_GET['fullsearch_reminderFop_fints_buchungForderungen_endtoend']) || isset($_GET['dynamic_reminderFop_fints_buchungForderungen_endtoend']) || isset($_GET['search_reminderFop_fints_buchungForderungen_endtoend']) || isset($_GET['searchnot_reminderFop_fints_buchungForderungen_endtoend']) || isset($_GET['filter_reminderFop_fints_buchungForderungen_endtoend'])) {
															// filter indicator
															?><i class='material-icons fop-small'>filter_list</i><?php
														}
														// search indicator
														?><i class='material-icons fop-small'>search</i>
													</span>
												<div class='fop-column-handle'></div>
											</div><?php
											$columns['endtoend']['header'] = ob_get_contents(); ob_end_clean();
											$columns['endtoend']['render'] = function ($item) use (&$columns, $itemheight) {
												// Render-Callback für eine Zelle
												?><div class='fop-table-column'
													style='width: <?php echo intval($columns['endtoend']['width']); ?>px; <?php if ($columns['endtoend']['collapsed'] == 1) { echo ' display: none;'; } ?> height: <?php echo $itemheight; ?>px; ' data-column='endtoend'><span class='overflow-text' title="<?php echo htmlentities($item['endtoend']); ?>"><?php echo htmlentities($item['endtoend']); ?></span></div><?php
											};
											$columns['endtoend']['renderSum'] = function ($item) use (&$columns) {
												// Render-Callback Summe
												?><div class='fop-table-column fop-table-column-aggregate'
													data-column='endtoend'
													data-order='<?php echo intval($columns['endtoend']['order']); ?>'
													data-width='<?php echo intval($columns['endtoend']['width']); ?>'
													data-collapsed='<?php echo intval($columns['endtoend']['collapsed']); ?>'
													style='width: <?php echo intval($columns['endtoend']['width']); ?>px; <?php if ($columns['endtoend']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
													</div><?php
											};
										}
										
									
										
										if(true){
											ob_start();
											?><div class="fop-table-column overlay"
												data-column='umsatzart'
												data-order='<?php echo intval($columns['umsatzart']['order']); ?>'
												data-width='<?php echo intval($columns['umsatzart']['width']); ?>'
												data-collapsed='<?php echo intval($columns['umsatzart']['collapsed']); ?>'
												style='width: <?php echo intval($columns['umsatzart']['width']); ?>px; <?php if ($columns['umsatzart']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
												<span class='title' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadreminderFop_fints_buchungForderungen(); 
		}});
		
		var el = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label fop-floatsorter\' style=\'width: calc(100% - 42px);\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(_('search')); ?></label></div>');
		win.append(el);
		var text = el.find('input');
		text.val(query['search_reminderFop_fints_buchungForderungen_umsatzart'])
		text.on('change keyup paste', function () { if (text.val()) { query['search_reminderFop_fints_buchungForderungen_umsatzart'] = text.val(); } else { delete query['search_reminderFop_fints_buchungForderungen_umsatzart']; } changed = true; });
		text.focus();
		text.select();
		text.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_reminderFop_fints_buchungForderungen').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});

		var el2 = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(htmlentities(htmlentities(_('filter_contains_not')))); ?></label></div>');
		win.append(el2);
		var text2 = el2.find('input');
		text2.val(query['searchnot_reminderFop_fints_buchungForderungen_umsatzart'])
		text2.on('change keyup paste', function () { if (text2.val()) { query['searchnot_reminderFop_fints_buchungForderungen_umsatzart'] = text2.val(); } else { delete query['searchnot_reminderFop_fints_buchungForderungen_umsatzart']; } changed = true; });
		text2.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_reminderFop_fints_buchungForderungen').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});
	
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_reminderFop_fints_buchungForderungen'] == 'umsatzart ASC') {
			query['sort_reminderFop_fints_buchungForderungen'] = 'umsatzart DESC';
		 } else if (query['sort_reminderFop_fints_buchungForderungen'] == 'umsatzart DESC') {
		 	delete query['sort_reminderFop_fints_buchungForderungen'];
		 } else {
			query['sort_reminderFop_fints_buchungForderungen'] = 'umsatzart ASC';
		 }
		 reloadreminderFop_fints_buchungForderungen();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	">
													<span class='title-title' title='<?php echo(_('Umsatzart')); ?>'><?php echo(_('Umsatzart')); ?></span>
													<?php // sort indicator
														if (isset($_GET['sort_reminderFop_fints_buchungForderungen']) && $_GET['sort_reminderFop_fints_buchungForderungen'] == 'umsatzart ASC') {
															?><i class='material-icons fop-small'>keyboard_arrow_down</i><?php
														} else if (isset($_GET['sort_reminderFop_fints_buchungForderungen']) && $_GET['sort_reminderFop_fints_buchungForderungen'] == 'umsatzart DESC') {
															?><i class='material-icons fop-small'>keyboard_arrow_up</i><?php
														}
														if (isset($_GET['range_min_reminderFop_fints_buchungForderungen_umsatzart']) || isset($_GET['range_max_reminderFop_fints_buchungForderungen_umsatzart']) || isset($_GET['deps_reminderFop_fints_buchungForderungen_umsatzart']) || isset($_GET['fullsearch_reminderFop_fints_buchungForderungen_umsatzart']) || isset($_GET['dynamic_reminderFop_fints_buchungForderungen_umsatzart']) || isset($_GET['search_reminderFop_fints_buchungForderungen_umsatzart']) || isset($_GET['searchnot_reminderFop_fints_buchungForderungen_umsatzart']) || isset($_GET['filter_reminderFop_fints_buchungForderungen_umsatzart'])) {
															// filter indicator
															?><i class='material-icons fop-small'>filter_list</i><?php
														}
														// search indicator
														?><i class='material-icons fop-small'>search</i>
													</span>
												<div class='fop-column-handle'></div>
											</div><?php
											$columns['umsatzart']['header'] = ob_get_contents(); ob_end_clean();
											$columns['umsatzart']['render'] = function ($item) use (&$columns, $itemheight) {
												// Render-Callback für eine Zelle
												?><div class='fop-table-column'
													style='width: <?php echo intval($columns['umsatzart']['width']); ?>px; <?php if ($columns['umsatzart']['collapsed'] == 1) { echo ' display: none;'; } ?> height: <?php echo $itemheight; ?>px; ' data-column='umsatzart'><span class='overflow-text' title="<?php echo htmlentities($item['umsatzart']); ?>"><?php echo htmlentities($item['umsatzart']); ?></span></div><?php
											};
											$columns['umsatzart']['renderSum'] = function ($item) use (&$columns) {
												// Render-Callback Summe
												?><div class='fop-table-column fop-table-column-aggregate'
													data-column='umsatzart'
													data-order='<?php echo intval($columns['umsatzart']['order']); ?>'
													data-width='<?php echo intval($columns['umsatzart']['width']); ?>'
													data-collapsed='<?php echo intval($columns['umsatzart']['collapsed']); ?>'
													style='width: <?php echo intval($columns['umsatzart']['width']); ?>px; <?php if ($columns['umsatzart']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
													</div><?php
											};
										}
										
									
										
										if((false)){
											ob_start();
											?><div class="fop-table-column overlay"
												data-column='hash'
												data-order='<?php echo intval($columns['hash']['order']); ?>'
												data-width='<?php echo intval($columns['hash']['width']); ?>'
												data-collapsed='<?php echo intval($columns['hash']['collapsed']); ?>'
												style='width: <?php echo intval($columns['hash']['width']); ?>px; <?php if ($columns['hash']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
												<span class='title' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadreminderFop_fints_buchungForderungen(); 
		}});
		
		var el = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label fop-floatsorter\' style=\'width: calc(100% - 42px);\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(_('search')); ?></label></div>');
		win.append(el);
		var text = el.find('input');
		text.val(query['search_reminderFop_fints_buchungForderungen_hash'])
		text.on('change keyup paste', function () { if (text.val()) { query['search_reminderFop_fints_buchungForderungen_hash'] = text.val(); } else { delete query['search_reminderFop_fints_buchungForderungen_hash']; } changed = true; });
		text.focus();
		text.select();
		text.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_reminderFop_fints_buchungForderungen').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});

		var el2 = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(htmlentities(htmlentities(_('filter_contains_not')))); ?></label></div>');
		win.append(el2);
		var text2 = el2.find('input');
		text2.val(query['searchnot_reminderFop_fints_buchungForderungen_hash'])
		text2.on('change keyup paste', function () { if (text2.val()) { query['searchnot_reminderFop_fints_buchungForderungen_hash'] = text2.val(); } else { delete query['searchnot_reminderFop_fints_buchungForderungen_hash']; } changed = true; });
		text2.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_reminderFop_fints_buchungForderungen').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});
	
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_reminderFop_fints_buchungForderungen'] == 'hash ASC') {
			query['sort_reminderFop_fints_buchungForderungen'] = 'hash DESC';
		 } else if (query['sort_reminderFop_fints_buchungForderungen'] == 'hash DESC') {
		 	delete query['sort_reminderFop_fints_buchungForderungen'];
		 } else {
			query['sort_reminderFop_fints_buchungForderungen'] = 'hash ASC';
		 }
		 reloadreminderFop_fints_buchungForderungen();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	">
													<span class='title-title' title='<?php echo(_('Hashcode')); ?>'><?php echo(_('Hashcode')); ?></span>
													<?php // sort indicator
														if (isset($_GET['sort_reminderFop_fints_buchungForderungen']) && $_GET['sort_reminderFop_fints_buchungForderungen'] == 'hash ASC') {
															?><i class='material-icons fop-small'>keyboard_arrow_down</i><?php
														} else if (isset($_GET['sort_reminderFop_fints_buchungForderungen']) && $_GET['sort_reminderFop_fints_buchungForderungen'] == 'hash DESC') {
															?><i class='material-icons fop-small'>keyboard_arrow_up</i><?php
														}
														if (isset($_GET['range_min_reminderFop_fints_buchungForderungen_hash']) || isset($_GET['range_max_reminderFop_fints_buchungForderungen_hash']) || isset($_GET['deps_reminderFop_fints_buchungForderungen_hash']) || isset($_GET['fullsearch_reminderFop_fints_buchungForderungen_hash']) || isset($_GET['dynamic_reminderFop_fints_buchungForderungen_hash']) || isset($_GET['search_reminderFop_fints_buchungForderungen_hash']) || isset($_GET['searchnot_reminderFop_fints_buchungForderungen_hash']) || isset($_GET['filter_reminderFop_fints_buchungForderungen_hash'])) {
															// filter indicator
															?><i class='material-icons fop-small'>filter_list</i><?php
														}
														// search indicator
														?><i class='material-icons fop-small'>search</i>
													</span>
												<div class='fop-column-handle'></div>
											</div><?php
											$columns['hash']['header'] = ob_get_contents(); ob_end_clean();
											$columns['hash']['render'] = function ($item) use (&$columns, $itemheight) {
												// Render-Callback für eine Zelle
												?><div class='fop-table-column'
													style='width: <?php echo intval($columns['hash']['width']); ?>px; <?php if ($columns['hash']['collapsed'] == 1) { echo ' display: none;'; } ?> height: <?php echo $itemheight; ?>px; ' data-column='hash'><span class='overflow-text' title="<?php echo htmlentities($item['hash']); ?>"><?php echo htmlentities($item['hash']); ?></span></div><?php
											};
											$columns['hash']['renderSum'] = function ($item) use (&$columns) {
												// Render-Callback Summe
												?><div class='fop-table-column fop-table-column-aggregate'
													data-column='hash'
													data-order='<?php echo intval($columns['hash']['order']); ?>'
													data-width='<?php echo intval($columns['hash']['width']); ?>'
													data-collapsed='<?php echo intval($columns['hash']['collapsed']); ?>'
													style='width: <?php echo intval($columns['hash']['width']); ?>px; <?php if ($columns['hash']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
													</div><?php
											};
										}
										
									

									// sort by order
									uasort($columns, function ($a, $b) {
										return $a['order'] - $b['order'];
									});
									?>
									<style type='text/css'>
										#reminderFop_fints_buchungForderungen-table .fop-table-header {
											height: <?php echo 32; ?>px;
										}
										#reminderFop_fints_buchungForderungen-table .fop-table-header .fop-table-column .title,
										#reminderFop_fints_buchungForderungen-table .fop-column-handle,
										#reminderFop_fints_buchungForderungen-table .fop-table-row,
										#reminderFop_fints_buchungForderungen-table .fop-table-row .fop-table-column,
										#reminderFop_fints_buchungForderungen-table .fop-table-column-multicontrol,
										#reminderFop_fints_buchungForderungen-table .fop-filter-button {
											height: 32px;
											line-height: 32px;
										}
										</style>
											<div class="fop-table" data-table-id="reminderFop_fints_buchungForderungen">
											<div class="fop-legend"></div>
											<div class="fop-filter-string-wrapper"><div class="fop-filter-string"><label>Filter:</label> <span><?php echo self::getFilterHTML($_GET); ?></span></div></div>
											
											<?php if (isset($_GET['select'])) { echo '<br>'; } ?>
											<div class="fop-table-header">
											<?php if (!isset($_GET['select'])) { ?>
												<div class="fop-table-column noprint" style="width: <?php echo json_encode($firstColumnWidth); ?>px;">
													
													<div class="fop-table-column-multicontrol">
													<label class="mdl-checkbox mdl-js-checkbox"  style='width: auto;' for="reminderFop_fints_buchungForderungen__all-checkbox">
														<input class="mdl-checkbox__input" id="reminderFop_fints_buchungForderungen__all-checkbox" type="checkbox" onchange="checkreminderFop_fints_buchungForderungen('all', 'ID', this.checked);">
														</label>
														<button type="button" class="mdl-button mdl-js-button mdl-button--icon reminderFop_fints_buchungForderungen__mass-action" style='visibility: hidden;' onclick="$.get('DataView/ReminderFop_fints_buchungForderungen/permissions?id=' + checkreminderFop_fints_buchungForderungen(null, 'ID'), function (data) { for (var method in data) if (method != '__cnt') { var btn = $('[data-interaction-name=&quot;' + method + '&quot;]'); if (data[method] >= 1) btn.show(); else btn.hide(); btn.find('.cnt').text(data[method]); }; }); dropDownFixPosition($(this), $(this).next())">
															<i class="material-icons">more_vert</i>
														</button>
														<ul class="mdl-list mdl-card mdl-shadow--4dp fop-scroll-menu">
															<?php
		if(true) { ?>
			<span class="mdl-list__item mdl-button">
				<span class="mdl-list__item mdl-button" data-interaction-name="filterall" style="margin-right:auto; text-align:left;"
					onclick="for (key in query) if (key.indexOf('range_min_reminderFop_fints_buchungForderungen_') == 0 || key.indexOf('range_max_reminderFop_fints_buchungForderungen_') == 0 || key.indexOf('deps_reminderFop_fints_buchungForderungen_') == 0 || key.indexOf('fullsearch_reminderFop_fints_buchungForderungen_') == 0 || key.indexOf('dynamic_reminderFop_fints_buchungForderungen_') == 0 || key.indexOf('search_reminderFop_fints_buchungForderungen_') == 0 || key.indexOf('searchnot_reminderFop_fints_buchungForderungen_') == 0 || key.indexOf('filter_reminderFop_fints_buchungForderungen_') == 0) delete query[key]; reloadreminderFop_fints_buchungForderungen(); $(this).closest('.overlay').click(); return false;">
					<span style="float:left;"><i class="material-icons">list</i></span><span class="fop-menu-caption" title="<?php echo(_('view all elements')); ?>"><?php echo(_('view all elements')); ?> 
					</span>
				</span>
			</span>
		<?php } ?><?php
		if(true) { ?>
			<span class="mdl-list__item mdl-button">
				<span class="mdl-list__item mdl-button" data-interaction-name="filteronly" style="margin-right:auto; text-align:left;"
					onclick="query['filter_reminderFop_fints_buchungForderungen_ID'] = checkreminderFop_fints_buchungForderungen(null, 'ID'); delete query['page_reminderFop_fints_buchungForderungen']; reloadreminderFop_fints_buchungForderungen(); $(this).closest('.overlay').click(); return false;">
					<span style="float:left;"><i class="material-icons">arrow_forward</i></span><span class="fop-menu-caption" title="<?php echo(_('view only these elements')); ?>"><?php echo(_('view only these elements')); ?> (<span class='cnt'></span>)
					</span>
				</span>
			</span>
		<?php } ?><?php
		if(true) { ?>
			<span class="mdl-list__item mdl-button">
				<span class="mdl-list__item mdl-button" data-interaction-name="filterrange" style="margin-right:auto; text-align:left;"
					onclick="
		var ticks = new IDList(checkreminderFop_fints_buchungForderungen(null, 'ID'));
		var range = prompt('Bitte geben Sie den Bereich ein', '1-' + ticks.count());
		var newticks = new IDList();
		if (range) {
			range = range.split('-');
			if (range.length == 1) {
				range.push(range[0]);
			}
			var skip = (range[0] || 1) - 1;
			var take = (range[1] || Infinity) - skip;
			for (var item of ticks.all()) {
				if (skip > 0) {
					skip--;
				} else if (take > 0) {
					newticks.push(item);
					take--;
				} else break;
			}
			checkreminderFop_fints_buchungForderungen(newticks, 'ID', 'set');
		} $(this).closest('.overlay').click(); return false;">
					<span style="float:left;"><i class="material-icons">colorize</i></span><span class="fop-menu-caption" title="<?php echo(_('limit range')); ?>"><?php echo(_('limit range')); ?> (<span class='cnt'></span>)
					</span>
				</span>
			</span>
		<?php } ?><?php
		if(true && ((\FOP\User::getBuchhaltung()) && (\FOP\User::getBuchhaltung()))) { ?>
			<span class="mdl-list__item mdl-button">
				<span class="mdl-list__item mdl-button" data-interaction-name="forderung_ignore" style="margin-right:auto; text-align:left;"
					onclick="location.href = 'Tables/Fop_fints_buchung/ignoreForderung?ajax&from=<?php echo urlencode(\FOP\Util::getBackUrl()); ?>&ids=' + escape(checkreminderFop_fints_buchungForderungen(null, 'ID')); $(this).closest('.overlay').click(); return false;">
					<span style="float:left;"><i class="material-icons">visibility_off</i></span><span class="fop-menu-caption" title="<?php echo(_('Ignorieren')); ?>"><?php echo(_('Ignorieren')); ?> (<span class='cnt'></span>)
					</span>
				</span>
			</span>
		<?php } ?><?php
		if(true && ((false) && (\FOP\User::getBuchhaltung()) && (\FOP\User::getBuchhaltung()))) { ?>
			<span class="mdl-list__item mdl-button">
				<span class="mdl-list__item mdl-button" data-interaction-name="delete" style="margin-right:auto; text-align:left;"
					onclick="if(!confirm(<?php echo htmlentities(json_encode(_('confirmdelete'))); ?>)) return;$.get('Tables/Fop_fints_buchung/delete?ajax&from=<?php echo urlencode(\FOP\Util::getBackUrl()); ?>&id=' + escape(checkreminderFop_fints_buchungForderungen(null, 'ID'))).then(function () { reloadreminderFop_fints_buchungForderungen(); }, function (err) { if (err.responseText.startsWith('http')) { window.location.href = err.responseText; } else {alert(err.responseText); }}); $(this).closest('.overlay').click(); return false;">
					<span style="float:left;"><i class="material-icons">delete</i></span><span class="fop-menu-caption" title="<?php echo(_('delete')); ?>"><?php echo(_('delete')); ?> (<span class='cnt'></span>)
					</span>
				</span>
			</span>
		<?php } ?>
														</ul>
														<!-- column hide -->
														<button type="button" class="mdl-button mdl-js-button mdl-button--icon" onclick="dropDownFixPosition($(this), $(this).next())">
															<i class="material-icons">visibility</i>
														</button>
														<ul class="mdl-list mdl-card mdl-shadow--4dp fop-scroll-menu">
															<?php foreach ($columns AS $col) { ?>
																<li class="mdl-list__item mdl-button" onclick="
																	var isVisible = this.firstElementChild.innerText !== 'clear';
																	this.firstElementChild.innerText = isVisible ? 'clear' : 'visibility'; // switch icon
																	tableColumnVisibility('reminderFop_fints_buchungForderungen', <?php echo htmlentities(json_encode($col['id'])); ?>, !isVisible); // the rest is up to a helper function in layout/tables.fop
																	">
																	<i class="material-icons"><?php if ($col['collapsed']) { echo 'clear'; } else { echo 'visibility'; }?></i>
																	<?php echo htmlentities($col['desc']); ?>
																</li>
															<?php } ?>
															<li class="mdl-list__item mdl-button" onclick="
																$.get('FOP/Index/dataview?data='+encodeURIComponent(JSON.stringify({dataview: 'reminderFop_fints_buchungForderungen', reset: true}))).then(function () { location.reload(); });
																">
																<i class="material-icons">refresh</i>
																<?php echo _('reset all'); ?>
															</li>
														</ul>
													</div>
												</div><?php }
												
												foreach ($columns AS $col) {
													// Spalten-Überschrift rendern
													echo $col['header'];
												} ?>
											 </div>
											
											<div class="fop-table-body" id="table_reminderFop_fints_buchungForderungen" <?php \EasyEditor\Navigation::printScroll('dv.ReminderFop_fints_buchungForderungen', '/* scroll horiz */ this.nextElementSibling.firstElementChild.style.marginLeft = this.previousElementSibling.firstElementChild.style.marginLeft = \'-\' + this.scrollLeft + \'px\';
												/* scroll verti */
												var self = this;
												if (window.DataViewScrollReloadTimeout) clearTimeout(window.DataViewScrollReloadTimeout);
												window.DataViewScrollReloadTimeout = setTimeout(function () {
													var currentPage = parseInt(query[\'page_reminderFop_fints_buchungForderungen\'] || 0);
													var paddingTop = parseInt( self.lastElementChild.style.paddingTop, 10);
													var wantedPage = Math.max(0, currentPage + Math.floor((self.scrollTop - paddingTop) / ' . ($itemheight * $itemsperpage) . '));
													if (wantedPage != currentPage) {
														query[\'page_reminderFop_fints_buchungForderungen\'] = wantedPage;
														reloadreminderFop_fints_buchungForderungen(undefined, undefined, true);
													}
												}, 50);
											'); ?>>
												<div class="fop-table-body-inner" style="min-height: <?php echo 12 + $itemheight * ($itemcount + $additionalLines); ?>px; padding-top: <?php echo $itemheight * $itemsperpage * $page; ?>px;">
												<?php foreach($arr as $itempos => $item) {
													
													if ($itempos != 0) $checkAggregates(null, $item);?>
													<div class="fop-table-row" style="" data-fop_fints_buchung-id="<?php echo htmlentities($item['ID']); ?>"<?php if (isset($item['ID'])){
														if (isset($_GET['select']) && isset($_GET['from'])) {
															echo 'onclick="event.preventDefault(); if (!window.getSelection().toString()) window.location.href=' . htmlentities(json_encode($_GET['from'] . '&colvalue=' . urlencode($item['ID']))) . ';" ';
														} else {
															echo 'onclick="event.preventDefault(); if (!window.getSelection().toString()) open_url(reloadreminderFop_fints_buchungForderungen({action: \'open\', fop_table: \'fop_fints_buchung\', fop_id: ' .  htmlentities(json_encode($item['ID'])) . ', fop_from: location.href}, true), false);"';
														}
													}?> >

													<?php if (!isset($_GET['select'])) { ?>
													<div class='fop-table-column noprint' style="width: <?php echo json_encode($firstColumnWidth); ?>px;" onclick="$(this).find('input[type=checkbox]').first().click(); event.stopPropagation();">
													<label onclick="event.stopPropagation();" class="mdl-checkbox mdl-js-checkbox reminderFop_fints_buchungForderungen__checkbox reminderFop_fints_buchungForderungen__checkbox reminderFop_fints_buchungForderungen__checkbox-ID-<?php echo htmlentities($item['ID']); ?>" style="width: auto;" for="reminderFop_fints_buchungForderungen__<?php echo htmlentities($itempos); ?>-checkbox">
													<input class="mdl-checkbox__input" id="reminderFop_fints_buchungForderungen__<?php echo htmlentities($itempos); ?>-checkbox" type="checkbox" onchange="<?php if (isset($item['ID'])) echo 'checkreminderFop_fints_buchungForderungen(' . htmlentities(json_encode($item['ID'])) . ', \'ID\', this.checked); ' ?>">
													</label><button type="button" class="mdl-button mdl-js-button mdl-button--icon reminderFop_fints_buchungForderungen__action" onclick="
														event.stopPropagation();
														dropDownFixPosition($(this), $(this).next());
														">
														<i class="material-icons">more_vert</i>
													</button><ul class="mdl-list mdl-card mdl-shadow--4dp fop-scroll-menu" id="fop-scroll-menu-reminderFop_fints_buchungForderungen-action-<?php echo $item['ID'] ?? 0; ?>">
														<?php
		if(isset($item['ID']) && $item['operation::view']) { ?>
			<a class="mdl-list__item mdl-button" data-interaction-name="view" style="margin-right:auto; text-align:left;" href="<?php echo htmlentities(\TablesRouter\Fop_fints_buchung::viewURL($item['ID'], ['from' => \FOP\Util::getBackUrl()])); ?>"
				onclick=" if (!event.ctrlKey) { open_url(reloadreminderFop_fints_buchungForderungen({action: 'open', fop_table: 'fop_fints_buchung', fop_id: <?php echo htmlentities(json_encode($item['ID'])); ?>, fop_from: location.href}, true), false); return false; } $(this).closest('.overlay').click(); return false;  
					open_url(this.href, false);
					$(this).closest('.overlay').click();
					return false;">
				<span><i class="material-icons">find_in_page</i></span><span class="fop-menu-caption" title="<?php echo(_('open')); ?>"><?php echo(_('open')); ?></span>
			</a>
		<?php } ?><?php
		if(isset($item['ID']) && $item['operation::view'] && $item['operation::edit']) { ?>
			<a class="mdl-list__item mdl-button" data-interaction-name="edit" style="margin-right:auto; text-align:left;" href="<?php echo htmlentities(\TablesRouter\Fop_fints_buchung::editURL($item['ID'], ['from' => \FOP\Util::getBackUrl()])); ?>"
				onclick="   
					open_url(this.href, false);
					$(this).closest('.overlay').click();
					return false;">
				<span><i class="material-icons">edit</i></span><span class="fop-menu-caption" title="<?php echo(_('edit')); ?>"><?php echo(_('edit')); ?></span>
			</a>
		<?php } ?><?php
		if(isset($item['ID']) && $item['operation::view']) { ?>
			<a class="mdl-list__item mdl-button" data-interaction-name="forderung_ignore" style="margin-right:auto; text-align:left;" href="<?php echo htmlentities(\TablesRouter\Fop_fints_buchung::ignoreForderungURL2(['ids' => $item['ID'], 'from' => \FOP\Util::getBackUrl()])); ?>"
				onclick="   
					open_url(this.href, false);
					$(this).closest('.overlay').click();
					return false;">
				<span><i class="material-icons">visibility_off</i></span><span class="fop-menu-caption" title="<?php echo(_('Ignorieren')); ?>"><?php echo(_('Ignorieren')); ?></span>
			</a>
		<?php } ?><?php
		if(isset($item['ID']) && $item['operation::view']) { ?>
			<a class="mdl-list__item mdl-button" data-interaction-name="to_mitglied" style="margin-right:auto; text-align:left;" href="<?php echo htmlentities(\TablesRouter\Mitglied::assignIbanURL2(['buchung' => $item['ID'], 'from' => \FOP\Util::getBackUrl()])); ?>"
				onclick="   
					open_url(this.href, false);
					$(this).closest('.overlay').click();
					return false;">
				<span><i class="material-icons">shuffle</i></span><span class="fop-menu-caption" title="<?php echo(_('Mitglied zuordnen')); ?>"><?php echo(_('Mitglied zuordnen')); ?></span>
			</a>
		<?php } ?><?php
		if(isset($item['ID']) && (!\FOP\User::getIsGuest()) && (!\FOP\User::getIsGuest()) && (!\FOP\User::getIsGuest()) && ((\FOP\User::getBuchhaltung()) && (\FOP\User::getGruppe())) && (!\FOP\User::getIsGuest())) { ?>
			<a class="mdl-list__item mdl-button" data-interaction-name="to_single" style="margin-right:auto; text-align:left;" href="<?php echo htmlentities(\TablesRouter\MitgliedBuchung::createURL2(['buchung' => $item['ID'], 'from' => \FOP\Util::getBackUrl()])); ?>"
				onclick="   
					open_url(this.href, false);
					$(this).closest('.overlay').click();
					return false;">
				<span><i class="material-icons">arrow_forward</i></span><span class="fop-menu-caption" title="<?php echo(_('Einzelbuchung')); ?>"><?php echo(_('Einzelbuchung')); ?></span>
			</a>
		<?php } ?><?php
		if(isset($item['ID']) && $item['operation::delete']) { ?>
			<a class="mdl-list__item mdl-button" data-interaction-name="delete" style="margin-right:auto; text-align:left;" href="#"
				onclick="if(!confirm(<?php echo htmlentities(json_encode(_('confirmdelete'))); ?>)) return false;   $.get('Tables/Fop_fints_buchung/delete?ajax&id=<?php echo htmlentities($item['ID']);?>&from=<?php echo htmlentities(\FOP\Util::getBackUrl());?>').then(function () { reloadreminderFop_fints_buchungForderungen(); }, function (err) { if (err.responseText.startsWith('http')) { window.location.href = err.responseText; } else {alert(err.responseText); }}); $(this).closest('.overlay').click(); return false;
					open_url(this.href, false);
					$(this).closest('.overlay').click();
					return false;">
				<span><i class="material-icons">delete</i></span><span class="fop-menu-caption" title="<?php echo(_('delete')); ?>"><?php echo(_('delete')); ?></span>
			</a>
		<?php } ?>
													</ul><?php
		if(isset($item['ID']) && $item['operation::view'] && $item['operation::edit']) {
			?><a class="mdl-button mdl-js-button mdl-button--icon tbl-link" data-tbl="fop_fints_buchung" data-id="<?php echo htmlentities($item['ID']); ?>" data-interaction-name="edit" href="<?php echo htmlentities(\TablesRouter\Fop_fints_buchung::editURL($item['ID'], ['from' => \FOP\Util::getBackUrl()])); ?>"
				onclick="event.stopPropagation();    reloadreminderFop_fints_buchungForderungen();
					$(this).closest('.overlay').click();
					if (this.href != '#') {
						open_url(this.href, false);
					}
					event.preventDefault();"
				title="<?php echo(_('edit')); ?>">
				<i class="material-icons">edit</i>
			</a><?php } ?><?php
		if(isset($item['ID']) && $item['operation::view']) {
			?><a class="mdl-button mdl-js-button mdl-button--icon tbl-link" data-tbl="fop_fints_buchung" data-id="<?php echo htmlentities($item['ID']); ?>" data-interaction-name="view" href="<?php echo htmlentities(\TablesRouter\Fop_fints_buchung::viewURL($item['ID'], ['from' => \FOP\Util::getBackUrl()])); ?>"
				onclick="event.stopPropagation();  if (!event.ctrlKey) { open_url(reloadreminderFop_fints_buchungForderungen({action: 'open', fop_table: 'fop_fints_buchung', fop_id: <?php echo htmlentities(json_encode($item['ID'])); ?>, fop_from: location.href}, true), false); return false; }  reloadreminderFop_fints_buchungForderungen();
					$(this).closest('.overlay').click();
					if (this.href != '#') {
						open_url(this.href, false);
					}
					event.preventDefault();"
				title="<?php echo(_('open')); ?>">
				<i class="material-icons">find_in_page</i>
			</a><?php } ?>
													</div><?php } ?><?php
													
													foreach ($columns AS $col) {
														$col['render']($item);
													}
													?></div>
												 <?php }
												$checkAggregates(null, null);?>

													</div>
												</div>
												<?php
												// allerletzte Zeile
												$renderAggregateRow($data['aggregate']);
												?>

												
												
												</div><?php
												
	
    
  }

  public static function getUnseenNotificationsForChannel($channel) { 
    
    
    // --- BLOCK: main ---
    
		// at first, remove items that are obsolete
		$sql = \FOP\Database::query('DELETE FROM fop_notification WHERE '.qi('dv').' = '.\FOP\Database::quote('reminderFop_fints_buchungForderungen').'  AND '.qi('user').' = '.intval(\FOP\User::getID()).' AND channel = '.\FOP\Database::quote($channel).' AND NOT id IN (SELECT t.'.qi('ID').' AS id ' . /* FROM */\DataView\ReminderFop_fints_buchungForderungen::getSQL([]) . ')');

		// limit = 100; when limit is reached, redo
		$sql = 'SELECT t.'.qi('ID').' AS id ' . /* FROM */\DataView\ReminderFop_fints_buchungForderungen::getSQL([]) . ' AND NOT EXISTS (SELECT * FROM fop_notification WHERE '.qi('dv').' = '.\FOP\Database::quote('reminderFop_fints_buchungForderungen').' AND '.qi('user').' = '.intval(\FOP\User::getID()).' AND id = t.'.qi('ID').' AND channel = '.\FOP\Database::quote($channel).') LIMIT 100';
		return \FOP\Database::query($sql)->fetchAll(\PDO::FETCH_COLUMN);
	
    
  }

  public static function getidsAction($col) { 
    
    
    // --- BLOCK: access ---
    
    // --- BLOCK: main ---
    
			$q = \FOP\Database::query('SELECT t.'.qi($col).' '.self::getSQL($_GET));
			$result = new \FOP\IDList();
			while ($item = $q->fetchColumn()) {
				$result->push($item);
			}
			die($result->toString());

    
  }

  public static function permissionsAction($id) { 
    
    
    // --- BLOCK: access ---
    
    // --- BLOCK: main ---
    
		$ids = new \FOP\IDList($id);
		header('Content-Type: application/json');
		
		$perms = \FOP\Database::query('SELECT COUNT(*) AS __cnt, SUM(CASE (('.\FOP\Database::quote(\FOP\User::getBuchhaltung()).') AND (COALESCE((SELECT ('.\FOP\Database::quote(\FOP\User::getBuchhaltung()).') FROM '.qi('fop_fints_konto').' '.qi('ztZvmiXX').' WHERE '.qi('ztZvmiXX').'.'.qi('ID').' = '.qi('fop_fints_buchung').'.'.qi('konto').' LIMIT 1), FALSE)) AND ('.\FOP\Database::quote(\FOP\User::getBuchhaltung()).')) WHEN TRUE THEN 1 ELSE 0 END) AS '.qi('forderung_ignore').', SUM(CASE (TRUE) WHEN TRUE THEN 1 ELSE 0 END) AS '.qi('filteronly').', SUM(CASE (TRUE) WHEN TRUE THEN 1 ELSE 0 END) AS '.qi('filterrange').', SUM(CASE (TRUE) WHEN TRUE THEN 1 ELSE 0 END) AS '.qi('filterall').', SUM(CASE ((FALSE) AND ('.\FOP\Database::quote(\FOP\User::getBuchhaltung()).') AND (COALESCE((SELECT ('.\FOP\Database::quote(\FOP\User::getBuchhaltung()).') FROM '.qi('fop_fints_konto').' '.qi('vBKfwiB4').' WHERE '.qi('vBKfwiB4').'.'.qi('ID').' = '.qi('fop_fints_buchung').'.'.qi('konto').' LIMIT 1), FALSE)) AND ('.\FOP\Database::quote(\FOP\User::getBuchhaltung()).')) WHEN TRUE THEN 1 ELSE 0 END) AS '.qi('delete').' FROM '.qi('fop_fints_buchung').' WHERE ' . $ids->toSQL(qi('ID')))->fetch(\PDO::FETCH_ASSOC);
		
		return $perms;
	
    
  }

  public static function getSQL($params) { 
    
    
    // --- BLOCK: main ---
    
								// returns a sql snippet 'FROM (...) AS t WHERE' where you can prepend your select clauses and append your ORDER LIMIT
								$sql = 'FROM (SELECT /* ID */ '.qi('ID').' AS '.qi('ID').',
									/* bdate */ '.qi('bdate').' AS '.qi('bdate').',
									/* betrag */ '.qi('betrag').' AS '.qi('betrag').',
									/* date */ '.qi('date').' AS '.qi('date').',
									/* endtoend */ '.qi('endtoend').' AS '.qi('endtoend').',
									/* forderungDone */ '.qi('forderungDone').' AS '.qi('forderungDone').',
									/* hash */ '.qi('hash').' AS '.qi('hash').',
									/* iban */ '.qi('iban').' AS '.qi('iban').',
									/* konto */ '.qi('konto').' AS '.qi('konto').',
									/* konto::canView */ '.qi('ref:konto').'.'.qi('konto:canView').' AS '.qi('konto::canView').',
									/* konto::description */ '.qi('ref:konto').'.'.qi('konto:description').' AS '.qi('konto::description').',
									/* name_firma */ '.qi('name_firma').' AS '.qi('name_firma').',
									/* operation::create */ (FALSE) AND ('.\FOP\Database::quote(\FOP\User::getBuchhaltung()).') AND (COALESCE((SELECT ('.\FOP\Database::quote(\FOP\User::getBuchhaltung()).') FROM '.qi('fop_fints_konto').' '.qi('2ZJnnPGF').' WHERE '.qi('2ZJnnPGF').'.'.qi('ID').' = '.qi('fop_fints_buchung').'.'.qi('konto').' LIMIT 1), FALSE)) AND ('.\FOP\Database::quote(\FOP\User::getBuchhaltung()).') AS '.qi('operation::create').',
									/* operation::delete */ (FALSE) AND ('.\FOP\Database::quote(\FOP\User::getBuchhaltung()).') AND (COALESCE((SELECT ('.\FOP\Database::quote(\FOP\User::getBuchhaltung()).') FROM '.qi('fop_fints_konto').' '.qi('vBKfwiB4').' WHERE '.qi('vBKfwiB4').'.'.qi('ID').' = '.qi('fop_fints_buchung').'.'.qi('konto').' LIMIT 1), FALSE)) AND ('.\FOP\Database::quote(\FOP\User::getBuchhaltung()).') AS '.qi('operation::delete').',
									/* operation::edit */ ('.\FOP\Database::quote(\FOP\User::getBuchhaltung()).') AND (COALESCE((SELECT ('.\FOP\Database::quote(\FOP\User::getBuchhaltung()).') FROM '.qi('fop_fints_konto').' '.qi('56VmsVdP').' WHERE '.qi('56VmsVdP').'.'.qi('ID').' = '.qi('fop_fints_buchung').'.'.qi('konto').' LIMIT 1), FALSE)) AND ('.\FOP\Database::quote(\FOP\User::getBuchhaltung()).') AS '.qi('operation::edit').',
									/* operation::index */ ' . (!\FOP\User::getIsGuest() ? 1 : 0) . ' AS '.qi('operation::index').',
									/* operation::view */ ('.\FOP\Database::quote(\FOP\User::getBuchhaltung()).') AND (COALESCE((SELECT ('.\FOP\Database::quote(\FOP\User::getBuchhaltung()).') FROM '.qi('fop_fints_konto').' '.qi('ztZvmiXX').' WHERE '.qi('ztZvmiXX').'.'.qi('ID').' = '.qi('fop_fints_buchung').'.'.qi('konto').' LIMIT 1), FALSE)) AND ('.\FOP\Database::quote(\FOP\User::getBuchhaltung()).') AS '.qi('operation::view').',
									/* saldo */ '.qi('saldo').' AS '.qi('saldo').',
									/* umsatzart */ '.qi('umsatzart').' AS '.qi('umsatzart').',
									/* vzweck */ '.qi('vzweck').' AS '.qi('vzweck').',
									1
								FROM '.qi('fop_fints_buchung').' '.qi('fop_fints_buchung').'
								LEFT JOIN (SELECT '.qi('ID').' AS '.qi('konto:ID').', '.qi('fop_fints_konto').'.'.qi('kontoname').' AS '.qi('konto:description').', (('.\FOP\Database::quote(\FOP\User::getBuchhaltung()).')) AS '.qi('konto:canView').' FROM '.qi('fop_fints_konto').') '.qi('ref:konto').' ON '.qi('ref:konto').'.'.qi('konto:ID').' = '.qi('konto').'
								WHERE ((('.qi('fop_fints_buchung').'.'.qi('betrag').') > (0)) AND ((COALESCE('.qi('fop_fints_buchung').'.'.qi('forderungDone').', 0)) = (0)) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('mitgliedBuchung').' '.qi('7B0NsAyY').' WHERE '.qi('7B0NsAyY').'.'.qi('bank').' = '.qi('fop_fints_buchung').'.'.qi('ID').' LIMIT 1))))
									AND (' . (isset($_GET['select']) && $_GET['select'] == 'fop_fints_buchung' ? 'TRUE' : 'TRUE') . ')
									AND ((('.\FOP\Database::quote(\FOP\User::getBuchhaltung()).') AND (COALESCE((SELECT ('.\FOP\Database::quote(\FOP\User::getBuchhaltung()).') FROM '.qi('fop_fints_konto').' '.qi('ztZvmiXX').' WHERE '.qi('ztZvmiXX').'.'.qi('ID').' = '.qi('fop_fints_buchung').'.'.qi('konto').' LIMIT 1), FALSE)) AND ('.\FOP\Database::quote(\FOP\User::getBuchhaltung()).')))) AS t
								WHERE ' . (isset($params['range_min_reminderFop_fints_buchungForderungen_betrag']) ? ($params['range_min_reminderFop_fints_buchungForderungen_betrag'] !== '' && is_numeric($params['range_min_reminderFop_fints_buchungForderungen_betrag']) ? 't.'.qi('betrag').' >= ' . \FOP\Database::quote($params['range_min_reminderFop_fints_buchungForderungen_betrag']) . ' AND ' : '') : '') . 
								(isset($params['range_min_reminderFop_fints_buchungForderungen_saldo']) ? ($params['range_min_reminderFop_fints_buchungForderungen_saldo'] !== '' && is_numeric($params['range_min_reminderFop_fints_buchungForderungen_saldo']) ? 't.'.qi('saldo').' >= ' . \FOP\Database::quote($params['range_min_reminderFop_fints_buchungForderungen_saldo']) . ' AND ' : '') : '') . 
								(isset($params['range_min_reminderFop_fints_buchungForderungen_bdate']) ? ($params['range_min_reminderFop_fints_buchungForderungen_bdate'] !== '' && is_numeric($params['range_min_reminderFop_fints_buchungForderungen_bdate']) ? 't.'.qi('bdate').' >= ' . \FOP\Database::quote($params['range_min_reminderFop_fints_buchungForderungen_bdate']) . ' AND ' : '') : '') . 
								(isset($params['range_min_reminderFop_fints_buchungForderungen_date']) ? ($params['range_min_reminderFop_fints_buchungForderungen_date'] !== '' && is_numeric($params['range_min_reminderFop_fints_buchungForderungen_date']) ? 't.'.qi('date').' >= ' . \FOP\Database::quote($params['range_min_reminderFop_fints_buchungForderungen_date']) . ' AND ' : '') : '') . 
								(isset($params['range_max_reminderFop_fints_buchungForderungen_betrag']) ? ($params['range_max_reminderFop_fints_buchungForderungen_betrag'] !== '' && is_numeric($params['range_max_reminderFop_fints_buchungForderungen_betrag']) ? 't.'.qi('betrag').' <= ' . \FOP\Database::quote($params['range_max_reminderFop_fints_buchungForderungen_betrag']) . ' AND ' : '') : '') . 
								(isset($params['range_max_reminderFop_fints_buchungForderungen_saldo']) ? ($params['range_max_reminderFop_fints_buchungForderungen_saldo'] !== '' && is_numeric($params['range_max_reminderFop_fints_buchungForderungen_saldo']) ? 't.'.qi('saldo').' <= ' . \FOP\Database::quote($params['range_max_reminderFop_fints_buchungForderungen_saldo']) . ' AND ' : '') : '') . 
								(isset($params['range_max_reminderFop_fints_buchungForderungen_bdate']) ? ($params['range_max_reminderFop_fints_buchungForderungen_bdate'] !== '' && is_numeric($params['range_max_reminderFop_fints_buchungForderungen_bdate']) ? 't.'.qi('bdate').' <= ' . \FOP\Database::quote($params['range_max_reminderFop_fints_buchungForderungen_bdate']) . ' AND ' : '') : '') . 
								(isset($params['range_max_reminderFop_fints_buchungForderungen_date']) ? ($params['range_max_reminderFop_fints_buchungForderungen_date'] !== '' && is_numeric($params['range_max_reminderFop_fints_buchungForderungen_date']) ? 't.'.qi('date').' <= ' . \FOP\Database::quote($params['range_max_reminderFop_fints_buchungForderungen_date']) . ' AND ' : '') : '') . 
								(isset($params['filter_reminderFop_fints_buchungForderungen_forderungDone']) ? ($params['filter_reminderFop_fints_buchungForderungen_forderungDone'] !== '' ? ('(' . (new \FOP\IDList($params['filter_reminderFop_fints_buchungForderungen_forderungDone']))->toSQL('t.'.qi('forderungDone').'') . ') AND ') : '') : '') . 
								(isset($params['filter_reminderFop_fints_buchungForderungen_konto']) ? ($params['filter_reminderFop_fints_buchungForderungen_konto'] !== '' ? ('(' . (new \FOP\IDList($params['filter_reminderFop_fints_buchungForderungen_konto']))->toSQL('t.'.qi('konto').'') . ') AND ') : '') : '') . 
								(isset($params['filter_reminderFop_fints_buchungForderungen_bdate']) ? ($params['filter_reminderFop_fints_buchungForderungen_bdate'] !== '' ? ('(' . (new \FOP\IDList($params['filter_reminderFop_fints_buchungForderungen_bdate']))->toSQL('t.'.qi('bdate').'') . ') AND ') : '') : '') . 
								(isset($params['filter_reminderFop_fints_buchungForderungen_date']) ? ($params['filter_reminderFop_fints_buchungForderungen_date'] !== '' ? ('(' . (new \FOP\IDList($params['filter_reminderFop_fints_buchungForderungen_date']))->toSQL('t.'.qi('date').'') . ') AND ') : '') : '') . 
								(isset($params['filter_reminderFop_fints_buchungForderungen_betrag']) ? ($params['filter_reminderFop_fints_buchungForderungen_betrag'] !== '' ? ('(' . (new \FOP\IDList($params['filter_reminderFop_fints_buchungForderungen_betrag']))->toSQL('t.'.qi('betrag').'') . ') AND ') : '') : '') . 
								(isset($params['filter_reminderFop_fints_buchungForderungen_saldo']) ? ($params['filter_reminderFop_fints_buchungForderungen_saldo'] !== '' ? ('(' . (new \FOP\IDList($params['filter_reminderFop_fints_buchungForderungen_saldo']))->toSQL('t.'.qi('saldo').'') . ') AND ') : '') : '') . 
								(isset($params['filter_reminderFop_fints_buchungForderungen_iban']) ? ($params['filter_reminderFop_fints_buchungForderungen_iban'] !== '' ? ('(' . (new \FOP\IDList($params['filter_reminderFop_fints_buchungForderungen_iban']))->toSQL('t.'.qi('iban').'') . ') AND ') : '') : '') . 
								(isset($params['filter_reminderFop_fints_buchungForderungen_name_firma']) ? ($params['filter_reminderFop_fints_buchungForderungen_name_firma'] !== '' ? ('(' . (new \FOP\IDList($params['filter_reminderFop_fints_buchungForderungen_name_firma']))->toSQL('t.'.qi('name_firma').'') . ') AND ') : '') : '') . 
								(isset($params['filter_reminderFop_fints_buchungForderungen_vzweck']) ? ($params['filter_reminderFop_fints_buchungForderungen_vzweck'] !== '' ? ('(' . (new \FOP\IDList($params['filter_reminderFop_fints_buchungForderungen_vzweck']))->toSQL('t.'.qi('vzweck').'') . ') AND ') : '') : '') . 
								(isset($params['filter_reminderFop_fints_buchungForderungen_endtoend']) ? ($params['filter_reminderFop_fints_buchungForderungen_endtoend'] !== '' ? ('(' . (new \FOP\IDList($params['filter_reminderFop_fints_buchungForderungen_endtoend']))->toSQL('t.'.qi('endtoend').'') . ') AND ') : '') : '') . 
								(isset($params['filter_reminderFop_fints_buchungForderungen_umsatzart']) ? ($params['filter_reminderFop_fints_buchungForderungen_umsatzart'] !== '' ? ('(' . (new \FOP\IDList($params['filter_reminderFop_fints_buchungForderungen_umsatzart']))->toSQL('t.'.qi('umsatzart').'') . ') AND ') : '') : '') . 
								(isset($params['filter_reminderFop_fints_buchungForderungen_hash']) ? ($params['filter_reminderFop_fints_buchungForderungen_hash'] !== '' ? ('(' . (new \FOP\IDList($params['filter_reminderFop_fints_buchungForderungen_hash']))->toSQL('t.'.qi('hash').'') . ') AND ') : '') : '') . 
								(isset($params['filter_reminderFop_fints_buchungForderungen_ID']) ? ($params['filter_reminderFop_fints_buchungForderungen_ID'] !== '' ? ('(' . (new \FOP\IDList($params['filter_reminderFop_fints_buchungForderungen_ID']))->toSQL('t.'.qi('ID').'') . ') AND ') : '') : '') . 
								(isset($params['search_reminderFop_fints_buchungForderungen_iban']) ? 't.'.qi('iban').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_reminderFop_fints_buchungForderungen_iban'] . '%') . ' AND ' : '') . 
								(isset($params['search_reminderFop_fints_buchungForderungen_name_firma']) ? 't.'.qi('name_firma').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_reminderFop_fints_buchungForderungen_name_firma'] . '%') . ' AND ' : '') . 
								(isset($params['search_reminderFop_fints_buchungForderungen_vzweck']) ? 't.'.qi('vzweck').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_reminderFop_fints_buchungForderungen_vzweck'] . '%') . ' AND ' : '') . 
								(isset($params['search_reminderFop_fints_buchungForderungen_endtoend']) ? 't.'.qi('endtoend').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_reminderFop_fints_buchungForderungen_endtoend'] . '%') . ' AND ' : '') . 
								(isset($params['search_reminderFop_fints_buchungForderungen_umsatzart']) ? 't.'.qi('umsatzart').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_reminderFop_fints_buchungForderungen_umsatzart'] . '%') . ' AND ' : '') . 
								(isset($params['search_reminderFop_fints_buchungForderungen_hash']) ? 't.'.qi('hash').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_reminderFop_fints_buchungForderungen_hash'] . '%') . ' AND ' : '') . 
								(isset($params['searchnot_reminderFop_fints_buchungForderungen_iban']) ? 'NOT t.'.qi('iban').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['searchnot_reminderFop_fints_buchungForderungen_iban'] . '%') . ' AND ' : '') . 
								(isset($params['searchnot_reminderFop_fints_buchungForderungen_name_firma']) ? 'NOT t.'.qi('name_firma').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['searchnot_reminderFop_fints_buchungForderungen_name_firma'] . '%') . ' AND ' : '') . 
								(isset($params['searchnot_reminderFop_fints_buchungForderungen_vzweck']) ? 'NOT t.'.qi('vzweck').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['searchnot_reminderFop_fints_buchungForderungen_vzweck'] . '%') . ' AND ' : '') . 
								(isset($params['searchnot_reminderFop_fints_buchungForderungen_endtoend']) ? 'NOT t.'.qi('endtoend').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['searchnot_reminderFop_fints_buchungForderungen_endtoend'] . '%') . ' AND ' : '') . 
								(isset($params['searchnot_reminderFop_fints_buchungForderungen_umsatzart']) ? 'NOT t.'.qi('umsatzart').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['searchnot_reminderFop_fints_buchungForderungen_umsatzart'] . '%') . ' AND ' : '') . 
								(isset($params['searchnot_reminderFop_fints_buchungForderungen_hash']) ? 'NOT t.'.qi('hash').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['searchnot_reminderFop_fints_buchungForderungen_hash'] . '%') . ' AND ' : '') . 
								(isset($params['search_reminderFop_fints_buchungForderungen']) ? '(' . 't.'.qi('iban').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_reminderFop_fints_buchungForderungen'] . '%') . ' OR ' . 't.'.qi('name_firma').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_reminderFop_fints_buchungForderungen'] . '%') . ' OR ' . 't.'.qi('vzweck').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_reminderFop_fints_buchungForderungen'] . '%') . ' OR ' . 't.'.qi('endtoend').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_reminderFop_fints_buchungForderungen'] . '%') . ' OR ' . 't.'.qi('umsatzart').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_reminderFop_fints_buchungForderungen'] . '%') . ' OR ' . 't.'.qi('hash').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_reminderFop_fints_buchungForderungen'] . '%') . ') AND ' : '') . 
								'
								 TRUE ';
								return $sql;
	
    
  }

  public static function getfilter_reminderFop_fints_buchungForderungen_kontoItemsByStringAction($fstr) { 
    
    
    // --- BLOCK: access ---
    
    // --- BLOCK: main ---
    
		// Auf aktive DataView-Items einschränken
		$params = $_GET;
		unset($params['filter_reminderFop_fints_buchungForderungen_konto']);
		return \Types\Fop_fints_konto::getItems(null, -1, $fstr, ''.qi('ID').' IN (SELECT DISTINCT t.'.qi('konto').''.self::getSQL($params).')');
	

    
  }

  public static function getData($sqladdon, $params, $stream = false ) { 
    
    
    // --- BLOCK: main ---
    
								$sql = self::getSQL($params);

								$order = (\FOP\Util::array_value(array(
									'name_firma ASC' => 'ORDER BY t.'.qi('name_firma').' ASC',
									'vzweck ASC' => 'ORDER BY t.'.qi('vzweck').' ASC',
									'endtoend ASC' => 'ORDER BY t.'.qi('endtoend').' ASC',
									'umsatzart ASC' => 'ORDER BY t.'.qi('umsatzart').' ASC',
									'hash ASC' => 'ORDER BY t.'.qi('hash').' ASC',
									'iban ASC' => 'ORDER BY t.'.qi('iban').' ASC',
									'betrag ASC' => 'ORDER BY t.'.qi('betrag').' ASC',
									'saldo ASC' => 'ORDER BY t.'.qi('saldo').' ASC',
									'bdate ASC' => 'ORDER BY t.'.qi('bdate').' ASC',
									'date ASC' => 'ORDER BY t.'.qi('date').' ASC',
									'name_firma DESC' => 'ORDER BY t.'.qi('name_firma').' DESC',
									'vzweck DESC' => 'ORDER BY t.'.qi('vzweck').' DESC',
									'endtoend DESC' => 'ORDER BY t.'.qi('endtoend').' DESC',
									'umsatzart DESC' => 'ORDER BY t.'.qi('umsatzart').' DESC',
									'hash DESC' => 'ORDER BY t.'.qi('hash').' DESC',
									'iban DESC' => 'ORDER BY t.'.qi('iban').' DESC',
									'betrag DESC' => 'ORDER BY t.'.qi('betrag').' DESC',
									'saldo DESC' => 'ORDER BY t.'.qi('saldo').' DESC',
									'bdate DESC' => 'ORDER BY t.'.qi('bdate').' DESC',
									'date DESC' => 'ORDER BY t.'.qi('date').' DESC',
									'' => ''), isset($params['sort_reminderFop_fints_buchungForderungen']) ? $params['sort_reminderFop_fints_buchungForderungen'] : '') ?: 'ORDER BY '.qi('t').'.'.qi('bdate').' DESC, '.qi('t').'.'.qi('ID').' DESC');
								// wenn sqladdon bereits ein ORDER enthält, kein order aufbauen
								if (strpos($sqladdon, 'ORDER') !== false) {
									$order = '';
								}
								if ($stream) {
									// als Stream (währenddessen darf keine weitere SQL-Query laufen) für große Datenmengen und Statistiken
									$result = (function () use ($sql, $order, $sqladdon) {
										$stream = \FOP\Database::query('SELECT t.* ' . $sql . $order . $sqladdon);
										while ($item = $stream->fetch(\PDO::FETCH_ASSOC)) {
											$item['forderungDone'] = \FOP\Util::BoolSanitizer($item['forderungDone']);
											$item['konto'] = \FOP\Sanitizers::null_converter($item['konto']);
											$item['bdate'] = intval($item['bdate']);
											$item['date'] = intval($item['date']);
											$item['betrag'] = \Types\Euro::unpack($item['betrag']);
											$item['saldo'] = \Types\Euro::unpack($item['saldo']);
											$item['iban'] = \FOP\Sanitizers::a_text($item['iban']);
											
											yield $item;
										}
									})();
								} else {
									// als RAM-Array
									$result = \FOP\Database::query('SELECT t.* ' . $sql . $order . $sqladdon);
									$arr = $result->fetchAll(\PDO::FETCH_ASSOC);
									$itemcount = count($arr);

									foreach($arr as $i => &$item){
										$item['forderungDone'] = \FOP\Util::BoolSanitizer($item['forderungDone']);
										$item['konto'] = \FOP\Sanitizers::null_converter($item['konto']);
										$item['bdate'] = intval($item['bdate']);
										$item['date'] = intval($item['date']);
										$item['betrag'] = \Types\Euro::unpack($item['betrag']);
										$item['saldo'] = \Types\Euro::unpack($item['saldo']);
										$item['iban'] = \FOP\Sanitizers::a_text($item['iban']);
										
									}
									unset($item);

									$result = ["items" => $arr, "itemcount" => $itemcount];

									
										$result['aggregate'] = \FOP\Database::query('SELECT COUNT(*) AS '.qi('::cnt').', SUM(t.'.qi('betrag').') AS '.qi('betrag').' ' . $sql)->fetch(\PDO::FETCH_ASSOC);
										$result['aggregate']['betrag'] = \Types\Euro::unpack($result['aggregate']['betrag']);
										
									
								}

								return $result;
	
    
  }

  public static function getFilterHTML($params, $delimiter = ', ' , $showButton = true ) { 
    
    
    // --- BLOCK: main ---
    
		// Contract: ist showButton == false, sollten keine HTML-Tags im Output enthalten sein (Verwendung in Dateinamen!!)
		$filters = [];
		
	if (isset($params['range_min_reminderFop_fints_buchungForderungen_betrag']) && isset($params['range_max_reminderFop_fints_buchungForderungen_betrag'])) {
		array_push($filters, _('Betrag') . ': ' . (\Types\Euro::print($params['range_min_reminderFop_fints_buchungForderungen_betrag']) .  ' €'
	) . ' ' . _('filters_between') . ' ' . (\Types\Euro::print($params['range_max_reminderFop_fints_buchungForderungen_betrag']) .  ' €'
	));
	} else if (isset($params['range_min_reminderFop_fints_buchungForderungen_betrag'])) {
		array_push($filters, _('Betrag') . ': ' . _('filters_from') . ' ' . (\Types\Euro::print($params['range_min_reminderFop_fints_buchungForderungen_betrag']) .  ' €'
	));
	} else if (isset($params['range_max_reminderFop_fints_buchungForderungen_betrag'])) {
		array_push($filters, _('Betrag') . ': ' . _('filters_to') . ' ' . (\Types\Euro::print($params['range_max_reminderFop_fints_buchungForderungen_betrag']) .  ' €'
	));
	}
	if (isset($params['range_min_reminderFop_fints_buchungForderungen_saldo']) && isset($params['range_max_reminderFop_fints_buchungForderungen_saldo'])) {
		array_push($filters, _('Saldo') . ': ' . (\Types\Euro::print($params['range_min_reminderFop_fints_buchungForderungen_saldo']) .  ' €'
	) . ' ' . _('filters_between') . ' ' . (\Types\Euro::print($params['range_max_reminderFop_fints_buchungForderungen_saldo']) .  ' €'
	));
	} else if (isset($params['range_min_reminderFop_fints_buchungForderungen_saldo'])) {
		array_push($filters, _('Saldo') . ': ' . _('filters_from') . ' ' . (\Types\Euro::print($params['range_min_reminderFop_fints_buchungForderungen_saldo']) .  ' €'
	));
	} else if (isset($params['range_max_reminderFop_fints_buchungForderungen_saldo'])) {
		array_push($filters, _('Saldo') . ': ' . _('filters_to') . ' ' . (\Types\Euro::print($params['range_max_reminderFop_fints_buchungForderungen_saldo']) .  ' €'
	));
	}
	
	if ( // Corner Case: Monat
		isset($params['range_min_reminderFop_fints_buchungForderungen_bdate'])
		&& isset($params['range_max_reminderFop_fints_buchungForderungen_bdate'])
		&& (date('d', $params['range_min_reminderFop_fints_buchungForderungen_bdate']) == '01') //check first day of month
		&& (date('d', $params['range_max_reminderFop_fints_buchungForderungen_bdate']) == date('t', $params['range_max_reminderFop_fints_buchungForderungen_bdate'])) //check last day of month
		&& (date('Y-m', $params['range_min_reminderFop_fints_buchungForderungen_bdate']) == date('Y-m', $params['range_max_reminderFop_fints_buchungForderungen_bdate'])) //check if same year and month
	) {
		array_push($filters, [
			($showButton ? '<i class="material-icons fop-small" style="cursor: pointer;" onclick="
				query[&apos;range_min_reminderFop_fints_buchungForderungen_bdate&apos;] = &apos;'.strtotime('first day of last month', $params['range_min_reminderFop_fints_buchungForderungen_bdate']).'&apos;;
				query[&apos;range_max_reminderFop_fints_buchungForderungen_bdate&apos;] = &apos;'.strtotime('last day of last month', $params['range_min_reminderFop_fints_buchungForderungen_bdate']).'&apos;;
				reloadreminderFop_fints_buchungForderungen(); ">remove_circle_outline</i>' : ''),
			($showButton ? '<i class="material-icons fop-small" style="cursor: pointer;" onclick="
				query[&apos;range_min_reminderFop_fints_buchungForderungen_bdate&apos;] = &apos;'.strtotime('first day of next month', $params['range_min_reminderFop_fints_buchungForderungen_bdate']).'&apos;;
				query[&apos;range_max_reminderFop_fints_buchungForderungen_bdate&apos;] = &apos;'.strtotime('last day of next month', $params['range_min_reminderFop_fints_buchungForderungen_bdate']).'&apos;;
				reloadreminderFop_fints_buchungForderungen(); ">add_circle_outline</i>' : ''),
			htmlentities(_('Buchungsdatum') . ': ' . strftime('%B', $params['range_min_reminderFop_fints_buchungForderungen_bdate']) . ' ' . date('Y', $params['range_min_reminderFop_fints_buchungForderungen_bdate']))
		]);
	} else if ( // Corner Case: Tag
		isset($params['range_min_reminderFop_fints_buchungForderungen_bdate'])
		&& isset($params['range_max_reminderFop_fints_buchungForderungen_bdate'])
		&& (date('Y-m-d', $params['range_min_reminderFop_fints_buchungForderungen_bdate']) == (date('Y-m-d', $params['range_max_reminderFop_fints_buchungForderungen_bdate'])))
	) {
		array_push($filters, [
			($showButton ? '<i class="material-icons fop-small" style="cursor: pointer;" onclick="
				query[&apos;range_min_reminderFop_fints_buchungForderungen_bdate&apos;] = &apos;'.strtotime('last day', $params['range_min_reminderFop_fints_buchungForderungen_bdate']).'&apos;;
				query[&apos;range_max_reminderFop_fints_buchungForderungen_bdate&apos;] = &apos;'.strtotime('last day', $params['range_min_reminderFop_fints_buchungForderungen_bdate']).'&apos;;
				reloadreminderFop_fints_buchungForderungen(); ">remove_circle_outline</i>' : ''),
			($showButton ? '<i class="material-icons fop-small" style="cursor: pointer;" onclick="
				query[&apos;range_min_reminderFop_fints_buchungForderungen_bdate&apos;] = &apos;'.strtotime('next day', $params['range_min_reminderFop_fints_buchungForderungen_bdate']).'&apos;;
				query[&apos;range_max_reminderFop_fints_buchungForderungen_bdate&apos;] = &apos;'.strtotime('next day', $params['range_min_reminderFop_fints_buchungForderungen_bdate']).'&apos;;
				reloadreminderFop_fints_buchungForderungen(); ">add_circle_outline</i>' : ''),
			htmlentities(_('Buchungsdatum') . ': ' . date('d.m.Y', $params['range_min_reminderFop_fints_buchungForderungen_bdate']))
		]);
	} else if ( // Corner Case: Jahr
		isset($params['range_min_reminderFop_fints_buchungForderungen_bdate'])
		&& isset($params['range_max_reminderFop_fints_buchungForderungen_bdate'])
		&& (date('Y', $params['range_min_reminderFop_fints_buchungForderungen_bdate']) == (date('Y', $params['range_max_reminderFop_fints_buchungForderungen_bdate'])))
		&& ((date('m-d', $params['range_min_reminderFop_fints_buchungForderungen_bdate']) == '01-01'))
		&& ((date('m-d', $params['range_max_reminderFop_fints_buchungForderungen_bdate']) == '12-31'))
	) {
		array_push($filters, [
			($showButton ? '<i class="material-icons fop-small" style="cursor: pointer;" onclick="
				query[&apos;range_min_reminderFop_fints_buchungForderungen_bdate&apos;] = &apos;'.strtotime('first day of January last year', $params['range_min_reminderFop_fints_buchungForderungen_bdate']).'&apos;;
				query[&apos;range_max_reminderFop_fints_buchungForderungen_bdate&apos;] = &apos;'.strtotime('last day of December last year', $params['range_min_reminderFop_fints_buchungForderungen_bdate']).'&apos;;
				reloadreminderFop_fints_buchungForderungen(); ">remove_circle_outline</i>' : ''),
			($showButton ? '<i class="material-icons fop-small" style="cursor: pointer;" onclick="
				query[&apos;range_min_reminderFop_fints_buchungForderungen_bdate&apos;] = &apos;'.strtotime('first day of January next year', $params['range_min_reminderFop_fints_buchungForderungen_bdate']).'&apos;;
				query[&apos;range_max_reminderFop_fints_buchungForderungen_bdate&apos;] = &apos;'.strtotime('last day of December next year', $params['range_min_reminderFop_fints_buchungForderungen_bdate']).'&apos;;
				reloadreminderFop_fints_buchungForderungen(); ">add_circle_outline</i>' : ''),
			htmlentities(_('Buchungsdatum') . ': ' . date('Y', $params['range_min_reminderFop_fints_buchungForderungen_bdate']))
		]);
	} else if ( // Corner Case: Quartal
		isset($params['range_min_reminderFop_fints_buchungForderungen_bdate'])
		&& isset($params['range_max_reminderFop_fints_buchungForderungen_bdate'])
		&& ( (
		 ((date('m-d', $params['range_min_reminderFop_fints_buchungForderungen_bdate']) == '01-01'))
		&& ((date('m-d', $params['range_max_reminderFop_fints_buchungForderungen_bdate']) == '03-31')) )
		|| (
		 ((date('m-d', $params['range_min_reminderFop_fints_buchungForderungen_bdate']) == '04-01'))
		&& ((date('m-d', $params['range_max_reminderFop_fints_buchungForderungen_bdate']) == '06-30')) )
		|| (
		 ((date('m-d', $params['range_min_reminderFop_fints_buchungForderungen_bdate']) == '07-01'))
		&& ((date('m-d', $params['range_max_reminderFop_fints_buchungForderungen_bdate']) == '09-30')) )
		|| (
		 ((date('m-d', $params['range_min_reminderFop_fints_buchungForderungen_bdate']) == '10-01'))
		&& ((date('m-d', $params['range_max_reminderFop_fints_buchungForderungen_bdate']) == '12-31')) )
	) ) {
		array_push($filters, [
			($showButton ? '<i class="material-icons fop-small" style="cursor: pointer;" onclick="
					query[&apos;range_min_reminderFop_fints_buchungForderungen_bdate&apos;] = &apos;'.strtotime('first day of -3 months', $params['range_min_reminderFop_fints_buchungForderungen_bdate']).'&apos;;
					query[&apos;range_max_reminderFop_fints_buchungForderungen_bdate&apos;] = &apos;'.strtotime('last day of -3 months', $params['range_max_reminderFop_fints_buchungForderungen_bdate']).'&apos;;
					reloadreminderFop_fints_buchungForderungen(); ">remove_circle_outline</i>' : ''),
			($showButton ? '<i class="material-icons fop-small" style="cursor: pointer;" onclick="
				query[&apos;range_min_reminderFop_fints_buchungForderungen_bdate&apos;] = &apos;'.strtotime('first day of +3 months', $params['range_min_reminderFop_fints_buchungForderungen_bdate']).'&apos;;
				query[&apos;range_max_reminderFop_fints_buchungForderungen_bdate&apos;] = &apos;'.strtotime('last day of +3 months', $params['range_max_reminderFop_fints_buchungForderungen_bdate']).'&apos;;
				reloadreminderFop_fints_buchungForderungen(); ">add_circle_outline</i>' : ''),	
			htmlentities(_('Buchungsdatum') . ': Q' . (ceil((date('m', $params['range_min_reminderFop_fints_buchungForderungen_bdate']))/3)) . ' (' . date('d.m.', $params['range_min_reminderFop_fints_buchungForderungen_bdate']) . ' - ' . date('d.m.Y', $params['range_max_reminderFop_fints_buchungForderungen_bdate']) . ')')
		]);
	}
	else if (isset($params['range_min_reminderFop_fints_buchungForderungen_bdate']) && isset($params['range_max_reminderFop_fints_buchungForderungen_bdate'])) {
		array_push($filters, _('Buchungsdatum') . ': ' . (($params['range_min_reminderFop_fints_buchungForderungen_bdate']) ? strftime(_('dateformat_php2'), intval($params['range_min_reminderFop_fints_buchungForderungen_bdate'])) : '') . ' ' . _('filters_between') . ' ' . (($params['range_max_reminderFop_fints_buchungForderungen_bdate']) ? strftime(_('dateformat_php2'), intval($params['range_max_reminderFop_fints_buchungForderungen_bdate'])) : ''));
	} else if (isset($params['range_min_reminderFop_fints_buchungForderungen_bdate'])) {
		array_push($filters, _('Buchungsdatum') . ': ' . _('filters_from') . ' ' . (($params['range_min_reminderFop_fints_buchungForderungen_bdate']) ? strftime(_('dateformat_php2'), intval($params['range_min_reminderFop_fints_buchungForderungen_bdate'])) : ''));
	} else if (isset($params['range_max_reminderFop_fints_buchungForderungen_bdate'])) {
		array_push($filters, _('Buchungsdatum') . ': ' . _('filters_to') . ' ' . (($params['range_max_reminderFop_fints_buchungForderungen_bdate']) ? strftime(_('dateformat_php2'), intval($params['range_max_reminderFop_fints_buchungForderungen_bdate'])) : ''));
	}
	
	if ( // Corner Case: Monat
		isset($params['range_min_reminderFop_fints_buchungForderungen_date'])
		&& isset($params['range_max_reminderFop_fints_buchungForderungen_date'])
		&& (date('d', $params['range_min_reminderFop_fints_buchungForderungen_date']) == '01') //check first day of month
		&& (date('d', $params['range_max_reminderFop_fints_buchungForderungen_date']) == date('t', $params['range_max_reminderFop_fints_buchungForderungen_date'])) //check last day of month
		&& (date('Y-m', $params['range_min_reminderFop_fints_buchungForderungen_date']) == date('Y-m', $params['range_max_reminderFop_fints_buchungForderungen_date'])) //check if same year and month
	) {
		array_push($filters, [
			($showButton ? '<i class="material-icons fop-small" style="cursor: pointer;" onclick="
				query[&apos;range_min_reminderFop_fints_buchungForderungen_date&apos;] = &apos;'.strtotime('first day of last month', $params['range_min_reminderFop_fints_buchungForderungen_date']).'&apos;;
				query[&apos;range_max_reminderFop_fints_buchungForderungen_date&apos;] = &apos;'.strtotime('last day of last month', $params['range_min_reminderFop_fints_buchungForderungen_date']).'&apos;;
				reloadreminderFop_fints_buchungForderungen(); ">remove_circle_outline</i>' : ''),
			($showButton ? '<i class="material-icons fop-small" style="cursor: pointer;" onclick="
				query[&apos;range_min_reminderFop_fints_buchungForderungen_date&apos;] = &apos;'.strtotime('first day of next month', $params['range_min_reminderFop_fints_buchungForderungen_date']).'&apos;;
				query[&apos;range_max_reminderFop_fints_buchungForderungen_date&apos;] = &apos;'.strtotime('last day of next month', $params['range_min_reminderFop_fints_buchungForderungen_date']).'&apos;;
				reloadreminderFop_fints_buchungForderungen(); ">add_circle_outline</i>' : ''),
			htmlentities(_('Wertstellungsdatum') . ': ' . strftime('%B', $params['range_min_reminderFop_fints_buchungForderungen_date']) . ' ' . date('Y', $params['range_min_reminderFop_fints_buchungForderungen_date']))
		]);
	} else if ( // Corner Case: Tag
		isset($params['range_min_reminderFop_fints_buchungForderungen_date'])
		&& isset($params['range_max_reminderFop_fints_buchungForderungen_date'])
		&& (date('Y-m-d', $params['range_min_reminderFop_fints_buchungForderungen_date']) == (date('Y-m-d', $params['range_max_reminderFop_fints_buchungForderungen_date'])))
	) {
		array_push($filters, [
			($showButton ? '<i class="material-icons fop-small" style="cursor: pointer;" onclick="
				query[&apos;range_min_reminderFop_fints_buchungForderungen_date&apos;] = &apos;'.strtotime('last day', $params['range_min_reminderFop_fints_buchungForderungen_date']).'&apos;;
				query[&apos;range_max_reminderFop_fints_buchungForderungen_date&apos;] = &apos;'.strtotime('last day', $params['range_min_reminderFop_fints_buchungForderungen_date']).'&apos;;
				reloadreminderFop_fints_buchungForderungen(); ">remove_circle_outline</i>' : ''),
			($showButton ? '<i class="material-icons fop-small" style="cursor: pointer;" onclick="
				query[&apos;range_min_reminderFop_fints_buchungForderungen_date&apos;] = &apos;'.strtotime('next day', $params['range_min_reminderFop_fints_buchungForderungen_date']).'&apos;;
				query[&apos;range_max_reminderFop_fints_buchungForderungen_date&apos;] = &apos;'.strtotime('next day', $params['range_min_reminderFop_fints_buchungForderungen_date']).'&apos;;
				reloadreminderFop_fints_buchungForderungen(); ">add_circle_outline</i>' : ''),
			htmlentities(_('Wertstellungsdatum') . ': ' . date('d.m.Y', $params['range_min_reminderFop_fints_buchungForderungen_date']))
		]);
	} else if ( // Corner Case: Jahr
		isset($params['range_min_reminderFop_fints_buchungForderungen_date'])
		&& isset($params['range_max_reminderFop_fints_buchungForderungen_date'])
		&& (date('Y', $params['range_min_reminderFop_fints_buchungForderungen_date']) == (date('Y', $params['range_max_reminderFop_fints_buchungForderungen_date'])))
		&& ((date('m-d', $params['range_min_reminderFop_fints_buchungForderungen_date']) == '01-01'))
		&& ((date('m-d', $params['range_max_reminderFop_fints_buchungForderungen_date']) == '12-31'))
	) {
		array_push($filters, [
			($showButton ? '<i class="material-icons fop-small" style="cursor: pointer;" onclick="
				query[&apos;range_min_reminderFop_fints_buchungForderungen_date&apos;] = &apos;'.strtotime('first day of January last year', $params['range_min_reminderFop_fints_buchungForderungen_date']).'&apos;;
				query[&apos;range_max_reminderFop_fints_buchungForderungen_date&apos;] = &apos;'.strtotime('last day of December last year', $params['range_min_reminderFop_fints_buchungForderungen_date']).'&apos;;
				reloadreminderFop_fints_buchungForderungen(); ">remove_circle_outline</i>' : ''),
			($showButton ? '<i class="material-icons fop-small" style="cursor: pointer;" onclick="
				query[&apos;range_min_reminderFop_fints_buchungForderungen_date&apos;] = &apos;'.strtotime('first day of January next year', $params['range_min_reminderFop_fints_buchungForderungen_date']).'&apos;;
				query[&apos;range_max_reminderFop_fints_buchungForderungen_date&apos;] = &apos;'.strtotime('last day of December next year', $params['range_min_reminderFop_fints_buchungForderungen_date']).'&apos;;
				reloadreminderFop_fints_buchungForderungen(); ">add_circle_outline</i>' : ''),
			htmlentities(_('Wertstellungsdatum') . ': ' . date('Y', $params['range_min_reminderFop_fints_buchungForderungen_date']))
		]);
	} else if ( // Corner Case: Quartal
		isset($params['range_min_reminderFop_fints_buchungForderungen_date'])
		&& isset($params['range_max_reminderFop_fints_buchungForderungen_date'])
		&& ( (
		 ((date('m-d', $params['range_min_reminderFop_fints_buchungForderungen_date']) == '01-01'))
		&& ((date('m-d', $params['range_max_reminderFop_fints_buchungForderungen_date']) == '03-31')) )
		|| (
		 ((date('m-d', $params['range_min_reminderFop_fints_buchungForderungen_date']) == '04-01'))
		&& ((date('m-d', $params['range_max_reminderFop_fints_buchungForderungen_date']) == '06-30')) )
		|| (
		 ((date('m-d', $params['range_min_reminderFop_fints_buchungForderungen_date']) == '07-01'))
		&& ((date('m-d', $params['range_max_reminderFop_fints_buchungForderungen_date']) == '09-30')) )
		|| (
		 ((date('m-d', $params['range_min_reminderFop_fints_buchungForderungen_date']) == '10-01'))
		&& ((date('m-d', $params['range_max_reminderFop_fints_buchungForderungen_date']) == '12-31')) )
	) ) {
		array_push($filters, [
			($showButton ? '<i class="material-icons fop-small" style="cursor: pointer;" onclick="
					query[&apos;range_min_reminderFop_fints_buchungForderungen_date&apos;] = &apos;'.strtotime('first day of -3 months', $params['range_min_reminderFop_fints_buchungForderungen_date']).'&apos;;
					query[&apos;range_max_reminderFop_fints_buchungForderungen_date&apos;] = &apos;'.strtotime('last day of -3 months', $params['range_max_reminderFop_fints_buchungForderungen_date']).'&apos;;
					reloadreminderFop_fints_buchungForderungen(); ">remove_circle_outline</i>' : ''),
			($showButton ? '<i class="material-icons fop-small" style="cursor: pointer;" onclick="
				query[&apos;range_min_reminderFop_fints_buchungForderungen_date&apos;] = &apos;'.strtotime('first day of +3 months', $params['range_min_reminderFop_fints_buchungForderungen_date']).'&apos;;
				query[&apos;range_max_reminderFop_fints_buchungForderungen_date&apos;] = &apos;'.strtotime('last day of +3 months', $params['range_max_reminderFop_fints_buchungForderungen_date']).'&apos;;
				reloadreminderFop_fints_buchungForderungen(); ">add_circle_outline</i>' : ''),	
			htmlentities(_('Wertstellungsdatum') . ': Q' . (ceil((date('m', $params['range_min_reminderFop_fints_buchungForderungen_date']))/3)) . ' (' . date('d.m.', $params['range_min_reminderFop_fints_buchungForderungen_date']) . ' - ' . date('d.m.Y', $params['range_max_reminderFop_fints_buchungForderungen_date']) . ')')
		]);
	}
	else if (isset($params['range_min_reminderFop_fints_buchungForderungen_date']) && isset($params['range_max_reminderFop_fints_buchungForderungen_date'])) {
		array_push($filters, _('Wertstellungsdatum') . ': ' . (($params['range_min_reminderFop_fints_buchungForderungen_date']) ? strftime(_('dateformat_php2'), intval($params['range_min_reminderFop_fints_buchungForderungen_date'])) : '') . ' ' . _('filters_between') . ' ' . (($params['range_max_reminderFop_fints_buchungForderungen_date']) ? strftime(_('dateformat_php2'), intval($params['range_max_reminderFop_fints_buchungForderungen_date'])) : ''));
	} else if (isset($params['range_min_reminderFop_fints_buchungForderungen_date'])) {
		array_push($filters, _('Wertstellungsdatum') . ': ' . _('filters_from') . ' ' . (($params['range_min_reminderFop_fints_buchungForderungen_date']) ? strftime(_('dateformat_php2'), intval($params['range_min_reminderFop_fints_buchungForderungen_date'])) : ''));
	} else if (isset($params['range_max_reminderFop_fints_buchungForderungen_date'])) {
		array_push($filters, _('Wertstellungsdatum') . ': ' . _('filters_to') . ' ' . (($params['range_max_reminderFop_fints_buchungForderungen_date']) ? strftime(_('dateformat_php2'), intval($params['range_max_reminderFop_fints_buchungForderungen_date'])) : ''));
	}if (isset($params['filter_reminderFop_fints_buchungForderungen_forderungDone'])) {
		if ($params['filter_reminderFop_fints_buchungForderungen_forderungDone'] == '_null') {
			array_push($filters, _('Forderung behandelt') . ': ' . 'NULL');
		} else {
			$values = [];
			foreach ((new \FOP\IDList($params['filter_reminderFop_fints_buchungForderungen_forderungDone']))->all() AS $val) {
				$value = $val;
				if ($value) array_push($values, $value);
			}
			array_push($filters, _('Forderung behandelt') . ': ' . implode(', ', $values));
		}
	}if (isset($params['filter_reminderFop_fints_buchungForderungen_bdate'])) {
		if ($params['filter_reminderFop_fints_buchungForderungen_bdate'] == '_null') {
			array_push($filters, _('Buchungsdatum') . ': ' . 'NULL');
		} else {
			$values = [];
			foreach ((new \FOP\IDList($params['filter_reminderFop_fints_buchungForderungen_bdate']))->all() AS $val) {
				$value = ($val) ? strftime(_('dateformat_php2'), intval($val)) : '';
				if ($value) array_push($values, $value);
			}
			array_push($filters, _('Buchungsdatum') . ': ' . implode(', ', $values));
		}
	}if (isset($params['filter_reminderFop_fints_buchungForderungen_date'])) {
		if ($params['filter_reminderFop_fints_buchungForderungen_date'] == '_null') {
			array_push($filters, _('Wertstellungsdatum') . ': ' . 'NULL');
		} else {
			$values = [];
			foreach ((new \FOP\IDList($params['filter_reminderFop_fints_buchungForderungen_date']))->all() AS $val) {
				$value = ($val) ? strftime(_('dateformat_php2'), intval($val)) : '';
				if ($value) array_push($values, $value);
			}
			array_push($filters, _('Wertstellungsdatum') . ': ' . implode(', ', $values));
		}
	}if (isset($params['filter_reminderFop_fints_buchungForderungen_betrag'])) {
		if ($params['filter_reminderFop_fints_buchungForderungen_betrag'] == '_null') {
			array_push($filters, _('Betrag') . ': ' . 'NULL');
		} else {
			$values = [];
			foreach ((new \FOP\IDList($params['filter_reminderFop_fints_buchungForderungen_betrag']))->all() AS $val) {
				$value = \Types\Euro::print($val) .  ' €'
	;
				if ($value) array_push($values, $value);
			}
			array_push($filters, _('Betrag') . ': ' . implode(', ', $values));
		}
	}if (isset($params['filter_reminderFop_fints_buchungForderungen_saldo'])) {
		if ($params['filter_reminderFop_fints_buchungForderungen_saldo'] == '_null') {
			array_push($filters, _('Saldo') . ': ' . 'NULL');
		} else {
			$values = [];
			foreach ((new \FOP\IDList($params['filter_reminderFop_fints_buchungForderungen_saldo']))->all() AS $val) {
				$value = \Types\Euro::print($val) .  ' €'
	;
				if ($value) array_push($values, $value);
			}
			array_push($filters, _('Saldo') . ': ' . implode(', ', $values));
		}
	}if (isset($params['filter_reminderFop_fints_buchungForderungen_iban'])) {
		if ($params['filter_reminderFop_fints_buchungForderungen_iban'] == '_null') {
			array_push($filters, _('IBAN') . ': ' . 'NULL');
		} else {
			$values = [];
			foreach ((new \FOP\IDList($params['filter_reminderFop_fints_buchungForderungen_iban']))->all() AS $val) {
				$value = $val;
				if ($value) array_push($values, $value);
			}
			array_push($filters, _('IBAN') . ': ' . implode(', ', $values));
		}
	}if (isset($params['filter_reminderFop_fints_buchungForderungen_name_firma'])) {
		if ($params['filter_reminderFop_fints_buchungForderungen_name_firma'] == '_null') {
			array_push($filters, _('Name, Vorname/Firma') . ': ' . 'NULL');
		} else {
			$values = [];
			foreach ((new \FOP\IDList($params['filter_reminderFop_fints_buchungForderungen_name_firma']))->all() AS $val) {
				$value = $val;
				if ($value) array_push($values, $value);
			}
			array_push($filters, _('Name, Vorname/Firma') . ': ' . implode(', ', $values));
		}
	}if (isset($params['filter_reminderFop_fints_buchungForderungen_vzweck'])) {
		if ($params['filter_reminderFop_fints_buchungForderungen_vzweck'] == '_null') {
			array_push($filters, _('Verwendungszweck') . ': ' . 'NULL');
		} else {
			$values = [];
			foreach ((new \FOP\IDList($params['filter_reminderFop_fints_buchungForderungen_vzweck']))->all() AS $val) {
				$value = $val;
				if ($value) array_push($values, $value);
			}
			array_push($filters, _('Verwendungszweck') . ': ' . implode(', ', $values));
		}
	}if (isset($params['filter_reminderFop_fints_buchungForderungen_endtoend'])) {
		if ($params['filter_reminderFop_fints_buchungForderungen_endtoend'] == '_null') {
			array_push($filters, _('End to End-Referenz') . ': ' . 'NULL');
		} else {
			$values = [];
			foreach ((new \FOP\IDList($params['filter_reminderFop_fints_buchungForderungen_endtoend']))->all() AS $val) {
				$value = $val;
				if ($value) array_push($values, $value);
			}
			array_push($filters, _('End to End-Referenz') . ': ' . implode(', ', $values));
		}
	}if (isset($params['filter_reminderFop_fints_buchungForderungen_umsatzart'])) {
		if ($params['filter_reminderFop_fints_buchungForderungen_umsatzart'] == '_null') {
			array_push($filters, _('Umsatzart') . ': ' . 'NULL');
		} else {
			$values = [];
			foreach ((new \FOP\IDList($params['filter_reminderFop_fints_buchungForderungen_umsatzart']))->all() AS $val) {
				$value = $val;
				if ($value) array_push($values, $value);
			}
			array_push($filters, _('Umsatzart') . ': ' . implode(', ', $values));
		}
	}if (isset($params['filter_reminderFop_fints_buchungForderungen_hash'])) {
		if ($params['filter_reminderFop_fints_buchungForderungen_hash'] == '_null') {
			array_push($filters, _('Hashcode') . ': ' . 'NULL');
		} else {
			$values = [];
			foreach ((new \FOP\IDList($params['filter_reminderFop_fints_buchungForderungen_hash']))->all() AS $val) {
				$value = $val;
				if ($value) array_push($values, $value);
			}
			array_push($filters, _('Hashcode') . ': ' . implode(', ', $values));
		}
	}if (isset($params['filter_reminderFop_fints_buchungForderungen_konto'])) {
		if ($params['filter_reminderFop_fints_buchungForderungen_konto'] == '_null') {
			array_push($filters, _('Konto') . ': ' . _(''));
		} else {
			$values = [];
			foreach ((new \FOP\IDList($params['filter_reminderFop_fints_buchungForderungen_konto']))->all() AS $val) {
				$value = 
  \FOP\Database::query('SELECT '.qi('fop_fints_konto').'.'.qi('kontoname').' AS description FROM '.qi('fop_fints_konto').' WHERE '.qi('ID').' = ' . \FOP\Database::quote($val))->fetchColumn() ?: _('')
;
				if ($value) array_push($values, $value);
			}
			array_push($filters, _('Konto') . ': ' . implode(', ', $values));
		}
	}if (isset($params['search_reminderFop_fints_buchungForderungen_iban'])) {
		array_push($filters, _('iban') . ' ' . _('filter_contains') . ' ' . $params['search_reminderFop_fints_buchungForderungen_iban']);
	}if (isset($params['search_reminderFop_fints_buchungForderungen_name_firma'])) {
		array_push($filters, _('name_firma') . ' ' . _('filter_contains') . ' ' . $params['search_reminderFop_fints_buchungForderungen_name_firma']);
	}if (isset($params['search_reminderFop_fints_buchungForderungen_vzweck'])) {
		array_push($filters, _('vzweck') . ' ' . _('filter_contains') . ' ' . $params['search_reminderFop_fints_buchungForderungen_vzweck']);
	}if (isset($params['search_reminderFop_fints_buchungForderungen_endtoend'])) {
		array_push($filters, _('endtoend') . ' ' . _('filter_contains') . ' ' . $params['search_reminderFop_fints_buchungForderungen_endtoend']);
	}if (isset($params['search_reminderFop_fints_buchungForderungen_umsatzart'])) {
		array_push($filters, _('umsatzart') . ' ' . _('filter_contains') . ' ' . $params['search_reminderFop_fints_buchungForderungen_umsatzart']);
	}if (isset($params['search_reminderFop_fints_buchungForderungen_hash'])) {
		array_push($filters, _('hash') . ' ' . _('filter_contains') . ' ' . $params['search_reminderFop_fints_buchungForderungen_hash']);
	}if (isset($params['searchnot_reminderFop_fints_buchungForderungen_iban'])) {
		array_push($filters, _('iban') . ' ' . _('filter_contains_not') . ' ' . $params['searchnot_reminderFop_fints_buchungForderungen_iban']);
	}if (isset($params['searchnot_reminderFop_fints_buchungForderungen_name_firma'])) {
		array_push($filters, _('name_firma') . ' ' . _('filter_contains_not') . ' ' . $params['searchnot_reminderFop_fints_buchungForderungen_name_firma']);
	}if (isset($params['searchnot_reminderFop_fints_buchungForderungen_vzweck'])) {
		array_push($filters, _('vzweck') . ' ' . _('filter_contains_not') . ' ' . $params['searchnot_reminderFop_fints_buchungForderungen_vzweck']);
	}if (isset($params['searchnot_reminderFop_fints_buchungForderungen_endtoend'])) {
		array_push($filters, _('endtoend') . ' ' . _('filter_contains_not') . ' ' . $params['searchnot_reminderFop_fints_buchungForderungen_endtoend']);
	}if (isset($params['searchnot_reminderFop_fints_buchungForderungen_umsatzart'])) {
		array_push($filters, _('umsatzart') . ' ' . _('filter_contains_not') . ' ' . $params['searchnot_reminderFop_fints_buchungForderungen_umsatzart']);
	}if (isset($params['searchnot_reminderFop_fints_buchungForderungen_hash'])) {
		array_push($filters, _('hash') . ' ' . _('filter_contains_not') . ' ' . $params['searchnot_reminderFop_fints_buchungForderungen_hash']);
	}
		if (count($filters)) {
			$result = implode($delimiter, array_map(function ($filter) {
				if (is_array($filter)) {
					return implode('', $filter);
				}
				return htmlentities($filter);
			}, $filters))
			// Button, um Filter zu entfernen
			. ($showButton ? '<i class="material-icons fop-small" style="cursor: pointer;" onclick="for (var q in query) {if (q.includes(\'_reminderFop_fints_buchungForderungen_\')) delete query[q];} reloadreminderFop_fints_buchungForderungen(); ">clear</i>' : '');
		} else {
			$result = _('no_filter');
		}
		return $result;
	
    
  }

  public static function openAction($fop_table, $fop_id, $fop_from) { 
    
    
    // --- BLOCK: access ---
    
    // --- BLOCK: main ---
    

if ($fop_table == 'fop_fints_buchung') {
	\FOP\Session::setPayload('dv-fop_fints_buchung', [
		'id' => 'reminderFop_fints_buchungForderungen',
		'tbl' => 'fop_fints_buchung',
		'idcol' => 'ID',
		'prev' => \DataViewRouter\ReminderFop_fints_buchungForderungen::stepURL('fop_fints_buchung', 'XXX', -1),
		'next' => \DataViewRouter\ReminderFop_fints_buchungForderungen::stepURL('fop_fints_buchung', 'XXX',  1),
		'from' => $fop_from
	]);
	
	if ($fop_id == '_') return; // nur Rückreferenz setzen, nicht öffnen
	$params = [];
	if (isset($_GET['popup'])) $params['popup'] = true;
	if (isset($_GET['from'])) $params['from'] = $_GET['from'];
	$params['id'] = $fop_id;
	
	$url = \TablesRouter\Fop_fints_buchung::viewURL2($params);
	header('Location: ' . $url);
}

die();
    
  }

  public static function stepAction($tbl, $id, $step) { 
    
    
    // --- BLOCK: access ---
    
    // --- BLOCK: main ---
    
	$dv = \FOP\Session::getPayload('dv-'.$tbl);
	$url = $dv['from'];
	$parts = parse_url($url);
	parse_str($parts['query'], $query);
	$data = self::getData('', $query);
	$col = $dv['idcol'];
	$ids = array_map(function ($x) use ($col) {return $x[$col];}, $data['items']);
	if (!count($ids)) {
		header('Location: ' . \FOP\Util::getCurrentBaseurl() . 'Tables/' . preg_replace('/[^a-zA-Z0-9_]/', '_', ucfirst($dv['tbl'])));
		die();
	}
	$idx = array_search($id, $ids);
	$idx += count($ids) + $step;
	$idx = $idx % count($ids);
	header('Location: ' . \FOP\Util::getCurrentBaseurl() . 'Tables/' . preg_replace('/[^a-zA-Z0-9_]/', '_', ucfirst($dv['tbl'])) . '/view?id=' . urlencode($ids[$idx]));
	die();

    
  }

  public static function viewAction() { 
    
    
    // --- BLOCK: access ---
    if(!(((\FOP\User::getBuchhaltung()) && (\FOP\User::getBuchhaltung())))) throw new \FOP\AccessDeniedException();
    // --- BLOCK: main ---
    ?><?php
			header('Content-Type: text/html; charset=UTF-8');
			header('X-XSS-Protection: 1; mode=block');
			header('Strict-Transport-Security: max-age=63072000');
			header('X-Content-Type-Options: nosniff');
			header("Content-Security-Policy: default-src *  data: blob: 'unsafe-inline' 'unsafe-eval'; script-src * 'unsafe-inline' 'unsafe-eval'; connect-src * 'unsafe-inline'; img-src * data: blob: 'unsafe-inline'; frame-src *; style-src * data: blob: 'unsafe-inline'; font-src * data: blob: 'unsafe-inline';");


		?><!DOCTYPE html><html><head><title><?php echo(_('unbehandelte Zahlungseingänge')); ?></title><base href='<?php echo \FOP\Util::getCurrentBaseurl(); ?>'><meta name="google" content="notranslate"><meta http-equiv="Content-Language" content="<?php echo htmlentities(\FOP\I18n::getLocale()); ?>"><meta charset="utf-8"><link rel="stylesheet" type="text/css" href="style_dependencies.css?v=<?php echo(\FOP\Util::getVersionAppendix()); ?>"><link rel="stylesheet" type="text/css" href="style.css?v=<?php echo(\FOP\Util::getVersionAppendix()); ?>"><script type="text/javascript" src="js/script_dependencies.js?v=<?php echo(\FOP\Util::getVersionAppendix()); ?>"></script><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="mobile-web-app-capable" content="yes"><link rel="manifest" href="manifest.webmanifest"><script type="text/javascript">moment.locale('<?php echo(\FOP\I18n::getShortLocale()); ?>');</script><script type="text/javascript" src="js/form.js"></script><script type="text/javascript">window.globals = <?php
	echo json_encode(['user:superadmin' => /* TODO: resanitizer später mal */(integer) \FOP\User::getSuperadmin(), 'user:mitglied' => /* TODO: resanitizer später mal */(integer) \FOP\User::getMitglied(), 'user:gruppe' => /* TODO: resanitizer später mal */(integer) \FOP\User::getGruppe(), 'user:campaign' => /* TODO: resanitizer später mal */(integer) \FOP\User::getCampaign(), 'user:sammlung' => /* TODO: resanitizer später mal */(integer) \FOP\User::getSammlung(), 'user:protokoll' => /* TODO: resanitizer später mal */(integer) \FOP\User::getProtokoll(), 'user:ID' => /* TODO: resanitizer später mal */(integer) \FOP\User::getID(), 'user:buchhaltung' => /* TODO: resanitizer später mal */(integer) \FOP\User::getBuchhaltung()]);
?>;</script><script type="text/javascript" src="angular/<?php echo(\FOP\I18n::getShortLocale()); ?>/js/alltypes.js?v=<?php echo(\FOP\Util::getVersionAppendix()); ?>"></script><script type="text/javascript" src="angular/angular-i18n/angular-locale_<?php echo \FOP\I18n::getAngularLocale(); ?>.js"></script><script type="text/javascript" src="js/date-filter.js"></script><script type="text/javascript" src="js/dropdown.js"></script><script type="text/javascript" src="js/numeric.js"></script><script type="text/javascript" src="js/getparam.js"></script><script type="text/javascript" src="js/tables.js"></script>
		<script type="text/javascript" src="js/parsehash.js"></script><script type="text/javascript">
		window.query = <?php echo json_encode($_GET, JSON_FORCE_OBJECT); ?>;
		window.baseurl = <?php echo json_encode(\FOP\Util::getCurrentBaseurl()); ?>;

		window.i18n_weiter = <?php echo json_encode(_('Weiter'));?>;
		//Filter I18n:
		window.i18n_quartal = <?php echo json_encode(_('Quarter'));?>;
		window.i18n_alle = <?php echo json_encode(_('All'));?>;
		window.i18n_leere = <?php echo json_encode(_('Empty'));?>;
		window.i18n_tag = <?php echo json_encode(_('Tag'));?>;
		window.i18n_woche = <?php echo json_encode(_('Woche'));?>;
		window.i18n_zeitraum = <?php echo json_encode(_('Period'));?>;
		window.i18n_monat = <?php echo json_encode(_('Monat'));?>;
		window.i18n_jahr = <?php echo json_encode(_('Jahr'));?>;
		window.i18n_von = <?php echo json_encode(_('filters_from'));?>;
		window.i18n_bis = <?php echo json_encode(_('filters_to'));?>;
		window.i18n_tabButton = <?php echo json_encode(_('open_in_new_tab'));?>;
		window.i18n_closeButton = <?php echo json_encode(_('close'));?>;
		</script></head><script type="text/javascript">const fopPushPublicKey = '<?php echo(addslashes(\FOP\Configuration::getFOPPushPublicKey())); ?>';
        const fopUserID = <?php echo(intval(\FOP\User::getID())); ?>;
        var fopPushDisabled = false;
    </script><script type="text/javascript" src="js/serviceworkersetup.js"></script><body ng-app='app'>
		<div class='mdl-js-snackbar mdl-snackbar' id='snackbar'>
			<div class='mdl-snackbar__text'></div>
			<button class='mdl-snackbar__action' type='button'></button>
		</div>
		<script>
			var snackbar = document.querySelector('#snackbar');
			componentHandler.upgradeElement(snackbar, 'MaterialSnackbar');
			$(function () {
				setTimeout(function () {
					$('.fop-layout').scrollTop(0);
				}, 0);
			});
		</script>

		<?php if (isset($_GET['popup'])) { ?>
		<header class="fop-header mdl-layout__header mdl-layout__header mdl-layout__header--scroll">
				<div class="mdl-layout__header-row">
					<span class="mdl-layout-title"><?php echo(_('unbehandelte Zahlungseingänge')); ?></span><div class="mdl-layout-spacer"></div><span class="noprint mdl-layout-title mdl-layout--large-screen-only"><div class="mdl-textfield mdl-js-textfield"><input id="supersearch" accesskey="f" class="mdl-textfield__input" type="text" onkeydown="if (event.keyCode == 13 && this.value) window.location.href = 'FOP/Index/searchURL?q=' + encodeURIComponent(this.value) + '&from=<?php echo htmlentities(urlencode(\FOP\Util::getBackUrl())); ?>';" value="<?php echo htmlentities($_GET['q'] ?? ''); ?>" style="border-bottom: 1px solid white;"/><label class="mdl-textfield__label" style="color: inherit"><?php echo(_('search')); ?> - <?php
		if (strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') !== false) {
			// MAC: Control+ davor
			echo 'Control + ';
		}
		if (strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== false) {
			// Firefox
			if (strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') !== false) {
				// MAC: Control + Alt + key
				echo 'Alt + F';
			} else {
				echo 'Alt + Shift + F';
			}
		} else {
			// Internet Explorer, Chrome, Safari, Opera
			echo 'Alt + F';
		}
	?></label></div></span><i onclick='addFav(null)' class='material-icons fop-favorites' id='favorites_button'>star_border</i>
				</div>
      	</header>
			<style>
				.content {
					margin-top: 0px !important;
				}
			</style>
			<div id='content' class='popup' >
		<?php } else { ?>
			<div class="fop-layout mdl-layout mdl-js-layout mdl-layout--fixed-drawer mdl-layout--fixed-header">
			<header class="fop-header mdl-layout__header mdl-layout__header mdl-layout__header--scroll">
				<div class="mdl-layout__header-row">
					<span class="mdl-layout-title"><?php echo(_('unbehandelte Zahlungseingänge')); ?></span><div class="mdl-layout-spacer"></div><span class="noprint mdl-layout-title mdl-layout--large-screen-only"><div class="mdl-textfield mdl-js-textfield"><input id="supersearch" accesskey="f" class="mdl-textfield__input" type="text" onkeydown="if (event.keyCode == 13 && this.value) window.location.href = 'FOP/Index/searchURL?q=' + encodeURIComponent(this.value) + '&from=<?php echo htmlentities(urlencode(\FOP\Util::getBackUrl())); ?>';" value="<?php echo htmlentities($_GET['q'] ?? ''); ?>" style="border-bottom: 1px solid white;"/><label class="mdl-textfield__label" style="color: inherit"><?php echo(_('search')); ?> - <?php
		if (strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') !== false) {
			// MAC: Control+ davor
			echo 'Control + ';
		}
		if (strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== false) {
			// Firefox
			if (strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') !== false) {
				// MAC: Control + Alt + key
				echo 'Alt + F';
			} else {
				echo 'Alt + Shift + F';
			}
		} else {
			// Internet Explorer, Chrome, Safari, Opera
			echo 'Alt + F';
		}
	?></label></div></span><i onclick='addFav(null)' class='material-icons fop-favorites' id='favorites_button'>star_border</i>
				</div>
      		</header>


				<?php  \EasyEditor\Navigation::render(); ?>
      
				<main class="mdl-layout__content" id="content">
					<div class="fop-content">
						<?php } ?>
						
							<div class="content" id="1">
								

								<div
								 
								id="cardform-reminderFop_fints_buchungForderungen"
								style="width: 100%; height: 100%;"
								class='mdl-grid'
									ng-controller="FormReminderFop_fints_buchungForderungen" ng-init="form = <?php echo htmlentities(json_encode([]));
									?>;"
								>
								<?php
								 ?>
								<div id='fop-upbar'></div>
								<?php \DataView\ReminderFop_fints_buchungForderungen::renderScript(); ?>
									<?php
									$features = [];
									if (true && (true)) {
									$feature = [
										'id' => 'main_table',
										'title' => _('table'),
										'order' => '500-100', // 500-100 (50)
										'mode' => 'area', // area (51) / tab (50)
										'position' => 'full', // 
										'collapsed' => 0, // 0 (51) / 1 (50)
										'canEdit' => !\FOP\User::getIsGuest(),
										'visibility' => null
									];
									$features[$feature['id']] = $feature;
									}
									

									
									/* load order from database
										schema: fop_form_feature(user, form, subid, key, value)
										key = (order, mode, position, collapsed)
									*/
									$upbar_collapsed = false;
									// default values
									foreach (\FOP\Database::query('SELECT subid, '.qi('key').', (SELECT '.qi('value').' FROM fop_form_feature b WHERE a.subid = b.subid AND a.'.qi('key').' = b.'.qi('key').' AND '.qi('user').' = '.intval(\FOP\User::getID()).' GROUP BY '.qi('value').' ORDER BY COUNT(*) DESC LIMIT 1) AS '.qi('value').' FROM fop_form_feature a WHERE '.qi('user').' = '.intval(\FOP\User::getID()).' GROUP BY subid, '.qi('key'))->fetchAll(\PDO::FETCH_ASSOC) AS $setting) {
										if (isset($features[$setting['subid']])) {
											$features[$setting['subid']][$setting['key']] = $setting['value'];
										}
									}
									// form specific special values
									foreach (\FOP\Database::query('SELECT subid, '.qi('key').', '.qi('value').' FROM fop_form_feature a WHERE form = \'reminderFop_fints_buchungForderungen\' AND '.qi('user').' = '.intval(\FOP\User::getID()).'')->fetchAll(\PDO::FETCH_ASSOC) AS $setting) {
										if (isset($features[$setting['subid']])) {
											$features[$setting['subid']][$setting['key']] = $setting['value'];
										} else if ($setting['subid'] == 'upbar' && $setting['key'] == 'collapsed') {
											$upbar_collapsed = (bool) $setting['value'];
										}
									}

									/* fill in the content of the features */
									if (true && (true)) {
										ob_start();
										\EasyEditor\FormFeature::push($features['main_table']);
										?>
	<?php if (((\FOP\User::getBuchhaltung()) && (\FOP\User::getBuchhaltung()))) { ?>
	<div id="reminderFop_fints_buchungForderungen-table" class="fop-dv"><?php
		if (\EasyEditor\FormFeature::isCollapsed()) {
			// #3198 lazy rendering:
			echo '<div class="fop-lazy-reload" onclick="reloadreminderFop_fints_buchungForderungen()"></div>'; // CSS class .fop-lazy-reload will be clicked after being showed
		} else {
			\DataView\ReminderFop_fints_buchungForderungen::renderTabTableAction();
		}
	?></div>
	<?php } ?>
	<?php
										\EasyEditor\FormFeature::pop();
										$features['main_table']['html'] = ob_get_contents();
										ob_end_clean();
									}
									

									uasort($features, function ($a, $b) {
										return strnatcmp($a['order'], $b['order']);
									});
									foreach ($features AS $feature) {
										\EasyEditor\FormFeature::render($feature);
									}
									?><script type='text/javascript'>
										$(function(){
											// bei Änderungen: prüfen, ob Form geändert wurde
											var formData = $('#cardform-reminderFop_fints_buchungForderungen').serialize();
											document.body.onbeforeunload = function () {
												if (formData != $('#cardform-reminderFop_fints_buchungForderungen').serialize()) {
													return 'Form data has changed - are you sure??';
												}
											};
											$('#cardform-reminderFop_fints_buchungForderungen').on('submit', function () {
												document.body.onbeforeunload = undefined;
											});
											<?php if ($upbar_collapsed) {
												?>$('#fop-bar-mainbutton').click();<?php
											} ?>
											$('#fop-bar-mainbutton').click(function () {
												setTimeout(function () {
													setCFF('upbar', 'collapsed', $('#fop-bar-container').is(':visible') ? 0 : 1);
												}, 440); /* perfect timing for fadeOut */
											});
										});
										
										function setCFF(id, key, value) {
											<?php if(!\FOP\User::getIsGuest()) { ?>
											$.get('FOP/Index/setCFF?form=reminderFop_fints_buchungForderungen&subid=' + encodeURIComponent(id) + '&key=' + encodeURIComponent(key) + '&value=' + encodeURIComponent(value)).then(function () {
												if (key == 'reset') {
													location.reload();
												}
											});
											<?php } /* EditAccess */ ?>
										}
										function setCFFOrder(fids) {
											<?php if(!\FOP\User::getIsGuest()) { ?>
											$.get('FOP/Index/setCFFOrder?form=reminderFop_fints_buchungForderungen&fids=' + encodeURIComponent(JSON.stringify(fids)));
											<?php } /* EditAccess */ ?>
										}
										$(function () {
											refreshTabHeaders($('#cardform-reminderFop_fints_buchungForderungen')); /* provided in js/form.js */
											// preselection
											if (location.hash.startsWith('#select:')) {
												$('[name="' + window.location.hash.slice(8) + '"]').focus().select();
											} else {
												$('#cardform-reminderFop_fints_buchungForderungen input[type!="hidden"],textarea,select[tabindex!="-1"]').not('.fop-disabled *').filter(':visible:first').focus().select();
											}
										});

										$(window).keydown(function(event) {
											 if (event.ctrlKey && String.fromCharCode(event.which).toLowerCase() == 's') {
												 event.preventDefault();
												 $('button[type=submit]').click();
												 return false;
											 }
										});

										
										$(document).on('keyup',function(evt) {
										   if (evt.keyCode == 27) {
												if (window.parent) {
													window.close(); // iframe:close
												} else {
													window.history.back();
												}
											}
												});
										
									</script>

							</div>
							

							</div>
							<div class="content" id="focus-supersearch">
		<script type='text/javascript'>
			$(function () {
				var focusfield = $('#supersearch');
				
				if (focusfield.length) {
					focusfield[0].focus();
					focusfield[0].select();
				}
			});
		</script>
	
							</div>
						<?php if (!isset($_GET['popup'])) { ?>
					</div>
				</main>
				
			</div>
		<?php } else { ?></div><?php } ?>
<?php if (!isset($_GET['popup'])) { ?><div class='fop-seal'></div><?php } ?></body></html><?php
    
  }


  
  

  
  
}



