You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Bilgin Ibryam <bi...@iguanait.com> on 2008/05/14 12:33:53 UTC

Service for Canceling ItemIssuance

Hi all,

I'd like to add a service for canceling item issuance.
I found in the list that this feature is asked before some time
http://www.nabble.com/Cancel-shipment-to11953006.html#a11953006 and also
it is needed for OFBIZ-1766 - canceling shipments.

I'm not familiar with all the inventory and accounting code and I would
appreciate comments/advices/help.

Do you think that this is a right approach for implementing it:

Add a new cancelQuantity field to ItemIssuance entity for storing the
canceled quantity.
Create a CancelItemIssuance service which works the following way:

1. Add the cancelQuantity quantity to ItemIssuance.cancelQuantity field.
2. Create a InventoryItemDetail entry with quantityOnHandDiff and
availableToPromiseDiff equal to cancelQuantity.
3. Call or create a seca for balanceInventoryItems service to update
inventory reservations.
4. Create a seca for adjusting the accounting transaction.

Thanks,
Bilgin
 


Re: Service for Canceling ItemIssuance

Posted by Bilgin Ibryam <bi...@iguanait.com>.
>What is the scenario where this would be reversed?

If the customer change mind after the item is issued from inventory but
the shipment still not packed(invoice not created) then there is no way
to remove the item from shipment and from the future invoice that will
be created. The only solution is to create an order return and invoice
for it. 
I'd like to cancel the issuance if the shipment is still not packed, and
not to invoice that item.

Are the steps mentioned in my previous email fine for this scenario?

Thanks for your reply
Bilgin


Re: Service for Canceling ItemIssuance

Posted by iain <ia...@westnet.com.au>.
David,

2 scenarios...

1) Receiving a purchase order and the receiver mistakenly receives the 
wrong product...need to unissue an item (happens surprisingly often)
2) Issued an item to fulfil a sales order (not necessarily packed the 
shipment and invoiced yet) - customer cancels the order, so we need to 
unissue the item and give it back to inventory (this happens pretty 
often for us)

Note scenario (2) probably doesn't happen that often if you have a web 
store, but with a real store customers have more scope and time for 
changing their mind :-)

Cheers, Iain

David E Jones wrote:
>
> Stepping back a little (to hopefully make it easier to see what needs 
> to be done here), from a business perspective does it mean and what 
> needs to happen when you cancel an ItemIssuance?
>
> When an item is issued from inventory (usually to a shipment), it 
> represents a stock-out and inventory is committed to the shipment or 
> whatever it is issued to.
>
> What is the scenario where this would be reversed?
>
> The main reason I'm asking is because chances are there is more that 
> needs to be considered and tracked with this sort of operation...
>
> -David
>
>
> On May 14, 2008, at 4:33 AM, Bilgin Ibryam wrote:
>
>> Hi all,
>>
>> I'd like to add a service for canceling item issuance.
>> I found in the list that this feature is asked before some time
>> http://www.nabble.com/Cancel-shipment-to11953006.html#a11953006 and also
>> it is needed for OFBIZ-1766 - canceling shipments.
>>
>> I'm not familiar with all the inventory and accounting code and I would
>> appreciate comments/advices/help.
>>
>> Do you think that this is a right approach for implementing it:
>>
>> Add a new cancelQuantity field to ItemIssuance entity for storing the
>> canceled quantity.
>> Create a CancelItemIssuance service which works the following way:
>>
>> 1. Add the cancelQuantity quantity to ItemIssuance.cancelQuantity field.
>> 2. Create a InventoryItemDetail entry with quantityOnHandDiff and
>> availableToPromiseDiff equal to cancelQuantity.
>> 3. Call or create a seca for balanceInventoryItems service to update
>> inventory reservations.
>> 4. Create a seca for adjusting the accounting transaction.
>>
>> Thanks,
>> Bilgin
>>
>>
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG. 
> Version: 8.0.100 / Virus Database: 269.23.16/1431 - Release Date: 5/13/2008 7:55 PM
>   


Re: Service for Canceling ItemIssuance

Posted by David E Jones <jo...@hotwaxmedia.com>.
Stepping back a little (to hopefully make it easier to see what needs  
to be done here), from a business perspective does it mean and what  
needs to happen when you cancel an ItemIssuance?

When an item is issued from inventory (usually to a shipment), it  
represents a stock-out and inventory is committed to the shipment or  
whatever it is issued to.

What is the scenario where this would be reversed?

The main reason I'm asking is because chances are there is more that  
needs to be considered and tracked with this sort of operation...

-David


On May 14, 2008, at 4:33 AM, Bilgin Ibryam wrote:

> Hi all,
>
> I'd like to add a service for canceling item issuance.
> I found in the list that this feature is asked before some time
> http://www.nabble.com/Cancel-shipment-to11953006.html#a11953006 and  
> also
> it is needed for OFBIZ-1766 - canceling shipments.
>
> I'm not familiar with all the inventory and accounting code and I  
> would
> appreciate comments/advices/help.
>
> Do you think that this is a right approach for implementing it:
>
> Add a new cancelQuantity field to ItemIssuance entity for storing the
> canceled quantity.
> Create a CancelItemIssuance service which works the following way:
>
> 1. Add the cancelQuantity quantity to ItemIssuance.cancelQuantity  
> field.
> 2. Create a InventoryItemDetail entry with quantityOnHandDiff and
> availableToPromiseDiff equal to cancelQuantity.
> 3. Call or create a seca for balanceInventoryItems service to update
> inventory reservations.
> 4. Create a seca for adjusting the accounting transaction.
>
> Thanks,
> Bilgin
>
>


Re: Service for Canceling ItemIssuance

Posted by Bilgin Ibryam <bi...@iguanait.com>.
Thanks Iain, I will check it!



Re: Service for Canceling ItemIssuance

Posted by iain <ia...@westnet.com.au>.
Bilgin,

Not sure if this will help, but I had to hack an SQL function to unissue 
an item (haven't got the bandwidth to implement in OFBiz right now). 
This "backdoor" approach is obviously not the right thing, but maybe the 
query will short-circuit some of the analysis needed to work out which 
entities need to be modified.

I hope it can help.

Cheers, Iain

Bilgin Ibryam wrote:
> Hi all,
>
> I'd like to add a service for canceling item issuance.
> I found in the list that this feature is asked before some time
> http://www.nabble.com/Cancel-shipment-to11953006.html#a11953006 and also
> it is needed for OFBIZ-1766 - canceling shipments.
>
> I'm not familiar with all the inventory and accounting code and I would
> appreciate comments/advices/help.
>
> Do you think that this is a right approach for implementing it:
>
> Add a new cancelQuantity field to ItemIssuance entity for storing the
> canceled quantity.
> Create a CancelItemIssuance service which works the following way:
>
> 1. Add the cancelQuantity quantity to ItemIssuance.cancelQuantity field.
> 2. Create a InventoryItemDetail entry with quantityOnHandDiff and
> availableToPromiseDiff equal to cancelQuantity.
> 3. Call or create a seca for balanceInventoryItems service to update
> inventory reservations.
> 4. Create a seca for adjusting the accounting transaction.
>
> Thanks,
> Bilgin
>  
>   
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG. 
> Version: 8.0.100 / Virus Database: 269.23.16/1431 - Release Date: 5/13/2008 7:55 PM
>   


Re: Service for Canceling ItemIssuance

Posted by Bilgin Ibryam <bi...@iguanait.com>.
Jacopo,

it's not possible to retrieve the accounting transaction id, because in the
AcctgTrans entity keeps only the shipmentId. And one shipment may have many
ItemIssuances associated...

I think it's not necessary to revert the whole transaction. Creating
reversed transaction only for the canceled  quantity would be enough. 

The seca which does accounting transaction is
"createAcctgTransForCanceledSalesShipmentIssuance" in OFBIZ-1798 What do you
think?
-- 
View this message in context: http://www.nabble.com/Service-for-Canceling-ItemIssuance-tp17228500p17316624.html
Sent from the OFBiz - Dev mailing list archive at Nabble.com.


Re: Service for Canceling ItemIssuance

Posted by Jacopo Cappellato <ja...@gmail.com>.
Hi Bilgin,

please see my comments inline:

On May 15, 2008, at 6:48 PM, Bilgin Ibryam wrote:

>
> Iain described two scenarios:
>
> 1. Cancel issuance during receaiving purchase order.
> 2. Cance issuance done for sales shipment.
>
> I mainly work on the second senario and found one more step to be  
> done:
> Reserve Inventory for the order item. So far the steps looks like  
> this:
>
> 1. Add the cancelQuantity to ItemIssuance.cancelQuantity field.
> 2. Create a InventoryItemDetail.
> 3. ReserveInventory for the cancelledQuantity.
> 4. Call balanceInventoryItems.

or maybe the newer service: "reassignInventoryReservations"

>
> 5. Create a seca for adjusting the accounting transaction.
>

Yes, there should be a service that can be used to revert an existing  
accounting transaction: so we may retrieve the accounting transaction  
id and call that service to revert it (and this new service can be  
placed with the other postAcct* services in the accounting component).

In general it sounds good to me,

Jacopo

PS: also I agree that we should prevent the user to modify the  
shipment items of a packed (invoiced) shipment.

>
> -- 
> View this message in context: http://www.nabble.com/Service-for-Canceling-ItemIssuance-tp17228500p17257630.html
> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
>


Re: Service for Canceling ItemIssuance

Posted by Bilgin Ibryam <bi...@iguanait.com>.
Iain described two scenarios:

1. Cancel issuance during receaiving purchase order.
2. Cance issuance done for sales shipment.

I mainly work on the second senario and found one more step to be done:
Reserve Inventory for the order item. So far the steps looks like this:

1. Add the cancelQuantity to ItemIssuance.cancelQuantity field.
2. Create a InventoryItemDetail.
3. ReserveInventory for the cancelledQuantity.
4. Call balanceInventoryItems.
5. Create a seca for adjusting the accounting transaction.


-- 
View this message in context: http://www.nabble.com/Service-for-Canceling-ItemIssuance-tp17228500p17257630.html
Sent from the OFBiz - Dev mailing list archive at Nabble.com.