Add location descriptions to report

master v1.1
Skylar Ittner 6 years ago
parent e57a43217e
commit a4555e808d

@ -138,9 +138,10 @@ function getLocationReport() {
$locs = $database->select('locations', [ $locs = $database->select('locations', [
'locid', 'locid',
'locname', 'locname',
'loccode' 'loccode',
'locinfo'
]); ]);
$header = [lang("id", false), lang("location", false), lang("code", false), lang("item count", false)]; $header = [lang("id", false), lang("location", false), lang("code", false), lang("item count", false), lang("description", false)];
$out = [$header]; $out = [$header];
for ($i = 0; $i < count($locs); $i++) { for ($i = 0; $i < count($locs); $i++) {
$itemcount = $database->count('items', ['locid' => $locs[$i]['locid']]); $itemcount = $database->count('items', ['locid' => $locs[$i]['locid']]);
@ -148,7 +149,8 @@ function getLocationReport() {
$locs[$i]["locid"], $locs[$i]["locid"],
$locs[$i]["locname"], $locs[$i]["locname"],
$locs[$i]["loccode"], $locs[$i]["loccode"],
$itemcount . "" $itemcount . "",
$locs[$i]["locinfo"]
]; ];
} }
return $out; return $out;

Loading…
Cancel
Save