Hi all,
I have noticed strange behaviour during cancelling order item that posses sales tax adjustments. The status of the item is set to ITEM_CANCELLED and tax adjustments are not removed. Instead of this it is created order header adjustment that compensates order item sales tax adjustments. This was introduced in OFBIZ-461. The reason was that it was not possible to remove OrderAdjustment if one part of the adjustment is already invoiced(OrderAdjustmentBilling is present). After quick shipping the order the tax adjustments for the cancelled order items are ignored and in the invoice is present only the order header tax adjustment that negates the cancelled order item tax adjustments. So the invoice total amount is different from the order total amount. Even if this will be corrected I was wandering if this is the best approach because during order item cancellation it is created only one order header tax adjustment for all order item tax adjustments, without any information about the Tax authorities. The second problem is that order item editing does not follow this pattern. For example if you cancel one order item and then edit the price of another order item, then tax adjustments of the previously cancelled order item(first one) are removed, It is removed also the order header tax adjustment. I was wandering which is the best approach to correct these problems? Any suggestions will be of big help! Regards, Rashko Rejmer |
Hi Rashko
Comments inline, these are just my first thoughts I haven't looked at the code or entities 2008/6/24 Rashko Rejmer <[hidden email]>: > The status of the item is set to ITEM_CANCELLED and tax adjustments are > not removed. Instead of this it is created order header adjustment that > compensates order item sales tax adjustments. This was introduced in > OFBIZ-461. The reason was that it was not possible to remove > OrderAdjustment if one part of the adjustment is already > invoiced(OrderAdjustmentBilling is present). Instead of creating these balancing adjustments wouldn't it be ok to just update the OrderAdjustment with the new tax amount? After quick shipping the order the tax adjustments for the cancelled > order items are ignored and in the invoice is present only the order > header tax adjustment that negates the cancelled order item tax > adjustments. So the invoice total amount is different from the order > total amount. This sounds strange because if the order item was cancelled then there should have been no OrderAdjustmentBillings which would mean we could have just deleted the order adjustment and not created the balancing adjustments in the first place. Even if this will be corrected I was wandering if this is the best > approach because during order item cancellation it is created only one > order header tax adjustment for all order item tax adjustments, without > any information about the Tax authorities. It sounds like a work around that could do with a better approach The second problem is that order item editing does not follow this > pattern. For example if you cancel one order item and then edit the > price of another order item, then tax adjustments of the previously > cancelled order item(first one) are removed, It is removed also the > order header tax adjustment. Like I said at the top I can't see why we can't just adjust the amounts on the existing order adjustments, I can't imagine any need to preserve the original tax amounts. Regards Scott |
Hi Scott,
Thanks a lot about the response. I am interested to get those problems fixed quickly and I will investigate your proposal about updating the OrderAdjustment amount and then I will write again. Regards, Rashko Rejmer On Wed, 2008-06-25 at 23:01 +1200, Scott Gray wrote: > Hi Rashko > > Comments inline, these are just my first thoughts I haven't looked at the > code or entities > > 2008/6/24 Rashko Rejmer <[hidden email]>: > > > The status of the item is set to ITEM_CANCELLED and tax adjustments are > > not removed. Instead of this it is created order header adjustment that > > compensates order item sales tax adjustments. This was introduced in > > OFBIZ-461. The reason was that it was not possible to remove > > OrderAdjustment if one part of the adjustment is already > > invoiced(OrderAdjustmentBilling is present). > > > Instead of creating these balancing adjustments wouldn't it be ok to just > update the OrderAdjustment with the new tax amount? > > After quick shipping the order the tax adjustments for the cancelled > > order items are ignored and in the invoice is present only the order > > header tax adjustment that negates the cancelled order item tax > > adjustments. So the invoice total amount is different from the order > > total amount. > > > This sounds strange because if the order item was cancelled then there > should have been no OrderAdjustmentBillings which would mean we could have > just deleted the order adjustment and not created the balancing adjustments > in the first place. > > Even if this will be corrected I was wandering if this is the best > > approach because during order item cancellation it is created only one > > order header tax adjustment for all order item tax adjustments, without > > any information about the Tax authorities. > > > It sounds like a work around that could do with a better approach > > The second problem is that order item editing does not follow this > > pattern. For example if you cancel one order item and then edit the > > price of another order item, then tax adjustments of the previously > > cancelled order item(first one) are removed, It is removed also the > > order header tax adjustment. > > > Like I said at the top I can't see why we can't just adjust the amounts on > the existing order adjustments, I can't imagine any need to preserve the > original tax amounts. > > Regards > Scott |
In reply to this post by Scott Gray
Hi Scott and all,
Sorry for the late reply. Comments inline: On Wed, 2008-06-25 at 23:01 +1200, Scott Gray wrote: > > The status of the item is set to ITEM_CANCELLED and tax adjustments > are > > not removed. Instead of this it is created order header adjustment > that > > compensates order item sales tax adjustments. This was introduced in > > OFBIZ-461. The reason was that it was not possible to remove > > OrderAdjustment if one part of the adjustment is already > > invoiced(OrderAdjustmentBilling is present). > > > Instead of creating these balancing adjustments wouldn't it be ok to > just > update the OrderAdjustment with the new tax amount? I was wandering if it is not better to exclude all adjustments(tax, promotional) of fully canceled order items, from all order amount calculation methods (getOrderSubTotal, getOrderTotal, ...). This way the canceled items will be present in the order, only to keep history of order changes, and they will not be taken into account in all order amount calculations. In this case there would not be necessary to create any balancing adjustments at all. Regards, Rashko Rejmer |
Hi Rashko
I still think it would be easier to either delete the adjustment or change the amount as necessary, mostly because it sounds like the easiest fix and I can't think of any reason why the original values would need to be maintained. If there's a good reason to keep them then that's fine, I just can't think of it. Regards Scott 2008/7/1 Rashko Rejmer <[hidden email]>: > Hi Scott and all, > > Sorry for the late reply. Comments inline: > > On Wed, 2008-06-25 at 23:01 +1200, Scott Gray wrote: > > > The status of the item is set to ITEM_CANCELLED and tax adjustments > > are > > > not removed. Instead of this it is created order header adjustment > > that > > > compensates order item sales tax adjustments. This was introduced in > > > OFBIZ-461. The reason was that it was not possible to remove > > > OrderAdjustment if one part of the adjustment is already > > > invoiced(OrderAdjustmentBilling is present). > > > > > > Instead of creating these balancing adjustments wouldn't it be ok to > > just > > update the OrderAdjustment with the new tax amount? > > I was wandering if it is not better to exclude all adjustments(tax, > promotional) of fully canceled order items, from all order amount > calculation methods (getOrderSubTotal, getOrderTotal, ...). This way the > canceled items will be present in the order, only to keep history of > order changes, and they will not be taken into account in all order > amount calculations. > > In this case there would not be necessary to create any balancing > adjustments at all. > > Regards, > Rashko Rejmer > > |
Thanks Scott,
I will create Jira for this issue. I also think that the easiest way will be to delete existing adjustments when canceling order item. But I will stick only to changing the amount of all adjustments of the item to 0 because in situations when only part of the item is already shipped then there will be problems because of existing OrderAdjustmentBilling records. Do you think that this approach could be applied to promotional and shipping(if any) adjustments of the canceled order items? Regards, Rashko Rejmer On Tue, 2008-07-01 at 22:22 +1200, Scott Gray wrote: > Hi Rashko > > I still think it would be easier to either delete the adjustment or change > the amount as necessary, mostly because it sounds like the easiest fix and I > can't think of any reason why the original values would need to be > maintained. If there's a good reason to keep them then that's fine, I just > can't think of it. > > Regards > Scott > > 2008/7/1 Rashko Rejmer <[hidden email]>: > > > Hi Scott and all, > > > > Sorry for the late reply. Comments inline: > > > > On Wed, 2008-06-25 at 23:01 +1200, Scott Gray wrote: > > > > The status of the item is set to ITEM_CANCELLED and tax adjustments > > > are > > > > not removed. Instead of this it is created order header adjustment > > > that > > > > compensates order item sales tax adjustments. This was introduced in > > > > OFBIZ-461. The reason was that it was not possible to remove > > > > OrderAdjustment if one part of the adjustment is already > > > > invoiced(OrderAdjustmentBilling is present). > > > > > > > > > Instead of creating these balancing adjustments wouldn't it be ok to > > > just > > > update the OrderAdjustment with the new tax amount? > > > > I was wandering if it is not better to exclude all adjustments(tax, > > promotional) of fully canceled order items, from all order amount > > calculation methods (getOrderSubTotal, getOrderTotal, ...). This way the > > canceled items will be present in the order, only to keep history of > > order changes, and they will not be taken into account in all order > > amount calculations. > > > > In this case there would not be necessary to create any balancing > > adjustments at all. > > > > Regards, > > Rashko Rejmer > > > > |
Is it possible to cancel an order item when part of it has already been
shipped? -Scott 2008/7/1 Rashko Rejmer <[hidden email]>: > Thanks Scott, > > I will create Jira for this issue. I also think that the easiest way > will be to delete existing adjustments when canceling order item. But I > will stick only to changing the amount of all adjustments of the item to > 0 because in situations when only part of the item is already shipped > then there will be problems because of existing OrderAdjustmentBilling > records. > Do you think that this approach could be applied to promotional and > shipping(if any) adjustments of the canceled order items? > > Regards, > Rashko Rejmer > > On Tue, 2008-07-01 at 22:22 +1200, Scott Gray wrote: > > Hi Rashko > > > > I still think it would be easier to either delete the adjustment or > change > > the amount as necessary, mostly because it sounds like the easiest fix > and I > > can't think of any reason why the original values would need to be > > maintained. If there's a good reason to keep them then that's fine, I > just > > can't think of it. > > > > Regards > > Scott > > > > 2008/7/1 Rashko Rejmer <[hidden email]>: > > > > > Hi Scott and all, > > > > > > Sorry for the late reply. Comments inline: > > > > > > On Wed, 2008-06-25 at 23:01 +1200, Scott Gray wrote: > > > > > The status of the item is set to ITEM_CANCELLED and tax adjustments > > > > are > > > > > not removed. Instead of this it is created order header adjustment > > > > that > > > > > compensates order item sales tax adjustments. This was introduced > in > > > > > OFBIZ-461. The reason was that it was not possible to remove > > > > > OrderAdjustment if one part of the adjustment is already > > > > > invoiced(OrderAdjustmentBilling is present). > > > > > > > > > > > > Instead of creating these balancing adjustments wouldn't it be ok to > > > > just > > > > update the OrderAdjustment with the new tax amount? > > > > > > I was wandering if it is not better to exclude all adjustments(tax, > > > promotional) of fully canceled order items, from all order amount > > > calculation methods (getOrderSubTotal, getOrderTotal, ...). This way > the > > > canceled items will be present in the order, only to keep history of > > > order changes, and they will not be taken into account in all order > > > amount calculations. > > > > > > In this case there would not be necessary to create any balancing > > > adjustments at all. > > > > > > Regards, > > > Rashko Rejmer > > > > > > > > |
Yes it is possible. I just have created an example on the demo server:
https://demo.hotwaxmedia.com/ordermgr/control/orderview?orderId=WSCO10002 Maybe this should be deprecated. Probably it will be better, to make the service to check if part of the item is already shipped and to allow only the rest of the item quantity to be canceled. Regards, Rashko Rejmer On Tue, 2008-07-01 at 23:02 +1200, Scott Gray wrote: > Is it possible to cancel an order item when part of it has already been > shipped? > > -Scott > > 2008/7/1 Rashko Rejmer <[hidden email]>: > > > Thanks Scott, > > > > I will create Jira for this issue. I also think that the easiest way > > will be to delete existing adjustments when canceling order item. But I > > will stick only to changing the amount of all adjustments of the item to > > 0 because in situations when only part of the item is already shipped > > then there will be problems because of existing OrderAdjustmentBilling > > records. > > Do you think that this approach could be applied to promotional and > > shipping(if any) adjustments of the canceled order items? > > > > Regards, > > Rashko Rejmer > > > > On Tue, 2008-07-01 at 22:22 +1200, Scott Gray wrote: > > > Hi Rashko > > > > > > I still think it would be easier to either delete the adjustment or > > change > > > the amount as necessary, mostly because it sounds like the easiest fix > > and I > > > can't think of any reason why the original values would need to be > > > maintained. If there's a good reason to keep them then that's fine, I > > just > > > can't think of it. > > > > > > Regards > > > Scott > > > > > > 2008/7/1 Rashko Rejmer <[hidden email]>: > > > > > > > Hi Scott and all, > > > > > > > > Sorry for the late reply. Comments inline: > > > > > > > > On Wed, 2008-06-25 at 23:01 +1200, Scott Gray wrote: > > > > > > The status of the item is set to ITEM_CANCELLED and tax adjustments > > > > > are > > > > > > not removed. Instead of this it is created order header adjustment > > > > > that > > > > > > compensates order item sales tax adjustments. This was introduced > > in > > > > > > OFBIZ-461. The reason was that it was not possible to remove > > > > > > OrderAdjustment if one part of the adjustment is already > > > > > > invoiced(OrderAdjustmentBilling is present). > > > > > > > > > > > > > > > Instead of creating these balancing adjustments wouldn't it be ok to > > > > > just > > > > > update the OrderAdjustment with the new tax amount? > > > > > > > > I was wandering if it is not better to exclude all adjustments(tax, > > > > promotional) of fully canceled order items, from all order amount > > > > calculation methods (getOrderSubTotal, getOrderTotal, ...). This way > > the > > > > canceled items will be present in the order, only to keep history of > > > > order changes, and they will not be taken into account in all order > > > > amount calculations. > > > > > > > > In this case there would not be necessary to create any balancing > > > > adjustments at all. > > > > > > > > Regards, > > > > Rashko Rejmer > > > > > > > > > > > > |
yes, I agree: we cannot cancel items that have been invoiced.
Jacopo On Jul 1, 2008, at 1:13 PM, Rashko Rejmer wrote: > Yes it is possible. I just have created an example on the demo server: > https://demo.hotwaxmedia.com/ordermgr/control/orderview?orderId=WSCO10002 > > Maybe this should be deprecated. Probably it will be better, to make > the > service to check if part of the item is already shipped and to allow > only the rest of the item quantity to be canceled. > > Regards, > Rashko Rejmer > > > On Tue, 2008-07-01 at 23:02 +1200, Scott Gray wrote: >> Is it possible to cancel an order item when part of it has already >> been >> shipped? >> >> -Scott >> >> 2008/7/1 Rashko Rejmer <[hidden email]>: >> >>> Thanks Scott, >>> >>> I will create Jira for this issue. I also think that the easiest way >>> will be to delete existing adjustments when canceling order item. >>> But I >>> will stick only to changing the amount of all adjustments of the >>> item to >>> 0 because in situations when only part of the item is already >>> shipped >>> then there will be problems because of existing >>> OrderAdjustmentBilling >>> records. >>> Do you think that this approach could be applied to promotional and >>> shipping(if any) adjustments of the canceled order items? >>> >>> Regards, >>> Rashko Rejmer >>> >>> On Tue, 2008-07-01 at 22:22 +1200, Scott Gray wrote: >>>> Hi Rashko >>>> >>>> I still think it would be easier to either delete the adjustment or >>> change >>>> the amount as necessary, mostly because it sounds like the >>>> easiest fix >>> and I >>>> can't think of any reason why the original values would need to be >>>> maintained. If there's a good reason to keep them then that's >>>> fine, I >>> just >>>> can't think of it. >>>> >>>> Regards >>>> Scott >>>> >>>> 2008/7/1 Rashko Rejmer <[hidden email]>: >>>> >>>>> Hi Scott and all, >>>>> >>>>> Sorry for the late reply. Comments inline: >>>>> >>>>> On Wed, 2008-06-25 at 23:01 +1200, Scott Gray wrote: >>>>>>> The status of the item is set to ITEM_CANCELLED and tax >>>>>>> adjustments >>>>>> are >>>>>>> not removed. Instead of this it is created order header >>>>>>> adjustment >>>>>> that >>>>>>> compensates order item sales tax adjustments. This was >>>>>>> introduced >>> in >>>>>>> OFBIZ-461. The reason was that it was not possible to remove >>>>>>> OrderAdjustment if one part of the adjustment is already >>>>>>> invoiced(OrderAdjustmentBilling is present). >>>>>> >>>>>> >>>>>> Instead of creating these balancing adjustments wouldn't it be >>>>>> ok to >>>>>> just >>>>>> update the OrderAdjustment with the new tax amount? >>>>> >>>>> I was wandering if it is not better to exclude all >>>>> adjustments(tax, >>>>> promotional) of fully canceled order items, from all order amount >>>>> calculation methods (getOrderSubTotal, getOrderTotal, ...). This >>>>> way >>> the >>>>> canceled items will be present in the order, only to keep >>>>> history of >>>>> order changes, and they will not be taken into account in all >>>>> order >>>>> amount calculations. >>>>> >>>>> In this case there would not be necessary to create any balancing >>>>> adjustments at all. >>>>> >>>>> Regards, >>>>> Rashko Rejmer >>>>> >>>>> >>> >>> > |
In reply to this post by Rashko Rejmer
ugh that looks so wrong, it should be marked as completed, the line total
shouldn't say zero, the adjustments should be updated and remaining/outstanding quantities shouldn't say -5. -Scott 2008/7/1 Rashko Rejmer <[hidden email]>: > Yes it is possible. I just have created an example on the demo server: > https://demo.hotwaxmedia.com/ordermgr/control/orderview?orderId=WSCO10002 > > Maybe this should be deprecated. Probably it will be better, to make the > service to check if part of the item is already shipped and to allow > only the rest of the item quantity to be canceled. > > Regards, > Rashko Rejmer > > > On Tue, 2008-07-01 at 23:02 +1200, Scott Gray wrote: > > Is it possible to cancel an order item when part of it has already been > > shipped? > > > > -Scott > > > > 2008/7/1 Rashko Rejmer <[hidden email]>: > > > > > Thanks Scott, > > > > > > I will create Jira for this issue. I also think that the easiest way > > > will be to delete existing adjustments when canceling order item. But I > > > will stick only to changing the amount of all adjustments of the item > to > > > 0 because in situations when only part of the item is already shipped > > > then there will be problems because of existing OrderAdjustmentBilling > > > records. > > > Do you think that this approach could be applied to promotional and > > > shipping(if any) adjustments of the canceled order items? > > > > > > Regards, > > > Rashko Rejmer > > > > > > On Tue, 2008-07-01 at 22:22 +1200, Scott Gray wrote: > > > > Hi Rashko > > > > > > > > I still think it would be easier to either delete the adjustment or > > > change > > > > the amount as necessary, mostly because it sounds like the easiest > fix > > > and I > > > > can't think of any reason why the original values would need to be > > > > maintained. If there's a good reason to keep them then that's fine, > I > > > just > > > > can't think of it. > > > > > > > > Regards > > > > Scott > > > > > > > > 2008/7/1 Rashko Rejmer <[hidden email]>: > > > > > > > > > Hi Scott and all, > > > > > > > > > > Sorry for the late reply. Comments inline: > > > > > > > > > > On Wed, 2008-06-25 at 23:01 +1200, Scott Gray wrote: > > > > > > > The status of the item is set to ITEM_CANCELLED and tax > adjustments > > > > > > are > > > > > > > not removed. Instead of this it is created order header > adjustment > > > > > > that > > > > > > > compensates order item sales tax adjustments. This was > introduced > > > in > > > > > > > OFBIZ-461. The reason was that it was not possible to remove > > > > > > > OrderAdjustment if one part of the adjustment is already > > > > > > > invoiced(OrderAdjustmentBilling is present). > > > > > > > > > > > > > > > > > > Instead of creating these balancing adjustments wouldn't it be ok > to > > > > > > just > > > > > > update the OrderAdjustment with the new tax amount? > > > > > > > > > > I was wandering if it is not better to exclude all adjustments(tax, > > > > > promotional) of fully canceled order items, from all order amount > > > > > calculation methods (getOrderSubTotal, getOrderTotal, ...). This > way > > > the > > > > > canceled items will be present in the order, only to keep history > of > > > > > order changes, and they will not be taken into account in all order > > > > > amount calculations. > > > > > > > > > > In this case there would not be necessary to create any balancing > > > > > adjustments at all. > > > > > > > > > > Regards, > > > > > Rashko Rejmer > > > > > > > > > > > > > > > > > > |
Free forum by Nabble | Edit this page |