Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8C01C200D33 for ; Wed, 25 Oct 2017 05:43:21 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8A99C160BF1; Wed, 25 Oct 2017 03:43:21 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2A3301609C8 for ; Wed, 25 Oct 2017 05:43:20 +0200 (CEST) Received: (qmail 59633 invoked by uid 500); 25 Oct 2017 03:43:19 -0000 Mailing-List: contact dev-help@ofbiz.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ofbiz.apache.org Delivered-To: mailing list dev@ofbiz.apache.org Received: (qmail 59621 invoked by uid 99); 25 Oct 2017 03:43:18 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Oct 2017 03:43:18 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 8A6D5C75CC for ; Wed, 25 Oct 2017 03:43:17 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.489 X-Spam-Level: ** X-Spam-Status: No, score=2.489 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, T_KAM_HTML_FONT_INVALID=0.01] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=hotwaxsystems-com.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id FPtEovy9Kzit for ; Wed, 25 Oct 2017 03:43:14 +0000 (UTC) Received: from mail-yw0-f170.google.com (mail-yw0-f170.google.com [209.85.161.170]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 1D14D5F239 for ; Wed, 25 Oct 2017 03:43:14 +0000 (UTC) Received: by mail-yw0-f170.google.com with SMTP id t11so16901116ywg.12 for ; Tue, 24 Oct 2017 20:43:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotwaxsystems-com.20150623.gappssmtp.com; s=20150623; h=from:references:in-reply-to:mime-version:thread-index:date :message-id:subject:to; bh=XgV8wqhfzskWX3cLyvOFx2b3den0YMijyuAPudzWDsc=; b=Gu1S3STWBsa9PcNQ8AFTqnGm0vaZgRFT+eI2GEIa4RrYb7a5+hcWaqQ/SwiXztorlt /xawfScP+TnM3boEt8wcKRwhnHUODsPHhf++bEo8Tu2gVaxDF4aL/EuowESbYmlFPi6F aZlMS8MvkXMfsGNnAUxgUcIc5jKYDr/BXmfvHGXjmt9q0FMcrYxdL+3qX5EPwNsIwR+O QzgjaXSIj5JtCnm3dgdrh3y+VwiSu9nS2XOTI7qR9JWh/Jjc0IWtUUJZzmARIttdR406 moAocNZkvOjR28cAnmhWvt33QtI0KKkU3/4rbAhEa1QvuOHKpge3HyCGmmpe2DNCXqIi 378Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:references:in-reply-to:mime-version :thread-index:date:message-id:subject:to; bh=XgV8wqhfzskWX3cLyvOFx2b3den0YMijyuAPudzWDsc=; b=QP+Q9fJuNsHieQXRvp+eEd27cPJHXqLRdVV7vybGYMW55G8W6WMRupeXBTEf4rDQ+X hVI0ebRD4fDGykotct3CPI82qa+U86bb0veYob4okAkkt49J48vCYzR5C2yY08Daw2+B 0azT96wQoIgCuWEnrBiVBfDXWUoX7LRCDRWJd1QebXh+wUFcumtoxyNFEzUV69kPECzf u+ixeJ2ubYwBqoTKHn2vjLxJsTcvXNILuk203HbNXbqnI+frFT83c0FQ6NX7E+RG5l8D rb1PF9ZsymiQU0r+f9MloGT7MdZLq5f1mhggZ9ibyVugBbE17+jZvdYaLYk7EgHKwE7O A50g== X-Gm-Message-State: AMCzsaW+YLJ3DVBWlMu/CE5lCe2a6zNbknU/Nr5hJARRgssuy12YMzyK PNY9L7cJ2YQCoz0nXItSRqVuU6o9JWcCnbUQPcUeaA== X-Google-Smtp-Source: ABhQp+QXIEybQJ45GNA4buBq9B+d/8u2wkFi6w4KUgHcj7vBMutATW+OKfCvwTMnOI+wjav/CXNQlMxI5luTDsVQeDo= X-Received: by 10.37.63.7 with SMTP id m7mr472513yba.90.1508902993114; Tue, 24 Oct 2017 20:43:13 -0700 (PDT) From: Swapnil Shah References: <9829d4fdc4ae85b8bb43f36c89634200@mail.gmail.com> <212f6917d0397923c087a538732debb1@mail.gmail.com> In-Reply-To: MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQFMDtZ9F1AYbwnbaJ8zwfcPAPMnvAFfgKG4Aa9ezjYAsy/32wI9rihSAgQ92s8C0lXeqwEEOA/zAMZ+mlkCtDSrswMpP24qo25X5VA= Date: Wed, 25 Oct 2017 09:13:08 +0530 Message-ID: <5c494fca028dd0a2ab0d2b142822c77b@mail.gmail.com> Subject: RE: RE: RE: Quantity missing for inventory transfer records To: dev@ofbiz.apache.org Content-Type: multipart/alternative; boundary="001a114bd3f2e7d2dc055c56da94" archived-at: Wed, 25 Oct 2017 03:43:21 -0000 --001a114bd3f2e7d2dc055c56da94 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Let's keep in mind that in reality it's the same single shipment that needs to change hands between source and destination facility as a part of single operational system. If we are willing to take Order model route, then is it possible that we introduce a new order type 'Replenishment Order (RO)' or 'Transfer Order' along with new Shipment Type =E2=80=98Transfer Shipment=E2= =80=99. And allow to have these ROs processed through this single transfer shipment. What it would mean is that: 1. Create RO with Shipping Facility (i.e. originating DC/Warehouse/Store) and Receiving Facility (i.e. destination DC/Warehouse/Store). Possibly with same =E2=80=98Bill/Ship From Vendor= =E2=80=99 and =E2=80=98Bill/Ship to Customer=E2=80=99 party id (as long as both origin= ating and destination facilities are owned by same registered company or business entity). 2. Allow to selectively reserve Inventory Items against RO items (even if it means overriding existing reservations). 3. Allow warehouse/facility to group all common destination RO in a single =E2=80=98Transfer Shipment=E2=80=99 during picking. 4. Once shipment is packed/shipped from originating facility then move its status to =E2=80=98Shipped=E2=80=99. At the same time linked RO=E2= =80=99s status can also be marked as =E2=80=98Shipped=E2=80=99. This should affect the on Hand to t= he tune of shipped units. 5. Generate only a separate Tax Invoice (if applicable) against linked RO. 6. Allow Destination Facility to =E2=80=98Receive=E2=80=99 the =E2=80=98= Shipped=E2=80=99 RO (similar to PO receiving) but under the very same linked Transfer Shipment that was shipped from originating facility. This should affect the On hand to the tune of received units. 7. Once whole Shipment is successfully received, move the shipment to =E2=80=98Received=E2=80=99 status. And at the same time linked RO can al= so be marked as =E2=80=98Completed=E2=80=99. 8. Hit the necessary and relevant GL accounts and posting in the process wherever needed. I am not sure about level of technical changes involved against other suggested approaches, so please feel free to ignore if it looks over complicated. Thanks, Swapnil -----Original Message----- From: Vaibhav Jain [mailto:vaibhav.jain@hotwaxsystems.com] Sent: Tuesday, October 24, 2017 6:46 PM To: dev@ofbiz.apache.org Subject: Re: RE: RE: Quantity missing for inventory transfer records Hello All, Thanks Swapnil for the detailed business scenarios. Thanks James for the reply. I just want to convey that there is no need to use a separate data model for inventory transfer. We can use order data model for inventory transfer. We can create a SO from one facility which create an automated PO for another facility. Inventory transfer will be done using sales/purchase order. Stock move is used for intra-warehouse inventory transfer while inventory transfer is for inter-warehouse inventory transfer. We can achieve inventory transfer using order data model instead of using separate data model for inventory transfer. 1. On the basis of from party and to party we can identify that order is transfer order(In transfer order fromParty and toParty are same). 2. status of inventory transfer can be maintained in OrderStatus entity. 3. Tax is applied or not can be configurable. 4. Shipment is already associated with order data model. 5. Order adjustment can be used to record adjustments. 6. The Orderitem entity can be used to transfer multiple products at a time. 7. Reservation and issuance are already working in order data model. 8. The OrderContent entity can be used to attach Stock transfer document(legal document vary according to country law) with inventory transfer. Please correct me if I missed something. Thanks & Regards -- Vaibhav Jain Hotwax Systems, vaibhav.jain@hotwaxsystems.com On Tue, Oct 24, 2017 at 3:54 PM, James Yong wrote: > Hi Swapnil, > > You may want to consider having the following modifications: > > 1) Item Issuance & Shipment Receipt entities: Add columns (i.e. > InventoryTransferHeaderId & InventoryTransferId ) to support inventory > transfer with shipment. > > 2) Inventory Transfer Adjustment entity: For the tax. > > 3) Inventory Transfer Header entity: For group transfer (as discussed > earlier) > > Regards, > James Yong > > On 2017-10-19 19:12, Swapnil Shah wrote: > > Let me try adding few more insights/details with regard to stock > > transfer flow. > > > > > > > > As we are referring to intra-organizational goods movement i.e., so > > movement of goods would be for and within the same business entity. > > Here are few pointers (if it can help in assessing any kind of > > technical trade-off that needs to be made with respect to current implementation) : > > > > - Stock Transfer per se are going to involve goods exchange but > > there > is > > no real time money exchange involved between shipper and receiver > > as > they > > are both the very same business entity in the legal sense. So business > > might not be necessarily interested in generating any sales or > purchase > > invoice against such transactions. Nor will there be any real > > time > payment > > or invoice settlement required at either end. > > - In financial terms there are tax implications but its applicabilit= y > > varies depending upon the laws of the land or > > country/state-specific > tax > > regulations. For example: > > - In US the very same item transferred in certain state might be > > taxable at certain rate but totally exempted or taxed at > > different rate in > > another (someone with better understanding of US or EUR tax > > regulations can > > throw more light and let us know if currently intra-company > > goods transfer > > are even taxable or not) > > - In India, the tax implications in the case of goods transfer > > is > now > > shifted on the supply of goods. As a result: > > - For inter-state transfer *there is tax liability and in this > > case, only a separate =E2=80=9CTax Invoice=E2=80=9D* needs to = be issued > > along > with > > stock transfer note and supporting document (depending on > > the inter-state > > regulations while crossing the state borders) > > - For intra-state transfers if business entity is having singl= e > > registration for originating and receiving branches with > > tax authority then *there > > is no tax liability and hence no Tax Invoice *needs to be issue. > > Only Delivery Note should suffice to transfer the goods. > > - For intra-state transfers if business entity is having > different > > registration for originating and receiving branches with > > tax authority then *there > > is tax liability and in this case, only a separate =E2=80=9CTa= x > Invoice=E2=80=9D* > > needs to be issued along with stock transfer note. > > - Any kind of applicable tax (if any) needs to be paid to the state > > only and a separate Tax Invoice needs to be generated in this case. > > - The transfer shipment needs to follow certain status transitioning > > i.e. =E2=80=98Requested=E2=80=99 =C3=A0 =E2=80=98In-review=E2=80=99 = =C3=A0 =E2=80=98Shipped=E2=80=99 (from originating > facility) =C3=A0 > > =E2=80=98In-transit=E2=80=99 =C3=A0 =E2=80=98Received=E2=80=99 (at d= estination facility). As it needs to be > > tracked internally. > > - The deemed transaction value and tax liability against the > transferred > > goods should hit the accounting books against appropriate GL > > accounts > per > > store and a separate GL account against the tax authority (in > accordance > > with business rules). > > - Later at some point of time we may also like to systemically > > build > the > > Transfer Requirement Planning and consolidate all the individual > > product-wise transfer ad-hoc or planned requests/requirement for > > a > common > > destination facility (i.e., once any feature like > > https://issues.apache.org/jira/browse/OFBIZ-6964 gets > > implemented) > > > > > > > > I hope it should help to come up with a generic enough solution that > > can work across geographies with required level of flexibility. > > > > > > > > Thanks, > > > > Swapnil > > > > > > > > -----Original Message----- > > From: James Yong [mailto:jamesyong@apache.org ] > > Sent: Wednesday, October 18, 2017 9:56 PM > > To: dev@ofbiz.apache.org > > Subject: Re: RE: Quantity missing for inventory transfer records > > > > > > > > Hi Vaibhav, > > > > > > > > My random thoughts on the possible implementation: > > > > > > > > We can have a new InventoryTransferHeader (ITH) entity as mentioned > earlier > > to manage group transfer. > > > > > > > > Having Quality attribute to InventoryTransfer entity is reasonable > > since > we > > may have an approval process before actual transfer. > > > > > > > > User doing inventory transfer can have an Shipment option to enable > > shipment. > > > > > > > > When inventory transfer is approval and Shipment option is selected, > > a corresponding Sales Order (SO) and Purchase Order (PO) will be created. > > > > > > > > You may want to use a different Order Type for these transfer SO & PO. > > > > > > > > No direct changes are allowed for transfer SO & PO. Changes can only > > be made at ITH and the associated Inventory Transfer entities. > > > > > > > > There should be an attribute in SO & PO to link to ITH. > > > > > > > > There is also a need to enhance the reservation function of SO to > > specify the inventory item id for reservation. > > > > > > > > Regards, > > > > James Yong > > > > > > > > On 2017-10-16 23:05, Vaibhav Jain > wrote: > > > > > Hello Swapnil/James, > > > > > > > > > > There are many dependencies of inventory transfer in Business > > > > > Requirements > > > > > like: > > > > > > > > > > 1. In Inventory transfer generally, there is more than one > > > product > in > > > > > any inventory transfer. > > > > > 2. Inventory transfer should have an association with Shipment > which is > > > > > missing. > > > > > 3. Inventory transfer should have an association with > > > Accounting > which > > > > > is missing. > > > > > 4. Tax should be calculated(Applicable in India after GST) on > inventory > > > > > transfer. > > > > > 5. If the tax is exempted then need "Stock transferring" > documentation. > > > > > 6. Tracking of Transferred inventory. > > > > > 7. Tracking of associated peoples(Picker, Packer, driver) with > > > the > > > > > respective transfer order. > > > > > > > > > > Most of the attribute of inventory transfer is belongs to Order > > > > > management system. Hence we should have a flow to create a > > > "Transfer > > > > > Order" for inventory transfer. > > > > > > > > > > Inventory Transfer can be treated as "Receive product". Business > > > does > > > > > not have workflows to receive the product directly i.e. PO should > > > be > > > > > created to receive the product. If anyone wants to surpass the PO > > > > > workflow and want to receive the product then "Receive product" is > > > > > useful. Same for inventory transfer we should have a flow of > > > transfer > > > > > order and inventory transfer can be used like "Receive Product" > workflow. > > > > > > > > > > Please share your thoughts > > > > > > > > > > Thanks & Regards > > > > > > > > > > Vaibhav Jain > > > > > Hotwax Systems, > > > > > vaibhav.jain@hotwaxsystems.com > > > > > > > > > > On Mon, Oct 16, 2017 at 7:02 PM, Swapnil Shah < > > > > > swapnil.shah@hotwaxsystems.com> wrote: > > > > > > > > > > > Yes James, > > > > > > ITH should work. I would prefer to have ITH tightly coupled with > > > > > > InventoryTransfer(IT) i.e. even in case of single item transfer > > > > > > create corresponding entries in ITH and IT both to maintain data > > > > > > integrity. Also, We can try tying up Inventory Transfer with > > > > > > Shipment through ITH itself or a separate entity e.g., > > InventoryTransferShipment. > > > > > > > > > > > > Thanks & Regards, > > > > > > Swapnil > > > > > > > > > > > > -----Original Message----- > > > > > > From: James Yong [mailto:jamesyong@apache.org > > > > >] > > > > > > Sent: Sunday, October 15, 2017 9:26 PM > > > > > > To: dev@ofbiz.apache.org > > > > > > Subject: Re: RE: Quantity missing for inventory transfer records > > > > > > > > > > > > Hi Swapnil, > > > > > > > > > > > > Another possible solution is to have an header entity, e.g. > > > > > > InventoryTransferHeader (ITH), containing additional or common > > > > info > > > > > > related to the group transfer. > > > > > > For group transfer, ITH is created and each InventoryTransfer > > > > will > > > > > > contain a FK to ITH. > > > > > > For single transfer, ITH can be empty. > > > > > > > > > > > > Regards, > > > > > > James Yong > > > > > > > > > > > > On 2017-10-14 18:59, Swapnil Shah > > > > > > wrote: > > > > > > > Folks, > > > > > > > One very frequent use case that we encounter is that any > > > > > transfer > > > > > > > request initiated from one facility to another is generally > > > > > for > > > > > > > multiple products as they all need to go in a single shipment > > > > > > > against transfer request so as to be cost effective. > > > > > > > > > > > > > > Current schema has the limitation that any given inventory > > > > > > > transfer can only be for single inventory item (and hence only > > > > > one > > product). > > > > > > > Would it make sense and be feasible if we enhance the existing > > > > > > > design such that multiple products/inventory can be tied with > > > > > a > > > > > > > single transfer > > > > > > > (InventoryTransferId) request (possibly by having > > > > > > > InventoryTransferId > > > > > > > + InventoryItemId as PK) and shipment is tied up with it as well. > > > > > > > + Of > > > > > > > course by leaving a proper audit trail via InventoryItemDetail etc. > > > > > > > > > > > > > > Let's share any further thoughts or similar business cases and > > > > > > > then we can try to support it if it is generic enough. > > > > > > > > > > > > > > Thanks & Regards, > > > > > > > Swapnil > > > > > > > > > > > > > > -----Original Message----- > > > > > > > From: James Yong [mailto:jamesyong@apache.org < > jamesyong@apache.org>] > > > > > > > Sent: Friday, October 13, 2017 9:36 PM > > > > > > > To: dev@ofbiz.apache.org > > > > > > > Subject: Re: Quantity missing for inventory transfer records > > > > > > > > > > > > > > Hi all, > > > > > > > > > > > > > > It is better to add InventoryTransferId column to Inventory > > > > > Item > > > > > > > Detail > > > > > > > (IID) table so that we easily link the IID record to the > > > > > Inventory > > > > > > > Transfer table. > > > > > > > > > > > > > > What do you think? > > > > > > > > > > > > > > Regards, > > > > > > > James Yong > > > > > > > > > > > > > > On 2017-10-13 23:18, "James Yong" wrote: > > > > > > > > Hi Suraj, > > > > > > > > > > > > > > > > Shouldn't the transfer detail be stored at Inventory Item > > > > > > Detail > > > > > > table? > > > > > > > > > > > > > > > > Regards, > > > > > > > > James Yong > > > > > > > > > > > > > > > > On 2017-10-13 16:44, Suraj Khurana > > > > > > > > > > > > > > > wrote: > > > > > > > > > Hello, > > > > > > > > > > > > > > > > > > While creating inventory transfers, a new inventory item > > > > > > > is > > > > > > > > > created and successfully gets updated after completing > > > > > > > > > inventory > > > > > > transfer. > > > > > > > > > As per current implementation, we don't store transferred > > > > > > > > > quantity anywhere in *InventoryTransfer *entity and > > > > > > > quantity > > > > > > > > > is only available on the newly created inventory item. > > > > > > > Problem > > > > > > > > > is, it gets deluded on time being and user won't get exact > > > > > > > > > quantity for which > > > > > > > inventory transfer was initialized. > > > > > > > > > > > > > > > > > > IMO, we should maintain transferred quantity at > > > > > > > > > *InventoryTransfer *entity as well for proper history > maintenance > > of records. > > > > > > > > > > > > > > > > > > Please share your thoughts on this. > > > > > > > > > > > > > > > > > > -- > > > > > > > > > Thanks and Regards, > > > > > > > > > *Suraj Khurana* | Sr. Enterprise Software Engineer *HotWax > > > > > > > > > Commerce* by *HotWax Systems* Plot no. 80, Scheme no. 78, > > > > > > > > > Vijay Nagar, Indore, M.P. India 452010 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --001a114bd3f2e7d2dc055c56da94--