close #1752 Fixed: Exception in documents "empty" page
This commit is contained in:
parent
61247dd5ae
commit
781ae067e9
@ -293,7 +293,13 @@ abstract class DocumentIndex extends Base
|
||||
return $page;
|
||||
}
|
||||
|
||||
return config('type.' . $type . '.route.prefix', 'invoices');
|
||||
$page = config('type.' . $type . '.route.prefix', 'invoices');
|
||||
|
||||
if ($alias = config('type.' . $type . '.alias')) {
|
||||
$page = $alias . '.' . $page;
|
||||
}
|
||||
|
||||
return $page;
|
||||
}
|
||||
|
||||
protected function getDocsPath($type, $docsPath)
|
||||
@ -309,16 +315,14 @@ abstract class DocumentIndex extends Base
|
||||
}
|
||||
|
||||
switch ($type) {
|
||||
case 'sale':
|
||||
case 'income':
|
||||
case 'invoice':
|
||||
$docsPath = 'sales/invoices';
|
||||
break;
|
||||
case 'bill':
|
||||
case 'expense':
|
||||
case 'purchase':
|
||||
$docsPath = 'purchases/bills';
|
||||
break;
|
||||
default:
|
||||
$docsPath = 'sales/invoices';
|
||||
break;
|
||||
}
|
||||
|
||||
return $docsPath;
|
||||
|
Loading…
x
Reference in New Issue
Block a user