You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Divesh Dutta (JIRA)" <ji...@apache.org> on 2015/02/21 12:02:13 UTC

[jira] [Commented] (OFBIZ-5352) Invoice Item Removal doesn't work when billing records exist

    [ https://issues.apache.org/jira/browse/OFBIZ-5352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14330128#comment-14330128 ] 

Divesh Dutta commented on OFBIZ-5352:
-------------------------------------

Hi [~ofbizzer]

First of all I would like to understand that why would you like to delete Invoice Item record when its already billed? Which business case would you like to handle here? 

I guess invoice items should only be allowed to be removed when Invoice is in "In progress" or "Received" status. When Invoice will be in In progress/received status, we should not have OrderItemBilling records in system. And then system should not throw this error. 

Also could you please give exact steps to regenerate the issue. 

> Invoice Item Removal doesn't work when billing records exist
> ------------------------------------------------------------
>
>                 Key: OFBIZ-5352
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5352
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: Release Branch 12.04
>            Reporter: Christian Carlow
>
> Invoice Items cannot be removed if the billing records have been created for the item.  Billing records in tables such as orderItemBilling are created when a Shipment statusId is changed to Pick or Pack which triggers the invoice to be created.
> For such cases, after clicking the "Remove" button for an item on the Invoice Items page, a primary key violation error occurs due to the invoice item being referenced in orderItemBilling.  
> It seems the "removeInvoiceItem" service in InvoiceServices.xml should be improved to delete billing records or any other records that would prevent the invoice item from being removed.  
> The shipmentItemBilling table may also cause a primary key violation so it should be handled also.
> It also seems that the billing information should be displayed and that is should be able to be edited.  It seems that picking/packing a shipment is the only way to associate an orderItem with an invoiceItem. 
> Shouldn't there exist a way to associate an invoice item with an order item through some invoice editor?  Perhaps this should be a separate issue as an Improvement.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)