2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-03 04:00:57 +00:00

Company reports (#9817)

* Support report generation against company

* Add "print report" to Company table

* Add printing button to Company detail page

* Bump API version
This commit is contained in:
Oliver
2025-06-20 17:52:07 +10:00
committed by GitHub
parent 6229d2e8c8
commit 499e48cdd8
6 changed files with 41 additions and 5 deletions

View File

@ -19,6 +19,7 @@ import { ModelType } from '@lib/enums/ModelType';
import { UserRoles } from '@lib/enums/Roles';
import { apiUrl } from '@lib/functions/Api';
import AdminButton from '../../components/buttons/AdminButton';
import { PrintingActions } from '../../components/buttons/PrintingActions';
import {
type DetailsField,
DetailsTable
@ -290,6 +291,11 @@ export default function CompanyDetail(props: Readonly<CompanyDetailProps>) {
const companyActions = useMemo(() => {
return [
<AdminButton model={ModelType.company} id={company.pk} />,
<PrintingActions
modelType={ModelType.company}
items={[company.pk]}
enableReports
/>,
<OptionsActionDropdown
tooltip={t`Company Actions`}
actions={[

View File

@ -169,6 +169,8 @@ export function CompanyTable({
tableFilters: tableFilters,
tableActions: tableActions,
enableDownload: true,
enableSelection: true,
enableReports: true,
rowActions: rowActions
}}
/>