Skip to content

Commit a902614

Browse files
committed
Squashed 'package/marello/' changes from f688b50..9bdcb5f
9bdcb5f Merge commit '31e5dbd6a2b67a50f51ed8cd3c2e92b1d880bc20' into maintenance/3.1 934f722 Merge branch 'task/MAR10001-0-order-on-demand' into maintenance/3.1 af75dcc task/MAR10001-0-order-on-demand: - Added additional option to explictly enable inventory on demand d598f64 Merge branch 'task/MAR10001-0-order-on-demand' into maintenance/3.1 b16f33e - Reinstated the order on demand feature, with additional setting to turn it on and off via the system configuration 7317328 Merge branch 'bugfix/MAR10001-0-fix-issue-with-schema-update' into maintenance/3.1 38a655b - Fixed issue with schema update with updating table because of foreign key constraint a82942b Merge branch 'feature/MAR10001-988' into develop 4102983 Merge branch 'feature/MAR10001-988' into maintenance/3.1 a213c6b MAR10001-988: Minor fixed version of migration and create view changes 8e38e69 Merge branch 'feature/MAR10001-987' into maintenance/3.1 97521f4 Merge branch 'feature/MAR10001-987' into develop d40a92e MAR10001-968: Fixed unique name fields - unique on both: name, organization 715712f Add new reason for return items 80bbc82 Add additional fields to Return Entity, update views 9d50318 MAR10001-988: Add additional fields to Return Entity 4326c30 - fixed merged conflict 95385a3 Merge branch 'feature/MAR10001-984' into maintenance/3.1 84dd344 Merge branch 'feature/MAR10001-985' into maintenance/3.1 c77ae59 MAR10001-985: Rename Tabs/headings on the Return view page 8feec13 Add Customer information to Return view 5067315 Merge branch 'feature/MAR10001-0-update-oro-platform' into maintenance/3.1 91ca20f - Changed Marello CE/EE to include Oro Platform 4.1.14 - Updated applications to be able to run 7.4 normally - Updated branch aliases for packages efd26db Merge branch 'bugfix/MAR10001-0-fix-invalid-yaml-magento2-bundle' into maintenance/3.1 588f418 Merge branch 'task/MAR10001-0-add-product-status-validation' into develop 6c4c4ea task/MAR10001-0-add-product-status-validation: - Added check for product status before balancing inventory for said product - Added validation + validation message for Product status 2912aec Merge branch 'task/MAR10001-982-0-add-company-number-to-grid-and-filter' into develop ccd40f8 - added company number column, filter and sorter 4ba331e Merge branch 'merge-service-points-30' into maintenance/3.1 def0844 Merge branch 'feature/MAR10001-880' into merge-service-points-30 0e5e29c Merge branch 'feature/CRH19001-18_Service-points' into merge-service-points-30 e8749bd - fixed issue productUnit being submitted on order create, field should not be submitted at all ea5520e Merge commit '6dca2f914f41c1d50b12d89632b00f4c2bf4e2e3' into release/3.1 6dca2f9 Squashed 'applications/marello-application-ee/' changes from 0ec7b82..2c69360 42cb65b Merge commit 'e1d3bbf462667e07cca89196389fdfd925f4cd73' 9d60aab Merge branch 'release/3.1' 9844a91 Merge commit '8ef804780109269a9d0078c99b98f46751d8b922' cdcc150 Merge commit '1a6e4842329a1d135e43cd5092e0a40660ddb3fd' 564f132 - updated dev.json/dev.locks - added missing translations - psr fixes - updated package-json's cc33c5a - fixed layout on payment popup on Invoice/Creditmemo 9c0805f - Added product unit as additional information to OrderItem on order create 207ab18 - Uncommented previously commented for no obvious reason on the OrderItemType - Fixed translation on workflow 6cdba9e - Added view page for inventory batches - added changes regarding navigation around inventory and inventory batches - updated layout on inventory batch pages 280b221 - added manage batches inventory link on inventory level grid on inventory item view 5b1f26b - Fixed product name in datagrid for inventory item / balanced inventory level grid not being updated after changing the product's name f9e6fa6 - Added taxIdentificationNumber below company number on invoice entity view ccbf129 Merge branch 'bugfix/MAR10001-970-batch-allocation' into develop 60dc58e - Added small changes for batches; - added delivery date to batch form 1bae812 - Fixed issue with selecting organization when creating products and purchase order f8c7d7e - fixed inventory batch condition that didn't add the correct amount for a batch to a packingslip 3fdb8c7 - Added organization to query for finding a specific sku for an organization dd0b000 - removed old query reference 0f11915 bugfix/MAR10001-888-reports-per-organisation: - updated queries to cover organisation restriction e076656 - Added different calculation for total due on order view e87a498 - Fixed issue with loading images during demo install - Fixed groupBy issues with products grid e3868bd - Changed to Autocomplete for Customers to FullNameSearchHandler instead of the default searchhandler to include fullname 5161e0d Merge branch 'develop' into feature/MAR10001-930 94d467e - Added additional check to see which query needs to be running for updating tax_identification_number based on db driver 3f4cce3 - added hasColumn() checks on fields that might already be added in previous version 774a0c7 - changed conditional statement in checking wether the width needs to be applied to the logo of the pdf 224dac7 - Fixed idententation to match all others for actions.yml file - added additional css classes to make sure there is space between buttons of pdf and payment - added is_granted to pdf download button ea9e326 - Added fix for query on postgresql where customer tax identification is copied to company tax identification 96153fe Merge branch 'develop' into feature/MAR10001-894 9ca5b34 Merge branch 'bugfix/MAR10001-0-apply-fixes' into develop 0b1879a - Added minor fixes to purchase orders view and form 4cb837d - Added possibility to update cost via marello-supplier-product-grid 3069f27 Merge commit 'ffba2a1d74fe5713fd615d1fb3b6980a41cb9f31' into maintenance/3.0 2723bd7 Merge commit 'f497f93ca471ade418553eea3289318a7c4bca23' into maintenance/3.0 bc32cb4 Merge commit '71530acca5abd305f2c328d3f74bb414c1b89844' into maintenance/3.0 fcc9e1e Merge commit '0bcb9bb847396efc745579839904136a8252ed58' into maintenance/3.0 f7387ee Merge commit 'e779b8a1796d417078e3a9dfe89b0474e462caac' into maintenance/3.0 0846a6d Merge commit '4f68dc37da2773e1c4f6cee4e165f7a441154a90' into maintenance/3.0 7ffe871 Merge commit 'd34d82be891e77a23fd995c71dbfd92b8542ca00' into maintenance/3.0 b75b6e3 Merge branch 'bugfix/MAR10001-0-add-additional-check-customer-address-in-order-create' into develop d4218be - Added additional info on runtime exception for Product create/update if no default name is given - Added additional check on loading customer address when creating an order and the primary address is empty 7b5b79b - Removed redundant variable provider, functionality is already included in Marello\Bundle\ProductBundle\Twig\Provider\ProductUnitVariablesProvider c705b2c - Added translations to Payments datagrid on Order and Invoice views that reflect the datagrid data 08049b0 Merge branch 'develop' into feature/MAR10001-935 31fe089 Merge branch 'bugfix/MAR10001-0-purchaseorder-item-api' into develop d8cd80b - added additional check before loading the purchase price in the Purchase Order Item 16c1542 Merge branch 'task/MAR10001-0-added-extended-view-support-for-saleschannel' into develop c5e866d - Added support to display extended fields on SalesChannel view & grid 8b2ba42 Merge branch 'bugfix/MAR10001-0-add-extended-entity-names-to-datagrids' into develop f1ae5c3 - fixed issue with extended_entity_name in datagrid on the wrong spot in the configuration 89ad052 Merge branch 'bugfix/MAR10001-0-add-extended-entity-names-to-datagrids' into develop ac086a6 - added extended entity names to datagrids - added additional filters to balanced inventory level datagrid 0ef6266 Merge branch 'feature/MAR10001-0-add-option-to-remove-product-from-website-only' 89929b2 Merge branch 'bugfix/MAR10001-957-Company-validation-fails-on-update' into develop e4a5112 - Updated validation for company number as it was wrongly failing the validation when updating the company itself and not having another company using this number 977d0c7 Merge branch 'bugfix/MAR10001-966-product-categories' into develop ff92270 - updated product category grid on the category view to take the localized value of product name into account ef929bb Merge branch 'bugfix/MAR10001-499-Filtering-SalesChannel' into develop fb27de8 - Fixed issue with SalesChannels in colomn not being rendered in the Product grid - Fixed issue with SalesChannel filter in the Product grid 0b0b2d9 Merge branch 'bugfix/MAR10001-0-fix-order-reference-filter' into develop 1052506 - changed type of OrderReference filter to string in order data grid to filter correctly (changed filter type from number to string) 7046914 Merge branch 'task/MAR10001-0-add-acl-config-to-tax-related-entities' into develop de4c45e - added default ACL config value for Tax Related entities 1cfd56b Merge branch 'task/MAR10001-0-layout-fixes' into develop e533e03 - fixed issue with rendering customer view where brackets where missing - added block identifiers in purchase order view to target blocks easier with event listeners - renamed duedate label to expected delivery date, due date field only has renamed labels for this - updated PO form view listener to add the WH delivery to the billing and shipping info block on the form - added general and additional ui section label translations in core bundle - updated validation for due date as it did get stuck when due date was in the past and validation for the whole PO was done e2ec1d7 Merge branch 'task/MAR10001-0-skip-configurables-magento-integration' into develop 55eb3bf - fix issue with trying to display data based on an entity that isn't available ee8b561 Merge branch 'task/MAR10001-0-skip-configurables-magento-integration' 69c3020 - Added shipping method details to store additional information regarding the shipping method on the Marello Order b30e6a2 Merge commit '3bc4ba916ecf196dfea78f68e553d7358f415336' into maintenance/3.0 640751d Merge branch 'task/MAR10001-0-add-additional-dynamic-entity-fields' into develop 2fe8c53 - Added rendering for additional data block with dynamic entity fields 09708ba Merge branch 'task/MAR10001-0-add-force-flush-option-to-inventory-level-record' into develop fb69b55 - Added context option check for forceFlush in the inventorylevellogrecord ca7f87a Merge commit '5af3aae6bdb711c0d6537f67c359ab897877ef37' into maintenance/3.0 17b1a75 Merge branch 'task/MAR10001-0-validation-fixes' into develop bbc7ca8 - Updated validation groups for Order validation - Added SKU to the available inventory validation message 3d8c66e Merge branch 'bugfix/MAR10001-0-calculation-packingslipitem-weight' into develop c139869 - added additional data block on PackingSlip view - Updated weight calculation by multiplying it with the orderItem quantity in order to show the total weight for the row instead of the individual unit bd29a55 Merge branch 'maintenance/3.0' 5554263 Merge branch 'bugfix/MAR10001-0-change-forbidden-exception' into develop 2e6dbe3 - Added Symfony\Component\Security\Core\Exception\AccessDeniedException instead of Oro\Bundle\SecurityBundle\Exception\ForbiddenException in the ReturnController as this class has been removed - Added translation for exception for clarification b2f0374 Merge branch 'task/MAR10001-0-url-encode-magento-sku' into develop a523e45 - remove enum field with OWNER_CUSTOM from form type in ReturnItem form as this will be managed by the platform itself - fix small issue with upgrade to 1_3_x versions for SalesBundle as it might already have a foreinkey relation which doesn't allow for the unique index removal 2b47b38 - added url encoding for SKU in requests to Magento as it might have slashes in the sku - removed validation from items in Marello order as it seems like the Count validation is not properly going of or validating the data correctly for some reason... 3f06d61 multiple fixes 5ecd69d multiple fixes f407c95 Merge branch 'maintenance/3.0' 5860ffb Merge commit '63f5e481b1b580ab73bcf6fd1d98fa0ba7595542' into maintenance/3.0 3b86ae6 Merge branch 'maintenance/3.0' of https://github.com/marellocommerce/development-mono-repository into maintenance/3.0 10d5b30 - added default weight to products to prevent issues with assigning WH's in Packingslips and issues with shipment creation for UPS - Added migration that will update the default weight for products that don't have a weight yet (null) 5fd45f1 - added additional check on order view to make sure a customer exists on the order before trying to render properties of the customer f7824f4 Merge branch 'maintenance/3.0' into develop 728e339 MM-42: Test and fix functionality (#66) 5675d75 MM-42: Test and fix functionality (#65) ea13d64 MM-40: Test and fix import order functionality (#63) 741e626 MM-38: Implement sync processors (#61) e704e9f MM-35: Fix issue 'Removed special product price won't sync on Magento side' (#58) e2b15f0 Merge branch 'task/MAR10001-0-fix-productUnit-issue-email-template' into develop dedeb1b - added non proxy class of the Marello Product Unit as without this it can cause issues when the 'normal' class is used to send templates instead of the Proxy class of the product unit e124404 Merge branch 'task/MAR10001-0-fix-default-value-for-data-property-on-entities' into develop 9d80633 - Added default value for $data property as in most cases it will expect an array even if the data is not set on an Entity 82aab35 Merge branch 'task/MAR10001-0-added-product-unit-twig-variable-provider' into develop fc84ac4 Merge branch 'task/MAR10001-0-fix-shipping-context' into develop f92a606 - updated email templates with name variable for ProductUnit - updated migration version for the application to load the new templates 2c3af6f - added ProductUnit variable provider for rendering the product unit in the email templates as this is an enum field which is behaving as an extended entity with a proxy class that wasn't allowed in the email templates 626ff0f - Added the shipping origin based on WFA rules back for shipping methods that use the origin to determine shipping costs, the addres of the warehouse remains an estimation f6cf066 Merge branch 'task/MAR10001-0-fix-checking-wrong-field-for-available-inventory' into develop 659a93c - updated field to check for available inventory, it used the balanced inventory instead of the inventory qty which is the qty that is left from the balanced inventory 7be50e1 - removed check that was going through the WFA rules that wasn't necessary for either Payment methods and Shipping methods on the Order creation 6bf3870 MAR10001-935: Payment updates 2 e059902 - fixed renaming email templates for Order and Invoice notifications 937c296 - Updated email templates with new style d361e5f MAR10001-880: Service points updates(fixed conflicts) a1c7b24 MAR10001-880: Service points updates 4cf0ed2 Merge branch 'task/MAR10001-0-fix-orocommerce-integration-with-updated-filter' into develop 8441271 - updated WorkflowstartListener test to check new behaviour of the OrderWorkflowStart bb33a03 - Fixed issue with WorkflowStartListener where only the last order id (which came in batches) was getting a workflow start fbf2ac9 Merge branch 'task/MAR10001-0-fix-orderitemstatus-dashboard-widget' into develop 08f9f1d - Removed statuses that are NULL from the OrderItemStatus dashboard widget as they cannot be displayed correctly 42df0cb - added order status change for 'new' workflows in Marello a544ca4 Merge branch 'task/MAR10001-0-add-order-status' into develop ca16950 - added Order status to Order which will serve as preparation for the next step in the Order Management - currently no critical parts are relying on the new Order status as of yet, it's also not visibile in the current implementation 7669b9b Merge branch 'bugfix/MAR10001-0-fix-inventory-item-grid' into develop c973ae1 - renamed table alias as the datagrid was confused which one was the actual table and which one was the column of the ProductUnit in the InventoryItem grid e170523 - split the SalesBundle migrations as v1_3 was already released... 510f97f Merge commit '13f45b207c1508037c410ccd81df50a5133f518c' into maintenance/3.0 0ceb77a Merge commit '7d530c86aa0b89d4eb35d4c3572aa82061ee76fe' into maintenance/3.0 33eba24 Merge branch 'task/ZON20001-0-update-m2-bundle' into maintenance/3.0 138d8bd Merge commit '081641f09cf3308af11b3488a0784b307303b669' into maintenance/3.0 b59babd Merge commit 'e2e7875925ad96a42880ae7ac4ea9a9f3e46ba73' into maintenance/3.0 7554189 Merge commit 'e2af974edb72ae5923ecdf4dd34249e13ebf9f31' into maintenance/3.0 b70a3aa Merge branch 'feature/MAR10001-0-add-quantity-of-unit-inventory-item' into develop 7f802ec - renamed migrations to take newer versions of migrations into account on the develop branch fc3fef4 Merge branch 'feature/MAR10001-0-add-quantity-of-unit-inventory-item' into develop 04df3e3 - updated return notifications with ProductUnit on line items - added migration to update existing templates 67e9557 - updated email templates with Product Unit on the line items - Added migration to update email templates in existing installations 908ee7f - updated grids to include productUnit - updated PDF providers to include ProductUnit in PDF's - updated mappers either get the unit from the OrderItem or null a9eb6a5 - renamed unitOfMeasurement in InventoryItem to use the ProducUnit to keep it consistent in all entities having this relation - added ProductUnit to PackingSlipItem and InvoiceItem, InvoiceItem uses a different approach because it has a inheritance table and the EntityExtendBundle didn't really like this setup by adding an Extended field 0b36166 - updated test to check for the Unit Of Measurement being set on the OrderItem after the Order is saved eef4e67 - Updated OrderItemProductUnitListener to first check the InventoryItem for a UnitOfMeasurement before going straight to the default, the previous logic for checking it's empty before assigning is still in place - Updated service definition of the OrderItemProductUnitListener to use the InventoryItemManager and get the necessary data from there instead of only using the DoctrineHelper f0c438a - Added unitOfMeasurement to the InventoryItem view f0f2ad3 - added unitOfMeasurement to InventoryItem grid with filters and sorters be907e3 - Added unitOfMeasurement to InventoryItem - Updated tests for UoM - Added translations for inventory item UoM - Added default UoM when product is created (which is followed by creating and attaching the InventoryItem) 6a16bdb Merge branch 'task/MAR10001-0-fix-unique-indexes-customer-addresses' into develop c2b00f0 - removed unique index on Customer primary/shipping address as it is a theoretical posibility that they are exactly the same address 875b87a Merge branch 'feature/magento2-integr' into task/ZON20001-0-update-m2-bundle 3b5dabf Merge branch 'task/MAR10001-932-add-validation-to-Order-delivery-date' into develop 34d7283 Merge branch 'task/MAR10001-0-price-alignment' into develop 8e65bc5 Merge branch 'task/MAR10001-0-add-replenishment-field-to-variant-grid' into develop 8dfe5fe Merge branch 'task/MAR10001-0-add-replenishment-field-to-variant-grid' into maintenance/3.0 ee15adb Merge branch 'task/MAR10001-932-add-validation-to-Order-delivery-date' into maintenance/3.0 6788d78 - Added the replenishment field to the variant grid for seeing continuation of the product 0f366ad - fixed some price alignment, not specifically to the right, but at least in line with each others TH; - even though Oro's right aligment did work, it only worked with a 'crowed' table, as soon as only a few columns are in the grid, the whole things 'falls apart' and are not actually aligned to the right ebc8363 - added validation message for DeliveryDate if date is not set in the future a89e910 - Added deliveryDate validation to make sure the date is set in the future and not in the past c264f47 Merge branch 'bugfix/MAR10001-938-ghost-warehouse-after-switching-type' into develop 1a40be8 MM-29: Add functionality to map relation between website and sales_channel on the integration form (#54) cc84bcd Merge branch 'bugfix/MAR10001-0-update-taxes-when-shipping-address-does-not-have-region-in-customer-address' into develop 38eba16 Merge branch 'bugfix/MAR10001-941-po-recalculation-advised-products' into develop fec2210 Merge branch 'bugfix/MAR10001-941-po-recalculation-advised-products' into maintenance/3.0 413ab5a - updated condition to trigger the tax calculations for Order rows when creating an Order through the GUI - previously the calculation wouldn't trigger because the region was not set in the customer's shippingAddress a2d4afd - fixed issue with recalculation not being triggered when items in the advised grid are either updated with an amount or quantity - added additional trigger / listener to trigger the recalculation in this collection fd18d4d - updated explictly assigning of status for payments that have a source selected - fixed filtering related entities when updating a payment without a source assigned 2732b90 - fixed unique constraints format...again :') 638cda5 Merge branch 'bugfix/MAR10001-939-cannot-complete-replenishment-order' into develop 0dfc151 Merge commit 'c5697c673a4193f88c63e21e067f6b4142305400' c5697c6 Squashed 'applications/marello-application/' changes from 3a5a0ae..ce35880 bac1e39 Merge commit '6f65cdd1fdc06ce135a697156bed456424742fda' into maintenance/3.0 2dab594 Merge commit '0434749faa01bc372d0f6507d95e6c63b21d687a' into maintenance/3.0 e8d7669 Merge commit '6f2927f4e544aaabbcbc424c47e238e257b99cb5' as 'package/marello-magento2-bundle' bbf94da MM-27: Add missed functionality and bugfix - Fixed issue when first item from collection can return false 61a95f2 Merge branch 'feature/MAR10001-931' into develop 51055f0 - fixed issue with Migration where it was trying to create the order table on updating the application while it already exists - fixed issue with association name in the Enum field being inconsistent between the installer and the migration - Added additional enum options such as Box and Pallet 7eca964 - fixed issue with check on Payment term when rendering the pdf once downloaded - Some cs fixes in the payment bundle department e7c8029 - fix OrderExtension test to include the new twig functions 7377e59 Merge branch 'feature/MAR10001-920' into develop e388452 MAR10001-931: Update Order and OrderItem entities with additional fields 9b3d3fe Merge branch 'maintenance/3.0' into develop d3727d2 MAR10001-930: fixes for filtration on products grid 1af4a2e Merge branch 'maintenance/3.0' into develop 039ba0a Merge branch 'maintenance/3.0' into develop fe7ee95 Merge branch 'feature/MAR10001-909' into develop 58bb42c - renamed Company code to Company number - added pdf translation - moved company number on the PDF 9947664 Merge branch 'task/MAR10001-0-qol-fixes-orocommerce-bridge' into develop f847771 Merge branch 'task/MAR10001-0-qol-fixes-orocommerce-bridge' into develop 132d4b0 MAR10001-909: Add Company ID to Company 2a68ce8 Merge branch 'maintenance/3.0' into develop 55048a6 MAR10001-909: Add Company ID to Company 965a577 Merge branch 'task/MAR10001-0-qol-fixes-orocommerce-bridge' into develop 8b64c08 MAR10001-930: Cache seems to be invalidated quite frequently which results in pages being visited before increased loading times 0c2fd4b MAR10001-920: Payments Update fc8330c MAR10001-920: Payments Update 90c3238 MAR10001-920: Payments updates f71c6cd MAR10001-920: Payments updates b62f79e Merge branch 'feature/MAR10001-911' into develop 365738d - fix issue of search handler test where the actual search handler changed implementation slightly to let the unit test fail 231dd56 - fixed issue with updating the application from 3.0.x to 3.1 during issues updating indexes on columns that don't exist 9f011dc - CS fixes 158a39f MAR10001-911: Update Product with SKU and organization unique index 2ef748b Merge branch 'feature/MAR10001-791' into release/3.1 00a75fb Merge branch 'task/MAR10001-0-add-grid-view-labels' into develop 7c5c499 MAR10001-911: added migrations 201a0e2 - updated pricing js views in order to be able to disable channelpricing without errors in the console d6ebf16 Merge branch 'task/MAR10001-895-add-invoice-type-to-creditmemo-invoice-view' into develop ebb51c2 Merge branch 'task/MAR10001-896-update-invoice-entity-config' into develop f35a522 Merge branch 'feature/MAR10001-870' into develop 353ec71 MAR10001-791: Marello Payments - fixed functional tests - fixed Invoice totalPaid, totalDue calculations 2dad104 Merge branch 'maintenance/3.0' into feature/MAR10001-791 c635fe5 Merge branch '3.0' into feature/MAR10001-791 cb16773 MAR10001-791: Marello Payments 9ace12f CRH19001-18; Update API for overrides e1d3bbf Merge commit '1971c71703ba24cf8d58f23ba53931d1dbd116a8' e0805d2 Update OroRequirements check to be compatible with Oro Platform 3.1.x f7cd198 - remove lock files from master 5c56333 - Release preparation 2.1 8ef8047 Merge commit 'ce6c5c85565cf4ba66d2942b1c1aa34c3c389a33' into release/2.1 1a6e484 - updated branch aliases 980c1ff Merge commit '7139917230723d97b9b8c99e27dcd5c3f7d2e8e1' into release/2.1 a91b309 - updated version number in upgrade notes d953974 - prepared composer.json files for release 6fb68a8 - Updated dev.json and lock files to include `self.version` as internal pointer to packages of marello, marello-ee and subscriptions 37cceb1 Merge branch 'develop' into feature/MAR10001-485-subscriptions 22f054d - CS fixes - Fixed CreateProduct test in ProductController test to take the attribute family into account when creating new products 833d07d Merge branch 'bugfix/MAR10001-0-fix-email-template-tags' into feature/MAR10001-485-subscriptions efe95d2 Merge branch 'develop' into feature/MAR10001-485-subscriptions git-subtree-dir: package/marello git-subtree-split: 9bdcb5f
1 parent 31e5dbd commit a902614

File tree

59 files changed

+1270
-62
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1270
-62
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"oro/platform": "4.1.*",
2424
"oro/platform-serialised-fields": "4.1.*",
2525
"oro/calendar-bundle": "4.1.*",
26-
"mpdf/mpdf": "^7.1"
26+
"mpdf/mpdf": "^8.0"
2727
},
2828
"minimum-stability": "dev",
2929
"prefer-stable": true,

src/Marello/Bundle/CustomerBundle/Controller/CustomerController.php

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
namespace Marello\Bundle\CustomerBundle\Controller;
44

55
use Marello\Bundle\CustomerBundle\Entity\Customer;
6-
use Oro\Bundle\NoteBundle\Entity\Note;
7-
use Oro\Bundle\NoteBundle\Entity\Repository\NoteRepository;
86
use Oro\Bundle\SecurityBundle\Annotation\AclAncestor;
97
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
108
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;

src/Marello/Bundle/CustomerBundle/Resources/config/oro/datagrids.yml

+9
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,14 @@ datagrids:
165165
query:
166166
select:
167167
- company.createdAt
168+
- company.companyNumber
168169
- company.updatedAt
169170
options:
170171
entity_pagination: true
171172
columns:
173+
companyNumber:
174+
label: marello.customer.company.company_number.label
175+
frontend_type: string
172176
createdAt:
173177
label: oro.ui.created_at
174178
frontend_type: datetime
@@ -177,6 +181,9 @@ datagrids:
177181
frontend_type: datetime
178182
filters:
179183
columns:
184+
companyNumber:
185+
type: string
186+
data_name: company.companyNumber
180187
createdAt:
181188
type: datetime
182189
data_name: company.createdAt
@@ -185,6 +192,8 @@ datagrids:
185192
data_name: company.updatedAt
186193
sorters:
187194
columns:
195+
companyNumber:
196+
data_name: company.companyNumber
188197
createdAt:
189198
data_name: company.createdAt
190199
updatedAt:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
namespace Marello\Bundle\DemoDataBundle\Migrations\Data\Demo\ORM;
4+
5+
use Marello\Bundle\SalesBundle\Migrations\Data\ORM\LoadSalesChannelTypesData as BaseLoadSalesChannelTypesData;
6+
7+
class LoadSalesChannelTypesData extends BaseLoadSalesChannelTypesData
8+
{
9+
/** @var array */
10+
protected $data = [
11+
'pos' => 'Pos',
12+
'webshop' => 'Webshop',
13+
'marketplace' => 'Marketplace'
14+
];
15+
}

src/Marello/Bundle/DemoDataBundle/Migrations/Data/Demo/ORM/LoadSalesData.php

+20-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
use Doctrine\Common\DataFixtures\AbstractFixture;
66
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
77
use Doctrine\Common\Persistence\ObjectManager;
8-
98
use Marello\Bundle\SalesBundle\Entity\SalesChannel;
109
use Marello\Bundle\SalesBundle\Entity\SalesChannelGroup;
10+
use Marello\Bundle\SalesBundle\Entity\SalesChannelType;
1111
use Marello\Bundle\SalesBundle\Migrations\Data\ORM\LoadSalesChannelGroupData as MigrationLoadSalesChannelGroupData;
1212

1313
class LoadSalesData extends AbstractFixture implements DependentFixtureInterface
@@ -95,6 +95,7 @@ public function getDependencies()
9595
{
9696
return [
9797
MigrationLoadSalesChannelGroupData::class,
98+
LoadSalesChannelTypesData::class
9899
];
99100
}
100101

@@ -118,7 +119,7 @@ protected function loadSalesChannels()
118119

119120
foreach ($this->data as $values) {
120121
$channel = (new SalesChannel($values['name']))
121-
->setChannelType($values['type'])
122+
->setChannelType($this->findTypeByName($values['type']))
122123
->setCode($values['code'])
123124
->setCurrency($values['currency'])
124125
->setOwner($organization)
@@ -131,4 +132,21 @@ protected function loadSalesChannels()
131132

132133
$this->manager->flush();
133134
}
135+
136+
/**
137+
* @param string $name
138+
* @return null|SalesChannelType
139+
*/
140+
private function findTypeByName($name)
141+
{
142+
$type = $this->manager
143+
->getRepository(SalesChannelType::class)
144+
->find($name);
145+
146+
if ($type) {
147+
return $type;
148+
}
149+
150+
return null;
151+
}
134152
}

src/Marello/Bundle/InventoryBundle/DependencyInjection/Configuration.php

+6
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ public function getConfigTreeBuilder()
3636
],
3737
'balance_threshold_percentage' => [
3838
'value' => 0.20
39+
],
40+
'inventory_on_demand_enabled' => [
41+
'value' => false
42+
],
43+
'inventory_on_demand' => [
44+
'value' => false
3945
]
4046
]
4147
);

src/Marello/Bundle/InventoryBundle/Model/InventoryBalancer/InventoryBalancer.php

+6
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,16 @@ public function __construct(
6767
*/
6868
public function balanceInventory(Product $product, $isFixed = false, $flushManager = false)
6969
{
70+
// no status, no balancing!
71+
if (!$product->getStatus()) {
72+
return;
73+
}
74+
7075
// check if product is enabled, if not do not (re)balance
7176
if (ProductStatus::DISABLED === $product->getStatus()->getName()) {
7277
return;
7378
}
79+
7480
/** @var InventoryItem $inventoryItem */
7581
$inventoryItem = $this->getInventoryItemFromProduct($product);
7682

src/Marello/Bundle/InventoryBundle/Resources/config/oro/system_configuration.yml

+26-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ system_configuration:
99
title: marello.inventory.system_configuration.groups.inventory.balacing.general.label
1010
inventory_balancing_strategy:
1111
title: marello.inventory.system_configuration.groups.inventory.balacing.strategy.label
12-
12+
inventory_on_demand:
13+
title: marello.inventory.system_configuration.groups.inventory.on_demand.title
14+
icon: fa-cog
15+
inventory_on_demand_general:
16+
title: marello.inventory.system_configuration.groups.inventory.on_demand.general.label
1317
fields:
1418
marello_inventory.balance_threshold_percentage:
1519
data_type: percent
@@ -30,6 +34,21 @@ system_configuration:
3034
constraints:
3135
- NotBlank: ~
3236

37+
marello_inventory.inventory_on_demand_enabled:
38+
data_type: boolean
39+
type: Oro\Bundle\ConfigBundle\Form\Type\ConfigCheckbox
40+
options:
41+
label: marello.inventory.system_configuration.fields.inventory_on_demand_enabled.label
42+
required: false
43+
44+
marello_inventory.inventory_on_demand:
45+
data_type: boolean
46+
type: Oro\Bundle\ConfigBundle\Form\Type\ConfigCheckbox
47+
options:
48+
label: marello.inventory.system_configuration.fields.inventory_on_demand.label
49+
tooltip: marello.inventory.system_configuration.fields.inventory_on_demand
50+
required: false
51+
3352
tree:
3453
system_configuration:
3554
marello:
@@ -44,3 +63,9 @@ system_configuration:
4463
inventory_balancing_strategy:
4564
children:
4665
- marello_inventory.balancing_strategy
66+
inventory_on_demand:
67+
children:
68+
inventory_on_demand_general:
69+
children:
70+
- marello_inventory.inventory_on_demand_enabled
71+
- marello_inventory.inventory_on_demand

src/Marello/Bundle/InventoryBundle/Resources/config/services.yml

+2
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ services:
200200

201201
marello_inventory.form.inventory_order_on_demand_validator:
202202
class: 'Marello\Bundle\InventoryBundle\Validator\InventoryOrderOnDemandValidator'
203+
calls:
204+
- [setConfigManager, ['@oro_config.manager']]
203205
tags:
204206
- { name: validator.constraint_validator, alias: marello_inventory.order_on_demand_validator }
205207

src/Marello/Bundle/InventoryBundle/Resources/translations/messages.en.yml

+5
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,14 @@ marello:
184184
back_pre_orders:
185185
title: Backorders/Pre-orders
186186
general.label: General
187+
on_demand:
188+
title: Inventory On Demand
189+
general.label: General
187190
fields:
188191
balancing_strategy.label: Strategy
189192
balance_threshold_percentage.label: Threshold Percentage
193+
inventory_on_demand.label: Use Purchase Order with inventory on demand
194+
inventory_on_demand_enabled.label: Enable Inventory On Demand
190195
messages:
191196
success:
192197
warehouse.saved: Warehouse has been saved successfully

src/Marello/Bundle/InventoryBundle/Resources/translations/tooltips.en.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ marello:
88
system_configuration:
99
fields:
1010
balance_threshold_percentage: Threshold for when the balancer should rebalance the inventory for a product. This threshold is used in the calculation between the current inventory and the original balanced inventory quantity.
11-
11+
inventory_on_demand: Enabling this feature will require you to connect suppliers to Products, failing to do so will result in weird behaviour and issues.
1212
form:
1313
tooltip:
1414
max_qty_to_backorder: Limit the number of items that can be ordered in one order. Leave blank if no restriction applies.

src/Marello/Bundle/InventoryBundle/Resources/translations/validators.en.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ marello:
88

99
inventoryitem:
1010
desired_should_be_greater_than_purchase_inventory: Desired Inventory needs to be greater than or equal to the Purchase Inventory
11-
order_on_demand_not_allowed_supplier: Order On Demand can't be allowed if Product has no Supplier
12-
order_on_demand_not_allowed_backorder: Order On Demand can't be allowed if Backorder allowed
13-
order_on_demand_not_allowed_preorder: Order On Demand can't be allowed if Pre-Order allowed
11+
order_on_demand_not_allowed_supplier: Order On Demand is not allowed if Product has no Supplier configured
12+
order_on_demand_not_allowed_backorder: Order On Demand is not allowed if Backorder allowed
13+
order_on_demand_not_allowed_preorder: Order On Demand is not allowed if Pre-Order allowed

src/Marello/Bundle/InventoryBundle/Resources/views/Inventory/update.html.twig

+12
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,18 @@
181181
}
182182
] %}
183183

184+
{% set orderOnDemandAllowed = oro_config_value('marello_inventory.inventory_on_demand_enabled') %}
185+
{% if orderOnDemandAllowed %}
186+
{% set dataBlocks = dataBlocks|merge([{
187+
'title': 'marello.inventory.inventoryitem.section.orderondemand.label'|trans,
188+
'useSpan': false,
189+
'subblocks': [
190+
{ 'data' : [orderOnDemandInfoWidget] }
191+
]
192+
}])
193+
%}
194+
{% endif %}
195+
184196
{% set data = {
185197
'formErrors': form_errors(form)? form_errors(form) : null,
186198
'dataBlocks': dataBlocks,

src/Marello/Bundle/InventoryBundle/Resources/views/Inventory/view.html.twig

+11
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,17 @@
199199
}]
200200
}])
201201
%}
202+
{% set orderOnDemandAllowed = oro_config_value('marello_inventory.inventory_on_demand_enabled') %}
203+
{% if orderOnDemandAllowed %}
204+
{% set dataBlocks = dataBlocks|merge([{
205+
'title': 'marello.inventory.inventoryitem.section.orderondemand.label'|trans,
206+
'useSpan': false,
207+
'subblocks': [
208+
{ 'data' : [orderOnDemandInfoWidget] }
209+
]
210+
}])
211+
%}
212+
{% endif %}
202213

203214
{% set data = { 'dataBlocks': dataBlocks } %}
204215
{{ parent() }}

src/Marello/Bundle/InventoryBundle/Validator/InventoryOrderOnDemandValidator.php

+22-5
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,15 @@
66
use Symfony\Component\Validator\ConstraintValidator;
77
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
88

9+
use Oro\Bundle\ConfigBundle\Config\ConfigManager;
10+
911
use Marello\Bundle\InventoryBundle\Entity\InventoryItem;
1012

1113
class InventoryOrderOnDemandValidator extends ConstraintValidator
1214
{
15+
/** @var ConfigManager $configManager */
16+
private $configManager;
17+
1318
/**
1419
* Checks if the passed entity is unique in collection.
1520
* @param mixed $entity
@@ -22,11 +27,15 @@ public function validate($entity, Constraint $constraint)
2227
return;
2328
}
2429
$product = $entity->getProduct();
25-
if ($entity->isOrderOnDemandAllowed() &&
26-
(!$product->getPreferredSupplier() || $product->getSuppliers()->count() === 0)) {
27-
$this->context->buildViolation($constraint->message)
28-
->atPath('orderOnDemandAllowed')
29-
->addViolation();
30+
if ($this->configManager->get('marello_inventory.inventory_on_demand_enabled') &&
31+
$this->configManager->get('marello_inventory.inventory_on_demand')
32+
) {
33+
if ($entity->isOrderOnDemandAllowed() &&
34+
(!$product->getPreferredSupplier() || $product->getSuppliers()->count() === 0)) {
35+
$this->context->buildViolation($constraint->message)
36+
->atPath('orderOnDemandAllowed')
37+
->addViolation();
38+
}
3039
}
3140
if ($entity->isOrderOnDemandAllowed() && $entity->isBackorderAllowed()) {
3241
$this->context
@@ -45,4 +54,12 @@ public function validate($entity, Constraint $constraint)
4554
->addViolation();
4655
}
4756
}
57+
58+
/**
59+
* @param ConfigManager $configManager
60+
*/
61+
public function setConfigManager(ConfigManager $configManager)
62+
{
63+
$this->configManager = $configManager;
64+
}
4865
}

src/Marello/Bundle/OrderBundle/Form/Type/OrderItemType.php

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
5959
]
6060
])
6161
->add('productUnit', TextType::class, [
62+
'mapped' => false,
6263
'attr' => [
6364
'readonly' => true
6465
]

src/Marello/Bundle/ProductBundle/Resources/config/validation.yml

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Marello\Bundle\ProductBundle\Entity\Product:
77
properties:
88
names:
99
- Oro\Bundle\PlatformBundle\Validator\Constraints\ValidLoadedItems: ~
10+
status:
11+
- NotBlank: { message: 'marello.product.messages.error.status' }
1012
sku:
1113
- NotBlank: ~
1214
prices:

src/Marello/Bundle/ProductBundle/Resources/translations/validators.en.yml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ marello:
44
error:
55
names.blank: Product Name should not be blank.
66
sku: SKU already exists, please provide a unique SKU
7+
status: Product Status should should not be blank.
78
channels: Please select a Sales Channel. There should be at least one Sales Channel per product.
89
suppliers.dropship: It is forbidden to remove the ProductSupplierRelation with dropship enabled or disable dropship if it has inventory in external warehouse. Please allocate or remove inventory before deletion
910

src/Marello/Bundle/PurchaseOrderBundle/EventListener/Doctrine/PurchaseOrderOnOrderOnDemandCreationListener.php

+21
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
use Doctrine\ORM\EntityManager;
66
use Doctrine\ORM\Event\LifecycleEventArgs;
77
use Doctrine\ORM\Event\PostFlushEventArgs;
8+
9+
use Oro\Bundle\ConfigBundle\Config\ConfigManager;
10+
811
use Marello\Bundle\InventoryBundle\Entity\Warehouse;
912
use Marello\Bundle\InventoryBundle\Entity\WarehouseChannelGroupLink;
1013
use Marello\Bundle\InventoryBundle\Provider\AvailableInventoryProvider;
@@ -30,6 +33,9 @@ class PurchaseOrderOnOrderOnDemandCreationListener
3033
*/
3134
private $availableInventoryProvider;
3235

36+
/** @var ConfigManager $configManager */
37+
private $configManager;
38+
3339
/**
3440
* @param AvailableInventoryProvider $availableInventoryProvider
3541
*/
@@ -47,6 +53,13 @@ public function postPersist(LifecycleEventArgs $args)
4753
if (!$entity instanceof Order) {
4854
return;
4955
}
56+
57+
if (!$this->configManager->get('marello_inventory.inventory_on_demand_enabled')
58+
&& !$this->configManager->get('marello_inventory.inventory_on_demand')
59+
) {
60+
return;
61+
}
62+
5063
$orderOnDemandItems = [];
5164
$salesChannel = $entity->getSalesChannel();
5265
foreach ($entity->getItems() as $item) {
@@ -210,4 +223,12 @@ private function getLinkedWarehouse(Order $order, EntityManager $manager)
210223

211224
return !empty($linkedWarehouses) ? reset($linkedWarehouses) : null;
212225
}
226+
227+
/**
228+
* @param ConfigManager $configManager
229+
*/
230+
public function setConfigManager(ConfigManager $configManager)
231+
{
232+
$this->configManager = $configManager;
233+
}
213234
}

0 commit comments

Comments
 (0)