{"id":13765436,"url":"https://github.com/buddhaCode/BucoPartDocuments","last_synced_at":"2025-05-10T21:30:58.615Z","repository":{"id":62497926,"uuid":"191908904","full_name":"buddhaCode/BucoPartDocuments","owner":"buddhaCode","description":"Shopware plugin to create order documents for just a subset of positions of an order.","archived":true,"fork":false,"pushed_at":"2019-06-14T08:53:04.000Z","size":426,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-11-17T01:32:49.360Z","etag":null,"topics":["document","part-document","shopware","shopware-plugin"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/buddhaCode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-14T08:48:08.000Z","updated_at":"2023-01-28T13:59:37.000Z","dependencies_parsed_at":"2022-11-02T11:33:09.899Z","dependency_job_id":null,"html_url":"https://github.com/buddhaCode/BucoPartDocuments","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buddhaCode%2FBucoPartDocuments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buddhaCode%2FBucoPartDocuments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buddhaCode%2FBucoPartDocuments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buddhaCode%2FBucoPartDocuments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buddhaCode","download_url":"https://codeload.github.com/buddhaCode/BucoPartDocuments/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253484907,"owners_count":21915918,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["document","part-document","shopware","shopware-plugin"],"created_at":"2024-08-03T16:00:38.879Z","updated_at":"2025-05-10T21:30:58.381Z","avatar_url":"https://github.com/buddhaCode.png","language":"PHP","readme":"# BucoPartDocuments\nShopware plugin to create order documents for just a subset of positions of an order.\n\n## Features\nThis plugin adds the ability to create an order document with just a subset\nof the order's positions. Therefore, the order's document tab has a new checkbox\nto enable the selection. Once selected, a new position grid becomes available to select the\ndesired positions. With no positions selected, an emtpy document will be created. This might\nbe useful, to place messages via the document's comment field.\n\n![Order's document tab](Resources/screenshots/screen1creation.png)\n\nTo indicate whether the document is a part document or a regular (\"full\") document, a moon and\nhalf moon icon will be introduced in several places like the document tab, the document quick\noverview and the mail window.\n\n![Mail attachment](Resources/screenshots/screen2mailAttachment.png)\n\n![Order liist document quick view](Resources/screenshots/screen3orderList.png)\n\nSending a document via e-mail will extend the mail context with a `$EventResult.bucoIsPartDocument`\nboolean variable, indicating the state of the attached document. So it's possible to render different\noutputs depending on the state of the document. E.g.:\n\n```smarty\n{if $EventResult.bucoIsPartDocument}\n    The attached document contains a subset of positions.\n{else}\n    The attached document contains a all positions.\n{/if}\n```\n\nThis variable is set, if the mail has ONE attachment only. With multiple attachments, the variable\nwould lose it's meaning.\n\n### Configuration\n\nIt's possible to restrict the creation of part documents to specific document types or templates.\n\n![Order's document tab](Resources/screenshots/screen0config.png)\n\n### Migration\nIf you were using the [mbdus Teildokumente erstellen](https://store.shopware.com/mbdus41476730029/teildokumente-erstellen.html) plugin before,\nthere is a migration assistant for you. This will migrate the mbdus part documents into this plugin.\nPlease beware, that this plugin has less features than the mbdus plugin. E.g. it's not possible to\nchange the recipients postal address. On the other hand, this implementation is much leaner and\nless error-prone.\n\n![Migration start](Resources/screenshots/screen4migrationStart.png)\n\n![Migration finished](Resources/screenshots/screen5migrationFinished.png)\n\nThe internal database IDs will be re-enumerated. The original primary key will be preserved in the\n`s_order_documents_attributes.buco_part_document_legacy_id` column for your service.\n\nThe access to the migration assistant is protected with an ACL resource. The `local_admin` user role\nis enabled by default. Otherwise, you might wish to grant other roles access to the `bucopartdocumentsmigration.migrate` privilege.\n\nThe mbdus plugin doesn't need to be installed anymore. After the uninstallation, the plugin left it's data tables behind.\nThis left-behinds are sufficient to do the migration. You'll have possibility to clean up these tables at the end of the migration process.\n\n### Programmatically Usage\nIf you need to create a part document programmatically, please pass the following arguments to the\n`initDocument()` method. Yes, some of the information are redundant. This is based on technical\nrestrictions. Please refer to the source code for further details. A [pull request (shopware/shopware#2121)](https://github.com/shopware/shopware/pull/2121) is pending,\nto address this issues.\n\n```php\n\\Shopware_Components_Document::initDocument($orderId, $docTypeId, [\n    'netto' =\u003e false,\n    'shippingCostsAsPosition' =\u003e true,\n    '_renderer' =\u003e 'pdf',\n    'bucoCreatePartDocument' =\u003e true,       // used to create part document\n    'bucoPartDocPosIds' =\u003e [1,2],           // used to create part document; not an index, but the s_order_details primary key\n    '_allowMultipleDocuments' =\u003e true,      // used to create part document\n    'attributes' =\u003e [\n        'bucoIsPartDocument' =\u003e true        // used to create part document\n    ],\n    'summaryNet' =\u003e [\n        'bucoCreatePartDocument' =\u003e true,   // used to create part document\n        'bucoPartDocPosIds' =\u003e [1,2]        // used to create part document; not an index, but the s_order_details primary key\n    ]\n]);\n```\n\n## Compatibility\n* Shopware \u003e= 5.5.0\n* PHP \u003e= 7.0\n* Migration from [mbdus Teildokumente erstellen](https://store.shopware.com/mbdus41476730029/teildokumente-erstellen.html) plugin\n\n## Installation\n\n### Git Version\n* Checkout plugin in `/custom/plugins/BucoPartDocuments`\n* Install and active plugin with the Plugin Manager\n\n### Install with composer\n* Change to your root installation of Shopware\n* Run command `composer require buddha-code/buco-part-documents`\n* Install and active plugin with `./bin/console sw:plugin:install --activate BucoPartDocuments`\n\n## Contributing\nFeel free to fork and send pull requests!\n\n## Licence\nThis project uses the [GPLv3 License](LICENCE).","funding_links":[],"categories":["Backend Plugins"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FbuddhaCode%2FBucoPartDocuments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FbuddhaCode%2FBucoPartDocuments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FbuddhaCode%2FBucoPartDocuments/lists"}