Calculating taxes before any promotion gets applied - SAP Hybris - sap-commerce-cloud

We are using hybris 1811 version. B2C application.
Tax calculation is done on the net amount i.e. after the promotion is applied.
But we want the tax calculation to be done on the grosss amount i.e first tax should be calculated then promotion should be applied.
Is there any way we can achieve this? I just started working on this and researching more.
Any leads would be very helpful. Thanks.

make a hook that implements CommerceCartCalculationMethodHook and create your logic in beforeCalculate

Related

Kanban in Azure DevOps

We plan to use Kanban in our DevOps project. It however looks like I still need to create Iterations (e.g. 14 days) and map the Kanban widget to show the WIP over the 14 day cycle.
So, in essence I still need to create Iterations. And a follow up understanding accordingly is that I will need to do sprint planning for the iterations. Is that the correct understanding or am I missing something?
Thanks
Two things here:
First, Kanban is mainly used to visualize the state or flow of your work. It is interactive in that you can change the state of the workitems as it progresses from one state to another. Kanban boards are not really dependent on sprint as such, but provide a cumulative flow chart for monitoring progress. It is the Taskboard that is tied to tracking the sprint tasks.
Second, the WIP limits are used to limit the number of workitems in progress, and can help identify process bottlenecks and improve the Team's efficiency. These numbers are set per stage and act as the soft constraint that can be revisited later.
And yes, you have to create the iterations and iteration dates, although they can be as per your pace, and map your Team's work flow to Kanban columns!
Additional references:
Kanban Basics
Kanban quickstart
What is Kanban?
If you want to re-evaluate your process model, give this doc a prior reading.
Hope this clarifies!
Well, Kanban cares about Flow. That requires some understanding of Queuing Theory. One aspect is for example LittleĀ“s Law. Which requires Delivery Rate. So I find it valid to ask for that metric (without iterations!) when Kanban is supposed to be supported.
Second, Kanban cares about Balance. eg between work arrival rate and work departure rate. Again it would be nice, if these metrics would be available out of the box.
(I teach Kanban courses BTW)
Something similar is required by DORA metrics: deployment frequency.
Which I assumed to be available out of the box in a product with "DevOps" in its name.

Acumatica and Unit Cost

As background, we are very reliant on the serial items and every single serial item has it's own unit cost and price, etc...We are on 2017r2 for now.
We have had to overwrite the standard acumatica functionality that tries to pick up the stock items last cost to use that as it's unit cost fo that form/document. We have seen this on most documents in the inventory and distribution modules...
Anyway, we have realized that we missed a few spots and now we have a massive project to try and identify all of the items that were out of sync and correct them.
My questions/request for help is the following:
1) Is there any way to know all of the places that could effectively change what Acumatica has as the unit cost for a serial item? I know this happens on inventory receipts, purchase receipts, Adjustments, items that come out of the Manufacturing module, etc... Pretty much everywhere where it ends with a receipt of some sort i guess. I see this is also the case for inventory receipts on a two step transfer (This is the one that got us, we didn't realize that would happen).
2) Is there anyway on a more global level within Acumatica to have it automatically pick up the serial level unit cost as opposed to ever using the stock item cost statistics?
3) Does anyone have any ideas as to how to try and identify all of the possible items that may be effected, and how to resolve them once we identify them? Thankfully, we do have some custom fields that will hopefully have the correct unit cost, but we will still need to adjust these items back to their correct unit cost. But any ideas would be greatly appreciated.
I hope I explained the above clearly, and thank you in advance for anyone kind enough to help us out.
Please find the detailed explanation of the Item Costing in Acumatica by this link.
I think you can consider the generation of the Inventory Adjustment for all the Items with corresponding serial numbers, 0 quantity and fixed amount to correct all the costs without checking if the cost is correct or not. Please create backup snapshots before trying to generate such adjustments and check it on the test instance.

Is there any harm in Converting all Customers to Vendors automatically?

I understand that Acumatica treats Customers and Vendors differently, and if you require a customer to also be a Vendor (which is often the case for us) and vice a versa, then you have convert the the Customer to a Vendor (or Vendor to a Customer). We often use the convert to vendor code on git (https://github.com/Acumatica/Acumatica-ExtendToCustomerVendorDuringImport). But my question is, is there any harm or reason not to just convert all vendors to customers and vice a versa to save our users the headache of doing this for each one later on?
There's a general answer to those types of questions. If the operation can be done in the UI by a user then it's assumed there's no harm in doing so. When an operation can't be done in UI due to a validation error it's assumed that making that change would corrupt the data.
Once the operation is confirmed to be working in the UI you can work on an automation script. These can be done with a Customization Plugin that runs when the customization project is published.
You should always do the operation using the PXGraph classes of Acumatica. For example, if you need to confirm shipments in a script you create the SOShipmentEntry graph, set the current document of the graph and invoke the confirm shipment action.
Regarding the GitHub project, I don't think it's officially maintained so you'll need to test it. One possible issue you might encounter with conversion is that you can't re-convert the vendor back to a customer once he has started making sales transactions.

Does Hybris commerce have price override capability

Does Hybris commerce have price override or appeasements capability at Order level or Item level.
There are mulitple ways how that can be done in hybris, one example is using ASM (assisted service module) that offers special promotions that can be granted by a service agent.
There might also be ways to achieve this using the cs-cockpit (customer service cockpit), I haven't looked into that deeper though.
For ASM documentation look e.g. here: https://help.hybris.com/6.3.0/hcd/8ac06f10866910148d8c850e15b102d2.html
Hope this helps a bit.
It really depends on what exactly are you trying to achieve. If you like some sort of a discount or promotions, you can see the link provided by Sebastion. In the wiki you can also find other promotion and discount engines. Another solution would be to have multiple price rows per product. Hybris supports this. For example for a particular product, you can set a special price for a special customer or customerGroup. Also the same way you can set different prices for different quantities. For example an apple costs 1$ but if you buy 100, the price goes to 0.75$.
More information about the pricerows: here
Keep in mind that Hybris is highly customizable so you can also override some logic from the PriceFactory but i would recommend using first the out of the box price features and then try overriding the PriceFactory.

Updating Custom Entity fields automatically when/with a diff Custom Entity fields are updated

I have 2 custom entities ex: Building and Business in CRM on-premise. Building has multiple Units/Suite #'s and each Unit/Suite# is occupied by a Business. If a Building Unit/Suite is under renovation, then the Business has to be temporarily closed.
How can i automatically update Business Open/Close when Building Unit/Suite status changes? The update does not need to happen instantly. I need search around 20000 records to update the correct Business entity. Also there are fields in Business like start and end date which is retrieved from Building and Closure duration is updated with end(minus)start date.
Is Plugins the only way and how can i achieve it using plugins! How difficult would it be, impact on server and i am mid level C# dev. Please provide any links in the right direction. The env is 2011 on-prem
Thank you very much !!!
A straightforward solution can be built with a plugin. A synchronous plugin can update the status changes to the Business entity immediately and (in the PreOperation or PostOperation stage of the Update message) even within the same database transaction.
Generally speaking, with plugins you can build the most efficient and seamlessly integrated business logic possible.
However, often you can actually achieve pretty much the same using a workflow. Some advantages of building workflows:
Does not require a skilled software developer to build;
Workflows can be modified ('configured') quickly.
Execution of workflows can be postponed (e.g. until a condition is met or a date has passed).
Some downsides of workflows are:
In CRM 2011 your code always runs asynchronously, outside of the original database transaction;
Some time may pass until the action takes place; the user does not get immediate feedback;
Querying and selecting related data is limited to n:1 relationships (from the n-side to the 1-side, not vice versa);
Execution of workflows requires more resources than plugins;
Extensive use of workflows can easily lead to spaghetti systems that are really hard to maintain and perform bad.
In your scenario it looks like the requirements for selecting the appropriate Business record are too complex to handle in a workflow. In a workflow you basically can only navigate from one record to the other by following lookup references on the record at hand. This means you can only get from one record to the other when there is a n:1 relationship and when you navigate from the n-side to the 1-side.
In plugins you do not have this limitation; there you can write a QueryExpression or Linq-query to get the records you need. So, in your case a plugin seems to be the right choice to me.

Resources