mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2025-01-12 23:01:14 +01:00
Fixed versandzentrum filters
This commit is contained in:
parent
b52354b1ad
commit
6ff92c0900
@ -204,9 +204,6 @@ class Auftrag extends GenAuftrag
|
|||||||
$heading[] = 'Monitor';
|
$heading[] = 'Monitor';
|
||||||
$heading[] = 'Menü';
|
$heading[] = 'Menü';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$parameter = $this->app->User->GetParameter('table_filter_auftrag');
|
$parameter = $this->app->User->GetParameter('table_filter_auftrag');
|
||||||
$parameter = base64_decode($parameter);
|
$parameter = base64_decode($parameter);
|
||||||
$parameter = json_decode($parameter, true);
|
$parameter = json_decode($parameter, true);
|
||||||
@ -583,11 +580,9 @@ class Auftrag extends GenAuftrag
|
|||||||
|
|
||||||
$allowed['auftraegeoffeneauto'] = array('list');
|
$allowed['auftraegeoffeneauto'] = array('list');
|
||||||
|
|
||||||
$heading = array('','', 'Auftrag', 'Vom', 'Kd-Nr.', 'Kunde', 'Land', 'Zahlung', 'Betrag (brutto)','Monitor','Menü');
|
$heading = array('','','Lane', 'Auftrag', 'Vom', 'Kd-Nr.', 'Kunde','Lieferdatum', 'Land', 'Zahlung', 'Betrag (brutto)','Monitor','Menü');
|
||||||
$width = array('1%','1%', '10%', '10%', '10%', '31%', '5%', '1%', '1%', '1%', '1%', '1%','0%','0%');
|
$width = array('1%','1%','1%', '10%', '10%', '10%', '31%', '5%', '1%', '1%', '1%', '1%', '1%','0%','0%');
|
||||||
|
$findcols = array('open','a.belegnr','lane', 'a.belegnr', 'a.datum', 'a.lieferantkdrnummer', 'a.name','a.tatsaechlicheslieferdatum', 'a.land', 'a.zahlungsweise', 'a.gesamtsumme');
|
||||||
$findcols = array('open','a.belegnr', 'a.belegnr', 'a.datum', 'a.lieferantkdrnummer', 'a.name', 'a.land', 'a.zahlungsweise', 'a.gesamtsumme');
|
|
||||||
|
|
||||||
|
|
||||||
$defaultorder = 1;
|
$defaultorder = 1;
|
||||||
$defaultorderdesc = 0;
|
$defaultorderdesc = 0;
|
||||||
@ -598,10 +593,12 @@ class Auftrag extends GenAuftrag
|
|||||||
a.id,
|
a.id,
|
||||||
'<img src=./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/details_open.png class=details>' AS `open`,
|
'<img src=./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/details_open.png class=details>' AS `open`,
|
||||||
CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',a.id,'\" />') AS `auswahl`,
|
CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',a.id,'\" />') AS `auswahl`,
|
||||||
|
IF(a.fastlane=1,'fast','standard') AS `lane`,
|
||||||
belegnr,
|
belegnr,
|
||||||
DATE_FORMAT(a.datum,'%d.%m.%Y') AS `datum`,
|
DATE_FORMAT(a.datum,'%d.%m.%Y') AS `datum`,
|
||||||
lieferantkdrnummer,
|
lieferantkdrnummer,
|
||||||
name,
|
name,
|
||||||
|
DATE_FORMAT(a.tatsaechlicheslieferdatum,'%d.%m.%Y') as `tatsaechlicheslieferdatum`,
|
||||||
land,
|
land,
|
||||||
zahlungsweise,
|
zahlungsweise,
|
||||||
gesamtsumme,
|
gesamtsumme,
|
||||||
@ -610,16 +607,59 @@ class Auftrag extends GenAuftrag
|
|||||||
FROM
|
FROM
|
||||||
auftrag a";
|
auftrag a";
|
||||||
|
|
||||||
$where = "a.status = 'freigegeben'";
|
$status_where = 'a.lager_ok=1 && a.porto_ok=1 && a.ust_ok=1 && a.vorkasse_ok=1 && a.nachnahme_ok=1 && a.autoversand=1 && a.check_ok=1 && a.kreditlimit_ok=1 && a.liefersperre_ok=1'; // liefertermin_ok special treatment
|
||||||
|
|
||||||
|
$where = "a.status = 'freigegeben' && ".$status_where;
|
||||||
$count = "SELECT count(DISTINCT id) FROM auftrag a WHERE $where";
|
$count = "SELECT count(DISTINCT id) FROM auftrag a WHERE $where";
|
||||||
// $groupby = "";
|
// $groupby = "";
|
||||||
|
|
||||||
$moreinfo = true; // Allow drop down details
|
$moreinfo = true; // Allow drop down details
|
||||||
|
|
||||||
|
// Toggle filters
|
||||||
|
$this->app->Tpl->Add('JQUERYREADY', "$('#fastlane').click( function() { fnFilterColumn1( 0 ); } );");
|
||||||
|
$this->app->Tpl->Add('JQUERYREADY', "$('#auftrag_kundemehrereauftraege').click( function() { fnFilterColumn2( 0 ); } );");
|
||||||
|
$this->app->Tpl->Add('JQUERYREADY', "$('#auftrag_lieferdatum').click( function() { fnFilterColumn3( 0 ); } );");
|
||||||
|
|
||||||
|
for ($r = 1;$r <= 3;$r++) {
|
||||||
|
$this->app->Tpl->Add('JAVASCRIPT', '
|
||||||
|
function fnFilterColumn' . $r . ' ( i )
|
||||||
|
{
|
||||||
|
if(oMoreData' . $r . $name . '==1)
|
||||||
|
oMoreData' . $r . $name . ' = 0;
|
||||||
|
else
|
||||||
|
oMoreData' . $r . $name . ' = 1;
|
||||||
|
|
||||||
|
$(\'#' . $name . '\').dataTable().fnFilter(
|
||||||
|
\'\',
|
||||||
|
i,
|
||||||
|
0,0
|
||||||
|
);
|
||||||
|
}
|
||||||
|
');
|
||||||
|
}
|
||||||
|
|
||||||
|
$more_data1 = $this->app->Secure->GetGET("more_data1");
|
||||||
|
if ($more_data1 == 1) {
|
||||||
|
$where .= " AND a.fastlane=1";
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
|
||||||
|
$more_data3 = $this->app->Secure->GetGET("more_data3");
|
||||||
|
if ($more_data3 == 1) {
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$where .= " AND a.liefertermin_ok=1";
|
||||||
|
}
|
||||||
|
|
||||||
|
$more_data2 = $this->app->Secure->GetGET("more_data2");
|
||||||
|
if ($more_data2 == 1) $where .= " AND a.adresse in (SELECT adresse FROM `auftrag` a WHERE ".$where." GROUP BY adresse HAVING count(id) > 1)"; // More than 1 order per address
|
||||||
|
|
||||||
|
// END Toggle filters
|
||||||
|
|
||||||
$menu .= "<a href=\"index.php?module=auftrag&action=edit&id=%value%\">";
|
$menu .= "<a href=\"index.php?module=auftrag&action=edit&id=%value%\">";
|
||||||
$menu .= "<img src=\"themes/{$this->app->Conf->WFconf['defaulttheme']}/images/edit.svg\" border=\"0\">";
|
$menu .= "<img src=\"themes/{$this->app->Conf->WFconf['defaulttheme']}/images/edit.svg\" border=\"0\">";
|
||||||
$menu .= "</a>";
|
$menu .= "</a>";
|
||||||
$menucol = 8; // For moredata
|
$menucol = 9; // For moredata
|
||||||
|
|
||||||
break;
|
break;
|
||||||
/* case 'auftraegeoffeneautowartend':
|
/* case 'auftraegeoffeneautowartend':
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
<input type="checkbox" id="auftrag_lieferdatum">
|
<input type="checkbox" id="auftrag_lieferdatum">
|
||||||
<span class="slider round"></span>
|
<span class="slider round"></span>
|
||||||
</label>
|
</label>
|
||||||
<label for="auftrag_lieferdatum">{|nur Aufträge mit zukünftigem Lieferdatum|}</label>
|
<label for="auftrag_lieferdatum">{|inkl. Aufträge mit zukünftigem Lieferdatum|}</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user