Skip to content

Commit fcf4a0a

Browse files
committed
Squashed 'package/marello/' changes from d80705c..0b2497e
0b2497e Merge branch 'MAR10001-PR70' 1ff9042 Merge commit '68555d9f81f680a62989f8110a509e701ae86de8' into MAR10001-PR70 e4fba07 Merge branch 'MAR10001-PR68' fa3b3cd Merge commit '7e67af671722a1ced9fc332f3361ab8a5503d2bc' into MAR10001-PR68 769586a Merge branch 'maintenance/3.0' 36e1386 bugfix/MAR10001-0-prevent-balanced-inventory-going-below-0: - Fixed issue with balanced inventory going below 0 if there is more reserved inventory on the balanced inventory than there is actual inventory to be balanced b428699 Merge branch 'maintenance/3.0' 013142e Merge branch 'bugfix/MAR10001-998-fix-refund-validation' into maintenance/3.0 4de2829 Merge commit '3b7bdd1d14f56c555caf234e8d8f0607013a8fc3' 7d95094 Merge branch 'maintenance/3.0' 1208b22 bugfix/MAR10001-1001-ordernumber-orderreference-search-in-refund-grid: - Fixed issue with search on orderReference and orderNumber in both Refund/Return grid d3ae655 - Fixed issue with loading images during demo install - Fixed groupBy issues with products grid 1f76aac bugfix/MAR10001-998-patch-issue-with-refund-validation: - Moved validation for Refund to the complete Refund instead of items - Added currency symbol and formatting to the refund items price - Removed the exception from the subscriber that is interfering with the validation - Added validation to prevent negative refund amount on items 68555d9 specify full namespaces in Doctrine DiscriminatorMap a8760c8 task/MAR10001-0-fix-po-logic: - fix issue with PO still being created while config was disabled 080bcf6 task/MAR10001-0-fix-po-logic: - fix issue with PO still being created while config was disabled 9f3d932 - added hasColumn() checks on fields that might already be added in previous version a7a369c - added hasColumn() checks on fields that might already be added in previous version f7c3d90 Merge branch 'task/MAR10001-0-order-on-demand' into maintenance/3.0 5785eec Merge branch 'task/MAR10001-0-order-on-demand' into maintenance/3.0 ee0f8e5 task/MAR10001-0-order-on-demand: - Added additional option to explictly enable inventory on demand af75dcc task/MAR10001-0-order-on-demand: - Added additional option to explictly enable inventory on demand ba58809 Merge commit 'cacd84fdc25bfba6449f9fae6efb80c9682cc406' into maintenance/3.0 eec7e33 Merge commit 'cacd84fdc25bfba6449f9fae6efb80c9682cc406' into maintenance/3.0 5391c9c - Reinstated the order on demand feature, with additional setting to turn it on and off via the system configuration b16f33e - Reinstated the order on demand feature, with additional setting to turn it on and off via the system configuration 32e9ef2 Merge branch 'bugfix/MAR10001-0-fix-invalid-yaml-magento2-bundle' 30cd7f3 - added company number column, filter and sorter ccd40f8 - added company number column, filter and sorter fdd1425 Merge branch 'feature/MAR10001-880' into merge-service-points-30 def0844 Merge branch 'feature/MAR10001-880' into merge-service-points-30 0e5e29c Merge branch 'feature/CRH19001-18_Service-points' into merge-service-points-30 292f519 Merge branch 'bugfix/MAR10001-product-unit-wrong-type-order-create' dab670b - fixed issue productUnit being submitted on order create, field should not be submitted at all acbb6d8 Merge commit 'b2975e504ce49313f160f637df271153bdad6f03' fbe6998 Merge commit 'e1d3bbf462667e07cca89196389fdfd925f4cd73' ddc1152 Merge branch 'release/3.1' 9d7f1ff Merge commit '8ef804780109269a9d0078c99b98f46751d8b922' 7782fd9 Merge commit '1a6e4842329a1d135e43cd5092e0a40660ddb3fd' f688b50 - updated dev.json/dev.locks - added missing translations - psr fixes - updated package-json's 22397d3 - fixed layout on payment popup on Invoice/Creditmemo f17b373 - Added product unit as additional information to OrderItem on order create abdb830 - Uncommented previously commented for no obvious reason on the OrderItemType - Fixed translation on workflow 5612933 - Added view page for inventory batches - added changes regarding navigation around inventory and inventory batches - updated layout on inventory batch pages 41316ec - added manage batches inventory link on inventory level grid on inventory item view e88e920 - Fixed product name in datagrid for inventory item / balanced inventory level grid not being updated after changing the product's name 58b9be4 - Added taxIdentificationNumber below company number on invoice entity view d6301d0 Merge branch 'bugfix/MAR10001-970-batch-allocation' into develop 2c93950 - Added small changes for batches; - added delivery date to batch form e388935 - Fixed issue with selecting organization when creating products and purchase order ac4434b - fixed inventory batch condition that didn't add the correct amount for a batch to a packingslip 01e83b0 - Added organization to query for finding a specific sku for an organization b131e18 - removed old query reference c4a592a bugfix/MAR10001-888-reports-per-organisation: - updated queries to cover organisation restriction 7cef74f - Added different calculation for total due on order view dae0a29 - Fixed issue with loading images during demo install - Fixed groupBy issues with products grid 3cede79 - Changed to Autocomplete for Customers to FullNameSearchHandler instead of the default searchhandler to include fullname 468cb34 Merge branch 'develop' into feature/MAR10001-930 89284c7 - Added additional check to see which query needs to be running for updating tax_identification_number based on db driver c76ce7b - added hasColumn() checks on fields that might already be added in previous version d37fb2f - changed conditional statement in checking wether the width needs to be applied to the logo of the pdf 3896c6a - 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 2094b8c - Added fix for query on postgresql where customer tax identification is copied to company tax identification 09e9035 Merge branch 'develop' into feature/MAR10001-894 9f3ab2f Merge branch 'bugfix/MAR10001-0-apply-fixes' into develop 73c2e39 - Added minor fixes to purchase orders view and form c23d429 - Added minor fixes to purchase orders view and form 0b1879a - Added minor fixes to purchase orders view and form 7b00a7d - Added possibility to update cost via marello-supplier-product-grid 68a2703 - Added possibility to update cost via marello-supplier-product-grid 4cb837d - Added possibility to update cost via marello-supplier-product-grid c0e9f67 Merge commit 'ffba2a1d74fe5713fd615d1fb3b6980a41cb9f31' into maintenance/3.0 a72855b Merge commit 'ffba2a1d74fe5713fd615d1fb3b6980a41cb9f31' into maintenance/3.0 3069f27 Merge commit 'ffba2a1d74fe5713fd615d1fb3b6980a41cb9f31' into maintenance/3.0 1591559 Merge commit 'f497f93ca471ade418553eea3289318a7c4bca23' into maintenance/3.0 1c28c9c Merge commit 'f497f93ca471ade418553eea3289318a7c4bca23' into maintenance/3.0 2723bd7 Merge commit 'f497f93ca471ade418553eea3289318a7c4bca23' into maintenance/3.0 9a16f47 Merge commit '71530acca5abd305f2c328d3f74bb414c1b89844' into maintenance/3.0 9bf8fde Merge commit '71530acca5abd305f2c328d3f74bb414c1b89844' into maintenance/3.0 bc32cb4 Merge commit '71530acca5abd305f2c328d3f74bb414c1b89844' into maintenance/3.0 26a030a Merge commit '0bcb9bb847396efc745579839904136a8252ed58' into maintenance/3.0 54c8d90 Merge commit '0bcb9bb847396efc745579839904136a8252ed58' into maintenance/3.0 fcc9e1e Merge commit '0bcb9bb847396efc745579839904136a8252ed58' into maintenance/3.0 cf8c669 Merge commit 'e779b8a1796d417078e3a9dfe89b0474e462caac' into maintenance/3.0 7ebf9da Merge commit 'e779b8a1796d417078e3a9dfe89b0474e462caac' into maintenance/3.0 f7387ee Merge commit 'e779b8a1796d417078e3a9dfe89b0474e462caac' into maintenance/3.0 dcc89de Merge commit '4f68dc37da2773e1c4f6cee4e165f7a441154a90' into maintenance/3.0 36d32c1 Merge commit '4f68dc37da2773e1c4f6cee4e165f7a441154a90' into maintenance/3.0 0846a6d Merge commit '4f68dc37da2773e1c4f6cee4e165f7a441154a90' into maintenance/3.0 2d02177 Merge commit 'd34d82be891e77a23fd995c71dbfd92b8542ca00' into maintenance/3.0 7ffe871 Merge commit 'd34d82be891e77a23fd995c71dbfd92b8542ca00' into maintenance/3.0 0623576 Merge branch 'bugfix/MAR10001-0-add-additional-check-customer-address-in-order-create' into develop 746d1e3 - 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 3a6fd4c - 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 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 f24d48e - Removed redundant variable provider, functionality is already included in Marello\Bundle\ProductBundle\Twig\Provider\ProductUnitVariablesProvider 747adb9 - Added translations to Payments datagrid on Order and Invoice views that reflect the datagrid data eb19d4a Merge branch 'develop' into feature/MAR10001-935 ea5c508 Merge branch 'bugfix/MAR10001-0-purchaseorder-item-api' into develop a094c26 - added additional check before loading the purchase price in the Purchase Order Item d8cd80b - added additional check before loading the purchase price in the Purchase Order Item 15b4e6c Merge branch 'task/MAR10001-0-added-extended-view-support-for-saleschannel' into develop 087ed44 - Added support to display extended fields on SalesChannel view & grid c5e866d - Added support to display extended fields on SalesChannel view & grid bfa263a Merge branch 'bugfix/MAR10001-0-add-extended-entity-names-to-datagrids' into develop 20fde26 - fixed issue with extended_entity_name in datagrid on the wrong spot in the configuration f1ae5c3 - fixed issue with extended_entity_name in datagrid on the wrong spot in the configuration 54f2d06 Merge branch 'bugfix/MAR10001-0-add-extended-entity-names-to-datagrids' into develop 01fbdd1 - added extended entity names to datagrids - added additional filters to balanced inventory level datagrid ac086a6 - added extended entity names to datagrids - added additional filters to balanced inventory level datagrid 7e67af6 Non expected return type (interface non-implemented) 2759c63 Merge branch 'bugfix/MAR10001-957-Company-validation-fails-on-update' into develop fd7bff7 - 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 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 bb2f91c Merge branch 'bugfix/MAR10001-966-product-categories' into develop a61fefe - updated product category grid on the category view to take the localized value of product name into account ff92270 - updated product category grid on the category view to take the localized value of product name into account dc38902 Merge branch 'bugfix/MAR10001-499-Filtering-SalesChannel' into develop 0d046ca - Fixed issue with SalesChannels in colomn not being rendered in the Product grid - Fixed issue with SalesChannel filter in the Product grid fb27de8 - Fixed issue with SalesChannels in colomn not being rendered in the Product grid - Fixed issue with SalesChannel filter in the Product grid 03e80ec Merge branch 'bugfix/MAR10001-0-fix-order-reference-filter' into develop 59a5fec - changed type of OrderReference filter to string in order data grid to filter correctly (changed filter type from number to string) 1052506 - changed type of OrderReference filter to string in order data grid to filter correctly (changed filter type from number to string) 92c6206 Merge branch 'task/MAR10001-0-add-acl-config-to-tax-related-entities' into develop 8ab3d7e - added default ACL config value for Tax Related entities de4c45e - added default ACL config value for Tax Related entities dac4dc3 Merge branch 'task/MAR10001-0-layout-fixes' into develop 8cd21c5 - 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 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 2954aa3 Merge branch 'task/MAR10001-0-skip-configurables-magento-integration' into develop 3742532 - fix issue with trying to display data based on an entity that isn't available ea7a6f8 - Added shipping method details to store additional information regarding the shipping method on the Marello Order 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 2fc02ae Merge branch 'task/MAR10001-0-add-additional-dynamic-entity-fields' into develop 45c33db - Added rendering for additional data block with dynamic entity fields 2fe8c53 - Added rendering for additional data block with dynamic entity fields e6a0344 Merge branch 'task/MAR10001-0-add-force-flush-option-to-inventory-level-record' into develop e989f1f - Added context option check for forceFlush in the inventorylevellogrecord fb69b55 - Added context option check for forceFlush in the inventorylevellogrecord ca7f87a Merge commit '5af3aae6bdb711c0d6537f67c359ab897877ef37' into maintenance/3.0 131e3b5 Merge branch 'task/MAR10001-0-validation-fixes' into develop f298a72 - Updated validation groups for Order validation - Added SKU to the available inventory validation message bbc7ca8 - Updated validation groups for Order validation - Added SKU to the available inventory validation message a882762 Merge branch 'bugfix/MAR10001-0-calculation-packingslipitem-weight' into develop e9202e0 - 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 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 f14ebf3 Merge branch 'bugfix/MAR10001-0-change-forbidden-exception' into develop 8ba3d9f - 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 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 a987a95 Merge branch 'task/MAR10001-0-url-encode-magento-sku' into develop d6e420f - 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 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 a6045d1 - 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... 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... 490196e multiple fixes d062de0 multiple fixes 5860ffb Merge commit '63f5e481b1b580ab73bcf6fd1d98fa0ba7595542' into maintenance/3.0 463b03d Merge branch 'maintenance/3.0' of https://github.com/marellocommerce/development-mono-repository into maintenance/3.0 3b86ae6 Merge branch 'maintenance/3.0' of https://github.com/marellocommerce/development-mono-repository into maintenance/3.0 c9908e1 - 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) 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 36185ab 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) 0abc2d4 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 a2792d8 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 c7acf10 Merge branch 'task/MAR10001-0-added-product-unit-twig-variable-provider' into develop 19aaa9b 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 f52eb64 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 66c6e99 MAR10001-935: Payment updates 2 e059902 - fixed renaming email templates for Order and Invoice notifications 937c296 - Updated email templates with new style d7bf5f8 MAR10001-880: Service points updates(fixed conflicts) d361e5f MAR10001-880: Service points updates(fixed conflicts) c2a6083 MAR10001-880: Service points updates a1c7b24 MAR10001-880: Service points updates 0564834 Merge branch 'task/MAR10001-0-fix-orocommerce-integration-with-updated-filter' into develop 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 cdbd1cb Merge branch 'task/MAR10001-0-fix-orderitemstatus-dashboard-widget' into develop 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 1b28845 - added order status change for 'new' workflows in Marello 42df0cb - added order status change for 'new' workflows in Marello cf01fd4 Merge branch 'task/MAR10001-0-add-order-status' into develop 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 f7a39f6 Merge branch 'bugfix/MAR10001-0-fix-inventory-item-grid' into develop 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 3015ccf Merge branch 'feature/MAR10001-0-add-quantity-of-unit-inventory-item' into develop 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 a60a9fb Merge branch 'feature/MAR10001-0-add-quantity-of-unit-inventory-item' into develop 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) 0217ff2 Merge branch 'task/MAR10001-0-fix-unique-indexes-customer-addresses' into develop 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 8f5d044 Merge branch 'task/MAR10001-932-add-validation-to-Order-delivery-date' into develop 3b5dabf Merge branch 'task/MAR10001-932-add-validation-to-Order-delivery-date' into develop 30fb36f Merge branch 'task/MAR10001-0-price-alignment' into develop 34d7283 Merge branch 'task/MAR10001-0-price-alignment' into develop 126c803 Merge branch 'task/MAR10001-0-add-replenishment-field-to-variant-grid' 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 06529fa Merge branch 'bugfix/MAR10001-938-ghost-warehouse-after-switching-type' into develop 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) e399a91 Merge branch 'bugfix/MAR10001-0-update-taxes-when-shipping-address-does-not-have-region-in-customer-address' into develop cc84bcd Merge branch 'bugfix/MAR10001-0-update-taxes-when-shipping-address-does-not-have-region-in-customer-address' into develop 37b9dbe Merge branch 'bugfix/MAR10001-941-po-recalculation-advised-products' 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 b05d611 - updated explictly assigning of status for payments that have a source selected - fixed filtering related entities when updating a payment without a source assigned 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 cf62473 - fixed unique constraints format...again :') 2732b90 - fixed unique constraints format...again :') f0e9db6 Merge branch 'bugfix/MAR10001-939-cannot-complete-replenishment-order' into develop 638cda5 Merge branch 'bugfix/MAR10001-939-cannot-complete-replenishment-order' into develop b2975e5 - removed composer.lock file from master 318b676 Merge commit 'c5697c673a4193f88c63e21e067f6b4142305400' ce35880 Merge pull request #11 from clicktrend/patch-1 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 72b1da8 Merge branch 'feature/MAR10001-931' into develop 61a95f2 Merge branch 'feature/MAR10001-931' into develop 26b3ac1 - 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 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 6f7909c - fixed issue with check on Payment term when rendering the pdf once downloaded - Some cs fixes in the payment bundle department 7eca964 - fixed issue with check on Payment term when rendering the pdf once downloaded - Some cs fixes in the payment bundle department 54ccd14 - fix OrderExtension test to include the new twig functions e7c8029 - fix OrderExtension test to include the new twig functions 1c40490 Merge branch 'feature/MAR10001-920' into develop 7377e59 Merge branch 'feature/MAR10001-920' into develop b7a8b98 MAR10001-931: Update Order and OrderItem entities with additional fields e388452 MAR10001-931: Update Order and OrderItem entities with additional fields 2fd9aa4 Merge branch 'maintenance/3.0' into develop 9b3d3fe Merge branch 'maintenance/3.0' into develop a135353 MAR10001-930: fixes for filtration on products grid ebded99 Merge branch 'maintenance/3.0' into develop 1af4a2e Merge branch 'maintenance/3.0' into develop 44ac30a Merge branch 'maintenance/3.0' into develop 039ba0a Merge branch 'maintenance/3.0' into develop 377f2a8 Merge branch 'feature/MAR10001-909' into develop fe7ee95 Merge branch 'feature/MAR10001-909' into develop dc85219 - renamed Company code to Company number - added pdf translation - moved company number on the PDF 58bb42c - renamed Company code to Company number - added pdf translation - moved company number on the PDF 9dafd0f Merge branch 'task/MAR10001-0-qol-fixes-orocommerce-bridge' into develop 9947664 Merge branch 'task/MAR10001-0-qol-fixes-orocommerce-bridge' into develop d4e4078 Merge branch 'task/MAR10001-0-qol-fixes-orocommerce-bridge' into develop f847771 Merge branch 'task/MAR10001-0-qol-fixes-orocommerce-bridge' into develop 42add63 MAR10001-909: Add Company ID to Company 132d4b0 MAR10001-909: Add Company ID to Company 3f68d97 Merge branch 'maintenance/3.0' into develop 2a68ce8 Merge branch 'maintenance/3.0' into develop bb98838 MAR10001-909: Add Company ID to Company 55048a6 MAR10001-909: Add Company ID to Company db54185 Merge branch 'task/MAR10001-0-qol-fixes-orocommerce-bridge' into develop 965a577 Merge branch 'task/MAR10001-0-qol-fixes-orocommerce-bridge' into develop aef5acf MAR10001-930: Cache seems to be invalidated quite frequently which results in pages being visited before increased loading times 87aa40d MAR10001-920: Payments Update 0c2fd4b MAR10001-920: Payments Update eadd863 MAR10001-920: Payments Update fc8330c MAR10001-920: Payments Update 8b62a6d MAR10001-920: Payments updates 90c3238 MAR10001-920: Payments updates aebeb94 MAR10001-920: Payments updates f71c6cd MAR10001-920: Payments updates b4db154 Merge branch 'feature/MAR10001-911' into develop b62f79e Merge branch 'feature/MAR10001-911' into develop a16bcb0 - fix issue of search handler test where the actual search handler changed implementation slightly to let the unit test fail 365738d - fix issue of search handler test where the actual search handler changed implementation slightly to let the unit test fail 3a23037 - fixed issue with updating the application from 3.0.x to 3.1 during issues updating indexes on columns that don't exist 231dd56 - fixed issue with updating the application from 3.0.x to 3.1 during issues updating indexes on columns that don't exist 519a31e - CS fixes 9f011dc - CS fixes f6b5db1 MAR10001-911: Update Product with SKU and organization unique index 158a39f MAR10001-911: Update Product with SKU and organization unique index 6e2bea3 Merge branch 'feature/MAR10001-791' into release/3.1 2ef748b Merge branch 'feature/MAR10001-791' into release/3.1 8542992 Merge branch 'task/MAR10001-0-add-grid-view-labels' into develop 00a75fb Merge branch 'task/MAR10001-0-add-grid-view-labels' into develop 2255e48 MAR10001-911: added migrations 7c5c499 MAR10001-911: added migrations e5b3dd6 - updated pricing js views in order to be able to disable channelpricing without errors in the console 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 941504a MAR10001-791: Marello Payments - fixed functional tests - fixed Invoice totalPaid, totalDue calculations 353ec71 MAR10001-791: Marello Payments - fixed functional tests - fixed Invoice totalPaid, totalDue calculations c1acf82 Merge branch 'maintenance/3.0' into feature/MAR10001-791 2dad104 Merge branch 'maintenance/3.0' into feature/MAR10001-791 3b8e727 Merge branch '3.0' into feature/MAR10001-791 c635fe5 Merge branch '3.0' into feature/MAR10001-791 097f418 MAR10001-791: Marello Payments cb16773 MAR10001-791: Marello Payments 89c1f39 Update routing.yml 9ace12f CRH19001-18; Update API for overrides e1d3bbf Merge commit '1971c71703ba24cf8d58f23ba53931d1dbd116a8' cd74db3 Merge branch 'bugfix/MAR10001-712-add-taxcode-remove-suppliers' into maintenance/2.1 e0805d2 Update OroRequirements check to be compatible with Oro Platform 3.1.x fe3d83d Merge commit '73de19e5ff6867b2fb523997401df9d818e84235' into bugfix/GH-PR9-update-ororequirements fd1a7eb - remove lock files f7cd198 - remove lock files from master 942b01e - remove lock files from master 08ed5eb - Release preparation 2.1 5c56333 - Release preparation 2.1 fcbd86d Merge commit 'ce6c5c85565cf4ba66d2942b1c1aa34c3c389a33' into release/2.1 d79c4f4 Merge commit '7139917230723d97b9b8c99e27dcd5c3f7d2e8e1' into release/2.1 a91b309 - updated version number in upgrade notes 680e701 - updated version number in upgrade notes d953974 - prepared composer.json files for release 61d89c6 - 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 8033763 - Updated dev.json and lock files to include `self.version` as internal pointer to packages of marello, marello-ee and subscriptions 9552e48 - updated dev.lock files 98eb6c0 - updated dev json and lock file to include oro 3.1.9 - small changes regarding docker environment files 37cceb1 Merge branch 'develop' into feature/MAR10001-485-subscriptions 4c72f7d - CS fixes - Fixed CreateProduct test in ProductController test to take the attribute family into account when creating new products 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 d3ed4d0 - Merge commit '22a02abd2e26d568767c7824dba7970017871107' into feature/MAR10001-499 17383a0 - added composer.lock to .gitignore - remove composer.lock files 4ecfc51 - added composer.lock - added dev.lock - updated branch alias in marello package composer.json 05e1647 Add 'applications/marello-application-ee/' from commit 'd13f2b41e079dff4eee99f8874928459658daaff' a56511d Merge commit '44448293702551e588fff6fd5860d9d1e0db4a11' as 'package/marello' git-subtree-dir: package/marello git-subtree-split: 0b2497e
1 parent 3b7bdd1 commit fcf4a0a

File tree

53 files changed

+1003
-71
lines changed

Some content is hidden

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

53 files changed

+1003
-71
lines changed

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

+5
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,11 @@ public function generateResult($linkedWhgToScgs, $sortedWhgLevels, $product, $fl
265265
$reservedInventoryQuantity = $this->getReservedInventoryForProductScgs($product, $scgs);
266266
$totalInventoryToBalance = ($inventoryTotalForWhg - $reservedInventoryQuantity);
267267

268+
// prevent balanced inventory below 0.
269+
if ($totalInventoryToBalance < 0) {
270+
$totalInventoryToBalance = 0;
271+
}
272+
268273
/** @var BalancedResultObject[] $balancedResults */
269274
$balancedResults = $strategy->getResults($product, $scgs, $totalInventoryToBalance);
270275
$this->processResults($balancedResults, $product, $flushManager);

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/InvoiceBundle/Entity/AbstractInvoice.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* @ORM\Entity(repositoryClass="Marello\Bundle\InvoiceBundle\Entity\Repository\AbstractInvoiceRepository")
2828
* @ORM\InheritanceType("SINGLE_TABLE")
2929
* @ORM\DiscriminatorColumn(name="type", type="string")
30-
* @ORM\DiscriminatorMap({"invoice" = "Invoice", "creditmemo" = "Creditmemo"})
30+
* @ORM\DiscriminatorMap({"invoice" = "Marello\Bundle\InvoiceBundle\Entity\Invoice", "creditmemo" = "Marello\Bundle\InvoiceBundle\Entity\Creditmemo"})
3131
* @ORM\Table(name="marello_invoice_invoice")
3232
* @Oro\Config(
3333
* routeView="marello_invoice_invoice_view",

src/Marello/Bundle/InvoiceBundle/Entity/AbstractInvoiceItem.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* @ORM\Table(name="marello_invoice_invoice_item")
3232
* @ORM\InheritanceType("SINGLE_TABLE")
3333
* @ORM\DiscriminatorColumn(name="invoice_item_type", type="string")
34-
* @ORM\DiscriminatorMap({"invoiceitem" = "InvoiceItem", "creditmemoitem" = "CreditmemoItem"})
34+
* @ORM\DiscriminatorMap({"invoiceitem" = "Marello\Bundle\InvoiceBundle\Entity\InvoiceItem", "creditmemoitem" = "Marello\Bundle\InvoiceBundle\Entity\CreditmemoItem"})
3535
* @ORM\HasLifecycleCallbacks()
3636
*/
3737
abstract class AbstractInvoiceItem implements

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/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
}

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

+2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ services:
5555
class: Marello\Bundle\PurchaseOrderBundle\EventListener\Doctrine\PurchaseOrderOnOrderOnDemandCreationListener
5656
arguments:
5757
- '@marello_inventory.provider.available_inventory_provider'
58+
calls:
59+
- ['setConfigManager', ['@oro_config.manager']]
5860
tags:
5961
- { name: doctrine.event_listener, event: postPersist }
6062
- { name: doctrine.event_listener, event: postFlush }

0 commit comments

Comments
 (0)