|
@@ -2595,6 +2595,20 @@ function addAllMatchesToReport(event) {
|
|
|
}
|
|
|
if ('kontrahenci' === event.data.type) {
|
|
|
p5UI__notifyAjaxCallback({ type: 'info', msg: "Pobieranie podmiotów/kontrahentów..." })
|
|
|
+
|
|
|
+ var frm = document.getElementById('filtersFieldRemoveBtn-KONTRAHENCI').form
|
|
|
+ var fieldNameList = FIELD_LIST_KONTRAHENCI
|
|
|
+ fieldNameList.filter(function (fieldName) {
|
|
|
+ if (!frm[fieldName] && DBG) console.log('Err missing field: "'+fieldName+'"')
|
|
|
+ return (frm[fieldName]) ? true : false
|
|
|
+ }).map(function (fieldName) {
|
|
|
+ return [ fieldName, frm[fieldName].value ]
|
|
|
+ }).filter(function (filter) {
|
|
|
+ return ( filter[1].length > 0 )
|
|
|
+ }).forEach(function (filter) {
|
|
|
+ postData[ filter[0] ] = filter[1];
|
|
|
+ })
|
|
|
+
|
|
|
global.fetch(URL_FETCH_KONTRAHENCI_IDS_AJAX, {
|
|
|
credentials: 'same-origin',
|
|
|
method: 'POST',
|