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

2015-02-22 Thread Christian Carlow (JIRA)

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

Christian Carlow commented on OFBIZ-5352:
-

Thanks Divesh,

I'm closing this as not an issue because I think it was created back when I 
first joined the community and didn't fully understand the invoicing process.

> 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)


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

2015-02-21 Thread Divesh Dutta (JIRA)

[ 
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)


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

2013-10-16 Thread Christian Carlow (JIRA)

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

Christian Carlow commented on OFBIZ-5352:
-

Information displayed on the Order page (orderview) will need to be updated.  

Order Item invoiced quantity will be incorrect unless changed to account for 
the statusId that needs to be added.  

Invoices listed in the Payment Information widget might also need to be hidden 
if no active invoice items exist.  I think the Invoice statusId controls 
whether an invoice appears in the Invoices list so perhaps the Invoice Status 
should be changed if all invoice items have been cancelled.  Not sure yet how 
to handle such listings.

> 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
>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.1#6144)


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

2013-10-16 Thread Christian Carlow (JIRA)

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

Christian Carlow commented on OFBIZ-5352:
-

The widget that would list shipment items that have yet to be invoiced could be 
handled with this Improvement 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
>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.1#6144)


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

2013-10-16 Thread Christian Carlow (JIRA)

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

Christian Carlow commented on OFBIZ-5352:
-

On second thought, I suppose a shipment could be shipped and invoiced 
afterwards.  

I think the Shipment statusId should be ignored if corresponding invoice items 
are changed.

What is needed is a widget that lists shipment items that have yet to be 
invoiced.

> 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
>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.1#6144)


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

2013-10-16 Thread Christian Carlow (JIRA)

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

Christian Carlow commented on OFBIZ-5352:
-

I was thinking the same thing (soft delete) like is done for OrderItem.  Extra 
logic would be needed for handling the associated Shipment.

Invoice items are created for all of a Shipment's issued items when the 
statusId is changed to "Pick" or "Pack".  If one of those itemIssuance invoices 
are deleted (cancelled) then should the Shipment statusId be changed back to 
"Input"?  Doing so would mean adding logic to prevent duplicating already 
invoiced shipment items if the statusId were changed back to "Pick" or "Pack".  

It doesn't seem like the Shipment statusId should necessarily be dependent on 
whether all itemIssances have been invoiced or not.  However it does seem that 
there should be some logic to prevent a Shipment from being assigned a statusId 
of "Shipped" if not all of the Shipment's issued items have been invoiced 
unless there is some case where issued items should be shipped without 
necessarily having been invoiced but I cannot think of one.



> 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
>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.1#6144)


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

2013-10-16 Thread Adrian Crum (JIRA)

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

Adrian Crum commented on OFBIZ-5352:


The problem with deleting anything in a relational database is the potential 
for pk/fk violations. If deleting the invoice item causes a violation, then 
deleting the billing record will probably cause one too.

A better approach would be to leave the records in place and mark them as 
deleted (a soft delete).


> 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
>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.1#6144)


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

2013-10-16 Thread Christian Carlow (JIRA)

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

Christian Carlow commented on OFBIZ-5352:
-

Looks like OrderItemBilling, OrderAdjustmentBilling, ShipmentItemBilling, 
SnvoiceTerm, InvoiceItemAttribute, InvoiceItemAssoc, PaymentApplication, 
TimeEntry, and WorkEffortBilling entities could cause primary key violations 
when an InvoiceItem is being removed.

Rather than removing the invoiceItem, it seems like InvoiceItem having a 
statusId like OrderItem does to indicate whether it is cancelled would be a 
better method for removal.



> 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
>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.1#6144)