Hei Serge, All, Out of the box there is no field in the SupplierProduct entity (controlling supplier prices for Purchase Orders) to control the maximum quantity for a purchase order for a given product. You could consider extending the entity with the field (look in the definitions regarding entities for 'extend-entity'), or (IMO, more my favourite) create a new entity like SupplierProductAttributes, where you capture the maximum quantity. And work with the value set there in the approval process of a Purchase Order.
But you have to keep in mind, that most often what is at the 3rd parties side (the supplier) can be a black box. You may not have insights in their capacities. And also: a supplier can fulfil any size order over time (given enough lead time). If you were to consider doing a custom 3rd party integration solution for vendor platforms (Amazon, AliBaba, etc.) you could use that maximum quantity field (for supplier products) as a pre-approval function for your Purchase Order Met vriendelijke groet, Pierre Smits *Proud* *contributor** of* Apache OFBiz <https://ofbiz.apache.org/> since 2008 (without privileges) Proud contributor to the ASF since 2006 *Apache Directory <https://directory.apache.org>, PMC Member* On Tue, Nov 23, 2021 at 3:29 PM Bs Serge <sergeb...@gmail.com> wrote: > That's kind of you Pierre, > > I can see the supplier for a product has a "minimum order quantity" which > is the minimum number of units required for one purchase order, > > Is it possible to set the maximum order quantity also, so that the ordered > quantity can not exceed the supplier's inventory? or does ofbiz assume the > supplier to have any number of units quantity in their stock? > > Best Regards, > > On Tue, Nov 23, 2021 at 12:10 PM Pierre Smits <pierresm...@apache.org> > wrote: > > > Miremengjes Serge, > > > > Good to see that the initial issue has been resolved. > > > > Please consider to elaborate on the accounting stuff your experiencing > > (favourably in a new thread). A(other) contributor could provide some > > insights on that. > > > > Met vriendelijke groet, > > > > Pierre Smits > > *Proud* *contributor** of* Apache OFBiz <https://ofbiz.apache.org/> > since > > 2008 (without privileges) > > Proud contributor to the ASF since 2006 > > > > *Apache Directory <https://directory.apache.org>, PMC Member* > > > > > > On Tue, Nov 23, 2021 at 11:02 AM Bs Serge <sergeb...@gmail.com> wrote: > > > > > Thank you Yashwant and Pierre. > > > > > > In the end, the model I was looking for is drop-shipping where a > supplier > > > can drop-ship a sales order from a buyer. Which I found ofbiz handles > > > really well, by automatically creating a purchase order to the > supplier, > > > and the supplier ships the order to the original buyer. > > > > > > But I'm having trouble trying to grasp all the accounting stuff ... > > > > > > Best Regards, > > > > > > On Fri, Nov 19, 2021 at 9:45 AM Pierre Smits <pierresm...@apache.org> > > > wrote: > > > > > > > Good morning Serge, > > > > > > > > I was thinking along the same lines as Yashwant did. With a > commission > > > > contract you should be able to generate a commission invoice for > every > > > sale > > > > invoice including a line item that includes the product applicable. > > > > > > > > Please be aware, that the example data provided by Yashwant for > > > > demonstrating this is not included in the standard demo data set of > > > OFBiz. > > > > You'll need to add that manually. > > > > > > > > If you have done so, you should be able to test this, by following > > steps: > > > > > > > > 1. create an sales invoice with a line item having the example > > > product, > > > > and have it with reach it - happy flow - status (Ready for > Posting) > > > > 2. execute a commission run > > > > > > > > if that runs successfully, you should see a credit invoice for the > > > > supplier, which can then, together with other invoices to be paid, go > > > > normal payment processes > > > > > > > > Met vriendelijke groet, > > > > > > > > Pierre Smits > > > > *Proud* *contributor** of* Apache OFBiz <https://ofbiz.apache.org/> > > > since > > > > 2008 (without privileges) > > > > Proud contributor to the ASF since 2006 > > > > > > > > *Apache Directory <https://directory.apache.org>, PMC Member* > > > > > > > > > > > > On Fri, Nov 19, 2021 at 7:02 AM Yashwant Dhakad < > > > > yashwant.dha...@hotwaxsystems.com> wrote: > > > > > > > > > Hi Serge, > > > > > We have Purchase and Commission agreement data model so that can be > > > > helpful > > > > > for your need. > > > > > Here are the demo data you can explore: > > > > > > > > > > <Agreement agreementId="DS-1000-PURCH" > > > > > agreementTypeId="PURCHASE_AGREEMENT" description="Agreement with > > > > > DemoSupplier" partyIdFrom="Company" partyIdTo="DemoSupplier" > > > > > fromDate="2011-08-02 12:00:00.0"/> > > > > > <AgreementItem agreementId="DS-1000-PURCH" > agreementItemSeqId="00001" > > > > > agreementItemTypeId="AGREEMENT_PRICING_PR" currencyUomId="USD"/> > > > > > <AgreementProductAppl agreementId="DS-1000-PURCH" > > > > > agreementItemSeqId="00001" price="8" productId="DS-1000"/> > > > > > > > > > > <Agreement agreementId="1010" > agreementTypeId="COMMISSION_AGREEMENT" > > > > > description="Commission Agreement" partyIdFrom="DEMO_COMPANY" > > > > > partyIdTo="DEMO_COMPANY1" roleTypeIdFrom="SUPPLIER" > > > > > roleTypeIdTo="DISTRIBUTOR" fromDate="2016-09-29 00:00:00"/> > > > > > <AgreementItem agreementId="1010" agreementItemSeqId="0001" > > > > > currencyUomId="USD" agreementItemTypeId="AGREEMENT_COMMISSION" > > > > > agreementText="Commission in USD"/> > > > > > <AgreementProductAppl agreementId="1010" agreementItemSeqId="0001" > > > > > productId="TestProduct2"/> > > > > > <AgreementTerm agreementTermId="1010" > termTypeId="FIN_COMM_VARIABLE" > > > > > agreementId="1010" agreementItemSeqId="0001" > productId="TestProduct2" > > > > > invoiceItemTypeId="COMM_INV_ITEM" fromDate="2016-09-29 00:00:00" > > > > > thruDate="2017-09-29 00:00:00" termValue="10" termDays="30" > > > > > minQuantity="1" maxQuantity="100" description="Agreement Term for > > Test > > > > > Product 2 Commission"/> > > > > > > > > > > > > > > > On Fri, Nov 19, 2021 at 1:48 AM Bs Serge <sergeb...@gmail.com> > > wrote: > > > > > > > > > > > Hi, > > > > > > > > > > > > I wanted to ask is there an OFBiz way that a product supplier can > > > have > > > > an > > > > > > agreement with a store over a certain product, so that, that > > > supplier's > > > > > > financial accounts should receive a certain percentage every time > > > that > > > > > > product is sold, or the whole amount can also go to the supplier? > > > > > > > > > > > > Any help on how this can be achieved would be appreciated! > > > > > > > > > > > > Best Regards, > > > > > > > > > > > > > > > > > > > > > -- > > > > > Kind Regards, > > > > > Yashwant Dhakad > > > > > Sr. Technical Consultant > > > > > > > > > > *HotWax Systems* > > > > > *Enterprise open source experts* > > > > > cell: +91-9098240513 > > > > > office: 0731-409-3684 > > > > > http://www.hotwaxsystems.com > > > > > > > > > > > > > > >