Order payed with few billing accounts

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Order payed with few billing accounts

Rashko Rejmer
Hi all,

I wanted to ask the community for opinion about ability orders/invoices to be payed with multiple billing accounts. I research the ml and jira and found that there are different points of view on this topic(https://issues.apache.org/jira/browse/OFBIZ-682).
Now I have to implement ability to pay order with more then one billing accounts and to be able to create invoice from orders that are payed with different billing accounts.
Now I have to implement ability to pay order with more then one billing accounts and to be able to create invoice from orders that are payed with different billing accounts.
Personally, I am inclined to agree with Si's opinion that it is be better if billingAccountId field is located at OrderPaymentPreference entity to achieve this ability.
I was wondering what are the disadvantages of this idea. I will be happy if you share your opinion on this with me.

Regards,
Rashko Rejmer
Reply | Threaded
Open this post in threaded view
|

RE: Order payed with few billing accounts

SkipDever
Rashko

I have been hashing this out with Si, etc. myself now for some weeks and the
consensus as I see it is to use FinAccount and related entities.  But, this
is a lot of work.

Skip

-----Original Message-----
From: Rashko Rejmer [mailto:[hidden email]]
Sent: Monday, September 17, 2007 6:03 AM
To: [hidden email]
Subject: Order payed with few billing accounts



Hi all,

I wanted to ask the community for opinion about ability orders/invoices to
be payed with multiple billing accounts. I research the ml and jira and
found that there are different points of view on this
topic(https://issues.apache.org/jira/browse/OFBIZ-682).
Now I have to implement ability to pay order with more then one billing
accounts and to be able to create invoice from orders that are payed with
different billing accounts.
Now I have to implement ability to pay order with more then one billing
accounts and to be able to create invoice from orders that are payed with
different billing accounts.
Personally, I am inclined to agree with Si's opinion that it is be better if
billingAccountId field is located at OrderPaymentPreference entity to
achieve this ability.
I was wondering what are the disadvantages of this idea. I will be happy if
you share your opinion on this with me.

Regards,
Rashko Rejmer
--
View this message in context:
http://www.nabble.com/Order-payed-with-few-billing-accounts-tf4466514.html#a
12735296
Sent from the OFBiz - User mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: Order payed with few billing accounts

jonwimp
In reply to this post by Rashko Rejmer
I agree with Si. I implemented something quite similar.

Adding billingAcountId to OrderPaymentPreference should be the easiest way to go about it.

In fact, I've added similar fields to achieve similar relations to OrderHeader:

1. Multiple invoices for each order.

2. Multiple billing account for each order.

I can't remember what I added for OrderPaymentPreference. But I do remember that I REALLY liked
how there can be multiple OrderPaymentPreference(s) per OrderHeader, multiple ways to pay for an
order.

And that actually set me thinking about why there were fields like OrderHeader.billingAccountId,
which negates the flexibility provided by the OrderHeader-OrderPaymentPreference relation. My
thoughts were almost exactly the same as Si Chen's in
https://issues.apache.org/jira/browse/OFBIZ-682 .

I can't see any disadvantage to this solution. You will likely have to do some core/important
changes to PaymentGatewayServices.java, I think. The only disadvantage, possibly, is that there
might be considerable "change propagation" effort if there are a lot of other codes that ASSUME
there's only one billing account per order.

Still, I believe it's high time to extend this part of OFBiz to its fullest potential. Nice to be
able to pay with multiple billing accounts, since we can already pay with multiple credit cards.

Oh, by the way, there are quite a number of other bugs related to "paying with multiple payment
methods" in this area, IIRC. Same as what Si Chen spotted in the JIRA issue. I fixed a lot in the
past. Hmm... this one is fresh in my mind: there's a problem with calculating "open amount" for an
order.

Jonathon

Rashko Rejmer wrote:

> Hi all,
>
> I wanted to ask the community for opinion about ability orders/invoices to
> be payed with multiple billing accounts. I research the ml and jira and
> found that there are different points of view on this
> topic(https://issues.apache.org/jira/browse/OFBIZ-682).
> Now I have to implement ability to pay order with more then one billing
> accounts and to be able to create invoice from orders that are payed with
> different billing accounts.
> Now I have to implement ability to pay order with more then one billing
> accounts and to be able to create invoice from orders that are payed with
> different billing accounts.
> Personally, I am inclined to agree with Si's opinion that it is be better if
> billingAccountId field is located at OrderPaymentPreference entity to
> achieve this ability.
> I was wondering what are the disadvantages of this idea. I will be happy if
> you share your opinion on this with me.
>
> Regards,
> Rashko Rejmer

Reply | Threaded
Open this post in threaded view
|

RE: Order payed with few billing accounts

SkipDever
I havent actually gotten this far into the code, but I can't imagine how you
could NOT have multiple invoices per order.  How about the case where an
order contains backordered items and parts of the order are shipped in
multiple stages seperated by possibly many days?

In another case, the customer walks out of the store with part of an order,
having paid cash and leaves a credit card number to pay for the balance of
the order when it arrives.

Guess I better check this out before it becomes an issue.



-----Original Message-----
From: Jonathon -- Improov [mailto:[hidden email]]
Sent: Monday, September 17, 2007 7:40 AM
To: [hidden email]
Subject: Re: Order payed with few billing accounts


I agree with Si. I implemented something quite similar.

Adding billingAcountId to OrderPaymentPreference should be the easiest way
to go about it.

In fact, I've added similar fields to achieve similar relations to
OrderHeader:

1. Multiple invoices for each order.

2. Multiple billing account for each order.

I can't remember what I added for OrderPaymentPreference. But I do remember
that I REALLY liked
how there can be multiple OrderPaymentPreference(s) per OrderHeader,
multiple ways to pay for an
order.

And that actually set me thinking about why there were fields like
OrderHeader.billingAccountId,
which negates the flexibility provided by the
OrderHeader-OrderPaymentPreference relation. My
thoughts were almost exactly the same as Si Chen's in
https://issues.apache.org/jira/browse/OFBIZ-682 .

I can't see any disadvantage to this solution. You will likely have to do
some core/important
changes to PaymentGatewayServices.java, I think. The only disadvantage,
possibly, is that there
might be considerable "change propagation" effort if there are a lot of
other codes that ASSUME
there's only one billing account per order.

Still, I believe it's high time to extend this part of OFBiz to its fullest
potential. Nice to be
able to pay with multiple billing accounts, since we can already pay with
multiple credit cards.

Oh, by the way, there are quite a number of other bugs related to "paying
with multiple payment
methods" in this area, IIRC. Same as what Si Chen spotted in the JIRA issue.
I fixed a lot in the
past. Hmm... this one is fresh in my mind: there's a problem with
calculating "open amount" for an
order.

Jonathon

Rashko Rejmer wrote:

> Hi all,
>
> I wanted to ask the community for opinion about ability orders/invoices to
> be payed with multiple billing accounts. I research the ml and jira and
> found that there are different points of view on this
> topic(https://issues.apache.org/jira/browse/OFBIZ-682).
> Now I have to implement ability to pay order with more then one billing
> accounts and to be able to create invoice from orders that are payed with
> different billing accounts.
> Now I have to implement ability to pay order with more then one billing
> accounts and to be able to create invoice from orders that are payed with
> different billing accounts.
> Personally, I am inclined to agree with Si's opinion that it is be better
if
> billingAccountId field is located at OrderPaymentPreference entity to
> achieve this ability.
> I was wondering what are the disadvantages of this idea. I will be happy
if
> you share your opinion on this with me.
>
> Regards,
> Rashko Rejmer


Reply | Threaded
Open this post in threaded view
|

Re: Order payed with few billing accounts

jonwimp
In reply to this post by SkipDever
Skip,

"A lot of work" meaning it's largely unimplemented? I don't see a lot of operations dealing with
FinAccount (unless I'm not looking in the right places).

I had recently done some work in these areas (PaymentGatewayServices and such). Let me know if you
want me to throw together something quick, RFC or patch or whatever.

Jonathon

Skip wrote:

> Rashko
>
> I have been hashing this out with Si, etc. myself now for some weeks and the
> consensus as I see it is to use FinAccount and related entities.  But, this
> is a lot of work.
>
> Skip
>
> -----Original Message-----
> From: Rashko Rejmer [mailto:[hidden email]]
> Sent: Monday, September 17, 2007 6:03 AM
> To: [hidden email]
> Subject: Order payed with few billing accounts
>
>
>
> Hi all,
>
> I wanted to ask the community for opinion about ability orders/invoices to
> be payed with multiple billing accounts. I research the ml and jira and
> found that there are different points of view on this
> topic(https://issues.apache.org/jira/browse/OFBIZ-682).
> Now I have to implement ability to pay order with more then one billing
> accounts and to be able to create invoice from orders that are payed with
> different billing accounts.
> Now I have to implement ability to pay order with more then one billing
> accounts and to be able to create invoice from orders that are payed with
> different billing accounts.
> Personally, I am inclined to agree with Si's opinion that it is be better if
> billingAccountId field is located at OrderPaymentPreference entity to
> achieve this ability.
> I was wondering what are the disadvantages of this idea. I will be happy if
> you share your opinion on this with me.
>
> Regards,
> Rashko Rejmer
> --
> View this message in context:
> http://www.nabble.com/Order-payed-with-few-billing-accounts-tf4466514.html#a
> 12735296
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Order payed with few billing accounts

Rashko Rejmer
In reply to this post by jonwimp
Hi Jonathon,

Thanks for repaying on this post.

> Adding billingAcountId to OrderPaymentPreference should be the easiest way to go about it.
> I can't remember what I added for OrderPaymentPreference. But I do remember that I REALLY liked
> how there can be multiple OrderPaymentPreference(s) per OrderHeader, multiple ways to pay for an
> order.

I am glad to hear that someone has achieved such a functionality before with the same idea. So I will try to accomplish it the same way.

> I can't see any disadvantage to this solution. You will likely have to do some core/important
> changes to PaymentGatewayServices.java, I think.

I am aware of this problem. I was looking at PaymentGatewayServices.java and yes there will be need to change the logic in few services.

> The only disadvantage, possibly, is that there
> might be considerable "change propagation" effort if there are a lot of other codes that ASSUME
> there's only one billing account per order.

Yes this is problem and I will try to find all these places. Now I can't remember such places except the code that is related to billing accounts.

Do you have any idea how to handle creation of one invoice for orders that are payed with different BA. The problem is DB relation between BillingAccount and Invoice entities(invoice.billingAccountId field).

Thanks a lot,
Rashko Rejmer

Reply | Threaded
Open this post in threaded view
|

Re: Order payed with few billing accounts

cjhowe
In reply to this post by Rashko Rejmer
Ofbiz supports multiple invoices per order, just not multiple billing accounts per order.  You may wish to reconsider how you're modelling your order if you think your order requires multiple billing accounts.  The example that you gave about cash and credit card is a single invoice transaction with multiple payments.  The example of backorder would be multiple invoices.  Neither of them would be multiple billing accounts.

----- Original Message ----
From: Skip <[hidden email]>
To: [hidden email]
Sent: Monday, September 17, 2007 10:04:13 AM
Subject: RE: Order payed with few billing accounts

I havent actually gotten this far into the code, but I can't imagine how you
could NOT have multiple invoices per order.  How about the case where an
order contains backordered items and parts of the order are shipped in
multiple stages seperated by possibly many days?

In another case, the customer walks out of the store with part of an order,
having paid cash and leaves a credit card number to pay for the balance of
the order when it arrives.

Guess I better check this out before it becomes an issue.



-----Original Message-----
From: Jonathon -- Improov [mailto:[hidden email]]
Sent: Monday, September 17, 2007 7:40 AM
To: [hidden email]
Subject: Re: Order payed with few billing accounts


I agree with Si. I implemented something quite similar.

Adding billingAcountId to OrderPaymentPreference should be the easiest way
to go about it.

In fact, I've added similar fields to achieve similar relations to
OrderHeader:

1. Multiple invoices for each order.

2. Multiple billing account for each order.

I can't remember what I added for OrderPaymentPreference. But I do remember
that I REALLY liked
how there can be multiple OrderPaymentPreference(s) per OrderHeader,
multiple ways to pay for an
order.

And that actually set me thinking about why there were fields like
OrderHeader.billingAccountId,
which negates the flexibility provided by the
OrderHeader-OrderPaymentPreference relation. My
thoughts were almost exactly the same as Si Chen's in
https://issues.apache.org/jira/browse/OFBIZ-682 .

I can't see any disadvantage to this solution. You will likely have to do
some core/important
changes to PaymentGatewayServices.java, I think. The only disadvantage,
possibly, is that there
might be considerable "change propagation" effort if there are a lot of
other codes that ASSUME
there's only one billing account per order.

Still, I believe it's high time to extend this part of OFBiz to its fullest
potential. Nice to be
able to pay with multiple billing accounts, since we can already pay with
multiple credit cards.

Oh, by the way, there are quite a number of other bugs related to "paying
with multiple payment
methods" in this area, IIRC. Same as what Si Chen spotted in the JIRA issue.
I fixed a lot in the
past. Hmm... this one is fresh in my mind: there's a problem with
calculating "open amount" for an
order.

Jonathon

Rashko Rejmer wrote:

> Hi all,
>
> I wanted to ask the community for opinion about ability orders/invoices to
> be payed with multiple billing accounts. I research the ml and jira and
> found that there are different points of view on this
> topic(https://issues.apache.org/jira/browse/OFBIZ-682).
> Now I have to implement ability to pay order with more then one billing
> accounts and to be able to create invoice from orders that are payed with
> different billing accounts.
> Now I have to implement ability to pay order with more then one billing
> accounts and to be able to create invoice from orders that are payed with
> different billing accounts.
> Personally, I am inclined to agree with Si's opinion that it is be better
if
> billingAccountId field is located at OrderPaymentPreference entity to
> achieve this ability.
> I was wondering what are the disadvantages of this idea. I will be happy
if
> you share your opinion on this with me.
>
> Regards,
> Rashko Rejmer





Reply | Threaded
Open this post in threaded view
|

RE: Order payed with few billing accounts

SkipDever
In reply to this post by jonwimp
Jonathon

Better to hash it out with Si if your up to it.  I understand only part of
the issues.  Here is a thread that has comments from Leon outlining some of
the issues (his is second post from the bottom):

http://sourceforge.net/forum/forum.php?thread_id=1819289&forum_id=487771

Skip

-----Original Message-----
From: Jonathon -- Improov [mailto:[hidden email]]
Sent: Monday, September 17, 2007 8:31 AM
To: [hidden email]
Subject: Re: Order payed with few billing accounts


Skip,

"A lot of work" meaning it's largely unimplemented? I don't see a lot of
operations dealing with
FinAccount (unless I'm not looking in the right places).

I had recently done some work in these areas (PaymentGatewayServices and
such). Let me know if you
want me to throw together something quick, RFC or patch or whatever.

Jonathon

Skip wrote:
> Rashko
>
> I have been hashing this out with Si, etc. myself now for some weeks and
the
> consensus as I see it is to use FinAccount and related entities.  But,
this

> is a lot of work.
>
> Skip
>
> -----Original Message-----
> From: Rashko Rejmer [mailto:[hidden email]]
> Sent: Monday, September 17, 2007 6:03 AM
> To: [hidden email]
> Subject: Order payed with few billing accounts
>
>
>
> Hi all,
>
> I wanted to ask the community for opinion about ability orders/invoices to
> be payed with multiple billing accounts. I research the ml and jira and
> found that there are different points of view on this
> topic(https://issues.apache.org/jira/browse/OFBIZ-682).
> Now I have to implement ability to pay order with more then one billing
> accounts and to be able to create invoice from orders that are payed with
> different billing accounts.
> Now I have to implement ability to pay order with more then one billing
> accounts and to be able to create invoice from orders that are payed with
> different billing accounts.
> Personally, I am inclined to agree with Si's opinion that it is be better
if
> billingAccountId field is located at OrderPaymentPreference entity to
> achieve this ability.
> I was wondering what are the disadvantages of this idea. I will be happy
if
> you share your opinion on this with me.
>
> Regards,
> Rashko Rejmer
> --
> View this message in context:
>
http://www.nabble.com/Order-payed-with-few-billing-accounts-tf4466514.html#a
> 12735296
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>
>


Reply | Threaded
Open this post in threaded view
|

RE: Order payed with few billing accounts

SkipDever
In reply to this post by cjhowe
Chris

Yes, I did not mean to bring in the multiple billing accounts here, thats a
separate topic.

Thanks for the reply.  I don't really have this separate billing account
issue.  All my clients have one billing account per customer.

Skip

-----Original Message-----
From: Chris Howe [mailto:[hidden email]]
Sent: Monday, September 17, 2007 8:49 AM
To: [hidden email]
Subject: Re: Order payed with few billing accounts


Ofbiz supports multiple invoices per order, just not multiple billing
accounts per order.  You may wish to reconsider how you're modelling your
order if you think your order requires multiple billing accounts.  The
example that you gave about cash and credit card is a single invoice
transaction with multiple payments.  The example of backorder would be
multiple invoices.  Neither of them would be multiple billing accounts.

----- Original Message ----
From: Skip <[hidden email]>
To: [hidden email]
Sent: Monday, September 17, 2007 10:04:13 AM
Subject: RE: Order payed with few billing accounts

I havent actually gotten this far into the code, but I can't imagine how you
could NOT have multiple invoices per order.  How about the case where an
order contains backordered items and parts of the order are shipped in
multiple stages seperated by possibly many days?

In another case, the customer walks out of the store with part of an order,
having paid cash and leaves a credit card number to pay for the balance of
the order when it arrives.

Guess I better check this out before it becomes an issue.



-----Original Message-----
From: Jonathon -- Improov [mailto:[hidden email]]
Sent: Monday, September 17, 2007 7:40 AM
To: [hidden email]
Subject: Re: Order payed with few billing accounts


I agree with Si. I implemented something quite similar.

Adding billingAcountId to OrderPaymentPreference should be the easiest way
to go about it.

In fact, I've added similar fields to achieve similar relations to
OrderHeader:

1. Multiple invoices for each order.

2. Multiple billing account for each order.

I can't remember what I added for OrderPaymentPreference. But I do remember
that I REALLY liked
how there can be multiple OrderPaymentPreference(s) per OrderHeader,
multiple ways to pay for an
order.

And that actually set me thinking about why there were fields like
OrderHeader.billingAccountId,
which negates the flexibility provided by the
OrderHeader-OrderPaymentPreference relation. My
thoughts were almost exactly the same as Si Chen's in
https://issues.apache.org/jira/browse/OFBIZ-682 .

I can't see any disadvantage to this solution. You will likely have to do
some core/important
changes to PaymentGatewayServices.java, I think. The only disadvantage,
possibly, is that there
might be considerable "change propagation" effort if there are a lot of
other codes that ASSUME
there's only one billing account per order.

Still, I believe it's high time to extend this part of OFBiz to its fullest
potential. Nice to be
able to pay with multiple billing accounts, since we can already pay with
multiple credit cards.

Oh, by the way, there are quite a number of other bugs related to "paying
with multiple payment
methods" in this area, IIRC. Same as what Si Chen spotted in the JIRA issue.
I fixed a lot in the
past. Hmm... this one is fresh in my mind: there's a problem with
calculating "open amount" for an
order.

Jonathon

Rashko Rejmer wrote:

> Hi all,
>
> I wanted to ask the community for opinion about ability orders/invoices to
> be payed with multiple billing accounts. I research the ml and jira and
> found that there are different points of view on this
> topic(https://issues.apache.org/jira/browse/OFBIZ-682).
> Now I have to implement ability to pay order with more then one billing
> accounts and to be able to create invoice from orders that are payed with
> different billing accounts.
> Now I have to implement ability to pay order with more then one billing
> accounts and to be able to create invoice from orders that are payed with
> different billing accounts.
> Personally, I am inclined to agree with Si's opinion that it is be better
if
> billingAccountId field is located at OrderPaymentPreference entity to
> achieve this ability.
> I was wondering what are the disadvantages of this idea. I will be happy
if
> you share your opinion on this with me.
>
> Regards,
> Rashko Rejmer