You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Jacopo Cappellato <ja...@hotwaxmedia.com> on 2010/07/02 12:26:57 UTC

Adding agreementId to OrderHeader

When an order is initiated, it is possible to select an agreement that will govern the orders (OrderTerms are cloned from AgreementTerms, if the agreement has a price list then the agreement prices are used in place of ProductPrice); however the agreementId is only added to the cart but it is lost when the order is saved.
This causes issues if the order is edited: the agreement is lost and the system is unable to apply the agreement prices to the edited order.

The solution I am proposing is to add the agreementId field to OrderHeader entity.

What do you think?

Jacopo



Re: Adding agreementId to OrderHeader

Posted by BJ Freeman <bj...@free-man.net>.
thanks it would be nice if ofbiz was more based on the Data model book.
in my opinion some of the shortcuts have really crippled it.


=========================
BJ Freeman
http://bjfreeman.elance.com
Strategic Power Office with Supplier Automation  <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
Specialtymarket.com  <http://www.specialtymarket.com/>

Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man
Linkedin 
<http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>


Jacques Le Roux sent the following on 7/2/2010 11:01 AM:
> Pretty logical, I see. Maybe Jacopo will consider it?
>
> Thanks
>
> Jacques
>
> From: "BJ Freeman" <bj...@free-man.net>
>> never saw it as enhanced only following the Data model book.
>> since most told me that features were not complete in ofbiz, I
>> completed them.
>> Since most of my discussion were ignored I just made my own, using the
>> OOTB as a basis.
>> I use what I can of the svn and add on top the way I see it.
>>
>>
>>
>> =========================
>> BJ Freeman
>> http://bjfreeman.elance.com
>> Strategic Power Office with Supplier Automation
>> <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>> Specialtymarket.com <http://www.specialtymarket.com/>
>>
>> Systems Integrator-- Glad to Assist
>>
>> Chat Y! messenger: bjfr33man
>> Linkedin
>> <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>>
>>
>>
>> Jacques Le Roux sent the following on 7/2/2010 10:26 AM:
>>> Interesting, so you enhanced the OOTB model and actions, right?
>>>
>>> Jacques
>>>
>>> From: "BJ Freeman" <bj...@free-man.net>
>>>> I used the model on page 146
>>>> and the example agreementID 10002
>>>> since the Agreement has the product agreement, the service matches the
>>>> product agreement productID and updates the orderitem orderterms(page
>>>> 128) and table 4.9(page 129) . an SECA checks that the order terms can
>>>> be accepted based on the order, like a promo may be disqualified based
>>>> on the order terms.
>>>>
>>>>
>>>>
>>>> =========================
>>>> BJ Freeman
>>>> http://bjfreeman.elance.com
>>>> Strategic Power Office with Supplier Automation
>>>> <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>>> Specialtymarket.com <http://www.specialtymarket.com/>
>>>>
>>>> Systems Integrator-- Glad to Assist
>>>>
>>>> Chat Y! messenger: bjfr33man
>>>> Linkedin
>>>> <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>>>>
>>>>
>>>>
>>>>
>>>> Jacopo Cappellato sent the following on 7/2/2010 3:26 AM:
>>>>> When an order is initiated, it is possible to select an agreement
>>>>> that will govern the orders (OrderTerms are cloned from
>>>>> AgreementTerms, if the agreement has a price list then the agreement
>>>>> prices are used in place of ProductPrice); however the agreementId is
>>>>> only added to the cart but it is lost when the order is saved.
>>>>> This causes issues if the order is edited: the agreement is lost and
>>>>> the system is unable to apply the agreement prices to the edited
>>>>> order.
>>>>>
>>>>> The solution I am proposing is to add the agreementId field to
>>>>> OrderHeader entity.
>>>>>
>>>>> What do you think?
>>>>>
>>>>> Jacopo
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>>
>>
>
>


Re: Adding agreementId to OrderHeader

Posted by Jacques Le Roux <ja...@les7arts.com>.
I don't think so

Jacques

Le 09/05/2014 11:57, Pierre Smits a écrit :
> Is there a JIRA issue for this?
>
> Regards,
>
> Pierre Smits
>
> *ORRTIZ.COM <http://www.orrtiz.com>*
> Services & Solutions for Cloud-
> Based Manufacturing, Professional
> Services and Retail & Trade
> http://www.orrtiz.com
>
>
> On Fri, Jul 9, 2010 at 4:12 AM, BJ Freeman <bj...@free-man.net> wrote:
>
>> Yes the datamodel that I referenced for partyrelationships is in Ofbiz.
>> However there is no supporting code that creates a partyreleationship
>> between the Company and Party with role of customer and
>> partyrelationshiptype of Customer.(CUSTOMER_REL)
>> So the queries I mentions will not return a list of customers that have a
>> partyrelationship with the company of the partyrelationshiptype of Customer.
>> So you cannot get agreements used for a customer this way, unless there is
>> an order.
>> I not see any code that would return agreements from a
>> partyrelationshiptype of Customer. In a order.
>>
>>
>> Jacopo Cappellato sent the following on 7/7/2010 11:15 PM:
>>
>>   BJ,
>>> the existing data model (as it is described in the Data Model Resource
>>> Book as you have mentioned previously) already takes care of this and I am
>>> not planning to change this.
>>> My proposal was related to the agreements picked for an order.
>>>
>>> Jacopo
>>>
>>> On Jul 8, 2010, at 12:59 AM, BJ Freeman wrote:
>>>
>>>   how will you get all the companies role of agreements for a particular
>>>> party that has a partyrelationship of customer?
>>>> how will you get all the Sales agreements for a partyrelationship of
>>>> customer with the company under the role of agreements?
>>>>
>>>>
>>>> BJ Freeman sent the following on 7/7/2010 10:19 AM:
>>>>
>>>>
>>>> =========================
>>>> BJ Freeman<http://bjfreeman.elance.com>
>>>> Strategic Power Office with Supplier Automation<http://www.
>>>> businessesnetwork.com/automation/viewforum.php?f=52>
>>>> Specialtymarket.com<http://www.specialtymarket.com/>
>>>> Systems Integrator-- Glad to Assist
>>>>
>>>> Chat  Y! messenger: bjfr33man
>>>>
>>>>   I have the implementation that uses the Sales agreement and a
>>>>> productaggreemt for retail, wholesale, custom.
>>>>> so as you think though the changes you might want to consider hooks to
>>>>> allow this in future.
>>>>>
>>>>> also the agreements are based on partyID role of customeras a
>>>>> relationship with the company so I don't see how just AgreementOrderAppl
>>>>> tied to the order header will accomplish this.
>>>>>
>>>>> =========================
>>>>> BJ Freeman<http://bjfreeman.elance.com>
>>>>> Strategic Power Office with Supplier Automation
>>>>> <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>>>> Specialtymarket.com<http://www.specialtymarket.com/>
>>>>> Systems Integrator-- Glad to Assist
>>>>>
>>>>> Chat Y! messenger: bjfr33man
>>>>>
>>>>>
>>>>> Jacopo Cappellato sent the following on 7/7/2010 6:07 AM:
>>>>>
>>>>>> Thanks Scott,
>>>>>>
>>>>>> the link was indeed useful.
>>>>>> I like the plan of creating the AgreementOrderAppl entity, because it
>>>>>> will be definitely very flexible.
>>>>>> However the existing order code (ui and business logic) is based on
>>>>>> the assumption that one agreement is associated to a cart/order, and I
>>>>>> would like to fix this process asap before enhancing the data model
>>>>>> with the AgreementOrderAppl entity.
>>>>>>
>>>>>> So, what if I add the new field to the OrderHeader but instead of
>>>>>> naming it "agreementId" we use "primaryAgreementId"?
>>>>>>
>>>>>> Kind regards,
>>>>>>
>>>>>> Jacopo
>>>>>>
>>>>>>
>>>>>> On Jul 3, 2010, at 9:36 AM, Scott Gray wrote:
>>>>>>
>>>>>>   Hi Jacopo,
>>>>>>> Not sure if this is of any use to you:
>>>>>>> http://ofbiz.135035.n4.nabble.com/orders-and-contracts-
>>>>>>> td2248364.html#a2248394
>>>>>>>
>>>>>>>
>>>>>>> Regards
>>>>>>> Scott
>>>>>>>
>>>>>>> HotWax Media
>>>>>>> http://www.hotwaxmedia.com
>>>>>>>
>>>>>>> On 3/07/2010, at 6:24 PM, Jacopo Cappellato wrote:
>>>>>>>
>>>>>>>   yes, I will do.
>>>>>>>> Jacopo
>>>>>>>>
>>>>>>>> On Jul 2, 2010, at 8:01 PM, Jacques Le Roux wrote:
>>>>>>>>
>>>>>>>>   Pretty logical, I see. Maybe Jacopo will consider it?
>>>>>>>>> Thanks
>>>>>>>>>
>>>>>>>>> Jacques
>>>>>>>>>
>>>>>>>>> From: "BJ Freeman"<bj...@free-man.net>
>>>>>>>>>
>>>>>>>>>> never saw it as enhanced only following the Data model book.
>>>>>>>>>> since most told me that features were not complete in ofbiz, I
>>>>>>>>>> completed them.
>>>>>>>>>> Since most of my discussion were ignored I just made my own, using
>>>>>>>>>> the OOTB as a basis.
>>>>>>>>>> I use what I can of the svn and add on top the way I see it.
>>>>>>>>>> =========================
>>>>>>>>>> BJ Freeman
>>>>>>>>>> http://bjfreeman.elance.com
>>>>>>>>>> Strategic Power Office with Supplier
>>>>>>>>>> Automation<http://www.businessesnetwork.com/
>>>>>>>>>> automation/viewforum.php?f=52>
>>>>>>>>>>
>>>>>>>>>> Specialtymarket.com<http://www.specialtymarket.com/>
>>>>>>>>>> Systems Integrator-- Glad to Assist
>>>>>>>>>> Chat Y! messenger: bjfr33man
>>>>>>>>>> Linkedin<http://www.linkedin.com/profile?viewProfile=&key=
>>>>>>>>>> 1237480&locale=en_US&trk=tab_pro>
>>>>>>>>>>
>>>>>>>>>> Jacques Le Roux sent the following on 7/2/2010 10:26 AM:
>>>>>>>>>>
>>>>>>>>>>> Interesting, so you enhanced the OOTB model and actions, right?
>>>>>>>>>>>
>>>>>>>>>>> Jacques
>>>>>>>>>>>
>>>>>>>>>>> From: "BJ Freeman"<bj...@free-man.net>
>>>>>>>>>>>
>>>>>>>>>>>> I used the model on page 146
>>>>>>>>>>>> and the example agreementID 10002
>>>>>>>>>>>> since the Agreement has the product agreement, the service
>>>>>>>>>>>> matches the
>>>>>>>>>>>> product agreement productID and updates the orderitem
>>>>>>>>>>>> orderterms(page
>>>>>>>>>>>> 128) and table 4.9(page 129) . an SECA checks that the order
>>>>>>>>>>>> terms can
>>>>>>>>>>>> be accepted based on the order, like a promo may be disqualified
>>>>>>>>>>>> based
>>>>>>>>>>>> on the order terms.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> =========================
>>>>>>>>>>>> BJ Freeman
>>>>>>>>>>>> http://bjfreeman.elance.com
>>>>>>>>>>>> Strategic Power Office with Supplier Automation
>>>>>>>>>>>> <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>>>>>>>>>>> Specialtymarket.com<http://www.specialtymarket.com/>
>>>>>>>>>>>>
>>>>>>>>>>>> Systems Integrator-- Glad to Assist
>>>>>>>>>>>>
>>>>>>>>>>>> Chat Y! messenger: bjfr33man
>>>>>>>>>>>> Linkedin
>>>>>>>>>>>> <http://www.linkedin.com/profile?viewProfile=&key=
>>>>>>>>>>>> 1237480&locale=en_US&trk=tab_pro>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Jacopo Cappellato sent the following on 7/2/2010 3:26 AM:
>>>>>>>>>>>>
>>>>>>>>>>>>> When an order is initiated, it is possible to select an
>>>>>>>>>>>>> agreement
>>>>>>>>>>>>> that will govern the orders (OrderTerms are cloned from
>>>>>>>>>>>>> AgreementTerms, if the agreement has a price list then the
>>>>>>>>>>>>> agreement
>>>>>>>>>>>>> prices are used in place of ProductPrice); however the
>>>>>>>>>>>>> agreementId is
>>>>>>>>>>>>> only added to the cart but it is lost when the order is saved.
>>>>>>>>>>>>> This causes issues if the order is edited: the agreement is
>>>>>>>>>>>>> lost and
>>>>>>>>>>>>> the system is unable to apply the agreement prices to the
>>>>>>>>>>>>> edited order.
>>>>>>>>>>>>>
>>>>>>>>>>>>> The solution I am proposing is to add the agreementId field to
>>>>>>>>>>>>> OrderHeader entity.
>>>>>>>>>>>>>
>>>>>>>>>>>>> What do you think?
>>>>>>>>>>>>>
>>>>>>>>>>>>> Jacopo
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>
>>>>>
>>>

-- 

Re: Adding agreementId to OrderHeader

Posted by Pierre Smits <pi...@gmail.com>.
Is there a JIRA issue for this?

Regards,

Pierre Smits

*ORRTIZ.COM <http://www.orrtiz.com>*
Services & Solutions for Cloud-
Based Manufacturing, Professional
Services and Retail & Trade
http://www.orrtiz.com


On Fri, Jul 9, 2010 at 4:12 AM, BJ Freeman <bj...@free-man.net> wrote:

> Yes the datamodel that I referenced for partyrelationships is in Ofbiz.
> However there is no supporting code that creates a partyreleationship
> between the Company and Party with role of customer and
> partyrelationshiptype of Customer.(CUSTOMER_REL)
> So the queries I mentions will not return a list of customers that have a
> partyrelationship with the company of the partyrelationshiptype of Customer.
> So you cannot get agreements used for a customer this way, unless there is
> an order.
> I not see any code that would return agreements from a
> partyrelationshiptype of Customer. In a order.
>
>
> Jacopo Cappellato sent the following on 7/7/2010 11:15 PM:
>
>  BJ,
>>
>> the existing data model (as it is described in the Data Model Resource
>> Book as you have mentioned previously) already takes care of this and I am
>> not planning to change this.
>> My proposal was related to the agreements picked for an order.
>>
>> Jacopo
>>
>> On Jul 8, 2010, at 12:59 AM, BJ Freeman wrote:
>>
>>  how will you get all the companies role of agreements for a particular
>>> party that has a partyrelationship of customer?
>>> how will you get all the Sales agreements for a partyrelationship of
>>> customer with the company under the role of agreements?
>>>
>>>
>>> BJ Freeman sent the following on 7/7/2010 10:19 AM:
>>>
>>>
>>> =========================
>>> BJ Freeman<http://bjfreeman.elance.com>
>>> Strategic Power Office with Supplier Automation<http://www.
>>> businessesnetwork.com/automation/viewforum.php?f=52>
>>> Specialtymarket.com<http://www.specialtymarket.com/>
>>> Systems Integrator-- Glad to Assist
>>>
>>> Chat  Y! messenger: bjfr33man
>>>
>>>  I have the implementation that uses the Sales agreement and a
>>>> productaggreemt for retail, wholesale, custom.
>>>> so as you think though the changes you might want to consider hooks to
>>>> allow this in future.
>>>>
>>>> also the agreements are based on partyID role of customeras a
>>>> relationship with the company so I don't see how just AgreementOrderAppl
>>>> tied to the order header will accomplish this.
>>>>
>>>> =========================
>>>> BJ Freeman<http://bjfreeman.elance.com>
>>>> Strategic Power Office with Supplier Automation
>>>> <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>>> Specialtymarket.com<http://www.specialtymarket.com/>
>>>> Systems Integrator-- Glad to Assist
>>>>
>>>> Chat Y! messenger: bjfr33man
>>>>
>>>>
>>>> Jacopo Cappellato sent the following on 7/7/2010 6:07 AM:
>>>>
>>>>> Thanks Scott,
>>>>>
>>>>> the link was indeed useful.
>>>>> I like the plan of creating the AgreementOrderAppl entity, because it
>>>>> will be definitely very flexible.
>>>>> However the existing order code (ui and business logic) is based on
>>>>> the assumption that one agreement is associated to a cart/order, and I
>>>>> would like to fix this process asap before enhancing the data model
>>>>> with the AgreementOrderAppl entity.
>>>>>
>>>>> So, what if I add the new field to the OrderHeader but instead of
>>>>> naming it "agreementId" we use "primaryAgreementId"?
>>>>>
>>>>> Kind regards,
>>>>>
>>>>> Jacopo
>>>>>
>>>>>
>>>>> On Jul 3, 2010, at 9:36 AM, Scott Gray wrote:
>>>>>
>>>>>  Hi Jacopo,
>>>>>>
>>>>>> Not sure if this is of any use to you:
>>>>>> http://ofbiz.135035.n4.nabble.com/orders-and-contracts-
>>>>>> td2248364.html#a2248394
>>>>>>
>>>>>>
>>>>>> Regards
>>>>>> Scott
>>>>>>
>>>>>> HotWax Media
>>>>>> http://www.hotwaxmedia.com
>>>>>>
>>>>>> On 3/07/2010, at 6:24 PM, Jacopo Cappellato wrote:
>>>>>>
>>>>>>  yes, I will do.
>>>>>>>
>>>>>>> Jacopo
>>>>>>>
>>>>>>> On Jul 2, 2010, at 8:01 PM, Jacques Le Roux wrote:
>>>>>>>
>>>>>>>  Pretty logical, I see. Maybe Jacopo will consider it?
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>>
>>>>>>>> Jacques
>>>>>>>>
>>>>>>>> From: "BJ Freeman"<bj...@free-man.net>
>>>>>>>>
>>>>>>>>> never saw it as enhanced only following the Data model book.
>>>>>>>>> since most told me that features were not complete in ofbiz, I
>>>>>>>>> completed them.
>>>>>>>>> Since most of my discussion were ignored I just made my own, using
>>>>>>>>> the OOTB as a basis.
>>>>>>>>> I use what I can of the svn and add on top the way I see it.
>>>>>>>>> =========================
>>>>>>>>> BJ Freeman
>>>>>>>>> http://bjfreeman.elance.com
>>>>>>>>> Strategic Power Office with Supplier
>>>>>>>>> Automation<http://www.businessesnetwork.com/
>>>>>>>>> automation/viewforum.php?f=52>
>>>>>>>>>
>>>>>>>>> Specialtymarket.com<http://www.specialtymarket.com/>
>>>>>>>>> Systems Integrator-- Glad to Assist
>>>>>>>>> Chat Y! messenger: bjfr33man
>>>>>>>>> Linkedin<http://www.linkedin.com/profile?viewProfile=&key=
>>>>>>>>> 1237480&locale=en_US&trk=tab_pro>
>>>>>>>>>
>>>>>>>>> Jacques Le Roux sent the following on 7/2/2010 10:26 AM:
>>>>>>>>>
>>>>>>>>>> Interesting, so you enhanced the OOTB model and actions, right?
>>>>>>>>>>
>>>>>>>>>> Jacques
>>>>>>>>>>
>>>>>>>>>> From: "BJ Freeman"<bj...@free-man.net>
>>>>>>>>>>
>>>>>>>>>>> I used the model on page 146
>>>>>>>>>>> and the example agreementID 10002
>>>>>>>>>>> since the Agreement has the product agreement, the service
>>>>>>>>>>> matches the
>>>>>>>>>>> product agreement productID and updates the orderitem
>>>>>>>>>>> orderterms(page
>>>>>>>>>>> 128) and table 4.9(page 129) . an SECA checks that the order
>>>>>>>>>>> terms can
>>>>>>>>>>> be accepted based on the order, like a promo may be disqualified
>>>>>>>>>>> based
>>>>>>>>>>> on the order terms.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> =========================
>>>>>>>>>>> BJ Freeman
>>>>>>>>>>> http://bjfreeman.elance.com
>>>>>>>>>>> Strategic Power Office with Supplier Automation
>>>>>>>>>>> <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>>>>>>>>>> Specialtymarket.com<http://www.specialtymarket.com/>
>>>>>>>>>>>
>>>>>>>>>>> Systems Integrator-- Glad to Assist
>>>>>>>>>>>
>>>>>>>>>>> Chat Y! messenger: bjfr33man
>>>>>>>>>>> Linkedin
>>>>>>>>>>> <http://www.linkedin.com/profile?viewProfile=&key=
>>>>>>>>>>> 1237480&locale=en_US&trk=tab_pro>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Jacopo Cappellato sent the following on 7/2/2010 3:26 AM:
>>>>>>>>>>>
>>>>>>>>>>>> When an order is initiated, it is possible to select an
>>>>>>>>>>>> agreement
>>>>>>>>>>>> that will govern the orders (OrderTerms are cloned from
>>>>>>>>>>>> AgreementTerms, if the agreement has a price list then the
>>>>>>>>>>>> agreement
>>>>>>>>>>>> prices are used in place of ProductPrice); however the
>>>>>>>>>>>> agreementId is
>>>>>>>>>>>> only added to the cart but it is lost when the order is saved.
>>>>>>>>>>>> This causes issues if the order is edited: the agreement is
>>>>>>>>>>>> lost and
>>>>>>>>>>>> the system is unable to apply the agreement prices to the
>>>>>>>>>>>> edited order.
>>>>>>>>>>>>
>>>>>>>>>>>> The solution I am proposing is to add the agreementId field to
>>>>>>>>>>>> OrderHeader entity.
>>>>>>>>>>>>
>>>>>>>>>>>> What do you think?
>>>>>>>>>>>>
>>>>>>>>>>>> Jacopo
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>
>>

Re: Adding agreementId to OrderHeader

Posted by BJ Freeman <bj...@free-man.net>.
Yes the datamodel that I referenced for partyrelationships is in Ofbiz.
However there is no supporting code that creates a partyreleationship 
between the Company and Party with role of customer and 
partyrelationshiptype of Customer.(CUSTOMER_REL)
So the queries I mentions will not return a list of customers that have 
a partyrelationship with the company of the partyrelationshiptype of 
Customer.
So you cannot get agreements used for a customer this way, unless there 
is an order.
I not see any code that would return agreements from a 
partyrelationshiptype of Customer. In a order.


Jacopo Cappellato sent the following on 7/7/2010 11:15 PM:
> BJ,
>
> the existing data model (as it is described in the Data Model Resource Book as you have mentioned previously) already takes care of this and I am not planning to change this.
> My proposal was related to the agreements picked for an order.
>
> Jacopo
>
> On Jul 8, 2010, at 12:59 AM, BJ Freeman wrote:
>
>> how will you get all the companies role of agreements for a particular party that has a partyrelationship of customer?
>> how will you get all the Sales agreements for a partyrelationship of customer with the company under the role of agreements?
>>
>>
>> BJ Freeman sent the following on 7/7/2010 10:19 AM:
>>
>>
>> =========================
>> BJ Freeman<http://bjfreeman.elance.com>
>> Strategic Power Office with Supplier Automation<http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>> Specialtymarket.com<http://www.specialtymarket.com/>
>> Systems Integrator-- Glad to Assist
>>
>> Chat  Y! messenger: bjfr33man
>>
>>> I have the implementation that uses the Sales agreement and a
>>> productaggreemt for retail, wholesale, custom.
>>> so as you think though the changes you might want to consider hooks to
>>> allow this in future.
>>>
>>> also the agreements are based on partyID role of customeras a
>>> relationship with the company so I don't see how just AgreementOrderAppl
>>> tied to the order header will accomplish this.
>>>
>>> =========================
>>> BJ Freeman<http://bjfreeman.elance.com>
>>> Strategic Power Office with Supplier Automation
>>> <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>> Specialtymarket.com<http://www.specialtymarket.com/>
>>> Systems Integrator-- Glad to Assist
>>>
>>> Chat Y! messenger: bjfr33man
>>>
>>>
>>> Jacopo Cappellato sent the following on 7/7/2010 6:07 AM:
>>>> Thanks Scott,
>>>>
>>>> the link was indeed useful.
>>>> I like the plan of creating the AgreementOrderAppl entity, because it
>>>> will be definitely very flexible.
>>>> However the existing order code (ui and business logic) is based on
>>>> the assumption that one agreement is associated to a cart/order, and I
>>>> would like to fix this process asap before enhancing the data model
>>>> with the AgreementOrderAppl entity.
>>>>
>>>> So, what if I add the new field to the OrderHeader but instead of
>>>> naming it "agreementId" we use "primaryAgreementId"?
>>>>
>>>> Kind regards,
>>>>
>>>> Jacopo
>>>>
>>>>
>>>> On Jul 3, 2010, at 9:36 AM, Scott Gray wrote:
>>>>
>>>>> Hi Jacopo,
>>>>>
>>>>> Not sure if this is of any use to you:
>>>>> http://ofbiz.135035.n4.nabble.com/orders-and-contracts-td2248364.html#a2248394
>>>>>
>>>>>
>>>>> Regards
>>>>> Scott
>>>>>
>>>>> HotWax Media
>>>>> http://www.hotwaxmedia.com
>>>>>
>>>>> On 3/07/2010, at 6:24 PM, Jacopo Cappellato wrote:
>>>>>
>>>>>> yes, I will do.
>>>>>>
>>>>>> Jacopo
>>>>>>
>>>>>> On Jul 2, 2010, at 8:01 PM, Jacques Le Roux wrote:
>>>>>>
>>>>>>> Pretty logical, I see. Maybe Jacopo will consider it?
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>> Jacques
>>>>>>>
>>>>>>> From: "BJ Freeman"<bj...@free-man.net>
>>>>>>>> never saw it as enhanced only following the Data model book.
>>>>>>>> since most told me that features were not complete in ofbiz, I
>>>>>>>> completed them.
>>>>>>>> Since most of my discussion were ignored I just made my own, using
>>>>>>>> the OOTB as a basis.
>>>>>>>> I use what I can of the svn and add on top the way I see it.
>>>>>>>> =========================
>>>>>>>> BJ Freeman
>>>>>>>> http://bjfreeman.elance.com
>>>>>>>> Strategic Power Office with Supplier
>>>>>>>> Automation<http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>>>>>>>
>>>>>>>> Specialtymarket.com<http://www.specialtymarket.com/>
>>>>>>>> Systems Integrator-- Glad to Assist
>>>>>>>> Chat Y! messenger: bjfr33man
>>>>>>>> Linkedin<http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>>>>>>>>
>>>>>>>> Jacques Le Roux sent the following on 7/2/2010 10:26 AM:
>>>>>>>>> Interesting, so you enhanced the OOTB model and actions, right?
>>>>>>>>>
>>>>>>>>> Jacques
>>>>>>>>>
>>>>>>>>> From: "BJ Freeman"<bj...@free-man.net>
>>>>>>>>>> I used the model on page 146
>>>>>>>>>> and the example agreementID 10002
>>>>>>>>>> since the Agreement has the product agreement, the service
>>>>>>>>>> matches the
>>>>>>>>>> product agreement productID and updates the orderitem
>>>>>>>>>> orderterms(page
>>>>>>>>>> 128) and table 4.9(page 129) . an SECA checks that the order
>>>>>>>>>> terms can
>>>>>>>>>> be accepted based on the order, like a promo may be disqualified
>>>>>>>>>> based
>>>>>>>>>> on the order terms.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> =========================
>>>>>>>>>> BJ Freeman
>>>>>>>>>> http://bjfreeman.elance.com
>>>>>>>>>> Strategic Power Office with Supplier Automation
>>>>>>>>>> <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>>>>>>>>> Specialtymarket.com<http://www.specialtymarket.com/>
>>>>>>>>>>
>>>>>>>>>> Systems Integrator-- Glad to Assist
>>>>>>>>>>
>>>>>>>>>> Chat Y! messenger: bjfr33man
>>>>>>>>>> Linkedin
>>>>>>>>>> <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Jacopo Cappellato sent the following on 7/2/2010 3:26 AM:
>>>>>>>>>>> When an order is initiated, it is possible to select an agreement
>>>>>>>>>>> that will govern the orders (OrderTerms are cloned from
>>>>>>>>>>> AgreementTerms, if the agreement has a price list then the
>>>>>>>>>>> agreement
>>>>>>>>>>> prices are used in place of ProductPrice); however the
>>>>>>>>>>> agreementId is
>>>>>>>>>>> only added to the cart but it is lost when the order is saved.
>>>>>>>>>>> This causes issues if the order is edited: the agreement is
>>>>>>>>>>> lost and
>>>>>>>>>>> the system is unable to apply the agreement prices to the
>>>>>>>>>>> edited order.
>>>>>>>>>>>
>>>>>>>>>>> The solution I am proposing is to add the agreementId field to
>>>>>>>>>>> OrderHeader entity.
>>>>>>>>>>>
>>>>>>>>>>> What do you think?
>>>>>>>>>>>
>>>>>>>>>>> Jacopo
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>
>

Re: Adding agreementId to OrderHeader

Posted by Jacopo Cappellato <ja...@hotwaxmedia.com>.
BJ,

the existing data model (as it is described in the Data Model Resource Book as you have mentioned previously) already takes care of this and I am not planning to change this.
My proposal was related to the agreements picked for an order.

Jacopo

On Jul 8, 2010, at 12:59 AM, BJ Freeman wrote:

> how will you get all the companies role of agreements for a particular party that has a partyrelationship of customer?
> how will you get all the Sales agreements for a partyrelationship of customer with the company under the role of agreements?
> 
> 
> BJ Freeman sent the following on 7/7/2010 10:19 AM:
> 
> 
> =========================
> BJ Freeman  <http://bjfreeman.elance.com>
> Strategic Power Office with Supplier Automation  <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
> Specialtymarket.com  <http://www.specialtymarket.com/>
> Systems Integrator-- Glad to Assist
> 
> Chat  Y! messenger: bjfr33man
> 
>> I have the implementation that uses the Sales agreement and a
>> productaggreemt for retail, wholesale, custom.
>> so as you think though the changes you might want to consider hooks to
>> allow this in future.
>> 
>> also the agreements are based on partyID role of customeras a
>> relationship with the company so I don't see how just AgreementOrderAppl
>> tied to the order header will accomplish this.
>> 
>> =========================
>> BJ Freeman <http://bjfreeman.elance.com>
>> Strategic Power Office with Supplier Automation
>> <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>> Specialtymarket.com <http://www.specialtymarket.com/>
>> Systems Integrator-- Glad to Assist
>> 
>> Chat Y! messenger: bjfr33man
>> 
>> 
>> Jacopo Cappellato sent the following on 7/7/2010 6:07 AM:
>>> Thanks Scott,
>>> 
>>> the link was indeed useful.
>>> I like the plan of creating the AgreementOrderAppl entity, because it
>>> will be definitely very flexible.
>>> However the existing order code (ui and business logic) is based on
>>> the assumption that one agreement is associated to a cart/order, and I
>>> would like to fix this process asap before enhancing the data model
>>> with the AgreementOrderAppl entity.
>>> 
>>> So, what if I add the new field to the OrderHeader but instead of
>>> naming it "agreementId" we use "primaryAgreementId"?
>>> 
>>> Kind regards,
>>> 
>>> Jacopo
>>> 
>>> 
>>> On Jul 3, 2010, at 9:36 AM, Scott Gray wrote:
>>> 
>>>> Hi Jacopo,
>>>> 
>>>> Not sure if this is of any use to you:
>>>> http://ofbiz.135035.n4.nabble.com/orders-and-contracts-td2248364.html#a2248394
>>>> 
>>>> 
>>>> Regards
>>>> Scott
>>>> 
>>>> HotWax Media
>>>> http://www.hotwaxmedia.com
>>>> 
>>>> On 3/07/2010, at 6:24 PM, Jacopo Cappellato wrote:
>>>> 
>>>>> yes, I will do.
>>>>> 
>>>>> Jacopo
>>>>> 
>>>>> On Jul 2, 2010, at 8:01 PM, Jacques Le Roux wrote:
>>>>> 
>>>>>> Pretty logical, I see. Maybe Jacopo will consider it?
>>>>>> 
>>>>>> Thanks
>>>>>> 
>>>>>> Jacques
>>>>>> 
>>>>>> From: "BJ Freeman"<bj...@free-man.net>
>>>>>>> never saw it as enhanced only following the Data model book.
>>>>>>> since most told me that features were not complete in ofbiz, I
>>>>>>> completed them.
>>>>>>> Since most of my discussion were ignored I just made my own, using
>>>>>>> the OOTB as a basis.
>>>>>>> I use what I can of the svn and add on top the way I see it.
>>>>>>> =========================
>>>>>>> BJ Freeman
>>>>>>> http://bjfreeman.elance.com
>>>>>>> Strategic Power Office with Supplier
>>>>>>> Automation<http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>>>>>> 
>>>>>>> Specialtymarket.com<http://www.specialtymarket.com/>
>>>>>>> Systems Integrator-- Glad to Assist
>>>>>>> Chat Y! messenger: bjfr33man
>>>>>>> Linkedin<http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>>>>>>> 
>>>>>>> Jacques Le Roux sent the following on 7/2/2010 10:26 AM:
>>>>>>>> Interesting, so you enhanced the OOTB model and actions, right?
>>>>>>>> 
>>>>>>>> Jacques
>>>>>>>> 
>>>>>>>> From: "BJ Freeman"<bj...@free-man.net>
>>>>>>>>> I used the model on page 146
>>>>>>>>> and the example agreementID 10002
>>>>>>>>> since the Agreement has the product agreement, the service
>>>>>>>>> matches the
>>>>>>>>> product agreement productID and updates the orderitem
>>>>>>>>> orderterms(page
>>>>>>>>> 128) and table 4.9(page 129) . an SECA checks that the order
>>>>>>>>> terms can
>>>>>>>>> be accepted based on the order, like a promo may be disqualified
>>>>>>>>> based
>>>>>>>>> on the order terms.
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> =========================
>>>>>>>>> BJ Freeman
>>>>>>>>> http://bjfreeman.elance.com
>>>>>>>>> Strategic Power Office with Supplier Automation
>>>>>>>>> <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>>>>>>>> Specialtymarket.com<http://www.specialtymarket.com/>
>>>>>>>>> 
>>>>>>>>> Systems Integrator-- Glad to Assist
>>>>>>>>> 
>>>>>>>>> Chat Y! messenger: bjfr33man
>>>>>>>>> Linkedin
>>>>>>>>> <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> Jacopo Cappellato sent the following on 7/2/2010 3:26 AM:
>>>>>>>>>> When an order is initiated, it is possible to select an agreement
>>>>>>>>>> that will govern the orders (OrderTerms are cloned from
>>>>>>>>>> AgreementTerms, if the agreement has a price list then the
>>>>>>>>>> agreement
>>>>>>>>>> prices are used in place of ProductPrice); however the
>>>>>>>>>> agreementId is
>>>>>>>>>> only added to the cart but it is lost when the order is saved.
>>>>>>>>>> This causes issues if the order is edited: the agreement is
>>>>>>>>>> lost and
>>>>>>>>>> the system is unable to apply the agreement prices to the
>>>>>>>>>> edited order.
>>>>>>>>>> 
>>>>>>>>>> The solution I am proposing is to add the agreementId field to
>>>>>>>>>> OrderHeader entity.
>>>>>>>>>> 
>>>>>>>>>> What do you think?
>>>>>>>>>> 
>>>>>>>>>> Jacopo
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>>> 
>>> 
>> 
>> 


Re: Adding agreementId to OrderHeader

Posted by BJ Freeman <bj...@free-man.net>.
how will you get all the companies role of agreements for a particular 
party that has a partyrelationship of customer?
how will you get all the Sales agreements for a partyrelationship of 
customer with the company under the role of agreements?


BJ Freeman sent the following on 7/7/2010 10:19 AM:


=========================
BJ Freeman  <http://bjfreeman.elance.com>
Strategic Power Office with Supplier Automation  <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
Specialtymarket.com  <http://www.specialtymarket.com/>
Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man

> I have the implementation that uses the Sales agreement and a
> productaggreemt for retail, wholesale, custom.
> so as you think though the changes you might want to consider hooks to
> allow this in future.
>
> also the agreements are based on partyID role of customeras a
> relationship with the company so I don't see how just AgreementOrderAppl
> tied to the order header will accomplish this.
>
> =========================
> BJ Freeman <http://bjfreeman.elance.com>
> Strategic Power Office with Supplier Automation
> <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
> Specialtymarket.com <http://www.specialtymarket.com/>
> Systems Integrator-- Glad to Assist
>
> Chat Y! messenger: bjfr33man
>
>
> Jacopo Cappellato sent the following on 7/7/2010 6:07 AM:
>> Thanks Scott,
>>
>> the link was indeed useful.
>> I like the plan of creating the AgreementOrderAppl entity, because it
>> will be definitely very flexible.
>> However the existing order code (ui and business logic) is based on
>> the assumption that one agreement is associated to a cart/order, and I
>> would like to fix this process asap before enhancing the data model
>> with the AgreementOrderAppl entity.
>>
>> So, what if I add the new field to the OrderHeader but instead of
>> naming it "agreementId" we use "primaryAgreementId"?
>>
>> Kind regards,
>>
>> Jacopo
>>
>>
>> On Jul 3, 2010, at 9:36 AM, Scott Gray wrote:
>>
>>> Hi Jacopo,
>>>
>>> Not sure if this is of any use to you:
>>> http://ofbiz.135035.n4.nabble.com/orders-and-contracts-td2248364.html#a2248394
>>>
>>>
>>> Regards
>>> Scott
>>>
>>> HotWax Media
>>> http://www.hotwaxmedia.com
>>>
>>> On 3/07/2010, at 6:24 PM, Jacopo Cappellato wrote:
>>>
>>>> yes, I will do.
>>>>
>>>> Jacopo
>>>>
>>>> On Jul 2, 2010, at 8:01 PM, Jacques Le Roux wrote:
>>>>
>>>>> Pretty logical, I see. Maybe Jacopo will consider it?
>>>>>
>>>>> Thanks
>>>>>
>>>>> Jacques
>>>>>
>>>>> From: "BJ Freeman"<bj...@free-man.net>
>>>>>> never saw it as enhanced only following the Data model book.
>>>>>> since most told me that features were not complete in ofbiz, I
>>>>>> completed them.
>>>>>> Since most of my discussion were ignored I just made my own, using
>>>>>> the OOTB as a basis.
>>>>>> I use what I can of the svn and add on top the way I see it.
>>>>>> =========================
>>>>>> BJ Freeman
>>>>>> http://bjfreeman.elance.com
>>>>>> Strategic Power Office with Supplier
>>>>>> Automation<http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>>>>>
>>>>>> Specialtymarket.com<http://www.specialtymarket.com/>
>>>>>> Systems Integrator-- Glad to Assist
>>>>>> Chat Y! messenger: bjfr33man
>>>>>> Linkedin<http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>>>>>>
>>>>>> Jacques Le Roux sent the following on 7/2/2010 10:26 AM:
>>>>>>> Interesting, so you enhanced the OOTB model and actions, right?
>>>>>>>
>>>>>>> Jacques
>>>>>>>
>>>>>>> From: "BJ Freeman"<bj...@free-man.net>
>>>>>>>> I used the model on page 146
>>>>>>>> and the example agreementID 10002
>>>>>>>> since the Agreement has the product agreement, the service
>>>>>>>> matches the
>>>>>>>> product agreement productID and updates the orderitem
>>>>>>>> orderterms(page
>>>>>>>> 128) and table 4.9(page 129) . an SECA checks that the order
>>>>>>>> terms can
>>>>>>>> be accepted based on the order, like a promo may be disqualified
>>>>>>>> based
>>>>>>>> on the order terms.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> =========================
>>>>>>>> BJ Freeman
>>>>>>>> http://bjfreeman.elance.com
>>>>>>>> Strategic Power Office with Supplier Automation
>>>>>>>> <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>>>>>>> Specialtymarket.com<http://www.specialtymarket.com/>
>>>>>>>>
>>>>>>>> Systems Integrator-- Glad to Assist
>>>>>>>>
>>>>>>>> Chat Y! messenger: bjfr33man
>>>>>>>> Linkedin
>>>>>>>> <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Jacopo Cappellato sent the following on 7/2/2010 3:26 AM:
>>>>>>>>> When an order is initiated, it is possible to select an agreement
>>>>>>>>> that will govern the orders (OrderTerms are cloned from
>>>>>>>>> AgreementTerms, if the agreement has a price list then the
>>>>>>>>> agreement
>>>>>>>>> prices are used in place of ProductPrice); however the
>>>>>>>>> agreementId is
>>>>>>>>> only added to the cart but it is lost when the order is saved.
>>>>>>>>> This causes issues if the order is edited: the agreement is
>>>>>>>>> lost and
>>>>>>>>> the system is unable to apply the agreement prices to the
>>>>>>>>> edited order.
>>>>>>>>>
>>>>>>>>> The solution I am proposing is to add the agreementId field to
>>>>>>>>> OrderHeader entity.
>>>>>>>>>
>>>>>>>>> What do you think?
>>>>>>>>>
>>>>>>>>> Jacopo
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>>
>
>

Re: Adding agreementId to OrderHeader

Posted by BJ Freeman <bj...@free-man.net>.
I have the implementation that uses the Sales agreement and a 
productaggreemt for retail, wholesale, custom.
so as you think though the changes you might want to consider hooks to 
allow this in future.

also the agreements are based on partyID role of customeras a 
relationship with the company so I don't see how just AgreementOrderAppl 
  tied to the order header will accomplish this.

=========================
BJ Freeman  <http://bjfreeman.elance.com>
Strategic Power Office with Supplier Automation  <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
Specialtymarket.com  <http://www.specialtymarket.com/>
Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man


Jacopo Cappellato sent the following on 7/7/2010 6:07 AM:
> Thanks Scott,
>
> the link was indeed useful.
> I like the plan of creating the AgreementOrderAppl entity, because it will be definitely very flexible.
> However the existing order code (ui and business logic) is based on the assumption that one agreement is associated to a cart/order, and I would like to fix this process asap before enhancing the data model with the AgreementOrderAppl entity.
>
> So, what if I add the new field to the OrderHeader but instead of naming it "agreementId" we use "primaryAgreementId"?
>
> Kind regards,
>
> Jacopo
>
>
> On Jul 3, 2010, at 9:36 AM, Scott Gray wrote:
>
>> Hi Jacopo,
>>
>> Not sure if this is of any use to you: http://ofbiz.135035.n4.nabble.com/orders-and-contracts-td2248364.html#a2248394
>>
>> Regards
>> Scott
>>
>> HotWax Media
>> http://www.hotwaxmedia.com
>>
>> On 3/07/2010, at 6:24 PM, Jacopo Cappellato wrote:
>>
>>> yes, I will do.
>>>
>>> Jacopo
>>>
>>> On Jul 2, 2010, at 8:01 PM, Jacques Le Roux wrote:
>>>
>>>> Pretty logical, I see. Maybe Jacopo will consider it?
>>>>
>>>> Thanks
>>>>
>>>> Jacques
>>>>
>>>> From: "BJ Freeman"<bj...@free-man.net>
>>>>> never saw it as enhanced only following the Data model book.
>>>>> since most told me that features were not complete in ofbiz, I completed them.
>>>>> Since most of my discussion were ignored I just made my own, using the OOTB as a basis.
>>>>> I use what I can of the svn and add on top the way I see it.
>>>>> =========================
>>>>> BJ Freeman
>>>>> http://bjfreeman.elance.com
>>>>> Strategic Power Office with Supplier Automation<http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>>>> Specialtymarket.com<http://www.specialtymarket.com/>
>>>>> Systems Integrator-- Glad to Assist
>>>>> Chat  Y! messenger: bjfr33man
>>>>> Linkedin<http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>>>>> Jacques Le Roux sent the following on 7/2/2010 10:26 AM:
>>>>>> Interesting, so you enhanced the OOTB model and actions, right?
>>>>>>
>>>>>> Jacques
>>>>>>
>>>>>> From: "BJ Freeman"<bj...@free-man.net>
>>>>>>> I used the model on page 146
>>>>>>> and the example agreementID 10002
>>>>>>> since the Agreement has the product agreement, the service matches the
>>>>>>> product agreement productID and updates the orderitem orderterms(page
>>>>>>> 128) and table 4.9(page 129) . an SECA checks that the order terms can
>>>>>>> be accepted based on the order, like a promo may be disqualified based
>>>>>>> on the order terms.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> =========================
>>>>>>> BJ Freeman
>>>>>>> http://bjfreeman.elance.com
>>>>>>> Strategic Power Office with Supplier Automation
>>>>>>> <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>>>>>> Specialtymarket.com<http://www.specialtymarket.com/>
>>>>>>>
>>>>>>> Systems Integrator-- Glad to Assist
>>>>>>>
>>>>>>> Chat Y! messenger: bjfr33man
>>>>>>> Linkedin
>>>>>>> <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Jacopo Cappellato sent the following on 7/2/2010 3:26 AM:
>>>>>>>> When an order is initiated, it is possible to select an agreement
>>>>>>>> that will govern the orders (OrderTerms are cloned from
>>>>>>>> AgreementTerms, if the agreement has a price list then the agreement
>>>>>>>> prices are used in place of ProductPrice); however the agreementId is
>>>>>>>> only added to the cart but it is lost when the order is saved.
>>>>>>>> This causes issues if the order is edited: the agreement is lost and
>>>>>>>> the system is unable to apply the agreement prices to the edited order.
>>>>>>>>
>>>>>>>> The solution I am proposing is to add the agreementId field to
>>>>>>>> OrderHeader entity.
>>>>>>>>
>>>>>>>> What do you think?
>>>>>>>>
>>>>>>>> Jacopo
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
>


Re: Adding agreementId to OrderHeader

Posted by Jacopo Cappellato <ja...@hotwaxmedia.com>.
Scott, Adam, BJ,


thanks for your feedback.
Based on your comments we will probably need also an AgreementOrderApplPurpose (or Type) entity so that we could have an agreement that governs the terms and prices applied to a customer, the commissions due to a sales rep etc... (unless we just rely on the type id of the Agreement).
I will not have time to work on this now (I have managed to fix the error for a customer in a simpler way) but this is definitely something to keep an eye on.

Thanks and kind regards,

Jacopo


On Jul 7, 2010, at 10:55 PM, Adam Heath wrote:

> Scott Gray wrote:
>> Hi Jacopo,
>> 
>> I have to admit to not being a big fan of the primary* pattern, for example in the Shipment entity I really feel it has done nothing except cause us to take shortcuts when writing shipping logic.  In terms of an Agreement or even a Shipment, what does it actually mean to be the primary?  
>> 
>> I understand its usage in Product.primaryProductCategoryId, where it can be used in cases where you need to be able to inspect a hierarchy rather than a graph e.g. for reporting purposes, but it makes less sense to me for those other entities.
>> 
>> Could we not for now just limit the UI and logic to only handle a single agreement, but allow for the many-to-many in the data model?
> 
> My vote is to not add a primaryFoo field, but use a joined entity,
> with an appropriate Purpose attached.
> 
> Once you have code that can look up the joined entity with a purpose,
> adding more logic to handle other purposes is easy.
> 
> But having a primaryFoo in the base entity means you have duplicate
> code for dealing with the same info.
> 
>> 
>> Regards
>> Scott
>> 
>> On 8/07/2010, at 1:07 AM, Jacopo Cappellato wrote:
>> 
>>> Thanks Scott,
>>> 
>>> the link was indeed useful.
>>> I like the plan of creating the AgreementOrderAppl entity, because it will be definitely very flexible.
>>> However the existing order code (ui and business logic) is based on the assumption that one agreement is associated to a cart/order, and I would like to fix this process asap before enhancing the data model with the AgreementOrderAppl entity.
>>> 
>>> So, what if I add the new field to the OrderHeader but instead of naming it "agreementId" we use "primaryAgreementId"?
>>> 
>>> Kind regards,
>>> 
>>> Jacopo
>>> 
>>> 
>>> On Jul 3, 2010, at 9:36 AM, Scott Gray wrote:
>>> 
>>>> Hi Jacopo,
>>>> 
>>>> Not sure if this is of any use to you: http://ofbiz.135035.n4.nabble.com/orders-and-contracts-td2248364.html#a2248394
>>>> 
>>>> Regards
>>>> Scott
>>>> 
>>>> HotWax Media
>>>> http://www.hotwaxmedia.com
>>>> 
>>>> On 3/07/2010, at 6:24 PM, Jacopo Cappellato wrote:
>>>> 
>>>>> yes, I will do.
>>>>> 
>>>>> Jacopo
>>>>> 
>>>>> On Jul 2, 2010, at 8:01 PM, Jacques Le Roux wrote:
>>>>> 
>>>>>> Pretty logical, I see. Maybe Jacopo will consider it?
>>>>>> 
>>>>>> Thanks
>>>>>> 
>>>>>> Jacques
>>>>>> 
>>>>>> From: "BJ Freeman" <bj...@free-man.net>
>>>>>>> never saw it as enhanced only following the Data model book.
>>>>>>> since most told me that features were not complete in ofbiz, I completed them.
>>>>>>> Since most of my discussion were ignored I just made my own, using the OOTB as a basis.
>>>>>>> I use what I can of the svn and add on top the way I see it.
>>>>>>> =========================
>>>>>>> BJ Freeman
>>>>>>> http://bjfreeman.elance.com
>>>>>>> Strategic Power Office with Supplier Automation  <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>>>>>> Specialtymarket.com  <http://www.specialtymarket.com/>
>>>>>>> Systems Integrator-- Glad to Assist
>>>>>>> Chat  Y! messenger: bjfr33man
>>>>>>> Linkedin <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>>>>>>> Jacques Le Roux sent the following on 7/2/2010 10:26 AM:
>>>>>>>> Interesting, so you enhanced the OOTB model and actions, right?
>>>>>>>> 
>>>>>>>> Jacques
>>>>>>>> 
>>>>>>>> From: "BJ Freeman" <bj...@free-man.net>
>>>>>>>>> I used the model on page 146
>>>>>>>>> and the example agreementID 10002
>>>>>>>>> since the Agreement has the product agreement, the service matches the
>>>>>>>>> product agreement productID and updates the orderitem orderterms(page
>>>>>>>>> 128) and table 4.9(page 129) . an SECA checks that the order terms can
>>>>>>>>> be accepted based on the order, like a promo may be disqualified based
>>>>>>>>> on the order terms.
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> =========================
>>>>>>>>> BJ Freeman
>>>>>>>>> http://bjfreeman.elance.com
>>>>>>>>> Strategic Power Office with Supplier Automation
>>>>>>>>> <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>>>>>>>> Specialtymarket.com <http://www.specialtymarket.com/>
>>>>>>>>> 
>>>>>>>>> Systems Integrator-- Glad to Assist
>>>>>>>>> 
>>>>>>>>> Chat Y! messenger: bjfr33man
>>>>>>>>> Linkedin
>>>>>>>>> <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> Jacopo Cappellato sent the following on 7/2/2010 3:26 AM:
>>>>>>>>>> When an order is initiated, it is possible to select an agreement
>>>>>>>>>> that will govern the orders (OrderTerms are cloned from
>>>>>>>>>> AgreementTerms, if the agreement has a price list then the agreement
>>>>>>>>>> prices are used in place of ProductPrice); however the agreementId is
>>>>>>>>>> only added to the cart but it is lost when the order is saved.
>>>>>>>>>> This causes issues if the order is edited: the agreement is lost and
>>>>>>>>>> the system is unable to apply the agreement prices to the edited order.
>>>>>>>>>> 
>>>>>>>>>> The solution I am proposing is to add the agreementId field to
>>>>>>>>>> OrderHeader entity.
>>>>>>>>>> 
>>>>>>>>>> What do you think?
>>>>>>>>>> 
>>>>>>>>>> Jacopo
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>> 
> 


Re: Adding agreementId to OrderHeader

Posted by Adam Heath <do...@brainfood.com>.
Scott Gray wrote:
> Hi Jacopo,
> 
> I have to admit to not being a big fan of the primary* pattern, for example in the Shipment entity I really feel it has done nothing except cause us to take shortcuts when writing shipping logic.  In terms of an Agreement or even a Shipment, what does it actually mean to be the primary?  
> 
> I understand its usage in Product.primaryProductCategoryId, where it can be used in cases where you need to be able to inspect a hierarchy rather than a graph e.g. for reporting purposes, but it makes less sense to me for those other entities.
> 
> Could we not for now just limit the UI and logic to only handle a single agreement, but allow for the many-to-many in the data model?

My vote is to not add a primaryFoo field, but use a joined entity,
with an appropriate Purpose attached.

Once you have code that can look up the joined entity with a purpose,
adding more logic to handle other purposes is easy.

But having a primaryFoo in the base entity means you have duplicate
code for dealing with the same info.

> 
> Regards
> Scott
> 
> On 8/07/2010, at 1:07 AM, Jacopo Cappellato wrote:
> 
>> Thanks Scott,
>>
>> the link was indeed useful.
>> I like the plan of creating the AgreementOrderAppl entity, because it will be definitely very flexible.
>> However the existing order code (ui and business logic) is based on the assumption that one agreement is associated to a cart/order, and I would like to fix this process asap before enhancing the data model with the AgreementOrderAppl entity.
>>
>> So, what if I add the new field to the OrderHeader but instead of naming it "agreementId" we use "primaryAgreementId"?
>>
>> Kind regards,
>>
>> Jacopo
>>
>>
>> On Jul 3, 2010, at 9:36 AM, Scott Gray wrote:
>>
>>> Hi Jacopo,
>>>
>>> Not sure if this is of any use to you: http://ofbiz.135035.n4.nabble.com/orders-and-contracts-td2248364.html#a2248394
>>>
>>> Regards
>>> Scott
>>>
>>> HotWax Media
>>> http://www.hotwaxmedia.com
>>>
>>> On 3/07/2010, at 6:24 PM, Jacopo Cappellato wrote:
>>>
>>>> yes, I will do.
>>>>
>>>> Jacopo
>>>>
>>>> On Jul 2, 2010, at 8:01 PM, Jacques Le Roux wrote:
>>>>
>>>>> Pretty logical, I see. Maybe Jacopo will consider it?
>>>>>
>>>>> Thanks
>>>>>
>>>>> Jacques
>>>>>
>>>>> From: "BJ Freeman" <bj...@free-man.net>
>>>>>> never saw it as enhanced only following the Data model book.
>>>>>> since most told me that features were not complete in ofbiz, I completed them.
>>>>>> Since most of my discussion were ignored I just made my own, using the OOTB as a basis.
>>>>>> I use what I can of the svn and add on top the way I see it.
>>>>>> =========================
>>>>>> BJ Freeman
>>>>>> http://bjfreeman.elance.com
>>>>>> Strategic Power Office with Supplier Automation  <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>>>>> Specialtymarket.com  <http://www.specialtymarket.com/>
>>>>>> Systems Integrator-- Glad to Assist
>>>>>> Chat  Y! messenger: bjfr33man
>>>>>> Linkedin <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>>>>>> Jacques Le Roux sent the following on 7/2/2010 10:26 AM:
>>>>>>> Interesting, so you enhanced the OOTB model and actions, right?
>>>>>>>
>>>>>>> Jacques
>>>>>>>
>>>>>>> From: "BJ Freeman" <bj...@free-man.net>
>>>>>>>> I used the model on page 146
>>>>>>>> and the example agreementID 10002
>>>>>>>> since the Agreement has the product agreement, the service matches the
>>>>>>>> product agreement productID and updates the orderitem orderterms(page
>>>>>>>> 128) and table 4.9(page 129) . an SECA checks that the order terms can
>>>>>>>> be accepted based on the order, like a promo may be disqualified based
>>>>>>>> on the order terms.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> =========================
>>>>>>>> BJ Freeman
>>>>>>>> http://bjfreeman.elance.com
>>>>>>>> Strategic Power Office with Supplier Automation
>>>>>>>> <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>>>>>>> Specialtymarket.com <http://www.specialtymarket.com/>
>>>>>>>>
>>>>>>>> Systems Integrator-- Glad to Assist
>>>>>>>>
>>>>>>>> Chat Y! messenger: bjfr33man
>>>>>>>> Linkedin
>>>>>>>> <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Jacopo Cappellato sent the following on 7/2/2010 3:26 AM:
>>>>>>>>> When an order is initiated, it is possible to select an agreement
>>>>>>>>> that will govern the orders (OrderTerms are cloned from
>>>>>>>>> AgreementTerms, if the agreement has a price list then the agreement
>>>>>>>>> prices are used in place of ProductPrice); however the agreementId is
>>>>>>>>> only added to the cart but it is lost when the order is saved.
>>>>>>>>> This causes issues if the order is edited: the agreement is lost and
>>>>>>>>> the system is unable to apply the agreement prices to the edited order.
>>>>>>>>>
>>>>>>>>> The solution I am proposing is to add the agreementId field to
>>>>>>>>> OrderHeader entity.
>>>>>>>>>
>>>>>>>>> What do you think?
>>>>>>>>>
>>>>>>>>> Jacopo
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>>>
> 


Re: Adding agreementId to OrderHeader

Posted by Scott Gray <sc...@hotwaxmedia.com>.
Hi Jacopo,

I have to admit to not being a big fan of the primary* pattern, for example in the Shipment entity I really feel it has done nothing except cause us to take shortcuts when writing shipping logic.  In terms of an Agreement or even a Shipment, what does it actually mean to be the primary?  

I understand its usage in Product.primaryProductCategoryId, where it can be used in cases where you need to be able to inspect a hierarchy rather than a graph e.g. for reporting purposes, but it makes less sense to me for those other entities.

Could we not for now just limit the UI and logic to only handle a single agreement, but allow for the many-to-many in the data model?

Regards
Scott

On 8/07/2010, at 1:07 AM, Jacopo Cappellato wrote:

> Thanks Scott,
> 
> the link was indeed useful.
> I like the plan of creating the AgreementOrderAppl entity, because it will be definitely very flexible.
> However the existing order code (ui and business logic) is based on the assumption that one agreement is associated to a cart/order, and I would like to fix this process asap before enhancing the data model with the AgreementOrderAppl entity.
> 
> So, what if I add the new field to the OrderHeader but instead of naming it "agreementId" we use "primaryAgreementId"?
> 
> Kind regards,
> 
> Jacopo
> 
> 
> On Jul 3, 2010, at 9:36 AM, Scott Gray wrote:
> 
>> Hi Jacopo,
>> 
>> Not sure if this is of any use to you: http://ofbiz.135035.n4.nabble.com/orders-and-contracts-td2248364.html#a2248394
>> 
>> Regards
>> Scott
>> 
>> HotWax Media
>> http://www.hotwaxmedia.com
>> 
>> On 3/07/2010, at 6:24 PM, Jacopo Cappellato wrote:
>> 
>>> yes, I will do.
>>> 
>>> Jacopo
>>> 
>>> On Jul 2, 2010, at 8:01 PM, Jacques Le Roux wrote:
>>> 
>>>> Pretty logical, I see. Maybe Jacopo will consider it?
>>>> 
>>>> Thanks
>>>> 
>>>> Jacques
>>>> 
>>>> From: "BJ Freeman" <bj...@free-man.net>
>>>>> never saw it as enhanced only following the Data model book.
>>>>> since most told me that features were not complete in ofbiz, I completed them.
>>>>> Since most of my discussion were ignored I just made my own, using the OOTB as a basis.
>>>>> I use what I can of the svn and add on top the way I see it.
>>>>> =========================
>>>>> BJ Freeman
>>>>> http://bjfreeman.elance.com
>>>>> Strategic Power Office with Supplier Automation  <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>>>> Specialtymarket.com  <http://www.specialtymarket.com/>
>>>>> Systems Integrator-- Glad to Assist
>>>>> Chat  Y! messenger: bjfr33man
>>>>> Linkedin <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>>>>> Jacques Le Roux sent the following on 7/2/2010 10:26 AM:
>>>>>> Interesting, so you enhanced the OOTB model and actions, right?
>>>>>> 
>>>>>> Jacques
>>>>>> 
>>>>>> From: "BJ Freeman" <bj...@free-man.net>
>>>>>>> I used the model on page 146
>>>>>>> and the example agreementID 10002
>>>>>>> since the Agreement has the product agreement, the service matches the
>>>>>>> product agreement productID and updates the orderitem orderterms(page
>>>>>>> 128) and table 4.9(page 129) . an SECA checks that the order terms can
>>>>>>> be accepted based on the order, like a promo may be disqualified based
>>>>>>> on the order terms.
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> =========================
>>>>>>> BJ Freeman
>>>>>>> http://bjfreeman.elance.com
>>>>>>> Strategic Power Office with Supplier Automation
>>>>>>> <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>>>>>> Specialtymarket.com <http://www.specialtymarket.com/>
>>>>>>> 
>>>>>>> Systems Integrator-- Glad to Assist
>>>>>>> 
>>>>>>> Chat Y! messenger: bjfr33man
>>>>>>> Linkedin
>>>>>>> <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> Jacopo Cappellato sent the following on 7/2/2010 3:26 AM:
>>>>>>>> When an order is initiated, it is possible to select an agreement
>>>>>>>> that will govern the orders (OrderTerms are cloned from
>>>>>>>> AgreementTerms, if the agreement has a price list then the agreement
>>>>>>>> prices are used in place of ProductPrice); however the agreementId is
>>>>>>>> only added to the cart but it is lost when the order is saved.
>>>>>>>> This causes issues if the order is edited: the agreement is lost and
>>>>>>>> the system is unable to apply the agreement prices to the edited order.
>>>>>>>> 
>>>>>>>> The solution I am proposing is to add the agreementId field to
>>>>>>>> OrderHeader entity.
>>>>>>>> 
>>>>>>>> What do you think?
>>>>>>>> 
>>>>>>>> Jacopo
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>>> 
>> 
> 


Re: Adding agreementId to OrderHeader

Posted by Jacopo Cappellato <ja...@hotwaxmedia.com>.
Thanks Scott,

the link was indeed useful.
I like the plan of creating the AgreementOrderAppl entity, because it will be definitely very flexible.
However the existing order code (ui and business logic) is based on the assumption that one agreement is associated to a cart/order, and I would like to fix this process asap before enhancing the data model with the AgreementOrderAppl entity.

So, what if I add the new field to the OrderHeader but instead of naming it "agreementId" we use "primaryAgreementId"?

Kind regards,

Jacopo


On Jul 3, 2010, at 9:36 AM, Scott Gray wrote:

> Hi Jacopo,
> 
> Not sure if this is of any use to you: http://ofbiz.135035.n4.nabble.com/orders-and-contracts-td2248364.html#a2248394
> 
> Regards
> Scott
> 
> HotWax Media
> http://www.hotwaxmedia.com
> 
> On 3/07/2010, at 6:24 PM, Jacopo Cappellato wrote:
> 
>> yes, I will do.
>> 
>> Jacopo
>> 
>> On Jul 2, 2010, at 8:01 PM, Jacques Le Roux wrote:
>> 
>>> Pretty logical, I see. Maybe Jacopo will consider it?
>>> 
>>> Thanks
>>> 
>>> Jacques
>>> 
>>> From: "BJ Freeman" <bj...@free-man.net>
>>>> never saw it as enhanced only following the Data model book.
>>>> since most told me that features were not complete in ofbiz, I completed them.
>>>> Since most of my discussion were ignored I just made my own, using the OOTB as a basis.
>>>> I use what I can of the svn and add on top the way I see it.
>>>> =========================
>>>> BJ Freeman
>>>> http://bjfreeman.elance.com
>>>> Strategic Power Office with Supplier Automation  <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>>> Specialtymarket.com  <http://www.specialtymarket.com/>
>>>> Systems Integrator-- Glad to Assist
>>>> Chat  Y! messenger: bjfr33man
>>>> Linkedin <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>>>> Jacques Le Roux sent the following on 7/2/2010 10:26 AM:
>>>>> Interesting, so you enhanced the OOTB model and actions, right?
>>>>> 
>>>>> Jacques
>>>>> 
>>>>> From: "BJ Freeman" <bj...@free-man.net>
>>>>>> I used the model on page 146
>>>>>> and the example agreementID 10002
>>>>>> since the Agreement has the product agreement, the service matches the
>>>>>> product agreement productID and updates the orderitem orderterms(page
>>>>>> 128) and table 4.9(page 129) . an SECA checks that the order terms can
>>>>>> be accepted based on the order, like a promo may be disqualified based
>>>>>> on the order terms.
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> =========================
>>>>>> BJ Freeman
>>>>>> http://bjfreeman.elance.com
>>>>>> Strategic Power Office with Supplier Automation
>>>>>> <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>>>>> Specialtymarket.com <http://www.specialtymarket.com/>
>>>>>> 
>>>>>> Systems Integrator-- Glad to Assist
>>>>>> 
>>>>>> Chat Y! messenger: bjfr33man
>>>>>> Linkedin
>>>>>> <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> Jacopo Cappellato sent the following on 7/2/2010 3:26 AM:
>>>>>>> When an order is initiated, it is possible to select an agreement
>>>>>>> that will govern the orders (OrderTerms are cloned from
>>>>>>> AgreementTerms, if the agreement has a price list then the agreement
>>>>>>> prices are used in place of ProductPrice); however the agreementId is
>>>>>>> only added to the cart but it is lost when the order is saved.
>>>>>>> This causes issues if the order is edited: the agreement is lost and
>>>>>>> the system is unable to apply the agreement prices to the edited order.
>>>>>>> 
>>>>>>> The solution I am proposing is to add the agreementId field to
>>>>>>> OrderHeader entity.
>>>>>>> 
>>>>>>> What do you think?
>>>>>>> 
>>>>>>> Jacopo
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>> 
>>> 
>> 
> 


Re: Adding agreementId to OrderHeader

Posted by BJ Freeman <bj...@free-man.net>.
I did not relate and order directly with an agreement so that the order 
terms were free to me changed on the spot so to speak.
These are know as exceptions and need to be approved, like say in a 
retail establishment where a manager has to approve anything not based 
on the rules.
the also allows more freedom as to business rules.

=========================
BJ Freeman  <http://bjfreeman.elance.com>
Strategic Power Office with Supplier Automation  <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
Specialtymarket.com  <http://www.specialtymarket.com/>

Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man


Scott Gray sent the following on 7/3/2010 12:36 AM:
> Hi Jacopo,
>
> Not sure if this is of any use to you: http://ofbiz.135035.n4.nabble.com/orders-and-contracts-td2248364.html#a2248394
>
> Regards
> Scott
>
> HotWax Media
> http://www.hotwaxmedia.com
>
> On 3/07/2010, at 6:24 PM, Jacopo Cappellato wrote:
>
>> yes, I will do.
>>
>> Jacopo
>>
>> On Jul 2, 2010, at 8:01 PM, Jacques Le Roux wrote:
>>
>>> Pretty logical, I see. Maybe Jacopo will consider it?
>>>
>>> Thanks
>>>
>>> Jacques
>>>
>>> From: "BJ Freeman"<bj...@free-man.net>
>>>> never saw it as enhanced only following the Data model book.
>>>> since most told me that features were not complete in ofbiz, I completed them.
>>>> Since most of my discussion were ignored I just made my own, using the OOTB as a basis.
>>>> I use what I can of the svn and add on top the way I see it.
>>>> =========================
>>>> BJ Freeman
>>>> http://bjfreeman.elance.com
>>>> Strategic Power Office with Supplier Automation<http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>>> Specialtymarket.com<http://www.specialtymarket.com/>
>>>> Systems Integrator-- Glad to Assist
>>>> Chat  Y! messenger: bjfr33man
>>>> Linkedin<http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>>>> Jacques Le Roux sent the following on 7/2/2010 10:26 AM:
>>>>> Interesting, so you enhanced the OOTB model and actions, right?
>>>>>
>>>>> Jacques
>>>>>
>>>>> From: "BJ Freeman"<bj...@free-man.net>
>>>>>> I used the model on page 146
>>>>>> and the example agreementID 10002
>>>>>> since the Agreement has the product agreement, the service matches the
>>>>>> product agreement productID and updates the orderitem orderterms(page
>>>>>> 128) and table 4.9(page 129) . an SECA checks that the order terms can
>>>>>> be accepted based on the order, like a promo may be disqualified based
>>>>>> on the order terms.
>>>>>>
>>>>>>
>>>>>>
>>>>>> =========================
>>>>>> BJ Freeman
>>>>>> http://bjfreeman.elance.com
>>>>>> Strategic Power Office with Supplier Automation
>>>>>> <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>>>>> Specialtymarket.com<http://www.specialtymarket.com/>
>>>>>>
>>>>>> Systems Integrator-- Glad to Assist
>>>>>>
>>>>>> Chat Y! messenger: bjfr33man
>>>>>> Linkedin
>>>>>> <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Jacopo Cappellato sent the following on 7/2/2010 3:26 AM:
>>>>>>> When an order is initiated, it is possible to select an agreement
>>>>>>> that will govern the orders (OrderTerms are cloned from
>>>>>>> AgreementTerms, if the agreement has a price list then the agreement
>>>>>>> prices are used in place of ProductPrice); however the agreementId is
>>>>>>> only added to the cart but it is lost when the order is saved.
>>>>>>> This causes issues if the order is edited: the agreement is lost and
>>>>>>> the system is unable to apply the agreement prices to the edited order.
>>>>>>>
>>>>>>> The solution I am proposing is to add the agreementId field to
>>>>>>> OrderHeader entity.
>>>>>>>
>>>>>>> What do you think?
>>>>>>>
>>>>>>> Jacopo
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>


Re: Adding agreementId to OrderHeader

Posted by Scott Gray <sc...@hotwaxmedia.com>.
Hi Jacopo,

Not sure if this is of any use to you: http://ofbiz.135035.n4.nabble.com/orders-and-contracts-td2248364.html#a2248394

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 3/07/2010, at 6:24 PM, Jacopo Cappellato wrote:

> yes, I will do.
> 
> Jacopo
> 
> On Jul 2, 2010, at 8:01 PM, Jacques Le Roux wrote:
> 
>> Pretty logical, I see. Maybe Jacopo will consider it?
>> 
>> Thanks
>> 
>> Jacques
>> 
>> From: "BJ Freeman" <bj...@free-man.net>
>>> never saw it as enhanced only following the Data model book.
>>> since most told me that features were not complete in ofbiz, I completed them.
>>> Since most of my discussion were ignored I just made my own, using the OOTB as a basis.
>>> I use what I can of the svn and add on top the way I see it.
>>> =========================
>>> BJ Freeman
>>> http://bjfreeman.elance.com
>>> Strategic Power Office with Supplier Automation  <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>> Specialtymarket.com  <http://www.specialtymarket.com/>
>>> Systems Integrator-- Glad to Assist
>>> Chat  Y! messenger: bjfr33man
>>> Linkedin <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>>> Jacques Le Roux sent the following on 7/2/2010 10:26 AM:
>>>> Interesting, so you enhanced the OOTB model and actions, right?
>>>> 
>>>> Jacques
>>>> 
>>>> From: "BJ Freeman" <bj...@free-man.net>
>>>>> I used the model on page 146
>>>>> and the example agreementID 10002
>>>>> since the Agreement has the product agreement, the service matches the
>>>>> product agreement productID and updates the orderitem orderterms(page
>>>>> 128) and table 4.9(page 129) . an SECA checks that the order terms can
>>>>> be accepted based on the order, like a promo may be disqualified based
>>>>> on the order terms.
>>>>> 
>>>>> 
>>>>> 
>>>>> =========================
>>>>> BJ Freeman
>>>>> http://bjfreeman.elance.com
>>>>> Strategic Power Office with Supplier Automation
>>>>> <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>>>> Specialtymarket.com <http://www.specialtymarket.com/>
>>>>> 
>>>>> Systems Integrator-- Glad to Assist
>>>>> 
>>>>> Chat Y! messenger: bjfr33man
>>>>> Linkedin
>>>>> <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>>>>> 
>>>>> 
>>>>> 
>>>>> Jacopo Cappellato sent the following on 7/2/2010 3:26 AM:
>>>>>> When an order is initiated, it is possible to select an agreement
>>>>>> that will govern the orders (OrderTerms are cloned from
>>>>>> AgreementTerms, if the agreement has a price list then the agreement
>>>>>> prices are used in place of ProductPrice); however the agreementId is
>>>>>> only added to the cart but it is lost when the order is saved.
>>>>>> This causes issues if the order is edited: the agreement is lost and
>>>>>> the system is unable to apply the agreement prices to the edited order.
>>>>>> 
>>>>>> The solution I am proposing is to add the agreementId field to
>>>>>> OrderHeader entity.
>>>>>> 
>>>>>> What do you think?
>>>>>> 
>>>>>> Jacopo
>>>>>> 
>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>>>> 
>>>> 
>>> 
>> 
> 


Re: Adding agreementId to OrderHeader

Posted by Jacopo Cappellato <ja...@hotwaxmedia.com>.
yes, I will do.

Jacopo

On Jul 2, 2010, at 8:01 PM, Jacques Le Roux wrote:

> Pretty logical, I see. Maybe Jacopo will consider it?
> 
> Thanks
> 
> Jacques
> 
> From: "BJ Freeman" <bj...@free-man.net>
>> never saw it as enhanced only following the Data model book.
>> since most told me that features were not complete in ofbiz, I completed them.
>> Since most of my discussion were ignored I just made my own, using the OOTB as a basis.
>> I use what I can of the svn and add on top the way I see it.
>> =========================
>> BJ Freeman
>> http://bjfreeman.elance.com
>> Strategic Power Office with Supplier Automation  <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>> Specialtymarket.com  <http://www.specialtymarket.com/>
>> Systems Integrator-- Glad to Assist
>> Chat  Y! messenger: bjfr33man
>> Linkedin <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>> Jacques Le Roux sent the following on 7/2/2010 10:26 AM:
>>> Interesting, so you enhanced the OOTB model and actions, right?
>>> 
>>> Jacques
>>> 
>>> From: "BJ Freeman" <bj...@free-man.net>
>>>> I used the model on page 146
>>>> and the example agreementID 10002
>>>> since the Agreement has the product agreement, the service matches the
>>>> product agreement productID and updates the orderitem orderterms(page
>>>> 128) and table 4.9(page 129) . an SECA checks that the order terms can
>>>> be accepted based on the order, like a promo may be disqualified based
>>>> on the order terms.
>>>> 
>>>> 
>>>> 
>>>> =========================
>>>> BJ Freeman
>>>> http://bjfreeman.elance.com
>>>> Strategic Power Office with Supplier Automation
>>>> <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>>> Specialtymarket.com <http://www.specialtymarket.com/>
>>>> 
>>>> Systems Integrator-- Glad to Assist
>>>> 
>>>> Chat Y! messenger: bjfr33man
>>>> Linkedin
>>>> <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>>>> 
>>>> 
>>>> 
>>>> Jacopo Cappellato sent the following on 7/2/2010 3:26 AM:
>>>>> When an order is initiated, it is possible to select an agreement
>>>>> that will govern the orders (OrderTerms are cloned from
>>>>> AgreementTerms, if the agreement has a price list then the agreement
>>>>> prices are used in place of ProductPrice); however the agreementId is
>>>>> only added to the cart but it is lost when the order is saved.
>>>>> This causes issues if the order is edited: the agreement is lost and
>>>>> the system is unable to apply the agreement prices to the edited order.
>>>>> 
>>>>> The solution I am proposing is to add the agreementId field to
>>>>> OrderHeader entity.
>>>>> 
>>>>> What do you think?
>>>>> 
>>>>> Jacopo
>>>>> 
>>>>> 
>>>>> 
>>>> 
>>> 
>>> 
>>> 
>> 
> 


Re: Adding agreementId to OrderHeader

Posted by Jacques Le Roux <ja...@les7arts.com>.
Pretty logical, I see. Maybe Jacopo will consider it?

Thanks

Jacques

From: "BJ Freeman" <bj...@free-man.net>
> never saw it as enhanced only following the Data model book.
> since most told me that features were not complete in ofbiz, I completed 
> them.
> Since most of my discussion were ignored I just made my own, using the 
> OOTB as a basis.
> I use what I can of the svn and add on top the way I see it.
> 
> 
> 
> =========================
> BJ Freeman
> http://bjfreeman.elance.com
> Strategic Power Office with Supplier Automation  <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
> Specialtymarket.com  <http://www.specialtymarket.com/>
> 
> Systems Integrator-- Glad to Assist
> 
> Chat  Y! messenger: bjfr33man
> Linkedin 
> <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
> 
> 
> Jacques Le Roux sent the following on 7/2/2010 10:26 AM:
>> Interesting, so you enhanced the OOTB model and actions, right?
>>
>> Jacques
>>
>> From: "BJ Freeman" <bj...@free-man.net>
>>> I used the model on page 146
>>> and the example agreementID 10002
>>> since the Agreement has the product agreement, the service matches the
>>> product agreement productID and updates the orderitem orderterms(page
>>> 128) and table 4.9(page 129) . an SECA checks that the order terms can
>>> be accepted based on the order, like a promo may be disqualified based
>>> on the order terms.
>>>
>>>
>>>
>>> =========================
>>> BJ Freeman
>>> http://bjfreeman.elance.com
>>> Strategic Power Office with Supplier Automation
>>> <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>> Specialtymarket.com <http://www.specialtymarket.com/>
>>>
>>> Systems Integrator-- Glad to Assist
>>>
>>> Chat Y! messenger: bjfr33man
>>> Linkedin
>>> <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>>>
>>>
>>>
>>> Jacopo Cappellato sent the following on 7/2/2010 3:26 AM:
>>>> When an order is initiated, it is possible to select an agreement
>>>> that will govern the orders (OrderTerms are cloned from
>>>> AgreementTerms, if the agreement has a price list then the agreement
>>>> prices are used in place of ProductPrice); however the agreementId is
>>>> only added to the cart but it is lost when the order is saved.
>>>> This causes issues if the order is edited: the agreement is lost and
>>>> the system is unable to apply the agreement prices to the edited order.
>>>>
>>>> The solution I am proposing is to add the agreementId field to
>>>> OrderHeader entity.
>>>>
>>>> What do you think?
>>>>
>>>> Jacopo
>>>>
>>>>
>>>>
>>>
>>
>>
>>
>


Re: Adding agreementId to OrderHeader

Posted by BJ Freeman <bj...@free-man.net>.
never saw it as enhanced only following the Data model book.
since most told me that features were not complete in ofbiz, I completed 
them.
Since most of my discussion were ignored I just made my own, using the 
OOTB as a basis.
I use what I can of the svn and add on top the way I see it.



=========================
BJ Freeman
http://bjfreeman.elance.com
Strategic Power Office with Supplier Automation  <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
Specialtymarket.com  <http://www.specialtymarket.com/>

Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man
Linkedin 
<http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>


Jacques Le Roux sent the following on 7/2/2010 10:26 AM:
> Interesting, so you enhanced the OOTB model and actions, right?
>
> Jacques
>
> From: "BJ Freeman" <bj...@free-man.net>
>> I used the model on page 146
>> and the example agreementID 10002
>> since the Agreement has the product agreement, the service matches the
>> product agreement productID and updates the orderitem orderterms(page
>> 128) and table 4.9(page 129) . an SECA checks that the order terms can
>> be accepted based on the order, like a promo may be disqualified based
>> on the order terms.
>>
>>
>>
>> =========================
>> BJ Freeman
>> http://bjfreeman.elance.com
>> Strategic Power Office with Supplier Automation
>> <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>> Specialtymarket.com <http://www.specialtymarket.com/>
>>
>> Systems Integrator-- Glad to Assist
>>
>> Chat Y! messenger: bjfr33man
>> Linkedin
>> <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>>
>>
>>
>> Jacopo Cappellato sent the following on 7/2/2010 3:26 AM:
>>> When an order is initiated, it is possible to select an agreement
>>> that will govern the orders (OrderTerms are cloned from
>>> AgreementTerms, if the agreement has a price list then the agreement
>>> prices are used in place of ProductPrice); however the agreementId is
>>> only added to the cart but it is lost when the order is saved.
>>> This causes issues if the order is edited: the agreement is lost and
>>> the system is unable to apply the agreement prices to the edited order.
>>>
>>> The solution I am proposing is to add the agreementId field to
>>> OrderHeader entity.
>>>
>>> What do you think?
>>>
>>> Jacopo
>>>
>>>
>>>
>>
>
>
>


Re: Adding agreementId to OrderHeader

Posted by Jacques Le Roux <ja...@les7arts.com>.
Interesting, so you enhanced the OOTB model and actions, right?

Jacques

From: "BJ Freeman" <bj...@free-man.net>
>I used the model on page 146
> and the example agreementID 10002
> since the Agreement has the product agreement, the service matches the product agreement productID and updates the orderitem 
> orderterms(page 128) and table 4.9(page 129) . an SECA checks that the order terms can be accepted based on the order, like a 
> promo may be disqualified based on the order terms.
>
>
>
> =========================
> BJ Freeman
> http://bjfreeman.elance.com
> Strategic Power Office with Supplier Automation  <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
> Specialtymarket.com  <http://www.specialtymarket.com/>
>
> Systems Integrator-- Glad to Assist
>
> Chat  Y! messenger: bjfr33man
> Linkedin <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>
>
> Jacopo Cappellato sent the following on 7/2/2010 3:26 AM:
>> When an order is initiated, it is possible to select an agreement that will govern the orders (OrderTerms are cloned from 
>> AgreementTerms, if the agreement has a price list then the agreement prices are used in place of ProductPrice); however the 
>> agreementId is only added to the cart but it is lost when the order is saved.
>> This causes issues if the order is edited: the agreement is lost and the system is unable to apply the agreement prices to the 
>> edited order.
>>
>> The solution I am proposing is to add the agreementId field to OrderHeader entity.
>>
>> What do you think?
>>
>> Jacopo
>>
>>
>>
> 



Re: Adding agreementId to OrderHeader

Posted by BJ Freeman <bj...@free-man.net>.
I used the model on page 146
and the example agreementID 10002
since the Agreement has the product agreement, the service matches the 
product agreement productID and updates the orderitem orderterms(page 
128) and table 4.9(page 129) . an SECA checks that the order terms can 
be accepted based on the order, like a promo may be disqualified based 
on the order terms.



=========================
BJ Freeman
http://bjfreeman.elance.com
Strategic Power Office with Supplier Automation  <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
Specialtymarket.com  <http://www.specialtymarket.com/>

Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man
Linkedin 
<http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>


Jacopo Cappellato sent the following on 7/2/2010 3:26 AM:
> When an order is initiated, it is possible to select an agreement that will govern the orders (OrderTerms are cloned from AgreementTerms, if the agreement has a price list then the agreement prices are used in place of ProductPrice); however the agreementId is only added to the cart but it is lost when the order is saved.
> This causes issues if the order is edited: the agreement is lost and the system is unable to apply the agreement prices to the edited order.
>
> The solution I am proposing is to add the agreementId field to OrderHeader entity.
>
> What do you think?
>
> Jacopo
>
>
>


Re: Adding agreementId to OrderHeader

Posted by Jacques Le Roux <ja...@les7arts.com>.
Quick answer: I can't see any problems with that as they are no ways to retrieve the agreementId from the OrderTerms.

Jacques

From: "Jacopo Cappellato" <ja...@hotwaxmedia.com>
> When an order is initiated, it is possible to select an agreement that will govern the orders (OrderTerms are cloned from 
> AgreementTerms, if the agreement has a price list then the agreement prices are used in place of ProductPrice); however the 
> agreementId is only added to the cart but it is lost when the order is saved.
> This causes issues if the order is edited: the agreement is lost and the system is unable to apply the agreement prices to the 
> edited order.
>
> The solution I am proposing is to add the agreementId field to OrderHeader entity.
>
> What do you think?
>
> Jacopo
>
>
>